[SCM] eclipse-cdt - Plug-in for eclipse to handle C/C++ - Debian package. branch, master, updated. 1c830ad4ea53681359d65ba0ec3a0c8bfd4ecaf3

Niels Thykier nthykier-guest at alioth.debian.org
Sun Jun 20 09:19:46 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "eclipse-cdt - Plug-in for eclipse to handle C/C++ - Debian package.".

The branch, master has been updated
       via  1c830ad4ea53681359d65ba0ec3a0c8bfd4ecaf3 (commit)
       via  9020fcc6fdf6438e13f34cb5a11e6c80771b887f (commit)
      from  1efe4dc941d8af07dfb7a9bf54bd19996a83f3c0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1c830ad4ea53681359d65ba0ec3a0c8bfd4ecaf3
Merge: 1efe4dc941d8af07dfb7a9bf54bd19996a83f3c0 9020fcc6fdf6438e13f34cb5a11e6c80771b887f
Author: Niels Thykier <niels at thykier.net>
Date:   Sun Jun 20 11:19:14 2010 +0200

    Merge branch 'upstream'

-----------------------------------------------------------------------

Summary of changes:
 build.xml                                          |   12 +
 maps/cdt.map                                       |    6 +-
 results/directory.txt                              |    6 +-
 results/featureVersions.properties                 |   21 +-
 .../org.eclipse.cdt.build.crossgcc/.project        |   17 +
 .../build.properties                               |   15 +
 .../eclipse_update_120.jpg                         |  Bin 21695 -> 21695 bytes
 .../epl-v10.html                                   |    0
 .../feature.properties                             |  140 +
 .../org.eclipse.cdt.build.crossgcc/feature.xml     |   32 +
 .../license.html                                   |    0
 .../sourceTemplateFeature/build.properties         |   13 +
 .../sourceTemplateFeature}/eclipse_update_120.jpg  |  Bin 21695 -> 21695 bytes
 .../sourceTemplateFeature}/epl-v10.html            |    0
 .../sourceTemplateFeature/feature.properties       |  140 +
 .../sourceTemplateFeature/feature.xml              |  128 +
 .../sourceTemplateFeature}/license.html            |    0
 .../sourceTemplatePlugin/about.html                |   22 +
 .../sourceTemplatePlugin/about.ini                 |   29 +
 .../sourceTemplatePlugin/about.mappings            |    6 +
 .../sourceTemplatePlugin/about.properties          |   23 +
 .../sourceTemplatePlugin/build.properties          |   27 +
 .../sourceTemplatePlugin}/eclipse32.gif            |  Bin 1706 -> 1706 bytes
 .../sourceTemplatePlugin/plugin.properties         |   12 +
 .../features/org.eclipse.cdt.examples.dsf/.project |   17 +
 .../build.properties                               |    0
 .../eclipse_update_120.jpg                         |  Bin 21695 -> 21695 bytes
 .../epl-v10.html                                   |    0
 .../feature.properties                             |  140 +
 .../org.eclipse.cdt.examples.dsf/feature.xml       |   63 +
 .../license.html                                   |    0
 .../sourceTemplateFeature/build.properties         |   13 +
 .../sourceTemplateFeature}/eclipse_update_120.jpg  |  Bin 21695 -> 21695 bytes
 .../sourceTemplateFeature}/epl-v10.html            |    0
 .../sourceTemplateFeature/feature.properties       |  139 +
 .../sourceTemplateFeature/feature.xml              |  128 +
 .../sourceTemplateFeature}/license.html            |    0
 .../sourceTemplatePlugin/about.html                |   22 +
 .../sourceTemplatePlugin/about.ini                 |   29 +
 .../sourceTemplatePlugin/about.mappings            |    6 +
 .../sourceTemplatePlugin/about.properties          |   23 +
 .../sourceTemplatePlugin/build.properties          |   27 +
 .../sourceTemplatePlugin}/eclipse32.gif            |  Bin 1706 -> 1706 bytes
 .../sourceTemplatePlugin/plugin.properties         |   12 +
 .../org.eclipse.cdt.launch.remote/.project         |   17 +
 .../org.eclipse.cdt.launch.remote/build.properties |   16 +
 .../eclipse_update_120.jpg                         |  Bin 21695 -> 21695 bytes
 .../epl-v10.html                                   |    0
 .../feature.properties                             |  140 +
 .../org.eclipse.cdt.launch.remote/feature.xml      |   58 +
 .../license.html                                   |    0
 .../sourceTemplateFeature}/eclipse_update_120.jpg  |  Bin 21695 -> 21695 bytes
 .../sourceTemplateFeature}/epl-v10.html            |    0
 .../sourceTemplateFeature/feature.properties       |  139 +
 .../sourceTemplateFeature}/license.html            |    0
 .../sourceTemplatePlugin/about.html                |   22 +
 .../sourceTemplatePlugin/about.ini                 |   29 +
 .../sourceTemplatePlugin/about.mappings            |    6 +
 .../sourceTemplatePlugin/about.properties          |   23 +
 .../sourceTemplatePlugin}/eclipse32.gif            |  Bin 1706 -> 1706 bytes
 .../sourceTemplatePlugin/plugin.properties         |   12 +
 results/features/org.eclipse.cdt.master/.project   |   17 +
 .../org.eclipse.cdt.master/build.properties        |    5 +
 .../eclipse_update_120.jpg                         |  Bin 21695 -> 21695 bytes
 .../epl-v10.html                                   |    0
 .../features/org.eclipse.cdt.master/feature.xml    |  104 +
 .../license.html                                   |    0
 results/features/org.eclipse.cdt.mylyn/.project    |   17 +
 .../build.properties                               |    0
 .../eclipse_update_120.jpg                         |  Bin 21695 -> 21695 bytes
 .../epl-v10.html                                   |    0
 .../org.eclipse.cdt.mylyn/feature.properties       |  128 +
 results/features/org.eclipse.cdt.mylyn/feature.xml |   62 +
 .../license.html                                   |    0
 results/features/org.eclipse.cdt.p2/.project       |   17 +
 .../features/org.eclipse.cdt.p2/build.properties   |   15 +
 .../eclipse_update_120.jpg                         |  Bin 21695 -> 21695 bytes
 .../epl-v10.html                                   |    0
 .../features/org.eclipse.cdt.p2/feature.properties |  141 +
 results/features/org.eclipse.cdt.p2/feature.xml    |   28 +
 .../license.html                                   |    0
 results/features/org.eclipse.cdt.testing/.project  |   22 +
 .../org.eclipse.cdt.testing/build.properties       |   15 +
 .../eclipse_update_120.jpg                         |  Bin 21695 -> 21695 bytes
 .../epl-v10.html                                   |    0
 .../org.eclipse.cdt.testing/feature.properties     |  140 +
 .../features/org.eclipse.cdt.testing/feature.xml   |  104 +
 .../license.html                                   |    0
 results/fetch_org.eclipse.cdt.build.crossgcc.xml   |   46 +
 results/fetch_org.eclipse.cdt.examples.dsf.xml     |   70 +
 results/fetch_org.eclipse.cdt.launch.remote.xml    |   46 +
 results/fetch_org.eclipse.cdt.master.xml           |   55 +
 results/fetch_org.eclipse.cdt.mylyn.xml            |   58 +
 results/fetch_org.eclipse.cdt.p2.xml               |   46 +
 results/fetch_org.eclipse.cdt.testing.xml          |  130 +
 results/maps/cdt.map                               |    6 +-
 results/pluginVersions.properties                  |   24 +-
 .../org.eclipse.ant.optional.junit/.project        |   11 +
 .../META-INF/MANIFEST.MF                           |   10 +
 .../org.eclipse.ant.optional.junit/about.html      |   28 +
 .../build.properties                               |   12 +
 .../.classpath                                     |    0
 .../org.eclipse.cdt.build.crossgcc/.project        |   28 +
 .../.settings/org.eclipse.jdt.core.prefs           |    8 +
 .../META-INF/MANIFEST.MF                           |   15 +
 .../about.html                                     |    0
 .../about.ini                                      |    0
 .../about.mappings                                 |    0
 .../about.properties                               |   24 +
 .../build.properties                               |   22 +
 .../eclipse32.gif                                  |  Bin 1706 -> 1706 bytes
 .../plugin.properties                              |   14 +
 .../org.eclipse.cdt.build.crossgcc/plugin.xml      |  190 +
 .../cdt/build/crossgcc/SetCrossCommandProcess.java |   76 +
 .../cdt/internal/build/crossgcc/Activator.java     |   60 +
 .../build/crossgcc/CrossCommandLineGenerator.java  |   42 +
 .../crossgcc/CrossEnvironmentVariableSupplier.java |   81 +
 .../templates/setCrossCommand/template.xml         |   33 +
 .../org.eclipse.cdt.core.aix/os/aix/ppc/libpty.so  |  Bin 0 -> 11020 bytes
 .../os/aix/ppc/libspawner.so                       |  Bin 0 -> 27227 bytes
 .../os/linux/ia64/libpty.so                        |  Bin 0 -> 16450 bytes
 .../os/linux/ia64/libspawner.so                    |  Bin 0 -> 36865 bytes
 .../os/linux/ppc/libpty.so                         |  Bin 0 -> 17218 bytes
 .../os/linux/ppc/libspawner.so                     |  Bin 0 -> 25993 bytes
 .../os/linux/x86/libpty.so                         |  Bin 0 -> 8071 bytes
 .../os/linux/x86/libspawner.so                     |  Bin 0 -> 15895 bytes
 .../os/linux/x86_64/libpty.so                      |  Bin 0 -> 10927 bytes
 .../os/linux/x86_64/libspawner.so                  |  Bin 0 -> 20161 bytes
 .../org.eclipse.cdt.core.qnx/os/qnx/x86/libpty.so  |  Bin 0 -> 7151 bytes
 .../os/qnx/x86/libspawner.so                       |  Bin 0 -> 12561 bytes
 .../os/solaris/sparc/libpty.so                     |  Bin 0 -> 9872 bytes
 .../os/solaris/sparc/libspawner.so                 |  Bin 0 -> 19428 bytes
 .../plugins/org.eclipse.cdt.core.tests/.classpath  |   12 +
 .../.cvsignore                                     |    0
 .../plugins/org.eclipse.cdt.core.tests/.project    |   30 +
 .../.settings/org.eclipse.cdt.core.prefs           |    5 +
 .../.settings/org.eclipse.jdt.core.prefs           |   62 +
 .../.settings/org.eclipse.jdt.ui.prefs             |    3 +
 .../.settings/org.eclipse.pde.prefs                |   14 +
 .../plugins/org.eclipse.cdt.core.tests/ChangeLog   | 1865 ++++
 .../META-INF/MANIFEST.MF                           |   45 +
 .../META-INF/eclipse.inf                           |    1 +
 .../plugins/org.eclipse.cdt.core.tests/about.html  |   24 +
 .../org.eclipse.cdt.core.tests/build.properties    |   35 +
 .../cdescriptor/tests/CDescriptorOldTests.java     |  404 +
 .../core/cdescriptor/tests/CDescriptorTests.java   |  539 ++
 .../tests/ErrorParserEfsFileMatchingTest.java      |  519 ++
 .../tests/ErrorParserFileMatchingTest.java         | 1314 +++
 .../errorparsers/tests/ErrorParserManagerTest.java |  307 +
 .../errorparsers/tests/ErrorParserTests.java       |   33 +
 .../tests/FileBasedErrorParserTests.java           |   54 +
 .../errorparsers/tests/GCCErrorParserTests.java    |  129 +
 .../errorparsers/tests/GLDErrorParserTests.java    |   79 +
 .../tests/GenericErrorParserTests.java             |  263 +
 .../errorparsers/tests/ResourceHelper.java         |  557 ++
 .../index/provider/test/AbstractDummyProvider.java |   35 +
 .../index/provider/test/DummyProviderTraces.java   |   49 +
 .../internal/index/provider/test/Providers.java    |   19 +
 .../core/internal/tests/PositionTrackerTests.java  |  358 +
 .../core/internal/tests/ResourceLookupTests.java   |  233 +
 .../cdt/core/internal/tests/StringBuilderTest.java |   56 +
 .../tests/filesystem/ram/MemoryFileStore.java      |   82 +
 .../tests/filesystem/ram/MemoryFileSystem.java     |   52 +
 .../internal/tests/filesystem/ram/MemoryTree.java  |  277 +
 .../core/internal/tests/filesystem/ram/Policy.java |   29 +
 .../eclipse/cdt/core/winreg/tests/WinRegTests.java |   45 +
 .../org/eclipse/cdt/utils/CommandLineUtilTest.java |  224 +
 .../cdt/core/language/AllLanguageTests.java        |   28 +
 .../core/language/LanguageInheritanceTests.java    |  204 +
 .../cdt/core/model/tests/ASTCacheTests.java        |  312 +
 .../eclipse/cdt/core/model/tests/AllCoreTests.java |   66 +
 .../model/tests/AllLanguageInterfaceTests.java     |   49 +
 .../eclipse/cdt/core/model/tests/ArchiveTests.java |  215 +
 .../cdt/core/model/tests/AsmModelBuilderTest.java  |  118 +
 .../eclipse/cdt/core/model/tests/BinaryTests.java  |  432 +
 .../core/model/tests/CModelBuilderBugsTest.java    |   86 +
 .../model/tests/CModelBuilderInactiveCodeTest.java |   70 +
 .../cdt/core/model/tests/CModelElementsTests.java  |  555 ++
 .../cdt/core/model/tests/CModelExceptionTest.java  |  100 +
 .../core/model/tests/CModelIdentifierTests.java    |  114 +
 .../eclipse/cdt/core/model/tests/CModelTests.java  |  397 +
 .../cdt/core/model/tests/CPathEntryTest.java       |  294 +
 .../cdt/core/model/tests/DeclaratorsTests.java     |  225 +
 .../cdt/core/model/tests/ElementDeltaTests.java    |  285 +
 .../eclipse/cdt/core/model/tests/FlagTests.java    |  215 +
 .../cdt/core/model/tests/IIncludeTests.java        |  107 +
 .../eclipse/cdt/core/model/tests/IMacroTests.java  |  118 +
 .../cdt/core/model/tests/IStructureTests.java      |  436 +
 .../cdt/core/model/tests/ITemplateTests.java       |  347 +
 .../cdt/core/model/tests/IntegratedCModelTest.java |  116 +
 .../eclipse/cdt/core/model/tests/MacroTests.java   |  136 +
 .../model/tests/StructuralCModelElementsTests.java |  546 ++
 .../cdt/core/model/tests/StructuralMacroTests.java |   46 +
 .../core/model/tests/StructuralStructureTests.java |  173 +
 .../core/model/tests/StructuralTemplateTests.java  |  231 +
 .../core/model/tests/TranslationUnitBaseTest.java  |  156 +
 .../cdt/core/model/tests/TranslationUnitTests.java |  252 +
 .../cdt/core/model/tests/WorkingCopyTests.java     |  113 +
 .../model/AllCProjectDescriptionTests.java         |   35 +
 .../settings/model/BackwardCompatibilityTests.java |  279 +
 .../CConfigurationDescriptionReferenceTests.java   |  195 +
 .../model/CProjectDescriptionBasicTests.java       |  301 +
 .../model/CProjectDescriptionStorageTests.java     |  358 +
 .../cdt/core/settings/model/CfgSettingsTests.java  |  159 +
 .../model/ExternalSettingsProviderTests.java       |  286 +
 .../settings/model/PathSettingsContainerTests.java |  124 +
 .../settings/model/ProjectCreationStateTests.java  |  401 +
 .../core/settings/model/TestCfgDataProvider.java   |   19 +
 .../settings/model/TestExtSettingsProvider.java    |   84 +
 ...estUserAndDiscoveredEntriesCfgDataProvider.java |   43 +
 .../eclipse/cdt/core/parser/tests/ASTComparer.java |  135 +
 .../cdt/core/parser/tests/ArrayUtilsTest.java      |  233 +
 .../cdt/core/parser/tests/AutomatedFramework.java  |  186 +
 .../cdt/core/parser/tests/CharArrayUtilsTest.java  |   53 +
 .../cdt/core/parser/tests/FileBasePluginTest.java  |  161 +
 .../cdt/core/parser/tests/ObjectMapTest.java       |  162 +
 .../cdt/core/parser/tests/ParserTestSuite.java     |   41 +
 .../eclipse/cdt/core/parser/tests/XMLDumper.java   |  153 +
 .../cdt/core/parser/tests/ast2/AST2BaseTest.java   |  700 ++
 .../tests/ast2/AST2CPPImplicitNameTests.java       |  460 +
 .../core/parser/tests/ast2/AST2CPPSpecTest.java    | 6560 ++++++++++++++
 .../cdt/core/parser/tests/ast2/AST2CPPTests.java   | 7407 ++++++++++++++++
 .../cdt/core/parser/tests/ast2/AST2CSpecTest.java  | 2109 +++++
 .../parser/tests/ast2/AST2FileBasePluginTest.java  |  153 +
 .../cdt/core/parser/tests/ast2/AST2KnRTests.java   |  680 ++
 .../tests/ast2/AST2SelectionParseBaseTest.java     |  161 +
 .../parser/tests/ast2/AST2SelectionParseTest.java  | 1668 ++++
 .../core/parser/tests/ast2/AST2SpecBaseTest.java   |  197 +
 .../core/parser/tests/ast2/AST2TemplateTests.java  | 4142 +++++++++
 .../cdt/core/parser/tests/ast2/AST2Tests.java      | 6545 ++++++++++++++
 .../core/parser/tests/ast2/AST2UtilOldTests.java   |  449 +
 .../cdt/core/parser/tests/ast2/AST2UtilTests.java  |  188 +
 .../parser/tests/ast2/ASTInactiveCodeTests.java    |  403 +
 .../parser/tests/ast2/ASTNodeSelectorTest.java     |  438 +
 .../core/parser/tests/ast2/AccessControlTests.java |  160 +
 .../cdt/core/parser/tests/ast2/CDOMBaseTest.java   |   62 +
 .../core/parser/tests/ast2/CharArrayMapTest.java   |  371 +
 .../parser/tests/ast2/CodeReaderCacheTest.java     |  191 +
 .../cdt/core/parser/tests/ast2/CommentTests.java   |  252 +
 .../parser/tests/ast2/CompleteParser2Tests.java    | 2704 ++++++
 .../parser/tests/ast2/DOMFileBasePluginTest.java   |  163 +
 .../tests/ast2/DOMGCCParserExtensionTestSuite.java |   32 +
 .../ast2/DOMGCCSelectionParseExtensionsTest.java   |   45 +
 .../tests/ast2/DOMLocationInclusionTests.java      |  614 ++
 .../parser/tests/ast2/DOMLocationMacroTests.java   |  483 +
 .../core/parser/tests/ast2/DOMLocationTests.java   |  684 ++
 .../core/parser/tests/ast2/DOMParserTestSuite.java |   59 +
 .../tests/ast2/DOMPreprocessorInformationTest.java |  204 +
 .../cdt/core/parser/tests/ast2/DOMSearchUtil.java  |  218 +
 .../tests/ast2/DOMSelectionParseBaseTest.java      |   66 +
 .../parser/tests/ast2/DOMSelectionParseTest.java   | 1755 ++++
 .../parser/tests/ast2/FaultToleranceTests.java     |  263 +
 .../tests/ast2/GCCCompleteParseExtensionsTest.java |  411 +
 .../cdt/core/parser/tests/ast2/GCCTests.java       |  833 ++
 .../core/parser/tests/ast2/ImageLocationTests.java |  126 +
 .../parser/tests/ast2/LanguageExtensionsTest.java  |  243 +
 .../core/parser/tests/ast2/QuickParser2Tests.java  | 1566 ++++
 .../cdt/core/parser/tests/ast2/SemanticsTests.java |  113 +
 .../cdt/core/parser/tests/ast2/TaskParserTest.java |   90 +
 .../cdt/core/parser/tests/ast2/TestLexerLog.java   |   66 +
 .../parser/tests/prefix/BasicCompletionTest.java   |  194 +
 .../parser/tests/prefix/CompletionTestBase.java    |  165 +
 .../parser/tests/prefix/CompletionTestSuite.java   |   24 +
 .../core/parser/tests/rewrite/RewriteBaseTest.java |  116 +
 .../core/parser/tests/rewrite/RewriteTester.java   |  215 +
 .../core/parser/tests/rewrite/RewriteTests.java    |   31 +
 .../cdt/core/parser/tests/rewrite/TestHelper.java  |   20 +
 .../core/parser/tests/rewrite/TestSourceFile.java  |   88 +
 .../tests/rewrite/astwriter/ASTWriterTest.java     |  140 +
 .../rewrite/astwriter/ASTWriterTestSourceFile.java |   44 +
 .../rewrite/astwriter/AstWriterTestSuite.java      |   54 +
 .../rewrite/astwriter/SourceRewriteTester.java     |  167 +
 .../changegenerator/ChangeGeneratorTest.java       |   91 +
 .../changegenerator/ChangeGeneratorTestSuite.java  |   38 +
 .../changegenerator/append/AppendTestSuite.java    |   38 +
 .../changegenerator/append/ArrayModifierTest.java  |   71 +
 .../append/ArraySizeExpressionTest.java            |   71 +
 .../append/CtorChainInitializerTest.java           |   72 +
 .../changegenerator/append/ExceptionTest.java      |   74 +
 .../changegenerator/append/ExpressionTest.java     |   69 +
 .../changegenerator/append/ParameterTest.java      |   79 +
 .../append/ParameterToListTest.java                |   79 +
 .../append/PointerToParameterTest.java             |   72 +
 .../append/PointerToPointerParameterTest.java      |   69 +
 .../insertbefore/AddDeclarationBug.java            |   95 +
 .../insertbefore/ArrayModifierTest.java            |   69 +
 .../insertbefore/ArraySizeExpressionTest.java      |   72 +
 .../insertbefore/CtorChainInitializerTest.java     |   70 +
 .../insertbefore/ExceptionTest.java                |   77 +
 .../insertbefore/ExpressionTest.java               |   71 +
 .../insertbefore/FirstParameterTest.java           |   85 +
 .../insertbefore/InsertBeforeTestSuite.java        |   37 +
 .../insertbefore/PointerParameterTest.java         |   71 +
 .../changegenerator/remove/ArrayModifierTest.java  |   63 +
 .../remove/ArraySizeExpressionTest.java            |   67 +
 .../remove/CtorChainInitializerTest.java           |   64 +
 .../changegenerator/remove/DeclarationTest.java    |   69 +
 .../changegenerator/remove/ExceptionTest.java      |   64 +
 .../changegenerator/remove/ExpressionTest.java     |   66 +
 .../changegenerator/remove/FirstParameterTest.java |   74 +
 .../changegenerator/remove/LastParameterTest.java  |   70 +
 .../remove/MiddleParameterTest.java                |   72 +
 .../remove/NewInitializerExpressionTest.java       |   65 +
 .../remove/PointerInParameterTest.java             |   74 +
 .../changegenerator/remove/RemoveTestSuite.java    |   42 +
 .../remove/SingleParameterTest.java                |   67 +
 .../changegenerator/remove/StatementTest.java      |   66 +
 .../changegenerator/replace/ArrayModifierTest.java |   69 +
 .../replace/ArraySizeExpressionTest.java           |   71 +
 .../replace/CtorChainInitializerTest.java          |   70 +
 .../changegenerator/replace/ExceptionTest.java     |   78 +
 .../changegenerator/replace/ExpressionTest.java    |   71 +
 .../changegenerator/replace/IdenticalTest.java     |   59 +
 .../changegenerator/replace/InitializerTest.java   |   69 +
 .../changegenerator/replace/MoveRenameTest.java    |   77 +
 .../rewrite/changegenerator/replace/MoveTest.java  |   71 +
 .../rewrite/changegenerator/replace/NameTest.java  |   67 +
 .../replace/NewInitializerExpressionTest.java      |   66 +
 .../replace/PointerInParameterTest.java            |   70 +
 .../changegenerator/replace/ReplaceTestSuite.java  |   41 +
 .../changegenerator/replace/SameNameTest.java      |   67 +
 .../changegenerator/replace/StatementTest.java     |   75 +
 .../rewrite/comenthandler/CommentHandlingTest.java |  195 +
 .../comenthandler/CommentHandlingTestSuite.java    |   35 +
 .../rewrite/comenthandler/NodeCommentMapTest.java  |  149 +
 .../tests/scanner/ExpansionExplorerTests.java      |  361 +
 .../tests/scanner/FileCodeReaderFactory.java       |   69 +
 .../parser/tests/scanner/InactiveCodeTests.java    |  278 +
 .../core/parser/tests/scanner/InclusionTests.java  |  204 +
 .../cdt/core/parser/tests/scanner/LexerTests.java  |  709 ++
 .../parser/tests/scanner/LocationMapTests.java     |  578 ++
 .../parser/tests/scanner/PortedScannerTests.java   | 2465 ++++++
 .../tests/scanner/PreprocessorBugsTests.java       |  278 +
 .../tests/scanner/PreprocessorSpeedTest.java       |  220 +
 .../parser/tests/scanner/PreprocessorTests.java    | 1365 +++
 .../tests/scanner/PreprocessorTestsBase.java       |  205 +
 .../parser/tests/scanner/ScannerTestSuite.java     |   30 +
 .../cdt/core/parser/tests/scanner/TestMacro.java   |   85 +
 .../cdt/internal/index/tests/Bug246129.java        |  268 +
 .../internal/index/tests/EmptyIndexFragment.java   |  145 +
 .../cdt/internal/index/tests/FakeIndexer.java      |   30 +
 .../tests/IndexBindingResolutionTestBase.java      |  421 +
 .../cdt/internal/index/tests/IndexBugsTests.java   | 2226 +++++
 .../index/tests/IndexCBindingResolutionBugs.java   |  414 +
 .../index/tests/IndexCBindingResolutionTest.java   |  408 +
 .../index/tests/IndexCPPBindingResolutionBugs.java | 1139 +++
 .../index/tests/IndexCPPBindingResolutionTest.java | 1512 ++++
 .../tests/IndexCPPTemplateResolutionTest.java      | 1653 ++++
 .../internal/index/tests/IndexCompositeTests.java  |  475 +
 .../cdt/internal/index/tests/IndexIncludeTest.java |  625 ++
 .../internal/index/tests/IndexListenerTest.java    |  139 +
 .../internal/index/tests/IndexLocationTest.java    |  352 +
 .../cdt/internal/index/tests/IndexNamesTests.java  |  395 +
 .../index/tests/IndexProviderManagerTest.java      |  753 ++
 .../cdt/internal/index/tests/IndexSearchTest.java  |  310 +
 .../cdt/internal/index/tests/IndexTestBase.java    |   67 +
 .../cdt/internal/index/tests/IndexTests.java       |   42 +
 .../cdt/internal/index/tests/IndexUpdateTests.java | 1173 +++
 .../internal/index/tests/TeamSharedIndexTest.java  |  374 +
 .../index/tests/TrilogyPerformanceTest.java        |   72 +
 .../internal/pdom/tests/BTreeExpensiveTests.java   |   56 +
 .../cdt/internal/pdom/tests/BTreeTests.java        |  234 +
 .../internal/pdom/tests/CCompositeTypeTests.java   |  272 +
 .../cdt/internal/pdom/tests/CFunctionTests.java    |   98 +
 .../internal/pdom/tests/CPPClassTemplateTests.java |  347 +
 .../internal/pdom/tests/CPPCompositeTypeTests.java |  186 +
 .../cdt/internal/pdom/tests/CPPFieldTests.java     |  131 +
 .../pdom/tests/CPPFunctionTemplateTests.java       |  103 +
 .../cdt/internal/pdom/tests/CPPFunctionTests.java  |  218 +
 .../cdt/internal/pdom/tests/CPPVariableTests.java  |   79 +
 .../cdt/internal/pdom/tests/CVariableTests.java    |   80 +
 .../cdt/internal/pdom/tests/ClassTests.java        |  236 +
 .../cdt/internal/pdom/tests/DBPropertiesTests.java |  145 +
 .../eclipse/cdt/internal/pdom/tests/DBTest.java    |  318 +
 .../cdt/internal/pdom/tests/DefDeclTests.java      |  321 +
 .../cdt/internal/pdom/tests/EnumerationTests.java  |  118 +
 .../internal/pdom/tests/FilesOnReindexTests.java   |   82 +
 .../pdom/tests/GeneratePDOMApplicationTest.java    |  392 +
 .../cdt/internal/pdom/tests/IncludesTests.java     |   97 +
 .../cdt/internal/pdom/tests/MethodTests.java       |  305 +
 .../cdt/internal/pdom/tests/NamespaceTests.java    |  225 +
 .../tests/OverloadsWithinCommonHeaderTests.java    |  141 +
 .../pdom/tests/OverloadsWithinSingleTUTests.java   |  107 +
 .../cdt/internal/pdom/tests/PDOMCBugsTest.java     |  107 +
 .../cdt/internal/pdom/tests/PDOMCPPBugsTest.java   |  252 +
 .../cdt/internal/pdom/tests/PDOMLocationTests.java |   87 +
 .../cdt/internal/pdom/tests/PDOMPrettyPrinter.java |  118 +
 .../cdt/internal/pdom/tests/PDOMProviderTests.java |  308 +
 .../cdt/internal/pdom/tests/PDOMSearchTest.java    |  306 +
 .../cdt/internal/pdom/tests/PDOMTestBase.java      |  255 +
 .../eclipse/cdt/internal/pdom/tests/PDOMTests.java |   62 +
 .../pdom/tests/RaceCondition157992Test.java        |   49 +
 .../cdt/internal/pdom/tests/TypesTests.java        |  101 +
 .../plugins/org.eclipse.cdt.core.tests/plugin.xml  |  162 +
 .../eclipse/cdt/core/tests/BaseTestFramework.java  |  141 +
 .../org/eclipse/cdt/core/tests/FailingTest.java    |   70 +
 .../resources/asmTests/AsmTest.S                   |   65 +
 .../resources/cfiles/CModelElementsTestStart.h     |  141 +
 .../resources/cfiles/TranslationUnits.c            |   70 +
 .../resources/cfiles/WorkingCopyTestStart.h        |    2 +
 .../resources/cfiles/included.h                    |   10 +
 .../cmodel/CModelBuilderInactiveCodeTest.cpp       |    5 +
 .../resources/cmodel/CModelBuilderTest.cpp         |   19 +
 .../resources/cmodel/DeclaratorsTests.cpp          |   24 +
 .../resources/cmodel/IIncludeTest.h                |   42 +
 .../resources/cmodel/IMacroTest.h                  |    4 +
 .../resources/cmodel/IStructure.cpp                |   90 +
 .../resources/cmodel/ITemplate.cpp                 |   72 +
 .../resources/cmodel/MacroTests.cpp                |   24 +
 .../resources/dependency/DepTest.cpp               |    8 +
 .../resources/dependency/DepTest.h                 |    8 +
 .../resources/dependency/DepTest2.cpp              |    8 +
 .../resources/dependency/DepTest2.h                |    8 +
 .../resources/dependency/DepTest3.cpp              |    7 +
 .../resources/dependency/DepTest3.h                |    8 +
 .../resources/dependency/Inc1.h                    |    8 +
 .../resources/dependency/a.h                       |    8 +
 .../resources/dependency/c.h                       |    6 +
 .../resources/dependency/d.h                       |    6 +
 .../resources/errortests/output-1                  |  443 +
 .../resources/exe/Makefile                         |    8 +
 .../resources/exe/common.mk                        |    7 +
 .../resources/exe/main.c                           |    7 +
 .../resources/exe/ppc/Makefile                     |    8 +
 .../resources/exe/ppc/be.g/Makefile                |    1 +
 .../resources/exe/ppc/be.g/exe_g                   |  Bin 0 -> 18341 bytes
 .../resources/exe/ppc/be.g/main.o                  |  Bin 0 -> 7724 bytes
 .../resources/exe/ppc/be.g/test.o                  |  Bin 0 -> 8036 bytes
 .../resources/exe/ppc/be.g/test2.o                 |  Bin 0 -> 8128 bytes
 .../resources/exe/test.c                           |   14 +
 .../resources/exe/test2.c                          |   13 +
 .../resources/exe/x86/Makefile                     |    8 +
 .../resources/exe/x86/o.g/Makefile                 |    1 +
 .../resources/exe/x86/o.g/exe_g                    |  Bin 0 -> 10783 bytes
 .../resources/exe/x86/o.g/main.o                   |  Bin 0 -> 5980 bytes
 .../resources/exe/x86/o.g/test.o                   |  Bin 0 -> 6148 bytes
 .../resources/exe/x86/o.g/test2.o                  |  Bin 0 -> 6284 bytes
 .../resources/exe/x86/o/Makefile                   |    1 +
 .../resources/exe/x86/o/exe                        |  Bin 0 -> 4591 bytes
 .../resources/exe/x86/o/main.o                     |  Bin 0 -> 892 bytes
 .../resources/exe/x86/o/test.o                     |  Bin 0 -> 980 bytes
 .../resources/exe/x86/o/test2.o                    |  Bin 0 -> 1076 bytes
 .../resources/exebig/Makefile                      |    8 +
 .../resources/exebig/common.mk                     |    7 +
 .../resources/exebig/main.c                        |    8 +
 .../resources/exebig/x86/Makefile                  |    8 +
 .../resources/exebig/x86/o.g/Makefile              |    1 +
 .../resources/exebig/x86/o.g/exebig_g              |  Bin 0 -> 9065 bytes
 .../resources/exebig/x86/o.g/main.o                |  Bin 0 -> 6180 bytes
 .../indexTests/bug246129/include/ext/dummy.h       |    3 +
 .../resources/indexTests/bug246129/include/type.h  |    5 +
 .../resources/indexTests/bug246129/source.cpp      |    9 +
 .../indexTests/bug246129/wrapper_include/type.h    |    6 +
 .../resources/indexTests/includes/included.h       |    2 +
 .../resources/indexTests/includes/notIncluded.h    |    1 +
 .../resources/indexTests/includes/testInclude.cpp  |    3 +
 .../resources/indexTests/search/enumerator.cpp     |    3 +
 .../resources/indexTests/search/macro.c            |    2 +
 .../resources/indexTests/search/nested.cpp         |   13 +
 .../resources/indexTests/search/staticFunc1.cpp    |    2 +
 .../resources/indexTests/search/staticFunc2.cpp    |    2 +
 .../resources/indexTests/trilogy/trilogy.cpp       |    5 +
 .../resources/indexer/DocumentManager.cpp          |   25 +
 .../resources/indexer/DocumentManager.h            |   20 +
 .../resources/indexer/extramail.cpp                |  112 +
 .../resources/indexer/mail.cpp                     |   98 +
 .../resources/indexer/reftest.cpp                  |   22 +
 .../parser/AutomatedTest/AutomatedTest.properties  |   23 +
 .../FractionalAutomatedTest.properties             |   27 +
 .../parser/AutomatedTest/defaultC/Simple.c         |   43 +
 .../parser/AutomatedTest/defaultC/Simple.h         |   17 +
 .../parser/AutomatedTest/defaultCpp/Simple.cpp     |   37 +
 .../parser/AutomatedTest/defaultCpp/Simple.h       |   32 +
 .../resources/parser/LineNumberTest.h              |   43 +
 .../resources/parser/TortureTest/.cvsignore        |    1 +
 .../parser/TortureTest/ReadMe-TortureText.txt      |   31 +
 .../resources/pdomtests/classTests/class.cpp       |   34 +
 .../resources/pdomtests/classTests/friend.cpp      |    9 +
 .../resources/pdomtests/classTests/nested.cpp      |   12 +
 .../resources/pdomtests/classTests/pr147903.cpp    |   21 +
 .../pdomtests/compositeTypeTests/compositeType.c   |  129 +
 .../pdomtests/compositeTypeTests/compositeType.cpp |  120 +
 .../resources/pdomtests/defDeclTests/func.c        |   65 +
 .../resources/pdomtests/defDeclTests/second.c      |   19 +
 .../resources/pdomtests/defDeclTests/types.c       |   48 +
 .../resources/pdomtests/defDeclTests/vars.c        |   53 +
 .../pdomtests/enumerationTests/enumTest.c          |    9 +
 .../pdomtests/enumerationTests/enumTest.cpp        |    9 +
 .../resources/pdomtests/fieldTests/fields.cpp      |   60 +
 .../resources/pdomtests/filesOnReindex/simple.cpp  |    1 +
 .../pdomtests/functionTests/declarations.c         |   30 +
 .../pdomtests/functionTests/declarations.cpp       |   24 +
 .../resources/pdomtests/functionTests/modifiers.c  |   21 +
 .../pdomtests/functionTests/modifiers.cpp          |   12 +
 .../pdomtests/functionTests/overloaded.cpp         |   13 +
 .../generatePDOMTests/cyclicIncludes1/a.cpp        |    1 +
 .../generatePDOMTests/cyclicIncludes1/b.h          |    5 +
 .../generatePDOMTests/cyclicIncludes1/c.h          |    5 +
 .../generatePDOMTests/cyclicIncludes2/a.cpp        |    1 +
 .../generatePDOMTests/cyclicIncludes2/b.h          |    5 +
 .../generatePDOMTests/project1/a/b/c/d e/this.h    |    7 +
 .../pdomtests/generatePDOMTests/project1/this.cpp  |    7 +
 .../pdomtests/generatePDOMTests/project2/aaa.h     |    3 +
 .../pdomtests/generatePDOMTests/project2/base.h    |    1 +
 .../pdomtests/generatePDOMTests/project3/aaa.h     |   12 +
 .../resources/pdomtests/includesTests/I1.cpp       |    6 +
 .../resources/pdomtests/includesTests/I1.h         |   13 +
 .../resources/pdomtests/includesTests/I2.cpp       |    6 +
 .../resources/pdomtests/includesTests/I2.h         |   14 +
 .../resources/pdomtests/includesTests/I3.cpp       |    6 +
 .../resources/pdomtests/includesTests/I3.h         |   13 +
 .../resources/pdomtests/includesTests/I4.cpp       |    6 +
 .../resources/pdomtests/includesTests/I4.h         |   13 +
 .../resources/pdomtests/includesTests/I5.cpp       |    6 +
 .../resources/pdomtests/includesTests/I5.h         |   13 +
 .../resources/pdomtests/includesTests/I6.cpp       |    1 +
 .../resources/pdomtests/includesTests/a/I7.cpp     |    2 +
 .../resources/pdomtests/includesTests/a/b/I6.h}    |    0
 .../pdomtests/methodTests/inheritance.cpp          |  131 +
 .../resources/pdomtests/namespaceTests/extend.cpp  |    9 +
 .../resources/pdomtests/namespaceTests/friend.cpp  |   15 +
 .../pdomtests/namespaceTests/namespace.cpp         |   15 +
 .../pdomtests/namespaceTests/overload.cpp          |   15 +
 .../resources/pdomtests/namespaceTests/unnamed.cpp |    8 +
 .../pdomtests/overloadsWithinCommonHeader/common.h |   30 +
 .../manyOverloadedClientA.cpp                      |   68 +
 .../manyOverloadedClientB.cpp                      |   68 +
 .../withinSingleTranslationUnit.cpp                |   52 +
 .../resources/pdomtests/searchTests/Class1.cpp     |   11 +
 .../resources/pdomtests/searchTests/Class1.h       |   29 +
 .../resources/pdomtests/searchTests/Class2.cpp     |   15 +
 .../resources/pdomtests/searchTests/Class2.h       |   12 +
 .../resources/pdomtests/searchTests/main.cpp       |   22 +
 .../resources/pdomtests/types/bug145351.c          |    5 +
 .../resources/pdomtests/types/typedef.c            |   10 +
 .../resources/pdomtests/types/typedef.cpp          |   12 +
 .../resources/pdomtests/variableTests/variables.c  |    4 +
 .../pdomtests/variableTests/variables.cpp          |    4 +
 .../ASTWriterCommentedDeclSpecTestSource.awts      |  222 +
 .../ASTWriterCommentedDeclarationTestSource.awts   |  243 +
 .../ASTWriterCommentedDeclaratorTestSource.awts    |  252 +
 .../rewrite/ASTWriterCommentedNameTestSource.awts  |   86 +
 .../ASTWriterCommentedStatementTestSource.awts     |  660 ++
 .../rewrite/ASTWriterCommentedTestSource.awts      | 1491 ++++
 .../rewrite/ASTWriterCommentedTestSource2.awts     |   67 +
 .../rewrite/ASTWriterDeclSpecTestSource.awts       |  164 +
 .../rewrite/ASTWriterDeclarationTestSource.awts    |  110 +
 .../rewrite/ASTWriterDeclaratorTestSource.awts     |   89 +
 .../rewrite/ASTWriterExpressionTestSource.awts     |  185 +
 .../rewrite/ASTWriterInitializerTestSource.awts    |   37 +
 .../resources/rewrite/ASTWriterNameTestSource.awts |   32 +
 .../rewrite/ASTWriterPreprocessorTestSource.awts   |   94 +
 .../rewrite/ASTWriterStatementTestSource.awts      |  313 +
 .../rewrite/ASTWriterTemplateTestSource.awts       |   12 +
 .../rewrite/CommentHandlingTestSource.rts          | 3145 +++++++
 .../resources/search/classDecl.cpp                 |  102 +
 .../resources/search/include.h                     |   36 +
 .../resources/templateengine/AddFile.xml           |   24 +
 .../resources/templateengine/AddFiles.xml          |   22 +
 .../resources/templateengine/AddLink.xml           |   22 +
 .../resources/templateengine/Append.xml            |   36 +
 .../resources/templateengine/AppendCreate.xml      |   23 +
 .../resources/templateengine/Basename.cpp          |   37 +
 .../resources/templateengine/Basename.h            |   27 +
 .../resources/templateengine/Copy.xml              |   22 +
 .../templateengine/CreateResourceIdentifier.xml    |   35 +
 .../templateengine/CreateSourceFolder.xml          |   16 +
 .../resources/testlib/Makefile                     |    8 +
 .../resources/testlib/common.mk                    |    6 +
 .../resources/testlib/test.c                       |   14 +
 .../resources/testlib/test2.c                      |   13 +
 .../resources/testlib/x86/Makefile                 |    8 +
 .../resources/testlib/x86/a.g/Makefile             |    1 +
 .../resources/testlib/x86/a.g/libtestlib_g.a       |  Bin 0 -> 12682 bytes
 .../resources/testlib/x86/a.g/test.o               |  Bin 0 -> 6156 bytes
 .../resources/testlib/x86/a.g/test2.o              |  Bin 0 -> 6284 bytes
 .../resources/testlib/x86/so.g/Makefile            |    1 +
 .../resources/testlib/x86/so.g/libtestlib_g.so     |  Bin 0 -> 10171 bytes
 .../resources/testlib/x86/so.g/libtestlib_gS.a     |  Bin 0 -> 12906 bytes
 .../resources/testlib/x86/so.g/test.o              |  Bin 0 -> 6272 bytes
 .../resources/testlib/x86/so.g/test2.o             |  Bin 0 -> 6392 bytes
 .../resources/zips/CManaged.zip                    |  Bin 0 -> 1603 bytes
 .../resources/zips/CPPManaged.zip                  |  Bin 0 -> 1628 bytes
 .../resources/zips/CPPStandard.zip                 |  Bin 0 -> 1180 bytes
 .../resources/zips/CStandard.zip                   |  Bin 0 -> 1161 bytes
 .../eclipse/cdt/core/suite/AISResultPrinter.java   |   63 +
 .../cdt/core/suite/AutomatedIntegrationSuite.java  |   83 +
 .../org/eclipse/cdt/core/suite/ProjectCreator.java |  105 +
 .../cdt/core/testplugin/CElementDecorator.java     |   36 +
 .../cdt/core/testplugin/CProjectHelper.java        |  445 +
 .../eclipse/cdt/core/testplugin/CTestPlugin.java   |   61 +
 .../eclipse/cdt/core/testplugin/CTestSetup.java    |   37 +
 .../eclipse/cdt/core/testplugin/FileManager.java   |   66 +
 .../org/eclipse/cdt/core/testplugin/Main.java      |  540 ++
 .../org/eclipse/cdt/core/testplugin/NewMain.java   |   79 +
 .../cdt/core/testplugin/TestPluginLauncher.java    |   63 +
 .../eclipse/cdt/core/testplugin/TestProject.java   |   29 +
 .../cdt/core/testplugin/TestScannerInfo.java       |   47 +
 .../cdt/core/testplugin/TestScannerProvider.java   |   40 +
 .../testplugin/util/AccessibilityTestPass.java     |   76 +
 .../cdt/core/testplugin/util/BaseTestCase.java     |  280 +
 .../cdt/core/testplugin/util/ExpectedStrings.java  |  106 +
 .../core/testplugin/util/ExpectedStringsTests.java |  124 +
 .../cdt/core/testplugin/util/FailureDialog.java    |  110 +
 .../cdt/core/testplugin/util/FocusTestPass.java    |   70 +
 .../cdt/core/testplugin/util/IDialogTestPass.java  |   58 +
 .../cdt/core/testplugin/util/SizingTestPass.java   |   78 +
 .../cdt/core/testplugin/util/TestSourceReader.java |  314 +
 .../cdt/core/testplugin/util/VerifyDialog.java     |  314 +
 .../templateengine/AllTemplateEngineTests.java     |   53 +
 .../templateengine/TemplateEngineTestsHelper.java  |  116 +
 .../core/tests/templateengine/TestProcesses.java   |  260 +
 .../tests/templateengine/TestSharedDefaults.java   |  123 +
 .../tests/templateengine/TestTemplateCore.java     |   68 +
 .../tests/templateengine/TestTemplateEngine.java   |   69 +
 .../templateengine/TestTemplateEngineBugs.java     |   38 +
 .../core/tests/templateengine/TestValueStore.java  |   77 +
 .../plugins/org.eclipse.cdt.core.tests/test.xml    |   56 +
 .../org.eclipse.cdt.debug.ui.tests/.classpath      |    8 +
 .../.cvsignore                                     |    0
 .../org.eclipse.cdt.debug.ui.tests/.project        |   28 +
 .../.settings/org.eclipse.jdt.core.prefs           |   57 +
 .../org.eclipse.cdt.debug.ui.tests/Changelog       |   69 +
 .../META-INF/MANIFEST.MF                           |   22 +
 .../org.eclipse.cdt.debug.ui.tests/about.html      |   24 +
 .../build.properties                               |   18 +
 .../org/eclipse/cdt/debug/core/tests/.cvsignore}   |    0
 .../cdt/debug/core/tests/AbstractDebugTest.java    |  238 +
 .../cdt/debug/core/tests/AllDebugTests.java        |   47 +
 .../cdt/debug/core/tests/BreakpointTests.java      |  604 ++
 .../eclipse/cdt/debug/core/tests/DebugTests.java   |  142 +
 .../cdt/debug/core/tests/EventBreakpointTests.java |   93 +
 .../cdt/debug/core/tests/LocationTests.java        |  119 +
 .../eclipse/cdt/debug/core/tests/TargetTests.java  |  109 +
 .../resources/debugCxxTest.zip                     |  Bin 0 -> 3550 bytes
 .../resources/debugTest.zip                        |  Bin 0 -> 1578 bytes
 .../eclipse/cdt/debug/testplugin/CDebugHelper.java |   88 +
 .../cdt/debug/testplugin/CProjectHelper.java       |  236 +
 .../eclipse/cdt/debug/testplugin/CTestPlugin.java  |   64 +
 .../cdt/debug/testplugin/util/ExpectedStrings.java |  106 +
 .../testplugin/util/ExpectedStringsTests.java      |  124 +
 .../org.eclipse.cdt.debug.ui.tests/test.xml        |   51 +
 .../.classpath                                     |    0
 .../.cvsignore                                     |    0
 .../org.eclipse.cdt.examples.dsf.pda.ui/.project   |   28 +
 .../.settings/org.eclipse.jdt.core.prefs           |   65 +
 .../META-INF/MANIFEST.MF                           |   26 +
 .../org.eclipse.cdt.examples.dsf.pda.ui/about.html |   28 +
 .../build.properties                               |   19 +
 .../icons/full/obj16/pda.gif                       |  Bin 0 -> 182 bytes
 .../plugin.properties                              |   14 +
 .../org.eclipse.cdt.examples.dsf.pda.ui/plugin.xml |  106 +
 .../cdt/examples/dsf/pda/ui/PDAAdapterFactory.java |  266 +
 .../cdt/examples/dsf/pda/ui/PDAUIPlugin.java       |  155 +
 .../dsf/pda/ui/actions/PDATerminateCommand.java    |  130 +
 .../pda/ui/breakpoints/PDABreakpointAdapter.java   |  225 +
 .../ui/breakpoints/PDAEditorAdapterFactory.java    |   52 +
 .../dsf/pda/ui/editor/AnnotationHover.java         |   50 +
 .../pda/ui/editor/PDAContentAssistProcessor.java   |  103 +
 .../dsf/pda/ui/editor/PDAContentAssistant.java     |   43 +
 .../cdt/examples/dsf/pda/ui/editor/PDAEditor.java  |   49 +
 .../dsf/pda/ui/editor/PDAEditorMessages.properties |   15 +
 .../cdt/examples/dsf/pda/ui/editor/PDAScanner.java |   93 +
 .../ui/editor/PDASourceViewerConfiguration.java    |   64 +
 .../dsf/pda/ui/editor/PopFrameActionDelegate.java  |   90 +
 .../cdt/examples/dsf/pda/ui/editor/TextHover.java  |   83 +
 .../cdt/examples/dsf/pda/ui/editor/WordFinder.java |   80 +
 .../examples/dsf/pda/ui/launcher/PDAMainTab.java   |  190 +
 .../examples/dsf/pda/ui/launcher/PDATabGroup.java  |   44 +
 .../dsf/pda/ui/viewmodel/PDAVMAdapter.java         |   54 +
 .../ui/viewmodel/launch/PDALaunchVMProvider.java   |   71 +
 .../pda/ui/viewmodel/launch/PDAThreadsVMNode.java  |  109 +
 .../viewmodel/launch/PDAVirtualMachineVMNode.java  |  138 +
 .../org.eclipse.cdt.examples.dsf.pda/.classpath    |    8 +
 .../.cvsignore                                     |    0
 .../org.eclipse.cdt.examples.dsf.pda/.options      |    1 +
 .../org.eclipse.cdt.examples.dsf.pda/.project      |   28 +
 .../.settings/org.eclipse.jdt.core.prefs           |   70 +
 .../META-INF/MANIFEST.MF                           |   23 +
 .../org.eclipse.cdt.examples.dsf.pda/about.html    |   28 +
 .../build.properties                               |   24 +
 .../pdavm/docs/protocol.html                       |  308 +
 .../cdt/examples/pdavm/PDAVirtualMachine.java      | 1378 +++
 .../pdavm/tests/vmtest10.pda                       |   38 +
 .../pdavm/tests/vmtest2.pda                        |   48 +
 .../pdavm/tests/vmtest3.pda                        |   13 +
 .../pdavm/tests/vmtest6.pda                        |   31 +
 .../pdavm/tests/vmtest8.pda                        |   14 +
 .../pdavm/tests/vmtest9.pda                        |   23 +
 .../pdavm/tests/vmtest_children.pda                |    8 +
 .../plugin.properties                              |   14 +
 .../org.eclipse.cdt.examples.dsf.pda/plugin.xml    |   72 +
 .../org.eclipse.cdt.examples.dsf.pda/readme.html   |   11 +
 .../samples/counter.pda                            |   11 +
 .../samples/drop.pda                               |   12 +
 .../samples/example.pda                            |   35 +
 .../samples/fibonacci.pda                          |   32 +
 .../samples/registers.pda                          |   72 +
 .../samples/stack.pda                              |   21 +
 .../samples/structures.pda                         |   23 +
 .../samples/threads.pda                            |   23 +
 .../eclipse/cdt/examples/dsf/pda/PDAPlugin.java    |  212 +
 .../dsf/pda/breakpoints/PDALineBreakpoint.java     |   83 +
 .../dsf/pda/breakpoints/PDAWatchpoint.java         |  173 +
 .../cdt/examples/dsf/pda/launch/PDALaunch.java     |  258 +
 .../examples/dsf/pda/launch/PDALaunchDelegate.java |  161 +
 .../dsf/pda/launch/PDAServicesInitSequence.java    |  137 +
 .../pda/launch/PDAServicesShutdownSequence.java    |  142 +
 .../cdt/examples/dsf/pda/service/PDABackend.java   |  326 +
 .../service/PDABreakpointAttributeTranslator.java  |  135 +
 .../examples/dsf/pda/service/PDABreakpoints.java   |  403 +
 .../dsf/pda/service/PDACommandControl.java         |  520 ++
 .../examples/dsf/pda/service/PDAExpressions.java   |  542 ++
 .../cdt/examples/dsf/pda/service/PDARegisters.java |  556 ++
 .../examples/dsf/pda/service/PDARunControl.java    |  658 ++
 .../cdt/examples/dsf/pda/service/PDAStack.java     |  466 +
 .../examples/dsf/pda/service/PDAStartedEvent.java  |   26 +
 .../dsf/pda/service/PDATerminatedEvent.java        |   26 +
 .../dsf/pda/service/PDAThreadDMContext.java        |   48 +
 .../pda/service/PDAVirtualMachineDMContext.java    |   92 +
 .../pda/service/commands/AbstractPDACommand.java   |   71 +
 .../dsf/pda/service/commands/PDABitField.java      |   44 +
 .../pda/service/commands/PDAChildrenCommand.java   |   38 +
 .../commands/PDAClearBreakpointCommand.java        |   36 +
 .../dsf/pda/service/commands/PDACommandResult.java |   49 +
 .../dsf/pda/service/commands/PDADataCommand.java   |   38 +
 .../pda/service/commands/PDADropFrameCommand.java  |   47 +
 .../dsf/pda/service/commands/PDAEvalCommand.java   |   45 +
 .../pda/service/commands/PDAEventStopCommand.java  |   44 +
 .../dsf/pda/service/commands/PDAExitCommand.java   |   35 +
 .../dsf/pda/service/commands/PDAFrame.java         |   47 +
 .../dsf/pda/service/commands/PDAFrameCommand.java  |   38 +
 .../service/commands/PDAFrameCommandResult.java    |   31 +
 .../dsf/pda/service/commands/PDAGroupsCommand.java |   35 +
 .../dsf/pda/service/commands/PDAListResult.java    |   45 +
 .../pda/service/commands/PDAPopDataCommand.java    |   38 +
 .../pda/service/commands/PDAPushDataCommand.java   |   38 +
 .../dsf/pda/service/commands/PDARegister.java      |   45 +
 .../pda/service/commands/PDARegistersCommand.java  |   35 +
 .../commands/PDARegistersCommandResult.java        |   41 +
 .../dsf/pda/service/commands/PDAResumeCommand.java |   42 +
 .../service/commands/PDASetBreakpointCommand.java  |   49 +
 .../pda/service/commands/PDASetDataCommand.java    |   38 +
 .../dsf/pda/service/commands/PDASetVarCommand.java |   38 +
 .../dsf/pda/service/commands/PDAStackCommand.java  |   38 +
 .../service/commands/PDAStackCommandResult.java    |   42 +
 .../pda/service/commands/PDAStackDepthCommand.java |   38 +
 .../commands/PDAStackDepthCommandResult.java       |   32 +
 .../dsf/pda/service/commands/PDAStepCommand.java   |   47 +
 .../pda/service/commands/PDAStepReturnCommand.java |   47 +
 .../pda/service/commands/PDASuspendCommand.java    |   42 +
 .../pda/service/commands/PDAVMResumeCommand.java   |   39 +
 .../pda/service/commands/PDAVMSuspendCommand.java  |   39 +
 .../dsf/pda/service/commands/PDAVarCommand.java    |   39 +
 .../dsf/pda/service/commands/PDAWatchCommand.java  |   53 +
 .../pda/sourcelookup/PDASourceLookupDirector.java  |   25 +
 .../PDASourcePathComputerDelegate.java             |   62 +
 .../org.eclipse.cdt.examples.dsf/.classpath        |    8 +
 .../.externalToolBuilders/PreProcessor.launch      |   20 +
 .../plugins/org.eclipse.cdt.examples.dsf/.project  |   38 +
 .../.settings/org.eclipse.jdt.core.prefs           |   71 +
 .../META-INF/MANIFEST.MF                           |   18 +
 .../about.html                                     |    0
 .../about.ini                                      |    0
 .../about.mappings                                 |    0
 .../org.eclipse.cdt.examples.dsf/about.properties  |   24 +
 .../org.eclipse.cdt.examples.dsf/build.properties  |   22 +
 .../build_preprocess.xml                           |   54 +
 .../eclipse32.gif                                  |  Bin 1706 -> 1706 bytes
 .../org.eclipse.cdt.examples.dsf/icons/alarm.gif   |  Bin 0 -> 85 bytes
 .../icons/alarm_triggered.gif                      |  Bin 0 -> 206 bytes
 .../org.eclipse.cdt.examples.dsf/icons/layout.gif  |  Bin 0 -> 857 bytes
 .../icons/remove.gif}                              |  Bin 163 -> 163 bytes
 .../org.eclipse.cdt.examples.dsf/icons/sample.gif  |  Bin 0 -> 983 bytes
 .../org.eclipse.cdt.examples.dsf/icons/timer.gif   |  Bin 0 -> 153 bytes
 .../org.eclipse.cdt.examples.dsf/plugin.properties |   14 +
 .../org.eclipse.cdt.examples.dsf/plugin.xml        |   39 +
 .../cdt/examples/dsf/DsfExamplesPlugin.java        |   92 +
 .../dsf/filebrowser/FileBrowserAction.java         |   39 +
 .../dsf/filebrowser/FileBrowserDialog.java         |  113 +
 .../dsf/filebrowser/FileBrowserModelAdapter.java   |   62 +
 .../dsf/filebrowser/FileBrowserVMProvider.java     |   99 +
 .../examples/dsf/filebrowser/FileVMContext.java    |   41 +
 .../cdt/examples/dsf/filebrowser/FileVMNode.java   |  314 +
 .../dsf/filebrowser/FilesystemRootsVMNode.java     |  197 +
 .../cdt/examples/dsf/filebrowser/package.html      |  127 +
 .../cdt/examples/dsf/timers/AlarmService.java      |  252 +
 .../cdt/examples/dsf/timers/AlarmsVMNode.java      |  107 +
 .../dsf/timers/ServicesShutdownSequence.java       |  100 +
 .../dsf/timers/ServicesStartupSequence.java        |   60 +
 .../cdt/examples/dsf/timers/TimerService.java      |  184 +
 .../cdt/examples/dsf/timers/TimersRootVMNode.java  |   58 +
 .../cdt/examples/dsf/timers/TimersVMAdapter.java   |   41 +
 .../cdt/examples/dsf/timers/TimersVMNode.java      |  166 +
 .../cdt/examples/dsf/timers/TimersVMProvider.java  |  121 +
 .../cdt/examples/dsf/timers/TimersView.java        |  325 +
 .../dsf/timers/TimersViewColumnPresentation.java   |   61 +
 .../examples/dsf/timers/TriggerCellModifier.java   |  258 +
 .../cdt/examples/dsf/timers/TriggersVMNode.java    |  198 +
 .../examples/dsf/timers/doc-files/package-1.png    |  Bin 0 -> 14399 bytes
 .../cdt/examples/ant/tasks/PreProcessor.java       |  292 +
 .../examples/dsf/dataviewer/AsyncDataViewer.java   |  276 +
 .../dsf/dataviewer/DataGeneratorWithExecutor.java  |  438 +
 .../dsf/dataviewer/DataGeneratorWithThread.java    |  242 +
 .../examples/dsf/dataviewer/IDataGenerator.java    |   70 +
 .../examples/dsf/dataviewer/SyncDataViewer.java    |  195 +
 .../examples/dsf/requestmonitor/Async2Plus2.java   |   44 +
 .../dsf/requestmonitor/AsyncHelloWorld.java        |   62 +
 .../dsf/requestmonitor/AsyncQuicksort.java         |  146 +
 .../org.eclipse.cdt.launch.remote/.classpath       |   11 +
 .../.cvsignore                                     |    0
 .../plugins/org.eclipse.cdt.launch.remote/.project |   34 +
 .../.settings/org.eclipse.core.resources.prefs     |    3 +
 .../.settings/org.eclipse.jdt.core.prefs           |   71 +
 .../org.eclipse.cdt.launch.remote/HelpContexts.xml |   20 +
 .../META-INF/MANIFEST.MF                           |   29 +
 .../org.eclipse.cdt.launch.remote/about.html       |   28 +
 .../org.eclipse.cdt.launch.remote/about.ini        |   27 +
 .../org.eclipse.cdt.launch.remote/about.mappings   |    6 +
 .../org.eclipse.cdt.launch.remote/about.properties |   25 +
 .../org.eclipse.cdt.launch.remote/build.properties |   33 +
 .../eclipse32.gif                                  |  Bin 1706 -> 1706 bytes
 .../org.eclipse.cdt.launch.remote/eclipse32.png    |  Bin 0 -> 4594 bytes
 .../icons/full}/obj16/c_app.gif                    |  Bin 606 -> 606 bytes
 .../icons/full/obj16/systemlocal_obj.gif           |  Bin 0 -> 580 bytes
 .../icons/full/obj16/systemlocallive_obj.gif       |  Bin 0 -> 592 bytes
 .../plugin.properties                              |   13 +
 .../org.eclipse.cdt.launch.remote/plugin.xml       |   74 +
 .../org.eclipse.cdt.launch.remote/remotecdt.html   |   70 +
 .../cdt/internal/launch/remote/Activator.java      |   58 +
 .../cdt/internal/launch/remote/Messages.java       |   76 +
 .../cdt/internal/launch/remote/messages.properties |   51 +
 .../IRemoteConnectionConfigurationConstants.java   |   47 +
 .../remote/IRemoteConnectionHostConstants.java     |   33 +
 .../org/eclipse/cdt/launch/remote/RSEHelper.java   |  154 +
 .../cdt/launch/remote/RemoteCDebuggerTab.java      |   56 +
 .../eclipse/cdt/launch/remote/RemoteCMainTab.java  |  668 ++
 .../cdt/launch/remote/RemoteGDBDebuggerPage.java   |  142 +
 .../remote/RemoteLaunchConfigurationTabGroup.java  |   37 +
 .../cdt/launch/remote/RemoteRunLaunchDelegate.java |  366 +
 .../plugins/org.eclipse.cdt.launch.remote/toc.xml  |   16 +
 .../.classpath                                     |    8 +
 .../.cvsignore                                     |    1 +
 .../.project                                       |   28 +
 .../.settings/org.eclipse.jdt.core.prefs           |   70 +
 .../ChangeLog}                                     |    0
 .../META-INF/MANIFEST.MF                           |   23 +
 .../about.html                                     |   24 +
 .../build.properties                               |   23 +
 .../icons/one.gif                                  |  Bin 0 -> 870 bytes
 .../icons/two.gif                                  |  Bin 0 -> 873 bytes
 .../plugin.properties                              |   12 +
 .../plugin.xml                                     | 9185 ++++++++++++++++++++
 .../test1DepCalc2/test1DepCalc2.zip                |  Bin 0 -> 7054 bytes
 .../test1DepCalc3/test1DepCalc3.zip                |  Bin 0 -> 7428 bytes
 .../test1DepCalcPreBuild/test1DepCalcPreBuild.zip  |  Bin 0 -> 7091 bytes
 .../resources/oldTypeProjects/1.2/test12.zip       |  Bin 0 -> 4266 bytes
 .../resources/oldTypeProjects/2.0/test20.zip       |  Bin 0 -> 3689 bytes
 .../resources/oldTypeProjects/2.1/test21.zip       |  Bin 0 -> 4269 bytes
 .../resources/oldTypeProjects/2.1CPP/Test21CXX.zip |  Bin 0 -> 4372 bytes
 .../linkedFolder/Benchmarks/makefile               |   43 +
 .../linkedFolder/Benchmarks/objects.mk             |    7 +
 .../linkedFolder/Benchmarks/sources.mk             |   15 +
 .../linkedFolder/Benchmarks/subdir.mk              |   32 +
 .../resources/test21Projects/linkedFolder/f1.c     |    8 +
 .../resources/test21Projects/linkedFolder/f2.c     |    8 +
 .../test21Projects/linkedFolder/test_ar.h          |    2 +
 .../resources/test21Projects/linkedLib/f1.c        |    8 +
 .../resources/test21Projects/linkedLib/f2.c        |    8 +
 .../test21Projects/linkedLib/linkedLib.zip         |  Bin 0 -> 2630 bytes
 .../resources/test21Projects/linkedLib/test_ar.h   |    2 +
 .../test21Projects/multiResConfig/testResCfg.zip   |  Bin 0 -> 6848 bytes
 .../test21Projects/singleFileExe/testSingleExe.zip |  Bin 0 -> 3209 bytes
 .../test21Projects/twoFileSO/testDoubleSO.zip      |  Bin 0 -> 3550 bytes
 .../CDTFortranTest1/CDTFortranTest1.zip            |  Bin 0 -> 3608 bytes
 .../CDTFortranTest2/CDTFortranTest2.zip            |  Bin 0 -> 18912 bytes
 .../resources/test30Projects/TestATO/TestATO.zip   |  Bin 0 -> 3375 bytes
 .../test30Projects/copyandDeploy/copyandDeploy.zip |  Bin 0 -> 6710 bytes
 .../test30Projects/deleteFile/deleteFile.zip       |  Bin 0 -> 3541 bytes
 .../inputTypeOption/inputTypeOption.zip            |  Bin 0 -> 7763 bytes
 .../linkedFolder/Benchmarks/makefile               |   43 +
 .../linkedFolder/Benchmarks/objects.mk             |    7 +
 .../linkedFolder/Benchmarks/sources.mk             |   14 +
 .../linkedFolder/Benchmarks/subdir.mk              |   34 +
 .../resources/test30Projects/linkedFolder/f1.c     |   18 +
 .../resources/test30Projects/linkedFolder/f2.c     |   18 +
 .../test30Projects/linkedFolder/test_ar.h          |   12 +
 .../resources/test30Projects/linkedLib30/f1_30.c   |   18 +
 .../resources/test30Projects/linkedLib30/f2_30.c   |   18 +
 .../test30Projects/linkedLib30/linkedLib30.zip     |  Bin 0 -> 3221 bytes
 .../test30Projects/linkedLib30/test_ar_30.h        |   12 +
 .../multiResConfig/multiResConfig.zip              |  Bin 0 -> 7861 bytes
 .../noFilesToBuild/noFilesToBuild.zip              |  Bin 0 -> 1720 bytes
 .../preAndPostBuildSteps/preAndPostBuildSteps.zip  |  Bin 0 -> 3495 bytes
 .../test30Projects/rcbsBasicTest/rcbsBasicTest.zip |  Bin 0 -> 3520 bytes
 .../test30Projects/singleFileExe/singleFileExe.zip |  Bin 0 -> 3218 bytes
 .../test with spaces/test with spaces.zip          |  Bin 0 -> 5107 bytes
 .../resources/test30Projects/test30_1/test30_1.zip |  Bin 0 -> 4428 bytes
 .../resources/test30Projects/test30_2/test30_2.zip |  Bin 0 -> 3599 bytes
 .../testFileWithNoExtension.zip                    |  Bin 0 -> 3465 bytes
 .../testMacroSupportInBuildDefinitions.zip         |  Bin 0 -> 2911 bytes
 .../test30Projects/twoFileSO/twoFileSO.zip         |  Bin 0 -> 3457 bytes
 .../resources/test3xStdMakeProjects/std_cpp_1.zip  |  Bin 0 -> 4487 bytes
 .../resources/test40Projects/test_40/test_40.zip   |  Bin 0 -> 89845 bytes
 .../test_40_pathconverter.zip                      |  Bin 0 -> 3086 bytes
 .../test30_1/test30_1.zip                          |  Bin 0 -> 4379 bytes
 .../toolChainConversionProjects/test20/Test20.zip  |  Bin 0 -> 3258 bytes
 .../toolChainConversionProjects/test21/Test21.zip  |  Bin 0 -> 2866 bytes
 .../testProjectConversion.zip                      |  Bin 0 -> 1385 bytes
 .../testplugin/BuildSystemTestHelper.java          |  160 +
 .../cdt/managedbuilder/testplugin/CTestPlugin.java |   51 +
 .../cdt/managedbuilder/testplugin/DiffUtil.java    |   84 +
 .../testplugin/ManagedBuildTestHelper.java         |  870 ++
 .../tests/suite/AllManagedBuildTests.java          |   89 +
 .../testdata/AppendToMBSStringListOptionValues.xml |   78 +
 .../testdata/AppendToMBSStringOptionValue.xml      |   36 +
 .../testdata/Basename.cpp                          |   37 +
 .../testdata/Basename.h                            |   27 +
 .../testdata/CreateIncludeFolder.xml               |   23 +
 .../testdata/ExcludeResources.xml                  |   68 +
 .../testdata/NewManagedProject.xml                 |   14 +
 .../testdata/SetMBSBooleanOptionValue.xml          |   24 +
 .../testdata/SetMBSStringListOptionValues.xml      |   29 +
 .../testdata/SetMBSStringOptionValue.xml           |   24 +
 .../tests/CfgScannerConfigProfileManagerTests.java |  127 +
 .../tests/GCCSpecsConsoleParserTest.java           |   91 +
 .../tests/AlwaysOffApplicabilityCalculator.java    |   53 +
 .../tests/AlwaysOnApplicabilityCalculator.java     |   53 +
 .../managedbuilder/core/tests/BasicTestCase.java   |   43 +
 .../core/tests/BidirectionalPathConverter.java     |   34 +
 .../core/tests/BuildDescriptionModelTests.java     | 2688 ++++++
 .../core/tests/BuildFileGenerator.java             |   91 +
 .../core/tests/BuildSystem40Tests.java             |  566 ++
 .../core/tests/CmdLineApplicabilityCalculator.java |   53 +
 .../tests/DefaultFortranDependencyCalculator.java  |  273 +
 .../tests/ManagedBuildCommandLineGenerator.java    |   76 +
 .../core/tests/ManagedBuildCommandLineInfo.java    |   84 +
 .../core/tests/ManagedBuildCoreTests.java          |  612 ++
 .../core/tests/ManagedBuildCoreTests20.java        | 1882 ++++
 .../ManagedBuildCoreTests_SharedToolOptions.java   |  564 ++
 .../ManagedBuildDependencyCalculatorTests.java     |  240 +
 .../core/tests/ManagedBuildEnvironmentTests.java   |  597 ++
 .../core/tests/ManagedBuildMacrosTests.java        |  891 ++
 .../core/tests/ManagedBuildTCSupportedTest.java    |   77 +
 .../tests/ManagedCommandLineGeneratorTest.java     |  219 +
 .../core/tests/ManagedProject21MakefileTests.java  |  324 +
 .../core/tests/ManagedProject30MakefileTests.java  |  645 ++
 .../core/tests/ManagedProjectUpdateTests.java      |  274 +
 .../core/tests/MultiVersionSupportTests.java       |  575 ++
 .../core/tests/OneDirectionalPathConverter.java    |   30 +
 .../core/tests/OptionEnablementTests.java          |  544 ++
 .../core/tests/PathConverterTest.java              |  170 +
 .../core/tests/ProjectConverter.java               |   45 +
 .../core/tests/ProjectConverter20.java             |   41 +
 .../core/tests/ProjectConverter21.java             |   40 +
 .../core/tests/ResourceBuildCoreTests.java         |  923 ++
 .../core/tests/Test30_2_CommandLineGenerator.java  |  114 +
 .../core/tests/TestConfigElement.java              |   77 +
 .../core/tests/TestConfigurationNameProvider.java  |   66 +
 .../core/tests/TestLinkerNameProvider.java         |   63 +
 .../cdt/managedbuilder/core/tests/TestMacro.java   |  237 +
 .../core/tests/TestManagedConfigProvider.java      |   74 +
 .../core/tests/TestPathConverter1.java             |   33 +
 .../core/tests/TestPathConverter2.java             |   16 +
 .../core/tests/TestPathConverter3.java             |   16 +
 .../core/tests/TestPathConverter4.java             |   37 +
 .../core/tests/TestProjectConverter.java           |   43 +
 .../core/tests/TestValueHandler.java               |   34 +
 .../core/tests/ToolChainModificationTests.java     |  372 +
 .../cdt/managedbuilder/core/tests/test_commands    |    3 +
 .../tests/AllTemplateEngineTests.java              |   47 +
 .../tests/TemplateEngineTestsHelper.java           |  159 +
 .../templateengine/tests/TestProcesses.java        |  360 +
 .../tests/BackwardCompatiblityTests.java           |   95 +
 .../CProjectDescriptionSerializationTests.java     |  209 +
 .../tests/OptionStringListValueTests.java          |  284 +
 .../cdt/projectmodel/tests/ProjectModelTests.java  |  876 ++
 .../.classpath                                     |    7 +
 .../.cvsignore                                     |    0
 .../.project                                       |   28 +
 .../.settings/org.eclipse.jdt.core.prefs           |    7 +
 .../META-INF/MANIFEST.MF                           |   18 +
 .../about.html                                     |   24 +
 .../build.properties                               |   17 +
 .../plugin.xml                                     |   53 +
 .../ui/tests/TestCProjectPlatformPage.java         |  150 +
 .../ui/tests/TestCustomPageManager.java            |  908 ++
 .../ui/tests/suite/AllManagedBuildUITests.java     |   37 +
 .../ui/tests/testplugin/TestsPlugin.java           |   95 +
 .../ui/tests/util/TestConfiguration.java           |  563 ++
 .../ui/tests/util/TestFolderInfo.java              |  251 +
 .../ui/tests/util/TestProjectType.java             |   63 +
 .../ui/tests/util/TestToolchain.java               |  316 +
 .../tests/wizardPages/AlwaysPresentWizardPage.java |  133 +
 .../ui/tests/wizardPages/NatureAWizardPage.java    |  125 +
 .../ui/tests/wizardPages/NatureBWizardPage.java    |  125 +
 .../tests/wizardPages/ProjectTypeDWizardPage.java  |  125 +
 .../tests/wizardPages/ProjectTypeEWizardPage.java  |  125 +
 .../ui/tests/wizardPages/TestRunnable.java         |   29 +
 .../ui/tests/wizardPages/ToolchainCWizardPage.java |  125 +
 .../tests/wizardPages/ToolchainCv20WizardPage.java |  125 +
 .../ui/tests/wizardPages/ToolchainFWizardPage.java |  125 +
 .../.classpath                                     |    0
 results/plugins/org.eclipse.cdt.mylyn.ui/.project  |   28 +
 .../.settings/org.eclipse.jdt.core.prefs           |    7 +
 .../org.eclipse.cdt.mylyn.ui/META-INF/MANIFEST.MF  |   33 +
 .../about.html                                     |    0
 .../org.eclipse.cdt.mylyn.ui/build.properties      |   19 +
 .../icons/elcl16/focus-disabled.gif                |  Bin 0 -> 354 bytes
 .../icons/elcl16/focus.gif                         |  Bin 0 -> 357 bytes
 .../icons/elcl16/interest-decrease.gif             |  Bin 0 -> 194 bytes
 .../icons/elcl16/interest-folding.gif              |  Bin 0 -> 357 bytes
 .../icons/elcl16/interest-increase.gif             |  Bin 0 -> 334 bytes
 .../icons/etool16/browse-filtered.gif              |  Bin 0 -> 133 bytes
 .../icons/wizban/banner-prefs.gif                  |  Bin 0 -> 2974 bytes
 .../org.eclipse.cdt.mylyn.ui/plugin.properties     |   23 +
 .../plugins/org.eclipse.cdt.mylyn.ui/plugin.xml    |  193 +
 .../internal/ui/ActiveFoldingEditorTracker.java    |   67 +
 .../mylyn/internal/ui/CDTContextLabelProvider.java |  117 +
 .../mylyn/internal/ui/CDTDeclarationsFilter.java   |   27 +
 .../cdt/mylyn/internal/ui/CDTEditorMonitor.java    |  121 +
 .../cdt/mylyn/internal/ui/CDTStructureBridge.java  |  316 +
 .../cdt/mylyn/internal/ui/CDTUIBridgePlugin.java   |  232 +
 .../eclipse/cdt/mylyn/internal/ui/CDTUiBridge.java |  162 +
 .../eclipse/cdt/mylyn/internal/ui/CDTUiUtil.java   |  137 +
 .../ui/InterestInducingProblemListener.java        |   81 +
 .../internal/ui/InterestUpdateDeltaListener.java   |  122 +
 .../mylyn/internal/ui/LandmarkMarkerManager.java   |  168 +
 .../mylyn/internal/ui/PluginResources.properties   |   46 +
 .../cdt/mylyn/internal/ui/TypeHistoryManager.java  |  111 +
 .../internal/ui/actions/FocusCViewAction.java      |  149 +
 .../ui/actions/ShowFilteredChildrenAction.java     |   60 +
 .../internal/ui/editor/ActiveFoldingListener.java  |  233 +
 results/plugins/org.eclipse.cdt.mylyn/.project     |   22 +
 .../org.eclipse.cdt.mylyn/META-INF/MANIFEST.MF     |    7 +
 .../about.html                                     |    0
 results/plugins/org.eclipse.cdt.mylyn/about.ini    |   27 +
 .../about.mappings                                 |    0
 .../plugins/org.eclipse.cdt.mylyn/about.properties |   24 +
 .../plugins/org.eclipse.cdt.mylyn/build.properties |   19 +
 .../eclipse32.gif                                  |  Bin 1706 -> 1706 bytes
 .../org.eclipse.cdt.mylyn}/epl-v10.html            |    0
 .../org.eclipse.cdt.mylyn}/notice.html             |    0
 .../org.eclipse.cdt.mylyn/plugin.properties        |   13 +
 results/plugins/org.eclipse.cdt.p2/.classpath      |   12 +
 results/plugins/org.eclipse.cdt.p2/.project        |   28 +
 .../.settings/org.eclipse.jdt.core.prefs           |   12 +
 .../org.eclipse.cdt.p2/META-INF/MANIFEST.MF        |   20 +
 .../about.html                                     |    0
 .../about.ini                                      |    0
 .../about.mappings                                 |    0
 .../plugins/org.eclipse.cdt.p2/about.properties    |   24 +
 .../plugins/org.eclipse.cdt.p2/build.properties    |   21 +
 .../eclipse32.gif                                  |  Bin 1706 -> 1706 bytes
 .../plugins/org.eclipse.cdt.p2/plugin.properties   |   16 +
 results/plugins/org.eclipse.cdt.p2/plugin.xml      |   25 +
 .../src/org/eclipse/cdt/internal/p2/Activator.java |   94 +
 .../natives/actions/CleanupUntarAction.java        |   42 +
 .../p2/touchpoint/natives/actions/UntarAction.java |  179 +
 results/plugins/org.eclipse.cdt.testing/.project   |   22 +
 .../org.eclipse.cdt.testing/META-INF/MANIFEST.MF   |    7 +
 results/plugins/org.eclipse.cdt.testing/about.html |   24 +
 .../about.ini                                      |    0
 .../about.mappings                                 |    0
 .../org.eclipse.cdt.testing/about.properties       |   23 +
 .../org.eclipse.cdt.testing/build.properties       |   22 +
 .../eclipse32.gif                                  |  Bin 1706 -> 1706 bytes
 .../org.eclipse.cdt.testing/eclipse32_old.gif      |  Bin 0 -> 1750 bytes
 .../org.eclipse.cdt.testing}/epl-v10.html          |    0
 .../org.eclipse.cdt.testing}/notice.html           |    0
 .../org.eclipse.cdt.testing/plugin.properties      |   12 +
 results/plugins/org.eclipse.cdt.testing/test.xml   |   76 +
 .../plugins/org.eclipse.cdt.ui.tests/.classpath    |    8 +
 .../.cvsignore                                     |    0
 results/plugins/org.eclipse.cdt.ui.tests/.options  |    1 +
 results/plugins/org.eclipse.cdt.ui.tests/.project  |   28 +
 .../.settings/org.eclipse.jdt.core.prefs           |  332 +
 .../.settings/org.eclipse.jdt.ui.prefs             |    8 +
 .../.settings/org.eclipse.pde.prefs                |   14 +
 results/plugins/org.eclipse.cdt.ui.tests/ChangeLog |  734 ++
 .../org.eclipse.cdt.ui.tests/META-INF/MANIFEST.MF  |   41 +
 .../plugins/org.eclipse.cdt.ui.tests/about.html    |   22 +
 .../org.eclipse.cdt.ui.tests/build.properties      |   23 +
 .../icons/dom_view/brkpd_obj.gif                   |  Bin 0 -> 136 bytes
 .../icons/dom_view/cdeclaration_obj.gif            |  Bin 0 -> 146 bytes
 .../icons/dom_view/clear.gif                       |  Bin 0 -> 851 bytes
 .../icons/dom_view/collapseall.gif                 |  Bin 0 -> 157 bytes
 .../icons/dom_view/define_obj.gif                  |  Bin 0 -> 109 bytes
 .../icons/dom_view/disassembly.gif                 |  Bin 0 -> 158 bytes
 .../icons/dom_view/enumerator_obj.gif              |  Bin 0 -> 853 bytes
 .../icons/dom_view/expandall.gif                   |  Bin 0 -> 165 bytes
 .../icons/dom_view}/expression_obj.gif             |  Bin 909 -> 909 bytes
 .../icons/dom_view/jump_co.gif                     |  Bin 0 -> 92 bytes
 .../icons/dom_view/method_public_obj.gif}          |  Bin 97 -> 97 bytes
 .../icons/dom_view/output_obj.gif}                 |  Bin 161 -> 161 bytes
 .../icons/dom_view/refresh_view.gif                |  Bin 0 -> 182 bytes
 .../icons/dom_view/reload_view.gif                 |  Bin 0 -> 144 bytes
 .../icons/dom_view/search_ref_obj.gif              |  Bin 0 -> 151 bytes
 .../icons/dom_view/showasarray_co.gif              |  Bin 0 -> 117 bytes
 .../icons/dom_view/source_attach_attrib.gif        |  Bin 0 -> 157 bytes
 .../icons/dom_view/statement_obj.gif               |  Bin 0 -> 891 bytes
 .../icons/dom_view/tnames_co.gif                   |  Bin 0 -> 101 bytes
 .../icons/dom_view}/types.gif                      |  Bin 364 -> 364 bytes
 .../icons/dom_view/var_declaration_obj.gif         |  Bin 0 -> 895 bytes
 .../icons/dom_view/var_pointer.gif                 |  Bin 0 -> 130 bytes
 .../icons/dom_view/var_simple.gif                  |  Bin 0 -> 132 bytes
 .../icons/dom_view/variable_local_obj.gif          |  Bin 0 -> 94 bytes
 .../icons/dom_view/variable_obj.gif                |  Bin 0 -> 78 bytes
 .../icons/dom_view/warning_obj.gif                 |  Bin 0 -> 139 bytes
 .../icons/dom_view/watch_globals.gif               |  Bin 0 -> 105 bytes
 .../icons/indexer_view/alphab_sort.gif}            |  Bin 224 -> 224 bytes
 .../icons/indexer_view/alphab_sorted.gif           |  Bin 0 -> 99 bytes
 .../icons/indexer_view/class_obj.gif               |  Bin 0 -> 160 bytes
 .../icons/indexer_view/constructor_obj.gif         |  Bin 0 -> 92 bytes
 .../icons/indexer_view/constructor_ref_obj.gif}    |  Bin 181 -> 181 bytes
 .../icons/indexer_view/derived.gif}                |  Bin 868 -> 868 bytes
 .../icons/indexer_view/display_full_name.gif}      |  Bin 590 -> 590 bytes
 .../icons/indexer_view/enum_obj.gif                |  Bin 0 -> 174 bytes
 .../icons/indexer_view/enumerator_obj.gif          |  Bin 0 -> 853 bytes
 .../icons/indexer_view/enumerator_ref_obj.gif}     |  Bin 73 -> 73 bytes
 .../icons/indexer_view/field_obj.gif               |  Bin 0 -> 76 bytes
 .../icons/indexer_view/field_ref_obj.gif}          |  Bin 117 -> 117 bytes
 .../icons/indexer_view/filterbutton.gif            |  Bin 0 -> 960 bytes
 .../icons/indexer_view/friend.gif                  |  Bin 0 -> 172 bytes
 .../icons/indexer_view/full_name_displayed.gif}    |  Bin 563 -> 563 bytes
 .../icons/indexer_view/function_obj.gif}           |  Bin 97 -> 97 bytes
 .../icons/indexer_view/function_ref_obj.gif}       |  Bin 111 -> 111 bytes
 .../icons/indexer_view/fwd_class.gif}              |  Bin 586 -> 586 bytes
 .../icons/indexer_view/fwd_struct.gif}             |  Bin 585 -> 585 bytes
 .../icons/indexer_view/fwd_union.gif               |  Bin 0 -> 170 bytes
 .../icons/indexer_view/grouped_all.gif             |  Bin 0 -> 856 bytes
 .../icons/indexer_view/grouped_decl.gif            |  Bin 0 -> 856 bytes
 .../icons/indexer_view/grouped_ref.gif             |  Bin 0 -> 857 bytes
 .../icons/indexer_view/grouped_type.gif            |  Bin 0 -> 847 bytes
 .../icons/indexer_view/include_obj.gif             |  Bin 0 -> 114 bytes
 .../icons/indexer_view/macroDecl_obj.gif           |  Bin 0 -> 109 bytes
 .../icons/indexer_view/method_public_obj.gif}      |  Bin 97 -> 97 bytes
 .../icons/indexer_view/method_public_ref_obj.gif}  |  Bin 193 -> 193 bytes
 .../icons/indexer_view/namespace_obj.gif           |  Bin 0 -> 173 bytes
 .../icons/indexer_view/namespace_ref_obj.gif}      |  Bin 585 -> 585 bytes
 .../icons/indexer_view}/ngback.gif                 |  Bin 222 -> 222 bytes
 .../icons/indexer_view}/ngnext.gif                 |  Bin 223 -> 223 bytes
 .../icons/indexer_view/ref_obj.gif}                |  Bin 88 -> 88 bytes
 .../icons/indexer_view}/search_decl_obj.gif        |  Bin 361 -> 361 bytes
 .../icons/indexer_view/stats.gif                   |  Bin 0 -> 107 bytes
 .../icons/indexer_view/struct_obj.gif              |  Bin 0 -> 133 bytes
 .../icons/indexer_view}/super_co.gif               |  Bin 208 -> 208 bytes
 .../icons/indexer_view/typedecl_obj.gif            |  Bin 0 -> 910 bytes
 .../icons/indexer_view/typedecl_ref_obj.gif}       |  Bin 585 -> 585 bytes
 .../icons/indexer_view/typedef_obj.gif             |  Bin 0 -> 159 bytes
 .../icons/indexer_view/union_obj.gif               |  Bin 0 -> 173 bytes
 .../icons/indexer_view/variable_obj.gif            |  Bin 0 -> 132 bytes
 .../icons/indexer_view/warning_icon.gif            |  Bin 0 -> 139 bytes
 .../org.eclipse.cdt.ui.tests/icons/sample.gif      |  Bin 0 -> 855 bytes
 .../icons/used/brkpd_obj.gif                       |  Bin 0 -> 136 bytes
 .../icons/used/cdeclaration_obj.gif                |  Bin 0 -> 146 bytes
 .../org.eclipse.cdt.ui.tests/icons/used/clear.gif  |  Bin 0 -> 851 bytes
 .../icons/used/collapseall.gif                     |  Bin 0 -> 157 bytes
 .../icons/used/define_obj.gif                      |  Bin 0 -> 109 bytes
 .../icons/used/disassembly.gif                     |  Bin 0 -> 158 bytes
 .../icons/used/enumerator_obj.gif                  |  Bin 0 -> 853 bytes
 .../icons/used/expandall.gif                       |  Bin 0 -> 165 bytes
 .../icons/used}/expression_obj.gif                 |  Bin 909 -> 909 bytes
 .../icons/used/jump_co.gif                         |  Bin 0 -> 92 bytes
 .../icons/used/method_public_obj.gif}              |  Bin 97 -> 97 bytes
 .../icons/used/output_obj.gif}                     |  Bin 161 -> 161 bytes
 .../icons/used/search_ref_obj.gif                  |  Bin 0 -> 151 bytes
 .../icons/used/showasarray_co.gif                  |  Bin 0 -> 117 bytes
 .../icons/used/source_attach_attrib.gif            |  Bin 0 -> 157 bytes
 .../icons/used/statement_obj.gif                   |  Bin 0 -> 891 bytes
 .../icons/used/tnames_co.gif                       |  Bin 0 -> 101 bytes
 .../icons/used}/types.gif                          |  Bin 364 -> 364 bytes
 .../icons/used/var_declaration_obj.gif             |  Bin 0 -> 895 bytes
 .../icons/used/var_pointer.gif                     |  Bin 0 -> 130 bytes
 .../icons/used/var_simple.gif                      |  Bin 0 -> 132 bytes
 .../icons/used/variable_local_obj.gif              |  Bin 0 -> 94 bytes
 .../icons/used/variable_obj.gif                    |  Bin 0 -> 78 bytes
 .../icons/used/warning_obj.gif                     |  Bin 0 -> 139 bytes
 .../icons/used/watch_globals.gif                   |  Bin 0 -> 105 bytes
 .../plugins/org.eclipse.cdt.ui.tests/plugin.xml    |  231 +
 .../resources/addInclude/Macro.cpp                 |    1 +
 .../resources/addInclude/Macro.cpp.expected        |    2 +
 .../resources/addInclude/Macro.h                   |    1 +
 .../resources/addInclude/Other.cpp                 |    5 +
 .../resources/addInclude/OverloadedFunction.cpp    |    5 +
 .../addInclude/OverloadedFunction.cpp.expected     |    8 +
 .../resources/addInclude/OverloadedFunction.h      |    6 +
 .../resources/addInclude/ResolvedName.cpp          |    5 +
 .../resources/addInclude/ResolvedName.cpp.expected |    6 +
 .../resources/addInclude/ResolvedName.h            |    5 +
 .../resources/addInclude/UnresolvedName.cpp        |    7 +
 .../addInclude/UnresolvedName.cpp.expected         |    9 +
 .../resources/addInclude/UnresolvedName.h          |    5 +
 .../resources/addInclude/VariableType.cpp          |    9 +
 .../resources/addInclude/VariableType.cpp.expected |   10 +
 .../resources/addInclude/VariableType.h            |   10 +
 .../resources/addInclude/VariableTypeHelper.h      |   10 +
 .../resources/ceditor/main.cpp                     |    5 +
 .../resources/ceditor/occurrences.cpp              |  129 +
 .../resources/ceditor/occurrences.h                |    6 +
 .../resources/compare/CompareTest.cpp              |  155 +
 .../resources/contentassist/CompletionTestStart.h  |   72 +
 .../contentassist/CompletionTestStart1.cpp         |    6 +
 .../contentassist/CompletionTestStart10.cpp        |    7 +
 .../contentassist/CompletionTestStart11.cpp        |    3 +
 .../contentassist/CompletionTestStart12.h          |    6 +
 .../contentassist/CompletionTestStart13.h          |    5 +
 .../contentassist/CompletionTestStart14.cpp        |    5 +
 .../contentassist/CompletionTestStart15.cpp        |    5 +
 .../contentassist/CompletionTestStart16.cpp        |    3 +
 .../contentassist/CompletionTestStart17.cpp        |    3 +
 .../contentassist/CompletionTestStart18.cpp        |    6 +
 .../contentassist/CompletionTestStart19.cpp        |    5 +
 .../contentassist/CompletionTestStart2.cpp         |    7 +
 .../contentassist/CompletionTestStart20.h          |    4 +
 .../contentassist/CompletionTestStart21.h          |    3 +
 .../contentassist/CompletionTestStart22.cpp        |    8 +
 .../contentassist/CompletionTestStart23.cpp        |    7 +
 .../contentassist/CompletionTestStart24.cpp        |    3 +
 .../contentassist/CompletionTestStart25.cpp        |    3 +
 .../contentassist/CompletionTestStart26.cpp        |    3 +
 .../contentassist/CompletionTestStart27.cpp        |    3 +
 .../contentassist/CompletionTestStart28.cpp        |    6 +
 .../contentassist/CompletionTestStart29.cpp        |    7 +
 .../contentassist/CompletionTestStart3.cpp         |    3 +
 .../contentassist/CompletionTestStart30.cpp        |    6 +
 .../contentassist/CompletionTestStart31.cpp        |    6 +
 .../contentassist/CompletionTestStart32.cpp        |    3 +
 .../contentassist/CompletionTestStart33.cpp        |    3 +
 .../contentassist/CompletionTestStart34.cpp        |    6 +
 .../contentassist/CompletionTestStart35.cpp        |    5 +
 .../contentassist/CompletionTestStart36.cpp        |    7 +
 .../contentassist/CompletionTestStart37.cpp        |    5 +
 .../contentassist/CompletionTestStart38.cpp        |   11 +
 .../contentassist/CompletionTestStart39.cpp        |   10 +
 .../resources/contentassist/CompletionTestStart4.h |    5 +
 .../contentassist/CompletionTestStart40.cpp        |    7 +
 .../contentassist/CompletionTestStart40.h          |   61 +
 .../contentassist/CompletionTestStart41.cpp        |    9 +
 .../contentassist/CompletionTestStart41.h          |   11 +
 .../contentassist/CompletionTestStart42.cpp        |    9 +
 .../contentassist/CompletionTestStart5.cpp         |    6 +
 .../contentassist/CompletionTestStart6.cpp         |    7 +
 .../contentassist/CompletionTestStart7.cpp         |   10 +
 .../contentassist/CompletionTestStart8.cpp         |    5 +
 .../contentassist/CompletionTestStart9.cpp         |    7 +
 .../resources/docComments/this.cpp                 |   24 +
 .../resources/folding/FoldingTest.cpp              |  131 +
 .../resources/formatter/bugs/After.cpp             |   61 +
 .../resources/formatter/bugs/Before.cpp            |   35 +
 .../resources/formatter/complex/After.cpp          |   39 +
 .../resources/formatter/complex/Before.cpp         |   36 +
 .../resources/formatter/preview/After.cpp          |   79 +
 .../resources/formatter/preview/Before.cpp         |   14 +
 .../resources/formatter/sample/After.cpp           |   49 +
 .../resources/formatter/sample/Before.cpp          |   70 +
 .../resources/formatter/templates/After.cpp        |   76 +
 .../resources/formatter/templates/Before.cpp       |   68 +
 .../resources/inactiveCode/InactiveCodeTest.c      |   76 +
 .../resources/indentation/complex/After.cpp        |   25 +
 .../resources/indentation/complex/Before.cpp       |   25 +
 .../resources/indentation/sample/After.cpp         |   55 +
 .../resources/indentation/sample/Before.cpp        |   55 +
 .../resources/indentation/unchanged/After.cpp      |   80 +
 .../resources/indentation/unchanged/Before.cpp     |   80 +
 .../projectTemplates/testExtraPages/hello.cpp      |   10 +
 .../projectTemplates/testExtraPages/template.xml   |   28 +
 .../projectTemplates/testWidgets/hello.cpp         |   24 +
 .../projectTemplates/testWidgets/template.xml      |   66 +
 .../resources/quickFix/RenameInFile.cpp            |  131 +
 .../resources/refactoring/ExtractConstant.rts      |  472 +
 .../resources/refactoring/ExtractExpression.rts    |  946 ++
 .../refactoring/ExtractFunctionTemplates.rts       |   97 +
 .../resources/refactoring/ExtractLocalVariable.rts |  330 +
 .../resources/refactoring/ExtractMethod.rts        | 2808 ++++++
 .../refactoring/ExtractMethodPreprocessor.rts      |  295 +
 .../refactoring/GenerateGettersAndSetters.rts      |  784 ++
 .../resources/refactoring/HideMethod.rts           | 1457 ++++
 .../resources/refactoring/ImplementMethod.rts      |  813 ++
 .../refactoring/TranslationunitHelper.rts          |   35 +
 .../resources/semanticHighlighting/SHTest.cpp      |  145 +
 .../cdt/ui/testplugin/CElementDecorator.java       |   36 +
 .../org/eclipse/cdt/ui/testplugin/CTestPlugin.java |   70 +
 .../org/eclipse/cdt/ui/testplugin/CTestSetup.java  |   32 +
 .../src/org/eclipse/cdt/ui/testplugin/Main.java    |  528 ++
 .../src/org/eclipse/cdt/ui/testplugin/NewMain.java |   79 +
 .../cdt/ui/testplugin/TestPluginLauncher.java      |   63 +
 .../ui/testplugin/util/AccessibilityTestPass.java  |   76 +
 .../cdt/ui/testplugin/util/ExpectedStrings.java    |  106 +
 .../ui/testplugin/util/ExpectedStringsTests.java   |  124 +
 .../cdt/ui/testplugin/util/FailureDialog.java      |  111 +
 .../cdt/ui/testplugin/util/FocusTestPass.java      |   71 +
 .../cdt/ui/testplugin/util/IDialogTestPass.java    |   58 +
 .../cdt/ui/testplugin/util/SizingTestPass.java     |   78 +
 .../cdt/ui/testplugin/util/StringAsserts.java      |  192 +
 .../cdt/ui/testplugin/util/VerifyDialog.java       |  315 +
 .../ui/tests/DOMAST/CPPPopulateASTViewAction.java  |  386 +
 .../ui/tests/DOMAST/CPopulateASTViewAction.java    |  349 +
 .../org/eclipse/cdt/ui/tests/DOMAST/DOMAST.java    | 1167 +++
 .../cdt/ui/tests/DOMAST/DOMASTNodeLeaf.java        |  673 ++
 .../cdt/ui/tests/DOMAST/DOMASTNodeParent.java      |  397 +
 .../cdt/ui/tests/DOMAST/DOMASTPluginImages.java    |  134 +
 .../cdt/ui/tests/DOMAST/FindIASTNameDialog.java    | 1350 +++
 .../cdt/ui/tests/DOMAST/FindIASTNameTarget.java    |  440 +
 .../cdt/ui/tests/DOMAST/IPopulateDOMASTAction.java |   24 +
 .../ui/tests/DOMAST/IncludeStatementFilter.java    |   41 +
 .../cdt/ui/tests/DOMAST/OpenDOMViewAction.java     |  108 +
 .../cdt/ui/tests/DOMAST/PreprocessorFilter.java    |   39 +
 .../cdt/ui/tests/DOMAST/ProblemHolderFilter.java   |   43 +
 .../cdt/ui/tests/DOMAST/ShowInDOMViewAction.java   |  195 +
 .../templateengine/TestExtraPagesProvider.java     |   72 +
 results/plugins/org.eclipse.cdt.ui.tests/test.xml  |   56 +
 .../org/eclipse/cdt/ui/tests/AutomatedSuite.java   |   98 +
 .../org/eclipse/cdt/ui/tests/BaseUITestCase.java   |  375 +
 .../ui/tests/buildconsole/BuildConsoleTests.java   |   66 +
 .../callhierarchy/BasicCallHierarchyTest.java      |  733 ++
 .../callhierarchy/BasicCppCallHierarchyTest.java   |  445 +
 .../CallHierarchyAcrossProjectsTest.java           |  316 +
 .../tests/callhierarchy/CallHierarchyBaseTest.java |  144 +
 .../ui/tests/callhierarchy/CallHierarchyBugs.java  |  446 +
 .../callhierarchy/CallHierarchyTestSuite.java      |   31 +
 .../tests/callhierarchy/CppCallHierarchyTest.java  |  378 +
 .../InitializersInCallHierarchyTest.java           |   45 +
 .../cdt/ui/tests/chelp/CHelpProviderTester.java    |  333 +
 .../org/eclipse/cdt/ui/tests/chelp/CHelpTest.java  |  244 +
 .../cdt/ui/tests/chelp/CHelpTestInfoProvider.java  |  105 +
 .../includebrowser/BasicIncludeBrowserTest.java    |  107 +
 .../includebrowser/IncludeBrowserBaseTest.java     |   98 +
 .../includebrowser/IncludeBrowserTestSuite.java    |   26 +
 .../cdt/ui/tests/outline/BasicOutlineTest.java     |  280 +
 .../cdt/ui/tests/outline/OutlineTestSuite.java     |   25 +
 .../cdt/ui/tests/quickfix/AssistQuickFixTest.java  |  300 +
 .../eclipse/cdt/ui/tests/refactoring/Messages.java |   33 +
 .../ui/tests/refactoring/RefactoringBaseTest.java  |  116 +
 .../cdt/ui/tests/refactoring/RefactoringTest.java  |  150 +
 .../ui/tests/refactoring/RefactoringTestSuite.java |   45 +
 .../ui/tests/refactoring/RefactoringTester.java    |  216 +
 .../cdt/ui/tests/refactoring/TestHelper.java       |   20 +
 .../cdt/ui/tests/refactoring/TestSourceFile.java   |   88 +
 .../ExtractConstantRefactoringTest.java            |   68 +
 .../extractconstant/ExtractConstantTestSuite.java  |   32 +
 .../ExtractFunctionRefactoringTest.java            |  108 +
 .../extractfunction/ExtractFunctionTestSuite.java  |   35 +
 .../ExtractLocalVariableRefactoringTest.java       |   66 +
 .../ExtractLocalVariableTestSuite.java             |   33 +
 .../GenerateGettersAndSettersTest.java             |  125 +
 .../GenerateGettersAndSettersTestSuite.java        |   32 +
 .../hidemethod/HideMethodRefactoringTest.java      |   79 +
 .../hidemethod/HideMethodTestSuite.java            |   32 +
 .../ImplementMethodRefactoringTest.java            |   79 +
 .../implementmethod/ImplementMethodTestSuite.java  |   32 +
 .../cdt/ui/tests/refactoring/messages.properties   |   18 +
 .../tests/refactoring/rename/RefactoringTests.java |  274 +
 .../refactoring/rename/RenameFunctionTests.java    |  815 ++
 .../tests/refactoring/rename/RenameMacroTests.java |  223 +
 .../refactoring/rename/RenameRegressionTests.java  | 1276 +++
 .../refactoring/rename/RenameTemplatesTests.java   |   67 +
 .../ui/tests/refactoring/rename/RenameTests.java   |  154 +
 .../tests/refactoring/rename/RenameTypeTests.java  | 2298 +++++
 .../refactoring/rename/RenameVariableTests.java    | 2000 +++++
 .../refactoring/rename/TestRenameParticipant.java  |   65 +
 .../tests/refactoring/utils/CorrectCaseTest.java   |   86 +
 .../refactoring/utils/DigitFirstCaseTest.java      |   47 +
 .../ui/tests/refactoring/utils/EmptyCaseTest.java  |   38 +
 .../refactoring/utils/IdentifierHelperTest.java    |   36 +
 .../refactoring/utils/IllegalCharCaseTest.java     |   47 +
 .../tests/refactoring/utils/KeywordCaseTest.java   |  164 +
 .../refactoring/utils/PseudoNameGeneratorTest.java |   67 +
 .../utils/TranslationUnitHelperTest.java           |   51 +
 .../ui/tests/refactoring/utils/UtilTestSuite.java  |   32 +
 .../cdt/ui/tests/search/BasicSearchTest.java       |  361 +
 .../cdt/ui/tests/search/LinkedNamesFinderTest.java |  139 +
 .../cdt/ui/tests/search/SearchTestSuite.java       |   26 +
 .../cdt/ui/tests/text/AbstractAutoEditTest.java    |  253 +
 .../text/AbstractSemanticHighlightingTest.java     |  261 +
 .../ui/org/eclipse/cdt/ui/tests/text/Accessor.java |  328 +
 .../cdt/ui/tests/text/AddBlockCommentTest.java     |  377 +
 .../eclipse/cdt/ui/tests/text/AddIncludeTest.java  |  138 +
 .../cdt/ui/tests/text/AsmPartitionerTest.java      | 1265 +++
 .../cdt/ui/tests/text/BasicCEditorTest.java        |  493 ++
 .../cdt/ui/tests/text/BracketInserterTest.java     |  476 +
 .../cdt/ui/tests/text/BreakIteratorTest.java       |   88 +
 .../eclipse/cdt/ui/tests/text/CAutoIndentTest.java |  509 ++
 .../cdt/ui/tests/text/CBreakIteratorTest.java      |  122 +
 .../eclipse/cdt/ui/tests/text/CHeaderRuleTest.java |  117 +
 .../cdt/ui/tests/text/CHeuristicScannerTest.java   |  844 ++
 .../eclipse/cdt/ui/tests/text/CIndenterTest.java   |  853 ++
 .../cdt/ui/tests/text/CPartitionScanner.java       |  126 +
 .../cdt/ui/tests/text/CPartitionerTest.java        | 1167 +++
 .../cdt/ui/tests/text/CStructureCreatorTest.java   |  261 +
 .../eclipse/cdt/ui/tests/text/CWordFinderTest.java |   97 +
 .../cdt/ui/tests/text/CWordIteratorTest.java       |  123 +
 .../cdt/ui/tests/text/CodeFormatterTest.java       | 1277 +++
 .../text/DefaultCCommentAutoEditStrategyTest.java  |  622 ++
 .../eclipse/cdt/ui/tests/text/DisplayHelper.java   |  621 ++
 .../cdt/ui/tests/text/EditorTestHelper.java        |  567 ++
 .../ui/org/eclipse/cdt/ui/tests/text/FileTool.java |  252 +
 .../org/eclipse/cdt/ui/tests/text/FoldingTest.java |  309 +
 .../cdt/ui/tests/text/FormatActionTest.java        |  138 +
 .../eclipse/cdt/ui/tests/text/HyperlinkTest.java   |  198 +
 .../tests/text/InactiveCodeHighlightingTest.java   |  137 +
 .../cdt/ui/tests/text/IndentActionTest.java        |  125 +
 .../cdt/ui/tests/text/MarkOccurrenceTest.java      |  560 ++
 .../eclipse/cdt/ui/tests/text/NumberRuleTest.java  |  147 +
 .../eclipse/cdt/ui/tests/text/PairMatcherTest.java |  237 +
 .../ui/tests/text/PartitionTokenScannerTest.java   |  263 +
 .../cdt/ui/tests/text/RemoveBlockCommentTest.java  |  340 +
 .../eclipse/cdt/ui/tests/text/ResourceHelper.java  |  157 +
 .../cdt/ui/tests/text/ResourceTestHelper.java      |  252 +
 .../ui/tests/text/SemanticHighlightingTest.java    |  423 +
 .../eclipse/cdt/ui/tests/text/ShiftActionTest.java |  160 +
 .../cdt/ui/tests/text/TemplateFormatterTest.java   |  164 +
 .../ui/org/eclipse/cdt/ui/tests/text/TestCase.txt  |   43 +
 .../ui/org/eclipse/cdt/ui/tests/text/TestCase2.txt |   68 +
 .../eclipse/cdt/ui/tests/text/TextTestSuite.java   |   82 +
 .../text/contentassist/ContentAssistTestSuite.java |   28 +
 .../text/contentassist/ContentAssistTests.java     |  283 +
 .../ProposalFilterPreferencesTest.java             |   61 +
 .../text/contentassist/TestProposalFilter.java     |   29 +
 .../contentassist2/AbstractContentAssistTest.java  |  256 +
 .../CompletionProposalsBaseTest.java               |  106 +
 .../CompletionTest_AnonymousTypes.java             |   93 +
 .../CompletionTest_ArgumentType_Prefix.java        |   97 +
 .../CompletionTest_ArgumentType_Prefix2.java       |   97 +
 .../CompletionTest_ClassReference_NoPrefix.java    |   96 +
 .../CompletionTest_ClassReference_Prefix.java      |   95 +
 .../CompletionTest_ConstructorReference.java       |  106 +
 ...CompletionTest_ExceptionReference_NoPrefix.java |  103 +
 .../CompletionTest_ExceptionReference_Prefix.java  |  100 +
 .../CompletionTest_FieldType_NoPrefix.java         |  100 +
 .../CompletionTest_FieldType_NoPrefix2.java        |  102 +
 .../CompletionTest_FieldType_Prefix.java           |   96 +
 .../CompletionTest_FunctionReference_Prefix.java   |  116 +
 .../CompletionTest_MacroRef_NoPrefix.java          |  119 +
 .../CompletionTest_MacroRef_Prefix.java            |   91 +
 ...pletionTest_MemberReference_Arrow_NoPrefix.java |   94 +
 ...letionTest_MemberReference_Arrow_NoPrefix2.java |   86 +
 ...letionTest_MemberReference_Arrow_NoPrefix3.java |   85 +
 ...ompletionTest_MemberReference_Arrow_Prefix.java |   91 +
 ...mpletionTest_MemberReference_Arrow_Prefix2.java |   91 +
 ...ompletionTest_MemberReference_Dot_NoPrefix.java |   93 +
 .../CompletionTest_MemberReference_Dot_Prefix.java |   91 +
 .../CompletionTest_NamespaceRef_NoPrefix.java      |   94 +
 .../CompletionTest_NamespaceRef_Prefix.java        |   94 +
 .../CompletionTest_NewTypeReference_NoPrefix.java  |  101 +
 .../CompletionTest_NewTypeReference_Prefix.java    |   97 +
 .../CompletionTest_ScopedReference_NoPrefix.java   |   91 +
 ...ompletionTest_ScopedReference_NonCodeScope.java |   94 +
 .../CompletionTest_ScopedReference_Prefix.java     |   91 +
 .../CompletionTest_SingleName_Method_NoPrefix.java |  118 +
 .../CompletionTest_SingleName_Method_Prefix.java   |  105 +
 .../CompletionTest_SingleName_NoPrefix.java        |  120 +
 .../CompletionTest_SingleName_Prefix.java          |   90 +
 .../CompletionTest_SingleName_Prefix2.java         |  101 +
 .../CompletionTest_TypeDef_NoPrefix.java           |   95 +
 .../CompletionTest_TypeDef_Prefix.java             |   95 +
 .../CompletionTest_TypeRef_NoPrefix.java           |   94 +
 .../CompletionTest_TypeRef_Prefix.java             |   94 +
 .../CompletionTest_VariableType_NestedPrefix.java  |   95 +
 .../CompletionTest_VariableType_NoPrefix.java      |   98 +
 .../CompletionTest_VariableType_Prefix.java        |   95 +
 .../tests/text/contentassist2/CompletionTests.java | 1293 +++
 .../contentassist2/CompletionTests_PlainC.java     |  970 +++
 .../contentassist2/ContentAssist2TestSuite.java    |   75 +
 .../text/contentassist2/ParameterHintTests.java    |  178 +
 .../text/doctools/CommentOwnerManagerTests.java    |  333 +
 .../text/doctools/DocCommentHighlightingTest.java  |  214 +
 .../tests/text/doctools/DocCommentTestSuite.java   |   30 +
 .../text/doctools/TestGenericTagConfiguration.java |   87 +
 .../DoxygenCCommentAutoEditStrategyTest.java       |  618 ++
 .../text/selection/BaseSelectionTestsIndexer.java  |  324 +
 .../selection/CPPSelectionTestsAnyIndexer.java     | 1175 +++
 .../selection/CPPSelectionTestsDOMIndexer.java     |   31 +
 .../selection/CPPSelectionTestsFastIndexer.java    |   26 +
 .../text/selection/CPPSelectionTestsNoIndexer.java | 1143 +++
 .../text/selection/CSelectionTestsAnyIndexer.java  |  562 ++
 .../text/selection/CSelectionTestsDOMIndexer.java  |   31 +
 .../text/selection/CSelectionTestsFastIndexer.java |   26 +
 .../text/selection/CSelectionTestsNoIndexer.java   |  712 ++
 .../tests/text/selection/ResolveBindingTests.java  |  198 +
 .../tests/text/selection/SelectionTestSuite.java   |   34 +
 .../ui/tests/typehierarchy/CTypeHierarchyTest.java |  521 ++
 .../tests/typehierarchy/CppTypeHierarchyTest.java  |  867 ++
 .../typehierarchy/QuickTypeHierarchyTest.java      |  858 ++
 .../TypeHierarchyAcrossProjectsTest.java           |  163 +
 .../tests/typehierarchy/TypeHierarchyBaseTest.java |  196 +
 .../typehierarchy/TypeHierarchyTestSuite.java      |   29 +
 .../cdt/ui/tests/viewsupport/AsyncViewerTest.java  |  309 +
 .../ui/tests/viewsupport/ViewSupportTestSuite.java |   26 +
 .../ProjectSettingsWizardPageMock.java             |   71 +
 .../settingswizards/SettingsImportExportTest.java  |  285 +
 .../settingswizards/SettingsWizardTestSuite.java   |   25 +
 .../.classpath                                     |    0
 .../.cvsignore                                     |    0
 results/plugins/org.eclipse.test/.project          |   29 +
 .../.settings/org.eclipse.jdt.core.prefs           |   12 +
 .../plugins/org.eclipse.test/JUNIT.XSL             |    0
 .../plugins/org.eclipse.test/META-INF/MANIFEST.MF  |   16 +
 results/plugins/org.eclipse.test/about.html        |   28 +
 results/plugins/org.eclipse.test/build.properties  |   22 +
 results/plugins/org.eclipse.test/easymock.psf      |    6 +
 results/plugins/org.eclipse.test/library.xml       |  169 +
 results/plugins/org.eclipse.test/plugin.properties |   12 +
 results/plugins/org.eclipse.test/plugin.xml        |   27 +
 .../src/org/eclipse/test/CoreTestApplication.java  |   86 +
 .../src/org/eclipse/test/EclipseTestRunner.java    |  538 ++
 .../src/org/eclipse/test/RegressionTest.java       |  187 +
 .../src/org/eclipse/test/UITestApplication.java    |  220 +
 .../plugins/org.eclipse.test/testframework.html    |  277 +
 1509 files changed, 232656 insertions(+), 20 deletions(-)

diff --git a/build.xml b/build.xml
index f8cebcf..db9ed54 100644
--- a/build.xml
+++ b/build.xml
@@ -69,6 +69,12 @@
 			<property name="builder" value="${basedir}/lrparser.sdk"/>
 		</ant>
 		<ant antfile="build.xml" dir="${pde.build.scripts}" target="preBuild">
+			<property name="builder" value="${basedir}/testing"/>
+		</ant>
+		<ant antfile="build.xml" dir="${pde.build.scripts}" target="preBuild">
+			<property name="builder" value="${basedir}/master"/>
+		</ant>
+		<ant antfile="build.xml" dir="${pde.build.scripts}" target="preBuild">
 			<property name="builder" value="${basedir}/upc"/>
 		</ant>
 		<ant antfile="build.xml" dir="${pde.build.scripts}" target="preBuild">
@@ -88,6 +94,12 @@
 			<property name="builder" value="${basedir}/dsfgdb"/>
 		</ant>
 		-->
+		<ant antfile="build.xml" dir="${pde.build.scripts}" target="fetch">
+			<property name="builder" value="${basedir}/testing"/>
+		</ant>
+		<ant antfile="build.xml" dir="${pde.build.scripts}" target="fetch">
+			<property name="builder" value="${basedir}/master"/>
+		</ant>
 		<ant antfile="build.xml" dir="${pde.build.scripts}" target="preBuild">
 			<property name="builder" value="${basedir}/memory"/>
 		</ant>
diff --git a/maps/cdt.map b/maps/cdt.map
index 3ef21b3..e9bb3a3 100644
--- a/maps/cdt.map
+++ b/maps/cdt.map
@@ -98,9 +98,9 @@ plugin at org.eclipse.cdt.util=@cdtTag@,:pserver:anonymous at dev.eclipse.org:/cvsroot
 feature at org.eclipse.cdt.util=@cdtTag@,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/util/org.eclipse.cdt.util-feature
 
 ! CDT Mylyn Bridge
-plugin at org.eclipse.cdt.mylyn=@cdtTag@,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn
-plugin at org.eclipse.cdt.mylyn.ui=@cdtTag@,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn.ui
-feature at org.eclipse.cdt.mylyn=@cdtTag@,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn-feature
+plugin at org.eclipse.cdt.mylyn=@cdtTag@,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt-old/mylyn/org.eclipse.cdt.mylyn
+plugin at org.eclipse.cdt.mylyn.ui=@cdtTag@,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt-old/mylyn/org.eclipse.cdt.mylyn.ui
+feature at org.eclipse.cdt.mylyn=@cdtTag@,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt-old/mylyn/org.eclipse.cdt.mylyn-feature
 
 ! DSF 
 plugin at org.eclipse.cdt.dsf=@cdtTag@,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/dsf/org.eclipse.cdt.dsf
diff --git a/results/directory.txt b/results/directory.txt
index 9ee924b..683f50d 100644
--- a/results/directory.txt
+++ b/results/directory.txt
@@ -98,9 +98,9 @@ plugin at org.eclipse.cdt.util=v201002161416,:pserver:anonymous at dev.eclipse.org:/cv
 feature at org.eclipse.cdt.util=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/util/org.eclipse.cdt.util-feature
 
 ! CDT Mylyn Bridge
-plugin at org.eclipse.cdt.mylyn=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn
-plugin at org.eclipse.cdt.mylyn.ui=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn.ui
-feature at org.eclipse.cdt.mylyn=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn-feature
+plugin at org.eclipse.cdt.mylyn=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt-old/mylyn/org.eclipse.cdt.mylyn
+plugin at org.eclipse.cdt.mylyn.ui=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt-old/mylyn/org.eclipse.cdt.mylyn.ui
+feature at org.eclipse.cdt.mylyn=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt-old/mylyn/org.eclipse.cdt.mylyn-feature
 
 ! DSF 
 plugin at org.eclipse.cdt.dsf=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/dsf/org.eclipse.cdt.dsf
diff --git a/results/featureVersions.properties b/results/featureVersions.properties
index a14ecc7..fe6e7b4 100644
--- a/results/featureVersions.properties
+++ b/results/featureVersions.properties
@@ -1,16 +1,23 @@
-#Thu Jun 10 17:15:08 CEST 2010
-org.eclipse.cdt,0.0.0=v201002161416
-org.eclipse.cdt.debug.ui.memory,0.0.0=v201002161416
+#Tue Jun 15 21:13:45 CEST 2010
 org.eclipse.cdt.core.parser.upc.sdk,0.0.0=v201002161416
 org.eclipse.cdt.core.lrparser.feature,0.0.0=v201002161416
-org.eclipse.cdt.xlc.sdk,0.0.0=v201002161416
-org.eclipse.cdt.sdk,0.0.0=v201002161416
 org.eclipse.cdt.util,0.0.0=v201002161416
+org.eclipse.cdt.debug.gdbjtag,0.0.0=v201002161416
 org.eclipse.cdt.core.parser.upc.feature,0.0.0=v201002161416
+org.eclipse.cdt.debug.ui.memory,0.0.0=v201002161416
 org.eclipse.cdt.xlc.feature,0.0.0=v201002161416
-org.eclipse.cdt.platform,0.0.0=v201002161416
+org.eclipse.cdt.testing,0.0.0=v201002161416
 org.eclipse.cdt.gnu.build,0.0.0=v201002161416
+org.eclipse.cdt.sdk,0.0.0=v201002161416
+org.eclipse.cdt.examples.dsf,0.0.0=v201002161416
+org.eclipse.cdt.launch.remote,0.0.0=v201002161416
 org.eclipse.cdt.gnu.debug,0.0.0=v201002161416
+org.eclipse.cdt,0.0.0=v201002161416
+org.eclipse.cdt.master,0.0.0=v201002161416
+org.eclipse.cdt.xlc.sdk,0.0.0=v201002161416
+org.eclipse.cdt.build.crossgcc,0.0.0=v201002161416
+org.eclipse.cdt.platform,0.0.0=v201002161416
+org.eclipse.cdt.p2,0.0.0=v201002161416
+org.eclipse.cdt.mylyn,0.0.0=v201002161416
 org.eclipse.cdt.gnu.dsf,0.0.0=v201002161416
-org.eclipse.cdt.debug.gdbjtag,0.0.0=v201002161416
 org.eclipse.cdt.core.lrparser.sdk,0.0.0=v201002161416
diff --git a/results/features/org.eclipse.cdt.build.crossgcc/.project b/results/features/org.eclipse.cdt.build.crossgcc/.project
new file mode 100644
index 0000000..dceba4a
--- /dev/null
+++ b/results/features/org.eclipse.cdt.build.crossgcc/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.build.crossgcc-feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/features/org.eclipse.cdt.build.crossgcc/build.properties b/results/features/org.eclipse.cdt.build.crossgcc/build.properties
new file mode 100644
index 0000000..839d184
--- /dev/null
+++ b/results/features/org.eclipse.cdt.build.crossgcc/build.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# Copyright (c) 2009 IBM Corporation and others.
+# 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
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+bin.includes = feature.xml,\
+               feature.properties,\
+               epl-v10.html,\
+               eclipse_update_120.jpg,\
+               license.html
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg b/results/features/org.eclipse.cdt.build.crossgcc/eclipse_update_120.jpg
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg
copy to results/features/org.eclipse.cdt.build.crossgcc/eclipse_update_120.jpg
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html b/results/features/org.eclipse.cdt.build.crossgcc/epl-v10.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html
copy to results/features/org.eclipse.cdt.build.crossgcc/epl-v10.html
diff --git a/results/features/org.eclipse.cdt.build.crossgcc/feature.properties b/results/features/org.eclipse.cdt.build.crossgcc/feature.properties
new file mode 100644
index 0000000..679dbbb
--- /dev/null
+++ b/results/features/org.eclipse.cdt.build.crossgcc/feature.properties
@@ -0,0 +1,140 @@
+###############################################################################
+# Copyright (c) 2005, 2009 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# features.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=CDT GCC Cross Compiler Support
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse CDT
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse CDT Update Site
+
+# "description" property - description of the feature
+description=Build integration and new project wizard support for GCC cross compilers.
+
+# copyright
+copyright=\
+Copyright (c) 2009 Wind River Systems and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+   - Content may be structured and packaged into modules to facilitate delivering,\n\
+     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+     plug-in fragments ("Fragments"), and features ("Features").\n\
+   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+     in a directory named "plugins".\n\
+   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+   - The top-level (root) directory\n\
+   - Plug-in and Fragment directories\n\
+   - Inside Plug-ins and Fragments packaged as JARs\n\
+   - Sub-directories of the directory named "src" of certain Plug-ins\n\
+   - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/results/features/org.eclipse.cdt.build.crossgcc/feature.xml b/results/features/org.eclipse.cdt.build.crossgcc/feature.xml
new file mode 100644
index 0000000..cd30cac
--- /dev/null
+++ b/results/features/org.eclipse.cdt.build.crossgcc/feature.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.cdt.build.crossgcc"
+      label="%featureName"
+      version="1.0.0.qualifier"
+      provider-name="%providerName"
+      plugin="org.eclipse.cdt.build.crossgcc">
+
+   <description>
+      %description
+   </description>
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <url>
+      <update label="%updateSiteName" url="http://download.eclipse.org/tools/cdt/releases/galileo"/>
+   </url>
+
+   <plugin
+         id="org.eclipse.cdt.build.crossgcc"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/license.html b/results/features/org.eclipse.cdt.build.crossgcc/license.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/license.html
copy to results/features/org.eclipse.cdt.build.crossgcc/license.html
diff --git a/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/build.properties b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..eb69c97
--- /dev/null
+++ b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/build.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2008, 2009 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+generate.feature at org.eclipse.cdt.gnu.build.source = org.eclipse.cdt.gnu.build
+generate.feature at org.eclipse.cdt.gnu.debug.source = org.eclipse.cdt.gnu.debug
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/eclipse_update_120.jpg
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg
copy to results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/eclipse_update_120.jpg
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/epl-v10.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html
copy to results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/epl-v10.html
diff --git a/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/feature.properties b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..dd79412
--- /dev/null
+++ b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/feature.properties
@@ -0,0 +1,140 @@
+###############################################################################
+# Copyright (c) 2005, 2009 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# features.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=CDT GCC Cross Compiler Support Source
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse CDT
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse CDT Update Site
+
+# "description" property - description of the feature
+description=Build integration and new project wizard support for GCC cross compilers.
+
+# copyright
+copyright=\
+Copyright (c) 2009 Wind River Systems and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+   - Content may be structured and packaged into modules to facilitate delivering,\n\
+     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+     plug-in fragments ("Fragments"), and features ("Features").\n\
+   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+     in a directory named "plugins".\n\
+   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+   - The top-level (root) directory\n\
+   - Plug-in and Fragment directories\n\
+   - Inside Plug-ins and Fragments packaged as JARs\n\
+   - Sub-directories of the directory named "src" of certain Plug-ins\n\
+   - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/feature.xml b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/feature.xml
new file mode 100644
index 0000000..410bf90
--- /dev/null
+++ b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/feature.xml
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.cdt.source"
+      label="%featureName"
+      version="5.0.0.qualifier"
+      provider-name="%providerName">
+
+   <description>
+      %description
+   </description>
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <url>
+      <update label="%updateSiteName" url="http://download.eclipse.org/tools/cdt/releases/galileo"/>
+   </url>
+
+   <includes
+         id="org.eclipse.cdt.gnu.build.source"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.gnu.debug.source"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.eclipse.cdt.source"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.aix.motif.ppc"
+         os="aix"
+         ws="motif"
+         arch="ppc"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.linux.gtk.x86"
+         os="linux"
+         ws="gtk"
+         arch="x86"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.linux.gtk.x86_64"
+         os="linux"
+         ws="gtk"
+         arch="x86_64"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.linux.gtk.ppc"
+         os="linux"
+         ws="gtk"
+         arch="ppc"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.linux.gtk.ia64"
+         os="linux"
+         ws="gtk"
+         arch="ia64"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.macosx.carbon.ppc"
+         os="macosx"
+         ws="carbon"
+         arch="ppc"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.qnx.photon.x86"
+         os="qnx"
+         ws="photon"
+         arch="x86"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.solaris.motif.sparc"
+         os="solaris"
+         ws="motif"
+         arch="sparc"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.win32.win32.x86"
+         os="win32"
+         ws="win32"
+         arch="x86"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+</feature>
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/license.html b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/license.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/license.html
copy to results/features/org.eclipse.cdt.build.crossgcc/sourceTemplateFeature/license.html
diff --git a/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/about.html b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..5e7ffbd
--- /dev/null
+++ b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/about.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>June 22, 2007</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/about.ini b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..a21a3ec
--- /dev/null
+++ b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/about.ini
@@ -0,0 +1,29 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=eclipse32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
diff --git a/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/about.mappings b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..bddaab4
--- /dev/null
+++ b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
\ No newline at end of file
diff --git a/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/about.properties b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..7258f35
--- /dev/null
+++ b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/about.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2005, 2009 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=Eclipse C/C++ Development Tooling Source Code\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright IBM Corp. and others 2000, 2009.  All rights reserved.\n\
+Visit http://www.eclipse.org/cdt
diff --git a/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/build.properties b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..55291e2
--- /dev/null
+++ b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/build.properties
@@ -0,0 +1,27 @@
+###############################################################################
+# Copyright (c) 2005, 2009 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+bin.includes = about.html,\
+               about.ini,\
+               about.mappings,\
+               about.properties,\
+               eclipse32.gif,\
+               plugin.xml,\
+               plugin.properties,\
+               src/**,\
+               META-INF/
+src.includes = about.html,\
+               about.ini,\
+               about.mappings,\
+               about.properties,\
+               eclipse32.gif,\
+               plugin.xml,\
+               plugin.properties
+sourcePlugin=true
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/eclipse32.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif
copy to results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/eclipse32.gif
diff --git a/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/plugin.properties b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..bdd6f1f
--- /dev/null
+++ b/results/features/org.eclipse.cdt.build.crossgcc/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2005, 2009 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+pluginName=CDT GCC Cross Compiler Support Source (Source)
+providerName=Eclipse CDT
diff --git a/results/features/org.eclipse.cdt.examples.dsf/.project b/results/features/org.eclipse.cdt.examples.dsf/.project
new file mode 100644
index 0000000..35682e1
--- /dev/null
+++ b/results/features/org.eclipse.cdt.examples.dsf/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.examples.dsf-feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/features/org.eclipse.cdt.gnu.dsf/build.properties b/results/features/org.eclipse.cdt.examples.dsf/build.properties
similarity index 100%
copy from results/features/org.eclipse.cdt.gnu.dsf/build.properties
copy to results/features/org.eclipse.cdt.examples.dsf/build.properties
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg b/results/features/org.eclipse.cdt.examples.dsf/eclipse_update_120.jpg
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg
copy to results/features/org.eclipse.cdt.examples.dsf/eclipse_update_120.jpg
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html b/results/features/org.eclipse.cdt.examples.dsf/epl-v10.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html
copy to results/features/org.eclipse.cdt.examples.dsf/epl-v10.html
diff --git a/results/features/org.eclipse.cdt.examples.dsf/feature.properties b/results/features/org.eclipse.cdt.examples.dsf/feature.properties
new file mode 100644
index 0000000..b2cf9d5
--- /dev/null
+++ b/results/features/org.eclipse.cdt.examples.dsf/feature.properties
@@ -0,0 +1,140 @@
+###############################################################################
+# Copyright (c) 2005, 2009 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# features.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=CDT Debugger Services Framework (DSF) Examples
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse CDT
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse CDT Update Site
+
+# "description" property - description of the feature
+description=DSF Examples including basic framework feature tutorial examples and the PDA debugger integration.
+
+# copyright
+copyright=\
+Copyright (c) 2002, 2008 QNX Software Systems and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+   - Content may be structured and packaged into modules to facilitate delivering,\n\
+     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+     plug-in fragments ("Fragments"), and features ("Features").\n\
+   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+     in a directory named "plugins".\n\
+   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+   - The top-level (root) directory\n\
+   - Plug-in and Fragment directories\n\
+   - Inside Plug-ins and Fragments packaged as JARs\n\
+   - Sub-directories of the directory named "src" of certain Plug-ins\n\
+   - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/results/features/org.eclipse.cdt.examples.dsf/feature.xml b/results/features/org.eclipse.cdt.examples.dsf/feature.xml
new file mode 100644
index 0000000..4b1c81a
--- /dev/null
+++ b/results/features/org.eclipse.cdt.examples.dsf/feature.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.cdt.examples.dsf"
+      label="%featureName"
+      version="2.0.0.qualifier"
+      provider-name="%providerName"
+      plugin="org.eclipse.cdt.examples.dsf">
+
+   <description>
+      %description
+   </description>
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <url>
+      <update label="%updateSiteName" url="http://download.eclipse.org/tools/cdt/releases/galileo"/>
+   </url>
+
+   <requires>
+      <import plugin="org.eclipse.ui" version="3.2.0" match="compatible"/>
+      <import plugin="org.eclipse.core.runtime" version="3.2.0" match="compatible"/>
+      <import plugin="org.eclipse.debug.core" version="3.2.0" match="compatible"/>
+      <import plugin="org.eclipse.debug.ui" version="3.2.0" match="compatible"/>
+      <import plugin="org.eclipse.cdt.dsf"/>
+      <import plugin="org.eclipse.cdt.dsf.ui"/>
+      <import plugin="org.eclipse.core.resources" version="3.2.0" match="compatible"/>
+      <import plugin="org.eclipse.core.variables" version="3.1.100" match="compatible"/>
+      <import plugin="org.eclipse.cdt.core" version="5.0.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.jface.text" version="3.2.0" match="compatible"/>
+      <import plugin="org.eclipse.ui.editors"/>
+      <import plugin="org.eclipse.ui.workbench.texteditor"/>
+      <import plugin="org.eclipse.ui.ide" version="3.2.0" match="compatible"/>
+      <import plugin="com.ibm.icu"/>
+   </requires>
+
+   <plugin
+         id="org.eclipse.cdt.examples.dsf"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.cdt.examples.dsf.pda"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.cdt.examples.dsf.pda.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/license.html b/results/features/org.eclipse.cdt.examples.dsf/license.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/license.html
copy to results/features/org.eclipse.cdt.examples.dsf/license.html
diff --git a/results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/build.properties b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..1f06e05
--- /dev/null
+++ b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/build.properties
@@ -0,0 +1,13 @@
+###############################################################################
+#  Copyright (c) 2008, 2009 IBM Corporation and others.
+#  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
+# 
+#  Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+generate.feature at org.eclipse.cdt.gnu.build.source = org.eclipse.cdt.gnu.build
+generate.feature at org.eclipse.cdt.gnu.debug.source = org.eclipse.cdt.gnu.debug
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/eclipse_update_120.jpg
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg
copy to results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/eclipse_update_120.jpg
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/epl-v10.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html
copy to results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/epl-v10.html
diff --git a/results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/feature.properties b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..10726a4
--- /dev/null
+++ b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/feature.properties
@@ -0,0 +1,139 @@
+###############################################################################
+# Copyright (c) 2005, 2009 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Eclipse C/C++ Development Tooling Source
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse CDT
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse CDT update site
+
+# "description" property - description of the feature
+description=API documentation and source code zips for Eclipse C/C++ development tools.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+copyright=\
+Copyright (c) 2002, 2007 QNX Software Systems and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+   - Content may be structured and packaged into modules to facilitate delivering,\n\
+     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+     plug-in fragments ("Fragments"), and features ("Features").\n\
+   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+     in a directory named "plugins".\n\
+   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+   - The top-level (root) directory\n\
+   - Plug-in and Fragment directories\n\
+   - Inside Plug-ins and Fragments packaged as JARs\n\
+   - Sub-directories of the directory named "src" of certain Plug-ins\n\
+   - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/feature.xml b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/feature.xml
new file mode 100644
index 0000000..410bf90
--- /dev/null
+++ b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/feature.xml
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.cdt.source"
+      label="%featureName"
+      version="5.0.0.qualifier"
+      provider-name="%providerName">
+
+   <description>
+      %description
+   </description>
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <url>
+      <update label="%updateSiteName" url="http://download.eclipse.org/tools/cdt/releases/galileo"/>
+   </url>
+
+   <includes
+         id="org.eclipse.cdt.gnu.build.source"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.gnu.debug.source"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.eclipse.cdt.source"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.aix.motif.ppc"
+         os="aix"
+         ws="motif"
+         arch="ppc"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.linux.gtk.x86"
+         os="linux"
+         ws="gtk"
+         arch="x86"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.linux.gtk.x86_64"
+         os="linux"
+         ws="gtk"
+         arch="x86_64"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.linux.gtk.ppc"
+         os="linux"
+         ws="gtk"
+         arch="ppc"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.linux.gtk.ia64"
+         os="linux"
+         ws="gtk"
+         arch="ia64"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.macosx.carbon.ppc"
+         os="macosx"
+         ws="carbon"
+         arch="ppc"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.qnx.photon.x86"
+         os="qnx"
+         ws="photon"
+         arch="x86"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.solaris.motif.sparc"
+         os="solaris"
+         ws="motif"
+         arch="sparc"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.cdt.source.win32.win32.x86"
+         os="win32"
+         ws="win32"
+         arch="x86"
+         download-size="0"
+         install-size="0"
+         version="5.0.0.qualifier"
+         fragment="true"/>
+
+</feature>
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/license.html b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/license.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/license.html
copy to results/features/org.eclipse.cdt.examples.dsf/sourceTemplateFeature/license.html
diff --git a/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/about.html b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..5e7ffbd
--- /dev/null
+++ b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/about.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>June 22, 2007</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/about.ini b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..a21a3ec
--- /dev/null
+++ b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/about.ini
@@ -0,0 +1,29 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=eclipse32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
diff --git a/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/about.mappings b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..bddaab4
--- /dev/null
+++ b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
\ No newline at end of file
diff --git a/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/about.properties b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..58f6c53
--- /dev/null
+++ b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/about.properties
@@ -0,0 +1,23 @@
+###############################################################################
+#  Copyright (c) 2005, 2009 IBM Corporation and others.
+#  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
+# 
+#  Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=Eclipse C/C++ Development Tooling Source Code\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright IBM Corp. and others 2000, 2007.  All rights reserved.\n\
+Visit http://www.eclipse.org/cdt
diff --git a/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/build.properties b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..05c03f4
--- /dev/null
+++ b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/build.properties
@@ -0,0 +1,27 @@
+###############################################################################
+#  Copyright (c) 2005, 2009 IBM Corporation and others.
+#  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
+# 
+#  Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+bin.includes = about.html,\
+               about.ini,\
+               about.mappings,\
+               about.properties,\
+               eclipse32.gif,\
+               plugin.xml,\
+               plugin.properties,\
+               src/**,\
+               META-INF/
+src.includes = about.html,\
+               about.ini,\
+               about.mappings,\
+               about.properties,\
+               eclipse32.gif,\
+               plugin.xml,\
+               plugin.properties
+sourcePlugin=true
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/eclipse32.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif
copy to results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/eclipse32.gif
diff --git a/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/plugin.properties b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..e0687f5
--- /dev/null
+++ b/results/features/org.eclipse.cdt.examples.dsf/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2005, 2009 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+pluginName=Eclipse C/C++ Development Tools (Source)
+providerName=Eclipse CDT
\ No newline at end of file
diff --git a/results/features/org.eclipse.cdt.launch.remote/.project b/results/features/org.eclipse.cdt.launch.remote/.project
new file mode 100644
index 0000000..d80b398
--- /dev/null
+++ b/results/features/org.eclipse.cdt.launch.remote/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.launch.remote-feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/features/org.eclipse.cdt.launch.remote/build.properties b/results/features/org.eclipse.cdt.launch.remote/build.properties
new file mode 100644
index 0000000..a2febf0
--- /dev/null
+++ b/results/features/org.eclipse.cdt.launch.remote/build.properties
@@ -0,0 +1,16 @@
+###############################################################################
+#  Copyright (c) 2009 Wind River Systems and others.
+#  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
+# 
+#  Contributors:
+#      Wind River Systems - initial API and implementation
+###############################################################################
+bin.includes = feature.xml,\
+               eclipse_update_120.jpg,\
+               epl-v10.html,\
+               feature.properties,\
+               license.html
+generate.plugin at org.eclipse.cdt.launch.remote.source=org.eclipse.cdt.launch.remote
\ No newline at end of file
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg b/results/features/org.eclipse.cdt.launch.remote/eclipse_update_120.jpg
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg
copy to results/features/org.eclipse.cdt.launch.remote/eclipse_update_120.jpg
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html b/results/features/org.eclipse.cdt.launch.remote/epl-v10.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html
copy to results/features/org.eclipse.cdt.launch.remote/epl-v10.html
diff --git a/results/features/org.eclipse.cdt.launch.remote/feature.properties b/results/features/org.eclipse.cdt.launch.remote/feature.properties
new file mode 100644
index 0000000..fe88f40
--- /dev/null
+++ b/results/features/org.eclipse.cdt.launch.remote/feature.properties
@@ -0,0 +1,140 @@
+###############################################################################
+#  Copyright (c) 2005, 2009 IBM Corporation and others.
+#  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
+# 
+#  Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# features.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Eclipse C/C++ Remote Launch
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse CDT
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse CDT Update Site
+
+# "description" property - description of the feature
+description=Launch configuration for running C/C++ executables on remote machines using the Remote System Explorer, and debugging through gdbserver.
+
+# copyright
+copyright=\
+Copyright (c) 2009 Wind River Systems and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+   - Content may be structured and packaged into modules to facilitate delivering,\n\
+     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+     plug-in fragments ("Fragments"), and features ("Features").\n\
+   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+     in a directory named "plugins".\n\
+   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+   - The top-level (root) directory\n\
+   - Plug-in and Fragment directories\n\
+   - Inside Plug-ins and Fragments packaged as JARs\n\
+   - Sub-directories of the directory named "src" of certain Plug-ins\n\
+   - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/results/features/org.eclipse.cdt.launch.remote/feature.xml b/results/features/org.eclipse.cdt.launch.remote/feature.xml
new file mode 100644
index 0000000..1ddba71
--- /dev/null
+++ b/results/features/org.eclipse.cdt.launch.remote/feature.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.cdt.launch.remote"
+      label="%featureName"
+      version="6.0.0.qualifier"
+      provider-name="%providerName">
+
+   <description>
+      %description
+   </description>
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <url>
+      <update label="%updateSiteName" url="http://download.eclipse.org/tools/cdt/releases/galileo"/>
+   </url>
+
+   <requires>
+      <import plugin="org.eclipse.rse.ui" version="3.0.0" match="compatible"/>
+      <import plugin="org.eclipse.rse.subsystems.shells.core" version="3.0.0" match="compatible"/>
+      <import plugin="org.eclipse.rse.subsystems.files.core" version="3.0.0" match="compatible"/>
+      <import plugin="org.eclipse.rse.core" version="3.0.0" match="compatible"/>
+      <import plugin="org.eclipse.rse.services" version="3.0.0" match="compatible"/>
+      <import plugin="org.eclipse.cdt.launch"/>
+      <import plugin="org.eclipse.cdt.debug.mi.core"/>
+      <import plugin="org.eclipse.cdt.debug.core"/>
+      <import plugin="org.eclipse.cdt.core"/>
+      <import plugin="org.eclipse.debug.ui"/>
+      <import plugin="org.eclipse.ui"/>
+      <import plugin="org.eclipse.debug.core"/>
+      <import plugin="org.eclipse.core.resources"/>
+      <import plugin="org.eclipse.core.runtime"/>
+      <import plugin="org.eclipse.cdt.debug.mi.ui"/>
+      <import plugin="org.eclipse.cdt.debug.ui"/>
+      <import plugin="org.eclipse.rse.files.ui" version="3.0.0" match="compatible"/>
+   </requires>
+
+   <plugin
+         id="org.eclipse.cdt.launch.remote"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.cdt.launch.remote.source"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/license.html b/results/features/org.eclipse.cdt.launch.remote/license.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/license.html
copy to results/features/org.eclipse.cdt.launch.remote/license.html
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg b/results/features/org.eclipse.cdt.launch.remote/sourceTemplateFeature/eclipse_update_120.jpg
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg
copy to results/features/org.eclipse.cdt.launch.remote/sourceTemplateFeature/eclipse_update_120.jpg
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html b/results/features/org.eclipse.cdt.launch.remote/sourceTemplateFeature/epl-v10.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html
copy to results/features/org.eclipse.cdt.launch.remote/sourceTemplateFeature/epl-v10.html
diff --git a/results/features/org.eclipse.cdt.launch.remote/sourceTemplateFeature/feature.properties b/results/features/org.eclipse.cdt.launch.remote/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..04c4afe
--- /dev/null
+++ b/results/features/org.eclipse.cdt.launch.remote/sourceTemplateFeature/feature.properties
@@ -0,0 +1,139 @@
+###############################################################################
+# Copyright (c) 2005, 2009 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Eclipse C/C++ Remote Launch Source
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse CDT
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse CDT update site
+
+# "description" property - description of the feature
+description=GNU RSE Remote Launch source code
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+copyright=\
+Copyright (c) 2009 Wind River Systems and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+   - Content may be structured and packaged into modules to facilitate delivering,\n\
+     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+     plug-in fragments ("Fragments"), and features ("Features").\n\
+   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+     in a directory named "plugins".\n\
+   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+   - The top-level (root) directory\n\
+   - Plug-in and Fragment directories\n\
+   - Inside Plug-ins and Fragments packaged as JARs\n\
+   - Sub-directories of the directory named "src" of certain Plug-ins\n\
+   - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/license.html b/results/features/org.eclipse.cdt.launch.remote/sourceTemplateFeature/license.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/license.html
copy to results/features/org.eclipse.cdt.launch.remote/sourceTemplateFeature/license.html
diff --git a/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/about.html b/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..5e7ffbd
--- /dev/null
+++ b/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/about.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>June 22, 2007</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/about.ini b/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..a21a3ec
--- /dev/null
+++ b/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/about.ini
@@ -0,0 +1,29 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=eclipse32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
diff --git a/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/about.mappings b/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..bddaab4
--- /dev/null
+++ b/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
\ No newline at end of file
diff --git a/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/about.properties b/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..19caa8a
--- /dev/null
+++ b/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/about.properties
@@ -0,0 +1,23 @@
+###############################################################################
+#  Copyright (c) 2005, 2009 IBM Corporation and others.
+#  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
+# 
+#  Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=Eclipse C/C++ Development Tooling Source Code\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright IBM Corp. and others 2000, 2009.  All rights reserved.\n\
+Visit http://www.eclipse.org/cdt
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif b/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/eclipse32.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif
copy to results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/eclipse32.gif
diff --git a/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/plugin.properties b/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..637bcad
--- /dev/null
+++ b/results/features/org.eclipse.cdt.launch.remote/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2005, 2009 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+pluginName=CDT RSE Remote Launch (Source)
+providerName=Eclipse CDT
diff --git a/results/features/org.eclipse.cdt.master/.project b/results/features/org.eclipse.cdt.master/.project
new file mode 100644
index 0000000..60a9cdd
--- /dev/null
+++ b/results/features/org.eclipse.cdt.master/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.master</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/features/org.eclipse.cdt.master/build.properties b/results/features/org.eclipse.cdt.master/build.properties
new file mode 100644
index 0000000..314dc9a
--- /dev/null
+++ b/results/features/org.eclipse.cdt.master/build.properties
@@ -0,0 +1,5 @@
+bin.includes = eclipse_update_120.jpg,\
+               epl-v10.html,\
+               feature.xml,\
+               license.html
+               
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg b/results/features/org.eclipse.cdt.master/eclipse_update_120.jpg
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg
copy to results/features/org.eclipse.cdt.master/eclipse_update_120.jpg
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html b/results/features/org.eclipse.cdt.master/epl-v10.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html
copy to results/features/org.eclipse.cdt.master/epl-v10.html
diff --git a/results/features/org.eclipse.cdt.master/feature.xml b/results/features/org.eclipse.cdt.master/feature.xml
new file mode 100644
index 0000000..255b085
--- /dev/null
+++ b/results/features/org.eclipse.cdt.master/feature.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.cdt.master"
+      label="CDT Master Feature"
+      version="6.0.1"
+      provider-name="Eclipse.org">
+
+   <description url="http://www.example.com/description">
+      [Enter Feature Description here.]
+   </description>
+
+   <copyright url="http://www.example.com/copyright">
+      [Enter Copyright Description here.]
+   </copyright>
+
+   <license url="http://www.example.com/license">
+      [Enter License Description here.]
+   </license>
+
+   <includes
+         id="org.eclipse.cdt.platform"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.gnu.build"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.gnu.debug"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.core.lrparser.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.core.lrparser.sdk"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.core.parser.upc.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.core.parser.upc.sdk"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.debug.gdbjtag"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.sdk"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.testing"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.xlc.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.xlc.sdk"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.util"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.mylyn"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.gnu.dsf"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.examples.dsf"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.debug.ui.memory"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.launch.remote"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.build.crossgcc"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.cdt.p2"
+         version="0.0.0"/>
+
+</feature>
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/license.html b/results/features/org.eclipse.cdt.master/license.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/license.html
copy to results/features/org.eclipse.cdt.master/license.html
diff --git a/results/features/org.eclipse.cdt.mylyn/.project b/results/features/org.eclipse.cdt.mylyn/.project
new file mode 100644
index 0000000..69673b0
--- /dev/null
+++ b/results/features/org.eclipse.cdt.mylyn/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.mylyn-feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/features/org.eclipse.cdt.platform/build.properties b/results/features/org.eclipse.cdt.mylyn/build.properties
similarity index 100%
copy from results/features/org.eclipse.cdt.platform/build.properties
copy to results/features/org.eclipse.cdt.mylyn/build.properties
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg b/results/features/org.eclipse.cdt.mylyn/eclipse_update_120.jpg
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg
copy to results/features/org.eclipse.cdt.mylyn/eclipse_update_120.jpg
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html b/results/features/org.eclipse.cdt.mylyn/epl-v10.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html
copy to results/features/org.eclipse.cdt.mylyn/epl-v10.html
diff --git a/results/features/org.eclipse.cdt.mylyn/feature.properties b/results/features/org.eclipse.cdt.mylyn/feature.properties
new file mode 100644
index 0000000..d06104a
--- /dev/null
+++ b/results/features/org.eclipse.cdt.mylyn/feature.properties
@@ -0,0 +1,128 @@
+###############################################################################
+#  Copyright (c) 2008, 2009 Wind River Systems and others.
+#  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
+# 
+#  Contributors:
+#      Wind River Systems - initial API and implementation
+#	   IBM Corporation
+###############################################################################
+featureName=Mylyn Bridge: C/C++ Development
+providerName=Eclipse CDT
+updateSiteName=CDT Update Site
+description=Eclipse Mylyn Bridge for CDT. Allows use of Mylyn with CDT supported projects.
+
+# copyright
+copyright=\
+Copyright (c) 2008 Red Hat, Inc. and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+   - Content may be structured and packaged into modules to facilitate delivering,\n\
+     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+     plug-in fragments ("Fragments"), and features ("Features").\n\
+   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+     in a directory named "plugins".\n\
+   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+   - The top-level (root) directory\n\
+   - Plug-in and Fragment directories\n\
+   - Inside Plug-ins and Fragments packaged as JARs\n\
+   - Sub-directories of the directory named "src" of certain Plug-ins\n\
+   - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/results/features/org.eclipse.cdt.mylyn/feature.xml b/results/features/org.eclipse.cdt.mylyn/feature.xml
new file mode 100644
index 0000000..d6652e5
--- /dev/null
+++ b/results/features/org.eclipse.cdt.mylyn/feature.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.cdt.mylyn"
+      label="%featureName"
+      version="5.1.0.qualifier"
+      provider-name="%providerName"
+      plugin="org.eclipse.cdt.mylyn">
+
+   <description>
+      %description
+   </description>
+
+   <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <url>
+      <update label="%updateSiteName" url="http://download.eclipse.org/tools/cdt/releases/galileo"/>
+   </url>
+
+   <requires>
+      <import plugin="org.eclipse.ui"/>
+      <import plugin="org.eclipse.core.resources"/>
+      <import plugin="org.eclipse.core.runtime"/>
+      <import plugin="org.eclipse.ui.views"/>
+      <import plugin="org.eclipse.ui.ide"/>
+      <import plugin="org.eclipse.jface.text"/>
+      <import plugin="org.eclipse.ui.editors" version="3.4.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.ui.forms" version="3.3.100" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.ui.navigator" version="3.3.100" match="greaterOrEqual"/>
+      <import plugin="com.ibm.icu"/>
+      <import plugin="org.eclipse.cdt.core" version="5.0.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.mylyn.context.core" version="3.0.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.mylyn.resources.ui" version="3.0.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.mylyn.monitor.core" version="3.0.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.cdt.ui" version="5.0.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.mylyn.context.ui" version="3.0.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.mylyn.monitor.ui" version="3.0.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.mylyn.tasks.ui" version="3.0.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.mylyn.tasks.core" version="3.0.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.mylyn.commons.core" version="3.0.0" match="greaterOrEqual"/>
+   </requires>
+
+   <plugin
+         id="org.eclipse.cdt.mylyn.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.cdt.mylyn"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/license.html b/results/features/org.eclipse.cdt.mylyn/license.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/license.html
copy to results/features/org.eclipse.cdt.mylyn/license.html
diff --git a/results/features/org.eclipse.cdt.p2/.project b/results/features/org.eclipse.cdt.p2/.project
new file mode 100644
index 0000000..9a49fa6
--- /dev/null
+++ b/results/features/org.eclipse.cdt.p2/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.p2-feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/features/org.eclipse.cdt.p2/build.properties b/results/features/org.eclipse.cdt.p2/build.properties
new file mode 100644
index 0000000..6f3a0ce
--- /dev/null
+++ b/results/features/org.eclipse.cdt.p2/build.properties
@@ -0,0 +1,15 @@
+###############################################################################
+#  Copyright (c) 2008 Wind River Systems and others.
+#  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
+# 
+#  Contributors:
+#      Wind River Systems - initial API and implementation
+###############################################################################
+bin.includes = feature.xml,\
+               epl-v10.html,\
+               eclipse_update_120.jpg,\
+               feature.properties,\
+               license.html
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg b/results/features/org.eclipse.cdt.p2/eclipse_update_120.jpg
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg
copy to results/features/org.eclipse.cdt.p2/eclipse_update_120.jpg
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html b/results/features/org.eclipse.cdt.p2/epl-v10.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html
copy to results/features/org.eclipse.cdt.p2/epl-v10.html
diff --git a/results/features/org.eclipse.cdt.p2/feature.properties b/results/features/org.eclipse.cdt.p2/feature.properties
new file mode 100644
index 0000000..19dac9a
--- /dev/null
+++ b/results/features/org.eclipse.cdt.p2/feature.properties
@@ -0,0 +1,141 @@
+###############################################################################
+# Copyright (c) 2008, 2009 Wind River Systems
+# 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
+#
+# Contributors:
+#     Wind River Systems - initial implementation
+#     IBM Corporation
+###############################################################################
+# features.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Eclipse CDT p2 Toolchain Installer
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse CDT
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse CDT Update Site
+
+# "description" property - description of the feature
+description=Eclipse p2-based installer for toolchains and libraries.
+
+# copyright
+copyright=\
+Copyright (c) 2008 Wind River Systems and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+   - Content may be structured and packaged into modules to facilitate delivering,\n\
+     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+     plug-in fragments ("Fragments"), and features ("Features").\n\
+   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+     in a directory named "plugins".\n\
+   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+   - The top-level (root) directory\n\
+   - Plug-in and Fragment directories\n\
+   - Inside Plug-ins and Fragments packaged as JARs\n\
+   - Sub-directories of the directory named "src" of certain Plug-ins\n\
+   - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/results/features/org.eclipse.cdt.p2/feature.xml b/results/features/org.eclipse.cdt.p2/feature.xml
new file mode 100644
index 0000000..bf7113a
--- /dev/null
+++ b/results/features/org.eclipse.cdt.p2/feature.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.cdt.p2"
+      label="%featureName"
+      version="1.0.0.qualifier"
+      provider-name="%providerName"
+      plugin="org.eclipse.cdt.p2">
+
+   <description>
+      %description
+   </description>
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <plugin
+         id="org.eclipse.cdt.p2"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/license.html b/results/features/org.eclipse.cdt.p2/license.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/license.html
copy to results/features/org.eclipse.cdt.p2/license.html
diff --git a/results/features/org.eclipse.cdt.testing/.project b/results/features/org.eclipse.cdt.testing/.project
new file mode 100644
index 0000000..63f3a23
--- /dev/null
+++ b/results/features/org.eclipse.cdt.testing/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.testing-feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/features/org.eclipse.cdt.testing/build.properties b/results/features/org.eclipse.cdt.testing/build.properties
new file mode 100644
index 0000000..aa43706
--- /dev/null
+++ b/results/features/org.eclipse.cdt.testing/build.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# Copyright (c) 2005 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+bin.includes = feature.xml,\
+               feature.properties,\
+               eclipse_update_120.jpg,\
+               license.html,\
+               epl-v10.html
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg b/results/features/org.eclipse.cdt.testing/eclipse_update_120.jpg
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/eclipse_update_120.jpg
copy to results/features/org.eclipse.cdt.testing/eclipse_update_120.jpg
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html b/results/features/org.eclipse.cdt.testing/epl-v10.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html
copy to results/features/org.eclipse.cdt.testing/epl-v10.html
diff --git a/results/features/org.eclipse.cdt.testing/feature.properties b/results/features/org.eclipse.cdt.testing/feature.properties
new file mode 100644
index 0000000..3ca0b32
--- /dev/null
+++ b/results/features/org.eclipse.cdt.testing/feature.properties
@@ -0,0 +1,140 @@
+###############################################################################
+# Copyright (c) 2005, 2009 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# features.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Eclipse CDT Testing Feature
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse CDT
+
+# "updateSiteName" property - label for the update site
+updateSiteName=Eclipse CDT Update Site
+
+# "description" property - description of the feature
+description=Eclipse C/C++ development tools testing feature.
+
+# copyright
+copyright=\
+Copyright (c) 2002, 2007 QNX Software Systems and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+   - Content may be structured and packaged into modules to facilitate delivering,\n\
+     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+     plug-in fragments ("Fragments"), and features ("Features").\n\
+   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+     in a directory named "plugins".\n\
+   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+   - The top-level (root) directory\n\
+   - Plug-in and Fragment directories\n\
+   - Inside Plug-ins and Fragments packaged as JARs\n\
+   - Sub-directories of the directory named "src" of certain Plug-ins\n\
+   - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/results/features/org.eclipse.cdt.testing/feature.xml b/results/features/org.eclipse.cdt.testing/feature.xml
new file mode 100644
index 0000000..46d1161
--- /dev/null
+++ b/results/features/org.eclipse.cdt.testing/feature.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.cdt.testing"
+      label="%featureName"
+      version="6.0.0.qualifier"
+      provider-name="%providerName"
+      image="eclipse_update_120.jpg">
+
+   <description>
+      %description
+   </description>
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <url>
+      <update label="%updateSiteName" url="http://download.eclipse.org/tools/cdt/releases/galileo"/>
+   </url>
+
+   <requires>
+      <import plugin="org.eclipse.ui.ide"/>
+      <import plugin="org.eclipse.core.resources"/>
+      <import plugin="org.junit"/>
+      <import plugin="org.eclipse.cdt.core"/>
+      <import plugin="org.eclipse.ui"/>
+      <import plugin="org.eclipse.jface.text"/>
+      <import plugin="org.eclipse.cdt.ui"/>
+      <import plugin="org.eclipse.swt"/>
+      <import plugin="org.eclipse.ui.editors"/>
+      <import plugin="org.eclipse.ui.views"/>
+      <import plugin="org.eclipse.ui.workbench.texteditor"/>
+      <import plugin="org.eclipse.help"/>
+      <import plugin="org.eclipse.core.runtime"/>
+      <import plugin="org.eclipse.search"/>
+      <import plugin="org.eclipse.compare"/>
+      <import plugin="org.eclipse.ui.console"/>
+      <import plugin="org.eclipse.core.expressions"/>
+      <import plugin="org.eclipse.cdt.make.core"/>
+      <import plugin="com.ibm.icu"/>
+      <import plugin="org.eclipse.ltk.core.refactoring"/>
+      <import plugin="org.eclipse.ltk.ui.refactoring"/>
+      <import plugin="org.eclipse.cdt.debug.core"/>
+      <import plugin="org.eclipse.cdt.debug.mi.core"/>
+      <import plugin="org.eclipse.core.runtime.compatibility"/>
+      <import plugin="org.eclipse.core.filesystem"/>
+      <import plugin="org.eclipse.cdt.managedbuilder.core"/>
+      <import plugin="org.eclipse.cdt.managedbuilder.ui"/>
+   </requires>
+
+   <plugin
+         id="org.eclipse.cdt.debug.ui.tests"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.eclipse.cdt.ui.tests"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.eclipse.cdt.testing"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.eclipse.cdt.core.tests"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.eclipse.ant.optional.junit"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         fragment="true"/>
+
+   <plugin
+         id="org.eclipse.test"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.eclipse.cdt.managedbuilder.core.tests"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.eclipse.cdt.managedbuilder.ui.tests"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+</feature>
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/license.html b/results/features/org.eclipse.cdt.testing/license.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/license.html
copy to results/features/org.eclipse.cdt.testing/license.html
diff --git a/results/fetch_org.eclipse.cdt.build.crossgcc.xml b/results/fetch_org.eclipse.cdt.build.crossgcc.xml
new file mode 100644
index 0000000..80ac1a4
--- /dev/null
+++ b/results/fetch_org.eclipse.cdt.build.crossgcc.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Fetch script for feature at org.eclipse.cdt.build.crossgcc -->
+
+<project name="FetchScript" default="fetch">
+	<property name="quiet" value="true"/>
+
+	<target name="fetch">
+		<antcall target="fetch.element"/>
+		<antcall target="fetch.plugins"/>
+		<antcall target="fetch.recursively"/>
+	</target>
+	<target name="fetch.element" if="featureOnly">
+		<available property="${buildDirectory}/features/org.eclipse.cdt.build.crossgcc/feature.xml" file="${buildDirectory}/features/org.eclipse.cdt.build.crossgcc/feature.xml"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/features/org.eclipse.cdt.build.crossgcc/feature.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.build.crossgcc"/>
+			<param name="module" value="org.eclipse.cdt/cross/org.eclipse.cdt.build.crossgcc-feature"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/features"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+	</target>
+	<target name="fetch.plugins" if="featureAndPlugins">
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.build.crossgcc/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.build.crossgcc/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.build.crossgcc/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.build.crossgcc/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.cdt.build.crossgcc/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.build.crossgcc"/>
+			<param name="module" value="org.eclipse.cdt/cross/org.eclipse.cdt.build.crossgcc"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+	</target>
+	<target name="fetch.recursively" if="featuresRecursively">
+	</target>
+	<target name="FetchFromCVS" unless="${fileToCheck}">
+		<cvs command="export -d ${elementName}" cvsRoot="${cvsRoot}" dest="${destinationFolder}" package="${module}" tag="${tag}" quiet="${quiet}" reallyquiet="${reallyquiet}" taskname="CVS - ${module}"		/>
+	</target>
+
+</project>
diff --git a/results/fetch_org.eclipse.cdt.examples.dsf.xml b/results/fetch_org.eclipse.cdt.examples.dsf.xml
new file mode 100644
index 0000000..f761bb1
--- /dev/null
+++ b/results/fetch_org.eclipse.cdt.examples.dsf.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Fetch script for feature at org.eclipse.cdt.examples.dsf -->
+
+<project name="FetchScript" default="fetch">
+	<property name="quiet" value="true"/>
+
+	<target name="fetch">
+		<antcall target="fetch.element"/>
+		<antcall target="fetch.plugins"/>
+		<antcall target="fetch.recursively"/>
+	</target>
+	<target name="fetch.element" if="featureOnly">
+		<available property="${buildDirectory}/features/org.eclipse.cdt.examples.dsf/feature.xml" file="${buildDirectory}/features/org.eclipse.cdt.examples.dsf/feature.xml"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/features/org.eclipse.cdt.examples.dsf/feature.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.examples.dsf"/>
+			<param name="module" value="org.eclipse.cdt/dsf/org.eclipse.cdt.examples.dsf-feature"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/features"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+	</target>
+	<target name="fetch.plugins" if="featureAndPlugins">
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.examples.dsf"/>
+			<param name="module" value="org.eclipse.cdt/dsf/org.eclipse.cdt.examples.dsf"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf.pda/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf.pda/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf.pda/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf.pda/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf.pda/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.examples.dsf.pda"/>
+			<param name="module" value="org.eclipse.cdt/dsf/org.eclipse.cdt.examples.dsf.pda"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf.pda.ui/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf.pda.ui/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf.pda.ui/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf.pda.ui/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.cdt.examples.dsf.pda.ui/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.examples.dsf.pda.ui"/>
+			<param name="module" value="org.eclipse.cdt/dsf/org.eclipse.cdt.examples.dsf.pda.ui"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+	</target>
+	<target name="fetch.recursively" if="featuresRecursively">
+	</target>
+	<target name="FetchFromCVS" unless="${fileToCheck}">
+		<cvs command="export -d ${elementName}" cvsRoot="${cvsRoot}" dest="${destinationFolder}" package="${module}" tag="${tag}" quiet="${quiet}" reallyquiet="${reallyquiet}" taskname="CVS - ${module}"		/>
+	</target>
+
+</project>
diff --git a/results/fetch_org.eclipse.cdt.launch.remote.xml b/results/fetch_org.eclipse.cdt.launch.remote.xml
new file mode 100644
index 0000000..9c53681
--- /dev/null
+++ b/results/fetch_org.eclipse.cdt.launch.remote.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Fetch script for feature at org.eclipse.cdt.launch.remote -->
+
+<project name="FetchScript" default="fetch">
+	<property name="quiet" value="true"/>
+
+	<target name="fetch">
+		<antcall target="fetch.element"/>
+		<antcall target="fetch.plugins"/>
+		<antcall target="fetch.recursively"/>
+	</target>
+	<target name="fetch.element" if="featureOnly">
+		<available property="${buildDirectory}/features/org.eclipse.cdt.launch.remote/feature.xml" file="${buildDirectory}/features/org.eclipse.cdt.launch.remote/feature.xml"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/features/org.eclipse.cdt.launch.remote/feature.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.launch.remote"/>
+			<param name="module" value="org.eclipse.cdt/cross/org.eclipse.cdt.launch.remote-feature"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/features"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+	</target>
+	<target name="fetch.plugins" if="featureAndPlugins">
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.launch.remote/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.launch.remote/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.launch.remote/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.launch.remote/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.cdt.launch.remote/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.launch.remote"/>
+			<param name="module" value="org.eclipse.cdt/cross/org.eclipse.cdt.launch.remote"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+	</target>
+	<target name="fetch.recursively" if="featuresRecursively">
+	</target>
+	<target name="FetchFromCVS" unless="${fileToCheck}">
+		<cvs command="export -d ${elementName}" cvsRoot="${cvsRoot}" dest="${destinationFolder}" package="${module}" tag="${tag}" quiet="${quiet}" reallyquiet="${reallyquiet}" taskname="CVS - ${module}"		/>
+	</target>
+
+</project>
diff --git a/results/fetch_org.eclipse.cdt.master.xml b/results/fetch_org.eclipse.cdt.master.xml
new file mode 100644
index 0000000..54b476a
--- /dev/null
+++ b/results/fetch_org.eclipse.cdt.master.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Fetch script for feature at org.eclipse.cdt.master -->
+
+<project name="FetchScript" default="fetch">
+	<property name="quiet" value="true"/>
+
+	<target name="fetch">
+		<antcall target="fetch.element"/>
+		<antcall target="fetch.plugins"/>
+		<antcall target="fetch.recursively"/>
+	</target>
+	<target name="fetch.element" if="featureOnly">
+		<available property="${buildDirectory}/features/org.eclipse.cdt.master/feature.xml" file="${buildDirectory}/features/org.eclipse.cdt.master/feature.xml"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/features/org.eclipse.cdt.master/feature.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.master"/>
+			<param name="module" value="org.eclipse.cdt/releng/org.eclipse.cdt.master"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/features"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+	</target>
+	<target name="fetch.plugins" if="featureAndPlugins">
+	</target>
+	<target name="fetch.recursively" if="featuresRecursively">
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.platform.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.gnu.build.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.gnu.debug.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.core.lrparser.feature.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.core.lrparser.sdk.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.core.parser.upc.feature.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.core.parser.upc.sdk.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.debug.gdbjtag.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.sdk.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.testing.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.xlc.feature.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.xlc.sdk.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.util.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.mylyn.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.gnu.dsf.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.examples.dsf.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.debug.ui.memory.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.launch.remote.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.build.crossgcc.xml" target="fetch"/>
+		<ant antfile="${buildDirectory}/fetch_org.eclipse.cdt.p2.xml" target="fetch"/>
+	</target>
+	<target name="FetchFromCVS" unless="${fileToCheck}">
+		<cvs command="export -d ${elementName}" cvsRoot="${cvsRoot}" dest="${destinationFolder}" package="${module}" tag="${tag}" quiet="${quiet}" reallyquiet="${reallyquiet}" taskname="CVS - ${module}"		/>
+	</target>
+
+</project>
diff --git a/results/fetch_org.eclipse.cdt.mylyn.xml b/results/fetch_org.eclipse.cdt.mylyn.xml
new file mode 100644
index 0000000..40a4953
--- /dev/null
+++ b/results/fetch_org.eclipse.cdt.mylyn.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Fetch script for feature at org.eclipse.cdt.mylyn -->
+
+<project name="FetchScript" default="fetch">
+	<property name="quiet" value="true"/>
+
+	<target name="fetch">
+		<antcall target="fetch.element"/>
+		<antcall target="fetch.plugins"/>
+		<antcall target="fetch.recursively"/>
+	</target>
+	<target name="fetch.element" if="featureOnly">
+		<available property="${buildDirectory}/features/org.eclipse.cdt.mylyn/feature.xml" file="${buildDirectory}/features/org.eclipse.cdt.mylyn/feature.xml"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/features/org.eclipse.cdt.mylyn/feature.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.mylyn"/>
+			<param name="module" value="org.eclipse.cdt-old/mylyn/org.eclipse.cdt.mylyn-feature"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/features"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+	</target>
+	<target name="fetch.plugins" if="featureAndPlugins">
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.mylyn.ui/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.mylyn.ui/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.mylyn.ui/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.mylyn.ui/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.cdt.mylyn.ui/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.mylyn.ui"/>
+			<param name="module" value="org.eclipse.cdt-old/mylyn/org.eclipse.cdt.mylyn.ui"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.mylyn/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.mylyn/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.mylyn/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.mylyn/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.cdt.mylyn/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.mylyn"/>
+			<param name="module" value="org.eclipse.cdt-old/mylyn/org.eclipse.cdt.mylyn"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+	</target>
+	<target name="fetch.recursively" if="featuresRecursively">
+	</target>
+	<target name="FetchFromCVS" unless="${fileToCheck}">
+		<cvs command="export -d ${elementName}" cvsRoot="${cvsRoot}" dest="${destinationFolder}" package="${module}" tag="${tag}" quiet="${quiet}" reallyquiet="${reallyquiet}" taskname="CVS - ${module}"		/>
+	</target>
+
+</project>
diff --git a/results/fetch_org.eclipse.cdt.p2.xml b/results/fetch_org.eclipse.cdt.p2.xml
new file mode 100644
index 0000000..a89bb4a
--- /dev/null
+++ b/results/fetch_org.eclipse.cdt.p2.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Fetch script for feature at org.eclipse.cdt.p2 -->
+
+<project name="FetchScript" default="fetch">
+	<property name="quiet" value="true"/>
+
+	<target name="fetch">
+		<antcall target="fetch.element"/>
+		<antcall target="fetch.plugins"/>
+		<antcall target="fetch.recursively"/>
+	</target>
+	<target name="fetch.element" if="featureOnly">
+		<available property="${buildDirectory}/features/org.eclipse.cdt.p2/feature.xml" file="${buildDirectory}/features/org.eclipse.cdt.p2/feature.xml"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/features/org.eclipse.cdt.p2/feature.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.p2"/>
+			<param name="module" value="org.eclipse.cdt/p2/org.eclipse.cdt.p2-feature"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/features"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+	</target>
+	<target name="fetch.plugins" if="featureAndPlugins">
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.p2/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.p2/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.p2/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.p2/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.cdt.p2/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.p2"/>
+			<param name="module" value="org.eclipse.cdt/p2/org.eclipse.cdt.p2"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+	</target>
+	<target name="fetch.recursively" if="featuresRecursively">
+	</target>
+	<target name="FetchFromCVS" unless="${fileToCheck}">
+		<cvs command="export -d ${elementName}" cvsRoot="${cvsRoot}" dest="${destinationFolder}" package="${module}" tag="${tag}" quiet="${quiet}" reallyquiet="${reallyquiet}" taskname="CVS - ${module}"		/>
+	</target>
+
+</project>
diff --git a/results/fetch_org.eclipse.cdt.testing.xml b/results/fetch_org.eclipse.cdt.testing.xml
new file mode 100644
index 0000000..6987fec
--- /dev/null
+++ b/results/fetch_org.eclipse.cdt.testing.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Fetch script for feature at org.eclipse.cdt.testing -->
+
+<project name="FetchScript" default="fetch">
+	<property name="quiet" value="true"/>
+
+	<target name="fetch">
+		<antcall target="fetch.element"/>
+		<antcall target="fetch.plugins"/>
+		<antcall target="fetch.recursively"/>
+	</target>
+	<target name="fetch.element" if="featureOnly">
+		<available property="${buildDirectory}/features/org.eclipse.cdt.testing/feature.xml" file="${buildDirectory}/features/org.eclipse.cdt.testing/feature.xml"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/features/org.eclipse.cdt.testing/feature.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.testing"/>
+			<param name="module" value="org.eclipse.cdt/all/org.eclipse.cdt.testing-feature"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/features"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+	</target>
+	<target name="fetch.plugins" if="featureAndPlugins">
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.debug.ui.tests/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.debug.ui.tests/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.debug.ui.tests/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.debug.ui.tests/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.cdt.debug.ui.tests/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.debug.ui.tests"/>
+			<param name="module" value="org.eclipse.cdt/all/org.eclipse.cdt.debug.ui.tests"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.ui.tests/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.ui.tests/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.ui.tests/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.ui.tests/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.cdt.ui.tests/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.ui.tests"/>
+			<param name="module" value="org.eclipse.cdt/all/org.eclipse.cdt.ui.tests"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.testing/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.testing/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.testing/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.testing/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.cdt.testing/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.testing"/>
+			<param name="module" value="org.eclipse.cdt/all/org.eclipse.cdt.testing"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.core.tests/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.core.tests/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.core.tests/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.core.tests/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.cdt.core.tests/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.core.tests"/>
+			<param name="module" value="org.eclipse.cdt/all/org.eclipse.cdt.core.tests"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+		<available property="${buildDirectory}/plugins/org.eclipse.ant.optional.junit/fragment.xml" file="${buildDirectory}/plugins/org.eclipse.ant.optional.junit/fragment.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.ant.optional.junit/fragment.xml" file="${buildDirectory}/plugins/org.eclipse.ant.optional.junit/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.ant.optional.junit/fragment.xml"/>
+			<param name="elementName" value="org.eclipse.ant.optional.junit"/>
+			<param name="module" value="org.eclipse.ant.optional.junit"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="HEAD"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+		<available property="${buildDirectory}/plugins/org.eclipse.test/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.test/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.test/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.test/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.test/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.test"/>
+			<param name="module" value="org.eclipse.test"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="HEAD"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.managedbuilder.core.tests/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.managedbuilder.core.tests"/>
+			<param name="module" value="org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core.tests"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.managedbuilder.ui.tests/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.managedbuilder.ui.tests/plugin.xml"		/>
+		<available property="${buildDirectory}/plugins/org.eclipse.cdt.managedbuilder.ui.tests/plugin.xml" file="${buildDirectory}/plugins/org.eclipse.cdt.managedbuilder.ui.tests/META-INF/MANIFEST.MF"		/>
+		<antcall target="FetchFromCVS">
+			<param name="cvsRoot" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/tools"/>
+			<param name="fileToCheck" value="${buildDirectory}/plugins/org.eclipse.cdt.managedbuilder.ui.tests/plugin.xml"/>
+			<param name="elementName" value="org.eclipse.cdt.managedbuilder.ui.tests"/>
+			<param name="module" value="org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.ui.tests"/>
+			<param name="reallyquiet" value="${cvs.reallyquiet}"/>
+			<param name="tag" value="v201002161416"/>
+			<param name="destinationFolder" value="${buildDirectory}/plugins"/>
+			<param name="quiet" value="${cvs.quiet}"/>
+		</antcall>
+	</target>
+	<target name="fetch.recursively" if="featuresRecursively">
+	</target>
+	<target name="FetchFromCVS" unless="${fileToCheck}">
+		<cvs command="export -d ${elementName}" cvsRoot="${cvsRoot}" dest="${destinationFolder}" package="${module}" tag="${tag}" quiet="${quiet}" reallyquiet="${reallyquiet}" taskname="CVS - ${module}"		/>
+	</target>
+
+</project>
diff --git a/results/maps/cdt.map b/results/maps/cdt.map
index 9ee924b..683f50d 100644
--- a/results/maps/cdt.map
+++ b/results/maps/cdt.map
@@ -98,9 +98,9 @@ plugin at org.eclipse.cdt.util=v201002161416,:pserver:anonymous at dev.eclipse.org:/cv
 feature at org.eclipse.cdt.util=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/util/org.eclipse.cdt.util-feature
 
 ! CDT Mylyn Bridge
-plugin at org.eclipse.cdt.mylyn=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn
-plugin at org.eclipse.cdt.mylyn.ui=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn.ui
-feature at org.eclipse.cdt.mylyn=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/mylyn/org.eclipse.cdt.mylyn-feature
+plugin at org.eclipse.cdt.mylyn=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt-old/mylyn/org.eclipse.cdt.mylyn
+plugin at org.eclipse.cdt.mylyn.ui=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt-old/mylyn/org.eclipse.cdt.mylyn.ui
+feature at org.eclipse.cdt.mylyn=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt-old/mylyn/org.eclipse.cdt.mylyn-feature
 
 ! DSF 
 plugin at org.eclipse.cdt.dsf=v201002161416,:pserver:anonymous at dev.eclipse.org:/cvsroot/tools,,org.eclipse.cdt/dsf/org.eclipse.cdt.dsf
diff --git a/results/pluginVersions.properties b/results/pluginVersions.properties
index b5d40e4..4fb219a 100644
--- a/results/pluginVersions.properties
+++ b/results/pluginVersions.properties
@@ -1,14 +1,19 @@
-#Thu Jun 10 17:15:08 CEST 2010
+#Tue Jun 15 21:13:45 CEST 2010
 org.eclipse.cdt.core.lrparser.xlc,0.0.0=v201002161416
+org.eclipse.cdt.build.crossgcc,0.0.0=v201002161416
 org.eclipse.cdt.launch,0.0.0=v201002161416
 org.eclipse.cdt.make.core,0.0.0=v201002161416
 org.eclipse.cdt.debug.gdbjtag.ui,0.0.0=v201002161416
 org.eclipse.cdt.dsf.gdb.ui,0.0.0=v201002161416
 org.eclipse.cdt.debug.mi.core,0.0.0=v201002161416
 org.eclipse.cdt.dsf.gdb,0.0.0=v201002161416
+org.eclipse.cdt.examples.dsf,0.0.0=v201002161416
 org.eclipse.cdt.debug.gdbjtag,0.0.0=v201002161416
 org.eclipse.cdt.doc.user,0.0.0=v201002161416
 org.eclipse.cdt,0.0.0=v201002161416
+org.eclipse.cdt.core.tests,0.0.0=v201002161416
+org.eclipse.cdt.ui.tests,0.0.0=v201002161416
+org.eclipse.cdt.debug.ui.tests,0.0.0=v201002161416
 org.eclipse.cdt.managedbuilder.core,0.0.0=v201002161416
 org.eclipse.cdt.errorparsers.xlc,0.0.0=v201002161416
 org.eclipse.cdt.core.linux.x86,0.0.0=v201002161416
@@ -20,28 +25,39 @@ org.eclipse.cdt.debug.core,0.0.0=v201002161416
 org.eclipse.cdt.managedbuilder.xlc.core,0.0.0=v201002161416
 org.eclipse.cdt.core.aix,0.0.0=v201002161416
 org.eclipse.cdt.managedbuilder.gnu.ui,0.0.0=v201002161416
+org.eclipse.cdt.p2,0.0.0=v201002161416
+org.eclipse.cdt.managedbuilder.ui.tests,0.0.0=v201002161416
+org.eclipse.cdt.mylyn,0.0.0=v201002161416
 org.eclipse.cdt.core.solaris,0.0.0=v201002161416
-org.eclipse.cdt.managedbuilder.xlupc.ui,0.0.0=v201002161416
 org.eclipse.cdt.core.linux.ia64,0.0.0=v201002161416
+org.eclipse.cdt.managedbuilder.xlupc.ui,0.0.0=v201002161416
 org.eclipse.cdt.debug.mi.ui,0.0.0=v201002161416
 org.eclipse.cdt.core.macosx,0.0.0=v201002161416
 org.eclipse.cdt.core.linux,0.0.0=v201002161416
-org.eclipse.cdt.debug.ui.memory.transport,0.0.0=v201002161416
 org.eclipse.cdt.debug.ui,0.0.0=v201002161416
-org.eclipse.cdt.managedbuilder.ui,0.0.0=v201002161416
+org.eclipse.cdt.debug.ui.memory.transport,0.0.0=v201002161416
+org.eclipse.cdt.examples.dsf.pda,0.0.0=v201002161416
 org.eclipse.cdt.dsf.ui,0.0.0=v201002161416
+org.eclipse.cdt.managedbuilder.ui,0.0.0=v201002161416
 org.eclipse.cdt.core,0.0.0=v201002161416
+org.eclipse.cdt.testing,0.0.0=v201002161416
 org.eclipse.cdt.core.qnx,0.0.0=v201002161416
 org.eclipse.cdt.doc.isv,0.0.0=v201002161416
 org.eclipse.cdt.dsf,0.0.0=v201002161416
+org.eclipse.cdt.mylyn.ui,0.0.0=v201002161416
+org.eclipse.ant.optional.junit,0.0.0=HEAD
+org.eclipse.cdt.managedbuilder.core.tests,0.0.0=v201002161416
 org.eclipse.cdt.core.linux.x86_64,0.0.0=v201002161416
 org.eclipse.cdt.util,0.0.0=v201002161416
 org.eclipse.cdt.debug.ui.memory.memorybrowser,0.0.0=v201002161416
 org.eclipse.cdt.debug.ui.memory.traditional,0.0.0=v201002161416
 org.eclipse.cdt.core.lrparser,0.0.0=v201002161416
 org.eclipse.cdt.debug.ui.memory.search,0.0.0=v201002161416
+org.eclipse.test,0.0.0=HEAD
 org.eclipse.cdt.debug.gdbjtag.core,0.0.0=v201002161416
 org.eclipse.cdt.sdk,0.0.0=v201002161416
 org.eclipse.cdt.core.win32,0.0.0=v201002161416
 org.eclipse.cdt.managedbuilder.xlc.ui,0.0.0=v201002161416
 org.eclipse.cdt.ui,0.0.0=v201002161416
+org.eclipse.cdt.examples.dsf.pda.ui,0.0.0=v201002161416
+org.eclipse.cdt.launch.remote,0.0.0=v201002161416
diff --git a/results/plugins/org.eclipse.ant.optional.junit/.project b/results/plugins/org.eclipse.ant.optional.junit/.project
new file mode 100644
index 0000000..01c4c81
--- /dev/null
+++ b/results/plugins/org.eclipse.ant.optional.junit/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.ant.optional.junit</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.ant.optional.junit/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.ant.optional.junit/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..bf7ad8e
--- /dev/null
+++ b/results/plugins/org.eclipse.ant.optional.junit/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.ant.optional.junit
+Bundle-Version: 3.2.200
+Fragment-Host: org.apache.ant;bundle-version="[1.6.5,2.0.0)"
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime.compatibility,
+ org.junit
+Bundle-Vendor: %providerName
diff --git a/results/plugins/org.eclipse.ant.optional.junit/about.html b/results/plugins/org.eclipse.ant.optional.junit/about.html
new file mode 100644
index 0000000..5d03fd4
--- /dev/null
+++ b/results/plugins/org.eclipse.ant.optional.junit/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>May 2, 2006</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.ant.optional.junit/build.properties b/results/plugins/org.eclipse.ant.optional.junit/build.properties
new file mode 100644
index 0000000..ddcdb5e
--- /dev/null
+++ b/results/plugins/org.eclipse.ant.optional.junit/build.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2000, 2007 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+bin.includes = about.html,\
+               META-INF/
diff --git a/results/plugins/org.eclipse.cdt.core.parser.upc/.classpath b/results/plugins/org.eclipse.cdt.build.crossgcc/.classpath
old mode 100644
new mode 100755
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.parser.upc/.classpath
copy to results/plugins/org.eclipse.cdt.build.crossgcc/.classpath
diff --git a/results/plugins/org.eclipse.cdt.build.crossgcc/.project b/results/plugins/org.eclipse.cdt.build.crossgcc/.project
new file mode 100755
index 0000000..2655c34
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.build.crossgcc/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.build.crossgcc</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.cdt.build.crossgcc/.settings/org.eclipse.jdt.core.prefs b/results/plugins/org.eclipse.cdt.build.crossgcc/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 0000000..2884116
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.build.crossgcc/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Wed May 06 10:39:04 EDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/results/plugins/org.eclipse.cdt.build.crossgcc/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.cdt.build.crossgcc/META-INF/MANIFEST.MF
new file mode 100755
index 0000000..613c28c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.build.crossgcc/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.cdt.build.crossgcc;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.cdt.internal.build.crossgcc.Activator
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.cdt.core;bundle-version="5.1.0",
+ org.eclipse.cdt.managedbuilder.core;bundle-version="5.0.100",
+ org.eclipse.cdt.managedbuilder.gnu.ui;bundle-version="5.0.100",
+ org.eclipse.core.resources;bundle-version="3.5.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin
diff --git a/results/plugins/org.eclipse.cdt.core.aix/about.html b/results/plugins/org.eclipse.cdt.build.crossgcc/about.html
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.aix/about.html
copy to results/plugins/org.eclipse.cdt.build.crossgcc/about.html
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/about.ini b/results/plugins/org.eclipse.cdt.build.crossgcc/about.ini
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/about.ini
copy to results/plugins/org.eclipse.cdt.build.crossgcc/about.ini
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/about.mappings b/results/plugins/org.eclipse.cdt.build.crossgcc/about.mappings
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/about.mappings
copy to results/plugins/org.eclipse.cdt.build.crossgcc/about.mappings
diff --git a/results/plugins/org.eclipse.cdt.build.crossgcc/about.properties b/results/plugins/org.eclipse.cdt.build.crossgcc/about.properties
new file mode 100644
index 0000000..f3fe9b4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.build.crossgcc/about.properties
@@ -0,0 +1,24 @@
+###############################################################################
+#  Copyright (c) 2002, 2009 Wind River Systems and others.
+#  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
+# 
+#  Contributors:
+#     Wind River Systems - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+# NOTE TO TRANSLATOR: Please do not translate the featureVersion variable.
+
+blurb=Eclipse GCC Cross Compiler Support\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright Eclipse contributors and others, 2000, 2009.  All rights reserved.\n\
+Visit http://www.eclipse.org/cdt
diff --git a/results/plugins/org.eclipse.cdt.build.crossgcc/build.properties b/results/plugins/org.eclipse.cdt.build.crossgcc/build.properties
new file mode 100755
index 0000000..a3b5267
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.build.crossgcc/build.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# Copyright (c) 2009 Wind River Systems, Inc. and others.
+# 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
+# 
+# Contributors:
+#     Doug Schaefer - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               templates/,\
+               about.html,\
+               about.ini,\
+               about.mappings,\
+               about.properties,\
+               eclipse32.gif,\
+               plugin.properties
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif b/results/plugins/org.eclipse.cdt.build.crossgcc/eclipse32.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif
copy to results/plugins/org.eclipse.cdt.build.crossgcc/eclipse32.gif
diff --git a/results/plugins/org.eclipse.cdt.build.crossgcc/plugin.properties b/results/plugins/org.eclipse.cdt.build.crossgcc/plugin.properties
new file mode 100644
index 0000000..5c185e3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.build.crossgcc/plugin.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2009 Wind River Systems and others.
+# 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
+#
+# Contributors:
+#     Doug Schaefer (Wind River) - initial API and implementation
+#	  IBM Corporation
+###############################################################################
+
+Bundle-Vendor = Eclipse CDT
+Bundle-Name = CDT GCC Cross Compiler Support
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.build.crossgcc/plugin.xml b/results/plugins/org.eclipse.cdt.build.crossgcc/plugin.xml
new file mode 100755
index 0000000..65add71
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.build.crossgcc/plugin.xml
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+   <extension
+         point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
+      <managedBuildRevision
+            fileVersion="4.0.0">
+      </managedBuildRevision>
+      <toolChain
+            archList="all"
+            configurationEnvironmentSupplier="org.eclipse.cdt.internal.build.crossgcc.CrossEnvironmentVariableSupplier"
+            id="cdt.managedbuild.toolchain.gnu.cross.base"
+            isAbstract="false"
+            name="Cross GCC"
+            osList="all">
+         <targetPlatform
+               archList="all"
+               binaryParser="org.eclipse.cdt.core.ELF"
+               id="cdt.managedbuild.targetPlatform.gnu.cross"
+               isAbstract="false"
+               osList="all">
+         </targetPlatform>
+         <builder
+               id="cdt.managedbuild.builder.gnu.cross"
+               isAbstract="false"
+               isVariableCaseSensitive="false"
+               superClass="org.eclipse.cdt.build.core.internal.builder">
+         </builder>
+         <optionCategory
+               id="cdt.managedbuild.optionCategory.gnu.cross.settings"
+               name="Cross Settings">
+         </optionCategory>
+         <option
+               category="cdt.managedbuild.optionCategory.gnu.cross.settings"
+               id="cdt.managedbuild.option.gnu.cross.prefix"
+               isAbstract="false"
+               name="Prefix"
+               resourceFilter="all"
+               valueType="string">
+         </option>
+         <option
+               browseType="directory"
+               category="cdt.managedbuild.optionCategory.gnu.cross.settings"
+               id="cdt.managedbuild.option.gnu.cross.path"
+               isAbstract="false"
+               name="Path"
+               resourceFilter="all"
+               valueType="string">
+         </option>
+         <tool
+               commandLineGenerator="org.eclipse.cdt.internal.build.crossgcc.CrossCommandLineGenerator"
+               id="cdt.managedbuild.tool.gnu.cross.cpp.compiler"
+               isAbstract="false"
+               name="Cross G++ Compiler"
+               superClass="cdt.managedbuild.tool.gnu.cpp.compiler">
+         </tool>
+         <tool
+               commandLineGenerator="org.eclipse.cdt.internal.build.crossgcc.CrossCommandLineGenerator"
+               id="cdt.managedbuild.tool.gnu.cross.cpp.linker"
+               isAbstract="false"
+               name="Cross G++ Linker"
+               superClass="cdt.managedbuild.tool.gnu.cpp.linker">
+         </tool>
+      </toolChain>
+	     <projectType
+	        buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe"
+	        id="cdt.managedbuild.target.gnu.cross.exe"
+	        isAbstract="false"
+	        isTest="false"
+	        >                                  
+	     <configuration
+	           name="Debug"
+	           cleanCommand="rm -rf"
+	           id="cdt.managedbuild.config.gnu.cross.exe.debug"
+	           parent="cdt.managedbuild.config.gnu.base"
+	           buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug">
+	           <toolChain
+	           		 superClass="cdt.managedbuild.toolchain.gnu.cross.base"
+	                 id="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
+	           </toolChain>                                   
+	     </configuration>
+	     <configuration
+	           name="Release"
+	           cleanCommand="rm -rf"
+	           id="cdt.managedbuild.config.gnu.cross.exe.release"
+	           parent="cdt.managedbuild.config.gnu.base"
+	           buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release">
+	           <toolChain
+	                 superClass="cdt.managedbuild.toolchain.gnu.cross.base"
+	                 id="cdt.managedbuild.toolchain.gnu.cross.exe.release">
+	           </toolChain>                                                     
+	     </configuration>
+	  </projectType>              
+	     
+	  <projectType
+	        buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"
+	        id="cdt.managedbuild.target.gnu.cross.so"
+	        isAbstract="false"
+	        isTest="false"
+	        >            
+	     <configuration
+	           name="Debug"
+	           cleanCommand="rm -rf"
+	           parent="cdt.managedbuild.config.gnu.base"
+	           buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug"
+	           id="cdt.managedbuild.config.gnu.cross.so.debug">
+	           <toolChain
+	                 superClass="cdt.managedbuild.toolchain.gnu.cross.base"
+	                 id="cdt.managedbuild.toolchain.gnu.cross.so.debug">
+	           </toolChain>                                                     
+	     </configuration>
+	     <configuration
+	           name="Release"
+	           cleanCommand="rm -rf"
+	           parent="cdt.managedbuild.config.gnu.base"
+	           buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release"
+	           id="cdt.managedbuild.config.gnu.cross.so.release">               
+	           <toolChain
+	                 superClass="cdt.managedbuild.toolchain.gnu.cross.base"
+	                 id="cdt.managedbuild.toolchain.gnu.cross.so.release">
+	           </toolChain>                                                                                
+	     </configuration>
+	  </projectType>
+	                   
+	  <projectType
+	        buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib"
+	        id="cdt.managedbuild.target.gnu.cross.lib"
+	        isAbstract="false"
+	        isTest="false"
+	        >            
+	     <configuration
+	           name="Debug"
+	           parent="cdt.managedbuild.config.gnu.base"
+	           buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug"
+	           cleanCommand="rm -rf"
+	           id="cdt.managedbuild.config.gnu.cross.lib.debug">
+	           <toolChain
+	                 superClass="cdt.managedbuild.toolchain.gnu.cross.base"
+	                 id="cdt.managedbuild.toolchain.gnu.cross.lib.debug">
+	           </toolChain>                                                                                				               				  
+	     </configuration>
+	     <configuration
+	           name="Release"
+	           parent="cdt.managedbuild.config.gnu.base"
+	           buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release"
+	           cleanCommand="rm -rf"
+	           id="cdt.managedbuild.config.gnu.cross.lib.release">
+	           <toolChain
+	                 superClass="cdt.managedbuild.toolchain.gnu.cross.base"
+	                 id="cdt.managedbuild.toolchain.gnu.cross.lib.release">
+			</toolChain>                                                                                				                    
+         </configuration>         
+      </projectType>
+   </extension>
+   <extension
+         point="org.eclipse.cdt.core.templateProcessTypes">
+      <processType
+            name="setCrossCommand"
+            processRunner="org.eclipse.cdt.build.crossgcc.SetCrossCommandProcess">
+         <simple
+               name="projectName">
+         </simple>
+         <simple
+               name="prefix">
+         </simple>
+         <simple
+               name="path">
+         </simple>
+      </processType>
+   </extension>
+   <extension
+         point="org.eclipse.cdt.core.templates">
+      <template
+            id="org.eclipse.cdt.build.crossgcc.setCrossCommand"
+            location="templates/setCrossCommand/template.xml"
+            projectType="org.eclipse.cdt.build.core.buildArtefactType.exe">
+      </template>
+   </extension>
+   <extension
+         point="org.eclipse.cdt.core.templateAssociations">
+      <template
+            id="org.eclipse.cdt.build.crossgcc.setCrossCommand">
+         <toolChain
+               id="cdt.managedbuild.toolchain.gnu.cross.base">
+         </toolChain>
+      </template>
+   </extension>
+
+</plugin>
diff --git a/results/plugins/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/build/crossgcc/SetCrossCommandProcess.java b/results/plugins/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/build/crossgcc/SetCrossCommandProcess.java
new file mode 100755
index 0000000..e415bee
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/build/crossgcc/SetCrossCommandProcess.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems, Inc. and others.
+ * 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
+ * 
+ * Contributors:
+ *     Doug Schaefer - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.build.crossgcc;
+
+import java.util.Map;
+
+import org.eclipse.cdt.build.core.scannerconfig.CfgInfoContext;
+import org.eclipse.cdt.build.core.scannerconfig.ICfgScannerConfigBuilderInfo2Set;
+import org.eclipse.cdt.build.internal.core.scannerconfig2.CfgScannerConfigProfileManager;
+import org.eclipse.cdt.core.templateengine.TemplateCore;
+import org.eclipse.cdt.core.templateengine.process.ProcessArgument;
+import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
+import org.eclipse.cdt.core.templateengine.process.ProcessRunner;
+import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+public class SetCrossCommandProcess extends ProcessRunner {
+
+	@Override
+	public void process(TemplateCore template, ProcessArgument[] args,
+			String processId, IProgressMonitor monitor)
+			throws ProcessFailureException {
+		String projectName = args[0].getSimpleValue();
+		String prefix = args[1].getSimpleValue();
+		String path = args[2].getSimpleValue();
+		
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+		if (!project.exists())
+			return;
+		
+		IManagedBuildInfo buildInfo = ManagedBuildManager.getBuildInfo(project);
+		if (buildInfo == null)
+			return;
+		
+		IConfiguration[] configs = buildInfo.getManagedProject().getConfigurations();
+		for (IConfiguration config : configs) {
+			IToolChain toolchain = config.getToolChain();
+			IOption option = toolchain.getOptionBySuperClassId("cdt.managedbuild.option.gnu.cross.prefix");
+			ManagedBuildManager.setOption(config, toolchain, option, prefix);
+			option = toolchain.getOptionBySuperClassId("cdt.managedbuild.option.gnu.cross.path");
+			ManagedBuildManager.setOption(config, toolchain, option, path);
+			
+			ICfgScannerConfigBuilderInfo2Set cbi = CfgScannerConfigProfileManager.getCfgScannerConfigBuildInfo(config);
+			Map<CfgInfoContext, IScannerConfigBuilderInfo2> map = cbi.getInfoMap();
+			IScannerConfigBuilderInfo2 bi = map.values().iterator().next();
+			String providerId = "specsFile";
+			String runCommand = bi.getProviderRunCommand(providerId);
+			bi.setProviderRunCommand(providerId, prefix + runCommand);
+			try {
+				bi.save();
+			} catch (CoreException e) {
+				throw new ProcessFailureException(e);
+			}
+		}
+		
+		ManagedBuildManager.saveBuildInfo(project, true);
+		
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Activator.java b/results/plugins/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Activator.java
new file mode 100755
index 0000000..085dcfd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/Activator.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems, Inc. and others.
+ * 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
+ * 
+ * Contributors:
+ *     Doug Schaefer - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.build.crossgcc;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "tut.cross.good";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossCommandLineGenerator.java b/results/plugins/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossCommandLineGenerator.java
new file mode 100755
index 0000000..fd0ba8f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossCommandLineGenerator.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems, Inc. and others.
+ * 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
+ * 
+ * Contributors:
+ *     Doug Schaefer - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.build.crossgcc;
+
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.internal.core.ManagedCommandLineGenerator;
+import org.eclipse.cdt.managedbuilder.internal.core.ResourceConfiguration;
+
+public class CrossCommandLineGenerator extends ManagedCommandLineGenerator {
+
+	@Override
+	public IManagedCommandLineInfo generateCommandLineInfo(ITool tool,
+			String commandName, String[] flags, String outputFlag,
+			String outputPrefix, String outputName, String[] inputResources,
+			String commandLinePattern) {
+		IBuildObject parent = tool.getParent();
+		IToolChain toolchain;
+		if(parent instanceof ResourceConfiguration)
+			toolchain = ((ResourceConfiguration)parent).getBaseToolChain();
+		else
+			toolchain = (IToolChain)parent;
+
+		IOption option = toolchain.getOptionBySuperClassId("cdt.managedbuild.option.gnu.cross.prefix");
+		String prefix = (String)option.getValue();
+		String newCommandName = prefix + commandName;
+		return super.generateCommandLineInfo(tool, newCommandName, flags, outputFlag,
+				outputPrefix, outputName, inputResources, commandLinePattern);
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossEnvironmentVariableSupplier.java b/results/plugins/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossEnvironmentVariableSupplier.java
new file mode 100755
index 0000000..51f5036
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.build.crossgcc/src/org/eclipse/cdt/internal/build/crossgcc/CrossEnvironmentVariableSupplier.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems, Inc. and others.
+ * 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
+ * 
+ * Contributors:
+ *     Doug Schaefer - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.build.crossgcc;
+
+import java.io.File;
+
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable;
+import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier;
+import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider;
+import org.eclipse.core.runtime.Platform;
+
+public class CrossEnvironmentVariableSupplier implements
+		IConfigurationEnvironmentVariableSupplier {
+
+	public IBuildEnvironmentVariable getVariable(String variableName,
+			IConfiguration configuration, IEnvironmentVariableProvider provider) {
+		if (PathEnvironmentVariable.isVar(variableName))
+			return PathEnvironmentVariable.create(configuration);
+		else
+			return null;
+	}
+
+	public IBuildEnvironmentVariable[] getVariables(
+			IConfiguration configuration, IEnvironmentVariableProvider provider) {
+		IBuildEnvironmentVariable path = PathEnvironmentVariable.create(configuration);
+		return path != null ? new IBuildEnvironmentVariable[] { path } : new IBuildEnvironmentVariable[0];
+	}
+
+	private static class PathEnvironmentVariable implements IBuildEnvironmentVariable {
+
+		public static String name = "PATH";
+		
+		private File path;
+		
+		private PathEnvironmentVariable(File path) {
+			this.path = path;
+		}
+		
+		public static PathEnvironmentVariable create(IConfiguration configuration) {
+			IToolChain toolchain = configuration.getToolChain();
+			IOption option = toolchain.getOptionBySuperClassId("cdt.managedbuild.option.gnu.cross.path");
+			String path = (String)option.getValue();
+			return new PathEnvironmentVariable(new File(path, "bin"));
+		}
+		
+		public static boolean isVar(String name) {
+			// Windows has case insensitive env var names
+			return Platform.getOS().equals(Platform.OS_WIN32)
+				? name.equalsIgnoreCase(PathEnvironmentVariable.name)
+				: name.equals(PathEnvironmentVariable.name);
+		}
+		
+		public String getDelimiter() {
+			return Platform.getOS().equals(Platform.OS_WIN32) ? ";" : ":";
+		}
+
+		public String getName() {
+			return name;
+		}
+
+		public int getOperation() {
+			return IBuildEnvironmentVariable.ENVVAR_PREPEND;
+		}
+
+		public String getValue() {
+			return path.getAbsolutePath();
+		}
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.build.crossgcc/templates/setCrossCommand/template.xml b/results/plugins/org.eclipse.cdt.build.crossgcc/templates/setCrossCommand/template.xml
new file mode 100755
index 0000000..f65902e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.build.crossgcc/templates/setCrossCommand/template.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="ProjTempl" version="1.0" supplier="Eclipse.org" revision="1.0" author="EclipseCon"
+		copyright="Copyright (c) 2009 EclipseCon and others. 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"
+		id="EmptyProject" label="Cross-Compile Project" description="Set up a cross compiler"
+		 help="help.html">
+
+	<property-group id="command" label="Command" description="The Cross Compile Command" type="PAGES-ONLY" help="help.html">
+		<property id="prefix"
+			label="Tool command prefix"
+			description="The prefix to attach to the build commands, e.g. gcc"
+			type="input"
+			pattern=".*"
+			default=""
+			hidden="false"
+			persist="true"/>
+
+		<property id="path"
+			label="Tool command path"
+			description="The root directory for the toolchain"
+			type="browsedir"
+			pattern=".*"
+			default=""
+			hidden="false"
+			persist="true"/>
+	</property-group>
+	
+	<process type="org.eclipse.cdt.build.crossgcc.setCrossCommand">
+		<simple name="projectName" value="$(projectName)"/>
+		<simple name="prefix" value="$(prefix)"/>
+		<simple name="path" value="$(path)"/>
+	</process>
+	
+</template>
diff --git a/results/plugins/org.eclipse.cdt.core.aix/os/aix/ppc/libpty.so b/results/plugins/org.eclipse.cdt.core.aix/os/aix/ppc/libpty.so
new file mode 100644
index 0000000..5a777eb
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.aix/os/aix/ppc/libpty.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.aix/os/aix/ppc/libspawner.so b/results/plugins/org.eclipse.cdt.core.aix/os/aix/ppc/libspawner.so
new file mode 100644
index 0000000..19c8c1d
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.aix/os/aix/ppc/libspawner.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.linux.ia64/os/linux/ia64/libpty.so b/results/plugins/org.eclipse.cdt.core.linux.ia64/os/linux/ia64/libpty.so
new file mode 100644
index 0000000..35b47f2
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.linux.ia64/os/linux/ia64/libpty.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.linux.ia64/os/linux/ia64/libspawner.so b/results/plugins/org.eclipse.cdt.core.linux.ia64/os/linux/ia64/libspawner.so
new file mode 100644
index 0000000..1cde969
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.linux.ia64/os/linux/ia64/libspawner.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.linux.ppc/os/linux/ppc/libpty.so b/results/plugins/org.eclipse.cdt.core.linux.ppc/os/linux/ppc/libpty.so
new file mode 100644
index 0000000..8435417
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.linux.ppc/os/linux/ppc/libpty.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.linux.ppc/os/linux/ppc/libspawner.so b/results/plugins/org.eclipse.cdt.core.linux.ppc/os/linux/ppc/libspawner.so
new file mode 100644
index 0000000..a9da6b3
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.linux.ppc/os/linux/ppc/libspawner.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.linux.x86/os/linux/x86/libpty.so b/results/plugins/org.eclipse.cdt.core.linux.x86/os/linux/x86/libpty.so
new file mode 100644
index 0000000..43496de
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.linux.x86/os/linux/x86/libpty.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.linux.x86/os/linux/x86/libspawner.so b/results/plugins/org.eclipse.cdt.core.linux.x86/os/linux/x86/libspawner.so
new file mode 100644
index 0000000..40a3e39
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.linux.x86/os/linux/x86/libspawner.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libpty.so b/results/plugins/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libpty.so
new file mode 100644
index 0000000..36aaff7
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libpty.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so b/results/plugins/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so
new file mode 100644
index 0000000..265ae37
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.qnx/os/qnx/x86/libpty.so b/results/plugins/org.eclipse.cdt.core.qnx/os/qnx/x86/libpty.so
new file mode 100644
index 0000000..74a41b7
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.qnx/os/qnx/x86/libpty.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.qnx/os/qnx/x86/libspawner.so b/results/plugins/org.eclipse.cdt.core.qnx/os/qnx/x86/libspawner.so
new file mode 100644
index 0000000..0de48ac
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.qnx/os/qnx/x86/libspawner.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.solaris/os/solaris/sparc/libpty.so b/results/plugins/org.eclipse.cdt.core.solaris/os/solaris/sparc/libpty.so
new file mode 100644
index 0000000..2333a6d
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.solaris/os/solaris/sparc/libpty.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.solaris/os/solaris/sparc/libspawner.so b/results/plugins/org.eclipse.cdt.core.solaris/os/solaris/sparc/libspawner.so
new file mode 100644
index 0000000..46c86d9
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.solaris/os/solaris/sparc/libspawner.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/.classpath b/results/plugins/org.eclipse.cdt.core.tests/.classpath
new file mode 100644
index 0000000..a32029e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="misc"/>
+	<classpathentry kind="src" path="model"/>
+	<classpathentry kind="src" path="parser"/>
+	<classpathentry kind="src" path="suite"/>
+	<classpathentry kind="src" path="regression"/>
+	<classpathentry kind="src" path="templateengine"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/results/plugins/org.eclipse.cdt.core.aix/.cvsignore b/results/plugins/org.eclipse.cdt.core.tests/.cvsignore
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.aix/.cvsignore
copy to results/plugins/org.eclipse.cdt.core.tests/.cvsignore
diff --git a/results/plugins/org.eclipse.cdt.core.tests/.project b/results/plugins/org.eclipse.cdt.core.tests/.project
new file mode 100644
index 0000000..466f1c1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.core.tests</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.core.ccnature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.cdt.core.tests/.settings/org.eclipse.cdt.core.prefs b/results/plugins/org.eclipse.cdt.core.tests/.settings/org.eclipse.cdt.core.prefs
new file mode 100644
index 0000000..086daaa
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/.settings/org.eclipse.cdt.core.prefs
@@ -0,0 +1,5 @@
+#Wed Jun 06 11:37:01 EDT 2007
+eclipse.preferences.version=1
+indexer/indexerId=org.eclipse.cdt.core.nullindexer
+indexerId=org.eclipse.cdt.core.nullindexer
+instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
diff --git a/results/plugins/org.eclipse.cdt.core.tests/.settings/org.eclipse.jdt.core.prefs b/results/plugins/org.eclipse.cdt.core.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..67b4500
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,62 @@
+#Wed Jan 02 10:16:52 EST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=ignore
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/results/plugins/org.eclipse.cdt.core.tests/.settings/org.eclipse.jdt.ui.prefs b/results/plugins/org.eclipse.cdt.core.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..dac379f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+#Mon Oct 09 10:54:22 CEST 2006
+eclipse.preferences.version=1
+internal.default.compliance=user
diff --git a/results/plugins/org.eclipse.cdt.core.tests/.settings/org.eclipse.pde.prefs b/results/plugins/org.eclipse.cdt.core.tests/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..ae33c67
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,14 @@
+#Mon Oct 09 10:48:29 CEST 2006
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/results/plugins/org.eclipse.cdt.core.tests/ChangeLog b/results/plugins/org.eclipse.cdt.core.tests/ChangeLog
new file mode 100644
index 0000000..1611294
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/ChangeLog
@@ -0,0 +1,1865 @@
+2005-08-30 Alain Magloire
+	New test for PR 109202 (written by Devin Steffler)
+	* parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
+
+2005-08-30 Alain Magloire
+	New test in PR 107150 (written by Devin Steffler)
+	* parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
+	* parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java
+	* parser/org/eclipse/cdt/core/parser/tests/scanner2/Scanner2Test.java
+
+2005-06-26 Alain Magloire
+	* model/org/eclipse/cdt/core/model/tests/StructuralTemplateTests.java
+
+2005-06-25 Alain Magloire
+	PR 98788: Templates
+	* model/org/eclipse/cdt/core/model/tests/CModleElementsTests.java
+	* model/org/eclipse/cdt/core/model/tests/ITemplateTests.java
+	* model/org/eclipse/cdt/core/model/tests/StructureCModelElementsTests.java
+	* model/org/eclipse/cdt/core/model/tests/StructuralTemplateTests.java
+
+2005-06-16 Vladimir Hirsl
+	Updated search related tests to reflect function parameters in search pattern.
+	
+	* indexer/org/eclipse/cdt/core/indexer/tests/DependencyTests.java
+	* indexer/org/eclipse/cdt/core/indexer/tests/DOMSourceIndexerTests.java
+	* regression/org/eclipse/cdt/core/tests/SearchRegressionTests.java
+	* search/org/eclipse/cdt/core/search/tests/FunctionMethodPatternTests.java
+	* search/org/eclipse/cdt/core/search/tests/SearchTestSuite.java
+	
+2005-06-08 Alain Magloire
+	Remove the ResolverModelTest
+	- misc/org/eclipse/cdt/core/filetype/tests/ResolverTeste.java
+	- suite/org/eclipse/cdt/core/suite/AutomatedIntegrationSuite.java
+
+2005-03-13 Bogdan Gheorghe
+	Updated tests to work with new index framework
+	
+2005-02-02 Tanya Wolff
+	added regression tests to AutomatedIntegrationSuite
+	* build.properties
+	* regression/org.eclipse.cdt.core.tests/SearchRegressionTests.java
+	* suite/org.eclipse.cdt.core.suite/AutomatedIntegrationSuite.java
+
+2005-01-31 Bogdan Gheorghe
+	Patch from Dave Daoust to streamline Index Manager Tests
+	
+2004-12-7 Tanya Wolff
+	incorporated comments from search regression test review
+	
+2004-11-15 Tanya Wolff
+	added selection search tests to regression folder
+	
+2004-10-13 Tanya Wolff
+	added search tests to regression folder
+
+2004-10-4 Andrew Niefer
+	created regression source folder and a test framework for search and content assist tests
+
+2004-08-11 Bogdan Gheorghe
+	Modified indexer test to work with new forward declartion encoding.
+	
+2004-08-06 Vladimir Hirsl
+
+	Parser correctness tests in FailedCompleteParseASTTest.java
+		testParametrizedTypeDefinition_bug69751(),
+		testPredefinedSymbol_bug70928(),
+		testUsingOverloadedName_bug71317(),
+		testThisInTemplatedMemberFunction_bug71331(),
+		testInheritsFromTemplateParameter_bug71410(),
+		testTemplateFunctionInsideTemplateType_bug71588(),
+		testGNUExternalTemplate_bug71603().
+
+2004-06-09 Alain Magloire
+
+	Patch from Sam Rob to resolve 64022
+
+2004-05-19 Alain Magloire
+	New test provided by Sam Rob added for the resolver.
+
+2004-05-03 Bogdan Gheorghe
+	Changed search and indexer tests to work with new index enablement
+	
+2004-04-30 Hoda Amer
+	Final fix for bug#57526 : [CModel] CModelElementsTest needs to test STRUCTURAL_PARSE mode as well
+	Now All CModel tests run twice, once for quick mode and once for Structural mode (Except for IIncludeTests.java
+	
+2004-04-26 Hoda Amer
+	Partial fix for bug#57526 : [CModel] CModelElementsTest needs to test STRUCTURAL_PARSE mode as well
+	Added more tests for Structural Parse to the suit.
+
+2004-04-27 Hoda Amer
+	Partial fix for bug#57526 : [CModel] CModelElementsTest needs to test STRUCTURAL_PARSE mode as well
+	Added StructuralCModelElementsTest to the suit with the same input as CModelElementsTest,
+	but commented some of it as still failing parts.
+	
+2004-04-23 Hoda Amer
+	Patch for Sean Evoy : Removing Managed Build Tests from core tests.
+	
+2004-04-22 John Camelon
+	Added CompleteParseASTTest:testBug47926().
+
+2004-04-22 John Camelon
+	Updated test clients for IExpressionParser interface changes.  
+	Added QuickParseASTTests.testBug59179().  
+
+2004-04-22 Andrew Niefer
+	- added parser/CompleteParseASTTemplateTest.test_14_7_3__12_ExplicitSpecializationOverloadedFunction()
+	- added parser/CompleteParseASTTemplateTest.testPartialSpecializationDefinitions()
+	- uncommented and modified parser/ParserSymbolTableTemplateTests.test_14_7_3__12_ExplicitSpecializationOverloadedFunction()
+	- uncommented and modified parser/ParserSymbolTableTemplateTests.testPartialSpecializationDefinitions()
+
+2004-04-21 Alain Magloire
+	Update the PathEntry test.
+	* model/org/eclipse/cdt/core/model/tests/CPatEntryTest.java
+
+2004-04-21 John Camelon
+	Moved testBug39703() from ASTFailedTests to QuickParseASTTest.
+	Added ScannerTestCase::testBug39698().
+	Moved testBug39698A() & testBug39698B() from ASTFailedTests to QuickParseASTTest.
+	Added testBug39698A() & testBug39698B() to CompleteParseASTTest.
+
+2004-04-21 Andrew Niefer
+	fox bugs 52695 & 45372
+	added parser/CompleteParseASTSymbolIteratorTest.testUsingDirectives()
+	added parser/CompleteParseASTSymbolIteratorTest.testUsingDeclaration()
+
+2004-04-21 John Camelon
+	Removed unused testInclusions() test from ScannerTestCase. 
+
+2004-04-20 Andrew Niefer
+	added parser/CompleteParseASTTest.testBug59302()
+
+2004-04-20 Andrew Niefer
+	-added parser/CompleteParseASTTemplateTest.test_14_7_3__11_ExplicitSpecializationArgumentDeduction()
+	-added parser/CompleteParseASTTemplateTest.test_14_8_1__2_ExplicitArgumentSpecification()
+	-uncommented and modified parser/ParserSymbolTableTemplateTests.test_14_7_3__11_ExplicitSpecializationArgumentDeduction()
+
+2004-04-20 John Camelon
+	Updated CompletionParseTest for CompletionKind updates.  
+
+2004-04-20 John Camelon
+	Moved testBug39684() & testBug39695() from ASTFailedTests to QuickParseASTTests.
+	Updated CompleteParseASTTest::testBug39697().
+	Added CompleteParseASTTest::testBug39684() & CompleteParseASTTest::testBug39695().
+
+2004-04-20 David Inglis
+	The CoreModel interfaces throw much more exception, we need to log them for errors.
+
+2004-04-19 Alain Magloire
+	The CoreModel interfaces throw much more exception, we need to log them for errors.
+
+2004-04-19 Andrew Niefer
+	added parser/CompleteParseASTTest.testBug59149()
+
+2004-04-19 Andrew Niefer
+	added parser/CompleteParseASTTemplateTest.test_14_7_3__5_ExplicitSpecialization()
+	uncommented & modified parser/ParserSymbolTableTemplateTests.test_14_7_3__5_ExplicitSpecialization()
+
+2004-04-15 Andrew Niefer
+	added parser/org/eclipse/cdt/core/parser/tests/CompletionParseTest.testBug58492()
+
+2004-04-15 John Camelon
+		Added CompleteParseASTTest::testBug39697().
+
+2004-04-15 Andrew Niefer
+	added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testBug57791()
+
+2004-04-14 John Camelon
+	Added CompletionTest::testBug52253().
+
+2004-04-14 John Camelon
+	Added CompleteParseASTTest::testBug44249().
+
+2004-04-14 John Camelon
+	Added CompletionTest::testBug58178().
+
+2004-04-14 Andrew Niefer
+	updated FullParseCallback with acceptFriendDeclaration
+	added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testBug45235()
+	added parser/org/eclipse/cdt/core/parser/tests/QuickParseASTTests.testBug45235()
+
+2004-04-13 Andrew Niefer
+	added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testBug46246()
+
+2004-04-12
+	Updated search tests to work with new Enumerator type, added a derived search test
+2004-04-11 John Camelon
+	Updated clients for ISourceElementRequestor.createReader() updates.
+
+2004-04-10 John Camelon
+	Updated ScannerTestCase to correspond with changes to IToken and its implementations. 
+
+2004-04-09 Andrew Niefer
+	added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTemplateTest.testTemplateMemberTemplateDefinition()
+
+2004-04-09 Andrew Niefer
+	fixed bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=57754
+	  added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testBug57754()
+	  added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTemplateTest.testBug57754()
+	  added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTemplateTest.testContructorsAndExplicitSpecialization()
+
+2004-04-08 John Camelon
+	Removed warnings from CompletionTests.
+	Added CompleteParseASTTest::testBug57800().
+
+2004-04-07 Andrew Niefer
+	added CompletionParseTest.testCompletionWithTemplateInstanceAsParent()
+
+2004-04-07 Andrew Niefer
+	fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=44338
+	- added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTemplateTest.testBug44338() 
+	- added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTemplateTest.testBug44338_2() 
+	- added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTemplateTest.testBug44338_3() 
+
+2004-04-07 John Camelon
+	Updated test cases that used IExpressionParser::expression().  
+	Added CompletionParseTest::testCompletionInFunctionBodyFullyQualified(). 
+	Added CompletionParseTest::testCompletionInFunctionBodyQualifiedName().  
+
+2004-04-06 Andrew Niefer
+	added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testBug47625()
+	
+2004-04-06 John Camelon
+	Moved testBug39704A(), testBug39704B(), testBug39704C() & testBug39704D() from ASTFailedTests to QuickParseASTTests.	
+
+2004-04-06 John Camelon
+	Added ScannerTestCase::testBug47797().  
+
+2004-04-05 Andrew Niefer
+	added search/org/eclipse/cdt/core/search/tests/ClassDeclarationPatternTests.testBug54169()
+
+2004-04-05 Andrew Niefer
+	Added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTemplateTest.testTemplateParametersInExpressions
+
+2004-04-04 John Camelon
+	Added CompleteParseASTTest::testBug56516() && CompleteParseASTTests::testBug53786().  
+
+2004-04-02 Andrew Niefer
+	- created CompleteParseASTTemplateTest, added it to the ParserTestSuite and moved all the template tests from 
+	  CompleteParseASTTest to it.
+	- added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTemplateTest.testBug56834()
+	- added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTemplateTest.testDefaultTemplateParameters()
+	- added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTemplateTest.testBug56834WithInstantiation()
+	- added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTemplateTest.testDefaultTemplateParameterWithDeferedInstance()
+	- added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTemplateTest.testExplicitInstantiation()
+
+2004-04-02 John Camelon
+	Added SelectionParseTest::testBaseCase_FunctionDeclaration().  
+	Added SelectionParseTest::testBaseCase_FunctionDeclaration2().  
+	Added SelectionParseTest::testBaseCase_VariableDeclaration().  
+	Added SelectionParseTest::testBaseCase_Parameter().  
+	Added QuickParseASTTests::testBug44336().  
+	Added ScannerTestCase::testBug36770B(). 
+	Moved testBug39705() from ASTFailedTests to QuickParseASTTests.  
+	Moved testBug39694() from ASTFailedTests to QuickParseASTTests.
+
+2004-03-29 John Camelon
+	Added ScannerTestCase::testBug56517().  
+
+2004-03-28 John Camelon
+	Removed ScannerTestCase::testGerman() until we can figure out how to make it portable.  
+
+2004-03-26 Andrew Niefer
+	template template parameters
+	- added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testTemplateTemplateParameter()
+
+2004-03-26 Andrew Niefer
+	test references to symbols in template-ids
+	- modified parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testOverloadedFunctionTemplates_2()
+	- modified parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testTemplateParameterAsBaseClause()
+	- modified parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testTypedefedTemplate_2()
+	- modified parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testInstantiatingDeferredInstances()
+	- modified parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testClassTemplateStaticMemberDefinition() 
+
+2004-03-25 Andrew Niefer
+	-added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testClassTemplateStaticMemberDefinition()
+	-modified parser/org/eclipse/cdt/core/parser/tests/QuickParseASTTests.testPointersToMemberFunctions
+
+2004-03-23 Andrew Niefer
+	bug 55673 & fix recursive loop in template instantiation
+	-parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testInstantiatingDeferredInstances()
+	-parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testTemplateArgumentDeduction()
+	-parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testBug55673()
+
+2004-03-22 John Camelon
+	Added CompleteParseASTTest::testBug54531(). 
+
+2004-03-22 Andrew Niefer
+	Typedefs & templates
+	- added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testTypedefedTemplate()
+    - added parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testTypedefedTemplate_2()
+	- added parser/org/eclipse/cdt/core/parser/tests/CompletionParseTest.testCompletionInTypeDef()
+
+2004-03-18 Andrew Niefer
+	parsing template-ids
+	- added    parser/org/eclipse/cdt/core/parser/tests/ScannerTestCase.test54778()
+	- modified parser/org/eclipse/cdt/core/parser/tests/CompleteParseBaseTests.java
+	- modified parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testOverloadedFunctionTemplates()
+	- added    parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testOverloadedFunctionTemplates_2()
+	- added    parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testTemplateClassPartialSpecialization()
+	- added    parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testTemplateInstanceAsBaseClause()
+	- added    parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.testTemplateParameterAsBaseClause()
+
+2004-03-18 Alain Magloire
+
+	Change in the hierarchy of the core Model:
+	ICModel
+	   ICProject
+	      ISourceRoot
+	         IBinary
+	         IArchive
+	         ITranslatioUnit
+	         ICContainer
+	The ISourceRoot been added to better separate
+	the files.  By default the entire project is the
+	SourceRoot.
+
+	* model/org/eclipse/cdt/core/model/tests/CModelElementsTests.java
+	* model/org/eclipse/cdt/core/model/tests/CPathEntryTest.java
+	* model/org/eclipse/cdt/core/model/tests/ElementDeltaTests.java
+	* model/org/eclipse/cdt/core/model/tests/IMacroTests.java
+	* model/org/eclipse/cdt/core/model/tests/IStructureTests.java
+	* model/org/eclipse/cdt/core/model/tests/ITemplateTests.java
+	* model/org/eclipse/cdt/core/model/tests/TranslationUnitBaseTests.java
+
+	* suite/org/eclipse/cdt/testplugin/CProjectHelper.java
+
+2003-03-16 Andrew Niefer
+	added CompleteParseASTTest.testBug55163
+
+2004-03-12 Sean Evoy
+	Corrected a target definition in the plugin manifest that was flagged 
+	as release when it should have been flagged as test. Also updated the 
+	tests to save the build information after changes that make the build 
+	information dirty.
+	
+	* plugin.xml
+	* build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java
+
+2004-03-16 Alain Magloire
+
+	Test from Thomas Fletcher for the Error Parser
+	New source folder.
+
+	* misc/
+
+2004-03-15 Andrew Niefer
+	Added CompleteParseASTTest.testTemplateClassDeclaration
+		  CompleteParseASTTest.testTemplateFunction
+		  CompleteParseASTTest.testTemplateFunctionDefinition
+		  CompleteParseASTTest.testClassMemberTemplate
+  	started CompleteParseASTTest.testOverloadedFunctionTemplates
+  	Updated CompleteParseBaseTest to handle templates
+  	updated ParserSymbolTableTemplateTests to reflect changes to ITemplateFactory
+  	Commented out a couple of ParserSymbolTableTemplateTests until I figure out how the parser will
+  	handle those cases
+
+2004-03-12 Sean Evoy
+	Commit for Jeremiah Lott. 
+	Allows the managed build system to resolve "forward references" within its 
+	extensions. In practice this is necessary to allow references between 
+	extensions in different plugins.
+
+2004-03-12 Andrew Niefer
+	added CompleteParseASTTest.testBug54639
+
+2004-03-09 David Inglis
+	Fixed StandardBuildTest to create a CProject
+	
+2004-03-09 Andrew Niefer
+	Added CompletionParseTest.testBug52948
+
+2004-03-09 Bogdan Gheorghe
+	Workaround to get DependencyTests working on integration builds. 
+	
+2004-03-03 John Camelon
+	Updated tests to deal with IASTUsingDeclaration interface changes.  
+
+2004-03-02 Sean Evoy
+	Added tests to verify that the tool command canbe set through the 
+	IConfiguration interface in the testConfigurations() method, and 
+	through a ToolReference in the checkSubSubTarget() method.
+
+2004-03-01 Andrew Niefer
+	created CompleteParseASTSymbolIteratorTest and added it to the ParserTestSuite
+
+2004-02-26 Sean Evoy
+	Work to test the ability to inherit a tool description via a tool 
+	reference. Updated the testSubSubTarget to check inheritted tool 
+	and updated the plugin manifest to add a tool and add a reference 
+	in the subSubTarget.
+	* plugin.xml
+	* build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java
+
+2004-02-26 Alain Magloire
+	Update the cpathtest
+
+2004-02-25 Bogdan Gheorghe
+	Added DependencyTests::testUpdateDependencyNPE
+
+	* model/org/eclipse/cdt/core/model/test/CPathEntryTest.java
+
+2004-02-25 John Camelon
+	Updates for new ISourceElementRequestor interface updates.  
+
+2004-02-25 John Camelon
+	Added ScannerTestCase::testGerman().  
+
+2004-02-25 Alain Magloire
+	Added the PathEntry in the AllCoreTests suite
+
+	* model/org/eclipse/cdt/core/model/tests/AllCoreTests.java
+
+2004-02-24 Andrew Niefer
+	work for Bug 51485: Template Explicit Specializations
+	added ParserSymbolTableTemplateTests.test_14_7_3__5_ExplicitSpecialization
+	added ParserSymbolTableTemplateTests.test_14_7_3__11_ExplicitSpecializationArgumentDeduction
+	added ParserSymbolTableTemplateTests.test_14_7_3__12_ExplicitSpecializationOverloadedFunction
+	fixed a couple of warnings in ParserSymbolTableTemplateTests
+	
+2004-02-23 Alain Magloire
+
+	Adjust the test for IPathEntry deltas.
+
+	* model/org/eclipse/cdt/core/model/test/CPathEntryTest.java
+
+2004-02-21 Alain Magloire
+	Refactor of the ICPatEntry to IPathEntry
+
+	* model/org/eclipse/cdt/core/model/tests/CPathEntryTests.java
+
+	Remove of unused imports
+	* model/org/eclipse/cdt/core/model/tests/CModelElementsTests.java
+	* model/org/eclipse/cdt/core/model/tests/CModelTests.java
+
+2004-02-19 Andrew Niefer
+	remove order dependancy in ParserSymbolTableTests.testUsingDeclaration_2
+
+2004-02-18 Andrew Niefer
+	modify ParserSymbolTableTests.testUsingDeclaration_2
+
+2004-02-17 Andrew Niefer
+	added ParserSymbolTableTests.testBug52111RemoveSymbol
+
+2004-02-17 Sean Evoy
+	Updated the managed build tets suite to include a test for project renaming and  
+	updated the sanity tests to check the extension and project/artifact name as 
+	separate data elements.
+	* build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java
+
+2004-02-13 Andrew Niefer
+	updated tests using search to handle InterruptedExcpetion
+
+2004-02-12 Andrew Niefer
+	UnCommented CompleteParseASTTest.testBug47628
+	Added CompleteParseASTTest.testBug47636
+	Added CompleteParseASTTest.testBug45697
+	Updated ParserSymbolTableTests & ParserSymbolTableTemplateTests for proper use of const & volatile
+	Added ParserSymbolTableTests.testbug47636FunctionParameterComparisons_1
+	Added ParserSymbolTableTests.testbug47636FunctionParameterComparisons_2
+	Added ParserSymbolTableTests.testbug47636FunctionParameterComparisons_3
+	Added ParserSymbolTableTests.testbug47636FunctionParameterComparisons_4
+	
+2004-02-11 John Camelon
+	Updated tests to accommodate for new Parser class hierarchy and factories.  
+
+2004-02-10 Andrew Niefer
+	Added new File: ParserSymbolTableTemplateTests.java (contains 30 new tests)
+	Added new File: FailingTemplateTests.java (contains 5 test stubs for failing cases)
+
+2004-02-10 John Camelon
+	Added testBug47682() to QuickParseASTTests.java.  
+
+2004-02-06 Bogdan Gheorghe
+	Added FunctionMethodPatternTests.testMethodDeclarationWithNoParameters
+
+2004-02-08 John Camelon
+	Moved testErrorHandling_1() from failed tests to CompleteParseASTTest.  
+	Moved testBug44340() from failed tests to CompleteParseASTTest.
+
+2004-02-06 Andrew Niefer
+	Added CompletionParseTest.testBug51260
+
+2004-02-04 John Camelon
+	Added preliminary SelectionParseTests to test SELECTION_PARSE clients. 
+	Added SelectionParseTests to ParserTestSuite.  
+
+2004-01-30 John Camelon
+	Added QuickParseASTTest::testBug47752.  
+
+2004-01-28 John Camelon
+	Added ScannerTestCase::testBug50821().  
+
+2004-01-27 John Camelon
+	Renamed ContextualParseTest to CompletionParseTest.
+	Updated COMPLETION_PARSE clients to use SINGLE_NAME_REFERENCE rather than STATEMENT_START.  
+
+2004-01-27 Andrew Niefer
+	Added CompleteParseASTTest.testCBoolAsParameter
+	
+2004-01-26 John Camelon
+	Updated clients to use new Scanner logging service.
+	Added ScannerTestCase.testBug46402().  
+
+2004-01-26 Andrew Niefer
+	Added ParserSymbolTableTest.testLongLong() 
+	Added ParserSymbolTableTest.testComplex() 
+	Added ParserSymbolTableTest.test_Bool() 
+			
+2004-01-22 John Camelon
+	Updated Scanner tests for package updates in the core.  
+
+2004-01-19 John Camelon
+	Updated ParserSymbolTableTest to accommodate new constructors for COMPLETE_PARSE ASTNodes (line # info).  
+	Updated CModelElementsTest to enable testing for line numbers. 
+	Removed CModelElementsFailedTests.testBug36379() as it is redundant due to CModelElementTests.testCModelElements() is complete. 
+	Removed CModelElementsFailedTests from AutomatedIntegrationSuite as it is empty.  
+
+2004-01-16 Andrew Niefer
+	Modified CompleteParseASTTest.testUsingClauses
+	Added ParserSymbolTableTest.testIterator_1 & testIterator_2
+
+2004-01-16 Hoda Amer
+	Modified CModelElementsTest to test for enumerator constant expression 
+	Bug#47552
+	
+2004-01-15 Andrew Niefer
+	Moved testBug48307_FriendFunction_1 & testBug48307_FriendFunction_2 to ContextualParseTest
+	Updated ContextualParseTest now that the order of prefix lookup results is predictable.
+
+2004-01-15 Hoda Amer
+	Moved Content Assist testing to the UI.tests plugin
+	
+2004-01-15 John Camelon
+	Updated references to LookupResult as it was renamed to ILookupResult.  
+	Removed some warnings from parser tests.  
+	Updated Scanner & QuickParseTests to accommodate new errors and signatures.  
+	Added QuickParseASTTests.testBug44370().  
+
+2004-01-13 John Camelon
+	Updated ContextualParseTest to accommodate bugfixes 48909 & 49702.  
+
+2004-01-08 Andrew Niefer
+	Added CompleteParseASTTest.testBug43110_XRef
+	Added ParserSymbolTableTest.testBug43110_Ellipses
+	Added ParserSymbolTableTest.testBug43110_EllipsesRanking
+	Added ParserSymbolTableTest.testBug43110_EllipsesRanking_2
+
+2004-01-08 Andrew Niefer
+	Added CompleteParseASTTest::testBug48307_FriendFunction_1
+	Added CompleteParseASTTest::testBug48307_FriendFunction_2
+	
+2004-01-06 Andrew Niefer
+	Added ContextualParseTest::testCompletionLookup_LookupKindTHIS
+
+2004-01-06 John Camelon
+	Added CompleteParseASTTest::testBug43110() and QuickParseASTTests::testBug43110().  
+
+2003-12-31 Hoda Amer
+	Small change to test parameters with initial clause in ITemplateTest
+	
+2003-12-22 Hoda Amer
+	Temporary disabled completion proposal test until a better test is written.
+	
+2003-12-17 Andrew Niefer
+	test changes for content assist
+	added ContextualParseTest.testCompletionLookup_FriendClass_1() 
+	added ContextualParseTest.testCompletionLookup_FriendClass_2() 
+	added ContextualParseTest.testCompletionLookup_ParametersAsLocalVariables() 
+	modified ParserSymbolTableTest.testVisibilityDetermination() 
+
+2003-12-17 Hoda Amer
+	Small modifications to cope with the new interfaces
+	
+2003-12-15 Andrew Niefer
+	added ContextualParseTest.testCompletionLookup_Unqualified
+	added ContextualParseTest.testCompletionLookup_Qualified
+	added ContextualParseTest.testCompletionLookup_Pointer
+	
+2003-12-12 John Camelon
+	Updated testBaseCase_SimpleDeclaration() for keyword assertions.  
+
+2003-12-11 John Camelon
+	Expanded ContextualParseTest::testBaseCase().  
+	Updated tests to deal with new signatures/exceptions.  
+
+2003-12-11 Alain Magloire
+
+	New test files for the ICPathEntry in core model.
+
+	* model/org/eclipse/cdt/core/model/tests/CPathEntryTest.java
+
+2003-12-09 Andrew Niefer
+	added ParserSymbolTableTests.testVisibilityDetermination() 
+	added ParserSymbolTableTests.testPrefixFiltering
+
+2003-12-09 Hoda Amer
+	Modified the Completion Proposal test to include case sensitivity 
+	in the order of proposals.
+	
+2003-12-09 John Camelon
+	Added ContextualParseTest.java and some test cases.  
+
+2003-12-04 John Camelon
+	Removed some warnings.  
+	Moved testBug39678() from ASTFailedTests to QuickParseASTTests. 
+
+2003-12-03 Andrew Niefer
+	-modified FailedCompleteParseASTTest.testPMDotStarPointerToMemberFunction_Bug43242
+										.testPMArrowStarPointerToMemberFunction_Bug43242
+										.testPMDotStar_bug43579
+										.testPMArrowStar_bug43579
+	-created: FailedCompleteParseASTTest.testBug47926
+			  CompleteParseASTTest.testQualifiedLookup
+			  ParserSymbolTableTest.testPrefixLookup_Ambiguities
+			  ParserSymbolTableTest.testQualifiedUnqualifiedLookup
+	-modified resources/search/classDecl.cpp & include.h
+	-created FunctionMethodPatternTests.testLookupForDefinition
+	
+
+2003-11-27 Andrew Niefer
+	tests for Symbol table prefix lookup
+		ParserSymbolTableTest.testBug46882
+		ParserSymbolTableTest.testPrefixLookup_Unqualified
+		ParserSymbolTableTest.testPrefixLookup_Qualified
+		ParserSymbolTableTest.testPrefixLookup_Inheritance
+
+2003-11-27 Andrew Niefer
+	add CompleteParseASTTest.testBug47624()
+
+2003-11-18 Andrew Niefer
+	update ParserSymbolTableTest to reflect refactoring of Declaration into 4 separate classes.
+
+2003-11-13 Hoda Amer
+	Added CompleteParseASTTest::testBug44342(): Failure to dereference function calls after a . or an ->
+	Moved testErrorHandling_1() to FailedCompleteParseASTTest
+	Added FailedCompleteParseASTTest::testBug44340():Inline functions fail to resolve references 
+	
+2003-11-06 Andrew Niefer
+	Remove dependancy on cdt.internal.ui.search.CSearchResultCollector in BaseSearchTest and DependencyTests
+
+2003-11-07 John Camelon
+	Moved testBug39554() from ASTFailedTests to QuickParseASTTests.  
+
+2003-11-05 John Camelon
+	Added CompleteParseASTTest::testBug44838().  
+	Added CompleteParseASTTest::testBug46165().  
+	Added ScannerTestCase::testBug45551(). 
+
+2003-11-05 John Camelon
+	Updated parser clients to use new ParserFactory (stand-alone parser work item).  	
+
+2003-11-05 John Camelon
+	Updated parser clients to use new IProblem strategy.  
+
+2003-10-28 Andrew Niefer
+	Added testBug44510() to CompleteParseASTTest
+	Added testBug44925() to CompleteParseASTTest
+	Added testBug44510() to ParserSymbolTableTest
+
+2003-10-24 John Camelon
+	Added testBug45476() to ScannerTestCase.  
+	Added testBug45477() to ScannerTestCase. 
+	
+2003-10-24 John Camelon
+	Moved testBug39542() from ASTFailedTests to QuickParseASTTests.
+	Moved testBug39549() from ASTFailedTests to QuickParseASTTests.
+	Added testCDesignatedInitializers() to CompleteParseASTTests.
+	Moved testBug39551A() from ASTFailedTests to QuickParseASTTests. 
+	Moved testBug39551B() from ASTFailedTests to QuickParseASTTests. 
+	Added testCBool() to QuickParseASTTests.  
+	Added testBug39551A(), testBug39551B() and testCBool to CompleteParseTests.  
+
+2003-10-22 Hoda Amer
+	Added offset checking in CModelElementsTest
+	
+2003-10-21 John Camelon
+	Moved testBug40007() from ASTFailedTests to QuickParseASTTests.  
+	Added QuickParseASTTests::testBug40759().  
+	Added QuickParseASTTests::testBug44633().  
+	Added ScannerTestCase::testBug44305().  
+	Added QuickParseASTTests::testBug41935(). 
+	Moved testBug39525() from ASTFailedTests to QuickParseASTTests.  
+	Added ScannerTestCase::testBug45287(). 
+	Moved testBug39528() from ASTFailedTests to QuickParseASTTests.  
+	Moved testBug39538() from ASTFailedTests to QuickParseASTTests.  
+	Added QuickParseASTTests::testBug39536().  
+	Moved testBug39536A() from ASTFailedTests to QuickParseASTTests.  
+	Moved testBug39536B() from ASTFailedTests to QuickParseASTTests.  
+
+2003-10-20 David Inglis
+ 
+ 	use project owner ID in plugin class
+	* build/org/eclipse/cdt/core/build/managed/tests/StandardBuildTests.java
+
+	set gnu elf parser since it can read the debug info.
+	* model/org/eclipse/cdt/core/model/tests/BinaryTests.java
+
+2003-10-01 Andrew Niefer
+	added testBug43951 to CompleteParseASTTest
+
+2003-10-01 Andrew Niefer
+	modified OtherPatternTests.testBug42911() and renamed it testBug42911_43988
+
+2003-10-01 Andrew Niefer
+	added testBug43450 to ManagedBuildTests.java
+	added a user include to plugin.xml
+
+2003-09-30 Sean Evoy
+	Fix for bug 41826.
+	Updated the plugin file so that tool specifications have the new attribute 
+	for header files. The test for the managed builder now insure that those 
+	values are properly read.
+	*  plugin.xml
+	*  build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java
+
+2003-09-30 John Camelon
+	Updated CompleteParseASTTest::testBug42872()
+	Moved FailedCompleteParseASTTest::testBug43503() to CompleteParseASTTest::testBug43503A().  
+	
+2003-09-30 Andrew Niefer
+	added testBug43503_AmbiguousUsing() and testBug43503_UnableToResolveFunction() to
+	ParserSymbolTableTest
+
+2003-09-30 Andrew Niefer
+	Updated OtherPatternTests::testMacroPattern() to test for bug43862
+
+2003-09-29 Andrew Niefer
+	added testBug43062 and testConstructorDestructor to FunctionMethodPatternTests
+	modified resources/search/classDecl.cpp & include.h to include more operators and a constructor
+	& destructor
+
+2003-09-29 Hoda Amer
+	-Added testBug43679_A() & testBug43679_B() to CompleteParseASTTest
+	-Renamed FailedCompleteParseASTExpressionTest to FailedCompleteParseASTTest
+	-Added FailedCompleteParseASTTest::testBug43503()
+
+2003-09-29 Andrew Niefer
+	added testBug42911 to OtherPatternTests
+
+2003-09-29 Andrew Niefer
+	added testbug43834() to ParserSymbolTableTest
+
+2003-09-29 John Camelon
+	Added testErrorHandling_1() to CompleteParseASTTest.java.  
+
+2003-09-26 John Camelon
+	Added QuickParseASTTests::testBug43644() & testBug43062().  
+	Moved ASTFailedTests::testBug39531() to QuickParseASTTests.
+
+2003-09-25 Sean Evoy
+	Bug 43220 test for the new option type and retrieval methods.
+	* plugin.xml
+	* build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java
+
+2003-09-25 Andrew Niefer
+	-bug43129 - Cannot search for definitions of global variables
+		-added testbug43129() in OtherPatternTests
+		* resources/search/include.h
+		* resources/search/classDecl.cpp
+		* search/org/eclipse/cdt/core/search/tests/OtherPatternTests.java
+
+2003-09-25 Bogdan Gheorghe
+	- separated dependency tests from the indexer tests
+	- modified the AutomatedIntegrationSuite to include new dependency
+	  tests
+	- added the following tests: 
+	 * testDepTable
+	 * testDepSourceChangeTree
+	 * testDepHeaderChangeTree
+	 * testDepHeaderChangeReindex
+	 * testDepSourceChangeTable
+	 * testDepHeaderChangeTable
+	 
+2003-09-25 Hoda Amer
+	Enabled CompleteParseASTExpressionTest.testPostfixTypenameIdentifier()
+	
+2003-09-25 Andrew Niefer
+	added testNoResourceSearching() to OtherPatternTests
+
+2003-09-24 Hoda Amer
+    Added testNewTypeId(), testCastExpression(), testPostfixDynamicCast(), 
+    testPostfixReinterpretCast(), testPostfixStaticCast(), and testPostfixConstCast() 
+    to CompleteParseASTExpressionTest. 
+
+2003-09-24 Sean Evoy
+	Changed the implementor of IScannerInfo to answer only absolute paths when asked for 
+	includes paths. As a result, the managed builder test had to be updated to expect paths 
+	in an OS-specific format. 
+	* build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java
+	
+2003-09-24 John Camelon
+	Added testBug43375() to CompleteParseASTTest. 
+	Moved testConditionalExpressionWithReferencesB_Bug43106 from failed tests to passed tests. 
+	Moved testPMDotStar() and testPMArrowStar to failed tests w/defect number 43579.  
+
+2003-09-23 John Camelon
+	Replaced ASTFailedTests::testBug39504A() with CompleteParseASTTest::testBug39504(). 
+	Moved testPostfixTypeIdExpression2() && testPostfixTypeIdTypeId2() to CompleteParseASTExpressionTest. 
+	Restructured expression reference tests so that the order of arrival will not cause JUnit failures.
+
+2003-09-23 Andrew Niefer
+	Added FunctionMethodPatternTests.testBug43498()
+
+2003-09-23 Hoda Amer
+	Added CompleteParseASTTest.testBug43373()
+	Added QuickParseASTTests.testBug43371()
+
+2003-09-23 Sean Evoy
+	As part of the fix for critical bug 43292, I had to add functionality to 
+	the build model to remove configurations through an ITarget, and to set, 
+	reset, and flag as default the make command associated with an ITarget. I 
+	have updated the managed build test "testConfigurations" to exercise the 
+	remove functionality. I added a test, "testMakeCommandManipulation" to 
+	exercise the new make command functions in the interface.
+	* plugin.xml
+	* build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java
+
+2003-09-22 Bogdan Gheorghe
+	- modified CompletionProposalsTests, BaseSearchTest
+	 to avoid using isEnabled for the IndexManager
+	- Reordered the IndexManagerTests suite to allow all
+	  tests to be run
+	  
+2003-09-22 Andrew Niefer
+	- modified resources/cfiles/CompletionProposalsTestStart.cpp
+	- modified CompletionProposalsTest.testCompletionProposals
+	- updated calls to SearchEngine.search
+
+2003-09-19 Sean Evoy
+	Updated the build test to check the binary parser specification in the 
+	target specification.
+	* build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java
+
+2003-09-18 Andrew Niefer
+	- removed testConditionalExpression_Bug43159 from FailedCompleteParseASTExpressionTest
+	  and uncommented it (testConditionalExpression) in CompleteParseASTExpressionTest
+	- uncommented the following tests in CompleteParseASTExpressionTest :
+	    testPostfixSubscript, testPostfixSubscriptA, testPostfixSubscriptB,
+	    testPostfixSubscriptWithReferences
+	- updated ParserSymbolTableTests to use new addOperatorExpression function
+	- added testDerivedReference, testAddCopyConstructor to ParserSymbolTableTests
+	- fixed warning in ClassDeclarationPatternTests
+
+2003-09-17 Hoda Amer
+	Added more success test cases to CompleteParseASTExpressionTest
+	and more failure test cases to FailedCompleteParseASTExpressionTest
+	in testing PM_DOTSTAR, PM_ARROWSTAR, CONDITIONALEXPRESSION
+
+2003-09-16 Andrew Niefer
+	- modified resources/search/classDecl.cpp & include.h to include some operators
+	- added testOperators_bug43063_bug42979() to MethodDeclarationPatternTests
+	- added testParameterREferences to OtherPatternTests
+
+2003-09-16 Bogdan Gheorghe
+	Added asserts to all index lookups in IndexManagerTests
+	Fixed testAddNewFileToIndex
+	
+2003-09-16 Hoda Amer
+    Added CompleteParseASTExpressionTest.testPrimaryThis()
+    
+2003-09-15 John Camelon
+	Moved ASTFailedTests::testBug39556() to QuickParseASTTests.
+	Cleaned up some warnings in parser tests.  
+
+2003-09-15 Andrew Niefer
+	added testGetConditionalOperand_bug43106 to ParserSymbolTableTests
+
+2003-09-15 John Camelon
+	Added CompleteParseASTTest::testBug42979().
+	Updated CompleteParseASTTest::testAndrewsExample(). 
+
+2003-09-13 Andrew Niefer
+	- added testBadParameterInfo to ParserSymbolTableTest
+
+2003-09-12 Hoda Amer
+    - Added lots of test cases to CompleteParseASTExpressionTest
+    
+2003-09-12 John Camelon
+	Created QuickParseASTTests::testBug42985(). 
+	Moved LokiFailures::testBug40419() to QuickParseASTTests. 
+	Deleted LokiFailures as it was empty. 
+
+2003-09-11 Andrew Niefer
+	Created search/SearchTestSuite
+	Added SearchTestSuite to AutomatedIntegrationSuite and removed the individual search tests
+	Added testReferencesInFunction to ClassDeclarationPatternTests
+	Modified resources/search/classDecl.cpp
+	Modified testNamespaceReferenceInClassBaseClause, testMacroPattern, testEnumerators, 
+	testEnumeratorReferences in OtherPatternTests to test the Match result strings
+
+2003-09-11 John Camelon
+	Added CompleteParseASTTest::testBug42840() & testBug42872().
+	Moved testBug39504B(), testBug39505A() & testBug39505B() from failed to QuickParse tests.
+
+2003-09-10 Sean Evoy
+	Added a test for resetting the value of a configuration to the defaults defined in the 
+	plugin file. Work completed to resolve [Bug 41412] Restore Default in Managed Build 
+	project's settings Not Working.
+	* build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java
+
+2003-09-09 Hoda Amer
+	Moved three failed tests (bugs #42822, #42823, & #42822B)
+	from FailedCompleteParseASTExpressionTest to CompleteParseASTExpressionTest 
+	
+2003-09-09 John Camelon
+	Updated ScannerTestCase to keep up to date wrt ScannerException updates. 
+
+2003-09-09 Andrew Niefer
+	Modified resources/search/classDecl.cpp
+	 - to include more function declarations to test parameter matching
+	 - to include an enumerator reference to test enumerators
+	Added testMethodDeclarationParameterMatching to FunctionMethodPatternTests.java
+	Added testEnumeratorReferences to OtherPatternTests
+	
+2003-09-09 Hoda Amer
+	-Seperated the Expression result type test in a new file : completeParseASTExpressionTests.
+	-Added more test cases for simple types.
+	-Added FailedCompleteParseASTExpressionTest for failed reference tests.  
+	
+2003-09-08 John Camelon
+	Added CompleteParseASTTest::testThrowStatement(), testScoping(), testEnumeratorReferences().
+	Removed LineNumberTest source as it is obsolete.  
+
+2003-09-08 Andrew Niefer
+	Modified calls to ParserFactory to specify which language to use
+	Add CC nature to projects in BaseSearchTest & IndexManagerTests
+
+2003-09-05 Hoda Amer
+	Added tests to CompleteParseASTTest to test the expression result type
+	for function calls that reference variables with pointers (bug#42453).
+	
+2003-09-05 John Camelon
+	Added CompleteParseASTTest::testSimpleIfStatement(), testSimpleWhileStatement(). 
+	testSimpleSwitchStatement(), testSimpleDoStatement().
+
+2003-09-05 Andrew Niefer
+	Added testEnumerators to OtherPatternTests.java
+	Modified resources/search/classDecl.cpp to include some enumerators
+
+2003-09-05 John Camelon
+	Updated CompleteParseASTTest::testSimpleForLoop()
+
+2003-09-04 John Camelon
+    Updated ASTFailedTests::testBug39702() to fail more accurately.
+    Added testSimpleFunctionBody(), testSimpleForLoop() to CompleteParseASTTest.java.
+
+2003-09-04 Andrew Niefer
+	Added testBug42541 to CompleParseASTTests.java
+
+2003-09-04 Hoda Amer
+	Call to ASTExpression getTypeId() changed to getTypeIdString().
+	
+2003-09-03 Andrew Niefer
+	Modified ParserSymbolTableTest.testConstructors to test > 2 constructors
+
+2003-09-03 John Camelon
+	Added testBug41445() to CompleteParseASTTests.java.  
+	
+2003-09-02 Hoda Amer
+	Modified CCompletionProposalsTest to complete on a body file 
+	that includes a header file.
+	
+2003-09-02 Andrew Niefer
+	added ParserSymbolTableTest.testNamespaceAlias()
+	added ParserSymbolTableTest.testUsingNamespaceAlias()
+	
+2003-08-28 Andrew Niefer
+	Modified BaseSearchTest.setup to properly include the "include.h" file
+
+2003-08-28 Hoda Amer
+	- Added to completeParseASTTest testQualifiedNameReferences(), 
+	testIsConstructor() and testIsDestructor().
+
+2003-08-28 John Camelon
+	Moved bug39535 from failedTests to quickParse success tests.  
+	
+2003-08-25 John Camelon
+	Moved testBug39526() from ASTFailedTests.java to QuickParseASTTests.java.
+	Moved testBug41520() from FullParseFailedTests.java to CompleteParseASTTest.java
+
+2003-08-25 John Camelon
+	Updated TranslationUnitTests to not include K&R testing.  
+
+2003-08-25 John Camelon
+	Added QuickParseASTTests::testBug39530().
+
+2003-08-21 Hoda Amer
+	Enabled some tests in the IStructureTests, namely:
+	testGetFields(), testGetField(), testGetMethods(), testGetMethod(),
+	testIsAbstract(), testGetBaseTypes(), and testGetAccessControl().
+	
+2003-08-19 Sean Evoy
+	In order to properly support the indexing feature, the scanner has to 
+	function as well as the version that ships with the toolset if possible. 
+	This is	made difficult by the fact that we are trying to be tool-agnostic. 
+	One of the things that the scanner should take into account when it runs 
+	is the "built-in" symbols and search paths that are defined for a compiler 
+	in a given toolchain. While we need to come up with a standard mechanism 
+	for the CDT in the future, the managed build system can provide a work-around 
+	in the near-term. The easiest solution is to add an optional attribute to a 
+	list element that flags the item as a built-in value. When clients like 
+	the indexer query the build model, they will receive the union of the built-in 
+	values and the user-defined values.
+	
+	Added built-in information to the existing plugin definition. Also added a
+	new include path and defined symol for updated test cases.
+	* plugin.xml
+	
+	Updated the test cases to check that built-ins defined in the plugin manifest 
+	are properly read and dealt with during project creation and persisting settings.
+	* build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java
+
+2003-08-20 Hoda Amer
+	Added testNewExpressions() to CompleteParseASTTest to test new expression's references.
+	
+2003-08-14 John Camelon
+	Removed warnings from AutomatedIntegrationSuite.java (removing implicit accessor generation).
+
+2003-08-14 John Camelon
+	Added CompleteParseASTTest::testArrayModExpression(), testPointerVariable() & 
+	testExceptionSpecification().  
+
+2003-08-13 John Camelon
+	Added testBug41520() to FullParseFailedTests.java.  
+	Added testConstructorChain() to CompleteParseASTTest.java
+
+2003-08-13 John Camelon
+	Added testSimpleExpression(), testParameterExpressions() && 
+	testNestedNamespaceExpression() to CompleteParseASTTest.java.
+	
+2003-08-13 Sean Evoy
+	Renamed the 'AllBuildTest' class to 'ManagedBuildTest' and updated the 
+	integration suite class.
+	* suite/org/eclipse/cdt/core/suite/AutomatedIntegrationSuite.java
+
+	This class is renamed. It also has a renamed method 'testProjectCreation'
+	that creates a project the same way the new project wizard does. It uses
+	the new discovery mechanism to find the scanner info provider.
+	* build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java
+	
+	Uses the new discovery mechanism to find the scanner info provider.
+	* build/org/eclipse/cdt/core/build/managed/tests/StandardBuildTests.java
+
+2003-08-12 Bogdan Gheorghe
+	Changed the order of tests in AutomatedIntegrationSuite to have
+	the indexing tests run last (the last indexing test shuts down
+	the indexing thread).
+	
+2003-08-12 John Camelon
+	Added CompleteParseASTTest::testForewardDeclarationWithUsage(). 
+
+2003-08-12 Hoda Amer
+	Added CompletionProposalsTest to the suit to test the generation 
+	of completion proposals.
+
+2003-08-12 Bogdan Gheorghe
+	- Changed testVariableIndexPrefix, testVariableDeclaration to
+	  reflect changes to the var search pattern
+	
+2003-08-11 Andrew Niefer
+	- Added testMacroPattern to OtherPatternTests
+	- Changed the function tests to use new function/method pattern
+	
+2003-08-11 Bogdan Gheorghe
+	- Added testMacros to IndexManagerTests
+	
+2003-08-05 Andrew Niefer
+	- refactoring Parser Symbol Table function names
+	- added ParserSymbolTableTest.testConstructors() 
+
+2003-08-01 Andrew Niefer
+	Added resources/search/header.h
+	Added ClassDeclarationPatternTests.testHeadersVisitedTwice()
+	Modified other search tests to reflect ICSearchResultCollector changes
+
+2003-07-31 Andrew Niefer
+	Added ParserSymbolTableTest.testForwardClassDeclaration
+	Added ParserSymbolTableTest.testForwardDeclarationUsedAsFunctionParam
+
+2003-07-31 Victor Mozgin
+	Moved testBug39540() from ASTFailedTests.java to QuickParseASTTests.java.
+
+2003-07-30 Hoda Amer
+	The CModelElementsTests has the pointer to function test back in its original place
+	(a variable)
+
+2003-07-30 Sean Evoy
+	* plugin.xml:
+	Updated the attribute names to reflect changes to the ManagedBuildInfo 
+	extension point schema.
+
+2003-07-30 Victor Mozgin
+	Moved testBug39532() from ASTFailedTests.java to QuickParseASTTests.java.
+
+2003-07-29 John Camelon
+	Updated QuickParseASTTests for pointer to function updates.
+	Updated CompleteParseASTTests for typedef work.  
+
+2003-07-28 Victor Mozgin
+	Moved testBug39546() from ASTFailedTests.java to QuickParseASTTests.java.
+
+2008-07-28 Andrew Niefer
+	-changes to resources/search/classDecl.cpp
+	-new search tests:
+		ClassDeclarationPatternTests.testClassReferenceInFieldType
+		ClassDeclarationPatternTests.testClassReferences
+		ClassDeclarationPatternTests.testEnumerationReferenceVisibleByInheritance
+		ClassDeclarationPatternTests.testGloballyQualifiedItem
+		ClassDeclarationPatternTests.testTypeReferenceVisibleByUsingDirective
+		FunctionMethodPatternTests.testMethodDeclaration
+		FunctionMethodPatternTests.testMethodDeclarationWithParams
+		OtherPatternTests.testFieldDeclaration
+		OtherPatternTests.testNamespaceDeclaration
+		OtherPatternTests.testNamespaceReferenceInClassBaseClause
+		OtherPatternTests.testNamespaceReferenceInUsingDirective
+		OtherPatternTests.testVariableDeclaration
+
+2003-07-28 John Camelon
+	Added/moved tests as necessary for bugfix 40842 & 40843. 
+
+2003-07-28 Sean Evoy
+	In order to meet certain internal guidelines and to test the makefile 
+	generator, the build model replied to some answers with hard-coded information. 
+	This patch moves the information into the build model.
+
+ 	* plugin.xml:
+	Added information to the target tags to test inheritence and 
+	overridding the make command and clean command attributes.
+	
+	* build/org/eclipse/cdt/core/build/managed/tests/AllBuildTests.java:
+	Added code to test the make command and clean command attributes in 
+	Targets. Also added a test to insure that sub-sub targets inherit settings 
+	properly.
+	
+2003-07-28 Andrew Niefer
+	This patch creates a new failing test class : FullParseFailedTests.  This 
+	is for writing failed tests on the parser doing COMPLETE_PARSE.
+
+2003-07-28 Victor Mozgin
+	Moved testBug39537() from ASTFailedTests.java to QuickParseASTTests.java.
+
+2003-07-27 John Camelon
+	Fixed failedTests::testBug40714() to fail properly.  
+
+2003-07-25 Bogdan Gheorghe
+	Added new indexer test for refs
+	
+2003-07-25 Victor Mozgin
+	Moved testBug39553() from ASTFailedTests.java to QuickParseASTTests.java.
+	Fixed IIncludeTest.h and IIncludeTests.java with #include macro tests.
+
+2003-07-24 John Camelon
+	Updated CompleteParseASTTests for Method/Field updates.
+	Fixed TortureTest's parser mode switch (was always QuickParsing). 
+
+2003-07-24 Hoda Amer
+	Moved part of the CModelElementsTest (Templates of Variables ) to the failed tests.
+	Moved the same test (Templates of Variables) from ITemplateTests to failed tests.
+	
+2003-07-24 Hoda Amer
+	This patch updates the CModelBuilder to use the AST instead of the DOM. 
+	
+2003-07-24 John Camelon
+	Updated CompleteParseASTTests.
+
+2003-07-23 Andrew Niefer
+	-Created search/BaseSearchTest to handle creating projects and setting them up to use the indexer
+	-removed ClassSpecifierSearchTests, its functionality is now in BaseSearchTest
+	-modified ClassDeclarationPatternTests to extend BaseSearchTest
+	-added FunctionMethodPatternTests
+	-added OtherPatternTests
+	-modified indexer/IndexManagerTests.testIndexContents
+
+2003-07-22 John Camelon
+	Updated CompleteParseASTTests.
+
+2003-07-21 Bogdan Gheorghe
+	Added new indexer test for newly added declarations
+	
+2003-07-21 John Camelon
+	Created CompleteParseASTTest and added it to ParserTestSuite.
+
+2003-07-18 John Camelon
+	Updated ParserSymbolTableTests to remove dependencies on parser.ast.full classes.
+	Updated Parser test suites for updates to ParserFactory.
+
+2003-07-18 John Camelon
+	Wrote new tests in QuickParseASTQualifiedNameTest.java and added it to ParserTestSuite's suite.
+
+2003-07-18 Peter Graves	
+	Removed un-needed file that was using a Java 1.4 reserved keyword (assert)
+	
+2003-07-17 John Camelon
+	Rewrote the entire DOMTests suite to now be AST tests.  
+	Removed DOMTests, BaseDOMTest, DOMFailedTests after methods were migrated to QuickParseASTTests & ASTFailedTests.  
+	Made sure every parser failed test had a defect number associated with it. 
+	
+2003-07-17 Victor Mozgin
+	Added PerformanceTests.java (not included into AutomatedIntegrationSuite).
+	Moved testBug39523() from DOMFailedTest.java to PerformanceTests.java.
+	Moved testBug39550() from DOMFailedTest.java to DOMTests.java.
+	Moved testBug39552A() and testBug39552B()from DOMFailedTest.java to DOMTests.java.
+	TortureTest overrides timeout value for a very time-consuming test ('concat1.C').
+
+2003-07-15 Victor Mozgin
+	Moved testBug39349() from DOMFailedTest.java to DOMTests.java.
+	Moved testBug39544() from DOMFailedTest.java to DOMTests.java.
+
+2003-07-14 Victor Mozgin
+	Added failed tests that correspond to recently reported PRs.
+
+2003-07-11 Bogdan Gheorghe
+	Added ClassSpecifierSearchTest
+	
+2003-07-08 John Camelon
+	Updated IScanner, clients & implementations to use IScannerInfo.  
+
+2003-07-07 John Camelon
+	Update ClassDeclarationPatternTests::testBug39652(). 
+
+2003-07-04 John Camelon
+	Moved testBug39652() from failed search tests to ClassDeclarationPatternTests.
+
+2003-07-04 Andrew Niefer
+	Added new source Folder search
+	Added search/ClassDeclarationPatternTests::testMatchSimpleDeclaration
+	Added search/ClassDeclarationPatternTests::testMatchNamespaceNestedDeclaration
+	Added new resource folder search & containing file classDecl.cpp
+	Added new failures package ord.eclipse.cdt.core.search.failedTests
+	Added new failing test PatternsFailedTests::testBug39652
+	
+	* Note that ClassDeclarationPatternTests and PatternsFailedTests both must be run as plugin tests
+
+2003-07-03 Bogdan Gheorghe
+	Added IndexManagerTest::testAddNewFileToIndex()
+	Added IndexManagerTest::testRemoveProjectFromIndex()
+	Added IndexManagerTest::testRemoveFileFromIndex()
+	
+2003-07-03 Sean Evoy
+	New test suite that exercises the standard make build system including the new
+	IScannerInfoListener and IScannerInfoProvider interfaces.
+
+	Changes to the existing managed build test suite include tests of the new
+	IScannerInfoxxx interface discovery, subscription, and change notification methods. 
+	
+	* build/org/eclipse/cdt/core/build/managed/tests/StandardBuildTests.java
+	* build/org/eclipse/cdt/core/build/managed/tests/AllBuildTests.java
+
+2003-07-02 Victor Mozgin
+	Added DOMTests::testBug39501().
+	Improved filtering of expected failures/inconclusives in TortureTest.
+
+2003-06-30 John Camelon
+	Added DOMTests::testAssignmentExpression()
+	Added PreprocessorConditionalTest to ParserTestSuite.  
+
+2003-06-28 John Camelon
+	Completed Quickparse expression representation.  
+	Updated ExpressionEvaluation and associated tests.  
+
+2003-06-26 John Camelon
+	Update IASTExpression. 
+	Move Parser.Backtrack and Parser.EndOfFile to external interface. 
+
+2003-06-25 John Camelon
+	Added DOMFailedTest::testBug39349(). 
+	Added DOMTests::testBug39348().
+
+2003-06-25 John Camelon
+	Create new interface and support for calculating lineNumber/offset mapping.  
+	Updated IASTClassSpecifier for qualified name query.  
+	Began structuring expressions and declarators in Parser for ISourceElementRequestor.  
+	Updated other packages to use new interfaces.  
+	Updated automatedtests/torture test to use new line number information.  
+
+2003-06-24 John Camelon
+	Updates for ISourceElementRequestor - elaborated types & enumerations.  
+
+2003-06-23 John Camelon
+	Factory/constructor signature updates.  
+
+2003-06-17 Victor Mozgin
+	Added MacroTests.java (invocation in AllCoreTests).
+	Added MacroTests.c to resources.
+
+2003-06-17 Sean Evoy
+	Moved the ManagedBuildInfo extension point from the plugin file in org.eclipse.cdt.ui.tests
+	Added new options to sub target for include paths and preprocessor symbols
+	Added test for IManagedBuildPathInfo
+	* build/org/eclipse/cdt/core/build/managed/tests/AllBuildTests.java
+	
+2003-06-17 Brent Nicolle
+	Added Interface tests of IStructure.java.
+
+2003-06-17 Victor Mozgin
+	Added DeclaratorsTests.java (invocation in AllCoreTests).
+	Added DeclaratorsTests.cpp to org.eclipse.cdt.core.model.tests.resources.
+
+2003-06-16 Victor Mozgin
+	Added testOldKRFunctionDeclarations() to DOMTests.
+	Added testKRFunctionDeclarations() to TranslationUnitTests.
+
+2003-06-16 Vladimir Hirsl
+	Added /build, /parser, /failures and /suite directories to the library. 
+	Copied resources from /model/org.eclipse.cdt.core.model.tests.resources
+	                 to /model/org/clipse/cdt/core/model/tests/resources/cmodel.
+	Added class AISResultPrinter to format test results.  
+	Class AutomatedIntegrationSuite now implements IPlatformRunnable.
+
+2003-06-14 Victor Mozgin
+	Moved testBugSingleton192() from LokiFailures to DOMTests.
+	Added testPointersToMembers() and testPointersToMemberFunctions() to DOMTests.
+	Added testBug36290() and testBug36931() to DOMTests.
+
+2003-06-13 John Camelon
+	Added Class/Base infrastructure to public interfaces & requestor callback. 
+	Moved many internal interfaces to external packages. 
+	Organized imports.  
+
+2003-06-13 Victor Mozgin
+	Renamed NullParserCallback into NullSourceElementRequester in AutomatedFramework.
+
+2003-06-13 John Camelon
+	Merged ParserSymbolTable branch back into HEAD.
+
+2003-06-12 John Camelon
+	Get rest of JUnit tests working, will merge back to HEAD branch.  
+
+2003-06-12 John Camelon
+	Introduction of ASTFactory strategy, some restructuring of packages and interfaces.
+	
+2003-06-11 Victor Mozgin
+	Old Java TestCase.txt and TestCase2.txt for partioning testing have been replaced with C/C++ files.
+	Modified AutomatedIntegrationSuite.java so it doesn't produce JUnit warning anymore.
+	All tests in org.eclipse.cdt.ui.tests should pass now.
+
+3003-06-11 Peter Graves
+    Update the test.xml to get the location of org.eclipse.test from a property
+    if set. If the property is not set, it will default to the old value.
+    
+2003-06-11 Victor Mozgin
+	Added TortureTest to test CDT C++ parser with GCC testsuites.
+	GCC testsuites are not included.
+
+2003-06-10 John Camelon
+	Futher pursuit of the golden hammer, symbol table integration. 
+
+2003-06-10 Brent Nicolle
+	Added some Interface tests of (IInclude, IMacro, IStructure).
+	Made sure all the Test Suites have names in the JUnit hierarchy.
+
+2003-06-09 John Camelon
+	First step in replacing IParserCallback with ISourceElementRequestor.  
+	
+2003-06-09 Victor Mozgin
+	Moved testBug36769() from ACEFailedTest.java to DOMTests.java.
+	Removed ACEFailedTest.java as it is empty now.
+	Added DOMTests.testBug36769B(). 
+
+2003-06-09 Victor Mozgin
+	Moved testBug36932() from DOMFailedTest.java to DOMTests.java.
+	Added DOMTests.testBug36932B() and DOMTests.testBug36932C(). 
+
+2003-06-09 Victor Mozgin
+	Moved testBug36701() from ScannerFailedTests.java to ScannerTestCase.java.
+	Renamed it to testBug36701A() and fixed it.
+	Added ScannerTestCase.testBug36701B().
+
+2003-06-07 Victor Mozgin
+	Moved testBug36766A(), testBug36766B() & testBug36766C() from STLFailedTests.java to DOMTests.java.
+	Renamed them to testBug36766and36769x(), as they cover both PRs.
+	Added testBug36766and36769D() - test for templated destructor.
+
+2003-06-05 John Camelon
+	Moved testBug23478A() & testBug23478B() from failed tests to TranslationUnitTests.java.
+	Removed TranslationUnitFailedTests.java as it was empty. 
+
+2003-05-29 Andrew Niefer
+	Modified tests to support eType & PtrOp changes in core
+	Added ParserSymbolTableTest::testTemplateParameterAsParent
+	Added ParserSymbolTableTest::testTemplateInstanceAsParent
+	Added ParserSymbolTableTest::testTemplateParameterDefaults
+	Added ParserSymbolTableTest::testTemplateParameterAsFunctionArgument
+	started ParserSymbolTableTest::incompletetestTemplateSpecialization
+
+2003-05-26 John Camelon
+	Rollback PST/Parser integration.
+
+2003-05-13 Andrew Niefer	
+	Modified ParserSymbolTableTest to use new interface
+
+2003-05-08 Andrew Niefer
+	Added ParserSymbolTableTest::testMarkRollback
+
+2003-05-06 John Camelon
+	Further integration of SymbolTable into Parser, some refactoring. 
+
+2003-05-05 John Camelon/Andrew Niefer
+	Added CrossReferenceTests to ParserTestSuite to test symbol-table/DOM interworking.
+
+2003-05-05 Andrew Niefer
+	Rewrote ParserSymbolTableTest to reflect structural changes to the symbol table.
+
+2003-05-01 Andrew Niefer
+	Updated FractionalAutomatedTest to use threads
+	Modified ScannerTestCase::testBug36287
+	Added ScannerTestCase::testBug37011
+	Added ScannerTestCase::testOtherPreprocessorDefines
+
+2003-04-28 John Camelon
+	Moved testBug36730() & testBug37019() from DOMFailedTests to DOMTests.
+
+2003-04-28 Andrew Niefer
+	Added DOMFailedTest::testBug37019
+	Added DOMFailedTest::testBug36932
+	Added ScannerFailedTest::testBug37011
+
+2003-04-28 John Camelon
+	Added DOMTests::testOrder().  
+
+2003-04-28 Peter Graves
+	* model/org/eclipse/cdt/core/model/tests/BinaryTests:
+	Updated to remove a few small errors, and deal with some changes
+	to the core CDT
+	 
+2003-04-27 John Camelon
+	Added testBug36932() to DOMTests. 
+	Moved testBugFunctor758() from LokiFailures to DOMTests.
+	Moved testBug36704() from DOMFailedTest to DOMTests.  
+	Moved testBug36699() from DOMFailedTest to DOMTests.  
+	Moved testBug36691() from DOMFailedTest to DOMTests.  
+
+2003-04-25 Andrew Niefer
+	Moved ACEFailedTest::testBug36771 to DOMTests
+	Moved DOMFailedTest::testBug36714 to DOMTests
+	Updated ScannerTestCase::testBug36816
+	
+2003-04-25 John Camelon
+	Added DOMTests::testBug36852(). 
+	Added DOMTests::testBug36764().
+	Moved DOMFailedTests::testBug36702() to DOMTests(). 
+
+2003-04-24 John Camelon
+	Moved fixed tests from FailedTests to DOMTests. 
+	Added DOMTests::testBug36799().
+	Cleaned up tests to reduce amount of code necessary to maintain these things. 
+
+2003-04-24 John Camelon
+	Moved fixed tests from FailedTests to DOMTests. 
+	Added LokiFailures.java to failed tests directory.
+
+2003-04-24 Andrew Niefer
+	Added AutomatedFramework.java
+	Added FractionalAutomatedTest (which derives from AutomatedFramework)
+	Refactored AutomatedTest to derive from AutomatdFramework
+	Added ScannerTestCase.testBug36816
+	Added ScannerTestCase.testBug36255	
+
+2003-04-24 John Camelon
+	Fixed Java 1.3 compliance issue w/AutomatedTest.java
+	Fixed False failure in HelloWorld.java.  
+
+2003-04-21 John Camelon
+	Updated DOMTests::testBug36247(). 
+	Moved testBug36692(), testBug36703(), testBug36708(), testBug36707(), testBug36689()
+	and testBug36690() from DOMFailedTests to DOMTests and updated them. 
+
+2003-04-20 John Camelon
+	Added DOMTests::testBug36551().
+	Adjusted AutomatedTest to turn on line numbering. 
+	Added DOMFailedTests and 11 failed test cases.  
+
+2003-04-17 Andrew Niefer
+	Added ScannerTestCase::testBug36695()
+	Moved ScannerFailedTest::testBug36521 to ScannerTestCase::testBug36521()
+	Moved ScannerFailedTest::testBug36509 to ScannerTestCase::testBug36509()
+	Moved ScannerFailedTest::testBug36475 to ScannerTestCase::testBug36475() 
+	Updated ScannerTestCase::testBug36047
+	Updated ScannerTestCase::testBug36045
+
+2003-04-17 John Camelon
+	Updated DOMTests::testBug36600().
+	Updated LineNumberTest::testDOMLineNos().  
+	Added DOMTests::testBug36559().  
+
+2003-04-17 Andrew Niefer
+	Added AutomatedTest
+	Added resources.cFiles
+	Added resources.cppFiles
+
+2003-04-16 John Camelon
+	Added DOMTests::testBug36532().
+	Added DOMTests::testBug36432(). 
+	Added DOMTests::testBug36594().
+	Added DOMTests::testBug36600(). 
+	Added DOMTests::testArrayOfPointerToFunctions(). 
+
+2003-04-15 John Camelon
+	Added ScannerTestCase::testBug36434().
+	Added ScannerTestCase::testMultipleLines(). 
+	Added ParserTestSuite. 
+	Added LineNumberTest.
+	Updated CModelElementsTests to set the Nature of the C++ project appropriately.
+
+2003-04-15 Andrew Niefer
+	Moved ScannerFailedTest::testBug36047 to ScannerTestCase::testBug36047
+	Added ScannerFailedTest::testBug36475
+
+2003-04-13 John Camelon
+	Added DOMTests::testPointersToFunctions.  
+
+2003-04-11 John Camelon
+	Added DOMTests::testBug36247().  
+
+2003-04-11 Andrew Niefer
+	Moved ScannerFailedTest::testBug36316 to ScannerTestCase::testBug36316
+	Added ScannerFailedTest::testBug36047
+	Added ScannerTestCase::testNestedRecursiveDefines
+
+2003-04-10 John Camelon
+	Added DOMTests::testBug36237().
+
+2003-04-09 John Camelon
+	Removed all the old Code Model Builder source that was no longer being used (NewModelBuilder.java, etc.). 
+	Moved all the files in parser.util directory to the dom.  
+	Organized imports. 
+	Added DOMTests::testTemplateDeclarationOfMethod().
+	Added DOMTests::testBug36250().  
+	Added DOMTests::testBug36240(). 
+	Added DOMTests::testBug36254().
+
+2003-04-09 John Camelon
+	Updated ScannerTest::testBug36045().
+	Added ScannerTest::testBug36287().
+	Added DOMTests::testBug36288(). 
+
+2003-04-06 Andrew Niefer
+	Added ParserSymbolTableTest::testOverloadRanking()
+
+2003-04-04 Alain Magloire
+	* src/org/eclipse/cdt/testplugin/util/VerifyDialog.java:
+	Remove some warnings.
+
+2003-04-03 John Camelon
+	Updated ScannerTest::testSimpleIfdef() for bug36019.  
+	Updated ScannerTest::testNumerics() for bug36020.  
+	Added ScannerTest::testBug36045().  
+	Updated DOMTests::testTemplateDeclaration() for template grammar updates.  
+
+2003-04-01 Andrew Niefer
+	ParserSymbolTableTest. modifications to using declaration tests to reflect changes in the
+	symbol table.  Also added testUserDefinedConversionSequences()
+
+2003-04-01 John Camelon
+	Added testBug35906() to DOMTests.
+
+2003-03-31 John Camelon
+	Added testStruct() to DOMTests.  
+	Added test35892()to ScannerTest. 
+
+2003-03-31 Andrew Niefer
+	In ParserSymbolTableTest, renamed testFunctionResolution_2() to testFunctionResolution_PointersAndBaseClasses(),
+	and modified to reflect changes in function resolution.  
+	Added testFunctionResolution_TypedefsAndPointers().
+	
+2003-03-31 John Camelon
+	Added testWeirdStrings() and testNumerics() to ScannerTestCase. 
+	Added testTemplateSpecialization(), testTemplateDeclaration(), testBug26467(), 
+	  testTypedef() and testTemplateInstantiation() to DOMTests.
+
+2003-03-28 John Camelon
+	Added testConstructorChain() and testASMDefinition() to DOMTests.
+
+2003-03-27 Alain Magloire
+	Changes were done in the Core Model API, the hierarchy is now
+	ICModel
+		ICProject
+			ICContainer
+				ITranslationUnit
+				IArchive
+				IBinary
+	We adjust the tests.
+	* model/org/eclipse/cdt/core/model/tests/ArchiveTests.java
+	* model/org/eclipse/cdt/core/model/tests/BinaryTests.java
+	* model/org/eclipse/cdt/core/model/tests/TranslationUniTests.java
+	* model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
+
+2003-03-26 Andrew Niefer
+	In ParserSymbolTableTest : 
+		updated all tests to reflect TypeInfo changes
+		Added testFunctionResolution() & testFunctionResolution_2() in
+
+2003-03-25 John Camelon
+	Added testDeclSpecifier(), testNamespaceDefinition(), testLinkageSpecification(), 
+	testUsingClauses() and testEnumSpecifier() to DOMTests.
+
+2003-03-23 John Camelon
+	Added ptrOperator() test to DOMTests.  
+	Added testFunctionModifiers() test to DOMTests.
+	Added testArrays() test to DOMTests.
+
+2003-03-20 Alain Magloire
+
+	Patch from Amer Hoda, tests for the CElement deltas for Translation Units.
+	* model/org/eclipse/cdt/core/model/tests/ElementDeltaTest.java
+	* model/org/eclipse/cdt/core/model/tests/resource/WorkingCopyTestStart.h
+	
+2003-03-19 Alain Magloire
+	Patch from Amer Hoda, introducing a simple test for the core model.
+	* model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
+	* model/org/eclipse/cdt/core/model/tests/resource/WorkingCopyTestStart.h
+
+2003-03-18 John Camelon
+	Updated DOMTests to validate simple case of a function declaration with multiple parameters.  
+	* parser/org/eclipse/cdt/core/parser/tests/DOMTests.java
+
+2003-03-11 John Camelon
+	Updated DOMTests for core.internal.parser change of merging DeclarationSpecifier and DeclSpecifier
+	Organized imports
+	* parser/org/eclipse/cdt/core/parser/tests/DOMTests.java
+	* parser/org/eclipse/cdt/core/parser/tests/ParserSymbolTableTest.java
+
+2003-03-10 John Camelon
+	Added macro pasting tests
+
+2003-03-06 Andrew Niefer
+	Added tests for exercising Namespaces & using directives in new parser's symbol table
+
+2003-03-04 Doug Schaefer
+	This is a pretty big patch, but it is the merge of the NewParser1 branch into the HEAD branch.  lder "parser") 
+	JUnit tests for testing various pieces (source folder "parser" in cdt.ui.tests. 
+
+2003-01-29 Peter Graves
+
+    Fixed the warnings when accessing static methods
+    * src/org/eclipse/cdt/testplugin/util/DialogCheck.java:
+    * src/org/eclipse/cdt/testplugin/CTestPlugin.java
+    * src/org/eclipse/cdt/testplugin/TestWorkbench.java
+    * ChangeLog: make all entries have the same formatting
+
+2002-12-17 Peter Graves
+
+    * plugin.xml,test.xml: Some simple cleanups to remove refrences to the jdt and
+	to move closer to automated running
+    
+2002-11-27 Alain Magloire
+
+	* model/org/eclipse/cdt/core/model/tests/CModelTests.java:
+	Use CoreModel.getDefault().
+
+2002-10-30 Alain Magloire
+
+	* model/org/eclipse/cdt/core/model/tests/CModelTests.java (testGetNatureID):
+	The fields and the methods use in this test was removed from the CoreModel class.
+	(testHasNature): The method use in this case was refactor in the classes
+	CProjectNature and CCProjectNature, fix the test.
+
+2002-10-18 Peter Graves
+
+	src/org/eclipse/cdt/testplugin/CProjectHelper.jada
+    Cleanup of the CProjectHelper file to remove unused imports, commeted out code etc.
+    
+=======
+2003-04-21 Andrew Niefer
+	Added DOMFailedTests::testBug36713()
+	Added DOMFailedTests::testBug36714()
+	Added DOMFailedTests::testBug36717()
+	Added DOMFailedTests::testBug36730()
+
+2003-04-21 Andrew Niefer
+	Added ScannerTestCase::testBug36695()
+	Moved ScannerFailedTest::testBug36521 to ScannerTestCase::testBug36521()
+	Moved ScannerFailedTest::testBug36509 to ScannerTestCase::testBug36509()
+	Moved ScannerFailedTest::testBug36475 to ScannerTestCase::testBug36475() 
+	Updated ScannerTestCase::testBug36047
+	Updated ScannerTestCase::testBug36045
+
+2003-04-20 John Camelon
+	Added DOMTests::testBug36551().
+	Adjusted AutomatedTest to turn on line numbering. 
+	Added DOMFailedTests and 11 failed test cases.  
+
+2003-04-17 John Camelon
+	Updated DOMTests::testBug36600().
+	Updated LineNumberTest::testDOMLineNos().  
+	Added DOMTests::testBug36559().  
+
+2003-04-17 Andrew Niefer
+	Added AutomatedTest
+	Added resources.cFiles
+	Added resources.cppFiles
+
+2003-04-16 John Camelon
+	Added DOMTests::testBug36532().
+	Added DOMTests::testBug36432(). 
+	Added DOMTests::testBug36594().
+	Added DOMTests::testBug36600(). 
+	Added DOMTests::testArrayOfPointerToFunctions(). 
+
+2003-04-15 John Camelon
+	Added ScannerTestCase::testBug36434().
+	Added ScannerTestCase::testMultipleLines(). 
+	Added ParserTestSuite. 
+	Added LineNumberTest.
+	Updated CModelElementsTests to set the Nature of the C++ project appropriately.
+
+2003-04-15 Andrew Niefer
+	Moved ScannerFailedTest::testBug36047 to ScannerTestCase::testBug36047
+	Added ScannerFailedTest::testBug36475
+
+2003-04-13 John Camelon
+	Added DOMTests::testPointersToFunctions.  
+
+2003-04-11 John Camelon
+	Added DOMTests::testBug36247().  
+
+2003-04-11 Andrew Niefer
+	Moved ScannerFailedTest::testBug36316 to ScannerTestCase::testBug36316
+	Added ScannerFailedTest::testBug36047
+	Added ScannerTestCase::testNestedRecursiveDefines
+
+2003-04-10 John Camelon
+	Added DOMTests::testBug36237().
+
+2003-04-09 John Camelon
+	Removed all the old Code Model Builder source that was no longer being used (NewModelBuilder.java, etc.). 
+	Moved all the files in parser.util directory to the dom.  
+	Organized imports. 
+	Added DOMTests::testTemplateDeclarationOfMethod().
+	Added DOMTests::testBug36250().  
+	Added DOMTests::testBug36240(). 
+	Added DOMTests::testBug36254().
+
+2003-04-09 John Camelon
+	Updated ScannerTest::testBug36045().
+	Added ScannerTest::testBug36287().
+	Added DOMTests::testBug36288(). 
+
+2003-04-06 Andrew Niefer
+	Added ParserSymbolTableTest::testOverloadRanking()
+
+2003-04-04 Alain Magloire
+	* src/org/eclipse/cdt/testplugin/util/VerifyDialog.java:
+	Remove some warnings.
+
+2003-04-03 John Camelon
+	Updated ScannerTest::testSimpleIfdef() for bug36019.  
+	Updated ScannerTest::testNumerics() for bug36020.  
+	Added ScannerTest::testBug36045().  
+	Updated DOMTests::testTemplateDeclaration() for template grammar updates.  
+
+2003-04-01 Andrew Niefer
+	ParserSymbolTableTest. modifications to using declaration tests to reflect changes in the
+	symbol table.  Also added testUserDefinedConversionSequences()
+
+2003-04-01 John Camelon
+	Added testBug35906() to DOMTests.
+
+2003-03-31 John Camelon
+	Added testStruct() to DOMTests.  
+	Added test35892()to ScannerTest. 
+
+2003-03-31 Andrew Niefer
+	In ParserSymbolTableTest, renamed testFunctionResolution_2() to testFunctionResolution_PointersAndBaseClasses(),
+	and modified to reflect changes in function resolution.  
+	Added testFunctionResolution_TypedefsAndPointers().
+	
+2003-03-31 John Camelon
+	Added testWeirdStrings() and testNumerics() to ScannerTestCase. 
+	Added testTemplateSpecialization(), testTemplateDeclaration(), testBug26467(), 
+	  testTypedef() and testTemplateInstantiation() to DOMTests.
+
+2003-03-28 John Camelon
+	Added testConstructorChain() and testASMDefinition() to DOMTests.
+
+2003-03-27 Alain Magloire
+	Changes were done in the Core Model API, the hierarchy is now
+	ICModel
+		ICProject
+			ICContainer
+				ITranslationUnit
+				IArchive
+				IBinary
+	We adjust the tests.
+	* model/org/eclipse/cdt/core/model/tests/ArchiveTests.java
+	* model/org/eclipse/cdt/core/model/tests/BinaryTests.java
+	* model/org/eclipse/cdt/core/model/tests/TranslationUniTests.java
+	* model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
+
+2003-03-26 Andrew Niefer
+	In ParserSymbolTableTest : 
+		updated all tests to reflect TypeInfo changes
+		Added testFunctionResolution() & testFunctionResolution_2() in
+
+2003-03-25 John Camelon
+	Added testDeclSpecifier(), testNamespaceDefinition(), testLinkageSpecification(), 
+	testUsingClauses() and testEnumSpecifier() to DOMTests.
+
+2003-03-23 John Camelon
+	Added ptrOperator() test to DOMTests.  
+	Added testFunctionModifiers() test to DOMTests.
+	Added testArrays() test to DOMTests.
+
+2003-03-20 Alain Magloire
+
+	Patch from Amer Hoda, tests for the CElement deltas for Translation Units.
+	* model/org/eclipse/cdt/core/model/tests/ElementDeltaTest.java
+	* model/org/eclipse/cdt/core/model/tests/resource/WorkingCopyTestStart.h
+	
+2003-03-19 Alain Magloire
+	Patch from Amer Hoda, introducing a simple test for the core model.
+	* model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
+	* model/org/eclipse/cdt/core/model/tests/resource/WorkingCopyTestStart.h
+
+2003-03-18 John Camelon
+	Updated DOMTests to validate simple case of a function declaration with multiple parameters.  
+	* parser/org/eclipse/cdt/core/parser/tests/DOMTests.java
+
+2003-03-11 John Camelon
+	Updated DOMTests for core.internal.parser change of merging DeclarationSpecifier and DeclSpecifier
+	Organized imports
+	* parser/org/eclipse/cdt/core/parser/tests/DOMTests.java
+	* parser/org/eclipse/cdt/core/parser/tests/ParserSymbolTableTest.java
+
+2003-03-10 John Camelon
+	Added macro pasting tests
+
+2003-03-06 Andrew Niefer
+	Added tests for exercising Namespaces & using directives in new parser's symbol table
+
+2003-03-04 Doug Schaefer
+	This is a pretty big patch, but it is the merge of the NewParser1 branch into the HEAD branch.  lder "parser") 
+	JUnit tests for testing various pieces (source folder "parser" in cdt.ui.tests. 
+
+2003-01-29 Peter Graves
+
+    Fixed the warnings when accessing static methods
+    * src/org/eclipse/cdt/testplugin/util/DialogCheck.java:
+    * src/org/eclipse/cdt/testplugin/CTestPlugin.java
+    * src/org/eclipse/cdt/testplugin/TestWorkbench.java
+    * ChangeLog: make all entries have the same formatting
+
+2002-12-17 Peter Graves
+
+    * plugin.xml,test.xml: Some simple cleanups to remove refrences to the jdt and
+	to move closer to automated running
+    
+2002-11-27 Alain Magloire
+
+	* model/org/eclipse/cdt/core/model/tests/CModelTests.java:
+	Use CoreModel.getDefault().
+
+2002-10-30 Alain Magloire
+
+	* model/org/eclipse/cdt/core/model/tests/CModelTests.java (testGetNatureID):
+	The fields and the methods use in this test was removed from the CoreModel class.
+	(testHasNature): The method use in this case was refactor in the classes
+	CProjectNature and CCProjectNature, fix the test.
+
+2002-10-18 Peter Graves
+
+	src/org/eclipse/cdt/testplugin/CProjectHelper.jada
+    Cleanup of the CProjectHelper file to remove unused imports, commeted out code etc.
+    
diff --git a/results/plugins/org.eclipse.cdt.core.tests/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.cdt.core.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..00c33ad
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,45 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.cdt.core.tests
+Bundle-SymbolicName: org.eclipse.cdt.core.tests; singleton:=true
+Bundle-Version: 5.1.2.qualifier
+Bundle-Activator: org.eclipse.cdt.core.testplugin.CTestPlugin
+Export-Package: org.eclipse.cdt.core.cdescriptor.tests,
+ org.eclipse.cdt.core.internal.errorparsers.tests;x-internal:=true,
+ org.eclipse.cdt.core.internal.index.provider.test;x-internal:=true,
+ org.eclipse.cdt.core.internal.tests;x-internal:=true,
+ org.eclipse.cdt.core.language,
+ org.eclipse.cdt.core.model.tests,
+ org.eclipse.cdt.core.parser.tests,
+ org.eclipse.cdt.core.parser.tests.ast2,
+ org.eclipse.cdt.core.parser.tests.prefix,
+ org.eclipse.cdt.core.parser.tests.rewrite,
+ org.eclipse.cdt.core.parser.tests.rewrite.astwriter,
+ org.eclipse.cdt.core.parser.tests.rewrite.changegenerator,
+ org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.append,
+ org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.insertbefore,
+ org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove,
+ org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace,
+ org.eclipse.cdt.core.parser.tests.rewrite.comenthandler,
+ org.eclipse.cdt.core.parser.tests.scanner,
+ org.eclipse.cdt.core.settings.model,
+ org.eclipse.cdt.core.suite,
+ org.eclipse.cdt.core.testplugin,
+ org.eclipse.cdt.core.testplugin.util,
+ org.eclipse.cdt.core.tests,
+ org.eclipse.cdt.core.tests.templateengine,
+ org.eclipse.cdt.core.winreg.tests,
+ org.eclipse.cdt.internal.index.tests;x-internal:=true,
+ org.eclipse.cdt.internal.pdom.tests;x-internal:=true
+Require-Bundle: org.eclipse.core.resources,
+ org.eclipse.cdt.core,
+ org.junit,
+ org.eclipse.core.runtime,
+ org.eclipse.ui.ide,
+ org.eclipse.ui,
+ org.eclipse.jface.text,
+ org.eclipse.core.filesystem,
+ org.eclipse.ltk.core.refactoring;bundle-version="3.4.0"
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: Eclipse CDT
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/results/plugins/org.eclipse.cdt.core.tests/META-INF/eclipse.inf b/results/plugins/org.eclipse.cdt.core.tests/META-INF/eclipse.inf
new file mode 100644
index 0000000..0f2f8fd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/META-INF/eclipse.inf
@@ -0,0 +1 @@
+pack200.args = -E4
diff --git a/results/plugins/org.eclipse.cdt.core.tests/about.html b/results/plugins/org.eclipse.cdt.core.tests/about.html
new file mode 100644
index 0000000..9c7ba0a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/about.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head>
+
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>May 2, 2006</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/build.properties b/results/plugins/org.eclipse.cdt.core.tests/build.properties
new file mode 100644
index 0000000..4f0b687
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/build.properties
@@ -0,0 +1,35 @@
+###############################################################################
+#  Copyright (c) 2005, 2009 IBM Corporation and others.
+#  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
+# 
+#  Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+bin.includes = plugin.xml,\
+               about.html,\
+               .,\
+               test.xml,\
+               resources/,\
+               META-INF/,\
+               parser/org/eclipse/cdt/internal/index/tests/,\
+               parser/org/eclipse/cdt/internal/pdom/tests/,\
+               parser/org/eclipse/cdt/core/parser/tests/ast2/,\
+               parser/org/eclipse/cdt/core/parser/tests/scanner/,\
+               parser/org/eclipse/cdt/core/parser/tests/prefix/
+
+output.. = bin/
+source.. = model/,\
+           parser/,\
+           suite/,\
+           misc/,\
+           regression/,\
+           templateengine/
+
+jre.compilation.profile=J2SE-1.5
+javacSource=1.5
+javacTarget=1.5
+src.includes = about.html
+                          
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/cdescriptor/tests/CDescriptorOldTests.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/cdescriptor/tests/CDescriptorOldTests.java
new file mode 100644
index 0000000..90a7afe
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/cdescriptor/tests/CDescriptorOldTests.java
@@ -0,0 +1,404 @@
+/**********************************************************************
+ * Copyright (c) 2004, 2008 QNX Software Systems Ltd and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems Ltd - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *     James Blackburn (Broadcom Corp)
+ ***********************************************************************/
+
+package org.eclipse.cdt.core.cdescriptor.tests;
+
+import junit.extensions.TestSetup;
+import junit.framework.Assert;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.CDescriptorEvent;
+import org.eclipse.cdt.core.CProjectNature;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.core.ICDescriptorListener;
+import org.eclipse.cdt.core.ICDescriptorOperation;
+import org.eclipse.cdt.core.ICExtensionReference;
+import org.eclipse.cdt.core.ICOwnerInfo;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.internal.core.pdom.PDOMManager;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * This class exists because the tests in CDescriptorTests
+ * are not fixed.
+ * This class corresponds to the version of 
+ * CDescrptorTests before the changes made in cdt.core 5.1
+ * (CVS version 1.12)
+ */
+public class CDescriptorOldTests extends TestCase {
+
+	static String projectId = CTestPlugin.PLUGIN_ID + ".TestProject";
+	static IProject fProject;
+	static CDescriptorListener listener = new CDescriptorListener();
+	static CDescriptorEvent fLastEvent;
+
+	/**
+	 * Constructor for CDescriptorTest.
+	 * 
+	 * @param name
+	 */
+	public CDescriptorOldTests(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(CDescriptorOldTests.class.getName());
+
+		suite.addTest(new CDescriptorOldTests("testDescriptorCreation"));
+		suite.addTest(new CDescriptorOldTests("testDescriptorOwner"));
+		suite.addTest(new CDescriptorOldTests("testExtensionCreation"));
+		suite.addTest(new CDescriptorOldTests("testExtensionGet"));
+		suite.addTest(new CDescriptorOldTests("testExtensionData"));
+		suite.addTest(new CDescriptorOldTests("testExtensionRemove"));
+		suite.addTest(new CDescriptorOldTests("testProjectDataCreate"));
+		suite.addTest(new CDescriptorOldTests("testProjectDataDelete"));
+		suite.addTest(new CDescriptorOldTests("testConcurrentDescriptorCreation"));
+		suite.addTest(new CDescriptorOldTests("testConcurrentDescriptorCreation2"));
+		suite.addTest(new CDescriptorOldTests("testDeadlockDuringProjectCreation"));
+		suite.addTest(new CDescriptorOldTests("testProjectStorageDelete"));
+		
+		TestSetup wrapper = new TestSetup(suite) {
+
+			@Override
+			protected void setUp() throws Exception {
+				oneTimeSetUp();
+			}
+
+			@Override
+			protected void tearDown() throws Exception {
+				oneTimeTearDown();
+			}
+
+		};
+		return wrapper;
+	}
+
+	private static void addNatureToProject(IProject proj, String natureId, IProgressMonitor monitor) throws CoreException {
+		IProjectDescription description = proj.getDescription();
+		String[] prevNatures = description.getNatureIds();
+		String[] newNatures = new String[prevNatures.length + 1];
+		System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
+		newNatures[prevNatures.length] = natureId;
+		description.setNatureIds(newNatures);
+		proj.setDescription(description, monitor);
+	}
+
+	static public class CDescriptorListener implements ICDescriptorListener {
+
+		public void descriptorChanged(CDescriptorEvent event) {
+			fLastEvent = event;
+		}
+	}
+
+	static void oneTimeSetUp() throws Exception {
+		CTestPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+
+			public void run(IProgressMonitor monitor) throws CoreException {
+				IWorkspaceRoot root = CTestPlugin.getWorkspace().getRoot();
+				IProject project = root.getProject("testDescriptorProject");
+				if (!project.exists()) {
+					project.create(null);
+				} else {
+					project.refreshLocal(IResource.DEPTH_INFINITE, null);
+				}
+				if (!project.isOpen()) {
+					project.open(null);
+				}
+				CCorePlugin.getDefault().getCDescriptorManager().addDescriptorListener(listener);
+				if (!project.hasNature(CProjectNature.C_NATURE_ID)) {
+					addNatureToProject(project, CProjectNature.C_NATURE_ID, null);
+				}
+				fProject = project;
+			}
+		}, null);
+	}
+
+	static void oneTimeTearDown() throws Exception {
+		fProject.delete(true, true, null);
+	}
+
+	public void testDescriptorCreation() throws Exception {
+		CTestPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+
+			public void run(IProgressMonitor monitor) throws CoreException {
+				CCorePlugin.getDefault().mapCProjectOwner(fProject, projectId, false);
+			}
+		}, null);
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+
+		Assert.assertNotNull(fLastEvent);
+		Assert.assertEquals(fLastEvent.getDescriptor(), desc);
+		Assert.assertEquals(fLastEvent.getType(), CDescriptorEvent.CDTPROJECT_ADDED);
+		Assert.assertEquals(fLastEvent.getFlags(), 0);
+		fLastEvent = null;
+
+		Assert.assertEquals(fProject, desc.getProject());
+		Assert.assertEquals("*", desc.getPlatform());
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=185930
+	public void testConcurrentDescriptorCreation() throws Exception {
+		fProject.close(null);
+		fProject.open(null);
+		Thread t= new Thread() {
+			@Override
+			public void run() {
+				try {
+					CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+				} catch (CoreException exc) {
+				}
+			}
+		};
+		t.start();
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		t.join();
+		
+		Element data = desc.getProjectData("testElement0");
+		data.appendChild(data.getOwnerDocument().createElement("test"));
+		desc.saveProjectData();
+		fLastEvent = null;
+ 	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=185930
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=193503
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=196118
+	public void testConcurrentDescriptorCreation2() throws Exception {
+		int lastLength = 0;
+		for (int i=0; i<200; ++i) {
+			final int indexi = i;
+			PDOMManager pdomMgr= (PDOMManager)CCorePlugin.getIndexManager();
+			pdomMgr.shutdown();
+			fProject.close(null);
+			fProject.open(null);
+			pdomMgr.startup().schedule();
+			ICDescriptor desc= CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+			if (lastLength == 0)
+				lastLength = countChildElements(desc.getProjectData("testElement"));
+			final Throwable[] exception= new Throwable[10];
+			Thread[] threads= new Thread[10];
+			for (int j = 0; j < 10; j++) {
+				final int indexj = j;
+				Thread t= new Thread() {
+					@Override
+					public void run() {
+						try {
+							ICDescriptorOperation operation= new ICDescriptorOperation() {
+								public void execute(ICDescriptor descriptor, IProgressMonitor monitor) throws CoreException {
+									assertFalse(descriptor.getConfigurationDescription().isReadOnly());
+									Element data = descriptor.getProjectData("testElement");
+									String test = "test"+(indexi*10 + indexj);
+									data.appendChild(data.getOwnerDocument().createElement(test));
+									assertFalse(descriptor.getConfigurationDescription().isReadOnly());
+									// BUG196118 the model cached in memory doesn't reflect the contents of .cproject
+									//
+									// descriptor.saveProjectData() doesn't actually save despite what the API says
+									// see CConfigBasedDescriptor.fApplyOnChange
+//									((CConfigBasedDescriptor)descriptor).apply(false);
+//									System.out.println("Saved " + test);
+								}};
+								CCorePlugin.getDefault().getCDescriptorManager().runDescriptorOperation(fProject, operation, null);
+								ICDescriptor descriptor = CCorePlugin.getDefault().getCDescriptorManager().getDescriptor(fProject);
+								// perform apply outside descriptor operation to avoid deadlock - http://bugs.eclipse.org/241288 
+								descriptor.saveProjectData();
+						} catch (Throwable exc) {
+							exception[indexj]= exc;
+							exc.printStackTrace();
+						}
+					}
+				};
+				t.start();
+				threads[j] = t;
+			}
+			for (int j = 0; j < threads.length; j++) {
+				if (threads[j] != null) {
+					threads[j].join();
+				}
+				assertNull("Exception occurred: "+exception[j], exception[j]);
+			}
+			desc= CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+			int lengthAfter = countChildElements(desc.getProjectData("testElement"));
+			lastLength += threads.length; // Update last lengths to what we expect
+			assertEquals("Iteration count: " + i, lastLength, lengthAfter);
+
+			fLastEvent = null;
+		}
+	}
+
+	/**
+	 * Count the number of Node.ELEMENT_NODE elements which are a 
+	 * direct descendent of the parent Element.
+	 * Other nodes (e.g. Text) are ignored
+	 * @param parent
+	 * @return
+	 */
+	private int countChildElements(Element parent) {
+		int numElements = 0;
+		NodeList childNodes = parent.getChildNodes();
+		for (int k = 0 ; k < childNodes.getLength() ; k++)
+			if (childNodes.item(k).getNodeType() == Node.ELEMENT_NODE)
+				numElements ++;
+		return numElements;
+	}
+
+	public void testDeadlockDuringProjectCreation() throws Exception {
+		for (int i=0; i < 10; ++i) {
+			oneTimeTearDown();
+			oneTimeSetUp();
+			Thread t= new Thread() {
+				@Override
+				public void run() {
+					try {
+						ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+						Element data = desc.getProjectData("testElement0");
+						data.appendChild(data.getOwnerDocument().createElement("test"));
+						desc.saveProjectData();
+					} catch (CoreException exc) {
+					}
+				}
+			};
+			t.start();
+
+			ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+			Element data = desc.getProjectData("testElement0");
+			data.appendChild(data.getOwnerDocument().createElement("test"));
+			desc.saveProjectData();
+			t.join();
+			
+			fLastEvent = null;
+		}
+ 	}
+
+	public void testDescriptorOwner() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		ICOwnerInfo owner = desc.getProjectOwner();
+		Assert.assertEquals(projectId, owner.getID());
+		Assert.assertEquals("*", owner.getPlatform());
+		Assert.assertEquals("C/C++ Test Project", owner.getName());
+	}
+
+	public void testDescriptorConversion() {
+
+	}
+
+	public void testExtensionCreation() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		ICExtensionReference extRef = desc.create("org.eclipse.cdt.testextension", "org.eclipse.cdt.testextensionID");
+
+		Assert.assertNotNull(fLastEvent);
+		Assert.assertEquals(fLastEvent.getDescriptor(), desc);
+		Assert.assertEquals(fLastEvent.getType(), CDescriptorEvent.CDTPROJECT_CHANGED);
+		Assert.assertEquals(fLastEvent.getFlags(), CDescriptorEvent.EXTENSION_CHANGED);
+		fLastEvent = null;
+
+		Assert.assertEquals("org.eclipse.cdt.testextension", extRef.getExtension());
+		Assert.assertEquals("org.eclipse.cdt.testextensionID", extRef.getID());
+	}
+
+	public void testExtensionGet() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		ICExtensionReference extRef[] = desc.get("org.eclipse.cdt.testextension");
+
+		Assert.assertEquals("org.eclipse.cdt.testextension", extRef[0].getExtension());
+		Assert.assertEquals("org.eclipse.cdt.testextensionID", extRef[0].getID());
+	}
+
+	public void testExtensionData() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		ICExtensionReference extRef[] = desc.get("org.eclipse.cdt.testextension");
+		extRef[0].setExtensionData("testKey", "testValue");
+
+		Assert.assertNotNull(fLastEvent);
+		Assert.assertEquals(fLastEvent.getDescriptor(), desc);
+		Assert.assertEquals(fLastEvent.getType(), CDescriptorEvent.CDTPROJECT_CHANGED);
+		Assert.assertEquals(fLastEvent.getFlags(), 0);
+		fLastEvent = null;
+
+		Assert.assertEquals("testValue", extRef[0].getExtensionData("testKey"));
+		extRef[0].setExtensionData("testKey", null);
+		Assert.assertEquals(null, extRef[0].getExtensionData("testKey"));
+	}
+
+	public void testExtensionRemove() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		ICExtensionReference extRef[] = desc.get("org.eclipse.cdt.testextension");
+		desc.remove(extRef[0]);
+
+		Assert.assertNotNull(fLastEvent);
+		Assert.assertEquals(fLastEvent.getDescriptor(), desc);
+		Assert.assertEquals(fLastEvent.getType(), CDescriptorEvent.CDTPROJECT_CHANGED);
+		Assert.assertEquals(fLastEvent.getFlags(), CDescriptorEvent.EXTENSION_CHANGED);
+		fLastEvent = null;
+
+	}
+
+	public void testProjectDataCreate() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		Element data = desc.getProjectData("testElement");
+		data.appendChild(data.getOwnerDocument().createElement("test"));
+		desc.saveProjectData();
+
+		Assert.assertNotNull(fLastEvent);
+		Assert.assertEquals(fLastEvent.getDescriptor(), desc);
+		Assert.assertEquals(fLastEvent.getType(), CDescriptorEvent.CDTPROJECT_CHANGED);
+		Assert.assertEquals(fLastEvent.getFlags(), 0);
+		fLastEvent = null;
+	}
+
+	public void testProjectDataDelete() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		Element data = desc.getProjectData("testElement");
+		NodeList list = data.getElementsByTagName("test");
+		Assert.assertEquals(1, list.getLength());
+		data.removeChild(data.getFirstChild());
+		desc.saveProjectData();
+
+		Assert.assertNotNull(fLastEvent);
+		Assert.assertEquals(fLastEvent.getDescriptor(), desc);
+		Assert.assertEquals(fLastEvent.getType(), CDescriptorEvent.CDTPROJECT_CHANGED);
+		Assert.assertEquals(fLastEvent.getFlags(), 0);
+		fLastEvent = null;
+	}
+
+	public void testProjectStorageDelete() throws Exception {
+		// 1st Add an item
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		Element data = desc.getProjectData("testElement");
+		data.appendChild(data.getOwnerDocument().createElement("test"));
+		desc.saveProjectData();
+
+		// 2nd remove the storage element containing it
+		desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		data = desc.getProjectData("testElement");
+		data.getParentNode().removeChild(data);
+		desc.saveProjectData();
+
+		// 3rd check the item no longer exists
+		desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		data = desc.getProjectData("testElement");
+		assertTrue(data.getChildNodes().getLength() == 0);		
+		fLastEvent = null;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/cdescriptor/tests/CDescriptorTests.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/cdescriptor/tests/CDescriptorTests.java
new file mode 100644
index 0000000..91b0987
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/cdescriptor/tests/CDescriptorTests.java
@@ -0,0 +1,539 @@
+/**********************************************************************
+ * Copyright (c) 2004, 2008 QNX Software Systems Ltd and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems Ltd - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *     James Blackburn (Broadcom Corp.)
+ ***********************************************************************/
+
+package org.eclipse.cdt.core.cdescriptor.tests;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.lang.reflect.Method;
+
+import junit.extensions.TestSetup;
+import junit.framework.Assert;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.CDescriptorEvent;
+import org.eclipse.cdt.core.CProjectNature;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.core.ICDescriptorListener;
+import org.eclipse.cdt.core.ICDescriptorOperation;
+import org.eclipse.cdt.core.ICExtensionReference;
+import org.eclipse.cdt.core.ICOwnerInfo;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICStorageElement;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.internal.core.pdom.PDOMManager;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * @author David
+ * 
+ * To change the template for this generated type comment go to
+ * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
+ */
+public class CDescriptorTests extends BaseTestCase {
+
+	static String projectId = CTestPlugin.PLUGIN_ID + ".TestProject";
+	static IProject fProject;
+	static CDescriptorListener listener = new CDescriptorListener();
+	static volatile CDescriptorEvent fLastEvent;
+
+	/**
+	 * Constructor for CDescriptorTest.
+	 * 
+	 * @param name
+	 */
+	public CDescriptorTests(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(CDescriptorTests.class.getName());
+
+		// Add all the tests in this class
+		for (Method m : CDescriptorTests.class.getMethods())
+			if (m.getName().startsWith("test"))
+				suite.addTest(new CDescriptorTests(m.getName()));
+
+		TestSetup wrapper = new TestSetup(suite) {
+
+			@Override
+			protected void setUp() throws Exception {
+				oneTimeSetUp();
+			}
+
+			@Override
+			protected void tearDown() throws Exception {
+				oneTimeTearDown();
+			}
+
+		};
+		return wrapper;
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		fProject.open(new NullProgressMonitor());
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+	}
+	
+	private static void addNatureToProject(IProject proj, String natureId, IProgressMonitor monitor) throws CoreException {
+		IProjectDescription description = proj.getDescription();
+		String[] prevNatures = description.getNatureIds();
+		String[] newNatures = new String[prevNatures.length + 1];
+		System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
+		newNatures[prevNatures.length] = natureId;
+		description.setNatureIds(newNatures);
+		proj.setDescription(description, monitor);
+	}
+
+	static public class CDescriptorListener implements ICDescriptorListener {
+
+		public void descriptorChanged(CDescriptorEvent event) {
+			fLastEvent = event;
+		}
+	}
+
+	static void oneTimeSetUp() throws Exception {
+		CTestPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+
+			public void run(IProgressMonitor monitor) throws CoreException {
+				IWorkspaceRoot root = CTestPlugin.getWorkspace().getRoot();
+				IProject project = root.getProject("testDescriptorProject");
+				if (!project.exists()) {
+					project.create(null);
+				} else {
+					project.refreshLocal(IResource.DEPTH_INFINITE, null);
+				}
+				if (!project.isOpen()) {
+					project.open(null);
+				}
+				CCorePlugin.getDefault().getCDescriptorManager().addDescriptorListener(listener);
+				if (!project.hasNature(CProjectNature.C_NATURE_ID)) {
+					addNatureToProject(project, CProjectNature.C_NATURE_ID, null);
+				}
+				fProject = project;
+			}
+		}, null);
+	}
+
+	static void oneTimeTearDown() throws Exception {
+		fProject.delete(true, true, null);
+	}
+
+	public void testDescriptorCreation() throws Exception {
+		CTestPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+
+			public void run(IProgressMonitor monitor) throws CoreException {
+				CCorePlugin.getDefault().mapCProjectOwner(fProject, projectId, false);
+			}
+		}, null);
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+
+		Assert.assertNotNull(fLastEvent);
+		Assert.assertEquals(fLastEvent.getDescriptor(), desc);
+		Assert.assertEquals(fLastEvent.getType(), CDescriptorEvent.CDTPROJECT_ADDED);
+		Assert.assertEquals(fLastEvent.getFlags(), 0);
+		fLastEvent = null;
+
+		Assert.assertEquals(fProject, desc.getProject());
+		Assert.assertEquals("*", desc.getPlatform());
+	}
+
+	public void testDescriptorOwner() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		ICOwnerInfo owner = desc.getProjectOwner();
+		Assert.assertEquals(projectId, owner.getID());
+		Assert.assertEquals("*", owner.getPlatform());
+		Assert.assertEquals("C/C++ Test Project", owner.getName());
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=185930
+	public void testConcurrentDescriptorCreation() throws Exception {
+		for (int i = 0; i < 100 ; i++) {
+			fProject.close(null);
+			fProject.open(null);
+			Thread t= new Thread() {
+				public void run() {
+					try {
+						CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+					} catch (CoreException exc) {
+						fail();
+					}
+				}
+			};
+			t.start();
+			ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+			t.join();
+			
+			ICStorageElement data = desc.getProjectStorageElement("testElement0");
+			data.createChild("test");
+			desc.saveProjectData();
+			fLastEvent = null;
+		}
+ 	}
+
+	/*
+	 * This tests concurrent descriptor modification inside of a ICDescriptor operation run
+	 * with 
+	 * CConfigBasedDescriptorManager.runDescriptorOperation(IProject project, ICDescriptorOperation op, IProgressMonitor monitor)
+	 */
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=185930
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=193503
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=196118
+	public void testConcurrentDescriptorModification() throws Exception {
+		int lastLength = 0;
+		for (int i=0; i<100; ++i) {
+			final int indexi = i;
+			PDOMManager pdomMgr= (PDOMManager)CCorePlugin.getIndexManager();
+			pdomMgr.shutdown();
+			fProject.close(null);
+			fProject.open(null);
+			pdomMgr.startup().schedule();
+			final ICDescriptor fdesc= CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+			if (lastLength == 0)
+				lastLength = fdesc.getProjectStorageElement("testElement").getChildren().length;
+			final Throwable[] exception= new Throwable[10];
+			Thread[] threads= new Thread[10];
+			for (int j = 0; j < 10; j++) {
+				final int indexj = j;
+				Thread t= new Thread() {
+					@Override
+					public void run() {
+						try {
+							ICDescriptorOperation operation= new ICDescriptorOperation() {
+								public void execute(ICDescriptor descriptor, IProgressMonitor monitor) throws CoreException {
+//									assertFalse(descriptor.getConfigurationDescription().isReadOnly());
+									ICStorageElement data = fdesc.getProjectStorageElement("testElement");
+									String test = "test"+(indexi*10 + indexj);
+									data.createChild(test);
+//									assertFalse(descriptor.getConfigurationDescription().isReadOnly());
+									descriptor.saveProjectData();
+//									System.out.println("Saved " + test);
+								}};
+								CCorePlugin.getDefault().getCDescriptorManager().runDescriptorOperation(fProject, operation, null);
+						} catch (Throwable exc) {
+							exception[indexj]= exc;
+							exc.printStackTrace();
+						}
+					}
+				};
+				t.start();
+				threads[j] = t;
+			}
+			for (int j = 0; j < threads.length; j++) {
+				if (threads[j] != null) {
+					threads[j].join();
+				}
+				assertNull("Exception occurred: "+exception[j], exception[j]);
+			}
+			ICDescriptor desc= CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+			int lengthAfter = desc.getProjectStorageElement("testElement").getChildren().length;
+			lastLength += threads.length; // Update last lengths to what we expect
+			assertEquals("Iteration count: " + i, lastLength, lengthAfter);
+
+			fLastEvent = null;
+		}
+	}
+
+	/*
+	 * This test should pass as two threads, operating on the 
+	 * different storage elements  (outside of an operation) should be safe
+	 */
+	public void testConcurrentDifferentStorageElementModification() throws Exception {
+		for (int i=0; i < 100; ++i) {
+			Thread t= new Thread() {
+				public void run() {
+					try {
+						ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+						ICStorageElement data = desc.getProjectStorageElement("testElement4");
+						data.createChild("test");
+						desc.saveProjectData();
+					} catch (CoreException exc) {
+						fail(exc.getMessage());
+					}
+				}
+			};
+			t.start();
+
+			ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+			ICStorageElement data = desc.getProjectStorageElement("testElement5");
+			data.createChild("test");
+			desc.saveProjectData();
+			t.join();
+
+			fLastEvent = null;
+		}
+		Assert.assertEquals(100, CCorePlugin.getDefault().getCProjectDescription(fProject, false).getProjectStorageElement("testElement4").getChildren().length);
+		Assert.assertEquals(100, CCorePlugin.getDefault().getCProjectDescription(fProject, false).getProjectStorageElement("testElement5").getChildren().length);
+ 	}
+
+	/*
+	 * Test that (non-structural) changes to the storage element tree
+	 * work as expected.
+	 */
+	public void testConcurrentSameStorageElementModification() throws Exception {
+		for (int i=0; i < 100; ++i) {
+			Thread t= new Thread() {
+				public void run() {
+					try {
+						ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+						ICStorageElement data = desc.getProjectStorageElement("testElement6");
+						data.createChild("test");
+						desc.saveProjectData();
+					} catch (CoreException exc) {
+						fail(exc.getMessage());
+					}
+				}
+			};
+			t.start();
+
+			ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+			ICStorageElement data = desc.getProjectStorageElement("testElement6");
+			data.createChild("test");
+			desc.saveProjectData();
+			t.join();
+			
+			fLastEvent = null;
+		}
+		Assert.assertEquals(200, CCorePlugin.getDefault().getCProjectDescription(fProject, false).getProjectStorageElement("testElement6").getChildren().length);
+ 	}
+
+	/*
+	 * Tests deadlock when accessing c project description concurrently from two threads
+	 */
+	public void testDeadlockDuringProjectCreation() throws Exception {
+		for (int i=0; i < 10; ++i) {
+			oneTimeTearDown();
+			oneTimeSetUp();
+			Thread t= new Thread() {
+				public void run() {
+					try {
+						ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+						ICStorageElement data = desc.getProjectStorageElement("testElement0");
+						data.createChild("test");
+						desc.saveProjectData();
+					} catch (Exception exc) {
+					}
+				}
+			};
+			t.start();
+
+			ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+			ICStorageElement data = desc.getProjectStorageElement("testElement0");
+			data.createChild("test");
+			desc.saveProjectData();
+			t.join();
+			
+			fLastEvent = null;
+		}
+ 	}
+
+	public void testDescriptorConversion() {
+
+	}
+
+	public void testExtensionCreation() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		ICExtensionReference extRef = desc.create("org.eclipse.cdt.testextension", "org.eclipse.cdt.testextensionID");
+
+		Assert.assertNotNull(fLastEvent);
+		Assert.assertEquals(fLastEvent.getDescriptor(), desc);
+		Assert.assertEquals(fLastEvent.getType(), CDescriptorEvent.CDTPROJECT_CHANGED);
+		Assert.assertEquals(fLastEvent.getFlags(), CDescriptorEvent.EXTENSION_CHANGED);
+		fLastEvent = null;
+
+		Assert.assertEquals("org.eclipse.cdt.testextension", extRef.getExtension());
+		Assert.assertEquals("org.eclipse.cdt.testextensionID", extRef.getID());
+	}
+
+	public void testExtensionGet() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		ICExtensionReference extRef[] = desc.get("org.eclipse.cdt.testextension");
+
+		Assert.assertEquals("org.eclipse.cdt.testextension", extRef[0].getExtension());
+		Assert.assertEquals("org.eclipse.cdt.testextensionID", extRef[0].getID());
+	}
+
+	public void testExtensionData() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		ICExtensionReference extRef[] = desc.get("org.eclipse.cdt.testextension");
+		extRef[0].setExtensionData("testKey", "testValue");
+
+		Assert.assertNotNull(fLastEvent);
+		Assert.assertEquals(fLastEvent.getDescriptor(), desc);
+		Assert.assertEquals(fLastEvent.getType(), CDescriptorEvent.CDTPROJECT_CHANGED);
+		Assert.assertEquals(fLastEvent.getFlags(), 0);
+		fLastEvent = null;
+
+		Assert.assertEquals("testValue", extRef[0].getExtensionData("testKey"));
+		extRef[0].setExtensionData("testKey", null);
+		Assert.assertEquals(null, extRef[0].getExtensionData("testKey"));
+	}
+
+	public void testExtensionRemove() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		ICExtensionReference extRef[] = desc.get("org.eclipse.cdt.testextension");
+		desc.remove(extRef[0]);
+
+		Assert.assertNotNull(fLastEvent);
+		Assert.assertEquals(fLastEvent.getDescriptor(), desc);
+		Assert.assertEquals(fLastEvent.getType(), CDescriptorEvent.CDTPROJECT_CHANGED);
+		Assert.assertEquals(fLastEvent.getFlags(), CDescriptorEvent.EXTENSION_CHANGED);
+		fLastEvent = null;
+
+	}
+
+	public void testProjectDataCreate() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		ICStorageElement data = desc.getProjectStorageElement("testElement");
+		data.createChild("test");
+		desc.saveProjectData();
+
+		Assert.assertNotNull(fLastEvent);
+		Assert.assertEquals(fLastEvent.getDescriptor(), desc);
+		Assert.assertEquals(fLastEvent.getType(), CDescriptorEvent.CDTPROJECT_CHANGED);
+		Assert.assertEquals(fLastEvent.getFlags(), 0);
+		fLastEvent = null;
+	}
+
+	public void testProjectDataDelete() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		ICStorageElement data = desc.getProjectStorageElement("testElement");
+		ICStorageElement[] list = data.getChildrenByName("test");
+		Assert.assertEquals(1, list.length);
+		data.removeChild(list[0]);
+		desc.saveProjectData();
+
+		Assert.assertNotNull(fLastEvent);
+		Assert.assertEquals(fLastEvent.getDescriptor(), desc);
+		Assert.assertEquals(fLastEvent.getType(), CDescriptorEvent.CDTPROJECT_CHANGED);
+		Assert.assertEquals(fLastEvent.getFlags(), 0);
+		fLastEvent = null;
+	}
+
+	public void testCProjectDescriptionDescriptorInteraction() throws Exception {
+		for (int i = 1; i < 100 ; i++) {
+			// Create a descriptor with some test data
+			ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+			ICStorageElement data = desc.getProjectStorageElement("descDescInteraction");
+			data.createChild("dataItem1");
+
+			// Get the CProjectDescription
+			ICProjectDescription projDesc = CCorePlugin.getDefault().getProjectDescription(fProject);
+			data = desc.getProjectStorageElement("descDescInteraction");
+			data.createChild("dataItem2");
+			data = desc.getProjectStorageElement("descDescInteraction2");
+			data.createChild("dataItem3");
+
+			// save the descriptor
+			desc.saveProjectData();
+			// save the project description
+			CCorePlugin.getDefault().setProjectDescription(fProject, projDesc);
+
+			fProject.close(null);
+			assertTrue(CCorePlugin.getDefault().getCProjectDescription(fProject, false) == null);
+			fProject.open(null);
+
+			// Check that the descriptor added data is still there
+			desc = CCorePlugin.getDefault().getCProjectDescription(fProject, false);
+			data = desc.getProjectStorageElement("descDescInteraction");
+			assertEquals(2 * i, data.getChildren().length);
+			data = desc.getProjectStorageElement("descDescInteraction2");
+			assertEquals(1 * i, data.getChildren().length);
+		}
+	}
+
+	public void testAccumulatingBlankLinesInProjectData() throws Exception {
+		ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		ICStorageElement data = desc.getProjectStorageElement("testElement");
+		data.createChild("test");
+		desc.saveProjectData();
+
+		fProject.close(null);
+		fProject.open(null);
+
+		String dotCProject1 = readDotCProjectFile(fProject);
+		long mtime1 = fProject.getFile(".cproject").getLocalTimeStamp();
+		
+		desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		data = desc.getProjectStorageElement("testElement");
+		for (ICStorageElement child : data.getChildren()) {
+			data.removeChild(child);
+		}
+		data.createChild("test");
+		desc.saveProjectData();
+
+		String dotCProject2 = readDotCProjectFile(fProject);
+		long mtime2 = fProject.getFile(".cproject").getLocalTimeStamp();
+		assertEquals("Difference in .cproject file", dotCProject1, dotCProject2);
+		assertTrue(".cproject file has been written", mtime1 == mtime2);
+
+		// do it a second time - just to be sure
+		fProject.close(null);
+		fProject.open(null);
+
+		desc = CCorePlugin.getDefault().getCProjectDescription(fProject, true);
+		data = desc.getProjectStorageElement("testElement");
+		for (ICStorageElement child : data.getChildren()) {
+			data.removeChild(child);
+		}
+		data.createChild("test");
+		desc.saveProjectData();
+
+		String dotCProject3 = readDotCProjectFile(fProject);
+		long mtime3 = fProject.getFile(".cproject").getLocalTimeStamp();
+		assertEquals("Difference in .cproject file", dotCProject2, dotCProject3);
+		assertTrue(".cproject file has been written", mtime2 == mtime3);
+	}
+
+	/**
+	 * Read .cproject file.
+	 * 
+	 * @param project
+	 * @return content of .cproject file
+	 * @throws CoreException 
+	 * @throws IOException 
+	 */
+	private static String readDotCProjectFile(IProject project) throws CoreException, IOException {
+		IFile cProjectFile = project.getFile(".cproject");
+		InputStream in = cProjectFile.getContents();
+		try {
+			Reader reader = new InputStreamReader(in, "UTF-8");
+			StringBuilder sb = new StringBuilder();
+			char[] b = new char[4096];
+			int n;
+			while ((n = reader.read(b)) > 0) {
+				sb.append(b, 0, n);
+			}
+			return sb.toString();
+		} finally {
+			in.close();
+		}
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserEfsFileMatchingTest.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserEfsFileMatchingTest.java
new file mode 100644
index 0000000..9016e2f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserEfsFileMatchingTest.java
@@ -0,0 +1,519 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Andrew Gvozdev and others.
+ * 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
+ *
+ * Contributors:
+ *     Andrew Gvozdev - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.internal.errorparsers.tests;
+
+import java.io.ByteArrayInputStream;
+import java.net.URI;
+import java.util.ArrayList;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.ErrorParserManager;
+import org.eclipse.cdt.core.IErrorParser;
+import org.eclipse.cdt.core.IMarkerGenerator;
+import org.eclipse.cdt.core.ProblemMarkerInfo;
+import org.eclipse.cdt.core.errorparsers.AbstractErrorParser;
+import org.eclipse.cdt.core.errorparsers.ErrorPattern;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.core.internal.registry.ExtensionRegistry;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.ContributorFactoryOSGi;
+import org.eclipse.core.runtime.IContributor;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * The test case includes a few tests checking that {@link AbstractErrorParser}/{@link ErrorPattern}
+ * properly locate and resolve filenames found in build output in case of EFS files/folders.
+ */
+public class ErrorParserEfsFileMatchingTest extends TestCase {
+	private static final String MAKE_ERRORPARSER_ID = "org.eclipse.cdt.core.MakeErrorParser";
+	private String mockErrorParserId = null;
+
+	private final static String testName = "FindMatchingFilesEfsTest";
+
+	// Default project gets created once then used by all test cases.
+	private IProject fProject = null;
+	private ArrayList<ProblemMarkerInfo> errorList;
+
+	private final IMarkerGenerator markerGenerator = new IMarkerGenerator() {
+		// deprecated
+		public void addMarker(IResource file, int lineNumber, String errorDesc, int severity, String errorVar) {}
+
+		public void addMarker(ProblemMarkerInfo problemMarkerInfo) {
+			errorList.add(problemMarkerInfo);
+		}
+	};
+
+	/**
+	 * Simple error parser parsing line like "file:line:description"
+	 */
+	public static class MockErrorParser extends AbstractErrorParser {
+		/**
+		 * Constructor to set the error pattern.
+		 */
+		public MockErrorParser() {
+			super(new ErrorPattern[] {
+				new ErrorPattern("(.*):(.*):(.*)", 1, 2, 3, 0, IMarkerGenerator.SEVERITY_ERROR_RESOURCE)
+			});
+		}
+	}
+
+	/**
+	 * Constructor.
+	 * @param name - name of the test.
+	 */
+	public ErrorParserEfsFileMatchingTest(String name) {
+		super(name);
+
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		if (fProject==null) {
+			fProject = ResourceHelper.createCDTProject(testName);
+			Assert.assertNotNull(fProject);
+			mockErrorParserId = addErrorParserExtension("MockErrorParser", MockErrorParser.class);
+		}
+		errorList = new ArrayList<ProblemMarkerInfo>();
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		ResourceHelper.cleanUp();
+		fProject = null;
+	}
+
+	/**
+	 * @return - new TestSuite.
+	 */
+	public static TestSuite suite() {
+		return new TestSuite(ErrorParserEfsFileMatchingTest.class);
+	}
+
+	/**
+	 * main function of the class.
+	 *
+	 * @param args - arguments
+	 */
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(suite());
+	}
+
+	/**
+	 * Adds Error Parser extension to the global repository.
+	 * Note that this function will "pollute" the working environment and
+	 * the error parser will be seen by other test cases as well.
+	 *
+	 * @param shortId - last portion of ID with which error parser will be added.
+	 * @param cl - Error Parser class
+	 * @return - full ID of the error parser (generated by the method).
+	 */
+	private static String addErrorParserExtension(String shortId, Class cl) {
+		String ext = "<plugin><extension id=\"" + shortId + "\" name=\"" + shortId
+				+ "\" point=\"org.eclipse.cdt.core.ErrorParser\">" + "<errorparser class=\"" + cl.getName() + "\"/>"
+				+ "</extension></plugin>";
+		IContributor contributor = ContributorFactoryOSGi.createContributor(CTestPlugin.getDefault().getBundle());
+		boolean added = Platform.getExtensionRegistry().addContribution(new ByteArrayInputStream(ext.getBytes()),
+				contributor, false, shortId, null,
+				((ExtensionRegistry) Platform.getExtensionRegistry()).getTemporaryUserToken());
+		assertTrue("failed to add extension", added);
+		String fullId = "org.eclipse.cdt.core.tests." + shortId;
+		IErrorParser[] errorParser = CCorePlugin.getDefault().getErrorParser(fullId);
+		assertTrue(errorParser.length > 0);
+		return fullId;
+	}
+
+	/**
+	 * Convenience method to let {@link ErrorParserManager} parse one line of output.
+	 * This method goes through the whole working cycle every time creating
+	 * new {@link ErrorParserManager}.
+	 *
+	 * @param project - for which project to parse output.
+	 * @param buildDir - location of build for {@link ErrorParserManager}.
+	 * @param errorParsers - error parsers used.
+	 * @param line - one line of output.
+	 * @throws Exception
+	 */
+	private void parseOutput(IProject project, URI buildDirURI, String[] errorParsers, String line) throws Exception {
+		ErrorParserManager epManager = new ErrorParserManager(project, buildDirURI, markerGenerator, errorParsers);
+		line = line + '\n';
+		epManager.write(line.getBytes(), 0, line.length());
+		epManager.close();
+		epManager.reportProblems();
+	}
+
+	/**
+	 * Convenience method to let {@link ErrorParserManager} parse one line of output.
+	 * This method goes through the whole working cycle every time creating
+	 * new {@link ErrorParserManager}.
+	 *
+	 * @param project - for which project to parse output.
+	 * @param buildDir - location of build for {@link ErrorParserManager}.
+	 * @param errorParsers - error parsers used.
+	 * @param line - one line of output.
+	 * @throws Exception
+	 */
+	private void parseOutput(IProject project, IPath buildDir, String[] errorParsers, String line) throws Exception {
+		ErrorParserManager epManager = new ErrorParserManager(project, buildDir, markerGenerator, errorParsers);
+		line = line + '\n';
+		epManager.write(line.getBytes(), 0, line.length());
+		epManager.close();
+		epManager.reportProblems();
+	}
+
+	/**
+	 * Convenience method to parse one line of output.
+	 */
+	private void parseOutput(IProject project, String buildDir, String line) throws Exception {
+		parseOutput(project, new Path(buildDir), new String[] {mockErrorParserId}, line);
+	}
+
+	/**
+	 * Convenience method to parse one line of output.
+	 *  Search is done in project location.
+	 */
+	private void parseOutput(IProject project, String line) throws Exception {
+		parseOutput(project, project.getLocation(), new String[] {mockErrorParserId}, line);
+	}
+
+	/**
+	 * Convenience method to parse one line of output.
+	 * Search is done for current project in default location.
+	 */
+	private void parseOutput(String line) throws Exception {
+		parseOutput(fProject, fProject.getLocation(), new String[] {mockErrorParserId}, line);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testSingle() throws Exception {
+		ResourceHelper.createEfsFile(fProject, "testSingle.c", "null:/efsTestSingle.c");
+
+		parseOutput("efsTestSingle.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesEfsTest/testSingle.c",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testEfsVsRegular() throws Exception {
+		ResourceHelper.createFile(fProject, "testEfsVsRegular.c");
+		ResourceHelper.createEfsFile(fProject, "efsTestEfsVsRegular.c", "null:/testEfsVsRegular.c");
+
+		parseOutput("testEfsVsRegular.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesEfsTest/testEfsVsRegular.c",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testFullPath() throws Exception {
+		ResourceHelper.createEfsFolder(fProject, "Folder", "null:/Folder");
+		ResourceHelper.createEfsFile(fProject, "Folder/testFullPath.c",
+				"null:/EfsFolder/efsTestFullPath.c");
+
+		parseOutput("EfsFolder/efsTestFullPath.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesEfsTest/Folder/testFullPath.c",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testInNonEfsFolder() throws Exception {
+		ResourceHelper.createFolder(fProject, "NonEfsFolder");
+		ResourceHelper.createEfsFile(fProject, "NonEfsFolder/testInNonEfsFolder.c",
+				"null:/EfsFolder/efsTestInNonEfsFolder.c");
+
+		parseOutput("efsTestInNonEfsFolder.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesEfsTest/NonEfsFolder/testInNonEfsFolder.c",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testInFolder() throws Exception {
+		ResourceHelper.createEfsFolder(fProject, "Folder", "null:/Folder");
+		ResourceHelper.createEfsFile(fProject, "Folder/testInFolder.c",
+				"null:/EfsFolder/efsTestInFolder.c");
+
+		parseOutput("efsTestInFolder.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesEfsTest/Folder/testInFolder.c",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testDuplicateInRoot() throws Exception {
+		ResourceHelper.createEfsFile(fProject, "testDuplicateInRoot.c", "null:/testDuplicateInRoot.c");
+
+		ResourceHelper.createEfsFolder(fProject, "Folder", "null:/Folder");
+		ResourceHelper.createEfsFile(fProject, "Folder/testDuplicateInRoot.c",
+				"null:/Folder/testDuplicateInRoot.c");
+
+		// Resolved to the file in root folder
+		parseOutput("testDuplicateInRoot.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("L/FindMatchingFilesEfsTest/testDuplicateInRoot.c",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathFromProjectRoot() throws Exception {
+		ResourceHelper.createEfsFolder(fProject, "Folder", "null:/Folder");
+		ResourceHelper.createEfsFile(fProject, "Folder/testRelativePathFromProjectRoot.c",
+				"null:/EfsFolder/testRelativePathFromProjectRoot.c");
+
+		parseOutput("EfsFolder/testRelativePathFromProjectRoot.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesEfsTest/Folder/testRelativePathFromProjectRoot.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathFromSubfolder() throws Exception {
+		ResourceHelper.createEfsFolder(fProject, "Subfolder", "null:/Subfolder");
+		ResourceHelper.createEfsFolder(fProject, "Subfolder/Folder", "null:/Subfolder/Folder");
+		ResourceHelper.createEfsFile(fProject, "Subfolder/Folder/testRelativePathFromSubfolder.c",
+				"null:/Subfolder/Folder/testRelativePathFromSubfolder.c");
+
+		parseOutput("Folder/testRelativePathFromSubfolder.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesEfsTest/Subfolder/Folder/testRelativePathFromSubfolder.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathNotMatchingFolder() throws Exception {
+		ResourceHelper.createEfsFolder(fProject, "Folder", "null:/Folder");
+		ResourceHelper.createEfsFile(fProject, "Folder/testRelativePathNotMatchingFolder.c",
+				"null:/Folder/testRelativePathNotMatchingFolder.c");
+
+		parseOutput("NotMatchingFolder/testRelativePathNotMatchingFolder.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// No match
+		assertEquals("P/FindMatchingFilesEfsTest",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+		assertEquals(new Path("NotMatchingFolder/testRelativePathNotMatchingFolder.c"),problemMarkerInfo.externalPath);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathDuplicate() throws Exception {
+		ResourceHelper.createEfsFolder(fProject, "SubfolderA", "null:/SubfolderA");
+		ResourceHelper.createEfsFolder(fProject, "SubfolderA/Folder", "null:/SubfolderA/Folder");
+		ResourceHelper.createEfsFile(fProject, "SubfolderA/Folder/testRelativePathDuplicate.c",
+				"null:/SubfolderA/Folder/testRelativePathDuplicate.c");
+		ResourceHelper.createEfsFolder(fProject, "SubfolderB", "null:/SubfolderB");
+		ResourceHelper.createEfsFolder(fProject, "SubfolderB/Folder", "null:/SubfolderB/Folder");
+		ResourceHelper.createEfsFile(fProject, "SubfolderB/Folder/testRelativePathDuplicate.c",
+				"null:/SubfolderBS/Folder/testRelativePathDuplicate.c");
+
+		parseOutput("Folder/testRelativePathDuplicate.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// No match found
+		assertEquals("P/FindMatchingFilesEfsTest",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+		assertEquals(new Path("Folder/testRelativePathDuplicate.c"),problemMarkerInfo.externalPath);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathUpSubfolder() throws Exception {
+		ResourceHelper.createEfsFolder(fProject, "Folder", "null:/Folder");
+		ResourceHelper.createEfsFile(fProject, "Folder/testRelativePathUpSubfolder.c",
+				"null:/Folder/testRelativePathUpSubfolder.c");
+
+		parseOutput("../Folder/testRelativePathUpSubfolder.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesEfsTest/Folder/testRelativePathUpSubfolder.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathDotFromSubfolder() throws Exception {
+		ResourceHelper.createEfsFolder(fProject, "Subfolder", "null:/Subfolder");
+		ResourceHelper.createEfsFolder(fProject, "Subfolder/Folder", "null:/Subfolder/Folder");
+		ResourceHelper.createEfsFile(fProject, "Subfolder/Folder/testRelativePathDotFromSubfolder.c",
+				"null:/Subfolder/Folder/testRelativePathDotFromSubfolder.c");
+
+		parseOutput("./Folder/testRelativePathDotFromSubfolder.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesEfsTest/Subfolder/Folder/testRelativePathDotFromSubfolder.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testBuildDir() throws Exception {
+		ResourceHelper.createEfsFolder(fProject, "Folder", "null:/Folder");
+		ResourceHelper.createEfsFile(fProject, "Folder/testBuildDir.c", "null:/Folder/testBuildDir.c");
+		ResourceHelper.createEfsFolder(fProject, "BuildDir", "null:/BuildDir");
+		ResourceHelper.createEfsFile(fProject, "BuildDir/testBuildDir.c", "null:/BuildDir/testBuildDir.c");
+
+		String buildDir = fProject.getLocation().append("BuildDir").toOSString();
+		parseOutput(fProject, buildDir, "testBuildDir.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesEfsTest/BuildDir/testBuildDir.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testEfsProject() throws Exception {
+		IFile efsSmokeTest = ResourceHelper.createEfsFile(fProject, "efsSmokeTest.c", "mem:/efsSmokeTest.c");
+		Assert.assertTrue(efsSmokeTest.exists());
+
+		IProject efsProject = ResourceHelper.createCDTProject("EfsProject", new URI("mem:/EfsProject"));
+		ResourceHelper.createFolder(efsProject, "Folder");
+		ResourceHelper.createFile(efsProject, "Folder/testEfsProject.c");
+
+		parseOutput(efsProject, "testEfsProject.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/EfsProject/Folder/testEfsProject.c",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testEfsProjectBuildDirURI() throws Exception {
+		String fileName = "testEfsProjectBuildDirURI.c";
+
+		IProject efsProject = ResourceHelper.createCDTProject("EfsProject", new URI("mem:/EfsProject"));
+		ResourceHelper.createFolder(efsProject, "Folder");
+		ResourceHelper.createFile(efsProject, "Folder/" + fileName);
+		ResourceHelper.createFolder(efsProject, "BuildDir");
+		ResourceHelper.createFile(efsProject, "BuildDir/" + fileName);
+
+		URI buildDirURI = new URI("mem:/EfsProject/BuildDir/");
+		parseOutput(efsProject, buildDirURI, new String[] {mockErrorParserId}, fileName+":1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/EfsProject/BuildDir/"+fileName,problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 *
+	 * @throws Exception...
+	 */
+	public void testEfsProjectPushPopDirectory() throws Exception {
+		String fileName = "testEfsProjectPushPopDirectory.c";
+
+		IProject efsProject = ResourceHelper.createCDTProject("EfsProject", new URI("mem:/ProjectPushPopDirectory"));
+		ResourceHelper.createFolder(efsProject, "Folder");
+		ResourceHelper.createFolder(efsProject, "Folder/SubFolder");
+		ResourceHelper.createFile(efsProject, fileName);
+		ResourceHelper.createFile(efsProject, "Folder/"+fileName);
+		ResourceHelper.createFile(efsProject, "Folder/SubFolder/"+fileName);
+
+		String lines = "make[1]: Entering directory `Folder'\n"
+			+ "make[2]: Entering directory `SubFolder'\n"
+			+ "make[2]: Leaving directory `SubFolder'\n"
+			+ fileName+":1:error\n";
+
+		String[] errorParsers = {MAKE_ERRORPARSER_ID, mockErrorParserId };
+		parseOutput(efsProject, efsProject.getLocation(), errorParsers, lines);
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/EfsProject/Folder/"+fileName,problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserFileMatchingTest.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserFileMatchingTest.java
new file mode 100644
index 0000000..4c1c361
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserFileMatchingTest.java
@@ -0,0 +1,1314 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Andrew Gvozdev and others.
+ * 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
+ *
+ * Contributors:
+ *     Andrew Gvozdev - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.internal.errorparsers.tests;
+
+import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.ErrorParserManager;
+import org.eclipse.cdt.core.IErrorParser;
+import org.eclipse.cdt.core.IMarkerGenerator;
+import org.eclipse.cdt.core.ProblemMarkerInfo;
+import org.eclipse.cdt.core.errorparsers.AbstractErrorParser;
+import org.eclipse.cdt.core.errorparsers.ErrorPattern;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.core.internal.registry.ExtensionRegistry;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.ContributorFactoryOSGi;
+import org.eclipse.core.runtime.IContributor;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * The test case includes a few tests checking that {@link AbstractErrorParser}/{@link ErrorPattern}
+ * properly locate and resolve filenames found in build output.
+ */
+public class ErrorParserFileMatchingTest extends TestCase {
+	private static final String MAKE_ERRORPARSER_ID = "org.eclipse.cdt.core.MakeErrorParser";
+	private String mockErrorParserId = null;
+
+	private final static String testName = "FindMatchingFilesTest";
+
+	// Default project gets created once then used by all test cases.
+	private IProject fProject = null;
+	private ArrayList<ProblemMarkerInfo> errorList;
+
+	private final IMarkerGenerator markerGenerator = new IMarkerGenerator() {
+		// deprecated
+		public void addMarker(IResource file, int lineNumber, String errorDesc, int severity, String errorVar) {}
+
+		public void addMarker(ProblemMarkerInfo problemMarkerInfo) {
+			errorList.add(problemMarkerInfo);
+		}
+	};
+
+	/**
+	 * Simple error parser parsing line like "file:line:description"
+	 */
+	public static class MockErrorParser extends AbstractErrorParser {
+		/**
+		 * Constructor to set the error pattern.
+		 */
+		public MockErrorParser() {
+			super(new ErrorPattern[] {
+				new ErrorPattern("(.*):(.*):(.*)", 1, 2, 3, 0, IMarkerGenerator.SEVERITY_ERROR_RESOURCE)
+			});
+		}
+	}
+
+
+	/**
+	 * Constructor.
+	 * @param name - name of the test.
+	 */
+	public ErrorParserFileMatchingTest(String name) {
+		super(name);
+
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		if (fProject==null) {
+			fProject = ResourceHelper.createCDTProject(testName);
+			Assert.assertNotNull(fProject);
+			mockErrorParserId = addErrorParserExtension("MockErrorParser", MockErrorParser.class);
+		}
+		errorList = new ArrayList<ProblemMarkerInfo>();
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		ResourceHelper.cleanUp();
+		fProject = null;
+	}
+
+	/**
+	 * @return - new TestSuite.
+	 */
+	public static TestSuite suite() {
+		return new TestSuite(ErrorParserFileMatchingTest.class);
+	}
+
+	/**
+	 * main function of the class.
+	 *
+	 * @param args - arguments
+	 */
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(suite());
+	}
+
+	/**
+	 * Adds Error Parser extension to the global repository.
+	 * Note that this function will "pollute" the working environment and
+	 * the error parser will be seen by other test cases as well.
+	 *
+	 * @param shortId - last portion of ID with which error parser will be added.
+	 * @param cl - Error Parser class
+	 * @return - full ID of the error parser (generated by the method).
+	 */
+	private static String addErrorParserExtension(String shortId, Class cl) {
+		String ext = "<plugin><extension id=\"" + shortId + "\" name=\"" + shortId
+				+ "\" point=\"org.eclipse.cdt.core.ErrorParser\">" + "<errorparser class=\"" + cl.getName() + "\"/>"
+				+ "</extension></plugin>";
+		IContributor contributor = ContributorFactoryOSGi.createContributor(CTestPlugin.getDefault().getBundle());
+		boolean added = Platform.getExtensionRegistry().addContribution(new ByteArrayInputStream(ext.getBytes()),
+				contributor, false, shortId, null,
+				((ExtensionRegistry) Platform.getExtensionRegistry()).getTemporaryUserToken());
+		assertTrue("failed to add extension", added);
+		String fullId = "org.eclipse.cdt.core.tests." + shortId;
+		IErrorParser[] errorParser = CCorePlugin.getDefault().getErrorParser(fullId);
+		assertTrue(errorParser.length > 0);
+		return fullId;
+	}
+
+	/**
+	 * Convenience method to let {@link ErrorParserManager} parse one line of output.
+	 * This method goes through the whole working cycle every time creating
+	 * new {@link ErrorParserManager}.
+	 *
+	 * @param project - for which project to parse output.
+	 * @param buildDir - location of build for {@link ErrorParserManager}.
+	 * @param errorParsers - error parsers used.
+	 * @param line - one line of output.
+	 * @throws Exception
+	 */
+	private void parseOutput(IProject project, IPath buildDir, String[] errorParsers, String line) throws Exception {
+		ErrorParserManager epManager = new ErrorParserManager(project, buildDir, markerGenerator, errorParsers);
+		line = line + '\n';
+		epManager.write(line.getBytes(), 0, line.length());
+		epManager.close();
+		epManager.reportProblems();
+	}
+
+	/**
+	 * Convenience method to parse one line of output.
+	 */
+	private void parseOutput(IProject project, String buildDir, String line) throws Exception {
+		parseOutput(project, new Path(buildDir), new String[] {mockErrorParserId}, line);
+	}
+
+	/**
+	 * Convenience method to parse one line of output.
+	 *  Search is done in project location.
+	 */
+	private void parseOutput(IProject project, String line) throws Exception {
+		parseOutput(project, project.getLocation(), new String[] {mockErrorParserId}, line);
+	}
+
+	/**
+	 * Convenience method to parse one line of output.
+	 * Search is done for current project in default location.
+	 */
+	private void parseOutput(String line) throws Exception {
+		parseOutput(fProject, fProject.getLocation(), new String[] {mockErrorParserId}, line);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testSingle() throws Exception {
+		ResourceHelper.createFile(fProject, "testSingle.c");
+
+		parseOutput("testSingle.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/testSingle.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks that no false positive for missing file generated.
+	 * @throws Exception...
+	 */
+	public void testMissing() throws Exception {
+
+		parseOutput("testMissing.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// No match found
+		assertEquals("P/FindMatchingFilesTest",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+		assertEquals(new Path("testMissing.c"),problemMarkerInfo.externalPath);
+	}
+
+	/**
+	 * Checks if duplicate files give ambiguous match.
+	 * @throws Exception...
+	 */
+	public void testDuplicate() throws Exception {
+		ResourceHelper.createFolder(fProject, "FolderA");
+		ResourceHelper.createFile(fProject, "FolderA/testDuplicate.c");
+
+		ResourceHelper.createFolder(fProject, "FolderB");
+		ResourceHelper.createFile(fProject, "FolderB/testDuplicate.c");
+
+		parseOutput("testDuplicate.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// Ambiguous match
+		assertEquals("P/FindMatchingFilesTest",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+		assertEquals(new Path("testDuplicate.c"),problemMarkerInfo.externalPath);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testInFolder() throws Exception {
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFile(fProject, "Folder/testInFolder.c");
+
+		parseOutput("testInFolder.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Folder/testInFolder.c",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testDuplicateInRoot() throws Exception {
+		ResourceHelper.createFile(fProject, "testDuplicateInRoot.c");
+
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFile(fProject, "Folder/testDuplicateInRoot.c");
+
+		// Resolved to the file in root folder
+		parseOutput("testDuplicateInRoot.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("L/FindMatchingFilesTest/testDuplicateInRoot.c",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testLinkedFile() throws Exception {
+		ResourceHelper.createWorkspaceFolder("OutsideFolder");
+		IPath realFile = ResourceHelper.createWorkspaceFile("OutsideFolder/testLinkedFile.c");
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createLinkedFile(fProject, "Folder/testLinkedFile.c", realFile);
+
+		parseOutput("testLinkedFile.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Folder/testLinkedFile.c",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testLinkedFileWithDifferentName() throws Exception {
+		ResourceHelper.createWorkspaceFolder("OutsideFolder");
+		IPath realFile = ResourceHelper.createWorkspaceFile("OutsideFolder/RealFileWithDifferentName.c");
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createLinkedFile(fProject, "Folder/testLinkedFileWithDifferentName.c", realFile);
+
+		parseOutput("RealFileWithDifferentName.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Folder/testLinkedFileWithDifferentName.c",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testDuplicateLinkedFile() throws Exception {
+		ResourceHelper.createWorkspaceFolder("OutsideFolderA");
+		ResourceHelper.createWorkspaceFolder("OutsideFolderB");
+		IPath fileA = ResourceHelper.createWorkspaceFile("OutsideFolderA/testDuplicateLinkedFile.c");
+		IPath fileB = ResourceHelper.createWorkspaceFile("OutsideFolderB/testDuplicateLinkedFile.c");
+
+		ResourceHelper.createFolder(fProject, "FolderA");
+		ResourceHelper.createLinkedFile(fProject, "FolderA/DuplicateLinkedFileA.c", fileA);
+		ResourceHelper.createFolder(fProject, "FolderB");
+		ResourceHelper.createLinkedFile(fProject, "FolderB/DuplicateLinkedFileB.c", fileB);
+
+		parseOutput("testDuplicateLinkedFile.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// Ambiguous match
+		assertEquals("P/FindMatchingFilesTest",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+		assertEquals(new Path("testDuplicateLinkedFile.c"),problemMarkerInfo.externalPath);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testDuplicateLinkedFileDifferentName() throws Exception {
+		ResourceHelper.createWorkspaceFolder("OutsideFolderA");
+		ResourceHelper.createWorkspaceFolder("OutsideFolderB");
+		IPath fileA = ResourceHelper.createWorkspaceFile("OutsideFolderA/testDuplicateLinkedFileDifferentName.c");
+		IPath fileB = ResourceHelper.createWorkspaceFile("OutsideFolderB/testDuplicateLinkedFileDifferentName.c");
+		ResourceHelper.createFolder(fProject, "FolderA");
+		ResourceHelper.createLinkedFile(fProject, "FolderA/DuplicateLinkedFileA.c", fileA);
+		ResourceHelper.createFolder(fProject, "FolderB");
+		ResourceHelper.createLinkedFile(fProject, "FolderB/DuplicateLinkedFileB.c", fileB);
+
+		parseOutput("testDuplicateLinkedFileDifferentName.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// No match found
+		assertEquals("P/FindMatchingFilesTest",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+		assertEquals(new Path("testDuplicateLinkedFileDifferentName.c"),problemMarkerInfo.externalPath);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testInLinkedFolder() throws Exception {
+		IPath outsideFolder = ResourceHelper.createWorkspaceFolder("OutsideFolder");
+		ResourceHelper.createWorkspaceFile("OutsideFolder/testInLinkedFolder.c");
+		ResourceHelper.createLinkedFolder(fProject, "LinkedFolder", outsideFolder);
+
+		parseOutput("testInLinkedFolder.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/LinkedFolder/testInLinkedFolder.c",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testDuplicateInLinkedFolder() throws Exception {
+		IPath folderA = ResourceHelper.createWorkspaceFolder("OutsideFolderA");
+		ResourceHelper.createWorkspaceFile("OutsideFolderA/testDuplicateInLinkedFolder.c");
+		IPath folderB = ResourceHelper.createWorkspaceFolder("OutsideFolderB");
+		ResourceHelper.createWorkspaceFile("OutsideFolderB/testDuplicateInLinkedFolder.c");
+
+		ResourceHelper.createLinkedFolder(fProject, "LinkedFolderA", folderA);
+		ResourceHelper.createLinkedFolder(fProject, "LinkedFolderB", folderB);
+
+		parseOutput("testDuplicateInLinkedFolder.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// No match found
+		assertEquals("P/FindMatchingFilesTest",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+		assertEquals(new Path("testDuplicateInLinkedFolder.c"),problemMarkerInfo.externalPath);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testLinkedFolderInAnotherProject() throws Exception {
+		ResourceHelper.createFolder(fProject,"Folder");
+		ResourceHelper.createFile(fProject,"Folder/testLinkedFolderInAnotherProject.c");
+
+		IProject anotherProject = ResourceHelper.createCDTProject("AnotherProjectWithLinkedFolder");
+		ResourceHelper.createLinkedFolder(anotherProject, "LinkedFolder", fProject.getLocation()+"/Folder");
+
+		{
+			parseOutput(fProject, "testLinkedFolderInAnotherProject.c:1:error");
+			assertEquals(1, errorList.size());
+
+			ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+			assertEquals("L/FindMatchingFilesTest/Folder/testLinkedFolderInAnotherProject.c",problemMarkerInfo.file.toString());
+			assertEquals("error",problemMarkerInfo.description);
+		}
+
+		{
+			parseOutput(anotherProject, "testLinkedFolderInAnotherProject.c:1:error");
+			assertEquals(2, errorList.size());
+
+			ProblemMarkerInfo problemMarkerInfo = errorList.get(1);
+			assertEquals("L/AnotherProjectWithLinkedFolder/LinkedFolder/testLinkedFolderInAnotherProject.c",problemMarkerInfo.file.toString());
+			assertEquals("error",problemMarkerInfo.description);
+		}
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testSymbolicLink() throws Exception {
+		ResourceHelper.createWorkspaceFolder("OutsideFolder");
+		IPath realFile = ResourceHelper.createWorkspaceFile("OutsideFolder/RealFile.c");
+
+		try {
+			ResourceHelper.createFolder(fProject,"Folder");
+			ResourceHelper.createSymbolicLink(fProject, "Folder/testSymbolicLink.c", realFile);
+		} catch (UnsupportedOperationException e) {
+			// Do not run the test on Windows system where links are not supported.
+			return;
+		}
+
+		parseOutput("testSymbolicLink.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Folder/testSymbolicLink.c",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testDuplicateSymbolicLink() throws Exception {
+		ResourceHelper.createWorkspaceFolder("OutsideFolder");
+		IPath realFile = ResourceHelper.createWorkspaceFile("OutsideFolder/RealFile.c");
+
+		try {
+			ResourceHelper.createFolder(fProject,"FolderA");
+			ResourceHelper.createSymbolicLink(fProject, "FolderA/testDuplicateSymbolicLink.c", realFile);
+
+			ResourceHelper.createFolder(fProject,"FolderB");
+			ResourceHelper.createSymbolicLink(fProject, "FolderB/testDuplicateSymbolicLink.c", realFile);
+		} catch (UnsupportedOperationException e) {
+			// Do not run the test on Windows system where links are not supported.
+			return;
+		}
+
+		parseOutput("testDuplicateSymbolicLink.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// No match found
+		assertEquals("P/FindMatchingFilesTest",problemMarkerInfo.file.toString());
+		assertEquals(new Path("testDuplicateSymbolicLink.c"),problemMarkerInfo.externalPath);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testFolderSymbolicLink() throws Exception {
+		IPath realFolder = ResourceHelper.createWorkspaceFolder("OutsideFolderForSymbolicLink");
+		ResourceHelper.createWorkspaceFile("OutsideFolderForSymbolicLink/testFolderSymbolicLink.c");
+
+		try {
+			ResourceHelper.createSymbolicLink(fProject, "FolderSymbolicLink", realFolder);
+		} catch (UnsupportedOperationException e) {
+			// Do not run the test on Windows system where links are not supported.
+			return;
+		}
+
+		parseOutput("testFolderSymbolicLink.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/FolderSymbolicLink/testFolderSymbolicLink.c",problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testDuplicateFolderSymbolicLink() throws Exception {
+		IPath realFolder = ResourceHelper.createWorkspaceFolder("OutsideFolder");
+		ResourceHelper.createWorkspaceFile("OutsideFolder/testDuplicateFolderSymbolicLink.c");
+
+		try {
+			ResourceHelper.createSymbolicLink(fProject, "FolderSymbolicLinkA", realFolder);
+			ResourceHelper.createSymbolicLink(fProject, "FolderSymbolicLinkB", realFolder);
+		} catch (UnsupportedOperationException e) {
+			// Do not run the test on Windows system where links are not supported.
+			return;
+		}
+
+		parseOutput("testDuplicateFolderSymbolicLink.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// No match found
+		assertEquals("P/FindMatchingFilesTest",problemMarkerInfo.file.toString());
+		assertEquals(new Path("testDuplicateFolderSymbolicLink.c"),problemMarkerInfo.externalPath);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testAbsolutePathSingle() throws Exception {
+		ResourceHelper.createFile(fProject, "testAbsolutePathSingle.c");
+		String fullName = fProject.getLocation().append("testAbsolutePathSingle.c").toOSString();
+
+		parseOutput(fullName+":1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/testAbsolutePathSingle.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testAbsolutePathInOtherProject() throws Exception {
+		IProject anotherProject = ResourceHelper.createCDTProject("ProjectAbsolutePathInOtherProject");
+		ResourceHelper.createFile(anotherProject, "testAbsolutePathInOtherProject.c");
+		String fullName = anotherProject.getLocation().append("testAbsolutePathInOtherProject.c").toOSString();
+
+		parseOutput(fullName+":1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/ProjectAbsolutePathInOtherProject/testAbsolutePathInOtherProject.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testAbsolutePathOutsideWorkspace() throws Exception {
+
+		ResourceHelper.createWorkspaceFolder("OutsideFolder");
+		IPath outsideFile = ResourceHelper.createWorkspaceFile("OutsideFolder/testAbsolutePathOutsideWorkspace.c");
+
+		String fullName = ResourcesPlugin.getWorkspace().getRoot().getLocation()
+			.append("OutsideFolder/testAbsolutePathOutsideWorkspace.c").toOSString();
+
+		parseOutput(fullName+":1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// Can't assign marker to non-IResource
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+		assertEquals(outsideFile, problemMarkerInfo.externalPath);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathFromProjectRoot() throws Exception {
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFile(fProject, "Folder/testRelativePathFromProjectRoot.c");
+
+		parseOutput("Folder/testRelativePathFromProjectRoot.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Folder/testRelativePathFromProjectRoot.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathFromSubfolder() throws Exception {
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFolder(fProject, "Folder/SubFolder");
+		ResourceHelper.createFile(fProject, "Folder/SubFolder/testRelativePathFromSubfolder.c");
+
+		parseOutput("SubFolder/testRelativePathFromSubfolder.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Folder/SubFolder/testRelativePathFromSubfolder.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathNotMatchingFolder() throws Exception {
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFile(fProject, "Folder/testRelativePathNotMatchingFolder.c");
+
+		parseOutput("NotMatchingFolder/testRelativePathNotMatchingFolder.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// No match
+		assertEquals("P/FindMatchingFilesTest",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+		assertEquals(new Path("NotMatchingFolder/testRelativePathNotMatchingFolder.c"),problemMarkerInfo.externalPath);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathDuplicate() throws Exception {
+		ResourceHelper.createFolder(fProject, "SubfolderA");
+		ResourceHelper.createFolder(fProject, "SubfolderA/Folder");
+		ResourceHelper.createFile(fProject, "SubfolderA/Folder/testRelativePathDuplicate.c");
+		ResourceHelper.createFolder(fProject, "SubfolderB");
+		ResourceHelper.createFolder(fProject, "SubfolderB/Folder");
+		ResourceHelper.createFile(fProject, "SubfolderB/Folder/testRelativePathDuplicate.c");
+
+		parseOutput("Folder/testRelativePathDuplicate.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// No match found
+		assertEquals("P/FindMatchingFilesTest",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+		assertEquals(new Path("Folder/testRelativePathDuplicate.c"),problemMarkerInfo.externalPath);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathUp() throws Exception {
+		ResourceHelper.createFile(fProject, "testRelativePathUp.c");
+
+		parseOutput("../FindMatchingFilesTest/testRelativePathUp.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/testRelativePathUp.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathUpSubfolderBug262988() throws Exception {
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFile(fProject, "Folder/testRelativePathUpSubfolder.c");
+
+		parseOutput("../Folder/testRelativePathUpSubfolder.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Folder/testRelativePathUpSubfolder.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathUpOtherProject() throws Exception {
+		IProject anotherProject = ResourceHelper.createCDTProject("AnotherProject");
+		ResourceHelper.createFile(anotherProject, "testRelativePathUpOtherProject.c");
+
+		parseOutput("../AnotherProject/testRelativePathUpOtherProject.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/AnotherProject/testRelativePathUpOtherProject.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathUpDuplicate() throws Exception {
+		ResourceHelper.createFolder(fProject, "FolderA/SubFolder");
+		ResourceHelper.createFolder(fProject, "FolderB/SubFolder");
+		ResourceHelper.createFile(fProject, "FolderA/SubFolder/testRelativePathUpDuplicate.c");
+		ResourceHelper.createFile(fProject, "FolderB/SubFolder/testRelativePathUpDuplicate.c");
+
+		parseOutput("../SubFolder/testRelativePathUpDuplicate.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// No match found
+		assertEquals("P/FindMatchingFilesTest",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+		assertEquals(new Path("../SubFolder/testRelativePathUpDuplicate.c"),problemMarkerInfo.externalPath);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathDotFromProjectRoot() throws Exception {
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFile(fProject, "Folder/testRelativePathDotFromProjectRoot.c");
+
+		parseOutput("./Folder/testRelativePathDotFromProjectRoot.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Folder/testRelativePathDotFromProjectRoot.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathDotFromSubfolder() throws Exception {
+		ResourceHelper.createFolder(fProject, "Subfolder");
+		ResourceHelper.createFolder(fProject, "Subfolder/Folder");
+		ResourceHelper.createFile(fProject, "Subfolder/Folder/testRelativePathDotFromSubfolder.c");
+
+		parseOutput("./Folder/testRelativePathDotFromSubfolder.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Subfolder/Folder/testRelativePathDotFromSubfolder.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathDotNotMatchingFolder() throws Exception {
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFile(fProject, "Subfolder/Folder/testRelativePathDotNotMatchingFolder.c");
+
+		parseOutput("./NotMatchingFolder/testRelativePathDotNotMatchingFolder.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// No match
+		assertEquals("P/FindMatchingFilesTest",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+		assertEquals(new Path("./NotMatchingFolder/testRelativePathDotNotMatchingFolder.c"),problemMarkerInfo.externalPath);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testRelativePathDotDuplicate() throws Exception {
+		ResourceHelper.createFolder(fProject, "SubfolderA");
+		ResourceHelper.createFolder(fProject, "SubfolderA/Folder");
+		ResourceHelper.createFile(fProject, "SubfolderA/Folder/testRelativePathDotDuplicate.c");
+
+		ResourceHelper.createFolder(fProject, "SubfolderB");
+		ResourceHelper.createFolder(fProject, "SubfolderB/Folder");
+		ResourceHelper.createFile(fProject, "SubfolderB/Folder/testRelativePathDotDuplicate.c");
+
+		parseOutput("./Folder/testRelativePathDotDuplicate.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// No match found
+		assertEquals("P/FindMatchingFilesTest",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+		assertEquals(new Path("./Folder/testRelativePathDotDuplicate.c"),problemMarkerInfo.externalPath);
+	}
+
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testUppercase1() throws Exception {
+		if (!Platform.getOS().equals(Platform.OS_WIN32)) {
+			// This test is valid on Windows platform only
+			return;
+		}
+		// Note that old MSDOS can handle only 8 characters in file name
+		ResourceHelper.createFile(fProject, "upcase1.c");
+
+		parseOutput("UPCASE1.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/upcase1.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testUppercase2InSubFolder() throws Exception {
+		// Note that old MSDOS can handle only 8 characters in file name
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFile(fProject, "Folder/UPCASE2.c");
+
+		parseOutput("UpCase2.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Folder/UPCASE2.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testUppercase3ResolveCase() throws Exception {
+		// Note that old MSDOS can handle only 8 characters in file name
+		ResourceHelper.createFolder(fProject, "FolderA");
+		ResourceHelper.createFolder(fProject, "FolderB");
+		ResourceHelper.createFile(fProject, "FolderA/UPCASE3.c");
+		ResourceHelper.createFile(fProject, "FolderB/UpCase3.c");
+
+		parseOutput("UpCase3.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/FolderB/UpCase3.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testUppercase4Duplicate() throws Exception {
+		// Note that old MSDOS can handle only 8 characters in file name
+		ResourceHelper.createFolder(fProject, "FolderA");
+		ResourceHelper.createFolder(fProject, "FolderB");
+		ResourceHelper.createFile(fProject, "FolderA/UPCASE4.c");
+		ResourceHelper.createFile(fProject, "FolderB/upcase4.c");
+
+		parseOutput("UpCase4.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		// No match found
+		assertEquals("P/FindMatchingFilesTest",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+		assertEquals(new Path("UpCase4.c"),problemMarkerInfo.externalPath);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testCygwinCygdrive() throws Exception {
+		String fileName = "testCygwinCygdrive.c";
+		String windowsFileName = fProject.getLocation().append(fileName).toOSString();
+		String cygwinFileName;
+		try {
+			cygwinFileName = ResourceHelper.windowsToCygwinPath(windowsFileName);
+		} catch (UnsupportedOperationException e) {
+			// Skip the test if Cygwin is not available.
+			return;
+		}
+		assertTrue("cygwinFileName=["+cygwinFileName+"]", cygwinFileName.startsWith("/cygdrive/"));
+
+		ResourceHelper.createFile(fProject, fileName);
+
+		parseOutput(cygwinFileName+":1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/"+fileName,problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testCygwinUsrUnclude() throws Exception {
+		String cygwinFolder = "/usr/include/";
+		String fileName = "stdio.h";
+
+		String usrIncludeWindowsPath;
+		try {
+			usrIncludeWindowsPath = ResourceHelper.cygwinToWindowsPath(cygwinFolder);
+		} catch (UnsupportedOperationException e) {
+			// Skip the test if Cygwin is not available.
+			return;
+		}
+		assertTrue("usrIncludeWindowsPath=["+usrIncludeWindowsPath+"]",
+			usrIncludeWindowsPath.charAt(1)==IPath.DEVICE_SEPARATOR);
+
+		ResourceHelper.createLinkedFolder(fProject, "include", usrIncludeWindowsPath);
+
+		parseOutput(cygwinFolder+fileName+":1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/include/"+fileName,problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testCygwinAnotherProject() throws Exception {
+		String fileName = "testCygwinAnotherProject.c";
+		IProject anotherProject = ResourceHelper.createCDTProject("AnotherProject");
+
+		String windowsFileName = anotherProject.getLocation().append(fileName).toOSString();
+		String cygwinFileName;
+		try {
+			cygwinFileName = ResourceHelper.windowsToCygwinPath(windowsFileName);
+		} catch (UnsupportedOperationException e) {
+			// Skip the test if Cygwin is not available.
+			return;
+		}
+		assertTrue("cygwinFileName=["+cygwinFileName+"]", cygwinFileName.startsWith("/cygdrive/"));
+
+		ResourceHelper.createFile(anotherProject, fileName);
+
+		parseOutput(cygwinFileName+":1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/AnotherProject/"+fileName,problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testCustomProjectLocation() throws Exception {
+		ResourceHelper.createWorkspaceFolder("Custom");
+		ResourceHelper.createWorkspaceFolder("Custom/ProjectLocation");
+ 		IProject anotherProject = ResourceHelper.createCDTProject("AnotherProject", "Custom/ProjectLocation");
+
+		ResourceHelper.createFolder(anotherProject, "Folder");
+		ResourceHelper.createFile(anotherProject, "Folder/testCustomProjectLocation.c");
+
+		parseOutput(anotherProject, "testCustomProjectLocation.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/AnotherProject/Folder/testCustomProjectLocation.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 *
+	 * @throws Exception...
+	 */
+	public void testCygwinAndMakeErrorParserBug270772() throws Exception {
+		String fileName = "testCygwinAndMakeErrorParser.c";
+		String windowsFileName = fProject.getLocation().append(fileName).toOSString();
+		String cygwinFileName;
+		try {
+			cygwinFileName = ResourceHelper.windowsToCygwinPath(windowsFileName);
+		} catch (UnsupportedOperationException e) {
+			// Skip the test if Cygwin is not available.
+			return;
+		}
+		assertTrue("cygwinFileName=["+cygwinFileName+"]", cygwinFileName.startsWith("/cygdrive/"));
+
+		ResourceHelper.createFile(fProject, fileName);
+
+		String lines = "make[0]: Entering directory `dir'\n"
+			+ cygwinFileName+":1:error\n";
+		
+		String[] errorParsers = {MAKE_ERRORPARSER_ID, mockErrorParserId };
+		parseOutput(fProject, fProject.getLocation(), errorParsers, lines);
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/"+fileName,problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testInNestedProject() throws Exception {
+		ResourceHelper.createFolder(fProject, "NestedProjectFolder");
+		IProject nestedProject = ResourceHelper.createCDTProject("NestedProject", "FindMatchingFilesTest/NestedProject");
+
+		ResourceHelper.createFolder(nestedProject, "Folder");
+		ResourceHelper.createFile(nestedProject, "Folder/testInNestedProject.c");
+
+		{
+			parseOutput(fProject, "testInNestedProject.c:1:error");
+			assertEquals(1, errorList.size());
+
+			ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+			assertEquals("L/FindMatchingFilesTest/NestedProject/Folder/testInNestedProject.c",problemMarkerInfo.file.toString());
+			assertEquals(1,problemMarkerInfo.lineNumber);
+			assertEquals("error",problemMarkerInfo.description);
+		}
+
+		{
+			parseOutput(nestedProject, "testInNestedProject.c:1:error");
+			assertEquals(2, errorList.size());
+
+			ProblemMarkerInfo problemMarkerInfo = errorList.get(1);
+			assertEquals("L/NestedProject/Folder/testInNestedProject.c",problemMarkerInfo.file.toString());
+			assertEquals(1,problemMarkerInfo.lineNumber);
+			assertEquals("error",problemMarkerInfo.description);
+		}
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testBuildDir() throws Exception {
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFile(fProject, "Folder/testBuildDir.c");
+		ResourceHelper.createFolder(fProject, "BuildDir");
+		ResourceHelper.createFile(fProject, "BuildDir/testBuildDir.c");
+
+		String buildDir = fProject.getLocation().append("BuildDir").toOSString();
+		parseOutput(fProject, buildDir, "testBuildDir.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/BuildDir/testBuildDir.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 * @throws Exception...
+	 */
+	public void testBuildDirVsProjectRoot() throws Exception {
+		ResourceHelper.createFile(fProject, "testBuildDirVsProjectRoot.c");
+		ResourceHelper.createFolder(fProject, "BuildDir");
+		ResourceHelper.createFile(fProject, "BuildDir/testBuildDirVsProjectRoot.c");
+
+		String buildDir = fProject.getLocation().append("BuildDir").toOSString();
+		parseOutput(fProject, buildDir, "testBuildDirVsProjectRoot.c:1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/BuildDir/testBuildDirVsProjectRoot.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 *
+	 * @throws Exception...
+	 */
+	public void testAbsoluteFileVsLink() throws Exception {
+		ResourceHelper.createFolder(fProject, "Folder");
+		IFile file = ResourceHelper.createFile(fProject, "Folder/testAbsoluteFileVsLink.c");
+		String fullName = file.getLocation().toOSString();
+		ResourceHelper.createLinkedFile(fProject, "testAbsoluteFileVsLink.c", file.getLocation());
+
+		parseOutput(fullName+":1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Folder/testAbsoluteFileVsLink.c",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 *
+	 * @throws Exception...
+	 */
+	public void testPushDirectory() throws Exception {
+		String fileName = "testPushDirectory.c";
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFile(fProject, fileName);
+		ResourceHelper.createFile(fProject, "Folder/"+fileName);
+
+		String lines = "make[0]: Entering directory `Folder'\n"
+			+ fileName+":1:error\n";
+
+		String[] errorParsers = {MAKE_ERRORPARSER_ID, mockErrorParserId };
+		parseOutput(fProject, fProject.getLocation(), errorParsers, lines);
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Folder/"+fileName,problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 *
+	 * @throws Exception...
+	 */
+	public void testPushAbsoluteDirectory() throws Exception {
+		String fileName = "testPushAbsoluteDirectory.c";
+		IFolder folder = ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFile(fProject, fileName);
+		ResourceHelper.createFile(fProject, "Folder/"+fileName);
+
+		IPath absoluteDir = folder.getLocation();
+		Assert.assertTrue(absoluteDir.isAbsolute());
+
+		String lines = "make[0]: Entering directory `" + absoluteDir + "'\n"
+			+ fileName+":1:error\n";
+
+		String[] errorParsers = {MAKE_ERRORPARSER_ID, mockErrorParserId };
+		parseOutput(fProject, fProject.getLocation(), errorParsers, lines);
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Folder/"+fileName,problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 *
+	 * @throws Exception...
+	 */
+	public void testPopDirectory() throws Exception {
+		String fileName = "testPopDirectory.c";
+
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFolder(fProject, "Folder/SubFolder");
+
+		ResourceHelper.createFile(fProject, fileName);
+		ResourceHelper.createFile(fProject, "Folder/"+fileName);
+		ResourceHelper.createFile(fProject, "Folder/SubFolder/"+fileName);
+
+		String lines = "make[1]: Entering directory `Folder'\n"
+			+ "make[2]: Entering directory `SubFolder'\n"
+			+ "make[2]: Leaving directory `SubFolder'\n"
+			+ fileName+":1:error\n";
+
+		String[] errorParsers = {MAKE_ERRORPARSER_ID, mockErrorParserId };
+		parseOutput(fProject, fProject.getLocation(), errorParsers, lines);
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Folder/"+fileName,problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 *
+	 * @throws Exception...
+	 */
+	public void testPushDirectoryAndCache() throws Exception {
+		String fileName = "testPushDirectoryCacheProblem.c";
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFile(fProject, fileName);
+		ResourceHelper.createFile(fProject, "Folder/"+fileName);
+
+		String lines = fileName+":1:error\n"
+			+ "make[0]: Entering directory `Folder'\n"
+			+ fileName+":1:error\n";
+
+		String[] errorParsers = {MAKE_ERRORPARSER_ID, mockErrorParserId };
+		parseOutput(fProject, fProject.getLocation(), errorParsers, lines);
+		assertEquals(2, errorList.size());
+
+		{
+			ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+			assertEquals("L/FindMatchingFilesTest/"+fileName,problemMarkerInfo.file.toString());
+			assertEquals(1,problemMarkerInfo.lineNumber);
+			assertEquals("error",problemMarkerInfo.description);
+		}
+
+		{
+			ProblemMarkerInfo problemMarkerInfo = errorList.get(1);
+			assertEquals("L/FindMatchingFilesTest/Folder/"+fileName,problemMarkerInfo.file.toString());
+			assertEquals(1,problemMarkerInfo.lineNumber);
+			assertEquals("error",problemMarkerInfo.description);
+		}
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 *
+	 * @throws Exception...
+	 */
+	public void testMappedRemoteAbsolutePath_Bug264704() throws Exception {
+		ResourceHelper.createFolder(fProject, "Folder");
+		ResourceHelper.createFolder(fProject, "Folder/AbsoluteRemoteFolder");
+		IFile file = ResourceHelper.createFile(fProject, "Folder/AbsoluteRemoteFolder/testMappedRemoteAbsolutePath.h");
+		
+		parseOutput("/AbsoluteRemoteFolder/testMappedRemoteAbsolutePath.h:1:error");
+		assertEquals(1, errorList.size());
+		
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/Folder/AbsoluteRemoteFolder/testMappedRemoteAbsolutePath.h",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+	/**
+	 * Checks if a file from error output can be found.
+	 *
+	 * @throws Exception...
+	 */
+	public void testMappedRemoteAbsolutePathAnotherProject_Bug264704() throws Exception {
+
+		IProject anotherProject = ResourceHelper.createCDTProject("ProjectMappedRemoteAbsolutePathAnotherProject");
+
+		ResourceHelper.createFolder(anotherProject, "Folder");
+		ResourceHelper.createFolder(anotherProject, "Folder/AbsoluteRemoteFolder");
+		IFile file = ResourceHelper.createFile(anotherProject, "Folder/AbsoluteRemoteFolder/testMappedRemoteAbsolutePathAnotherProject.h");
+		
+		parseOutput("/AbsoluteRemoteFolder/testMappedRemoteAbsolutePathAnotherProject.h:1:error");
+		assertEquals(1, errorList.size());
+		
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/ProjectMappedRemoteAbsolutePathAnotherProject/Folder/AbsoluteRemoteFolder/testMappedRemoteAbsolutePathAnotherProject.h",problemMarkerInfo.file.toString());
+		assertEquals(1,problemMarkerInfo.lineNumber);
+		assertEquals("error",problemMarkerInfo.description);
+	}
+	
+	/**
+	 * Checks if a file from error output can be found.
+	 *
+	 * @throws Exception...
+	 */
+	public void testWindowsPathOnLinux_Bug263977() throws Exception {
+		// This test is valid on Unix platforms only
+		boolean isUnix = Platform.getOS().equals(Platform.OS_LINUX)
+			|| Platform.getOS().equals(Platform.OS_AIX)
+			|| Platform.getOS().equals(Platform.OS_SOLARIS)
+			|| Platform.getOS().equals(Platform.OS_HPUX)
+			|| Platform.getOS().equals(Platform.OS_QNX)
+			|| Platform.getOS().equals(Platform.OS_MACOSX);
+		if (!isUnix) {
+			return;
+		}
+
+		String fileName = "testWindowsPathOnLinux_Bug263977.c";
+
+		ResourceHelper.createFolder(fProject, "w:/Folder/Subfolder");
+		ResourceHelper.createFile(fProject, "w:/Folder/Subfolder/"+fileName);
+
+		// Note that main intention of this test is to run on *Linux*, see bug 263977
+		parseOutput("W:\\Folder\\Subfolder\\"+fileName+":1:error");
+		assertEquals(1, errorList.size());
+
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("L/FindMatchingFilesTest/w:/Folder/Subfolder/"+fileName,problemMarkerInfo.file.toString());
+		assertEquals("error",problemMarkerInfo.description);
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java
new file mode 100644
index 0000000..156329a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java
@@ -0,0 +1,307 @@
+/*******************************************************************************
+ * Copyright (c) 2008 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.internal.errorparsers.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.ErrorParserManager;
+import org.eclipse.cdt.core.IErrorParser;
+import org.eclipse.cdt.core.IErrorParser2;
+import org.eclipse.cdt.core.IMarkerGenerator;
+import org.eclipse.cdt.core.ProblemMarkerInfo;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.core.internal.registry.ExtensionRegistry;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.ContributorFactoryOSGi;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IContributor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * @author Alena Laskavaia
+ *
+ * Tests for ErrorParser manager and different parsers 
+ *
+ */
+public class ErrorParserManagerTest extends TestCase {
+	IWorkspace workspace;
+	IWorkspaceRoot root;
+
+	NullProgressMonitor monitor;
+	private ICProject cProject;
+	private ErrorParserManager epManager;
+	private ArrayList<ProblemMarkerInfo> errorList;
+	private IMarkerGenerator markerGenerator;
+
+	/**
+	 * Constructor for CModelTests.
+	 * @param name
+	 */
+	public ErrorParserManagerTest(String name) {
+		super(name);
+	}
+
+	/**
+	 * Sets up the test fixture.
+	 *
+	 * Called before every test case method.
+	 * 
+	 * Example code test the packages in the project 
+	 *  "com.qnx.tools.ide.cdt.core"
+	 */
+	@Override
+	protected void setUp() throws Exception {
+		/***
+		 * The test of the tests assume that they have a working workspace
+		 * and workspace root object to use to create projects/files in, 
+		 * so we need to get them setup first.
+		 */
+		IWorkspaceDescription desc;
+		workspace = ResourcesPlugin.getWorkspace();
+		root = workspace.getRoot();
+		monitor = new NullProgressMonitor();
+		if (workspace == null)
+			fail("Workspace was not setup");
+		if (root == null)
+			fail("Workspace root was not setup");
+		desc = workspace.getDescription();
+		desc.setAutoBuilding(false);
+		workspace.setDescription(desc);
+
+		errorList = new ArrayList<ProblemMarkerInfo>();
+		cProject = createProject("errorparsersanity");
+		markerGenerator = new IMarkerGenerator() {
+
+			public void addMarker(IResource file, int lineNumber, String errorDesc, int severity, String errorVar) {
+				// Obsolete
+			}
+
+			public void addMarker(ProblemMarkerInfo problemMarkerInfo) {
+				errorList.add(problemMarkerInfo);
+
+			}
+
+		};
+		String[] errorParsersIds = {
+			"org.eclipse.cdt.core.MakeErrorParser",
+			"org.eclipse.cdt.core.GCCErrorParser",
+			"org.eclipse.cdt.core.GASErrorParser",
+			"org.eclipse.cdt.core.GLDErrorParser",
+			"org.eclipse.cdt.core.VCErrorParser",
+		};
+		epManager = new ErrorParserManager(cProject.getProject(), markerGenerator, errorParsersIds);
+
+	}
+
+	/**
+	* Tears down the test fixture.
+	*
+	* Called after every test case method.
+	*/
+	@Override
+	protected void tearDown() {
+		// release resources here and clean-up
+	}
+
+	public static TestSuite suite() {
+		return new TestSuite(ErrorParserManagerTest.class);
+	}
+
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(suite());
+	}
+
+	private ICProject createProject(String name) throws CoreException {
+		ICProject testProject;
+		testProject = CProjectHelper.createCProject(name, "none", IPDOMManager.ID_NO_INDEXER);
+		if (testProject == null) {
+			fail("Unable to create project");
+		}
+		return testProject;
+	}
+
+	private void output(String line) throws IOException {
+		epManager.write(line.getBytes(), 0, line.length());
+	}
+
+	private void end() throws IOException {
+		epManager.getOutputStream();
+		epManager.close();
+		epManager.reportProblems();
+	}
+
+	public void testParsersSanity() throws CoreException, IOException {
+		output("catchpoints.cpp:12: warning: no return statement in function returning non-void\n");
+		end();
+		assertEquals(1, errorList.size());
+		
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("no return statement in function returning non-void",problemMarkerInfo.description);
+		assertEquals(new Path("catchpoints.cpp"),problemMarkerInfo.externalPath);
+	}
+	public void testParsersSanityTrimmed() throws CoreException, IOException {
+		output("   catchpoints.cpp:12: warning: no return statement in function returning non-void   \n");
+		end();
+		assertEquals(1, errorList.size());
+		
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("no return statement in function returning non-void",problemMarkerInfo.description);
+		assertEquals(new Path("catchpoints.cpp"),problemMarkerInfo.externalPath);
+	}
+
+	public void testOutput() throws IOException {
+		FileInputStream fileInputStream = new FileInputStream(CTestPlugin.getDefault().getFileInPlugin(
+				new Path("resources/errortests/output-1")));
+		byte b[] = new byte[1024];
+		while (true) {
+			int k = fileInputStream.read(b);
+			if (k < 0)
+				break;
+			epManager.write(b, 0, k);
+		}
+		end();
+		assertEquals(19, errorList.size());
+
+	}
+
+
+
+	private String addErrorParserExtension(String shortId, Class cl) {
+		String ext = "<plugin><extension id=\"" + shortId + "\" name=\"" + shortId
+				+ "\" point=\"org.eclipse.cdt.core.ErrorParser\">" + "<errorparser class=\"" + cl.getName() + "\"/>"
+				+ "</extension></plugin>";
+		IContributor contributor = ContributorFactoryOSGi.createContributor(CTestPlugin.getDefault().getBundle());
+		boolean added = Platform.getExtensionRegistry().addContribution(new ByteArrayInputStream(ext.getBytes()),
+				contributor, false, shortId, null,
+				((ExtensionRegistry) Platform.getExtensionRegistry()).getTemporaryUserToken());
+		assertTrue("failed to add extension", added);
+		String fullId = "org.eclipse.cdt.core.tests." + shortId;
+		IErrorParser[] errorParser = CCorePlugin.getDefault().getErrorParser(fullId);
+		assertTrue(errorParser.length > 0);
+		return fullId;
+	}
+
+	public static class TestParser1 implements IErrorParser2 {
+		String last = null;
+		public int getProcessLineBehaviour() {
+			return KEEP_UNTRIMMED;
+		}
+
+		public boolean processLine(String line, ErrorParserManager eoParser) {
+			if (line.startsWith(" ") && last!=null) {
+				eoParser.generateExternalMarker(null, 1, last+line, 1, "", null);
+				return true;
+			}
+			if (line.startsWith("bug:")) {
+				last = line;
+				return true;
+			} else {
+				last = null;
+			}
+
+			return false;
+		}
+	}
+	public void testNoTrimParser() throws IOException {
+		String id = addErrorParserExtension("test1", TestParser1.class);
+		epManager = new ErrorParserManager(cProject.getProject(), markerGenerator, new String[] { id });
+		
+		output("bug: start\n");
+		output(" end");
+		end();
+		assertEquals(1, errorList.size());
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		assertEquals("bug: start end",problemMarkerInfo.description);
+	}
+	
+	public static class TestParser2 implements IErrorParser2 {
+		public int getProcessLineBehaviour() {
+			return KEEP_LONGLINES;
+		}
+
+		public boolean processLine(String line, ErrorParserManager eoParser) {
+			if (line.startsWith("errorT: ")) {
+				eoParser.generateExternalMarker(null, 1, line, 1, "", null);
+				return true;
+			}
+
+			return false;
+		}
+	}
+	public void testLongLinesParser() throws IOException {
+		String id = addErrorParserExtension("test2", TestParser2.class);
+		epManager = new ErrorParserManager(cProject.getProject(), markerGenerator, new String[] { id });
+		
+		StringBuffer buf = new StringBuffer("errorT: ");
+		for (int i = 0; i < 100; i++) {
+			buf.append("la la la la la "+i+" ");
+		}
+		output(buf.toString()+"\n");
+		end();
+		assertEquals(1, errorList.size());
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		int l = problemMarkerInfo.description.length();
+		assertTrue(l>1000);
+		String end = problemMarkerInfo.description.substring(l-10,l);
+		// check - line trimmed but long
+		assertEquals("a la la 99",end);
+	}
+	public static class TestParser3 implements IErrorParser2 {
+		public int getProcessLineBehaviour() {
+			return KEEP_LONGLINES | KEEP_UNTRIMMED;
+		}
+
+		public boolean processLine(String line, ErrorParserManager eoParser) {
+			if (line.startsWith("errorT: ")) {
+				eoParser.generateExternalMarker(null, 1, line, 1, "", null);
+				return true;
+			}
+
+			return false;
+		}
+	}
+	public void testLongLinesUntrimmedParser() throws IOException {
+		String id = addErrorParserExtension("test3", TestParser3.class);
+		epManager = new ErrorParserManager(cProject.getProject(), markerGenerator, new String[] { id });
+		
+		StringBuffer buf = new StringBuffer("errorT: ");
+		for (int i = 0; i < 100; i++) {
+			buf.append("la la la la la "+i+" ");
+		}
+		output(buf.toString()+"\n");
+		end();
+		assertEquals(1, errorList.size());
+		ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+		int l = problemMarkerInfo.description.length();
+		assertTrue(l>1000);
+		String end = problemMarkerInfo.description.substring(l-10,l);
+		// check - line trimmed but long
+		assertEquals(" la la 99 ",end);
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserTests.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserTests.java
new file mode 100644
index 0000000..2ede3b6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserTests.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 QNX Software Systems
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.internal.errorparsers.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+public class ErrorParserTests {
+
+	public static Test suite() {
+        TestSuite suite = new TestSuite(ErrorParserTests.class.getName());
+
+        // Just add more test cases here as you create them for
+        // each class being tested
+		suite.addTest(GCCErrorParserTests.suite());
+		suite.addTest(GLDErrorParserTests.suite());
+        suite.addTest(FileBasedErrorParserTests.suite());
+        suite.addTest(ErrorParserManagerTest.suite());
+        suite.addTest(ErrorParserFileMatchingTest.suite());
+        suite.addTest(ErrorParserEfsFileMatchingTest.suite());
+        return suite;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/FileBasedErrorParserTests.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/FileBasedErrorParserTests.java
new file mode 100644
index 0000000..bf58200
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/FileBasedErrorParserTests.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 QNX Software Systems
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.internal.errorparsers.tests;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.core.runtime.Path;
+
+public class FileBasedErrorParserTests extends GenericErrorParserTests {
+
+	File errorFile;
+
+	public FileBasedErrorParserTests(File file) {
+		super("testErrorsInFiles");
+		errorFile = file;
+	}
+	
+	public String getName() {
+		return super.getName() + " " + errorFile.getName();
+	}
+
+	public void testErrorsInFiles() throws IOException {
+		InputStream stream = new FileInputStream(errorFile);
+
+		runParserTest(stream, -1, -1, null, null, new String[]{GCC_ERROR_PARSER_ID});
+		stream.close();
+	}
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(FileBasedErrorParserTests.class.getName());
+		File dir = CTestPlugin.getDefault().getFileInPlugin(new Path("resources/errortests/"));
+		File[] testsfiles = dir.listFiles();
+		for (int i = 0; i < testsfiles.length; i++) {
+			if (testsfiles[i].isFile())
+				suite.addTest(new FileBasedErrorParserTests(testsfiles[i]));
+		}
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GCCErrorParserTests.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GCCErrorParserTests.java
new file mode 100644
index 0000000..569f28b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GCCErrorParserTests.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 QNX Software Systems Ltd and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - initial API and implementation
+ *     Siemens AG - Basic test case
+ *******************************************************************************/
+package org.eclipse.cdt.core.internal.errorparsers.tests;
+
+
+import java.io.IOException;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * This test is designed to exercise the error parser capabilities.
+ */
+public class GCCErrorParserTests extends GenericErrorParserTests {
+
+	public static final String[] GCC_ERROR_STREAM1 = {
+			"qcc -c -I/qnx630/target/qnx6/usr/include -I/qnx630/target/qnx6/usr/include/photon -V3.3.1,gcc_ntox86 -w5 -O2   -I. ../abmain.c abmain.o",
+			"In file included from ../globals.h:9,", "                 from ../abmain.c:36:",
+			"../_combolist.h:34:24: warning: no newline at end of file",};
+	public static final int GCC_ERROR_STREAM1_WARNINGS = 1;
+	public static final int GCC_ERROR_STREAM1_ERRORS = 0;
+	public static final String[] GCC_ERROR_STREAM1_FILENAMES = {"_combolist.h"};
+
+	public static final String[] GCC_ERROR_STREAM2 = {"C:/QNX630/workspace/System/inc/RPNEvaluator.hpp:234: warning: `",
+			"	   RPNEvaluator<NumericType>::OperandConstant' is implicitly a typename",
+			"C:/QNX630/workspace/System/inc/RPNEvaluator.hpp:234: warning: implicit typename",
+			"	   is deprecated, please see the documentation for details"};
+	public static final int GCC_ERROR_STREAM2_WARNINGS = 2;
+	public static final int GCC_ERROR_STREAM2_ERRORS = 0;
+	public static final String[] GCC_ERROR_STREAM2_FILENAMES = {"RPNEvaluator.hpp"};
+	public static final String[] GCC_ERROR_STREAM2_DESCRIPTIONS = {"please see the documentation"};
+
+	public static final String[] GCC_ERROR_STREAM3 = {
+			"C:/QNX630/workspace/System/inc/RPNEvaluator.hpp:370: error: ISO C++ says that `",
+			"   char& String::operator[](unsigned int)' and `operator[]' are ambiguous even ",
+			"   though the worst conversion for the former is better than the worst ", "   conversion for the latter"};
+	public static final int GCC_ERROR_STREAM3_WARNINGS = 0;
+	public static final int GCC_ERROR_STREAM3_ERRORS = 1;
+	public static final String[] GCC_ERROR_STREAM3_FILENAMES = {"RPNEvaluator.hpp"};
+	public static final String[] GCC_ERROR_STREAM3_DESCRIPTIONS = {"ISO C++", "are ambiguous", "worst conversion",
+			"conversion for the latter"};
+
+	public static final String[] GCC_ERROR_STREAM4 = {"C:/QNX630/workspace/System/inc/RPNEvaluator.hpp: In member function `",
+			"   NumericType RPNEvaluator<NumericType>::evaluate(const char*) [with ", "   NumericType = int8]':",
+			"C:/QNX630/workspace/System/src/CommonScriptClasses.cpp:609:   instantiated from here",
+			"C:/QNX630/workspace/System/inc/RPNEvaluator.hpp:370: error: ISO C++ says that `",
+			"   char& String::operator[](unsigned int)' and `operator[]' are ambiguous even ",
+			"   though the worst conversion for the former is better than the worst ", "   conversion for the latter"};
+	public static final int GCC_ERROR_STREAM4_WARNINGS = 0;
+	public static final int GCC_ERROR_STREAM4_ERRORS = 1;
+	public static final String[] GCC_ERROR_STREAM4_FILENAMES = {"RPNEvaluator.hpp"};
+	public static final String[] GCC_ERROR_STREAM4_DESCRIPTIONS = {"ISO C++", "are ambiguous", "worst conversion for",
+			"conversion for the latter"};
+
+	public static final String[] GCC_ERROR_STREAM5 = {
+			"make -k all",
+			"gcc -c -g -o hallo.o main.c",
+			"main.c: In function `main':",
+			"main.c:6: error: `wrong' undeclared (first use in this function)",
+			"main.c:6: error: (Each undeclared identifier is reported only once",
+			"main.c:6: error: for each function it appears in.)",
+			"main.c:6: error: parse error before \"return\"",
+			"main.c:7:2: warning: no newline at end of file",
+			"make: *** [hallo.o] Error 1",
+			"make: Target `all' not remade because of errors." };
+	public static final int GCC_ERROR_STREAM5_WARNINGS = 1;
+	public static final int GCC_ERROR_STREAM5_ERRORS = 2;
+	public static final String[] GCC_ERROR_STREAM5_FILENAMES = {"main.c"};
+
+	/**
+	 * Constructor for IndexManagerTest.
+	 * 
+	 * @param name
+	 */
+	public GCCErrorParserTests() {
+		super();
+	}
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(GCCErrorParserTests.class);
+		return suite;
+	}
+
+	public void testMultipleIncludesError() throws IOException {
+		runParserTest(GCC_ERROR_STREAM1, GCC_ERROR_STREAM1_ERRORS, GCC_ERROR_STREAM1_WARNINGS, GCC_ERROR_STREAM1_FILENAMES, null,
+				new String[]{GCC_ERROR_PARSER_ID});
+	}
+
+/*
+ * Norbert Ploett
+ * I am commenting these tests out. The current error parser implementation
+ * invariably fails to correctly process the descriptions in multiline messages.
+ * My analysis indicates that these tests never were really in the automatic tests anyway.
+ * This test appears in org.eclipse.cdt.core.suite.AutomatedIntegrationSuite.suite() since it's version 1.31
+ * but was always commented out.
+ * I brought this up in http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg08668.html
+ * but did not get any replies.
+ * 
+	public void testMultiLineDescriptionError() throws IOException {
+		runParserTest(GCC_ERROR_STREAM2, GCC_ERROR_STREAM2_ERRORS, GCC_ERROR_STREAM2_WARNINGS, GCC_ERROR_STREAM2_FILENAMES,
+				GCC_ERROR_STREAM2_DESCRIPTIONS, new String[]{GCC_ERROR_PARSER_ID});
+	}
+
+	public void testLongMultiLineDescriptionError() throws IOException {
+		runParserTest(GCC_ERROR_STREAM3, GCC_ERROR_STREAM3_ERRORS, GCC_ERROR_STREAM3_WARNINGS, GCC_ERROR_STREAM3_FILENAMES,
+				GCC_ERROR_STREAM3_DESCRIPTIONS, new String[]{GCC_ERROR_PARSER_ID});
+	}
+
+	public void testMultiFileMultiLineSingleError() throws IOException {
+		runParserTest(GCC_ERROR_STREAM4, GCC_ERROR_STREAM4_ERRORS, GCC_ERROR_STREAM4_WARNINGS, GCC_ERROR_STREAM4_FILENAMES,
+				GCC_ERROR_STREAM4_DESCRIPTIONS, new String[]{GCC_ERROR_PARSER_ID});
+	}
+*/
+	
+	public void testBasicMessages() throws IOException {
+		runParserTest(GCC_ERROR_STREAM5, GCC_ERROR_STREAM5_ERRORS, GCC_ERROR_STREAM5_WARNINGS, GCC_ERROR_STREAM5_FILENAMES,
+				null, new String[]{GCC_ERROR_PARSER_ID});
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GLDErrorParserTests.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GLDErrorParserTests.java
new file mode 100644
index 0000000..f1cfb48
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GLDErrorParserTests.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Nokia and others.
+ * 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
+ *
+ * Contributors:
+ *     Ed Swartz (Nokia) - initial API and implementation, based on GCCErrorParserTests
+ *******************************************************************************/
+package org.eclipse.cdt.core.internal.errorparsers.tests;
+
+
+import java.io.IOException;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * This test is designed to exercise the error parser capabilities for GNU ld.
+ */
+public class GLDErrorParserTests extends GenericErrorParserTests {
+
+	// old style: no colons before sections
+	public static final String[] GLD_ERROR_STREAM0 = {
+		"make -k all",
+		"gcc -o hallo.o main.c libfoo.a",
+		"main.c(.text+0x14): undefined reference to `foo()'",
+		"main.o(.rodata+0x14): undefined reference to `something'",
+		"make: Target `all' not remade because of errors." };
+	public static final int GLD_ERROR_STREAM0_WARNINGS = 0;
+	public static final int GLD_ERROR_STREAM0_ERRORS = 2;
+	public static final String[] GLD_ERROR_STREAM0_FILENAMES = {"main.c","main.o"};
+	
+	// new style: colons before sections
+	public static final String[] GLD_ERROR_STREAM1 = {
+		"make -k all",
+		"gcc -o hallo.o main.c libfoo.a",
+		"main.c:(.text+0x14): undefined reference to `foo()'",
+		"main.o:(.rodata+0x14): undefined reference to `something'",
+		"make: Target `all' not remade because of errors." };
+	public static final int GLD_ERROR_STREAM1_WARNINGS = 0;
+	public static final int GLD_ERROR_STREAM1_ERRORS = 2;
+	public static final String[] GLD_ERROR_STREAM1_FILENAMES = {"main.c","main.o"};
+
+	public static final String[] GLD_ERROR_STREAM2 = {
+		"make -k all",
+		"gcc -o hallo.o main.c libfoo.a",
+		"libfoo.a(foo.o): In function `foo':",
+		"foo.c:(.text+0x7): undefined reference to `bar'",
+		"make: Target `all' not remade because of errors." };
+	public static final int GLD_ERROR_STREAM2_WARNINGS = 0;
+	public static final int GLD_ERROR_STREAM2_ERRORS = 1;
+	public static final String[] GLD_ERROR_STREAM2_FILENAMES = {"foo.c"};
+
+
+	public GLDErrorParserTests() {
+		super();
+	}
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(GLDErrorParserTests.class);
+		return suite;
+	}
+
+	public void testLinkerMessages0() throws IOException {
+		runParserTest(GLD_ERROR_STREAM0, GLD_ERROR_STREAM0_ERRORS, GLD_ERROR_STREAM0_WARNINGS, GLD_ERROR_STREAM0_FILENAMES,
+				null, new String[]{GLD_ERROR_PARSER_ID});
+	}
+	public void testLinkerMessages1() throws IOException {
+		runParserTest(GLD_ERROR_STREAM1, GLD_ERROR_STREAM1_ERRORS, GLD_ERROR_STREAM1_WARNINGS, GLD_ERROR_STREAM1_FILENAMES,
+				null, new String[]{GLD_ERROR_PARSER_ID});
+	}
+	public void testLinkerMessages2() throws IOException {
+		runParserTest(GLD_ERROR_STREAM2, GLD_ERROR_STREAM2_ERRORS, GLD_ERROR_STREAM2_WARNINGS, GLD_ERROR_STREAM2_FILENAMES,
+				null, new String[]{GLD_ERROR_PARSER_ID});
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java
new file mode 100644
index 0000000..74f4acc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java
@@ -0,0 +1,263 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 QNX Software Systems Ltd and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.internal.errorparsers.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.ErrorParserManager;
+import org.eclipse.cdt.core.IMarkerGenerator;
+import org.eclipse.cdt.core.ProblemMarkerInfo;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * This test is designed to exercise the error parser capabilities.
+ */
+public abstract class GenericErrorParserTests extends TestCase {
+	public static final String GCC_ERROR_PARSER_ID = "org.eclipse.cdt.core.GCCErrorParser";
+	public static final String GLD_ERROR_PARSER_ID = "org.eclipse.cdt.core.GLDErrorParser";
+
+	protected IProject fTempProject;
+
+	/**
+	 * Constructor for IndexManagerTest.
+	 * 
+	 * @param name
+	 */
+	public GenericErrorParserTests(String name) {
+		super(name);
+	}
+
+	public GenericErrorParserTests() {
+		super();
+	}
+
+	/*
+	 * @see TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+		fTempProject = ResourcesPlugin.getWorkspace().getRoot().getProject("temp-" + System.currentTimeMillis());
+		if (!fTempProject.exists()) {
+			fTempProject.create(new NullProgressMonitor());
+		}
+	}
+
+	/*
+	 * @see TestCase#tearDown()
+	 */
+	protected void tearDown() {
+		try {
+			super.tearDown();
+		} catch (Exception ex) {
+		}
+		try {
+			fTempProject.delete(true, true, new NullProgressMonitor());
+		} catch (Exception ex) {
+		}
+	}
+
+	protected IProject getTempProject() {
+		return fTempProject;
+	}
+
+	protected String makeStringFromArray(String[] pieces, String sep) {
+		StringBuffer buf = new StringBuffer();
+		for (int i = 0; i < pieces.length; i++) {
+			if (i != 0) {
+				buf.append(sep);
+			}
+			buf.append(pieces[i]);
+		}
+		return buf.toString();
+	}
+
+	protected void transferInputStreamToOutputStream(InputStream input, OutputStream output, int byteBlockSize) throws IOException {
+		byte[] buffer = new byte[byteBlockSize];
+		int bytesRead;
+
+		while ( (bytesRead = input.read(buffer)) >= 0) {
+			output.write(buffer, 0, bytesRead);
+		}
+
+		buffer = null;
+	}
+
+	protected void runParserTest(InputStream inputStream, int expectedErrorCount, int expectedWarningCount,
+			String[] expectedFileNames, String[] expectedDescriptions, String[] parserID) throws IOException {
+
+		assertNotNull(inputStream);
+
+		CountingMarkerGenerator markerGenerator = new CountingMarkerGenerator();
+
+		IProject project = getTempProject();
+		assertNotNull(project);
+
+		ErrorParserManager manager;
+		manager = new ImaginaryFilesErrorParserManager(project, markerGenerator, parserID);
+
+		transferInputStreamToOutputStream(inputStream, manager.getOutputStream(), 1024);
+		manager.close();
+		manager.reportProblems();
+
+		if (expectedErrorCount >= 0) {
+			assertEquals(expectedErrorCount, markerGenerator.numErrors);
+		}
+		if (expectedWarningCount >= 0) {
+			assertEquals(expectedWarningCount, markerGenerator.numWarnings);
+		}
+		if (expectedFileNames != null) {
+			assertEquals(expectedFileNames.length, markerGenerator.uniqFiles.size());
+			for (int i = 0; i < expectedFileNames.length; i++) {
+				IPath path = ((IFile)markerGenerator.uniqFiles.get(i)).getLocation();
+				assertEquals(expectedFileNames[i], path.lastSegment());
+			}
+		}
+
+		if (expectedDescriptions != null) {
+			assertNotNull(markerGenerator.lastDescription);
+			for (int i = 0; i < expectedDescriptions.length; i++) {
+				assertTrue(markerGenerator.lastDescription.matches(expectedDescriptions[i]));
+			}
+		}
+	}
+
+	protected void runParserTest(String[] dataStream, int expectedErrorCount, int expectedWarningCount, String[] expectedFileNames,
+			String[] expectedDescriptions, String[] parserID) throws IOException {
+		String errorStream = makeStringFromArray(dataStream, "\n");
+
+		ByteArrayInputStream inputStream = new ByteArrayInputStream(errorStream.getBytes());
+
+		runParserTest(inputStream, expectedErrorCount, expectedWarningCount, expectedFileNames, expectedDescriptions, parserID);
+	}
+
+	class FileNameComparator implements Comparator {
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+		 */
+		public int compare(Object arg0, Object arg1) {
+			try {
+				IFile f0 = (IFile)arg0;
+				IFile f1 = (IFile)arg1;
+				return f0.getName().compareToIgnoreCase(f1.getName());
+			} catch (Exception ex) {
+				/* Ignore */
+			}
+			return 1;
+		}
+	}
+
+	/**
+	 * Expand and grow this class to make it more usefull.
+	 */
+	class CountingMarkerGenerator implements IMarkerGenerator {
+
+		public int numErrors;
+		public int numWarnings;
+		public int numMarkers;
+		public ArrayList uniqFiles;
+		public String lastDescription;
+		private Comparator fFileNameComparator;
+
+		public void addMarker(IResource file, int lineNumber, String errorDesc, int severity, String errorVar) {
+			ProblemMarkerInfo problemMarkerInfo = new ProblemMarkerInfo(file, lineNumber, errorDesc, severity, errorVar, null);
+			addMarker(problemMarkerInfo);
+		}
+
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.cdt.core.IMarkerGenerator#addMarker(org.eclipse.cdt.core.ProblemMarkerInfo)
+		 */
+		public void addMarker(ProblemMarkerInfo problemMarkerInfo) {
+			int index = Collections.binarySearch(uniqFiles, problemMarkerInfo.file, fFileNameComparator);
+			if (index < 0) {
+				uniqFiles.add(-1 * (index + 1), problemMarkerInfo.file);
+			}
+
+			if (problemMarkerInfo.severity == SEVERITY_WARNING) {
+				numWarnings++;
+			} else if (problemMarkerInfo.severity == SEVERITY_ERROR_BUILD || problemMarkerInfo.severity == SEVERITY_ERROR_RESOURCE) {
+				numErrors++;
+			}
+
+			lastDescription = problemMarkerInfo.description;
+			numMarkers++;
+		}
+
+
+		public CountingMarkerGenerator() {
+			numErrors = 0;
+			numWarnings = 0;
+			uniqFiles = new ArrayList(0);
+			fFileNameComparator = new FileNameComparator();
+		}
+	}
+
+	/**
+	 * This class allows us to run error parsers for files which don't really
+	 * exist by just using the strings that come out as error codes.
+	 */
+	class ImaginaryFilesErrorParserManager extends ErrorParserManager {
+
+		IProject fProject;
+
+		public ImaginaryFilesErrorParserManager(IProject project, IMarkerGenerator generator, String[] ids) {
+			super(project, generator, ids);
+			fProject = project;
+		}
+
+		public IFile findFileName(String fileName) {
+			if (fileName.lastIndexOf('/') != -1) {
+				fileName = fileName.substring(fileName.lastIndexOf('/') + 1);
+			}
+			IFile file = fProject.getFile(fileName);
+			if (!file.exists()) {
+				try {
+					InputStream stream = new ByteArrayInputStream("TestFile".getBytes());
+					file.create(stream, true, new NullProgressMonitor());
+					stream.close();
+				} catch (Exception ex) {
+					/* Ignore */
+				}
+			}
+			return file;
+		}
+
+		protected IFile findFileInWorkspace(IPath path) {
+			IFile file = fProject.getFile(path.lastSegment());
+			if (!file.exists()) {
+				try {
+					InputStream stream = new ByteArrayInputStream("TestFile".getBytes());
+					file.create(stream, true, new NullProgressMonitor());
+					stream.close();
+				} catch (Exception ex) {
+					/* Ignore */
+				}
+			}
+			return file;
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ResourceHelper.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ResourceHelper.java
new file mode 100644
index 0000000..afa88a8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ResourceHelper.java
@@ -0,0 +1,557 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Andrew Gvozdev and others.
+ * 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
+ *
+ * Contributors:
+ *     Andrew Gvozdev - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.internal.errorparsers.tests;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.Assert;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.jobs.Job;
+
+/**
+ * This class contains utility methods for creating resources
+ * such as projects, files, folders etc. which are being used
+ * in test fixture of unit tests.
+ *
+ * Some classes with similar idea worth to look at:
+ * org.eclipse.core.filebuffers.tests.ResourceHelper,
+ * org.eclipse.cdt.ui.tests.text.ResourceHelper.
+ *
+ * @since 6.0
+ */
+
+public class ResourceHelper {
+	private final static IProgressMonitor NULL_MONITOR = new NullProgressMonitor();
+
+	private final static Set<String> externalFilesCreated = new HashSet<String>();
+	private final static Set<IResource> resourcesCreated = new HashSet<IResource>();
+
+	/**
+	 * Creates CDT project in a specific location and opens it.
+	 *
+	 * @param projectName - project name.
+	 * @param locationInWorkspace - location relative to workspace root.
+	 * @return - new {@link IProject}.
+	 * @throws CoreException - if the project can't be created.
+	 * @throws OperationCanceledException...
+	 */
+	public static IProject createCDTProject(String projectName, String locationInWorkspace) throws OperationCanceledException, CoreException {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IWorkspaceRoot root = workspace.getRoot();
+		IProject project = root.getProject(projectName);
+		resourcesCreated.add(project);
+		IProjectDescription description = workspace.newProjectDescription(projectName);
+		if(locationInWorkspace != null) {
+			IPath absoluteLocation = root.getLocation().append(locationInWorkspace);
+			description.setLocation(absoluteLocation);
+		}
+		project = CCorePlugin.getDefault().createCDTProject(description, project, NULL_MONITOR);
+		Assert.assertNotNull(project);
+		project.open(null);
+
+		try {
+			// CDT opens the Project with BACKGROUND_REFRESH enabled which causes the 
+			// refresh manager to refresh the project 200ms later.  This Job interferes
+			// with the resource change handler firing see: bug 271264
+			Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_REFRESH, null);
+		} catch (Exception e) {
+			// Ignore
+		}
+
+		Assert.assertTrue(project.isOpen());
+
+		return project;
+	}
+
+	/**
+	 * Creates CDT project in a specific location and opens it.
+	 *
+	 * @param projectName - project name.
+	 * @param locationURI - location.
+	 * @return - new {@link IProject}.
+	 * @throws CoreException - if the project can't be created.
+	 * @throws OperationCanceledException...
+	 */
+	public static IProject createCDTProject(String projectName, URI locationURI) throws OperationCanceledException, CoreException {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IWorkspaceRoot root = workspace.getRoot();
+		IProject project = root.getProject(projectName);
+		resourcesCreated.add(project);
+		IProjectDescription description = workspace.newProjectDescription(projectName);
+		description.setLocationURI(locationURI);
+		project = CCorePlugin.getDefault().createCDTProject(description, project, NULL_MONITOR);
+		Assert.assertNotNull(project);
+		project.open(null);
+
+		try {
+			// CDT opens the Project with BACKGROUND_REFRESH enabled which causes the 
+			// refresh manager to refresh the project 200ms later.  This Job interferes
+			// with the resource change handler firing see: bug 271264
+			Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_REFRESH, null);
+		} catch (Exception e) {
+			// Ignore
+		}
+
+		Assert.assertTrue(project.isOpen());
+
+		return project;
+	}
+
+	/**
+	 * Creates a project in the workspace and opens it.
+	 *
+	 * @param projectName - project name.
+	 * @return - new {@link IProject}.
+	 * @throws CoreException - if the project can't be created.
+	 * @throws OperationCanceledException...
+	 */
+	public static IProject createCDTProject(String projectName) throws OperationCanceledException, CoreException {
+		return createCDTProject(projectName, (String)null);
+	}
+
+	/**
+	 * Creates a file with specified content.
+	 *
+	 * @param file - file name.
+	 * @param contents - contents of the file.
+	 * @return file handle.
+	 * @throws CoreException - if the file can't be created.
+	 */
+	public static IFile createFile(IFile file, String contents) throws CoreException {
+		if (contents == null) {
+			contents= "";
+		}
+
+		InputStream inputStream = new ByteArrayInputStream(contents.getBytes());
+		file.create(inputStream, true, NULL_MONITOR);
+		resourcesCreated.add(file);
+		return file;
+	}
+
+	/**
+	 * Creates new file from project root with empty content. The filename
+	 * can include relative path as a part of the name but the the path
+	 * has to be present on disk.
+	 *
+	 * @param project - project where to create the file.
+	 * @param name - filename.
+	 * @return file handle.
+	 * @throws CoreException if something goes wrong.
+	 */
+	public static IFile createFile(IProject project, String name) throws CoreException {
+		if (new Path(name).segmentCount() > 1)
+			createFolder(project, new Path(name).removeLastSegments(1).toString());
+		return createFile(project.getFile(name), null);
+	}
+
+	/**
+	 * Creates new file from workspace root with empty content. The filename
+	 * can include relative path as a part of the name but the the path
+	 * has to be present on disk.
+	 * @param name - filename.
+	 * @return full path of the created file.
+	 *
+	 * @throws CoreException...
+	 * @throws IOException...
+	 */
+	public static IPath createWorkspaceFile(String name) throws CoreException, IOException {
+		IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+		IPath fullPath = workspaceRoot.getLocation().append(name);
+		java.io.File file = new java.io.File(fullPath.toOSString());
+		if (!file.exists()) {
+			boolean result = file.createNewFile();
+			Assert.assertTrue(result);
+		}
+		Assert.assertTrue(file.exists());
+
+		externalFilesCreated.add(fullPath.toOSString());
+		workspaceRoot.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+		return fullPath;
+	}
+
+	/**
+	 * Creates new folder from project root. The folder name
+	 * can include relative path as a part of the name but the the path
+	 * has to be present on disk.
+	 *
+	 * @param project - project where to create the folder.
+	 * @param name - folder name.
+	 * @return folder handle.
+	 * @throws CoreException if something goes wrong.
+	 */
+	public static IFolder createFolder(IProject project, String name) throws CoreException {
+		final IPath p = new Path(name);
+		IContainer folder = project;
+		for (String seg : p.segments()) {
+			folder = folder.getFolder(new Path(seg));
+			if (!folder.exists())
+				((IFolder)folder).create(true, true, NULL_MONITOR);
+		}
+		resourcesCreated.add(folder);
+		return (IFolder)folder;
+	}
+
+	/**
+	 * Creates new folder from workspace root. The folder name
+	 * can include relative path as a part of the name but the the path
+	 * has to be present on disk.
+	 *
+	 * @param name - folder name.
+	 * @return full folder path.
+	 * @throws IOException if something goes wrong.
+	 */
+	public static IPath createWorkspaceFolder(String name) throws CoreException, IOException {
+		IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+		IPath fullPath = workspaceRoot.getLocation().append(name);
+		java.io.File folder = new java.io.File(fullPath.toOSString());
+		if (!folder.exists()) {
+			boolean result = folder.mkdirs();
+			Assert.assertTrue(result);
+		}
+		Assert.assertTrue(folder.exists());
+
+		externalFilesCreated.add(fullPath.toOSString());
+		workspaceRoot.refreshLocal(IResource.DEPTH_INFINITE, NULL_MONITOR);
+		return fullPath;
+	}
+
+	/**
+	 * Creates new eclipse file-link from project root to file system file. The filename
+	 * can include relative path as a part of the name but the the path
+	 * has to be present on disk.
+	 *
+	 * @param project - project where to create the file.
+	 * @param fileLink - filename of the link being created.
+	 * @param realFile - file on the file system, the target of the link.
+	 * @return file handle.
+	 * @throws CoreException if something goes wrong.
+	 */
+	public static IFile createLinkedFile(IProject project, String fileLink, IPath realFile) throws CoreException {
+		IFile file = project.getFile(fileLink);
+		file.createLink(realFile, IResource.REPLACE, null);
+		Assert.assertTrue(file.exists());
+		resourcesCreated.add(file);
+		return file;
+	}
+
+	/**
+	 * Creates new eclipse file-link from project root to file system file. The filename
+	 * can include relative path as a part of the name but the the path
+	 * has to be present on disk.
+	 *
+	 * @param project - project where to create the file.
+	 * @param fileLink - filename of the link being created.
+	 * @param realFile - file on the file system, the target of the link.
+	 * @return file handle.
+	 * @throws CoreException if something goes wrong.
+	 */
+	public static IFile createLinkedFile(IProject project, String fileLink, String realFile) throws CoreException {
+		return createLinkedFile(project, fileLink, new Path(realFile));
+	}
+
+	/**
+	 * Creates new eclipse file-link from project root to EFS file.
+	 *
+	 * @param project - project where to create the file.
+	 * @param fileLink - filename of the link being created.
+	 * @param realFile - file on the EFS file system, the target of the link.
+	 * @return file handle.
+	 * @throws CoreException if something goes wrong.
+	 */
+	public static IFile createEfsFile(IProject project, String fileLink, URI realFile) throws CoreException {
+		IFile file= project.getFile(fileLink);
+		file.createLink(realFile, IResource.ALLOW_MISSING_LOCAL, NULL_MONITOR);
+		resourcesCreated.add(file);
+		return file;
+	}
+
+	/**
+	 * Creates new eclipse file-link from project root to EFS file.
+	 *
+	 * @param project - project where to create the file.
+	 * @param fileLink - filename of the link being created.
+	 * @param realFile - file on the EFS file system, the target of the link.
+	 * @return file handle.
+	 * @throws CoreException if something goes wrong.
+	 * @throws URISyntaxException if wrong URI syntax
+	 */
+	public static IFile createEfsFile(IProject project, String fileLink, String realFile) throws CoreException, URISyntaxException {
+		return createEfsFile(project,fileLink,new URI(realFile));
+	}
+
+	/**
+	 * Creates new eclipse folder-link from project root to file system folder. The folder name
+	 * can include relative path as a part of the name but the the path
+	 * has to be present on disk.
+	 *
+	 * @param project - project where to create the file.
+	 * @param folderLink - name of the link being created.
+	 * @param realFolder - folder on the file system, the target of the link.
+	 * @return file handle.
+	 * @throws CoreException if something goes wrong.
+	 */
+	public static IFolder createLinkedFolder(IProject project, String folderLink, IPath realFolder) throws CoreException {
+		IFolder folder = project.getFolder(folderLink);
+		folder.createLink(realFolder, IResource.REPLACE, null);
+		Assert.assertTrue(folder.exists());
+		resourcesCreated.add(folder);
+		return folder;
+	}
+
+	/**
+	 * Creates new eclipse folder-link from project root to file system folder. The folder name
+	 * can include relative path as a part of the name but the the path
+	 * has to be present on disk.
+	 *
+	 * @param project - project where to create the file.
+	 * @param folderLink - name of the link being created.
+	 * @param realFolder - folder on the file system, the target of the link.
+	 * @return file handle.
+	 * @throws CoreException if something goes wrong.
+	 */
+	public static IFolder createLinkedFolder(IProject project, String folderLink, String realFolder) throws CoreException {
+		return createLinkedFolder(project, folderLink, new Path(realFolder));
+	}
+
+	/**
+	 * Creates new eclipse folder-link from project root to EFS folder.
+	 *
+	 * @param project - project where to create the folder.
+	 * @param folderLink - folder name of the link being created.
+	 * @param realFolder - folder on the EFS file system, the target of the link.
+	 * @return folder handle.
+	 * @throws CoreException if something goes wrong.
+	 */
+	public static IFolder createEfsFolder(IProject project, String folderLink, URI realFolder) throws CoreException {
+		IFolder folder= project.getFolder(folderLink);
+		if (folder.exists()) {
+			Assert.assertEquals("Folder with the same name but different location already exists",
+					realFolder, folder.getLocationURI());
+			return folder;
+		}
+
+		folder.createLink(realFolder, IResource.ALLOW_MISSING_LOCAL, new NullProgressMonitor());
+		resourcesCreated.add(folder);
+		return folder;
+	}
+
+	/**
+	 * Creates new eclipse folder-link from project root to EFS folder.
+	 *
+	 * @param project - project where to create the folder.
+	 * @param folderLink - folder name of the link being created.
+	 * @param realFolder - folder on the EFS file system, the target of the link.
+	 * @return folder handle.
+	 * @throws CoreException if something goes wrong.
+	 * @throws URISyntaxException if wrong URI syntax
+	 */
+	public static IFolder createEfsFolder(IProject project, String folderLink, String realFolder) throws CoreException, URISyntaxException {
+		return createEfsFolder(project,folderLink,new URI(realFolder));
+	}
+
+	/**
+	 * Creates new symbolic file system link from file or folder on project root
+	 * to another file system file. The filename can include relative path
+	 * as a part of the name but the the path has to be present on disk.
+	 *
+	 * @param project - project where to create the file.
+	 * @param linkName - name of the link being created.
+	 * @param realPath - file or folder on the file system, the target of the link.
+	 * @return file handle.
+	 *
+	 * @throws UnsupportedOperationException on Windows where links are not supported.
+	 * @throws IOException...
+	 * @throws CoreException...
+	 */
+	public static IResource createSymbolicLink(IProject project, String linkName, IPath realPath)
+		throws IOException, CoreException, UnsupportedOperationException {
+
+		if (Platform.getOS().equals(Platform.OS_WIN32)) {
+			throw new UnsupportedOperationException("Windows links .lnk are not supported.");
+		}
+
+		IPath linkedPath = project.getLocation().append(linkName);
+		String command = "ln -s " + realPath.toOSString() + ' ' + linkedPath.toOSString();
+		Process process = Runtime.getRuntime().exec(command);
+
+		try {
+			process.waitFor();
+		} catch (InterruptedException e) {
+		}
+
+		project.refreshLocal(IResource.DEPTH_INFINITE, null);
+
+		IResource resource = project.getFile(linkName);
+		if (!resource.exists()) {
+			resource = project.getFolder(linkName);
+		}
+		Assert.assertTrue(resource.exists());
+
+		externalFilesCreated.add(linkedPath.toOSString());
+		ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, NULL_MONITOR);
+		return resource;
+	}
+
+	/**
+	 * Creates new symbolic file system link from file or folder on project root
+	 * to another file system file. The filename can include relative path
+	 * as a part of the name but the the path has to be present on disk.
+	 *
+	 * @param project - project where to create the file.
+	 * @param linkName - name of the link being created.
+	 * @param realPath - file or folder on the file system, the target of the link.
+	 * @return file handle.
+	 *
+	 * @throws UnsupportedOperationException on Windows where links are not supported.
+	 * @throws IOException...
+	 * @throws CoreException...
+	 */
+	public static IResource createSymbolicLink(IProject project, String linkName, String realPath)
+		throws IOException, CoreException, UnsupportedOperationException {
+
+		return createSymbolicLink(project, linkName, new Path(realPath));
+	}
+
+	/**
+	 * Conversion from Windows path to Cygwin path.
+	 *
+	 * @param windowsPath - Windows path.
+	 * @return Cygwin style converted path.
+	 * @throws UnsupportedOperationException if Cygwin is unavailable.
+	 * @throws IOException on IO problem.
+	 */
+	public static String windowsToCygwinPath(String windowsPath) throws IOException, UnsupportedOperationException {
+		if (!Platform.getOS().equals(Platform.OS_WIN32)) {
+			// Don't run this on non-windows platforms
+			throw new UnsupportedOperationException("Not a Windows system, Cygwin is unavailable.");
+		}
+		String[] args = {"cygpath", "-u", windowsPath};
+		Process cygpath;
+		try {
+			cygpath = Runtime.getRuntime().exec(args);
+		} catch (IOException ioe) {
+			throw new UnsupportedOperationException("Cygwin utility cygpath is not in the system search path.");
+		}
+		BufferedReader stdout = new BufferedReader(new InputStreamReader(cygpath.getInputStream()));
+
+		String cygwinPath = stdout.readLine();
+		if (cygwinPath == null) {
+			throw new UnsupportedOperationException("Cygwin utility cygpath is not available.");
+		}
+		return cygwinPath.trim();
+	}
+
+	/**
+	 * Conversion from Cygwin path to Windows path.
+	 *
+	 * @param cygwinPath - Cygwin path.
+	 * @return Windows style converted path.
+	 * @throws UnsupportedOperationException if Cygwin is unavailable.
+	 * @throws IOException on IO problem.
+	 */
+	public static String cygwinToWindowsPath(String cygwinPath) throws IOException, UnsupportedOperationException {
+		if (!Platform.getOS().equals(Platform.OS_WIN32)) {
+			// Don't run this on non-windows platforms
+			throw new UnsupportedOperationException("Not a Windows system, Cygwin is unavailable.");
+		}
+		String[] args = {"cygpath", "-w", cygwinPath};
+		Process cygpath;
+		try {
+			cygpath = Runtime.getRuntime().exec(args);
+		} catch (IOException ioe) {
+			throw new UnsupportedOperationException("Cygwin utility cygpath is not in the system search path.");
+		}
+		BufferedReader stdout = new BufferedReader(new InputStreamReader(cygpath.getInputStream()));
+
+		String windowsPath = stdout.readLine();
+		if (windowsPath == null) {
+			throw new UnsupportedOperationException("Cygwin utility cygpath is not available.");
+		}
+		return windowsPath.trim();
+	}
+
+	/**
+	 * Clean-up any files created as part of a unit test.
+	 * This method removes *all* Workspace IResources and any external
+	 * files / folders created with the #createWorkspaceFile #createWorkspaceFolder
+	 * methods in this class
+	 */
+	public static void cleanUp() throws CoreException, IOException {
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		root.refreshLocal(IResource.DEPTH_INFINITE, NULL_MONITOR);
+		
+		// Delete all external files & folders created using ResourceHelper
+		for (String loc : externalFilesCreated) {
+			File f = new File(loc);
+			if (f.exists())
+				deleteRecursive(f);
+		}
+		externalFilesCreated.clear();
+		
+		// Remove IResources created by this helper
+		for (IResource r : resourcesCreated) {
+			if (r.exists())
+				try {
+					r.delete(true, NULL_MONITOR);
+				} catch (CoreException e) {
+					// Ignore
+				}
+		}
+		resourcesCreated.clear();
+	}
+
+	/**
+	 * Recursively delete a directory / file
+	 *
+	 * For safety this method only deletes files created under the workspace
+	 *
+	 * @param file
+	 */
+	private static final void deleteRecursive(File f) throws IllegalArgumentException {
+		// Ensure that the file being deleted is a child of the workspace
+		// root to prevent anything nasty happening
+		if (! f.getAbsolutePath().startsWith(
+				ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile().getAbsolutePath()))
+			throw new IllegalArgumentException("File must exist within the workspace!");
+
+		if (f.isDirectory())
+			for (File f1 : f.listFiles())
+				deleteRecursive(f1);
+		f.delete();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/index/provider/test/AbstractDummyProvider.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/index/provider/test/AbstractDummyProvider.java
new file mode 100644
index 0000000..454c3a2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/index/provider/test/AbstractDummyProvider.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Ltd. and others.
+ * 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
+ *
+ * Contributors:
+ *    Andrew Ferguson (Symbian) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.internal.index.provider.test;
+
+import org.eclipse.cdt.core.index.provider.IPDOMDescriptor;
+import org.eclipse.cdt.core.index.provider.IReadOnlyPDOMProvider;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Provides no pdom descriptors, used for testing the behaviour of IndexManager over
+ * project lifecycles.
+ */
+public class AbstractDummyProvider implements IReadOnlyPDOMProvider {
+	public AbstractDummyProvider() {}
+	
+	public IPDOMDescriptor[] getDescriptors(ICConfigurationDescription config) {
+		DummyProviderTraces.getInstance().getCfgsTrace(getClass()).add(config);
+		return new IPDOMDescriptor[0];
+	}
+	
+	public boolean providesFor(ICProject project) throws CoreException {
+		DummyProviderTraces.getInstance().getProjectsTrace(getClass()).add(project);
+		return true;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/index/provider/test/DummyProviderTraces.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/index/provider/test/DummyProviderTraces.java
new file mode 100644
index 0000000..89f1740
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/index/provider/test/DummyProviderTraces.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Ltd. and others.
+ * 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
+ *
+ * Contributors:
+ *    Andrew Ferguson (Symbian) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.internal.index.provider.test;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class DummyProviderTraces {
+	static DummyProviderTraces instance = new DummyProviderTraces();
+	
+	public static DummyProviderTraces getInstance() { return instance; }
+	
+	private DummyProviderTraces() {}
+	
+	Map/*<String, List>*/ id2prjTrace= new HashMap();
+	Map/*<String, List>*/ id2cfgTrace= new HashMap();
+	
+	public List getProjectsTrace(Class provider) {
+		String key= provider.getName();
+		if(!id2prjTrace.containsKey(key)) {
+			id2prjTrace.put(key, Collections.synchronizedList(new ArrayList()));
+		}
+		return (List) id2prjTrace.get(key);
+	}
+	
+	public List getCfgsTrace(Class provider) {
+		String key= provider.getName();
+		if(!id2cfgTrace.containsKey(key)) {
+			id2cfgTrace.put(key, Collections.synchronizedList(new ArrayList()));
+		}
+		return (List) id2cfgTrace.get(key);
+	}
+	
+	public void reset(Class provider) {
+		getProjectsTrace(provider).clear();
+		getCfgsTrace(provider).clear();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/index/provider/test/Providers.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/index/provider/test/Providers.java
new file mode 100644
index 0000000..4b0c4c8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/index/provider/test/Providers.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Ltd. and others.
+ * 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
+ *
+ * Contributors:
+ *    Andrew Ferguson (Symbian) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.internal.index.provider.test;
+
+public class Providers {
+	public static class Dummy1 extends AbstractDummyProvider {}
+	public static class Dummy2 extends AbstractDummyProvider {}
+	public static class Dummy3 extends AbstractDummyProvider {}
+	public static class Dummy4 extends AbstractDummyProvider {}
+	public static class Dummy5 extends AbstractDummyProvider {}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/PositionTrackerTests.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/PositionTrackerTests.java
new file mode 100644
index 0000000..688384f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/PositionTrackerTests.java
@@ -0,0 +1,358 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.core.internal.tests;
+
+import java.util.Random;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.internal.core.PositionTracker;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+
+public class PositionTrackerTests extends TestCase {
+    public static Test suite() {
+        return new TestSuite(PositionTrackerTests.class);
+    }
+
+    public void testInitialFailures() {
+        int[][] moves = {
+            {46, -18, 95, -76, 98, -89, 10, -10, 85, -80, 16, 6, 5, -3, 
+                22, -8, 29, -20, 86, -62, 34, -21, 63, -41, 9, 10, 18, -7},
+            {0, 2,  1,-4},
+            {4,-1,  0, 2, 0,-5},
+            {0, 1,  2, 1, 0,-5},
+            {0, 1,  2,-3, 1,-4},
+            {4, 3,  3,-2, 0,-1},
+            {4,-1,  3, 1, 2,-1},
+            {0, 1,  2, 8, 1,-8, 0,-10},
+            {4,-1,  2, 1, 4, 1, 0,-1, 0,-5},
+        };
+        int[] buffer = new int[100];
+        for (int i = 0; i < moves.length; i++) {
+            testMove(buffer, moves[i]);
+        }
+    }
+
+    public void testRotations() {
+        int[][] moves = { { 0, 1, 2, 1, 4, 1, 6, 1, 8, 1, 10, 1, 12, 1, 14, 1, 16, 1, 18, 1, 20, 1, 22, 1, 24, 1 }, {
+                15, 1, 14, 1, 13, 1, 12, 1, 11, 1, 10, 1, 9, 1, 8, 1, 7, 1, 6, 1, 5, 1, 4, 1, 3, 1 }, {
+                0, 1, 10, 1, 2, 1, 20, 1, 4, 1, 20, 1, 6, 1, 20, 1, 8, 1, 20, 1, 10, 1, 20, 1, 12, 1 }, };
+        int[] buffer = new int[30];
+        for (int i = 0; i < moves.length; i++) {
+            assertTrue(testMove(buffer, moves[i]).depth() <= 5);
+        }
+    }
+
+    public void testDepth4() {
+        fullTest(5, 4);
+    }
+
+    public void testRandomDepth5() {
+        randomTest(20, 5, 5, 1000);
+    }
+
+    public void testRandomDepth10() {
+        randomTest(50, 10, 10, 1000);
+    }
+
+    public void testRandomDepth15() {
+        randomTest(100, 15, 15, 1000);
+    }
+
+    public void testRandomDepth20() {
+        randomTest(100, 15, 20, 1000);
+    }
+
+    public void testRetireDepth2() {
+        randomRetireTest(100, 10, 25, 2, 1000);
+    }
+
+    public void testRetireDepth5() {
+        randomRetireTest(100, 10, 10, 5, 1000);
+    }
+
+    public void testRetireDepth10() {
+        randomRetireTest(100, 10, 5, 10, 1000);
+    }
+
+    public static void fullTest(int len, int depth) {
+        // init buffer
+        int[] buffer = new int[len];
+        int[] move = new int[2 * depth];
+        for (int i = 0; i < move.length; i++) {
+            move[i] = -1;
+        }
+        while (nextMove(move, len)) {
+            testMove(buffer, move);
+        }
+    }
+
+    public static void randomTest(int buflen, int changelen, int depth, int count) {
+        // init buffer
+        Random rand = new Random();
+
+        int[] buffer = new int[buflen];
+        int[] move = new int[2 * depth];
+
+        for (int j = 0; j < count; j++) {
+            for (int i = 0; i < move.length; i += 2) {
+                move[i] = rand.nextInt(buflen);
+                move[i + 1] = rand.nextInt(2 * changelen) - changelen;
+            }
+            testMove(buffer, move);
+        }
+    }
+
+    public static void randomRetireTest(int buflen, int changelen, int depth, int trackerDepth, int count) {
+        // init buffer
+        Random rand = new Random();
+
+        int[] buffer = new int[buflen];
+        int[] move = new int[2 * depth];
+
+        for (int j = 0; j < count; j++) {
+            for (int i = 0; i < buffer.length; i++) {
+                buffer[i] = i;
+            }
+
+            PositionTracker t0 = null;
+            PositionTracker previous = null;
+            for (int t = 0; t < trackerDepth; t++) {
+                for (int i = 0; i < move.length; i += 2) {
+                    move[i] = rand.nextInt(buflen);
+                    move[i + 1] = rand.nextInt(2 * changelen) - changelen;
+                }
+                PositionTracker tracker = new PositionTracker();
+                if (previous != null) {
+                    previous.retire(tracker);
+                }
+                doMove(buffer, move, tracker);
+                if (t0 == null) {
+                    t0 = tracker;
+                }
+                previous = tracker;
+            }
+            check(t0, buffer);
+        }
+    }
+
+    static PositionTracker testMove(int[] buffer, int[] move) {
+        try {
+            return __testMove(buffer, move);
+        } catch (RuntimeException e) {
+            System.out.println("Error on move: ");  //$NON-NLS-1$
+            for (int i = 0; i < move.length; i++) {
+                System.out.print(move[i] + ", ");  //$NON-NLS-1$
+            }
+            System.out.println();
+            throw e;
+        } catch (Error e) {
+            System.out.println("Error on move: ");  //$NON-NLS-1$
+            for (int i = 0; i < move.length; i++) {
+                System.out.print(move[i] + ", ");  //$NON-NLS-1$
+            }
+            System.out.println();
+            throw e;
+        }
+    }
+
+    static PositionTracker __testMove(int[] buffer, int[] move) {
+        PositionTracker tracker = new PositionTracker();
+        for (int i = 0; i < buffer.length; i++) {
+            buffer[i] = i;
+        }
+        doMove(buffer, move, tracker);
+        check(tracker, buffer);
+        return tracker;
+    }
+
+    static void doMove(int[] buffer, int[] move, PositionTracker tracker) {
+        for (int i = 0; i < move.length; i += 2) {
+            int m1 = move[i];
+            int m2 = move[i + 1];
+            if (m1 == -1) {
+                break;
+            }
+            if (m2 > 0) {
+                tracker.insert(m1, m2);
+                for (int j = 0; j < buffer.length; j++) {
+                    if (buffer[j] >= m1) {
+                        buffer[j] += m2;
+                    }
+                }
+            } else {
+                tracker.delete(m1, -m2);
+                int m3 = m1 - m2;
+                for (int j = 0; j < buffer.length; j++) {
+                    if (buffer[j] >= m1) {
+                        if (buffer[j] < m3) {
+                            buffer[j] = -1;
+                        } else {
+                            buffer[j] += m2;
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    private static void check(PositionTracker tracker, int[] buffer) {
+        int lasti2 = -1;
+        for (int i = 0; i < buffer.length; i++) {
+            int i2 = buffer[i];
+            if (i2 >= 0) {
+                int i22 = tracker.currentOffset(i);
+                assertEquals(i22, i2);
+                assertTrue(lasti2 < i22);
+                lasti2 = i22;
+
+                assertEquals(i, tracker.historicOffset(i2));
+            }
+        }
+    }
+
+    private static boolean nextMove(int[] move, int bufLen) {
+        for (int i = 0; i < move.length; i += 2) {
+            int m1 = move[i];
+            if (m1 < 0) {
+                move[i] = 0;
+                move[i + 1] = -bufLen;
+                return true;
+            }
+            int m2 = ++move[i + 1];
+            if (m2 <= bufLen - m1) {
+                return true;
+            }
+            if (m1 < bufLen - 1) {
+                move[i]++;
+                move[i + 1] = -bufLen + m1 + 1;
+                return true;
+            }
+            move[i] = 0;
+            move[i + 1] = -bufLen;
+        }
+        return false;
+    }
+    
+    public void testInsertion() {
+        PositionTracker pt= new PositionTracker();
+        pt.insert(1,1);
+        
+        checkInsert11(pt);
+    }
+
+    private void checkInsert11(PositionTracker pt) {
+        // chars
+        doubleCheck(pt, 0, 0);
+        backwdCheck(pt, 1, 1);
+        doubleCheck(pt, 1, 2);
+        doubleCheck(pt, 2, 3);
+        
+        // ranges
+        doubleRangeCheck(pt, new Region(0,2), new Region(0,3));
+        backwdRangeCheck(pt, new Region(0,1), new Region(0,2));
+        doubleRangeCheck(pt, new Region(0,1), new Region(0,1));
+        backwdRangeCheck(pt, new Region(1,0), new Region(1,1));
+        backwdRangeCheck(pt, new Region(1,0), new Region(1,0));
+        doubleRangeCheck(pt, new Region(1,1), new Region(2,1));
+        doubleRangeCheck(pt, new Region(1,0), new Region(2,0));
+    }
+
+    public void testDeletion() {
+        PositionTracker pt= new PositionTracker();
+        pt.delete(1,1);
+        checkDelete11(pt);
+    }
+
+    private void checkDelete11(PositionTracker pt) {
+        doubleCheck(pt, 0, 0);
+        fwdCheck   (pt, 1, 1);
+        doubleCheck(pt, 2, 1);
+        doubleCheck(pt, 3, 2);
+
+        // ranges
+        doubleRangeCheck(pt, new Region(0,3), new Region(0,2));
+        fwdRangeCheck   (pt, new Region(0,2), new Region(0,1));
+        doubleRangeCheck(pt, new Region(0,1), new Region(0,1));
+        fwdRangeCheck   (pt, new Region(1,1), new Region(1,0));
+        fwdRangeCheck   (pt, new Region(1,0), new Region(1,0));
+        doubleRangeCheck(pt, new Region(2,1), new Region(1,1));
+        doubleRangeCheck(pt, new Region(2,0), new Region(1,0));
+    }
+    
+    public void testReplace() {
+        PositionTracker pt= new PositionTracker();
+        pt.delete(1,1);
+        pt.insert(1,1);
+        doubleCheck(pt, 0, 0);
+        doubleCheck(pt, 1, 1);
+        doubleCheck(pt, 2, 2);
+        doubleCheck(pt, 3, 3);
+
+        pt.clear();
+        pt.insert(1,1);
+        pt.delete(1,1);
+        doubleCheck(pt, 0, 0);
+        doubleCheck(pt, 1, 1);
+        doubleCheck(pt, 2, 2);
+        doubleCheck(pt, 3, 3);
+        
+        pt.clear();
+        pt.delete(0,2);
+        pt.insert(0,1);
+        checkDelete11(pt);
+
+        pt.clear();
+        pt.insert(1,1);
+        pt.delete(1,2);
+        checkDelete11(pt);
+
+        pt.clear();
+        pt.insert(1,2);
+        pt.delete(1,1);
+        checkInsert11(pt);
+
+        pt.clear();
+        pt.delete(1,1);
+        pt.insert(1,2);
+        checkInsert11(pt);
+    }       
+
+    private void doubleCheck(PositionTracker pt, int orig, int mapped) {
+        fwdCheck(pt, orig, mapped);
+        backwdCheck(pt, orig, mapped); 
+    }
+
+    private void fwdCheck(PositionTracker pt, int orig, int mapped) {
+        assertEquals(mapped, pt.currentOffset(orig));
+    }
+
+    private void backwdCheck(PositionTracker pt, int orig, int mapped) {
+        assertEquals(orig, pt.historicOffset(mapped));
+    }
+    
+    private void doubleRangeCheck(PositionTracker pt, IRegion orig, IRegion mapped) {
+        fwdRangeCheck(pt, orig, mapped);
+        backwdRangeCheck(pt, orig, mapped);         
+    }
+
+    private void fwdRangeCheck(PositionTracker pt, IRegion orig, IRegion mapped) {
+        assertEquals(mapped, pt.historicToActual(orig));
+    }
+
+    private void backwdRangeCheck(PositionTracker pt, IRegion orig, IRegion mapped) {
+        assertEquals(orig, pt.actualToHistoric(mapped));
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/ResourceLookupTests.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/ResourceLookupTests.java
new file mode 100644
index 0000000..f001d90
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/ResourceLookupTests.java
@@ -0,0 +1,233 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.core.internal.tests;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.internal.core.resources.ResourceLookup;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class ResourceLookupTests extends TestCase {
+    public static Test suite() {
+        return new TestSuite(ResourceLookupTests.class);
+    }
+
+	private IProject fProject;
+
+    @Override
+	protected void setUp() {
+		final IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		fProject= root.getProject("reslookup");
+    }
+    
+    @Override
+	protected void tearDown() throws Exception {
+		fProject.delete(true, new NullProgressMonitor());
+    }
+    
+	protected IFolder createFolder(IProject project, String filename) throws CoreException {
+		IFolder folder= project.getFolder(filename);
+		folder.create(true, false, new NullProgressMonitor());
+		return folder;
+	}
+
+	protected IFile createFile(IProject project, String filename) throws CoreException {
+		IFile file= project.getFile(filename);
+		file.create(new InputStream() {
+			@Override
+			public int read() throws IOException {
+				return -1;
+			}}, true, new NullProgressMonitor());
+		return file;
+	}
+    
+	public void testNameLookup() throws CoreException {
+		IProject[] prjs= new IProject[]{fProject};
+
+		fProject.create(new NullProgressMonitor());
+		fProject.open(new NullProgressMonitor());
+		createFolder(fProject, "folder1");
+		createFolder(fProject, "folder2");
+		createFile(fProject, "abc.h");
+		createFile(fProject, "folder1/abc.h");
+		createFile(fProject, "folder2/abC.h");
+
+		IFile[] files= ResourceLookup.findFilesByName(new Path("abc.h"), prjs, false);
+		assertEquals(2, files.length);
+		files= ResourceLookup.findFilesByName(new Path("bla/../abc.h"), prjs, false);
+		assertEquals(2, files.length);
+		files= ResourceLookup.findFilesByName(new Path("../abc.h"), prjs, false);
+		assertEquals(2, files.length);
+		files= ResourceLookup.findFilesByName(new Path("../../abc.h"), prjs, false);
+		assertEquals(2, files.length);
+
+		files= ResourceLookup.findFilesByName(new Path("abc.h"), prjs, true);
+		assertEquals(3, files.length);
+
+		files= ResourceLookup.findFilesByName(new Path("folder1/abc.h"), prjs, false);
+		assertEquals(1, files.length);
+		files= ResourceLookup.findFilesByName(new Path("folder1/abC.h"), prjs, false);
+		assertEquals(0, files.length);
+		files= ResourceLookup.findFilesByName(new Path("fOlder1/abc.h"), prjs, false);
+		assertEquals(0, files.length);
+
+		files= ResourceLookup.findFilesByName(new Path("folder1/abc.h"), prjs, true);
+		assertEquals(1, files.length);
+		files= ResourceLookup.findFilesByName(new Path("folder1/abC.h"), prjs, true);
+		assertEquals(1, files.length);
+		files= ResourceLookup.findFilesByName(new Path("fOlder1/abc.h"), prjs, true);
+		assertEquals(1, files.length);
+
+		files= ResourceLookup.findFilesByName(new Path("bla/../abc.h"), prjs, true);
+		assertEquals(3, files.length);
+	}
+
+	public void testResourceDelta() throws CoreException {
+		IProject[] prjs= new IProject[]{fProject};
+		fProject.create(new NullProgressMonitor());
+		fProject.open(new NullProgressMonitor());
+
+		IFile[] files= ResourceLookup.findFilesByName(new Path("abc.h"), prjs, true);
+		assertEquals(0, files.length);
+
+		IFolder f1= createFolder(fProject, "folder1");
+		createFolder(fProject, "folder2");
+		IFile f2= createFile(fProject, "abc.h");
+		files= ResourceLookup.findFilesByName(new Path("abc.h"), prjs, true);
+		assertEquals(1, files.length);
+
+		createFile(fProject, "folder1/abc.h");
+		files= ResourceLookup.findFilesByName(new Path("abc.h"), prjs, true);
+		assertEquals(2, files.length);
+
+		createFile(fProject, "folder2/abC.h");
+		files= ResourceLookup.findFilesByName(new Path("abc.h"), prjs, true);
+		assertEquals(3, files.length);
+		
+		f1.delete(true, new NullProgressMonitor());
+		files= ResourceLookup.findFilesByName(new Path("abc.h"), prjs, true);
+		assertEquals(2, files.length);
+		
+		f2.delete(true, new NullProgressMonitor());
+		files= ResourceLookup.findFilesByName(new Path("abc.h"), prjs, true);
+		assertEquals(1, files.length);
+	}
+
+	public void testDeref() throws CoreException {
+		IProject[] prjs= new IProject[]{fProject};
+
+		fProject.create(new NullProgressMonitor());
+		fProject.open(new NullProgressMonitor());
+		createFolder(fProject, "folder1");
+		createFolder(fProject, "folder2");
+		createFile(fProject, "abc.h");
+		IFile[] files= ResourceLookup.findFilesByName(new Path("abc.h"), prjs, true);
+		assertEquals(1, files.length);
+		
+		ResourceLookup.unrefNodeMap();
+		createFile(fProject, "folder1/abc.h");
+		createFile(fProject, "folder2/abC.h");
+
+		files= ResourceLookup.findFilesByName(new Path("abc.h"), prjs, true);
+		assertEquals(3, files.length);
+		
+		ResourceLookup.unrefNodeMap();
+		files= ResourceLookup.findFilesByName(new Path("abc.h"), prjs, true);
+		assertEquals(3, files.length);		
+	}
+	
+	public void testCollected() throws CoreException {
+		IProject[] prjs= new IProject[]{fProject};
+
+		fProject.create(new NullProgressMonitor());
+		fProject.open(new NullProgressMonitor());
+		createFolder(fProject, "folder1");
+		createFolder(fProject, "folder2");
+		createFile(fProject, "abc.h");
+		IFile[] files= ResourceLookup.findFilesByName(new Path("abc.h"), prjs, true);
+		assertEquals(1, files.length);
+		
+		ResourceLookup.simulateNodeMapCollection();
+		createFile(fProject, "folder1/abc.h");
+		createFile(fProject, "folder2/abC.h");
+
+		files= ResourceLookup.findFilesByName(new Path("abc.h"), prjs, true);
+		assertEquals(3, files.length);
+		
+		ResourceLookup.simulateNodeMapCollection();
+		files= ResourceLookup.findFilesByName(new Path("abc.h"), prjs, true);
+		assertEquals(3, files.length);		
+	}
+	
+	public void testFindFilesByLocation() throws Exception {
+		fProject.create(new NullProgressMonitor());
+		fProject.open(new NullProgressMonitor());
+		createFolder(fProject, "folder1");
+		createFolder(fProject, "folder2");
+		IFile file= createFile(fProject, "abc.h");
+		createFile(fProject, "folder1/abc.h");
+		createFile(fProject, "folder2/abC.h");
+
+		URI uri= file.getLocationURI();
+		IPath path= file.getLocation();
+		IFile[] files= ResourceLookup.findFilesForLocationURI(uri);
+		assertEquals(1, files.length);
+		files= ResourceLookup.findFilesForLocation(path);
+		assertEquals(1, files.length);
+
+		if (new File("a").equals(new File("A"))) {
+			URI upperCase= new URI(uri.getScheme(), uri.getSchemeSpecificPart().toUpperCase(), uri.getFragment());
+			IPath upperCasePath= new Path(path.toString().toUpperCase());
+			files= ResourceLookup.findFilesForLocationURI(upperCase);
+			assertEquals(1, files.length);
+			files= ResourceLookup.findFilesForLocation(upperCasePath);
+			assertEquals(1, files.length);
+		}		
+	}
+	
+	public void testLinkedResourceFiles() throws Exception {
+		IProject[] prjs= new IProject[]{fProject};
+
+		fProject.create(new NullProgressMonitor());
+		fProject.open(new NullProgressMonitor());
+		createFolder(fProject, "folder1");
+		File f= File.createTempFile("extern", "h");
+		IPath location= Path.fromOSString(f.getAbsolutePath());
+		IFile file1= fProject.getFile("linked1");
+		IFile file2= fProject.getFile("linked2.h");
+		file1.createLink(location, 0, new NullProgressMonitor());
+		file2.createLink(location, 0, new NullProgressMonitor());
+
+		IFile[] files = ResourceLookup.findFilesForLocation(location);
+		assertEquals(2, files.length);
+		
+		files= ResourceLookup.findFilesByName(new Path(location.lastSegment()), prjs, false);
+		assertEquals(2, files.length);
+
+		files= ResourceLookup.findFilesByName(new Path("linked2.h"), prjs, false);
+		assertEquals(0, files.length);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/StringBuilderTest.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/StringBuilderTest.java
new file mode 100644
index 0000000..cfd4af7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/StringBuilderTest.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.core.internal.tests;
+
+import java.lang.reflect.Method;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class StringBuilderTest extends TestCase {
+    public static Test suite() {
+        return new TestSuite(StringBuilderTest.class);
+    }
+
+    public void testSafe() {
+    	StringBuilder b1= new StringBuilder();
+    	StringBuilder b2= new StringBuilder();
+    	b1.append("a");
+    	b2.append("b");
+    	CharSequence cs= b2;
+    	b1.append(cs);
+    	assertEquals("ab", b1.toString());
+    }
+    
+    public void testBug220158() {
+    	StringBuilder b1= new StringBuilder();
+    	StringBuilder b2= new StringBuilder();
+    	b1.append("a");
+    	b2.append("b");
+    	b1.append(b2);
+    	assertEquals("ab", b1.toString());
+    }
+    
+    public void testStringBuilderMethods() throws Exception {
+    	Class clazz= StringBuilder.class;
+		Method method= clazz.getMethod("append", CharSequence.class);  
+		assertNotNull(method);
+    	try {
+    		method= clazz.getMethod("append", StringBuilder.class);
+    		fail();
+    	}
+    	catch (NoSuchMethodException m) {
+    		// ok
+    	}
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryFileStore.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryFileStore.java
new file mode 100644
index 0000000..cce3866
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryFileStore.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * 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
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Andrew Gvozdev (Quoin Inc.) - contributed to CDT from org.eclipse.core.tests.resources v20090320
+ *******************************************************************************/
+package org.eclipse.cdt.core.internal.tests.filesystem.ram;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import org.eclipse.core.filesystem.*;
+import org.eclipse.core.filesystem.provider.FileStore;
+import org.eclipse.core.runtime.*;
+
+/**
+ * In memory file system implementation used for testing.
+ */
+public class MemoryFileStore extends FileStore {
+	private static final MemoryTree TREE = MemoryTree.TREE;
+
+	private final IPath path;
+
+	public MemoryFileStore(IPath path) {
+		super();
+		this.path = path.setDevice(null);
+	}
+
+	public String[] childNames(int options, IProgressMonitor monitor) {
+		final String[] names = TREE.childNames(path);
+		return names == null ? EMPTY_STRING_ARRAY : names;
+	}
+
+	public void delete(int options, IProgressMonitor monitor) {
+		TREE.delete(path);
+	}
+
+	public IFileInfo fetchInfo(int options, IProgressMonitor monitor) {
+		return TREE.fetchInfo(path);
+	}
+
+	public IFileStore getChild(String name) {
+		return new MemoryFileStore(path.append(name));
+	}
+
+	public String getName() {
+		final String name = path.lastSegment();
+		return name == null ? "" : name;
+	}
+
+	public IFileStore getParent() {
+		if (path.segmentCount() == 0)
+			return null;
+		return new MemoryFileStore(path.removeLastSegments(1));
+	}
+
+	public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException {
+		TREE.mkdir(path, (options & EFS.SHALLOW) == 0);
+		return this;
+	}
+
+	public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException {
+		return TREE.openInputStream(path);
+	}
+
+	public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException {
+		return TREE.openOutputStream(path, options);
+	}
+
+	public void putInfo(IFileInfo info, int options, IProgressMonitor monitor) throws CoreException {
+		TREE.putInfo(path, info, options);
+	}
+
+	public URI toURI() {
+		return MemoryFileSystem.toURI(path);
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryFileSystem.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryFileSystem.java
new file mode 100644
index 0000000..6efae4e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryFileSystem.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * 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
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Andrew Gvozdev (Quoin Inc.) - contributed to CDT from org.eclipse.core.tests.resources v20090320
+ *******************************************************************************/
+package org.eclipse.cdt.core.internal.tests.filesystem.ram;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.filesystem.provider.FileSystem;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * A test file system that keeps everything in memory.
+ */
+public class MemoryFileSystem extends FileSystem {
+	public static final String SCHEME_MEMORY = "mem";
+
+	/**
+	 * Converts a path to a URI in the memory file system.
+	 * @param path
+	 * @return
+	 */
+	public static URI toURI(IPath path) {
+		try {
+			return new URI(MemoryFileSystem.SCHEME_MEMORY, path.setDevice(null).toPortableString(), null);
+		} catch (URISyntaxException e) {
+			//should not happen
+			throw new RuntimeException(e);
+		}
+	}
+
+	public MemoryFileSystem() {
+		super();
+	}
+
+	public IFileStore getStore(URI uri) {
+		return new MemoryFileStore(Path.fromPortableString(uri.getSchemeSpecificPart()));
+	}
+
+	public boolean isCaseSensitive() {
+		return true;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryTree.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryTree.java
new file mode 100644
index 0000000..a9e4536
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryTree.java
@@ -0,0 +1,277 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * 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
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Andrew Gvozdev (Quoin Inc.) - contributed to CDT from org.eclipse.core.tests.resources v20090320
+ *******************************************************************************/
+package org.eclipse.cdt.core.internal.tests.filesystem.ram;
+
+import java.io.*;
+import java.util.ArrayList;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.filesystem.provider.FileInfo;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+
+/**
+ * An in-memory file system.
+ */
+public class MemoryTree {
+	static class DirNode extends Node {
+		private final ArrayList children = new ArrayList();
+
+		DirNode(Node parent, String name) {
+			super(parent, name);
+		}
+
+		void add(Node child) {
+			children.add(child);
+		}
+
+		public String[] childNames() {
+			String[] names = new String[children.size()];
+			for (int i = 0, imax = children.size(); i < imax; i++) {
+				Node child = (Node) children.get(i);
+				names[i] = child.getInfo(false).getName();
+			}
+			return names;
+		}
+
+		/**
+		 * Returns the child with the given name, or null if not found.
+		 * @param name
+		 * @return
+		 */
+		Node getChild(String name) {
+			for (int i = 0, imax = children.size(); i < imax; i++) {
+				Node child = (Node) children.get(i);
+				if (child.getInfo(false).getName().equals(name))
+					return child;
+			}
+			return null;
+		}
+
+		protected void initializeInfo(FileInfo fileInfo) {
+			super.initializeInfo(fileInfo);
+			fileInfo.setDirectory(true);
+		}
+
+		boolean isFile() {
+			return false;
+		}
+
+		void remove(String name) {
+			Node child = getChild(name);
+			if (child != null)
+				children.remove(child);
+		}
+
+		public String toString() {
+			return super.toString() + ' ' + children;
+		}
+	}
+
+	static class FileNode extends Node {
+		byte[] contents = EMPTY_CONTENTS;
+
+		FileNode(Node parent, String name) {
+			super(parent, name);
+		}
+
+		boolean isFile() {
+			return true;
+		}
+
+		public InputStream openInputStream() {
+			return new ByteArrayInputStream(contents);
+		}
+
+		public OutputStream openOutputStream(final int options) {
+			return new ByteArrayOutputStream() {
+				public void close() throws IOException {
+					super.close();
+					setContents(toByteArray(), options);
+				}
+			};
+		}
+
+		protected void setContents(byte[] bytes, int options) {
+			if ((options & EFS.APPEND) != 0) {
+				//create reference in case of concurrent modification
+				byte[] oldContents = this.contents;
+				byte[] newContents = new byte[oldContents.length + bytes.length];
+				System.arraycopy(oldContents, 0, newContents, 0, oldContents.length);
+				System.arraycopy(bytes, 0, newContents, oldContents.length, bytes.length);
+				this.contents = newContents;
+			} else
+				this.contents = bytes;
+			info.setLastModified(System.currentTimeMillis());
+			((FileInfo) info).setLength(bytes.length);
+		}
+	}
+
+	static abstract class Node {
+		protected IFileInfo info;
+
+		Node(Node parent, String name) {
+			if (parent != null)
+				((DirNode) parent).add(this);
+			FileInfo fileInfo = new FileInfo(name);
+			initializeInfo(fileInfo);
+			this.info = fileInfo;
+		}
+
+		IFileInfo getInfo(boolean copy) {
+			return (IFileInfo) (copy ? ((FileInfo) info).clone() : info);
+		}
+
+		protected void initializeInfo(FileInfo fileInfo) {
+			fileInfo.setExists(true);
+			fileInfo.setLastModified(System.currentTimeMillis());
+		}
+
+		abstract boolean isFile();
+
+		void putInfo(IFileInfo newInfo, int options) {
+			if ((options & EFS.SET_ATTRIBUTES) != 0) {
+				for (int i = 0; i < ALL_ATTRIBUTES.length; i++)
+					info.setAttribute(ALL_ATTRIBUTES[i], newInfo.getAttribute(ALL_ATTRIBUTES[i]));
+			}
+			if ((options & EFS.SET_LAST_MODIFIED) != 0) {
+				info.setLastModified(newInfo.getLastModified());
+			}
+		}
+
+		/**
+		 * For debugging purposes only.
+		 */
+		public String toString() {
+			return info.getName();
+		}
+	}
+
+	static final int[] ALL_ATTRIBUTES = new int[] {EFS.ATTRIBUTE_ARCHIVE, EFS.ATTRIBUTE_EXECUTABLE, EFS.ATTRIBUTE_HIDDEN, EFS.ATTRIBUTE_READ_ONLY,};
+
+	public static final MemoryTree TREE = new MemoryTree();
+
+	static final byte[] EMPTY_CONTENTS = new byte[0];
+
+	private static final String ROOT_NAME = "<root>";
+
+	private Node root = new DirNode(null, ROOT_NAME);
+
+	private MemoryTree() {
+		// TREE singleton should be used rather than direct instantiation
+	}
+
+	public String[] childNames(IPath path) {
+		Node node = findNode(path);
+		if (node == null || node.isFile())
+			return null;
+		return ((DirNode) node).childNames();
+	}
+
+	public void delete(IPath path) {
+		//cannot delete the root
+		if (path.segmentCount() == 0)
+			return;
+		Node parent = findNode(path.removeLastSegments(1));
+		if (parent == null || parent.isFile())
+			return;
+		((DirNode) parent).remove(path.lastSegment());
+
+	}
+
+	/**
+	 * Deletes the entire memory tree. Used during debugging and testing only.
+	 */
+	public void deleteAll() {
+		this.root = new DirNode(null, ROOT_NAME);
+	}
+
+	/**
+	 * Returns the file info for the given path. Never returns null.
+	 * @param path
+	 * @return
+	 */
+	public synchronized IFileInfo fetchInfo(IPath path) {
+		Node node = findNode(path);
+		if (node == null)
+			return new FileInfo(path.lastSegment());
+		return node.getInfo(true);
+	}
+
+	/**
+	 * Returns the node at the given path, or null if not found.
+	 * 
+	 * @param path
+	 * @return
+	 */
+	private Node findNode(IPath path) {
+		Node current = root;
+		for (int i = 0, imax = path.segmentCount(); i < imax; i++) {
+			if (current == null || current.isFile())
+				return null;
+			current = ((DirNode) current).getChild(path.segment(i));
+		}
+		return current;
+	}
+
+	public Node mkdir(IPath path, boolean deep) throws CoreException {
+		Node dir = findNode(path);
+		if (dir != null) {
+			if (dir.isFile())
+				Policy.error("A file exists with this name: " + path);
+			return dir;
+		}
+		final IPath parentPath = path.removeLastSegments(1);
+		Node parent = findNode(parentPath);
+		if (parent != null) {
+			if (parent.isFile())
+				Policy.error("Parent is a file: " + path);
+		} else {
+			if (!deep)
+				Policy.error("Parent does not exist: " + parentPath);
+			parent = mkdir(parentPath, deep);
+		}
+		//create the child directory
+		return new DirNode(parent, path.lastSegment());
+	}
+
+	public InputStream openInputStream(IPath path) throws CoreException {
+		Node node = findNode(path);
+		if (node == null)
+			Policy.error("File not found: " + path);
+		if (!node.isFile())
+			Policy.error("Cannot open stream on directory: " + path);
+		return ((FileNode) node).openInputStream();
+	}
+
+	public OutputStream openOutputStream(IPath path, int options) throws CoreException {
+		Node node = findNode(path);
+		//if we already have such a file, just open a stream on it
+		if (node instanceof DirNode)
+			Policy.error("Could not create file: " + path);
+		if (node instanceof FileNode)
+			return ((FileNode) node).openOutputStream(options);
+		//if the parent exists we can create the file
+		Node parent = findNode(path.removeLastSegments(1));
+		if (!(parent instanceof DirNode))
+			Policy.error("Could not create file: " + path);
+		node = new FileNode(parent, path.lastSegment());
+		return ((FileNode) node).openOutputStream(options);
+	}
+
+	public void putInfo(IPath path, IFileInfo info, int options) throws CoreException {
+		Node node = findNode(path);
+		if (node == null)
+			Policy.error("File not found: " + path);
+		node.putInfo(info, options);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/Policy.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/Policy.java
new file mode 100644
index 0000000..42fbb11
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/Policy.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * 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
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Andrew Gvozdev (Quoin Inc.) - contributed to CDT from org.eclipse.core.tests.resources v20090320
+ *******************************************************************************/
+package org.eclipse.cdt.core.internal.tests.filesystem.ram;
+
+import org.eclipse.core.runtime.*;
+
+/**
+ * 
+ */
+public class Policy {
+
+	public static void error(String message) throws CoreException {
+		throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.cdt.core.tests.internal.filesystem.ram", 1, message, null));
+	}
+
+	private Policy() {
+		super();
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/winreg/tests/WinRegTests.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/winreg/tests/WinRegTests.java
new file mode 100644
index 0000000..c090be5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/winreg/tests/WinRegTests.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 QNX Software Systems
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.winreg.tests;
+
+import org.eclipse.cdt.utils.WindowsRegistry;
+import org.eclipse.core.runtime.Platform;
+
+import junit.framework.TestCase;
+
+public class WinRegTests extends TestCase {
+
+	public void test1() {
+		WindowsRegistry registry = WindowsRegistry.getRegistry();
+		if (Platform.getOS().equals(Platform.OS_WIN32)) {
+			assertNotNull(registry);
+			String value = registry.getLocalMachineValue("SOFTWARE\\Microsoft\\Windows\\CurrentVersion", "ProgramFilesDir");
+			// Not sure how you set this to anything else so it seems safe.
+			assertEquals("C:\\Program Files", value);
+		} else {
+			// Should be null on non-Windows platforms
+			assertNotNull(registry);
+		}
+	}
+	
+	public void test2() {
+		WindowsRegistry registry = WindowsRegistry.getRegistry();
+		if (Platform.getOS().equals(Platform.OS_WIN32)) {
+			assertNotNull(registry);
+			String value = registry.getLocalMachineValue("SOFTWARE\\Microsoft\\Windows\\CurrentVersion", "Nothing");
+			// Not sure how you set this to anything else so it seems safe.
+			assertNull(value);
+		} else {
+			// Should be null on non-Windows platforms
+			assertNotNull(registry);
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/utils/CommandLineUtilTest.java b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/utils/CommandLineUtilTest.java
new file mode 100644
index 0000000..6606dd3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/utils/CommandLineUtilTest.java
@@ -0,0 +1,224 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 QNX Software Systems and others.
+ *  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
+ * 
+ *  Contributors:
+ *      QNX Software Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.utils;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class CommandLineUtilTest extends TestCase {
+
+    public static Test suite() {
+        return new TestSuite(CommandLineUtilTest.class);
+    }
+	
+    private String[] parse(String line) {
+		return CommandLineUtil.argumentsToArrayUnixStyle(line);
+	}
+    private String[] parseWin(String line) {
+		return CommandLineUtil.argumentsToArrayWindowsStyle(line);
+	}
+    private String[] parseU(String line) {
+		return CommandLineUtil.argumentsToArray(line);
+	}
+    
+	public void testArgumentsToArraySimple() {
+		String[] args = parse("A=B C");
+		assertEquals(2, args.length);
+		assertEquals("A=B", args[0]);
+		assertEquals("C", args[1]);
+	}
+
+
+	public void testArgumentsToArraySpaces() {
+		// [A=B    C]
+		String[] args = parse("A=B    C");
+		assertEquals(2, args.length);
+		assertEquals("A=B", args[0]);
+		assertEquals("C", args[1]);
+	}
+
+	public void testArgumentsToArraySpaces2() {
+		// [  A=B    C ]
+		String[] args = parse("  A=B    C ");
+		assertEquals(2, args.length);
+		assertEquals("A=B", args[0]);
+		assertEquals("C", args[1]);
+	}
+
+	public void testArgumentsToArrayDoubleQuotes() {
+		// [Arg="a b c"]
+		String[] args = parse("Arg=\"a b c\"");
+		assertEquals(1, args.length);
+		assertEquals("Arg=a b c", args[0]);
+	}
+
+	public void testArgumentsToArrayDoubleQuotes2() {
+		// [Arg="\"quoted\""]
+		String[] args = parse("Arg=\"\\\"quoted\\\"\"");
+		assertEquals(1, args.length);
+		assertEquals("Arg=\"quoted\"", args[0]);
+	}
+
+	public void testArgumentsToArraySingleQuotes() {
+		// [Arg='"quoted"']
+		String[] args = parse("Arg='\"quoted\"'");
+		assertEquals(1, args.length);
+		assertEquals("Arg=\"quoted\"", args[0]);
+	}
+
+	public void testArgumentsToArrayQuote() {
+		// [\"]
+		String[] args = parse("\\\"");
+		assertEquals(1, args.length);
+		assertEquals("\"", args[0]);
+	}
+
+	public void testArgumentsToArrayQuotSpaces() {
+		// [  \"]
+		String[] args = parse("  \\\"");
+		assertEquals(1, args.length);
+		assertEquals("\"", args[0]);
+	}
+
+	public void testArgumentsToArrayOnlySpaces() {
+		// ["   "]
+		String[] args = parse("\"   \"");
+		assertEquals(1, args.length);
+		assertEquals("   ", args[0]);
+	}
+
+	public void testArgumentsToArrayJumbledString() {
+		// ["a b"-c]
+		String[] args = parse("\"a b\"-c");
+		assertEquals(1, args.length);
+		assertEquals("a b-c", args[0]);
+	}
+
+	public void testArgumentsToArrayJumbledString2() {
+		// [x "a b"-c]
+		String[] args = parse(" x  \"a b\"-c");
+		assertEquals(2, args.length);
+		assertEquals("x", args[0]);
+		assertEquals("a b-c", args[1]);
+	}
+
+	public void testArgumentsToArrayJumbledSQ() {
+		// [x' 'x y]
+		String[] args = parse("x' 'x y");
+		assertEquals(2, args.length);
+		assertEquals("x x", args[0]);
+		assertEquals("y", args[1]);
+	}
+
+	public void testArgumentsToArrayEmptyString() {
+		// [""]
+		String[] args = parse("\"\"");
+		assertEquals(1, args.length);
+		assertEquals("", args[0]);
+	}
+
+	public void testArgumentsToArrayEmptyString2() {
+		// ['']
+		String[] args = parse("''");
+		assertEquals(1, args.length);
+		assertEquals("", args[0]);
+	}
+
+	public void testArgumentsToArrayEmpty3() {
+		// ['' a]
+		String[] args = parse("'' a");
+		assertEquals(2, args.length);
+		assertEquals("", args[0]);
+		assertEquals("a", args[1]);
+	}
+
+	public void testArgumentsToArrayQuot1() {
+		// ['"']
+		String[] args = parse("'\"'");
+		assertEquals(1, args.length);
+		assertEquals("\"", args[0]);
+	}
+
+	public void testArgumentsToArrayQuot2() {
+		// ["\""]
+		String[] args = parse("\"\\\"\"");
+		assertEquals(1, args.length);
+		assertEquals("\"", args[0]);
+	}
+
+	public void testArgumentsToArrayNull() {
+		// []
+		String[] args = parse(null);
+		assertEquals(0, args.length);
+	}
+	public void testArgumentsToArrayEmpty() {
+		// []
+		String[] args = parse("");
+		assertEquals(0, args.length);
+	}
+	public void testArgumentsToArrayEmptySpaces() {
+		// [   ]
+		String[] args = parse("   ");
+		assertEquals(0, args.length);
+	}
+	public void testArgumentsToArrayTabs() {
+		// [a	b]
+		String[] args = parse("a \tb");
+		assertEquals(2, args.length);
+		assertEquals("a", args[0]);
+	}
+	public void testArgumentsToArrayNL() {
+		// ["a\nb"]
+		String[] args = parse("\"a\\nb\"");
+		assertEquals(1, args.length);
+		assertEquals("a\nb", args[0]);
+	}
+	
+	public void testArgumentsToArraySimpleWin() {
+		String[] args = parseWin("A=B C");
+		assertEquals(2, args.length);
+		assertEquals("A=B", args[0]);
+		assertEquals("C", args[1]);
+	}
+	
+	public void testArgumentsToArrayWindowsFiles() {
+		String[] args = parseWin("my\\file\\path");
+		assertEquals(1, args.length);
+		assertEquals("my\\file\\path", args[0]);
+	}
+	
+	public void testArgumentsToArrayWindowsSpaces() {
+		String[] args = parseWin("\"my\\file\\path space\"");
+		assertEquals(1, args.length);
+		assertEquals("my\\file\\path space", args[0]);
+	}
+	
+	public void testArgumentsToArrayWindowsEmpty() {
+		String[] args = parseWin("\"\"");
+		assertEquals(1, args.length);
+		assertEquals("", args[0]);
+	}
+	public void testArgumentsToArrayWindowsQuotes() {
+		String[] args = parseWin("\\\"a b\\\"");
+		assertEquals(2, args.length);
+		assertEquals("\"a", args[0]);
+		assertEquals("b\"", args[1]);
+	}
+	
+	public void testArgumentsToArraySimpleUniversal() {
+		String[] args = parseU("A=B C   D");
+		assertEquals(3, args.length);
+		assertEquals("A=B", args[0]);
+		assertEquals("C", args[1]);
+		assertEquals("D", args[2]);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/AllLanguageTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/AllLanguageTests.java
new file mode 100644
index 0000000..84428bd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/AllLanguageTests.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.language;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author crecoskie
+ *
+ */
+public class AllLanguageTests extends TestSuite {
+	public static Test suite() {
+		TestSuite suite = new AllLanguageTests();
+		
+		suite.addTest(LanguageInheritanceTests.suite());
+		
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/LanguageInheritanceTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/LanguageInheritanceTests.java
new file mode 100644
index 0000000..019ecca
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/language/LanguageInheritanceTests.java
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.language;
+
+import java.util.Collections;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.gnu.c.GCCLanguage;
+import org.eclipse.cdt.core.dom.ast.gnu.cpp.GPPLanguage;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ILanguage;
+import org.eclipse.cdt.core.model.LanguageManager;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.internal.core.CContentTypes;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.content.IContentType;
+
+/**
+ * Tests for language inheritance computations.
+ */
+public class LanguageInheritanceTests extends BaseTestCase {
+	
+	private static final String BIN_FOLDER = "bin";
+	private static final String FILE_NAME = "test.c";
+	private static final IContentType[] EMPTY_CONTENT_TYPES = new IContentType[0];
+	
+	private ICProject fCProject;
+	private IFile fFile;
+	private LanguageManager fManager;
+	private ILanguage fLanguage1;
+	private ILanguage fLanguage2;
+	
+	private IProject fProject;
+	private ICConfigurationDescription fConfiguration;
+	
+	public static Test suite() {
+		return suite(LanguageInheritanceTests.class);
+	}
+	
+	protected void setUp() throws Exception {
+		String name = getClass().getName() + "_" + getName();
+		fCProject = CProjectHelper.createCCProject(name , BIN_FOLDER, IPDOMManager.ID_NO_INDEXER);
+		fProject = fCProject.getProject();
+		fFile = fProject.getFile(FILE_NAME);
+		
+		ICProjectDescription projectDescription = CoreModel.getDefault().getProjectDescription(fProject, false);
+		fConfiguration = projectDescription.getActiveConfiguration();
+		
+		fManager = LanguageManager.getInstance();
+		fLanguage1 = fManager.getLanguage(GPPLanguage.ID);
+		fLanguage2 = fManager.getLanguage(GCCLanguage.ID);
+		
+		// Ensure global language mappings are cleared.
+		WorkspaceLanguageConfiguration config = fManager.getWorkspaceLanguageConfiguration();
+		config.setWorkspaceMappings(Collections.EMPTY_MAP);
+		fManager.storeWorkspaceLanguageConfiguration(EMPTY_CONTENT_TYPES);
+	}
+
+	protected void tearDown() throws Exception {
+		CProjectHelper.delete(fCProject);
+	}
+	
+	public void testDirectFileMapping() throws Exception {
+		ILanguage originalLanguage = fManager.getLanguageForFile(fFile, fConfiguration);
+		assertDifferentLanguages(originalLanguage, fLanguage1);
+		
+		ProjectLanguageConfiguration config = fManager.getLanguageConfiguration(fCProject.getProject());
+		config.addFileMapping(fConfiguration, fFile, GPPLanguage.ID);
+		fManager.storeLanguageMappingConfiguration(fFile);
+		
+		assertSameLanguage(fLanguage1, fManager.getLanguageForFile(fFile, fConfiguration));
+		
+		config.removeFileMapping(fConfiguration, fFile);
+		fManager.storeLanguageMappingConfiguration(fFile);
+		
+		assertSameLanguage(originalLanguage, fManager.getLanguageForFile(fFile, fConfiguration));
+	}
+	
+	public void testDirectProjectContentTypeMapping() throws Exception {
+		ILanguage originalLanguage = fManager.getLanguageForFile(fFile, fConfiguration);
+		assertDifferentLanguages(originalLanguage, fLanguage1);
+		
+		String filename = fFile.getLocation().toString();
+		IContentType contentType = CContentTypes.getContentType(fProject, filename);
+		ProjectLanguageConfiguration config = fManager.getLanguageConfiguration(fCProject.getProject());
+		config.addContentTypeMapping(fConfiguration, contentType.getId(), GPPLanguage.ID);
+		fManager.storeLanguageMappingConfiguration(fProject, EMPTY_CONTENT_TYPES);
+
+		assertSameLanguage(fLanguage1, fManager.getLanguageForFile(fFile, fConfiguration));
+
+		config.removeContentTypeMapping(fConfiguration, contentType.getId());
+		fManager.storeLanguageMappingConfiguration(fFile);
+		
+		assertSameLanguage(originalLanguage, fManager.getLanguageForFile(fFile, fConfiguration));
+	}
+
+	public void testDirectWorkspaceContentTypeMapping() throws Exception {
+		ILanguage originalLanguage = fManager.getLanguageForFile(fFile, fConfiguration);
+		assertDifferentLanguages(originalLanguage, fLanguage1);
+		
+		String filename = fFile.getLocation().toString();
+		IContentType contentType = CContentTypes.getContentType(fProject, filename);
+		WorkspaceLanguageConfiguration config = fManager.getWorkspaceLanguageConfiguration();
+		config.addWorkspaceMapping(contentType.getId(), GPPLanguage.ID);
+		fManager.storeWorkspaceLanguageConfiguration(EMPTY_CONTENT_TYPES);
+		
+		assertEquals(fLanguage1, fManager.getLanguageForFile(fFile, fConfiguration));
+		
+		config.removeWorkspaceMapping(contentType.getId());
+		fManager.storeLanguageMappingConfiguration(fFile);
+		
+		assertEquals(originalLanguage, fManager.getLanguageForFile(fFile, fConfiguration));
+	}
+
+	public void testOverriddenWorkspaceContentTypeMapping1() throws Exception {
+		ILanguage originalLanguage = fManager.getLanguageForFile(fFile, fConfiguration);
+		assertDifferentLanguages(originalLanguage, fLanguage1);
+		
+		String filename = fFile.getLocation().toString();
+		IContentType contentType = CContentTypes.getContentType(fProject, filename);
+
+		// Set workspace mapping
+		WorkspaceLanguageConfiguration config = fManager.getWorkspaceLanguageConfiguration();
+		config.addWorkspaceMapping(contentType.getId(), GPPLanguage.ID);
+		fManager.storeWorkspaceLanguageConfiguration(EMPTY_CONTENT_TYPES);
+		
+		// Override with project mapping
+		ProjectLanguageConfiguration config2 = fManager.getLanguageConfiguration(fCProject.getProject());
+		config2.addContentTypeMapping(fConfiguration, contentType.getId(), GCCLanguage.ID);
+		fManager.storeLanguageMappingConfiguration(fProject, EMPTY_CONTENT_TYPES);
+		
+		assertSameLanguage(fLanguage2, fManager.getLanguageForFile(fFile, fConfiguration));
+	}
+
+	public void testOverriddenWorkspaceContentTypeMapping2() throws Exception {
+		ILanguage originalLanguage = fManager.getLanguageForFile(fFile, fConfiguration);
+		assertDifferentLanguages(originalLanguage, fLanguage1);
+		
+		String filename = fFile.getLocation().toString();
+		IContentType contentType = CContentTypes.getContentType(fProject, filename);
+
+		// Set workspace mapping
+		WorkspaceLanguageConfiguration config = fManager.getWorkspaceLanguageConfiguration();
+		config.addWorkspaceMapping(contentType.getId(), GPPLanguage.ID);
+		fManager.storeWorkspaceLanguageConfiguration(EMPTY_CONTENT_TYPES);
+		
+		// Override with file mapping
+		ProjectLanguageConfiguration config2 = fManager.getLanguageConfiguration(fCProject.getProject());
+		config2.addFileMapping(fConfiguration, fFile, GCCLanguage.ID);
+		fManager.storeLanguageMappingConfiguration(fFile);
+		
+		assertSameLanguage(fLanguage2, fManager.getLanguageForFile(fFile, fConfiguration));
+	}
+	
+	public void testOverriddenProjectContentTypeMapping() throws Exception {
+		ILanguage originalLanguage = fManager.getLanguageForFile(fFile, fConfiguration);
+		assertDifferentLanguages(originalLanguage, fLanguage1);
+		
+		String filename = fFile.getLocation().toString();
+		IContentType contentType = CContentTypes.getContentType(fProject, filename);
+
+		// Set project mapping
+		ProjectLanguageConfiguration config = fManager.getLanguageConfiguration(fCProject.getProject());
+		config.addContentTypeMapping(fConfiguration, contentType.getId(), GPPLanguage.ID);
+		fManager.storeLanguageMappingConfiguration(fProject, EMPTY_CONTENT_TYPES);
+		
+		// Override with file mapping
+		ProjectLanguageConfiguration config2 = fManager.getLanguageConfiguration(fCProject.getProject());
+		config2.addFileMapping(fConfiguration, fFile, GCCLanguage.ID);
+		fManager.storeLanguageMappingConfiguration(fFile);
+		
+		assertSameLanguage(fLanguage2, fManager.getLanguageForFile(fFile, fConfiguration));
+	}
+	
+	protected void assertSameLanguage(ILanguage expected, ILanguage actual) {
+		if (expected != null) {
+			assertNotNull(actual);
+			assertEquals(expected.getId(), actual.getId());
+		} else {
+			assertNull(actual);
+		}
+	}
+	
+	protected void assertDifferentLanguages(ILanguage language1, ILanguage language2) {
+		assertNotNull(language1);
+		assertNotNull(language2);
+		assertNotSame(language1.getId(), language2.getId());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/ASTCacheTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/ASTCacheTests.java
new file mode 100644
index 0000000..8b0e483
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/ASTCacheTests.java
@@ -0,0 +1,312 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ILanguage;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.model.ASTCache;
+import org.eclipse.cdt.internal.core.model.ASTCache.ASTRunnable;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * Tests for the {@link ASTCache}.
+ */
+public class ASTCacheTests extends BaseTestCase {
+	private final static boolean DEBUG= false;
+	
+	private static int fgReconcilerCount;
+
+	public class MockReconciler extends Thread {
+		private final ITranslationUnit fTU;
+		private final ASTCache fCache;
+		public volatile boolean fStopped;
+		public IASTTranslationUnit fAST;
+
+		public MockReconciler(ITranslationUnit tu, ASTCache cache) {
+			super("MockReconciler-"+fgReconcilerCount++);
+			fTU= tu;
+			fCache= cache;
+			setDaemon(true);
+		}
+		public void run() {
+			while (!fStopped) {
+				try {
+					synchronized (this) {
+						fCache.aboutToBeReconciled(fTU);
+						if (DEBUG) System.out.println("about ot reconcile "+fTU.getElementName());
+						fAST= null;
+						notify();
+					}
+					Thread.sleep(50);
+					IASTTranslationUnit ast= fCache.createAST(fTU, fIndex, null);
+					synchronized (this) {
+						fAST= ast;
+						if (DEBUG) System.out.println("reconciled "+fTU.getElementName());
+						fCache.reconciled(fAST, fTU);
+					}
+					Thread.sleep(50);
+				} catch (InterruptedException exc) {
+					fStopped= true;
+					break;
+				}
+			}
+		}
+	}
+
+	private ICProject fProject;
+	private ITranslationUnit fTU1;
+	private ITranslationUnit fTU2;
+	private IIndex fIndex;
+
+	public ASTCacheTests(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(ASTCacheTests.class);
+		return suite;
+	}
+
+	private final String SOURCE1= "void foo1() {}"; //$NON-NLS-1$
+	private final String SOURCE2= "void foo2() {}"; //$NON-NLS-1$
+
+	public void setUp() throws Exception {
+		super.setUp();
+		IProgressMonitor npm= new NullProgressMonitor();
+		fProject= createProject("ASTCacheTest");
+		assertNotNull(fProject);
+		IFile file1= createFile(fProject.getProject(), "source1.cpp", SOURCE1);
+		assertNotNull(file1);
+		IFile file2= createFile(fProject.getProject(), "source2.cpp", SOURCE2);
+		assertNotNull(file2);
+		fTU1= (ITranslationUnit) CoreModel.getDefault().create(file1);
+		assertNotNull(fTU1);
+		fTU2= (ITranslationUnit) CoreModel.getDefault().create(file2);
+		assertNotNull(fTU2);
+		CCorePlugin.getIndexManager().joinIndexer(5000, npm);
+		fIndex= CCorePlugin.getIndexManager().getIndex(fProject);
+		fIndex.acquireReadLock();
+	}
+
+	public void tearDown() throws Exception {
+		if (fIndex != null) {
+			fIndex.releaseReadLock();
+		}
+		if (fProject != null) {
+			CProjectHelper.delete(fProject);
+		}
+		super.tearDown();
+	}
+
+	protected ICProject createProject(final String name) throws CoreException {
+		return CProjectHelper.createCProject(name, null, IPDOMManager.ID_FAST_INDEXER);
+	}
+
+	protected IFile createFile(IContainer container, String fileName, String contents) throws Exception {
+		return TestSourceReader.createFile(container, new Path(fileName), contents);
+	}
+
+	public void testASTCache() throws Exception {
+		checkActiveElement();
+		checkSingleThreadAccess();
+		checkAccessWithSequentialReconciler();
+		checkAccessWithConcurrentReconciler();
+	}
+	
+	private void checkActiveElement() throws Exception {
+		ASTCache cache= new ASTCache();
+		assertFalse(cache.isActiveElement(fTU1));
+		assertFalse(cache.isActiveElement(fTU2));
+		cache.setActiveElement(fTU1);
+		assertTrue(cache.isActiveElement(fTU1));
+		assertFalse(cache.isActiveElement(fTU2));
+		cache.setActiveElement(fTU2);
+		assertFalse(cache.isActiveElement(fTU1));
+		assertTrue(cache.isActiveElement(fTU2));
+	}
+	
+	private void checkSingleThreadAccess() throws Exception {
+		final ASTCache cache= new ASTCache();
+		final int[] counter= {0};
+		cache.setActiveElement(fTU1);
+		IStatus status= cache.runOnAST(fTU1, false, null, new ASTRunnable() {
+			public IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) throws CoreException {
+				assertNull(ast);
+				counter[0]++;
+				return Status.OK_STATUS;
+			}
+		});
+		assertEquals(1, counter[0]);
+
+		IProgressMonitor npm= new NullProgressMonitor();
+		npm.setCanceled(true);
+		status= cache.runOnAST(fTU1, true, npm, new ASTRunnable() {
+			public IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) throws CoreException {
+				assertNull(ast);
+				counter[0]++;
+				return Status.OK_STATUS;
+			}
+		});
+		assertEquals(2, counter[0]);
+
+		npm.setCanceled(false);
+		status= cache.runOnAST(fTU1, true, npm, new ASTRunnable() {
+			public IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) throws CoreException {
+				assertNotNull(ast);
+				counter[0]++;
+				return Status.OK_STATUS;
+			}
+		});
+		assertEquals(3, counter[0]);
+	}
+
+	private void checkAccessWithSequentialReconciler() throws Exception {
+		final ASTCache cache= new ASTCache();
+		final MockReconciler reconciler1= new MockReconciler(fTU1, cache);
+		final MockReconciler reconciler2= new MockReconciler(fTU2, cache);
+		try {
+			cache.setActiveElement(fTU1);
+			assertFalse(cache.isReconciling(fTU1));
+			synchronized (reconciler1) {
+				reconciler1.start();
+				reconciler1.wait();
+				assertNull(reconciler1.fAST);
+				assertTrue(cache.isActiveElement(fTU1));
+				assertTrue(cache.isReconciling(fTU1));
+			}
+			reconciler1.fStopped= true;
+			IStatus status= cache.runOnAST(fTU1, true, null, new ASTRunnable() {
+				public IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) throws CoreException {
+					assertNotNull(ast);
+					assertTrue(cache.isActiveElement(fTU1));
+					assertFalse(cache.isReconciling(fTU1));
+					assertSame(ast, reconciler1.fAST);
+					return Status.OK_STATUS;
+				}
+			});
+			
+			// change active element
+			cache.setActiveElement(fTU2);
+			assertFalse(cache.isReconciling(fTU2));
+			synchronized (reconciler2) {
+				reconciler2.start();
+				reconciler2.wait();
+				assertNull(reconciler2.fAST);
+				assertTrue(cache.isActiveElement(fTU2));
+				assertTrue(cache.isReconciling(fTU2));
+			}
+			reconciler2.fStopped= true;
+			
+			status= cache.runOnAST(fTU2, true, null, new ASTRunnable() {
+				public IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) throws CoreException {
+					assertNotNull(ast);
+					assertTrue(cache.isActiveElement(fTU2));
+					assertFalse(cache.isReconciling(fTU2));
+					assertSame(ast, reconciler2.fAST);
+					return Status.OK_STATUS;
+				}
+			});
+		} finally {
+			reconciler1.fStopped= true;
+			reconciler1.join(1000);
+			reconciler2.fStopped= true;
+			reconciler2.join(1000);
+		}
+	}
+
+	private void checkAccessWithConcurrentReconciler() throws Exception {
+		ASTCache cache= new ASTCache();
+		MockReconciler reconciler1= new MockReconciler(fTU1, cache);
+		MockReconciler reconciler2= new MockReconciler(fTU2, cache);
+		reconciler1.start();
+		Thread.sleep(50);
+		reconciler2.start();
+		try {
+			int iterations= 0;
+			while (iterations < 10) {
+				++iterations;
+				if (DEBUG) System.out.println("iteration="+iterations);
+				cache.setActiveElement(fTU1);
+				Thread.sleep(50);
+				waitForAST(cache, fTU1, new ASTRunnable() {
+					public IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) {
+						assertNotNull(ast);
+						assertEquals("void foo1() {}", ast.getDeclarations()[0].getRawSignature());
+						return Status.OK_STATUS;
+					}
+				});
+
+				waitForAST(cache, fTU2, new ASTRunnable() {
+					public IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) {
+						assertNotNull(ast);
+						assertEquals("void foo2() {}", ast.getDeclarations()[0].getRawSignature());
+						return Status.OK_STATUS;
+					}
+				});
+
+				// change active element
+				cache.setActiveElement(fTU2);
+				Thread.sleep(50);
+				waitForAST(cache, fTU2, new ASTRunnable() {
+					public IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) {
+						assertNotNull(ast);
+						assertEquals("void foo2() {}", ast.getDeclarations()[0].getRawSignature());
+						return Status.OK_STATUS;
+					}
+				});
+
+				waitForAST(cache, fTU1, new ASTRunnable() {
+					public IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) {
+						assertNotNull(ast);
+						assertEquals("void foo1() {}", ast.getDeclarations()[0].getRawSignature());
+						return Status.OK_STATUS;
+					}
+				});
+}
+		} finally {
+			reconciler1.fStopped= true;
+			reconciler1.join(1000);
+			reconciler2.fStopped= true;
+			reconciler2.join(1000);
+		}
+	}
+
+	private void waitForAST(ASTCache cache, ITranslationUnit tUnit, ASTRunnable runnable) {
+		if (DEBUG) System.out.println("waiting for "+tUnit.getElementName());
+		long start= System.currentTimeMillis();
+		try {
+			cache.runOnAST(tUnit, true, null, runnable);
+		}
+		finally {
+			if (DEBUG) System.out.println("wait time= " + (System.currentTimeMillis() - start));
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/AllCoreTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/AllCoreTests.java
new file mode 100644
index 0000000..f4c36c3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/AllCoreTests.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.settings.model.AllCProjectDescriptionTests;
+import org.eclipse.cdt.core.settings.model.PathSettingsContainerTests;
+
+
+/**
+ *
+ * AllTests.java
+ * This is the main entry point for running this suite of JUnit tests
+ * for all tests within the package "org.eclipse.cdt.core.model"
+ *
+ * @author Judy N. Green
+ * @since Jul 19, 2002
+ */
+public class AllCoreTests {
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(suite());
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite(AllCoreTests.class.getName());
+
+        // Just add more test cases here as you create them for
+        // each class being tested
+		suite.addTest(AllLanguageInterfaceTests.suite());
+        suite.addTest(CModelTests.suite());
+        suite.addTest(CModelElementsTests.suite());
+        suite.addTest(CModelIdentifierTests.suite());
+        suite.addTest(CModelExceptionTest.suite());
+        suite.addTest(CModelBuilderInactiveCodeTest.suite());
+        suite.addTest(FlagTests.suite());
+        suite.addTest(ArchiveTests.suite());
+        suite.addTest(TranslationUnitTests.suite());
+		suite.addTest(DeclaratorsTests.suite());
+		suite.addTest(MacroTests.suite());
+//		suite.addTest(FailedMacroTests.suite());
+		suite.addTest(CPathEntryTest.suite());
+//		suite.addTest(CConfigurationDescriptionReferenceTests.suite());
+		//the CProjectDescriptionTests now groups all New Project Model related tests
+		//which includes the CConfigurationDescriptionReferenceTests
+		suite.addTest(AllCProjectDescriptionTests.suite());
+		suite.addTest(PathSettingsContainerTests.suite());
+		suite.addTest(ASTCacheTests.suite());
+		suite.addTest(AsmModelBuilderTest.suite());
+		suite.addTest(CModelBuilderBugsTest.suite());
+        return suite;
+
+    }
+} // End of AllCoreTests.java
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/AllLanguageInterfaceTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/AllLanguageInterfaceTests.java
new file mode 100644
index 0000000..66b7c71
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/AllLanguageInterfaceTests.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+/*
+ * Created on Jun 9, 2003
+ * by bnicolle
+ */
+package org.eclipse.cdt.core.model.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * LanguageInterfaceTests
+ * lists all parts of the C/C++ language interface objects
+ * to be tested.
+ * @author bnicolle
+ *
+ */
+public class AllLanguageInterfaceTests {
+
+	/**
+	 * 
+	 */
+	public static Test suite() {
+		TestSuite suite = new TestSuite(AllLanguageInterfaceTests.class.getName());
+
+		// Just add more test cases here as you create them for 
+		// each class being tested
+        
+		suite.addTest(IIncludeTests.suite());
+		suite.addTest(IMacroTests.suite());
+		suite.addTest(StructuralMacroTests.suite());
+		suite.addTest(IStructureTests.suite());
+		suite.addTest(StructuralStructureTests.suite());		
+		suite.addTest(ITemplateTests.suite());
+		suite.addTest(StructuralTemplateTests.suite());		
+		return suite;
+        
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/ArchiveTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/ArchiveTests.java
new file mode 100644
index 0000000..e28ebe7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/ArchiveTests.java
@@ -0,0 +1,215 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.model.tests;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.IArchive;
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.ExpectedStrings;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * @author Peter Graves
+ *
+ * This file contains a set of generic tests for the core C model's Archive
+ * class. There is nothing exotic here, mostly just sanity type tests
+ *
+ */
+public class ArchiveTests extends TestCase {
+    IWorkspace workspace;
+    IWorkspaceRoot root;
+    ICProject testProject;
+    IFile cfile, exefile, libfile, archfile, objfile;
+    Path cpath, exepath, libpath, archpath, objpath;
+    NullProgressMonitor monitor;
+    
+
+    /**
+     * Constructor for ArchiveTests
+     * @param name
+     */
+    public ArchiveTests(String name) {
+        super(name);
+        /***
+     * The assume that they have a working workspace
+     * and workspace root object to use to create projects/files in, 
+     * so we need to get them setup first.
+     */
+        workspace= ResourcesPlugin.getWorkspace();
+        root= workspace.getRoot();
+        monitor = new NullProgressMonitor();
+        if (workspace==null) 
+            fail("Workspace was not setup");
+        if (root==null)
+            fail("Workspace root was not setup");
+
+    }
+    
+    /**
+     * Sets up the test fixture.
+     *
+     * Called before every test case method.
+     * 
+     * Example code test the packages in the project 
+     *  "com.qnx.tools.ide.cdt.core"
+     */
+    protected void setUp() throws Exception {
+            
+        /***
+         * Setup the various files, paths and projects that are needed by the
+         * tests
+         */
+        testProject=CProjectHelper.createCProject("filetest", "none", IPDOMManager.ID_NO_INDEXER);
+        if (testProject==null)
+            fail("Unable to create project");
+
+        cfile = testProject.getProject().getFile("exetest.c");
+        if (!cfile.exists()) {
+            cfile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/exe/main.c"))),
+					false, monitor);
+        }
+        cpath=new Path(workspace.getRoot().getLocation()+"/filetest/main.c");
+
+        objfile = testProject.getProject().getFile("exetest.o");
+        if (!objfile.exists()) {
+            objfile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/exe/x86/o.g/main.o"))),
+					false, monitor);
+        }
+        objpath=new Path(workspace.getRoot().getLocation()+"/filetest/main.o");
+        
+        exefile = testProject.getProject().getFile("test_g");
+        if (!exefile.exists()) {
+            exefile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/exe/x86/o.g/exe_g"))),
+					false, monitor);
+        }
+        exepath=new Path(workspace.getRoot().getLocation()+"/filetest/exe_g");
+        
+        archfile = testProject.getProject().getFile("libtestlib_g.a");
+        if (!archfile.exists()) {
+            archfile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/testlib/x86/a.g/libtestlib_g.a"))),
+					false, monitor);
+        }
+        libpath=new Path(workspace.getRoot().getLocation()+"/filetest/libtestlib_g.so");
+        
+        libfile = testProject.getProject().getFile("libtestlib_g.so");
+        if (!libfile.exists()) {
+            libfile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/testlib/x86/so.g/libtestlib_g.so"))),
+					false, monitor);
+        }
+        archpath=new Path(workspace.getRoot().getLocation()+"/filetest/libtestlib_g.a");
+	    }
+    
+     /**
+     * Tears down the test fixture.
+     *
+     * Called after every test case method.
+     */
+    protected void tearDown()  {
+		  CProjectHelper.delete(testProject);
+    }
+    
+    public static TestSuite suite() {
+    return new TestSuite(ArchiveTests.class);
+    }
+    
+    public static void main (String[] args){
+    junit.textui.TestRunner.run(suite());
+    }
+
+
+        
+    public void testGetBinaries() throws CoreException,FileNotFoundException {
+        IArchive myArchive;
+        IBinary[] bins;
+        ICElement[] elements;
+        ExpectedStrings expBin, expObj[];
+        String[] myStrings;
+        int x;
+
+        
+        /****
+         * Setup the expected strings for the binaries, and the elements within 
+         * the binaries
+         */
+        myStrings=new String[2];
+        myStrings[0]="test.o";
+        myStrings[1]="test2.o";
+        expBin=new ExpectedStrings(myStrings);
+
+        expObj=new ExpectedStrings[2];
+        myStrings[0]="func1";
+        myStrings[1]="func2";
+        expObj[0]=new ExpectedStrings(myStrings);
+        myStrings[0]="test2func1";
+        myStrings[1]="test2func2";
+        expObj[1]=new ExpectedStrings(myStrings);
+
+        /***
+         * Grab the archive we want to test, and find all the binaries and 
+         * all the elements in all the binaries and make sure we get 
+         * everything we expect.
+         */
+        myArchive=CProjectHelper.findArchive(testProject, "libtestlib_g.a");
+        if (myArchive==null)
+            fail("Could not find archive");
+        bins=myArchive.getBinaries();
+        for (x=0;x<bins.length;x++) {
+            expBin.foundString(bins[x].getElementName());
+            elements=bins[x].getChildren();
+            for (int i=0;i<elements.length;i++) {
+                expObj[x].foundString(elements[i].getElementName());
+            }
+        }
+        
+        assertTrue(expBin.getMissingString(), expBin.gotAll());
+        assertTrue(expBin.getExtraString(), !expBin.gotExtra());
+        for (x=0;x<expObj.length;x++) {
+            assertTrue("Binary " + expBin.expStrings[x] + " "  +expObj[x].getMissingString(), expObj[x].gotAll());
+            assertTrue("Binary " + expBin.expStrings[x] + " " + expObj[x].getExtraString(), !expObj[x].gotExtra());
+        }
+    }
+    /***
+     *  Simple sanity test to make sure Archive.isArchive returns true
+     *  
+     */
+    public void testIsArchive() throws CoreException,FileNotFoundException {
+        IArchive myArchive;
+        myArchive=CProjectHelper.findArchive(testProject, "libtestlib_g.a");
+
+        assertTrue("A archive", myArchive != null);
+        myArchive=null;
+
+
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/AsmModelBuilderTest.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/AsmModelBuilderTest.java
new file mode 100644
index 0000000..008779a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/AsmModelBuilderTest.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.IAsmLabel;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IInclude;
+import org.eclipse.cdt.core.model.IParent;
+import org.eclipse.cdt.core.model.ISourceRange;
+import org.eclipse.cdt.core.model.ISourceReference;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+
+/**
+ * Tests for the default assembly model builder.
+ *
+ * @since 5.0
+ */
+public class AsmModelBuilderTest extends BaseTestCase {
+
+	public static Test suite() {
+		return suite(AsmModelBuilderTest.class, "_");
+	}
+
+	private ICProject fCProject;
+	private ITranslationUnit fTU;		
+		
+	public AsmModelBuilderTest(String name) {
+		super(name);
+	}
+		
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		fCProject= CProjectHelper.createCProject(getName(), null, IPDOMManager.ID_FAST_INDEXER);
+		assertNotNull(fCProject);
+		CProjectHelper.importSourcesFromPlugin(fCProject, CTestPlugin.getDefault().getBundle(), "/resources/asmTests");
+		fTU= (ITranslationUnit) CProjectHelper.findElement(fCProject, "AsmTest.S");
+		assertNotNull(fTU);
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		  CProjectHelper.delete(fCProject);
+		  super.tearDown();
+	}	
+	
+	public void testAsmModelElements() throws Exception {
+		ICElement[] children= fTU.getChildren();
+		assertEquals(8, children.length);
+		
+		int idx= 0;
+		assertEquals(ICElement.C_INCLUDE, children[idx].getElementType());
+		assertTrue(((IInclude)children[idx]).isStandard());
+		assertEquals("include1.h", children[idx++].getElementName());
+		assertEquals(ICElement.C_INCLUDE, children[idx].getElementType());
+		assertFalse(((IInclude)children[idx]).isStandard());
+		assertEquals("include2.h", children[idx++].getElementName());
+		
+		
+		assertEquals(ICElement.ASM_LABEL, children[idx].getElementType());
+		assertEquals("nonGlobalLabel", children[idx].getElementName());
+		assertFalse(((IAsmLabel)children[idx]).isGlobal());
+		assertEquals(0, ((IParent)children[idx++]).getChildren().length);
+		
+		assertEquals(ICElement.ASM_LABEL, children[idx].getElementType());
+		assertEquals("globalLabel1", children[idx].getElementName());
+		assertTrue(((IAsmLabel)children[idx]).isGlobal());
+		assertEquals(2, ((IParent)children[idx++]).getChildren().length);
+		
+		assertEquals(ICElement.C_MACRO, children[idx].getElementType());
+		assertEquals("MACRO", children[idx++].getElementName());
+		
+		assertEquals(ICElement.ASM_LABEL, children[idx].getElementType());
+		assertEquals("globalLabel2", children[idx].getElementName());
+		assertTrue(((IAsmLabel)children[idx]).isGlobal());
+		assertEquals(1, ((IParent)children[idx++]).getChildren().length);
+		
+		assertEquals(ICElement.ASM_LABEL, children[idx].getElementType());
+		assertEquals("globalLabel3", children[idx].getElementName());
+		assertTrue(((IAsmLabel)children[idx]).isGlobal());
+		assertEquals(1, ((IParent)children[idx++]).getChildren().length);
+		
+		assertEquals(ICElement.ASM_LABEL, children[idx].getElementType());
+		assertEquals("alloca", children[idx].getElementName());
+		assertTrue(((IAsmLabel)children[idx]).isGlobal());
+		assertEquals(0, ((IParent)children[idx++]).getChildren().length);
+	}
+
+	public void testAsmLabelRanges() throws Exception {
+		String source= fTU.getBuffer().getContents();
+		ICElement[] labels= fTU.getChildrenOfType(ICElement.ASM_LABEL).toArray(new ICElement[0]);
+		for (ICElement label2 : labels) {
+			String name= label2.getElementName();
+			ISourceReference label= (ISourceReference)label2;
+			ISourceRange range= label.getSourceRange();
+			assertEquals(source.substring(range.getIdStartPos(), range.getIdStartPos() + range.getIdLength()), name);
+			int endOfLabel= source.indexOf("/* end */", range.getIdStartPos());
+			assertEquals(range.getIdStartPos(), range.getStartPos());
+			assertEquals(endOfLabel, range.getStartPos() + range.getLength());
+		}
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java
new file mode 100644
index 0000000..737a3fd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java
@@ -0,0 +1,432 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.model.tests;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.core.ICDescriptorOperation;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.ExpectedStrings;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+
+
+/**
+ * @author Peter Graves
+ *
+ * This file contains a set of generic tests for the core C model's Binary
+ * class. There is nothing exotic here, mostly just sanity type tests
+ *
+ */
+public class BinaryTests extends TestCase {
+    IWorkspace workspace;
+    IWorkspaceRoot root;
+    ICProject testProject;
+    IFile cfile, exefile, libfile, archfile, objfile, bigexe, ppcexefile, ndexe;
+    Path cpath, exepath, libpath, archpath, objpath;
+    NullProgressMonitor monitor;
+
+
+
+    /**
+     * Constructor for BinaryTests
+     * @param name
+     */
+    public BinaryTests(String name) {
+        super(name);
+        
+    }
+        
+    /**
+     * Sets up the test fixture.
+     *
+     * Called before every test case method.
+     * 
+     * Example code test the packages in the project 
+     *  "com.qnx.tools.ide.cdt.core"
+     */
+    protected void setUp()  throws Exception  {
+        /***
+         * The tests assume that they have a working workspace
+         * and workspace root object to use to create projects/files in, 
+         * so we need to get them setup first.
+         */
+        workspace= ResourcesPlugin.getWorkspace();
+        root= workspace.getRoot();
+        monitor = new NullProgressMonitor();
+        if (workspace==null) 
+            fail("Workspace was not setup");
+        if (root==null)
+            fail("Workspace root was not setup");
+            
+            
+        /***
+         * Setup the various files, paths and projects that are needed by the
+         * tests
+         */
+            
+        testProject=CProjectHelper.createCProject("filetest", "none", IPDOMManager.ID_NO_INDEXER);
+        
+        // since our test require that we can read the debug info from the exe whne must set the GNU elf 
+        // binary parser since the default (generic elf binary parser) does not do this.
+		ICDescriptorOperation op = new ICDescriptorOperation() {
+			
+			public void execute(ICDescriptor descriptor, IProgressMonitor monitor) throws CoreException {
+				descriptor.remove(CCorePlugin.BINARY_PARSER_UNIQ_ID);
+				descriptor.create(CCorePlugin.BINARY_PARSER_UNIQ_ID, "org.eclipse.cdt.core.GNU_ELF");
+			}
+		};
+		CCorePlugin.getDefault().getCDescriptorManager().runDescriptorOperation(testProject.getProject(), op, null);
+
+        if (testProject==null)
+            fail("Unable to create project");
+
+        cfile = testProject.getProject().getFile("exetest.c");
+        if (!cfile.exists()) {
+            cfile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/exe/main.c"))),
+					false, monitor);
+        }
+        cpath=new Path(workspace.getRoot().getLocation()+"/filetest/main.c");
+
+        objfile = testProject.getProject().getFile("exetest.o");
+        if (!objfile.exists()) {
+            objfile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/exe/x86/o.g/main.o"))),
+					false, monitor);
+        }
+        objpath=new Path(workspace.getRoot().getLocation()+"/filetest/exetest.o");
+        
+        exefile = testProject.getProject().getFile("test_g");
+        if (!exefile.exists()) {
+            exefile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/exe/x86/o.g/exe_g"))),
+					false, monitor);
+        }
+        exepath=new Path(workspace.getRoot().getLocation()+"/filetest/exe_g");
+        ppcexefile = testProject.getProject().getFile("ppctest_g");
+        if (!ppcexefile.exists()) {
+            ppcexefile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/exe/ppc/be.g/exe_g"))),
+					false, monitor);
+        }
+        ndexe = testProject.getProject().getFile("exetest");
+        if (!ndexe.exists()) {
+            ndexe.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/exe/x86/o/exe"))),
+					false, monitor);
+        }
+
+
+
+        bigexe = testProject.getProject().getFile("exebig_g");
+        if (!bigexe.exists()) {
+            bigexe.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/exebig/x86/o.g/exebig_g"))),
+					false, monitor);
+        }
+        
+        archfile = testProject.getProject().getFile("libtestlib_g.a");
+        if (!archfile.exists()) {
+            archfile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/testlib/x86/a.g/libtestlib_g.a"))),
+					false, monitor);
+        }
+        libpath=new Path(workspace.getRoot().getLocation()+"/filetest/libtestlib_g.so");
+        
+        libfile = testProject.getProject().getFile("libtestlib_g.so");
+        if (!libfile.exists()) {
+            libfile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/testlib/x86/so.g/libtestlib_g.so"))),
+					false, monitor);
+        }
+        archpath=new Path(workspace.getRoot().getLocation()+"/filetest/libtestlib_g.a");
+        
+
+
+
+    }
+    
+     /**
+     * Tears down the test fixture.
+     *
+     * Called after every test case method.
+     */
+    protected void tearDown() throws CoreException, InterruptedException {
+    	System.gc();
+    	System.runFinalization();
+    	CProjectHelper.delete(testProject);
+    }
+    
+    public static TestSuite suite() {
+        return new TestSuite(BinaryTests.class);
+    }
+    
+    public static void main (String[] args){
+        junit.textui.TestRunner.run(suite());
+    }
+
+
+
+    /****
+     * Simple tests to make sure we can get all of a binarys children
+     */
+    public void testGetChildren() throws CoreException,FileNotFoundException {
+        IBinary myBinary;
+        ICElement[] elements;
+        ExpectedStrings expSyms;
+//        String[] myStrings = {"test.c", "_init","main.c", "_start", "test2.c", "_btext"};
+        // On Windows at least, it appears the .c files aren't included in the binary
+        String[] myStrings = {"_init", "_start", "_btext"};
+        
+        expSyms=new ExpectedStrings(myStrings);
+
+        /***
+         * Grab the IBinary we want to test, and find all the elements in all 
+         * the binarie and make sure we get everything we expect.
+         */
+        myBinary=CProjectHelper.findBinary(testProject, "test_g");
+        elements=myBinary.getChildren();
+        for (int i=0;i<elements.length;i++) {
+            expSyms.foundString(elements[i].getElementName());
+        }
+
+        assertTrue(expSyms.getMissingString(), expSyms.gotAll());
+//        assertTrue(expSyms.getExtraString(), !expSyms.gotExtra());
+    }
+    
+    /***
+     * A quick check to make sure the getBSS function works as expected.
+     */
+    public void testGetBss() throws CModelException{
+        IBinary bigBinary,littleBinary;
+        bigBinary=CProjectHelper.findBinary(testProject, "exebig_g");
+        littleBinary=CProjectHelper.findBinary(testProject, "test_g");
+
+        assertTrue("Expected 432, Got: " + bigBinary.getBSS(), bigBinary.getBSS()==432);
+        assertTrue("Expected 4, Got: " + littleBinary.getBSS(), littleBinary.getBSS()==4);                
+    }
+    /***
+     * A quick check to make sure the getBSS function works as expected.
+     */
+    public void testGetData() throws CModelException{
+        IBinary bigBinary,littleBinary;
+        bigBinary=CProjectHelper.findBinary(testProject, "exebig_g");
+        littleBinary=CProjectHelper.findBinary(testProject, "test_g");
+		/* These two test used to fail due to pr 23602 */
+        assertTrue("Expected 256 Got: " + bigBinary.getData(), bigBinary.getData()==256);
+        assertTrue("Expected 196, Got: " + littleBinary.getData(), littleBinary.getData()==196);                
+    }
+
+    /***
+     * A very small set of tests to make usre Binary.getCPU() seems to return 
+     * something sane for the most common exe type (x86) and one other (ppc)
+     * This is not a in depth test at all.
+     */
+    public void testGetCpu() throws CModelException {
+        IBinary myBinary;
+        myBinary=CProjectHelper.findBinary(testProject, "exebig_g");
+
+        assertTrue("Expected: x86  Got: " + myBinary.getCPU(),myBinary.getCPU().equals("x86"));
+        myBinary=CProjectHelper.findBinary(testProject, ppcexefile.getLocation().lastSegment());
+        assertTrue("Expected: ppc  Got: " + myBinary.getCPU(),myBinary.getCPU().equals("ppc"));
+
+    }
+    
+    /****
+     * A set of simple tests to make sute getNeededSharedLibs seems to be sane
+     */
+    public void testGetNeededSharedLibs() throws CModelException {
+        IBinary myBinary;
+        String[] exelibs={"libsocket.so.2", "libc.so.2"};
+        String[] bigexelibs={"libc.so.2"};
+        String[] gotlibs;
+        ExpectedStrings exp;
+        int x;
+        
+        exp=new ExpectedStrings(exelibs);
+        myBinary=CProjectHelper.findBinary(testProject, "test_g");
+        gotlibs=myBinary.getNeededSharedLibs();
+        for (x=0;x<gotlibs.length;x++) {
+            exp.foundString(gotlibs[x]);
+        }
+        assertTrue(exp.getMissingString(), exp.gotAll());
+        assertTrue(exp.getExtraString(), !exp.gotExtra());
+        
+        exp=new ExpectedStrings(bigexelibs);
+        myBinary=CProjectHelper.findBinary(testProject,"exebig_g");
+        gotlibs=myBinary.getNeededSharedLibs();
+        for (x=0;x<gotlibs.length;x++) {
+            exp.foundString(gotlibs[x]);
+        }
+        assertTrue(exp.getMissingString(), exp.gotAll());
+        assertTrue(exp.getExtraString(), !exp.gotExtra());
+        
+        exp=new ExpectedStrings(bigexelibs);
+        myBinary=CProjectHelper.findBinary(testProject, "libtestlib_g.so");
+        gotlibs=myBinary.getNeededSharedLibs();
+        for (x=0;x<gotlibs.length;x++) {
+            exp.foundString(gotlibs[x]);
+        }
+        assertTrue(exp.getMissingString(), exp.gotAll());
+        assertTrue(exp.getExtraString(), !exp.gotExtra());
+        
+    }
+    
+    /****
+     * Simple tests for the getSoname method;
+     */
+    public void testGetSoname() throws CModelException {
+        IBinary myBinary;
+        String name;
+        myBinary=CProjectHelper.findBinary(testProject, "test_g");
+        assertTrue(myBinary.getSoname().equals(""));
+        
+        myBinary=CProjectHelper.findBinary(testProject, "libtestlib_g.so");
+        name=myBinary.getSoname();
+        assertNotNull(name);
+        assertTrue("Expected: libtestlib_g.so.1  Got: " + name, 
+        name.equals("libtestlib_g.so.1"));
+        
+    }
+    
+    /*** 
+     * Simple tests for getText
+     */
+    public void testGetText() throws CModelException {
+        IBinary bigBinary,littleBinary;
+        bigBinary=CProjectHelper.findBinary(testProject, bigexe.getLocation().lastSegment());
+        littleBinary=CProjectHelper.findBinary(testProject, exefile.getLocation().lastSegment());
+		/* These two asserts used to fail due to pr 23602 */
+        assertTrue("Expected  886, Got: " + bigBinary.getText(), bigBinary.getText()==886);
+        assertTrue("Expected 1223, Got: " + littleBinary.getText(), littleBinary.getText()==1223);                
+	}
+    
+    /***
+     * Simple tests for the hadDebug call
+     */
+    public void testHasDebug() throws CModelException {
+        IBinary myBinary;
+        myBinary = CProjectHelper.findBinary(testProject, "test_g");
+        assertTrue(myBinary.hasDebug());
+        myBinary = CProjectHelper.findBinary(testProject, "libtestlib_g.so");
+        assertTrue(myBinary.hasDebug());
+        myBinary = CProjectHelper.findBinary(testProject, "exetest");
+        assertTrue(!myBinary.hasDebug());
+    }
+    
+    /***
+     * Sanity - isBinary and isReadonly should always return true;
+     */
+    public void testisBinRead() throws CModelException {
+        IBinary myBinary;
+        myBinary =CProjectHelper.findBinary(testProject, "test_g");
+        assertTrue(myBinary != null);
+        assertTrue(myBinary.isReadOnly());
+
+    }
+    
+    /***
+     * Quick tests to make sure isObject works as expected.
+     */
+    public void testIsObject() throws CModelException {
+        IBinary myBinary;
+        myBinary=CProjectHelper.findObject(testProject, "exetest.o");
+        assertTrue(myBinary.isObject());
+
+        
+        myBinary= CProjectHelper.findBinary(testProject, "test_g");
+        assertTrue(!myBinary.isObject());
+        
+        myBinary= CProjectHelper.findBinary(testProject, "libtestlib_g.so");
+        assertTrue(!myBinary.isObject());
+
+        myBinary= CProjectHelper.findBinary(testProject, "exetest");
+        assertTrue(!myBinary.isObject());
+
+    }
+    
+    /***
+     * Quick tests to make sure isSharedLib works as expected.
+     */
+    public void testIsSharedLib() throws CModelException {
+        IBinary myBinary;
+
+        myBinary=CProjectHelper.findObject(testProject, "exetest.o");
+        assertTrue(!myBinary.isSharedLib());
+
+        myBinary= CProjectHelper.findBinary(testProject, "libtestlib_g.so");
+        assertTrue(myBinary.isSharedLib());
+        
+        myBinary= CProjectHelper.findBinary(testProject, "test_g");
+        assertTrue(!myBinary.isSharedLib());
+        
+
+        myBinary= CProjectHelper.findBinary(testProject, "exetest");
+        assertTrue(!myBinary.isSharedLib());
+
+    }
+    
+    /***
+     * Quick tests to make sure isExecutable works as expected.
+     */
+    public void testIsExecutable() throws InterruptedException, CModelException {
+        IBinary myBinary;
+        myBinary=CProjectHelper.findObject(testProject, "exetest.o");
+        assertTrue(!myBinary.isExecutable());
+        
+        myBinary=CProjectHelper.findBinary(testProject, "test_g");
+        assertTrue(myBinary.isExecutable());
+        
+        myBinary= CProjectHelper.findBinary(testProject, "libtestlib_g.so");
+        assertTrue(!myBinary.isExecutable());
+
+
+        myBinary= CProjectHelper.findBinary(testProject, "exetest");
+        assertTrue(myBinary.isExecutable());
+
+    }
+
+    /***
+     *  Simple sanity test to make sure Binary.isBinary returns true
+     *  
+     */
+    public void testIsBinary() throws CoreException,FileNotFoundException,Exception {
+        IBinary myBinary;
+
+        myBinary=CProjectHelper.findBinary(testProject, "exebig_g");
+        assertTrue("A Binary", myBinary != null);
+    }
+
+
+
+    
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelBuilderBugsTest.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelBuilderBugsTest.java
new file mode 100644
index 0000000..fc9bb65
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelBuilderBugsTest.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IFunctionDeclaration;
+import org.eclipse.cdt.core.model.INamespace;
+import org.eclipse.cdt.core.model.IStructure;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+
+/**
+ * Tests for C model builder bugs.
+ */
+public class CModelBuilderBugsTest extends BaseTestCase {
+
+	public static Test suite() {
+		return suite(CModelBuilderBugsTest.class, "_");
+	}
+
+	private ICProject fCProject;
+	private ITranslationUnit fTU;		
+		
+	public CModelBuilderBugsTest(String name) {
+		super(name);
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		fCProject= CProjectHelper.createCProject(getName(), null, IPDOMManager.ID_FAST_INDEXER);
+		assertNotNull(fCProject);
+		CProjectHelper.importSourcesFromPlugin(fCProject, CTestPlugin.getDefault().getBundle(), "/resources/cmodel");
+		fTU= (ITranslationUnit) CProjectHelper.findElement(fCProject, "CModelBuilderTest.cpp");
+		assertNotNull(fTU);
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		  CProjectHelper.delete(fCProject);
+		  super.tearDown();
+	}	
+	
+	public void testModelBuilderBug222398() throws Exception {
+		IStructure clazz= (IStructure) fTU.getElement("Test");
+		assertNotNull(clazz);
+		ICElement[] methods= clazz.getChildren();
+		assertEquals(2, methods.length);
+		assertEquals("inlined", methods[0].getElementName());
+		assertEquals("decl", methods[1].getElementName());
+		
+		INamespace ns= (INamespace) fTU.getElement("nsTest");
+		ICElement[] functions= ns.getChildren();
+		assertEquals(2, functions.length);
+		assertEquals("inlined", functions[0].getElementName());
+		assertEquals("decl", functions[1].getElementName());
+	}
+
+	public void testModelBuilderBug262785() throws Exception {
+		assertNotNull(fTU.getElement("Unknown1::method"));
+		assertNotNull(fTU.getElement("Unknown2::method"));
+	}
+
+	public void testModelBuilderBug274490() throws Exception {
+		IStructure clazz= (IStructure) fTU.getElement("Bug274490");
+		assertNotNull(clazz);
+		ICElement[] methods= clazz.getChildren();
+		assertEquals(2, methods.length);
+		assertEquals("int", ((IFunctionDeclaration) methods[0]).getReturnType());
+		assertEquals("const char*", ((IFunctionDeclaration) methods[1]).getReturnType());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelBuilderInactiveCodeTest.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelBuilderInactiveCodeTest.java
new file mode 100644
index 0000000..d6f77a4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelBuilderInactiveCodeTest.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Markus Schorn (Wind River Systems) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IInclude;
+import org.eclipse.cdt.core.model.IMacro;
+import org.eclipse.cdt.core.model.ISourceReference;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+
+/**
+ * Tests for C model inactive code parsing.
+ */
+public class CModelBuilderInactiveCodeTest extends BaseTestCase {
+
+	public static Test suite() {
+		return suite(CModelBuilderInactiveCodeTest.class, "_");
+	}
+
+	private ICProject fCProject;
+	private ITranslationUnit fTU;		
+		
+	public CModelBuilderInactiveCodeTest(String name) {
+		super(name);
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		fCProject= CProjectHelper.createCProject(getName(), null, IPDOMManager.ID_FAST_INDEXER);
+		assertNotNull(fCProject);
+		CProjectHelper.importSourcesFromPlugin(fCProject, CTestPlugin.getDefault().getBundle(), "/resources/cmodel");
+		fTU= (ITranslationUnit) CProjectHelper.findElement(fCProject, "CModelBuilderInactiveCodeTest.cpp");
+		assertNotNull(fTU);
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		  CProjectHelper.delete(fCProject);
+		  super.tearDown();
+	}	
+	
+	public void testPreprocessorNodes() throws Exception {
+		ISourceReference e= (ISourceReference) fTU.getElement("include");
+		assertTrue(e instanceof IInclude);
+		assertFalse(e.isActive());
+
+		e= (ISourceReference) fTU.getElement("MACRO1");
+		assertTrue(e instanceof IMacro);
+		assertFalse(e.isActive());
+
+		e= (ISourceReference) fTU.getElement("MACRO2");
+		assertTrue(e instanceof IMacro);
+		assertFalse(e.isActive());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelElementsTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelElementsTests.java
new file mode 100644
index 0000000..d33d356
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelElementsTests.java
@@ -0,0 +1,555 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IEnumeration;
+import org.eclipse.cdt.core.model.IEnumerator;
+import org.eclipse.cdt.core.model.IField;
+import org.eclipse.cdt.core.model.IFunction;
+import org.eclipse.cdt.core.model.IFunctionDeclaration;
+import org.eclipse.cdt.core.model.IFunctionTemplateDeclaration;
+import org.eclipse.cdt.core.model.IInclude;
+import org.eclipse.cdt.core.model.IMacro;
+import org.eclipse.cdt.core.model.IMethod;
+import org.eclipse.cdt.core.model.IMethodDeclaration;
+import org.eclipse.cdt.core.model.IMethodTemplateDeclaration;
+import org.eclipse.cdt.core.model.INamespace;
+import org.eclipse.cdt.core.model.IParent;
+import org.eclipse.cdt.core.model.ISourceRange;
+import org.eclipse.cdt.core.model.ISourceReference;
+import org.eclipse.cdt.core.model.IStructure;
+import org.eclipse.cdt.core.model.IStructureTemplate;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.model.ITypeDef;
+import org.eclipse.cdt.core.model.IVariable;
+import org.eclipse.cdt.core.model.IVariableDeclaration;
+import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class CModelElementsTests extends TestCase {	
+	private ICProject fCProject;
+	private IFile headerFile;
+	private IFile includedFile;
+	private NullProgressMonitor monitor;
+		
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CModelElementsTests.class.getName());
+		suite.addTest(new CModelElementsTests("testCModelElements"));
+		return suite;
+	}		
+		
+	public CModelElementsTests(String name) {
+		super(name);
+	}
+		
+	protected void setUp() throws Exception {
+		monitor = new NullProgressMonitor();
+		fCProject= CProjectHelper.createCCProject("TestProject1", "bin", IPDOMManager.ID_FAST_INDEXER);
+		headerFile = fCProject.getProject().getFile("CModelElementsTest.h");
+		includedFile = fCProject.getProject().getFile("included.h");
+		if (!headerFile.exists()) {
+			try{
+				FileInputStream fileIn = new FileInputStream(
+						CTestPlugin.getDefault().getFileInPlugin(new Path("resources/cfiles/CModelElementsTestStart.h"))); 
+				headerFile.create(fileIn,false, monitor);        
+				FileInputStream includedFileIn = new FileInputStream(
+						CTestPlugin.getDefault().getFileInPlugin(new Path("resources/cfiles/included.h"))); 
+				includedFile.create(includedFileIn,false, monitor);        
+			} catch (CoreException e) {
+				e.printStackTrace();
+			} catch (FileNotFoundException e) {
+				e.printStackTrace();
+			}
+		}
+		// make sure the index is up-to-date
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(10000, new NullProgressMonitor()));
+	}
+
+	
+	protected void tearDown() {
+		  CProjectHelper.delete(fCProject);
+	}	
+			
+	public void testCModelElements() throws CModelException{
+		ITranslationUnit tu = (ITranslationUnit)CoreModel.getDefault().create(headerFile);
+		//ITranslationUnit included = (ITranslationUnit)CoreModel.getDefault().create(includedFile);
+
+		// parse the translation unit to get the elements tree		
+//		tu.parse(); 
+		
+		// tu ---> include
+		checkInclude(tu);
+		
+		// tu ---> macro
+		checkMacro(tu);
+		
+		// tu ---> namespace: MyPackage
+		List tuPackages = tu.getChildrenOfType(ICElement.C_NAMESPACE);
+		INamespace namespace = (INamespace) tuPackages.get(0);
+		assertEquals(namespace.getElementName(), new String("MyPackage"));
+		checkElementOffset(namespace);
+		checkLineNumbers(namespace, 8, 130);
+		checkClass(namespace);
+				
+		checkEnums(namespace);	
+		
+		checkVariables(namespace);		
+
+		checkVariableDeclarations(namespace);		
+		
+		checkFunctions(namespace);
+		
+		checkStructs(namespace);
+		
+		checkTemplates(namespace);
+		
+		checkArrays(tu);
+		
+		checkBug180815(tu);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=180815
+	private void checkBug180815(IParent parent) throws CModelException {
+		List structs = parent.getChildrenOfType(ICElement.C_STRUCT);
+		assertEquals(1, structs.size());
+		IStructure struct= (IStructure)structs.get(0);
+		assertEquals("bug180815", struct.getElementName());
+		assertEquals(2, struct.getChildren().length);
+	}
+
+	private void checkInclude(IParent tu) throws CModelException{
+		List tuIncludes = tu.getChildrenOfType(ICElement.C_INCLUDE);
+		IInclude inc1 = (IInclude) tuIncludes.get(0);
+		assertEquals(inc1.getElementName(), new String("included.h"));
+		checkElementOffset(inc1);
+		checkLineNumbers(inc1, 2, 2);
+	}
+	
+	private void checkMacro(IParent tu) throws CModelException{
+		List tuMacros = tu.getChildrenOfType(ICElement.C_MACRO);
+		IMacro mac1 = (IMacro) tuMacros.get(0);
+		assertEquals(mac1.getElementName(), new String("PRINT"));
+		checkElementOffset(mac1);
+		checkLineNumbers(mac1, 5, 5);
+	}
+	
+	private void checkClass(IParent namespace) throws CModelException{
+		// MyPackage ---> class: Hello
+		List nsClasses = namespace.getChildrenOfType(ICElement.C_CLASS);		
+		IStructure classHello = (IStructure) nsClasses.get(0);
+		assertEquals(classHello.getElementName(), new String("Hello"));
+		checkElementOffset(classHello);
+		checkLineNumbers(classHello, 12, 53);
+		
+		// Hello --> field: int x
+		List helloFields = classHello.getChildrenOfType(ICElement.C_FIELD);
+		IField intX = (IField) helloFields.get(0);
+		assertEquals(intX.getElementName(), new String("x"));
+		checkElementOffset(intX);
+		assertEquals(intX.getTypeName(), new String("int"));
+		checkLineNumbers(intX, 17, 17);
+		
+		ASTAccessVisibility xVisibility = intX.getVisibility(); 
+		if (xVisibility != ASTAccessVisibility.PROTECTED)
+			fail("visibility should be protected!");
+		
+		// Hello ---> method: void setX(int X)
+		List helloMethods = classHello.getChildrenOfType(ICElement.C_METHOD);
+		IMethod setX = (IMethod) helloMethods.get(0);
+		assertEquals(setX.getElementName(), new String("setX"));
+		checkElementOffset(setX);
+		assertEquals(setX.getReturnType(), new String("void"));
+		checkLineNumbers(setX, 19, 22);
+		int setXNumOfParam = setX.getNumberOfParameters();
+		if(setXNumOfParam != 1)
+			fail("setX should have one parameter!");
+		String[] setXParamTypes = setX.getParameterTypes();
+		String firstParamType = setXParamTypes[0];
+		assertEquals(firstParamType, new String("int"));
+		// TODO : check for the inline here
+		
+		checkNestedNamespace(classHello);
+	}
+	private void checkNestedNamespace(IParent classHello) throws CModelException{
+		// Hello ---> namespace: MyNestedPackage 
+		List helloNamespaces = classHello.getChildrenOfType(ICElement.C_NAMESPACE);
+		INamespace myNestedPackage = (INamespace) helloNamespaces.get(0);
+		assertEquals(myNestedPackage.getElementName(), new String("MyNestedPackage"));
+		checkElementOffset(myNestedPackage);
+		checkLineNumbers(myNestedPackage, 25, 52);
+
+		checkParentNestedClass(myNestedPackage);	
+		checkDerivedNestedClass(myNestedPackage);
+	}
+	private void checkParentNestedClass(IParent myNestedPackage) throws CModelException{
+		// MyNestedPackage ---> class: Y  
+		List nestedClasses = myNestedPackage.getChildrenOfType(ICElement.C_CLASS);		
+		IStructure classY = (IStructure) nestedClasses.get(0);
+		assertEquals(classY.getElementName(), new String("Y"));
+		checkElementOffset(classY);
+		checkLineNumbers(classY, 28, 35);
+		
+		// Y ---> constructor: Y
+		List yMethods = classY.getChildrenOfType(ICElement.C_METHOD_DECLARATION);
+		IMethodDeclaration constructor  = (IMethodDeclaration) yMethods.get(0);
+		assertEquals(constructor.getElementName(), new String("Y"));
+		checkElementOffset(constructor);
+		assertTrue (constructor.isConstructor());
+		checkLineNumbers(constructor, 32, 32);
+		
+		// Y ---> destructor: ~Y
+		IMethodDeclaration destructor  = (IMethodDeclaration) yMethods.get(1);
+		assertEquals(destructor.getElementName(), new String("~Y"));
+		checkElementOffset(destructor);
+		assertTrue (destructor.isDestructor());
+		checkLineNumbers(destructor, 34, 34);
+		// TODO: check for virtual on destructors
+		
+	}
+	
+	private void checkDerivedNestedClass(IParent myNestedPackage) throws CModelException{
+		// MyNestedPackage ---> class: X public Y 
+		List nestedClasses = myNestedPackage.getChildrenOfType(ICElement.C_CLASS);		
+		IStructure classX = (IStructure) nestedClasses.get(1);
+		assertEquals(classX.getElementName(), new String("X"));
+		checkElementOffset(classX);
+		checkLineNumbers(classX, 38, 51);
+		// TODO : Check for base classes here
+		
+		// X --> field: B b
+		List xFieldChildren = classX.getChildrenOfType(ICElement.C_FIELD);
+		IField bB = (IField) xFieldChildren.get(0);
+		assertEquals(bB.getElementName(), new String("b"));
+		checkElementOffset(bB);
+		assertEquals(bB.getTypeName(), new String("B"));
+		checkLineNumbers(bB, 42, 42);
+		ASTAccessVisibility bVisibility = bB.getVisibility(); 
+		if (bVisibility != ASTAccessVisibility.PRIVATE)
+			fail("visibility should be private!");
+		
+		// X ---> constructor chain: X 
+		List xMethodChildren = classX.getChildrenOfType(ICElement.C_METHOD);
+		IMethod xconstructor  = (IMethod) xMethodChildren.get(0);
+		assertEquals(xconstructor.getElementName(), new String("X"));
+		checkElementOffset(xconstructor);
+		assertTrue (xconstructor.isConstructor());
+		checkLineNumbers(xconstructor, 46, 48);
+
+		// X ---> method declaration: doNothing
+		List xMethodDeclarations = classX.getChildrenOfType(ICElement.C_METHOD_DECLARATION);
+		IMethodDeclaration xDoNothing = (IMethodDeclaration) xMethodDeclarations.get(0);
+		assertEquals(xDoNothing.getElementName(), new String("doNothing"));
+		checkElementOffset(xDoNothing);
+		assertEquals(xDoNothing.getReturnType(), new String("int"));						
+		checkLineNumbers(xDoNothing, 50, 50);
+	}
+	
+	private void checkEnums(IParent namespace) throws CModelException{
+		// MyPackage ---> enum: Noname
+		List nsEnums = namespace.getChildrenOfType(ICElement.C_ENUMERATION);		
+		IEnumeration enumaration = (IEnumeration) nsEnums.get(0);
+		assertEquals(enumaration.getElementName(), new String(""));
+		checkElementOffset(enumaration);
+		checkLineNumbers(enumaration, 57, 61);
+	
+		// 	enum ---> enumerator: first = 1
+		List enumEnumerators = enumaration.getChildrenOfType(ICElement.C_ENUMERATOR);
+		IEnumerator first = (IEnumerator) enumEnumerators.get(0);
+		assertEquals(first.getElementName(), new String("first"));
+		assertEquals("1", first.getConstantExpression());
+		checkElementOffset(first);
+		// 	enum ---> enumerator: second
+		IEnumerator second = (IEnumerator) enumEnumerators.get(1);
+		assertEquals(second.getElementName(), new String("second"));
+		checkElementOffset(second);
+		// 	enum ---> enumerator: third
+		IEnumerator third = (IEnumerator) enumEnumerators.get(2);
+		checkElementOffset(third);
+		assertEquals(third.getElementName(), new String("third"));		
+		checkElementOffset(third);
+		
+		// MyPackage ---> enum: MyEnum
+		IEnumeration myEnum = (IEnumeration) nsEnums.get(1);
+		assertEquals(myEnum.getElementName(), new String("MyEnum"));
+		checkElementOffset(myEnum);
+		checkLineNumbers(myEnum, 64, 67);
+	
+		// 	enum ---> enumerator: first
+		List myEnumEnumerators = myEnum.getChildrenOfType(ICElement.C_ENUMERATOR);
+		IEnumerator f = (IEnumerator) myEnumEnumerators.get(0);
+		assertEquals(f.getElementName(), new String("f"));
+		checkElementOffset(f);
+		// 	enum ---> enumerator: second
+		IEnumerator s = (IEnumerator) myEnumEnumerators.get(1);
+		assertEquals(s.getElementName(), new String("s"));
+		checkElementOffset(s);
+		// 	enum ---> enumerator: third
+		IEnumerator t = (IEnumerator) myEnumEnumerators.get(2);
+		assertEquals(t.getElementName(), new String("t"));
+		checkElementOffset(t);
+	}
+
+	private void checkVariables(IParent namespace) throws CModelException{
+		// MyPackage ---> int v
+		List nsVars = namespace.getChildrenOfType(ICElement.C_VARIABLE);
+		IVariable var1 = (IVariable) nsVars.get(0);
+		assertEquals(var1.getElementName(), new String("v"));
+		checkElementOffset(var1);
+		assertEquals(var1.getTypeName(), new String("int"));
+		checkLineNumbers(var1, 71, 71);
+		
+		// MyPackage ---> unsigned long vuLong
+		IVariable var2 = (IVariable) nsVars.get(1);
+		assertEquals(var2.getElementName(), new String("vuLong"));
+		checkElementOffset(var2);
+		assertEquals(var2.getTypeName(), new String("unsigned long"));
+		checkLineNumbers(var2, 73, 73);
+
+		// MyPackage ---> unsigned short vuShort
+		IVariable var3 = (IVariable) nsVars.get(2);
+		assertEquals(var3.getElementName(), new String("vuShort"));
+		checkElementOffset(var3);
+		assertEquals(var3.getTypeName(), new String("unsigned short"));
+		checkLineNumbers(var3, 75, 75);
+		
+		// MyPackage ---> function pointer: orig_malloc_hook
+		IVariable vDecl2 = (IVariable) nsVars.get(3);
+		assertEquals(vDecl2.getElementName(), new String("orig_malloc_hook"));
+		checkElementOffset(vDecl2);
+		assertEquals(vDecl2.getTypeName(), new String ("void*(*)(const char*, int, int)"));
+		checkLineNumbers(vDecl2, 81, 81);
+	}
+
+	private void checkVariableDeclarations(IParent namespace) throws CModelException{
+		// MyPackage ---> extern int evar
+		List nsVarDecls = namespace.getChildrenOfType(ICElement.C_VARIABLE_DECLARATION);
+		IVariableDeclaration vDecl1 = (IVariableDeclaration) nsVarDecls.get(0);
+		assertEquals(vDecl1.getElementName(), new String("evar"));
+		checkElementOffset(vDecl1);
+		assertEquals(vDecl1.getTypeName(), new String("int"));
+		checkLineNumbers(vDecl1, 79, 79);
+	}
+	
+	private void checkFunctions(IParent namespace) throws CModelException{
+		List nsFunctionDeclarations = namespace.getChildrenOfType(ICElement.C_FUNCTION_DECLARATION);
+
+		//	MyPackage ---> function: void foo()
+		IFunctionDeclaration f1 = (IFunctionDeclaration) nsFunctionDeclarations.get(0);
+		assertEquals(f1.getElementName(), new String("foo"));
+		checkElementOffset(f1);
+		assertEquals(f1.getReturnType(), new String("void"));
+		checkLineNumbers(f1, 85, 85);
+		
+		//	MyPackage ---> function: char* foo(int&, char**)
+		IFunctionDeclaration f2 = (IFunctionDeclaration) nsFunctionDeclarations.get(1);
+		assertEquals(f2.getElementName(), new String("foo"));
+		checkElementOffset(f2);
+		assertEquals(f2.getReturnType(), new String("char*"));
+		checkLineNumbers(f2, 87, 88);
+		int fooNumOfParam = f2.getNumberOfParameters();
+		if(fooNumOfParam != 2)
+			fail("foo should have two parameter!");
+		String[] paramTypes = f2.getParameterTypes();
+		assertEquals(paramTypes[0], new String("int&"));
+		assertEquals(paramTypes[1], new String("char**"));
+	
+		//	MyPackage ---> function: void boo() {}		
+		List nsFunctions = namespace.getChildrenOfType(ICElement.C_FUNCTION);
+		IFunction f3 = (IFunction) nsFunctions.get(0);		
+		assertEquals(f3.getElementName(), new String("boo"));
+		checkElementOffset(f3);
+		assertEquals(f3.getReturnType(), new String("void"));
+		checkLineNumbers(f3, 90, 92);
+	}
+
+	private void checkStructs(IParent namespace) throws CModelException{
+		// struct with name
+		List nsStructs = namespace.getChildrenOfType(ICElement.C_STRUCT);
+		IStructure struct1 = (IStructure) nsStructs.get(0);
+		assertEquals(struct1.getElementName(), new String ("MyStruct"));
+		checkElementOffset(struct1);
+		checkLineNumbers(struct1, 95, 97);
+		List struct1Fields = struct1.getChildrenOfType(ICElement.C_FIELD);
+		IField field1 = (IField) struct1Fields.get(0);
+		assertEquals(field1.getElementName(), new String("sint"));
+		checkElementOffset(field1);
+		assertEquals(field1.getTypeName(), new String("int"));
+		checkLineNumbers(field1, 96, 96);
+		
+		if(field1.getVisibility() != ASTAccessVisibility.PUBLIC)
+			fail("field visibility should be public!");
+		
+		// struct no name
+		IStructure struct2;
+		List nsTypeDefs = namespace.getChildrenOfType(ICElement.C_TYPEDEF);
+		ITypeDef td = (ITypeDef) nsTypeDefs.get(1);
+		if (td instanceof IParent) {
+			// nested in typedef decl
+			struct2 = (IStructure) ((IParent)td).getChildren()[0];
+		} else {
+			struct2 = (IStructure) nsStructs.get(1);
+		}
+		assertEquals(struct2.getElementName(), new String (""));
+		checkElementOffset(struct2);
+		checkLineNumbers(struct2, 101, 103);
+		List struct2Fields = struct2.getChildrenOfType(ICElement.C_FIELD);
+		IField field2 = (IField) struct2Fields.get(0);
+		assertEquals(field2.getElementName(), new String("ss"));
+		checkElementOffset(field2);
+		assertEquals(field2.getTypeName(), new String("int"));
+		checkLineNumbers(field2, 102, 102);
+		if(field2.getVisibility() != ASTAccessVisibility.PUBLIC)
+			fail("field visibility should be public!");
+		
+		// typedefs
+		ITypeDef td1 = (ITypeDef) nsTypeDefs.get(0);
+		assertEquals(td1.getElementName(), new String ("myStruct"));
+		checkElementOffset(td1);
+		assertEquals(td1.getTypeName(), new String ("struct MyStruct"));
+		checkLineNumbers(td1, 99, 99);
+		ITypeDef td2 = (ITypeDef) nsTypeDefs.get(1);
+		assertEquals(td2.getElementName(), new String ("myTypedef"));
+		checkElementOffset(td2);
+		assertEquals(td2.getTypeName(), new String ("struct"));
+		checkLineNumbers(td2, 103, 103);
+
+		// union
+		List nsUnions = namespace.getChildrenOfType(ICElement.C_UNION);
+		IStructure u0 = (IStructure) nsUnions.get(0);
+		assertEquals(u0.getElementName(), new String("U"));		
+		checkElementOffset(u0);
+		checkLineNumbers(u0, 105, 107);
+		List u0Fields = u0.getChildrenOfType(ICElement.C_FIELD);
+		IField field3 = (IField) u0Fields.get(0);
+		assertEquals(field3.getElementName(), new String("U1"));
+		checkElementOffset(field3);
+		assertEquals(field3.getTypeName(), new String("int"));
+		checkLineNumbers(field3, 106, 106);
+		if(field3.getVisibility() != ASTAccessVisibility.PUBLIC)
+			fail("field visibility should be public!");
+	}
+
+	private void checkTemplates(IParent namespace) throws CModelException{
+		// template function
+		List functionTemplates = namespace.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION_DECLARATION);
+		IFunctionTemplateDeclaration ft = (IFunctionTemplateDeclaration)functionTemplates.get(0);
+		assertEquals(ft.getElementName(), new String("aTemplatedFunction"));
+		checkElementOffset(ft);
+		ft.getTemplateSignature();
+		assertEquals(ft.getTemplateSignature(), new String("aTemplatedFunction<A, B>(B) : A"));
+		checkLineNumbers(ft, 112, 113);
+		
+		// template method
+		List nsClasses = namespace.getChildrenOfType(ICElement.C_CLASS);
+		IStructure enclosingClass = (IStructure) nsClasses.get(1);
+		checkLineNumbers(enclosingClass, 115, 120);
+		List methodTemplates = enclosingClass.getChildrenOfType(ICElement.C_TEMPLATE_METHOD_DECLARATION);
+		IMethodTemplateDeclaration mt = (IMethodTemplateDeclaration)methodTemplates.get(0);
+		assertEquals(mt.getElementName(), new String("aTemplatedMethod"));
+		checkElementOffset(mt);
+		assertEquals(mt.getTemplateSignature(), new String("aTemplatedMethod<A, B>(B) : A"));
+		checkLineNumbers(mt, 118, 119 );
+		assertEquals(mt.getVisibility(), ASTAccessVisibility.PUBLIC);
+		
+		// template class
+		List classTemplates = namespace.getChildrenOfType(ICElement.C_TEMPLATE_CLASS);
+		IStructureTemplate ct = (IStructureTemplate)classTemplates.get(0);
+		assertEquals(ct.getElementName(), new String("myarray"));
+		checkElementOffset(ct);
+		assertEquals(ct.getTemplateSignature(), new String("myarray<T, Tibor>"));
+		checkLineNumbers(ct, 122, 123);
+
+		// template struct
+		List structTemplates = namespace.getChildrenOfType(ICElement.C_TEMPLATE_STRUCT);
+		IStructureTemplate st = (IStructureTemplate)structTemplates.get(0);
+		assertEquals(st.getElementName(), new String("mystruct"));
+		checkElementOffset(st);
+		assertEquals(st.getTemplateSignature(), new String("mystruct<T, Tibor>"));
+		checkLineNumbers(st, 125, 126);
+
+		// moved to failed tests
+		// also commented in the source file
+		// template variable
+//		ArrayList variableTemplates = namespace.getChildrenOfType(ICElement.C_TEMPLATE_VARIABLE);
+//		VariableTemplate vt = (VariableTemplate)variableTemplates.get(0);
+//		assertEquals(vt.getElementName(), new String("default_alloc_template<__threads,__inst>::_S_start_free"));
+//		checkElementOffset(mac1);
+//		assertEquals(vt.getTemplateSignature(), new String("default_alloc_template<__threads,__inst>::_S_start_free<bool, int> : char*"));
+//		checkLineNumbers(vt, 128, 129);
+	}
+	
+	private void checkArrays(IParent tu) throws CModelException{
+		// array variable
+		List variables = tu.getChildrenOfType(ICElement.C_VARIABLE);
+		IVariable arrayVar = (IVariable) variables.get(0);
+		assertEquals(arrayVar.getElementName(), new String("myArray"));
+		checkElementOffset(arrayVar);
+		assertEquals(arrayVar.getTypeName(), new String("int[][]"));
+		checkLineNumbers(arrayVar, 133, 133);
+		
+		// array parameter in function main
+		List functions = tu.getChildrenOfType(ICElement.C_FUNCTION);
+		IFunction mainFunction  = (IFunction) functions.get(0);
+		assertEquals(mainFunction.getElementName(), new String("main"));
+		checkElementOffset(mainFunction);
+		assertEquals(mainFunction.getReturnType(), new String("int"));
+		checkLineNumbers(mainFunction, 134, 136);
+		int NumOfParam = mainFunction.getNumberOfParameters();
+		if(NumOfParam != 2)
+			fail("main should have two parameter!");
+		String[] paramTypes = mainFunction.getParameterTypes();
+		assertEquals(paramTypes[0], new String("int"));
+		assertEquals(paramTypes[1], new String("char*[]"));
+		
+	}
+	private void checkLineNumbers(ICElement element, int startLine, int endLine) throws CModelException {
+		ISourceRange range = ((ISourceReference)element).getSourceRange();
+		assertEquals(startLine, range.getStartLine());
+		assertEquals(endLine, range.getEndLine());		 		
+	}
+	private void checkElementOffset(ICElement element) throws CModelException {
+		String name = element.getElementName();
+		ISourceRange range = ((ISourceReference)element).getSourceRange();
+		if(name.length() > 0 ){
+			assertTrue (range.getStartPos() <= range.getIdStartPos());
+			assertEquals (range.getIdLength(), name.length());
+		}
+		else{
+			assertEquals (range.getStartPos(), range.getIdStartPos());
+			if(element instanceof ITypeDef)
+				assertEquals (range.getIdLength(), ((ITypeDef)element).getTypeName().length());
+			else if(element instanceof IEnumeration)
+				assertEquals (range.getIdLength(), ((IEnumeration)element).getTypeName().length());
+			else if(element instanceof IStructure)
+				assertEquals (range.getIdLength(), ((IStructure)element).getTypeName().length());
+		}
+			
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelExceptionTest.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelExceptionTest.java
new file mode 100644
index 0000000..401e1af
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelExceptionTest.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.model.tests;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICModelStatusConstants;
+import org.eclipse.cdt.internal.core.model.CModelStatus;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * CModelExceptionTest
+ * 
+ * @author Judy N. Green
+ * @since Jul 19, 2002
+ */
+public class CModelExceptionTest extends TestCase {
+    // Shared values setup and torn down
+    private CModelStatus cModelStatus;
+    private CoreException coreException;
+
+	/**
+	 * Constructor for TestCModelException.
+	 * @param name
+	 */
+	public CModelExceptionTest(String name) {
+		super(name);
+	}
+	
+    /**
+     * Sets up the test fixture.
+     *
+     * Called before every test case method.
+     * 
+     * Example code test the packages in the project 
+     *  "com.qnx.tools.ide.cdt.core"
+     */
+    protected void setUp() {
+        // create shared resources and setup the test fixture
+        cModelStatus = new CModelStatus();
+        coreException = new CoreException(cModelStatus);
+    }
+    
+     /**
+     * Tears down the test fixture.
+     *
+     * Called after every test case method.
+     */
+    protected void tearDown() {
+       // release resources here and clean-up
+    }
+    
+    public static TestSuite suite() {
+        return new TestSuite(CModelExceptionTest.class);
+    }
+    
+    public static void main (String[] args){
+        junit.textui.TestRunner.run(suite());
+    }
+    
+    public void testCreationNoStatus(){
+        CModelException testException = new CModelException(coreException);
+        // should be the same object inside
+        assertTrue("Object compare failed", testException.getException() == coreException);
+    }
+    public void testCreationWithStatus(){
+        CModelException testException = new CModelException(coreException, 
+                                                            ICModelStatusConstants.INDEX_OUT_OF_BOUNDS);
+        // should not be null
+        assertTrue("TestException.getStatus() is null", (testException.getStatus() != null));
+        
+        // should have the same status as was set on creation
+        assertTrue("Object compare failed", testException.getStatus().getCode() == ICModelStatusConstants.INDEX_OUT_OF_BOUNDS);
+    }
+    
+    public void testElementDoesNotExist(){
+        CModelException testException = new CModelException(coreException, 
+                                                            ICModelStatusConstants.ELEMENT_DOES_NOT_EXIST);
+        // should not exist since this is the value we set on creation
+        assertTrue("Object unexpectedly exists", testException.doesNotExist());
+    }
+    
+    public void testElementExists(){
+        CModelException testException = new CModelException(coreException, 
+                                                            ICModelStatusConstants.INVALID_CONTENTS);
+        // should not exist since this is the value we set on creation
+        assertTrue("Object unexpectedly does not exist", !testException.doesNotExist());
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelIdentifierTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelIdentifierTests.java
new file mode 100644
index 0000000..572ff30
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelIdentifierTests.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.model.tests;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICElementVisitor;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * Tests for CModel identifier API.
+ * 
+ * @see ICElement#getHandleIdentier()
+ * @see CoreModel.create(String)
+ *
+ * @since 5.0
+ */
+public class CModelIdentifierTests extends BaseTestCase {
+
+	public static Test suite() {
+		return BaseTestCase.suite(CModelIdentifierTests.class);
+	}
+
+	private ICProject fCProject;
+	private IFile fHeaderFile;
+
+	protected void setUp() throws Exception {
+		// reusing project setup from CModelElementsTests
+		NullProgressMonitor monitor= new NullProgressMonitor();
+		fCProject= CProjectHelper.createCCProject("CModelIdentifierTests", "bin", IPDOMManager.ID_FAST_INDEXER);
+		fHeaderFile = fCProject.getProject().getFile("CModelIdentifierTests.h");
+		if (!fHeaderFile.exists()) {
+			try{
+				FileInputStream fileIn = new FileInputStream(
+						CTestPlugin.getDefault().getFileInPlugin(new Path("resources/cfiles/CModelElementsTestStart.h"))); 
+				fHeaderFile.create(fileIn,false, monitor);
+			} catch (CoreException e) {
+				e.printStackTrace();
+			} catch (FileNotFoundException e) {
+				e.printStackTrace();
+			}
+		}
+		CCorePlugin.getIndexManager().joinIndexer(10000, new NullProgressMonitor());
+	}
+
+	protected void tearDown() {
+		CProjectHelper.delete(fCProject);
+	}	
+
+	public void testIdentifierConsistency() throws Exception {
+		ITranslationUnit tu = (ITranslationUnit)CoreModel.getDefault().create(fHeaderFile);
+
+		final String cModelIdentifier= tu.getCModel().getHandleIdentifier();
+		assertNotNull(cModelIdentifier);
+		assertEquals(tu.getCModel(), CoreModel.create(cModelIdentifier));
+		
+		final String cProjectIdentifier= tu.getCProject().getHandleIdentifier();
+		assertNotNull(cProjectIdentifier);
+		assertEquals(tu.getCProject(), CoreModel.create(cProjectIdentifier));
+
+		final String tUnitIdentifier= tu.getHandleIdentifier();
+		assertNotNull(tUnitIdentifier);
+		assertEquals(tu, CoreModel.create(tUnitIdentifier));
+
+		final List elements= new ArrayList();
+		final List identifiers= new ArrayList();
+		ICElementVisitor visitor= new ICElementVisitor() {
+			public boolean visit(ICElement element) throws CoreException {
+				elements.add(element);
+				identifiers.add(element.getHandleIdentifier());
+				return true;
+			}};
+		tu.accept(visitor);
+		
+		assertEquals(elements.size(), identifiers.size());
+		int size= elements.size();
+		for (int i = 0; i < size; i++) {
+			ICElement expected= (ICElement) elements.get(i);
+			String identifier= (String) identifiers.get(i);
+			assertNotNull("Could not create identifier for element: "+ expected, identifier);
+			ICElement actual= CoreModel.create(identifier);
+			assertNotNull("Cannot create element '" + expected + "' from identifier: "+identifier, actual);
+			assertEquals(expected.getElementName(), actual.getElementName());
+			assertEquals(expected.getElementType(), actual.getElementType());
+			assertEquals(expected, actual);
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelTests.java
new file mode 100644
index 0000000..e98c04a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CModelTests.java
@@ -0,0 +1,397 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     Peter Graves (QNX Software Systems) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.List;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCProjectNature;
+import org.eclipse.cdt.core.CProjectNature;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICContainer;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ISourceRoot;
+import org.eclipse.cdt.core.settings.model.COutputEntry;
+import org.eclipse.cdt.core.settings.model.CSourceEntry;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICOutputEntry;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICSourceEntry;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * This file contains a set of generic tests for the core C model. Nothing 
+ * exotic, but should be a small sanity set of tests.
+ */
+public class CModelTests extends TestCase {
+    IWorkspace workspace;
+    IWorkspaceRoot root;
+    IProject project_c, project_cc;
+    NullProgressMonitor monitor;
+
+    /**
+     * Constructor for CModelTests.
+     * @param name
+     */
+    public CModelTests(String name) {
+        super(name);
+    }
+    
+    /**
+     * Sets up the test fixture.
+     *
+     * Called before every test case method.
+     * 
+     * Example code test the packages in the project 
+     *  "com.qnx.tools.ide.cdt.core"
+     */
+    @Override
+	protected void setUp() throws Exception {
+        /***
+         * The test of the tests assume that they have a working workspace
+         * and workspace root object to use to create projects/files in, 
+         * so we need to get them setup first.
+         */
+        IWorkspaceDescription desc;
+        workspace= ResourcesPlugin.getWorkspace();
+        root= workspace.getRoot();
+        monitor = new NullProgressMonitor();
+        if (workspace==null) 
+            fail("Workspace was not setup");
+        if (root==null)
+            fail("Workspace root was not setup");
+		desc=workspace.getDescription();
+		desc.setAutoBuilding(false);
+		workspace.setDescription(desc);
+
+    }
+    
+     /**
+     * Tears down the test fixture.
+     *
+     * Called after every test case method.
+     */
+    @Override
+	protected void tearDown() {
+       // release resources here and clean-up
+    }
+    
+    public static TestSuite suite() {
+        return new TestSuite(CModelTests.class);
+    }
+    
+    public static void main (String[] args){
+        junit.textui.TestRunner.run(suite());
+    }
+
+   
+    /***
+     * The follow are a simple set of tests to make usre the HasC/CCNature calls
+     * seem to be sane.
+     * 
+     * Assumes that the CProjectHelper.createCProject properly creates a C 
+     * project with a C nature, but does not add the CC nature.
+     * It also assums that the AddCCNature call works 
+     * 
+     * @see CProjectHelper#createCProject
+     * @see CoreModel#addCCNature
+     */
+    public void testHasNature() throws CoreException {
+        ICProject testProject;
+        testProject=CProjectHelper.createCProject("naturetest", "none", IPDOMManager.ID_NO_INDEXER);
+        if (testProject==null)
+            fail("Unable to create project");
+        assertTrue("hasCNature works", CoreModel.hasCNature(testProject.getProject()));
+        assertTrue("hasCCNature works without ccnature", !(CoreModel.hasCCNature(testProject.getProject())));
+   
+   
+        CCProjectNature.addCCNature(testProject.getProject(), monitor);
+        assertTrue("hasCCNature works", (CoreModel.hasCCNature(testProject.getProject())));
+        
+        CCProjectNature.removeCCNature(testProject.getProject(), monitor);
+        CProjectNature.removeCNature(testProject.getProject(), monitor);                
+        assertTrue("hasCNature works without cnature", !CoreModel.hasCNature(testProject.getProject()));
+        assertTrue("hasCCNature works without ccnature or cnature", !(CoreModel.hasCCNature(testProject.getProject())));
+		try{
+			testProject.getProject().delete(true,true,monitor);
+		} 
+		catch (CoreException e) {}
+    }    
+
+    /***
+     * Simple tests to make sure the models file identification methods seem
+     * to work as expected.
+     */
+    public void testFileType() throws CoreException,FileNotFoundException {
+        ICProject testProject;
+        testProject=CProjectHelper.createCProject("filetest", "none", IPDOMManager.ID_NO_INDEXER);
+        if (testProject==null)
+            fail("Unable to create project");
+
+        IFile file = testProject.getProject().getFile("exetest_g");
+        if (!file.exists()) {
+            file.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/exe/x86/o.g/exe_g"))),
+            		false, monitor);
+        }
+        /***
+         * file should be a binary, executable, not shared or archive
+         */
+        assertTrue("isBinary", CoreModel.getDefault().isBinary(file));
+        assertTrue("isExecutable", CoreModel.getDefault().isExecutable(file));
+        assertTrue("isSharedLib", !CoreModel.getDefault().isSharedLib(file));
+        assertTrue("isArchive", !CoreModel.getDefault().isArchive(file));
+        assertTrue("isObject", !CoreModel.getDefault().isObject(file));
+        assertTrue("isTranslationUnit", !CoreModel.isTranslationUnit(file));
+        
+        
+        file = testProject.getProject().getFile("exetest.c");
+        if (!file.exists()) {
+            file.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/exe/main.c"))),
+					false, monitor);
+        }
+        /***
+         * file should be a translation unit
+         */
+        assertTrue("isBinary", !CoreModel.getDefault().isBinary(file));
+        assertTrue("isExecutable", !CoreModel.getDefault().isExecutable(file));
+        assertTrue("isSharedLib", !CoreModel.getDefault().isSharedLib(file));
+        assertTrue("isArchive", !CoreModel.getDefault().isArchive(file));
+        assertTrue("isObject", !CoreModel.getDefault().isObject(file));
+        assertTrue("isTranslationUnit", CoreModel.isTranslationUnit(file));
+        
+        file = testProject.getProject().getFile("exetest.o");
+        if (!file.exists()) {
+            file.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/exe/x86/o.g/main.o"))),
+					false, monitor);
+        }
+        /***
+         * file should be a object file unit
+         */
+        assertTrue("isBinary", CoreModel.getDefault().isBinary(file));
+        assertTrue("isExecutable", !CoreModel.getDefault().isExecutable(file));
+        assertTrue("isSharedLib", !CoreModel.getDefault().isSharedLib(file));
+        assertTrue("isArchive", !CoreModel.getDefault().isArchive(file));
+        assertTrue("isObject", CoreModel.getDefault().isObject(file));
+        assertTrue("isTranslationUnit", !CoreModel.isTranslationUnit(file));
+
+        file = testProject.getProject().getFile("liblibtest_g.so");
+        if (!file.exists()) {
+            file.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/testlib/x86/so.g/libtestlib_g.so"))),
+					false, monitor);
+        }
+        /***
+         * file should be a sharedlib/binary file
+         */
+        assertTrue("isBinary", CoreModel.getDefault().isBinary(file));
+        assertTrue("isExecutable", !CoreModel.getDefault().isExecutable(file));
+        assertTrue("isSharedLib", CoreModel.getDefault().isSharedLib(file));
+        assertTrue("isArchive", !CoreModel.getDefault().isArchive(file));
+        assertTrue("isObject", !CoreModel.getDefault().isObject(file));
+        assertTrue("isTranslationUnit", !CoreModel.isTranslationUnit(file));
+
+        file = testProject.getProject().getFile("liblibtest_g.a");
+        if (!file.exists()) {
+            file.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/testlib/x86/a.g/libtestlib_g.a"))),
+					false, monitor);
+        } else {
+            fail("Does not exist?");
+        }
+        /***
+         * file should be a archive file
+         */
+        assertTrue("isArchive", CoreModel.getDefault().isArchive(file));
+        assertTrue("isBinary:", !CoreModel.getDefault().isBinary(file));
+        assertTrue("isExecutable", !CoreModel.getDefault().isExecutable(file));
+        assertTrue("isSharedLib", !CoreModel.getDefault().isSharedLib(file));
+        assertTrue("isArchive", CoreModel.getDefault().isArchive(file));
+        assertTrue("isObject", !CoreModel.getDefault().isObject(file));
+        assertTrue("isTranslationUnit", !CoreModel.isTranslationUnit(file));
+
+
+       
+		try{
+			testProject.getProject().delete(true,true,monitor);
+		} 
+		catch (CoreException e) {}
+    }    
+
+    /****
+     * Some simple tests for isValidTranslationUnitName
+     */
+    public void testIsValidTranslationUnitName() throws CoreException {
+        assertTrue("Invalid C file", !CoreModel.isValidTranslationUnitName(null, "notcfile"));        
+        assertTrue("Invalid C file", !CoreModel.isValidTranslationUnitName(null, "not.c.file"));        
+        assertTrue("Invalid C file", !CoreModel.isValidTranslationUnitName(null, "not.ca"));        
+        assertTrue("Valid C file", CoreModel.isValidTranslationUnitName(null, "areal.c"));        
+    }
+    
+    // bug 275609
+    public void testSourceExclusionFilters_275609() throws Exception {
+        ICProject testProject;
+        testProject=CProjectHelper.createCProject("bug257609", "none", IPDOMManager.ID_NO_INDEXER);
+        if (testProject==null)
+            fail("Unable to create project");
+
+        IFolder testFolder = testProject.getProject().getFolder("test");
+    	testFolder.create(true, true, monitor);
+        IFolder subFolder1 = testFolder.getFolder("1");
+    	subFolder1.create(true, true, monitor);
+        IFolder subFolder2 = testFolder.getFolder("2");
+    	subFolder2.create(true, true, monitor);
+        IFile file0 = testFolder.getFile("test0.c");
+        file0.create(new ByteArrayInputStream(new byte[0]), true, monitor);
+        IFile file1 = subFolder1.getFile("test1.c");
+        file1.create(new ByteArrayInputStream(new byte[0]), true, monitor);
+        IFile file2 = subFolder2.getFile("test2.c");
+        file2.create(new ByteArrayInputStream(new byte[0]), true, monitor);
+
+        List<ICElement> cSourceRoots = testProject.getChildrenOfType(ICElement.C_CCONTAINER);
+        assertEquals(1, cSourceRoots.size());
+        assertEquals(testProject.getElementName(), cSourceRoots.get(0).getElementName());
+        
+        ISourceRoot sourceRoot = (ISourceRoot) cSourceRoots.get(0);
+        
+        List<ICElement> cContainers = sourceRoot.getChildrenOfType(ICElement.C_CCONTAINER);
+        assertEquals(1, cContainers.size());
+        assertEquals("test", cContainers.get(0).getElementName());
+
+        ICContainer testContainer = (ICContainer) cContainers.get(0);
+        
+        List<ICElement> subContainers = testContainer.getChildrenOfType(ICElement.C_CCONTAINER);
+        assertEquals(2, subContainers.size());
+        assertEquals("1", subContainers.get(0).getElementName());
+        assertEquals("2", subContainers.get(1).getElementName());
+		Object[] nonCResources= testContainer.getNonCResources();
+		assertEquals(0, nonCResources.length);
+		
+        List<ICElement> tUnits = testContainer.getChildrenOfType(ICElement.C_UNIT);
+        assertEquals(1, tUnits.size());
+        assertEquals("test0.c", tUnits.get(0).getElementName());
+
+		ICProjectDescription prjDesc= CoreModel.getDefault().getProjectDescription(testProject.getProject(), true);
+		ICConfigurationDescription activeCfg= prjDesc.getActiveConfiguration();
+		assertNotNull(activeCfg);
+		
+		// add filter to source entry
+		ICSourceEntry[] entries = activeCfg.getSourceEntries();
+		final String sourceEntryName = entries[0].getName();
+		final IPath[] exclusionPatterns = new IPath[] { new Path("test/*") };
+
+		ICSourceEntry entry = new CSourceEntry(sourceEntryName, exclusionPatterns, entries[0].getFlags());
+		activeCfg.setSourceEntries(new ICSourceEntry[] {entry});
+
+		// store the changed configuration
+		CoreModel.getDefault().setProjectDescription(testProject.getProject(), prjDesc);
+		
+		testProject.close();
+
+        cSourceRoots = testProject.getChildrenOfType(ICElement.C_CCONTAINER);
+        assertEquals(1, cSourceRoots.size());
+        assertEquals(testProject.getElementName(), cSourceRoots.get(0).getElementName());
+        
+        sourceRoot = (ISourceRoot) cSourceRoots.get(0);
+        
+        cContainers = sourceRoot .getChildrenOfType(ICElement.C_CCONTAINER);
+        assertEquals(1, cContainers.size());
+        assertEquals("test", cContainers.get(0).getElementName());
+        
+        testContainer = (ICContainer) cContainers.get(0);
+        
+        tUnits = testContainer.getChildrenOfType(ICElement.C_UNIT);
+        assertEquals(0, tUnits.size());
+
+        subContainers = testContainer.getChildrenOfType(ICElement.C_CCONTAINER);
+        assertEquals(0, subContainers.size());
+        nonCResources= testContainer.getNonCResources();
+		assertEquals(3, nonCResources.length);
+		assertEquals(subFolder1, nonCResources[0]);
+		assertEquals(subFolder2, nonCResources[1]);
+		assertEquals(file0, nonCResources[2]);
+		
+		try {
+			testProject.getProject().delete(true,true,monitor);
+		} 
+		catch (CoreException e) {}
+	}
+    
+    // bug 294965
+    public void testBinaryInProjectRoot_294965() throws Exception {
+        ICProject testProject;
+        testProject = CProjectHelper.createCProject("bug294965", "none", IPDOMManager.ID_NO_INDEXER);
+        if (testProject == null) {
+            fail("Unable to create project");
+        }
+        CProjectHelper.addDefaultBinaryParser(testProject.getProject());
+        CProjectHelper.importSourcesFromPlugin(testProject, CTestPlugin.getDefault().getBundle(), "resources/exe/x86/o");
+
+		testProject.getProject().getFolder("out").create(true, true, monitor);
+		
+		ICProjectDescription prjDesc= CoreModel.getDefault().getProjectDescription(testProject.getProject(), true);
+		ICConfigurationDescription cfg= prjDesc.getActiveConfiguration();
+		assertNotNull(cfg);
+
+		// add filter to source entry
+		ICSourceEntry[] entries = cfg.getSourceEntries();
+		final String sourceEntryName = entries[0].getName();
+		final IPath[] exclusionPatterns = new IPath[] { new Path("test/*") };
+
+		ICSourceEntry sourceEntry = new CSourceEntry(sourceEntryName, exclusionPatterns, entries[0].getFlags());
+		cfg.setSourceEntries(new ICSourceEntry[] { sourceEntry });
+
+		// set output entry
+		ICOutputEntry outputEntry = new COutputEntry(testProject.getProject().getFolder("out"), new IPath[0], 0);
+		cfg.getBuildSetting().setOutputDirectories(new ICOutputEntry[] { outputEntry });
+		
+		assertEquals(outputEntry, cfg.getBuildSetting().getOutputDirectories()[0]);
+		
+		// store the changed configuration
+		CoreModel.getDefault().setProjectDescription(testProject.getProject(), prjDesc, true, monitor);
+		testProject.close();
+		testProject.getProject().close(monitor);
+		testProject.getProject().open(monitor);
+
+		prjDesc= CoreModel.getDefault().getProjectDescription(testProject.getProject(), false);
+		cfg= prjDesc.getActiveConfiguration();
+		assertEquals(outputEntry, cfg.getBuildSetting().getOutputDirectories()[0]);
+
+        Object[] nonCResources = testProject.getNonCResources();
+		assertEquals(7, nonCResources.length);
+		
+		try {
+			testProject.getProject().delete(true,true,monitor);
+		} 
+		catch (CoreException e) {}
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CPathEntryTest.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CPathEntryTest.java
new file mode 100644
index 0000000..9febc3e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/CPathEntryTest.java
@@ -0,0 +1,294 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2007 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *    QNX Software Systems - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *    IBM Corporation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ElementChangedEvent;
+import org.eclipse.cdt.core.model.ICElementDelta;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IContainerEntry;
+import org.eclipse.cdt.core.model.IElementChangedListener;
+import org.eclipse.cdt.core.model.IPathEntry;
+import org.eclipse.cdt.core.model.IPathEntryContainer;
+import org.eclipse.cdt.core.settings.model.CSourceEntry;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICSourceEntry;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+/*
+ * CPathEntryTest
+ */
+public class CPathEntryTest extends BaseTestCase {
+	IWorkspace workspace;
+	IWorkspaceRoot root;
+	IProject project_c, project_cc;
+	NullProgressMonitor monitor;
+	String pluginRoot;
+
+	class CElementListener implements IElementChangedListener {
+
+		int count = 0;
+
+		void processDelta(ICElementDelta delta) {
+			if (delta == null) {
+				return ;
+			}
+
+			int flags = delta.getFlags();
+			int kind = delta.getKind();
+			if (kind == ICElementDelta.CHANGED ) {
+				if ((flags & ICElementDelta.F_CHANGED_PATHENTRY_INCLUDE) != 0) {
+					count++;
+				}
+			}
+			ICElementDelta[] affectedChildren= delta.getAffectedChildren();
+			for (int i= 0; i < affectedChildren.length; i++) {
+				processDelta(affectedChildren[i]);
+			}
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.cdt.core.model.IElementChangedListener#elementChanged(org.eclipse.cdt.core.model.ElementChangedEvent)
+		 */
+		public void elementChanged(ElementChangedEvent event) {
+			processDelta(event.getDelta());
+		}
+
+	}
+
+	/**
+	 * Constructor for CModelTests.
+	 * 
+	 * @param name
+	 */
+	public CPathEntryTest(String name) {
+		super(name);
+	}
+
+	/**
+	 * Sets up the test fixture.
+	 * 
+	 * Called before every test case method.
+	 *  
+	 */
+	protected void setUp() throws CoreException {
+		/***************************************************************************************************************************
+		 * The test of the tests assume that they have a working workspace and workspace root object to use to create
+		 * projects/files in, so we need to get them setup first.
+		 */
+		IWorkspaceDescription desc;
+		workspace = ResourcesPlugin.getWorkspace();
+		root = workspace.getRoot();
+		monitor = new NullProgressMonitor();
+		if (workspace == null)
+			fail("Workspace was not setup");
+		if (root == null)
+			fail("Workspace root was not setup");
+		pluginRoot = CTestPlugin.getDefault().find(new Path("/")).getFile();
+		desc = workspace.getDescription();
+		desc.setAutoBuilding(false);
+		workspace.setDescription(desc);
+
+	}
+
+	/**
+	 * Tears down the test fixture.
+	 * 
+	 * Called after every test case method.
+	 */
+	protected void tearDown() {
+		// release resources here and clean-up
+	}
+
+	public static TestSuite suite() {
+		return suite(CPathEntryTest.class);
+	}
+
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(suite());
+	}
+
+	/*******************************************************************************************************************************
+	 * Check if the PathEntry's are generated.
+	 * 
+	 * @see CProjectHelper#createCProject
+	 */
+	public void testCPathEntries() throws CoreException {
+		ICProject testProject;
+		testProject = CProjectHelper.createCProject("cpathtest", "none", IPDOMManager.ID_NO_INDEXER);
+		if (testProject == null) {
+			fail("Unable to create project");
+		}
+		IPathEntry[] entries = testProject.getResolvedPathEntries();
+		// We always have at least two entries:
+		//  1) the default sourceEntry becomes the project
+		//  2) the default outputEntry becomes the project
+		assertTrue("No cpathentries", entries.length == 2);
+		entries = new IPathEntry[3];
+		entries[0] = CoreModel.newIncludeEntry(new Path(""), null, new Path("/usr/include"), true);
+		entries[1] = CoreModel.newIncludeEntry(new Path("cpaththest/foo.c"), null, new Path("/usr/include"), true);
+		entries[2] = CoreModel.newLibraryEntry(new Path(""), null, new Path("/usr/lib/libc.so.1"), null, null, null, false);
+		testProject.setRawPathEntries(entries, new NullProgressMonitor());
+		entries = testProject.getResolvedPathEntries();
+		// We always have at least two entries:
+		//  1) the default sourceEntry becomes the project
+		//  2) the default outputEntry becomes the project
+		assertTrue("Expecting 5 pathentries", entries.length == (3 + 2));
+		testProject.setRawPathEntries(null, null);
+	}
+
+	/*******************************************************************************************************************************
+	 * Check if the PathEntry's are generated.
+	 * 
+	 * @see CProjectHelper#createCProject
+	 */
+	public void testCPathEntriesDelta() throws CoreException {
+		ICProject testProject;
+		testProject = CProjectHelper.createCProject("cpathtest", "none", IPDOMManager.ID_NO_INDEXER);
+		if (testProject == null) {
+			fail("Unable to create project");
+		}
+		CProjectHelper.addCContainer(testProject, "foo");
+		IPathEntry[] entries = new IPathEntry[3];
+		entries[0] = CoreModel.newIncludeEntry(new Path(""), null, new Path("/usr/include"), true);
+		entries[1] = CoreModel.newIncludeEntry(new Path("foo"), null, new Path("/usr/include"), true);
+		entries[2] = CoreModel.newLibraryEntry(new Path(""), null, new Path("/usr/lib/libc.so.1"), null, null, null, false);
+		CElementListener listener = new CElementListener();
+		CoreModel.getDefault().addElementChangedListener(listener);
+		testProject.setRawPathEntries(entries, new NullProgressMonitor());
+		entries = testProject.getResolvedPathEntries();
+		//CoreModel.getDefault().removeElementChangedListener(listener);
+		testProject.setRawPathEntries(null, null);
+		assertTrue("Expecting 3 pathEntries deltas", listener.count > 1);
+	}
+
+	/**
+	 * Check the IPathEntryContainer.
+	 */
+	public void testPathEntryContainer() throws CoreException {
+		ICProject testProject;
+		testProject = CProjectHelper.createCProject("cpathtest", "none", IPDOMManager.ID_NO_INDEXER);
+		if (testProject == null) {
+			fail("Unable to create project");
+		}
+		final IPath containerID = new Path("Testing/Container");
+		IContainerEntry containerEntry = CoreModel.newContainerEntry(containerID);
+		IPathEntryContainer container = new IPathEntryContainer() {
+
+			public IPathEntry[] getPathEntries() {
+				IPathEntry[] entries = new IPathEntry[3];
+				entries[0] = CoreModel.newIncludeEntry(new Path(""), null, new Path("/usr/include"), true);
+				entries[1] = CoreModel.newIncludeEntry(new Path("foo.c"), null, new Path("/usr/include"), true);
+				entries[2] = CoreModel.newLibraryEntry(new Path(""), null, new Path("/usr/lib/libc.so.1"), null, null, null, true);
+				return entries;
+			}
+
+			public String getDescription() {
+				return "Testing container"; //$NON-NLS-1$
+			}
+
+			public IPath getPath() {
+				return containerID;
+			}
+			
+		};
+		CoreModel.setRawPathEntries(testProject, new IPathEntry[]{containerEntry}, new NullProgressMonitor());
+		CoreModel.setPathEntryContainer(new ICProject[]{testProject}, container, new NullProgressMonitor());
+		IPathEntry[] entries = testProject.getResolvedPathEntries();
+		// We always have at least two entries:
+		//  1) the default sourceEntry becomes the project
+		//  2) the default outputEntry becomes the project
+		assertTrue("Expecting 3 pathentries from container", entries.length == (3 + 2));
+		
+	}	
+	
+	public void testSetExclusionFilter_Bug197486() throws Exception {
+		ICProject testProject = null;
+		try {
+			testProject = CProjectHelper.createCProject("cpathtest", "none", IPDOMManager.ID_NO_INDEXER);
+		} catch (CoreException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		if (testProject == null) {
+			fail("Unable to create project");
+		}
+
+		// get project description
+		ICProjectDescription prjDesc= CoreModel.getDefault().getProjectDescription(testProject.getProject(), true);
+		ICConfigurationDescription activeCfg= prjDesc.getActiveConfiguration();
+		assertNotNull(activeCfg);
+		
+		// add filter to source entry
+		ICSourceEntry[] entries = activeCfg.getSourceEntries();
+		final String sourceEntryName = entries[0].getName();
+		final IPath[] exclusionPatterns = new IPath[] { new Path("dummy*"), new Path("dummy2/*") };
+
+		ICSourceEntry entry = new CSourceEntry(sourceEntryName, exclusionPatterns, entries[0].getFlags());
+		activeCfg.setSourceEntries(new ICSourceEntry[] {entry});
+		
+		// check the modified configuration for the exclusion patterns
+		checkExclusionPatterns(sourceEntryName, exclusionPatterns, activeCfg);
+		
+		// store the changed configuration
+		CoreModel.getDefault().setProjectDescription(testProject.getProject(), prjDesc);
+
+		// check again.
+		prjDesc= CoreModel.getDefault().getProjectDescription(testProject.getProject(), false);
+		ICConfigurationDescription[] allConfigs= prjDesc.getConfigurations();
+		assertEquals(1, allConfigs.length);
+		checkExclusionPatterns(sourceEntryName, exclusionPatterns, allConfigs[0]);
+		
+		activeCfg= prjDesc.getActiveConfiguration();
+		checkExclusionPatterns(sourceEntryName, exclusionPatterns, activeCfg);
+	}
+
+	private void checkExclusionPatterns(String sourceEntryName, IPath[] exclusionPatterns, ICConfigurationDescription cfg) {
+		assertNotNull(cfg);
+
+		ICSourceEntry[] entries = cfg.getSourceEntries();
+		assertEquals(1, entries.length);
+		assertEquals(sourceEntryName, entries[0].getName());
+		IPath[] actualExclusionPatterns = entries[0].getExclusionPatterns();
+		assertEquals(exclusionPatterns.length, actualExclusionPatterns.length);
+		assertEquals(toSet(exclusionPatterns), toSet(actualExclusionPatterns));
+	}
+	
+	private Set toSet(Object[] array) {
+		HashSet set = new HashSet();
+		for (int i = 0; i < array.length; i++) {
+			set.add(array[i]);
+		}
+		return set;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/DeclaratorsTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/DeclaratorsTests.java
new file mode 100644
index 0000000..53383d6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/DeclaratorsTests.java
@@ -0,0 +1,225 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+/*
+ * Created on Jun 9, 2003
+ * by bnicolle
+ */
+package org.eclipse.cdt.core.model.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IFunction;
+import org.eclipse.cdt.core.model.IFunctionDeclaration;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.model.ITypeDef;
+import org.eclipse.cdt.core.model.IVariable;
+
+
+/**
+ * @author bnicolle
+ *
+ */
+public class DeclaratorsTests extends IntegratedCModelTest {
+	/**
+	 * @param name
+	 */
+	public DeclaratorsTests(String name) {
+		super(name);
+	}
+	
+	/**
+	 * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+	 */
+	@Override
+	public String getSourcefileSubdir() {
+		return "resources/cmodel/";
+	}
+
+	/**
+	 * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+	 */
+	@Override
+	public String getSourcefileResource() {
+		return "DeclaratorsTests.cpp";
+	}
+	
+	/**
+	 * @returns a test suite named after this class
+	 *          containing all its public members named "test*"
+	 */
+	public static Test suite() {
+		TestSuite suite= new TestSuite(DeclaratorsTests.class);
+		return suite;
+	}
+
+
+    public void testDeclarators_0001() throws CModelException {
+        ITranslationUnit tu = getTU();
+        ICElement element = tu.getElement("decl_0001");
+        assertNotNull(element);
+        assertEquals(element.getElementType(), ICElement.C_FUNCTION_DECLARATION);
+        IFunctionDeclaration decl = (IFunctionDeclaration)element;
+        assertEquals(decl.getSignature(), "decl_0001(char)");
+        assertEquals(decl.getReturnType(), "void");
+    }
+
+    public void testDeclarators_0002() throws CModelException {
+        ITranslationUnit tu = getTU();
+        ICElement element = tu.getElement("decl_0002");
+        assertNotNull(element);
+        assertEquals(element.getElementType(), ICElement.C_FUNCTION_DECLARATION);
+        IFunctionDeclaration decl = (IFunctionDeclaration)element;
+        assertEquals(decl.getSignature(), "decl_0002(char)");
+        assertEquals(decl.getReturnType(), "void");
+    }
+
+	public void testDeclarators_0003() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement element = tu.getElement("decl_0003");
+		assertNotNull(element); 
+		assertEquals(element.getElementType(), ICElement.C_FUNCTION_DECLARATION);
+		IFunctionDeclaration decl = (IFunctionDeclaration)element;
+		assertEquals(decl.getSignature(), "decl_0003(char)");
+		assertEquals(decl.getReturnType(), "void");
+	  }
+	  
+    public void testDeclarators_0004() throws CModelException {
+        ITranslationUnit tu = getTU();
+        ICElement element = tu.getElement("decl_0004");
+        assertNotNull(element);
+        assertEquals(element.getElementType(), ICElement.C_FUNCTION_DECLARATION);
+        IFunctionDeclaration decl = (IFunctionDeclaration)element;
+        assertEquals(decl.getSignature(), "decl_0004(char)");
+        assertEquals(decl.getReturnType(), "void*");
+    }
+
+    public void testDeclarators_0005() throws CModelException {
+        ITranslationUnit tu = getTU();
+        ICElement element = tu.getElement("decl_0005");
+        assertNotNull(element);
+        assertEquals(element.getElementType(), ICElement.C_VARIABLE);
+        IVariable decl = (IVariable)element;
+        assertEquals(decl.getTypeName(), "void(*)(char)");
+    }
+
+	public void testDeclarators_0006() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement element = tu.getElement("decl_0006");
+		assertNotNull(element);
+		assertEquals(element.getElementType(), ICElement.C_VARIABLE);
+		IVariable decl = (IVariable)element;
+		assertEquals(decl.getTypeName(), "void(*)(char)");
+	}
+
+	public void testDeclarators_0007() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement element = tu.getElement("decl_0007");
+		assertNotNull(element);
+		assertEquals(element.getElementType(), ICElement.C_VARIABLE);
+		IVariable decl = (IVariable)element;
+		assertEquals(decl.getTypeName(), "void(*)(char)");
+	}
+
+
+	public void testDeclarators_0011() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement element = tu.getElement("decl_0011");
+		assertNotNull(element);
+		assertEquals(element.getElementType(), ICElement.C_TYPEDEF);
+		ITypeDef decl = (ITypeDef)element;
+		assertEquals(decl.getTypeName(), "void(char)");
+	}
+
+	public void testDeclarators_0012() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement element = tu.getElement("decl_0012");
+		assertNotNull(element);
+		assertEquals(element.getElementType(), ICElement.C_TYPEDEF);
+		ITypeDef decl = (ITypeDef)element;
+		assertEquals(decl.getTypeName(), "void(char)");
+	}
+
+	public void testDeclarators_0013() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement element = tu.getElement("decl_0013");
+		assertNotNull(element);
+		assertEquals(element.getElementType(), ICElement.C_TYPEDEF);
+		ITypeDef decl = (ITypeDef)element;
+		assertEquals(decl.getTypeName(), "void(char)");
+	}
+
+	public void testDeclarators_0014() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement element = tu.getElement("decl_0014");
+		assertNotNull(element);
+		assertEquals(element.getElementType(), ICElement.C_TYPEDEF);
+		ITypeDef decl = (ITypeDef)element;
+		assertEquals(decl.getTypeName(), "void*(char)");
+	}
+
+    public void testDeclarators_0015() throws CModelException {
+    	ITranslationUnit tu = getTU();
+    	ICElement element = tu.getElement("decl_0015");
+    	assertNotNull(element);
+    	assertEquals(element.getElementType(), ICElement.C_TYPEDEF);
+    	ITypeDef decl = (ITypeDef)element;
+    	assertEquals(decl.getTypeName(), "void(*)(char)");
+    }
+    
+	public void testDeclarators_0016() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement element = tu.getElement("decl_0016");
+		assertNotNull(element);
+		assertEquals(element.getElementType(), ICElement.C_TYPEDEF);
+		ITypeDef decl = (ITypeDef)element;
+		assertEquals(decl.getTypeName(), "void(*)(char)");
+	}
+
+	public void testDeclarators_0017() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement element = tu.getElement("decl_0017");
+		assertNotNull(element);
+		assertEquals(element.getElementType(), ICElement.C_TYPEDEF);
+		ITypeDef decl = (ITypeDef)element;
+		assertEquals(decl.getTypeName(), "void(*)(char)");
+	}
+	    
+	public void testDeclarators_0023() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement element = tu.getElement("decl_0023");
+		assertNotNull(element);
+		assertEquals(element.getElementType(), ICElement.C_FUNCTION);
+		IFunction decl = (IFunction)element;
+		assertEquals(decl.getSignature(), "decl_0023(int)");
+		assertEquals(decl.getReturnType(), "void(**)(char)");
+	}    
+
+	public void testDeclarators_0024() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement element = tu.getElement("decl_0024");
+		assertNotNull(element);
+		assertEquals(element.getElementType(), ICElement.C_VARIABLE);
+		IVariable decl = (IVariable)element;
+		assertEquals(decl.getTypeName(), "void(*(*(*)(int))(float))(char)");
+	}    
+
+    public void testDeclarators_0031() throws CModelException {
+    	ITranslationUnit tu = getTU();
+    	ICElement element = tu.getElement("decl_0031");
+    	assertNotNull(element);
+    	assertEquals(element.getElementType(), ICElement.C_VARIABLE);
+    	IVariable decl = (IVariable)element;
+    	assertEquals(decl.getTypeName(), "int(*)(char(*)(bool))");
+    } 
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/ElementDeltaTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/ElementDeltaTests.java
new file mode 100644
index 0000000..8d6f8d0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/ElementDeltaTests.java
@@ -0,0 +1,285 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.Iterator;
+import java.util.Vector;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ElementChangedEvent;
+import org.eclipse.cdt.core.model.IBuffer;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICElementDelta;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IElementChangedListener;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.model.IWorkingCopy;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.TestPluginLauncher;
+import org.eclipse.cdt.internal.core.model.CModelManager;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * Class for testing the C Element Delta Builder. 
+ */
+public class ElementDeltaTests extends TestCase implements IElementChangedListener {
+	private ICProject fCProject;
+	private IFile headerFile;
+	private NullProgressMonitor monitor;
+	private Vector addedElements;
+	private Vector removedElements;
+	private Vector changedElements;
+	
+	public static void main(String[] args) {
+		TestPluginLauncher.run(TestPluginLauncher.getLocationFromProperties(), WorkingCopyTests.class, args);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(ElementDeltaTests.class.getName());
+		suite.addTest(new ElementDeltaTests("testElementDeltas"));
+		return suite;
+	}		
+	
+	public ElementDeltaTests(String name) {
+		super(name);
+	}
+	
+	protected void setUp() throws Exception {
+		monitor = new NullProgressMonitor();
+
+		fCProject= CProjectHelper.createCCProject("TestProject1", "bin", IPDOMManager.ID_NO_INDEXER);
+		//Path filePath = new Path(ResourcesPlugin.getWorkspace().getRoot().getLocation().toString()+ fCProject.getPath().toString()+ "/WorkingCopyTest.h");
+		headerFile = fCProject.getProject().getFile("WorkingCopyTest.h");
+		if (!headerFile.exists()) {
+			try{
+				FileInputStream fileIn = new FileInputStream(
+						CTestPlugin.getDefault().getFileInPlugin(new Path("resources/cfiles/WorkingCopyTestStart.h"))); 
+				headerFile.create(fileIn,false, monitor);
+			} catch (CoreException e) {
+				e.printStackTrace();
+			} catch (FileNotFoundException e) {
+				e.printStackTrace();
+			}
+		}
+		
+		// register with the model manager to listen to delta changes
+		CModelManager.getDefault().addElementChangedListener(this);
+		addedElements = new Vector(10);
+		removedElements = new Vector(10);
+		changedElements = new Vector(20);
+	}
+
+	protected void tearDown()  {
+		  CProjectHelper.delete(fCProject);
+	}	
+		
+		
+	public void testElementDeltas() throws Exception {
+		//ITranslationUnit tu = new TranslationUnit(fCProject, headerFile);
+		ICElement celement = CoreModel.getDefault().create(headerFile);
+		ITranslationUnit tu = null;
+		if (celement instanceof ITranslationUnit) {
+			tu = (ITranslationUnit)celement;
+		}
+		assertNotNull (tu);
+		IWorkingCopy wc = tu.getWorkingCopy();
+		assertNotNull (wc);
+		assertNotNull (wc.getBuffer());
+		assertTrue (wc.exists());
+		
+		// add the class Hello
+		IBuffer wcBuf = wc.getBuffer();
+		wcBuf.setContents ("\n class Hello{ \n};");
+		wc.reconcile();
+		wc.commit(true, monitor);
+		assertChangedElement(ICElement.C_MODEL, "");
+		assertChangedElement(ICElement.C_PROJECT, "TestProject1");
+		assertChangedElement(ICElement.C_CCONTAINER, "TestProject1");
+		assertChangedElement(ICElement.C_UNIT, "WorkingCopyTest.h");
+		assertAddedElement(ICElement.C_CLASS, "Hello");
+		assertRemovedElement(ICElement.C_INCLUDE, "stdio.h");
+		assertEmptyDelta();
+		
+		// add the field x		
+		wcBuf.setContents ("\n class Hello{\n int x; \n};");
+		wc.reconcile();		
+		wc.commit(true, monitor);
+		assertChangedElement(ICElement.C_MODEL, "");
+		assertChangedElement(ICElement.C_PROJECT, "TestProject1");
+		assertChangedElement(ICElement.C_CCONTAINER, "TestProject1");
+		assertChangedElement(ICElement.C_UNIT, "WorkingCopyTest.h");
+		assertChangedElement(ICElement.C_CLASS, "Hello");
+		assertAddedElement(ICElement.C_FIELD, "x");
+		assertEmptyDelta();
+		
+		// add the method setValue
+		wcBuf.setContents ("\n class Hello{\n int x; \n void setValue(int val); \n};");
+		wc.reconcile();		
+		wc.commit(true, monitor);
+		assertChangedElement(ICElement.C_MODEL, "");
+		assertChangedElement(ICElement.C_PROJECT, "TestProject1");
+		assertChangedElement(ICElement.C_CCONTAINER, "TestProject1");
+		assertChangedElement(ICElement.C_UNIT, "WorkingCopyTest.h");
+		assertChangedElement(ICElement.C_CLASS, "Hello");
+		assertAddedElement(ICElement.C_METHOD_DECLARATION, "setValue");
+		assertEmptyDelta();
+		
+		// rename x to y
+		// this is not a change, this is add and remove
+		wcBuf.setContents ("\n class Hello{\n int y; \n void setValue(int val); \n};");
+		wc.reconcile();		
+		wc.commit(true, monitor);
+		assertChangedElement(ICElement.C_MODEL, "");
+		assertChangedElement(ICElement.C_PROJECT, "TestProject1");
+		assertChangedElement(ICElement.C_CCONTAINER, "TestProject1");
+		assertChangedElement(ICElement.C_UNIT, "WorkingCopyTest.h");
+		assertChangedElement(ICElement.C_CLASS, "Hello");
+		assertAddedElement(ICElement.C_FIELD, "y");
+		assertRemovedElement(ICElement.C_FIELD, "x");
+		assertEmptyDelta();
+
+		// remove the method
+		wcBuf.setContents ("\n class Hello{\n String y; \n};");
+		wc.reconcile();		
+		wc.commit(true, monitor);
+		assertChangedElement(ICElement.C_MODEL, "");
+		assertChangedElement(ICElement.C_PROJECT, "TestProject1");
+		assertChangedElement(ICElement.C_CCONTAINER, "TestProject1");
+		assertChangedElement(ICElement.C_UNIT, "WorkingCopyTest.h");
+		assertChangedElement(ICElement.C_CLASS, "Hello");
+		assertChangedElement(ICElement.C_FIELD, "y");
+		assertRemovedElement(ICElement.C_METHOD_DECLARATION, "setValue");
+		assertEmptyDelta();
+				
+		// remove the field		
+		wcBuf.setContents ("\n class Hello{ \n};");
+		wc.reconcile();
+		wc.commit(true, monitor);
+		assertChangedElement(ICElement.C_MODEL, "");
+		assertChangedElement(ICElement.C_PROJECT, "TestProject1");
+		assertChangedElement(ICElement.C_CCONTAINER, "TestProject1");
+		assertChangedElement(ICElement.C_UNIT, "WorkingCopyTest.h");
+		assertChangedElement(ICElement.C_CLASS, "Hello");
+		assertRemovedElement(ICElement.C_FIELD, "y");
+		assertEmptyDelta();
+
+		// remove the class
+		wcBuf.setContents ("");
+		wc.reconcile();
+		wc.commit(true, monitor);
+		assertChangedElement(ICElement.C_MODEL, "");
+		assertChangedElement(ICElement.C_PROJECT, "TestProject1");
+		assertChangedElement(ICElement.C_CCONTAINER, "TestProject1");
+		assertChangedElement(ICElement.C_UNIT, "WorkingCopyTest.h");
+		assertRemovedElement(ICElement.C_CLASS, "Hello");
+		assertEmptyDelta();
+
+		wc.destroy();
+		assertFalse(wc.exists());		
+	}
+	
+	public void assertAddedElement(int elementType, String elementName){
+		if(!isElementInList(elementType, elementName, addedElements))
+			fail("Element NOT found in Added list");
+	}
+	public void assertRemovedElement(int elementType, String elementName){
+		if(!isElementInList(elementType, elementName, removedElements))
+			fail("Element NOT found in Removed list");
+	}
+	public void assertChangedElement(int elementType, String elementName){
+		if(!isElementInList(elementType, elementName, changedElements))
+			fail("Element NOT found in Changed list");
+	}
+	public void assertEmptyDelta() {
+		assertTrue(addedElements.isEmpty());
+		assertTrue(removedElements.isEmpty());
+		assertTrue(changedElements.isEmpty());
+	}
+	public boolean isElementInList(int elementType, String elementName, Vector elementList) {
+		boolean found = false;
+		Iterator i = elementList.iterator();
+		while( i.hasNext()){
+			ICElement element = (ICElement)i.next();
+
+			if ((element.getElementName().equals(elementName)) && 
+				(element.getElementType() == elementType)){
+					// return true;
+					// just to print the whole list
+					found = true;
+					// Remove the element
+					elementList.remove(element);
+					break;
+				}
+		}
+		//return false;
+		return found;						
+	}
+	
+	public void elementChanged(ElementChangedEvent event){
+		try {
+			addedElements.clear();
+			removedElements.clear();
+			changedElements.clear();
+			ICElementDelta delta = event.getDelta();
+			processDelta(delta);
+		} catch(CModelException e) {
+		}		
+	}
+
+	protected void processDelta(ICElementDelta delta) throws CModelException {
+		// check the delta elements
+		int kind= delta.getKind();
+		int flags= delta.getFlags();
+		ICElement element= delta.getElement();
+		
+		// handle open and closing of a solution or project
+		if ((flags & ICElementDelta.F_CLOSED) != 0) {
+		}
+		if ((flags & ICElementDelta.F_OPENED) != 0) {
+		}
+		if (kind == ICElementDelta.REMOVED) {
+			removedElements.add(element);			
+		}
+		if (kind == ICElementDelta.ADDED) {
+			addedElements.add(element);			
+		}
+		if (kind == ICElementDelta.CHANGED) {
+			changedElements.add(element);
+				
+			if (flags == ICElementDelta.F_MODIFIERS)	{	
+			}
+			if (flags == ICElementDelta.F_CONTENT)	{	
+			}
+			if (flags == ICElementDelta.F_CHILDREN)	{	
+			}
+		}
+
+		ICElementDelta[] affectedChildren= delta.getAffectedChildren();
+		for (int i= 0; i < affectedChildren.length; i++) {
+			processDelta(affectedChildren[i]);
+		}
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/FlagTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/FlagTests.java
new file mode 100644
index 0000000..efdc5a7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/FlagTests.java
@@ -0,0 +1,215 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.Flags;
+import org.eclipse.cdt.internal.core.model.IConstants;
+
+/**
+ * @author Peter Graves
+ *
+ * This is a very simple set of sanity tests for the flags class to make sure
+ * there are no very silly problems in the class. It also verifies that there 
+ * is no overlap in the IConstants.
+ */
+public class FlagTests extends TestCase {
+
+    int flags[];
+    /**
+     * Constructor for FlagTests.
+     * @param name
+     */
+    public FlagTests(String name) {
+        super(name);
+    }
+    /**
+     * Sets up the test fixture.
+     *
+     * Called before every test case method.
+     * 
+     * Example code test the packages in the project 
+     *  "com.qnx.tools.ide.cdt.core"
+     */
+    protected void setUp() {
+        flags=new int[15];
+        flags[0]=IConstants.AccPublic;
+        flags[1]=IConstants.AccPrivate;
+        flags[2]=IConstants.AccProtected;
+        flags[3]=IConstants.AccStatic;
+        flags[4]=IConstants.AccExtern;
+        flags[5]=IConstants.AccInline;
+        flags[6]=IConstants.AccVolatile;
+        flags[7]=IConstants.AccRegister;
+        flags[8]=IConstants.AccExplicit;
+        flags[9]=IConstants.AccExport;
+        flags[10]=IConstants.AccAbstract;
+        flags[11]=IConstants.AccMutable;
+        flags[12]=IConstants.AccAuto;
+        flags[13]=IConstants.AccVirtual;
+        flags[14]=IConstants.AccTypename;
+
+    }
+    
+     /**
+     * Tears down the test fixture.
+     *
+     * Called after every test case method.
+     */
+    protected void tearDown() {
+       // release resources here and clean-up
+    }
+    
+    public static TestSuite suite() {
+        return new TestSuite(FlagTests.class);
+    }
+    
+    public static void main (String[] args){
+        junit.textui.TestRunner.run(suite());
+    }
+
+    public void testIsStatic()
+    {
+        int x;
+        assertTrue("isStatic with a static", Flags.isStatic(IConstants.AccStatic));
+        for (x=0;x<flags.length;x++) {
+            if (flags[x]!=IConstants.AccStatic) 
+                assertTrue("isStatic with a non-static", !Flags.isStatic(flags[x]));
+        }        
+    }
+
+    public void testIsAbstract()
+    {
+        int x;
+        assertTrue("isAbstract with a abstract", Flags.isAbstract(IConstants.AccAbstract));
+        for (x=0;x<flags.length;x++) {
+            if (flags[x]!=IConstants.AccAbstract) 
+                assertTrue("isAbstract with a non-abstract", !Flags.isAbstract(flags[x]));
+        }        
+    }
+
+    public void testIsExplicit()
+    {
+        int x;
+        assertTrue("isExplicit with a explicit", Flags.isExplicit(IConstants.AccExplicit));
+        for (x=0;x<flags.length;x++) {
+            if (flags[x]!=IConstants.AccExplicit) 
+                assertTrue("isExplicit with a non-explicit", !Flags.isExplicit(flags[x]));
+        }        
+    }
+
+    public void testIsExport()
+    {
+        int x;
+        assertTrue("isExport with a Export", Flags.isExport(IConstants.AccExport));
+        for (x=0;x<flags.length;x++) {
+            if (flags[x]!=IConstants.AccExport) 
+                assertTrue("isExport with a non-Export", !Flags.isExport(flags[x]));
+        }        
+    }
+    public void testIsExtern()
+    {
+        int x;
+        assertTrue("isExtern with a Extern", Flags.isExtern(IConstants.AccExtern));
+        for (x=0;x<flags.length;x++) {
+            if (flags[x]!=IConstants.AccExtern) 
+                assertTrue("isExtern with a non-Extern", !Flags.isExtern(flags[x]));
+        }        
+    }
+
+    public void testIsInline()
+    {
+        int x;
+        assertTrue("isInline with a Inline", Flags.isInline(IConstants.AccInline));
+        for (x=0;x<flags.length;x++) {
+            if (flags[x]!=IConstants.AccInline) 
+                assertTrue("isInline with a non-Inline", !Flags.isInline(flags[x]));
+        }        
+    }
+
+    public void testIsMutable()
+    {
+        int x;
+        assertTrue("isMutable with a Mutable", Flags.isMutable(IConstants.AccMutable));
+        for (x=0;x<flags.length;x++) {
+            if (flags[x]!=IConstants.AccMutable) 
+                assertTrue("isMutable with a non-Mutable", !Flags.isMutable(flags[x]));
+        }        
+    }
+
+    public void testIsPrivate()
+    {
+        int x;
+        assertTrue("isPrivate with a Private", Flags.isPrivate(IConstants.AccPrivate));
+        for (x=0;x<flags.length;x++) {
+            if (flags[x]!=IConstants.AccPrivate) 
+                assertTrue("isPrivate with a non-Private", !Flags.isPrivate(flags[x]));
+        }        
+    }
+
+    public void testIsPublic()
+    {
+        int x;
+        assertTrue("isPublic with a Public", Flags.isPublic(IConstants.AccPublic));
+        for (x=0;x<flags.length;x++) {
+            if (flags[x]!=IConstants.AccPublic) 
+                assertTrue("isPublic with a non-Public", !Flags.isPublic(flags[x]));
+        }        
+    }
+    
+    public void testIsProtected()
+    {
+        int x;
+        assertTrue("isProtected with a Protected", Flags.isProtected(IConstants.AccProtected));
+        for (x=0;x<flags.length;x++) {
+            if (flags[x]!=IConstants.AccProtected) 
+                assertTrue("isProtected with a non-Protected", !Flags.isProtected(flags[x]));
+        }        
+    }
+
+    public void testIsRegister()
+    {
+        int x;
+        assertTrue("isRegister with a Register", Flags.isRegister(IConstants.AccRegister));
+        for (x=0;x<flags.length;x++) {
+            if (flags[x]!=IConstants.AccRegister) 
+                assertTrue("isRegister with a non-Register", !Flags.isRegister(flags[x]));
+        }        
+    }
+    
+    public void testIsVirtual()
+    {
+        int x;
+        assertTrue("isVirtual with a Virtual", Flags.isVirtual(IConstants.AccVirtual));
+        for (x=0;x<flags.length;x++) {
+            if (flags[x]!=IConstants.AccVirtual) 
+                assertTrue("isVirtual with a non-Virtual", !Flags.isVirtual(flags[x]));
+        }        
+    }
+
+    public void testIsVolatile()
+    {
+        int x;
+        assertTrue("isVolatile with a Volatile", Flags.isVolatile(IConstants.AccVolatile));
+        for (x=0;x<flags.length;x++) {
+            if (flags[x]!=IConstants.AccVolatile) 
+                assertTrue("isVolatile with a non-Volatile", !Flags.isVolatile(flags[x]));
+        }        
+    }
+
+
+
+
+
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/IIncludeTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/IIncludeTests.java
new file mode 100644
index 0000000..28c9a6a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/IIncludeTests.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+/*
+ * Created on Jun 4, 2003
+ * by bnicolle
+ */
+package org.eclipse.cdt.core.model.tests;
+
+import java.util.LinkedHashMap;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.IInclude;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+
+/**
+ * @author bnicolle
+ *
+ */
+public class IIncludeTests extends IntegratedCModelTest {
+
+	/**
+	 * @param string
+	 */
+	public IIncludeTests(String string) {
+		super( string );
+	}
+
+	/**
+	 * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+	 */
+	public String getSourcefileSubdir() {
+		return "resources/cmodel/";
+	}
+
+	/**
+	 * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+	 */
+	public String getSourcefileResource() {
+		return "IIncludeTest.h";
+	}
+
+	/**
+	 * @returns a test suite named after this class
+	 *          containing all its public members named "test*"
+	 */
+	public static Test suite() {
+		TestSuite suite= new TestSuite(IIncludeTests.class);
+		return suite;
+	}		
+
+	public void testGetIncludeName() throws CModelException
+	{
+		ITranslationUnit tu = getTU();
+		IInclude[] theIncludes = null;
+		try {
+			theIncludes = tu.getIncludes();
+		}
+		catch( CModelException c )
+		{
+			assertNotNull("CModelException thrown",c);
+		}
+
+		LinkedHashMap expectIncludes= new LinkedHashMap();
+		expectIncludes.put("stdio.h", Boolean.TRUE);
+		expectIncludes.put("whatever.h", Boolean.FALSE);
+		expectIncludes.put("src/slash.h", Boolean.TRUE);
+		expectIncludes.put("src\\backslash.h", Boolean.TRUE); // that's a single backslash, escaped
+		expectIncludes.put("Program Files/space.h", Boolean.FALSE);
+		expectIncludes.put("../up1dir.h", Boolean.FALSE);
+		expectIncludes.put("./samedir.h", Boolean.FALSE);
+		expectIncludes.put("different_extension1.hpp", Boolean.FALSE);
+		expectIncludes.put("different_extension2.hh", Boolean.FALSE);
+		expectIncludes.put("different_extension3.x", Boolean.FALSE);
+		expectIncludes.put("no_extension", Boolean.TRUE);
+		expectIncludes.put("whitespace_after_hash", Boolean.FALSE);
+		expectIncludes.put("whitespace_before_hash", Boolean.FALSE);
+		expectIncludes.put("resync_after_bad_parse_1", Boolean.FALSE);			
+		expectIncludes.put("resync_after_bad_parse_2", Boolean.FALSE);
+		expectIncludes.put("one", Boolean.FALSE);  // C-spec does not allow this, gcc warns and includes, so we should include it, also.
+		expectIncludes.put("resync_after_bad_parse_3", Boolean.FALSE);
+		expectIncludes.put("myInclude1.h", Boolean.FALSE);
+		expectIncludes.put("vers2.h", Boolean.FALSE);					
+
+		String[] getIncludeNameList= (String[]) expectIncludes.keySet().toArray(new String[expectIncludes.size()]);
+		assertEquals( getIncludeNameList.length, theIncludes.length );
+		for( int i=0; i<getIncludeNameList.length; i++ )
+		{
+			IInclude inc1 = theIncludes[i];
+			String expectName= getIncludeNameList[i];
+			assertEquals( expectName, inc1.getIncludeName() );
+			assertEquals( ((Boolean) expectIncludes.get(expectName)).booleanValue(), inc1.isStandard());
+		}
+	}
+}
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/IMacroTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/IMacroTests.java
new file mode 100644
index 0000000..442082d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/IMacroTests.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+/*
+ * Created on Jun 6, 2003
+ * by bnicolle
+ */
+package org.eclipse.cdt.core.model.tests;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IMacro;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import java.util.List;
+
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.model.tests.IntegratedCModelTest;
+
+/**
+ * IMacroTest - Class for testing IMacro 
+ * 
+ * @author bnicolle
+ *
+ */
+public class IMacroTests extends IntegratedCModelTest {
+	/**
+	 * @returns a test suite named after this class
+	 *          containing all its public members named "test*"
+	 */
+	public static Test suite() {
+		TestSuite suite= new TestSuite( IMacroTests.class.getName() );
+		suite.addTest( new IMacroTests("testGetElementName"));
+		// TODO Bug# 38740: suite.addTest( new IMacroTest("testGetIdentifierList"));
+		// TODO Bug# 38740: suite.addTest( new IMacroTest("testGetTokenSequence"));
+		return suite;
+	}		
+
+	/**
+	 * @param name
+	 */
+	public IMacroTests(String name) {
+		super(name);
+	}
+
+	/**
+	 * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+	 */
+	public String getSourcefileSubdir() {
+		return "resources/cmodel/";
+	}
+
+	/**
+	 * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+	 */
+	public String getSourcefileResource() {
+		return "IMacroTest.h";
+	}
+
+	public void testGetElementName() throws CModelException {
+		ITranslationUnit tu = getTU();
+		List arrayElements = tu.getChildrenOfType( ICElement.C_MACRO );
+
+		String expectedList[] =  new String[] {
+			"SINGLETON",
+			"NUMBER",
+			"PRINT"
+		};
+		assertEquals( expectedList.length, arrayElements.size() );
+		for( int i=0; i<expectedList.length; i++ )
+		{
+			IMacro iMacro = (IMacro) arrayElements.get(i);
+			assertEquals( expectedList[i], iMacro.getElementName() );
+		}
+	}
+		
+	public void testGetIdentifierList() throws CModelException {
+		ITranslationUnit tu = getTU();
+		List arrayElements = tu.getChildrenOfType( ICElement.C_MACRO );
+
+		String expectedList[] =  new String[] {
+			"",
+			"",
+			"string,msg"
+		};
+		assertEquals( expectedList.length, arrayElements.size() );
+		for( int i=0; i<expectedList.length; i++ )
+		{
+			IMacro iMacro = (IMacro) arrayElements.get(i);
+			assertEquals( expectedList[i], iMacro.getIdentifierList() );
+		}
+	}
+
+	public void testGetTokenSequence() throws CModelException {
+		ITranslationUnit tu = getTU();
+		List arrayElements = tu.getChildrenOfType( ICElement.C_MACRO );
+
+		String expectedList[] =  new String[] {
+			"",
+			"1",
+			"printf(string, msg)"
+		};
+		assertEquals( expectedList.length, arrayElements.size() );
+		for( int i=0; i<expectedList.length; i++ )
+		{
+			IMacro iMacro = (IMacro) arrayElements.get(i);
+			assertEquals( expectedList[i], iMacro.getTokenSequence() );
+		}
+	}		
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/IStructureTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/IStructureTests.java
new file mode 100644
index 0000000..5606894
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/IStructureTests.java
@@ -0,0 +1,436 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IField;
+import org.eclipse.cdt.core.model.IMethodDeclaration;
+import org.eclipse.cdt.core.model.IStructure;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
+
+/**
+ * @author bnicolle
+ *
+ */
+public class IStructureTests extends IntegratedCModelTest {
+	/**
+	 * @param name
+	 */
+	public IStructureTests(String name) {
+		super(name);
+	}
+	
+	/**
+	 * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+	 */
+	@Override
+	public String getSourcefileSubdir() {
+		return "resources/cmodel/";
+	}
+
+	/**
+	 * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+	 */
+	@Override
+	public String getSourcefileResource() {
+		return "IStructure.cpp";
+	}
+	
+	/**
+	 * @returns a test suite named after this class
+	 *          containing all its public members named "test*"
+	 */
+	public static Test suite() {
+		TestSuite suite= new TestSuite( IStructureTests.class.getName() );
+		
+		// TODO check C-only behaviour using C_NATURE vs CC_NATURE
+		
+		// Interface tests:
+		suite.addTest( new IStructureTests("testGetChildrenOfTypeStruct"));
+		suite.addTest( new IStructureTests("testGetChildrenOfTypeClass")); // C++ only
+		suite.addTest( new IStructureTests("testGetFields"));
+		//Bug# 38985: solved. suite.addTest( new IStructureTests("testGetFieldsHack"));
+		suite.addTest( new IStructureTests("testGetField"));
+		suite.addTest( new IStructureTests("testGetMethods")); // C++ only
+		//Bug# 38985: solved. suite.addTest( new IStructureTests("testGetMethodsHack")); // C++ only
+		suite.addTest( new IStructureTests("testGetMethod")); // C++ only
+		suite.addTest( new IStructureTests("testIsStruct"));
+		suite.addTest( new IStructureTests("testIsClass")); // C++ only
+		suite.addTest( new IStructureTests("testIsUnion"));
+		suite.addTest( new IStructureTests("testIsAbstract")); // C++ only
+		suite.addTest( new IStructureTests("testGetBaseTypes")); // C++ only
+		suite.addTest( new IStructureTests("testGetAccessControl")); // C++ only
+		
+		// Language Specification tests:		
+		suite.addTest( new IStructureTests("testAnonymousStructObject"));
+		suite.addTest( new IStructureTests("testInnerStruct"));
+				
+		return suite;
+	}
+
+	public void testGetChildrenOfTypeStruct() throws CModelException {
+		ITranslationUnit tu = getTU();
+		List arrayStructs = tu.getChildrenOfType(ICElement.C_STRUCT);
+		String[] myExpectedStructs = {
+			"testStruct1", "testStruct2", "testStruct3", "testStruct4NoSemicolon",
+			 /* 2 anonymous structs */ "", "", "testStruct7",
+			 "testStruct8"
+		};
+		assertEquals(myExpectedStructs.length,arrayStructs.size());
+		for(int i=0; i<myExpectedStructs.length; i++) {
+			IStructure myIStruct = (IStructure) arrayStructs.get(i);
+			assertNotNull( "Failed on "+i, myIStruct);
+			assertEquals(myExpectedStructs[i], myIStruct.getElementName());
+		}
+	}
+	public void testGetChildrenOfTypeClass() throws CModelException {
+		ITranslationUnit tu = getTU();
+		List arrayClasses = tu.getChildrenOfType(ICElement.C_CLASS);
+		String[] myExpectedClasses = {
+			"testClass1", "testClass2NoSemicolon", "testClass3", "testClass4Abstract",
+			"testClass5", "testClass6"};
+		assertEquals(myExpectedClasses.length,arrayClasses.size());
+		for(int i=0; i<myExpectedClasses.length; i++) {
+			IStructure myIStruct = (IStructure) arrayClasses.get(i);
+			assertNotNull( "Failed on "+i, myIStruct);
+			assertEquals(myExpectedClasses[i], myIStruct.getElementName());
+		}
+	}
+
+	public void testGetFields() throws CModelException {
+		ITranslationUnit tu = getTU();
+		List myArrayStructs = tu.getChildrenOfType(ICElement.C_STRUCT);
+		IStructure myIStruct = (IStructure) myArrayStructs.get(0);
+		IField[] myArrayIField = myIStruct.getFields();
+		String[] myExpectedFields = {
+			"m_field1","m_field2","m_field3",
+			"m_field4","m_field5","m_field6",
+		};
+		assertEquals(myExpectedFields.length, myArrayIField.length);
+		for(int i=0; i<myArrayIField.length; i++) {
+			assertNotNull( "Failed on "+i, myArrayIField[i]);
+			assertEquals("Failed on "+i,
+				myExpectedFields[i], myArrayIField[i].getElementName());
+		}		
+	}
+
+	// TODO Bug# 38985: remove testGetFieldsHack()
+	public void testGetFieldsHack() throws CModelException {
+		ITranslationUnit tu = getTU();
+		List myArrayStructs = tu.getChildrenOfType(ICElement.C_STRUCT);
+		IStructure myIStruct = (IStructure) myArrayStructs.get(0);
+		String[] myExpectedFields = {
+			"m_field1","m_field2","m_field3",
+			"m_field4","m_field5","m_field6",
+		};
+		List myArrayIField = myIStruct.getChildrenOfType(ICElement.C_FIELD);
+		assertEquals(myExpectedFields.length, myArrayIField.size());
+		for(int i=0; i<myArrayIField.size(); i++) {
+			IField myIField = (IField) myArrayIField.get(i);
+			assertNotNull( "Failed on "+i, myIField );
+			assertEquals("Failed on "+i,
+				myExpectedFields[i], myIField.getElementName());
+		}		
+	}
+	public void testGetField() throws CModelException {
+		ITranslationUnit tu = getTU();
+		List myArrayStructs = tu.getChildrenOfType(ICElement.C_STRUCT);
+		IStructure myIStruct = (IStructure) myArrayStructs.get(0);
+		String[] myExpectedFields = {
+			"m_field1","m_field2","m_field3",
+			"m_field4","m_field5","m_field6",
+		};
+		for(int i=0; i<myExpectedFields.length; i++) {
+			IField myIField = myIStruct.getField( myExpectedFields[i] );
+			assertNotNull( "Failed on "+i, myIField);
+		}		
+		
+		String[] myUnexpectedFields = {
+			"m_field7","m_field8","m_field9",
+		};
+		for(int i=0; i<myUnexpectedFields.length; i++) {
+			IField myIField = myIStruct.getField( myUnexpectedFields[i] );
+			assertNull( "Failed on "+i, myIField);
+		}		
+	}
+	public void testGetMethods() throws CModelException {
+		ITranslationUnit tu = getTU();
+		List myArrayStructs = tu.getChildrenOfType(ICElement.C_STRUCT);
+		IStructure myIStruct = (IStructure) myArrayStructs.get(0);
+		IMethodDeclaration[] myArrayIMethod = myIStruct.getMethods();
+		String[] myExpectedMethods = {
+			"method1","method2","testStruct1","~testStruct1"
+		};
+		assertEquals(myExpectedMethods.length, myArrayIMethod.length);
+		for(int i=0; i<myArrayIMethod.length; i++) {
+			assertNotNull( "Failed on "+i, myArrayIMethod[i]);
+			assertEquals("Failed on "+i,
+				myExpectedMethods[i], myArrayIMethod[i].getElementName());
+		}		
+	}
+	// TODO Bug# 38985: remove testGetMethodsHack()
+	public void testGetMethodsHack() throws CModelException {
+		ITranslationUnit tu = getTU();
+		List myArrayStructs = tu.getChildrenOfType(ICElement.C_STRUCT);
+		IStructure myIStruct = (IStructure) myArrayStructs.get(0);
+		List myArrayIMethod = myIStruct.getChildrenOfType(ICElement.C_METHOD_DECLARATION);
+		myArrayIMethod.addAll( myIStruct.getChildrenOfType(ICElement.C_METHOD) );
+		String[] myExpectedMethods = {
+			"method1","method2","testStruct1","~testStruct1"
+		};
+		assertEquals(myExpectedMethods.length, myArrayIMethod.size());
+		for(int i=0; i<myArrayIMethod.size(); i++) {
+			IMethodDeclaration myIMethod = (IMethodDeclaration) myArrayIMethod.get(i);
+			assertNotNull( "Failed on "+i, myIMethod);
+			assertEquals("Failed on "+i,
+				myExpectedMethods[i], myIMethod.getElementName());
+		}		
+	}
+	public void testGetMethod() throws CModelException {
+		ITranslationUnit tu = getTU();
+		List myArrayStructs = tu.getChildrenOfType(ICElement.C_STRUCT);
+		IStructure myIStruct = (IStructure) myArrayStructs.get(0);
+		String[] myExpectedMethods = {
+			"method1","method2","testStruct1","~testStruct1"
+		};
+		for(int i=0; i<myExpectedMethods.length; i++) {
+			IMethodDeclaration myIMethod = myIStruct.getMethod( myExpectedMethods[i] );
+			assertNotNull( "Failed on "+i, myIMethod);
+		}		
+		
+		String[] myUnexpectedMethods = {
+			"method7","method8","method9",
+		};
+		for(int i=0; i<myUnexpectedMethods.length; i++) {
+			IMethodDeclaration myIMethod = myIStruct.getMethod( myUnexpectedMethods[i] );
+			assertNull( "Failed on "+i, myIMethod);
+		}		
+	}
+	
+	public void testIsUnion() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement myElementUnion = null;
+		ICElement myElementNonUnion = null;
+		try {
+			myElementUnion = tu.getElement("testUnion1");
+			myElementNonUnion = tu.getElement("testStruct1");
+		}
+		catch( CModelException c )
+		{
+			assertNotNull("CModelException thrown",c);
+		}
+		assertNotNull( myElementUnion );
+		assertTrue( myElementUnion.getElementType()==ICElement.C_UNION );		
+		IStructure myStructUnion = (IStructure) myElementUnion;
+		assertNotNull( myStructUnion );
+		assertTrue( myStructUnion.isUnion() );
+
+		assertNotNull( myElementNonUnion );
+		assertTrue( myElementNonUnion.getElementType()!=ICElement.C_UNION );		
+		IStructure myStructNonUnion = (IStructure) myElementNonUnion;
+		assertNotNull( myStructNonUnion );
+		assertFalse( myStructNonUnion.isUnion() );
+	}
+	public void testIsStruct() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement myElementStruct = null;
+		ICElement myElementNonStruct = null;
+		try {
+			myElementStruct = tu.getElement("testStruct1");
+			myElementNonStruct = tu.getElement("testClass1");
+		}
+		catch( CModelException c )
+		{
+			assertNotNull("CModelException thrown",c);
+		}
+		assertNotNull( myElementStruct );
+		assertTrue( myElementStruct.getElementType()==ICElement.C_STRUCT );		
+		IStructure myStructStruct = (IStructure) myElementStruct;
+		assertNotNull( myStructStruct );
+		assertTrue( myStructStruct.isStruct() );
+
+		assertNotNull( myElementNonStruct );
+		assertTrue( myElementNonStruct.getElementType()!=ICElement.C_STRUCT );		
+		IStructure myStructNonStruct = (IStructure) myElementNonStruct;
+		assertNotNull( myStructNonStruct );
+		assertFalse( myStructNonStruct.isStruct() );
+	}
+	
+	public void testIsClass() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement myElementClass = null;
+		ICElement myElementNonClass = null;
+		try {
+			myElementClass = tu.getElement("testClass1");
+			myElementNonClass = tu.getElement("testStruct1");
+		}
+		catch( CModelException c )
+		{
+			assertNotNull("CModelException thrown",c);
+		}
+		assertNotNull( myElementClass );
+		assertTrue( myElementClass.getElementType()==ICElement.C_CLASS );		
+		IStructure myStructClass = (IStructure) myElementClass;
+		assertNotNull( myStructClass );
+		assertTrue( myStructClass.isClass() );
+
+		assertNotNull( myElementNonClass );
+		assertTrue( myElementNonClass.getElementType()!=ICElement.C_CLASS );		
+		IStructure myStructNonClass = (IStructure) myElementNonClass;
+		assertNotNull( myStructNonClass );
+		assertFalse( myStructNonClass.isClass() );
+	}
+	
+	public void testIsAbstract() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement myElementAbstract = null;
+		ICElement myElementNonAbstract = null;
+		try {
+			myElementAbstract = tu.getElement("testClass4Abstract");
+			myElementNonAbstract = tu.getElement("testClass1");
+		}
+		catch( CModelException c )
+		{
+			assertNotNull("CModelException thrown",c);
+		}
+		assertNotNull( myElementAbstract );
+		assertTrue( myElementAbstract.getElementType()==ICElement.C_CLASS );		
+		IStructure myStructAbstract = (IStructure) myElementAbstract;
+		assertNotNull( myStructAbstract );
+		assertTrue( myStructAbstract.isAbstract() );
+
+		assertNotNull( myElementNonAbstract );
+		assertTrue( myElementNonAbstract.getElementType() == ICElement.C_CLASS );		
+		IStructure myStructNonAbstract = (IStructure) myElementNonAbstract;
+		assertNotNull( myStructNonAbstract );
+		assertFalse( myStructNonAbstract.isAbstract() );
+	}
+
+	// IInheritance
+	public void testGetBaseTypes() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement myElementDerived = null;
+		String[] myBaseTypes = null;
+		try {
+			myElementDerived = tu.getElement("testClass5"); // throws
+			assertNotNull( myElementDerived );
+			assertTrue( myElementDerived.getElementType()==ICElement.C_CLASS );		
+			IStructure myStructDerived = (IStructure) myElementDerived;
+			assertNotNull( myStructDerived );
+			myBaseTypes = myStructDerived.getSuperClassesNames();
+		}
+		catch( CModelException c )
+		{
+			assertNotNull("CModelException thrown",c);
+		}
+		
+		String[] myExpectedBaseTypes = {
+			"testClass1","testClass3","testClass4Abstract"
+		};
+		assertEquals( myExpectedBaseTypes.length, myBaseTypes.length );
+		for(int i=0; i<myBaseTypes.length; i++) {
+			assertEquals( "Failed on "+i, myExpectedBaseTypes[i], myBaseTypes[i] );
+		}		
+	}
+
+	// IInheritance
+	public void testGetAccessControl() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement myElementDerived = null;
+		String[] myBaseTypes = null;
+		try {
+			myElementDerived = tu.getElement("testClass5"); // throws
+			assertNotNull( myElementDerived );
+			assertTrue( myElementDerived.getElementType()==ICElement.C_CLASS );		
+			IStructure myStructDerived = (IStructure) myElementDerived;
+			assertNotNull( myStructDerived );
+			myBaseTypes = myStructDerived.getSuperClassesNames();
+		
+			ASTAccessVisibility[] myExpectedAccessControl = {
+				// TODO #38986: expect appropriate access control tags 
+				ASTAccessVisibility.PUBLIC,
+				ASTAccessVisibility.PROTECTED,
+				ASTAccessVisibility.PRIVATE
+			};
+			assertEquals( myExpectedAccessControl.length, myBaseTypes.length );
+			for(int i=0; i<myBaseTypes.length; i++) {
+				ASTAccessVisibility myAccessControl = myStructDerived.getSuperClassAccess(myBaseTypes[i]);
+				assertEquals( "Failed on "+i, myExpectedAccessControl[i], myAccessControl );
+			}		
+		}
+		catch( CModelException c )
+		{
+			assertNotNull("CModelException thrown",c);
+		}
+	}
+
+	// getStructureInfo
+	public void testGetStructureInfo() {
+	}
+
+	// TODO: Not tested; Bug# 38958. public void testGetInitializer()
+	// TODO: Not tested; Bug# 38958. public void testGetTypeName()
+	// TODO: Not tested; Bug# 38958. public void testIsConst()
+	// TODO: Not tested; Bug# 38958. public void testIsStatic()
+	// TODO: Not tested; Bug# 38958. public void testIsVolatile()
+    // TODO: Not tested; Bug# 38958. public void testGetAccessControl_Void()
+    
+	//
+	// Language Specification Tests
+	//
+	
+	public void testAnonymousStructObject() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement myElement = null;
+		try {
+			myElement = tu.getElement("testAnonymousStructObject1");
+		}
+		catch( CModelException c )
+		{
+			assertNotNull("CModelException thrown",c);
+		}
+		assertNotNull( myElement );
+		assertEquals( ICElement.C_VARIABLE, myElement.getElementType() );
+	}
+	
+	public void testInnerStruct() throws CModelException {
+		ITranslationUnit tu = getTU();
+		ICElement myElement = null;
+		try {
+			myElement = tu.getElement("testStruct8");
+		}
+		catch( CModelException c )
+		{
+			assertNotNull("CModelException thrown",c);
+		}
+		assertNotNull( myElement );
+		IStructure myIStruct = (IStructure) myElement;
+		assertNotNull( myIStruct );
+
+		String[] myExpectedInnerStructs = {
+			"testStruct9Inner", "testStruct10Inner"
+		};
+		List myInnerStructs = myIStruct.getChildrenOfType(ICElement.C_STRUCT);
+		assertEquals( myExpectedInnerStructs.length, myInnerStructs.size() );
+		for(int i=0; i<myExpectedInnerStructs.length; i++) {
+			IStructure myInnerStruct = (IStructure) myInnerStructs.get(i);
+			assertNotNull( "Failed on "+i, myInnerStruct );
+			assertEquals( "Failed on "+i, myExpectedInnerStructs[i], myInnerStruct.getElementName() );
+		}		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/ITemplateTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/ITemplateTests.java
new file mode 100644
index 0000000..1685b8b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/ITemplateTests.java
@@ -0,0 +1,347 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+/*
+ * Created on Jun 17, 2003
+ * by bnicolle
+ */
+package org.eclipse.cdt.core.model.tests;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IStructure;
+import org.eclipse.cdt.core.model.ITemplate;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.model.IVariable;
+
+
+
+/**
+ * Class for testing ITemplate interface
+ * @author bnicolle
+ *
+ */
+public class ITemplateTests extends IntegratedCModelTest {
+	/**
+	 * @param name
+	 */
+	public ITemplateTests(String name) {
+		super(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IntegratedCModelTest#getSourcefileSubdir()
+	 */
+	public String getSourcefileSubdir() {
+		return "resources/cmodel/";
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IntegratedCModelTest#getSourcefileResource()
+	 */
+	public String getSourcefileResource() {
+		return "ITemplate.cpp";
+	}
+	/**
+	 * @returns a test suite named after this class
+	 *          containing all its public members named "test*"
+	 */
+	public static Test suite() {
+		TestSuite suite= new TestSuite( IStructureTests.class.getName() );
+		
+		// Interface tests:
+		suite.addTest( new ITemplateTests("testGetChildrenOfTypeTemplate"));
+		suite.addTest( new ITemplateTests("testGetNumberOfTemplateParameters"));
+		suite.addTest( new ITemplateTests("testGetTemplateParameterTypes"));
+		suite.addTest( new ITemplateTests("testGetTemplateSignature"));
+		
+		// Language Specification tests:		
+		// TBD.
+				
+		return suite;
+	}
+
+	public List getTemplateMethods(ITranslationUnit tu) throws CModelException
+	{
+		IStructure myElem = null;
+		try {
+			myElem = (IStructure) tu.getElement("TemplateContainer");
+		}
+		catch( CModelException c ) {
+			assertNotNull( c );							
+		}
+		assertNotNull(myElem);
+		List list = myElem.getChildrenOfType(ICElement.C_TEMPLATE_METHOD_DECLARATION);
+		list.addAll((myElem.getChildrenOfType(ICElement.C_TEMPLATE_METHOD)));
+		return list;
+	}
+
+	public void testGetChildrenOfTypeTemplate() throws CModelException {
+		ITranslationUnit tu = getTU();
+		{
+			List arrayElements = tu.getChildrenOfType(ICElement.C_TEMPLATE_STRUCT);
+			String[] myExpectedValues = {
+				"Map"
+			};
+			assertEquals(myExpectedValues.length, arrayElements.size());
+			for(int i=0; i<myExpectedValues.length; i++) {
+				ICElement celement = (ICElement) arrayElements.get(i);
+				ITemplate myITemplate = (ITemplate)celement;
+				assertNotNull( "Failed on "+i, myITemplate);
+				assertEquals("Failed on "+i, myExpectedValues[i], celement.getElementName());
+			}
+		}
+		{
+			List arrayElements = tu.getChildrenOfType(ICElement.C_TEMPLATE_CLASS);
+			String[] myExpectedValues = {
+				"nonVector"
+			};
+			assertEquals(myExpectedValues.length, arrayElements.size());
+			for(int i=0; i<myExpectedValues.length; i++) {
+				ICElement celement = (ICElement) arrayElements.get(i);
+				ITemplate myITemplate = (ITemplate)celement;
+				assertNotNull( "Failed on "+i, myITemplate);
+				assertEquals("Failed on "+i, myExpectedValues[i], celement.getElementName());
+			}
+		}
+		{
+			List arrayElements = tu.getChildrenOfType(ICElement.C_TEMPLATE_UNION);
+			String[] myExpectedValues = {
+				"ArrayOverlay"
+			};
+			assertEquals(myExpectedValues.length, arrayElements.size());
+			for(int i=0; i<myExpectedValues.length; i++) {
+				ICElement celement = (ICElement) arrayElements.get(i);
+				ITemplate myITemplate = (ITemplate)celement;
+				assertNotNull( "Failed on "+i, myITemplate);
+				assertEquals("Failed on "+i, myExpectedValues[i], celement.getElementName());
+			}
+		}
+		{
+			// Method from the TemplateContainer
+			List arrayElements = getTemplateMethods(tu);
+			String[] myExpectedValues = {
+					"fum",
+					"scrum",
+				};
+				assertEquals(myExpectedValues.length, arrayElements.size());
+				// This test is no correct there is no guaranty on the order
+				// for this particular case
+				for(int i=0; i<myExpectedValues.length; i++) {
+					ICElement celement = (ICElement) arrayElements.get(i);
+					ITemplate myITemplate = (ITemplate)celement;
+					assertNotNull( "Failed on "+i, myITemplate);
+					assertEquals("Failed on "+i, myExpectedValues[i], celement.getElementName());
+				}
+		}
+		{
+			// Check the template function
+			List arrayElements = tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION);
+			// actually, none of the two are function templates, but method templates
+			String[] myExpectedValues = {
+//					"nonVector<T>::first",
+//					"Foo::fum",
+				};
+				assertEquals(myExpectedValues.length, arrayElements.size());
+				// This test is no correct there is no guaranty on the order
+				// for this particular case
+				for(int i=0; i<myExpectedValues.length; i++) {
+					ICElement celement = (ICElement) arrayElements.get(i);
+					ITemplate myITemplate = (ITemplate)celement;
+					assertNotNull( "Failed on "+i, myITemplate);
+					assertEquals("Failed on "+i, myExpectedValues[i], celement.getElementName());
+				}
+
+		}
+		{
+			// Check the template method
+			List arrayElements = tu.getChildrenOfType(ICElement.C_TEMPLATE_METHOD);
+			String[] myExpectedValues = {
+					"nonVector<T>::first",
+					"Foo::fum",
+				};
+				assertEquals(myExpectedValues.length, arrayElements.size());
+				// This test is no correct there is no guaranty on the order
+				// for this particular case
+				for(int i=0; i<myExpectedValues.length; i++) {
+					ICElement celement = (ICElement) arrayElements.get(i);
+					ITemplate myITemplate = (ITemplate)celement;
+					assertNotNull( "Failed on "+i, myITemplate);
+					assertEquals("Failed on "+i, myExpectedValues[i], celement.getElementName());
+				}
+
+		}
+		{
+			// Template function declation
+			List arrayElements = tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION_DECLARATION);
+			String[] myExpectedValues = {
+				"IsGreaterThan"
+			};
+			assertEquals(myExpectedValues.length, arrayElements.size());
+			// This test is no correct there is no guaranty on the order
+			// for this particular case
+			for(int i=0; i<myExpectedValues.length; i++) {
+				ICElement celement = (ICElement) arrayElements.get(i);
+				ITemplate myITemplate = (ITemplate)celement;
+				assertNotNull( "Failed on "+i, myITemplate);
+				assertEquals("Failed on "+i, myExpectedValues[i], celement.getElementName());
+			}
+		}
+		{
+//			// Methods and Functions are tested together as 
+//			// Function declarations in Quick Parse mode 
+//			// are considered Method Declarations in Structural parse mode
+//			List arrayElements = getTemplateMethods(tu);
+//			arrayElements.addAll(tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION));
+//			arrayElements.addAll(tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION_DECLARATION));
+//			String[] myExpectedValues = {
+//				"fum",
+//				"scrum",
+//				"nonVector<T>::first",
+//				"Foo::fum",
+//				"IsGreaterThan"
+//			};
+//			assertEquals(myExpectedValues.length, arrayElements.size());
+//			// This test is no correct there is no guaranty on the order
+//			// for this particular case
+//			for(int i=0; i<myExpectedValues.length; i++) {
+//				ICElement celement = (ICElement) arrayElements.get(i);
+//				ITemplate myITemplate = (ITemplate)celement;
+//				assertNotNull( "Failed on "+i, myITemplate);
+//				assertEquals("Failed on "+i, myExpectedValues[i], celement.getElementName());
+//			}
+		}
+
+ 		{
+			List arrayElements = tu.getChildrenOfType(ICElement.C_TEMPLATE_VARIABLE);
+			String[] myExpectedValues = {
+				"default_alloc_template<threads,inst>::S_start_free"
+			};
+			assertEquals(myExpectedValues.length, arrayElements.size());
+			for(int i=0; i<myExpectedValues.length; i++) {
+				IVariable myITemplate = (IVariable) arrayElements.get(i);
+				assertNotNull( "Failed on "+i, myITemplate);
+				assertEquals("Failed on "+i, myExpectedValues[i], myITemplate.getElementName());
+			}
+		}
+	}
+
+
+	public void testGetNumberOfTemplateParameters() throws CModelException
+	{
+		ITranslationUnit tu = getTU();
+		ArrayList arrayElements = new ArrayList();
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_STRUCT ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_CLASS ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_UNION ) );
+		arrayElements.addAll( getTemplateMethods(tu) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_METHOD ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION_DECLARATION ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_VARIABLE ) );
+		
+		int[] myExpectedNumbers = {
+			3,1,3,1,1,1,1,1,2
+		};
+		assertEquals(myExpectedNumbers.length, arrayElements.size());
+		for(int i=0; i<myExpectedNumbers.length; i++) {
+			ITemplate myTemplate = (ITemplate) arrayElements.get(i);
+			assertNotNull( "Failed on "+i, myTemplate );
+			assertEquals( "Failed on "+i, myExpectedNumbers[i],
+				myTemplate.getNumberOfTemplateParameters());
+		}
+	}
+	public void testGetTemplateParameterTypes() throws CModelException
+	{
+		ITranslationUnit tu = getTU();
+		ArrayList arrayElements = new ArrayList();
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_STRUCT ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_CLASS ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_UNION ) );
+		arrayElements.addAll( getTemplateMethods(tu) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_METHOD ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION_DECLARATION ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_VARIABLE ) );
+		
+		String[][] myExpectedValues = {
+			//"Map"
+			{"Key", "Value", "SortAlgorithm"},
+			//"nonVector"
+			{"T"},
+			//"ArrayOverlay"
+			{"X","Y","int=16"},
+			//"TemplateContainer::fum"
+			{"Bar"},
+		  	//"TemplateParameter::scrum"
+			{"int"},
+			//"nonVector::first"
+			{"T"},
+			//"Foo::fum"
+			{"Bar"},
+			//"IsGreaterThan"
+			{"X"},
+			//"default_alloc_template::S_start_free"
+			{"bool", "int"},
+		};
+		assertEquals(myExpectedValues.length, arrayElements.size());
+		for(int i=0; i<myExpectedValues.length; i++) {
+			ITemplate myTemplate = (ITemplate) arrayElements.get(i);
+			assertNotNull( "Failed on "+i, myTemplate );
+			String[] myExpectedParams = myExpectedValues[i];
+			String[] myParams = myTemplate.getTemplateParameterTypes();
+			assertEquals( "Failed on "+i, myExpectedParams.length, myParams.length );
+			for(int j=0; j<myExpectedParams.length; j++) {
+				assertEquals( "Failed on "+i+","+j, myExpectedParams[j], myParams[j] );
+			}
+		}
+	}
+	public void testGetTemplateSignature() throws CModelException
+	{
+		ITranslationUnit tu = getTU();
+		ArrayList arrayElements = new ArrayList();
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_STRUCT ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_CLASS ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_UNION ) );
+		arrayElements.addAll( getTemplateMethods(tu) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_METHOD ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION_DECLARATION ) );
+		// TEMPLATE_VARIABLE moved to failed tests
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_VARIABLE ) );
+		
+		String[] myExpectedValues = {
+			"Map<Key, Value, SortAlgorithm>",
+			"nonVector<T>",
+			"ArrayOverlay<X, Y, int=16>",
+			"fum<Bar>(int) : void",
+			"scrum<int>(void) : void", // TODO: deduce the rules of () versus (void), compare below.
+			"nonVector<T>::first<T>() const : const T&", // TODO: where should <T> be?
+			"Foo::fum<Bar>(int) : void",
+			// TODO: shouldn't signature indicate const function as well?
+			"IsGreaterThan<X>(X, X) : bool",
+			"default_alloc_template<threads,inst>::S_start_free<bool, int> : char*",
+		};
+		assertEquals(myExpectedValues.length, arrayElements.size());
+		for(int i=0; i<myExpectedValues.length; i++) {
+			ITemplate myTemplate = (ITemplate) arrayElements.get(i);
+			assertNotNull( "Failed on "+i, myTemplate );
+			assertEquals( "Failed on "+i, myExpectedValues[i],
+				myTemplate.getTemplateSignature() );
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/IntegratedCModelTest.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/IntegratedCModelTest.java
new file mode 100644
index 0000000..52261a4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/IntegratedCModelTest.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+/*
+ * Created on Jun 3, 2003
+ * by bnicolle
+ */
+package org.eclipse.cdt.core.model.tests;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * @author bnicolle
+ *
+ */
+public abstract class IntegratedCModelTest extends TestCase {
+
+	private ICProject fCProject;
+	private IFile sourceFile;
+	private NullProgressMonitor monitor;
+	private boolean structuralParse = false;
+
+	/**
+	 * 
+	 */
+	public IntegratedCModelTest() {
+		super();
+	}
+
+	/**
+	 * @param name
+	 */
+	public IntegratedCModelTest(String name) {
+		super(name);
+	}
+
+	/**
+	 * @return the subdirectory (from the plugin root) containing the required
+	 *         test sourcefile (plus a trailing slash)
+	 */
+	abstract public String getSourcefileSubdir();
+
+	/**
+	 * @return the name of the test source-file
+	 */
+	abstract public String getSourcefileResource();
+
+	public void setUp() throws Exception {
+		monitor = new NullProgressMonitor();
+		fCProject= CProjectHelper.createCCProject("TestProject1", "bin", IPDOMManager.ID_FAST_INDEXER);
+		sourceFile = fCProject.getProject().getFile( getSourcefileResource() );
+		if (!sourceFile.exists()) {
+			try{
+				FileInputStream fileIn = new FileInputStream(
+						CTestPlugin.getDefault().getFileInPlugin(new Path(getSourcefileSubdir() + getSourcefileResource()))); 
+				sourceFile.create(fileIn,false, monitor);        
+			} catch (CoreException e) {
+				e.printStackTrace();
+			} catch (FileNotFoundException e) {
+				e.printStackTrace();
+			}
+		}
+		CCorePlugin.getIndexManager().joinIndexer(2000, new NullProgressMonitor());
+	}
+
+	protected void tearDown() {
+		CProjectHelper.delete(fCProject);
+	}	
+
+	protected ITranslationUnit getTU() throws CModelException {
+		ITranslationUnit tu = (ITranslationUnit)CoreModel.getDefault().create(sourceFile);
+		CCorePlugin.getDefault().setStructuralParseMode(isStructuralParse());
+		// parse the translation unit to get the elements tree		
+		// Force the parsing now to do this in the right ParseMode.
+		tu.close();
+		tu.open(new NullProgressMonitor());
+		CCorePlugin.getDefault().setStructuralParseMode(false);
+		return tu;
+	}
+	/**
+	 * @return Returns the structuralParse.
+	 */
+	public boolean isStructuralParse() {
+		return structuralParse;
+	}
+	/**
+	 * @param structuralParse The structuralParse to set.
+	 */
+	public void setStructuralParse(boolean structuralParse) {
+		this.structuralParse = structuralParse;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/MacroTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/MacroTests.java
new file mode 100644
index 0000000..79cdd89
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/MacroTests.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+import java.util.Stack;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.IBuffer;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ISourceRange;
+import org.eclipse.cdt.core.model.ISourceReference;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DefaultLineTracker;
+import org.eclipse.jface.text.ILineTracker;
+
+
+/**
+ * @author bnicolle
+ *
+ */
+public class MacroTests extends IntegratedCModelTest {
+	/**
+	 * @param name
+	 */
+	public MacroTests(String name) {
+		super(name);
+	}
+	
+	/**
+	 * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+	 */
+	public String getSourcefileSubdir() {
+		return "resources/cmodel/";
+	}
+
+	/**
+	 * @see org.eclipse.cdt.internal.core.model.IntegratedCModelTest
+	 */
+	public String getSourcefileResource() {
+		return "MacroTests.cpp";
+	}
+	
+	/**
+	 * @returns a test suite named after this class
+	 *          containing all its public members named "test*"
+	 */
+	public static Test suite() {
+		TestSuite suite= new TestSuite(MacroTests.class);
+		return suite;
+	}
+
+	public void testBug40759 () throws CModelException, BadLocationException {
+		/* This is a list of elements in the test .c file. It will be used 
+		 * in a number of places in the tests
+		 */
+		String[] expectedStringList= {"Z", "X", "Y", 
+				"SomeName", "A::BCD", "DEFA", "DB", "B::SomeName", 
+				"PINT", "myPINT", "foobar"};
+		int[]  expectedOffsets={  8,26,39,55,89,114,130,152,187,212,227};
+		int[]  expectedLengths={  1, 1, 1, 1, 8,  4,  2, 18,  4,  6,  6};
+		/* This is a list of that the types of the above list of elements is 
+		 * expected to be.
+		 */
+		int[] expectedTypes= { ICElement.C_MACRO, ICElement.C_MACRO, 
+				ICElement.C_MACRO, ICElement.C_STRUCT, 
+				ICElement.C_VARIABLE, ICElement.C_MACRO, 
+				ICElement.C_MACRO, ICElement.C_VARIABLE, ICElement.C_MACRO,
+				ICElement.C_VARIABLE, ICElement.C_FUNCTION_DECLARATION};
+
+		ITranslationUnit myTranslationUnit = getTU();
+
+		// fix offsets in case source file is not in windows format
+		IBuffer buffer= myTranslationUnit.getBuffer();
+		ILineTracker lineTracker= new DefaultLineTracker();
+		lineTracker.set(buffer.getContents());
+		if (lineTracker.getLineDelimiter(0).length() == 1) {
+			lineTracker.set(buffer.getContents().replaceAll("[\r\n]","\r\n"));
+			for (int i = 0; i < expectedOffsets.length; i++) {
+				expectedOffsets[i] -= lineTracker.getLineNumberOfOffset(expectedOffsets[i]);
+			}
+		}
+
+		ICElement myElement;
+		Stack missing=new Stack();
+		int x;
+
+		for (x=0;x<expectedStringList.length;x++) {
+			myElement=myTranslationUnit.getElement(expectedStringList[x]);
+			if (myElement==null)
+				missing.push(expectedStringList[x]);
+			else {
+				assertTrue("Expected:" + expectedStringList[x] + " Got:" + myElement.getElementName(),
+						expectedStringList[x].equals(myElement.getElementName()));
+
+				assertTrue("Expected type for '" + expectedStringList[x] + "':" + expectedTypes[x] + " Got:" + myElement.getElementType(),
+						expectedTypes[x] == myElement.getElementType());
+
+				int offset = -1;
+				int length = -1;
+
+				if (myElement instanceof ISourceReference) {
+					ISourceRange range = ((ISourceReference)myElement).getSourceRange();
+					offset = range.getIdStartPos();
+					length = range.getIdLength();
+				}
+
+				assertTrue("Expected offset for '" + expectedStringList[x] + "':" + expectedOffsets[x] + " Got:" + offset,
+						expectedOffsets[x] == offset);
+
+				assertTrue( "Expected length for '" + expectedStringList[x] + "':" + expectedLengths[x] + " Got:" + length,
+						expectedLengths[x] == length);
+			}
+
+		}
+		if (!missing.empty()) {
+			String output=new String("Could not get elements: ");
+			while (!missing.empty())
+				output+=missing.pop() + " ";
+			assertTrue(output, false);
+		}
+
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/StructuralCModelElementsTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/StructuralCModelElementsTests.java
new file mode 100644
index 0000000..afb8b7f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/StructuralCModelElementsTests.java
@@ -0,0 +1,546 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IEnumeration;
+import org.eclipse.cdt.core.model.IEnumerator;
+import org.eclipse.cdt.core.model.IField;
+import org.eclipse.cdt.core.model.IFunction;
+import org.eclipse.cdt.core.model.IFunctionDeclaration;
+import org.eclipse.cdt.core.model.IFunctionTemplateDeclaration;
+import org.eclipse.cdt.core.model.IInclude;
+import org.eclipse.cdt.core.model.IMacro;
+import org.eclipse.cdt.core.model.IMethod;
+import org.eclipse.cdt.core.model.IMethodDeclaration;
+import org.eclipse.cdt.core.model.IMethodTemplateDeclaration;
+import org.eclipse.cdt.core.model.INamespace;
+import org.eclipse.cdt.core.model.IParent;
+import org.eclipse.cdt.core.model.ISourceRange;
+import org.eclipse.cdt.core.model.ISourceReference;
+import org.eclipse.cdt.core.model.IStructure;
+import org.eclipse.cdt.core.model.IStructureTemplate;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.model.ITypeDef;
+import org.eclipse.cdt.core.model.IVariable;
+import org.eclipse.cdt.core.model.IVariableDeclaration;
+import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class StructuralCModelElementsTests extends TestCase {	
+	private ICProject fCProject;
+	private IFile headerFile;
+	private IFile includedFile;
+	private NullProgressMonitor monitor;
+		
+	public static Test suite() {
+		TestSuite suite= new TestSuite(StructuralCModelElementsTests.class.getName());
+		suite.addTest(new StructuralCModelElementsTests("testCModelElements")); //$NON-NLS-1$
+		return suite;
+	}		
+		
+	public StructuralCModelElementsTests(String name) {
+		super(name);
+	}
+		
+	protected void setUp() throws Exception {
+		monitor = new NullProgressMonitor();
+		fCProject= CProjectHelper.createCCProject("TestProject1", "bin", IPDOMManager.ID_FAST_INDEXER); //$NON-NLS-1$ //$NON-NLS-2$
+		headerFile = fCProject.getProject().getFile("CModelElementsTest.h"); //$NON-NLS-1$
+		includedFile = fCProject.getProject().getFile("included.h"); //$NON-NLS-1$
+		if (!headerFile.exists()) {
+			try{
+				FileInputStream fileIn = new FileInputStream(
+						CTestPlugin.getDefault().getFileInPlugin(new Path("resources/cfiles/CModelElementsTestStart.h")));  //$NON-NLS-1$
+				headerFile.create(fileIn,false, monitor);        
+				FileInputStream includedFileIn = new FileInputStream(
+						CTestPlugin.getDefault().getFileInPlugin(new Path("resources/cfiles/included.h")));  //$NON-NLS-1$
+				includedFile.create(includedFileIn,false, monitor);        
+			} catch (CoreException e) {
+				e.printStackTrace();
+			} catch (FileNotFoundException e) {
+				e.printStackTrace();
+			}
+		}
+		CCorePlugin.getIndexManager().joinIndexer(10000, new NullProgressMonitor());
+	}
+
+	
+	protected void tearDown() {
+		  CProjectHelper.delete(fCProject);
+	}	
+			
+	public void testCModelElements() throws CModelException{
+		ITranslationUnit tu = (ITranslationUnit)CoreModel.getDefault().create(headerFile);
+		// turn on the structural parse mode
+		tu.close();
+		CCorePlugin.getDefault().setStructuralParseMode(true);
+		
+		// tu ---> include
+		checkInclude(tu);
+		
+		// tu ---> macro
+		checkMacro(tu);
+		
+		// tu ---> namespace: MyPackage
+		List tuPackages = tu.getChildrenOfType(ICElement.C_NAMESPACE);
+		INamespace namespace = (INamespace) tuPackages.get(0);
+		assertEquals(namespace.getElementName(), new String("MyPackage")); //$NON-NLS-1$
+		checkElementOffset(namespace);
+		checkLineNumbers(namespace, 8, 130);
+		checkClass(namespace);
+				
+		checkEnums(namespace);	
+		
+		checkVariables(namespace);		
+
+		checkVariableDeclarations(namespace);		
+		
+		checkFunctions(namespace);
+		
+		checkStructs(namespace);
+		
+		checkTemplates(namespace);
+		
+		checkArrays(tu);
+
+		// turn off the structural parse mode
+		CCorePlugin.getDefault().setStructuralParseMode(false);
+
+	}
+
+	private void checkInclude(IParent tu) throws CModelException{
+		List tuIncludes = tu.getChildrenOfType(ICElement.C_INCLUDE);
+		IInclude inc1 = (IInclude) tuIncludes.get(0);
+		assertEquals(inc1.getElementName(), new String("included.h")); //$NON-NLS-1$
+		checkElementOffset(inc1);
+		checkLineNumbers(inc1, 2, 2);
+	}
+	
+	private void checkMacro(IParent tu) throws CModelException{
+		List tuMacros = tu.getChildrenOfType(ICElement.C_MACRO);
+		IMacro mac1 = (IMacro) tuMacros.get(0);
+		assertEquals(mac1.getElementName(), new String("PRINT")); //$NON-NLS-1$
+		checkElementOffset(mac1);
+		checkLineNumbers(mac1, 5, 5);
+	}
+	
+	private void checkClass(IParent namespace) throws CModelException{
+		// MyPackage ---> class: Hello
+		List nsClasses = namespace.getChildrenOfType(ICElement.C_CLASS);		
+		IStructure classHello = (IStructure) nsClasses.get(0);
+		assertEquals(classHello.getElementName(), new String("Hello")); //$NON-NLS-1$
+		checkElementOffset(classHello);
+		checkLineNumbers(classHello, 12, 53);
+		
+		// Hello --> field: int x
+		List helloFields = classHello.getChildrenOfType(ICElement.C_FIELD);
+		IField intX = (IField) helloFields.get(0);
+		assertEquals(intX.getElementName(), new String("x")); //$NON-NLS-1$
+		checkElementOffset(intX);
+		assertEquals(intX.getTypeName(), new String("int")); //$NON-NLS-1$
+		checkLineNumbers(intX, 17, 17);
+		
+		ASTAccessVisibility xVisibility = intX.getVisibility(); 
+		if (xVisibility != ASTAccessVisibility.PROTECTED)
+			fail("visibility should be protected!"); //$NON-NLS-1$
+		
+		// Hello ---> method: void setX(int X)
+		List helloMethods = classHello.getChildrenOfType(ICElement.C_METHOD);
+		IMethod setX = (IMethod) helloMethods.get(0);
+		assertEquals(setX.getElementName(), new String("setX")); //$NON-NLS-1$
+		checkElementOffset(setX);
+		assertEquals(setX.getReturnType(), new String("void")); //$NON-NLS-1$
+		checkLineNumbers(setX, 19, 22);
+		int setXNumOfParam = setX.getNumberOfParameters();
+		if(setXNumOfParam != 1)
+			fail("setX should have one parameter!"); //$NON-NLS-1$
+		String[] setXParamTypes = setX.getParameterTypes();
+		String firstParamType = setXParamTypes[0];
+		assertEquals(firstParamType, new String("int")); //$NON-NLS-1$
+		// TODO : check for the inline here
+		
+		checkNestedNamespace(classHello);
+	}
+	private void checkNestedNamespace(IParent classHello) throws CModelException{
+		// Hello ---> namespace: MyNestedPackage 
+		List helloNamespaces = classHello.getChildrenOfType(ICElement.C_NAMESPACE);
+		INamespace myNestedPackage = (INamespace) helloNamespaces.get(0);
+		assertEquals(myNestedPackage.getElementName(), new String("MyNestedPackage")); //$NON-NLS-1$
+		checkElementOffset(myNestedPackage);
+		checkLineNumbers(myNestedPackage, 25, 52);
+
+		checkParentNestedClass(myNestedPackage);	
+		checkDerivedNestedClass(myNestedPackage);
+	}
+	private void checkParentNestedClass(IParent myNestedPackage) throws CModelException{
+		// MyNestedPackage ---> class: Y  
+		List nestedClasses = myNestedPackage.getChildrenOfType(ICElement.C_CLASS);		
+		IStructure classY = (IStructure) nestedClasses.get(0);
+		assertEquals(classY.getElementName(), new String("Y")); //$NON-NLS-1$
+		checkElementOffset(classY);
+		checkLineNumbers(classY, 28, 35);
+		
+		// Y ---> constructor: Y
+		List yMethods = classY.getChildrenOfType(ICElement.C_METHOD_DECLARATION);
+		IMethodDeclaration constructor  = (IMethodDeclaration) yMethods.get(0);
+		assertEquals(constructor.getElementName(), new String("Y")); //$NON-NLS-1$
+		checkElementOffset(constructor);
+		assertTrue (constructor.isConstructor());
+		checkLineNumbers(constructor, 32, 32);
+		
+		// Y ---> destructor: ~Y
+		IMethodDeclaration destructor  = (IMethodDeclaration) yMethods.get(1);
+		assertEquals(destructor.getElementName(), new String("~Y")); //$NON-NLS-1$
+		checkElementOffset(destructor);
+		assertTrue (destructor.isDestructor());
+		checkLineNumbers(destructor, 34, 34);
+		// TODO: check for virtual on destructors
+		
+	}
+	
+	private void checkDerivedNestedClass(IParent myNestedPackage) throws CModelException{
+		// MyNestedPackage ---> class: X public Y 
+		List nestedClasses = myNestedPackage.getChildrenOfType(ICElement.C_CLASS);		
+		IStructure classX = (IStructure) nestedClasses.get(1);
+		assertEquals(classX.getElementName(), new String("X")); //$NON-NLS-1$
+		checkElementOffset(classX);
+		checkLineNumbers(classX, 38, 51);
+		// TODO : Check for base classes here
+		
+		// X --> field: B b
+		List xFieldChildren = classX.getChildrenOfType(ICElement.C_FIELD);
+		IField bB = (IField) xFieldChildren.get(0);
+		assertEquals(bB.getElementName(), new String("b")); //$NON-NLS-1$
+		checkElementOffset(bB);
+		assertEquals(bB.getTypeName(), new String("B")); //$NON-NLS-1$
+		checkLineNumbers(bB, 42, 42);
+		ASTAccessVisibility bVisibility = bB.getVisibility(); 
+		if (bVisibility != ASTAccessVisibility.PRIVATE)
+			fail("visibility should be private!"); //$NON-NLS-1$
+		
+		// X ---> constructor chain: X 
+		List xMethodChildren = classX.getChildrenOfType(ICElement.C_METHOD);
+		IMethod xconstructor  = (IMethod) xMethodChildren.get(0);
+		assertEquals(xconstructor.getElementName(), new String("X")); //$NON-NLS-1$
+		checkElementOffset(xconstructor);
+		assertTrue (xconstructor.isConstructor());
+		checkLineNumbers(xconstructor, 46, 48);
+
+		// X ---> method declaration: doNothing
+		List xMethodDeclarations = classX.getChildrenOfType(ICElement.C_METHOD_DECLARATION);
+		IMethodDeclaration xDoNothing = (IMethodDeclaration) xMethodDeclarations.get(0);
+		assertEquals(xDoNothing.getElementName(), new String("doNothing")); //$NON-NLS-1$
+		checkElementOffset(xDoNothing);
+		assertEquals(xDoNothing.getReturnType(), new String("int"));						 //$NON-NLS-1$
+		checkLineNumbers(xDoNothing, 50, 50);
+	}
+	
+	private void checkEnums(IParent namespace) throws CModelException{
+		// MyPackage ---> enum: Noname
+		List nsEnums = namespace.getChildrenOfType(ICElement.C_ENUMERATION);		
+		IEnumeration enumarate = (IEnumeration) nsEnums.get(0);
+		assertEquals(enumarate.getElementName(), new String("")); //$NON-NLS-1$
+		checkElementOffset(enumarate);
+		checkLineNumbers(enumarate, 57, 61);
+	
+		// 	enum ---> enumerator: first = 1
+		List enumEnumerators = enumarate.getChildrenOfType(ICElement.C_ENUMERATOR);
+		IEnumerator first = (IEnumerator) enumEnumerators.get(0);
+		assertEquals(first.getElementName(), new String("first")); //$NON-NLS-1$
+		assertEquals("1", first.getConstantExpression()); //$NON-NLS-1$
+		checkElementOffset(first);
+		// 	enum ---> enumerator: second
+		IEnumerator second = (IEnumerator) enumEnumerators.get(1);
+		assertEquals(second.getElementName(), new String("second")); //$NON-NLS-1$
+		checkElementOffset(second);
+		// 	enum ---> enumerator: third
+		IEnumerator third = (IEnumerator) enumEnumerators.get(2);
+		checkElementOffset(third);
+		assertEquals(third.getElementName(), new String("third"));		 //$NON-NLS-1$
+		checkElementOffset(third);
+		
+		// MyPackage ---> enum: MyEnum
+		IEnumeration myEnum = (IEnumeration) nsEnums.get(1);
+		assertEquals(myEnum.getElementName(), new String("MyEnum")); //$NON-NLS-1$
+		checkElementOffset(myEnum);
+		checkLineNumbers(myEnum, 64, 67);
+	
+		// 	enum ---> enumerator: first
+		List myEnumEnumerators = myEnum.getChildrenOfType(ICElement.C_ENUMERATOR);
+		IEnumerator f = (IEnumerator) myEnumEnumerators.get(0);
+		assertEquals(f.getElementName(), new String("f")); //$NON-NLS-1$
+		checkElementOffset(f);
+		// 	enum ---> enumerator: second
+		IEnumerator s = (IEnumerator) myEnumEnumerators.get(1);
+		assertEquals(s.getElementName(), new String("s")); //$NON-NLS-1$
+		checkElementOffset(s);
+		// 	enum ---> enumerator: third
+		IEnumerator t = (IEnumerator) myEnumEnumerators.get(2);
+		assertEquals(t.getElementName(), new String("t")); //$NON-NLS-1$
+		checkElementOffset(t);
+	}
+
+	private void checkVariables(IParent namespace) throws CModelException{
+		// MyPackage ---> int v
+		List nsVars = namespace.getChildrenOfType(ICElement.C_VARIABLE);
+		IVariable var1 = (IVariable) nsVars.get(0);
+		assertEquals(var1.getElementName(), new String("v")); //$NON-NLS-1$
+		checkElementOffset(var1);
+		assertEquals(var1.getTypeName(), new String("int")); //$NON-NLS-1$
+		checkLineNumbers(var1, 71, 71);
+		
+		// MyPackage ---> unsigned long vuLong
+		IVariable var2 = (IVariable) nsVars.get(1);
+		assertEquals(var2.getElementName(), new String("vuLong")); //$NON-NLS-1$
+		checkElementOffset(var2);
+		assertEquals(var2.getTypeName(), new String("unsigned long")); //$NON-NLS-1$
+		checkLineNumbers(var2, 73, 73);
+
+		// MyPackage ---> unsigned short vuShort
+		IVariable var3 = (IVariable) nsVars.get(2);
+		assertEquals(var3.getElementName(), new String("vuShort")); //$NON-NLS-1$
+		checkElementOffset(var3);
+		assertEquals(var3.getTypeName(), new String("unsigned short")); //$NON-NLS-1$
+		checkLineNumbers(var3, 75, 75);
+		
+		// MyPackage ---> function pointer: orig_malloc_hook
+		IVariable vDecl2 = (IVariable) nsVars.get(3);
+		assertEquals(vDecl2.getElementName(), new String("orig_malloc_hook")); //$NON-NLS-1$
+		checkElementOffset(vDecl2);
+		assertEquals(vDecl2.getTypeName(), new String ("void*(*)(const char*, int, int)")); //$NON-NLS-1$
+		checkLineNumbers(vDecl2, 81, 81);
+		
+	}
+
+	private void checkVariableDeclarations(IParent namespace) throws CModelException{
+		// MyPackage ---> extern int evar
+		List nsVarDecls = namespace.getChildrenOfType(ICElement.C_VARIABLE_DECLARATION);
+		IVariableDeclaration vDecl1 = (IVariableDeclaration) nsVarDecls.get(0);
+		assertEquals(vDecl1.getElementName(), new String("evar")); //$NON-NLS-1$
+		checkElementOffset(vDecl1);
+		assertEquals(vDecl1.getTypeName(), new String("int")); //$NON-NLS-1$
+		checkLineNumbers(vDecl1, 79, 79);
+	}
+	
+	private void checkFunctions(IParent namespace) throws CModelException{
+		List nsFunctionDeclarations = namespace.getChildrenOfType(ICElement.C_FUNCTION_DECLARATION);
+
+		//	MyPackage ---> function: void foo()
+		IFunctionDeclaration f1 = (IFunctionDeclaration) nsFunctionDeclarations.get(0);
+		assertEquals(f1.getElementName(), new String("foo")); //$NON-NLS-1$
+		checkElementOffset(f1);
+		assertEquals(f1.getReturnType(), new String("void")); //$NON-NLS-1$
+		checkLineNumbers(f1, 85, 85);
+		
+		//	MyPackage ---> function: char* foo(int&, char**)
+		IFunctionDeclaration f2 = (IFunctionDeclaration) nsFunctionDeclarations.get(1);
+		assertEquals(f2.getElementName(), new String("foo")); //$NON-NLS-1$
+		checkElementOffset(f2);
+		assertEquals(f2.getReturnType(), new String("char*")); //$NON-NLS-1$
+		checkLineNumbers(f2, 87, 88);
+		int fooNumOfParam = f2.getNumberOfParameters();
+		if(fooNumOfParam != 2)
+			fail("foo should have two parameter!"); //$NON-NLS-1$
+		String[] paramTypes = f2.getParameterTypes();
+		assertEquals(paramTypes[0], new String("int&")); //$NON-NLS-1$
+		assertEquals(paramTypes[1], new String("char**")); //$NON-NLS-1$
+	
+		//	MyPackage ---> function: void boo() {}		
+		List nsFunctions = namespace.getChildrenOfType(ICElement.C_FUNCTION);
+		IFunction f3 = (IFunction) nsFunctions.get(0);		
+		assertEquals(f3.getElementName(), new String("boo")); //$NON-NLS-1$
+		checkElementOffset(f3);
+		assertEquals(f3.getReturnType(), new String("void")); //$NON-NLS-1$
+		checkLineNumbers(f3, 90, 92);
+	}
+
+	private void checkStructs(IParent namespace) throws CModelException{
+		// struct with name
+		List nsStructs = namespace.getChildrenOfType(ICElement.C_STRUCT);
+		IStructure struct1 = (IStructure) nsStructs.get(0);
+		assertEquals(struct1.getElementName(), new String ("MyStruct")); //$NON-NLS-1$
+		checkElementOffset(struct1);
+		checkLineNumbers(struct1, 95, 97);
+		List struct1Fields = struct1.getChildrenOfType(ICElement.C_FIELD);
+		IField field1 = (IField) struct1Fields.get(0);
+		assertEquals(field1.getElementName(), new String("sint")); //$NON-NLS-1$
+		checkElementOffset(field1);
+		assertEquals(field1.getTypeName(), new String("int")); //$NON-NLS-1$
+		checkLineNumbers(field1, 96, 96);
+		
+		if(field1.getVisibility() != ASTAccessVisibility.PUBLIC)
+			fail("field visibility should be public!"); //$NON-NLS-1$
+		
+		// struct no name
+		IStructure struct2;
+		List nsTypeDefs = namespace.getChildrenOfType(ICElement.C_TYPEDEF);
+		ITypeDef td = (ITypeDef) nsTypeDefs.get(1);
+		if (td instanceof IParent) {
+			// nested in typedef decl
+			struct2 = (IStructure) ((IParent)td).getChildren()[0];
+		} else {
+			struct2 = (IStructure) nsStructs.get(1);
+		}
+		assertEquals(struct2.getElementName(), new String ("")); //$NON-NLS-1$
+		checkElementOffset(struct2);
+		checkLineNumbers(struct2, 101, 103);
+		List struct2Fields = struct2.getChildrenOfType(ICElement.C_FIELD);
+		IField field2 = (IField) struct2Fields.get(0);
+		assertEquals(field2.getElementName(), new String("ss")); //$NON-NLS-1$
+		checkElementOffset(field2);
+		assertEquals(field2.getTypeName(), new String("int")); //$NON-NLS-1$
+		checkLineNumbers(field2, 102, 102);
+		if(field2.getVisibility() != ASTAccessVisibility.PUBLIC)
+			fail("field visibility should be public!"); //$NON-NLS-1$
+		
+		// typedefs
+		ITypeDef td1 = (ITypeDef) nsTypeDefs.get(0);
+		assertEquals(td1.getElementName(), new String ("myStruct")); //$NON-NLS-1$
+		checkElementOffset(td1);
+		assertEquals(td1.getTypeName(), new String ("struct MyStruct")); //$NON-NLS-1$
+		checkLineNumbers(td1, 99, 99);
+		ITypeDef td2 = (ITypeDef) nsTypeDefs.get(1);
+		assertEquals(td2.getElementName(), new String ("myTypedef")); //$NON-NLS-1$
+		checkElementOffset(td2);
+		assertEquals(td2.getTypeName(), new String ("struct")); //$NON-NLS-1$
+		checkLineNumbers(td2, 103, 103);
+
+		// union
+		List nsUnions = namespace.getChildrenOfType(ICElement.C_UNION);
+		IStructure u0 = (IStructure) nsUnions.get(0);
+		assertEquals(u0.getElementName(), new String("U"));		 //$NON-NLS-1$
+		checkElementOffset(u0);
+		checkLineNumbers(u0, 105, 107);
+		List u0Fields = u0.getChildrenOfType(ICElement.C_FIELD);
+		IField field3 = (IField) u0Fields.get(0);
+		assertEquals(field3.getElementName(), new String("U1")); //$NON-NLS-1$
+		checkElementOffset(field3);
+		assertEquals(field3.getTypeName(), new String("int")); //$NON-NLS-1$
+		checkLineNumbers(field3, 106, 106);
+		if(field3.getVisibility() != ASTAccessVisibility.PUBLIC)
+			fail("field visibility should be public!"); //$NON-NLS-1$
+	}
+
+	private void checkTemplates(IParent namespace) throws CModelException{
+		// template function
+		List functionTemplates = namespace.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION_DECLARATION);
+		IFunctionTemplateDeclaration ft = (IFunctionTemplateDeclaration)functionTemplates.get(0);
+		assertEquals(ft.getElementName(), new String("aTemplatedFunction")); //$NON-NLS-1$
+		checkElementOffset(ft);
+		ft.getTemplateSignature();
+		assertEquals(ft.getTemplateSignature(), new String("aTemplatedFunction<A, B>(B) : A")); //$NON-NLS-1$
+		checkLineNumbers(ft, 112, 113);
+		
+		// template method
+		List nsClasses = namespace.getChildrenOfType(ICElement.C_CLASS);
+		IStructure enclosingClass = (IStructure) nsClasses.get(1);
+		checkLineNumbers(enclosingClass, 115, 120);
+		List methodTemplates = enclosingClass.getChildrenOfType(ICElement.C_TEMPLATE_METHOD_DECLARATION);
+		IMethodTemplateDeclaration mt = (IMethodTemplateDeclaration)methodTemplates.get(0);
+		assertEquals(mt.getElementName(), new String("aTemplatedMethod")); //$NON-NLS-1$
+		checkElementOffset(mt);
+		assertEquals(mt.getTemplateSignature(), new String("aTemplatedMethod<A, B>(B) : A")); //$NON-NLS-1$
+		checkLineNumbers(mt, 118, 119 );
+		assertEquals(mt.getVisibility(), ASTAccessVisibility.PUBLIC);
+		
+		// template class
+		List classTemplates = namespace.getChildrenOfType(ICElement.C_TEMPLATE_CLASS);
+		IStructureTemplate ct = (IStructureTemplate)classTemplates.get(0);
+		assertEquals(ct.getElementName(), new String("myarray")); //$NON-NLS-1$
+		checkElementOffset(ct);
+		assertEquals(ct.getTemplateSignature(), new String("myarray<T, Tibor>")); //$NON-NLS-1$
+		checkLineNumbers(ct, 122, 123);
+
+		// template struct
+		List structTemplates = namespace.getChildrenOfType(ICElement.C_TEMPLATE_STRUCT);
+		IStructureTemplate st = (IStructureTemplate)structTemplates.get(0);
+		assertEquals(st.getElementName(), new String("mystruct")); //$NON-NLS-1$
+		checkElementOffset(st);
+		assertEquals(st.getTemplateSignature(), new String("mystruct<T, Tibor>")); //$NON-NLS-1$
+		checkLineNumbers(st, 125, 126);
+
+		// moved to failed tests
+		// also commented in the source file
+		// template variable
+//		ArrayList variableTemplates = namespace.getChildrenOfType(ICElement.C_TEMPLATE_VARIABLE);
+//		VariableTemplate vt = (VariableTemplate)variableTemplates.get(0);
+//		assertEquals(vt.getElementName(), new String("default_alloc_template<__threads,__inst>::_S_start_free"));
+//		checkElementOffset((CElement)mac1);
+//		assertEquals(vt.getTemplateSignature(), new String("default_alloc_template<__threads,__inst>::_S_start_free<bool, int> : char*"));
+//		checkLineNumbers((CElement)vt, 128, 129);
+	}
+	
+	private void checkArrays(IParent tu) throws CModelException{
+		// array variable
+		List variables = tu.getChildrenOfType(ICElement.C_VARIABLE);
+		IVariable arrayVar = (IVariable) variables.get(0);
+		assertEquals(arrayVar.getElementName(), new String("myArray")); //$NON-NLS-1$
+		checkElementOffset(arrayVar);
+		assertEquals(arrayVar.getTypeName(), new String("int[][]")); //$NON-NLS-1$
+		checkLineNumbers(arrayVar, 133, 133);
+		
+		// array parameter in function main
+		List functions = tu.getChildrenOfType(ICElement.C_FUNCTION);
+		IFunction mainFunction  = (IFunction) functions.get(0);
+		assertEquals(mainFunction.getElementName(), new String("main")); //$NON-NLS-1$
+		checkElementOffset(mainFunction);
+		assertEquals(mainFunction.getReturnType(), new String("int")); //$NON-NLS-1$
+		checkLineNumbers(mainFunction, 134, 136);
+		int NumOfParam = mainFunction.getNumberOfParameters();
+		if(NumOfParam != 2)
+			fail("main should have two parameter!"); //$NON-NLS-1$
+		String[] paramTypes = mainFunction.getParameterTypes();
+		assertEquals(paramTypes[0], new String("int")); //$NON-NLS-1$
+		assertEquals(paramTypes[1], new String("char*[]")); //$NON-NLS-1$
+		
+	}
+	private void checkLineNumbers(ICElement element, int startLine, int endLine) throws CModelException {
+		ISourceRange range = ((ISourceReference)element).getSourceRange();
+		assertEquals(startLine, range.getStartLine());
+		assertEquals(endLine, range.getEndLine());		 		
+	}
+	
+	private void checkElementOffset(ICElement element) throws CModelException{
+		String name = element.getElementName();
+		ISourceRange range = ((ISourceReference)element).getSourceRange();
+		if(name.length() > 0 ){
+			assertTrue (range.getStartPos() <= range.getIdStartPos());
+			assertEquals (range.getIdLength(), name.length());
+		} else {
+			assertEquals (range.getStartPos(), range.getIdStartPos());
+			if (element instanceof ITypeDef)
+				assertEquals (range.getIdLength(), ((ITypeDef)element).getTypeName().length());
+			else if(element instanceof IEnumeration)
+				assertEquals (range.getIdLength(), ((IEnumeration)element).getTypeName().length());
+			else if(element instanceof IStructure)
+				assertEquals (range.getIdLength(), ((IStructure)element).getTypeName().length());
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/StructuralMacroTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/StructuralMacroTests.java
new file mode 100644
index 0000000..854ffba
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/StructuralMacroTests.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+/**
+ * @author hamer
+ *
+ */
+
+import org.eclipse.cdt.core.model.CModelException;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class StructuralMacroTests extends IMacroTests {
+
+	/**
+	 * @returns a test suite named after this class
+	 *          containing all its public members named "test*"
+	 */
+	public static Test suite() {
+		TestSuite suite= new TestSuite( StructuralMacroTests.class.getName() );
+		suite.addTest( new StructuralMacroTests("testGetElementName"));
+		return suite;
+	}		
+
+	/**
+	 * @param name
+	 */
+	public StructuralMacroTests(String name) {
+		super(name);
+	}
+	
+	
+	public void testGetElementName() throws CModelException {
+		setStructuralParse(true);
+		super.testGetElementName();
+	}	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/StructuralStructureTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/StructuralStructureTests.java
new file mode 100644
index 0000000..312ffe0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/StructuralStructureTests.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+import org.eclipse.cdt.core.model.CModelException;
+
+import junit.framework.*;
+
+/**
+ * @author hamer
+ *
+ */
+public class StructuralStructureTests extends IStructureTests {
+	/**
+	 * @param name
+	 */
+	public StructuralStructureTests(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite( StructuralStructureTests.class.getName() );
+		
+		// TODO check C-only behaviour using C_NATURE vs CC_NATURE
+		
+		// Interface tests:
+		suite.addTest( new StructuralStructureTests("testGetChildrenOfTypeStruct"));
+		suite.addTest( new StructuralStructureTests("testGetChildrenOfTypeClass")); // C++ only
+		suite.addTest( new StructuralStructureTests("testGetFields"));
+		suite.addTest( new StructuralStructureTests("testGetField"));
+		suite.addTest( new StructuralStructureTests("testGetMethods")); // C++ only
+		suite.addTest( new StructuralStructureTests("testGetMethod")); // C++ only
+		suite.addTest( new StructuralStructureTests("testIsStruct"));
+		suite.addTest( new StructuralStructureTests("testIsClass")); // C++ only
+		suite.addTest( new StructuralStructureTests("testIsUnion"));
+		suite.addTest( new StructuralStructureTests("testIsAbstract")); // C++ only
+		suite.addTest( new StructuralStructureTests("testGetBaseTypes")); // C++ only
+		suite.addTest( new StructuralStructureTests("testGetAccessControl")); // C++ only
+		
+		// Language Specification tests:		
+		suite.addTest( new StructuralStructureTests("testAnonymousStructObject"));
+		suite.addTest( new StructuralStructureTests("testInnerStruct"));
+				
+		return suite;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testAnonymousStructObject()
+	 */
+	public void testAnonymousStructObject() throws CModelException {
+		setStructuralParse(true);
+		super.testAnonymousStructObject();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testGetAccessControl()
+	 */
+	public void testGetAccessControl() throws CModelException {
+		setStructuralParse(true);
+		super.testGetAccessControl();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testGetBaseTypes()
+	 */
+	public void testGetBaseTypes() throws CModelException {
+		setStructuralParse(true);
+		super.testGetBaseTypes();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testGetChildrenOfTypeClass()
+	 */
+	public void testGetChildrenOfTypeClass() throws CModelException {
+		setStructuralParse(true);
+		super.testGetChildrenOfTypeClass();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testGetChildrenOfTypeStruct()
+	 */
+	public void testGetChildrenOfTypeStruct() throws CModelException {
+		setStructuralParse(true);
+		super.testGetChildrenOfTypeStruct();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testGetField()
+	 */
+	public void testGetField() throws CModelException {
+		setStructuralParse(true);
+		super.testGetField();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testGetFields()
+	 */
+	public void testGetFields() throws CModelException {
+		setStructuralParse(true);
+		super.testGetFields();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testGetFieldsHack()
+	 */
+	public void testGetFieldsHack() throws CModelException {
+		setStructuralParse(true);
+		super.testGetFieldsHack();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testGetMethod()
+	 */
+	public void testGetMethod() throws CModelException {
+		setStructuralParse(true);
+		super.testGetMethod();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testGetMethods()
+	 */
+	public void testGetMethods() throws CModelException {
+		setStructuralParse(true);
+		super.testGetMethods();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testGetMethodsHack()
+	 */
+	public void testGetMethodsHack() throws CModelException {
+		setStructuralParse(true);
+		super.testGetMethodsHack();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testGetStructureInfo()
+	 */
+	public void testGetStructureInfo() {
+		setStructuralParse(true);
+		super.testGetStructureInfo();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testInnerStruct()
+	 */
+	public void testInnerStruct() throws CModelException {
+		setStructuralParse(true);
+		super.testInnerStruct();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testIsAbstract()
+	 */
+	public void testIsAbstract() throws CModelException {
+		setStructuralParse(true);
+		super.testIsAbstract();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testIsClass()
+	 */
+	public void testIsClass() throws CModelException {
+		setStructuralParse(true);
+		super.testIsClass();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testIsStruct()
+	 */
+	public void testIsStruct() throws CModelException {
+		setStructuralParse(true);
+		super.testIsStruct();
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.IStructureTests#testIsUnion()
+	 */
+	public void testIsUnion() throws CModelException {
+		setStructuralParse(true);
+		super.testIsUnion();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/StructuralTemplateTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/StructuralTemplateTests.java
new file mode 100644
index 0000000..963c545
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/StructuralTemplateTests.java
@@ -0,0 +1,231 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ITemplate;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+
+/**
+ * @author hamer
+ *
+ */
+public class StructuralTemplateTests extends ITemplateTests {
+	/**
+	 * @param name
+	 */
+	public StructuralTemplateTests(String name) {
+		super(name);
+	}
+	public static Test suite() {
+		TestSuite suite= new TestSuite( StructuralTemplateTests.class.getName() );
+		
+		// Interface tests:
+		suite.addTest( new StructuralTemplateTests("testGetChildrenOfTypeTemplate"));
+		suite.addTest( new StructuralTemplateTests("testGetNumberOfTemplateParameters"));
+		suite.addTest( new StructuralTemplateTests("testGetTemplateParameterTypes"));
+		suite.addTest( new StructuralTemplateTests("testGetTemplateSignature"));
+						
+		return suite;
+	}
+	
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.ITemplateTests#testGetChildrenOfTypeTemplate()
+	 */
+	public void testGetChildrenOfTypeTemplate() throws CModelException {
+		setStructuralParse(true);
+		ITranslationUnit tu = getTU();
+		{
+			List arrayElements = tu.getChildrenOfType(ICElement.C_TEMPLATE_STRUCT);
+			String[] myExpectedValues = {
+				"Map"
+			};
+			assertEquals(myExpectedValues.length, arrayElements.size());
+			for(int i=0; i<myExpectedValues.length; i++) {
+				ICElement celement = (ICElement) arrayElements.get(i);
+				ITemplate myITemplate = (ITemplate)celement;
+				assertNotNull( "Failed on "+i, myITemplate);
+				assertEquals("Failed on "+i, myExpectedValues[i], celement.getElementName());
+			}
+		}
+		{
+			List arrayElements = tu.getChildrenOfType(ICElement.C_TEMPLATE_CLASS);
+			String[] myExpectedValues = {
+				"nonVector"
+			};
+			assertEquals(myExpectedValues.length, arrayElements.size());
+			for(int i=0; i<myExpectedValues.length; i++) {
+				ICElement celement = (ICElement) arrayElements.get(i);
+				ITemplate myITemplate = (ITemplate)celement;
+				assertNotNull( "Failed on "+i, myITemplate);
+				assertEquals("Failed on "+i, myExpectedValues[i], celement.getElementName());
+			}
+		}
+		{
+			List arrayElements = tu.getChildrenOfType(ICElement.C_TEMPLATE_UNION);
+			String[] myExpectedValues = {
+				"ArrayOverlay"
+			};
+			assertEquals(myExpectedValues.length, arrayElements.size());
+			for(int i=0; i<myExpectedValues.length; i++) {
+				ICElement celement = (ICElement) arrayElements.get(i);
+				ITemplate myITemplate = (ITemplate)celement;
+				assertNotNull( "Failed on "+i, myITemplate);
+				assertEquals("Failed on "+i, myExpectedValues[i], celement.getElementName());
+			}
+		}
+		{
+			// Methods and Functions are tested together as 
+			// Function declarations in Quick Parse mode 
+			// are considered Method Declarations in Structural parse mode
+			List arrayElements = getTemplateMethods(tu);
+			arrayElements.addAll(tu.getChildrenOfType(ICElement.C_TEMPLATE_METHOD));
+			arrayElements.addAll(tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION));
+			arrayElements.addAll(tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION_DECLARATION));
+			String[] myExpectedValues = {
+				"fum",
+				"scrum",
+				"nonVector<T>::first",
+				"Foo::fum",
+				"IsGreaterThan",
+			};
+			assertEquals(myExpectedValues.length, arrayElements.size());
+			for(int i=0; i<myExpectedValues.length; i++) {
+				ICElement celement = (ICElement) arrayElements.get(i);
+				ITemplate myITemplate = (ITemplate)celement;
+				assertNotNull( "Failed on "+i, myITemplate);
+				assertEquals("Failed on "+i, myExpectedValues[i], celement.getElementName());
+			}
+		}
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.ITemplateTests#testGetNumberOfTemplateParameters()
+	 */
+	public void testGetNumberOfTemplateParameters() throws CModelException {
+		setStructuralParse(true);
+		ITranslationUnit tu = getTU();
+		ArrayList arrayElements = new ArrayList();
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_STRUCT ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_CLASS ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_UNION ) );
+		arrayElements.addAll( getTemplateMethods(tu) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION_DECLARATION ) );
+		arrayElements.addAll(tu.getChildrenOfType(ICElement.C_TEMPLATE_METHOD));
+		// TEMPLATE_VARIABLE moved to failed tests
+		//arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_VARIABLE ) );
+		
+		int[] myExpectedNumbers = {
+//			3,1,3,1,1,3
+			3,1,3,1,1,1,1,1/*,2*/
+		};
+		assertEquals(myExpectedNumbers.length, arrayElements.size());
+		for(int i=0; i<myExpectedNumbers.length; i++) {
+			ITemplate myTemplate = (ITemplate) arrayElements.get(i);
+			assertNotNull( "Failed on "+i, myTemplate );
+			assertEquals( "Failed on "+i, myExpectedNumbers[i],
+				myTemplate.getNumberOfTemplateParameters());
+		}
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.ITemplateTests#testGetTemplateParameterTypes()
+	 */
+	public void testGetTemplateParameterTypes() throws CModelException {
+		setStructuralParse(true);
+		ITranslationUnit tu = getTU();
+		ArrayList arrayElements = new ArrayList();
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_STRUCT ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_CLASS ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_UNION ) );
+		arrayElements.addAll( getTemplateMethods(tu) );
+		arrayElements.addAll(tu.getChildrenOfType(ICElement.C_TEMPLATE_METHOD));
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION ) );
+		arrayElements.addAll(tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION_DECLARATION));
+		// TEMPLATE_VARIABLE moved to failed tests
+		//arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_VARIABLE ) );
+		
+		String[][] myExpectedValues = {
+			//"Map"
+			{"Key", "Value", "SortAlgorithm"},
+			//"nonVector"
+			{"T"},
+			//"ArrayOverlay"
+			{"X","Y","int=16"},
+			//"TemplateContainer::fum"
+			{"Bar"},
+		  	//"TemplateParameter::scrum"
+			{"int"},
+			//"nonVector::first"
+			{"T"},
+			//"Foo::fum"
+			{"Bar"},
+			//"IsGreaterThan"
+			{"X"},
+			/*
+			//"default_alloc_template::S_start_free"
+			{"bool", "int"},*/
+		};
+		assertEquals(myExpectedValues.length, arrayElements.size());
+		for(int i=0; i<myExpectedValues.length; i++) {
+			ITemplate myTemplate = (ITemplate) arrayElements.get(i);
+			assertNotNull( "Failed on "+i, myTemplate );
+			String[] myExpectedParams = myExpectedValues[i];
+			String[] myParams = myTemplate.getTemplateParameterTypes();
+			assertEquals( "Failed on "+i, myExpectedParams.length, myParams.length );
+			for(int j=0; j<myExpectedParams.length; j++) {
+				assertEquals( "Failed on "+i+","+j, myExpectedParams[j], myParams[j] );
+			}
+		}
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.model.tests.ITemplateTests#testGetTemplateSignature()
+	 */
+	public void testGetTemplateSignature() throws CModelException {
+		setStructuralParse(true);
+		ITranslationUnit tu = getTU();
+		ArrayList arrayElements = new ArrayList();
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_STRUCT ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_CLASS ) );
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_UNION ) );
+		arrayElements.addAll( getTemplateMethods(tu) );
+		arrayElements.addAll(tu.getChildrenOfType(ICElement.C_TEMPLATE_METHOD));
+		arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION ) );
+		arrayElements.addAll(tu.getChildrenOfType(ICElement.C_TEMPLATE_FUNCTION_DECLARATION));
+		// TEMPLATE_VARIABLE moved to failed tests
+		//arrayElements.addAll( tu.getChildrenOfType(ICElement.C_TEMPLATE_VARIABLE ) );
+		
+		String[] myExpectedValues = {
+			"Map<Key, Value, SortAlgorithm>",
+			"nonVector<T>",
+			"ArrayOverlay<X, Y, int=16>",
+			"fum<Bar>(int) : void",
+			"scrum<int>(void) : void", // TODO: deduce the rules of () versus (void), compare below.
+			"nonVector<T>::first<T>() const : const T&", // TODO: where should <T> be?
+			"Foo::fum<Bar>(int) : void",
+			"IsGreaterThan<X>(X, X) : bool",
+			/*"default_alloc_template<threads,inst>::S_start_free<bool, int> : char*",*/
+		};
+		assertEquals(myExpectedValues.length, arrayElements.size());
+		for(int i=0; i<myExpectedValues.length; i++) {
+			ITemplate myTemplate = (ITemplate) arrayElements.get(i);
+			assertNotNull( "Failed on "+i, myTemplate );
+			assertEquals( "Failed on "+i, myExpectedValues[i],
+				myTemplate.getTemplateSignature() );
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitBaseTest.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitBaseTest.java
new file mode 100644
index 0000000..ec53a6c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitBaseTest.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+import java.io.FileInputStream;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * @author jcamelon
+ *
+ */
+public class TranslationUnitBaseTest extends TestCase
+{
+    /**
+     * 
+     */
+    public TranslationUnitBaseTest()
+    {
+        super();
+        // TODO Auto-generated constructor stub
+    }
+    /**
+     * @param name
+     */
+    public TranslationUnitBaseTest(String name)
+    {
+        super(name);
+        // TODO Auto-generated constructor stub
+    }
+    protected IWorkspace workspace;
+    protected IWorkspaceRoot root;
+    protected ICProject testProject;
+    protected IFile objfile;
+    protected IFile archfile;
+    protected IFile libfile;
+    protected IFile exefile;
+    protected IFile cfile;
+    protected Path objpath;
+    protected Path archpath;
+    protected Path libpath;
+    protected Path exepath;
+    protected Path cpath;
+    protected NullProgressMonitor monitor;
+    /**
+         * Sets up the test fixture.
+         *
+         * Called before every test case method.
+         * 
+         * Example code test the packages in the project 
+         *  "com.qnx.tools.ide.cdt.core"
+         */
+    protected void setUp() throws Exception
+    {
+        /***
+         * The rest of the tests assume that they have a working workspace
+         * and workspace root object to use to create projects/files in, 
+         * so we need to get them setup first.
+         */
+        IWorkspaceDescription desc;
+        workspace= ResourcesPlugin.getWorkspace();
+        root= workspace.getRoot();
+        monitor = new NullProgressMonitor();
+        if (workspace==null) 
+            fail("Workspace was not setup");
+        if (root==null)
+            fail("Workspace root was not setup");
+            
+        desc=workspace.getDescription();
+        desc.setAutoBuilding(false);
+        workspace.setDescription(desc);
+    
+        /***
+         * Setup the various files, paths and projects that are needed by the
+         * tests
+         */
+            
+        testProject=CProjectHelper.createCProject("filetest", "none", IPDOMManager.ID_NO_INDEXER);
+        if (testProject==null)
+            fail("Unable to create project");
+    
+        cfile = testProject.getProject().getFile("exetest.c");
+        if (!cfile.exists()) {
+            cfile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/cfiles/TranslationUnits.c"))),
+					false, monitor);
+        }
+        cpath=new Path(workspace.getRoot().getLocation()+"/filetest/main.c");
+    
+        objfile = testProject.getProject().getFile("exetest.o");
+        if (!objfile.exists()) {
+            objfile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/exe/x86/o.g/main.o"))),
+					false, monitor);
+        }
+        objpath=new Path(workspace.getRoot().getLocation()+"/filetest/main.o");
+        
+        exefile = testProject.getProject().getFile("test_g");
+        if (!exefile.exists()) {
+            exefile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/exe/x86/o.g/exe_g"))),
+					false, monitor);
+        }
+        exepath=new Path(workspace.getRoot().getLocation()+"/filetest/exe_g");
+        
+        archfile = testProject.getProject().getFile("libtestlib_g.a");
+        if (!archfile.exists()) {
+            archfile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/testlib/x86/a.g/libtestlib_g.a"))),
+					false, monitor);
+        }
+        libpath=new Path(workspace.getRoot().getLocation()+"/filetest/libtestlib_g.so");
+        
+        libfile = testProject.getProject().getFile("libtestlib_g.so");
+        if (!libfile.exists()) {
+            libfile.create(new FileInputStream(
+            		CTestPlugin.getDefault().getFileInPlugin(new Path("resources/testlib/x86/so.g/libtestlib_g.so"))),
+					false, monitor);
+        }
+        archpath=new Path(workspace.getRoot().getLocation()+"/filetest/libtestlib_g.a");
+   }
+    /**
+         * Tears down the test fixture.
+         *
+         * Called after every test case method.
+         */
+    protected void tearDown() 
+    {
+       // release resources here and clean-up
+       try {
+		testProject.getProject().delete(true,true,monitor);
+	   } catch (CoreException e) {
+	   } 
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java
new file mode 100644
index 0000000..7e4b65a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java
@@ -0,0 +1,252 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.model.tests;
+
+import java.io.FileNotFoundException;
+import java.util.Stack;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IInclude;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.ExpectedStrings;
+
+/**
+ * @author Peter Graves
+ * 
+ * This file contains a set of generic tests for the core C model's
+ * TranslationUnit class. There is nothing exotic here, mostly just sanity type
+ * tests
+ * 
+ */
+public class TranslationUnitTests extends TranslationUnitBaseTest {
+	/*
+	 * This is a list of elements in the test .c file. It will be used in a
+	 * number of places in the tests
+	 */
+	String[] expectedStringList = { "stdio.h", "unistd.h", "func2p",
+			"globalvar", "myenum", "mystruct_t", "mystruct", "myunion",
+			"mytype", "func1", "func2", "main", "func3" };
+
+	int[] expectedLines = { 12, 14, 17, 20, 23, 28, 32, 35, 42, 47, 53, 58, 65,
+			70 };
+
+	/*
+	 * This is a list of that the types of the above list of elements is
+	 * expected to be.
+	 */
+	int[] expectedTypes = { ICElement.C_INCLUDE, ICElement.C_INCLUDE,
+			ICElement.C_FUNCTION_DECLARATION, ICElement.C_VARIABLE,
+			ICElement.C_ENUMERATION, ICElement.C_STRUCT, ICElement.C_TYPEDEF,
+			ICElement.C_UNION, ICElement.C_TYPEDEF, ICElement.C_FUNCTION,
+			ICElement.C_FUNCTION, ICElement.C_FUNCTION, ICElement.C_FUNCTION,
+			ICElement.C_FUNCTION };
+
+	/**
+	 * Constructor for TranslationUnitTests
+	 * 
+	 * @param name
+	 */
+	public TranslationUnitTests(String name) {
+		super(name);
+	}
+
+	public static TestSuite suite() {
+		TestSuite suite = new TestSuite(TranslationUnitTests.class.getName());
+		suite.addTest(new TranslationUnitTests("testIsTranslationUnit"));
+		suite.addTest(new TranslationUnitTests("testGetChildren"));
+		suite.addTest(new TranslationUnitTests("testGetElement"));
+		suite.addTest(new TranslationUnitTests("testBug23478A"));
+		suite.addTest(new TranslationUnitTests("testBug23478B"));
+		suite.addTest(new TranslationUnitTests("testIsValidSourceUnitName"));
+		suite.addTest(new TranslationUnitTests("testAssemblyContentType_Bug186774"));
+		// TODO: suite.addTest(new
+		// TranslationUnitTests("testGetElementAtLine"));
+		return suite;
+	}
+
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(suite());
+	}
+
+	/***************************************************************************
+	 * Simple sanity test to make sure TranslationUnit.isTranslationUnit returns
+	 * true
+	 * 
+	 */
+	public void testIsTranslationUnit() throws Exception,
+			FileNotFoundException {
+		ITranslationUnit myTranslationUnit;
+
+		myTranslationUnit = CProjectHelper.findTranslationUnit(testProject,
+				"exetest.c");
+		assertTrue("A TranslationUnit", myTranslationUnit != null);
+
+	}
+
+	/***************************************************************************
+	 * Simple sanity tests to make sure TranslationUnit.getChildren seems to
+	 * basicly work
+	 */
+	public void testGetChildren() throws Exception {
+		ITranslationUnit myTranslationUnit;
+		ICElement[] elements;
+		int x;
+
+		ExpectedStrings expectedString = new ExpectedStrings(expectedStringList);
+
+		myTranslationUnit = CProjectHelper.findTranslationUnit(testProject,
+				"exetest.c");
+
+		if (myTranslationUnit.hasChildren()) {
+			elements = myTranslationUnit.getChildren();
+			for (x = 0; x < elements.length; x++) {
+				expectedString.foundString(elements[x].getElementName());
+			}
+		}
+		assertTrue("PR:23603 " + expectedString.getMissingString(),
+				expectedString.gotAll());
+		assertTrue(expectedString.getExtraString(), !expectedString.gotExtra());
+
+	}
+
+	/***************************************************************************
+	 * Simple sanity tests for the getElement() call
+	 */
+	public void testGetElement() throws Exception {
+		ITranslationUnit myTranslationUnit;
+		ICElement myElement;
+		Stack missing = new Stack();
+		int x;
+		myTranslationUnit = CProjectHelper.findTranslationUnit(testProject,
+				"exetest.c");
+
+		for (x = 0; x < expectedStringList.length; x++) {
+			myElement = myTranslationUnit.getElement(expectedStringList[x]);
+			if (myElement == null)
+				missing.push(expectedStringList[x]);
+			else {
+				assertTrue("Expected:" + expectedStringList[x] + " Got:"
+						+ myElement.getElementName(), expectedStringList[x]
+						.equals(myElement.getElementName()));
+			}
+
+		}
+		if (!missing.empty()) {
+			String output = new String("PR:23603 Could not get elements: ");
+			while (!missing.empty())
+				output += missing.pop() + " ";
+			assertTrue(output, false);
+		}
+
+	}
+
+	/***************************************************************************
+	 * Simple sanity tests for the getInclude call
+	 */
+	public void testBug23478A() throws Exception {
+		IInclude myInclude;
+		int x;
+		String includes[] = { "stdio.h", "unistd.h" };
+		ITranslationUnit myTranslationUnit = CProjectHelper
+				.findTranslationUnit(testProject, "exetest.c");
+
+		for (x = 0; x < includes.length; x++) {
+			myInclude = myTranslationUnit.getInclude(includes[x]);
+			if (myInclude == null)
+				fail("Unable to get include: " + includes[x]);
+			else {
+				// Failed test: Include.getIncludeName() always returns "";
+				// assertTrue
+				assertTrue("PR:23478 Expected:" + new String("") + " Got:"
+						+ myInclude.getIncludeName(), includes[x]
+						.equals(myInclude.getIncludeName()));
+			}
+		}
+
+	}
+
+	/***************************************************************************
+	 * Simple sanity tests for the getIncludes call
+	 */
+	public void testBug23478B() throws Exception {
+		IInclude myIncludes[];
+		String includes[] = { "stdio.h", "unistd.h" };
+		ExpectedStrings myExp = new ExpectedStrings(includes);
+		int x;
+		ITranslationUnit myTranslationUnit = CProjectHelper
+				.findTranslationUnit(testProject, "exetest.c");
+
+		myIncludes = myTranslationUnit.getIncludes();
+		for (x = 0; x < myIncludes.length; x++) {
+			myExp.foundString(myIncludes[x].getIncludeName());
+		}
+		// Failed test: Include.getIncludeName() always returns "";
+		// assertTrue
+		assertTrue(myExp.getMissingString(), myExp.gotAll());
+		assertTrue(myExp.getExtraString(), !myExp.gotExtra());
+	}
+
+	/***************************************************************************
+	 * Simple sanity tests for the getElementAtLine() call
+	 */
+	public void testGetElementAtLine() throws Exception {
+		ITranslationUnit myTranslationUnit;
+		ICElement myElement;
+		Stack missing = new Stack();
+		int x;
+		myTranslationUnit = CProjectHelper.findTranslationUnit(testProject,
+				"exetest.c");
+
+		for (x = 0; x < expectedStringList.length; x++) {
+			myElement = myTranslationUnit.getElementAtLine(expectedLines[x]);
+			if (myElement == null)
+				missing.push(expectedStringList[x]);
+			else {
+				if (expectedStringList[x].equals("mystruct_t")) {
+					assertTrue("PR:23603 expected:" + expectedStringList[x]
+							+ " Got:" + myElement.getElementName(),
+							expectedStringList[x].equals(myElement
+									.getElementName()));
+				} else {
+					assertTrue("Expected:" + expectedStringList[x] + " Got:"
+							+ myElement.getElementName(), expectedStringList[x]
+							.equals(myElement.getElementName()));
+				}
+
+			}
+
+		}
+		if (!missing.empty()) {
+			String output = new String("PR: 23603 Could not get elements: ");
+			while (!missing.empty())
+				output += missing.pop() + " ";
+			assertTrue(output, false);
+		}
+	}
+
+	public void testIsValidSourceUnitName() {
+		assertTrue(CoreModel.isValidSourceUnitName(testProject.getProject(), "test.c"));
+		assertFalse(CoreModel.isValidSourceUnitName(testProject.getProject(), "test.h"));
+		assertTrue(CoreModel.isValidSourceUnitName(testProject.getProject(), "test.cc"));
+		assertFalse(CoreModel.isValidSourceUnitName(testProject.getProject(), "test.hh"));
+	}
+	
+	public void testAssemblyContentType_Bug186774() {
+		assertEquals(CCorePlugin.CONTENT_TYPE_ASMSOURCE, CoreModel.getRegistedContentTypeId(testProject.getProject(), "test.s"));
+		assertEquals(CCorePlugin.CONTENT_TYPE_ASMSOURCE, CoreModel.getRegistedContentTypeId(testProject.getProject(), "test.S"));
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
new file mode 100644
index 0000000..a0cae85
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.model.tests;
+
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.IBuffer;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.model.IWorkingCopy;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.TestPluginLauncher;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * Contains unit test cases for Working Copies. Run using JUnit Plugin Test
+ * configuration launcher.
+ */
+public class WorkingCopyTests extends TestCase {	
+	private ICProject fCProject;
+	private IFile headerFile;
+	private NullProgressMonitor monitor;
+	
+	public static void main(String[] args) {
+		TestPluginLauncher.run(TestPluginLauncher.getLocationFromProperties(), WorkingCopyTests.class, args);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(WorkingCopyTests.class.getName());
+		suite.addTest(new WorkingCopyTests("testWorkingCopy"));
+		//suite.addTest(new WorkingCopyTests("testHashing"));
+		return suite;
+	}		
+	
+	public WorkingCopyTests(String name) {
+		super(name);
+	}
+	
+	protected void setUp() throws Exception {
+		monitor = new NullProgressMonitor();
+	
+		fCProject= CProjectHelper.createCCProject("TestProject1", "bin", IPDOMManager.ID_NO_INDEXER);
+		//Path filePath = new Path(ResourcesPlugin.getWorkspace().getRoot().getLocation().toString()+ fCProject.getPath().toString()+ "/WorkingCopyTest.h");
+		headerFile = fCProject.getProject().getFile("WorkingCopyTest.h");
+		if (!headerFile.exists()) {
+			try{
+				FileInputStream fileIn = new FileInputStream(
+						CTestPlugin.getDefault().getFileInPlugin(new Path("resources/cfiles/WorkingCopyTestStart.h"))); 
+				headerFile.create(fileIn,false, monitor);        
+			} catch (CoreException e) {
+				e.printStackTrace();
+			} catch (FileNotFoundException e) {
+				e.printStackTrace();
+			}
+		}
+	}
+
+	protected void tearDown()  {
+		CProjectHelper.delete(fCProject);
+	}	
+		
+		
+	public void testWorkingCopy() throws Exception {
+		ITranslationUnit tu = (ITranslationUnit)CoreModel.getDefault().create(headerFile);
+		// CreateWorkingCopy		
+		assertNotNull (tu);
+		IWorkingCopy wc = tu.getWorkingCopy();
+		assertNotNull (wc);
+		assertNotNull (wc.getBuffer());
+		assertTrue (wc.exists());
+		
+		// ModifyWorkingCopy
+		IBuffer wcBuf = wc.getBuffer();
+		wcBuf.append("\n class Hello{ int x; };");
+		if (tu.getBuffer().getContents().equals(wc.getBuffer().getContents() ) )
+			fail("Buffers should NOT be equal at this point!");		
+		
+		// ReconcileWorkingCopy
+		wc.reconcile();
+		
+		// CommitWorkingCopy
+		wc.commit(true, monitor);
+		
+		if(!tu.getBuffer().getContents().equals(wc.getBuffer().getContents())) 
+			fail("Buffers should be equal at this point!");
+		
+		// DestroyWorkingCopy
+		wc.destroy();
+		assertFalse(wc.exists());	
+		
+		Thread.sleep(1000);	
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/AllCProjectDescriptionTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/AllCProjectDescriptionTests.java
new file mode 100644
index 0000000..e727331
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/AllCProjectDescriptionTests.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.settings.model;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllCProjectDescriptionTests {
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(suite());
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite(AllCProjectDescriptionTests.class.getName());
+
+        // Just add more test cases here as you create them for
+        // each class being tested
+		suite.addTest(CConfigurationDescriptionReferenceTests.suite());
+		suite.addTest(ExternalSettingsProviderTests.suite());
+		suite.addTest(CfgSettingsTests.suite());
+		suite.addTest(ProjectCreationStateTests.suite());
+		suite.addTest(BackwardCompatibilityTests.suite());
+		suite.addTest(CProjectDescriptionBasicTests.suite());
+		suite.addTest(CProjectDescriptionStorageTests.suite());
+        return suite;
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/BackwardCompatibilityTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/BackwardCompatibilityTests.java
new file mode 100644
index 0000000..66b322f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/BackwardCompatibilityTests.java
@@ -0,0 +1,279 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.settings.model;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IPathEntry;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+public class BackwardCompatibilityTests extends BaseTestCase {
+	private static final String PROJ_NAME_PREFIX = "BackwardCompatibilityTests_";
+	ICProject p1, p2, p3;
+	
+	public static TestSuite suite() {
+		return suite(BackwardCompatibilityTests.class, "_");
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		try {
+			if(p1 != null){
+				p1.getProject().delete(true, null);
+				p1 = null;
+			}
+			if(p2 != null){
+				p2.getProject().delete(true, null);
+				p2 = null;
+			}
+			if(p3 != null){
+				p3.getProject().delete(true, null);
+				p3 = null;
+			}
+		} catch (CoreException e){
+		}
+	}
+
+	public void testPathEntriesForNewStyle() throws Exception {
+		p1 = CProjectHelper.createNewStileCProject(PROJ_NAME_PREFIX + "a", TestUserAndDiscoveredEntriesCfgDataProvider.PROVIDER_ID, IPDOMManager.ID_NO_INDEXER);
+		IProject project = p1.getProject();
+		
+		IPathEntry[] entries = CoreModel.getRawPathEntries(p1);
+		IPathEntry[] resolvedentries = CoreModel.getResolvedPathEntries(p1);
+		IPathEntry[] expectedRawEntries = new IPathEntry[]{
+			CoreModel.newContainerEntry(new Path("org.eclipse.cdt.core.CFG_BASED_CONTAINER")),
+			CoreModel.newSourceEntry(project.getFullPath()),
+			CoreModel.newOutputEntry(project.getFullPath()),
+		};
+		checkEntriesMatch(expectedRawEntries, entries);
+		
+		IPathEntry[] expectedResolvedEntries = new IPathEntry[]{
+			CoreModel.newSourceEntry(project.getFullPath()),
+			CoreModel.newOutputEntry(project.getFullPath()),
+			CoreModel.newMacroEntry(project.getFullPath(), "a", "b"),
+			CoreModel.newMacroEntry(project.getFullPath(), "c", ""),
+			CoreModel.newIncludeEntry(project.getFullPath(), null, project.getLocation().append("a/b/c")),
+			CoreModel.newIncludeEntry(project.getFullPath(), null, new Path("/d/e/f")),
+			CoreModel.newIncludeEntry(project.getFullPath(), project.getFullPath().makeRelative(), new Path("g/h/i")),
+			CoreModel.newIncludeEntry(project.getFullPath(), new Path("j"), new Path("k/l")),
+		};
+		checkEntriesMatch(expectedResolvedEntries, resolvedentries);
+
+		IPathEntry[] newEntries = new IPathEntry[entries.length + 1];
+		System.arraycopy(entries, 0, newEntries, 0, entries.length);
+		newEntries[entries.length] = CoreModel.newIncludeEntry(new Path("d"), null, new Path("/C/d/e"), true, new Path[]{new Path("a"), new Path("b")}, false);
+
+		IPathEntry[] newExpectedRawEntries = new IPathEntry[entries.length + 1];
+		System.arraycopy(entries, 0, newExpectedRawEntries, 0, entries.length);
+		newExpectedRawEntries[entries.length] = CoreModel.newIncludeEntry(project.getFullPath().append("d"), null, new Path("/C/d/e"), true, new Path[]{new Path("a"), new Path("b")}, false);
+
+		CoreModel.setRawPathEntries(p1, newEntries, null);
+		
+		entries = CoreModel.getRawPathEntries(p1);
+		checkEntriesMatch(entries, newExpectedRawEntries);
+		
+		IPathEntry[] newExpectedResolved = new IPathEntry[resolvedentries.length + 1];
+		System.arraycopy(resolvedentries, 0, newExpectedResolved, 0, resolvedentries.length);
+		newExpectedResolved[resolvedentries.length] = CoreModel.newIncludeEntry(project.getFullPath().append("d"), null, new Path("/C/d/e"), true, new Path[]{new Path("a"), new Path("b")}, false);
+		resolvedentries = CoreModel.getResolvedPathEntries(p1);
+		checkEntriesMatch(resolvedentries, newExpectedResolved);
+		
+		entries = concatEntries(entries, new IPathEntry[]{
+		       CoreModel.newSourceEntry(project.getFullPath().append("test_src")),
+		       CoreModel.newOutputEntry(project.getFullPath().append("test_out")),});
+		
+		newExpectedRawEntries = concatEntries(newExpectedRawEntries, new IPathEntry[]{
+		       CoreModel.newSourceEntry(project.getFullPath().append("test_src")),
+		       CoreModel.newOutputEntry(project.getFullPath().append("test_out")),});
+		
+		for(int i = 0; i < newExpectedRawEntries.length; i++){
+			IPathEntry entry = newExpectedRawEntries[i];
+			if(entry.getEntryKind() == IPathEntry.CDT_SOURCE && entry.getPath().equals(project.getFullPath())){
+				newExpectedRawEntries[i] = CoreModel.newSourceEntry(project.getFullPath(), new Path[]{new Path("test_src")});
+			}
+//			if(entry.getEntryKind() == IPathEntry.CDT_OUTPUT && entry.getPath().equals(project.getFullPath())){
+//				newExpectedRawEntries[i] = CoreModel.newOutputEntry(project.getFullPath(), new Path[]{new Path("test_out")});
+//			}
+		}
+		
+		newExpectedResolved = concatEntries(newExpectedResolved, new IPathEntry[]{
+			       CoreModel.newSourceEntry(project.getFullPath().append("test_src")),
+			       CoreModel.newOutputEntry(project.getFullPath().append("test_out")),});
+			
+		for(int i = 0; i < newExpectedResolved.length; i++){
+			IPathEntry entry = newExpectedResolved[i];
+			if(entry.getEntryKind() == IPathEntry.CDT_SOURCE && entry.getPath().equals(project.getFullPath())){
+				newExpectedResolved[i] = CoreModel.newSourceEntry(project.getFullPath(), new Path[]{new Path("test_src")});
+			}
+//			if(entry.getEntryKind() == IPathEntry.CDT_OUTPUT && entry.getPath().equals(project.getFullPath())){
+//				newExpectedResolved[i] = CoreModel.newOutputEntry(project.getFullPath(), new Path[]{new Path("test_out")});
+//			}
+		}
+		
+		CoreModel.setRawPathEntries(p1, entries, null);
+		
+		entries = CoreModel.getRawPathEntries(p1);
+		resolvedentries = CoreModel.getResolvedPathEntries(p1);
+		
+		checkEntriesMatch(newExpectedRawEntries, entries);
+		checkEntriesMatch(newExpectedResolved, resolvedentries);
+		
+		CoreModel.setRawPathEntries(p1, expectedRawEntries, null);
+		entries = CoreModel.getRawPathEntries(p1);
+		resolvedentries = CoreModel.getResolvedPathEntries(p1);
+		
+		checkEntriesMatch(expectedRawEntries, entries);
+		checkEntriesMatch(expectedResolvedEntries, resolvedentries);
+		
+		//check to see that setting the same entries do not give errors
+		CoreModel.setRawPathEntries(p1, expectedRawEntries, null);
+		entries = CoreModel.getRawPathEntries(p1);
+		resolvedentries = CoreModel.getResolvedPathEntries(p1);
+		
+		checkEntriesMatch(expectedRawEntries, entries);
+		checkEntriesMatch(expectedResolvedEntries, resolvedentries);
+	}
+
+	public void testCPathEntriesForOldStyle() throws Exception {
+		p2 = CProjectHelper.createCCProject(PROJ_NAME_PREFIX + "b", null, IPDOMManager.ID_NO_INDEXER);
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		IProject project = p2.getProject();
+		ICProjectDescription des = mngr.getProjectDescription(project, false);
+		assertNotNull(des);
+		assertEquals(1, des.getConfigurations().length);
+		assertFalse(mngr.isNewStyleProject(des));
+		assertFalse(mngr.isNewStyleProject(project));
+		
+		IPathEntry[] entries = CoreModel.getRawPathEntries(p2);
+		entries = concatEntries(entries, new IPathEntry[]{
+			       CoreModel.newSourceEntry(project.getFullPath().append("test_src")),
+			       CoreModel.newOutputEntry(project.getFullPath().append("test_out")),});
+
+		CoreModel.setRawPathEntries(p2, entries, null);
+		
+		ICSourceEntry[] expectedSourceEntries = new ICSourceEntry[]{
+				new CSourceEntry(project.getFullPath(), new IPath[] {new Path("test_src")}, ICSettingEntry.RESOLVED),
+				new CSourceEntry(project.getFullPath().append("test_src"), null, ICSettingEntry.RESOLVED),
+		};
+
+		ICOutputEntry[] expectedOutputEntries = new ICOutputEntry[]{
+				new COutputEntry(project.getFullPath(), null, ICSettingEntry.RESOLVED | ICSettingEntry.VALUE_WORKSPACE_PATH),
+				new COutputEntry(project.getFullPath().append("test_out"), null, ICSettingEntry.RESOLVED | ICSettingEntry.VALUE_WORKSPACE_PATH),
+		};
+
+		des = mngr.getProjectDescription(project, false);
+		ICConfigurationDescription cfg = des.getDefaultSettingConfiguration();
+		ICSourceEntry[] sEntries = cfg.getSourceEntries();
+		ICOutputEntry[] oEntries = cfg.getBuildSetting().getOutputDirectories();
+		
+		checkCEntriesMatch(expectedSourceEntries, sEntries);
+		checkCEntriesMatch(expectedOutputEntries, oEntries);
+
+		des = mngr.getProjectDescription(project, true);
+		cfg = des.getDefaultSettingConfiguration();
+		sEntries = cfg.getSourceEntries();
+		oEntries = cfg.getBuildSetting().getOutputDirectories();
+		
+		checkCEntriesMatch(expectedSourceEntries, sEntries);
+		checkCEntriesMatch(expectedOutputEntries, oEntries);
+	}
+	
+	public void testICDescriptorGetProjectData() throws Exception {
+		p3 = CProjectHelper.createCCProject(PROJ_NAME_PREFIX + "c", null, IPDOMManager.ID_NO_INDEXER);
+		IProject proj = p3.getProject();
+		
+		doTestRm(proj);
+		doTestRm(proj);
+		doTestRm(proj);
+		doTestRm(proj);
+		doTestRm(proj);
+	}
+	
+	private void doTestRm(IProject proj) throws CoreException{
+		final String DATA_ID = "testICDescriptorGetProjectData";
+        ICDescriptor dr = CCorePlugin.getDefault().getCProjectDescription(proj, false);
+        dr.removeProjectStorageElement(DATA_ID);
+        dr.saveProjectData();
+	}
+	
+	public static IPathEntry[] concatEntries(IPathEntry[] entries1, IPathEntry[] entries2){
+		List list = new ArrayList(entries1.length + entries2.length);
+		list.addAll(Arrays.asList(entries1));
+		list.addAll(Arrays.asList(entries2));
+		return (IPathEntry[])list.toArray(new IPathEntry[list.size()]);
+	}
+	
+	public static void checkCEntriesMatch(ICSettingEntry[] e1, ICSettingEntry[] e2){
+		if(e1.length != e2.length)
+			fail("entries num do not match");
+		
+		Set set = new HashSet(Arrays.asList(e1));
+		set.removeAll(Arrays.asList(e2));
+		if(set.size() != 0)
+			fail("entries do not match");
+	}
+	
+	public static void checkEntriesMatch(IPathEntry[] e1, IPathEntry[] e2){
+		if(e1.length != e2.length)
+			fail("entries arrays have different length \ne1: " + dumpArray(e1) +"\ne2:" + dumpArray(e2) + "\n");
+		
+		for(int i = 0; i < e1.length; i++){
+			IPathEntry entry = e1[i];
+			boolean found = false;
+			for(int k = 0; k < e2.length; k++){
+				IPathEntry entry2 = e2[k];
+				if(entry.equals(entry2)){
+					found = true;
+					break;
+				}
+			}
+			if(!found)
+				fail("unable to find entry " + entry.toString() + "\nin array \n" + dumpArray(e2) + "\n");
+		}
+	}
+	
+	public static String dumpArray(Object array[]){
+		if(array == null)
+			return "null";
+		
+		StringBuffer buf = new StringBuffer();
+		buf.append('[');
+		for(int i = 0; i < array.length; i++){
+			if(i != 0){
+				buf.append(",\n");
+			}
+			buf.append(array[i].toString());
+		}
+		buf.append(']');
+		return buf.toString();
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CConfigurationDescriptionReferenceTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CConfigurationDescriptionReferenceTests.java
new file mode 100644
index 0000000..89a711c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CConfigurationDescriptionReferenceTests.java
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.settings.model;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.CoreModelUtil;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultConfigurationData;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.core.runtime.CoreException;
+
+
+/**
+ * Test ICConfigurationDescription reference behaviours
+ */
+public class CConfigurationDescriptionReferenceTests extends BaseTestCase {
+	ICProject p1, p2, p3, p4;
+	ICConfigurationDescription p1cd1, p1cd2, p1cd3;
+	ICConfigurationDescription p2cd1, p2cd2, p2cd3;
+	ICConfigurationDescription p3cd1, p3cd2, p3cd3;
+	ICConfigurationDescription p4cd1, p4cd2, p4cd3;
+	
+	public static TestSuite suite() {
+		return suite(CConfigurationDescriptionReferenceTests.class, "_");
+	}
+	
+	protected void setUp() throws Exception {
+		p1 = CProjectHelper.createCCProject("p1", "bin");
+		p2 = CProjectHelper.createCCProject("p2", "bin");
+		p3 = CProjectHelper.createCCProject("p3", "bin");
+		p4 = CProjectHelper.createCCProject("p4", "bin");
+		
+		CoreModel coreModel = CoreModel.getDefault();
+		ICProjectDescription des1 = coreModel.getProjectDescription(p1.getProject());
+		ICProjectDescription des2 = coreModel.getProjectDescription(p2.getProject());
+		ICProjectDescription des3 = coreModel.getProjectDescription(p3.getProject());
+		ICProjectDescription des4 = coreModel.getProjectDescription(p4.getProject());
+		
+		p1cd1 = newCfg(des1, "p1", "cd1");
+		p1cd2 = newCfg(des1, "p1", "cd2");
+		p1cd3 = newCfg(des1, "p1", "cd3");
+		
+		p2cd1 = newCfg(des2, "p2", "cd1");
+		p2cd2 = newCfg(des2, "p2", "cd2");
+		p2cd3 = newCfg(des2, "p2", "cd3");
+		
+		p3cd1 = newCfg(des3, "p3", "cd1");
+		p3cd2 = newCfg(des3, "p3", "cd2");
+		p3cd3 = newCfg(des3, "p3", "cd3");
+		
+		p4cd1 = newCfg(des4, "p4", "cd1");
+		p4cd2 = newCfg(des4, "p4", "cd2");
+		p4cd3 = newCfg(des4, "p4", "cd3");
+		
+		/*
+		 * Setup references:
+		 * 
+		 * p1: cd1 cd2 cd3
+		 *        \ | /
+		 *         \|/
+		 *          *
+		 *         /|\
+		 *        / | \
+		 * p2: cd1 cd2 cd3
+		 *      |   |   |
+		 * p3: cd1 cd2 cd3
+		 *        \ | /
+		 *         \|/
+		 * p4: cd1 cd2 cd3
+		 */
+		
+		setRefs(p1cd1, new ICConfigurationDescription[] {p2cd3});
+		setRefs(p1cd2, new ICConfigurationDescription[] {p2cd2});
+		setRefs(p1cd3, new ICConfigurationDescription[] {p2cd1});
+
+		setRefs(p2cd1, new ICConfigurationDescription[] {p3cd1});
+		setRefs(p2cd2, new ICConfigurationDescription[] {p3cd2});
+		setRefs(p2cd3, new ICConfigurationDescription[] {p3cd3});
+
+		setRefs(p3cd1, new ICConfigurationDescription[] {p4cd2});
+		setRefs(p3cd2, new ICConfigurationDescription[] {p4cd2});
+		setRefs(p3cd3, new ICConfigurationDescription[] {p4cd2});
+	
+		coreModel.setProjectDescription(p1.getProject(), des1);
+		coreModel.setProjectDescription(p2.getProject(), des2);
+		coreModel.setProjectDescription(p3.getProject(), des3);
+		coreModel.setProjectDescription(p4.getProject(), des4);
+	}
+	
+	private void setRefs(ICConfigurationDescription node, ICConfigurationDescription[] refs) {
+		Map p1RefData = new HashMap();
+		for(int i=0; i<refs.length; i++) {
+			String projectName = refs[i].getProjectDescription().getName();
+			p1RefData.put(projectName, refs[i].getId());
+		}
+		node.setReferenceInfo(p1RefData);
+	}
+	
+	private ICConfigurationDescription newCfg(ICProjectDescription des, String project, String config) throws CoreException {
+		CDefaultConfigurationData data= new CDefaultConfigurationData(project+"."+config, project+" "+config+" name", null);
+		data.initEmptyData();
+		return des.createConfiguration(CCorePlugin.DEFAULT_PROVIDER_ID, data);		
+	}
+		
+	public void testConfigurationDescriptionReference() throws CoreException {
+		// references
+		
+		assertEdges(p1cd1, new ICConfigurationDescription[] {p2cd3}, true);
+		assertEdges(p1cd2, new ICConfigurationDescription[] {p2cd2}, true);
+		assertEdges(p1cd3, new ICConfigurationDescription[] {p2cd1}, true);
+		
+		assertEdges(p2cd1, new ICConfigurationDescription[] {p3cd1}, true);
+		assertEdges(p2cd2, new ICConfigurationDescription[] {p3cd2}, true);
+		assertEdges(p2cd3, new ICConfigurationDescription[] {p3cd3}, true);
+		
+		assertEdges(p3cd1, new ICConfigurationDescription[] {p4cd2}, true);
+		assertEdges(p3cd2, new ICConfigurationDescription[] {p4cd2}, true);
+		assertEdges(p3cd3, new ICConfigurationDescription[] {p4cd2}, true);
+		
+		assertEdges(p4cd1, new ICConfigurationDescription[] {}, true);
+		assertEdges(p4cd2, new ICConfigurationDescription[] {}, true);
+		assertEdges(p4cd3, new ICConfigurationDescription[] {}, true);
+	}
+	
+	public void testConfigurationDescriptionReferencing() throws CoreException {
+		// referencing
+		
+		assertEdges(p1cd1, new ICConfigurationDescription[] {}, false);
+		assertEdges(p1cd2, new ICConfigurationDescription[] {}, false);
+		assertEdges(p1cd3, new ICConfigurationDescription[] {}, false);
+		
+		assertEdges(p2cd1, new ICConfigurationDescription[] {p1cd3}, false);
+		assertEdges(p2cd2, new ICConfigurationDescription[] {p1cd2}, false);
+		assertEdges(p2cd3, new ICConfigurationDescription[] {p1cd1}, false);
+		
+		assertEdges(p3cd1, new ICConfigurationDescription[] {p2cd1}, false);
+		assertEdges(p3cd2, new ICConfigurationDescription[] {p2cd2}, false);
+		assertEdges(p3cd3, new ICConfigurationDescription[] {p2cd3}, false);
+		
+		assertEdges(p4cd1, new ICConfigurationDescription[] {}, false);
+		assertEdges(p4cd2, new ICConfigurationDescription[] {p3cd1, p3cd2, p3cd3}, false);
+		assertEdges(p4cd3, new ICConfigurationDescription[] {}, false);
+	}
+	
+	protected void assertEdges(ICConfigurationDescription cfgDes, ICConfigurationDescription[] expected, boolean references) {
+		ICConfigurationDescription[] actual;
+		
+		if(references) {
+			actual= CoreModelUtil.getReferencedConfigurationDescriptions(cfgDes, false);
+		} else {
+			actual= CoreModelUtil.getReferencingConfigurationDescriptions(cfgDes, false);
+		}
+		
+		assertEquals(expected.length, actual.length);
+		
+		List actualIds = new ArrayList();
+		for(int i=0; i<actual.length; i++) {
+			actualIds.add(actual[i].getId());
+		}
+		// check for each ID, don't use a Set so we detect duplicates
+		for(int i=0; i<expected.length; i++) {
+			assertTrue(expected[i].getId()+" is missing", actualIds.contains(expected[i].getId()));
+		}
+	}
+	
+	protected void tearDown() throws Exception {
+		for(Iterator i = Arrays.asList(new ICProject[]{p1,p2,p3,p4}).iterator(); i.hasNext(); ) {
+			ICProject project = (ICProject) i.next();
+			try {
+				project.getProject().delete(true, NPM);
+			} catch(CoreException ce) {
+				// try next one..
+			}
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionBasicTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionBasicTests.java
new file mode 100644
index 0000000..db73e98
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionBasicTests.java
@@ -0,0 +1,301 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.settings.model;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CProjectNature;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.settings.model.util.CDataUtil;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.jobs.IJobManager;
+import org.eclipse.core.runtime.jobs.Job;
+
+public class CProjectDescriptionBasicTests  extends BaseTestCase{
+	private static final String PROJ_NAME_PREFIX = "CProjectDescriptionBasicTests_";
+	IProject p1, p2, p3, p4;
+	
+	public static TestSuite suite() {
+		return suite(CProjectDescriptionBasicTests.class, "_");
+	}
+	
+	public void testSetInvalidDescription() throws Exception {
+		IWorkspace wsp = ResourcesPlugin.getWorkspace();
+		IWorkspaceRoot root = wsp.getRoot();
+		
+		p1 = root.getProject(PROJ_NAME_PREFIX + "1");
+		p1.create(null);
+		p1.open(null);
+		
+		CProjectHelper.addNatureToProject(p1, CProjectNature.C_NATURE_ID, null);
+		
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		
+		ICProjectDescription des = mngr.createProjectDescription(p1, false);
+		
+		assertFalse(des.isValid());
+		
+		boolean failed = false;
+		try {
+			mngr.setProjectDescription(p1, des);
+		} catch (CoreException e){
+			failed = true;
+		}
+		
+		assertTrue(failed);
+	}
+	
+	public void testModulesCopiedOnCreateNewConfig() throws Exception {
+		ICProject p = CProjectHelper.createNewStileCProject(PROJ_NAME_PREFIX + "c", IPDOMManager.ID_NO_INDEXER);
+		p3 = p.getProject();
+		
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		
+		ICProjectDescription des = mngr.getProjectDescription(p3);
+		ICConfigurationDescription baseCfg = des.getConfigurations()[0];
+		final String baseCfgId = baseCfg.getId();
+		final String STORAGE_ID = "test.storage_id";
+		final String ATTR = "testAttr";
+		final String ATTR_VALUE = "testAttrValue";
+		final String EL_NAME = "testElName";
+		final String ATTR2 = "testAttr2";
+		final String ATTR2_VALUE = "testAttr2Value";
+		
+		ICStorageElement el = baseCfg.getStorage(STORAGE_ID, false);
+		assertNull(el);
+		el = baseCfg.getStorage(STORAGE_ID, true);
+		assertNotNull(el);
+		assertNull(el.getAttribute(ATTR));
+		el.setAttribute(ATTR, ATTR_VALUE);
+		assertEquals(0, el.getChildren().length);
+		ICStorageElement child = el.createChild(EL_NAME);
+		child.setAttribute(ATTR2, ATTR2_VALUE);
+		
+		final String newCfgId1 = "cfg1.id";//CDataUtil.genId(null);
+//		final String newCfgId2 = CDataUtil.genId(null);
+		
+		ICConfigurationDescription cfg1 = des.createConfiguration(newCfgId1, newCfgId1 + ".name", baseCfg);
+		assertEquals(newCfgId1, cfg1.getId());
+		el = cfg1.getStorage(STORAGE_ID, false);
+		assertNotNull(el);
+		assertEquals(ATTR_VALUE, el.getAttribute(ATTR));
+		assertEquals(1, el.getChildren().length);
+		child = el.getChildren()[0];
+		assertEquals(EL_NAME, child.getName());
+		assertEquals(ATTR2_VALUE, child.getAttribute(ATTR2));
+
+		mngr.setProjectDescription(p3, des);
+		
+		des = mngr.getProjectDescription(p3, false);
+		cfg1 = des.getConfigurationById(newCfgId1);
+		el = cfg1.getStorage(STORAGE_ID, false);
+		assertNotNull(el);
+		assertEquals(ATTR_VALUE, el.getAttribute(ATTR));
+		assertEquals(1, el.getChildren().length);
+		child = el.getChildren()[0];
+		assertEquals(EL_NAME, child.getName());
+		assertEquals(ATTR2_VALUE, child.getAttribute(ATTR2));
+
+		des = mngr.getProjectDescription(p3, true);
+		cfg1 = des.getConfigurationById(newCfgId1);
+		el = cfg1.getStorage(STORAGE_ID, false);
+		assertNotNull(el);
+		assertEquals(ATTR_VALUE, el.getAttribute(ATTR));
+		assertEquals(1, el.getChildren().length);
+		child = el.getChildren()[0];
+		assertEquals(EL_NAME, child.getName());
+		assertEquals(ATTR2_VALUE, child.getAttribute(ATTR2));
+
+	}
+
+	public void testSetInvalidCreatingDescription() throws Exception {
+		IWorkspace wsp = ResourcesPlugin.getWorkspace();
+		IWorkspaceRoot root = wsp.getRoot();
+		
+		p2 = root.getProject(PROJ_NAME_PREFIX + "2");
+		p2.create(null);
+		p2.open(null);
+		
+		CProjectHelper.addNatureToProject(p2, CProjectNature.C_NATURE_ID, null);
+		
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		
+		ICProjectDescription des = mngr.createProjectDescription(p2, false, true);
+		des.setSessionProperty(new QualifiedName(CTestPlugin.PLUGIN_ID, "tmp"), "tmp");
+		
+		assertFalse(des.isValid());
+		
+		boolean failed = false;
+		try {
+			mngr.setProjectDescription(p2, des);
+		} catch (CoreException e){
+			failed = true;
+		}
+		
+		assertFalse(failed);
+		
+		assertNotNull(mngr.getProjectDescription(p2, false));
+		assertNotNull(mngr.getProjectDescription(p2, true));
+		
+		des = mngr.getProjectDescription(p2, true);
+		ICConfigurationDescription cfg = mngr.getPreferenceConfiguration(TestCfgDataProvider.PROVIDER_ID, true);
+		cfg = des.createConfiguration(CDataUtil.genId(null), CDataUtil.genId(null), cfg);
+		mngr.setProjectDescription(p2, des);
+		
+	}
+	
+	public void testSetDescriptionWithRootIncompatibleRuleAquired() throws Exception {
+		ICProject p = CProjectHelper.createNewStileCProject(PROJ_NAME_PREFIX + "4", IPDOMManager.ID_NO_INDEXER);
+		p4 = p.getProject();
+		
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		
+		ICProjectDescription des = mngr.getProjectDescription(p4);
+		ICConfigurationDescription baseCfg = des.getConfigurations()[0];
+		
+		baseCfg.setName("qwertyuiop");
+		
+		IJobManager jm = Job.getJobManager();
+		boolean failed = false;
+		try {
+			jm.beginRule(p4, null);
+			
+			mngr.setProjectDescription(p4, des);
+		} catch (CoreException e) {
+			failed = true;
+			assertTrue(e.getStatus().getException() instanceof IllegalArgumentException);
+		} finally {
+			jm.endRule(p4);
+		}
+		
+		assertTrue(failed);
+	}
+	
+
+	public void testBug242955() throws Exception {
+		CoreModel coreModel = CoreModel.getDefault();
+		ICProjectDescriptionManager mngr = coreModel.getProjectDescriptionManager();
+
+		String projectName   = "testBug242955";
+
+		String defaultConfigurationName = "Default";
+		String newConfigurationName = "NEW-NAME";
+
+		// Emulate entering Eclipse first time
+		{
+			// Create model project and accompanied descriptions
+			ICProject cproject = CProjectHelper.createNewStileCProject(projectName, IPDOMManager.ID_NO_INDEXER);
+			IProject project = cproject.getProject();
+
+			// Initial project description after opening a project
+			ICProjectDescription initialProjectDescription = mngr.getProjectDescription(project);
+			assertNotNull("createDescription returned null!", initialProjectDescription);
+			assertEquals(1, initialProjectDescription.getConfigurations().length);
+
+			// Initial configuration description
+			ICConfigurationDescription initialDefaultConfigurationDescription = initialProjectDescription.getConfigurations()[0];
+			initialDefaultConfigurationDescription.setName(defaultConfigurationName);
+			assertEquals(defaultConfigurationName, initialDefaultConfigurationDescription.getName());
+			mngr.setProjectDescription(project, initialProjectDescription);
+
+			// Properties window: get project description: prjd
+			ICProjectDescription propertyProjectDescription = CoreModel.getDefault().getProjectDescription(project);
+
+			// Dialog Manage-configurations-New-"NEW-NAME", from "Default" configuration
+			final String newConfigurationId = newConfigurationName + ".id";
+			ICConfigurationDescription propertyDefaultConfigurationDescription = propertyProjectDescription.getConfigurations()[0];
+			// creating new configuration in "Property" project description
+			ICConfigurationDescription propertyNewConfigurationDescription = propertyProjectDescription
+				.createConfiguration(newConfigurationId, newConfigurationName, propertyDefaultConfigurationDescription);
+			assertNotNull(propertyNewConfigurationDescription);
+			assertEquals(2,propertyProjectDescription.getConfigurations().length);
+			assertEquals(defaultConfigurationName,propertyProjectDescription.getConfigurations()[0].getName());
+			assertEquals(newConfigurationName,propertyProjectDescription.getConfigurations()[1].getName());
+
+			// Apply button, local_prjd: copy "Property" new configuration description to "Applied" project description
+			ICProjectDescription applyButtonProjectDescription = coreModel.getProjectDescription(project);
+			ICConfigurationDescription applyButtonNewConfigurationDescription = applyButtonProjectDescription
+				.createConfiguration(
+					propertyNewConfigurationDescription.getId(),
+					propertyNewConfigurationDescription.getName(),
+					propertyNewConfigurationDescription);
+
+			// OK button, persist the property project description prjd.
+			coreModel.setProjectDescription(project, propertyProjectDescription);
+			assertEquals(2,propertyProjectDescription.getConfigurations().length);
+			assertEquals(defaultConfigurationName,propertyProjectDescription.getConfigurations()[0].getName());
+			assertEquals(newConfigurationName,propertyProjectDescription.getConfigurations()[1].getName());
+
+			// Close project
+			project.close(null);
+		}
+
+		// Emulate re-entering Eclipse
+		{
+			// Re-open project and re-load project description
+			IWorkspace workspace = ResourcesPlugin.getWorkspace();
+			IWorkspaceRoot root = workspace.getRoot();
+
+			IWorkspaceDescription workspaceDesc = workspace.getDescription();
+			workspaceDesc.setAutoBuilding(false);
+			workspace.setDescription(workspaceDesc);
+
+			IProject project = root.getProject(projectName);
+			project.open(null);
+			assertEquals(true, project.isOpen());
+
+			// project description after reopening the project
+			ICProjectDescription reopenedProjectDescription = coreModel.getProjectDescription(project, false);
+			assertEquals(2,reopenedProjectDescription.getConfigurations().length);
+			assertEquals(defaultConfigurationName,reopenedProjectDescription.getConfigurations()[0].getName());
+			assertEquals(newConfigurationName,reopenedProjectDescription.getConfigurations()[1].getName());
+
+			project.close(null);
+		}
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		try {
+			if(p1 != null)
+				p1.getProject().delete(true, null);
+		} catch (CoreException e){
+		}
+		try {
+			if(p2 != null)
+				p2.getProject().delete(true, null);
+		} catch (CoreException e){
+		}
+		try {
+			if(p3 != null)
+				p3.getProject().delete(true, null);
+		} catch (CoreException e){
+		}
+		try {
+			if(p4 != null)
+				p4.getProject().delete(true, null);
+		} catch (CoreException e){
+		}
+		super.tearDown();
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionStorageTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionStorageTests.java
new file mode 100644
index 0000000..4b1ccc4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CProjectDescriptionStorageTests.java
@@ -0,0 +1,358 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Broadcom Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * 	James Blackburn (Broadcom Corp.) - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.settings.model;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+
+/**
+ * Testsuite for the project description storage. This
+ * currently tests some of the features of the built-in
+ * XmlProjectDescriptionStorage(2)
+ */
+public class CProjectDescriptionStorageTests extends BaseTestCase {
+
+	/** CProject on which these tests are based */
+	ICProject cProj;
+
+	public static TestSuite suite() {
+		return suite(CProjectDescriptionStorageTests.class, "_");
+	}
+
+	// resource change listener that will listen for file changes interesting to the tests
+	OurResourceChangeListener resListener;
+
+	@Override
+	protected void setUp() throws Exception {
+		cProj = CProjectHelper.createNewStileCProject("CProjDescStorage", IPDOMManager.ID_FAST_INDEXER);
+		resListener = new OurResourceChangeListener();
+		ResourcesPlugin.getWorkspace().addResourceChangeListener(resListener);
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		// Remover our resource change listener
+		ResourcesPlugin.getWorkspace().removeResourceChangeListener(resListener);
+		// Make the project files writable so they can be deleted...
+		cProj.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+		cProj.getProject().getFile(".cproject").setReadOnly(false);
+		if (cProj.getProject().getFolder(".csettings").exists()) {
+			cProj.getProject().getFolder(".csettings").setReadOnly(false);
+			for (IResource child : cProj.getProject().getFolder(".csettings").members())
+				child.setReadOnly(false);
+		}
+		// Delete the project
+		CProjectHelper.delete(cProj);
+	}
+
+	/**
+	 * Tests that external modifications to the CProjectDescription file are picked up
+	 * @throws Exception
+	 */
+	public void testExternalCProjDescModification() throws Exception {
+		// Create auto-refresh Thread
+		Job refreshJob = new Job("Auto-Refresh") {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				if (monitor.isCanceled())
+					return Status.CANCEL_STATUS;
+				try {
+					ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
+				} catch (CoreException e) {
+					fail("Error during refresh: " + e.getMessage());
+				}
+				schedule(500);
+				return Status.OK_STATUS;
+			}
+		};
+		refreshJob.schedule();
+
+		// Backup the CProjectFile
+		final String initial = "initial";
+		final String testingStorage = "testingStorage";
+		final String testChildInStorage = "testChildInStorage";
+
+		// Backup the original storage file
+		backUpCProjectFile(initial);
+
+		IProject project = cProj.getProject();
+		ICProjectDescription projDesc = CoreModel.getDefault().getProjectDescription(project, true);
+		projDesc.getDefaultSettingConfiguration().getStorage(testingStorage, true).createChild(testChildInStorage);
+		CoreModel.getDefault().setProjectDescription(project, projDesc);
+		// backup this project_desc
+		backUpCProjectFile(testingStorage);
+
+		// Close and open project
+		project.close(null);
+		project.open(null);
+
+		// verify changes are in read-only description
+		projDesc = CoreModel.getDefault().getProjectDescription(project, false);
+		assertNotNull(projDesc.getDefaultSettingConfiguration().getStorage(testingStorage, false));
+		project.refreshLocal(IResource.DEPTH_INFINITE, null);
+
+		// Restore from backup
+		resListener.reset();
+		resListener.addFileToWatch(cProj.getProject().getFile(".cproject").getFullPath());
+		restoreCProjectFile(initial);
+		resListener.waitForChange();
+
+		// Fetch what should be the initial project description
+		projDesc = CoreModel.getDefault().getProjectDescription(project, false);
+		assertNull(projDesc.getDefaultSettingConfiguration().getStorage(testingStorage, false));
+
+		// Test XmlProjectDescriptionStorage2:
+
+		// Test that updating the contents of a storage module leads to a reload of the project description
+		// (In XmlProjectDescriptionStorage2 configuration storage modules are stored in different files...)
+		restoreCProjectFile(testingStorage);
+		project.close(null);
+		project.open(null);
+
+		// create testChildInStorage
+		projDesc = CoreModel.getDefault().getProjectDescription(project, true);
+		ICStorageElement[] children = projDesc.getDefaultSettingConfiguration().getStorage(testingStorage, false).getChildrenByName(testChildInStorage);
+		assertTrue(children.length == 1);
+		projDesc.getDefaultSettingConfiguration().getStorage(testingStorage, false).removeChild(children[0]);
+		CoreModel.getDefault().setProjectDescription(project, projDesc);
+		projDesc = CoreModel.getDefault().getProjectDescription(project, false);
+		assertTrue(projDesc.getDefaultSettingConfiguration().getStorage(testingStorage, false).getChildrenByName(testChildInStorage).length == 0);
+
+		project.refreshLocal(IResource.DEPTH_INFINITE, null);
+		// Restore from backup
+		resListener.reset();
+		resListener.addFileToWatch(cProj.getProject().getFolder(".csettings").getFullPath());
+		restoreCProjectFile(testingStorage);
+		resListener.waitForChange();
+
+		// Check that the project description no longer contains the testChildInStorage
+		projDesc = CoreModel.getDefault().getProjectDescription(project, false);
+		assertTrue(projDesc.getDefaultSettingConfiguration().getStorage(testingStorage, false).getChildrenByName(testChildInStorage).length == 1);
+
+		refreshJob.cancel();
+	}
+
+	/**
+	 * Tests that a read-only project description file is picked up
+	 * @throws Exception
+	 */
+	public void testReadOnlyProjectDescription() throws Exception {
+		makeDescriptionReadOnly();
+		IProject project = cProj.getProject();
+		ICProjectDescription projDesc = CoreModel.getDefault().getProjectDescription(project, true);
+		projDesc.getDefaultSettingConfiguration().getStorage("Temp_testing_storage", true);
+		CoreModel.getDefault().setProjectDescription(project, projDesc);
+
+		project.close(null);
+		project.open(null);
+
+		projDesc = CoreModel.getDefault().getProjectDescription(project, false);
+		assertNotNull(projDesc.getDefaultSettingConfiguration().getStorage("Temp_testing_storage", false));
+		projDesc = CoreModel.getDefault().getProjectDescription(project, true);
+		makeDescriptionReadOnly();
+		projDesc.getDefaultSettingConfiguration().removeStorage("Temp_testing_storage");
+		CoreModel.getDefault().setProjectDescription(project, projDesc);
+
+		project.close(null);
+		project.open(null);
+
+		projDesc = CoreModel.getDefault().getProjectDescription(project, false);
+		assertNull(projDesc.getDefaultSettingConfiguration().getStorage("Temp_testing_storage", false));
+	}
+
+	/*
+	 *
+	 * Helper methods for external modifications
+	 *
+	 */
+
+	/**
+	 * makes the project description (as stored by the XmlProjectDescriptionStorage &
+	 * XmlProjectDescriptionStorage2) read-only.  Does this using java.io.File deliberately.
+	 */
+	private void makeDescriptionReadOnly() throws Exception {
+		File cproj = cProj.getProject().getFile(".cproject").getLocation().toFile();
+		if (!cproj.exists())
+			throw new FileNotFoundException();
+		cproj.setReadOnly();
+		// XmlProjectDescription2 stores settings in a .csettings directory, look for it
+		File csettDir = cProj.getProject().getFile(".csettings").getLocation().toFile();
+		if (csettDir.exists()) {
+			for (File child : csettDir.listFiles())
+				child.setReadOnly();
+			csettDir.setReadOnly();
+		}
+	}
+
+	/**
+	 * Restore the file from the backup. Only does so if the contents of the file
+	 * have changed (to prevent updating the modification stamp on the file...)
+	 * @param uniqueKey
+	 */
+	private void restoreCProjectFile(String uniqueKey) {
+		File cproj = cProj.getProject().getFile(".cproject").getLocation().toFile();
+		File cprojback = cProj.getProject().getFile(".cproject_" + uniqueKey).getLocation().toFile();
+		if (diff(cprojback, cproj))
+			copyFile(cprojback, cproj);
+		File csettings = cProj.getProject().getFile(".csettings").getLocation().toFile();
+		File csettingsback = cProj.getProject().getFile(".csettings_" + uniqueKey).getLocation().toFile();
+		if (csettingsback.exists()) {
+			for (File f : csettingsback.listFiles()) {
+				File orig = new File(csettings, f.getName());
+				if (diff(f, orig))
+					copyFile(f, orig);
+			}
+		}
+	}
+
+	private void backUpCProjectFile(String uniqueKey) {
+		File cproj = cProj.getProject().getFile(".cproject").getLocation().toFile();
+		File cprojback = cProj.getProject().getFile(".cproject_" + uniqueKey).getLocation().toFile();
+		copyFile(cproj, cprojback);
+		// backup .csettings as well
+		File csettings = cProj.getProject().getFile(".csettings").getLocation().toFile();
+		if (csettings.exists() && csettings.isDirectory()) {
+			File csettingsback = cProj.getProject().getFile(".csettings_" + uniqueKey).getLocation().toFile();
+			if (!csettingsback.exists())
+				csettingsback.mkdir();
+			for (File f : csettings.listFiles())
+				copyFile(f, new File(csettingsback, f.getName()));
+		}
+	}
+
+	/**
+	 * Return boolean indicating whether two files are different
+	 * @param src1
+	 * @param src2
+	 * @return
+	 */
+	private boolean diff(File src1, File src2) {
+		if (!src1.exists() || !src2.exists())
+			return true;
+		FileInputStream in1 = null;
+		FileInputStream in2 = null;
+		try {
+			in1 = new FileInputStream(src1);
+			in2 = new FileInputStream(src2);
+			while (true) {
+				int byteRead1 = in1.read();
+				int byteRead2 = in2.read();
+				if (byteRead1 == -1 && byteRead2 == -1)
+					return false;
+				if (byteRead1 != byteRead2)
+					return true;
+			}
+		} catch (Exception e) {
+			fail("Exception diffingFiles: " + src1.getAbsolutePath() + " ; " + src2.getAbsolutePath());
+			return true;
+		} finally {
+			if (in1 != null)
+				try {in1.close();} catch (Exception e) {/*Don't care*/}
+			if (in2 != null)
+				try {in2.close();} catch (Exception e) {/*Don't care*/}
+		}
+	}
+
+	private void copyFile(File src, File dst) {
+		long initModificationTime = dst.lastModified();
+		FileInputStream in = null;
+		FileOutputStream out = null;
+		try {
+			in = new FileInputStream(src);
+			out = new FileOutputStream(dst);
+			byte[] buffer = new byte[8192];
+			int bytesRead;
+			while ((bytesRead = in.read(buffer)) != -1)
+				out.write(buffer, 0, bytesRead);
+		} catch (Exception e) {
+			fail("Exception copyingFile: " + src.getAbsolutePath() + " -> " + dst.getAbsolutePath());
+		} finally {
+			if (in != null)
+				try {in.close();} catch (Exception e) {/*Don't care*/}
+			if (out != null)
+				try {out.close();} catch (Exception e) {/*Don't care*/}
+		}
+
+		while (dst.lastModified() - initModificationTime == 0) {
+			// Unix stat doesn't return granularity < 1000ms :(
+			// If we don't sleep here, and the unit test goes too quickly, we're scuppered.
+			try {
+				Thread.sleep(1000);
+			} catch (InterruptedException e) {
+				// Don't care
+			}
+			dst.setLastModified(System.currentTimeMillis());
+		}
+	}
+
+	/**
+	 * Our resource change listener which notified us when a file has been detected as changed
+	 * Users add files to the files to watch. Reset the listener and block waiting for the change to
+	 * be noticed.
+	 */
+	private static class OurResourceChangeListener implements IResourceChangeListener {
+		boolean changeDetected;
+		private Set<IPath> filesToWatch = new HashSet<IPath>();
+		public synchronized void resourceChanged(IResourceChangeEvent event) {
+			IResourceDelta delta = event.getDelta();
+			if (delta == null)
+				return;
+			for (IPath f : filesToWatch)
+				if (delta.findMember(f) != null) {
+					changeDetected = true;
+					notifyAll();
+					break;
+				}
+		}
+		public synchronized void addFileToWatch(IPath file) {
+			filesToWatch.add(file);
+		}
+		public synchronized void reset() {
+			changeDetected = false;
+		}
+		public synchronized void waitForChange() {
+			try {
+				if (!changeDetected)
+					wait(20000);
+				if (!changeDetected)
+					CCorePlugin.log("No Change detected in 20s!");
+			} catch (InterruptedException e) {
+				Thread.currentThread().interrupt();
+			}
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CfgSettingsTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CfgSettingsTests.java
new file mode 100644
index 0000000..e4abb36
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/CfgSettingsTests.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.settings.model;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+
+public class CfgSettingsTests extends BaseTestCase {
+	private static final String PROJ_NAME_PREFIX = "sfgst_";
+	ICProject p1;
+	
+	public static TestSuite suite() {
+		return suite(CfgSettingsTests.class, "_");
+	}
+	
+	protected void setUp() throws Exception {
+	}
+	
+	public void testDefaultSettingConfig() throws Exception {
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		
+		ICProjectDescriptionWorkspacePreferences prefs = mngr.getProjectDescriptionWorkspacePreferences(true);
+		
+		int wspRel = prefs.getConfigurationRelations();
+		CoreModel model = CoreModel.getDefault();
+		p1 = CProjectHelper.createNewStileCProject(PROJ_NAME_PREFIX + "a", IPDOMManager.ID_NO_INDEXER);
+		IProject project = p1.getProject();
+		ICProjectDescription des = model.getProjectDescription(project, false);
+		assertEquals(wspRel, des.getConfigurationRelations());
+		assertTrue(des.isDefaultConfigurationRelations());
+		prefs.setConfigurationRelations(ICProjectDescriptionPreferences.CONFIGS_INDEPENDENT);
+		assertEquals(wspRel, des.getConfigurationRelations());
+		assertEquals(wspRel, mngr.getProjectDescriptionWorkspacePreferences(true).getConfigurationRelations());
+		prefs.setConfigurationRelations(ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE);
+		assertEquals(wspRel, des.getConfigurationRelations());
+		assertEquals(wspRel, mngr.getProjectDescriptionWorkspacePreferences(true).getConfigurationRelations());
+		assertTrue(des.isDefaultConfigurationRelations());
+		wspRel = getChangedConfigRelStatus(wspRel);
+
+		prefs.setConfigurationRelations(wspRel);
+		
+		mngr.setProjectDescriptionWorkspacePreferences(prefs, true, null);
+		des = model.getProjectDescription(project, false);
+		prefs = mngr.getProjectDescriptionWorkspacePreferences(true);
+		assertEquals(wspRel, des.getConfigurationRelations());
+		assertEquals(wspRel, prefs.getConfigurationRelations());
+		assertTrue(des.isDefaultConfigurationRelations());
+		
+		des = mngr.getProjectDescription(project);
+		assertTrue(des.isDefaultConfigurationRelations());
+		wspRel = prefs.getConfigurationRelations();
+		assertEquals(wspRel, des.getConfigurationRelations());
+		wspRel = getChangedConfigRelStatus(wspRel);
+		prefs.setConfigurationRelations(wspRel);
+		assertTrue(wspRel != des.getConfigurationRelations());
+		mngr.setProjectDescriptionWorkspacePreferences(prefs, false, null);
+		assertEquals(wspRel, des.getConfigurationRelations());
+		mngr.setProjectDescription(des.getProject(), des);
+		des = mngr.getProjectDescription(project, false);
+		assertEquals(wspRel, des.getConfigurationRelations());
+		
+		des = mngr.getProjectDescription(project);
+		prefs = mngr.getProjectDescriptionWorkspacePreferences(false);
+		assertEquals(des.getConfigurationRelations(), prefs.getConfigurationRelations());
+		assertTrue(des.isDefaultConfigurationRelations());
+		wspRel = prefs.getConfigurationRelations();
+		int projRel = getChangedConfigRelStatus(wspRel);
+		des.setConfigurationRelations(projRel);
+		assertFalse(des.isDefaultConfigurationRelations());
+		assertEquals(projRel, des.getConfigurationRelations());
+		mngr.setProjectDescription(project, des);
+		
+		des = mngr.getProjectDescription(project, false);
+		assertFalse(des.isDefaultConfigurationRelations());
+		assertEquals(projRel, des.getConfigurationRelations());
+		
+		des = mngr.getProjectDescription(project, true);
+		assertFalse(des.isDefaultConfigurationRelations());
+		assertEquals(projRel, des.getConfigurationRelations());
+
+		ICConfigurationDescription aCfg = des.getActiveConfiguration(); 
+		ICConfigurationDescription sCfg = des.getDefaultSettingConfiguration();
+		assertEquals(aCfg, sCfg);
+		
+		des.createConfiguration("qq.2", "test2", des.getConfigurations()[0]);
+
+		assertEquals(aCfg, des.getActiveConfiguration());
+		assertEquals(sCfg, des.getActiveConfiguration());
+		
+		projRel = getChangedConfigRelStatus(projRel);
+		des.setConfigurationRelations(projRel);
+		assertEquals(aCfg, des.getActiveConfiguration());
+		assertEquals(sCfg, des.getActiveConfiguration());
+		assertFalse(des.isDefaultConfigurationRelations());
+		
+		projRel = ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE;
+		des.setConfigurationRelations(projRel);
+		ICConfigurationDescription cfg2 = des.getConfigurationById("qq.2");
+		assertNotNull(cfg2);
+		des.setActiveConfiguration(cfg2);
+		assertEquals(cfg2, des.getActiveConfiguration());
+		assertEquals(cfg2, des.getDefaultSettingConfiguration());
+
+		projRel = ICProjectDescriptionPreferences.CONFIGS_INDEPENDENT;
+		des.setConfigurationRelations(projRel);
+		des.setActiveConfiguration(aCfg);
+		assertEquals(aCfg, des.getActiveConfiguration());
+		assertEquals(cfg2, des.getDefaultSettingConfiguration());
+
+		des.setDefaultSettingConfiguration(aCfg);
+		assertEquals(aCfg, des.getActiveConfiguration());
+		assertEquals(aCfg, des.getDefaultSettingConfiguration());
+
+		des.setDefaultSettingConfiguration(cfg2);
+		assertEquals(aCfg, des.getActiveConfiguration());
+		assertEquals(cfg2, des.getDefaultSettingConfiguration());
+
+		mngr.setProjectDescription(project, des);
+		
+		des = mngr.getProjectDescription(project, false);
+		assertEquals(aCfg.getId(), des.getActiveConfiguration().getId());
+		assertEquals(cfg2.getId(), des.getDefaultSettingConfiguration().getId());
+
+		des = mngr.getProjectDescription(project, true);
+		assertEquals(aCfg.getId(), des.getActiveConfiguration().getId());
+		assertEquals(cfg2.getId(), des.getDefaultSettingConfiguration().getId());
+	}
+	
+	private int getChangedConfigRelStatus(int status){
+		if(status == ICProjectDescriptionPreferences.CONFIGS_INDEPENDENT)
+			return ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE;
+		return ICProjectDescriptionPreferences.CONFIGS_INDEPENDENT;
+	}
+	
+	protected void tearDown() throws Exception {
+		try {
+			if(p1 != null){
+				p1.getProject().delete(true, null);
+				p1 = null;
+			}
+		} catch (CoreException e){
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/ExternalSettingsProviderTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/ExternalSettingsProviderTests.java
new file mode 100644
index 0000000..f33dc0a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/ExternalSettingsProviderTests.java
@@ -0,0 +1,286 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.settings.model;
+
+import java.util.Arrays;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.settings.model.util.CDataUtil;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+
+public class ExternalSettingsProviderTests extends BaseTestCase{
+	private static final String PROJ_NAME_PREFIX = "espt_";
+	ICProject p1, p2, p3, p4;
+	
+	public static TestSuite suite() {
+		return suite(ExternalSettingsProviderTests.class, "_");
+	}
+	
+	protected void setUp() throws Exception {
+		p1 = CProjectHelper.createNewStileCProject(PROJ_NAME_PREFIX + "a", IPDOMManager.ID_NO_INDEXER);
+		p2 = CProjectHelper.createNewStileCProject(PROJ_NAME_PREFIX + "b", IPDOMManager.ID_NO_INDEXER);
+		p3 = CProjectHelper.createNewStileCProject(PROJ_NAME_PREFIX + "c", IPDOMManager.ID_NO_INDEXER);
+		p4 = CProjectHelper.createNewStileCProject(PROJ_NAME_PREFIX + "d", IPDOMManager.ID_NO_INDEXER);
+	}
+	
+	public void testRefs() throws Exception {
+		TestExtSettingsProvider.setVariantNum(0);
+		CoreModel model = CoreModel.getDefault();
+		IProject project = p1.getProject();
+		
+		ICProjectDescription des = model.getProjectDescription(project);
+		ICConfigurationDescription cfgDes = des.getConfigurations()[0];
+		ICLanguageSetting ls = cfgDes.getLanguageSettingForFile(new Path("a.c"), true);
+		ICLanguageSettingEntry[] entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		assertEquals(0, entries.length);
+		ICSourceEntry[] sourceEntries = cfgDes.getSourceEntries();
+		ICSourceEntry[] expectedSourceEntries = new ICSourceEntry[]{
+			new CSourceEntry(project.getFullPath(), null, ICSettingEntry.RESOLVED)
+		};
+		assertEquals(1, sourceEntries.length);
+		assertTrue(Arrays.equals(expectedSourceEntries, sourceEntries));
+		String[] extPIds = new String[]{CTestPlugin.PLUGIN_ID + ".testExtSettingsProvider"};
+		cfgDes.setExternalSettingsProviderIds(extPIds);
+		assertEquals(extPIds.length, cfgDes.getExternalSettingsProviderIds().length);
+		assertTrue(Arrays.equals(extPIds, cfgDes.getExternalSettingsProviderIds()));
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		assertEquals(2, entries.length);
+		ICLanguageSettingEntry[] expectedEntries = new ICLanguageSettingEntry[]{
+				new CIncludePathEntry("ip_a", 0),
+				new CIncludePathEntry("ip_b", 0),
+		};
+		assertTrue(Arrays.equals(expectedEntries, entries));
+		sourceEntries = cfgDes.getSourceEntries();
+		assertEquals(2, sourceEntries.length);
+		ICSourceEntry[] newExpectedSourceEntries = new ICSourceEntry[]{
+				new CSourceEntry(project.getFullPath().append("sp_a"), null, 0),
+				new CSourceEntry(project.getFullPath().append("sp_b"), null, 0),
+		};
+		assertTrue(Arrays.equals(newExpectedSourceEntries, sourceEntries));
+		
+		ICLanguageSettingEntry[] newEntries = new ICLanguageSettingEntry[3];
+		newEntries[0] = expectedEntries[1];
+		newEntries[1] = new CIncludePathEntry("added", 0);
+		newEntries[2] = expectedEntries[0];
+		
+		ls.setSettingEntries(ICSettingEntry.INCLUDE_PATH, newEntries);
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		
+		assertEquals(3, entries.length);
+		assertTrue(Arrays.equals(newEntries, entries));
+		
+		newEntries = new ICLanguageSettingEntry[1];
+		newEntries[0] = expectedEntries[0];
+		ls.setSettingEntries(ICSettingEntry.INCLUDE_PATH, newEntries);
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		
+		assertEquals(1, entries.length);
+		assertTrue(Arrays.equals(newEntries, entries));
+		
+		newEntries = new ICLanguageSettingEntry[0];
+		ls.setSettingEntries(ICSettingEntry.INCLUDE_PATH, newEntries);
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		
+		assertEquals(0, entries.length);
+		
+		ls.setSettingEntries(ICSettingEntry.INCLUDE_PATH, (ICLanguageSettingEntry[])null);
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		assertEquals(2, entries.length);
+		assertTrue(Arrays.equals(expectedEntries, entries));
+	}
+	
+	public void testCreateCfg() throws Exception {
+		TestExtSettingsProvider.setVariantNum(0);
+		CoreModel model = CoreModel.getDefault();
+		IProject project = p2.getProject();
+		
+		ICProjectDescription des = model.getProjectDescription(project);
+		ICConfigurationDescription cfgDes = des.getConfigurations()[0];
+		ICLanguageSetting ls = cfgDes.getLanguageSettingForFile(new Path("a.c"), true);
+		ICLanguageSettingEntry[] entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		assertEquals(0, entries.length);
+		ICSourceEntry[] sourceEntries = cfgDes.getSourceEntries();
+		ICSourceEntry[] expectedSourceEntries = new ICSourceEntry[]{
+			new CSourceEntry(project.getFullPath(), null, ICSettingEntry.RESOLVED)
+		};
+		assertEquals(1, sourceEntries.length);
+		assertTrue(Arrays.equals(expectedSourceEntries, sourceEntries));
+		String[] extPIds = new String[]{CTestPlugin.PLUGIN_ID + ".testExtSettingsProvider"};
+		cfgDes.setExternalSettingsProviderIds(extPIds);
+		
+		model.setProjectDescription(project, des);
+		
+		des = model.getProjectDescription(project, false);
+		cfgDes = des.getConfigurations()[0];
+		assertEquals(extPIds.length, cfgDes.getExternalSettingsProviderIds().length);
+		assertTrue(Arrays.equals(extPIds, cfgDes.getExternalSettingsProviderIds()));
+		
+		des = model.getProjectDescription(project);
+		cfgDes = des.getConfigurations()[0];
+		assertEquals(extPIds.length, cfgDes.getExternalSettingsProviderIds().length);
+		assertTrue(Arrays.equals(extPIds, cfgDes.getExternalSettingsProviderIds()));
+		
+		String newCfgId = CDataUtil.genId(null);
+		ICConfigurationDescription cfgDes2 = des.createConfiguration(newCfgId, "cfg2", cfgDes);
+		assertEquals(extPIds.length, cfgDes2.getExternalSettingsProviderIds().length);
+		assertTrue(Arrays.equals(extPIds, cfgDes2.getExternalSettingsProviderIds()));
+		
+		ls = cfgDes2.getLanguageSettingForFile(new Path("a.c"), true);
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		ICLanguageSettingEntry[] expectedEntries = new ICLanguageSettingEntry[]{
+				new CIncludePathEntry("ip_a", 0),
+				new CIncludePathEntry("ip_b", 0),
+		};
+		assertTrue(Arrays.equals(expectedEntries, entries));
+
+	}
+	
+	public void testProviderUpdate() throws Exception {
+		TestExtSettingsProvider.setVariantNum(0);
+
+		CoreModel model = CoreModel.getDefault();
+		ICProjectDescriptionManager mngr = model.getProjectDescriptionManager();
+		IProject project = p2.getProject();
+		
+		ICProjectDescription des = model.getProjectDescription(project);
+		ICConfigurationDescription cfgDes = des.getConfigurations()[0];
+		ICLanguageSetting ls = cfgDes.getLanguageSettingForFile(new Path("a.c"), true);
+		ICLanguageSettingEntry[] entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		assertEquals(0, entries.length);
+		ICSourceEntry[] sourceEntries = cfgDes.getSourceEntries();
+		ICSourceEntry[] expectedSourceEntries = new ICSourceEntry[]{
+			new CSourceEntry(project.getFullPath(), null, ICSettingEntry.RESOLVED)
+		};
+		assertEquals(1, sourceEntries.length);
+		assertTrue(Arrays.equals(expectedSourceEntries, sourceEntries));
+		String[] extPIds = new String[]{CTestPlugin.PLUGIN_ID + ".testExtSettingsProvider"};
+		cfgDes.setExternalSettingsProviderIds(extPIds);
+		
+
+		ls = cfgDes.getLanguageSettingForFile(new Path("a.c"), true);
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		ICLanguageSettingEntry[] expectedEntries = new ICLanguageSettingEntry[]{
+				new CIncludePathEntry("ip_a", 0),
+				new CIncludePathEntry("ip_b", 0),
+		};
+		assertTrue(Arrays.equals(expectedEntries, entries));
+
+		model.setProjectDescription(project, des);
+		
+		des = model.getProjectDescription(project);
+		cfgDes = des.getConfigurations()[0];
+		ls = cfgDes.getLanguageSettingForFile(new Path("a.c"), true);
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		assertTrue(Arrays.equals(expectedEntries, entries));
+		
+		ICLanguageSettingEntry[] expectedEntries2 = new ICLanguageSettingEntry[]{
+				new CIncludePathEntry("ip_a2", 0),
+				new CIncludePathEntry("ip_b2", 0),
+		};
+		TestExtSettingsProvider.setVariantNum(1);
+		
+		mngr.updateExternalSettingsProviders(extPIds, null);
+		des = model.getProjectDescription(project);
+		cfgDes = des.getConfigurations()[0];
+		ls = cfgDes.getLanguageSettingForFile(new Path("a.c"), true);
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		assertTrue(Arrays.equals(expectedEntries2, entries));
+	}
+	
+	public void testRestoreDefaults() throws Exception {
+		TestExtSettingsProvider.setVariantNum(0);
+
+		CoreModel model = CoreModel.getDefault();
+		ICProjectDescriptionManager mngr = model.getProjectDescriptionManager();
+		IProject project = p4.getProject();
+		
+		ICProjectDescription des = model.getProjectDescription(project);
+		ICConfigurationDescription cfgDes = des.getConfigurations()[0];
+		ICLanguageSetting ls = cfgDes.getLanguageSettingForFile(new Path("a.c"), true);
+		ICLanguageSettingEntry[] entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		assertEquals(0, entries.length);
+		ICSourceEntry[] sourceEntries = cfgDes.getSourceEntries();
+		ICSourceEntry[] expectedSourceEntries = new ICSourceEntry[]{
+			new CSourceEntry(project.getFullPath(), null, ICSettingEntry.RESOLVED)
+		};
+		assertEquals(1, sourceEntries.length);
+		assertTrue(Arrays.equals(expectedSourceEntries, sourceEntries));
+		String[] extPIds = new String[]{CTestPlugin.PLUGIN_ID + ".testExtSettingsProvider"};
+		cfgDes.setExternalSettingsProviderIds(extPIds);
+		
+
+		ls = cfgDes.getLanguageSettingForFile(new Path("a.c"), true);
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		ICLanguageSettingEntry[] expectedEntries = new ICLanguageSettingEntry[]{
+				new CIncludePathEntry("ip_a", 0),
+				new CIncludePathEntry("ip_b", 0),
+		};
+		assertTrue(Arrays.equals(expectedEntries, entries));
+
+		model.setProjectDescription(project, des);
+		
+		des = model.getProjectDescription(project);
+		cfgDes = des.getConfigurations()[0];
+		ls = cfgDes.getLanguageSettingForFile(new Path("a.c"), true);
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		assertTrue(Arrays.equals(expectedEntries, entries));
+
+		ls.setSettingEntries(ICSettingEntry.INCLUDE_PATH, (ICLanguageSettingEntry[])null);
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		assertTrue(Arrays.equals(expectedEntries, entries));
+
+		cfgDes.setSourceEntries(null);
+		expectedSourceEntries = new ICSourceEntry[]{
+				new CSourceEntry(project.getFullPath().append("sp_a"), null, 0),
+				new CSourceEntry(project.getFullPath().append("sp_b"), null, 0),	
+		};
+		sourceEntries = cfgDes.getSourceEntries();
+		assertEquals(2, sourceEntries.length);
+		assertTrue(Arrays.equals(expectedSourceEntries, sourceEntries));
+
+		cfgDes.getBuildSetting().setOutputDirectories(null);
+		ICOutputEntry[] expectedOutputEntries = new ICOutputEntry[]{
+				new COutputEntry(project.getFullPath().append("op_a"), null, 0),
+				new COutputEntry(project.getFullPath().append("op_b"), null, 0),
+		};
+		ICOutputEntry[] outputEntries = cfgDes.getBuildSetting().getOutputDirectories();
+		assertEquals(2, outputEntries.length);
+		assertTrue(Arrays.equals(expectedOutputEntries, outputEntries));
+	}
+	
+	protected void tearDown() throws Exception {
+		try {
+			p1.getProject().delete(true, null);
+		} catch (CoreException e){
+		}
+		try {
+			p2.getProject().delete(true, null);
+		} catch (CoreException e){
+		}
+		try {
+			p3.getProject().delete(true, null);
+		} catch (CoreException e){
+		}
+		try {
+			p4.getProject().delete(true, null);
+		} catch (CoreException e){
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/PathSettingsContainerTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/PathSettingsContainerTests.java
new file mode 100644
index 0000000..e7e1793
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/PathSettingsContainerTests.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.settings.model;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.settings.model.util.PathSettingsContainer;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+/**
+ */
+public class PathSettingsContainerTests extends BaseTestCase {
+
+	public static TestSuite suite() {
+		return suite(PathSettingsContainerTests.class, "_");
+	}
+	
+	protected void setUp() throws Exception {
+	}
+	
+	protected void tearDown() throws Exception {
+	}
+
+	public void testPathSettingsContainerCreate() {
+		final PathSettingsContainer root= PathSettingsContainer.createRootContainer();
+		assertNull(root.getValue());
+		assertNull(root.getParentContainer());
+		assertTrue(root.isRoot());
+		assertTrue(root.isValid());
+		assertEquals(0, root.getChildren(false).length);
+		assertEquals(1, root.getChildren(true).length);
+		
+		final IPath level1= new Path("level1");
+		final PathSettingsContainer child1= root.getChildContainer(level1, true, true);
+		assertNotNull(child1);
+		assertNull(child1.getValue());
+		assertSame(root, child1.getParentContainer());
+		assertFalse(child1.isRoot());
+		assertTrue(child1.isValid());
+		assertEquals(1, root.getChildren(false).length);
+		assertEquals(0, child1.getChildren(false).length);
+		assertEquals(1, child1.getChildren(true).length);
+		final String value1= "child1";
+		child1.setValue(value1);
+		assertSame(value1, child1.getValue());
+		
+		final IPath level2= level1.append("level2");
+		final PathSettingsContainer child2= root.getChildContainer(level2, true, true);
+		assertNotNull(child2);
+		assertNull(child2.getValue());
+		assertSame(child1, child2.getParentContainer());
+		assertFalse(child2.isRoot());
+		assertTrue(child2.isValid());
+		assertEquals(1, child1.getChildren(false).length);
+		assertEquals(0, child2.getChildren(false).length);
+		assertEquals(1, child2.getChildren(true).length);
+		final String value2= "child2";
+		child2.setValue(value2);
+		assertSame(value2, child2.getValue());
+
+		final IPath level3= level2.append("level3");
+		final PathSettingsContainer child3= root.getChildContainer(level3, true, true);
+		assertNotNull(child3);
+		assertNull(child3.getValue());
+		assertSame(child2, child3.getParentContainer());
+		assertFalse(child3.isRoot());
+		assertTrue(child3.isValid());
+		assertEquals(1, child2.getChildren(false).length);
+		assertEquals(0, child3.getChildren(false).length);
+		assertEquals(1, child3.getChildren(true).length);
+		final String value3= "child3";
+		child3.setValue(value3);
+		assertSame(value3, child3.getValue());
+		
+		assertSame(child1, root.getChildContainer(level1, true, true));
+		assertSame(child2, root.getChildContainer(level2, true, true));
+		assertSame(child3, root.getChildContainer(level3, true, true));
+	}
+
+	public void testPathSettingsContainerRemove() {
+		final PathSettingsContainer root= PathSettingsContainer.createRootContainer();
+		final IPath level1= new Path("level1");
+		final PathSettingsContainer child1= root.getChildContainer(level1, true, true);
+		final IPath level2= level1.append("level2");
+		final PathSettingsContainer child2= root.getChildContainer(level2, true, true);
+		final IPath level3= level2.append("level3");
+		final PathSettingsContainer child3= root.getChildContainer(level3, true, true);
+		final IPath level31= level2.append("level31");
+		final PathSettingsContainer child31= root.getChildContainer(level31, true, true);
+		
+		child3.remove();
+		assertEquals(1, child2.getChildren(false).length);
+		assertFalse(child3.isValid());
+
+		child2.remove();
+		assertFalse(child2.isValid());
+
+		child31.remove();
+		assertEquals(0, child2.getChildren(false).length);
+		assertFalse(child31.isValid());
+
+	}
+
+	public void testPathSettingsContainer_Bug208765() {
+		final PathSettingsContainer root= PathSettingsContainer.createRootContainer();
+		try {
+			root.removeChildContainer(new Path(""));
+		} catch (NullPointerException npe) {
+			fail(npe.getMessage());
+		}
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/ProjectCreationStateTests.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/ProjectCreationStateTests.java
new file mode 100644
index 0000000..80b2aad
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/ProjectCreationStateTests.java
@@ -0,0 +1,401 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.settings.model;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CProjectNature;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.settings.model.util.CDataUtil;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+
+public class ProjectCreationStateTests  extends BaseTestCase{
+	private static final String PROJ_NAME_PREFIX = "ProjectCreationStateTests_";
+
+	private IProject p1, p2, p3, p4;
+	private Listener listener;
+	
+	private class Listener implements ICProjectDescriptionListener {
+		private boolean fIsCreationCompletedNotified;
+		private boolean fIsCreating;
+		private boolean fIsNotified;
+		private String fProjName;
+		
+		Listener(String projName){
+			init();
+			fProjName = projName;
+		}
+		
+		public void handleEvent(CProjectDescriptionEvent event) {
+			if(!event.getProject().getName().equals(fProjName))
+				return;
+			fIsNotified = true;
+			boolean creating = event.getNewCProjectDescription().isCdtProjectCreating();
+			ICDescriptionDelta delta = event.getProjectDelta();
+			boolean notified = delta != null ? (delta.getChangeFlags() & ICDescriptionDelta.PROJECT_CREAION_COMPLETED) != 0 : false;
+			
+			if(creating)
+				assertTrue(fIsCreating);
+			if(notified)
+				assertFalse(fIsCreationCompletedNotified);
+			
+			fIsCreating = creating;
+			fIsCreationCompletedNotified = notified;
+		}
+		
+		void init(){
+			fIsCreating = true;
+			fIsCreationCompletedNotified = false;
+			resetNotified();
+		}
+		
+		boolean isCreating(){
+			return fIsCreating;
+		}
+		
+		boolean isCreationCompletedNotified(){
+			return fIsCreationCompletedNotified;
+		}
+
+		boolean isNotified(){
+			boolean notified = fIsNotified;
+			resetNotified();
+			return notified;
+		}
+
+		void resetNotified(){
+			fIsNotified = false;
+		}
+
+	}
+	
+	public static TestSuite suite() {
+		return suite(ProjectCreationStateTests.class, "_");
+	}
+
+	protected void setUp() throws Exception {
+//		p1 = CProjectHelper.createNewStileCProject(PROJ_NAME_PREFIX + "a", IPDOMManager.ID_NO_INDEXER);
+	}
+	
+	private void initListener(String projName){
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		if(listener != null)
+			mngr.removeCProjectDescriptionListener(listener);
+		listener = new Listener(projName);
+		mngr.addCProjectDescriptionListener(listener, CProjectDescriptionEvent.APPLIED);
+		
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertTrue(listener.isCreating());
+
+	}
+	
+	public void testProjectCreatingState() throws Exception {
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		String projName = PROJ_NAME_PREFIX + "a";
+		
+		initListener(projName);
+		
+		
+		ICProject cp1 = CProjectHelper.createNewStileCProject(projName, IPDOMManager.ID_NO_INDEXER, true);
+		IProject project = cp1.getProject();
+		p1 = project;
+		assertTrue(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertTrue(listener.isCreating());
+		listener.resetNotified();
+		
+		ICProjectDescription des = mngr.getProjectDescription(project, false);
+		assertTrue(des.isCdtProjectCreating());
+		des = mngr.getProjectDescription(project, true);
+		assertTrue(des.isCdtProjectCreating());
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertTrue(listener.isCreating());
+		
+		ICProjectDescription des2 = mngr.getProjectDescription(project, true);
+		des2.createConfiguration(CDataUtil.genId(null), CDataUtil.genId(null), des2.getConfigurations()[0]);
+		mngr.setProjectDescription(project, des2);
+		des2 = mngr.getProjectDescription(project, false);
+		assertTrue(des2.isCdtProjectCreating());
+		des2 = mngr.getProjectDescription(project, true);
+		assertTrue(des2.isCdtProjectCreating());
+		assertTrue(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertTrue(listener.isCreating());
+		listener.resetNotified();
+		
+		des.createConfiguration(CDataUtil.genId(null), CDataUtil.genId(null), des.getConfigurations()[0]);
+		des.setCdtProjectCreated();
+		des2.createConfiguration(CDataUtil.genId(null), CDataUtil.genId(null), des2.getConfigurations()[0]);
+		mngr.setProjectDescription(project, des);
+		assertTrue(listener.isNotified());
+		assertTrue(listener.isCreationCompletedNotified());
+		assertFalse(listener.isCreating());
+		listener.resetNotified();
+
+		assertTrue(des2.isCdtProjectCreating());
+		mngr.setProjectDescription(project, des2);
+		assertTrue(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertFalse(listener.isCreating());
+		listener.resetNotified();
+
+		des2 = mngr.getProjectDescription(project, false);
+		assertFalse(des2.isCdtProjectCreating());
+		des2 = mngr.getProjectDescription(project, true);
+		assertFalse(des2.isCdtProjectCreating());
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertFalse(listener.isCreating());
+		
+		des2.createConfiguration(CDataUtil.genId(null), CDataUtil.genId(null), des2.getConfigurations()[0]);
+		mngr.setProjectDescription(project, des2);
+		assertTrue(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertFalse(listener.isCreating());
+		listener.resetNotified();
+	}
+	
+	public void testCreateProjectDescriptionForInexistingDes() throws Exception {
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		String projName = PROJ_NAME_PREFIX + "b";
+		initListener(projName);
+
+		IWorkspace wsp = ResourcesPlugin.getWorkspace();
+		IWorkspaceRoot root = wsp.getRoot();
+		IProject project = root.getProject(projName);
+		p2 = project;
+		project.create(null);
+		project.open(null);
+		CProjectHelper.addNatureToProject(project, CProjectNature.C_NATURE_ID, null);
+		
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertTrue(listener.isCreating());
+
+
+		ICProjectDescription des = mngr.getProjectDescription(project, false);
+		assertNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNull(des);
+
+		des = mngr.createProjectDescription(project, true);
+		assertFalse(des.isCdtProjectCreating());
+		des = mngr.getProjectDescription(project, false);
+		assertNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNull(des);
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertTrue(listener.isCreating());
+		
+		des = mngr.createProjectDescription(project, false);
+		assertFalse(des.isCdtProjectCreating());
+		des = mngr.getProjectDescription(project, false);
+		assertNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNull(des);
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertTrue(listener.isCreating());
+
+		des = mngr.createProjectDescription(project, true, true);
+		assertTrue(des.isCdtProjectCreating());
+		des = mngr.getProjectDescription(project, false);
+		assertNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNull(des);
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertTrue(listener.isCreating());
+
+		des = mngr.createProjectDescription(project, false, true);
+		assertTrue(des.isCdtProjectCreating());
+		des = mngr.getProjectDescription(project, false);
+		assertNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNull(des);
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertTrue(listener.isCreating());
+	}
+	
+	public void testCreateProjectDescriptionForCreatingDes() throws Exception {
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		String projName = PROJ_NAME_PREFIX + "c";
+		
+		initListener(projName);
+		
+		
+		ICProject cp3 = CProjectHelper.createNewStileCProject(projName, IPDOMManager.ID_NO_INDEXER, true);
+		IProject project = cp3.getProject();
+		p3 = project;
+
+		
+		assertTrue(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertTrue(listener.isCreating());
+
+		ICProjectDescription des = mngr.getProjectDescription(project, false);
+		assertNotNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNotNull(des);
+
+		des = mngr.createProjectDescription(project, true);
+		assertTrue(des.isCdtProjectCreating());
+		des = mngr.getProjectDescription(project, false);
+		assertNotNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNotNull(des);
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertTrue(listener.isCreating());
+		
+		des = mngr.createProjectDescription(project, false);
+		assertFalse(des.isCdtProjectCreating());
+		des = mngr.getProjectDescription(project, false);
+		assertNotNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNotNull(des);
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertTrue(listener.isCreating());
+
+		des = mngr.createProjectDescription(project, true, true);
+		assertTrue(des.isCdtProjectCreating());
+		des = mngr.getProjectDescription(project, false);
+		assertNotNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNotNull(des);
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertTrue(listener.isCreating());
+
+		des = mngr.createProjectDescription(project, false, true);
+		assertTrue(des.isCdtProjectCreating());
+		des = mngr.getProjectDescription(project, false);
+		assertNotNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNotNull(des);
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertTrue(listener.isCreating());
+	}
+	
+	public void testCreateProjectDescriptionForCreatedDes() throws Exception {
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		String projName = PROJ_NAME_PREFIX + "d";
+		
+		initListener(projName);
+		
+		
+		ICProject cp4 = CProjectHelper.createNewStileCProject(projName, IPDOMManager.ID_NO_INDEXER, false);
+		IProject project = cp4.getProject();
+		p4 = project;
+
+		
+		assertTrue(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertFalse(listener.isCreating());
+
+		ICProjectDescription des = mngr.getProjectDescription(project, false);
+		assertNotNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNotNull(des);
+
+		des = mngr.createProjectDescription(project, true);
+		assertFalse(des.isCdtProjectCreating());
+		des = mngr.getProjectDescription(project, false);
+		assertNotNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNotNull(des);
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertFalse(listener.isCreating());
+		
+		des = mngr.createProjectDescription(project, false);
+		assertFalse(des.isCdtProjectCreating());
+		des = mngr.getProjectDescription(project, false);
+		assertNotNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNotNull(des);
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertFalse(listener.isCreating());
+
+		des = mngr.createProjectDescription(project, true, true);
+		assertFalse(des.isCdtProjectCreating());
+		des = mngr.getProjectDescription(project, false);
+		assertNotNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNotNull(des);
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertFalse(listener.isCreating());
+
+		des = mngr.createProjectDescription(project, false, true);
+		assertFalse(des.isCdtProjectCreating());
+		des = mngr.getProjectDescription(project, false);
+		assertNotNull(des);
+		des = mngr.getProjectDescription(project, true);
+		assertNotNull(des);
+		assertFalse(listener.isNotified());
+		assertFalse(listener.isCreationCompletedNotified());
+		assertFalse(listener.isCreating());
+	}
+
+	
+	protected void tearDown() throws Exception {
+		if(listener != null){
+			CoreModel.getDefault().getProjectDescriptionManager().removeCProjectDescriptionListener(listener);
+			listener = null;
+		}
+		try {
+			if(p1 != null){
+				p1.getProject().delete(true, null);
+				p1 = null;
+			}
+		} catch (CoreException e){
+		}
+		try {
+			if(p2 != null){
+				p2.getProject().delete(true, null);
+				p2 = null;
+			}
+		} catch (CoreException e){
+		}
+		try {
+			if(p3 != null){
+				p3.getProject().delete(true, null);
+				p3 = null;
+			}
+		} catch (CoreException e){
+		}
+		try {
+			if(p4 != null){
+				p4.getProject().delete(true, null);
+				p4 = null;
+			}
+		} catch (CoreException e){
+		}
+
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestCfgDataProvider.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestCfgDataProvider.java
new file mode 100644
index 0000000..a155275
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestCfgDataProvider.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.settings.model;
+
+import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultConfigurationDataProvider;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+
+public class TestCfgDataProvider extends CDefaultConfigurationDataProvider {
+	public static final String PROVIDER_ID = CTestPlugin.PLUGIN_ID + ".testCfgDataProvider";
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestExtSettingsProvider.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestExtSettingsProvider.java
new file mode 100644
index 0000000..4352bdc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestExtSettingsProvider.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.settings.model;
+
+import org.eclipse.cdt.core.settings.model.extension.CExternalSettingProvider;
+import org.eclipse.core.resources.IProject;
+
+public class TestExtSettingsProvider extends CExternalSettingProvider {
+	private static CExternalSetting[] SETTINGS_1 = new CExternalSetting[]{
+		new CExternalSetting(null, null, null, new ICSettingEntry[]{
+				new CIncludePathEntry("ip_a", 0),
+				new CIncludePathEntry("ip_b", 0),
+				new CIncludeFileEntry("if_a", 0),
+				new CIncludeFileEntry("if_b", 0),
+				new CMacroEntry("m_a", "mv_a", 0),
+				new CMacroEntry("m_b", "mv_b", 0),
+				new CMacroFileEntry("mf_a", 0),
+				new CMacroFileEntry("mf_b", 0),
+				new CLibraryPathEntry("lp_a", 0),
+				new CLibraryPathEntry("lp_b", 0),
+				new CLibraryFileEntry("lf_a", 0),
+				new CLibraryFileEntry("lf_b", 0),
+				new CSourceEntry("sp_a", null, 0),
+				new CSourceEntry("sp_b", null, 0),
+				new COutputEntry("op_a", null, 0),
+				new COutputEntry("op_b", null, 0),
+		})
+	};
+	
+	private static CExternalSetting[] SETTINGS_2 = new CExternalSetting[]{
+		new CExternalSetting(null, null, null, new ICSettingEntry[]{
+				new CIncludePathEntry("ip_a2", 0),
+				new CIncludePathEntry("ip_b2", 0),
+				new CIncludeFileEntry("if_a2", 0),
+				new CIncludeFileEntry("if_b2", 0),
+				new CMacroEntry("m_a2", "mv_a2", 0),
+				new CMacroEntry("m_b2", "mv_b2", 0),
+				new CMacroFileEntry("mf_a2", 0),
+				new CMacroFileEntry("mf_b2", 0),
+				new CLibraryPathEntry("lp_a2", 0),
+				new CLibraryPathEntry("lp_b2", 0),
+				new CLibraryFileEntry("lf_a2", 0),
+				new CLibraryFileEntry("lf_b2", 0),
+				new CSourceEntry("sp_a2", null, 0),
+				new CSourceEntry("sp_b2", null, 0),
+				new COutputEntry("op_a2", null, 0),
+				new COutputEntry("op_b2", null, 0),
+		})
+	};
+	
+	private static CExternalSetting[][] SETTINGS_VARIANTS = new CExternalSetting[][]{
+								SETTINGS_1, 
+								SETTINGS_2};
+
+	private static int variantNum;
+	
+	public CExternalSetting[] getSettings(IProject project,
+			ICConfigurationDescription cfg) {
+		return SETTINGS_VARIANTS[variantNum].clone();
+	}
+	
+	public static void setVariantNum(int num){
+		if(num < 0 || num >= SETTINGS_VARIANTS.length)
+			throw new IllegalArgumentException();
+		variantNum = num;
+	}
+	
+	public static int getVariantNum(){
+		return variantNum;
+	}
+
+	public static int getMaxVariantNum(){
+		return SETTINGS_VARIANTS.length - 1;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestUserAndDiscoveredEntriesCfgDataProvider.java b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestUserAndDiscoveredEntriesCfgDataProvider.java
new file mode 100644
index 0000000..9a8c343
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/settings/model/TestUserAndDiscoveredEntriesCfgDataProvider.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.settings.model;
+
+import org.eclipse.cdt.core.settings.model.extension.impl.UserAndDiscoveredEntryConfigurationDataProvider;
+import org.eclipse.cdt.core.settings.model.util.KindBasedStore;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+
+public class TestUserAndDiscoveredEntriesCfgDataProvider extends UserAndDiscoveredEntryConfigurationDataProvider{
+	public static final String PROVIDER_ID = CTestPlugin.PLUGIN_ID + ".testUserAndDiscoveredCfgDataProvider";
+	
+	private static final KindBasedStore[] ENTRIES_STORES = new KindBasedStore[]{new KindBasedStore(false)};
+	
+	static {
+		ICLanguageSettingEntry[] entries = new ICLanguageSettingEntry[4];
+		entries[0] = new CIncludePathEntry("a/b/c", 0);
+		entries[1] = new CIncludePathEntry("/d/e/f", 0);
+		entries[2] = new CIncludePathEntry("g/h/i", ICSettingEntry.VALUE_WORKSPACE_PATH);
+		entries[3] = new CIncludePathEntry("/j/k/l", ICSettingEntry.VALUE_WORKSPACE_PATH);
+		
+		ENTRIES_STORES[0].put(ICSettingEntry.INCLUDE_PATH, entries);
+		
+		entries = new ICLanguageSettingEntry[2];
+		entries[0] = new CMacroEntry("a", "b", 0);
+		entries[1] = new CMacroEntry("c", null, 0);
+		ENTRIES_STORES[0].put(ICSettingEntry.MACRO, entries);
+	}
+
+	protected ICLanguageSettingEntry[] getAllDiscoveredEntries(
+			LanguageData data, int kind) {
+		ICLanguageSettingEntry entries[] = (ICLanguageSettingEntry[])ENTRIES_STORES[0].get(kind);
+		return entries != null ? (ICLanguageSettingEntry[])entries.clone() : new ICLanguageSettingEntry[0];
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ASTComparer.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ASTComparer.java
new file mode 100644
index 0000000..6110dae
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ASTComparer.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    Mike Kucera (IBM) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests;
+
+import java.beans.BeanInfo;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.Assert;
+import junit.framework.AssertionFailedError;
+
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+
+public class ASTComparer extends Assert {
+
+	private static Set<String> methodsToIgnore = new HashSet<String>(Arrays.asList(
+		// prevent infinite recursion
+		"getParent", 
+		"getTranslationUnit",
+		"getLastName",
+		// original is usually frozen but copy must not be
+		"isFrozen", 
+		// these methods are problematic
+		"getChildren",
+		"getProblem",
+		"getContainingFilename",
+		// ignore preprocessor nodes
+		"getMacroDefinitions",
+		"getBuiltinMacroDefinitions",
+		"getIncludeDirectives",
+		"getAllPreprocessorStatements",
+		"getMacroExpansions",
+		"getPreprocessorProblems",
+		"getComments",
+		// avoid name resolution
+		"isDeclaration",
+		"isDefinition",
+		"isReference",
+		"isAssociatedWithLastName",
+		"getNestingLevel",
+		"getImplicitNames"
+	));
+
+	
+	public static void assertCopy(IASTNode node1, IASTNode node2) {
+		try {
+			assertCopy(node1, node2, 0);
+		} catch(Exception e) {
+			throw new RuntimeException(e);
+		}
+	}
+	
+	
+	private static void assertCopy(IASTNode node1, IASTNode node2, int n) throws Exception {
+		if(node1 == null && node2 == null)
+			return;
+		assertNotNull(node1);
+		assertNotNull(node2);
+		assertFalse(node1 == node2); // must be distinct copy
+
+		Class klass1 = node1.getClass();
+		Class klass2 = node2.getClass();
+		assertTrue(klass1.equals(klass2)); // nodes must be the same concrete type
+		//System.out.println(spaces(n) + klass1.getSimpleName());
+		
+		BeanInfo beanInfo = Introspector.getBeanInfo(klass1);
+		
+		for(PropertyDescriptor property : beanInfo.getPropertyDescriptors()) {
+			Method getter = property.getReadMethod();
+			if(getter == null)
+				continue;
+			if(methodsToIgnore.contains(getter.getName()))
+				continue;
+
+			try {
+				Class returnType = getter.getReturnType();
+				
+				if(IASTNode.class.isAssignableFrom(returnType)) {
+					//System.out.println(spaces(n) + "Testing1: " + getter.getName());
+					IASTNode result1 = (IASTNode) getter.invoke(node1);
+					IASTNode result2 = (IASTNode) getter.invoke(node2);
+					assertCopy(result1, result2, n+1); // members must be same
+				}
+				else if(returnType.isArray() && IASTNode.class.isAssignableFrom(returnType.getComponentType())) {
+					//System.out.println(spaces(n) + "Testing2: " + getter.getName());
+					IASTNode[] result1 = (IASTNode[]) getter.invoke(node1);
+					IASTNode[] result2 = (IASTNode[]) getter.invoke(node2);
+					if(result1 == null && result2 == null)
+						continue;
+					assertNotNull(result1);
+					assertNotNull(result2);
+					assertEquals(result1.length, result2.length);
+					for(int i = 0; i < result1.length; i++)
+						assertCopy(result1[i], result2[i], n+1);
+				}
+				else if((returnType.isPrimitive() || returnType.equals(String.class)) && !returnType.equals(Void.class)) {
+					//System.out.println(spaces(n) + "Testing3: " + getter.getName());
+					Object result1 = getter.invoke(node1);
+					Object result2 = getter.invoke(node2);
+					assertEquals(result1, result2);
+				}
+				
+			} catch(AssertionFailedError e) {
+				System.out.printf("Failure when calling %s.%s() @(%d,%d)\n",
+						node1.getClass().getSimpleName(),
+						getter.getName(),
+						((ASTNode)node1).getOffset(),
+						((ASTNode)node1).getLength());
+				throw e;
+			}				
+		}
+		
+	}
+	
+
+//	private static String spaces(int n) {
+//		char[] spaces = new char[n*2];
+//		Arrays.fill(spaces, ' ');
+//		return new String(spaces);
+//	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ArrayUtilsTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ArrayUtilsTest.java
new file mode 100644
index 0000000..707785b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ArrayUtilsTest.java
@@ -0,0 +1,233 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.core.parser.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.parser.util.ArrayUtil;
+
+public class ArrayUtilsTest extends TestCase {
+	private Object o1= new Object();
+	private Object o2= new Object();
+	private Object o3= new Object();
+	private Object o4= new Object();
+	
+	public void testAppend() {
+		Object[] array= null;
+		array= ArrayUtil.append(array, o1);
+		array= ArrayUtil.append(array, o2);
+		array= ArrayUtil.append(array, o3);
+		assertEquals(o1, array[0]);
+		assertEquals(o2, array[1]);
+		assertEquals(o3, array[2]);
+
+		array= ArrayUtil.append(Object.class, null, 0, o1);
+		array= ArrayUtil.append(Object.class, array, 1, o2);
+		array= ArrayUtil.append(Object.class, array, 2, o3);
+		assertEquals(o1, array[0]);
+		assertEquals(o2, array[1]);
+		assertEquals(o3, array[2]);
+	}
+
+	public void testPrepend() {
+		Object[] array= null;
+		array= ArrayUtil.prepend(Object.class, array, o1);
+		array= ArrayUtil.prepend(Object.class, array, o2);
+		array= ArrayUtil.prepend(Object.class, array, o3);
+		assertEquals(o3, array[0]);
+		assertEquals(o2, array[1]);
+		assertEquals(o1, array[2]);
+	}
+
+	public void testTrim() {
+		Object[] array= new Object[] {null, null};
+		array= ArrayUtil.trim(Object.class, array);
+		assertEquals(0, array.length);
+
+		array= new Object[] {o1, null};
+		array= ArrayUtil.trim(Object.class, array);
+		assertEquals(1, array.length);
+		assertEquals(o1, array[0]);
+
+		array= new Object[] {o1, o2};
+		Object[] array2= ArrayUtil.trim(Object.class, array);
+		assertEquals(2, array2.length);
+		assertSame(o1, array2[0]);
+		assertSame(o2, array2[1]);
+		assertSame(array, array2);
+
+		array= new Object[] {null, null};
+		array= ArrayUtil.trim(Object.class, array, true);
+		assertEquals(0, array.length);
+
+		array= new Object[] {o1, null};
+		array= ArrayUtil.trim(Object.class, array, true);
+		assertEquals(1, array.length);
+		assertEquals(o1, array[0]);
+		
+		array= new Object[] {o1, o2};
+		array2= ArrayUtil.trim(Object.class, array, true);
+		assertEquals(2, array2.length);
+		assertSame(o1, array2[0]);
+		assertSame(o2, array2[1]);
+		assertNotSame(array, array2);
+	}
+
+	public void testAddAll() {
+		Object[] array1= {o1, o2, null};
+		Object[] array2= {o3, null};
+		Object[] result;
+		
+		result= ArrayUtil.addAll(Object.class, array2, array1); 
+		assertEquals(o3, result[0]);
+		assertEquals(o1, result[1]);
+		assertEquals(o2, result[2]);
+		
+		result= ArrayUtil.addAll(Object.class, array1, array2);
+		assertEquals(o1, result[0]);
+		assertEquals(o2, result[1]);
+		assertEquals(o3, result[2]);
+		assertSame(array1, result);
+		
+		array1= new Object[] {o1, o2};
+		array2= new Object[] {o3, null};
+		
+		result= ArrayUtil.addAll(Object.class, array2, array1); 
+		assertEquals(o3, result[0]);
+		assertEquals(o1, result[1]);
+		assertEquals(o2, result[2]);
+		
+		result= ArrayUtil.addAll(Object.class, array1, array2);
+		assertEquals(o1, result[0]);
+		assertEquals(o2, result[1]);
+		assertEquals(o3, result[2]);
+
+		array1= new Object[] {o1, o2};
+		array2= new Object[] {o3};
+		
+		result= ArrayUtil.addAll(Object.class, array2, array1); 
+		assertEquals(o3, result[0]);
+		assertEquals(o1, result[1]);
+		assertEquals(o2, result[2]);
+		
+		result= ArrayUtil.addAll(Object.class, array1, array2);
+		assertEquals(o1, result[0]);
+		assertEquals(o2, result[1]);
+		assertEquals(o3, result[2]);
+		
+		array1= new Object[] {o1, o2};
+		array2= new Object[] {};
+		result= ArrayUtil.addAll(Object.class, array2, array1);
+		assertEquals(o1, result[0]);
+		assertEquals(o2, result[1]);
+		assertNotSame(array1, result);
+
+		result= ArrayUtil.addAll(Object.class, array1, array2);
+		assertEquals(o1, result[0]);
+		assertEquals(o2, result[1]);
+		assertSame(array1, result);
+	}
+	
+	public void testRemove() {
+		Object[] array= new Object[] {o1, o2, o3, o4, null};
+		ArrayUtil.remove(array, o3);
+		assertSame(o1, array[0]);
+		assertSame(o2, array[1]);
+		assertSame(o4, array[2]);
+		assertNull(array[3]);
+
+		ArrayUtil.remove(array, o1);
+		assertSame(o2, array[0]);
+		assertSame(o4, array[1]);
+		assertNull(array[2]);
+
+		ArrayUtil.remove(array, o4);
+		assertSame(o2, array[0]);
+		assertNull(array[1]);
+
+		ArrayUtil.remove(array, o2);
+		assertNull(array[0]);
+
+		array= new Object[] {o1, o2, o3, o4};
+		ArrayUtil.remove(array, o3);
+		assertSame(o1, array[0]);
+		assertSame(o2, array[1]);
+		assertSame(o4, array[2]);
+		assertNull(array[3]);
+
+		ArrayUtil.remove(array, o1);
+		assertSame(o2, array[0]);
+		assertSame(o4, array[1]);
+		assertNull(array[2]);
+
+		ArrayUtil.remove(array, o4);
+		assertSame(o2, array[0]);
+		assertNull(array[1]);
+
+		ArrayUtil.remove(array, o2);
+		assertNull(array[0]);
+	}
+	
+	public void testRemoveNulls() {
+		Object[] array= new Object[0];
+		Object[] result;
+		
+		result= ArrayUtil.removeNulls(Object.class, array);
+		assertEquals(0, result.length);
+		assertSame(result, array);
+		
+		array= new Object[]{null};
+		result= ArrayUtil.removeNulls(Object.class, array);
+		assertEquals(0, result.length);
+
+		array= new Object[]{o1};
+		result= ArrayUtil.removeNulls(Object.class, array);
+		assertEquals(1, result.length);
+		assertSame(result[0], o1);
+		assertSame(result, array);
+
+		array= new Object[]{o1, null};
+		result= ArrayUtil.removeNulls(Object.class, array);
+		assertEquals(1, result.length);
+		assertSame(result[0], o1);
+
+		array= new Object[]{null, o1};
+		result= ArrayUtil.removeNulls(Object.class, array);
+		assertEquals(1, result.length);
+		assertSame(result[0], o1);
+
+		array= new Object[]{o1, o2};
+		result= ArrayUtil.removeNulls(Object.class, array);
+		assertEquals(2, result.length);
+		assertSame(result[0], o1);
+		assertSame(result[1], o2);
+		assertSame(result, array);
+
+		array= new Object[]{null, o1, o2};
+		result= ArrayUtil.removeNulls(Object.class, array);
+		assertEquals(2, result.length);
+		assertSame(result[0], o1);
+		assertSame(result[1], o2);
+
+		array= new Object[]{o1, null, o2};
+		result= ArrayUtil.removeNulls(Object.class, array);
+		assertEquals(2, result.length);
+		assertSame(result[0], o1);
+		assertSame(result[1], o2);
+
+		array= new Object[]{o1, o2, null};
+		result= ArrayUtil.removeNulls(Object.class, array);
+		assertEquals(2, result.length);
+		assertSame(result[0], o1);
+		assertSame(result[1], o2);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/AutomatedFramework.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/AutomatedFramework.java
new file mode 100644
index 0000000..a140453
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/AutomatedFramework.java
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * Copyright (c) 2001, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corp. - Rational Software - initial implementation
+ *******************************************************************************/
+ 
+package org.eclipse.cdt.core.parser.tests;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FilenameFilter;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Properties;
+import java.util.Set;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * @author aniefer
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public abstract class AutomatedFramework extends TestCase {
+
+	public AutomatedFramework() {
+		super();
+	}
+
+	public AutomatedFramework(String name) {
+		super(name);
+	}
+
+	protected abstract AutomatedFramework newTest( String name );
+	protected abstract void loadProperties() throws Exception;
+	public	  abstract void doFile() throws Throwable;
+
+	private void fillSuite( TestSuite suite, File path ){
+		File files[] = null;
+		if( path.isFile() ){
+			files = new File[ 1 ];
+			files[0] = path;
+		}
+		else
+			files = path.listFiles();
+	
+		File file = null;
+		String filePath = null;
+		int i = 0;
+		try{
+			file = files[ i++ ];
+			while( file != null )
+			{
+				if( file.isDirectory() )
+					fillSuite( suite, file );
+				else if( file.isFile() && nameFilter.accept( file.getParentFile(), file.getName() ) ){
+					try{
+						filePath = file.getCanonicalPath();
+					} catch ( Exception e ){
+						continue;
+					}
+					
+					if(	filePath.endsWith(".cpp") || filePath.endsWith(".hpp") ||  //$NON-NLS-1$ //$NON-NLS-2$
+						filePath.endsWith(".cc") || filePath.endsWith(".CC") || //$NON-NLS-1$ //$NON-NLS-2$
+						filePath.endsWith(".C") || //$NON-NLS-1$
+						filePath.endsWith(".hxx") || filePath.endsWith(".hh") ) //$NON-NLS-1$ //$NON-NLS-2$
+					{
+						AutomatedFramework.natures.put( filePath, "cpp" ); //$NON-NLS-1$
+					} else if( filePath.endsWith(".c") ){  //$NON-NLS-1$
+						AutomatedFramework.natures.put( filePath, "c" ); //$NON-NLS-1$
+					} else {
+						AutomatedFramework.natures.put( filePath, AutomatedFramework.defaultNature );
+					}
+					
+					AutomatedFramework.fileList.add( file );
+					suite.addTest( newTest( file.getName().replace(',', '_') ) );
+				}				
+				file = files[ i++ ];
+			}
+		} catch( ArrayIndexOutOfBoundsException e ){
+			//done
+		}
+	}
+
+	public void reportFailed() {
+		fail( "Unable to open " + outputFile + "for output of results." ); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void propertiesFailed() {
+		fail( "Unable to load properties file." ); //$NON-NLS-1$
+	}
+	
+	protected void runTest() throws Throwable {
+		String name = getName();
+		
+		if( name.equals("propertiesFailed") ) //$NON-NLS-1$
+			propertiesFailed();
+		else if ( name.equals("reportFailed") ) //$NON-NLS-1$
+			reportFailed();
+		else
+			doFile();
+	}
+
+	public Test createSuite() {
+		TestSuite suite = new TestSuite();
+		
+		try{
+			loadProperties();
+		} catch( Exception e ){
+			suite.addTest( newTest( "propertiesFailed") ); //$NON-NLS-1$
+		}
+		
+		if( outputFile != null && !outputFile.equals("") ){ //$NON-NLS-1$
+			try{
+				
+				File output = new File( outputFile );
+				
+				if( output.exists() ){
+					output.delete();
+				}
+				
+				output.createNewFile();
+			
+				report = new FileOutputStream( output );
+			
+			} catch( Exception e ) {
+				suite.addTest( newTest( "reportFailed" ) ); //$NON-NLS-1$
+			}
+		}
+		
+		Set keys = testSources.keySet();
+		Iterator iter = keys.iterator();
+		int size = keys.size();
+		String item = null;
+		for( int i = size; i > 0; i-- )
+		{
+			item = (String) iter.next();
+			File file = new File( item );
+			if( file.exists() ){
+				defaultNature = (String) testSources.get( item );
+				fillSuite( suite, file );		
+			}
+		}
+	
+		return suite;
+	}
+
+	protected static Properties properties = new Properties();
+	protected static String defaultNature;
+	protected static String outputFile = null;
+	protected static HashMap testSources = new HashMap();
+	protected static HashMap natures = new HashMap();
+	protected static LinkedList fileList = new LinkedList();
+	private static FilenameFilter nameFilter = new Filter();
+	protected static FileOutputStream report = null;
+	
+	static private class Filter implements FilenameFilter
+	{
+		public boolean accept(File dir, String name) {
+			if( name.endsWith(".cpp") 	||  //$NON-NLS-1$
+				name.endsWith(".c") 	||  //$NON-NLS-1$
+				name.endsWith(".cc") 	|| //$NON-NLS-1$
+				name.endsWith(".CC") 	|| //$NON-NLS-1$
+				name.endsWith(".C") 	||  //$NON-NLS-1$
+				name.endsWith(".h") 	|| //$NON-NLS-1$
+				name.endsWith(".hh")	|| //$NON-NLS-1$
+				name.endsWith(".hpp")	|| //$NON-NLS-1$
+				name.endsWith(".hxx")) //$NON-NLS-1$
+			{
+				return true;
+			}
+			else
+				return false;
+		}
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CharArrayUtilsTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CharArrayUtilsTest.java
new file mode 100644
index 0000000..282e538
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CharArrayUtilsTest.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.parser.util.CharArrayObjectMap;
+import org.eclipse.cdt.core.parser.util.CharArrayUtils;
+
+/**
+ * @author Doug Schaefer
+ */
+public class CharArrayUtilsTest extends TestCase {
+
+	public void testMapAdd() {
+		CharArrayObjectMap map = new CharArrayObjectMap(4);
+		char[] key1 = "key1".toCharArray();
+		Object value1 = new Integer(43);
+		map.put(key1, value1);
+		
+		char[] key2 = "key1".toCharArray();
+		Object value2 = map.get(key2);
+		assertEquals(value1, value2);
+		
+		for (int i = 0; i < 5; ++i) {
+			map.put(("ikey" + i).toCharArray(), new Integer(i));
+		}
+		
+		Object ivalue1 = map.get("ikey1".toCharArray());
+		assertEquals(ivalue1, new Integer(1));
+		
+		Object ivalue4 = map.get("ikey4".toCharArray());
+		assertEquals(ivalue4, new Integer(4));
+	}
+	
+	public void testEquals_Bug289852() {
+		assertTrue(CharArrayUtils.equals("pre_abc".toCharArray(), 4, 3, "abc".toCharArray(), false));
+		assertFalse(CharArrayUtils.equals("pre_abc".toCharArray(), 4, 4, "abcd".toCharArray(), false));
+		assertTrue(CharArrayUtils.equals("pre_abc".toCharArray(), 4, 2, "ab".toCharArray(), false));
+		
+		assertTrue(CharArrayUtils.equals("pre_abc".toCharArray(), 4, 3, "ABC".toCharArray(), true));
+		assertFalse(CharArrayUtils.equals("pre_abc".toCharArray(), 4, 4, "abcd".toCharArray(), true));
+		assertTrue(CharArrayUtils.equals("pre_abc".toCharArray(), 4, 2, "AB".toCharArray(), true));
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/FileBasePluginTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/FileBasePluginTest.java
new file mode 100644
index 0000000..68aef63
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/FileBasePluginTest.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/*
+ * Created on Sept 28, 2004
+ */
+package org.eclipse.cdt.core.parser.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.FileManager;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * @author dsteffle
+ */
+public class FileBasePluginTest extends TestCase {
+    static NullProgressMonitor		monitor;
+    static IWorkspace 				workspace;
+    static IProject 				project;
+    static FileManager 				fileManager;
+    static int						numProjects = 0;
+    static Class					className;
+	static ICProject cPrj;
+
+    public FileBasePluginTest() {
+	}
+
+	public FileBasePluginTest(String name) {
+		super(name);
+	}
+
+	private void initialize(Class aClassName){
+        if( CCorePlugin.getDefault() != null && CCorePlugin.getDefault().getCoreModel() != null){
+			//(CCorePlugin.getDefault().getCoreModel().getIndexManager()).reset();
+			monitor = new NullProgressMonitor();
+			
+			workspace = ResourcesPlugin.getWorkspace();
+			
+	        try {
+	        	cPrj = CProjectHelper.createCCProject("ParserTestProject", "bin", IPDOMManager.ID_NO_INDEXER); //$NON-NLS-1$ //$NON-NLS-2$
+	            project = cPrj.getProject();
+	            
+	            // ugly
+	            if (className == null || !className.equals(aClassName)) {
+	            	className = aClassName;
+	            	numProjects++;
+	            }
+	        } catch ( CoreException e ) {
+	            /*boo*/
+	        }
+			if (project == null)
+				throw new NullPointerException("Unable to create project"); //$NON-NLS-1$
+	
+			//Create file manager
+			fileManager = new FileManager();
+        }
+    }
+
+    public FileBasePluginTest(String name, Class className)
+    {
+    	super(name);
+    	initialize(className);
+    }
+    
+    public void cleanupProject() throws Exception {
+    	numProjects--;
+    	
+    	try{
+    		if (numProjects == 0) {
+    			project.delete( true, false, monitor );
+    			project = null;
+    		}
+	    } catch( Throwable e ){
+	        /*boo*/
+	    }
+    }
+
+    protected void tearDown() throws Exception {
+        if( project == null || !project.exists() )
+            return;
+        
+        IResource [] members = project.members();
+        for( int i = 0; i < members.length; i++ ){
+            if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
+                continue;
+            if (members[i].getName().equals(".settings"))
+            	continue;
+            try{
+                members[i].delete( false, monitor );
+            } catch( Throwable e ){
+                /*boo*/
+            }
+        }
+	}
+
+    // below can be used to work with large files (too large for memory)
+//    protected IFile importFile(String fileName) throws Exception {
+//		IFile file = cPrj.getProject().getFile(fileName);
+//		if (!file.exists()) {
+//			try{
+//				FileInputStream fileIn = new FileInputStream(
+//						CTestPlugin.getDefault().getFileInPlugin(new Path("resources/parser/" + fileName)));
+//				file.create(fileIn,false, monitor);
+//			} catch (CoreException e) {
+//				e.printStackTrace();
+//			} catch (FileNotFoundException e) {
+//				e.printStackTrace();
+//			}
+//		}
+//
+//		return file;
+//    }
+    
+    protected IFolder importFolder(String folderName) throws Exception {
+    	IFolder folder = project.getProject().getFolder(folderName);
+		
+		//Create file input stream
+		if( !folder.exists() )
+			folder.create( false, false, monitor );
+		
+		return folder;
+    }
+    public IFile importFile(String fileName, String contents ) throws Exception{
+		//Obtain file handle
+		IFile file = project.getProject().getFile(fileName);
+		
+		InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+		//Create file input stream
+		if( file.exists() )
+		    file.setContents( stream, false, false, monitor );
+		else
+			file.create( stream, false, monitor );
+		
+		fileManager.addFile(file);
+		
+		return file;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ObjectMapTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ObjectMapTest.java
new file mode 100644
index 0000000..7682926
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ObjectMapTest.java
@@ -0,0 +1,162 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/*
+ * Created on Jul 19, 2004
+ */
+package org.eclipse.cdt.core.parser.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.parser.util.CharArrayUtils;
+import org.eclipse.cdt.core.parser.util.ObjectMap;
+
+/**
+ * @author aniefer
+ */
+public class ObjectMapTest extends TestCase {
+
+    static public class HashObject{
+        HashObject( int h ){
+            hash = h;
+        }
+        public int hashCode(){
+            return hash;
+        }
+        final public int hash;
+    }
+
+    public void insertContents( ObjectMap map, Object[][] contents ) throws Exception {
+        for( int i = 0; i < contents.length; i++ )
+            map.put( contents[i][0], contents[i][1] );
+    }
+    
+    public void assertContents( ObjectMap map, Object[][] contents ) throws Exception {
+        for( int i = 0; i < contents.length; i++ ){
+            assertEquals( map.keyAt(i), contents[i][0] );
+            assertEquals( map.getAt(i), contents[i][1] );
+            assertEquals( map.get(contents[i][0]), contents[i][1] );
+        }
+        assertEquals( map.size(), contents.length );
+    }
+    
+    public void testSimpleAdd() throws Exception{
+        ObjectMap map = new ObjectMap( 2 );
+    
+        Object [][] contents = new Object[][] { {"1", "ob" } };  //$NON-NLS-1$//$NON-NLS-2$
+
+        insertContents( map, contents );
+        assertContents( map, contents );
+        
+        assertEquals( map.size(), 1 );
+        assertEquals( map.capacity(), 2 );
+    }
+    
+    public void testSimpleCollision() throws Exception{
+        ObjectMap map = new ObjectMap( 2 );
+        
+        HashObject key1 = new HashObject( 1 );
+        HashObject key2 = new HashObject( 1 );
+        
+        Object [][] contents = new Object[][] { {key1, "1" }, //$NON-NLS-1$
+                								{key2, "2" } };   //$NON-NLS-1$
+        
+        insertContents( map, contents );
+        
+        assertEquals( map.size(), 2 );
+        assertEquals( map.capacity(), 2 );
+
+        assertContents( map, contents );
+    }
+    
+    public void testResize() throws Exception{
+        ObjectMap map = new ObjectMap( 1 );
+        
+        assertEquals( map.size(), 0 );
+        assertEquals( map.capacity(), 2 );
+        
+        Object [][] res = new Object [][] { { "0", "o0" },  //$NON-NLS-1$//$NON-NLS-2$
+							                { "1", "o1" },  //$NON-NLS-1$//$NON-NLS-2$
+							                { "2", "o2" },  //$NON-NLS-1$//$NON-NLS-2$
+							                { "3", "o3" },  //$NON-NLS-1$//$NON-NLS-2$
+							                { "4", "o4" } };  //$NON-NLS-1$//$NON-NLS-2$
+        
+        insertContents( map, res );
+        assertEquals( map.capacity(), 8 );
+        assertContents( map, res );
+    }
+    
+    public void testCollisionResize() throws Exception{
+        ObjectMap map = new ObjectMap( 1 );
+        
+        assertEquals( map.size(), 0 );
+        assertEquals( map.capacity(), 2 );
+        
+        Object [][] res = new Object [][] { { new HashObject(0), "o0" },  //$NON-NLS-1$
+							                { new HashObject(1), "o1" },  //$NON-NLS-1$
+							                { new HashObject(0), "o2" },  //$NON-NLS-1$
+							                { new HashObject(1), "o3" },  //$NON-NLS-1$
+							                { new HashObject(0), "o4" } };  //$NON-NLS-1$
+        
+        insertContents( map, res );
+        assertEquals( map.capacity(), 8 );
+        assertContents( map, res );
+    }
+    
+    public void testReAdd() throws Exception{
+        ObjectMap map = new ObjectMap( 1 );
+        
+        assertEquals( map.size(), 0 );
+        assertEquals( map.capacity(), 2 );
+        
+        Object [][] res = new Object [][] { { "0", "o0" },  //$NON-NLS-1$ //$NON-NLS-2$
+							                { "1", "o1" } };  //$NON-NLS-1$ //$NON-NLS-2$
+							                
+        insertContents( map, res );
+        assertEquals( map.capacity(), 2 );
+        assertContents( map, res );
+        
+        res = new Object [][]{ { "0",  "o00" },  //$NON-NLS-1$ //$NON-NLS-2$
+                			   { "1",  "o01" },  //$NON-NLS-1$ //$NON-NLS-2$
+                			   { "10", "o10" },  //$NON-NLS-1$ //$NON-NLS-2$
+        					   { "11", "o11" } };  //$NON-NLS-1$ //$NON-NLS-2$
+        
+        insertContents( map, res );
+        assertContents( map, res );
+    }
+    
+    public void testResizeResolvesCollision() throws Exception{
+        ObjectMap map = new ObjectMap( 2 );
+        
+        Object k1 = new HashObject( 0 );
+        Object k2 = new HashObject( 1 );
+        Object k3 = new HashObject( 4 );	//collision with 0 in a table capacity 2, but ok in table capacity 4
+        
+        Object [][] con = new Object[][] { { k1, "1" },  //$NON-NLS-1$
+                						   { k2, "2" }, //$NON-NLS-1$
+                						   { k3, "3" } } ; //$NON-NLS-1$
+        
+        insertContents( map, con );
+        assertContents( map, con );
+    }
+    
+    public void testCharArrayUtils() throws Exception{
+        char [] buffer = "A::B::C".toCharArray(); //$NON-NLS-1$
+        
+        assertEquals( CharArrayUtils.lastIndexOf( "::".toCharArray(), buffer ), 4 ); //$NON-NLS-1$
+        assertTrue( CharArrayUtils.equals( CharArrayUtils.lastSegment( buffer, "::".toCharArray()), "C".toCharArray() ) ); //$NON-NLS-1$ //$NON-NLS-2$
+        
+        buffer = "A::B::C:foo".toCharArray(); //$NON-NLS-1$
+        assertEquals( CharArrayUtils.lastIndexOf( "::".toCharArray(), buffer ), 4 ); //$NON-NLS-1$
+        assertTrue( CharArrayUtils.equals( CharArrayUtils.lastSegment( buffer, "::".toCharArray()), "C:foo".toCharArray() ) ); //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ParserTestSuite.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ParserTestSuite.java
new file mode 100644
index 0000000..654a677
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ParserTestSuite.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.tests.CModelElementsTests;
+import org.eclipse.cdt.core.model.tests.StructuralCModelElementsTests;
+import org.eclipse.cdt.core.parser.tests.ast2.DOMGCCParserExtensionTestSuite;
+import org.eclipse.cdt.core.parser.tests.ast2.DOMParserTestSuite;
+import org.eclipse.cdt.core.parser.tests.ast2.SemanticsTests;
+import org.eclipse.cdt.core.parser.tests.scanner.ScannerTestSuite;
+
+/**
+ * Combines all tests for the parsers.
+ */
+public class ParserTestSuite extends TestCase {
+	public static Test suite() {
+		TestSuite suite= new TestSuite(ParserTestSuite.class.getName());
+		suite.addTestSuite(ArrayUtilsTest.class);
+		suite.addTestSuite(CharArrayUtilsTest.class);
+		suite.addTestSuite(CModelElementsTests.class);
+		suite.addTestSuite(StructuralCModelElementsTests.class);
+		suite.addTestSuite(ObjectMapTest.class);
+		suite.addTestSuite(SemanticsTests.class);
+		suite.addTest(ScannerTestSuite.suite());
+		suite.addTest(DOMParserTestSuite.suite());
+		suite.addTest(DOMGCCParserExtensionTestSuite.suite());
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/XMLDumper.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/XMLDumper.java
new file mode 100644
index 0000000..f00067a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/XMLDumper.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests;
+
+import java.io.StringWriter;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.HashMap;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * This class implements a utility that will walk through an object
+ * and it's children and create an XML file for it.
+ */
+public class XMLDumper {
+
+	public static class Test {
+		private String msg = "hi"; //$NON-NLS-1$
+		
+		public String getMsg() {
+			return msg;
+		}
+		
+		public Test self = this;
+	}
+	
+	public static void main(String [] args) {
+		Test test = new Test();
+		try {
+			XMLDumper dumper = new XMLDumper(test);
+			Document document = dumper.getDocument();
+			StringWriter writer = new StringWriter();
+		
+			Transformer transformer = TransformerFactory.newInstance().newTransformer();
+			transformer.transform(new DOMSource(document), new StreamResult(writer));
+
+			System.out.println( "STRXML = " + writer.toString() ); //Spit out DOM as a String //$NON-NLS-1$
+		} catch (TransformerException e) {
+			e.printStackTrace();
+		} catch (ParserConfigurationException e) {
+			e.printStackTrace();
+		}
+
+	}
+	
+	private int id = 0;
+	private HashMap map = new HashMap();
+	private Document document;
+	
+	public Document getDocument() {
+		return document;
+	}
+	
+	public XMLDumper(Object obj) throws ParserConfigurationException {
+		document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+		document.appendChild(createObject(obj));
+	}
+	
+	private Element createObject(Object obj) {
+		Class cls = obj.getClass();
+		String clsName = cls.getName();
+		clsName = clsName.replace('$', '.');
+		
+		Element element = document.createElement(clsName);
+		map.put(obj, new Integer(id));
+		element.setAttribute("id",String.valueOf(id++)); //$NON-NLS-1$
+		
+		Field [] fields = cls.getDeclaredFields();
+		for (int i = 0; i < fields.length; ++i) {
+			Field field = fields[i];
+			int modifiers = field.getModifiers();
+			
+			// Skip over static fields
+			if (Modifier.isStatic(modifiers))
+				continue;
+			
+			// Skip fields that start with an underscore
+			if (field.getName().charAt(0) == '_')
+				continue;
+			
+			Object value = null;
+			
+			String fieldName = field.getName();
+			if (Modifier.isPublic(modifiers)) {
+				try {
+					value = field.get(obj);
+				} catch (Exception e) {
+					value = e;
+				}
+			} else {
+				String methodName = "get" + //$NON-NLS-1$
+					fieldName.substring(0, 1).toUpperCase() +
+					fieldName.substring(1);
+				
+				Method method = null;
+				try {
+					method = cls.getMethod(methodName, (Class []) null);
+				} catch (NoSuchMethodException e) {
+					continue;
+				}
+				
+				try {
+					value = method.invoke(obj, (Object []) null);
+				} catch (Exception e) {
+					value = e;
+				}
+			}
+			
+			Element fieldElement = document.createElement(fieldName);
+			element.appendChild(fieldElement);
+			
+			if (value == null)
+				return element;
+				
+			Class type = field.getType();
+			if (String.class.isAssignableFrom(type))
+				fieldElement.appendChild(document.createTextNode((String)value));
+			else if (Integer.class.isAssignableFrom(type))
+				fieldElement.appendChild(document.createTextNode(((Integer)value).toString()));
+			else if (Exception.class.isAssignableFrom(type))
+				fieldElement.appendChild(document.createTextNode(value.toString()));
+			else {
+				Object v = map.get(value);
+				if (v != null)
+					fieldElement.setAttribute("refid", v.toString()); //$NON-NLS-1$
+				else
+					fieldElement.appendChild(createObject(value));
+			}
+		
+		}
+		
+		return element;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2BaseTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2BaseTest.java
new file mode 100644
index 0000000..833dede
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2BaseTest.java
@@ -0,0 +1,700 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *     Andrew Ferguson (Symbian)
+ *     Mike Kucera (IBM)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import junit.framework.AssertionFailedError;
+
+import org.eclipse.cdt.core.dom.ast.ASTSignatureUtil;
+import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
+import org.eclipse.cdt.core.dom.ast.IASTCastExpression;
+import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
+import org.eclipse.cdt.core.dom.ast.IASTConditionalExpression;
+import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionStatement;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTImplicitName;
+import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTNodeSelector;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IField;
+import org.eclipse.cdt.core.dom.ast.IFunctionType;
+import org.eclipse.cdt.core.dom.ast.IProblemBinding;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.c.CASTVisitor;
+import org.eclipse.cdt.core.dom.ast.c.ICASTTypeIdInitializerExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLinkageSpecification;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition;
+import org.eclipse.cdt.core.dom.parser.IScannerExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.ANSICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.GCCParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.GCCScannerExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.ICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ANSICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.GPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.GPPScannerExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.IParserLogService;
+import org.eclipse.cdt.core.parser.IScanner;
+import org.eclipse.cdt.core.parser.IScannerInfo;
+import org.eclipse.cdt.core.parser.NullLogService;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.ParserMode;
+import org.eclipse.cdt.core.parser.ScannerInfo;
+import org.eclipse.cdt.core.parser.tests.ASTComparer;
+import org.eclipse.cdt.core.parser.tests.scanner.FileCodeReaderFactory;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+import org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser;
+import org.eclipse.cdt.internal.core.dom.parser.c.CVisitor;
+import org.eclipse.cdt.internal.core.dom.parser.c.GNUCSourceParser;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+import org.eclipse.cdt.internal.core.parser.scanner.CPreprocessor;
+
+/**
+ * @author aniefer
+ */
+public class AST2BaseTest extends BaseTestCase {
+    protected static final IParserLogService NULL_LOG = new NullLogService();
+	protected static boolean sValidateCopy;
+
+    public AST2BaseTest() {
+    	super();
+    }
+    
+    public AST2BaseTest(String name) {
+    	super(name);
+    }
+    
+    @Override
+	protected void setUp() throws Exception {
+    	sValidateCopy= true;
+		super.setUp();
+	}
+
+	protected IASTTranslationUnit parse(String code, ParserLanguage lang) throws ParserException {
+    	return parse(code, lang, false, true);
+    }
+    
+    protected IASTTranslationUnit parse(String code, ParserLanguage lang, boolean useGNUExtensions) throws ParserException {
+    	return parse(code, lang, useGNUExtensions, true);
+    }
+
+    /**
+     * @param string
+     * @param c
+     * @return
+     * @throws ParserException
+     */
+    protected IASTTranslationUnit parse(String code, ParserLanguage lang, boolean useGNUExtensions,
+    		boolean expectNoProblems) throws ParserException {
+    	return parse(code, lang, useGNUExtensions, expectNoProblems, false);
+    }
+    
+    protected IASTTranslationUnit parse(String code, ParserLanguage lang, boolean useGNUExtensions,
+    		boolean expectNoProblems, boolean skipTrivialInitializers) throws ParserException {
+        IScanner scanner = createScanner(new CodeReader(code.toCharArray()), lang, ParserMode.COMPLETE_PARSE, 
+        		new ScannerInfo());
+        configureScanner(scanner);
+        AbstractGNUSourceCodeParser parser = null;
+        if (lang == ParserLanguage.CPP) {
+            ICPPParserExtensionConfiguration config = null;
+            if (useGNUExtensions)
+            	config = new GPPParserExtensionConfiguration();
+            else
+            	config = new ANSICPPParserExtensionConfiguration();
+            parser = new GNUCPPSourceParser(scanner, ParserMode.COMPLETE_PARSE, NULL_LOG,config, null);
+        } else {
+            ICParserExtensionConfiguration config = null;
+
+            if (useGNUExtensions)
+            	config = new GCCParserExtensionConfiguration();
+            else
+            	config = new ANSICParserExtensionConfiguration();
+            
+            parser = new GNUCSourceParser(scanner, ParserMode.COMPLETE_PARSE, NULL_LOG, config, null);
+        }
+        if (skipTrivialInitializers)
+        	parser.setSkipTrivialExpressionsInAggregateInitializers(true);
+        
+        IASTTranslationUnit tu = parser.parse();
+        assertTrue(tu.isFrozen());
+        if (sValidateCopy)
+        	validateCopy(tu);
+
+        if (parser.encounteredError() && expectNoProblems)
+            throw new ParserException("FAILURE"); //$NON-NLS-1$
+         
+        if (lang == ParserLanguage.C && expectNoProblems) {
+        	assertEquals(CVisitor.getProblems(tu).length, 0);
+        	assertEquals(tu.getPreprocessorProblems().length, 0);
+        } else if (lang == ParserLanguage.CPP && expectNoProblems) {
+        	assertEquals(CPPVisitor.getProblems(tu).length, 0);
+        	assertEquals(0, tu.getPreprocessorProblems().length);
+        }
+        if (expectNoProblems)
+            assertEquals(0, tu.getPreprocessorProblems().length);
+        
+        return tu;
+    }
+
+	protected void configureScanner(IScanner scanner) {
+	}
+
+	public static IScanner createScanner(CodeReader codeReader, ParserLanguage lang, ParserMode mode,
+			IScannerInfo scannerInfo) {
+		IScannerExtensionConfiguration configuration = null;
+        if (lang == ParserLanguage.C)
+            configuration= GCCScannerExtensionConfiguration.getInstance();
+        else
+            configuration= GPPScannerExtensionConfiguration.getInstance();
+        IScanner scanner;
+        scanner= new CPreprocessor(codeReader, scannerInfo, lang, NULL_LOG, configuration, 
+        		FileCodeReaderFactory.getInstance());
+		return scanner;
+	}
+
+    /**
+     * @param string
+     */
+    protected void validateSimplePostfixInitializerExpressionC(String code) throws ParserException {
+        ICASTTypeIdInitializerExpression e = (ICASTTypeIdInitializerExpression) getExpressionFromStatementInCode(code, ParserLanguage.C);
+        assertNotNull(e);
+        assertNotNull(e.getTypeId());
+        assertNotNull(e.getInitializer());
+    }
+
+    /**
+     * @param string
+     * @throws ParserException
+     */
+    protected void validateSimpleUnaryTypeIdExpression(String code, int op) throws ParserException {
+        IASTCastExpression e = (IASTCastExpression) getExpressionFromStatementInCode(code, ParserLanguage.C);
+        assertNotNull(e);
+        assertEquals(e.getOperator(), op);
+        assertNotNull(e.getTypeId());
+        IASTIdExpression x = (IASTIdExpression) e.getOperand();
+        assertEquals(x.getName().toString(), "x"); //$NON-NLS-1$
+    }
+
+    /**
+     * @param code
+     * @param op
+     * @throws ParserException
+     */
+    protected void validateSimpleTypeIdExpressionC(String code, int op) throws ParserException {
+        IASTTypeIdExpression e = (IASTTypeIdExpression) getExpressionFromStatementInCode(code, ParserLanguage.C);
+        assertNotNull(e);
+        assertEquals(e.getOperator(), op);
+        assertNotNull(e.getTypeId());
+    }
+
+    /**
+     * @param string
+     * @param op_prefixIncr
+     * @throws ParserException
+     */
+    protected void validateSimpleUnaryExpressionC(String code, int operator) throws ParserException {
+        IASTUnaryExpression e = (IASTUnaryExpression) getExpressionFromStatementInCode(code, ParserLanguage.C);
+        assertNotNull(e);
+        assertEquals(e.getOperator(), operator);
+        IASTIdExpression x = (IASTIdExpression) e.getOperand();
+        assertEquals(x.getName().toString(), "x"); //$NON-NLS-1$
+    }
+
+    /**
+     * @param code 
+     * @throws ParserException
+     */
+    protected void validateConditionalExpressionC(String code) throws ParserException {
+        IASTConditionalExpression e = (IASTConditionalExpression) getExpressionFromStatementInCode(code, ParserLanguage.C);
+        assertNotNull(e);
+        IASTIdExpression x = (IASTIdExpression) e.getLogicalConditionExpression();
+        assertEquals(x.getName().toString(), "x"); //$NON-NLS-1$
+        IASTIdExpression y = (IASTIdExpression) e.getPositiveResultExpression();
+        assertEquals(y.getName().toString(), "y"); //$NON-NLS-1$
+        IASTIdExpression x2 = (IASTIdExpression) e.getNegativeResultExpression();
+        assertEquals(x.getName().toString(), x2.getName().toString());
+    }
+
+    /**
+     * @param operand
+     * @throws ParserException
+     */
+    protected void validateSimpleBinaryExpressionC(String code, int operand) throws ParserException {
+        IASTBinaryExpression e = (IASTBinaryExpression) getExpressionFromStatementInCode(code, ParserLanguage.C); 
+        assertNotNull(e);
+        assertEquals(e.getOperator(), operand);
+        IASTIdExpression x = (IASTIdExpression) e.getOperand1();
+        assertEquals(x.getName().toString(), "x"); //$NON-NLS-1$
+        IASTIdExpression y = (IASTIdExpression) e.getOperand2();
+        assertEquals(y.getName().toString(), "y"); //$NON-NLS-1$
+    }
+
+    protected IASTExpression getExpressionFromStatementInCode(String code, ParserLanguage language) throws ParserException {
+        StringBuffer buffer = new StringBuffer("void f() { "); //$NON-NLS-1$
+        buffer.append("int x, y;\n"); //$NON-NLS-1$
+        buffer.append(code);
+        buffer.append(";\n}"); //$NON-NLS-1$
+        IASTTranslationUnit tu = parse(buffer.toString(), language);
+        IASTFunctionDefinition f = (IASTFunctionDefinition) tu.getDeclarations()[0];
+        IASTCompoundStatement cs = (IASTCompoundStatement) f.getBody();
+        IASTExpressionStatement s = (IASTExpressionStatement) cs.getStatements()[1];
+        return s.getExpression();
+    }
+
+    protected <T extends IASTNode> T validateCopy(T tu) {
+		IASTNode copy = tu.copy();
+		assertFalse(copy.isFrozen());
+		ASTComparer.assertCopy(tu, copy);
+		return (T) copy;
+	}
+	
+    
+    static protected class CNameCollector extends CASTVisitor {
+        {
+            shouldVisitNames = true;
+        }
+        public List nameList = new ArrayList();
+        @Override
+		public int visit(IASTName name) {
+            nameList.add(name);
+            return PROCESS_CONTINUE;
+        }
+        public IASTName getName(int idx) {
+            if (idx < 0 || idx >= nameList.size())
+                return null;
+            return (IASTName) nameList.get(idx);
+        }
+        public int size() { return nameList.size(); } 
+    }
+
+    protected void assertInstances(CNameCollector collector, IBinding binding, int num) throws Exception {
+        int count = 0;
+        
+        if (binding == null) assertTrue(false);
+        
+        for (int i = 0; i < collector.size(); i++) {
+            if (collector.getName(i).resolveBinding() == binding)
+                count++;
+        }
+        
+        assertEquals(count, num);
+    }
+
+    static protected class CPPNameCollector extends CPPASTVisitor {
+        {
+            shouldVisitNames = true;
+        }
+        public List<IASTName> nameList = new ArrayList<IASTName>();
+        @Override
+		public int visit(IASTName name) {
+            nameList.add(name);
+            return PROCESS_CONTINUE;
+        }
+        public IASTName getName(int idx) {
+            if (idx < 0 || idx >= nameList.size())
+                return null;
+            return nameList.get(idx);
+        }
+        public int size() { return nameList.size(); }
+        
+        public void dump() {
+        	for (int i=0; i<size(); i++) {
+        		IASTName name= getName(i);
+        		String parent= name.getParent() != null ? name.getParent().getRawSignature() : "";
+        		System.out.println(i+": #"+name.getRawSignature()+"# "+parent);
+        	}
+        }
+    }
+
+    protected void assertInstances(CPPNameCollector collector, IBinding binding, int num) throws Exception {
+        int count = 0;
+        for (int i = 0; i < collector.size(); i++)
+            if (collector.getName(i).resolveBinding() == binding)
+                count++;
+        
+        assertEquals(num, count);
+    }
+
+	protected void isExpressionStringEqual(IASTExpression exp, String str) {
+		String expressionString = ASTSignatureUtil.getExpressionString(exp);
+		assertEquals(str, expressionString);
+	}
+	
+	protected void isParameterSignatureEqual(IASTDeclarator decltor, String str) {
+		assertEquals(str, ASTSignatureUtil.getParameterSignature(decltor));
+	}
+	
+	protected void isSignatureEqual(IASTDeclarator decltor, String str) {
+		assertEquals(str, ASTSignatureUtil.getSignature(decltor));
+	}
+	
+	protected void isSignatureEqual(IASTDeclSpecifier declSpec, String str) {
+		assertEquals(str, ASTSignatureUtil.getSignature(declSpec));
+	}
+	
+	protected void isSignatureEqual(IASTTypeId typeId, String str) {
+		assertEquals(str, ASTSignatureUtil.getSignature(typeId));
+	}
+	
+	protected void isTypeEqual(IASTDeclarator decltor, String str) {
+		assertEquals(str, ASTTypeUtil.getType(decltor));
+	}
+	
+	protected void isTypeEqual(IASTTypeId typeId, String str) {
+		assertEquals(str, ASTTypeUtil.getType(typeId));
+	}
+	
+	protected void isTypeEqual(IType type, String str) {
+		assertEquals(str, ASTTypeUtil.getType(type));
+	}
+	
+	protected void isParameterTypeEqual(IFunctionType fType, String str) {
+		assertEquals(str, ASTTypeUtil.getParameterTypeString(fType));
+	}
+	
+	static protected class CNameResolver extends CASTVisitor {
+		{
+			shouldVisitNames = true;
+		}
+		public int numProblemBindings=0;
+		public int numNullBindings=0;
+		public List nameList = new ArrayList();
+		@Override
+		public int visit(IASTName name) {
+			nameList.add(name);
+			IBinding binding = name.resolveBinding();
+			if (binding instanceof IProblemBinding)
+				numProblemBindings++;
+			if (binding == null)
+				numNullBindings++;
+			return PROCESS_CONTINUE;
+		}
+		public IASTName getName(int idx) {
+			if (idx < 0 || idx >= nameList.size())
+				return null;
+			return (IASTName) nameList.get(idx);
+		}
+		public int size() { return nameList.size(); } 
+	}
+	
+	static protected class CPPNameResolver extends CPPASTVisitor {
+		{
+			shouldVisitNames = true;
+		}
+		public int numProblemBindings=0;
+		public int numNullBindings=0;
+		public List nameList = new ArrayList();
+		@Override
+		public int visit(IASTName name) {
+			nameList.add(name);
+			IBinding binding = name.resolveBinding();
+			if (binding instanceof IProblemBinding)
+				numProblemBindings++;
+			if (binding == null)
+				numNullBindings++;
+			return PROCESS_CONTINUE;
+		}
+		public IASTName getName(int idx) {
+			if (idx < 0 || idx >= nameList.size())
+				return null;
+			return (IASTName) nameList.get(idx);
+		}
+		public int size() { return nameList.size(); } 
+	}
+	
+	protected String getAboveComment() throws IOException {
+		return getContents(1)[0].toString();
+	}
+	
+	protected StringBuffer[] getContents(int sections) throws IOException {
+		CTestPlugin plugin = CTestPlugin.getDefault();
+		if (plugin == null)
+			throw new AssertionFailedError("This test must be run as a JUnit plugin test");
+		return TestSourceReader.getContentsForTest(plugin.getBundle(), "parser", getClass(), getName(), sections);
+	}
+
+	protected static <T> T assertInstance(Object o, Class<T> clazz, Class... cs) {
+		assertNotNull("Expected object of "+clazz.getName()+" but got a null value", o);
+		assertTrue("Expected "+clazz.getName()+" but got "+o.getClass().getName(), clazz.isInstance(o));
+		for (Class c : cs) {
+			assertNotNull("Expected object of "+c.getName()+" but got a null value", o);
+			assertTrue("Expected "+c.getName()+" but got "+o.getClass().getName(), c.isInstance(o));
+		}
+		return clazz.cast(o);
+	}
+	
+	protected static void assertField(IBinding binding, String fieldName, String ownerName) throws DOMException {
+    	assertInstance(binding, IField.class);
+    	assertEquals(fieldName, binding.getName());
+    	ICompositeType struct = ((IField) binding).getCompositeTypeOwner();
+    	assertEquals(ownerName, struct.getName());
+    }
+	
+	protected class BindingAssertionHelper {
+		protected IASTTranslationUnit tu;
+		protected String contents;
+		protected boolean isCPP;
+    	
+    	public BindingAssertionHelper(String contents, boolean isCPP) throws ParserException {
+    		this.contents= contents;
+    		this.isCPP= isCPP;
+    		this.tu= parse(contents, isCPP ? ParserLanguage.CPP : ParserLanguage.C, true, false);
+		}
+    	
+    	public IASTTranslationUnit getTranslationUnit() {
+    		return tu;
+    	}
+    	
+    	public IBinding assertProblem(String section, int len) {
+    		IBinding binding= binding(section, len);
+    		assertTrue("Non-ProblemBinding for name: " + section.substring(0, len),
+    				binding instanceof IProblemBinding);
+    		return binding;
+    	}
+    	
+    	public <T extends IBinding> T assertNonProblem(String section, int len) {
+    		IBinding binding= binding(section, len);
+    		if (binding instanceof IProblemBinding) {
+    			IProblemBinding problem= (IProblemBinding) binding;
+    			fail("ProblemBinding for name: " + section.substring(0, len) + " (" + renderProblemID(problem.getID())+")"); 
+    		}
+    		if (binding == null) {
+    			fail("Null binding resolved for name: " + section.substring(0, len));
+    		}
+    		return (T) binding;
+    	}
+
+    	public void assertNoName(String section, int len) {
+			IASTName name= findName(section, len);
+			if (name != null) {
+				String selection = section.substring(0, len);
+				fail("Found unexpected \""+selection+"\": " + name.resolveBinding());
+			}
+    	}
+
+    	/**
+    	 * Asserts that there is exactly one name at the given location and that
+    	 * it resolves to the given type of binding.
+    	 */
+    	public IASTImplicitName assertImplicitName(String section, int len, Class<?> bindingClass) {
+    		IASTName name = findImplicitName(section, len);
+    		final String selection = section.substring(0, len);
+			assertNotNull("did not find \""+selection+"\"", name);
+			
+			assertInstance(name, IASTImplicitName.class);
+			IASTImplicitNameOwner owner = (IASTImplicitNameOwner) name.getParent();
+			IASTImplicitName[] implicits = owner.getImplicitNames();
+			assertNotNull(implicits);
+			
+			if (implicits.length > 1) {
+				boolean found = false;
+				for (IASTImplicitName n : implicits) {
+					if (((ASTNode) n).getOffset() == ((ASTNode)name).getOffset()) {
+						assertFalse(found);
+						found = true;
+					}
+				}
+				assertTrue(found);
+			}
+			
+    		assertEquals(selection, name.getRawSignature());
+    		IBinding binding = name.resolveBinding();
+    		assertNotNull(binding);
+    		assertInstance(binding, bindingClass);
+    		return (IASTImplicitName) name;
+    	}
+    	
+    	public void assertNoImplicitName(String section, int len) {
+    		IASTName name = findImplicitName(section, len);
+    		final String selection = section.substring(0, len);
+    		assertNull("found name \""+selection+"\"", name);
+    	}
+    	
+    	public IASTImplicitName[] getImplicitNames(String section, int len) {
+    		IASTName name = findImplicitName(section, len);
+    		IASTImplicitNameOwner owner = (IASTImplicitNameOwner) name.getParent();
+			IASTImplicitName[] implicits = owner.getImplicitNames();
+			return implicits;
+    	}
+    	
+    	public IASTName findName(String section, int len) {
+    		final int offset = contents.indexOf(section);
+    		assertTrue(offset >= 0);
+    		IASTNodeSelector selector = tu.getNodeSelector(null);
+    		return selector.findName(offset, len);
+    	}
+ 
+    	public IASTName findImplicitName(String section, int len) {
+    		final int offset = contents.indexOf(section);
+    		assertTrue(offset >= 0);
+    		IASTNodeSelector selector = tu.getNodeSelector(null);
+    		return selector.findImplicitName(offset, len);
+    	}
+
+    	private String renderProblemID(int i) {
+    		try {
+    			for (Field field : IProblemBinding.class.getDeclaredFields()) {
+    				if (field.getName().startsWith("SEMANTIC_")) {
+    					if (field.getType() == int.class) {
+    						Integer ci= (Integer) field.get(null);
+    						if (ci.intValue() == i) {
+    							return field.getName();
+    						}
+    					}
+    				}
+    			}
+    		} catch(IllegalAccessException iae) {
+    			throw new RuntimeException(iae);
+    		}
+    		return "Unknown problem ID";
+    	}
+    	
+    	public <T extends IBinding> T assertNonProblem(String section, int len, Class<T> type, Class... cs) {
+    		IBinding binding= binding(section, len);
+    		assertTrue("ProblemBinding for name: " + section.substring(0, len),
+    				!(binding instanceof IProblemBinding));
+    		assertInstance(binding, type);
+    		for (Class c : cs) {
+    			assertInstance(binding, c);
+    		}
+    		return type.cast(binding);
+    	}
+    	
+    	private IBinding binding(String section, int len) {
+    		IASTName name = findName(section, len);
+    		final String selection = section.substring(0, len);
+			assertNotNull("did not find \""+selection+"\"", name);
+    		assertEquals(selection, name.getRawSignature());
+    			
+    		IBinding binding = name.resolveBinding();
+    		assertNotNull("No binding for "+name.getRawSignature(), binding);
+    		
+    		return name.resolveBinding();
+    	}
+    }
+
+	final protected IASTTranslationUnit parseAndCheckBindings(String code, ParserLanguage lang) throws Exception {
+		return parseAndCheckBindings(code, lang, false);
+	}
+
+	final protected IASTTranslationUnit parseAndCheckBindings(String code, ParserLanguage lang, boolean useGnuExtensions) throws Exception {
+		return parseAndCheckBindings(code, lang, useGnuExtensions, false);
+	}
+	
+	final protected IASTTranslationUnit parseAndCheckBindings(String code, ParserLanguage lang, boolean useGnuExtensions,
+			boolean skipTrivialInitializers) throws Exception {
+		IASTTranslationUnit tu = parse(code, lang, useGnuExtensions, true, skipTrivialInitializers); 
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		assertNoProblemBindings(col);
+		return tu;
+	}
+
+	final protected void assertNoProblemBindings(CNameCollector col) {
+		Iterator i = col.nameList.iterator();
+		while (i.hasNext()) {
+			IASTName n = (IASTName) i.next();
+			assertFalse(n.resolveBinding() instanceof IProblemBinding);
+		}
+	}
+
+	final protected void assertProblemBindings(CNameCollector col, int count) {
+		Iterator i = col.nameList.iterator();
+		int sum = 0;
+		while (i.hasNext()) {
+			IASTName n = (IASTName) i.next();
+			if (n.getBinding() instanceof IProblemBinding)
+				++sum;
+		}
+		assertEquals(count, sum);
+	}
+
+	final protected <T extends IASTDeclaration> T getDeclaration(IASTTranslationUnit tu, int i_decl) {
+		Class<T> tclass;
+		IASTDeclaration[] decls= tu.getDeclarations();
+		assertTrue(decls.length > i_decl);
+		return (T) decls[i_decl];
+	}
+
+	final protected <T extends IASTDeclaration> T getDeclaration(ICPPASTNamespaceDefinition ns, int i_decl) {
+		Class<T> tclass;
+		IASTDeclaration[] decls= ns.getDeclarations();
+		assertTrue(decls.length > i_decl);
+		return (T) decls[i_decl];
+	}
+
+	final protected <T extends IASTDeclaration> T getDeclaration(ICPPASTLinkageSpecification ls, int i_decl) {
+		Class<T> tclass;
+		IASTDeclaration[] decls= ls.getDeclarations();
+		assertTrue(decls.length > i_decl);
+		return (T) decls[i_decl];
+	}
+
+	final protected <T extends IASTDeclaration> T getDeclaration(IASTCompositeTypeSpecifier ct, int i_decl) {
+		Class<T> tclass;
+		IASTDeclaration[] decls= ct.getMembers();
+		assertTrue(decls.length > i_decl);
+		return (T) decls[i_decl];
+	}
+
+	final protected <T extends IASTCompositeTypeSpecifier> T getCompositeType(IASTTranslationUnit tu, int i_decl) {
+		IASTSimpleDeclaration sdecl= getDeclaration(tu, i_decl);
+		return (T) sdecl.getDeclSpecifier();
+	}
+
+	final protected <T extends IASTStatement> T getStatement(IASTFunctionDefinition fdef, int i_stmt) {
+		return getStatement((IASTCompoundStatement) fdef.getBody(), i_stmt);
+	}
+
+	final protected <T extends IASTStatement> T getStatement(IASTCompoundStatement compound, int i_stmt) {
+		IASTStatement[] stmts= compound.getStatements();
+		assertTrue(stmts.length > i_stmt);
+		return (T) stmts[i_stmt];
+	}
+
+	final protected <T extends IASTExpression> T getExpressionOfStatement(IASTFunctionDefinition fdef, int i) {
+		IASTStatement stmt= getStatement(fdef, i);
+		assertInstance(stmt, IASTExpressionStatement.class);
+		return (T) ((IASTExpressionStatement) stmt).getExpression();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPImplicitNameTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPImplicitNameTests.java
new file mode 100644
index 0000000..cd94e75
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPImplicitNameTests.java
@@ -0,0 +1,460 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     Mike Kucera (IBM)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.IASTImplicitName;
+import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner;
+import org.eclipse.cdt.core.dom.ast.IASTNodeSelector;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+
+/**
+ *
+ */
+public class AST2CPPImplicitNameTests extends AST2BaseTest {
+
+	public AST2CPPImplicitNameTests() {
+	}
+	
+	public AST2CPPImplicitNameTests(String name) {
+		super(name);
+	}
+	
+	public static TestSuite suite() {
+		return suite(AST2CPPImplicitNameTests.class);
+	}
+	
+	public IASTImplicitName[] getImplicitNames(IASTTranslationUnit tu, String contents, String section, int len) {
+		final int offset = contents.indexOf(section);
+		assertTrue(offset >= 0);
+		IASTNodeSelector selector = tu.getNodeSelector(null);
+		IASTImplicitName firstImplicit = selector.findImplicitName(offset, len);
+		IASTImplicitNameOwner owner = (IASTImplicitNameOwner) firstImplicit.getParent();
+		IASTImplicitName[] implicits = owner.getImplicitNames();
+		return implicits;
+	}
+	
+	
+	// class point {
+	//	   int x,y;
+	// public:
+	//	   point operator+(point);
+	//	   point operator-(point);
+	//     point operator-();
+	//     point operator+=(int);
+	// };
+	// point operator*(point,point);
+	// point operator/(point,point);
+	//
+	// point test(point p) {
+	//     p += 5;
+	//	   p + p - p * p / p;
+	//     p << 6;
+	//     -p;
+	//     +p;
+	// }
+	public void testBinaryExpressions() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		IASTTranslationUnit tu = ba.getTranslationUnit();
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		IASTImplicitName n;
+		
+		n = ba.assertImplicitName("+= 5", 2, ICPPMethod.class);
+		assertSame(n.resolveBinding(), col.getName(14).resolveBinding());
+		
+		n = ba.assertImplicitName("+ p", 1, ICPPMethod.class);
+		assertSame(n.resolveBinding(), col.getName(4).resolveBinding());
+		
+		n = ba.assertImplicitName("- p", 1, ICPPMethod.class);
+		assertSame(n.resolveBinding(), col.getName(8).resolveBinding());
+		
+		n = ba.assertImplicitName("* p", 1, ICPPFunction.class);
+		assertSame(n.resolveBinding(), col.getName(17).resolveBinding());
+		
+		n = ba.assertImplicitName("/ p", 1, ICPPFunction.class);
+		assertSame(n.resolveBinding(), col.getName(23).resolveBinding());
+		
+		n = ba.assertImplicitName("-p;", 1, ICPPMethod.class);
+		assertSame(n.resolveBinding(), col.getName(12).resolveBinding());
+		
+		ba.assertNoImplicitName("<< 6", 2);
+		ba.assertNoImplicitName("+p;", 1);
+	}
+	
+	
+	//struct X {};
+	//
+	//template <class T> class auto_ptr {
+	//	    T* ptr;
+	//public:
+	//	    explicit auto_ptr(T* p = 0) : ptr(p) {}
+	//	    T& operator*()              {return *ptr;}
+	//};
+	//
+	//void test() {
+	//		auto_ptr<X> x(new X());
+	//		*x; //1
+	//		int *y;
+	//		*y; //2
+	//}
+	public void testPointerDereference() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertImplicitName("*x;", 1, ICPPFunction.class);
+		ba.assertNoImplicitName("*y; //2", 1);
+	}
+	
+
+	// struct X {};
+	// struct Y {
+	//	  X x;
+	// };
+	//
+	// X* operator&(X);
+	// X* operator&(Y);
+	//
+	// void test(X x, Y y) {
+	//	  X (Y::*px1) = &Y::x;  // not the overloaded operator
+	//	  X *px2 = &y; // overloaded
+	// }
+	public void testPointerToMember() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		IASTTranslationUnit tu = ba.getTranslationUnit();
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ba.assertNoImplicitName("&Y::x;", 1);
+		
+		IASTImplicitName n = ba.assertImplicitName("&y;", 1, ICPPFunction.class);
+		assertSame(n.resolveBinding(), col.getName(9).resolveBinding());
+	}
+	
+	
+	
+	//	class A {
+	//		public:
+	//			void doA() {}
+	//	};
+	//
+	//	class FirstLevelProxy {
+	//		public:
+	//			A* operator->() {A *a = new A(); return a;} // leaky
+	//			void doFLP() {}
+	//	};
+	//
+	//	class SecondLevelProxy {
+	//		public:
+	//			FirstLevelProxy operator->() {FirstLevelProxy p; return p;}
+	//			void doSLP() {}
+	//	};
+	//
+	//	int main(int argc, char **argv) {
+	//		SecondLevelProxy p2;
+	//		p2->doA();
+	//	}
+	public void testArrowOperator() throws Exception {
+		String contents = getAboveComment();		
+		IASTTranslationUnit tu = parse(contents, ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IASTImplicitName[] implicits = getImplicitNames(tu, contents, "->doA();", 2);
+		
+		assertNotNull(implicits);
+		assertEquals(2, implicits.length);
+		
+		assertSame(implicits[1].getBinding(), col.getName(4).resolveBinding());
+		assertSame(implicits[0].getBinding(), col.getName(12).resolveBinding());
+	}
+	
+	
+	// struct A {
+	//   int x;
+	// };
+	//
+	// struct B {
+	//    A& operator++(); // prefix
+	// };
+	// A operator++(B, int); // postfix
+	//
+	// void test(B p1, B p2) {
+	//    (p1++).x; //1
+	//    (++p1).x; //2
+	// }
+	public void testUnaryPrefixAndPostfix() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertImplicitName("++).x; //1", 2, ICPPFunction.class);
+		ba.assertImplicitName("++p1).x; //2", 2, ICPPMethod.class);
+	}
+	
+	
+	// struct A {};
+	// struct B {};
+	// struct C {};
+	// struct D {};
+	//
+	// C operator,(A,B);
+	// D operator,(C,C);
+	//
+	// int test(A a, B b, C c, D d) {
+	//   // should be treated like (((a , b) , c) , d)
+	//	 a , b , c , d; // expr
+	// }
+	//
+	// int main(int argc, char **argv) {
+	//	 A a;
+	//	 B b;
+	//	 C c;
+	//	 D d;
+	//	 test(a , b , c , d); // func
+	// }
+	public void testCommaOperator1() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		// expression lists are used in function calls but they should not resolve to the comma operator
+		ba.assertNoImplicitName(", b , c , d); // func", 1);
+		ba.assertNoImplicitName(", c , d); // func", 1);
+		ba.assertNoImplicitName(", d); // func", 1);
+		
+		IASTImplicitName opAB = ba.assertImplicitName(", b , c , d; // expr", 1, ICPPFunction.class);
+		IASTImplicitName opCC = ba.assertImplicitName(", c , d; // expr", 1, ICPPFunction.class);
+		ba.assertNoImplicitName(", d; // expr", 1);
+		
+		IASTTranslationUnit tu = ba.getTranslationUnit();
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertSame(opAB.resolveBinding(), col.getName(5).resolveBinding());
+		assertSame(opCC.resolveBinding(), col.getName(11).resolveBinding());
+	}
+	
+	
+	
+	//	struct B {};
+	//	struct C {};
+	//	struct E {
+	//		int ee;
+	//	};
+	//	struct A {
+	//		 C operator,(B);
+	//	};
+	//	struct D {
+	//		 E operator,(D);
+	//	};
+	//	D operator,(C,C);
+	//
+	//
+	//	int test(A a, B b, C c, D d) {
+	//	   (a , b , c , d).ee; // expr
+	//	}
+	public void testCommaOperator2() throws Exception {
+		BindingAssertionHelper ba = new BindingAssertionHelper(getAboveComment(), true);
+		
+		IASTImplicitName opAB = ba.assertImplicitName(", b , c , d", 1, ICPPMethod.class);
+		IASTImplicitName opCC = ba.assertImplicitName(", c , d", 1, ICPPFunction.class);
+		IASTImplicitName opDD = ba.assertImplicitName(", d", 1, ICPPMethod.class);
+		
+		IASTTranslationUnit tu = ba.getTranslationUnit();
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		// 6, 11, 15
+		assertSame(opAB.resolveBinding(), col.getName(6).resolveBinding());
+		assertSame(opCC.resolveBinding(), col.getName(15).resolveBinding());
+		assertSame(opDD.resolveBinding(), col.getName(11).resolveBinding());
+		
+		ba.assertNonProblem("ee;", 2);
+	}
+	
+	
+	// struct X {
+	//	 int operator()(bool);
+	//   int operator()();
+	//   int operator()(int,int);
+	// };
+	//
+	// int test(X x) {
+	//   bool b = true;
+	//	 x(b); // 1
+	//   x(); // 2
+	//   x(1,2); // 3
+	// }
+	public void testFunctionCallOperator() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		IASTTranslationUnit tu = ba.getTranslationUnit();
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IASTImplicitName n1 = ba.assertImplicitName("(b); // 1", 1, ICPPMethod.class);
+		IASTImplicitName n2 = ba.assertImplicitName("); // 1", 1, ICPPMethod.class);
+		assertSame(n1.resolveBinding(), n2.resolveBinding());
+		assertFalse(n1.isAlternate());
+		assertTrue(n2.isAlternate());
+		// there should be no overlap
+		ba.assertNoImplicitName("b); // 1", 1);
+		assertSame(col.getName(1).resolveBinding(), n1.resolveBinding());
+		
+		n1 = ba.assertImplicitName("(); // 2", 1, ICPPMethod.class);
+		n2 = ba.assertImplicitName("); // 2", 1, ICPPMethod.class);
+		assertSame(n1.resolveBinding(), n2.resolveBinding());
+		assertFalse(n1.isAlternate());
+		assertTrue(n2.isAlternate());
+		assertSame(col.getName(3).resolveBinding(), n1.resolveBinding());
+		
+		n1 = ba.assertImplicitName("(1,2); // 3", 1, ICPPMethod.class);
+		n2 = ba.assertImplicitName("); // 3", 1, ICPPMethod.class);
+		assertSame(n1.resolveBinding(), n2.resolveBinding());
+		assertFalse(n1.isAlternate());
+		assertTrue(n2.isAlternate());
+		assertSame(col.getName(4).resolveBinding(), n1.resolveBinding());
+	}
+	
+	
+	// struct A {};
+	// struct B {};
+	//
+	// // error operator= must be a non-static member function
+	// A& operator=(const B&, const A&);
+	//
+	// int main(int argc, char **argv) {
+	//	 A a;
+	//	 B b;
+	//	 b = a; // should not resolve
+	// }
+	public void testCopyAssignmentOperator() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNoImplicitName("= a;", 1);
+	}
+	
+	
+	// struct A {
+	//   const char& operator[](int pos) const;
+	//   char& operator[](int pos);
+	// };
+	//
+	// void func(const char& c);
+	// void func(char& c);
+	//
+	// void test(const A& x, A& y) {
+	//	 int q;
+	//   func(x[0]); //1
+	//   func(y[q]); //2
+	// }
+	public void testArraySubscript() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		IASTTranslationUnit tu = ba.getTranslationUnit();
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IASTImplicitName n1 = ba.assertImplicitName("[0]); //1", 1, ICPPMethod.class);
+		ba.assertNoImplicitName("0]); //1", 1);
+		IASTImplicitName n2 = ba.assertImplicitName("]); //1", 1, ICPPMethod.class);
+		assertSame(n1.resolveBinding(), n2.resolveBinding());
+		assertFalse(n1.isAlternate());
+		assertTrue(n2.isAlternate());
+		assertSame(col.getName(1).resolveBinding(), n1.resolveBinding());
+		
+		n1 = ba.assertImplicitName("[q]); //2", 1, ICPPMethod.class);
+		ba.assertNoImplicitName("q]); //2", 1);
+		n2 = ba.assertImplicitName("]); //2", 1, ICPPMethod.class);
+		assertSame(n1.resolveBinding(), n2.resolveBinding());
+		assertFalse(n1.isAlternate());
+		assertTrue(n2.isAlternate());
+		assertSame(col.getName(3).resolveBinding(), n1.resolveBinding());
+	}
+	
+	
+	//	struct X {
+	//		~X();
+	//		void operator delete();
+	//		void operator delete[]();
+	//	};
+	//
+	//	int test(X* x) {
+	//		delete x;
+	//		X* xs = new X[5];
+	//		delete[] x;
+	//      delete 1;
+	//	}
+	public void testDelete() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		IASTImplicitName[] names = ba.getImplicitNames("delete x;", 6);
+		assertEquals(2, names.length);
+		IASTImplicitName destructor = names[0];
+		IASTImplicitName delete = names[1];
+		
+		IASTTranslationUnit tu = ba.getTranslationUnit();
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertSame(col.getName(1).resolveBinding(), destructor.resolveBinding());
+		assertSame(col.getName(2).resolveBinding(), delete.resolveBinding());
+		
+		names = ba.getImplicitNames("delete[] x;", 6);
+		assertEquals(1, names.length);
+		assertSame(col.getName(3).resolveBinding(), names[0].resolveBinding());
+		
+		ba.assertNoImplicitName("delete 1;", 6);
+	}
+	
+	
+	//	struct X {}
+	//	int test(X *x) {
+	//		X* xs = new X[5];
+	//		delete[] x;
+	//	}
+	public void _testImplicitNewAndDelete() throws Exception {
+		BindingAssertionHelper ba = new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNoImplicitName("new X", 3);
+		ba.assertNoImplicitName("delete[]", 6); // fails because its picking up the implicit global delete[]
+	}
+	
+	
+	//  typedef long unsigned int size_t
+	//	struct nothrow_t {};
+	//	extern const nothrow_t nothrow;
+	//	void *operator new(size_t, const nothrow_t&);
+	//	void *operator new[](size_t, const nothrow_t&);
+	//  void *operator new[](size_t, int, int);
+	//	struct X {};
+	//
+	//	int test() {
+	//	  X *fp = new (nothrow) X;
+	//	  int* p = new (nothrow) int[5];
+	//    int* p2 = new (5,6) int[5];
+	//	}
+	public void testNew() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		IASTImplicitName n1 = ba.assertImplicitName("new (nothrow) X", 3, ICPPFunction.class);
+		IASTImplicitName n2 = ba.assertImplicitName("new (nothrow) int", 3, ICPPFunction.class);
+		IASTImplicitName n3 = ba.assertImplicitName("new (5,6) int", 3, ICPPFunction.class);
+		
+		IASTTranslationUnit tu = ba.getTranslationUnit();
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertSame(col.getName(4).resolveBinding(), n1.resolveBinding());
+		assertSame(col.getName(9).resolveBinding(), n2.resolveBinding());
+		assertSame(col.getName(14).resolveBinding(), n3.resolveBinding());
+	}
+	
+	
+	// int test() {
+	//     throw;
+	// }
+	public void testEmptyThrow() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNoImplicitName("throw;", 5);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java
new file mode 100644
index 0000000..3569d6f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java
@@ -0,0 +1,6560 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     Devin Steffler (IBM Corporation) - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionList;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTProblemDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IProblemBinding;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNewExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateId;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
+
+/**
+ * Examples taken from the c++-specification.
+ */
+public class AST2CPPSpecTest extends AST2SpecBaseTest {
+
+	public AST2CPPSpecTest() {
+	}
+
+	public AST2CPPSpecTest(String name) {
+		super(name);
+	}
+	
+	public static TestSuite suite() {
+		return suite(AST2CPPSpecTest.class);
+	}
+
+	// int x=x+++++y;
+	public void test2_4s5() throws Exception {
+		parseCandCPP(getAboveComment(), false, 0);
+	}
+
+	// int a=12, b=014, c=0XC;
+	public void test2_13_1s1() throws Exception {
+		parseCandCPP(getAboveComment(), true, 0);
+	}
+
+	// ??=define arraycheck(a,b) a??(b??) ??!??! b??(a??)
+	// // becomes
+	// #define arraycheck(a,b) a[b] || b[a]
+	public void test2_3s2() throws Exception { // TODO exists bug 64993
+		parseCandCPP(getAboveComment(), true, 0);
+	}
+
+	// int a; // defines a
+	// extern const int c = 1; // defines c
+	// int f(int x) { return x+a; } // defines f and defines x
+	// struct S { int a; int b; }; // defines S, S::a, and S::b
+	// struct X { // defines X
+	// int x; // defines nonstatic data member x
+	// static int y; // declares static data member y
+	// X(): x(0) { } // defines a constructor of X
+	// };
+	// int X::y = 1; // defines X::y
+	// enum { up, down }; // defines up and down
+	// namespace N { int d; } // defines N and N::d
+	// namespace N1 = N; // defines N1
+	// X anX; // defines anX
+	// // whereas these are just declarations:
+	// extern int a; // declares a
+	// extern const int c; // declares c
+	// int f(int); // declares f
+	// struct S; // declares S
+	// typedef int Int; // declares Int
+	// extern X anotherX; // declares anotherX
+	// using N::d; // declares N::d
+	public void test3_1s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct C {
+	// string s; // string is the standard library class (clause 21)
+	// };
+	// int main()
+	// {
+	// C a;
+	// C b = a;
+	// b = a;
+	// }
+	public void test3_1s4a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct C {
+	// string s;
+	// C(): s() { }
+	// C(const C& x): s(x.s) { }
+	// C& operator=(const C& x) { s = x.s; return *this; }
+	// ~C() { }
+	// };
+	// 
+	public void test3_1s4b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct X; // declare X as a struct type
+	// struct X* x1; // use X in pointer formation
+	// X* x2; // use X in pointer formation
+	public void test3_2s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// // translation unit 1:
+	// struct X {
+	// X(int);
+	// X(int, int);
+	// };
+	// X::X(int = 0) { }
+	// class D: public X { };
+	// D d2; // X(int) called by D()
+	public void test3_2s5_a() throws Exception { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+	
+	// // translation unit 2:
+	// struct X {
+	// X(int);
+	// X(int, int);
+	// };
+	// X::X(int = 0, int = 0) { }
+	// class D: public X { }; // X(int, int) called by D();
+	// // D()'s implicit definition
+	// // violates the ODR
+	public void test3_2s5_b() throws Exception { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int j = 24;
+	// int main()
+	// {
+	// int i = j, j;
+	// j = 42;
+	// }
+	public void test3_3s2() throws Exception {
+		parseCandCPP(getAboveComment(), true, 0);
+	}
+
+	// int foo() {
+	// int x = 12;
+	// { int x = x; }
+	// }
+	public void test3_3_1s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int foo() {
+	// const int i = 2;
+	// { int i[i]; }
+	// }
+	public void test3_3_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int foo() {
+	// const int x = 12;
+	// { enum { x = x }; }
+	// }
+	public void test3_3_1s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace N {
+	// int i;
+	// int g(int a) { return a; }
+	// int j();
+	// void q();
+	// }
+	// namespace { int l=1; }
+	// // the potential scope of l is from its point of declaration
+	// // to the end of the translation unit
+	// namespace N {
+	// int g(char a) // overloads N::g(int)
+	// {
+	// return l+a; // l is from unnamed namespace
+	// }
+	// int i; // error: duplicate definition
+	// int j(); // OK: duplicate function declaration
+	// int j() // OK: definition of N::j()
+	// {
+	// return g(i); // calls N::g(int)
+	// }
+	// int q(); // error: different return type
+	// }
+	public void test3_3_5s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace A {
+	// namespace N {
+	// void f();
+	// }
+	// }
+	// void A::N::f() {
+	// int i = 5;
+	// // The following scopes are searched for a declaration of i:
+	// // 1) outermost block scope of A::N::f, before the use of i
+	// // 2) scope of namespace N
+	// // 3) scope of namespace A
+	// // 4) global scope, before the definition of A::N::f
+	// }
+	public void test3_4_1s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace M {
+	// class B { };
+	// }
+	public void test3_4_1s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class B { };
+	// namespace M {
+	// namespace N {
+	// class X : public B {
+	// void f();
+	// };
+	// }
+	// }
+	// void M::N::X::f() {
+	// int i = 16;
+	// }
+	// // The following scopes are searched for a declaration of i:
+	// // 1) outermost block scope of M::N::X::f, before the use of i
+	// // 2) scope of class M::N::X
+	// // 3) scope of M::N::X's base class B
+	// // 4) scope of namespace M::N
+	// // 5) scope of namespace M
+	// // 6) global scope, before the definition of M::N::X::f
+	public void test3_4_1s8() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {
+	// typedef int AT;
+	// void f1(AT);
+	// void f2(float);
+	// };
+	// struct B {
+	// typedef float BT;
+	// friend void A::f1(AT); // parameter type is A::AT
+	// friend void A::f2(BT); // parameter type is B::BT
+	// };
+	public void test3_4_1s10() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	//	class A {
+	//	public:
+	//	static int n;
+	//	};
+	//	int main()
+	//	{
+	//	int A;
+	//	A::n = 42; // OK
+	//	A b; // illformed: A does not name a type
+	//	}
+	public void test3_4_3s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 1);
+	}
+	
+	// namespace NS {
+	// class T { };
+	// void f(T);
+	// }
+	// NS::T parm;
+	// int main() {
+	// f(parm); //OK: calls NS::f
+	// }
+	public void test3_4_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X { };
+	// class C {
+	// class X { };
+	// static const int number = 50;
+	// static X arr[number];
+	// };
+	// X C::arr[number]; // illformed:
+	// // equivalent to: ::X C::arr[C::number];
+	// // not to: C::X C::arr[C::number];
+	public void test3_4_3s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct C {
+	// typedef int I;
+	// };
+	// typedef int I1, I2;
+	// int foo() {
+	// extern int* p;
+	// extern int* q;
+	// p->C::I::~I(); // I is looked up in the scope of C
+	// q->I1::~I2(); // I2 is looked up in the scope of
+	// };
+	// // the postfixexpression
+	// struct A {
+	// ~A();
+	// };
+	// typedef A AB;
+	// int main()
+	// {
+	// AB *p;
+	// p->AB::~AB(); // explicitly calls the destructor for A
+	// }
+	public void test3_4_3s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// int x;
+	// namespace Y {
+	// void f(float);
+	// void h(int);
+	// }
+	// namespace Z {
+	// void h(double);
+	// }
+	// namespace A {
+	// using namespace Y;
+	// void f(int);
+	// void g(int);
+	// int i;
+	// }
+	// namespace B {
+	// using namespace Z;
+	// void f(char);
+	// int i;
+	// }
+	// namespace AB {
+	// using namespace A;
+	// using namespace B;
+	// void g();
+	// }
+	// void h()
+	// {
+	// AB::g(); // g is declared directly in AB,
+	// // therefore S is { AB::g() } and AB::g() is chosen
+	// AB::f(1); // f is not declared directly in AB so the rules are
+	// // applied recursively to A and B;
+	// // namespace Y is not searched and Y::f(float)
+	// // is not considered;
+	// // S is { A::f(int), B::f(char) } and overload
+	// // resolution chooses A::f(int)
+	// AB::f('c'); //as above but resolution chooses B::f(char)
+	// AB::x++; // x is not declared directly in AB, and
+	// // is not declared in A or B, so the rules are
+	// // applied recursively to Y and Z,
+	// // S is { } so the program is illformed
+	// AB::i++; // i is not declared directly in AB so the rules are
+	// // applied recursively to A and B,
+	// // S is { A::i, B::i } so the use is ambiguous
+	// // and the program is illformed
+	// AB::h(16.8); // h is not declared directly in AB and
+	// // not declared directly in A or B so the rules are
+	// // applied recursively to Y and Z,
+	// // S is { Y::h(int), Z::h(double) } and overload
+	// // resolution chooses Z::h(double)
+	// }
+	public void test3_4_3_2s2() throws Exception {
+		String[] problems= {"AB::x", "x", "AB::i", "i"}; 
+		parse(getAboveComment(), ParserLanguage.CPP, problems);  // qualified names are counted double, so 4 
+	}
+
+	// namespace A {
+	// int a;
+	// }
+	// namespace B {
+	// using namespace A;
+	// }
+	// namespace C {
+	// using namespace A;
+	// }
+	// namespace BC {
+	// using namespace B;
+	// using namespace C;
+	// }
+	// void f()
+	// {
+	// BC::a++; //OK: S is { A::a, A::a }
+	// }
+	// namespace D {
+	// using A::a;
+	// }
+	// namespace BD {
+	// using namespace B;
+	// using namespace D;
+	// }
+	// void g()
+	// {
+	// BD::a++; //OK: S is { A::a, A::a }
+	// }
+	public void test3_4_3_2s3() throws Exception { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace B {
+	// int b;
+	// }
+	// namespace A {
+	// using namespace B;
+	// int a;
+	// }
+	// namespace B {
+	// using namespace A;
+	// }
+	// void f()
+	// {
+	// A::a++; //OK: a declared directly in A, S is { A::a }
+	// B::a++; //OK: both A and B searched (once), S is { A::a }
+	// A::b++; //OK: both A and B searched (once), S is { B::b }
+	// B::b++; //OK: b declared directly in B, S is { B::b }
+	// }
+	public void test3_4_3_2s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace A {
+	// struct x { };
+	// int x;
+	// int y;
+	// }
+	// namespace B {
+	// struct y {};
+	// }
+	// namespace C {
+	// using namespace A;
+	// using namespace B;
+	// int i = C::x; // OK, A::x (of type int)
+	// int j = C::y; // ambiguous, A::y or B::y
+	// }
+	public void test3_4_3_2s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace A {
+	// namespace B {
+	// void f1(int);
+	// }
+	// using namespace B;
+	// }
+	// void A::f1(int) { } // illformed,
+	// // f1 is not a member of A
+	public void test3_4_3_2s6a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace A {
+	// namespace B {
+	// void f1(int);
+	// }
+	// }
+	// namespace C {
+	// namespace D {
+	// void f1(int);
+	// }
+	// }
+	// using namespace A;
+	// using namespace C::D;
+	// void B::f1(int){} // OK, defines A::B::f1(int)
+	public void test3_4_3_2s6b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct Node {
+	// struct Node* Next; // OK: Refers to Node at global scope
+	// struct Data* Data; // OK: Declares type Data
+	// // at global scope and member Data
+	// };
+	// struct Data {
+	// struct Node* Node; // OK: Refers to Node at global scope
+	// friend struct ::Glob; // error: Glob is not declared
+	// // cannot introduce a qualified type (7.1.5.3)
+	// friend struct Glob; // OK: Refers to (as yet) undeclared Glob
+	// // at global scope.
+	// 
+	// };
+	// struct Base {
+	// struct Data; // OK: Declares nested Data
+	// struct ::Data* thatData; // OK: Refers to ::Data
+	// struct Base::Data* thisData; // OK: Refers to nested Data
+	// friend class ::Data; // OK: global Data is a friend
+	// friend class Data; // OK: nested Data is a friend
+	// struct Data { //
+	// }; // Defines nested Data
+	// struct Data; // OK: Redeclares nested Data
+	// };
+	// struct Data; // OK: Redeclares Data at global scope
+	// struct ::Data; // error: cannot introduce a qualified type (7.1.5.3)
+	// struct Base::Data; // error: cannot introduce a qualified type (7.1.5.3)
+	// struct Base::Datum; // error: Datum undefined
+	// struct Base::Data* pBase; // OK: refers to nested Data
+	public void test3_4_4s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// static void f();
+	// static int i = 0; //1
+	// void g() {
+	// extern void f(); // internal linkage
+	// int i; //2: i has no linkage
+	// {
+	// extern void f(); // internal linkage
+	// extern int i; //3: external linkage
+	// }
+	// }
+	public void test3_5s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace X {
+	// void p()
+	// {
+	// q(); //error: q not yet declared
+	// extern void q(); // q is a member of namespace X
+	// }
+	// void middle()
+	// {
+	// q(); //error: q not yet declared
+	// }
+	// void q() { //
+	// } // definition of X::q
+	// }
+	// void q() { //
+	// } // some other, unrelated q
+	public void test3_5s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// void f()
+	// {
+	// struct A { int x; }; // no linkage
+	// extern A a; // illformed
+	// typedef A B;
+	// extern B b; // illformed
+	// }
+	public void test3_5s8() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int main(int argc, char* argv[]) { //
+	// }
+	public void test3_6_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct B {
+	// virtual void f();
+	// void mutate();
+	// virtual ~B();
+	// };
+	// struct D1 : B { void f(); };
+	// struct D2 : B { void f(); };
+	// void B::mutate() {
+	// new (this) D2; // reuses storage - ends the lifetime of *this
+	// f(); //undefined behavior
+	// this; // OK, this points to valid memory
+	// }
+	// void g() {
+	// void* p = malloc(sizeof(D1) + sizeof(D2));
+	// B* pb = new (p) D1;
+	// pb->mutate();
+	// &pb; //OK: pb points to valid memory
+	// void* q = pb; // OK: pb points to valid memory
+	// pb->f(); //undefined behavior, lifetime of *pb has ended
+	// }
+	public void test3_8s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct C {
+	// int i;
+	// void f();
+	// const C& operator=( const C& );
+	// };
+	// const C& C::operator=( const C& other)
+	// {
+	// if ( this != &other ) {
+	// this->~C(); //lifetime of *this ends
+	// new (this) C(other); // new object of type C created
+	// f(); //welldefined
+	// }
+	// return *this;
+	// }
+	// int foo() {
+	// C c1;
+	// C c2;
+	// c1 = c2; // welldefined
+	// c1.f(); //welldefined; c1 refers to a new object of type C
+	// }
+	public void test3_8s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class T { };
+	// struct B {
+	// ~B();
+	// };
+	// void h() {
+	// B b;
+	// new (&b) T;
+	// } //undefined behavior at block exit
+	public void test3_8s8() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct B {
+	// B();
+	// ~B();
+	// };
+	// const B b;
+	// void h() {
+	// b.~B();
+	// new (&b) const B; // undefined behavior
+	// }
+	public void test3_8s9() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// #define N sizeof(T)
+	// void test() {
+	// char buf[N];
+	// T obj; // obj initialized to its original value
+	// memcpy(buf, &obj, N); // between these two calls to memcpy,
+	// // obj might be modified
+	// memcpy(&obj, buf, N); // at this point, each subobject of obj of scalar type
+	// // holds its original value
+	// }
+	public void test3_9s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// void test() {
+	// T* t1p;
+	// T* t2p;
+	// // provided that t2p points to an initialized object ...
+	// memcpy(t1p, t2p, sizeof(T)); // at this point, every subobject of POD type in *t1p contains
+	// // the same value as the corresponding subobject in *t2p
+	// }
+	public void test3_9s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class X; // X is an incomplete type
+	// extern X* xp; // xp is a pointer to an incomplete type
+	// extern int arr[]; // the type of arr is incomplete
+	// typedef int UNKA[]; // UNKA is an incomplete type
+	// UNKA* arrp; // arrp is a pointer to an incomplete type
+	// UNKA** arrpp;
+	// void foo()
+	// {
+	// xp++; //illformed: X is incomplete
+	// arrp++; //illformed: incomplete type
+	// arrpp++; //OK: sizeof UNKA* is known
+	// }
+	// struct X { int i; }; // now X is a complete type
+	// int arr[10]; // now the type of arr is complete
+	// X x;
+	// void bar()
+	// {
+	// xp = &x; // OK; type is ''pointer to X''
+	// arrp = &arr; // illformed: different types
+	// xp++; //OK: X is complete
+	// arrp++; //illformed: UNKA can't be completed
+	// }
+	public void test3_9s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int& f();
+	public void test3_10s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int foo() {
+	// i = v[i++]; // the behavior is unspecified
+	// i = 7, i++, i++; // i becomes 9
+	// i = ++i + 1; // the behavior is unspecified
+	// i = i + 1; // the value of i is incremented
+	// }
+	public void test5s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct B {};
+	// struct D : B {};
+	// void foo(D* dp)
+	// {
+	// B* bp = dynamic_cast<B*>(dp); // equivalent to B* bp = dp;
+	// }
+	public void test5_2_7s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class A { virtual void f(); };
+	// class B { virtual void g(); };
+	// class D : public virtual A, private B {};
+	// void g()
+	// {
+	// D d;
+	// B* bp = (B*)&d; // cast needed to break protection
+	// A* ap = &d; // public derivation, no cast needed
+	// D& dr = dynamic_cast<D&>(*bp); // fails
+	// ap = dynamic_cast<A*>(bp); // fails
+	// bp = dynamic_cast<B*>(ap); // fails
+	// ap = dynamic_cast<A*>(&d); // succeeds
+	// bp = dynamic_cast<B*>(&d); // fails
+	// }
+	// class E : public D, public B {};
+	// class F : public E, public D {};
+	// void h()
+	// {
+	// F f;
+	// A* ap = &f; // succeeds: finds unique A
+	// D* dp = dynamic_cast<D*>(ap); // fails: yields 0
+	// // f has two D subobjects
+	// E* ep = (E*)ap; // illformed:
+	// // cast from virtual base
+	// E* ep1 = dynamic_cast<E*>(ap); // succeeds
+	// }
+	public void test5_2_7s9() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class D { // ... 
+	// };
+	// D d1;
+	// const D d2;
+	// int foo() {
+	// typeid(d1) == typeid(d2); // yields true
+	// typeid(D) == typeid(const D); // yields true
+	// typeid(D) == typeid(d2); // yields true
+	// typeid(D) == typeid(const D&); // yields true
+	// }
+	public void test5_2_8s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct B {};
+	// struct D : public B {};
+	// D d;
+	// B &br = d;
+	// int foo() {
+	// static_cast<D&>(br); // produces lvalue to the original d object
+	// }
+	public void test5_2_9s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A { int i; };
+	// struct B : A { };
+	// int foo() {
+	// &B::i; // has type int A::*
+	// }
+	public void test5_3_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// void test() {
+	//    new (int (*[10])());
+	// };
+	public void test5_3_4s3() throws Exception {
+		IASTTranslationUnit tu= parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+		IASTFunctionDefinition fdef= getDeclaration(tu, 0);
+		IASTExpression expr= getExpressionOfStatement(fdef, 0);
+		assertInstance(expr, ICPPASTNewExpression.class);
+		ICPPASTNewExpression newExpr= (ICPPASTNewExpression) expr;
+		
+		assertNull(newExpr.getNewPlacement());
+		assertNull(newExpr.getNewInitializer());
+		IASTTypeId typeid= newExpr.getTypeId();
+		isTypeEqual(CPPVisitor.createType(typeid), "int () * []");
+	}
+
+	// typedef int T;
+	// void test(int f) {
+	//	  new T;
+	//    new(2,f) T;
+	//    new T[5];
+	//    new (2,f) T[5];
+	// };
+	public void test5_3_4s12() throws Exception {
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=236856
+		
+		IASTTranslationUnit tu= parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+		IASTFunctionDefinition fdef= getDeclaration(tu, 1);
+
+		// new T;
+		IASTExpression expr= getExpressionOfStatement(fdef, 0);
+		assertInstance(expr, ICPPASTNewExpression.class);
+		ICPPASTNewExpression newExpr= (ICPPASTNewExpression) expr;
+		assertNull(newExpr.getNewPlacement());
+		assertNull(newExpr.getNewInitializer());
+		isTypeEqual(CPPVisitor.createType(newExpr.getTypeId()), "int");
+		
+		// new(2,f) T;
+		expr= getExpressionOfStatement(fdef, 1);
+		assertInstance(expr, ICPPASTNewExpression.class);
+		newExpr= (ICPPASTNewExpression) expr;
+		assertInstance(newExpr.getNewPlacement(), IASTExpressionList.class);
+		assertNull(newExpr.getNewInitializer());
+		isTypeEqual(CPPVisitor.createType(newExpr.getTypeId()), "int");
+
+		// new T[5];
+		expr= getExpressionOfStatement(fdef, 2);
+		assertInstance(expr, ICPPASTNewExpression.class);
+		newExpr= (ICPPASTNewExpression) expr;
+		assertNull(newExpr.getNewPlacement());
+		assertNull(newExpr.getNewInitializer());
+		isTypeEqual(CPPVisitor.createType(newExpr.getTypeId()), "int []");
+
+		// new (2,f) T[5];
+		expr= getExpressionOfStatement(fdef, 3);
+		assertInstance(expr, ICPPASTNewExpression.class);
+		newExpr= (ICPPASTNewExpression) expr;
+		assertInstance(newExpr.getNewPlacement(), IASTExpressionList.class);
+		assertNull(newExpr.getNewInitializer());
+		isTypeEqual(CPPVisitor.createType(newExpr.getTypeId()), "int []");
+	}
+
+	// int n=2;
+	// int x=new float[n][5];
+	// int y=new float[5][n];
+	public void test5_3_4s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {};
+	// struct I1 : A {};
+	// struct I2 : A {};
+	// struct D : I1, I2 {};
+	// A *foo( D *p ) {
+	// return (A*)( p ); // illformed
+	// // static_cast interpretation
+	// }
+	public void test5_4s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int foo() {
+	// (ptr_to_obj->*ptr_to_mfct)(10);
+	// }
+	public void test5_5s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// void *p;
+	// const int *q;
+	// int **pi;
+	// const int *const *pci;
+	// void ct()
+	// {
+	// p <= q; // Both converted to const void * before comparison
+	// pi <= pci; // Both converted to const int *const * before comparison
+	// }
+	public void test5_9s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct B {
+	// int f();
+	// };
+	// struct L : B { };
+	// struct R : B { };
+	// struct D : L, R { };
+	// int (B::*pb)() = &B::f;
+	// int (L::*pl)() = pb;
+	// int (R::*pr)() = pb;
+	// int (D::*pdl)() = pl;
+	// int (D::*pdr)() = pr;
+	// bool x = (pdl == pdr); // false
+	public void test5_10s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int f(int, int, int) {}
+	// int foo() {
+	// int a=0, t=1, c=2;
+	// f(a, (t=3, t+2), c);
+	// }
+	public void test5_18s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int foo() {
+	// int x=0;
+	// if (x)
+	// int i;
+	// 
+	// if (x) {
+	// int i;
+	// }
+	// }
+	public void test6_4s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int foo() {
+	// if (int x = 1) {
+	// int x; // illformed,redeclaration of x
+	// }
+	// else {
+	// int x; // illformed,redeclaration of x
+	// }
+	// }
+	public void test6_4s3() throws Exception { 
+		// raised bug 90618
+		// gcc does not report an error, either, so leave it as it is.
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int foo() {
+	// int x=5;
+	// while (--x >= 0)
+	// int i;
+	// //can be equivalently rewritten as
+	// while (--x >= 0) {
+	// int i;
+	// }
+	// }
+	public void test6_5s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {
+	// int val;
+	// A(int i) : val(i) { }
+	// ~A() { }
+	// operator bool() { return val != 0; }
+	// };
+	// 
+	// int foo() {
+	// int i = 1;
+	// while (A a = i) {
+	// //...
+	// i = 0;
+	// }
+	// }
+	public void test6_5_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int foo() {
+	// int i = 42;
+	// int a[10];
+	// for (int i = 0; i < 10; i++)
+	// a[i] = i;
+	// int j = i; // j = 42
+	// }
+	public void test6_5_3s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	//	void f()
+	//	{
+	//	// ...
+	//	goto lx; // illformed: jump into scope of a
+	//	// ...
+	//	ly:
+	//	X a = 1; // X is undefined
+	//	// ...
+	//	lx:
+	//	goto ly; // OK, jump implies destructor
+	//	// call for a followed by construction
+	//	// again immediately following label ly
+	//	} 
+	public void test6_7s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 1);
+	}
+
+	// int foo(int i)
+	// {
+	// static int s = foo(2*i); // recursive call - undefined
+	// return i+1;
+	// }
+	public void test6_7s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int foo() {
+	// T(a)->m = 7; // expressionstatement
+	// T(a)++; //expressionstatement
+	// T(a,5)<<c; //expressionstatement
+	// T(*d)(int); //declaration
+	// T(e)[5]; //declaration
+	// T(f) = { 1, 2 }; // declaration
+	// T(*g)(double(3)); // declaration
+	// }
+	public void test6_8s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class T {
+	// // ...
+	// public:
+	// T();
+	// T(int);
+	// T(int, int);
+	// };
+	// T(a); //declaration
+	// T(*b)(); //declaration
+	// T(c)=7; //declaration
+	// T(d),e,f=3; //declaration
+	// extern int h;
+	// T(g)(h,2); //declaration
+	public void test6_8s2() throws Exception { // TODO raised bug 90622
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct T1 {
+	// T1 operator()(int x) { return T1(x); }
+	// int operator=(int x) { return x; }
+	// T1(int) { }
+	// };
+	// struct T2 { T2(int){ } };
+	// int a, (*(*b)(T2))(int), c, d;
+	// void f() {
+	// // disambiguation requires this to be parsed
+	// // as a declaration
+	// T1(a) = 3,
+	// T2(4), // T2 will be declared as
+	// (*(*b)(T2(c)))(int(d)); // a variable of type T1
+	// // but this will not allow
+	// // the last part of the
+	// // declaration to parse
+	// // properly since it depends
+	// // on T2 being a typename
+	// }
+	public void test6_8s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef char* Pc;
+	// void f(const Pc); // void f(char* const) (not const char*)
+	// void g(const int Pc); // void g(const int)
+	public void test7_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// void h(unsigned Pc); // void h(unsigned int)
+	// void k(unsigned int Pc); // void k(unsigned int)
+	public void test7_1s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// static char* f(); // f() has internal linkage
+	// char* f() // f() still has internal linkage
+	// { //
+	// }
+	// char* g(); // g() has external linkage
+	// static char* g() // error: inconsistent linkage
+	// { // 
+	// }
+	// void h();
+	// inline void h(); // external linkage
+	// inline void l();
+	// void l(); // external linkage
+	// inline void m();
+	// extern void m(); // external linkage
+	// static void n();
+	// inline void n(); // internal linkage
+	// static int a; // a has internal linkage
+	// int a; // error: two definitions
+	// static int b; // b has internal linkage
+	// extern int b; // b still has internal linkage
+	// int c; // c has external linkage
+	// static int c; // error: inconsistent linkage
+	// extern int d; // d has external linkage
+	// static int d; // error: inconsistent linkage
+	public void test7_1_1s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct S;
+	// extern S a;
+	// extern S f();
+	// extern void g(S);
+	// void h()
+	// {
+	// g(a); //error: S is incomplete
+	// f(); //error: S is incomplete
+	// }
+	public void test7_1_1s8a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// mutable const int* p; // OK
+	// mutable int* const q; // illformed
+	// };
+	public void test7_1_1s8b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef int MILES, *KLICKSP;
+	// MILES distance;
+	// extern KLICKSP metricp;
+	public void test7_1_3s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef struct s { //
+	// } s;
+	// typedef int I;
+	// typedef int I;
+	// typedef I I;
+	public void test7_1_3s2() throws Exception { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+
+	// class complex { // 
+	// };
+	// typedef int complex; // error: redefinition
+	public void test7_1_3s3a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef int complex;
+	// class complex { // 
+	// }; // error: redefinition
+	public void test7_1_3s3b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct S {
+	// S();
+	// ~S();
+	// };
+	// typedef struct S T;
+	// S a = T(); // OK
+	// struct T * p; // error
+	public void test7_1_3s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef struct { } *ps, S; // S is the class name for linkage purposes
+	public void test7_1_3s5a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef struct {
+	// S(); //error: requires a return type because S is
+	// // an ordinary member function, not a constructor
+	// } S;
+	public void test7_1_3s5b() throws Exception {
+		IASTTranslationUnit tu= parseWithErrors(getAboveComment(), ParserLanguage.CPP);
+		IASTCompositeTypeSpecifier comp= getCompositeType(tu, 0);
+		IASTDeclaration d= getDeclaration(comp, 0);
+		assertInstance(d, IASTProblemDeclaration.class);
+	}
+
+	// int foo() {
+	// const int ci = 3; // cvqualified (initialized as required)
+	// ci = 4; // illformed: attempt to modify const
+	// int i = 2; // not cvqualified
+	// const int* cip; // pointer to const int
+	// cip = &i; // OK: cvqualified access path to unqualified
+	// *cip = 4; // illformed: attempt to modify through ptr to const
+	// int* ip;
+	// ip = const_cast<int*>(cip); // cast needed to convert const int* to int*
+	// *ip = 4; // defined: *ip points to i, a nonconst object
+	// const int* ciq = new const int (3); // initialized as required
+	// int* iq = const_cast<int*>(ciq); // cast required
+	// *iq = 4; // undefined: modifies a const object
+	// }
+	public void test7_1_5_1s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// public:
+	// mutable int i;
+	// int j;
+	// };
+	// class Y {
+	// public:
+	// X x;
+	// Y();
+	// };
+	// 
+	// int foo() {
+	// const Y y;
+	// y.x.i++; //wellformed: mutable member can be modified
+	// y.x.j++; //illformed: constqualified member modified
+	// Y* p = const_cast<Y*>(&y); // cast away constness of y
+	// p->x.i = 99; // wellformed: mutable member can be modified
+	// p->x.j = 99; // undefined: modifies a const member
+	// }
+	public void test7_1_5_1s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// enum { a, b, c=0 };
+	// enum { d, e, f=e+2 };
+	public void test7_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int foo() {
+	// const int x = 12;
+	// { enum { x = x }; }
+	// }
+	public void test7_2s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int foo() {
+	// enum color { red, yellow, green=20, blue };
+	// color col = red;
+	// color* cp = &col;
+	// if (*cp == blue) // ...
+	// return 0;
+	// }
+	public void test7_2s8() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// public:
+	// enum direction { left='l', right='r' };
+	// int f(int i)
+	// { return i==left ? 0 : i==right ? 1 : 2; }
+	// };
+	// void g(X* p)
+	// {
+	// direction d; // error: direction not in scope
+	// int i;
+	// i = p->f(left); // error: left not in scope
+	// i = p>
+	// f(X::right); // OK
+	// i = p>
+	// f(p->left); // OK
+	// // ...
+	// }
+	public void test7_2s10() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// namespace Outer {
+	// int i;
+	// namespace Inner {
+	// void f() { i++; } // Outer::i
+	// int i;
+	// void g() { i++; } // Inner::i
+	// }
+	// }
+	public void test7_3_1s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace { int i; } // unique::i
+	// void f() { i++; } // unique::i++
+	// namespace A {
+	// namespace {
+	// int i; // A::unique::i
+	// int j; // A::unique::j
+	// }
+	// void g() { i++; } // A::unique::i++
+	// }
+	// using namespace A;
+	// void h() {
+	// i++; //error: unique::i or A::unique::i
+	// A::i++; // A::unique::i
+	// j++; // A::unique::j
+	// }
+	public void test7_3_1_1s1() throws Exception {
+		String[] problems= {"i"};
+		parse(getAboveComment(), ParserLanguage.CPP, problems);
+	}
+
+	// namespace X {
+	// void f() { //
+	// }
+	// }
+	public void test7_3_1_2s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace Q {
+	// namespace V {
+	// void f();
+	// }
+	// void V::f() { } // OK
+	// void V::g() { } // error: g() is not yet a member of V
+	// namespace V {
+	// void g();
+	// }
+	// }
+	// namespace R {
+	// void Q::V::g() {  } // error: R doesn't enclose Q
+	// }
+	public void test7_3_1_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 2);
+	}
+
+	// // Assume f and g have not yet been defined.
+	// void h(int);
+	// namespace A {
+	// class X {
+	// friend void f(X); // A::f is a friend
+	// class Y {
+	// friend void g(); // A::g is a friend
+	// friend void h(int); // A::h is a friend
+	// // ::h not considered
+	// };
+	// };
+	// // A::f, A::g and A::h are not visible here
+	// X x;
+	// void g() { f(x); } // definition of A::g
+	// void f(X) { } // definition of A::f
+	// void h(int) { } // definition of A::h
+	// // A::f, A::g and A::h are visible here and known to be friends
+	// }
+	// using A::x;
+	// void h()
+	// {
+	// A::f(x);
+	// A::X::f(x); //error: f is not a member of A::X
+	// A::X::Y::g(); // error: g is not a member of A::X::Y
+	// }
+	public void test7_3_1_2s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 4);
+	}
+
+	// namespace Company_with_very_long_name {  }
+	// namespace CWVLN = Company_with_very_long_name;
+	// namespace CWVLN = Company_with_very_long_name; // OK: duplicate
+	// namespace CWVLN = CWVLN;
+	public void test7_3_2s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct B {
+	// void f(char);
+	// void g(char);
+	// enum E { e };
+	// union { int x; };
+	// };
+	// struct D : B {
+	// using B::f;
+	// void f(int) { f('c'); } // calls B::f(char)
+	// void g(int) { g('c'); } // recursively calls D::g(int)
+	// };
+	public void test7_3_3s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class C {
+	// int g();
+	// };
+	// class D2 : public B {
+	// using B::f; // OK: B is a base of D2
+	// using B::e; // OK: e is an enumerator of base B
+	// using B::x; // OK: x is a union member of base B
+	// using C::g; // error: C isn't a base of D2
+	// };
+	public void test7_3_3s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class A {
+	// public:
+	// template <class T> void f(T);
+	// template <class T> struct X { };
+	// };
+	// class B : public A {
+	// public:
+	// using A::f<double>; // illformed
+	// using A::X<int>; // illformed
+	// };
+	public void test7_3_3s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct X {
+	// int i;
+	// static int s;
+	// };
+	// void f()
+	// {
+	// using X::i; // error: X::i is a class member
+	// // and this is not a member declaration.
+	// using X::s; // error: X::s is a class member
+	// // and this is not a member declaration.
+	// }
+	public void test7_3_3s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// void f();
+	// namespace A {
+	// void g();
+	// }
+	// namespace X {
+	// using ::f; // global f
+	// using A::g; // A's g
+	// }
+	// void h()
+	// {
+	// X::f(); //calls ::f
+	// X::g(); //calls A::g
+	// }
+	public void test7_3_3s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace A {
+	// int i;
+	// }
+	// namespace A1 {
+	// using A::i;
+	// using A::i; // OK: double declaration
+	// }
+	// void f()
+	// {
+	// using A::i;
+	// using A::i; // error: double declaration
+	// }
+	// class B {
+	// public:
+	// int i;
+	// };
+	// class X : public B {
+	// using B::i;
+	// using B::i; // error: double member declaration
+	// };
+	public void test7_3_3s8() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace A {
+	// void f(int);
+	// }
+	// using A::f; // f is a synonym for A::f;
+	// // that is, for A::f(int).
+	// namespace A {
+	// void f(char);
+	// }
+	// void foo()
+	// {
+	// f('a'); //calls f(int),
+	// } //even though f(char) exists.
+	// void bar()
+	// {
+	// using A::f; // f is a synonym for A::f;
+	// // that is, for A::f(int) and A::f(char).
+	// f('a'); //calls f(char)
+	// }
+	public void test7_3_3s9() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct B {
+	// virtual void f(int);
+	// virtual void f(char);
+	// void g(int);
+	// void h(int);
+	// };
+	// struct D : B {
+	// using B::f;
+	// void f(int); // OK: D::f(int) overrides B::f(int);
+	// using B::g;
+	// void g(char); // OK
+	// using B::h;
+	// void h(int); // OK: D::h(int) hides B::h(int)
+	// };
+	// void k(D* p)
+	// {
+	// p->f(1); //calls D::f(int)
+	// p->f('a'); //calls B::f(char)
+	// p->g(1); //calls B::g(int)
+	// p->g('a'); //calls D::g(char)
+	// }
+	public void test7_3_3s12() throws Exception { // raised bug 161562 for that
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace A {
+	// int x;
+	// }
+	// namespace B {
+	// int i;
+	// struct g { };
+	// struct x { };
+	// void f(int);
+	// void f(double);
+	// void g(char); // OK: hides struct g
+	// }
+	// void func()
+	// {
+	// int i;
+	// //using B::i; // error: i declared twice
+	// void f(char);
+	// using B::f; // OK: each f is a function
+	// f(3.5); //calls B::f(double)
+	// using B::g;
+	// g('a'); //calls B::g(char)
+	// struct g g1; // g1 has class type B::g
+	// using B::x;
+	// using A::x; // OK: hides struct B::x
+	// x = 99; // assigns to A::x
+	// struct x x1; // x1 has class type B::x
+	// }
+	public void test7_3_3s10() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace B {
+	// void f(int);
+	// void f(double);
+	// }
+	// namespace C {
+	// void f(int);
+	// void f(double);
+	// void f(char);
+	// }
+	// void h()
+	// {
+	// using B::f; // B::f(int) and B::f(double)
+	// using C::f; // C::f(int), C::f(double), and C::f(char)
+	// f('h'); //calls C::f(char)
+	// f(1); //error: ambiguous: B::f(int) or C::f(int) ?
+	// void f(int); // error:
+	// // f(int) conflicts with C::f(int) and B::f(int)
+	// }
+	public void test7_3_3s11() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}	
+
+	// struct A { int x(); };
+	// struct B : A { };
+	// struct C : A {
+	// using A::x;
+	// int x(int);
+	// };
+	// struct D : B, C {
+	// using C::x;
+	// int x(double);
+	// };
+	// int f(D* d) {
+	// return d>
+	// x(); // ambiguous: B::x or C::x
+	// }
+	public void test7_3_3s14() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class A {
+	// private:
+	// void f(char);
+	// public:
+	// void f(int);
+	// protected:
+	// void g();
+	// };
+	// class B : public A {
+	// using A::f; // error: A::f(char) is inaccessible
+	// public:
+	// using A::g; // B::g is a public synonym for A::g
+	// };
+	public void test7_3_3s15() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace A {
+	// int i;
+	// namespace B {
+	// namespace C {
+	// int i;
+	// }
+	// using namespace A::B::C;
+	// void f1() {
+	// i = 5; // OK, C::i visible in B and hides A::i
+	// }
+	// }
+	// namespace D {
+	// using namespace B;
+	// using namespace C;
+	// void f2() {
+	// i = 5; // ambiguous, B::C::i or A::i?
+	// }
+	// }
+	// void f3() {
+	// i = 5; // uses A::i
+	// }
+	// }
+	// void f4() {
+	// i = 5; // illformed; neither i is visible
+	// }
+	public void test7_3_4s1() throws Exception {
+		String[] problems= {"i", "i"};
+		parse(getAboveComment(), ParserLanguage.CPP, problems);
+	}
+
+	// namespace M {
+	// int i;
+	// }
+	// namespace N {
+	// int i;
+	// using namespace M;
+	// }
+	// void f()
+	// {
+	// using namespace N;
+	// i = 7; // error: both M::i and N::i are visible
+	// }
+	public void test7_3_4s2a() throws Exception {
+		String[] problems= {"i"};
+		parse(getAboveComment(), ParserLanguage.CPP, problems);
+	}
+
+	// namespace A {
+	// int i;
+	// }
+	// namespace B {
+	// int i;
+	// int j;
+	// namespace C {
+	// namespace D {
+	// using namespace A;
+	// int j;
+	// int k;
+	// int a = i; // B::i hides A::i
+	// }
+	// using namespace D;
+	// int k = 89; // no problem yet
+	// int l = k; // ambiguous: C::k or D::k
+	// int m = i; // B::i hides A::i
+	// int n = j; // D::j hides B::j
+	// }
+	// }
+	public void test7_3_4s2b() throws Exception {
+		String[] problems= {"k"};
+		parse(getAboveComment(), ParserLanguage.CPP, problems);
+	}
+
+	// namespace D {
+	// int d1;
+	// void f(char);
+	// }
+	// using namespace D;
+	// int d1; // OK: no conflict with D::d1
+	// namespace E {
+	// int e;
+	// void f(int);
+	// }
+	// namespace D { // namespace extension
+	// int d2;
+	// using namespace E;
+	// void f(int);
+	// }
+	// void f()
+	// {
+	// d1++; //error: ambiguous ::d1 or D::d1?
+	// ::d1++; //OK
+	// D::d1++; //OK
+	// d2++; //OK: D::d2
+	// e++; //OK: E::e
+	// f(1); //error: ambiguous: D::f(int) or E::f(int)?
+	// f('a'); //OK: D::f(char)
+	// }
+	public void test7_3_4s5() throws Exception {
+		String[] problems= {"d1", "f"};
+		parse(getAboveComment(), ParserLanguage.CPP, problems);
+	}
+
+	// complex sqrt(complex); // C++ linkage by default
+	// extern "C" {
+	// double sqrt(double); // C linkage
+	// }
+	public void test7_5s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// extern "C" void f1(void(*pf)(int));
+	// // the name f1 and its function type have C language
+	// // linkage; pf is a pointer to a C function
+	// extern "C" typedef void FUNC();
+	// FUNC f2; // the name f2 has C++ language linkage and the
+	// // function's type has C language linkage
+	// extern "C" FUNC f3; // the name of function f3 and the function's type
+	// // have C language linkage
+	// void (*pf2)(FUNC*); // the name of the variable pf2 has C++ linkage and
+	// // the type of pf2 is pointer to C++ function that
+	// // takes one parameter of type pointer to C function
+	public void test7_5s4a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// extern "C" typedef void FUNC_c();
+	// class C {
+	// void mf1(FUNC_c*); // the name of the function mf1 and the member
+	// // function's type have C++ language linkage; the
+	// // parameter has type pointer to C function
+	// FUNC_c mf2; // the name of the function mf2 and the member
+	// // function's type have C++ language linkage
+	// static FUNC_c* q; // the name of the data member q has C++ language
+	// // linkage and the data member's type is pointer to
+	// // C function
+	// };
+	// extern "C" {
+	// class X {
+	// void mf(); // the name of the function mf and the member
+	// // function's type have C++ language linkage
+	// void mf2(void(*)()); // the name of the function mf2 has C++ language
+	// // linkage; the parameter has type pointer to
+	// // C function
+	// };
+	// }
+	public void test7_5s4b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace A {
+	// extern "C" int f();
+	// extern "C" int g() { return 1; }
+	// extern "C" int h();
+	// }
+	// namespace B {
+	// extern "C" int f(); // A::f and B::f refer
+	// // to the same function
+	// extern "C" int g() { return 1; } // illformed,
+	// // the function g
+	// // with C language linkage
+	// // has two definitions
+	// }
+	// int A::f() { return 98; } // definition for the function f
+	// // with C language linkage
+	// extern "C" int h() { return 97; }
+	// // definition for the function h
+	// // with C language linkage
+	// // A::h and ::h refer to the same function
+	public void test7_5s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// extern "C" double f();
+	// static double f(); // error
+	public void test7_5s7a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// extern "C" int i; // declaration
+	// extern "C" {
+	// int i; // definition
+	// }
+	public void test7_5s7b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// extern "C" static void f(); // error
+	public void test7_5s7c() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int i;
+	// int *pi;
+	// int *p[3];
+	// int (*p3i)[3];
+	// int *f();
+	// int (*pf)(double);
+	public void test8_1s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct S {
+	// S(int);
+	// };
+	// void foo(double a)
+	// {
+	// S w(int(a)); // function declaration
+	// S x(int()); // function declaration
+	// S y((int)a); // object declaration
+	// S z = int(a); // object declaration
+	// }
+	public void test8_2s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template <class T>
+	// struct S {
+	// T *p;
+	// };
+	// S<int()> x; // typeid
+	// S<int(1)> y; // expression (illformed)
+	public void test8_2s4() throws Exception {
+		IASTTranslationUnit tu= parse(getAboveComment(), ParserLanguage.CPP, true, 1);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertInstance(col.getName(4), ICPPASTTemplateId.class);
+		assertInstance(((ICPPASTTemplateId)col.getName(4)).getTemplateArguments()[0], IASTTypeId.class);
+		
+		final IASTName S_int_1 = col.getName(7);
+		assertInstance(S_int_1, ICPPASTTemplateId.class);
+		assertInstance(((ICPPASTTemplateId)S_int_1).getTemplateArguments()[0], IASTExpression.class);
+		assertInstance(S_int_1.getBinding(), IProblemBinding.class);
+	}
+
+	// void foo()
+	// {
+	// sizeof(int(1)); // expression
+	// // sizeof(int()); // typeid (illformed)
+	// }
+	public void test8_2s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// void foo()
+	// {
+	// (int(1)); //expression
+	// // (int())1; //typeid (illformed)
+	// }
+	public void test8_2s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class C { };
+	// void f(int(C)) { } // void f(int (*fp)(C c)) { }
+	// // not: void f(int C);
+	// int g(C);
+	// void foo() {
+	// f(1); //error: cannot convert 1 to function pointer
+	// f(g); //OK
+	// }
+	public void test8_2s7a() throws Exception { // TODO raised bug 90633
+		final String code = getAboveComment();
+		parse(code, ParserLanguage.CPP, true, 1);
+		
+		BindingAssertionHelper ba= new BindingAssertionHelper(code, true);
+		IFunction f= ba.assertNonProblem("f", 1, IFunction.class);
+		isTypeEqual(f.getType(), "void (int (C) *)");
+	}
+
+	// class C { };
+	// void h(int *(C[10])); // void h(int *(*_fp)(C _parm[10]));
+	// // not: void h(int *C[10]);
+	public void test8_2s7b() throws Exception {
+		final String code = getAboveComment();
+		parse(code, ParserLanguage.CPP, true, 0);
+		BindingAssertionHelper ba= new BindingAssertionHelper(code, true);
+		IFunction f= ba.assertNonProblem("h", 1, IFunction.class);
+		isTypeEqual(f.getType(), "void (int * (C *) *)");
+	}
+
+	// namespace A {
+	// struct B {
+	// void f();
+	// };
+	// void A::B::f() { } // illformed: the declarator must not be
+	// // qualified with A::
+	// }
+	public void test8_3s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int unsigned i;
+	public void test8_3s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// const int ci = 10, *pc = &ci, *const cpc = pc, **ppc;
+	// int i, *p, *const cp = &i;
+	// 
+	// int f() {
+	// i = ci;
+	// *cp = ci;
+	// pc++;
+	// pc = cpc;
+	// pc = p;
+	// ppc = &pc;
+	// }
+	public void test8_3_1s2a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// const int ci = 10, *pc = &ci, *const cpc = pc, **ppc;
+	// int i, *p, *const cp = &i;
+	// int f() {
+	// ci = 1; // error
+	// ci++; //error
+	// *pc = 2; // error
+	// cp = &ci; // error
+	// cpc++; //error
+	// p = pc; // error
+	// ppc = &p; // error
+	// }
+	public void test8_3_1s2b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// const int ci = 10, *pc = &ci, *const cpc = pc, **ppc;
+	// int i, *p, *const cp = &i;
+	// int f() {
+	// *ppc = &ci; // OK, but would make p point to ci ...
+	// *p = 5; // clobber ci
+	// }
+	public void test8_3_1s2c() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef int& A;
+	// const A aref = 3; // illformed;
+	// // nonconst reference initialized with rvalue
+	public void test8_3_2s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// void f(double& a) { a += 3.14; }
+	// // ...
+	// int foo() {
+	// double d = 0;
+	// f(d);
+	// int v[20];
+	// // ...
+	// int& g(int i) { return v[i]; }
+	// // ...
+	// g(3) = 7;
+	// }
+	// struct link {
+	// link* next;
+	// };
+	// link* first;
+	// void h(link*& p) // p is a reference to pointer
+	// {
+	// p->next = first;
+	// first = p;
+	// p = 0;
+	// }
+	// void k()
+	// {
+	// link* q = new link;
+	// h(q);
+	// }
+	public void test8_3_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// public:
+	// void f(int);
+	// int a;
+	// };
+	// class Y;
+	// 
+	// void f() {
+	// int X::* pmi = &X::a;
+	// void (X::* pmf)(int) = &X::f;
+	// double X::* pmd;
+	// char Y::* pmc;
+	// X obj;
+	// //...
+	// obj.*pmi = 7; // assign 7 to an integer
+	// // member of obj
+	// (obj.*pmf)(7); //call a function member of obj
+	// // with the argument 7
+	// }
+	public void test8_3_3s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef int A[5], AA[2][3];
+	// typedef const A CA; // type is ''array of 5 const int''
+	// typedef const AA CAA; // type is ''array of 2 array of 3 const int''
+	public void test8_3_4s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// float fa[17], *afp[17];
+	// static int x3d[3][5][7];
+	public void test8_3_4s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int x[3][5];
+	public void test8_3_4s8() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int printf(const char*, ...);
+	// int f() {
+	// int a=1, b=0;
+	// printf("hello world");
+	// printf("a=%d b=%d", a, b);
+	// }
+	public void test8_3_5s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef void F();
+	// struct S {
+	// const F f; // illformed:
+	// // not equivalent to: void f() const;
+	// };
+	public void test8_3_5s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// #define FILE int
+	// int fseek(FILE*, long, int);
+	public void test8_3_5s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef void F();
+	// F fv; // OK: equivalent to void fv();
+	// // F fv { } // illformed
+	// void fv() { } // OK: definition of fv
+	public void test8_3_5s7a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef int FIC(int) const;
+	// FIC f; // illformed:
+	// //does not declare a member function
+	// struct S {
+	// FIC f; // OK
+	// };
+	// FIC S::*pm = &S::f; // OK
+	public void test8_3_5s7b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int i,
+	// *pi,
+	// f(),
+	// *fpi(int),
+	// (*pif)(const char*, const char*);
+	// (*fpif(int))(int);
+	public void test8_3_5s9a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef int IFUNC(int);
+	// IFUNC* fpif(int);
+	public void test8_3_5s9b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// void point(int = 3, int = 4);
+	// void f() {
+	// point(1,2); point(1); point();
+	// }
+	public void test8_3_6s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// void f(int, int);
+	// void f(int, int = 7);
+	// void h()
+	// {
+	// f(3); //OK, calls f(3, 7)
+	// void f(int = 1, int); // error: does not use default
+	// // from surrounding scope
+	// }
+	// void m()
+	// {
+	// void f(int, int); // has no defaults
+	// f(4); //error: wrong number of arguments
+	// void f(int, int = 5); // OK
+	// f(4); //OK, calls f(4, 5);
+	// void f(int, int = 5); // error: cannot redefine, even to
+	// // same value
+	// }
+	// void n()
+	// {
+	// f(6); //OK, calls f(6, 7)
+	// }
+	public void test8_3_6s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// int a = 1;
+	// int f(int);
+	// int g(int x = f(a)); // default argument: f(::a)
+	// void h() {
+	// a = 2;
+	// {
+	// int a = 3;
+	// g(); // g(f(::a))
+	// }
+	// }
+	public void test8_3_6s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class C {
+	// void f(int i = 3);
+	// void g(int i, int j = 99);
+	// };
+	// void C::f(int i = 3) // error: default argument already
+	// { } // specified in class scope
+	// void C::g(int i = 88, int j) // in this translation unit,
+	// { }
+	public void test8_3_6s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// void f()
+	// {
+	// int i;
+	// extern void g(int x = i); // error
+	// // ...
+	// }
+	public void test8_3_6s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class A {
+	// void f(A* p = this) { } // error
+	// };
+	public void test8_3_6s8() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int a;
+	// int f(int a, int b = a); // error: parameter a
+	// // used as default argument
+	// typedef int I;
+	// int g(float I, int b = I(2)); // error: parameter I found
+	// int h(int a, int b = sizeof(a)); // error, parameter a used
+	public void test8_3_6s9a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// int b;
+	// class X {
+	// int a;
+	// int mem1(int i = a); // error: nonstatic member a
+	// // used as default argument
+	// int mem2(int i = b); // OK; use X::b
+	// static int b;
+	// };
+	public void test8_3_6s9b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int f(int = 0);
+	// void h()
+	// {
+	// int j = f(1);
+	// int k = f(); // OK, means f(0)
+	// }
+	// int (*p1)(int) = &f;
+	// int (*p2)() = &f; // error: type mismatch
+	public void test8_3_6s9c() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {
+	// virtual void f(int a = 7);
+	// };
+	// struct B : public A {
+	// void f(int a);
+	// };
+	// void m()
+	// {
+	// B* pb = new B;
+	// A* pa = pb;
+	// pa->f(); //OK, calls pa->B::f(7)
+	// pb->f(); //error: wrong number of arguments for B::f()
+	// }
+	public void test8_3_6s10() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// int max(int a, int b, int c)
+	// {
+	// int m = (a > b) ? a : b;
+	// return (m > c) ? m : c;
+	// }
+	public void test8_4s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int a;
+	// struct X {
+	// static int a;
+	// static int b;
+	// };
+	// int X::a = 1;
+	// int X::b = a; // X::b = X::a
+	public void test8_5s10() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {
+	// int x;
+	// struct B {
+	// int i;
+	// int j;
+	// } b;
+	// } a = { 1, { 2, 3 } };
+	public void test8_5_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int x[] = { 1, 3, 5 };
+	public void test8_5_1s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {
+	// int i;
+	// static int s;
+	// int j;
+	// } a = { 1, 2 };
+	public void test8_5_1s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// char cv[4] = { 'a', 's', 'd', 'f', 0 }; // error
+	public void test8_5_1s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct S { int a; char* b; int c; };
+	// S ss = { 1, "asdf" };
+	public void test8_5_1s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct S { };
+	// struct A {
+	// S s;
+	// int i;
+	// } a = { { } , 3 };
+	public void test8_5_1s8() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int x[2][2] = { 3, 1, 4, 2 };
+	// float y[4][3] = {
+	// { 1 }, { 2 }, { 3 }, { 4 }
+	// };
+	public void test8_5_1s10() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// float y[4][3] = {
+	// { 1, 3, 5 },
+	// { 2, 4, 6 },
+	// { 3, 5, 7 },
+	// };
+	public void test8_5_1s11a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// float y[4][3] = {
+	// 1, 3, 5, 2, 4, 6, 3, 5, 7
+	// };
+	public void test8_5_1s11b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {
+	// int i;
+	// operator int();
+	// };
+	// struct B {
+	// A a1, a2;
+	// int z;
+	// };
+	// A a;
+	// B b = { 4, a, a };
+	public void test8_5_1s12() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// union u { int a; char* b; };
+	// u a = { 1 };
+	// u b = a;
+	// u c = 1; // error
+	// u d = { 0, "asdf" }; // error
+	// u e = { "asdf" }; // error
+	public void test8_5_1s15() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// char msg[] = "Syntax error on line %s";
+	public void test8_5_2s1() throws Exception { 
+		// raised bug 90647
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// 	char cv[4] = "asdf"; // error
+	public void test8_5_2s2() throws Exception {
+		// we do not check the size of an array, which is ok.
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int& r1; // error: initializer missing
+	// extern int& r2; // OK
+	public void test8_5_3s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// double d = 2.0;
+	// double& rd = d; // rd refers to d
+	// const double& rcd = d; // rcd refers to d
+	// struct A { };
+	// struct B : public A { } b;
+	// A& ra = b; // ra refers to A subobject in b
+	// const A& rca = b; // rca refers to A subobject in b
+	public void test8_5_3s5a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// double& rd2 = 2.0; // error: not an lvalue and reference not const
+	// int i = 2;
+	// double& rd3 = i; // error: type mismatch and reference not const
+	public void test8_5_3s5b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A { };
+	// struct B : public A { } b;
+	// extern B f();
+	// const A& rca = f(); // Either bound to the A subobject of the B rvalue,
+	// // or the entire B object is copied and the reference
+	// // is bound to the A subobject of the copy
+	public void test8_5_3s5c() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// const double& rcd2 = 2; // rcd2 refers to temporary with value 2.0
+	// const volatile int cvi = 1;
+	// const int& r = cvi; // error: type qualifiers dropped
+	public void test8_5_3s5d() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct X { int a; };
+	// struct Y { int a; };
+	// X a1;
+	// Y a2;
+	// int a3;
+	// void test() {
+	// a1 = a2; // error: Y assigned to X
+	// a1 = a3; // error: int assigned to X
+	// }
+	// int f(X);
+	// int f(Y);
+	// struct S { int a; };
+	// struct S { int a; }; // error, double definition
+	public void test9_1s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct stat {
+	// // ...
+	// };
+	// stat gstat; // use plain stat to
+	// // define variable
+	// int stat(struct stat*); // redeclare stat as function
+	// void f()
+	// {
+	// struct stat* ps; // struct prefix needed
+	// // to name struct stat
+	// // ...
+	// stat(ps); //call stat()
+	// // ...
+	// }
+	public void test9_1s2a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct s { int a; };
+	// void g()
+	// {
+	// struct s; // hide global struct s
+	// // with a local declaration
+	// s* p; // refer to local struct s
+	// struct s { char* p; }; // define local struct s
+	// struct s; // redeclaration, has no effect
+	// }
+	public void test9_1s2b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class Vector;
+	// class Matrix {
+	// // ...
+	// friend Vector operator*(Matrix&, Vector&);
+	// };
+	// class Vector {
+	// // ...
+	// friend Vector operator*(Matrix&, Vector&);
+	// };
+	public void test9_1s2c() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct s { int a; };
+	// void g(int s)
+	// {
+	// struct s* p = new struct s; // global s
+	// p->a = s; // local s
+	// }
+	public void test9_1s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class A * A;
+	public void test9_1s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct tnode {
+	// char tword[20];
+	// int count;
+	// tnode *left;
+	// tnode *right;
+	// };
+	// tnode s, *sp;
+	public void test9_2s11() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct X {
+	// typedef int T;
+	// static T count;
+	// void f(T);
+	// };
+	// void X::f(T t = count) { }
+	public void test9_3s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef void fv(void);
+	// typedef void fvc(void) const;
+	// struct S {
+	// fv memfunc1; // equivalent to: void memfunc1(void);
+	// void memfunc2();
+	// fvc memfunc3; // equivalent to: void memfunc3(void) const;
+	// };
+	// fv S::* pmfv1 = &S::memfunc1;
+	// fv S::* pmfv2 = &S::memfunc2;
+	// fvc S::* pmfv3 = &S::memfunc3;
+	public void test9_3s9() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct tnode {
+	// char tword[20];
+	// int count;
+	// tnode *left;
+	// tnode *right;
+	// void set(char*, tnode* l, tnode* r);
+	// };
+	// void tnode::set(char* w, tnode* l, tnode* r)
+	// {
+	// count = strlen(w)+1;
+	// if (sizeof(tword)<=count)
+	// perror("tnode string too long");
+	// strcpy(tword,w);
+	// left = l;
+	// right = r;
+	// }
+	// void f(tnode n1, tnode n2)
+	// {
+	// n1.set("abc",&n2,0);
+	// n2.set("def",0,0);
+	// }
+	public void test9_3_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct X {
+	// void g() const;
+	// void h() const volatile;
+	// };
+	public void test9_3_1s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct s {
+	// int a;
+	// int f() const;
+	// int g() { return a++; }
+	// int h() const { return a++; } // error
+	// };
+	// int s::f() const { return a; }
+	public void test9_3_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct s {
+	// int a;
+	// int f() const;
+	// int g() { return a++; }
+	// };
+	// int s::f() const { return a; }
+	// 
+	// void k(s& x, const s& y)
+	// {
+	// x.f();
+	// x.g();
+	// y.f();
+	// y.g(); //error
+	// }
+	public void test9_3_2s4() throws Exception {
+		String[] problems= {"g"};
+		final String code = getAboveComment();
+		IASTTranslationUnit tu= parse(code, ParserLanguage.CPP, problems);
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		bh.assertNonProblem("g();", 1); 
+		bh.assertProblem("g(); //error", 1); 
+	}
+
+	// class process {
+	// public:
+	// static void reschedule();
+	// };
+	// process& g();
+	// void f()
+	// {
+	// process::reschedule(); // OK: no object necessary
+	// g().reschedule(); // g() is called
+	// }
+	public void test9_4s2a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int g();
+	// struct X {
+	// static int g();
+	// };
+	// struct Y : X {
+	// static int i;
+	// };
+	// int Y::i = g(); // equivalent to Y::g();
+	public void test9_4s2b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class process {
+	// static process* run_chain;
+	// static process* running;
+	// };
+	// process* process::running = get_main();
+	// process* process::run_chain = running;
+	public void test9_4_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// void f()
+	// {
+	// union { int a; char* p; };
+	// a = 1;
+	// // ...
+	// p = "Jennifer";
+	// // ...
+	// }
+	public void test9_5s2() throws Exception { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int foo() {
+	// union { int aa; char* p; } obj, *ptr = &obj;
+	// aa = 1; // error
+	// ptr->aa = 1; // OK
+	// }
+	public void test9_5s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// enum BOOL { f=0, t=1 };
+	// struct A {
+	// BOOL b:1;
+	// };
+	// A a;
+	// void f() {
+	// a.b = t;
+	// if (a.b == t) // shall yield true
+	// {  }
+	// }
+	public void test9_6s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int x;
+	// int y;
+	// class enclose {
+	// public:
+	// int x;
+	// static int s;
+	// class inner {
+	// void f(int i)
+	// {
+	// int a = sizeof(x); // error: refers to enclose::x
+	// x = i; // error: assign to enclose::x
+	// s = i; // OK: assign to enclose::s
+	// ::x = i; // OK: assign to global x
+	// y = i; // OK: assign to global y
+	// }
+	// void g(enclose* p, int i)
+	// {
+	// p>
+	// x = i; // OK: assign to enclose::x
+	// }
+	// };
+	// };
+	// inner* p = 0; // error: inner not in scope
+	public void test9_7s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class enclose {
+	// public:
+	// class inner {
+	// static int x;
+	// void f(int i);
+	// };
+	// };
+	// int enclose::inner::x = 1;
+	// void enclose::inner::f(int i) {  }
+	public void test9_7s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class E {
+	// class I1; // forward declaration of nested class
+	// class I2;
+	// class I1 {}; // definition of nested class
+	// };
+	// class E::I2 {}; // definition of nested class
+	public void test9_7s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int x;
+	// void f()
+	// {
+	// static int s ;
+	// int x;
+	// extern int g();
+	// struct local {
+	// int g() { return x; } // error: x is auto
+	// int h() { return s; } // OK
+	// int k() { return ::x; } // OK
+	// int l() { return g(); } // OK
+	// };
+	// // ...
+	// }
+	// local* p = 0; // error: local not in scope
+	public void test9_8s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class X {
+	// public:
+	// typedef int I;
+	// class Y { /* ... */ };
+	// I a;
+	// };
+	// I b; // error
+	// Y c; // error
+	// X::Y d; // OK
+	// X::I e; // OK
+	public void test9_9s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class Base {
+	// public:
+	// int a, b, c;
+	// };
+	// class Derived : public Base {
+	// public:
+	// int b;
+	// };
+	// class Derived2 : public Derived {
+	// public:
+	// int c;
+	// };
+	public void test10s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class A {  };
+	// class B {  };
+	// class C {  };
+	// class D : public A, public B, public C {  };
+	public void test10_1s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {  };
+	// class Y : public X, public X {  }; // illformed
+	public void test10_1s3a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class L { public: int next;  };
+	// class A : public L {  };
+	// class B : public L {  };
+	// class C : public A, public B { void f();  }; // wellformed
+	// class D : public A, public L { void f();  }; // wellformed
+	// 
+	public void test10_1s3b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class A {
+	// public:
+	// int a;
+	// int (*b)();
+	// int f();
+	// int f(int);
+	// int g();
+	// };
+	// class B {
+	// int a;
+	// int b();
+	// public:
+	// int f();
+	// int g;
+	// int h();
+	// int h(int);
+	// };
+	// class C : public A, public B {};
+	// void g(C* pc)
+	// {
+	// pc->a = 1; // error: ambiguous: A::a or B::a
+	// pc->b(); //error: ambiguous: A::b or B::b
+	// pc->f(); //error: ambiguous: A::f or B::f
+	// pc->f(1); //error: ambiguous: A::f or B::f
+	// pc->g(); //error: ambiguous: A::g or B::g
+	// pc->g = 1; // error: ambiguous: A::g or B::g
+	// pc->h(); //OK
+	// pc->h(1); //OK
+	// }
+	public void test10_2s3a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct U { static int i; };
+	// struct V : U { };
+	// struct W : U { using U::i; };
+	// struct X : V, W { void foo(); };
+	// void X::foo() {
+	// i; //finds U::i in two ways: as W::i and U::i in V
+	// // no ambiguity because U::i is static
+	// }
+	public void test10_2s3b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class A {
+	// public:
+	// int f();
+	// };
+	// class B {
+	// public:
+	// int f();
+	// };
+	// class C : public A, public B {
+	// int f() { return A::f() + B::f(); }
+	// };
+	public void test10_2s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class V { public: int v; };
+	// class A {
+	// public:
+	// int a;
+	// static int s;
+	// enum { e };
+	// };
+	// class B : public A, public virtual V {};
+	// class C : public A, public virtual V {};
+	// class D : public B, public C { };
+	// void f(D* pd)
+	// {
+	// pd->v++; //OK: only one v (virtual)
+	// pd->s++; //OK: only one s (static)
+	// int i = pd>
+	// e; // OK: only one e (enumerator)
+	// pd->a++; //error, ambiguous: two as in D
+	// }
+	public void test10_2s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class V { public: int f(); int x; };
+	// class W { public: int g(); int y; };
+	// class B : public virtual V, public W
+	// {
+	// public:
+	// int f(); int x;
+	// int g(); int y;
+	// };
+	// class C : public virtual V, public W { };
+	// class D : public B, public C { void glorp(); };
+	public void test10_2s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class V { };
+	// class A { };
+	// class B : public A, public virtual V { };
+	// class C : public A, public virtual V { };
+	// class D : public B, public C { };
+	// void g()
+	// {
+	// D d;
+	// B* pb = &d;
+	// A* pa = &d; // error, ambiguous: C's A or B's A?
+	// V* pv = &d; // OK: only one V subobject
+	// }
+	public void test10_2s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {
+	// virtual void f();
+	// };
+	// struct B : virtual A {
+	// virtual void f();
+	// };
+	// struct C : B , virtual A {
+	// using A::f;
+	// };
+	// void foo() {
+	// C c;
+	// c.f(); //calls B::f, the final overrider
+	// c.C::f(); //calls A::f because of the usingdeclaration
+	// }
+	public void test10_3s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class B {};
+	// class D : private B { friend class Derived; };
+	// struct Base {
+	// virtual void vf1();
+	// virtual void vf2();
+	// virtual void vf3();
+	// virtual B* vf4();
+	// virtual B* vf5();
+	// void f();
+	// };
+	// struct No_good : public Base {
+	// D* vf4(); // error: B (base class of D) inaccessible
+	// };
+	// class A;
+	// struct Derived : public Base {
+	// void vf1(); // virtual and overrides Base::vf1()
+	// void vf2(int); // not virtual, hides Base::vf2()
+	// char vf3(); // error: invalid difference in return type only
+	// D* vf4(); // OK: returns pointer to derived class
+	// A* vf5(); // error: returns pointer to incomplete class
+	// void f();
+	// };
+	// void g()
+	// {
+	// Derived d;
+	// Base* bp = &d; // standard conversion:
+	// // Derived* to Base*
+	// bp->vf1(); //calls Derived::vf1()
+	// bp->vf2(); //calls Base::vf2()
+	// bp->f(); //calls Base::f() (not virtual)
+	// B* p = bp->vf4(); // calls Derived::pf() and converts the
+	// // result to B*
+	// Derived* dp = &d;
+	// D* q = dp->vf4(); // calls Derived::pf() and does not
+	// // convert the result to B*
+	// dp->vf2(); //illformed: argument mismatch
+	// }
+	public void test10_3s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct A {
+	// virtual void f();
+	// };
+	// struct B1 : A { // note nonvirtual derivation
+	// void f();
+	// };
+	// struct B2 : A {
+	// void f();
+	// };
+	// struct D : B1, B2 { // D has two separate A subobjects
+	// };
+	// void foo()
+	// {
+	// D d;
+	// // A* ap = &d; // would be illformed:ambiguous
+	// B1* b1p = &d;
+	// A* ap = b1p;
+	// D* dp = &d;
+	// ap->f(); //calls D::B1::f
+	// dp->f(); //illformed: ambiguous
+	// }
+	public void test10_3s9() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct A {
+	// virtual void f();
+	// };
+	// struct VB1 : virtual A { // note virtual derivation
+	// void f();
+	// };
+	// struct VB2 : virtual A {
+	// void f();
+	// };
+	// struct Error : VB1, VB2 { // illformed
+	// };
+	// struct Okay : VB1, VB2 {
+	// void f();
+	// };
+	public void test10_3s10() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct VB1a : virtual A { // does not declare f
+	// };
+	// struct Da : VB1a, VB2 {
+	// };
+	// void foe()
+	// {
+	// VB1a* vb1ap = new Da;
+	// vb1ap->f(); //calls VB2::f
+	// }
+	public void test10_3s11() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class B { public: virtual void f(); };
+	// class D : public B { public: void f(); };
+	// void D::f() { B::f(); }
+	public void test10_3s12() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class point {  };
+	// class shape { // abstract class
+	// point center;
+	// // ...
+	// public:
+	// point where() { return center; }
+	// void move(point p) { center=p; draw(); }
+	// virtual void rotate(int) = 0; // pure virtual
+	// virtual void draw() = 0; // pure virtual
+	// // ...
+	// };
+	public void test10_4s2a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// Not legal C++
+	//	//	public void test10_4s2b() throws Exception {
+	//		StringBuffer buffer = new StringBuffer();
+	//		buffer.append("struct C {\n"); //$NON-NLS-1$
+	//		buffer.append("virtual void f() { }=0; // illformed\n"); //$NON-NLS-1$
+	//		buffer.append("};\n"); //$NON-NLS-1$
+	//		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	//	}
+
+	// shape x; // error: object of abstract class
+	// shape* p; // OK
+	// shape f(); // error
+	// void g(shape); // error
+	// shape& h(shape&); // OK
+	public void test10_4s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class ab_circle : public shape {
+	// int radius;
+	// public:
+	// void rotate(int) {}
+	// // ab_circle::draw() is a pure virtual
+	// };
+	public void test10_4s4a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class circle : public shape {
+	// int radius;
+	// public:
+	// void rotate(int) {}
+	// void draw(); // a definition is required somewhere
+	// };
+	public void test10_4s4b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class X {
+	// int a; // X::a is private by default
+	// };
+	// struct S {
+	// int a; // S::a is public by default
+	// };
+	public void test11s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class A
+	// {
+	// class B { };
+	// public:
+	// typedef B BB;
+	// };
+	// void f()
+	// {
+	// A::BB x; // OK, typedef name A::BB is public
+	// A::B y; // access error, A::B is private
+	// }
+	public void test11s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class A {
+	// typedef int I; // private member
+	// I f();
+	// friend I g(I);
+	// static I x;
+	// };
+	// A::I A::f() { return 0; }
+	// A::I g(A::I p = A::x);
+	// A::I g(A::I p) { return 0; }
+	// A::I A::x = 0;
+	public void test11s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class D {
+	// class E {
+	// static int m;
+	// };
+	// };
+	// int D::E::m = 1; // OK, no access error on private E
+	public void test11s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// int a; // X::a is private by default: class used
+	// public:
+	// int b; // X::b is public
+	// int c; // X::c is public
+	// };
+	public void test11_1s1a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct S {
+	// int a; // S::a is public by default: struct used
+	// protected:
+	// int b; // S::b is protected
+	// private:
+	// int c; // S::c is private
+	// public:
+	// int d; // S::d is public
+	// };
+	public void test11s1b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct S {
+	// class A;
+	// private:
+	// class A { }; // error: cannot change access
+	// };
+	public void test11_1s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class B {  };
+	// class D1 : private B {  };
+	// class D2 : public B {  };
+	// class D3 : B {  }; // B private by default
+	// struct D4 : public B {  };
+	// struct D5 : private B {  };
+	// struct D6 : B {  }; // B public by default
+	// class D7 : protected B {  };
+	// struct D8 : protected B {  };
+	public void test11_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class B {
+	// public:
+	// int mi; // nonstatic member
+	// static int si; // static member
+	// };
+	// class D : private B {
+	// };
+	// class DD : public D {
+	// void f();
+	// };
+	// void DD::f() {
+	// mi = 3; // error: mi is private in D
+	// si = 3; // error: si is private in D
+	// B b;
+	// b.mi = 3; // OK (b.mi is different from this->mi)
+	// b.si = 3; // OK (b.si is different from this->si)
+	// B::si = 3; // OK
+	// B* bp1 = this; // error: B is a private base class
+	// B* bp2 = (B*)this; // OK with cast
+	// bp2->mi = 3; // OK: access through a pointer to B.
+	// }
+	public void test11_2s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class B;
+	// class A {
+	// private:
+	// int i;
+	// friend void f(B*);
+	// };
+	// class B : public A { };
+	// void f(B* p) {
+	// p->i = 1; // OK: B* can be implicitly cast to A*,
+	// // and f has access to i in A
+	// }
+	public void test11_2s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// int a;
+	// friend void friend_set(X*, int);
+	// public:
+	// void member_set(int);
+	// };
+	// void friend_set(X* p, int i) { p->a = i; }
+	// void X::member_set(int i) { a = i; }
+	// void f()
+	// {
+	// X obj;
+	// friend_set(&obj,10);
+	// obj.member_set(10);
+	// }
+	public void test11_4s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class A {
+	// class B { };
+	// friend class X;
+	// };
+	// class X : A::B { // illformed:
+	// //A::B cannot be accessed
+	// // in the baseclause for X
+	// A::B mx; // OK: A::B used to declare member of X
+	// class Y : A::B { // OK: A::B used to declare member of X
+	// A::B my; // illformed: A::B cannot be accessed
+	// // to declare members of nested class of X
+	// };
+	// };
+	public void test11_4s2a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// enum { a=100 };
+	// friend class Y;
+	// };
+	// class Y {
+	// int v[X::a]; // OK, Y is a friend of X
+	// };
+	// class Z {
+	// int v[X::a]; // error: X::a is private
+	// };
+	public void test11_4s2b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class Y {
+	// friend char* X::foo(int);
+	// // ...
+	// };
+	public void test11_4s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class M {
+	// friend void f() { } // definition of global f, a friend of M,
+	// // not the definition of a member function
+	// };
+	public void test11_4s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class A {
+	// friend class B;
+	// int a;
+	// };
+	// class B {
+	// friend class C;
+	// };
+	// class C {
+	// void f(A* p)
+	// {
+	// p->a++; //error: C is not a friend of A
+	// // despite being a friend of a friend
+	// }
+	// };
+	// class D : public B {
+	// void f(A* p)
+	// {
+	// p->a++; //error: D is not a friend of A
+	// // despite being derived from a friend
+	// }
+	// };
+	public void test11_4s8() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X;
+	// void a();
+	// void f() {
+	// class Y;
+	// extern void b();
+	// class A {
+	// friend class X; // OK, but X is a local class, not ::X
+	// friend class Y; // OK
+	// friend class Z; // OK, introduces local class Z
+	// friend void a(); // error, ::a is not considered
+	// friend void b(); // OK
+	// friend void c(); // error
+	// };
+	// X *px; // OK, but ::X is found
+	// Z *pz; // error, no Z is found
+	// }
+	public void test11_4s9() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class B {
+	// protected:
+	// int i;
+	// static int j;
+	// };
+	// class D1 : public B {
+	// };
+	// class D2 : public B {
+	// friend void fr(B*,D1*,D2*);
+	// void mem(B*,D1*);
+	// };
+	// void fr(B* pb, D1* p1, D2* p2)
+	// {
+	// pb->i = 1; // illformed
+	// p1->i = 2; // illformed
+	// p2->i = 3; // OK (access through a D2)
+	// p2->B::i = 4; // OK (access through a D2, even though
+	// // naming class is B)
+	// int B::* pmi_B = &B::i; // illformed
+	// int B::* pmi_B2 = &D2::i; // OK (type of &D2::i is int B::*)
+	// B::j = 5; // OK (because refers to static member)
+	// D2::j =6; // OK (because refers to static member)
+	// }
+	// void D2::mem(B* pb, D1* p1)
+	// {
+	// pb->i = 1; // illformed
+	// p1->i = 2; // illformed
+	// i = 3; // OK (access through this)
+	// B::i = 4; // OK (access through this, qualification ignored)
+	// int B::* pmi_B = &B::i; // illformed
+	// int B::* pmi_B2 = &D2::i; // OK
+	// j = 5; // OK (because j refers to static member)
+	// B::j = 6; // OK (because B::j refers to static member)
+	// }
+	// void g(B* pb, D1* p1, D2* p2)
+	// {
+	// pb->i = 1; // illformed
+	// p1->i = 2; // illformed
+	// p2->i = 3; // illformed
+	// }
+	public void test11_5s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class B {
+	// public:
+	// virtual int f();
+	// };
+	// class D : public B {
+	// private:
+	// int f();
+	// };
+	// void f()
+	// {
+	// D d;
+	// B* pb = &d;
+	// D* pd = &d;
+	// pb->f(); //OK: B::f() is public,
+	// // D::f() is invoked
+	// pd->f(); //error: D::f() is private
+	// }
+	public void test11_6s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class W { public: void f(); };
+	// class A : private virtual W { };
+	// class B : public virtual W { };
+	// class C : public A, public B {
+	// void f() { W::f(); } // OK
+	// };
+	public void test11_7s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class E {
+	// int x;
+	// class B { };
+	// class I {
+	// B b; // error: E::B is private
+	// int y;
+	// void f(E* p, int i)
+	// {
+	// p->x = i; // error: E::x is private
+	// }
+	// };
+	// int g(I* p)
+	// {
+	// return p->y; // error: I::y is private
+	// }
+	// };
+	public void test11_8s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class C {
+	// class A { };
+	// A *p; // OK
+	// class B : A // OK
+	// {
+	// A *q; // OK because of injection of name A in A
+	// C::A *r; // error, C::A is inaccessible
+	// B *s; // OK because of injection of name B in B
+	// C::B *t; // error, C::B is inaccessible
+	// };
+	// };
+	public void test11_8s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class C {
+	// public:
+	// C(); //declares the constructor
+	// };
+	// C::C() { } // defines the constructor
+	public void test12_1s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct C;
+	// void no_opt(C*);
+	// struct C {
+	// int c;
+	// C() : c(0) { no_opt(this); }
+	// };
+	// const C cobj;
+	// void no_opt(C* cptr) {
+	// int i = cobj.c * 100; // value of cobj.c is unspecified
+	// cptr->c = 1;
+	// cout << cobj.c * 100 // value of cobj.c is unspecified
+	// << '\
+	// ';
+	// }
+	public void test12_1s15() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class X {
+	// // ...
+	// public:
+	// // ...
+	// X(int);
+	// X(const X&);
+	// ~X();
+	// };
+	// X f(X);
+	// void g()
+	// {
+	// X a(1);
+	// X b = f(X(2));
+	// a = f(a);
+	// }
+	public void test12_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class C {
+	// // ...
+	// public:
+	// C();
+	// C(int);
+	// friend C operator+(const C&, const C&);
+	// ~C();
+	// };
+	// C obj1;
+	// const C& cr = C(16)+C(23);
+	// C obj2;
+	public void test12_2s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// // ...
+	// public:
+	// operator int();
+	// };
+	// class Y {
+	// // ...
+	// public:
+	// operator X();
+	// };
+	// Y a;
+	// int b = a; // error:
+	// // a.operator X().operator int() not tried
+	// int c = X(a); // OK: a.operator X().operator int()
+	public void test12_3s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// public:
+	// // ...
+	// operator int();
+	// };
+	// class Y : public X {
+	// public:
+	// // ...
+	// operator char();
+	// };
+	// void f(Y& a)
+	// {
+	// if (a) { // illformed:
+	// // X::operator int() or Y::operator char()
+	// // ...
+	// }
+	// }
+	public void test12_3s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// // ...
+	// public:
+	// X(int);
+	// X(const char*, int =0);
+	// };
+	// void f(X arg)
+	// {
+	// X a = 1; // a = X(1)
+	// X b = "Jessie"; // b = X("Jessie",0)
+	// a = 2; // a = X(2)
+	// f(3); // f(X(3))
+	// }
+	public void test12_3_1s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class Z {
+	// public:
+	// explicit Z();
+	// explicit Z(int);
+	// // ...
+	// };
+	// Z a; // OK: defaultinitialization performed
+	// Z a1 = 1; // error: no implicit conversion
+	// Z a3 = Z(1); // OK: direct initialization syntax used
+	// Z a2(1); // OK: direct initialization syntax used
+	// Z* p = new Z(1); // OK: direct initialization syntax used
+	// Z a4 = (Z)1; // OK: explicit cast used
+	// Z a5 = static_cast<Z>(1); // OK: explicit cast used
+	public void test12_3_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// // ...
+	// public:
+	// operator int();
+	// };
+	// void f(X a)
+	// {
+	// int i = int(a);
+	// i = (int)a;
+	// i = a;
+	// }
+	public void test12_3_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// void g(X a, X b)
+	// {
+	// int i = (a) ? 1+a : 0;
+	// int j = (a&&b) ? a+b : i;
+	// if (a) { // ...
+	// }
+	// }
+	public void test12_3_2s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct B {
+	// virtual ~B() { }
+	// };
+	// struct D : B {
+	// ~D() { }
+	// };
+	// D D_object;
+	// typedef B B_alias;
+	// B* B_ptr = &D_object;
+	// void f() {
+	// D_object.B::~B(); // calls B's destructor
+	// B_ptr->~B(); //calls D's destructor
+	// B_ptr->~B_alias(); // calls D's destructor
+	// B_ptr->B_alias::~B(); // calls B's destructor
+	// B_ptr->B_alias::~B_alias(); // error, no B_alias in class B
+	// }
+	public void test12_4s12() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// void* operator new(size_t, void* p) { return p; }
+	// struct X {
+	// // ...
+	// X(int);
+	// ~X();
+	// };
+	// void f(X* p);
+	// void g() // rare, specialized use:
+	// {
+	// char* buf = new char[sizeof(X)];
+	// X* p = new(buf) X(222); // use buf[] and initialize
+	// f(p);
+	// p->X::~X(); //cleanup
+	// }
+	public void test12_4s13() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class Arena;
+	// struct B {
+	// void* operator new(size_t, Arena*);
+	// };
+	// struct D1 : B {
+	// };
+	// Arena* ap;
+	// void foo(int i)
+	// {
+	// new (ap) D1; // calls B::operator new(size_t, Arena*)
+	// new D1[i]; // calls ::operator new[](size_t)
+	// new D1; // illformed: ::operator new(size_t) hidden
+	// }
+	public void test12_5s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class X {
+	// // ...
+	// void operator delete(void*);
+	// void operator delete[](void*, size_t);
+	// };
+	// class Y {
+	// // ...
+	// void operator delete(void*, size_t);
+	// void operator delete[](void*);
+	// };
+	public void test12_5s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class complex {
+	// // ...
+	// public:
+	// complex();
+	// complex(double);
+	// complex(double,double);
+	// // ...
+	// };
+	// complex sqrt(complex,complex);
+	// int foo() {
+	// complex a(1); // initialize by a call of
+	// // complex(double)
+	// complex b = a; // initialize by a copy of a
+	// complex c = complex(1,2); // construct complex(1,2)
+	// // using complex(double,double)
+	// // copy it into c
+	// complex d = sqrt(b,c); // call sqrt(complex,complex)
+	// // and copy the result into d
+	// complex e; // initialize by a call of
+	// // complex()
+	// complex f = 3; // construct complex(3) using
+	// // complex(double)
+	// // copy it into f
+	// complex g = { 1, 2 }; // error; constructor is required
+	// }
+	public void test12_6_1s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class complex {
+	// // ...
+	// public:
+	// complex();
+	// complex(double);
+	// complex(double,double);
+	// // ...
+	// };
+	// complex v[6] = { 1,complex(1,2),complex(),2 };
+	// class X {
+	// public:
+	// int i;
+	// float f;
+	// complex c;
+	// } x = { 99, 88.8, 77.7 };
+	public void test12_6_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A { A(); };
+	// typedef A global_A;
+	// struct B { };
+	// struct C: public A, public B { C(); };
+	// C::C(): global_A() { } // meminitializer for base A
+	public void test12_6_2s2a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A { A(); };
+	// struct B: public virtual A { };
+	// struct C: public A, public B { C(); };
+	// C::C(): A() { } // illformed: which A?
+	public void test12_6_2s2b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct B1 { B1(int); };
+	// struct B2 { B2(int); };
+	// struct D : B1, B2 {
+	// D(int);
+	// B1 b;
+	// const int c;
+	// };
+	// D::D(int a) : B2(a+1), B1(a+2), c(a+3), b(a+4)
+	// {  }
+	// D d(10);
+	public void test12_6_2s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class V {
+	// public:
+	// V();
+	// V(int);
+	// // ...
+	// };
+	// class A : public virtual V {
+	// public:
+	// A();
+	// A(int);
+	// // ...
+	// };
+	// class B : public virtual V {
+	// public:
+	// B();
+	// B(int);
+	// // ...
+	// };
+	// class C : public A, public B, private virtual V {
+	// public:
+	// C();
+	// C(int);
+	// // ...
+	// };
+	// A::A(int i) : V(i) { }
+	// B::B(int i) { }
+	// C::C(int i) { }
+	// V v(1); // use V(int)
+	// A a(2); // use V(int)
+	// B b(3); // use V()
+	// C c(4); // use V()
+	public void test12_6_2s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// int a;
+	// int b;
+	// int i;
+	// int j;
+	// public:
+	// const int& r;
+	// X(int i): r(a), b(i), i(i), j(this->i) {}
+	// };
+	public void test12_6_2s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class A {
+	// public:
+	// A(int);
+	// };
+	// class B : public A {
+	// int j;
+	// public:
+	// int f();
+	// B() : A(f()), // undefined: calls member function
+	// // but base A not yet initialized
+	// j(f()) { } // welldefined: bases are all initialized
+	// };
+	// class C {
+	// public:
+	// C(int);
+	// };
+	// class D : public B, C {
+	// int i;
+	// public:
+	// D() : C(f()), // undefined: calls member function
+	// // but base C not yet initialized
+	// i(f()) {} // welldefined: bases are all initialized
+	// };
+	public void test12_6_2s8() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct X { int i; };
+	// struct Y : X { };
+	// struct A { int a; };
+	// struct B : public A { int j; Y y; };
+	// extern B bobj;
+	// B* pb = &bobj; // OK
+	// int* p1 = &bobj.a; // undefined, refers to base class member
+	// int* p2 = &bobj.y.i; // undefined, refers to member's member
+	// A* pa = &bobj; // undefined, upcast to a base class type
+	// B bobj; // definition of bobj
+	// extern X xobj;
+	// int* p3 = &xobj.i; // OK, X is a POD class
+	// X xobj;
+	public void test12_7s1_a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct W { int j; };
+	// struct X : public virtual W { };
+	// struct Y {
+	// int *p;
+	// X x;
+	// Y() : p(&x.j) // undefined, x is not yet constructed
+	// { }
+	// };
+	public void test12_7s1_b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class V {
+	// public:
+	// virtual void f();
+	// virtual void g();
+	// };
+	// class A : public virtual V {
+	// public:
+	// virtual void f();
+	// };
+	// class B : public virtual V {
+	// public:
+	// virtual void g();
+	// B(V*, A*);
+	// };
+	// class D : public A, B {
+	// public:
+	// virtual void f();
+	// virtual void g();
+	// D() : B((A*)this, this) { }
+	// };
+	// B::B(V* v, A* a) {
+	// f(); //calls V::f, not A::f
+	// g(); //calls B::g, not D::g
+	// v->g(); // v is base of B, the call is welldefined, calls B::g
+	// a->f(); //undefined behavior, a's type not a base of B
+	// }
+	public void test12_7s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class V {
+	// public:
+	// virtual void f();
+	// };
+	// class A : public virtual V { };
+	// class B : public virtual V {
+	// public:
+	// B(V*, A*);
+	// };
+	// class D : public A, B {
+	// public:
+	// D() : B((A*)this, this) { }
+	// };
+	// B::B(V* v, A* a) {
+	// typeid(*this); // type_info for B
+	// typeid(*v); //welldefined: *v has type V, a base of B
+	// // yields type_info for B
+	// typeid(*a); //undefined behavior: type A not a base of B
+	// dynamic_cast<B*>(v); // welldefined: v of type V*, V base of B
+	// // results in B*
+	// dynamic_cast<B*>(a); // undefined behavior,
+	// // a has type A*, A not a base of B
+	// }
+	public void test12_7s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// // ...
+	// public:
+	// X(int);
+	// X(const X&, int = 1);
+	// };
+	// X a(1); // calls X(int);
+	// X b(a, 0); // calls X(const X&, int);
+	// X c = b; // calls X(const X&, int);
+	public void test12_8s2a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// // ...
+	// public:
+	// X(const X&);
+	// X(X&); //OK
+	// };
+	public void test12_8s2b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct X {
+	// X(); //default constructor
+	// X(X&); //copy constructor with a nonconst parameter
+	// };
+	// const X cx;
+	// X x = cx; // error - X::X(X&) cannot copy cx into x
+	public void test12_8s2c() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct S {
+	// template<typename T> S(T);
+	// };
+	// S f();
+	// void g() {
+	// S a( f() ); // does not instantiate member template
+	// }
+	public void test12_8s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// void h(int());
+	// void h(int (*)()); // redeclaration of h(int())
+	// void h(int x()) { } // definition of h(int())
+	// void h(int (*x)()) { } // illformed: redefinition of h(int())
+	public void test12_8s3d() throws Exception { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 1);
+	}
+
+	// struct X {
+	// X(const X&, int);
+	// };
+	public void test12_8s4a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct X {
+	// X(const X&, int);
+	// };
+	// X::X(const X& x, int i =0) {  }
+	public void test12_8s4b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct X {
+	// X();
+	// X& operator=(X&);
+	// };
+	// const X cx;
+	// X x;
+	// void f() {
+	// x = cx; // error:
+	// // X::operator=(X&) cannot assign cx into x
+	// }
+	public void test12_8s9() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct V { };
+	// struct A : virtual V { };
+	// struct B : virtual V { };
+	// struct C : B, A { };
+	public void test12_8s13() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class Thing {
+	// public:
+	// Thing();
+	// ~Thing();
+	// Thing(const Thing&);
+	// Thing operator=(const Thing&);
+	// void fun();
+	// };
+	// Thing f() {
+	// Thing t;
+	// return t;
+	// }
+	// Thing t2 = f();
+	public void test12_8s15() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// double abs(double);
+	// int abs(int);
+	// int foo() {
+	// abs(1); //call abs(int);
+	// abs(1.0); //call abs(double);
+	// }
+	public void test13s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// static void f();
+	// void f(); // illformed
+	// void f() const; // illformed
+	// void f() const volatile; // illformed
+	// void g();
+	// void g() const; // OK: no static g
+	// void g() const volatile; // OK: no static g
+	// };
+	public void test12_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef int Int;
+	// void f(int i);
+	// void f(Int i); // OK: redeclaration of f(int)
+	// void f(int i) {  }
+	// void f(Int i) {  } // error: redefinition of f(int)
+	public void test12_1s3a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 1);
+	}
+
+	// enum E { a };
+	// void f(int i) { }
+	// void f(E i) {  }
+	public void test12_1s3b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int f(char*);
+	// int f(char[]); // same as f(char*);
+	// int f(char[7]); // same as f(char*);
+	// int f(char[9]); // same as f(char*);
+	// int g(char(*)[10]);
+	// int g(char[5][10]); // same as g(char(*)[10]);
+	// int g(char[7][10]); // same as g(char(*)[10]);
+	// int g(char(*)[20]); // different from g(char(*)[10]);
+	public void test12_1s3c() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef const int cInt;
+	// int f (int);
+	// int f (const int); // redeclaration of f(int)
+	// int f (int) {  } // definition of f(int)
+	// int f (cInt) {  } // error: redefinition of f(int)
+	public void test12_8s3e() throws Exception {
+		String[] problems= {"f"};
+		parse(getAboveComment(), ParserLanguage.CPP, problems);
+	}
+
+	// void f (int i, int j);
+	// void f (int i, int j = 99); // OK: redeclaration of f(int, int)
+	// void f (int i = 88, int j); // OK: redeclaration of f(int, int)
+	// void f (); // OK: overloaded declaration of f
+	// void prog ()
+	// {
+	// f (1, 2); // OK: call f(int, int)
+	// f (1); // OK: call f(int, int)
+	// f (); // Error: f(int, int) or f()?
+	// }
+	public void test12_8s3f() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class B {
+	// public:
+	// int f(int);
+	// };
+	// class D : public B {
+	// public:
+	// int f(char*);
+	// };
+	public void test13_2s1a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class B {
+	// public:
+	// int f(int);
+	// };
+	// class D : public B {
+	// public:
+	// int f(char*);
+	// };
+	// void h(D* pd)
+	// {
+	// pd->f(1); //error:
+	// // D::f(char*) hides B::f(int)
+	// pd->B::f(1); //OK
+	// pd->f("Ben"); //OK, calls D::f
+	// }
+	public void test13_2s1b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// int f(char*);
+	// void g()
+	// {
+	// extern int f(int);
+	// f("asdf"); //error: f(int) hides f(char*)
+	// // so there is no f(char*) in this scope
+	// }
+	// void caller ()
+	// {
+	// extern void callee(int, int);
+	// {
+	// extern void callee(int); // hides callee(int, int)
+	// callee(88, 99); // error: only callee(int) in scope
+	// }
+	// }
+	public void test13_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class buffer {
+	// private:
+	// char* p;
+	// int size;
+	// protected:
+	// buffer(int s, char* store) { size = s; p = store; }
+	// // ...
+	// public:
+	// buffer(int s) { p = new char[size = s]; }
+	// // ...
+	// };
+	public void test13_2s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class T {
+	// public:
+	// T();
+	// // ...
+	// };
+	// class C : T {
+	// public:
+	// C(int);
+	// // ...
+	// };
+	// T a = 1; // illformed: T(C(1)) not tried
+	public void test13_3_1s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int f1(int);
+	// int f2(float);
+	// typedef int (*fp1)(int);
+	// typedef int (*fp2)(float);
+	// struct A {
+	// operator fp1() { return f1; }
+	// operator fp2() { return f2; }
+	// } a;
+	// int i = a(1); // Calls f1 via pointer returned from
+	// // conversion function
+	public void test13_3_1_1_2s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class String {
+	// public:
+	// String (const String&);
+	// String (char*);
+	// operator char* ();
+	// };
+	// String operator + (const String&, const String&);
+	// void f(void)
+	// {
+	// char* p= "one" + "two"; // illformed because neither
+	// // operand has user defined type
+	// int I = 1 + 1; // Always evaluates to 2 even if
+	// // user defined types exist which
+	// // would perform the operation.
+	// }
+	public void test13_3_1_2s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {
+	// operator int();
+	// };
+	// A operator+(const A&, const A&);
+	// void m() {
+	// A a, b;
+	// a + b; // operator+(a,b) chosen over int(a) + int(b)
+	// }
+	public void test13_3_1_2s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {
+	// A();
+	// operator int();
+	// operator double();
+	// } a;
+	// int i = a; // a.operator int() followed by no conversion
+	// // is better than a.operator double() followed by
+	// // a conversion to int
+	// float x = a; // ambiguous: both possibilities require conversions,
+	// // and neither is better than the other
+	public void test13_3_3s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// void Fcn(const int*, short);
+	// void Fcn(int*, int);
+	// int i;
+	// short s = 0;
+	// void f() {
+	// Fcn(&i, s); // is ambiguous because
+	// // &i -> int* is better than &i -> const int*
+	// // but s -> short is also better than s -> int
+	// Fcn(&i, 1L); // calls Fcn(int*, int), because
+	// // &i -> int* is better than &i -> const int*
+	// // and 1L -> short and 1L -> int are indistinguishable
+	// Fcn(&i,'c'); //callsFcn(int*, int), because
+	// // &i -> int* is better than &i -> const int*
+	// // and c -> int is better than c -> short
+	// }
+	public void test13_3_3s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class B;
+	// class A { A (B&); };
+	// class B { operator A (); };
+	// class C { C (B&); };
+	// void f(A) { }
+	// void f(C) { }
+	// B b;
+	// f(b); //ambiguous because b -> C via constructor and
+	// // b -> A via constructor or conversion function.
+	public void test13_3_3_1_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct A {};
+	// struct B : public A {} b;
+	// int f(A&);
+	// int f(B&);
+	// int i = f(b); // Calls f(B&), an exact match, rather than
+	// // f(A&), a conversion
+	public void test13_3_3_1_4s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int f(const int *);
+	// int f(int *);
+	// int i;
+	// int j = f(&i); // Calls f(int *)
+	public void test13_3_3_2s3a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int f(const int &);
+	// int f(int &);
+	// int g(const int &);
+	// int g(int);
+	// int i;
+	// int j = f(i); // Calls f(int &)
+	// int k = g(i); // ambiguous
+	// class X {
+	// public:
+	// void f() const;
+	// void f();
+	// };
+	// void g(const X& a, X b)
+	// {
+	// a.f(); //CallsX::f() const
+	// b.f(); //Calls X::f()
+	// }
+	public void test13_3_3_2s3b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {
+	// operator short();
+	// } a;
+	// int f(int);
+	// int f(float);
+	// int i = f(a); // Calls f(int), because short -> int is
+	// // better than short -> float.
+	public void test13_3_3_2s3c() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {};
+	// struct B : public A {};
+	// struct C : public B {};
+	// C *pc;
+	// int f(A *);
+	// int f(B *);
+	// int i = f(pc); // Calls f(B *)
+	public void test13_3_3_2s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct X {
+	// int f(int);
+	// static int f(long);
+	// };
+	// int (X::*p1)(int) = &X::f; // OK
+	// int (*p2)(int) = &X::f; // error: mismatch
+	// int (*p3)(long) = &X::f; // OK
+	// int (X::*p4)(long) = &X::f; // error: mismatch
+	// int (*p6)(long) = &(X::f); // OK
+	public void test13_4s5b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class complex {
+	// public:
+	// complex operator+(complex a) {}
+	// };
+	// int n;
+	// int foo(complex &a, complex &b) {
+	// complex z = a.operator+(b); // complex z = a+b;
+	// void* p = operator new(sizeof(int)*n);
+	// }
+	public void test13_5s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct B {
+	// virtual int operator= (int);
+	// virtual B& operator= (const B&);
+	// };
+	// struct D : B {
+	// virtual int operator= (int);
+	// virtual D& operator= (const B&);
+	// };
+	// D dobj1;
+	// D dobj2;
+	// B* bptr = &dobj1;
+	// void f() {
+	// bptr->operator=(99); // calls D::operator=(int)
+	// *bptr = 99; // ditto
+	// bptr->operator=(dobj2); // calls D::operator=(const B&)
+	// *bptr = dobj2; // ditto
+	// dobj1 = dobj2; // calls implicitlydeclared
+	// // D::operator=(const D&)
+	// }
+	public void test13_5_3s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// public:
+	// X& operator++(); // prefix ++a
+	// X operator++(int); // postfix a++
+	// };
+	// class Y { };
+	// Y& operator++(Y&); // prefix ++b
+	// Y operator++(Y&, int); // postfix b++
+	// void f(X a, Y b) {
+	// ++a; // a.operator++();
+	// a++; // a.operator++(0);
+	// ++b; // operator++(b);
+	// b++; // operator++(b, 0);
+	// a.operator++(); // explicit call: like ++a;
+	// a.operator++(0); // explicit call: like a++;
+	// operator++(b); //explicit call: like ++b;
+	// operator++(b, 0); // explicit call: like b++;
+	// }
+	public void test13_5_7s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<const X& x, int i> void f()
+	// {
+	// i++; //error: change of template parameter
+	// value
+	// &x; //OK
+	// &i; //error: address of nonreference template parameter
+	// int& ri = i; // error: nonconst reference bound to temporary
+	// const int& cri = i; // OK: const reference bound to temporary
+	// }
+	public void test14_1s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<double d> class X; // error
+	// template<double* pd> class Y; // OK
+	// template<double& rd> class Z; // OK
+	public void test14_1s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<int *a> struct R {  };
+	// template<int b[5]> struct S {  };
+	// int *p;
+	// R<p> w; // OK
+	// S<p> x; // OK due to parameter adjustment
+	// int v[5];
+	// R<v> y; // OK due to implicit argument conversion
+	// S<v> z; // OK due to both adjustment and conversion
+	public void test14_1s8() throws Exception { // TODO raised bug 90668
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T1, class T2 = int> class A;
+	// template<class T1 = int, class T2> class A;
+	public void test14_1s10a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T1 = int, class T2 = int> class A;
+	public void test14_1s10b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T1 = int, class T2> class B; // error
+	public void test14_1s11() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T = int> class X;
+	// template<class T = int> class X {  }; // error
+	public void test14_1s12() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T, T* p, class U = T> class X {  };
+	// template<class T> void f(T* p = new T);
+	public void test14_1s13() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<int i = (3 > 4) > // OK
+	// class Y {  };
+	public void test14_1s15() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<int i> class X {  };
+	// X<(1>2)> x2; // OK
+	// template<class T> class Y {  };
+	// Y< X<1> > x3; // OK
+	// Y<X<6>> 1> > x4; // OK: Y< X< (6>>1) > >
+	public void test14_2s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// public:
+	// template<size_t> X* alloc();
+	// template<size_t> static X* adjust();
+	// };
+	// template<class T> void f(T* p)
+	// {
+	// T* p1 = p>
+	// alloc<200>(); // illformed: < means less than
+	// T* p2 = p->template alloc<200>();
+	// // OK: < starts template argument list
+	// T::adjust<100>();
+	// // illformed: < means less than
+	// T::template adjust<100>();
+	// // OK: < starts explicit qualification
+	// }
+	public void test14_2s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<typename T> class complex {
+	//   	complex(T,T) {}
+	// };
+	// template<class T> class Array {
+	// T* v;
+	// int sz;
+	// public:
+	// explicit Array(int);
+	// T& operator[](int);
+	// T& elem(int i) { return v[i]; }
+	// // ...
+	// };
+	// Array<int> v1(20);
+	// typedef complex<double> dcomplex; 
+	// Array<dcomplex> v2(30);
+	// Array<dcomplex> v3(40);
+	// void bar() {
+	// v1[3] = 7;
+	// v2[3] = v3.elem(4) = dcomplex(7,8);
+	// }
+	public void test14_3s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class X {
+	// static T t;
+	// };
+	// class Y {
+	// private:
+	// struct S {  };
+	// X<S> x; // OK: S is accessible
+	// // X<Y::S> has a static member of type Y::S
+	// // OK: even though Y::S is private
+	// };
+	// X<Y::S> y; // error: S not accessible
+	public void test14_3s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> struct A {
+	// ~A();
+	// };
+	// void f(A<int>* p, A<int>* q) {
+	// p->A<int>::~A(); // OK: destructor call
+	// q->A<int>::~A<int>(); // OK: destructor call
+	// }
+	public void test14_3s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template <class T> class X {  };
+	// void f()
+	// {
+	// struct S {  };
+	// X<S> x3; // error: local type used as templateargument
+	// X<S*> x4; // error: pointer to local type used as templateargument
+	// }
+	public void test14_3_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> struct A {
+	// static T t;
+	// };
+	// typedef int function();
+	// A<function> a; // illformed: would declare A<function>::t
+	// // as a static member function
+	public void test14_3_1s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class A { // primary template
+	// int x;
+	// };
+	// template<class T> class A<T*> { // partial specialization
+	// long x;
+	// };
+	// template<template<class U> class V> class C {
+	// V<int> y;
+	// V<int*> z;
+	// };
+	// C<A> c; // V<int> within C<A> uses the primary template,
+	// // so c.y.x has type int
+	// // V<int*> within C<A> uses the partial specialization,
+	// // so c.z.x has type long
+	public void test14_3_3s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class E, int size> class buffer {  };
+	// buffer<char,2*512> x;
+	// buffer<char,1024> y;
+	public void test14_2s1a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T, void(*err_fct)()> class list {  };
+	// list<int,&error_handler1> x1;
+	// list<int,&error_handler2> x2;
+	// list<int,&error_handler2> x3;
+	// list<char,&error_handler2> x4;
+	public void test14_4s1b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> class Array {
+	// T* v;
+	// int sz;
+	// public:
+	// explicit Array(int);
+	// T& operator[](int);
+	// T& elem(int i) { return v[i]; }
+	// // ...
+	// };
+	public void test14_5_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T1, class T2> struct A {
+	// void f1();
+	// void f2();
+	// };
+	// template<class T2, class T1> void A<T2,T1>::f1() { } // OK
+	public void test14_5_1s3a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+
+	// void error(const char*);
+	// template<class T> class Array {
+	// T* v;
+	// int sz;
+	// public:
+	// explicit Array(int);
+	// T& operator[](int);
+	// T& elem(int i) { return v[i]; }
+	// // ...
+	// };
+	// template<class T> T& Array<T>::operator[](int i)
+	// {
+	// if (i<0 || sz<=i) error("Array: range error");
+	// return v[i];
+	// }
+	public void test14_5_1_1s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// void test() {
+	// Array<int> v1(20);
+	// Array<dcomplex> v2(30);
+	// v1[3] = 7; // Array<int>::operator[]()
+	// v2[3] = dcomplex(7,8); // Array<dcomplex>::operator[]()
+	// }
+	public void test14_5_1_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> struct A {
+	// class B;
+	// };
+	// A<int>::B* b1; // OK: requires A to be defined but not A::B
+	// template<class T> class A<T>::B { };
+	// A<int>::B b2; // OK: requires A::B to be defined
+	public void test14_5_1_2s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class string {
+	// public:
+	// template<class T2> int compare(const T2&);
+	// template<class T2> string(const string<T2>& s) {  }
+	// // ...
+	// };
+	// template<class T> template<class T2> int string<T>::compare(const T2& s)
+	// {
+	// // ...
+	// }
+	public void test14_5_2s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+
+
+	// class B {
+	// virtual void f(int);
+	// };
+	// class D : public B {
+	// template <class T> void f(T); // does not override B::f(int)
+	// void f(int i) { f<>(i); } // overriding function that calls
+	// // the template instantiation
+	// };
+	public void test14_5_2s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {
+	// template <class T> operator T*();
+	// };
+	// template <class T> A::operator T*(){ return 0; }
+	// template <> A::operator char*(){ return 0; } // specialization
+	// template A::operator void*(); // explicit instantiation
+	// int main()
+	// {
+	// A a;
+	// int* ip;
+	// ip = a.operator int*(); // explicit call to template operator
+	// // A::operator int*()
+	// }
+	public void test14_5_2s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class X {
+	// static T s;
+	// };
+	// template<class T> T X<T>::s = 0;
+	public void test14_5_1_3s1() throws Exception { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class task;
+	// template<class T> task<T>* preempt(task<T>*);
+	// template<class T> class task {
+	// // ...
+	// friend void next_time();
+	// friend void process(task<T>*);
+	// friend task<T>* preempt<T>(task<T>*);
+	// template<class C> friend int func(C);
+	// friend class task<int>;
+	// template<class P> friend class frd;
+	// // ...
+	// };
+	public void test14_5_3s1() throws Exception { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace N {
+	// template <class T> void f(T);
+	// void g(int);
+	// namespace M {
+	// template <class T> void h(T);
+	// template <class T> void i(T);
+	// struct A {
+	// friend void f<>(int); // illformed- N::f
+	// friend void h<>(int); // OK - M::h
+	// friend void g(int); // OK - new decl of M::g
+	// template <class T> void i(T);
+	// friend void i<>(int); // illformed- A::i
+	// };
+	// }
+	// }
+	public void test14_5_3s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class A {
+	// template<class T> friend class B; // OK
+	// template<class T> friend void f(T){  } // OK
+	// };
+	public void test14_5_3s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X {
+	// template<class T> friend struct A;
+	// class Y { };
+	// };
+	// template<class T> struct A { X::Y ab; }; // OK
+	// template<class T> struct A<T*> { X::Y ab; }; // OK
+	public void test14_5_3s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> struct A {
+	// struct B { };
+	// void f();
+	// };
+	// class C {
+	// template<class T> friend struct A<T>::B;
+	// template<class T> friend void A<T>::f();
+	// };
+	public void test14_5_3s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> struct A {
+	// template<class T2> struct B {}; // #1
+	// template<class T2> struct B<T2*> {}; // #2
+	// };
+	// template<> template<class T2> struct A<short>::B {}; // #3
+	// A<char>::B<int*> abcip; // uses #2
+	// A<short>::B<int*> absip; // uses #3
+	// A<char>::B<int> abci; // uses #1
+	public void test14_5_4_3s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T1, class T2, int I> class A { }; // #1
+	// template<class T, int I> class A<T, T*, I> { }; // #2
+	// template<class T1, class T2, int I> class A<T1*, T2, I> { }; // #3
+	// template<class T> class A<int, T*, 5> { }; // #4
+	// template<class T1, class T2, int I> class A<T1, T2*, I> { }; // #5
+	public void test14_5_4s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template <int I, int J> struct B {};
+	// template <int I> struct B<I, I> {}; // OK
+	public void test14_5_4s9b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T1, class T2, int I> class A { }; // #1
+	// template<class T, int I> class A<T, T*, I> { }; // #2
+	// template<class T1, class T2, int I> class A<T1*, T2, I> { }; // #3
+	// template<class T> class A<int, T*, 5> { }; // #4
+	// template<class T1, class T2, int I> class A<T1, T2*, I> { }; // #5
+	// A<int, int, 1> a1; // uses #1
+	// A<int, int*, 1> a2; // uses #2, T is int, I is 1
+	// A<int, char*, 5> a3; // uses #4, T is char
+	// A<int, char*, 1> a4; // uses #5, T1 is int, T2 is char, I is 1
+	public void test14_5_4_1s2a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T1, class T2, int I> class A { };             // #1
+	// template<class T, int I>            class A<T, T*, I> { };   // #2
+	// template<class T1, class T2, int I> class A<T1*, T2, I> { }; // #3
+	// template<class T>                   class A<int, T*, 5> { }; // #4
+	// template<class T1, class T2, int I> class A<T1, T2*, I> { }; // #5
+	// A<int*, int*, 2> a5; // ambiguous: matches #3 and #5 : expect problem 
+	public void test14_5_4_1s2b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 1);
+	}
+
+	// template<int I, int J, class T> class X { };
+	// template<int I, int J>          class X<I, J, int> { }; // #1
+	// template<int I>                 class X<I, I, int> { }; // #2
+	// template<int I, int J> void f(X<I, J, int>); // #A
+	// template<int I>        void f(X<I, I, int>); // #B
+	public void test14_5_4_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// // primary template
+	// template<class T, int I> struct A {
+	// void f();
+	// };
+	// template<class T, int I> void A<T,I>::f() { }
+	// // class template partial specialization
+	// template<class T> struct A<T,2> {
+	// void f();
+	// void g();
+	// void h();
+	// };
+	// // member of class template partial specialization
+	// template<class T> void A<T,2>::g() { }
+	// // explicit specialization
+	// template<> void A<char,2>::h() { }
+	// int main()
+	// {
+	// A<char,0> a0;
+	// A<char,2> a2;
+	// a0.f(); //OK, uses definition of primary template's member
+	// a2.g(); //OK, uses definition of
+	// // partial specialization's member
+	// a2.h(); //OK, uses definition of
+	// // explicit specialization's member
+	// a2.f(); //illformed, no definition of f for A<T,2>
+	// // the primary template is not used here
+	// }
+	public void test14_5_4_3s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> class Array { };
+	// template<class T> void sort(Array<T>&);
+	public void test14_5_5s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// // file1.c 
+	// template<class T>
+	// void f(T*);
+	// void g(int* p) { 
+	// f(p); // call 
+	// // f<int>(int*) 
+	// }
+	public void test14_5_5_1s1a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+	// // file2.c
+	// template<class T>
+	// void f(T);
+	// void h(int* p) {
+	// f(p); // call
+	// // f<int*>(int*)
+	// }
+	public void test14_5_5_1s1b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// // Guaranteed to be the same
+	// template <int T> class A;
+	// template <int I> void f/*1*/(A<I>, A<I+10>);
+	// template <int I> void f/*2*/(A<I>, A<I+10>);
+	// // Guaranteed to be different
+	// template <int I> void f/*3*/(A<I>, A<I+11>);
+	public void test14_5_5_1s8a() throws Exception {
+		final String content= getAboveComment();
+		IASTTranslationUnit tu= parse(content, ParserLanguage.CPP, true, 0);
+		BindingAssertionHelper bh= new BindingAssertionHelper(content, true);
+		ICPPFunctionTemplate f1= bh.assertNonProblem("f/*1*/", 1);
+		ICPPFunctionTemplate f2= bh.assertNonProblem("f/*2*/", 1);
+		ICPPFunctionTemplate f3= bh.assertNonProblem("f/*3*/", 1);
+		assertSame(f1, f2);
+		assertNotSame(f1, f3);
+	}
+
+	// // Illformed, no diagnostic required
+	// template <int I> void f(A<I>, A<I+10>);
+	// template <int I> void f(A<I>, A<I+1+2+3+4>);
+	public void test14_5_5_1s8b() throws Exception {
+		//test is only for syntax, semantics are not checked here.
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> struct A { A(); };
+	// template<class T> void f(T);
+	// template<class T> void f(T*);
+	// template<class T> void f(const T*);
+	// template<class T> void g(T);
+	// template<class T> void g(T&);
+	// template<class T> void h(const T&);
+	// template<class T> void h(A<T>&);
+	// void m() {
+	// const int *p;
+	// f(p); // f(const T*) is more specialized than f(T) or f(T*)
+	// float x;
+	// g(x); //Ambiguous: g(T) or g(T&)
+	// A<int> z;
+	// h(z); //overload resolution selects h(A<T>&)
+	// const A<int> z2;
+	// h(z2); // h(const T&) is called because h(A<T>&) is not callable
+	// }
+	public void test14_5_5_2s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> void f(T); // #1
+	// template<class T> void f(T*, int=1); // #2
+	// template<class T> void g(T); // #3
+	// template<class T> void g(T*, ...); // #4
+	// int main() {
+	// int* ip;
+	// f(ip); //calls #2
+	// g(ip); //calls #4
+	// }
+	public void test14_5_5_2s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// // no B declared here
+	// class X;
+	// template<class T> class Y {
+	// class Z; // forward declaration of member class
+	// void f() {
+	// X* a1; // declare pointer to X
+	// T* a2; // declare pointer to T
+	// Y* a3; // declare pointer to Y<T>
+	// Z* a4; // declare pointer to Z
+	// typedef typename T::A TA;
+	// TA* a5; // declare pointer to T's A
+	// typename T::A* a6; // declare pointer to T's A
+	// T::A* a7; // T::A is not a type name:
+	// // multiply T::A by a7; illformed,
+	// // no visible declaration of a7
+	// B* a8; // B is not a type name:
+	// // multiply B by a8; illformed,
+	// // no visible declarations of B and a8
+	// }
+	// };
+	public void test14_6s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct A {
+	// struct X { };
+	// int X;
+	// };
+	// template<class T> void f(T t) {
+	// typename T::X x; // illformed: finds the data member X
+	// // not the member type X
+	// }
+	public void test14_6s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> struct A {
+	// typedef int B;
+	// A::B b; // illformed: typename required before A::B
+	// void f(A<T>::B); // illformed: typename required before A<T>::B
+	// typename A::B g(); // OK
+	// };
+	public void test14_6s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// int j;
+	// template<class T> class X {
+	// // ...
+	// void f(T t, int i, char* p)
+	// {
+	// t = i; // diagnosed if X::f is instantiated
+	// // and the assignment to t is an error
+	// p = i; // may be diagnosed even if X::f is
+	// // not instantiated
+	// p = j; // may be diagnosed even if X::f is
+	// // not instantiated
+	// }
+	// void g(T t) {
+	// // +; //may be diagnosed even if X::g is
+	// // not instantiated
+	// }
+	// };
+	public void test14_6s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// //#include <iostream>
+	// using namespace std;
+	// template<class T> class Set {
+	// T* p;
+	// int cnt;
+	// public:
+	// Set();
+	// Set<T>(const Set<T>&);
+	// void printall()
+	// {
+	// for (int i = 0; i<cnt; i++)
+	// cout << p[i] << '\
+	// ';
+	// }
+	// // ...
+	// };
+	public void test14_6s8() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// void f(char);
+	// template<class T> void g(T t)
+	// {
+	// f(1); // f(char)
+	// f(T(1)); //dependent
+	// f(t); //dependent
+	// dd++; //not dependent
+	// // error: declaration for dd not found
+	// }
+	// void f(int);
+	// double dd;
+	// void h()
+	// {
+	// g(2); //will cause one call of f(char) followed
+	// // by two calls of f(int)
+	// g('a'); //will cause three calls of f(char)
+	// }
+	public void test14_6s9() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T, T* p, class U = T> class X {  };
+	// template<class T> void f(T* p = new T);
+	public void test14_6_1s3a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class X {
+	// X* p; // meaning X<T>
+	// X<T>* p2;
+	// X<int>* p3;
+	// };
+	public void test14_6_1s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class Y;
+	// template<> class Y<int> {
+	// Y* p; // meaning Y<int>
+	// Y<char>* q; // meaning Y<char>
+	// };
+	public void test14_6_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<typename T> class Array {};
+	// template<class T> class X : public Array<T> {  };
+	// template<class T> class Y : public T { };
+	public void test14_6_1s3b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T, int i> class Y {
+	// int T; // error: templateparameter redeclared
+	// void f() {
+	// char T; // error: templateparameter redeclared
+	// }
+	// };
+	// template<class X> class X; // error: templateparameter redeclared
+	public void test14_6_1s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> struct A {
+	// struct B {  };
+	// void f();
+	// };
+	// template<class B> void A<B>::f() {
+	// B b; // A's B, not the template parameter
+	// }
+	public void test14_6_1s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace N {
+	// int C;
+	// template<class T> class B {
+	// void f(T);
+	// };
+	// }
+	// template<class C> void N::B<C>::f(C) {
+	// C b; // C is the template parameter, not N::C
+	// }
+	public void test14_6_1s6() throws Exception { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {
+	// struct B {  };
+	// int a;
+	// int Y;
+	// };
+	// template<class B, class a> struct X : A {
+	// B b; // A's B
+	// a b; // error: A's a isn't a type name
+	// };
+	public void test14_6_1s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template <typename T> class B {};
+	// template<class T> struct X : B<T> {
+	// typename T::A* pa;
+	// void f(B<T>* pb) {
+	// static int i = B<T>::i;
+	// pb->j++;
+	// }
+	// };
+	public void test14_6_2s2() throws Exception {
+		final String code = getAboveComment();
+		parse(code, ParserLanguage.CPP, true, 0);
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		ICPPUnknownBinding unknown= bh.assertNonProblem("B<T>", 4);
+		unknown= bh.assertNonProblem("T::A", 4);
+		unknown= bh.assertNonProblem("B<T>::i", 7);
+		unknown= bh.assertNonProblem("j", 1);
+	}
+
+	// typedef double A;
+	// template<class T> class B {
+	// typedef int A;
+	// };
+	// template<class T> struct X : B<T> {
+	// A a; // a has type double
+	// };
+	public void test14_6_2s3() throws Exception { 
+		final String content= getAboveComment();
+		IASTTranslationUnit tu= parse(content, ParserLanguage.CPP, true, 0);
+		BindingAssertionHelper bh= new BindingAssertionHelper(content, true);
+		IVariable v= bh.assertNonProblem("a;", 1);
+		IType t= v.getType();
+		assertInstance(t, ITypedef.class);
+		t= ((ITypedef) t).getType();
+		assertInstance(t, IBasicType.class);
+		assertEquals(IBasicType.t_double, ((IBasicType) t).getType());
+	}
+
+	// struct A {
+	// struct B {  };
+	// int a;
+	// int Y;
+	// };
+	// int a;
+	// template<class T> struct Y : T {
+	// struct B {  };
+	// B b; // The B defined in Y
+	// void f(int i) { a = i; } // ::a
+	// Y* p; // Y<T>
+	// };
+	// Y<A> ya;
+	public void test14_6_2s4() throws Exception {
+		final String content= getAboveComment();
+		parse(content, ParserLanguage.CPP, true, 0);
+		BindingAssertionHelper bh= new BindingAssertionHelper(content, true);
+		IBinding b= bh.assertNonProblem("b;", 1);
+		assertEquals("Y", b.getOwner().getName());
+		b= bh.assertNonProblem("a = i", 1);
+		assertNull(b.getOwner());
+	}
+
+	// void g(double);
+	// void h();
+	// template<class T> class Z {
+	// public:
+	// void f() {
+	// g(1); //calls g(double)
+	// h++; //illformed:
+	// // cannot increment function;
+	// // this could be diagnosed either here or
+	// // at the point of instantiation
+	// }
+	// };
+	// void g(int); // not in scope at the point of the template
+	// // definition, not considered for the call g(1)
+	public void test14_6_3s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<typename T> class number {
+	// number(int);
+	// //...
+	// friend number gcd(number& x, number& y) {  }
+	// //...
+	// };
+	// void g()
+	// {
+	// number<double> a(3), b(4);
+	// //...
+	// a = gcd(a,b); // finds gcd because number<double> is an
+	// // associated class, making gcd visible
+	// // in its namespace (global scope)
+	// b = gcd(3,4); // illformed; gcd is not visible
+	// }
+	public void test14_6_5s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> class X {
+	// static T s;
+	// // ...
+	// };
+	// template<class T> T X<T>::s = 0;
+	// X<int> aa;
+	// X<char*> bb;
+	public void test14_7s6() throws Exception { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class Z {
+	// public:
+	// void f();
+	// void g();
+	// };
+	// void h()
+	// {
+	// Z<int> a; // instantiation of class Z<int> required
+	// Z<char>* p; // instantiation of class Z<char> not
+	// // required
+	// Z<double>* q; // instantiation of class Z<double>
+	// // not required
+	// a.f(); //instantiation of Z<int>::f() required
+	// p->g(); //instantiation of class Z<char> required, and
+	// // instantiation of Z<char>::g() required
+	// }
+	public void test14_7_1s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class B {  };
+	// template<class T> class D : public B<T> {  };
+	// void f(void*);
+	// void f(B<int>*);
+	// void g(D<int>* p, D<char>* pp, D<double> ppp)
+	// {
+	// f(p); //instantiation of D<int> required: call f(B<int>*)
+	// B<char>* q = pp; // instantiation of D<char> required:
+	// // convert D<char>* to B<char>*
+	// delete ppp; // instantiation of D<double> required
+	// }
+	public void test14_7_1s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class X;
+	// X<char> ch; // error: definition of X required
+	public void test14_7_1s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T = int> struct A {
+	// static int x;
+	// };
+	// template<class U> void g(U) { }
+	// template<> struct A<double> { }; // specialize for T == double
+	// template<> struct A<> { }; // specialize for T == int
+	// template<> void g(char) { } // specialize for U == char
+	// // U is deduced from the parameter type
+	// template<> void g<int>(int) { } // specialize for U == int
+	// template<> int A<char>::x = 0; // specialize for T == char
+	// template<class T = int> struct B {
+	// static int x;
+	// };
+	// template<> int B<>::x = 1; // specialize for T == int
+	public void test14_7s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template <class T> struct S {
+	// operator int();
+	// };
+	// void f(int);
+	// void f(S<int>&);
+	// void f(S<float>);
+	// void g(S<int>& sr) {
+	// f(sr); //instantiation of S<int> allowed but not required
+	// // instantiation of S<float> allowed but not required
+	// };
+	public void test14_7_1s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace N {
+	// template<class T> class List {
+	// public:
+	// T* get();
+	// // ...
+	// };
+	// }
+	// template<class K, class V> class Map {
+	// N::List<V> lt;
+	// V get(K);
+	// // ...
+	// };
+	// void g(Map<char*,int>& m)
+	// {
+	// int i = m.get("Nicholas");
+	// // ...
+	// }
+	public void test14_7_1s10() throws Exception { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> void f(T x, T y = ydef(T()), T z = zdef(T()));
+	// class A { };
+	// A zdef(A);
+	// void g(A a, A b, A c) {
+	// f(a, b, c); // no default argument instantiation
+	// f(a, b); // default argument z = zdef(T()) instantiated
+	// f(a); //illformed; ydef is not declared
+	// }
+	public void test14_7_1s12() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> class X {
+	// X<T>* p; // OK
+	// X<T*> a; // implicit generation of X<T> requires
+	// // the implicit instantiation of X<T*> which requires
+	// // the implicit instantiation of X<T**> which ...
+	// };
+	public void test14_7_1s14() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class Array { void mf(); };
+	// template class Array<char>;
+	// template void Array<int>::mf();
+	// template<class T> void sort(Array<T>& v) {  }
+	// template void sort(Array<char>&); // argument is deduced here
+	// namespace N {
+	// template<class T> void f(T&) { }
+	// }
+	// template void N::f<int>(int&);
+	public void test14_7_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace N {
+	// template<class T> class Y { void mf() { } };
+	// }
+	// template class Y<int>; // error: class template Y not visible
+	// // in the global namespace
+	// using N::Y;
+	// template class Y<int>; // OK: explicit instantiation in namespace N
+	// template class N::Y<char*>; // OK: explicit instantiation in namespace N
+	// template void N::Y<double>::mf(); // OK: explicit instantiation
+	// // in namespace N
+	public void test14_7_2s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> class Array {  };
+	// template<class T> void sort(Array<T>& v);
+	// // instantiate sort(Array<int>&) - templateargument deduced
+	// template void sort<>(Array<int>&);
+	public void test14_7_2s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// char* p = 0;
+	// template<class T> T g(T = &p);
+	// template int g<int>(int); // OK even though &p isn't an int.
+	public void test14_7_2s9() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class stream;
+	// template<> class stream<char> {  };
+	// template<class T> class Array {  };
+	// template<class T> void sort(Array<T>& v) {  }
+	// template<> void sort<char*>(Array<char*>&) ;
+	public void test14_7_3s1() throws Exception { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<> class X<int> {  }; // error: X not a template
+	// template<class T> class X;
+	// template<> class X<char*> {  }; // OK: X is a template
+	public void test14_7_3s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> struct A {
+	// void f(T) {  }
+	// };
+	// template<> struct A<int> {
+	// void f(int);
+	// };
+	// void h()
+	// {
+	// A<int> a;
+	// a.f(16); // A<int>::f must be defined somewhere
+	// }
+	// // explicit specialization syntax not used for a member of
+	// // explicitly specialized class template specialization
+	// void A<int>::f(int) {  }
+	public void test14_7_3s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class Array {  };
+	// template<class T> void sort(Array<T>& v) {  }
+	// void f(Array<String>& v)
+	// {
+	// sort(v); //use primary template
+	// // sort(Array<T>&), T is String
+	// }
+	// template<> void sort<String>(Array<String>& v); // error: specialization
+	// // after use of primary template
+	// template<> void sort<>(Array<char*>& v); // OK: sort<char*> not yet used
+	public void test14_7_3s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// namespace N {
+	// template<class T> class X {  };
+	// template<class T> class Y {  };
+	// template<> class X<int> {  }; // OK: specialization
+	// // in same namespace
+	// template<> class Y<double>; // forward declare intent to
+	// // specialize for double
+	// }
+	// template<> class N::Y<double> {  }; // OK: specialization
+	// // in same namespace
+	public void test14_7_3s9() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class Array {  };
+	// template<class T> void sort(Array<T>& v);
+	// // explicit specialization for sort(Array<int>&)
+	// // with deduces templateargument of type int
+	// template<> void sort(Array<int>&);
+	public void test14_7_3s11() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0 );
+	}
+
+	// template<class T1> class A {
+	// template<class T2> class B {
+	// void mf();
+	// };
+	// };
+	// template<> template<> class A<int>::B<double> { };
+	// template<> template<> void A<char>::B<char>::mf() { };
+	public void test14_7_3s17() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+	// template<class T> class X; // X is a class template
+	// template<> class X<int>;
+	// X<int>* p; // OK: pointer to declared class X<int>
+	// X<int> x; // error: object of incomplete class X<int>
+	public void test14_7_3s10() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template <class T> void f(T);
+	// template <class T> void f(T*);
+	// template <> void f(int*); // Ambiguous
+	// template <> void f<int>(int*); // OK
+	// template <> void f(int); // OK
+	public void test14_7_3s12() throws Exception {
+		// gcc does not report the explicit instantiation as ambiguous, so we accept it as well.
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> void f(T) {  }
+	// template<class T> inline T g(T) {  }
+	// template<> inline void f<>(int) {  } // OK: inline
+	// template<> int g<>(int) {  } // OK: not inline
+	public void test14_7_3s14() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> struct A {
+	// void f(T);
+	// template<class X> void g(T,X);
+	// void h(T) { }
+	// };
+	// // specialization
+	// template<> void A<int>::f(int);
+	// // out of class member template definition
+	// template<class T> template<class X> void A<T>::g(T,X) { }
+	// // member template partial specialization
+	// template<> template<class X> void A<int>::g(int,X);
+	// // member template specialization
+	// template<> template<>
+	// void A<int>::g(int,char); // X deduced as char
+	// template<> template<>
+	// void A<int>::g<char>(int,char); // X specified as char
+	// // member specialization even if defined in class definition
+	// template<> void A<int>::h(int) { }
+	public void test14_7_3s16() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T1> class A {
+	// template<class T2> class B {
+	// template<class T3> void mf1(T3);
+	// void mf2();
+	// };
+	// };
+	// template<> template<class X>
+	// class A<int>::B { };
+	// template<> template<> template<class T>
+	// void A<int>::B<double>::mf1(T t) { };
+	// template<class Y> template<>
+	// void A<Y>::B<double>::mf2() { }; // illformed; B<double> is specialized but
+	// // its enclosing class template A is not
+	public void test14_7_3s18() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> void f(T* p)
+	// {
+	// static T s;
+	// // ...
+	// };
+	// void g(int a, char* b)
+	// {
+	// f(&a); //call f<int>(int*)
+	// f(&b); //call f<char*>(char**)
+	// }
+	public void test14_8s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> void sort(Array<T>& v);
+	// void f(Array<dcomplex>& cv, Array<int>& ci)
+	// {
+	// sort<dcomplex>(cv); // sort(Array<dcomplex>&)
+	// sort<int>(ci); // sort(Array<int>&)
+	// }
+	// template<class U, class V> U convert(V v);
+	// void g(double d)
+	// {
+	// int i = convert<int,double>(d); // int convert(double)
+	// char c = convert<char,double>(d); // char convert(double)
+	// }
+	public void test14_8_1s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class X, class Y> X f(Y);
+	// void g()
+	// {
+	// int i = f<int>(5.6); // Y is deduced to be double
+	// int j = f(5.6); // illformed: X cannot be deduced
+	// }
+	public void test14_8_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class X, class Y, class Z> X f(Y,Z);
+	// void g()
+	// {
+	// f<int,char*,double>("aa",3.0);
+	// f<int,char*>("aa",3.0); // Z is deduced to be double
+	// f<int>("aa",3.0); // Y is deduced to be char*, and
+	// // Z is deduced to be double
+	// f("aa",3.0); //error: X cannot be deduced
+	// }
+	public void test14_8_1s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> void f(T);
+	// class Complex {
+	// // ...
+	// Complex(double);
+	// };
+	// void g()
+	// {
+	// f<Complex>(1); // OK, means f<Complex>(Complex(1))
+	// }
+	public void test14_8_1s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace A {
+	// struct B { };
+	// template<int X> void f();
+	// }
+	// namespace C {
+	// template<class T> void f(T t);
+	// }
+	// void g(A::B b) {
+	// f<3>(b); //illformed: not a function call
+	// A::f<3>(b); //wellformed
+	// C::f<3>(b); //illformed; argument dependent lookup
+	// // only applies to unqualified names
+	// using C::f;
+	// f<3>(b); //wellformed because C::f is visible; then
+	// // A::f is found by argument dependent lookup
+	// }
+	public void test14_8_1s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// void f(Array<dcomplex>& cv, Array<int>& ci)
+	// {
+	// sort(cv); //call sort(Array<dcomplex>&)
+	// sort(ci); //call sort(Array<int>&)
+	// }
+	// void g(double d)
+	// {
+	// int i = convert<int>(d); // call convert<int,double>(double)
+	// int c = convert<char>(d); // call convert<char,double>(double)
+	// }
+	public void test14_8_2s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template <class T> int f(T[5]);
+	// int I = f<int>(0);
+	// int j = f<void>(0); // invalid array
+	public void test14_8_2s2a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template <class T> int f(typename T::B*);
+	// int i = f<int>(0);
+	public void test14_8_2s2b() throws Exception {
+		final String content= getAboveComment();
+		IASTTranslationUnit tu= parse(content, ParserLanguage.CPP, true, 2);
+		BindingAssertionHelper bh= new BindingAssertionHelper(content, true);
+		bh.assertProblem("f<", 1);
+		bh.assertProblem("f<int>", 6);
+	}
+
+	// template <class T> int f(typename T::B*);
+	// struct A {};
+	// struct C { int B; };
+	// int i = f<A>(0);
+	// int j = f<C>(0);
+	public void test14_8_2s2c() throws Exception {
+		final String content= getAboveComment();
+		IASTTranslationUnit tu= parse(content, ParserLanguage.CPP, true, 4);
+		BindingAssertionHelper bh= new BindingAssertionHelper(content, true);
+		bh.assertProblem("f<A", 1);
+		bh.assertProblem("f<A>", 4);
+		bh.assertProblem("f<C", 1);
+		bh.assertProblem("f<C>", 4);
+	}
+
+	// template <class T> int f(int T::*);
+	// int i = f<int>(0);
+	public void test14_8_2s2d() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 2);
+	}
+
+	// template <class T, T*> int f(int);
+	// int i2 = f<int,1>(0); // can't conv 1 to int*
+	public void test14_8_2s2e() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 1);
+	}
+
+	// template <class T> void f(T t);
+	// template <class X> void g(const X x);
+	// template <class Z> void h(Z, Z*);
+	// int main()
+	// {
+	// // #1: function type is f(int), t is nonconst
+	// f<int>(1);
+	// // #2: function type is f(int), t is const
+	// f<const int>(1);
+	// // #3: function type is g(int), x is const
+	// g<int>(1);
+	// // #4: function type is g(int), x is const
+	// g<const int>(1);
+	// // #5: function type is h(int, const int*)
+	// h<const int>(1,0);
+	// }
+	public void test14_8_2s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template <int> int f(int);
+	// template <signed char> int f(int);
+	// int i1 = f<1>(0); // ambiguous
+	// int i2 = f<1000>(0); // ambiguous
+	public void test14_8_2s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> void f(T x, T y) {  }
+	// struct A {  };
+	// struct B : A { };
+	// int g(A a, B b)
+	// {
+	// f(a,b); //error: T could be A or B
+	// f(b,a); //error: T could be A or B
+	// f(a,a); //OK: T is A
+	// f(b,b); //OK: T is B
+	// }
+	public void test14_8_2_4s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template <class T, class U> void f( T (*)( T, U, U ) );
+	// int g1( int, float, float);
+	// char g2( int, float, float);
+	// int g3( int, char, float);
+	// void r()
+	// {
+	// f(g1); //OK: T is int and U is float
+	// f(g2); //error: T could be char or int
+	// f(g3); //error: U could be char or float
+	// }
+	public void test14_8_2_4s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> void f(const T*) {}
+	// int *p;
+	// void s()
+	// {
+	// f(p); // f(const int *)
+	// }
+	public void test14_8_2_4s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template <class T> struct B { };
+	// template <class T> struct D : public B<T> {};
+	// struct D2 : public B<int> {};
+	// template <class T> void f(B<T>&){}
+	// void t()
+	// {
+	// D<int> d;
+	// D2 d2;
+	// f(d); //calls f(B<int>&)
+	// f(d2); //calls f(B<int>&)
+	// }
+	public void test14_8_2_4s8() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T, T i> void f(double a[10][i]);
+	// int v[10][20];
+	// int foo() {
+	// f(v); //error: argument for templateparameter
+	// //T cannot be deduced
+	// }
+	public void test14_8_2_4s12() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<int i> void f1(int a[10][i]);
+	// template<int i> void f2(int a[i][20]);
+	// template<int i> void f3(int (&a)[i][20]);
+	// void g()
+	// {
+	// int v[10][20];
+	// f1(v); //OK: i deduced to be 20
+	// f1<20>(v); //OK
+	// f2(v); //error: cannot deduce templateargument i
+	// f2<10>(v); //OK
+	// f3(v); //OK: i deduced to be 10
+	// }
+	public void test14_8_2_4s13() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	//	template<typename T> class A {
+	//  public:
+	//		typedef int X;
+	//	    X xm;
+	//	};
+	//	template<int I> class B {
+	//	public:
+	//		typedef int* Y;
+	//	    Y ym;
+	//	};
+	//	template<int i, typename T>
+	//	T deduce(typename A<T>::X x, // T is not deduced here
+	//			T t,                 // but T is deduced here
+	//			typename B<i>::Y y); // i is not deduced here
+	//	void test() {
+	//		A<int> a;
+	//		B<77> b;
+	//		deduce<77> (a.xm, 62, b.ym);
+	//	}
+	public void test14_8_2_4s14() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<int i> class A { /* ... */ };
+	// template<short s> void f(A<s>);
+	// void k1() {
+	// A<1> a;
+	// f(a); //error: deduction fails for conversion from int to short
+	// f<1>(a); //OK
+	// }
+	// template<const short cs> class B { };
+	// template<short s> void h(B<s>);
+	// void k2() {
+	// B<1> b;
+	// g(b); //OK: cvqualifiers are ignored on template parameter types
+	// }
+	public void test14_8_2_4s15() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> void f(void(*)(T,int));
+	// template<class T> void foo(T,int);
+	// void g(int,int);
+	// void g(char,int);
+	// void h(int,int,int);
+	// void h(char,int);
+	// int m()
+	// {
+	// f(&g); //error: ambiguous
+	// f(&h); //OK: void h(char,int) is a unique match
+	// f(&foo); //error: type deduction fails because foo is a template
+	// }
+	public void test14_8_2_4s16() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template <class T> void f(T = 5, T = 7);
+	// void g()
+	// {
+	// f(1); //OK: call f<int>(1,7)
+	// f(); //error: cannot deduce T
+	// f<int>(); //OK: call f<int>(5,7)
+	// }
+	public void test14_8_2_4s17() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+	
+	// template <template <class T> class X> struct A { };
+	// template <template <class T> class X> void f(A<X>) { }
+	// template<class T> struct B { };
+	// int foo() {
+	// A<B> ab;
+	// f(ab); //calls f(A<B>)
+	// }
+	public void test14_8_2_4s18() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> T max(T a, T b) { return a>b?a:b; }
+	// void f(int a, int b, char c, char d)
+	// {
+	// int m1 = max(a,b); // max(int a, int b)
+	// char m2 = max(c,d); // max(char a, char b)
+	// int m3 = max(a,c); // error: cannot generate max(int,char)
+	// }
+	public void test14_8_3s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> T max(T a, T b) { return a>b?a:b; }
+	// int max(int,int);
+	// void f(int a, int b, char c, char d)
+	// {
+	// int m1 = max(a,b); // max(int a, int b)
+	// char m2 = max(c,d); // max(char a, char b)
+	// int m3 = max(a,c); // resolved
+	// }
+	public void test14_8_3s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> struct B {  };
+	// template<class T> struct D : public B<T> {  };
+	// template<class T> void f(B<T>&);
+	// void g(B<int>& bi, D<int>& di)
+	// {
+	// f(bi); // f(bi)
+	// f(di); // f( (B<int>&)di )
+	// }
+	public void test14_8_3s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> void f(T*,int); // #1
+	// template<class T> void f(T,char); // #2
+	// void h(int* pi, int i, char c)
+	// {
+	// f(pi,i); //#1: f<int>(pi,i)
+	// f(pi,c); //#2: f<int*>(pi,c)
+	// f(i,c); //#2: f<int>(i,c);
+	// f(i,i); //#2: f<int>(i,char(i))
+	// }
+	public void test14_8_3s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> void f(T); // declaration    
+	// void g() {                                     
+	//    f("Annemarie"); // call of f<const char*> 
+	// }                                              
+	public void test14_8_3s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int foo() {
+	// lab: try {
+	// int t1;
+	// try {
+	// int t2;
+	// if (1)
+	// goto lab;
+	// } catch(...) { // handler 2 
+	// }
+	// } catch(...) { // handler 1
+	// }
+	// }
+	public void test15s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int f(int);
+	// class C {
+	// int i;
+	// double d;
+	// public:
+	// C(int, double);
+	// };
+	// C::C(int ii, double id)
+	// try
+	// : i(f(ii)), d(id)
+	// {
+	// // constructor function body
+	// }
+	// catch (...)
+	// {
+	// // handles exceptions thrown from the ctorinitializer
+	// // and from the constructor function body
+	// }
+	public void test15s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class Overflow {
+	// // ...
+	// public:
+	// Overflow(char,double,double);
+	// };
+	// void f(double x)
+	// {
+	// // ...
+	// throw Overflow('+',x,3.45e107);
+	// }
+	// int foo() {
+	// try {
+	// // ...
+	// f(1.2);
+	// // ...
+	// }
+	// catch(Overflow& oo) {
+	// // handle exceptions of type Overflow here
+	// }
+	// }
+	public void test15_1s1() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int foo() {
+	// try {
+	// // ...
+	// }
+	// catch (...) { // catch all exceptions
+	// // respond (partially) to exception
+	// throw; //pass the exception to some
+	// // other handler
+	// }
+	// }
+	public void test15_1s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class Matherr {  virtual void vf(); };
+	// class Overflow: public Matherr {  };
+	// class Underflow: public Matherr {  };
+	// class Zerodivide: public Matherr {  };
+	// void f()
+	// {
+	// try {
+	// }
+	// catch (Overflow oo) {
+	// // ...
+	// }
+	// catch (Matherr mm) {
+	// // ...
+	// }
+	// }
+	public void test15_3s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// void f() throw(int); // OK
+	// void (*fp)() throw (int); // OK
+	// void g(void pfa() throw(int)); // OK
+	public void test15_4s1a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef int (*pf)() throw(int); // illformed
+	public void test15_4s1b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct B {
+	// virtual void f() throw (int, double);
+	// virtual void g();
+	// };
+	// struct D: B {
+	// void f(); // illformed
+	// void g() throw (int); // OK
+	// };
+	public void test15_4s3a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class A {  };
+	// void (*pf1)(); // no exception specification
+	// void (*pf2)() throw(A);
+	// void f()
+	// {
+	// pf1 = pf2; // OK: pf1 is less restrictive
+	// pf2 = pf1; // error: pf2 is more restrictive
+	// }
+	public void test15_4s3b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class X { };
+	// class Y { };
+	// class Z: public X { };
+	// class W { };
+	// void f() throw (X, Y)
+	// {
+	// int n = 0;
+	// if (n) throw X(); // OK
+	// if (n) throw Z(); // also OK
+	// throw W(); // will call unexpected()
+	// }
+	public void test15_4s8() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// extern void f() throw(X, Y);
+	// void g() throw(X)
+	// {
+	// // f(); //OK
+	// }
+	public void test15_4s10() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct A {
+	// A();
+	// A(const A&) throw();
+	// ~A() throw(X);
+	// };
+	// struct B {
+	// B() throw();
+	// B(const B&) throw();
+	// ~B() throw(Y);
+	// };
+	// struct D : public A, public B {
+	// // Implicit declaration of D::D();
+	// // Implicit declaration of D::D(const D&) throw();
+	// // Implicit declaration of D::~D() throw (X,Y);
+	// };
+	public void test15_4s13() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// #if VERSION == 1
+	// #define INCFILE "vers1.h"
+	// #elif VERSION == 2
+	// #define INCFILE "vers2.h" // and so on
+	// #else
+	// #define INCFILE "versN.h"
+	// #endif
+	public void test16_2s8() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// // second pass of C++ spec is to get [Note: ]
+	// int f() {
+	// int a, b;
+	// /*...*/
+	// a = a + 32760 + b + 5;
+	// a = (((a + 32760) + b) + 5);
+	// a = ((a + b) + 32765);
+	// a = ((a + 32765) + b);
+	// a = (a + (b + 32765));
+	// }
+	public void test18_2_1_5s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct X {
+	// enum E { z = 16 };
+	// int b[X::z]; // OK
+	// };
+	public void test3_3_1s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef int f;
+	// struct A {
+	// friend void f(A &);
+	// operator int();
+	// void g(A a) {
+	// f(a);
+	// }
+	// };
+	public void test3_4_1s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A {
+	// int a;
+	// };
+	// struct B: virtual A { };
+	// struct C: B { };
+	// struct D: B { };
+	// struct E: public C, public D { };
+	// struct F: public A { };
+	// void f() {
+	// E e;
+	// e.B::a = 0; // OK, only one A::a in E
+	// F f;
+	// f.A::a = 1; // OK, A::a is a member of F
+	// }
+	public void test3_4_5s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// inline double fd() { return 1.0; }
+	// extern double d1;
+	// double d2 = d1; // unspecified:
+	// // may be statically initialized to 0.0 or
+	// // dynamically initialized to 1.0
+	// double d1 = fd(); // may be initialized statically to 1.0
+	public void test3_6_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int main() {
+	// const char c = 'c';
+	// char* pc;
+	// const char** pcc = &pc; //1: not allowed
+	// *pcc = &c;
+	// *pc = 'C'; //2: modifies a const object
+	// }
+	public void test4_4s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct S {
+	// mutable int i;
+	// };
+	// int f() {
+	// const S cs;
+	// int S::* pm = &S::i; // pm refers to mutable member S::i
+	// cs.*pm = 88; // illformed: cs is a const object
+	// }
+	public void test5_5s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace A {
+	// class X { };
+	// extern "C" int g();
+	// extern "C++" int h();
+	// }
+	// namespace B {
+	// void X(int);
+	// extern "C" int g();
+	// extern "C++" int h();
+	// }
+	// using namespace A;
+	// using namespace B;
+	// void f() {
+	// X(1); //error: name X found in two namespaces
+	// g(); //okay: name g refers to the same entity
+	// h(); //error: name h found in two namespaces
+	// }
+	public void test7_3_4s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// void print(int a, int)
+	// {
+	// //printf("a = %d",a);
+	// }
+	public void test8_4s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int a;
+	// const int b = a;
+	// int c = b;
+	public void test8_5s14() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct B {
+	// virtual void f();
+	// };
+	// struct D : B {
+	// void f(int);
+	// };
+	// struct D2 : D {
+	// void f();
+	// };
+	public void test10_3s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct B {
+	// virtual ~B();
+	// void operator delete(void*, size_t);
+	// };
+	// struct D : B {
+	// void operator delete(void*);
+	// };
+	// void f()
+	// {
+	// B* bp = new D;
+	// delete bp; //1: uses D::operator delete(void*)
+	// }
+	public void test12_5s7a() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct B {
+	// virtual ~B();
+	// void operator delete[](void*, size_t);
+	// };
+	// struct D : B {
+	// void operator delete[](void*, size_t);
+	// };
+	// void f(int i)
+	// {
+	// D* dp = new D[i];
+	// delete [] dp; // uses D::operator delete[](void*, size_t)
+	// B* bp = new D[i];
+	// delete[] bp; // undefined behavior
+	// }
+	public void test12_5s7b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// struct A { };
+	// void operator + (A, A);
+	// struct B {
+	// void operator + (B);
+	// void f ();
+	// };
+	// A a;
+	// void B::f() {
+	// //operator+ (a,a); // ERROR - global operator hidden by member
+	// a + a; // OK - calls global operator+
+	// }
+	public void test13_3_1_2s10() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> class myarray {  };
+	// template<class K, class V, template<class T> class C = myarray>
+	// class Map {
+	// C<K> key;
+	// C<V> value;
+	// // ...
+	// };
+	public void test14_1s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// class T {  };
+	// int i;
+	// template<class T, T i> void f(T t)
+	// {
+	// T t1 = i; // templateparameters T and i
+	// ::T t2 = ::i; // global namespace members T and i
+	// }
+	public void test14_1s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<int* p> class X { };
+	// int a[10];
+	// struct S { int m; static int s; } s;
+	// X<&a[2]> x3; // error: address of array element
+	// X<&s.m> x4; // error: address of nonstatic member
+	// X<&s.s> x5; // error: &S::s must be used
+	// X<&S::s> x6; // OK: address of static member
+	public void test14_3_2s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T, char* p> class X {
+	// // ...
+	// X();
+	// X(const char* q) {  }
+	// };
+	// X<int,"Studebaker"> x1; // error: string literal as template argument
+	// char p[] = "Vivisectionist";
+	// X<int,p> x2; // OK
+	public void test14_3_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<const int& CRI> struct B { /* ... */ };
+	// B<1> b2; // error: temporary would be required for template argument
+	// int c = 1;
+	// B<c> b1; // OK
+	public void test14_3_2s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<const int* pci> struct X {  };
+	// int ai[10];
+	// X<ai> xi; // array to pointer and qualification conversions
+	// struct Y {  };
+	// template<const Y& b> struct Z {  };
+	// Y y;
+	// Z<y> z; // no conversion, but note extra cvqualification
+	// template<int (&pa)[5]> struct W {  };
+	// int b[5];
+	// W<b> w; // no conversion
+	// void f(char);
+	// void f(int);
+	// template<void (*pf)(int)> struct A {  };
+	// A<&f> a; // selects f(int)
+	public void test14_3_2s5() throws Exception  {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template <class T> struct A {
+	// void f(int);
+	// template <class T2> void f(T2);
+	// };
+	// template <> void A<int>::f(int) { } // nontemplate member
+	// template <> template <> void A<int>::f<>(int) { } // template member
+	// int main()
+	// {
+	// A<char> ac;
+	// ac.f(1); //nontemplate
+	// ac.f('c'); //template
+	// ac.f<>(1); //template
+	// }
+	public void test14_5_2s2() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);  //should be 0
+	}
+
+	// template<class T1, class T2, int I> class A<T1, T2, I> { }; // error
+	public void test14_5_4s5() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> struct A {
+	// class C {
+	// template<class T2> struct B { };
+	// };
+	// };
+	// // partial specialization of A<T>::C::B<T2>
+	// template<class T> template<class T2>
+	// struct A<T>::C::B<T2*> { };
+	// A<short>::C::B<int*> absip; // uses partial specialization
+	public void test14_5_4s6() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// namespace N {
+	// template<class T1, class T2> class A { }; // primary template
+	// }
+	// using N::A; // refers to the primary template
+	// namespace N {
+	// template<class T> class A<T, T*> { }; // partial specialization
+	// }
+	// A<int,int*> a; // uses the partial specialization, which is found through
+	// // the using declaration which refers to the primary template
+	public void test14_5_4s7() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template<class T> void f();
+	// template<int I> void f(); // OK: overloads the first template
+	// // distinguishable with an explicit template argument list
+	public void test14_5_5_1s4() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// template <int I> class A;
+	// template <int I, int J> A<I+J> f/*1*/(A<I>, A<J>); // #1
+	// template <int K, int L> A<K+L> f/*2*/(A<K>, A<L>); // same as #1
+	// template <int I, int J> A<I-J> f/*3*/(A<I>, A<J>); // different from #1
+	public void test14_5_5_1s5() throws Exception { 
+		final String content= getAboveComment();
+		IASTTranslationUnit tu= parse(content, ParserLanguage.CPP, true, 0);
+		BindingAssertionHelper bh= new BindingAssertionHelper(content, true);
+		ICPPFunctionTemplate f1= bh.assertNonProblem("f/*1*/", 1);
+		ICPPFunctionTemplate f2= bh.assertNonProblem("f/*2*/", 1);
+		ICPPFunctionTemplate f3= bh.assertNonProblem("f/*3*/", 1);
+		assertSame(f1, f2);
+		assertNotSame(f1, f3);
+	}
+
+	// template <int I> class A;
+	// template <int I, int J> void f/*1*/(A<I+J>); // #1
+	// template <int K, int L> void f/*2*/(A<K+L>); // same as #1
+	public void test14_5_5_1s6() throws Exception { 
+		final String content= getAboveComment();
+		IASTTranslationUnit tu= parse(content, ParserLanguage.CPP, true, 0);
+		BindingAssertionHelper bh= new BindingAssertionHelper(content, true);
+		ICPPFunctionTemplate f1= bh.assertNonProblem("f/*1*/", 1);
+		ICPPFunctionTemplate f2= bh.assertNonProblem("f/*2*/", 1);
+		assertSame(f1, f2);
+	}
+
+	// template <class T> int f(T); // #1
+	// int f(int); // #2
+	// int k = f(1); // uses #2
+	// int l = f<>(1); // uses #1
+	public void test14_8_1s2b() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// #define TABSIZE 100
+	// int table[TABSIZE];
+	public void test15_3_5s3() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int g(int);
+	// void f()
+	// {
+	// int i;
+	// int& r = i; // r refers to i
+	// r = 1; // the value of i becomes 1
+	// int* p = &r; // p points to i
+	// int& rr = r; // rr refers to what r refers to, that is, to i
+	// int (&rg)(int) = g; // rg refers to the function g
+	// rg(i); //calls function g
+	// int a[3];
+	// int (&ra)[3] = a; // ra refers to the array a
+	// ra[1] = i; // modifies a[1]
+	// }
+	public void test8_5_3s1()  throws Exception { // TODO raised bug 90648
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A { }; // implicitlydeclared A::operator=
+	// struct B : A {
+	// B& operator=(const B &);
+	// };
+	// B& B::operator=(const B& s) {
+	// this->A::operator=(s); // wellformed
+	// return *this;
+	// }
+	public void test12s1() throws Exception  { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// struct A { };
+	// struct B : virtual A { };
+	// struct C : B { };
+	// struct D : virtual A { D(A*); };
+	// struct X { X(A*); };
+	// struct E : C, D, X {
+	// E() : D(this), // undefined: upcast from E* to A*
+	// // might use path E* -> D* -> A*
+	// // but D is not constructed
+	// // D((C*)this), // defined:
+	// // E* -> C* defined because E() has started
+	// // and C* -> A* defined because
+	// // C fully constructed
+	// X(this) //defined: upon construction of X,
+	// // C/B/D/A sublattice is fully constructed
+	// { }
+	// };
+	public void test12_7s2() throws Exception  { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// typedef int c;
+	// enum { i = 1 };
+	// class X {
+	// int i=3;
+	// char v[i];
+	// int f() { return sizeof(c); } // OK: X::c
+	// char c;
+	// enum { i = 2 };
+	// };
+	// typedef char* T;
+	// struct Y {
+	// typedef long T;
+	// T b;
+	// };
+	// typedef int I;
+	// class D {
+	// typedef I I; // error, even though no reordering involved
+	// };
+	public void test3_3_6s5() throws Exception { // 90606
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// int f(double);
+	// int f(int);
+	// int (*pfd)(double) = &f; // selects f(double)
+	// int (*pfi)(int) = &f; // selects f(int)
+	// int (*pfe)(...) = &f; // error: type mismatch
+	// int (&rfi)(int) = f; // selects f(int)
+	// int (&rfd)(double) = f; // selects f(double)
+	// void g() {
+	// (int (*)(int))&f; // cast expression as selector
+	// }
+	public void test13_4s5a() throws Exception  { // bug 90674
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// class A {
+	// public:
+	// int z;
+	// int z1;
+	// };
+	// class B : public A {
+	// int a;
+	// public:
+	// int b, c;
+	// int bf();
+	// protected:
+	// int x;
+	// int y;
+	// };
+	// class D : private B {
+	// int d;
+	// public:
+	// B::c; //adjust access to B::c
+	// B::z; //adjust access to A::z
+	// A::z1; //adjust access to A::z1
+	// int e;
+	// int df();
+	// protected:
+	// B::x; //adjust access to B::x
+	// int g;
+	// };
+	// class X : public D {
+	// int xf();
+	// };
+	// int ef(D&);
+	// int ff(X&);
+	public void test11_3s2() throws Exception { //bug 92793
+		IASTTranslationUnit tu= parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+		IASTCompositeTypeSpecifier D= getCompositeType(tu, 2);
+		IASTDeclaration accessDecl= getDeclaration(D, 2);
+		assertInstance(accessDecl, ICPPASTUsingDeclaration.class);
+	}
+
+	// int z() {
+	// int f(int);
+	// int a = 2;
+	// int b = f(a);
+	// int c(b);
+	// }
+	public void test8_5s2() throws Exception  { // 90641
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+
+	// // #include <cstddef>
+	// char *p;
+	// void *operator new(size_t, int);
+	// void foo() {
+	// const int x = 63;
+	// new (int(*p)) int; // newplacement expression
+	// new (int(*[x])); // new typeid
+	// }
+	public void test8_2s3() throws Exception { 
+		parse(getAboveComment(), ParserLanguage.CPP, false, 0);
+	}
+
+	// template<class T> void f();
+	// template<int I> void f();
+	// void g()
+	// {
+	// f<int()>(); // int() is a typeid:call the first f()
+	// }
+	public void test14_3s2()  throws Exception { 
+		parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
new file mode 100644
index 0000000..771332e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
@@ -0,0 +1,7407 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Ed Swartz (Nokia)
+ *     Markus Schorn (Wind River Systems)
+ *     Andrew Ferguson (Symbian)
+ *     Sergey Prigogin (Google)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.io.BufferedReader;
+import java.io.StringReader;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.ASTSignatureUtil;
+import org.eclipse.cdt.core.dom.ast.EScopeKind;
+import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
+import org.eclipse.cdt.core.dom.ast.IASTCastExpression;
+import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
+import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarationStatement;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionList;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionStatement;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionCallExpression;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner;
+import org.eclipse.cdt.core.dom.ast.IASTInitializerExpression;
+import org.eclipse.cdt.core.dom.ast.IASTLabelStatement;
+import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNameOwner;
+import org.eclipse.cdt.core.dom.ast.IASTNamedTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTProblemDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTReturnStatement;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
+import org.eclipse.cdt.core.dom.ast.IASTWhileStatement;
+import org.eclipse.cdt.core.dom.ast.IArrayType;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IEnumeration;
+import org.eclipse.cdt.core.dom.ast.IEnumerator;
+import org.eclipse.cdt.core.dom.ast.IField;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IFunctionType;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.IPointerType;
+import org.eclipse.cdt.core.dom.ast.IProblemBinding;
+import org.eclipse.cdt.core.dom.ast.IQualifierType;
+import org.eclipse.cdt.core.dom.ast.IScope;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCastExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConversionName;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLinkageSpecification;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLiteralExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamedTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNewExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTOperatorName;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTPointerToMember;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTSimpleTypeConstructorExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTWhileStatement;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBasicType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBlockScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceAlias;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPPointerToMemberType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPReferenceType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPUsingDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
+import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPPointerToMemberType;
+import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPPointerType;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.util.CharArrayUtils;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.OverloadableOperator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+/**
+ * @author aniefer
+ */
+public class AST2CPPTests extends AST2BaseTest {
+	
+	public AST2CPPTests() {
+	}
+	
+	public AST2CPPTests(String name) {
+		super(name);
+	}
+	
+	public static TestSuite suite() {
+		return suite(AST2CPPTests.class);
+	}
+	
+	// #define CURLOPTTYPE_OBJECTPOINT   10000
+	// #define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number
+	// typedef enum {
+	// CINIT(FILE, OBJECTPOINT, 1),
+	//     CINIT(URL,  OBJECTPOINT, 2)
+	// } CURLoption ;
+	public void testBug102825() throws Exception {
+		parseAndCheckBindings(getAboveComment());
+	}
+	
+	// class B {
+	// public:
+	// B( int t );
+	// };
+	// class A : public B {
+	// public:
+	// A( int t );
+	// };
+	// A::A( int t ) : B( t - 1 ){}
+	public void testBug78883() throws Exception {
+		parseAndCheckBindings(getAboveComment());
+	}
+	
+	// enum type {A};
+	// enum type a, b;
+	// type c; 
+	// enum type2 {A, B};
+	// enum type2 d, e; 
+	public void testBug77967() throws Exception {
+		parseAndCheckBindings( getAboveComment() );
+	}
+	
+	public void testBug75189() throws Exception {
+		parseAndCheckBindings( "struct A{};typedef int (*F) (A*);" ); //$NON-NLS-1$
+	}
+	
+	public void testBug75340() throws Exception {
+		IASTTranslationUnit tu = parseAndCheckBindings( "void f(int i = 0, int * p = 0);"); //$NON-NLS-1$
+		IASTSimpleDeclaration sd = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+		assertEquals( ASTSignatureUtil.getParameterSignature( sd.getDeclarators()[0] ), "(int, int *)" ); //$NON-NLS-1$
+	}
+	
+	// #define REF_WRAP(e) class A { public: A (){ } A& foo2(e& v) { return *this; } }
+	// class B
+	// {
+	// REF_WRAP(B);
+	// B();
+	// void foo();
+	// };
+	public void testBug79540() throws Exception {
+		parseAndCheckBindings( getAboveComment() );
+	}
+	
+	// template <class T, int someConst=0>
+	// class WithTemplate {};
+	// int main ()
+	// {
+	// WithTemplate <int, 10> normalInstance;
+	// const int localConst=10;
+	// WithTemplate <int, localConst> brokenInstance;
+	// return 0;
+	// }
+	public void testBug103578() throws Exception {
+		parseAndCheckBindings( getAboveComment() );
+	}
+	
+	// int *p1; int *p2;
+	// union {
+	// struct {int a; int b;} A;
+	// struct {int a; int b;};
+	// } MyStruct;
+	// void test (void) {
+	// p1 = &MyStruct.A.a;
+	// p2 = &MyStruct.b;
+	//         MyStruct.b = 1;
+	// }
+	public void testBug78103() throws Exception {
+		parseAndCheckBindings( getAboveComment() );
+	}
+	
+	// signed int si(0);
+	// unsigned   u(10U);
+	// signed     s(-1);
+	// short      sh(0);
+	// long       l(0L);
+	// long long  ll(0LL);
+	public void testInitializeUnsigned_Bug245070() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP, true);
+	}
+	
+	public void testBug43579() throws Exception {
+		parseAndCheckBindings("class A { int m; }; \n A * a; int A::*pm; \n int f(){} \n int f(int); \n int x = f(a->*pm);"); //$NON-NLS-1$
+		parseAndCheckBindings("class A { int m; }; \n A * a; int A::*pm; \n int f(){} \n int f(int); \n int x = f(a->*pm);"); //$NON-NLS-1$
+	}
+	
+	// class A { int m(int); };
+	// A a; 
+	// int (A::*pm)(int) = &A::m;
+	// int f(){} 
+	// int f(int); 
+	// int x = f((a.*pm)(5));
+	public void testBug43242() throws Exception {
+		parseAndCheckBindings( getAboveComment() );
+	}
+	
+	public void testBug43241() throws Exception {
+		parseAndCheckBindings( "int m(int); int (*pm)(int) = &m; int f(){} int f(int); int x = f((*pm)(5));" ); //$NON-NLS-1$
+	}
+	
+	// int *zzz1 (char);
+	// int (*zzz2) (char); 
+	// int ((*zzz3)) (char); 
+	// int (*(zzz4)) (char); 
+	public void testBug40768() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP ); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		assertNoProblemBindings( col );
+	}
+	
+	protected IASTTranslationUnit parseAndCheckBindings( String code ) throws Exception
+	{
+		IASTTranslationUnit tu = parse( code, ParserLanguage.CPP ); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		assertNoProblemBindings( col );
+		return tu;
+	}
+	
+	
+	public void testBug40422() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "class A { int y; }; int A::* x = 0;", ParserLanguage.CPP ); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		assertNoProblemBindings( col );
+	}
+	
+	public void testBug86282() throws Exception {
+		IASTTranslationUnit tu = parse( "void foo() { int (* f[])() = new (int (*[10])());  }", ParserLanguage.CPP ); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		assertNoProblemBindings( col );
+	}
+	
+	// bool f() {
+	//     int first, last;
+	// if(first < 1 || last > 99 )
+	// return false;
+	// }
+	public void testBug75858() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		assertNoProblemBindings( col );
+	}
+	
+	public void testBug95424() throws Exception {
+		IASTTranslationUnit tu = parse( "void f(){ traits_type::copy(__r->_M_refdata(), __buf, __i); }", ParserLanguage.CPP, true, true ); //$NON-NLS-1$
+		tu = parse( "void f(){ traits_type::copy(__r->_M_refdata(), __buf, __i); }", ParserLanguage.CPP, false, true ); //$NON-NLS-1$
+		IASTFunctionDefinition f = (IASTFunctionDefinition) tu.getDeclarations()[0];
+		IASTCompoundStatement cs = (IASTCompoundStatement) f.getBody();
+		IASTExpressionStatement es = (IASTExpressionStatement) cs.getStatements()[0];
+		assertTrue( es.getExpression() instanceof IASTFunctionCallExpression );
+	}
+	
+	// class A { } a;
+	public void testSimpleClass() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+		.getDeclarations()[0];
+		IASTCompositeTypeSpecifier compTypeSpec = (IASTCompositeTypeSpecifier) decl
+		.getDeclSpecifier();
+		IASTName name_A = compTypeSpec.getName();
+		
+		IASTDeclarator dtor = decl.getDeclarators()[0];
+		IASTName name_a = dtor.getName();
+		
+		ICompositeType A = (ICompositeType) name_A.resolveBinding();
+		IVariable a = (IVariable) name_a.resolveBinding();
+		ICompositeType A_2 = (ICompositeType) a.getType();
+		assertNotNull(A);
+		assertNotNull(a);
+		assertSame(A, A_2);
+	}
+	
+	// class A {
+	//     public:
+	// int x;
+	// A * next;
+	// };
+	// A * start;
+	// void test() {
+	// for(A *y = start; y->x != 0;  y = y->next) {
+	// 42;
+	// }
+	// for(int x = 0 ; x < 10; x++ ) {
+	// }
+	// }
+	public void testBug95411() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP );
+		CPPNameCollector nameCol = new CPPNameCollector();
+		tu.accept( nameCol );
+		assertNoProblemBindings( nameCol );
+	}
+	
+	// class A; class A {};
+	public void testClassForwardDecl() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+		.getDeclarations()[0];
+		assertEquals(decl.getDeclarators().length, 0);
+		IASTElaboratedTypeSpecifier elabSpec = (IASTElaboratedTypeSpecifier) decl
+		.getDeclSpecifier();
+		IASTName name_elab = elabSpec.getName();
+		
+		decl = (IASTSimpleDeclaration) tu.getDeclarations()[1];
+		assertEquals(decl.getDeclarators().length, 0);
+		IASTCompositeTypeSpecifier compSpec = (IASTCompositeTypeSpecifier) decl
+		.getDeclSpecifier();
+		IASTName name_comp = compSpec.getName();
+		
+		ICompositeType A = (ICompositeType) name_elab.resolveBinding();
+		ICompositeType A_2 = (ICompositeType) name_comp.resolveBinding();
+		
+		assertNotNull(A);
+		assertSame(A, A_2);
+	}
+	
+	// class A {};  A a;
+	public void testVariable() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+		.getDeclarations()[0];
+		assertEquals(decl.getDeclarators().length, 0);
+		IASTCompositeTypeSpecifier compType = (IASTCompositeTypeSpecifier) decl
+		.getDeclSpecifier();
+		IASTName name_A = compType.getName();
+		
+		decl = (IASTSimpleDeclaration) tu.getDeclarations()[1];
+		IASTDeclarator dtor = decl.getDeclarators()[0];
+		IASTName name_a = dtor.getName();
+		IASTNamedTypeSpecifier namedSpec = (IASTNamedTypeSpecifier) decl
+		.getDeclSpecifier();
+		IASTName name_A2 = namedSpec.getName();
+		
+		IVariable a = (IVariable) name_a.resolveBinding();
+		ICompositeType A1 = (ICompositeType) a.getType();
+		ICompositeType A2 = (ICompositeType) name_A2.resolveBinding();
+		ICompositeType A = (ICompositeType) name_A.resolveBinding();
+		
+		assertNotNull(a);
+		assertNotNull(A);
+		assertSame(A, A1);
+		assertSame(A1, A2);
+	}
+	
+	// class A {  int f; };
+	public void testField() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+		.getDeclarations()[0];
+		assertEquals(decl.getDeclarators().length, 0);
+		ICPPASTCompositeTypeSpecifier comp = (ICPPASTCompositeTypeSpecifier) decl
+		.getDeclSpecifier();
+		IASTName name_A = comp.getName();
+		
+		decl = (IASTSimpleDeclaration) comp.getMembers()[0];
+		IASTDeclarator dtor = decl.getDeclarators()[0];
+		IASTName name_f = dtor.getName();
+		
+		ICPPClassType A = (ICPPClassType) name_A.resolveBinding();
+		IField f = (IField) name_f.resolveBinding();
+		
+		assertNotNull(A);
+		assertNotNull(f);
+		assertSame(f.getScope(), A.getCompositeScope());
+	}
+	
+	// class A { int f(); };
+	public void testMethodDeclaration() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+		.getDeclarations()[0];
+		assertEquals(decl.getDeclarators().length, 0);
+		IASTCompositeTypeSpecifier comp = (IASTCompositeTypeSpecifier) decl
+		.getDeclSpecifier();
+		IASTName name_A = comp.getName();
+		
+		decl = (IASTSimpleDeclaration) comp.getMembers()[0];
+		IASTDeclarator dtor = decl.getDeclarators()[0];
+		IASTName name_f = dtor.getName();
+		
+		ICPPClassType A = (ICPPClassType) name_A.resolveBinding();
+		ICPPMethod f = (ICPPMethod) name_f.resolveBinding();
+		
+		assertNotNull(A);
+		assertNotNull(f);
+		assertSame(f.getScope(), A.getCompositeScope());
+	}
+	
+	//  class A { void f();  };      
+	//  void A::f() { }              
+	public void testMethodDefinition() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+		.getDeclarations()[0];
+		assertEquals(decl.getDeclarators().length, 0);
+		IASTCompositeTypeSpecifier comp = (IASTCompositeTypeSpecifier) decl
+		.getDeclSpecifier();
+		IASTName name_A = comp.getName();
+		
+		decl = (IASTSimpleDeclaration) comp.getMembers()[0];
+		IASTDeclarator dtor = decl.getDeclarators()[0];
+		IASTName name_f1 = dtor.getName();
+		
+		IASTFunctionDefinition def = (IASTFunctionDefinition) tu
+		.getDeclarations()[1];
+		IASTFunctionDeclarator fdtor = def.getDeclarator();
+		ICPPASTQualifiedName name_f2 = (ICPPASTQualifiedName) fdtor.getName();
+		
+		ICPPClassType A = (ICPPClassType) name_A.resolveBinding();
+		ICPPMethod f1 = (ICPPMethod) name_f1.resolveBinding();
+		ICPPMethod f2 = (ICPPMethod) name_f2.resolveBinding();
+		
+		IASTName[] names = name_f2.getNames();
+		assertEquals(names.length, 2);
+		IASTName qn1 = names[0];
+		IASTName qn2 = names[1];
+		
+		ICPPClassType A2 = (ICPPClassType) qn1.resolveBinding();
+		ICPPMethod f3 = (ICPPMethod) qn2.resolveBinding();
+		
+		assertNotNull(A);
+		assertNotNull(f1);
+		assertSame(f1, f2);
+		assertSame(f2, f3);
+		assertSame(A, A2);
+	}
+	
+	// class A { void f(); int i;    };   
+	// void A::f() { i; }                 
+	public void testMemberReference() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+		.getDeclarations()[0];
+		assertEquals(decl.getDeclarators().length, 0);
+		IASTCompositeTypeSpecifier comp = (IASTCompositeTypeSpecifier) decl
+		.getDeclSpecifier();
+		IASTName name_A = comp.getName();
+		
+		decl = (IASTSimpleDeclaration) comp.getMembers()[0];
+		IASTDeclarator dtor = decl.getDeclarators()[0];
+		IASTName name_f1 = dtor.getName();
+		
+		decl = (IASTSimpleDeclaration) comp.getMembers()[1];
+		dtor = decl.getDeclarators()[0];
+		IASTName name_i = dtor.getName();
+		
+		IASTFunctionDefinition def = (IASTFunctionDefinition) tu
+		.getDeclarations()[1];
+		IASTFunctionDeclarator fdtor = def.getDeclarator();
+		ICPPASTQualifiedName name_f2 = (ICPPASTQualifiedName) fdtor.getName();
+		
+		IASTCompoundStatement compound = (IASTCompoundStatement) def.getBody();
+		IASTExpressionStatement statement = (IASTExpressionStatement) compound
+		.getStatements()[0];
+		IASTIdExpression idExp = (IASTIdExpression) statement.getExpression();
+		IASTName name_i2 = idExp.getName();
+		
+		ICPPClassType A = (ICPPClassType) name_A.resolveBinding();
+		ICPPMethod f1 = (ICPPMethod) name_f1.resolveBinding();
+		ICPPMethod f2 = (ICPPMethod) name_f2.resolveBinding();
+		ICPPField i1 = (ICPPField) name_i.resolveBinding();
+		ICPPField i2 = (ICPPField) name_i2.resolveBinding();
+		
+		IASTName[] names = name_f2.getNames();
+		assertEquals(names.length, 2);
+		IASTName qn1 = names[0];
+		IASTName qn2 = names[1];
+		
+		ICPPClassType A2 = (ICPPClassType) qn1.resolveBinding();
+		ICPPMethod f3 = (ICPPMethod) qn2.resolveBinding();
+		
+		assertNotNull(A);
+		assertNotNull(f1);
+		assertNotNull(i1);
+		assertSame(f1, f2);
+		assertSame(f2, f3);
+		assertSame(A, A2);
+		assertSame(i1, i2);
+	}
+	
+	// class A { int i; };               
+	// class B : public A { void f(); }; 
+	// void B::f() { i; }                
+	public void testBasicInheritance() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+		.getDeclarations()[0];
+		ICPPASTCompositeTypeSpecifier comp = (ICPPASTCompositeTypeSpecifier) decl
+		.getDeclSpecifier();
+		IASTName name_A1 = comp.getName();
+		
+		decl = (IASTSimpleDeclaration) comp.getMembers()[0];
+		IASTName name_i1 = decl.getDeclarators()[0].getName();
+		
+		decl = (IASTSimpleDeclaration) tu.getDeclarations()[1];
+		comp = (ICPPASTCompositeTypeSpecifier) decl.getDeclSpecifier();
+		IASTName name_B1 = comp.getName();
+		
+		ICPPASTBaseSpecifier base = comp.getBaseSpecifiers()[0];
+		IASTName name_A2 = base.getName();
+		
+		decl = (IASTSimpleDeclaration) comp.getMembers()[0];
+		IASTName name_f1 = decl.getDeclarators()[0].getName();
+		
+		IASTFunctionDefinition def = (IASTFunctionDefinition) tu
+		.getDeclarations()[2];
+		ICPPASTQualifiedName name_f2 = (ICPPASTQualifiedName) def
+		.getDeclarator().getName();
+		IASTName name_B2 = name_f2.getNames()[0];
+		IASTName name_f3 = name_f2.getNames()[1];
+		
+		IASTCompoundStatement compound = (IASTCompoundStatement) def.getBody();
+		IASTExpressionStatement statement = (IASTExpressionStatement) compound
+		.getStatements()[0];
+		IASTIdExpression idExp = (IASTIdExpression) statement.getExpression();
+		IASTName name_i2 = idExp.getName();
+		
+		ICPPField i2 = (ICPPField) name_i2.resolveBinding();
+		ICPPField i1 = (ICPPField) name_i1.resolveBinding();
+		
+		ICPPClassType A2 = (ICPPClassType) name_A2.resolveBinding();
+		ICPPClassType A1 = (ICPPClassType) name_A1.resolveBinding();
+		ICPPClassType B2 = (ICPPClassType) name_B2.resolveBinding();
+		ICPPClassType B1 = (ICPPClassType) name_B1.resolveBinding();
+		
+		ICPPMethod f3 = (ICPPMethod) name_f3.resolveBinding();
+		ICPPMethod f2 = (ICPPMethod) name_f2.resolveBinding();
+		ICPPMethod f1 = (ICPPMethod) name_f1.resolveBinding();
+		assertNotNull(A1);
+		assertNotNull(B1);
+		assertNotNull(i1);
+		assertNotNull(f1);
+		assertSame(A1, A2);
+		assertSame(B1, B2);
+		assertSame(i1, i2);
+		assertSame(f1, f2);
+		assertSame(f2, f3);
+	}
+	
+	// namespace A{            
+	//    int a;               
+	// }                       
+	// namespace B{            
+	//    using namespace A;   
+	// }                       
+	// namespace C{            
+	//    using namespace A;   
+	// }                       
+	//                         
+	// namespace BC{           
+	//    using namespace B;   
+	//    using namespace C;   
+	// }                       
+	//                         
+	// void f(){               
+	//    BC::a++; //ok        
+	// }                       
+	public void testNamespaces() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		assertEquals(collector.size(), 13);
+		ICPPNamespace A = (ICPPNamespace) collector.getName(0).resolveBinding();
+		IVariable a = (IVariable) collector.getName(1).resolveBinding();
+		ICPPNamespace B = (ICPPNamespace) collector.getName(2).resolveBinding();
+		ICPPNamespace C = (ICPPNamespace) collector.getName(4).resolveBinding();
+		ICPPNamespace BC = (ICPPNamespace) collector.getName(6)
+		.resolveBinding();
+		IFunction f = (IFunction) collector.getName(9).resolveBinding();
+		assertInstances(collector, A, 3);
+		assertInstances(collector, a, 3);
+		assertInstances(collector, B, 2);
+		assertInstances(collector, C, 2);
+		assertInstances(collector, BC, 2);
+		assertInstances(collector, f, 1);
+	}
+	
+	// int A;                       
+	// class A {};                  
+	// void f() {                   
+	//    A++;                      
+	//    class A a;                
+	// }                            
+	public void testNameHiding() throws Exception {
+	    String content= getAboveComment();
+		IASTTranslationUnit tu = parse(content, ParserLanguage.CPP);
+		
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		assertEquals(collector.size(), 6);
+		IVariable vA = (IVariable) collector.getName(0).resolveBinding();
+		ICompositeType cA = (ICompositeType) collector.getName(1)
+		.resolveBinding();
+		IVariable a = (IVariable) collector.getName(5).resolveBinding();
+		
+		assertSame(a.getType(), cA);
+		assertInstances(collector, vA, 2);
+		assertInstances(collector, cA, 2);
+		
+		tu = parse(content, ParserLanguage.CPP);
+		collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		cA = (ICompositeType) collector.getName(1).resolveBinding();
+		IBinding A = collector.getName(3).resolveBinding();
+		vA = (IVariable) collector.getName(0).resolveBinding();
+		assertSame(vA, A);
+	}
+	
+	// class A { void f(); };            
+	// class B;                          
+	// void A::f() {                     
+	//    B b;                           
+	// }                                 
+	// int B;                            
+	public void testBlockTraversal() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		assertEquals(collector.size(), 9);
+		ICompositeType A = (ICompositeType) collector.getName(0)
+		.resolveBinding();
+		ICPPMethod f = (ICPPMethod) collector.getName(1).resolveBinding();
+		ICompositeType B = (ICompositeType) collector.getName(2)
+		.resolveBinding();
+		
+		IVariable b = (IVariable) collector.getName(7).resolveBinding();
+		IVariable B2 = (IVariable) collector.getName(8).resolveBinding();
+		assertSame(b.getType(), B);
+		assertInstances(collector, A, 2);
+		assertInstances(collector, f, 3);
+		assertInstances(collector, B, 2);
+		assertInstances(collector, b, 1);
+		assertInstances(collector, B2, 1);
+	}
+	
+	// void f( int i );                      
+	// void f( char c );                     
+	// void main() {                         
+	//    f( 1 );		//calls f( int );     
+	//    f( 'b' );                          
+	// }                                     
+	public void testFunctionResolution() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		IFunction f1 = (IFunction) collector.getName(0).resolveBinding();
+		IFunction f2 = (IFunction) collector.getName(2).resolveBinding();
+		
+		assertInstances(collector, f1, 2);
+		assertInstances(collector, f2, 2);
+	}
+	
+	// typedef struct {  
+	//     int x;        
+	// } S;              
+	// void f() {        
+	//     S myS;        
+	//     myS.x = 5;    
+	// }                 
+	public void testSimpleStruct() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		ICPPClassType anonStruct = (ICPPClassType) collector.getName(0)
+		.resolveBinding();
+		ICPPField x = (ICPPField) collector.getName(1).resolveBinding();
+		ITypedef S = (ITypedef) collector.getName(2).resolveBinding();
+		IFunction f = (IFunction) collector.getName(3).resolveBinding();
+		IVariable myS = (IVariable) collector.getName(5).resolveBinding();
+		
+		assertInstances(collector, anonStruct, 1);
+		assertInstances(collector, x, 2);
+		assertInstances(collector, S, 2);
+		assertInstances(collector, f, 1);
+		assertInstances(collector, myS, 2);
+	}
+	
+	// struct A;             
+	// void f(){             
+	//    struct A;          
+	//    struct A * a;      
+	// }                     
+	public void testStructureTags_1() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		ICPPClassType A1 = (ICPPClassType) collector.getName(0)
+		.resolveBinding();
+		ICPPClassType A2 = (ICPPClassType) collector.getName(2)
+		.resolveBinding();
+		IVariable a = (IVariable) collector.getName(4).resolveBinding();
+		
+		assertNotNull(a);
+		assertNotNull(A1);
+		assertNotNull(A2);
+		assertNotSame(A1, A2);
+		assertInstances(collector, A1, 1);
+		assertInstances(collector, A2, 2);
+	}
+	
+	// struct A;             
+	// void f(){             
+	//    struct A * a;      
+	// }                     
+	public void testStructureTags_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		ICPPClassType A1 = (ICPPClassType) collector.getName(0)
+		.resolveBinding();
+		ICPPClassType A2 = (ICPPClassType) collector.getName(2)
+		.resolveBinding();
+		IVariable a = (IVariable) collector.getName(3).resolveBinding();
+		
+		assertNotNull(a);
+		assertNotNull(A1);
+		assertNotNull(A2);
+		assertSame(A1, A2);
+		assertInstances(collector, A1, 2);
+	}
+	
+	// struct A;                
+	// struct A * a;            
+	// struct A { int i; };     
+	// void f() {               
+	//    a->i;                 
+	// }                        
+	public void testStructureDef() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		ICPPClassType A1 = (ICPPClassType) collector.getName(0)
+		.resolveBinding();
+		IVariable a = (IVariable) collector.getName(2).resolveBinding();
+		ICPPField i = (ICPPField) collector.getName(4).resolveBinding();
+		
+		assertInstances(collector, A1, 3);
+		assertInstances(collector, a, 2);
+		assertInstances(collector, i, 2);
+	}
+	
+	// struct x {};        
+	// void f( int x ) {   
+	//    struct x i;      
+	// }                   
+	public void testStructureNamespace() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		ICPPClassType x = (ICPPClassType) collector.getName(0).resolveBinding();
+		
+		assertInstances(collector, x, 2);
+	}
+	
+	// void f( int a );        
+	// void f( int b ){        
+	//    b;                   
+	// }                       
+	public void testFunctionDef() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		IFunction f = (IFunction) collector.getName(0).resolveBinding();
+		IParameter a = (IParameter) collector.getName(1).resolveBinding();
+		
+		assertInstances(collector, f, 2);
+		assertInstances(collector, a, 3);
+		
+		IScope scope = a.getScope();
+		assertNotNull(scope);
+		assertSame(scope.getParent(), f.getScope());
+	}
+	
+	// void f();              
+	// void g() {             
+	//    f();                
+	// }                      
+	// void f(){ }            
+	public void testSimpleFunctionCall() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		IFunction f = (IFunction) collector.getName(0).resolveBinding();
+		IFunction g = (IFunction) collector.getName(1).resolveBinding();
+		
+		assertInstances(collector, f, 3);
+		assertInstances(collector, g, 1);
+	}
+	
+	// void f() {                         
+	//    for( int i = 0; i < 5; i++ ) {  
+	//       i;                           
+	//    }                               
+	// }                                  
+	public void testForLoop() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		IVariable i = (IVariable) collector.getName(1).resolveBinding();
+		
+		assertInstances(collector, i, 4);
+	}
+	
+	// struct A { int x; };    
+	// void f(){               
+	//    ((struct A *) 1)->x; 
+	// }                       
+	public void testExpressionFieldReference() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		ICPPClassType A = (ICPPClassType) collector.getName(0).resolveBinding();
+		IField x = (IField) collector.getName(1).resolveBinding();
+		
+		assertInstances(collector, A, 2);
+		assertInstances(collector, x, 2);
+	}
+	
+	// enum hue { red, blue, green };     
+	// enum hue col, *cp;                 
+	// void f() {                         
+	//    col = blue;                     
+	//    cp = &col;                      
+	//    if( *cp != red )                
+	//       return;                      
+	// }                                  
+	public void testEnumerations() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		IEnumeration hue = (IEnumeration) collector.getName(0).resolveBinding();
+		IEnumerator red = (IEnumerator) collector.getName(1).resolveBinding();
+		IEnumerator blue = (IEnumerator) collector.getName(2).resolveBinding();
+		IEnumerator green = (IEnumerator) collector.getName(3).resolveBinding();
+		IVariable col = (IVariable) collector.getName(5).resolveBinding();
+		IVariable cp = (IVariable) collector.getName(6).resolveBinding();
+		
+		assertInstances(collector, hue, 2);
+		assertInstances(collector, red, 2);
+		assertInstances(collector, blue, 2);
+		assertInstances(collector, green, 1);
+		assertInstances(collector, col, 3);
+		assertInstances(collector, cp, 3);
+		
+		assertTrue(cp.getType() instanceof IPointerType);
+		IPointerType pt = (IPointerType) cp.getType();
+		assertSame(pt.getType(), hue);
+	}
+	
+	public void testPointerToFunction() throws Exception {
+		IASTTranslationUnit tu = parse("int (*pfi)();", ParserLanguage.CPP); //$NON-NLS-1$
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		IVariable pf = (IVariable) collector.getName(0).resolveBinding();
+		IPointerType pt = (IPointerType) pf.getType();
+		assertTrue(pt.getType() instanceof IFunctionType);
+		
+		tu = parse(
+				"struct A; int (*pfi)( int, struct A * );", ParserLanguage.CPP); //$NON-NLS-1$
+		collector = new CPPNameCollector();
+		tu.accept(collector);
+		ICPPClassType A = (ICPPClassType) collector.getName(0).resolveBinding();
+		pf = (IVariable) collector.getName(1).resolveBinding();
+		pt = (IPointerType) pf.getType();
+		assertTrue(pt.getType() instanceof IFunctionType);
+		IFunctionType ft = (IFunctionType) pt.getType();
+		IType[] params = ft.getParameterTypes();
+		assertTrue(params[0] instanceof IBasicType);
+		assertTrue(params[1] instanceof IPointerType);
+		pt = (IPointerType) params[1];
+		assertSame(pt.getType(), A);
+	}
+	
+	// struct A;                           
+	// int * f( int i, char c );           
+	// void ( *g ) ( A * );         
+	// void (* (*h)(A**) ) ( int ); 
+	public void testFunctionTypes() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+		.getDeclarations()[0];
+		IASTElaboratedTypeSpecifier elabSpec = (IASTElaboratedTypeSpecifier) decl
+		.getDeclSpecifier();
+		ICompositeType A = (ICompositeType) elabSpec.getName().resolveBinding();
+		
+		decl = (IASTSimpleDeclaration) tu.getDeclarations()[1];
+		IFunction f = (IFunction) decl.getDeclarators()[0].getName()
+		.resolveBinding();
+		
+		decl = (IASTSimpleDeclaration) tu.getDeclarations()[2];
+		IVariable g = (IVariable) decl.getDeclarators()[0]
+		                                                .getNestedDeclarator().getName().resolveBinding();
+		
+		decl = (IASTSimpleDeclaration) tu.getDeclarations()[3];
+		IVariable h = (IVariable) decl.getDeclarators()[0]
+		                                                .getNestedDeclarator().getNestedDeclarator().getName()
+		                                                .resolveBinding();
+		
+		IFunctionType t_f = f.getType();
+		IType t_f_return = t_f.getReturnType();
+		assertTrue(t_f_return instanceof IPointerType);
+		assertTrue(((IPointerType) t_f_return).getType() instanceof IBasicType);
+		IType[] t_f_params = t_f.getParameterTypes();
+		assertEquals(t_f_params.length, 2);
+		assertTrue(t_f_params[0] instanceof IBasicType);
+		assertTrue(t_f_params[1] instanceof IBasicType);
+		
+		// g is a pointer to a function that returns void and has 1 parameter
+		// struct A *
+		IType t_g = g.getType();
+		assertTrue(t_g instanceof IPointerType);
+		assertTrue(((IPointerType) t_g).getType() instanceof IFunctionType);
+		IFunctionType t_g_func = (IFunctionType) ((IPointerType) t_g).getType();
+		IType t_g_func_return = t_g_func.getReturnType();
+		assertTrue(t_g_func_return instanceof IBasicType);
+		IType[] t_g_func_params = t_g_func.getParameterTypes();
+		assertEquals(t_g_func_params.length, 1);
+		IType t_g_func_p1 = t_g_func_params[0];
+		assertTrue(t_g_func_p1 instanceof IPointerType);
+		assertSame(((IPointerType) t_g_func_p1).getType(), A);
+		
+		// h is a pointer to a function that returns a pointer to a function
+		// the returned pointer to function returns void and takes 1 parameter
+		// int
+		// the *h function takes 1 parameter struct A**
+		IType t_h = h.getType();
+		assertTrue(t_h instanceof IPointerType);
+		assertTrue(((IPointerType) t_h).getType() instanceof IFunctionType);
+		IFunctionType t_h_func = (IFunctionType) ((IPointerType) t_h).getType();
+		IType t_h_func_return = t_h_func.getReturnType();
+		IType[] t_h_func_params = t_h_func.getParameterTypes();
+		assertEquals(t_h_func_params.length, 1);
+		IType t_h_func_p1 = t_h_func_params[0];
+		assertTrue(t_h_func_p1 instanceof IPointerType);
+		assertTrue(((IPointerType) t_h_func_p1).getType() instanceof IPointerType);
+		assertSame(((IPointerType) ((IPointerType) t_h_func_p1).getType())
+				.getType(), A);
+		
+		assertTrue(t_h_func_return instanceof IPointerType);
+		IFunctionType h_return = (IFunctionType) ((IPointerType) t_h_func_return)
+		.getType();
+		IType h_r = h_return.getReturnType();
+		IType[] h_ps = h_return.getParameterTypes();
+		assertTrue(h_r instanceof IBasicType);
+		assertEquals(h_ps.length, 1);
+		assertTrue(h_ps[0] instanceof IBasicType);
+	}
+	
+	public void testFnReturningPtrToFn() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"void ( * f( int ) )(){}", ParserLanguage.CPP); //$NON-NLS-1$
+		
+		IASTFunctionDefinition def = (IASTFunctionDefinition) tu
+		.getDeclarations()[0];
+		IFunction f = (IFunction) def.getDeclarator().getName().resolveBinding();
+		
+		IFunctionType ft = f.getType();
+		assertTrue(ft.getReturnType() instanceof IPointerType);
+		assertTrue(((IPointerType) ft.getReturnType()).getType() instanceof IFunctionType);
+		assertEquals(ft.getParameterTypes().length, 1);
+	}
+	
+	// void f();                  
+	// namespace A {              
+	//    void g();               
+	// }                          
+	// namespace X {              
+	//    using ::f;              
+	//    using A::g;             
+	// }                          
+	// void h() {                 
+	//    X::f();                 
+	//    X::g();                 
+	// }                          
+	public void testUsingDeclaration_1() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		IFunction f = (IFunction) collector.getName(0).resolveBinding();
+		ICPPNamespace A = (ICPPNamespace) collector.getName(1).resolveBinding();
+		IFunction g = (IFunction) collector.getName(2).resolveBinding();
+		ICPPNamespace X = (ICPPNamespace) collector.getName(3).resolveBinding();
+		
+		ICPPUsingDeclaration using = (ICPPUsingDeclaration) collector
+		.getName(5).resolveBinding();
+		IBinding[] delegates = using.getDelegates();
+		assertEquals(delegates.length, 1);
+		assertSame(delegates[0], f);
+		assertInstances(collector, delegates[0], 3); // decl + using-decl + ref
+		assertInstances(collector, A, 2);
+		assertInstances(collector, X, 3);
+		
+		ICPPUsingDeclaration using_g = (ICPPUsingDeclaration) collector
+		.getName(8).resolveBinding();
+		assertSame(using_g.getDelegates()[0], g);
+		assertInstances(collector, using_g.getDelegates()[0], 3); // decl + using-decl + ref
+	}
+	
+	// typedef int Int;      
+	// void f( int i );      
+	// void f( const int );  
+	// void f( Int i );      
+	// void g( char * );     
+	// void g( char [] );    
+	// void h( int(a)() );    
+	// void h( int (*) () ); 
+	public void testFunctionDeclarations() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		IFunction f = (IFunction) collector.getName(1).resolveBinding();
+		isTypeEqual(f.getType(), "void (int)");
+		IFunction g = (IFunction) collector.getName(8).resolveBinding();
+		isTypeEqual(g.getType(), "void (char *)");
+		IFunction h = (IFunction) collector.getName(12).resolveBinding();
+		isTypeEqual(h.getType(), "void (int () *)");
+		
+		assertInstances(collector, f, 3);
+		assertInstances(collector, g, 2);
+		assertInstances(collector, h, 2);
+	}
+	
+	// class P1 { public: int x; };        
+	// class P2 { public: int x; };        
+	// class B : public P1, public P2 {};  
+	// void main() {                       
+	//    B * b = new B();                 
+	//    b->x;                            
+	// }                                   
+	public void testProblem_AmbiguousInParent() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		IProblemBinding x = (IProblemBinding) collector.getName(12)
+		.resolveBinding();
+		assertEquals(x.getID(), IProblemBinding.SEMANTIC_AMBIGUOUS_LOOKUP);
+	}
+	
+	// class D { public: int x; };       
+	// class C : public virtual D {};    
+	// class B : public virtual D {};    
+	// class A : public B, public C {};  
+	// void main() {                     
+	//    A * a = new A();               
+	//    a->x;                          
+	// }                                 
+	public void testVirtualParentLookup() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		assertEquals(collector.size(), 15);
+		
+		ICPPClassType D = (ICPPClassType) collector.getName(0).resolveBinding();
+		ICPPField x = (ICPPField) collector.getName(1).resolveBinding();
+		ICPPClassType C = (ICPPClassType) collector.getName(2).resolveBinding();
+		ICPPClassType B = (ICPPClassType) collector.getName(4).resolveBinding();
+		ICPPClassType A = (ICPPClassType) collector.getName(6).resolveBinding();
+		ICPPConstructor ctor = A.getConstructors()[0];
+		assertInstances(collector, D, 3);
+		assertInstances(collector, C, 2);
+		assertInstances(collector, B, 2);
+		assertInstances(collector, A, 2);
+		assertInstances(collector, ctor, 1);
+		assertInstances(collector, x, 2);
+	}
+	
+	// class D { public: int x; };        
+	// class C : public D {};             
+	// class B : public D {};             
+	// class A : public B, public C {};   
+	// void main() {                      
+	//    A * a = new A();                
+	//    a->x;                           
+	// }                                  
+	public void testAmbiguousVirtualParentLookup() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		assertEquals(collector.size(), 15);
+		
+		ICPPClassType D = (ICPPClassType) collector.getName(0).resolveBinding();
+		ICPPField x1 = (ICPPField) collector.getName(1).resolveBinding();
+		ICPPClassType C = (ICPPClassType) collector.getName(2).resolveBinding();
+		ICPPClassType B = (ICPPClassType) collector.getName(4).resolveBinding();
+		ICPPClassType A = (ICPPClassType) collector.getName(6).resolveBinding();
+		ICPPConstructor ctor = A.getConstructors()[0];
+		IProblemBinding x2 = (IProblemBinding) collector.getName(14)
+		.resolveBinding();
+		assertEquals(x2.getID(), IProblemBinding.SEMANTIC_AMBIGUOUS_LOOKUP);
+		
+		assertInstances(collector, D, 3);
+		assertInstances(collector, C, 2);
+		assertInstances(collector, B, 2);
+		assertInstances(collector, A, 2);
+		assertInstances(collector, ctor, 1);
+		assertInstances(collector, x1, 1);
+	}
+	
+	// namespace A {                      
+	//    int x;                          
+	// }                                  
+	// int x;                             
+	// namespace A {                      
+	//    void f() { x; }                 
+	// }                                  
+	public void testExtendedNamespaces() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector collector = new CPPNameCollector();
+		tu.accept(collector);
+		
+		assertEquals(collector.size(), 6);
+		
+		ICPPNamespace A = (ICPPNamespace) collector.getName(0).resolveBinding();
+		IVariable x1 = (IVariable) collector.getName(1).resolveBinding();
+		IVariable x2 = (IVariable) collector.getName(2).resolveBinding();
+		
+		assertInstances(collector, A, 2);
+		assertInstances(collector, x1, 2);
+		assertInstances(collector, x2, 1);
+	}
+	
+	// class A { };
+	public void testImplicitConstructors() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+		.getDeclarations()[0];
+		IASTCompositeTypeSpecifier compSpec = (IASTCompositeTypeSpecifier) decl
+		.getDeclSpecifier();
+		ICPPClassType A = (ICPPClassType) compSpec.getName().resolveBinding();
+		ICPPConstructor[] ctors = A.getConstructors();
+		
+		assertNotNull(ctors);
+		assertEquals(ctors.length, 2);
+		
+		assertEquals(ctors[0].getParameters().length, 1);
+		
+		IType t = ctors[0].getParameters()[0].getType();
+		assertTrue(t instanceof IBasicType);
+		assertEquals(((IBasicType) t).getType(), IBasicType.t_void);
+		
+		assertEquals(ctors[1].getParameters().length, 1);
+		
+		t = ctors[1].getParameters()[0].getType();
+		assertTrue(t instanceof ICPPReferenceType);
+		assertTrue(((ICPPReferenceType) t).getType() instanceof IQualifierType);
+		IQualifierType qt = (IQualifierType) ((ICPPReferenceType) t).getType();
+		assertTrue(qt.isConst());
+		assertSame(qt.getType(), A);
+	}
+	
+	// class A { A(void);  A( const A & ); };
+	public void testConstructors() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+		.getDeclarations()[0];
+		IASTCompositeTypeSpecifier compSpec = (IASTCompositeTypeSpecifier) decl
+		.getDeclSpecifier();
+		ICPPClassType A = (ICPPClassType) compSpec.getName().resolveBinding();
+		ICPPConstructor[] ctors = A.getConstructors();
+		
+		assertNotNull(ctors);
+		assertEquals(ctors.length, 2);
+		
+		assertEquals(ctors[0].getParameters().length, 1);
+		assertEquals(ctors[1].getParameters().length, 1);
+		
+		IType t = ctors[1].getParameters()[0].getType();
+		assertTrue(t instanceof ICPPReferenceType);
+		assertTrue(((ICPPReferenceType) t).getType() instanceof IQualifierType);
+		IQualifierType qt = (IQualifierType) ((ICPPReferenceType) t).getType();
+		assertTrue(qt.isConst());
+		assertSame(qt.getType(), A);
+	}
+	
+	// class A {~A(); };
+	// class B {~B(void); };
+	public void testExplicitDestructor_183160() throws Exception {
+		// class F {(~)F(); };
+		// class G {(~)G(void); };
+		
+		BufferedReader br= new BufferedReader(new StringReader(getAboveComment()));
+		for(String line= br.readLine(); line!=null; line= br.readLine()) {
+			IASTTranslationUnit tu = parse(line, ParserLanguage.CPP);
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			IASTCompositeTypeSpecifier compSpec = (IASTCompositeTypeSpecifier) decl.getDeclSpecifier();
+			ICPPClassType A = (ICPPClassType) compSpec.getName().resolveBinding();
+			
+			ICPPMethod[] methods = ((ICPPClassScope)A.getCompositeScope()).getImplicitMethods();
+			assertNotNull(methods);
+			int count=0;
+			for (ICPPMethod method : methods)
+				count+= method.getName().startsWith("~") ? 1 : 0;
+			assertEquals(line, 0, count);
+			
+			methods = A.getDeclaredMethods();
+			assertNotNull(methods);
+			count=0;
+			for (ICPPMethod method : methods)
+				count+= method.getName().startsWith("~") ? 1 : 0;
+			assertEquals(line, 1, count);
+		}
+	}
+	
+	// class C {};
+	// class D {D();};
+	// class E {E(void);};
+	public void testImplicitDestructor_183160() throws Exception {
+		BufferedReader br= new BufferedReader(new StringReader(getAboveComment()));
+		for(String line= br.readLine(); line!=null; line= br.readLine()) {
+			IASTTranslationUnit tu = parse(line, ParserLanguage.CPP);
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			IASTCompositeTypeSpecifier compSpec = (IASTCompositeTypeSpecifier) decl.getDeclSpecifier();
+			ICPPClassType A = (ICPPClassType) compSpec.getName().resolveBinding();
+			
+			ICPPMethod[] methods = ((ICPPClassScope)A.getCompositeScope()).getImplicitMethods();
+			assertNotNull(methods);
+			int count=0;
+			for (ICPPMethod method : methods)
+				count+= method.getName().startsWith("~") ? 1 : 0;
+			assertEquals(line, 1, count);
+			
+			methods = A.getDeclaredMethods();
+			assertNotNull(methods);
+			count=0;
+			for (ICPPMethod method : methods)
+				count+= method.getName().startsWith("~") ? 1 : 0;
+			assertEquals(line, 0, count);
+		}
+	}
+	
+	//  class A {public: A();};
+	//	class B {public: B() {}};
+	//	class C {public: C() {}};
+	//	class D {public: D(void) {}};
+	//	class E {protected: E();};
+	//	class F {protected: F() {}};
+	//	class G {protected: G() {}};
+	//	class H {protected: H(void) {}};
+	//	class I {private: I();};
+	//	class J {private: J() {}};
+	//	class K {private: K() {}};
+	//	class L {private: L(void) {}};
+	//	class M {M();};
+	//	class N {N() {}};
+	//	class O {O() {}};
+	//	class P {P(void) {}};
+	//  class Q {public: Q(int k=5);};
+	//  class R {public: R(int k=5, long k=4);};
+	//  class S {public: S(int k=5, int* ip= 0);};
+	//  class T {public: T(int k=5, int* ip= 0, T* t= 0);};
+	public void testExplicitDefaultConstructor_183160() throws Exception {
+		BufferedReader br= new BufferedReader(new StringReader(getAboveComment()));
+		for(String line= br.readLine(); line!=null; line= br.readLine()) {
+			IASTTranslationUnit tu = parse(line, ParserLanguage.CPP);
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			IASTCompositeTypeSpecifier compSpec = (IASTCompositeTypeSpecifier) decl.getDeclSpecifier();
+			ICPPClassType A = (ICPPClassType) compSpec.getName().resolveBinding();
+			ICPPConstructor[] ctors = A.getConstructors();
+			
+			assertNotNull(ctors);
+			assertEquals(2, ctors.length); // one user-declared default constructor, one implicit copy constructor
+		}
+	}
+	
+	//  class Q {public: Q(int k);};
+	//  class R {public: R(int k=5, long k);};
+	//  class S {public: S(int k=5, int* ip);};
+	//  class T {public: T(int k, int* ip= 0, T* t= 0);};
+	public void testExplicitNonDefaultConstructor_183160() throws Exception {
+		BufferedReader br= new BufferedReader(new StringReader(getAboveComment()));
+		for(String line= br.readLine(); line!=null; line= br.readLine()) {
+			IASTTranslationUnit tu = parse(line, ParserLanguage.CPP);
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			IASTCompositeTypeSpecifier compSpec = (IASTCompositeTypeSpecifier) decl.getDeclSpecifier();
+			ICPPClassType A = (ICPPClassType) compSpec.getName().resolveBinding();
+			ICPPConstructor[] ctors = A.getConstructors();
+			
+			assertNotNull(ctors);
+			assertEquals(2, ctors.length); // one user-declared non-default constructor, one implicit copy constructor
+		}
+	}
+	
+	//  class A {public: A(A &);};
+	//	class B {private: B(const B &);};
+	//	class C {protected: C(volatile C &);};
+	//	class D {D(const volatile D &) {}};
+	//	class E {public: E(E &, int k=5);};
+	//	class F {private: F(const F &, int j=2, int k=3);};
+	//	class G {protected: G(volatile G &, int i=4, int l=2);};
+	//	class H {H(const volatile H &, int i=1, long k=2) {}};
+	public void testExplicitCopyConstructor_183160() throws Exception {
+		BufferedReader br= new BufferedReader(new StringReader(getAboveComment()));
+		for(String line= br.readLine(); line!=null; line= br.readLine()) {
+			IASTTranslationUnit tu = parse(line, ParserLanguage.CPP);
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			IASTCompositeTypeSpecifier compSpec = (IASTCompositeTypeSpecifier) decl.getDeclSpecifier();
+			ICPPClassType A = (ICPPClassType) compSpec.getName().resolveBinding();
+			ICPPConstructor[] ctors = A.getConstructors();
+			
+			assertNotNull(ctors);
+			// one copy constructor, no implicit default constructor
+			assertEquals(1, ctors.length); 
+		}
+	}
+	
+	//	class I {public: I(I *, int k=5);}; // I * rather than I &
+	//	class J {private: J(const J *, int j, int k=3);}; // J * rather than J &
+	//	class K {protected: K(volatile K *, int i=4, int l=2);}; // K * rather than K  &
+	//	class L {L(const volatile L &, int i=1, long k=2, int* x) {}}; // param int* x has no initializer
+	public void testNotExplicitCopyConstructor_183160() throws Exception {
+		BufferedReader br= new BufferedReader(new StringReader(getAboveComment()));
+		for(String line= br.readLine(); line!=null; line= br.readLine()) {
+			IASTTranslationUnit tu = parse(line, ParserLanguage.CPP);
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			IASTCompositeTypeSpecifier compSpec = (IASTCompositeTypeSpecifier) decl.getDeclSpecifier();
+			ICPPClassType A = (ICPPClassType) compSpec.getName().resolveBinding();
+			ICPPConstructor[] ctors = A.getConstructors();
+			
+			assertNotNull(ctors);
+			// one copy constructor, one user declared constructor (not a copy constructor)
+			assertEquals(2, ctors.length); 
+		}
+	}
+	
+	//	class A {public: void operator=(int); };  // legitimate, but not a copy assignment operator
+	//	class B {public: void operator=(B &, int); };  // compile error
+	//	class C {public: void operator=(C &c, int k=5) {} };  // compile error
+	//	class D {public: void operator=(const D &, const D &); };  // compile error
+	public void testNotExplicitCopyAssignmentOperator_183160() throws Exception {
+		BufferedReader br= new BufferedReader(new StringReader(getAboveComment()));
+		for(String line= br.readLine(); line!=null; line= br.readLine()) {
+			IASTTranslationUnit tu = parse(line, ParserLanguage.CPP);
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			IASTCompositeTypeSpecifier compSpec = (IASTCompositeTypeSpecifier) decl.getDeclSpecifier();
+			ICPPClassType A = (ICPPClassType) compSpec.getName().resolveBinding();
+			ICPPMethod[] methods = ((ICPPClassScope)A.getCompositeScope()).getImplicitMethods();
+			assertNotNull(methods);
+			int count=0;
+			for (ICPPMethod method : methods) {
+				boolean eq= Arrays.equals(method.getName().toCharArray(), OverloadableOperator.ASSIGN.toCharArray());
+				count+= eq ? 1 : 0;
+			}
+			
+			assertEquals(1, count); // check for one implicit operator= method
+			
+			methods = A.getDeclaredMethods();
+			assertNotNull(methods);
+			count=0;
+			for (ICPPMethod method : methods) {
+				boolean eq= Arrays.equals(method.getName().toCharArray(), OverloadableOperator.ASSIGN.toCharArray());
+				count+= eq ? 1 : 0;
+			}
+			
+			assertEquals(1, count); // check for the user declared
+		}
+	}
+	
+	//	class A {public: void operator=(A &); };
+	//	class B {protected: void operator=(const B &); };
+	//	class C {private: void operator=(volatile C &) {} };
+	//	class D {D& operator=(volatile const D &); };  
+	public void testExplicitCopyAssignmentOperator_183160() throws Exception {
+		BufferedReader br= new BufferedReader(new StringReader(getAboveComment()));
+		for(String line= br.readLine(); line!=null; line= br.readLine()) {
+			IASTTranslationUnit tu = parse(line, ParserLanguage.CPP);
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			IASTCompositeTypeSpecifier compSpec = (IASTCompositeTypeSpecifier) decl.getDeclSpecifier();
+			ICPPClassType A = (ICPPClassType) compSpec.getName().resolveBinding();
+			ICPPMethod[] methods = ((ICPPClassScope)A.getCompositeScope()).getImplicitMethods();
+			assertNotNull(methods);
+			int count=0;
+			for (ICPPMethod method : methods) {
+				boolean eq= Arrays.equals(method.getName().toCharArray(), OverloadableOperator.ASSIGN.toCharArray());
+				count+= eq ? 1 : 0;
+			}
+			
+			assertEquals(0, count); // check for no implicit operator= methods
+			
+			methods = A.getDeclaredMethods();
+			assertNotNull(methods);
+			count=0;
+			for (ICPPMethod method : methods) {
+				boolean eq= Arrays.equals(method.getName().toCharArray(), OverloadableOperator.ASSIGN.toCharArray());
+				count+= eq ? 1 : 0;
+			}
+			
+			assertEquals(1, count); // only should get the user declared
+		}
+	}
+	
+	// namespace A { int x; }   
+	// namespace B = A;         
+	// int f(){ B::x;  }        
+	public void testNamespaceAlias() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 8);
+		ICPPNamespace A = (ICPPNamespace) col.getName(0).resolveBinding();
+		IVariable x = (IVariable) col.getName(1).resolveBinding();
+		ICPPNamespace B = (ICPPNamespace) col.getName(2).resolveBinding();
+		assertTrue(B instanceof ICPPNamespaceAlias);
+		assertSame(((ICPPNamespaceAlias) B).getBinding(), A);
+		
+		assertInstances(col, A, 2);
+		assertInstances(col, B, 2);
+		assertInstances(col, x, 3);
+	}
+	
+	// public void testBug84250() throws Exception {
+	// assertTrue(((IASTDeclarationStatement) ((IASTCompoundStatement)
+	// ((IASTFunctionDefinition) parse(
+	// "void f() { int (*p) [2]; }",
+	// ParserLanguage.CPP).getDeclarations()[0]).getBody()).getStatements()[0]).getDeclaration()
+	// instanceof IASTSimpleDeclaration); //$NON-NLS-1$
+	// }
+	
+	// void f() {                 
+	//    int ( *p ) [2];         
+	//    (&p)[0] = 1;            
+	// }                          
+	public void testBug84250() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 3);
+		IVariable p = (IVariable) col.getName(1).resolveBinding();
+		assertTrue(p.getType() instanceof IPointerType);
+		assertTrue(((IPointerType) p.getType()).getType() instanceof IArrayType);
+		IArrayType at = (IArrayType) ((IPointerType) p.getType()).getType();
+		assertTrue(at.getType() instanceof IBasicType);
+		
+		assertInstances(col, p, 2);
+	}
+	
+	// void f() {                 
+	//    int ( *p ) [2];         
+	//    (&p)[0] = 1;            
+	// }                          
+	public void testBug84250_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 3);
+		
+		IVariable p_ref = (IVariable) col.getName(2).resolveBinding();
+		IVariable p_decl = (IVariable) col.getName(1).resolveBinding();
+		
+		assertSame(p_ref, p_decl);
+	}
+	
+	// struct s { double i; } f(void);  
+	// struct s f(void){}               
+	public void testBug84266() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 7);
+		
+		ICompositeType s_ref = (ICompositeType) col.getName(4).resolveBinding();
+		ICompositeType s_decl = (ICompositeType) col.getName(0)
+		.resolveBinding();
+		
+		assertSame(s_ref, s_decl);
+	}
+	
+	public void testBug84266_2() throws Exception {
+		IASTTranslationUnit tu = parse("struct s f(void);", ParserLanguage.CPP); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 3);
+		
+		ICompositeType s = (ICompositeType) col.getName(0).resolveBinding();
+		assertNotNull(s);
+		
+		tu = parse("struct s f(void){}", ParserLanguage.CPP); //$NON-NLS-1$
+		col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 3);
+		
+		s = (ICompositeType) col.getName(0).resolveBinding();
+		assertNotNull(s);
+	}
+	
+	// void f( int m, int c[m][m] );        
+	// void f( int m, int c[m][m] ){        
+	//    int x;                            
+	//    { int x = x; }                    
+	// }                                    
+	public void testBug84228() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 13);
+		
+		IParameter m = (IParameter) col.getName(3).resolveBinding();
+		IVariable x3 = (IVariable) col.getName(12).resolveBinding();
+		IVariable x2 = (IVariable) col.getName(11).resolveBinding();
+		IVariable x1 = (IVariable) col.getName(10).resolveBinding();
+		
+		assertSame(x2, x3);
+		assertNotSame(x1, x2);
+		
+		assertInstances(col, m, 6);
+		assertInstances(col, x1, 1);
+		assertInstances(col, x2, 2);
+	}
+	
+	// class A { public : static int n; };  
+	// int main() {                         
+	//    int A;                            
+	//    A::n = 42;                        
+	//    A b;                              
+	// }                                    
+	public void testBug84615() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 9);
+		
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPField n = (ICPPField) col.getName(1).resolveBinding();
+		IBinding Aref = col.getName(5).resolveBinding();
+		IBinding nref = col.getName(6).resolveBinding();
+		IProblemBinding prob = (IProblemBinding) col.getName(7)
+		.resolveBinding();
+		
+		assertSame(A, Aref);
+		assertSame(n, nref);
+		assertNotNull(prob);
+	}
+	
+	public void testBug84371() throws Exception {
+		String code = "int x = ::ABC::DEF::ghi;"; //$NON-NLS-1$
+		IASTTranslationUnit tu = parse(code, ParserLanguage.CPP);
+		IASTSimpleDeclaration x = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+		IASTInitializerExpression e = (IASTInitializerExpression) x
+		.getDeclarators()[0].getInitializer();
+		IASTIdExpression id = (IASTIdExpression) e.getExpression();
+		ICPPASTQualifiedName name = (ICPPASTQualifiedName) id.getName();
+		assertTrue(name.isFullyQualified());
+		assertEquals(name.getNames().length, 3);
+		assertEquals(name.getNames()[0].toString(), "ABC"); //$NON-NLS-1$
+		assertEquals(name.getNames()[1].toString(), "DEF"); //$NON-NLS-1$
+		assertEquals(name.getNames()[2].toString(), "ghi"); //$NON-NLS-1$
+	}
+	
+	// namespace Y { void f(float); }                         
+	// namespace A { using namespace Y; void f(int); }             
+	// namespace B { void f(char);  }                         
+	// namespace AB { using namespace A; using namespace B; } 
+	// void h(){         
+	//    AB::f(1);      
+	//    AB::f(`c`);    
+	// }                 
+	public void testBug84679() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP,
+				false, false);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPNamespace Y = (ICPPNamespace) col.getName(0).resolveBinding();
+		ICPPNamespace A = (ICPPNamespace) col.getName(3).resolveBinding();
+		ICPPNamespace B = (ICPPNamespace) col.getName(7).resolveBinding();
+		ICPPNamespace AB = (ICPPNamespace) col.getName(10).resolveBinding();
+		
+		IFunction f = (IFunction) col.getName(16).resolveBinding();
+		IFunction fdef = (IFunction) col.getName(5).resolveBinding();
+		assertTrue(col.getName(19).resolveBinding() instanceof IProblemBinding);
+		assertSame(f, fdef);
+		// assertEquals(IProblemBinding.SEMANTIC_NAME_NOT_FOUND, f2.getID());
+		assertInstances(col, Y, 2);
+		assertInstances(col, A, 2);
+		assertInstances(col, B, 2);
+		assertInstances(col, AB, 3);
+	}
+	
+	// struct Node {          
+	//    struct Node* Next;  
+	//    struct Data* Data;  
+	// };                     
+	// struct Data {          
+	//    struct Node * node; 
+	//    friend struct Glob; 
+	// };                     
+	public void testBug84692() throws Exception {
+		// also tests bug 234042.
+		CPPASTNameBase.sAllowRecursionBindings= false;
+		
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+
+		assertEquals(col.size(), 9);
+
+		ICPPClassType Node = (ICPPClassType) col.getName(1).resolveBinding();
+		ICPPClassType Data = (ICPPClassType) col.getName(3).resolveBinding();
+		assertSame(Data.getScope(), tu.getScope());
+
+		assertInstances(col, Node, 3);
+		assertInstances(col, Data, 2);
+	}
+	
+	// namespace B { int b; }                        
+	// namespace A { using namespace B;  int a;  }   
+	// namespace B { using namespace A; }            
+	// void f() { B::a++;  }                         
+	public void testBug84686() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 11);
+		
+		ICPPVariable a1 = (ICPPVariable) col.getName(4).resolveBinding();
+		IVariable a2 = (IVariable) col.getName(10).resolveBinding();
+		assertSame(a1, a2);
+	}
+	
+	// struct C {                               
+	//    void f();                             
+	//    const C& operator=( const C& );       
+	// };                                       
+	// const C& C::operator=( const C& other) { 
+	//    if( this != &other ) {                
+	//       this->~C();                        
+	//       new (this) C(other );              
+	//       f();                               
+	//    }                                     
+	//    return *this;                         
+	// }                                        
+	public void testBug84705() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 17);
+		
+		ICPPMethod f = (ICPPMethod) col.getName(1).resolveBinding();
+		IASTName[] refs = tu.getReferences(f);
+		assertEquals(1, refs.length);
+		assertSame(f, refs[0].resolveBinding());
+		
+		ICPPClassType C = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPMethod op = (ICPPMethod) col.getName(3).resolveBinding();
+		IParameter other = (IParameter) col.getName(11).resolveBinding();
+		ICPPMethod dtor = (ICPPMethod) col.getName(13).resolveBinding();
+		assertNotNull(dtor);
+		assertEquals(dtor.getName(), "~C"); //$NON-NLS-1$
+		assertInstances(col, C, 6);
+		
+		assertInstances(col, op, 3);
+		assertInstances(col, other, 4);
+	}
+	
+	// class A { void f(); void g() const; };   
+	// void A::f(){ this; }                     
+	// void A::g() const { *this; }             
+	public void testThis() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+		.getDeclarations()[0];
+		ICPPClassType A = (ICPPClassType) ((IASTCompositeTypeSpecifier) decl
+				.getDeclSpecifier()).getName().resolveBinding();
+		
+		IASTFunctionDefinition def = (IASTFunctionDefinition) tu
+		.getDeclarations()[1];
+		IASTExpressionStatement expStatement = (IASTExpressionStatement) ((IASTCompoundStatement) def
+				.getBody()).getStatements()[0];
+		assertTrue(expStatement.getExpression() instanceof IASTLiteralExpression);
+		IType type = expStatement.getExpression().getExpressionType();
+		
+		assertTrue(type instanceof IPointerType);
+		assertSame(((IPointerType) type).getType(), A);
+		
+		def = (IASTFunctionDefinition) tu.getDeclarations()[2];
+		expStatement = (IASTExpressionStatement) ((IASTCompoundStatement) def
+				.getBody()).getStatements()[0];
+		IASTUnaryExpression ue = (IASTUnaryExpression) expStatement.getExpression();
+		type = ue.getExpressionType();
+		
+		assertTrue(type instanceof IQualifierType);
+		assertSame(((IQualifierType) type).getType(), A);
+		assertTrue(((IQualifierType) type).isConst());
+	}
+	
+	public void testBug84710() throws Exception {
+		IASTTranslationUnit tu = parse("class T { T(); };", ParserLanguage.CPP); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		ICPPConstructor T = (ICPPConstructor) col.getName(1).resolveBinding();
+		assertTrue(CharArrayUtils.equals(T.getNameCharArray(),
+				"T".toCharArray())); //$NON-NLS-1$
+		assertEquals(T.getName(), "T"); //$NON-NLS-1$
+	}
+	
+	// namespace NS {                
+	//    class T {};                
+	//    void f( T );               
+	// }                             
+	// NS::T parm;                   
+	// int main() {                  
+	//    f( parm );                 
+	// }                             
+	public void testArgumentDependantLookup() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPNamespace NS = (ICPPNamespace) col.getName(0).resolveBinding();
+		ICPPClassType T = (ICPPClassType) col.getName(1).resolveBinding();
+		IFunction f = (IFunction) col.getName(2).resolveBinding();
+		IVariable parm = (IVariable) col.getName(8).resolveBinding();
+		
+		assertInstances(col, NS, 2);
+		assertInstances(col, T, 4);
+		assertInstances(col, f, 2);
+		assertInstances(col, parm, 2);
+	}
+	
+	// namespace NS1{                       
+	//    void f( void * );                 
+	// }                                    
+	// namespace NS2{                       
+	//    using namespace NS1;              
+	//    class B {};                       
+	//    void f( void * );                 
+	// }                                    
+	// class A : public NS2::B {} *a;       
+	// int main() {                         
+	//    f( a );                           
+	// }                                    
+	public void testArgumentDependantLookup_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction fref = (IFunction) col.getName(14).resolveBinding();
+		IFunction f1 = (IFunction) col.getName(1).resolveBinding();
+		IFunction f2 = (IFunction) col.getName(6).resolveBinding();
+		
+		assertSame(f2, fref);
+		assertNotNull(f1);
+		assertNotNull(f2);
+	}
+	
+	// namespace { int i; } //1
+	// void f(){ i; }          
+	// namespace A {           
+	//    namespace {          
+	//       int i;    //2     
+	//       int j;            
+	//    }                    
+	//    void g(){ i; }       
+	// }                       
+	// using namespace A;      
+	// void h() {              
+	//    i;    //ambiguous    
+	//    A::i; //i2           
+	//    j;                   
+	// }                       
+	public void testBug84610() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(17, col.size());
+		
+		IVariable i1 = (IVariable) col.getName(1).resolveBinding();
+		IVariable i2 = (IVariable) col.getName(6).resolveBinding();
+		IVariable j = (IVariable) col.getName(7).resolveBinding();
+		
+		assertInstances(col, i1, 2);
+		assertInstances(col, i2, 4);
+		assertInstances(col, j, 2);
+		
+		IProblemBinding problem = (IProblemBinding) col.getName(12)
+		.resolveBinding();
+		assertEquals(IProblemBinding.SEMANTIC_AMBIGUOUS_LOOKUP, problem.getID());
+	}
+	
+	// struct B {          
+	//    void mutate();   
+	// };                  
+	// void g() {          
+	//    B* pb = new B(); 
+	//    pb->mutate();    
+	// }                   
+	public void testBug84703() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(8, col.size());
+		
+		ICPPMethod mutate = (ICPPMethod) col.getName(1).resolveBinding();
+		ICPPClassType B = (ICPPClassType) col.getName(0).resolveBinding();
+		IVariable pb = (IVariable) col.getName(4).resolveBinding();
+		
+		assertInstances(col, pb, 2);
+		assertInstances(col, mutate, 2);
+		assertInstances(col, B, 2);
+	}
+	
+	// struct S { int i; };        
+	// void f() {         ;        
+	//    int S::* pm = &S::i;      
+	// }                           
+	public void testBug84469() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(9, col.size());
+	}
+	
+	public void testPointerToMemberType() throws Exception {
+		IASTTranslationUnit tu = parse("struct S; int S::* pm;", //$NON-NLS-1$
+				ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(4, col.size());
+		
+		IVariable pm = (IVariable) col.getName(3).resolveBinding();
+		ICPPClassType S = (ICPPClassType) col.getName(0).resolveBinding();
+		
+		IType t = pm.getType();
+		assertNotNull(t);
+		assertTrue(t instanceof ICPPPointerToMemberType);
+		IType cls = ((ICPPPointerToMemberType) t).getMemberOfClass();
+		assertSame(S, cls);
+		assertTrue(((ICPPPointerToMemberType) t).getType() instanceof IBasicType);
+	}
+	
+	// struct S { int i ; } *s; 
+	// int S::* pm = &S::i;     
+	// void f() {               
+	//    s->*pm = 1;           
+	// }                        
+	public void testBug_PM_() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IBinding ref = col.getName(11).resolveBinding();
+		IVariable pm = (IVariable) col.getName(5).resolveBinding();
+		
+		assertSame(pm, ref);
+	}
+	
+	// struct S {               
+	//    int i;                
+	//    S* f();               
+	// } *s;                    
+	// S* (S::* pm) () = &S::f; 
+	// void foo() {             
+	//    (s->*pm)()->i;        
+	// }                        
+	public void testBug_PM_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType S = (ICPPClassType) col.getName(0).resolveBinding();
+		IVariable pm = (IVariable) col.getName(8).resolveBinding();
+		IField i = (IField) col.getName(1).resolveBinding();
+		ICPPMethod f = (ICPPMethod) col.getName(3).resolveBinding();
+		
+		IType t = pm.getType();
+		assertTrue(t instanceof ICPPPointerToMemberType);
+		IFunctionType ft = (IFunctionType) ((ICPPPointerToMemberType) t).getType();
+		IType ST = ((ICPPPointerToMemberType) t).getMemberOfClass();
+		
+		assertTrue(ft.getReturnType() instanceof IPointerType);
+		assertSame(ST, ((IPointerType) ft.getReturnType()).getType());
+		assertSame(S, ST);
+		
+		assertInstances(col, S, 5);
+		assertInstances(col, pm, 2);
+		assertInstances(col, i, 2);
+		assertInstances(col, f, 3);
+	}
+	
+	// public void testFindTypeBinding_1() throws Exception {
+	// IASTTranslationUnit tu = parse(
+	// "int x = 5; int y(x);", ParserLanguage.CPP); //$NON-NLS-1$
+	//
+	// IASTStandardFunctionDeclarator fdtor = (IASTStandardFunctionDeclarator)
+	// ((IASTSimpleDeclaration) tu
+	// .getDeclarations()[1]).getDeclarators()[0];
+	// IASTName name = fdtor.getParameters()[0].getDeclarator().getName();
+	// IBinding binding = CPPSemantics.findTypeBinding(tu, name);
+	// assertNull(binding);
+	//
+	// tu = parse("struct x; int y(x);", ParserLanguage.CPP); //$NON-NLS-1$
+	//
+	// fdtor = (IASTStandardFunctionDeclarator) ((IASTSimpleDeclaration) tu
+	// .getDeclarations()[1]).getDeclarators()[0];
+	// name = ((ICPPASTNamedTypeSpecifier) fdtor.getParameters()[0]
+	// .getDeclSpecifier()).getName();
+	// binding = CPPSemantics.findTypeBinding(tu, name);
+	// assertNotNull(binding);
+	// assertTrue(binding instanceof ICPPClassType);
+	// }
+	//
+	// public void testFindTypeBinding_2() throws Exception {
+	// IASTTranslationUnit tu = parse(
+	// "struct B; void f() { B * bp; }", ParserLanguage.CPP); //$NON-NLS-1$
+	// IASTCompoundStatement compound = (IASTCompoundStatement)
+	// ((IASTFunctionDefinition) tu
+	// .getDeclarations()[1]).getBody();
+	// IASTBinaryExpression b = (IASTBinaryExpression)
+	// ((IASTExpressionStatement)compound.getStatements()[0]).getExpression();
+	// IBinding binding =
+	// ((IASTIdExpression)b.getOperand1()).getName().resolveBinding();
+	// // IASTSimpleDeclaration decl = (IASTSimpleDeclaration)
+	// ((IASTDeclarationStatement) compound
+	// // .getStatements()[0]).getDeclaration();
+	// // IBinding binding = CPPSemantics.findTypeBinding(compound,
+	// // ((ICPPASTNamedTypeSpecifier)decl.getDeclSpecifier()).getName());
+	// assertNotNull(binding);
+	// assertTrue(binding instanceof ICPPClassType);
+	// }
+	
+	// struct B { };
+	// void g() {
+	// B * bp;  //1
+	// }
+	public void testBug85049() throws Exception {
+		IASTTranslationUnit t = parse(getAboveComment(), ParserLanguage.CPP);
+		IASTFunctionDefinition g = (IASTFunctionDefinition) t.getDeclarations()[1];
+		IASTCompoundStatement body = (IASTCompoundStatement) g.getBody();
+		assertTrue(body.getStatements()[0] instanceof IASTDeclarationStatement);
+	}
+	
+	// class A { public: int i; };             
+	// class B : public A {};                  
+	// void f( int B::* );                     
+	// void g() {                              
+	//    int A::* pm = &A::i;                 
+	//    f( pm );                             
+	// }                                       
+	public void testPMConversions() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f = (IFunction) col.getName(15).resolveBinding();
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPField i = (ICPPField) col.getName(1).resolveBinding();
+		ICPPClassType B = (ICPPClassType) col.getName(2).resolveBinding();
+		IVariable pm = (IVariable) col.getName(11).resolveBinding();
+		
+		assertInstances(col, f, 2);
+		assertInstances(col, A, 4);
+		assertInstances(col, i, 3);
+		assertInstances(col, B, 2);
+		assertInstances(col, pm, 2);
+	}
+	
+	// namespace N {                            
+	//    class A { public: int i; };           
+	//    void f( int A::* );                   
+	// }                                        
+	// int N::A::* pm = &N::A::i;               
+	// void g() {                               
+	//    f( pm );                              
+	// }                                        
+	public void testPMKoenig() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f = (IFunction) col.getName(16).resolveBinding();
+		ICPPNamespace N = (ICPPNamespace) col.getName(0).resolveBinding();
+		ICPPClassType A = (ICPPClassType) col.getName(1).resolveBinding();
+		
+		assertInstances(col, f, 2);
+		assertInstances(col, N, 3);
+		assertInstances(col, A, 4);
+	}
+	
+	// namespace M {                            
+	//    class B { };                          
+	//    void f( B* );                         
+	// }                                        
+	// namespace N {                            
+	//    class A { public: M::B * b; };        
+	// }                                        
+	// M::B* N::A::* pm = &N::A::b;             
+	// void g() {                               
+	//    N::A * a;                             
+	//    f( a->*pm );                          
+	// }                                        
+	public void testPMKoenig_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f = (IFunction) col.getName(27).resolveBinding();
+		ICPPNamespace M = (ICPPNamespace) col.getName(0).resolveBinding();
+		ICPPClassType B = (ICPPClassType) col.getName(1).resolveBinding();
+		ICPPNamespace N = (ICPPNamespace) col.getName(5).resolveBinding();
+		ICPPClassType A = (ICPPClassType) col.getName(6).resolveBinding();
+		IVariable pm = (IVariable) col.getName(17).resolveBinding();
+		
+		assertInstances(col, f, 2);
+		assertInstances(col, M, 3);
+		assertInstances(col, B, 6);
+		assertInstances(col, N, 4);
+		assertInstances(col, A, 5);
+		assertInstances(col, pm, 2);
+	}
+	
+	// class A {                       
+	//    friend void set();           
+	//    friend class B;              
+	// };                              
+	// void set();                     
+	// class B{};                      
+	public void testFriend_1() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		IFunction set = (IFunction) col.getName(1).resolveBinding();
+		ICPPClassType B = (ICPPClassType) col.getName(2).resolveBinding();
+		
+		assertInstances(col, set, 2);
+		assertInstances(col, B, 2);
+		
+		IBinding[] friends = A.getFriends();
+		assertEquals(2, friends.length);
+		assertSame(friends[0], set);
+		assertSame(friends[1], B);
+	}
+
+	// class Other {
+	//    void m();
+	// class A {                       
+	//    friend void set();           
+	//    friend void Other::m();             
+	// };                              
+	public void testFriend_Bug275358() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		ICPPClassType A = bh.assertNonProblem("A", 1);
+		IFunction set = bh.assertNonProblem("set()", 3);
+		IFunction m = bh.assertNonProblem("Other::m()", 8);
+		
+		IBinding[] friends = A.getFriends();
+		assertEquals(2, friends.length);
+		assertSame(friends[0], set);
+		assertSame(friends[1], m);
+		
+		IBinding[] declaredMethods= A.getAllDeclaredMethods();
+		assertEquals(0, declaredMethods.length);
+		declaredMethods= A.getDeclaredMethods();
+		assertEquals(0, declaredMethods.length);
+	}
+
+	// class A { friend class B; friend class B; }; 
+	// class B{};                                   
+	public void testBug59149() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType B = (ICPPClassType) col.getName(2).resolveBinding();
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		
+		assertInstances(col, B, 3);
+		
+		IBinding[] friends = A.getFriends();
+		assertEquals(friends.length, 1);
+		assertSame(friends[0], B);
+	}
+	
+	// class A {                      
+	//    public: class N {};         
+	// };                             
+	// class B {                      
+	//    friend class A::N;          
+	// };                             
+	public void testBug59302() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType N = (ICPPClassType) col.getName(5).resolveBinding();
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPClassType B = (ICPPClassType) col.getName(2).resolveBinding();
+		assertInstances(col, N, 3);
+		
+		IBinding[] friends = B.getFriends();
+		assertEquals(friends.length, 1);
+		assertSame(friends[0], N);
+		
+		assertEquals(A.getFriends().length, 0);
+		assertEquals(N.getFriends().length, 0);
+	}
+	
+	// class A {                      
+	//    friend class B *helper();   
+	// };                             
+	public void testBug75482() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction helper = (IFunction) col.getName(2).resolveBinding();
+		assertSame(helper.getScope(), tu.getScope());
+		
+		ICPPClassType B = (ICPPClassType) col.getName(1).resolveBinding();
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		assertSame(B.getScope(), A.getScope());
+		
+		IBinding[] friends = A.getFriends();
+		assertEquals(friends.length, 1);
+		assertSame(friends[0], helper);
+	}
+	
+	// void f( int );                         
+	// void f( char );                        
+	// void (*pf) (int) = &f;                 
+	// void foo() {                           
+	//    pf = &f;                            
+	// }                                      
+	public void testBug45763_1() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f1 = (IFunction) col.getName(0).resolveBinding();
+		IFunction f2 = (IFunction) col.getName(2).resolveBinding();
+		IVariable pf = (IVariable) col.getName(4).resolveBinding();
+		
+		assertInstances(col, pf, 2);
+		assertInstances(col, f1, 3);
+		assertInstances(col, f2, 1);
+	}
+	
+	// void f( char );                        
+	// void f( int  );                        
+	// void g( void (*)( int ) ) {}           
+	// void (*pg)( void(*)(int) );            
+	// void foo() {                           
+	//    g( &f );                            
+	//    (*pg)( &f );                        
+	// }                                      
+	public void testBug45763_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f1 = (IFunction) col.getName(0).resolveBinding();
+		IFunction f2 = (IFunction) col.getName(2).resolveBinding();
+		IFunction g = (IFunction) col.getName(4).resolveBinding();
+		IVariable pg = (IVariable) col.getName(7).resolveBinding();
+		
+		assertInstances(col, f1, 1);
+		assertInstances(col, f2, 3);
+		assertInstances(col, g, 2);
+		assertInstances(col, pg, 2);
+	}
+	
+	// void f( int );                  
+	// void f( char );                 
+	// void (* bar () ) ( int ) {      
+	//    return &f;                   
+	// }                               
+	public void testBug45763_3() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f1 = (IFunction) col.getName(0).resolveBinding();
+		IFunction f2 = (IFunction) col.getName(2).resolveBinding();
+		IFunction bar = (IFunction) col.getName(4).resolveBinding();
+		assertNotNull(bar);
+		
+		assertInstances(col, f1, 2);
+		assertInstances(col, f2, 1);
+	}
+	
+	// void f( int );                  
+	// void f( char );                 
+	// void foo () {                   
+	//    ( void (*)(int) ) &f;        
+	// }                               
+	public void testBug45763_4() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f1 = (IFunction) col.getName(0).resolveBinding();
+		IFunction f2 = (IFunction) col.getName(2).resolveBinding();
+		IFunction bar = (IFunction) col.getName(4).resolveBinding();
+		assertNotNull(bar);
+		
+		assertInstances(col, f1, 2);
+		assertInstances(col, f2, 1);
+	}
+	
+	// extern int g;       
+	// int g;              
+	// void f() {  g = 1; }
+	public void testBug85824() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IVariable g = (IVariable) col.getName(3).resolveBinding();
+		assertInstances(col, g, 3);
+	}
+	
+	// struct A {            
+	//     int a2;           
+	// };                    
+	// struct B : public A { 
+	//     int a1;           
+	//     void f();         
+	// };                    
+	// int a3;               
+	// void B::f(){          
+	//    int a4;            
+	//    a;                 
+	// }                     
+	public void testPrefixLookup() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IASTName name = col.getName(11);
+		assertEquals("a", name.toString());
+		IBinding[] bs = CPPSemantics.findBindingsForContentAssist(name, true);
+		
+		// check the result
+		HashSet result= new HashSet();
+		for (IBinding binding : bs) {
+			result.add(binding.getName());
+		}
+		assertTrue(result.contains("a1"));
+		assertTrue(result.contains("a2"));
+		assertTrue(result.contains("a3"));
+		assertTrue(result.contains("a4"));
+		assertTrue(result.contains("A"));
+		assertEquals(7, bs.length); // the bindings above + 2 constructors
+	}
+	
+	// static void f();    
+	// void f() {}         
+	public void testIsStatic() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f = (IFunction) col.getName(1).resolveBinding();
+		assertTrue(f.isStatic());
+		assertInstances(col, f, 2);
+	}
+	
+	//	// void f() {
+	//	// if (__io.flags() & ios_base::showbase
+	//	// || __i < 2 || __sign.size() > 1
+	//	// || ((static_cast<part>(__p.field[3]) !=
+	//	// money_base::none)
+	//	// && __i == 2)) 
+	//	// return;
+	//	// }
+	//	public void testBug85310() throws Exception {
+	//		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP );
+	//		IASTFunctionDefinition f = (IASTFunctionDefinition)
+	//		tu.getDeclarations()[0];
+	//		IASTCompoundStatement body = (IASTCompoundStatement) f.getBody();
+	//		IASTCPPIfStatement if_stmt = (IASTCPPIfStatement) body.getStatements()[0];
+	//		assertNotNull( if_stmt.getCondition() );
+	//	}
+	
+	// struct B { void mutate(); };     
+	// struct D1 : B {};                
+	// struct D2 : B {};                
+	// void B::mutate() {               
+	//    new (this) D2;                
+	// }                                
+	// void g() {                       
+	//    B* pb = new (p) D1;           
+	// }                                
+	public void testBug86267() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType D1 = (ICPPClassType) col.getName(2).resolveBinding();
+		ICPPClassType D2 = (ICPPClassType) col.getName(4).resolveBinding();
+		
+		ICPPConstructor[] ctors = D1.getConstructors();
+		ICPPConstructor d1_ctor = ctors[0];
+		
+		ctors = D2.getConstructors();
+		ICPPConstructor d2_ctor = ctors[0];
+		
+		assertInstances(col, d1_ctor, 1);
+		assertInstances(col, d2_ctor, 1);
+	}
+	
+	// struct C {                                  
+	//    void f();                                
+	//    const C& operator =( const C& );         
+	// };                                          
+	// const C& C::operator = ( const C& other ) { 
+	//    if( this != &other ) {                   
+	//       this->~C();                           
+	//       new (this) C(other);                  
+	//       f();                                  
+	//    }                                        
+	//    return *this;                            
+	// }                                           
+	public void testBug86269() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType C = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPMethod f = (ICPPMethod) col.getName(1).resolveBinding();
+		ICPPMethod op = (ICPPMethod) col.getName(3).resolveBinding();
+		IParameter other = (IParameter) col.getName(5).resolveBinding();
+		
+		assertInstances(col, C, 6);
+		assertInstances(col, f, 2);
+		assertInstances(col, op, 3);
+		assertInstances(col, other, 4);
+		
+		assertEquals(other.getName(), "other"); //$NON-NLS-1$
+	}
+	
+	// extern "C" {                               
+	//    void printf( const char * );              
+	//    void sprintf( const char * );             
+	// }                                            
+	// void foo(){                                  
+	//    char *p;                                  
+	//    printf( p );                              
+	//    printf( "abc" );                        
+	// }                                            
+	public void testBug86279() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction r1 = (IFunction) col.getName(6).resolveBinding();
+		IFunction r2 = (IFunction) col.getName(8).resolveBinding();
+		IFunction printf = (IFunction) col.getName(0).resolveBinding();
+		
+		assertSame(printf, r1);
+		assertSame(printf, r2);
+	}
+	
+	// struct S;            
+	// extern S a;          
+	// void g( S );         
+	// void h() {           
+	//    g( a );           
+	// }                    
+	public void testBug86346() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType S = (ICPPClassType) col.getName(0).resolveBinding();
+		IFunction g = (IFunction) col.getName(3).resolveBinding();
+		
+		assertInstances(col, S, 3);
+		assertInstances(col, g, 2);
+	}
+	
+	public void testBug86288() throws Exception {
+		String code = "int *foo( int *b ) { return (int *)(b); }"; //$NON-NLS-1$
+		IASTTranslationUnit tu = parse(code, ParserLanguage.CPP);
+		IASTReturnStatement r = (IASTReturnStatement) ((IASTCompoundStatement) ((IASTFunctionDefinition) tu
+				.getDeclarations()[0]).getBody()).getStatements()[0];
+		assertTrue(r.getReturnValue() instanceof IASTCastExpression);
+	}
+	
+	// void foo() {
+	// struct B {
+	// int f();
+	// };    			
+	// int (B::*pb)() = &B::f;
+	// }
+	public void testBug84476() throws Exception {
+		String code = getAboveComment();
+		IASTFunctionDefinition foo = (IASTFunctionDefinition) parse(code,
+				ParserLanguage.CPP).getDeclarations()[0];
+		IASTDeclarationStatement decl = (IASTDeclarationStatement) ((IASTCompoundStatement) foo
+				.getBody()).getStatements()[1];
+		IASTSimpleDeclaration pb = (IASTSimpleDeclaration) decl
+		.getDeclaration();
+		IASTDeclarator d = pb.getDeclarators()[0];
+		assertEquals(d.getNestedDeclarator().getPointerOperators().length, 1);
+		assertEquals(d.getNestedDeclarator().getName().toString(), "pb"); //$NON-NLS-1$
+		assertTrue(d.getNestedDeclarator().getPointerOperators()[0] instanceof ICPPASTPointerToMember);
+	}
+	
+	// struct T1 {                   
+	//    T1 operator() ( int x ) {  
+	//       return T1(x);           
+	//    }                          
+	//    T1( int ) {}               
+	// };                            
+	public void testBug86336() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPConstructor T1_ctor = (ICPPConstructor) col.getName(6)
+		.resolveBinding();
+		ICPPClassType T1 = (ICPPClassType) col.getName(0).resolveBinding();
+		
+		assertInstances(col, T1_ctor, 2);
+		assertInstances(col, T1, 2);
+	}
+	
+	// struct S { int i; };    
+	// void foo() {            
+	//    int S::* pm = &S::i; 
+	// }                       
+	public void testBug86306() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType S = (ICPPClassType) col.getName(0).resolveBinding();
+		
+		assertInstances(col, S, 3);
+		
+		IASTName[] refs = tu.getReferences(S);
+		assertEquals(refs.length, 2);
+		assertSame(refs[0], col.getName(4));
+		assertSame(refs[1], col.getName(7));
+	}
+	
+	// class A {                           
+	// 	public:                            
+	//    template <class T> void f(T);    
+	//    template <class T> struct X { }; 
+	// };                                  
+	// class B : public A {                
+	//  public:                            
+	//    using A::f<double>; // illformed 
+	//    using A::X<int>; // illformed    
+	// };                                  
+	public void testBug86372() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+	}
+	
+	// void foo() {                    
+	//    int i = 42;                  
+	//    int a[10];                   
+	//    for( int i = 0; i < 10; i++ )
+	//       a[i] = 1;                 
+	//    int j = i;                   
+	// }                               
+	public void testBug86319() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IVariable i1 = (IVariable) col.getName(1).resolveBinding();
+		IVariable i2 = (IVariable) col.getName(3).resolveBinding();
+		
+		assertNotSame(i1, i2);
+		assertInstances(col, i1, 2);
+		assertInstances(col, i2, 4);
+	}
+	
+	// class X { int i, j; };           
+	// class Y { X x; };                
+	// void foo() {                     
+	//    const Y y;                    
+	//    y.x.i++;                      
+	//    y.x.j++;                      
+	//    Y* p = const_cast<Y*>(&y);    
+	//    p->x.i;                       
+	//    p->x.j;                       
+	// }                                
+	public void testBug86350() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPField i = (ICPPField) col.getName(1).resolveBinding();
+		ICPPField j = (ICPPField) col.getName(2).resolveBinding();
+		ICPPField x = (ICPPField) col.getName(5).resolveBinding();
+		
+		assertInstances(col, i, 3);
+		assertInstances(col, j, 3);
+		assertInstances(col, x, 5);
+	}
+	
+	// void foo() {
+	//   struct A {
+	//     int val;
+	//     A(int i) : val(i) { }
+	//     ~A() { }
+	//     operator bool() { return val != 0; }
+	//   };
+	//   int i = 1;
+	//   while (A a = i) {
+	//     i = 0;
+	//   }
+	// }
+	public void testBug84478() throws Exception {
+		IASTFunctionDefinition foo = (IASTFunctionDefinition) parse(
+				getAboveComment(), ParserLanguage.CPP).getDeclarations()[0];
+		ICPPASTWhileStatement whileStatement = (ICPPASTWhileStatement) ((IASTCompoundStatement) foo
+				.getBody()).getStatements()[2];
+		assertNull(whileStatement.getCondition());
+		assertNotNull(whileStatement.getConditionDeclaration());
+	}
+	
+	// void foo() {                      
+	//    const int x = 12;              
+	//    {   enum { x = x };  }         
+	// }                                 
+	// enum { RED };                     
+	public void testBug86353() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IEnumerator enum_x = (IEnumerator) col.getName(3).resolveBinding();
+		IBinding x_ref = col.getName(4).resolveBinding();
+		IEnumerator RED = (IEnumerator) col.getName(6).resolveBinding();
+		
+		String[] s = ((ICPPBinding) RED).getQualifiedName();
+		assertEquals(s[0], "RED"); //$NON-NLS-1$
+		assertTrue(((ICPPBinding) RED).isGloballyQualified());
+		
+		IASTName[] decls = tu.getDeclarationsInAST(enum_x);
+		assertEquals(decls.length, 1);
+		assertSame(decls[0], col.getName(3));
+		
+		decls = tu.getDeclarationsInAST(x_ref);
+		assertEquals(decls.length, 1);
+		assertSame(decls[0], col.getName(1));
+		
+		decls = tu.getDeclarationsInAST(RED);
+		assertEquals(decls.length, 1);
+		assertSame(decls[0], col.getName(6));
+	}
+	
+	// class D {};                   
+	// D d1;                         
+	// const D d2;                   
+	// void foo() {                  
+	//    typeid(d1) == typeid(d2);  
+	//    typeid( D ) == typeid(d2); 
+	// }                             
+	public void testBug86274() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		assertEquals(col.size(), 10);
+		
+		IVariable d1 = (IVariable) col.getName(6).resolveBinding();
+		IVariable d2 = (IVariable) col.getName(7).resolveBinding();
+		ICPPClassType D = (ICPPClassType) col.getName(8).resolveBinding();
+		
+		assertInstances(col, D, 4);
+		assertInstances(col, d1, 2);
+		assertInstances(col, d2, 3);
+	}
+	
+	// void point ( int = 3, int = 4 );        
+	// void foo() {                            
+	//    point( 1, 2 );                       
+	//    point( 1 );                          
+	//    point( );                            
+	// }                                       
+	public void testBug86546() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction point = (IFunction) col.getName(0).resolveBinding();
+		
+		assertInstances(col, point, 4);
+	}
+	
+	// namespace Outer{                   
+	//    int i;                          
+	//    namespace Inner {               
+	//       void f() {  i++;  }          
+	//       int i;                       
+	//       void g() {  i++;  }          
+	//    }                               
+	// }                                  
+	public void testBug86358_1() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IVariable i = (IVariable) col.getName(4).resolveBinding();
+		IVariable i2 = (IVariable) col.getName(7).resolveBinding();
+		
+		assertInstances(col, i, 2);
+		assertInstances(col, i2, 2);
+	}
+	
+	// namespace Q {                    
+	//    namespace V {                 
+	//       void f();                  
+	//    }                             
+	//    void V::f() {}                
+	//    namespace V {                 
+	//    }                             
+	// }                                
+	public void testBug86358_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f1 = (IFunction) col.getName(2).resolveBinding();
+		ICPPFunction f2 = (ICPPFunction) col.getName(5).resolveBinding();
+		assertSame(f1, f2);
+		
+		IASTName[] decls = tu.getDeclarationsInAST(f2);
+		assertEquals(decls.length, 2);
+		assertSame(decls[0], col.getName(2));
+		assertSame(decls[1], col.getName(5));
+		
+		String[] s = f2.getQualifiedName();
+		assertEquals(s[0], "Q"); //$NON-NLS-1$
+		assertEquals(s[1], "V"); //$NON-NLS-1$
+		assertEquals(s[2], "f"); //$NON-NLS-1$
+		assertTrue(f2.isGloballyQualified());
+	}
+	
+	// struct B {                          
+	//    void f ( char );                 
+	//    void g ( char );                 
+	// };                                  
+	// struct D : B {                      
+	//    using B::f;                      
+	//    void f( int ) { f('c'); }        
+	//    void g( int ) { g('c'); }        
+	// };                                  
+	public void test86371() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction f_ref = (ICPPFunction) col.getName(12).resolveBinding();
+		ICPPFunction g_ref = (ICPPFunction) col.getName(15).resolveBinding();
+		
+		ICPPFunction f = (ICPPFunction) col.getName(1).resolveBinding();
+		assertSame(f_ref, f);
+		
+		IFunction g = (IFunction) col.getName(13).resolveBinding();
+		assertSame(g, g_ref);
+		
+		assertInstances(col, f_ref, 2);
+		assertInstances(col, g_ref, 2);
+		
+		String[] s = f_ref.getQualifiedName();
+		assertEquals(s[0], "B"); //$NON-NLS-1$
+		assertEquals(s[1], "f"); //$NON-NLS-1$
+		assertTrue(f_ref.isGloballyQualified());
+		
+		s = g_ref.getQualifiedName();
+		assertEquals(s[0], "D"); //$NON-NLS-1$
+		assertEquals(s[1], "g"); //$NON-NLS-1$
+		assertTrue(f.isGloballyQualified());
+	}
+	
+	// namespace Company_with_veryblahblah {}       
+	// namespace CWVLN = Company_with_veryblahblah; 
+	// namespace CWVLN = Company_with_veryblahblah; 
+	// namespace CWVLN = CWVLN;                     
+	public void testBug86369() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPNamespace ns = (ICPPNamespace) col.getName(0).resolveBinding();
+		ICPPNamespace alias = (ICPPNamespace) col.getName(1).resolveBinding();
+		
+		String[] s = ns.getQualifiedName();
+		assertEquals(s[0], "Company_with_veryblahblah"); //$NON-NLS-1$
+		s = alias.getQualifiedName();
+		assertEquals(s[0], "CWVLN"); //$NON-NLS-1$
+		
+		assertTrue(alias instanceof ICPPNamespaceAlias);
+		assertSame(((ICPPNamespaceAlias) alias).getBinding(), ns);
+		
+		IASTName[] refs = tu.getReferences(ns);
+		assertEquals(refs.length, 2);
+		assertSame(refs[0], col.getName(2));
+		assertSame(refs[1], col.getName(4));
+		
+		IASTName[] decls = tu.getDeclarationsInAST(ns);
+		assertEquals(decls.length, 1);
+		assertSame(decls[0], col.getName(0));
+		
+		refs = tu.getReferences(alias);
+		assertEquals(refs.length, 1);
+		assertSame(refs[0], col.getName(6));
+		
+		decls = tu.getDeclarationsInAST(alias);
+		assertEquals(decls.length, 3);
+		assertSame(decls[0], col.getName(1));
+		assertSame(decls[1], col.getName(3));
+		assertSame(decls[2], col.getName(5));
+	}
+	
+	// namespace A {                  
+	//    void f( char );             
+	//    void f( int );              
+	// }                              
+	// using A::f;                    
+	public void testBug86470_1() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPUsingDeclaration u = (ICPPUsingDeclaration) col.getName(7)
+		.resolveBinding();
+		
+		IASTName[] decls = tu.getDeclarationsInAST(u);
+		assertEquals(3, decls.length);	// 2 function-decls + using-decl
+		assertSame(decls[0], col.getName(1));
+		assertSame(decls[1], col.getName(3));
+		
+		IBinding[] delegates = u.getDelegates();
+		assertEquals(delegates.length, 2);
+		
+		decls = tu.getDeclarationsInAST(delegates[0]);
+		assertEquals(2, decls.length);	// function-decl + using-decl
+		assertSame(decls[0], col.getName(1));
+		assertSame(decls[1], col.getName(7));
+		
+		decls = tu.getDeclarationsInAST(delegates[0]);
+		assertEquals(2, decls.length);  // function-decl + using-decl
+		assertSame(decls[0], col.getName(1));
+	}
+	
+	// namespace A {                  
+	//    void f( int );              
+	//    void f( double );           
+	// }                              
+	// namespace B {                  
+	//    void f( int );              
+	//    void f( double );           
+	//    void f( char );             
+	// }                              
+	// void g() {                     
+	//    using A::f;                 
+	//    using B::f;                 
+	//    f( 'c' );                   
+	// }                              
+	public void testBug86470_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f_decl = (IFunction) col.getName(10).resolveBinding();
+		IFunction f_ref = (IFunction) col.getName(19).resolveBinding();
+		assertSame(f_decl, f_ref);
+	}
+	
+	// namespace A {                       
+	//    struct g {};                     
+	//    void g ( char );                 
+	// }                                   
+	// void f() {                          
+	//    using A::g;                      
+	//    g('a');                          
+	//    struct g gg;                     
+	// }                                   
+	public void testBug86470_3() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IBinding ref1 = col.getName(8).resolveBinding();
+		IBinding ref2 = col.getName(9).resolveBinding();
+		
+		ICPPClassType g_struct = (ICPPClassType) col.getName(1)
+		.resolveBinding();
+		IFunction g_func = (IFunction) col.getName(2).resolveBinding();
+		
+		assertSame(g_struct,ref2);
+		assertSame(g_func, ref1);
+		
+		ICPPUsingDeclaration comp = (ICPPUsingDeclaration) col.getName(7)
+		.resolveBinding();
+		IASTName[] decls = tu.getDeclarationsInAST(comp);
+		assertEquals(3, decls.length);	// struct, func and using-decl
+		assertSame(decls[0], col.getName(1));
+		assertSame(decls[1], col.getName(2));
+		assertSame(decls[2], col.getName(7));
+	}
+	
+	// namespace A {                       
+	//    int x;                           
+	// }                                   
+	// namespace B {                       
+	//    struct x {};                     
+	// }                                   
+	// void f() {                          
+	//    using A::x;                      
+	//    using B::x;                      
+	//    x = 1;                           
+	//    struct x xx;                     
+	// }                                   
+	public void testBug86470_4() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPBinding ref1 = (ICPPBinding) col.getName(11).resolveBinding();
+		ICPPBinding ref2 = (ICPPBinding) col.getName(12).resolveBinding();
+		
+		ICPPClassType x_struct = (ICPPClassType) col.getName(3)
+		.resolveBinding();
+		IVariable x_var = (IVariable) col.getName(1).resolveBinding();
+		
+		assertSame(x_struct, ref2);
+		assertSame(x_var, ref1);
+		
+		IASTName[] refs = tu.getReferences(x_struct);
+		assertEquals(2, refs.length);	// 1 ref + using-decl
+		assertSame(refs[0], col.getName(10));
+		assertSame(refs[1], col.getName(12));
+		
+		String[] s = ref2.getQualifiedName();
+		assertEquals(s[0], "B"); //$NON-NLS-1$
+		assertEquals(s[1], "x"); //$NON-NLS-1$
+		assertTrue(ref2.isGloballyQualified());
+		
+		s = x_struct.getQualifiedName();
+		assertEquals(s[0], "B"); //$NON-NLS-1$
+		assertEquals(s[1], "x"); //$NON-NLS-1$
+		assertTrue(x_struct.isGloballyQualified());
+	}
+	
+	// namespace A {                       
+	//    void f( int );                   
+	//    void f( double );                
+	// }                                   
+	// void g() {                          
+	//    void f( char );                  
+	//    using A::f;                      
+	//    f( 3.5 );                        
+	// }                                   
+	public void testBug86470_5() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction f = (ICPPFunction) col.getName(3).resolveBinding();
+		
+		ICPPFunction f_ref = (ICPPFunction) col.getName(11).resolveBinding();
+		assertSame( f_ref, f);
+		
+		String[] s = f_ref.getQualifiedName();
+		assertEquals(s[0], "A"); //$NON-NLS-1$
+		assertEquals(s[1], "f"); //$NON-NLS-1$
+		assertTrue(f_ref.isGloballyQualified());
+		
+		s = f.getQualifiedName();
+		assertEquals(s[0], "A"); //$NON-NLS-1$
+		assertEquals(s[1], "f"); //$NON-NLS-1$
+		assertTrue(f.isGloballyQualified());
+	}
+	
+	// class B;                                 
+	// class A {                                
+	//    int i;                                
+	//    friend void f( B * );                 
+	// };                                       
+	// class B : public A {};                   
+	// void f( B* p ) {                         
+	//    p->i = 1;                             
+	// }                                        
+	public void testBug86678() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType B = (ICPPClassType) col.getName(6).resolveBinding();
+		ICPPField i = (ICPPField) col.getName(12).resolveBinding();
+		IParameter p = (IParameter) col.getName(10).resolveBinding();
+		
+		assertInstances(col, B, 4);
+		assertInstances(col, i, 2);
+		assertInstances(col, p, 3);
+	}
+	
+	// int printf( const char *, ... );             
+	// void foo(){                                  
+	//    int a, b;                                 
+	//    printf( "hello" );                      
+	//    printf("a=%d b=%d", a, b );             
+	// }                                            
+	public void testBug86543() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction printf = (IFunction) col.getName(6).resolveBinding();
+		assertInstances(col, printf, 3);
+	}
+	
+	// int max( int a, int b, int c ) {                  
+	//    int m = ( a > b ) ? a : b;                     
+	//    return ( m > c ) ? m : c;                      
+	// }                                                 
+	public void testBug86554() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IVariable m = (IVariable) col.getName(11).resolveBinding();
+		IParameter a = (IParameter) col.getName(1).resolveBinding();
+		IParameter b = (IParameter) col.getName(2).resolveBinding();
+		IParameter c = (IParameter) col.getName(3).resolveBinding();
+		
+		String[] s = ((ICPPBinding) a).getQualifiedName();
+		assertEquals(s[0], "a"); //$NON-NLS-1$
+		assertFalse(((ICPPBinding) a).isGloballyQualified());
+		
+		assertInstances(col, m, 3);
+		assertInstances(col, a, 3);
+		assertInstances(col, b, 3);
+		assertInstances(col, c, 3);
+	}
+	
+	// int g();                               
+	// struct X { static int g(); };          
+	// struct Y : X { static int i ; };       
+	// int Y::i = g();                        
+	public void testBug86621() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction g1 = (ICPPFunction) col.getName(0).resolveBinding();
+		ICPPMethod g2 = (ICPPMethod) col.getName(9).resolveBinding();
+		
+		String[] s = g1.getQualifiedName();
+		assertEquals(s[0], "g"); //$NON-NLS-1$
+		assertTrue(g1.isGloballyQualified());
+		
+		s = g2.getQualifiedName();
+		assertEquals(s[0], "X"); //$NON-NLS-1$
+		assertEquals(s[1], "g"); //$NON-NLS-1$
+		assertTrue(g2.isGloballyQualified());
+		
+		assertInstances(col, g1, 1);
+		assertInstances(col, g2, 2);
+	}
+	
+	// class V { int f(); int x; };                 
+	// class W { int g(); int y; };                 
+	// class B : public virtual V, public W {       
+	//    int f();  int x;                          
+	//    int g();  int y;                          
+	// };                                           
+	// class C : public virtual V, public W {};     
+	// class D : public B, public C {               
+	//    void foo();                               
+	// };                                           
+	// void D::foo(){                               
+	//    x++;                                      
+	//    f();                                      
+	//    y++;                                      
+	//    g();                                      
+	// }                                            
+	public void testBug86649() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPField x = (ICPPField) col.getName(23).resolveBinding();
+		ICPPMethod f = (ICPPMethod) col.getName(24).resolveBinding();
+		
+		String[] s = f.getQualifiedName();
+		assertEquals(s[0], "B"); //$NON-NLS-1$
+		assertEquals(s[1], "f"); //$NON-NLS-1$
+		assertTrue(f.isGloballyQualified());
+		
+		s = x.getQualifiedName();
+		assertEquals(s[0], "B"); //$NON-NLS-1$
+		assertEquals(s[1], "x"); //$NON-NLS-1$
+		assertTrue(x.isGloballyQualified());
+		
+		IProblemBinding y = (IProblemBinding) col.getName(25).resolveBinding();
+		IProblemBinding g = (IProblemBinding) col.getName(26).resolveBinding();
+		
+		assertEquals(y.getID(), IProblemBinding.SEMANTIC_AMBIGUOUS_LOOKUP);
+		assertEquals(g.getID(), IProblemBinding.SEMANTIC_AMBIGUOUS_LOOKUP);
+		
+		assertInstances(col, x, 2);
+		assertInstances(col, f, 2);
+	}
+	
+	// struct C {                    
+	//    int c;                     
+	//    C() : c(0) { }             
+	// };                            
+	public void testBug86827() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPVariable c = (ICPPVariable) col.getName(1).resolveBinding();
+		
+		String[] s = c.getQualifiedName();
+		assertEquals(s.length, 2);
+		assertEquals(s[0], "C"); //$NON-NLS-1$
+		assertEquals(s[1], "c"); //$NON-NLS-1$
+		assertTrue(c.isGloballyQualified());
+		
+		IASTName[] refs = tu.getReferences(c);
+		assertEquals(refs.length, 1);
+		assertSame(refs[0], col.getName(3));
+	}
+	
+	// void f( int par ) {            
+	//    int v1;                     
+	//    {                           
+	//       int v2;                  
+	//    }                           
+	// }                              
+	public void testFind_1() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPVariable v1 = (ICPPVariable) col.getName(2).resolveBinding();
+		ICPPVariable v2 = (ICPPVariable) col.getName(3).resolveBinding();
+		
+		String[] s = v1.getQualifiedName();
+		assertEquals(s[0], "v1"); //$NON-NLS-1$
+		assertFalse(v1.isGloballyQualified());
+		
+		s = v2.getQualifiedName();
+		assertEquals(s[0], "v2"); //$NON-NLS-1$
+		assertFalse(v2.isGloballyQualified());
+		
+		ICPPBlockScope scope = (ICPPBlockScope) v2.getScope();
+		IBinding[] bs = scope.find("v1"); //$NON-NLS-1$
+		assertEquals(bs.length, 1);
+		assertSame(bs[0], v1);
+	}
+	
+	// class A { int a; };            
+	// class B : public A {           
+	//    void f();                   
+	// };                             
+	// void B::f() {                  
+	// }                              
+	public void testFind_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPField a = (ICPPField) col.getName(1).resolveBinding();
+		ICPPMethod f = (ICPPMethod) col.getName(7).resolveBinding();
+		
+		IScope scope = f.getFunctionScope();
+		IBinding[] bs = scope.find("a"); //$NON-NLS-1$
+		assertEquals(bs.length, 1);
+		assertSame(bs[0], a);
+		
+		bs = scope.find("~B"); //$NON-NLS-1$
+		assertEquals(bs.length, 1);
+		assertTrue(bs[0] instanceof ICPPMethod);
+		assertTrue(bs[0].getName().equals("~B")); //$NON-NLS-1$
+		
+		bs = scope.find("A"); //$NON-NLS-1$
+		assertEquals(bs.length, 1);
+		assertSame(bs[0], A);
+	}
+	
+	// namespace A {                       
+	//    void f( int );                   
+	//    void f( double );                
+	// }                                   
+	// void g() {                          
+	//    void f( char );                  
+	//    using A::f;                      
+	// }                                   
+	public void testFind_3() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f1 = (IFunction) col.getName(1).resolveBinding();
+		IFunction f2 = (IFunction) col.getName(3).resolveBinding();
+		IFunction f3 = (IFunction) col.getName(6).resolveBinding();
+		
+		IASTFunctionDefinition def = (IASTFunctionDefinition) col.getName(5).getParent().getParent();
+		IScope scope = ((IASTCompoundStatement) def.getBody()).getScope();
+		IBinding[] bs = scope.find("f"); //$NON-NLS-1$
+		assertEquals(3, bs.length);
+		assertSame(bs[0], f3);
+		assertSame(bs[1], f1);
+		assertSame(bs[2], f2);
+		
+		String[] s = ((ICPPBinding)  bs[1]).getQualifiedName();
+		assertEquals(s.length, 2);
+		assertEquals(s[0], "A"); //$NON-NLS-1$
+		assertEquals(s[1], "f"); //$NON-NLS-1$
+		assertTrue(((ICPPBinding)  bs[1]).isGloballyQualified());
+	}
+	
+	// namespace A {                                  
+	//    struct f;                                   
+	//    void f();                                   
+	// }                                              
+	// namespace B {                                  
+	//    void f( int );                              
+	// }                                              
+	// namespace C {                                  
+	//    using namespace B;                          
+	// }                                              
+	// void g(){                                      
+	//    using namespace A;                          
+	//    using namespace C;                          
+	// }                                              
+	public void testFind_4() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType f = (ICPPClassType) col.getName(1).resolveBinding();
+		IFunction f1 = (IFunction) col.getName(2).resolveBinding();
+		IFunction f2 = (IFunction) col.getName(4).resolveBinding();
+		
+		IASTFunctionDefinition def = (IASTFunctionDefinition) col.getName(8)
+		.getParent().getParent();
+		IScope scope = ((IASTCompoundStatement) def.getBody()).getScope();
+		IBinding[] bs = scope.find("f"); //$NON-NLS-1$
+		assertEquals(3, bs.length);
+		assertSame(bs[0], f);
+		assertSame(bs[1], f1);
+		assertSame(bs[2], f2);
+	}
+	
+	// class A {
+	// public:
+	//    A();
+	//    void f();
+	// };
+	// class B : public A {
+	// public:
+	//    B();
+	//    void bf();
+	// };
+	public void testFind_bug185408() throws Exception {		
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f1 = (IFunction) col.getName(6).resolveBinding();
+		IScope classScope= f1.getScope();
+		assertTrue(classScope instanceof ICPPClassScope);
+		IBinding[] bindings = classScope.find("bf");
+		ICPPMethod method= extractSingleMethod(bindings);
+		assertEquals(method.getQualifiedName()[0], "B");
+		
+		bindings= classScope.find("f");
+		method= extractSingleMethod(bindings);
+		assertEquals(method.getQualifiedName()[0], "A");
+		
+		bindings= classScope.find("B");
+		ICPPClassType classType= extractSingleClass(bindings);
+		assertEquals(classType.getQualifiedName()[0], "B");
+		
+		bindings= classScope.find("A");
+		classType= extractSingleClass(bindings);
+		assertEquals(classType.getQualifiedName()[0], "A");
+	}
+	
+	private ICPPMethod extractSingleMethod(IBinding[] bindings) {
+		assertEquals(1, bindings.length);
+		assertTrue(bindings[0] instanceof ICPPMethod);
+		return (ICPPMethod) bindings[0];
+	}
+	
+	private ICPPClassType extractSingleClass(IBinding[] bindings) {
+		assertEquals(1, bindings.length);
+		assertTrue(bindings[0] instanceof ICPPClassType);
+		return (ICPPClassType) bindings[0];
+	}
+	
+	// class A {                                 
+	//    int a;                                 
+	//    void fa();                             
+	// };                                        
+	// class B : public A {                      
+	//    int b;                                 
+	//    void fb();                             
+	// };                                        
+	public void testGets() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPClassType B = (ICPPClassType) col.getName(3).resolveBinding();
+		ICPPField a = (ICPPField) col.getName(1).resolveBinding();
+		ICPPMethod fa = (ICPPMethod) col.getName(2).resolveBinding();
+		ICPPField b = (ICPPField) col.getName(5).resolveBinding();
+		ICPPMethod fb = (ICPPMethod) col.getName(6).resolveBinding();
+		
+		Object[] result = B.getDeclaredFields();
+		assertEquals(result.length, 1);
+		assertSame(result[0], b);
+		
+		result = B.getFields();
+		assertEquals(result.length, 2);
+		assertSame(result[0], b);
+		assertSame(result[1], a);
+		
+		result = B.getDeclaredMethods();
+		assertEquals(result.length, 1);
+		assertSame(result[0], fb);
+		
+		result = B.getAllDeclaredMethods();
+		assertEquals(result.length, 2);
+		assertSame(result[0], fb);
+		assertSame(result[1], fa);
+		
+		ICPPMethod[] B_implicit = ((ICPPClassScope) B.getCompositeScope())
+		.getImplicitMethods();
+		assertEquals(B_implicit.length, 4);
+		assertTrue(B_implicit[0].getName().equals("B")); //$NON-NLS-1$
+		assertTrue(B_implicit[1].getName().equals("B")); //$NON-NLS-1$
+		assertTrue(B_implicit[2].getName().equals("operator =")); //$NON-NLS-1$
+		assertTrue(B_implicit[3].getName().equals("~B")); //$NON-NLS-1$
+		
+		ICPPMethod[] A_implicit = ((ICPPClassScope) A.getCompositeScope())
+		.getImplicitMethods();
+		assertEquals(A_implicit.length, 4);
+		assertTrue(A_implicit[0].getName().equals("A")); //$NON-NLS-1$
+		assertTrue(A_implicit[1].getName().equals("A")); //$NON-NLS-1$
+		assertTrue(A_implicit[2].getName().equals("operator =")); //$NON-NLS-1$
+		assertTrue(A_implicit[3].getName().equals("~A")); //$NON-NLS-1$
+		
+		result = B.getMethods();
+		assertEquals(result.length, 10);
+		assertSame(result[0], fb);
+		assertSame(result[1], B_implicit[0]);
+		assertSame(result[2], B_implicit[1]);
+		assertSame(result[3], B_implicit[2]);
+		assertSame(result[4], B_implicit[3]);
+		assertSame(result[5], fa);
+		assertSame(result[6], A_implicit[0]);
+		assertSame(result[7], A_implicit[1]);
+		assertSame(result[8], A_implicit[2]);
+		assertSame(result[9], A_implicit[3]);
+	}
+	
+	public void testBug87424() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"int * __restrict x;", ParserLanguage.CPP, true); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IVariable x = (IVariable) col.getName(0).resolveBinding();
+		IType t = x.getType();
+		assertTrue(t instanceof IGPPPointerType);
+		assertTrue(((IGPPPointerType) t).isRestrict());
+		
+		tu = parse("class A {}; int A::* __restrict x;", ParserLanguage.CPP, true); //$NON-NLS-1$
+		col = new CPPNameCollector();
+		tu.accept(col);
+		
+		x = (IVariable) col.getName(3).resolveBinding();
+		t = x.getType();
+		assertTrue(t instanceof IGPPPointerToMemberType);
+		assertTrue(((IGPPPointerToMemberType) t).isRestrict());
+	}
+	
+	public void testBug87705() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"class A { friend class B::C; };", ParserLanguage.CPP, true); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IProblemBinding B = (IProblemBinding) col.getName(2).resolveBinding();
+		assertEquals(B.getID(), IProblemBinding.SEMANTIC_NAME_NOT_FOUND);
+		IProblemBinding C = (IProblemBinding) col.getName(3).resolveBinding();
+		assertEquals(C.getID(), IProblemBinding.SEMANTIC_BAD_SCOPE);
+	}
+	
+	public void testBug88459() throws Exception {
+		IASTTranslationUnit tu = parse("int f(); ", ParserLanguage.CPP); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f = (IFunction) col.getName(0).resolveBinding();
+		assertFalse(f.isStatic());
+	}
+	
+	public void testBug88501_1() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"void f(); void f( int ); struct f;", ParserLanguage.CPP); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertTrue(col.getName(0).resolveBinding() instanceof IFunction);
+		assertTrue(col.getName(1).resolveBinding() instanceof IFunction);
+		assertTrue(col.getName(3).resolveBinding() instanceof ICPPClassType);
+	}
+	
+	// public void testBug8342_1() throws Exception {
+	// IASTTranslationUnit tu = parse( "int a; int a;", ParserLanguage.CPP );
+	// //$NON-NLS-1$
+	// CPPNameCollector col = new CPPNameCollector();
+	// tu.accept(col);
+	//        
+	// assertTrue( col.getName(0).resolveBinding() instanceof IVariable );
+	// IProblemBinding p = (IProblemBinding) col.getName(1).resolveBinding();
+	// assertEquals( p.getID(), IProblemBinding.SEMANTIC_INVALID_REDEFINITION );
+	// }
+	
+	public void testBug8342_2() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"extern int a; extern char a;", ParserLanguage.CPP); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertTrue(col.getName(0).resolveBinding() instanceof IVariable);
+		IProblemBinding p = (IProblemBinding) col.getName(1).resolveBinding();
+		assertEquals(p.getID(), IProblemBinding.SEMANTIC_INVALID_REDECLARATION);
+	}
+	
+	// namespace A { int i; }      
+	// namespace B = A;            
+	// void f() {                  
+	//    B::i;                    
+	// }                           
+	public void testNamespaceAlias_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPNamespace A = (ICPPNamespace) col.getName(0).resolveBinding();
+		ICPPNamespaceAlias alias = (ICPPNamespaceAlias) col.getName(6)
+		.resolveBinding();
+		ICPPVariable i = (ICPPVariable) col.getName(7).resolveBinding();
+		
+		assertInstances(col, A, 2);
+		assertInstances(col, alias, 2);
+		assertInstances(col, i, 3);
+		
+		String[] s = i.getQualifiedName();
+		assertEquals(s[0], "A"); //$NON-NLS-1$
+		assertEquals(s[1], "i"); //$NON-NLS-1$
+		assertTrue(i.isGloballyQualified());
+		
+		s = alias.getQualifiedName();
+		assertEquals(s[0], "B"); //$NON-NLS-1$
+		assertTrue(alias.isGloballyQualified());
+	}
+	
+	// class A{};              
+	// class B : public A {    
+	//    B () : A() {}        
+	// };                      
+	public void testBug89539() throws Exception {
+	    String content= getAboveComment();
+		IASTTranslationUnit tu = parse(content, ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType A1 = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPClassType A2 = (ICPPClassType) col.getName(2).resolveBinding();
+		assertSame(A1, A2);
+		
+		ICPPConstructor A3 = (ICPPConstructor) col.getName(4).resolveBinding();
+		assertSame(A3.getScope(), A1.getCompositeScope());
+		
+		tu = parse(content, ParserLanguage.CPP); 
+		col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertTrue(col.getName(4).resolveBinding() instanceof ICPPConstructor);
+	}
+	
+	// class B * b;            
+	// class A {               
+	//    A * a;               
+	// };                      
+	// class A;                
+	public void testBug89851() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertTrue(col.getName(0).resolveBinding() instanceof ICPPClassType);
+		assertTrue(col.getName(1).resolveBinding() instanceof ICPPVariable);
+		assertTrue(col.getName(2).resolveBinding() instanceof ICPPClassType);
+		assertTrue(col.getName(3).resolveBinding() instanceof ICPPClassType);
+	}
+	
+	public void testBug89828() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"class B * b; void f();  void f( int );", ParserLanguage.CPP); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertTrue(col.getName(0).resolveBinding() instanceof ICPPClassType);
+		assertTrue(col.getName(1).resolveBinding() instanceof ICPPVariable);
+		IFunction f1 = (IFunction) col.getName(2).resolveBinding();
+		IFunction f2 = (IFunction) col.getName(3).resolveBinding();
+		
+		IScope scope = tu.getScope();
+		IBinding[] bs = scope.find("f"); //$NON-NLS-1$
+		assertEquals(bs.length, 2);
+		assertSame(bs[0], f1);
+		assertSame(bs[1], f2);
+	}
+	
+	// class A {                  
+	//    enum type { t1, t2 };   
+	//    void f( type t );       
+	// };                         
+	// class B : public A {       
+	//    void g() {              
+	//       f( A::t1 );          
+	//    }                       
+	// };                         
+	public void testBug90039() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f = (IFunction) col.getName(10).resolveBinding();
+		IEnumerator t1 = (IEnumerator) col.getName(13).resolveBinding();
+		
+		assertInstances(col, f, 2);
+		assertInstances(col, t1, 3);
+	}
+	
+	// void f( void ) {                 
+	//    enum { one };                 
+	// }                                
+	public void testBug90039_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		assertTrue(col.getName(0).resolveBinding() instanceof IFunction);
+		assertTrue(col.getName(1).resolveBinding() instanceof IParameter);
+		IEnumeration e = (IEnumeration) col.getName(2).resolveBinding();
+		IEnumerator one = (IEnumerator) col.getName(3).resolveBinding();
+		assertSame(one.getType(), e);
+	}
+	
+	// class Foo {
+	// public:
+	// operator int();
+	// char& operator[](unsigned int);
+	// };
+	public void testOperatorConversionNames() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IASTName name1 = col.getName(1);
+		IASTName name2 = col.getName(2);
+		
+		assertNotNull(name1);
+		assertNotNull(name2);
+		
+		assertTrue(name1 instanceof ICPPASTConversionName);
+		assertTrue(name2 instanceof ICPPASTOperatorName);
+		
+		IASTTypeId typeId = ((ICPPASTConversionName) name1).getTypeId();
+		assertNotNull(typeId);
+		assertEquals(((IASTSimpleDeclSpecifier) typeId.getDeclSpecifier())
+				.getType(), IASTSimpleDeclSpecifier.t_int);
+		
+	}
+	
+	// class X { operator int(); }; 
+	// X::operator int() { } 
+	// template <class A,B> class X<A,C> { operator int(); }; 
+	// template <class A,B> X<A,C>::operator int() { } 
+	public void testBug36769B() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		// 1,4,12,21 - conversion
+		// 2, 16 .isConversion
+				
+		final IASTName int1 = col.getName(1);
+		assertNotNull(int1);
+		assertTrue(int1 instanceof ICPPASTConversionName);
+		assertNotNull(((ICPPASTConversionName) int1).getTypeId());
+		
+		IASTFunctionDefinition fdef= getDeclaration(tu, 1);
+		final IASTName x_int = fdef.getDeclarator().getName();
+		assertNotNull(x_int);
+		assertTrue(x_int instanceof ICPPASTQualifiedName);
+		assertTrue(((ICPPASTQualifiedName) x_int).isConversionOrOperator());
+
+		final IASTName int2= ((ICPPASTQualifiedName)x_int).getLastName();
+		assertNotNull(int2);
+		assertTrue(int2 instanceof ICPPASTConversionName);
+		assertNotNull(((ICPPASTConversionName) int2).getTypeId());
+		
+		final IASTName int3 = col.getName(12);
+		assertNotNull(int3);
+		assertTrue(int3 instanceof ICPPASTConversionName);
+		assertNotNull(((ICPPASTConversionName) int3).getTypeId());
+
+		ICPPASTTemplateDeclaration tdef= getDeclaration(tu, 3);
+		fdef= (IASTFunctionDefinition) tdef.getDeclaration();
+		final IASTName x_ac_int = fdef.getDeclarator().getName();
+		assertNotNull(x_ac_int);
+		assertTrue(x_ac_int instanceof ICPPASTQualifiedName);
+		assertTrue(((ICPPASTQualifiedName) x_ac_int).isConversionOrOperator());
+
+		final IASTName int4= ((ICPPASTQualifiedName)x_ac_int).getLastName();
+		assertNotNull(int4);
+		assertTrue(int4 instanceof ICPPASTConversionName);
+		assertNotNull(((ICPPASTConversionName) int4).getTypeId());
+	}
+	
+	public void testBug88662() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"int foo() {  return int();}", ParserLanguage.CPP); //$NON-NLS-1$
+		IASTReturnStatement returnStatement = (IASTReturnStatement) ((IASTCompoundStatement) ((IASTFunctionDefinition) tu
+				.getDeclarations()[0]).getBody()).getStatements()[0];
+		ICPPASTSimpleTypeConstructorExpression expression = (ICPPASTSimpleTypeConstructorExpression) returnStatement
+		.getReturnValue();
+		assertEquals(expression.getInitialValue(), null);
+		assertEquals(expression.getSimpleType(),
+				ICPPASTSimpleTypeConstructorExpression.t_int);
+	}
+	
+	public void testBug90498_1() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"typedef int INT;\ntypedef INT ( FOO ) (INT);", ParserLanguage.CPP); //$NON-NLS-1$
+		
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+		.getDeclarations()[1];
+		IASTDeclSpecifier declSpec = decl.getDeclSpecifier();
+		assertTrue(declSpec instanceof ICPPASTNamedTypeSpecifier);
+		assertEquals(((ICPPASTNamedTypeSpecifier) declSpec).getName()
+				.toString(), "INT"); //$NON-NLS-1$
+				
+		IASTDeclarator dtor = decl.getDeclarators()[0];
+		assertTrue(dtor instanceof IASTFunctionDeclarator);
+		assertNotNull(dtor.getNestedDeclarator());
+		IASTDeclarator nested = dtor.getNestedDeclarator();
+		assertEquals(nested.getName().toString(), "FOO"); //$NON-NLS-1$
+	}
+	
+	public void testBug90498_2() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"int (* foo) (int) (0);", ParserLanguage.CPP); //$NON-NLS-1$
+		
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+		.getDeclarations()[0];
+		IASTDeclSpecifier declSpec = decl.getDeclSpecifier();
+		assertTrue(declSpec instanceof IASTSimpleDeclSpecifier);
+		
+		IASTDeclarator dtor = decl.getDeclarators()[0];
+		assertTrue(dtor instanceof IASTFunctionDeclarator);
+		assertNotNull(dtor.getNestedDeclarator());
+		IASTDeclarator nested = dtor.getNestedDeclarator();
+		assertEquals(nested.getName().toString(), "foo"); //$NON-NLS-1$
+		
+		assertNotNull(dtor.getInitializer());
+	}
+	
+	// class D { /* ... */ };
+	// D d1;
+	// const D d2;
+	// void foo() {
+	//     typeid(d1) == typeid(d2);
+	//     typeid(D) == typeid(d2);
+	// }
+	public void testBug866274() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		IASTFunctionDefinition foo = (IASTFunctionDefinition) tu
+		.getDeclarations()[3];
+		IASTCompoundStatement cs = (IASTCompoundStatement) foo.getBody();
+		IASTStatement[] subs = cs.getStatements();
+		for (int i = 0; i < subs.length; ++i) {
+			IASTBinaryExpression be = (IASTBinaryExpression) ((IASTExpressionStatement) subs[i])
+			.getExpression();
+			if (i == 1) {
+				IASTTypeIdExpression expression = (IASTTypeIdExpression) be
+				.getOperand1();
+				IASTTypeId typeId = expression.getTypeId();
+				assertTrue(((IASTNamedTypeSpecifier) typeId.getDeclSpecifier())
+						.getName().resolveBinding() instanceof IType);
+			} else {
+				IASTUnaryExpression expression = (IASTUnaryExpression) be
+				.getOperand1();
+				IASTIdExpression idExpression = (IASTIdExpression) expression
+				.getOperand();
+				assertTrue(idExpression.getName().resolveBinding() instanceof IVariable);
+			}
+			IASTUnaryExpression expression = (IASTUnaryExpression) be
+			.getOperand2();
+			IASTIdExpression idExpression = (IASTIdExpression) expression
+			.getOperand();
+			assertTrue(idExpression.getName().resolveBinding() instanceof IVariable);
+			
+		}
+	}
+	
+	public void testTypedefFunction() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"typedef int foo (int);", ParserLanguage.CPP); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IBinding binding = col.getName(0).resolveBinding();
+		assertTrue(binding instanceof ITypedef);
+		assertTrue(((ITypedef) binding).getType() instanceof IFunctionType);
+	}
+	
+	// void f( int );          
+	// void foo(){             
+	//    f( ( 1, 2 ) );       
+	// }                       
+	public void testBug90616() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f1 = (IFunction) col.getName(0).resolveBinding();
+		IFunction f2 = (IFunction) col.getName(3).resolveBinding();
+		assertSame(f1, f2);
+	}
+	
+	public void testBug90603() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"class X { void f(){} };", ParserLanguage.CPP); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType X = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPMethod f1 = (ICPPMethod) col.getName(1).resolveBinding();
+		
+		assertFalse(f1.isStatic());
+		
+		String[] qns = f1.getQualifiedName();
+		assertEquals(qns.length, 2);
+		assertEquals(qns[0], "X"); //$NON-NLS-1$
+		assertEquals(qns[1], "f"); //$NON-NLS-1$
+		assertTrue(f1.isGloballyQualified());
+		assertEquals(f1.getVisibility(), ICPPMember.v_private);
+		
+		assertSame(f1.getScope(), X.getCompositeScope());
+	}
+	
+	// class X {   };           
+	// X x;                     
+	// class X {   };           
+	public void testBug90662() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType X = (ICPPClassType) col.getName(0).resolveBinding();
+		IVariable x = (IVariable) col.getName(2).resolveBinding();
+		IProblemBinding problem = (IProblemBinding) col.getName(3)
+		.resolveBinding();
+		assertSame(x.getType(), X);
+		assertEquals(problem.getID(),
+				IProblemBinding.SEMANTIC_INVALID_REDEFINITION);
+	}
+	
+	// struct C {                               
+	//    void* operator new [ ] (unsigned int);
+	//    void* operator new (unsigned int);
+	//    void operator delete [ ] ( void * );       
+	//    void operator delete (void *);
+	//    const C& operator+=(const C&);
+	//    const C& operator -= (const C&);
+	//    const C& operator *=   (const C&);
+	//    const C& operator /= (const C&);
+	//    const C& operator %= (const C&);
+	//    const C& operator^=(const C&);
+	//    const C& operator&= (const C&);
+	//    const C& operator |= (const C&);
+	//    const C& operator >>=(const C&);
+	//    const C& operator<<= (const C&);
+	//    const C& operator<<(const C&);
+	//    const C& operator>>(const C&);
+	//    const C& operator /**/   == /**/  (const C&);
+	//    const C& operator != /**/ (const C&);
+	//    const C& operator <= (const C&);
+	//    const C& operator /**/ >=(const C&);
+	//    const C& operator =(const C&);
+	//    const C& operator&& (const C&);
+	//    const C& operator ||(const C&);
+	//    const C& operator ++(const C&);
+	//    const C& operator-- (const C&);
+	//    const C& operator/**/,/**/(const C&);
+	//    const C& operator->*
+	// (const C&);
+	//    const C& operator -> (const C&);
+	//    const C& operator /**/ ( /**/ ) /**/ (const C&);
+	//    const C& operator /**/ [ /**/ ] /**/ (const C&);
+	//    const C& operator + (const C&);
+	//    const C& operator- (const C&);
+	//    const C& operator *(const C&);
+	//    const C& operator /(const C&);
+	//    const C& operator % /**/(const C&);
+	//    const C& operator ^(const C&);
+	//    const C& operator &(const C&);
+	//    const C& operator |(const C&);
+	//    const C& operator   ~ (const C&);
+	//    const C& operator 	
+	//  ! /**/ (const C&);
+	//    const C& operator <(const C&);
+	//    const C& operator>(const C&);
+	// };                                       
+	public void testOperatorNames() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 161);
+		assertEquals(col.getName(1).toString(), "operator new[]"); //$NON-NLS-1$
+		assertEquals(col.getName(3).toString(), "operator new"); //$NON-NLS-1$
+		assertEquals(col.getName(5).toString(), "operator delete[]"); //$NON-NLS-1$
+		assertEquals(col.getName(7).toString(), "operator delete"); //$NON-NLS-1$
+		assertEquals(col.getName(10).toString(), "operator +="); //$NON-NLS-1$
+		assertEquals(col.getName(14).toString(), "operator -="); //$NON-NLS-1$
+		assertEquals(col.getName(18).toString(), "operator *="); //$NON-NLS-1$
+		assertEquals(col.getName(22).toString(), "operator /="); //$NON-NLS-1$
+		assertEquals(col.getName(26).toString(), "operator %="); //$NON-NLS-1$
+		assertEquals(col.getName(30).toString(), "operator ^="); //$NON-NLS-1$
+		assertEquals(col.getName(34).toString(), "operator &="); //$NON-NLS-1$
+		assertEquals(col.getName(38).toString(), "operator |="); //$NON-NLS-1$
+		assertEquals(col.getName(42).toString(), "operator >>="); //$NON-NLS-1$
+		assertEquals(col.getName(46).toString(), "operator <<="); //$NON-NLS-1$
+		assertEquals(col.getName(50).toString(), "operator <<"); //$NON-NLS-1$
+		assertEquals(col.getName(54).toString(), "operator >>"); //$NON-NLS-1$
+		assertEquals(col.getName(58).toString(), "operator =="); //$NON-NLS-1$
+		assertEquals(col.getName(62).toString(), "operator !="); //$NON-NLS-1$
+		assertEquals(col.getName(66).toString(), "operator <="); //$NON-NLS-1$
+		assertEquals(col.getName(70).toString(), "operator >="); //$NON-NLS-1$
+		assertEquals(col.getName(74).toString(), "operator ="); //$NON-NLS-1$
+		assertEquals(col.getName(78).toString(), "operator &&"); //$NON-NLS-1$
+		assertEquals(col.getName(82).toString(), "operator ||"); //$NON-NLS-1$
+		assertEquals(col.getName(86).toString(), "operator ++"); //$NON-NLS-1$
+		assertEquals(col.getName(90).toString(), "operator --"); //$NON-NLS-1$
+		assertEquals(col.getName(94).toString(), "operator ,"); //$NON-NLS-1$
+		assertEquals(col.getName(98).toString(), "operator ->*"); //$NON-NLS-1$
+		assertEquals(col.getName(102).toString(), "operator ->"); //$NON-NLS-1$
+		assertEquals(col.getName(106).toString(), "operator ()"); //$NON-NLS-1$
+		assertEquals(col.getName(110).toString(), "operator []"); //$NON-NLS-1$
+		assertEquals(col.getName(114).toString(), "operator +"); //$NON-NLS-1$
+		assertEquals(col.getName(118).toString(), "operator -"); //$NON-NLS-1$
+		assertEquals(col.getName(122).toString(), "operator *"); //$NON-NLS-1$
+		assertEquals(col.getName(126).toString(), "operator /"); //$NON-NLS-1$
+		assertEquals(col.getName(130).toString(), "operator %"); //$NON-NLS-1$
+		assertEquals(col.getName(134).toString(), "operator ^"); //$NON-NLS-1$
+		assertEquals(col.getName(138).toString(), "operator &"); //$NON-NLS-1$
+		assertEquals(col.getName(142).toString(), "operator |"); //$NON-NLS-1$
+		assertEquals(col.getName(146).toString(), "operator ~"); //$NON-NLS-1$
+		assertEquals(col.getName(150).toString(), "operator !"); //$NON-NLS-1$
+		assertEquals(col.getName(154).toString(), "operator <"); //$NON-NLS-1$
+		assertEquals(col.getName(158).toString(), "operator >"); //$NON-NLS-1$
+	}
+	
+	// typedef int I;             
+	// typedef int I;             
+	// typedef I I;               
+	// class A {                  
+	//    typedef char I;         
+	//    typedef char I;         
+	//    typedef I I;            
+	// };                         
+	public void testBug90623() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ITypedef I1 = (ITypedef) col.getName(0).resolveBinding();
+		ITypedef I2 = (ITypedef) col.getName(1).resolveBinding();
+		ITypedef I3 = (ITypedef) col.getName(2).resolveBinding();
+		ITypedef I4 = (ITypedef) col.getName(3).resolveBinding();
+		ITypedef I8 = (ITypedef) col.getName(5).resolveBinding();
+		ITypedef I5 = (ITypedef) col.getName(8).resolveBinding();
+		ITypedef I6 = (ITypedef) col.getName(7).resolveBinding();
+		ITypedef I7 = (ITypedef) col.getName(6).resolveBinding();
+		// ITypedef I8 = (ITypedef) col.getName(5).resolveBinding();
+		
+		assertSame(I1, I2);
+		assertSame(I2, I3);
+		assertSame(I3, I4);
+		assertNotSame(I4, I5);
+		assertSame(I5, I6);
+		assertSame(I6, I7);
+		assertSame(I7, I8);
+		
+		assertTrue(I1.getType() instanceof IBasicType);
+		assertEquals(((IBasicType) I1.getType()).getType(), IBasicType.t_int);
+		
+		assertTrue(I8.getType() instanceof IBasicType);
+		assertEquals(((IBasicType) I8.getType()).getType(), IBasicType.t_char);
+	}
+	
+	// typedef int I;             
+	// void f11( I i );           
+	// void main(){ f a; }          
+	public void testBug90623_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IASTName f = col.getName(5);
+		f.getCompletionContext().findBindings(f, true);
+	}
+	
+	// class X {            
+	//    X( const X & );   
+	// };                   
+	// class Y {            
+	//    operator X ();    
+	// };                   
+	// Y y;                 
+	// X x = new X( y );    
+	public void testBug90654_1() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPConstructor ctor1 = (ICPPConstructor) col.getName(1)
+		.resolveBinding();
+		ICPPConstructor ctor = (ICPPConstructor) col.getName(11)
+		.resolveBinding();
+		assertSame(ctor, ctor1);
+	}
+	
+	// struct A {                
+	//    operator short();      
+	// } a;                      
+	// int f( int );             
+	// int f( float );           
+	// int x = f(a);             
+	public void testBug90654_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f1 = (IFunction) col.getName(3).resolveBinding();
+		IFunction f2 = (IFunction) col.getName(8).resolveBinding();
+		assertSame(f1, f2);
+	}
+	
+	// struct A {};                    
+	// struct B : public A {           
+	//    B& operator = (const B & );  
+	// };                              
+	// B& B::operator = (const B & s){ 
+	//    this->A::operator=(s);       
+	//    return *this;                
+	// }                               
+	public void testBug90653() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPMethod implicit = A.getMethods()[2];
+		
+		ICPPMethod op1 = (ICPPMethod) col.getName(4).resolveBinding();
+		ICPPMethod op2 = (ICPPMethod) col.getName(10).resolveBinding();
+		
+		ICPPMethod op = (ICPPMethod) col.getName(15).resolveBinding();
+		
+		assertSame(op1, op2);
+		assertSame(op, implicit);
+	}
+	
+	// void f( char * );            
+	// void foo() {                 
+	//    f( "test" );            
+	// }                            
+	public void testBug86618() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f = (IFunction) col.getName(0).resolveBinding();
+		assertInstances(col, f, 2);
+	}
+	
+	// void f( int (*pf) (char) );       
+	// int g( char );                    
+	// void foo () {                     
+	//    f( g ) ;                       
+	// }                                 
+	public void testBug45129() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction f1 = (ICPPFunction) col.getName(0).resolveBinding();
+		ICPPFunction g1 = (ICPPFunction) col.getName(3).resolveBinding();
+		
+		IBinding f2 = col.getName(6).resolveBinding();
+		IBinding g2 = col.getName(7).resolveBinding();
+		
+		assertSame(f1, f2);
+		assertSame(g1, g2);
+	}
+	
+	// class ABC { 
+	//    class DEF { };
+	//    static int GHI;
+	// }; 
+	// int ABC::GHI = 77; // ray bourque
+	// int f() { 
+	//   int value;
+	//   ABC::DEF * var;
+	//   ABC::GHI * value;
+	// }
+	public void testAmbiguousStatements() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		IASTDeclaration[] declarations = tu.getDeclarations();
+		assertEquals(3, declarations.length);
+		IASTCompoundStatement cs = (IASTCompoundStatement) ((IASTFunctionDefinition) declarations[2])
+		.getBody();
+		assertTrue(cs.getStatements()[1] instanceof IASTDeclarationStatement);
+		assertTrue(cs.getStatements()[2] instanceof IASTExpressionStatement);
+		
+	}
+	
+	// void f(){                              
+	//    union { int a; char* p; };          
+	//    a = 1;                              
+	// }                                      
+	public void testBug86639() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPField a = (ICPPField) col.getName(2).resolveBinding();
+		ICPPField a2 = (ICPPField) col.getName(4).resolveBinding();
+		assertSame(a, a2);
+	}
+	
+	// void f () {                     
+	//    int aa1, aa2;                
+	//    a;                           
+	// }                               
+	public void testBug80940() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IVariable a1 = (IVariable) col.getName(1).resolveBinding();
+		IVariable a2 = (IVariable) col.getName(2).resolveBinding();
+		
+		IBinding[] bs = col.getName(3).getCompletionContext().findBindings(
+				col.getName(3), true);
+		assertEquals(bs.length, 2);
+		assertSame(bs[0], a1);
+		assertSame(bs[1], a2);
+	}
+	
+	// struct Ex {                            
+	//    int d();                            
+	//    int d() const;                      
+	// };                                     
+	// int Ex::d() {}                         
+	// int Ex::d() const {}                   
+	// void f() {                             
+	//    const Ex * e;                       
+	//    e->d();                             
+	// }                                      
+	public void testBug77024() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction d1 = (ICPPFunction) col.getName(1).resolveBinding();
+		ICPPFunction d2 = (ICPPFunction) col.getName(2).resolveBinding();
+		
+		assertNotSame(d1, d2);
+		
+		assertFalse(d1.getType().isConst());
+		assertTrue((d2.getType()).isConst());
+		
+		ICPPFunction dr1 = (ICPPFunction) col.getName(5).resolveBinding();
+		ICPPFunction dr2 = (ICPPFunction) col.getName(8).resolveBinding();
+		
+		assertSame(d1, dr1);
+		assertSame(d2, dr2);
+		
+		IBinding r = col.getName(13).resolveBinding();
+		assertSame(d2, r);
+	}
+	
+	// class Point {                    
+	//    Point() : xCoord(0) {}    
+	//    int xCoord;               
+	// };                           
+	public void testBug91773() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPField x = (ICPPField) col.getName(2).resolveBinding();
+		ICPPField x2 = (ICPPField) col.getName(3).resolveBinding();
+		assertSame(x, x2);
+	}
+	
+	public void testBug90648() throws ParserException {
+		IASTTranslationUnit tu = parse(
+				"int f() { int (&ra)[3] = a; }", ParserLanguage.CPP); //$NON-NLS-1$
+		IASTFunctionDefinition f = (IASTFunctionDefinition) tu
+		.getDeclarations()[0];
+		IASTCompoundStatement body = (IASTCompoundStatement) f.getBody();
+		final IASTDeclarationStatement statement = (IASTDeclarationStatement) body
+		.getStatements()[0];
+		IASTSimpleDeclaration d = (IASTSimpleDeclaration) statement
+		.getDeclaration();
+		IASTSimpleDeclSpecifier declSpec = (IASTSimpleDeclSpecifier) d
+		.getDeclSpecifier();
+		assertEquals(IASTSimpleDeclSpecifier.t_int, declSpec.getType());
+		final IASTDeclarator[] declarators = d.getDeclarators();
+		assertEquals(declarators.length, 1);
+		assertTrue(declarators[0] instanceof IASTArrayDeclarator);
+	}
+	
+	public void testBug92980() throws Exception {
+		String code = "struct A { A(); A(const A&) throw(1); ~A() throw(X); };"; //$NON-NLS-1$
+		parse(code, ParserLanguage.CPP, true, false);
+	}
+	
+	// class Dummy { int v(); int d; };                
+	// void Dummy::v( int ){ d++; }                    
+	public void testBug92882() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertTrue(col.getName(5).resolveBinding() instanceof IProblemBinding);
+		ICPPField d1 = (ICPPField) col.getName(2).resolveBinding();
+		ICPPField d2 = (ICPPField) col.getName(7).resolveBinding();
+		assertSame(d1, d2);
+	}
+	
+	// void f( int, int );                    
+	// void f( int, int = 3);                 
+	// void f( int = 2, int );                
+	// void g() {                             
+	//    f( 3 );                             
+	//    f( );                               
+	// }                                      
+	public void testBug86547() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f1 = (IFunction) col.getName(0).resolveBinding();
+		assertInstances(col, f1, 5);
+	}
+	
+	public void testBug90647() throws Exception {
+		parse(
+				"char msg[] = \"Syntax error on line %s\\n\";", ParserLanguage.CPP); //$NON-NLS-1$
+	}
+	
+	// int main(int argc, char **argv)
+	// {
+	// int sum=0;
+	// int i;
+	// for (i = 0; i < 10; ++i)
+	// for (int j = 0; j < 3; ++j)
+	// sum += j;
+	// for (i = 0; i < 10; ++i)
+	// for (int j = 0; j < 3; ++j) // line X
+	// sum += j;  // line Y
+	// int k;
+	// k = sum;
+	// }
+	public void testBug82766() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		assertNoProblemBindings(col);
+	}
+	
+	// int main(int argc, char *argv[])
+	// {
+	//     unsigned long l = 0;
+	//     char *c;
+	//     l |= ((unsigned long)(*((c)++)))<<24;
+	// }
+	public void testBug77385() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		assertNoProblemBindings(col);
+	}
+	
+	public void testBug83997() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"namespace { int x; }", ParserLanguage.CPP); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		assertNoProblemBindings(col);
+	}
+	
+	protected void assertNoProblemBindings(CPPNameCollector col) {
+		Iterator i = col.nameList.iterator();
+		while (i.hasNext()) {
+			IASTName n = (IASTName) i.next();
+			assertFalse(n.resolveBinding() instanceof IProblemBinding);
+		}
+	}
+	
+	private void assertProblemBinding(int id, IBinding b) {
+		assertTrue(b instanceof IProblemBinding);
+		assertEquals(id, ((IProblemBinding) b).getID());
+	}
+
+	protected void assertProblemBindings(CPPNameCollector col, int count) {
+		Iterator i = col.nameList.iterator();
+		int sum = 0;
+		while (i.hasNext()) {
+			IASTName n = (IASTName) i.next();
+			assertNotNull(n.resolveBinding());
+			if (n.getBinding() instanceof IProblemBinding)
+				++sum;
+		}
+		assertEquals(count, sum);
+	}
+	
+	public void testBug85786() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"void f( int ); void foo () { void * p = &f; ( (void (*) (int)) p ) ( 1 ); }", ParserLanguage.C); //$NON-NLS-1$
+		CPPNameCollector nameResolver = new CPPNameCollector();
+		tu.accept(nameResolver);
+		assertNoProblemBindings(nameResolver);
+	}
+	
+	// class C {                   
+	//    static const int n = 1;  
+	//    static int arr[ n ];     
+	// };                          
+	// int C::arr[n];              
+	public void testBug90610() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPField n = (ICPPField) col.getName(1).resolveBinding();
+		assertTrue(n.isStatic());
+		
+		assertInstances(col, n, 3);
+	}
+	
+	// int a;                
+	// extern int b;         
+	// extern int c = 1;     
+	// int f( );             
+	// int f( int p ){}      
+	// struct S;             
+	// struct S { int d; };  
+	// struct X {            
+	//    static int y;      
+	// };                    
+	// namespace N {}        
+	// int X::y = 1;         
+	// int ( *g(int) )(int); 
+	// int ( *pf)(int);      
+	public void testDeclDefn() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertTrue(col.getName(0).isDefinition()); // a
+		assertFalse(col.getName(1).isDefinition()); // b
+		assertTrue(col.getName(2).isDefinition()); // c
+		assertFalse(col.getName(3).isDefinition()); // f ()
+		assertTrue(col.getName(4).isDefinition()); // f () {}
+		assertTrue(col.getName(5).isDefinition()); // p
+		assertFalse(col.getName(6).isDefinition()); // struct S;
+		assertTrue(col.getName(7).isDefinition()); // struct S {}
+		assertTrue(col.getName(8).isDefinition()); // d
+		assertTrue(col.getName(9).isDefinition()); // X
+		assertFalse(col.getName(10).isDefinition()); // y
+		assertTrue(col.getName(11).isDefinition()); // N
+		assertTrue(col.getName(12).isDefinition()); // X::y
+		assertFalse(col.getName(15).isDefinition()); // g
+		assertTrue(col.getName(18).isDefinition()); // pf
+	}
+	
+	// int f(double);                    
+	// int f(int);                       
+	// int (&rfi)(int) = f;              
+	// int (&rfd)(double) = f;           
+	public void testBug95200() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction f1 = (ICPPFunction) col.getName(0).resolveBinding();
+		ICPPFunction f2 = (ICPPFunction) col.getName(2).resolveBinding();
+		
+		assertSame(col.getName(6).resolveBinding(), f2);
+		assertSame(col.getName(9).resolveBinding(), f1);
+	}
+	
+	public void testBug95425() throws Exception {
+		IASTTranslationUnit tu = parse("class A { A(); };", ParserLanguage.CPP); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPConstructor ctor = (ICPPConstructor) col.getName(1)
+		.resolveBinding();
+		
+		ICPPConstructor[] ctors = A.getConstructors();
+		assertEquals(2, ctors.length); // one user declared constructor, one copy constructor
+		assertSame(ctor, ctors[1]);
+		
+		tu = parse("class A { A( void ); };", ParserLanguage.CPP); //$NON-NLS-1$
+		col = new CPPNameCollector();
+		tu.accept(col);
+		
+		A = (ICPPClassType) col.getName(0).resolveBinding();
+		ctor = (ICPPConstructor) col.getName(1).resolveBinding();
+		
+		ctors = A.getConstructors();
+		assertEquals(2, ctors.length); // one user declared constructor, one copy constructor
+		assertSame(ctor, ctors[1]);
+	}
+	
+	// void f( char * );                 
+	// void g(){                         
+	//    char x[100];                   
+	//    f( x );                        
+	// }                                 
+	public void testBug95461() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction f1 = (ICPPFunction) col.getName(0).resolveBinding();
+		assertSame(f1, col.getName(4).resolveBinding());
+	}
+	
+	// class A { };
+	// int f() { 
+	//   A * b = 0;
+	//   A & c = 0;
+	// }
+	public void testAmbiguity() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		IASTSimpleDeclaration A = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+		IASTFunctionDefinition f = (IASTFunctionDefinition) tu
+		.getDeclarations()[1];
+		IASTCompoundStatement body = (IASTCompoundStatement) f.getBody();
+		for (int i = 0; i < 2; ++i) {
+			IASTDeclarationStatement ds = (IASTDeclarationStatement) body
+			.getStatements()[i];
+			String s1 = ((IASTNamedTypeSpecifier) ((IASTSimpleDeclaration) ds
+					.getDeclaration()).getDeclSpecifier()).getName().toString();
+			String s2 = ((IASTCompositeTypeSpecifier) A.getDeclSpecifier())
+			.getName().toString();
+			assertEquals(s1, s2);
+		}
+	}
+	
+	// struct A {
+	//  int a; 
+	// };
+	// struct B: virtual A { };
+	// struct C: B { };
+	// struct D: B { };
+	// struct E: public C, public D { };
+	// struct F: public A { };
+	// void f() {
+	// E e;
+	// e.B::a = 0;
+	// F f;
+	// f.A::a = 1;
+	// }
+	public void testBug84696() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 26);
+		
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPClassType B = (ICPPClassType) col.getName(2).resolveBinding();
+		
+		assertNotNull(A);
+		assertNotNull(B);
+		
+		assertInstances(col, A, 4);
+		assertInstances(col, B, 4);
+	}
+	
+	// class X {
+	//   public:
+	//   void f(int);
+	//   int a;
+	// };
+	// int X:: * pmi = &X::a;
+	public void testBasicPointerToMember() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		assertEquals(tu.getDeclarations().length, 2);
+		IASTSimpleDeclaration p2m = (IASTSimpleDeclaration) tu
+		.getDeclarations()[1];
+		IASTDeclarator d = p2m.getDeclarators()[0];
+		ICPPASTPointerToMember po = (ICPPASTPointerToMember) d
+		.getPointerOperators()[0];
+		assertEquals("X::", po.getName().toString()); //$NON-NLS-1$
+	}
+	
+	// struct B {};
+	// struct D : B {};
+	// void foo(D* dp)
+	// {
+	// B* bp = dynamic_cast<B*>(dp);
+	// }
+	public void testBug84466() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		ICPPASTCastExpression dynamic_cast = (ICPPASTCastExpression) ((IASTInitializerExpression) ((IASTSimpleDeclaration) ((IASTDeclarationStatement) ((IASTCompoundStatement) ((IASTFunctionDefinition) tu
+				.getDeclarations()[2]).getBody()).getStatements()[0])
+				.getDeclaration()).getDeclarators()[0].getInitializer())
+				.getExpression();
+		
+		assertEquals(dynamic_cast.getOperator(),
+				ICPPASTCastExpression.op_dynamic_cast);
+	}
+	
+	public void testBug88338_CPP() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"struct A; struct A* a;", ParserLanguage.CPP); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertTrue(col.getName(0).isDeclaration());
+		assertFalse(col.getName(0).isReference());
+		assertTrue(col.getName(1).isReference());
+		assertFalse(col.getName(1).isDeclaration());
+		
+		tu = parse("struct A* a;", ParserLanguage.CPP); //$NON-NLS-1$
+		col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertTrue(col.getName(0).isDeclaration());
+		assertFalse(col.getName(0).isReference());
+	}
+	
+	public void testPointerToFunction_CPP() throws Exception {
+		IASTTranslationUnit tu = parse("int (*pfi)();", ParserLanguage.CPP); //$NON-NLS-1$
+		assertEquals(tu.getDeclarations().length, 1);
+		IASTSimpleDeclaration d = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+		assertEquals(d.getDeclarators().length, 1);
+		IASTStandardFunctionDeclarator f = (IASTStandardFunctionDeclarator) d
+		.getDeclarators()[0];
+		assertEquals(f.getName().toString(), ""); //$NON-NLS-1$
+		assertNotNull(f.getNestedDeclarator());
+		assertEquals(f.getNestedDeclarator().getName().toString(), "pfi"); //$NON-NLS-1$
+	}
+	
+	// class X { public: int bar; };   
+	// void f(){                       
+	//    X a[10];                     
+	//    a[0].bar;                    
+	// }                               
+	public void testBug95484() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPField bar = (ICPPField) col.getName(1).resolveBinding();
+		assertSame(bar, col.getName(6).resolveBinding());
+	}
+	
+	// int strcmp( const char * );          
+	// void f( const char * const * argv ){ 
+	//    strcmp( *argv );                  
+	// }                                    
+	public void testBug95419() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction strcmp = (ICPPFunction) col.getName(0).resolveBinding();
+		assertSame(strcmp, col.getName(4).resolveBinding());
+	}
+	
+	//    class Other;                           
+	//    class Base {                           
+	//       public: Base( Other * );            
+	//    };                                     
+	//    class Sub : public Base {              
+	//       public: Sub( Other * );             
+	//    };                                     
+	//    Sub::Sub( Other * b ) : Base(b) {}     
+	public void testBug95673() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		
+		ICPPConstructor ctor= ba.assertNonProblem("Base( Other", 4, ICPPConstructor.class);
+		ICPPConstructor ctor2=  ba.assertNonProblem("Base(b)", 4, ICPPConstructor.class);
+		assertSame(ctor, ctor2);
+	}
+	
+	// void mem( void *, const void * );                       
+	// void f() {                                              
+	//    char *x;  int offset;                                
+	//    mem( x, "FUNC" );                                  
+	//    mem( x + offset, "FUNC2" );                        
+	// }                                                       
+	public void testBug95768() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction mem = (ICPPFunction) col.getName(0).resolveBinding();
+		assertSame(mem, col.getName(6).resolveBinding());
+		assertSame(mem, col.getName(8).resolveBinding());
+	}
+	
+	// void trace( const void * );                     
+	// class Foo {                                     
+	//    public: int import();                        
+	// };                                              
+	// int Foo::import(){                              
+	//    trace( this );                               
+	// }                                               
+	public void testBug95741() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction trace = (ICPPFunction) col.getName(0).resolveBinding();
+		assertSame(trace, col.getName(7).resolveBinding());
+	}
+	
+	// class RTCharacter {                        
+	//    char value;                             
+	//    public: operator char (void) const;     
+	// };                                         
+	// RTCharacter::operator char( void )const {  
+	//    return value;                           
+	// }                                          
+	public void testBug95692() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPMethod op = (ICPPMethod) col.getName(2).resolveBinding();
+		assertSame(op, col.getName(6).resolveBinding());
+	}
+	
+	// int str( const char * );               
+	// void f(){                              
+	//    str( 0 );                           
+	//    str( 00 );  str( 0x0 );             
+	// }                                      
+	public void testBug95734() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction str = (ICPPFunction) col.getName(0).resolveBinding();
+		assertSame(str, col.getName(3).resolveBinding());
+		assertSame(str, col.getName(4).resolveBinding());
+		assertSame(str, col.getName(5).resolveBinding());
+	}
+	
+	// int str( bool );                       
+	// enum { ONE };                          
+	// void f( char * p ){                    
+	//    str( 1.2 );                         
+	//    str( ONE );  str( p );              
+	// }                                      
+	public void testBug95734_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction str = (ICPPFunction) col.getName(0).resolveBinding();
+		assertSame(str, col.getName(6).resolveBinding());
+		assertSame(str, col.getName(7).resolveBinding());
+		assertSame(str, col.getName(9).resolveBinding());
+	}
+	
+	// void f() {
+	// char * value;
+	// ::operator delete(value);
+	// }
+	public void testBug95786() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertFalse(col.getName(2).resolveBinding() instanceof IProblemBinding);
+	}
+	
+	// int foo()
+	// try
+	// {
+	// // function body
+	// }
+	// catch (...)
+	// {
+	// }
+	public void testBug86868() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		assertEquals(tu.getDeclarations().length, 1);
+	}
+	
+	// void f( int t ){
+	// int s ( t );
+	// }
+	public void testBug94779() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		IASTDeclarationStatement ds = (IASTDeclarationStatement) ((IASTCompoundStatement) ((IASTFunctionDefinition) tu
+				.getDeclarations()[0]).getBody()).getStatements()[0];
+		IASTDeclarator d = ((IASTSimpleDeclaration) ds.getDeclaration())
+		.getDeclarators()[0];
+		assertTrue(d.getName().resolveBinding() instanceof IVariable);
+	}
+	
+	// int t= 0;
+	// int s ( t );
+	public void testBug211756() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		IASTSimpleDeclaration sd = (IASTSimpleDeclaration) (tu.getDeclarations()[1]);
+		IASTDeclarator d = sd.getDeclarators()[0];
+		assertTrue(d.getName().resolveBinding() instanceof IVariable);
+	}
+	
+	// typedef struct xs {           
+	//    int state;                 
+	// } xs;                         
+	// void f( xs *ci ) {            
+	//    ci->state;                 
+	//    (ci - 1)->state;           
+	// }                             
+	public void testBug95714() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPField state = (ICPPField) col.getName(1).resolveBinding();
+		assertSame(state, col.getName(7).resolveBinding());
+		assertSame(state, col.getName(9).resolveBinding());
+	}
+	
+	// float _Complex x;
+	// double _Complex y;
+	public void testBug95757() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP, true, true );
+		IASTDeclaration[] decls = tu.getDeclarations();
+		
+		assertTrue(((IGPPASTSimpleDeclSpecifier)((IASTSimpleDeclaration)decls[0]).getDeclSpecifier()).isComplex());
+		assertEquals(((IGPPASTSimpleDeclSpecifier)((IASTSimpleDeclaration)decls[0]).getDeclSpecifier()).getType(), IASTSimpleDeclSpecifier.t_float);
+		assertTrue(((IGPPASTSimpleDeclSpecifier)((IASTSimpleDeclaration)decls[1]).getDeclSpecifier()).isComplex());
+		assertEquals(((IGPPASTSimpleDeclSpecifier)((IASTSimpleDeclaration)decls[1]).getDeclSpecifier()).getType(), IASTSimpleDeclSpecifier.t_double);
+	}
+	
+	// class _A {                         
+	//    static int i;                   
+	// };                                 
+	// typedef _A A;                      
+	// void f(){                          
+	//    A::i++;                         
+	// }                                  
+	public void testTypedefQualified() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPField i = (ICPPField) col.getName(1).resolveBinding();
+		assertSame(i, col.getName(7).resolveBinding());
+	}
+	
+	// int f() {
+	//     return 5;
+	// }
+	// int main() {
+	// int a( 5 );
+	// int b( f() );
+	// return a+b;
+	// }
+	public void testBug86849() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		assertNoProblemBindings( col );
+	}
+	
+	// void copy( void * );                   
+	// typedef struct {} A;                   
+	// void f( A * a ) {                      
+	//    copy( a );                          
+	// }                                      
+	public void testBug96655() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction copy = (ICPPFunction) col.getName(0).resolveBinding();
+		assertSame( copy, col.getName(7).resolveBinding() );
+	}
+	
+	public void testBug96678() throws Exception {
+		parse( "int x; // comment \r\n", ParserLanguage.CPP, false, true ); //$NON-NLS-1$
+	}
+	
+	// struct A {};                      
+	// void copy( A * );                 
+	// void f( ) {                       
+	//    copy( new A() );               
+	// }                                 
+	public void testNewExpressionType() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction copy = (ICPPFunction) col.getName(1).resolveBinding();
+		assertSame( copy, col.getName(5).resolveBinding() );
+	}
+	
+	// class A {                        
+	//    A( int i = 0 );               
+	// };                               
+	public void testDefaultConstructor() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPConstructor ctor = (ICPPConstructor) col.getName(1).resolveBinding();
+		
+		ICPPConstructor [] cs = A.getConstructors();
+		assertTrue( cs.length == 2 );
+		assertSame( cs[1], ctor );
+	}
+	
+	// class C { public: int foo; };                 
+	// class B {                                     
+	//    C* operator ->();                          
+	//    C& operator [] ( int );                    
+	// };                                            
+	// void f(){                                     
+	//    B b;                                       
+	//    b->foo;                                    
+	//    b[0].foo;                                  
+	// }                                             
+	public void testBug91707() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col); 
+		
+		ICPPField foo = (ICPPField) col.getName(1).resolveBinding();
+		
+		assertSame( foo, col.getName(12).resolveBinding() );
+		assertSame( foo, col.getName(14).resolveBinding() );
+	}
+	
+	// class A;                    
+	// class A {                   
+	//    class B;                 
+	//    class C {};              
+	// };                          
+	// class A::B{};               
+	public void testBug92425() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col); 
+		
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPClassType B = (ICPPClassType) col.getName(2).resolveBinding();
+		ICPPClassType C = (ICPPClassType) col.getName(3).resolveBinding();
+		
+		ICPPClassType [] classes = A.getNestedClasses();
+		assertEquals( classes.length, 2 );
+		assertSame( classes[0], B );
+		assertSame( classes[1], C );
+	}
+	
+	// namespace A {                                  
+	//    struct F {} f;                              
+	//    void f( int a) {}                           
+	// }                                              
+	public void testBug92425_2() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col); 
+		
+		ICPPNamespace A = (ICPPNamespace) col.getName(0).resolveBinding();
+		IBinding [] bindings = A.getMemberBindings();
+		assertEquals( bindings.length, 3 );
+		assertSame( bindings[0], col.getName(1).resolveBinding() );
+		assertSame( bindings[1], col.getName(2).resolveBinding() );
+		assertSame( bindings[2], col.getName(3).resolveBinding() );
+	}
+	
+	// A< B< C< D< E< F< G< H<int> > > > > > > > a;  
+	// int A::B<int>::* b;                           
+	public void testBug98704() throws Exception {
+		parse( getAboveComment(), ParserLanguage.CPP );
+	}
+	
+	// void f();          
+	// void f( void ) {}  
+	public void testBug_AIOOBE() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction f = (IFunction) col.getName(0).resolveBinding();
+		assertSame( f, col.getName(1).resolveBinding() );
+		IParameter p = (IParameter) col.getName(2).resolveBinding();
+		assertNotNull( p );
+	}
+	
+	// void f( const int );     
+	// void f( int );           
+	// void g() { f(1); }       
+	public void testRankingQualificationConversions_a() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertSame( col.getName(2).resolveBinding(), col.getName(5).resolveBinding() );
+	}
+	
+	// void f( const volatile int );
+	// void f( const int );
+	// void g() { f(1); }
+	public void testRankingQualificationConversions_b() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertSame( col.getName(2).resolveBinding(), col.getName(5).resolveBinding() );
+	}
+	
+	// namespace n {                   
+	//    namespace m {                
+	//       class A;                  
+	//    }                            
+	// }                               
+	// namespace n {                   
+	//    namespace m {                
+	//       class A { void f(); };    
+	//    }                            
+	// }                               
+	// namespace n {                   
+	//    namespace m {                
+	//       void A::f(){}             
+	//    }                            
+	// }                               
+	public void testBug98818() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPNamespace n = (ICPPNamespace) col.getName(0).resolveBinding();
+		ICPPNamespace m = (ICPPNamespace) col.getName(1).resolveBinding();
+		assertSame( n, col.getName(3).resolveBinding() );
+		assertSame( n, col.getName(7).resolveBinding() );
+		assertSame( m, col.getName(4).resolveBinding() );
+		assertSame( m, col.getName(8).resolveBinding() );
+		
+		ICPPClassType A = (ICPPClassType) col.getName(2).resolveBinding(); 
+		assertSame( A, col.getName(5).resolveBinding() );
+		
+		ICPPMethod f = (ICPPMethod) col.getName(9).resolveBinding();
+		assertSame( f, col.getName(11).resolveBinding() );
+	}
+	
+	// struct A {               
+	//    struct { int i; } B;  
+	//    struct { int j; } C;  
+	// };                       
+	// void f(){                
+	//    A a;                  
+	//    a.B.i; a.C.j;         
+	// }                        
+	public void testAnonymousStructures() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPField i = (ICPPField) col.getName(12).resolveBinding();
+		ICPPField j = (ICPPField) col.getName(15).resolveBinding();
+		assertSame( i, col.getName(2).resolveBinding() );
+		assertSame( j, col.getName(5).resolveBinding() );
+	}
+	
+	public void testBug99262() throws Exception {
+		parse("void foo() {void *f; f=__null;}", ParserLanguage.CPP, true, true); //$NON-NLS-1$
+	}
+	
+	// void f1(int*) {
+	// }
+	// void f2() {
+	//   f1(__null);
+	// }
+	public void testBug240567() throws Exception {    	  
+    	BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		bh.assertNonProblem("f1(__null", 2, ICPPFunction.class);
+	}
+	
+	public void testBug100408() throws Exception {
+		IASTTranslationUnit tu = parse( "int foo() { int x=1; (x)*3; }", ParserLanguage.CPP );  //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(  col );
+		assertNoProblemBindings( col );
+	}
+	
+	public void testBug84478_3() throws Exception {
+		IASTTranslationUnit tu = parse( "void foo() { switch( int x = 4 ) { case 4: x++; break; default: break;} }", ParserLanguage.CPP ); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(  col );
+		assertNoProblemBindings( col );
+		assertSame( col.getName(1).resolveBinding(), col.getName(2).resolveBinding() );
+	}
+	public void testBug84478_4() throws Exception {
+		IASTTranslationUnit tu = parse( "void foo() { for( int i = 0; int j = 0; ++i) {} }", ParserLanguage.CPP ); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(  col );
+		assertNoProblemBindings( col );        
+	}
+	
+	// void f(){                          
+	//    if( int x = 1 )  x++;           
+	//    else             x--;           
+	//    while( int y = 2 )              
+	//       y++;                         
+	//    for( int a = 1; int b = 2; b++){ 
+	//       a++; b++;                    
+	//    }                               
+	// }                                  
+	public void testBug84478_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(  col );
+		
+		assertNoProblemBindings( col );      
+		IVariable x = (IVariable) col.getName(1).resolveBinding();
+		assertSame( x, col.getName(2).resolveBinding() );
+		assertSame( x, col.getName(3).resolveBinding() );
+		
+		IVariable y = (IVariable) col.getName(4).resolveBinding();
+		assertSame( y, col.getName(5).resolveBinding() );
+		
+		IVariable a = (IVariable) col.getName(6).resolveBinding();
+		IVariable b = (IVariable) col.getName(7).resolveBinding();
+		assertSame( b, col.getName(8).resolveBinding() );
+		assertSame( a, col.getName(9).resolveBinding() );
+		assertSame( b, col.getName(10).resolveBinding() );
+	}
+	
+	// void free(void*);         
+	// void f(char** p) {          
+	//    free(p);
+	// }                            
+	public void testBug100415() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IFunction free = (IFunction) col.getName(0).resolveBinding();
+		assertSame(free, col.getName(4).resolveBinding());
+	}
+	
+	// class X;                 
+	// void f() {               
+	//    class A {             
+	//       friend class X;    
+	//    };                    
+	// }                        
+	// namespace B {            
+	//    class A {             
+	//       friend class X;    
+	//    };                    
+	// }                        
+	public void testBug86688() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(  col );
+		
+		ICPPClassType X = (ICPPClassType) col.getName(0).resolveBinding();
+		assertNotSame( X, col.getName(3).resolveBinding() );
+		assertTrue( col.getName(3).resolveBinding() instanceof ICPPClassType );
+		assertSame( X, col.getName(6).resolveBinding() );
+	}
+	
+	// class m {                  
+	//    int m::f();             
+	// };                         
+	// int m::f(){}               
+	public void testBug100403() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(  col );
+		
+		ICPPMethod f = (ICPPMethod) col.getName(3).resolveBinding();
+		assertSame( f, col.getName(6).resolveBinding() );
+	}
+	
+	// struct A {                      
+	//    typedef int AT;              
+	//    void f1(AT);                 
+	//    void f2(float);              
+	// };                              
+	// struct B {                      
+	//    typedef float BT;            
+	//    friend void A::f1(AT);       
+	//    friend void A::f2(BT);       
+	// };                              
+	public void testBug90609() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(  col );
+		
+		ITypedef AT = (ITypedef) col.getName(1).resolveBinding();
+		ICPPMethod f1 = (ICPPMethod) col.getName(2).resolveBinding();
+		ICPPMethod f2 = (ICPPMethod) col.getName(5).resolveBinding();
+		ITypedef BT = (ITypedef) col.getName(8).resolveBinding();
+		
+		assertSame( f1, col.getName(11).resolveBinding() );
+		assertSame( AT, col.getName(12).resolveBinding() );
+		assertSame( f2, col.getName(16).resolveBinding() );
+		assertSame( BT, col.getName(17).resolveBinding() );
+	}
+	
+	// struct Except { int blah; };       
+	// void f() {                         
+	//    try { }                         
+	//    catch ( Except * e ) {          
+	//       e->blah;                     
+	//    }                               
+	// }                                  
+	public void testBug103281() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(  col );
+		
+		IField blah = (IField) col.getName(1).resolveBinding();
+		IVariable e = (IVariable) col.getName(4).resolveBinding();
+		
+		assertSame( e, col.getName(5).resolveBinding() );
+		assertSame( blah, col.getName(6).resolveBinding() );
+	}
+	
+	public void testBug78800() throws Exception {
+		parseAndCheckBindings( "class Matrix {  public: Matrix & operator *(Matrix &); }; Matrix rotate, translate; Matrix transform = rotate * translate;" ); //$NON-NLS-1$
+	}
+	
+	// struct U { static int i; };      
+	// struct V : U { };                
+	// struct W : U { using U::i; };    
+	// struct X : V, W { void foo(); }; 
+	// void X::foo() {                  
+	//    i;                            
+	// }                                
+	public void test10_2s3b() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(  col );
+		
+		ICPPField i = (ICPPField) col.getName(1).resolveBinding();
+		ICPPUsingDeclaration using = (ICPPUsingDeclaration) col.getName(6).resolveBinding();
+		IBinding[] delegates = using.getDelegates();
+		assertEquals( delegates.length, 1 );
+		assertSame( i, delegates[0]);
+		
+		assertSame( i, col.getName(16).resolveBinding() );
+	}
+	
+	// int f() {
+	// int x = 4;  while( x < 10 ) blah: ++x;
+	// }
+	public void test1043290() throws Exception {
+		IASTTranslationUnit tu = parseAndCheckBindings(getAboveComment() );
+		IASTFunctionDefinition fd = (IASTFunctionDefinition) tu.getDeclarations()[0];
+		IASTStatement [] statements = ((IASTCompoundStatement)fd.getBody()).getStatements();
+		IASTWhileStatement whileStmt = (IASTWhileStatement) statements[1];
+		IASTLabelStatement labelStmt = (IASTLabelStatement) whileStmt.getBody();
+		assertTrue( labelStmt.getNestedStatement() instanceof IASTExpressionStatement );
+		IASTExpressionStatement es = (IASTExpressionStatement) labelStmt.getNestedStatement();
+		assertTrue( es.getExpression() instanceof IASTUnaryExpression );
+	}
+	
+	// int f() { 
+	// int i;
+	// do { ++i; } while( i < 10 );
+	// return 0;
+	// }
+	public void testBug104800() throws Exception {
+		IASTTranslationUnit tu = parseAndCheckBindings( getAboveComment() );
+		IASTFunctionDefinition f = (IASTFunctionDefinition) tu.getDeclarations()[0];
+		IASTCompoundStatement body = (IASTCompoundStatement) f.getBody();
+		assertEquals( body.getStatements().length, 3 );
+	}
+	
+    public void testBug107150() throws Exception {
+    	StringBuffer buffer = new StringBuffer();
+    	buffer.append("#define FUNC_PROTOTYPE_PARAMS(list)    list\r\n"); //$NON-NLS-1$
+    	buffer.append("int func1 FUNC_PROTOTYPE_PARAMS((int arg1)){\r\n"); //$NON-NLS-1$
+    	buffer.append("return 0;\r\n"); //$NON-NLS-1$
+    	buffer.append("}\r\n"); //$NON-NLS-1$
+    	buffer.append("int func2 FUNC_PROTOTYPE_PARAMS\r\n"); //$NON-NLS-1$
+    	buffer.append("((int arg1)){\r\n"); //$NON-NLS-1$
+    	buffer.append("return 0;\r\n"); //$NON-NLS-1$
+    	buffer.append("}\r\n"); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP);
+    	assertFalse( tu.getDeclarations()[1] instanceof IASTProblemDeclaration );
+    	
+    	buffer = new StringBuffer();
+    	buffer.append("#define FUNC_PROTOTYPE_PARAMS(list)    list\n"); //$NON-NLS-1$
+    	buffer.append("int func1 FUNC_PROTOTYPE_PARAMS((int arg1)){\n"); //$NON-NLS-1$
+    	buffer.append("return 0;\n"); //$NON-NLS-1$
+    	buffer.append("}\n"); //$NON-NLS-1$
+    	buffer.append("int func2 FUNC_PROTOTYPE_PARAMS\n"); //$NON-NLS-1$
+    	buffer.append("((int arg1)){\n"); //$NON-NLS-1$
+    	buffer.append("return 0;\n"); //$NON-NLS-1$
+    	buffer.append("}\n"); //$NON-NLS-1$
+    	tu = parse(buffer.toString(), ParserLanguage.CPP);
+    	assertFalse( tu.getDeclarations()[1] instanceof IASTProblemDeclaration );
+    }
+	
+	// class __attribute__((visibility("default"))) FooClass
+	// {
+	// int foo();
+	// };
+	// int FooClass::foo() {
+	// return 0;
+	// }
+	public void testBug108202() throws Exception {
+		parse( getAboveComment(), ParserLanguage.CPP, true, true );
+	}
+	
+
+	// // Test redundant class specifiers 
+	// class MyClass {
+	// 	int MyClass::field;
+	// 	static int MyClass::static_field;
+	// };
+	// int MyClass::static_field;
+	public void testBug174791() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP, true, true );
+		
+		// check class
+		IASTSimpleDeclaration sd = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+		ICPPASTCompositeTypeSpecifier cts = (ICPPASTCompositeTypeSpecifier) sd.getDeclSpecifier();
+		
+		IASTSimpleDeclaration md = (IASTSimpleDeclaration) cts.getMembers()[0];
+		IASTName name = md.getDeclarators()[0].getName();
+		IField field = (IField) name.resolveBinding();
+		// would crash and/or return wrong result
+		assertFalse(field.isStatic());
+		assertFalse(field.isExtern());
+		assertFalse(field.isAuto());
+		assertFalse(field.isRegister());
+		
+		md = (IASTSimpleDeclaration) cts.getMembers()[1];
+		name = md.getDeclarators()[0].getName();
+		field = (IField) name.resolveBinding();
+		// would crash
+		assertTrue(field.isStatic());
+		assertFalse(field.isExtern());
+		assertFalse(field.isAuto());
+		assertFalse(field.isRegister());
+		
+		// check real static defn
+		sd = (IASTSimpleDeclaration) tu.getDeclarations()[1];
+		name = sd.getDeclarators()[0].getName();
+		field = (IField) name.resolveBinding();
+		assertTrue(field.isStatic());
+	}
+	
+	// namespace nsSplit {}
+	// namespace nsSplit {
+	//    void a();
+	// }
+	// void nsSplit::a() {
+	// }
+	public void testBug180979() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP, true, true );
+		
+		// check class
+		IASTFunctionDefinition fd = (IASTFunctionDefinition) tu.getDeclarations()[2];
+		IASTDeclarator fdecl= fd.getDeclarator();
+		IASTName name= fdecl.getName();
+		IBinding binding= name.resolveBinding();
+		assertTrue(binding instanceof IFunction);
+		assertFalse(binding instanceof IProblemBinding);
+	}
+	
+	// #define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V)))
+	// #define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY(default) {
+	// _GLIBCXX_BEGIN_NAMESPACE(std)
+	// } // end the namespace
+	public void testBug195701() throws Exception {
+		parse( getAboveComment(), ParserLanguage.CPP, true, true );
+	}
+	
+	// class A {                      
+	//    double operator*(const A&); 
+	// };                             
+	// class B : public A {           
+	//    double operator*(double);   
+	//    using A::operator*;         
+	// };                             
+	public void testBug178059() throws Exception {
+		parse( getAboveComment(), ParserLanguage.CPP, true, true );
+	}
+	
+	// void foo (void *p) throw () ;                                   
+	// void bar (void *p) __attribute__ (( __nonnull__(1) ));          
+	// void zot (void *p) throw () __attribute__ (( __nonnull__(1) )); 
+	public void testBug179712() throws Exception {
+		parse( getAboveComment(), ParserLanguage.CPP, true, true );
+	}
+	
+	//	class C {
+	//	public:
+	//		int i;
+	//	};
+	//
+	//	void problem1(int x) {}
+	//	void problem2(const int *x) {}
+	//	void problem3(int* x) {}
+	//
+	//	void nonproblem1(bool x) {}
+	//	void problem4(bool* x) {}
+	//	void problem5(const bool* x) {}
+	//
+	//	void f() {
+	//		int C::* ptm;
+	//
+	//		problem1("p");
+	//		problem2("p");
+	//		problem3("p");
+	//		nonproblem1("p");
+	//		problem4("p");
+	//		problem5("p");
+	//
+	//		problem1(ptm);
+	//		problem2(ptm);
+	//		problem3(ptm);
+	//		nonproblem1(ptm);
+	//		problem4(ptm);
+	//		problem5(ptm);
+	//	}
+	public void testBug214335() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		
+		IBinding b00= bh.assertProblem("problem1(\"", 8);
+		IBinding b01= bh.assertProblem("problem2(\"", 8);
+		IBinding b02= bh.assertProblem("problem3(\"", 8);
+		IBinding b03= bh.assertNonProblem("nonproblem1(\"", 11);
+		IBinding b04= bh.assertProblem("problem4(\"", 8);
+		IBinding b05= bh.assertProblem("problem5(\"", 8);
+		
+		IBinding b06= bh.assertProblem("problem1(ptm", 8);
+		IBinding b07= bh.assertProblem("problem2(ptm", 8);
+		IBinding b08= bh.assertProblem("problem3(ptm", 8);
+		IBinding b09= bh.assertNonProblem("nonproblem1(ptm", 11);
+		IBinding b10= bh.assertProblem("problem4(ptm", 8);
+		IBinding b11= bh.assertProblem("problem5(ptm", 8);
+		
+		assertInstance(b03, ICPPFunction.class);
+		assertInstance(b09, ICPPFunction.class);
+	}
+	
+	//	namespace source {
+	//		class cls {
+	//		};
+	//		void fs();
+	//		void fs(int a);
+	//		
+	//	}
+	//  void test1() {
+	//		source::fs();
+	//		source::fs(1);
+	//		source::cls c2;
+	//  }
+	//
+	//	using source::cls;
+	//	using source::fs;
+	//
+	//	void test() {
+	//		cls c2;
+	//		fs();
+	//		fs(1);
+	//	}
+	public void testReferencesOfUsingDecls() throws Exception {
+		IASTTranslationUnit tu = parse( getAboveComment(), ParserLanguage.CPP, true, true );
+		
+		IASTDeclaration[] decls = tu.getDeclarations();
+		ICPPASTNamespaceDefinition nsdef= (ICPPASTNamespaceDefinition) decls[0];
+		ICPPASTUsingDeclaration udcl= (ICPPASTUsingDeclaration) decls[2];
+		ICPPASTUsingDeclaration udf= (ICPPASTUsingDeclaration) decls[3];
+		IASTFunctionDefinition fdef= (IASTFunctionDefinition) decls[4];
+		
+		IASTDeclaration[] nsdecls= nsdef.getDeclarations();
+		ICPPASTCompositeTypeSpecifier cldef= (ICPPASTCompositeTypeSpecifier) ((IASTSimpleDeclaration) nsdecls[0]).getDeclSpecifier();
+		ICPPASTFunctionDeclarator fdecl1= (ICPPASTFunctionDeclarator) ((IASTSimpleDeclaration) nsdecls[1]).getDeclarators()[0];
+		ICPPASTFunctionDeclarator fdecl2= (ICPPASTFunctionDeclarator) ((IASTSimpleDeclaration) nsdecls[2]).getDeclarators()[0];
+		
+		IASTStatement[] stmts= ((IASTCompoundStatement) fdef.getBody()).getStatements();
+		IASTName clname= ((IASTNamedTypeSpecifier) ((IASTSimpleDeclaration)((IASTDeclarationStatement) stmts[0]).getDeclaration()).getDeclSpecifier()).getName();
+		IASTName fnname1= ((IASTIdExpression) ((IASTFunctionCallExpression) ((IASTExpressionStatement) stmts[1]).getExpression()).getFunctionNameExpression()).getName();
+		IASTName fnname2= ((IASTIdExpression) ((IASTFunctionCallExpression) ((IASTExpressionStatement) stmts[2]).getExpression()).getFunctionNameExpression()).getName();
+		
+		// check class
+		IBinding b= cldef.getName().resolveBinding();
+		assertEquals(3, tu.getReferences(b).length);			// 2 refs + using-decl
+		assertEquals(2, tu.getDefinitionsInAST(b).length);		// class-def + using-decl
+		assertEquals(2, tu.getDeclarationsInAST(b).length);		// class-def + using-decl
+		
+		// check functions
+		b= fdecl1.getName().resolveBinding();
+		assertEquals(3, tu.getReferences(b).length);			// 2 refs + using-decl
+		assertEquals(1, tu.getDefinitionsInAST(b).length);		// using-decl
+		assertEquals(2, tu.getDeclarationsInAST(b).length);		// func-decl + using-decl
+		b= fdecl2.getName().resolveBinding();
+		assertEquals(3, tu.getReferences(b).length);			// 2 refs + using-decl
+		assertEquals(1, tu.getDefinitionsInAST(b).length);		// using-decl
+		assertEquals(2, tu.getDeclarationsInAST(b).length);		// func-decl + using-decl
+		
+		// check using declaration class
+		b= udcl.getName().resolveBinding();
+		assertEquals(3, tu.getReferences(b).length);			// 2 refs + using-decl
+		assertEquals(2, tu.getDefinitionsInAST(b).length);		// class-def + using-decl
+		assertEquals(2, tu.getDeclarationsInAST(b).length);		// class-def + using-decl
+		
+		// check using declaration function
+		b= udf.getName().resolveBinding();
+		assertEquals(5, tu.getReferences(b).length);			// 4 refs + using-decl
+		assertEquals(1, tu.getDefinitionsInAST(b).length);		// using-decl
+		assertEquals(3, tu.getDeclarationsInAST(b).length);		// using-decl + 2 func-decls
+		
+		// check class reference
+		b= clname.resolveBinding();
+		assertEquals(3, tu.getReferences(b).length);			// 2 refs + using-decl
+		assertEquals(2, tu.getDefinitionsInAST(b).length);		// class-def + using-decl
+		assertEquals(2, tu.getDeclarationsInAST(b).length);		// class-def + using-decl
+		
+		// check function references
+		b= fnname1.resolveBinding();							
+		assertEquals(3, tu.getReferences(b).length);			// 2 refs + using-decl
+		assertEquals(1, tu.getDefinitionsInAST(b).length);		// using-decl
+		assertEquals(2, tu.getDeclarationsInAST(b).length);		// using-decl + func-decl
+		b= fnname2.resolveBinding();
+		assertEquals(3, tu.getReferences(b).length);			// 2 refs + using-decl
+		assertEquals(1, tu.getDefinitionsInAST(b).length);		// using-decl
+		assertEquals(2, tu.getDeclarationsInAST(b).length);		// using-decl + func-decl
+	}
+	
+	// namespace x {
+	//    int a;
+	// }
+	// using namespace x;
+	// class O {
+	//    class I {
+	//       void f();
+	//    };
+	// };
+	// void O::I::f() {
+	//    a=0;
+	// }
+	public void testUsingDirectiveWithNestedClass_Bug209582() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		
+		IBinding b= bh.assertNonProblem("a=", 1);
+		assertEquals("x", b.getScope().getScopeName().toString());
+	}
+	
+	// class Test {
+	// public:
+	//    Test(int, int *) {}
+	//    Test(int *) {}
+	// };
+	// void test () {
+	//    int bar= 0;
+	//    int * pBar = &bar;
+	//    Test foo1 (bar, &bar);
+	//    Test foo2 (bar, pBar);
+	//    Test foo3 (&bar); 
+	// }   
+	public void testCastAmbiguity_Bug211756() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		
+		bh.assertNonProblem("foo1", 4);
+		bh.assertNonProblem("foo2", 4);
+		bh.assertNonProblem("foo3", 4);
+	}
+	
+	// int foo2() {
+	//   int relayIndex = -1;
+	//   int numRelays = 0;
+	//	 if( relayIndex < 0 || relayIndex > numRelays )
+	//	    return 0;
+	// }
+	public void testTemplateIDAmbiguity_Bug104706() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		
+		bh.assertNonProblem("relayIndex <", 10);
+		bh.assertNonProblem("relayIndex >", 10);
+		bh.assertNonProblem("numRelays )", 9);
+	}
+
+	//	template<typename A, typename B>
+	//	struct and_ : public integral_constant<bool, (A::value && B::value)> {
+	//	};
+	//	template<typename A, typename B>
+	//	struct or_ : public integral_constant<bool, (A::value || B::value)> {
+	//	};
+	//	template <class T> struct is_pod
+	//	 : integral_constant<bool, (is_integral<T>::value ||
+	//	                            is_floating_point<T>::value ||
+	//	                            is_pointer<T>::value)> { };
+	//
+	//	typedef base::integral_constant<bool,
+	//	    (base::has_trivial_copy<value_type>::value &&
+	//	    base::has_trivial_destructor<value_type>::value)>
+	//	    realloc_ok;
+	public void testTemplateIDAmbiguity_Bug228118() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP);
+	}
+
+	// namespace ns {
+	//    class cl {};
+	//    void func(cl c);
+	// }
+	// using ns::cl;
+	// void test() {
+	//    ns::cl qualified;
+	//    cl unqualified;
+	//    func(qualified);
+	//    func(unqualified);
+	// }
+	public void testScopeOfUsingDelegates_Bug219424() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		
+		bh.assertNonProblem("cl c", 2);
+		bh.assertNonProblem("func(qualified)", 4);
+		bh.assertNonProblem("func(unqualified)", 4);
+	}
+	
+	
+	// class Test {
+	//    void Test::member1();
+	//    void Test::member2() {};
+	// };
+	// void Test::member1(){
+	//    member2();
+	// }
+	public void testQualifiedMemberDeclaration_Bug222026() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		
+		IBinding b= bh.assertNonProblem("member1", 7);
+		IBinding b2= bh.assertNonProblem("member1(){", 7);
+		assertTrue(b instanceof ICPPMethod);
+		ICPPMethod m1= (ICPPMethod) b;
+		assertEquals("member1", m1.getName());
+		assertEquals("Test", m1.getScope().getScopeName().toString());
+		assertSame(b, b2);
+		
+		bh= new BindingAssertionHelper(code, true);
+		b= bh.assertNonProblem("member2", 7);
+		b2= bh.assertNonProblem("member2();", 7);
+		assertTrue(b instanceof ICPPMethod);
+		m1= (ICPPMethod) b;
+		assertEquals("member2", m1.getName());
+		assertEquals("Test", m1.getScope().getScopeName().toString());
+		assertSame(b, b2);
+		
+		// different resolution order
+		bh= new BindingAssertionHelper(code, true);
+		b2= bh.assertNonProblem("member1(){", 7);
+		b= bh.assertNonProblem("member1", 7);
+		assertTrue(b instanceof ICPPMethod);
+		m1= (ICPPMethod) b;
+		assertEquals("member1", m1.getName());
+		assertEquals("Test", m1.getScope().getScopeName().toString());
+		assertSame(b, b2);
+		
+		bh= new BindingAssertionHelper(code, true);
+		b2= bh.assertNonProblem("member2();", 7);
+		b= bh.assertNonProblem("member2", 7);
+		assertTrue(b instanceof ICPPMethod);
+		m1= (ICPPMethod) b;
+		assertEquals("member2", m1.getName());
+		assertEquals("Test", m1.getScope().getScopeName().toString());
+		assertSame(b, b2);
+	}
+	
+	// namespace Test {
+	//    void Test::member1();
+	//    void Test::member2() {};
+	// }
+	// void Test::member1(){
+	//    member2();
+	// }
+	public void testQualifiedMemberDeclarationInNamespace_Bug222026() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		
+		IBinding b= bh.assertNonProblem("member1", 7);
+		IBinding b2= bh.assertNonProblem("member1(){", 7);
+		assertTrue(b instanceof ICPPFunction);
+		ICPPFunction m1= (ICPPFunction) b;
+		assertEquals("member1", m1.getName());
+		assertEquals("Test", m1.getScope().getScopeName().toString());
+		assertSame(b, b2);
+		
+		bh= new BindingAssertionHelper(code, true);
+		b= bh.assertNonProblem("member2", 7);
+		b2= bh.assertNonProblem("member2();", 7);
+		assertTrue(b instanceof ICPPFunction);
+		m1= (ICPPFunction) b;
+		assertEquals("member2", m1.getName());
+		assertEquals("Test", m1.getScope().getScopeName().toString());
+		assertSame(b, b2);
+		
+		// different resolution order
+		bh= new BindingAssertionHelper(code, true);
+		b2= bh.assertNonProblem("member1(){", 7);
+		b= bh.assertNonProblem("member1", 7);
+		assertTrue(b instanceof ICPPFunction);
+		m1= (ICPPFunction) b;
+		assertEquals("member1", m1.getName());
+		assertEquals("Test", m1.getScope().getScopeName().toString());
+		assertSame(b, b2);
+		
+		bh= new BindingAssertionHelper(code, true);
+		b2= bh.assertNonProblem("member2();", 7);
+		b= bh.assertNonProblem("member2", 7);
+		assertTrue(b instanceof ICPPFunction);
+		m1= (ICPPFunction) b;
+		assertEquals("member2", m1.getName());
+		assertEquals("Test", m1.getScope().getScopeName().toString());
+		assertSame(b, b2);
+	}
+	
+	// namespace ns { typedef int ns::TINT; } // illegal, still no CCE is expected.
+	public void testQualifiedTypedefs_Bug222093() throws Exception{
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		IBinding td= bh.assertProblem("TINT", 4);
+		bh.assertProblem("ns::", 2);
+	}
+	
+	// void func() {  
+	// int a, b;
+	// a < b || (a==b && a < b);
+	//   if (a > b) {
+	//   }
+	// }
+	public void testResettingTemplateIdScopesStack_Bug223777() throws Exception{
+		parseAndCheckBindings(getAboveComment());
+	}
+	
+	// long x= 10L;
+	public void testLongLiteral_225534() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		IASTDeclarator decltor= ((IASTSimpleDeclaration)tu.getDeclarations()[0]).getDeclarators()[0];
+		IASTInitializerExpression init= (IASTInitializerExpression) decltor.getInitializer();
+		ICPPASTLiteralExpression exp= (ICPPASTLiteralExpression) init.getExpression();
+		ICPPBasicType type= (ICPPBasicType) exp.getExpressionType();
+		assertTrue(type.isLong());
+	}
+	
+	//	void foo/*_a*/(int x) {}
+	//	void foo/*_b*/(unsigned int) {}
+	//	void foo/*_c*/(short x) {}
+	//	void foo/*_d*/(unsigned short x) {}
+	//	void foo/*_e*/(long x) {}
+	//	void foo/*_f*/(unsigned long x) {}
+	//	void foo/*_g*/(long long x) {}
+	//	void foo/*_h*/(unsigned long long x) {}
+	//	void foo/*_i*/(float x) {}
+	//	void foo/*_j*/(double x) {}
+	//	void foo/*_k*/(long double x) {}
+	//
+	//	int main() {
+	//		foo/*a1*/(1);
+	//		foo/*a2*/(010);
+	//		foo/*a3*/(0x010);
+	//
+	//		foo/*b1*/(1U);
+	//		foo/*b2*/(010U);
+	//		foo/*b3*/(0x010U);
+	//
+	//      /*c*/ /*d*/
+	// 
+	//		foo/*e1*/(1L);
+	//		foo/*e2*/(010L);
+	//		foo/*e3*/(0x010L);
+	//
+	//		foo/*f1*/(1UL);
+	//		foo/*f2*/(010UL);
+	//		foo/*f3*/(0x010UL);
+	//
+	//		foo/*g1*/(100000000000000000LL);
+	//		foo/*g2*/(0100000000000LL);
+	//		foo/*g3*/(0x01000000000LL);
+	//
+	//		foo/*h1*/(100000000000000000ULL);
+	//		foo/*h2*/(0100000000000ULL);
+	//		foo/*h3*/(0x01000000000ULL);
+	//
+	//		foo/*i1*/(11.1F);
+	//		foo/*i2*/(11E1F);
+	//		
+	//		foo/*j1*/(11.1);
+	//		foo/*j2*/(11.1E1);
+	//		
+	//		foo/*k1*/(11.1L);
+	//		foo/*k2*/(11.1E1L);
+	//	}
+	public void testLiteralsViaOverloads_225534() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		char[] cs= {'a','b','e','f','g','h','i','j','k'};
+		for(char c : cs) {
+			for(int i=1; i<(c < 'i' ? 4 : 3); i++) {
+				ICPPFunction def= ba.assertNonProblem("foo/*_"+c+"*/", 3, ICPPFunction.class);
+				ICPPFunction ref= ba.assertNonProblem("foo/*"+c+""+i+"*/", 3, ICPPFunction.class);
+				assertSame("function ref: "+c+""+i, def, ref);
+			}
+		}
+	}
+	
+	//	class A {
+	//		public:
+	//			void doA() {}
+	//	};
+	//
+	//	class FirstLevelProxy {
+	//		public:
+	//			A* operator->() {A *a = new A(); return a;} // leaky
+	//			void doFLP() {}
+	//	};
+	//
+	//	class SecondLevelProxy {
+	//		public:
+	//			FirstLevelProxy operator->() {FirstLevelProxy p; return p;}
+	//			void doSLP() {}
+	//	};
+	//
+	//	int main(int argc, char **argv) {
+	//		SecondLevelProxy p2;
+	//		p2->doA();
+	//	}
+	public void testRecursiveUserDefinedFieldAccess_Bug205964() throws Exception {
+		parseAndCheckBindings(getAboveComment());
+	}
+
+	// namespace ns {
+	// class A {};
+	// }
+	//
+	// using ns::A;
+	//
+	// class B: public A {};
+	public void testBug235196() throws Exception {
+		parseAndCheckBindings(getAboveComment());
+	}
+	
+	// typedef int tint;
+	// class X {
+	//   typedef int xtint;
+	//	 X();
+	//	 ~X();
+	//	 operator int ();
+	//	 tint(a); // 1
+	// };
+	// X::X() {}
+	// X::~X() {}
+	// X::operator int() {}
+	// X::xtint(a); // 2
+	public void testEmptyDeclSpecifier() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("X {", 1, ICPPClassType.class);
+		ba.assertNonProblem("X()", 1, ICPPConstructor.class);
+		ba.assertNonProblem("~X", 2, ICPPMethod.class);
+		ba.assertNonProblem("operator int", 12, ICPPMethod.class);
+		ba.assertNonProblem("a); // 1", 1, ICPPField.class);
+
+		ba.assertNonProblem("X() {}", 1, ICPPConstructor.class);
+		ba.assertNonProblem("~X() {}", 2, ICPPMethod.class);
+		ba.assertNonProblem("operator int() {}", 12, ICPPMethod.class);
+		ba.assertNonProblem("a); // 2", 1, ICPPVariable.class);
+	}
+
+	// void* operator new (unsigned int, int[100]);
+	// typedef int T;
+	// int p[100]; 
+	// void test(int f) {
+	//	  new T; 
+	//    new T();
+	//    new T(f);
+	//    new (p) T; 
+	//    new (p) T();
+	//    new (p) T(f);
+	//	  new (T); 
+	//    new (T)();
+	//    new (T)(f);
+	//    new (p) (T); 
+	//    new (p) (T)();
+	//    new (p) (T)(f);
+	//	  new T[f][f]; 
+	//    new (p) T[f][f]; 
+	//	  new (T[f][f]); 
+	//    new (p) (T[f][f]); 
+	// };
+	public void testNewPlacement() throws Exception {
+		IASTTranslationUnit tu= parseAndCheckBindings(getAboveComment());
+		IASTFunctionDefinition fdef= getDeclaration(tu, 3);
+		
+		checkNewExpression(fdef, 0, null, "int", null);
+		checkNewExpression(fdef, 1, null, "int", IASTExpressionList.class);
+		checkNewExpression(fdef, 2, null, "int", IASTIdExpression.class);
+		checkNewExpression(fdef, 3, IASTIdExpression.class, "int", null);
+		checkNewExpression(fdef, 4, IASTIdExpression.class, "int", IASTExpressionList.class);
+		checkNewExpression(fdef, 5, IASTIdExpression.class, "int", IASTIdExpression.class);
+		checkNewExpression(fdef, 6, null, "int", null);
+		checkNewExpression(fdef, 7, null, "int", IASTExpressionList.class);
+		checkNewExpression(fdef, 8, null, "int", IASTIdExpression.class);
+		checkNewExpression(fdef, 9, IASTIdExpression.class, "int", null);
+		checkNewExpression(fdef, 10, IASTIdExpression.class, "int", IASTExpressionList.class);
+		checkNewExpression(fdef, 11, IASTIdExpression.class, "int", IASTIdExpression.class);
+
+		checkNewExpression(fdef, 12, null, "int [] []", null);
+		checkNewExpression(fdef, 13, IASTIdExpression.class, "int [] []", null);
+		checkNewExpression(fdef, 14, null, "int [] []", null);
+		checkNewExpression(fdef, 15, IASTIdExpression.class, "int [] []", null);
+	}
+
+	private void checkNewExpression(IASTFunctionDefinition fdef, int i_expr, Class<?> placement, String type, Class<?> init) {
+		IASTExpression expr;
+		ICPPASTNewExpression newExpr;
+		expr= getExpressionOfStatement(fdef, i_expr);
+		assertInstance(expr, ICPPASTNewExpression.class);
+		newExpr= (ICPPASTNewExpression) expr;
+		if (placement == null) {
+			assertNull(newExpr.getNewPlacement());
+		} else {
+			assertInstance(newExpr.getNewPlacement(), placement);
+		}
+		if (init == null) {
+			assertNull(newExpr.getNewInitializer());
+		} else {
+			assertInstance(newExpr.getNewInitializer(), init);
+		}
+		isTypeEqual(CPPVisitor.createType(newExpr.getTypeId()), type);
+	}
+	
+    // namespace ns {
+    //   void test() {}
+    //   +
+    // }
+    public void testTrailingSyntaxErrorInNamespace() throws Exception {
+    	final String comment= getAboveComment();
+    	IASTTranslationUnit tu= parse(comment, ParserLanguage.CPP, false, false);
+    	ICPPASTNamespaceDefinition ns= getDeclaration(tu, 0);
+		IASTDeclaration decl= getDeclaration(ns, 0);
+		IASTProblemDeclaration pdecl= getDeclaration(ns, 1);
+		assertEquals("+", pdecl.getRawSignature());
+    }
+
+    // extern "C" {
+    //   void test() {}
+    //   +
+    // }
+    public void testTrailingSyntaxErrorInLinkageSpec() throws Exception {
+    	final String comment= getAboveComment();
+    	IASTTranslationUnit tu= parse(comment, ParserLanguage.CPP, false, false);
+    	ICPPASTLinkageSpecification ls= getDeclaration(tu, 0);
+		IASTDeclaration decl= getDeclaration(ls, 0);
+		IASTProblemDeclaration pdecl= getDeclaration(ls, 1);
+		assertEquals("+", pdecl.getRawSignature());
+    }
+    
+    // class C;
+    // void func(void (C::*m)(int) const);
+    public void test233889_a() throws Exception {
+    	BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction func= bh.assertNonProblem("func(", 4, ICPPFunction.class);
+		assertEquals(1,func.getParameters().length);
+		IType type= func.getParameters()[0].getType();
+		ICPPPointerToMemberType ptm= assertInstance(type, ICPPPointerToMemberType.class);
+		ICPPFunctionType t= ((ICPPFunctionType)ptm.getType());
+		assertTrue(t.isConst());
+    }
+    
+	//	 struct C {
+	//		 int m1(int a);
+	//		 int m2(int a) const;
+	//	 }; 
+	//
+	//	 C* func(int (C::*m)(int) const);
+	//	 C* func(int (C::*m)(int));
+	//
+	//	 void ref() {
+	//		 func(&C::m1);
+	//		 func(&C::m2);
+	//	 }
+    public void testBug233889_b() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction fn1= bh.assertNonProblem("func(&C::m1", 4, ICPPFunction.class);
+		ICPPFunction fn2= bh.assertNonProblem("func(&C::m2", 4, ICPPFunction.class);
+		assertNotSame(fn1, fn2);
+    }
+    
+    //	class A;
+	//
+	//	void foo(A* a) {}
+	//	void foo(const A* a) {}
+	//	void foo(volatile A* a) {}
+	//	void foo(const volatile A* a) {}
+	//
+	//	class A {
+	//	public:
+	//		void member1() { foo(this);/*1*/ }
+	//		void member2() const { foo(this);/*2*/ }
+	//		void member3() volatile { foo(this);/*3*/ }
+	//		void member4() const volatile { foo(this);/*4*/ }
+	//	};
+	public void testThisType() throws Exception {
+		BindingAssertionHelper ba=new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction pt1= ba.assertNonProblem("foo(this);/*1*/", 3, ICPPFunction.class);
+		ICPPFunction pt2= ba.assertNonProblem("foo(this);/*2*/", 3, ICPPFunction.class);
+		ICPPFunction pt3= ba.assertNonProblem("foo(this);/*3*/", 3, ICPPFunction.class);
+		ICPPFunction pt4= ba.assertNonProblem("foo(this);/*4*/", 3, ICPPFunction.class);
+		
+		IType t1= ((IPointerType)pt1.getType().getParameterTypes()[0]).getType();
+		IQualifierType t2= (IQualifierType) ((IPointerType) pt2.getType().getParameterTypes()[0]).getType();
+		IQualifierType t3= (IQualifierType)((IPointerType) pt3.getType().getParameterTypes()[0]).getType();
+		IQualifierType t4= (IQualifierType)((IPointerType) pt4.getType().getParameterTypes()[0]).getType();
+		
+		assertTrue(!(t1 instanceof IQualifierType));
+		assertTrue(t2.isConst()); assertTrue(!t2.isVolatile());
+		assertTrue(!t3.isConst()); assertTrue(t3.isVolatile());
+		assertTrue(t4.isConst()); assertTrue(t4.isVolatile());
+	}
+	
+	//	class A {
+	//		public:
+	//			void foo() {}
+	//	};
+	//
+	//	void ref() {
+	//		A a1= *new A();
+	//		a1->foo();/*1*/
+	//      A* a2= new A();
+	//      a2->foo();/*2*/
+	//	}
+	public void testMemberAccessOperator_a() throws Exception {
+		BindingAssertionHelper ba=new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertProblem("foo();/*1*/", 3);
+		ba.assertNonProblem("foo();/*2*/", 3);
+	}
+	
+	//	class A {
+	//		public:
+	//			void foo() {};
+	//	};
+	//
+	//	class B {
+	//		public:
+	//			void foo() {};
+	//			A* operator->() {return new A();}
+	//	};
+	//
+	//	void ref() {
+	//		B b= *new B();
+	//		b->foo();/*1*/
+	//		B* b2= new B();
+	//		b2->foo();/*2*/
+	//	}
+	public void testMemberAccessOperator_b() throws Exception {
+		BindingAssertionHelper ba=new BindingAssertionHelper(getAboveComment(), true);
+		ICPPMethod m1= ba.assertNonProblem("foo();/*1*/", 3, ICPPMethod.class);
+		ICPPMethod m2= ba.assertNonProblem("foo();/*2*/", 3, ICPPMethod.class);
+		assertEquals(m1.getClassOwner().getName(), "A");
+		assertEquals(m2.getClassOwner().getName(), "B");
+	}
+	
+	//	class A { public: void foo(); };
+	//	class B { public: A* operator->() {return  new A();} };
+	//	class C { public: B  operator->() {return *new B();} };
+	//
+	//	void ref() {
+	//	   C c;
+	//	   c->foo();/**/ // refers to A::foo
+	//	}
+	public void testMemberAccessOperator_c() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("foo();/**/", 3);
+	}
+	
+	//	class A { public: void foo(); };
+	//	class B { public: A* operator->() {return  new A();} };
+	//	class C { public: B* operator->() {return new B();} };
+	//
+	//	void ref() {
+	//	   C c;
+	//	   c->foo();/**/ // expect problem - foo is not in B
+	//	}
+	public void testMemberAccessOperator_d() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertProblem("foo();/**/", 3);
+	}
+	
+	//	class A { public: void foo(); };
+	//  typedef A A2;
+	//	class B { public: A2* operator->() {return  new A();} };
+	//  typedef B B2;
+	//	class C { public: B2 operator->() {return *new B();} };
+	//
+	//  typedef C C2;
+	//	void ref() {
+	//	   C2 c;
+	//	   c->foo();/**/ // refers to A::foo
+	//	}
+	public void testMemberAccessOperator_e() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("foo();/**/", 3);
+	}
+	
+	//  namespace std {class type_info{public: const char* name() const;};}
+	//	int main() {
+	//		int s;
+	//		typeid(int).name();
+	//		typeid(s).name();
+	//	}
+	public void testTypeid_Bug209578() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+	}
+
+	//	typedef int int5[5];
+	//
+	//	void f1(int* x);
+	//	void f2(int** x);
+	//	void f3(int5 x);
+	//	void f4(int5* x);
+	//
+	//	void test(int5 p, int5* q, int* r, int** s) {
+	//	  f1(p);
+	//	  f2(q);
+	//	  f3(r);
+	//	  f4(s);
+	//	}
+	public void testArrayToPointerConversion() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("f1(p)", 2, ICPPFunction.class);
+		ba.assertProblem("f2(q)", 2);
+		ba.assertNonProblem("f3(r)", 2, ICPPFunction.class);
+		ba.assertProblem("f4(s)", 2);
+	}
+
+	//	typedef char* t1;
+	//	typedef char t2[8];
+	//  typedef char* charp;
+	//	void test(charp x) {}
+	//	int main(void) {  
+	//		char x[12];
+	//		t1 y;
+	//		t2 z;
+	//		test(x);
+	//		test(y);
+	//		test(z);
+	//	}
+	public void testArrayToPtrConversionForTypedefs_Bug239931() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+	}
+
+	//	typedef char t[12];
+	//	void test1(char *);
+	//	void test2(char []);
+	//	void test3(t);
+	//	void xx() {
+	//	   char* x= 0;
+	//	   test1(x);
+	//	   test2(x); // problem binding here
+	//	   test3(x); // problem binding here
+	//	}
+	public void testAdjustmentOfParameterTypes_Bug239975() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+	}
+
+	//	class A {
+	//		public:
+	//			void m(int c);
+	//	};
+	//
+	//	void test(char c) {
+	//		void (A::* ptr2mem)(char);
+	//		ptr2mem= reinterpret_cast<void (A::*)(char)>(&A::m);
+	//      ptr2mem= (void (A::*)(int))(0); 
+	//	}
+	public void testTypeIdForPtrToMember_Bug242197() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+	}
+	
+	// void restrict();
+	public void testRestrictIsNoCPPKeyword_Bug228826() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP, false);
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP, true);  // even with gnu extensions
+	}
+	
+	// void test1();
+	// void test2() throw ();
+	// void test3() throw (int);
+	public void testEmptyExceptionSpecification_Bug86943() throws Exception {
+		IASTTranslationUnit tu= parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+
+		IASTSimpleDeclaration d= getDeclaration(tu, 0);
+		ICPPASTFunctionDeclarator fdtor= (ICPPASTFunctionDeclarator) d.getDeclarators()[0];
+		IASTTypeId[] specs= fdtor.getExceptionSpecification();
+		assertEquals(0, specs.length);
+		assertSame(ICPPASTFunctionDeclarator.NO_EXCEPTION_SPECIFICATION, specs);
+
+		d= getDeclaration(tu, 1);
+		fdtor= (ICPPASTFunctionDeclarator) d.getDeclarators()[0];
+		specs= fdtor.getExceptionSpecification();
+		assertEquals(0, specs.length);
+		assertNotSame(ICPPASTFunctionDeclarator.NO_EXCEPTION_SPECIFICATION, specs);
+
+		d= getDeclaration(tu, 2);
+		fdtor= (ICPPASTFunctionDeclarator) d.getDeclarators()[0];
+		specs= fdtor.getExceptionSpecification();
+		assertEquals(1, specs.length);
+	}
+	
+	//	int test() {
+	//		try {
+	//		} catch (const int &ex) {
+	//		} catch (const char &ex) {
+	//		}
+	//	}
+	public void testScopeOfCatchHandler_Bug209579() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+	}
+
+	//	void func(const char& c);
+	//	void func(char& c);
+	//
+	//	void test(const char& x, char& y) {
+	//	  func(x);
+	//	  func(y);
+	//	}
+	public void testOverloadedFunction_248774() throws Exception {
+		BindingAssertionHelper helper= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction func1= helper.assertNonProblem("func(x)", 4, ICPPFunction.class);
+		ICPPFunction func2= helper.assertNonProblem("func(y)", 4, ICPPFunction.class);
+		assertNotSame(func1, func2);
+	}
+
+	//	struct A {
+	//	  const char& operator[](int pos) const;
+	//	  char& operator[](int pos);
+	//	};
+	//	
+	//	void func(const char& c);
+	//	void func(char& c);
+	//
+	//	void test(const A& x, A& y) {
+	//	  func(x[0]);
+	//	  func(y[0]);
+	//	}
+	public void testOverloadedOperator_248803() throws Exception {
+		BindingAssertionHelper helper= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction func1= helper.assertNonProblem("func(x[0])", 4, ICPPFunction.class);
+		ICPPFunction func2= helper.assertNonProblem("func(y[0])", 4, ICPPFunction.class);
+		assertNotSame(func1, func2);
+	}
+	
+	// class NonVirt {
+	//    void m();//0
+	// };
+	// class C1 : NonVirt {
+	//    virtual void m();//1
+	// };
+	// class C2 : C1 {
+	//    void m();//2
+	// };
+	// class C3 : C2 {
+	//    void m(int);
+	// };
+	// class C4 : C3 {
+	//    void m();//4
+	// };
+	// class C5 : C1 {
+	//    void m();//5
+	// };	
+	public void testOverridden_248846() throws Exception {
+		BindingAssertionHelper helper= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPMethod m0= helper.assertNonProblem("m();//0", 1, ICPPMethod.class);
+		ICPPMethod m1= helper.assertNonProblem("m();//1", 1, ICPPMethod.class);
+		ICPPMethod m2= helper.assertNonProblem("m();//2", 1, ICPPMethod.class);
+		ICPPMethod m3= helper.assertNonProblem("m(int);", 1, ICPPMethod.class);
+		ICPPMethod m4= helper.assertNonProblem("m();//4", 1, ICPPMethod.class);
+		ICPPMethod m5= helper.assertNonProblem("m();//5", 1, ICPPMethod.class);
+		
+		assertFalse(ClassTypeHelper.isVirtual(m0));
+		assertFalse(ClassTypeHelper.isVirtual(m3));
+		assertTrue(ClassTypeHelper.isVirtual(m1));
+		assertTrue(ClassTypeHelper.isVirtual(m2));
+		assertTrue(ClassTypeHelper.isVirtual(m4));
+		assertTrue(ClassTypeHelper.isVirtual(m5));
+		
+		assertFalse(ClassTypeHelper.isOverrider(m0, m0));
+		assertFalse(ClassTypeHelper.isOverrider(m1, m0));
+		assertFalse(ClassTypeHelper.isOverrider(m2, m0));
+		assertFalse(ClassTypeHelper.isOverrider(m3, m0));
+		assertFalse(ClassTypeHelper.isOverrider(m4, m0));
+		assertFalse(ClassTypeHelper.isOverrider(m5, m0));
+
+		assertFalse(ClassTypeHelper.isOverrider(m0, m1));
+		assertFalse(ClassTypeHelper.isOverrider(m1, m1));
+		assertFalse(ClassTypeHelper.isOverrider(m3, m1));
+		assertTrue(ClassTypeHelper.isOverrider(m2, m1));
+		assertTrue(ClassTypeHelper.isOverrider(m4, m1));
+		assertTrue(ClassTypeHelper.isOverrider(m5, m1));
+
+		assertFalse(ClassTypeHelper.isOverrider(m0, m2));
+		assertFalse(ClassTypeHelper.isOverrider(m1, m2));
+		assertFalse(ClassTypeHelper.isOverrider(m2, m2));
+		assertFalse(ClassTypeHelper.isOverrider(m3, m2));
+		assertFalse(ClassTypeHelper.isOverrider(m5, m2));
+		assertTrue(ClassTypeHelper.isOverrider(m4, m2));
+		
+		ICPPMethod[] ors= ClassTypeHelper.findOverridden(m0);
+		assertEquals(0, ors.length);
+		ors= ClassTypeHelper.findOverridden(m1);
+		assertEquals(0, ors.length);
+		ors= ClassTypeHelper.findOverridden(m2);
+		assertEquals(1, ors.length);
+		assertSame(ors[0], m1);
+		ors= ClassTypeHelper.findOverridden(m3);
+		assertEquals(0, ors.length);
+		ors= ClassTypeHelper.findOverridden(m4);
+		assertEquals(2, ors.length);
+		assertSame(ors[0], m2);
+		assertSame(ors[1], m1);
+		ors= ClassTypeHelper.findOverridden(m5);
+		assertEquals(1, ors.length);
+		assertSame(ors[0], m1);
+	}
+
+    //  struct A {
+    //    int a;
+    //  };
+    //
+    //  void test(A* p) {
+    //    p.a; // should not resolve
+    //  }
+    public void testPointerMemberAccess_245068() throws Exception {
+        final String comment= getAboveComment();
+        final boolean[] isCpps= {false, true};
+        for (boolean isCpp : isCpps) {
+            BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp);
+            ba.assertProblem("a; // should not resolve", 1);
+        }
+    }
+
+    //	namespace ns {
+    //	  template<typename T> class CT {};
+    //  }
+    //  using ns::CT<int>;
+    public void testTemplateIdInUsingDecl_251199() throws Exception {
+        parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+    }
+
+	//	namespace ns {
+	//	struct A {};
+	//	}
+	//
+	//	struct B {
+	//	  operator ns::A(); // problems on operator ns and on A
+	//	};
+	public void testNamespaceQualifiedOperator_256840() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		bh.assertNonProblem("operator ns::A", 14);
+        parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+
+	//	void f();
+	//	
+	//	void test(int p) {
+	//	  f(p);
+	//	}
+    public void testFunctionExtraArgument() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertProblem("f(p)", 1);
+    }
+
+    //	void f(...);
+	//	
+	//	void test(int* p) {
+	//	  f(p);
+	//	}
+    public void testVariadicFunction_2500582() throws Exception {
+    	final String comment= getAboveComment();
+    	final boolean[] isCpps= {false, true};
+    	for (boolean isCpp : isCpps) {
+    		BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp);
+    		ba.assertNonProblem("f(p)", 1, IFunction.class);
+    	}
+    }
+
+	//  struct Incomplete;
+	//
+	//  void f(Incomplete* p);
+	//  void f(...);
+	//
+	//  void test() {
+	//	  // Should resolve to f(Incomplete*) since 0 can be converted to Incomplete*
+	//    f(0);
+	//	}
+    public void testVariadicFunction_2500583() throws Exception {
+    	final String comment= getAboveComment();
+    	final boolean[] isCpps= {false, true};
+    	for (boolean isCpp : isCpps) {
+    		BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp);
+    		IFunction decl= ba.assertNonProblem("f(Incomplete* p)", 1, IFunction.class);
+    		IFunction func= ba.assertNonProblem("f(0)", 1, IFunction.class);
+    		assertSame(decl, func);
+    	}
+    }
+    
+    //    class MyClass{
+    //    public:
+    //       int v;
+    //       int& operator () (int i){ return v; }
+    //       int& operator () (int i, int j){ return v; }
+    //    };
+    //
+    //    int main(MyClass c, int i){
+    //      c(i,i)= 0;
+    //    	c(i) = 0;
+    //    }
+    public void testFunctionCallOnLHS_252695() throws Exception {
+		final String code = getAboveComment();
+		IASTTranslationUnit tu= parseAndCheckBindings(code, ParserLanguage.CPP, true);
+		IASTFunctionDefinition fdef= getDeclaration(tu, 1);
+		IASTExpressionStatement exstmt= getStatement(fdef, 0);
+		assertInstance(exstmt.getExpression(), IASTBinaryExpression.class);
+		exstmt= getStatement(fdef, 1);
+		assertInstance(exstmt.getExpression(), IASTBinaryExpression.class);
+    }
+    
+    //    template <int E> class A;
+    //    class A {};
+    //    class A;
+    //    class B;
+    //    template <int E> class B;
+    //    template <int E> class B {};
+    public void testInvalidClassRedeclaration_254961() throws Exception {
+		final String code = getAboveComment();
+		IASTTranslationUnit tu= parse(code, ParserLanguage.CPP, true, false);
+		CPPNameCollector nc= new CPPNameCollector();
+		tu.accept(nc);
+		assertProblemBindings(nc, 4);
+		assertProblemBinding(IProblemBinding.SEMANTIC_INVALID_REDEFINITION, nc.getName(2).resolveBinding());
+		assertProblemBinding(IProblemBinding.SEMANTIC_INVALID_REDECLARATION, nc.getName(3).resolveBinding());
+		assertProblemBinding(IProblemBinding.SEMANTIC_INVALID_REDECLARATION, nc.getName(6).resolveBinding());
+		assertProblemBinding(IProblemBinding.SEMANTIC_INVALID_REDEFINITION, nc.getName(8).resolveBinding());
+    }
+    
+    //    struct Foo {
+    //        void foo();
+    //    };
+    //    void Foo::foo(void) {
+    //    }
+    public void testVoidParamInDefinition_257376() throws Exception {
+    	parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+    }
+    
+    //    namespace ns {
+    //    	struct C {
+    //    		C(C* c){}
+    //    	};
+    //    	int a;
+    //    }
+    //    struct C {
+    //    	C(ns::C*){}
+    //    };
+    //    void testbla() {
+    //    	ns::C* cptr= 0;
+    //    	C c= C(cptr);
+    //    }
+    public void testNoKoenigForConstructors() throws Exception {
+    	parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+    }
+
+    //    typedef void VOID;
+    //    void donothing();
+    //    void donothing(VOID){}
+    //    void donothing(VOID);
+    //    void test() {
+    //      donothing(); 
+    //    }
+    public void testVoidViaTypedef_Bug258694() throws Exception {
+    	parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+    }
+
+	//	struct A {
+	//	  B method(B p, int& a = y) { // B is not defined 
+	//	    B b;
+    //      int x = y + 1;
+    //      return b;
+	//	  }
+	//	  struct B {};
+    //    int& x = y; // y is not defined
+    //    int y;
+	//	};
+    public void testScopeOfClassMember_259460() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("B b", 1, ICPPClassType.class);
+		ba.assertProblem("B p", 1);
+		ba.assertProblem("B method", 1);
+		ba.assertNonProblem("y + 1;", 1, ICPPField.class);
+		ba.assertNonProblem("y) {", 1, ICPPField.class);
+		ba.assertProblem("y; // y is not defined", 1);
+    }
+
+	//  class A {
+	//    int method(int a = GREEN) {
+	//      return RED;
+	//    }
+    //    int x = GREEN; // GREEN is not defined
+	//    enum Color {
+	//      RED, GREEN
+	//    };
+	//  };
+    public void testScopeOfClassMember_259648() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("GREEN)", 5, IEnumerator.class);
+		ba.assertNonProblem("RED;", 3, IEnumerator.class);
+		ba.assertProblem("GREEN;", 5);
+    }
+
+	//  struct A {
+	//    int& operator*();
+	//    const int& operator*() const;
+	//  };
+	//  void func(int& p) {}
+	//  void func(const int& p) {}
+	//
+	// 	void test(A& a, const A& b) {
+	// 	  func(*a);
+	// 	  func(*b);
+	// 	}
+	public void testSmartPointerReference_259680() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction f1= ba.assertNonProblem("func(*a)", 4, ICPPFunction.class);
+		ICPPFunction f2= ba.assertNonProblem("func(*b)", 4, ICPPFunction.class);
+		assertNotSame(f1, f2);
+	}
+
+	//	struct C {int a;};
+	//	void myfunc(C c) {
+	//		return c < c.a ||
+	//	        (c == c.a && (c<c.a || (c == c.a && (c<c.a || (c == c.a && (c<c.a ||
+	//	        (c == c.a && (c<c.a || (c == c.a && (c<c.a || (c == c.a && (c<c.a ||
+	//	        (c == c.a && (c<c.a || (c == c.a && (c<c.a || (c == c.a && (c<c.a ||
+	//	        (c == c.a && (c<c.a || (c == c.a && (c<c.a || (c == c.a && (c<c.a ||
+	//	        (c == c.a && (c<c.a || (c == c.a && (c<c.a || (c == c.a && (c<c.a
+	//	        ))))))))))))))))))))))))))))));
+	//	}
+	public void testNestedTemplateIDAmbiguity_259501() throws Exception {
+		final String code= getAboveComment();
+		parseAndCheckBindings(code);
+	}
+
+    //  struct A {
+    //    int a;
+    //  };
+    //
+    //  struct B {
+    //    A operator-(B b);
+    //    A operator+(B& b);
+    //    A operator*(const B& b);
+    //    A operator/(B b) const;
+    //    A operator%(const B& b) const;
+    //  };
+    //
+    //  void test(B p1, B p2) {
+    //    (p1 - p2).a; //1
+    //    (p1 + p2).a; //2
+    //    (p1 * p2).a; //3
+    //    (p1 / p2).a; //4
+    //    (p1 % p2).a; //5
+    //  }
+    public void testOverloadedBinaryOperator_259927_1() throws Exception {
+        BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+        ba.assertNonProblem("a; //1", 1, ICPPField.class);
+        ba.assertNonProblem("a; //2", 1, ICPPField.class);
+        ba.assertNonProblem("a; //3", 1, ICPPField.class);
+        ba.assertNonProblem("a; //4", 1, ICPPField.class);
+        ba.assertNonProblem("a; //5", 1, ICPPField.class);
+    }
+
+    //  struct A {
+    //    int a;
+    //  };
+    //  struct B {};
+    //  enum E { zero };
+    //
+    //  A operator-(B p1, int p2);
+    //  A operator+(int p1, const B& p2);
+    //  A operator*(E p1, int p2);
+    //  A operator/(int p1, const E& p2);
+    //  A operator%(const B& p1, const B& p2);
+    //
+    //  void test(B b, E e, int i) {
+    //    (b - i).a; //1
+    //    (i + b).a; //2
+    //    (e * i).a; //3
+    //    (i / e).a; //4
+    //    (b % b).a; //5
+    //    (b + i).a; //6
+    //  }
+    public void testOverloadedBinaryOperator_259927_2() throws Exception {
+        BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+        ba.assertNonProblem("a; //1", 1, ICPPField.class);
+        ba.assertNonProblem("a; //2", 1, ICPPField.class);
+        ba.assertNonProblem("a; //3", 1, ICPPField.class);
+        ba.assertNonProblem("a; //4", 1, ICPPField.class);
+        ba.assertNonProblem("a; //5", 1, ICPPField.class);
+        ba.assertProblem("a; //6", 1);
+    }
+    
+    
+    // struct A {
+	//   int x;
+	// };
+	//
+	// struct B {
+	//    A& operator++(); // prefix
+	//    A operator++(int); // postfix
+	// };
+	//
+	// void test(B p1, B p2) {
+	//    (p1++).x; //1
+	//    (++p1).x; //2
+	// }
+    public void testOverloadedUnaryOperator_259927_3() throws Exception {
+    	BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+    	ba.assertNonProblem("x; //1", 1, ICPPField.class);
+    	ba.assertNonProblem("x; //2", 1, ICPPField.class);
+    }
+    
+    
+	// struct A {
+	//   int x;
+	// };
+	// struct B { };
+    // A& operator++(B); // prefix
+	// A operator++(B, int); // postfix
+	//
+	// void test(B p1, B p2) {
+	//    (p1++).x; //1
+	//    (++p1).x; //2
+	// }
+    public void testOverloadedUnaryOperator_259927_4() throws Exception {
+    	BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+    	ba.assertNonProblem("x; //1", 1, ICPPField.class);
+    	ba.assertNonProblem("x; //2", 1, ICPPField.class);
+    }
+    
+
+	// struct A {
+	//	int xx;
+	// };
+	//
+	//
+	// struct B {
+	//	A operator*();
+	//	A operator&();
+	//	A operator+();
+	//	A operator-();
+	//	A operator!();
+	//	A operator~();
+	// };
+	//
+	// int main() {
+	//	B b;
+	//
+	//	(*b).xx; // 1
+	//	(&b).xx; // 2
+	//	(+b).xx; // 3
+	//	(-b).xx; // 4
+	//	(!b).xx; // 5
+	//	(~b).xx; // 6
+	// }
+    public void testOverloadedUnaryOperator_259927_5() throws Exception {
+    	BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+    	for(int i = 1; i <=6; i++)
+    		ba.assertNonProblem("xx; // "+i, 2, ICPPField.class);
+    }
+    
+	// struct A {
+	//	int xx;
+	// };
+	//
+	//
+	// struct B {
+	// };
+	//
+	// A operator*(B);
+	// A operator&(B);
+	// A operator+(B);
+	// A operator-(B);
+	// A operator!(B);
+	// A operator~(B);
+	//
+	// int main() {
+	//	B b;
+	//
+	//	(*b).xx; // 1
+	//	(&b).xx; // 2
+	//	(+b).xx; // 3
+	//	(-b).xx; // 4
+	//	(!b).xx; // 5
+	//	(~b).xx; // 6
+	//}
+    public void testOverloadedUnaryOperator_259927_6() throws Exception {
+    	BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+    	for(int i = 1; i <=6; i++)
+    		ba.assertNonProblem("xx; // "+i, 2, ICPPField.class);	
+    }
+    
+    
+    
+    // int a,b,c,d ;
+    // class X {
+    //	 void m() {
+    //      T* a;
+    //		I* b;
+    //		S1* c;
+    //		S2* d;
+    //	 }
+    //	 typedef int T;
+    //	 int I;
+    //	 typedef int S1 (int(T));  // resolve this ambiguity first
+    //	 typedef int S2 (int(t));  // resolve this ambiguity first
+    // };
+    public void testOrderOfAmbiguityResolution_259373() throws Exception {
+        BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+        ICPPVariable a= ba.assertNonProblem("a;", 1);
+        assertInstance(a.getType(), IPointerType.class);
+        ICPPVariable b= ba.assertNonProblem("b;", 1);
+        assertInstance(b.getType(), IBasicType.class);
+        ICPPVariable c= ba.assertNonProblem("c;", 1);
+        assertInstance(c.getType(), IPointerType.class);
+        ITypedef s1= (ITypedef) ((IPointerType) c.getType()).getType();
+        assertInstance(((IFunctionType) s1.getType()).getParameterTypes()[0], IPointerType.class);
+        ICPPVariable d= ba.assertNonProblem("d;", 1);
+        assertInstance(d.getType(), IPointerType.class);
+        ITypedef s2= (ITypedef) ((IPointerType) d.getType()).getType();
+        assertInstance(((IFunctionType) s2.getType()).getParameterTypes()[0], IBasicType.class);
+    }
+
+    //    namespace A {
+    //    	class X {
+    //    		friend void f(int);
+    //    		class Y {
+    //    			friend void g(int);
+    //    		};
+    //    	};
+    //    	void test() { 
+    //         f(1);
+    //         g(1);
+    //      } 
+    //    }
+    public void testFriendFunctionResolution_86368_1() throws Exception {
+		final String code= getAboveComment();
+		parseAndCheckBindings(code);
+		
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		IFunction f1= bh.assertNonProblem("f(int)", 1);
+		IFunction f2= bh.assertNonProblem("f(1)", 1);
+		assertSame(f1, f2);
+		IFunction g1= bh.assertNonProblem("g(int)", 1);
+		IFunction g2= bh.assertNonProblem("g(1)", 1);
+		assertSame(g1, g2);
+
+		bh= new BindingAssertionHelper(code, true);
+		f2= bh.assertNonProblem("f(1)", 1);
+		f1= bh.assertNonProblem("f(int)", 1);
+		assertSame(f1, f2);
+		g2= bh.assertNonProblem("g(1)", 1);
+		g1= bh.assertNonProblem("g(int)", 1);
+		assertSame(g1, g2);
+    }
+
+    //    namespace A {
+    //    	void f(int);
+    //    }
+    //    using A::f;
+    //    namespace A {
+    //    	void f(char); // openReferences fails
+    //    }
+    //    void foo() {
+    //    	f('i');
+    //    }
+    //    void bar() {
+    //    	using A::f;
+    //    	f('c');
+    //    }
+    public void testFriendFunctionResolution_86368_2() throws Exception {
+		final String code= getAboveComment();
+		parseAndCheckBindings(code);
+		
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		IFunction f1= bh.assertNonProblem("f(int)", 1);
+		IFunction f2= bh.assertNonProblem("f('i')", 1);
+		assertSame(f1, f2);
+		IFunction g1= bh.assertNonProblem("f(char)", 1);
+		IFunction g2= bh.assertNonProblem("f('c')", 1);
+		assertSame(g1, g2);
+
+		bh= new BindingAssertionHelper(code, true);
+		f2= bh.assertNonProblem("f('i')", 1);
+		f1= bh.assertNonProblem("f(int)", 1);
+		assertSame(f1, f2);
+		g2= bh.assertNonProblem("f('c')", 1);
+		g1= bh.assertNonProblem("f(char)", 1);
+		assertSame(g1, g2);
+    }
+    
+    // class A {
+    // public:
+    //    void foo() const volatile;
+    //    void foo() volatile;
+    //    void foo() const;
+    //    void foo();
+    //    void bar() const volatile;
+    //    void bar() volatile;
+    //    void bar() const;
+    //    void bar();
+    // };
+    // void A::foo() const volatile { bar();/*1*/ }
+    // void A::foo() volatile       { bar();/*2*/ }
+    // void A::foo() const          { bar();/*3*/ }
+    // void A::foo()                { bar();/*4*/ }
+    // void test() {
+    //   A a;
+    //   const A ca;
+    //   volatile A va;
+    //   const volatile A cva;
+    //   cva.bar();/*5*/
+    //   va.bar();/*6*/
+    //   ca.bar();/*7*/
+    //   a.bar();/*8*/
+    // }
+    public void testMemberFunctionDisambiguationByCVness_238409() throws Exception {
+		final String code= getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		
+    	ICPPMethod bar_cv= bh.assertNonProblem("bar();/*1*/", 3, ICPPMethod.class);
+    	ICPPMethod bar_v=  bh.assertNonProblem("bar();/*2*/", 3, ICPPMethod.class);
+    	ICPPMethod bar_c=  bh.assertNonProblem("bar();/*3*/", 3, ICPPMethod.class);
+    	ICPPMethod bar=    bh.assertNonProblem("bar();/*4*/", 3, ICPPMethod.class);
+    	ICPPFunctionType bar_cv_ft= bar_cv.getType();
+    	ICPPFunctionType bar_v_ft=  bar_v.getType();
+    	ICPPFunctionType bar_c_ft=  bar_c.getType();
+    	ICPPFunctionType bar_ft=    bar.getType();
+    	
+    	assertTrue(bar_cv_ft.isConst()); assertTrue(bar_cv_ft.isVolatile());
+    	assertTrue(!bar_v_ft.isConst()); assertTrue(bar_v_ft.isVolatile());
+    	assertTrue(bar_c_ft.isConst());  assertTrue(!bar_c_ft.isVolatile());
+    	assertTrue(!bar_ft.isConst());   assertTrue(!bar_ft.isVolatile());
+
+    	bar_cv= bh.assertNonProblem("bar();/*5*/", 3, ICPPMethod.class);
+    	bar_v=  bh.assertNonProblem("bar();/*6*/", 3, ICPPMethod.class);
+    	bar_c=  bh.assertNonProblem("bar();/*7*/", 3, ICPPMethod.class);
+    	bar=    bh.assertNonProblem("bar();/*8*/", 3, ICPPMethod.class);
+    	bar_cv_ft= bar_cv.getType();
+    	bar_v_ft=  bar_v.getType();
+    	bar_c_ft=  bar_c.getType();
+    	bar_ft=    bar.getType();
+    	
+    	assertTrue(bar_cv_ft.isConst()); assertTrue(bar_cv_ft.isVolatile());
+    	assertTrue(!bar_v_ft.isConst()); assertTrue(bar_v_ft.isVolatile());
+    	assertTrue(bar_c_ft.isConst());  assertTrue(!bar_c_ft.isVolatile());
+    	assertTrue(!bar_ft.isConst());   assertTrue(!bar_ft.isVolatile());
+    }
+    
+    //    void test1(float f);
+    //    void test1(void);
+    //    void blabla() {
+    //    	test1(1);
+    //    }
+    //    enum E {e1};
+    //    class C {};
+    //    void test2(float f);
+    //    void test2(C c);
+    //    void blabla2() {
+    //    	test2(e1);
+    //    }
+    public void testOverloadResolution_262191() throws Exception {
+		final String code= getAboveComment();
+		parseAndCheckBindings(code);
+    }
+
+    //	enum E {e1};
+    //	typedef int TInt;
+    //	void select(int);
+    //	void test() {
+    //    int a= TInt(1); 
+    //    E e= E(0);
+    //    void* h;
+    //    select (int (h) + 1);
+    //  }  
+    public void testSimpleTypeConstructorExpressions() throws Exception {
+		final String code= getAboveComment();
+    	parseAndCheckBindings(code);
+    }
+	
+	//	struct A {};
+	//	A a();
+	//
+	//	void f(const int& x);
+	//
+	//	void test() {
+	//	  f(a());
+	//	}
+	public void testBug263152_1() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertProblem("f(a())", 1);
+	}
+
+	//	struct A {};
+	//	A a();
+	//
+	//	struct B {
+	//	  void m(const A& x);
+	//	  void m(const B& x);
+	//	};
+	//
+	//	void test(B p) {
+	//	  p.m(a());
+	//	}
+	public void testBug263152_2() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("m(a())", 1, ICPPMethod.class);
+	}
+
+	//	struct A {
+	//	  int a;
+	//	  static void m() {
+	//	    a = 0;
+	//	  }
+	//	};
+	public void _testInstanceMemberInStaticMethod_263154() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertProblem("a =", 1);
+	}
+
+	//	struct A {};
+	//	void test() {
+	//		int B, b;
+	//		while (A* a = 0);
+	//		while (A* a = 0) {a= 0;}
+	//		while (B* b) {b= 0;}
+	//		if (A* a = 0) {a= 0;}
+	//		if (B* b) {b= 0;}
+	//		switch (A* a = 0) {case 1: a=0;}
+	//		switch (B* b) {case1: b= 0;}
+	//		for (;A* a = 0;) {a= 0;}
+	//		for (;B* b;) {b= 0;}
+	//	}
+    public void testAmbiguityResolutionInCondition_263158() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper ba= new BindingAssertionHelper(code, true);
+		ba.assertNonProblem("A*", 1, ICPPClassType.class);
+		ba.assertNonProblem("a", 1, ICPPVariable.class);
+		ba.assertNonProblem("B*", 1, ICPPVariable.class);
+		
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+    }
+
+	//	void f(int x);
+	//
+	//	void test(int* p, const int* q, int r[], const int s[]) {
+	//	  f(p);
+	//	  f(q);
+	//	  f(r);
+	//	  f(s);
+	//	}
+	public void testPointerToNonPointerConversion_263159() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertProblem("f(p)", 1);
+		ba.assertProblem("f(q)", 1);
+		ba.assertProblem("f(r)", 1);
+		ba.assertProblem("f(s)", 1);
+	}
+
+	//	void fip(int* x);
+	//	void fia(int x[]);
+	//
+	//	void test() {
+	//	  fip(1);
+	//	  fia(1);
+	//	  fip(0);
+	//	  fia(0);
+	//	}
+	public void testNonPointerToPointerConversion_263707() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertProblem("fip(1)", 3);
+		ba.assertProblem("fia(1)", 3);
+		ba.assertNonProblem("fip(0)", 3, ICPPFunction.class);
+		ba.assertNonProblem("fia(0)", 3, ICPPFunction.class);
+	}
+	
+	//	class cl {};
+	//	typedef cl tl;
+	//	void reset(cl* ptr){};
+	//	void blatest() {
+	//	   reset(new tl());
+	//	   reset(new cl());
+	//     reset(new cl[1]);
+	//	}
+	public void testTypeOfNewExpression_264163() throws Exception {
+		String code= getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	template<typename IteratorT> class range {
+	//	public:
+	//		template<class Range> range(const Range& r) {}
+	//	};
+	//	void onRange(const range<const char*>& r) {}
+	//	void test() {
+	//		range<char*> ir(0);
+	//		onRange(ir);
+	//	}
+	public void testConstructorTemplateInImplicitConversion_264314() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper ba= new BindingAssertionHelper(code, true);
+		ba.assertNonProblem("onRange(ir)", 7);
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	typedef int * pi;
+	//	typedef int *const* pcpi;
+	//	typedef const pi* pcpi2;
+	//	void check(pcpi) {};
+	//	void testxxx() {
+	//	        pcpi p1;
+	//	        pcpi2 p2;
+	//	        check(p1);
+	//	        check(p2);
+	//	}
+	//  template<typename T> class CT {};
+	//  CT<pcpi> ct1;
+	//  CT<pcpi2> ct2;
+	public void testConstTypedef_264474() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper ba= new BindingAssertionHelper(code, true);
+		ba.assertNonProblem("check(p2)", 5);
+		IBinding ct1= ba.assertNonProblem("CT<pcpi>", 8);
+		IBinding ct2= ba.assertNonProblem("CT<pcpi2>", 9);
+		assertSame(ct1, ct2);
+		
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	class X {
+	//		public:
+	//			int f;
+	//	void m(int) {};
+	//	void cm(int) const {};
+	//	static int sf;
+	//	static void sm(int) {};
+	//	};
+	//	int X::sf;
+	//
+	//	void mpr(int X::* p){}
+	//	void mpr(void (X::* q)(int)){}
+	//	void mprc(void (X::* q)(int) const){}
+	//	void mprcp(void (X::** q)(int) const){}
+	//	void pr(int * p){}
+	//	void pr(void (*q)(int)){}
+	//
+	//	void testxxx() {
+	//		void (X::* ptr)(int) const= &X::cm;
+	//		mpr(&X::f);
+	//		mpr(&X::m);
+	//		mprc(&X::cm);
+	//		mprcp(&ptr);
+	//	    pr(&X::sf);
+	//	    pr(&(X::sf));
+	//	    pr(&X::sm);
+	//	    pr(&(X::sm));
+	//
+	//		// invalid constructs:
+	//		mpr(&(X::f));  // cannot use parenthesis
+	//		mpr(&(X::m));   // cannot use parenthesis
+	//		mpr(&X::sf);    // sf is static
+	//		mpr(&X::sm);    // sm is static
+	//		mpr(&X::cm);    // cm is const
+	//		mprc(&X::m);    // m is not const
+	//	}
+	public void testMemberPtrs_264479() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper ba= new BindingAssertionHelper(code, true);
+		ba.assertNonProblem("mpr(&X::f)", 3);
+		ba.assertNonProblem("mpr(&X::m)", 3);
+		ba.assertNonProblem("mprc(&X::cm)", 4);
+		ba.assertNonProblem("mprcp(&ptr)", 5);
+		ba.assertNonProblem("pr(&X::sf)", 2);
+		ba.assertNonProblem("pr(&(X::sf))", 2);
+		ba.assertNonProblem("pr(&X::sm)", 2);
+		ba.assertNonProblem("pr(&(X::sm))", 2);
+
+		ba.assertProblem("mpr(&(X::f))", 3);
+		ba.assertProblem("mpr(&(X::m))", 3);
+		ba.assertProblem("mpr(&X::sf)", 3);
+		ba.assertProblem("mpr(&X::sm)", 3);
+		ba.assertProblem("mpr(&X::cm)", 3);
+		ba.assertProblem("mprc(&X::m)", 4);
+	}
+
+	//	void f(int x);
+	//
+	//	void test(int* p) {
+	//	  f(!p);
+	//	}
+	public void testTypeOfNotExpression_265779() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("f(!p)", 1);
+	}
+	
+	//	class S {
+	//		S(int);
+	//	};
+	//	void test() {
+	//		S **temp = new S*[1]; // problem on S
+	//		temp = new S*;        // problem on S
+	//		temp = new (S*);      // problem on S
+	//		temp = new ::S*[1]; // problem on S
+	//		temp = new ::S*;        // problem on S
+	//		temp = new (::S*);      // problem on S
+	//	}
+	public void testNewPointerOfClass_267168() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	void f(char *(names[2])= 0);
+	//  void f2(const char *(n[])) {
+	//     if (n && 1){}
+	//  }
+	public void testPointerToArrayWithDefaultVal_267184() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper ba= new BindingAssertionHelper(code, true);
+		ICPPParameter p= ba.assertNonProblem("names", 5);
+		assertTrue(p.hasDefaultValue());
+		IType t= p.getType();
+		assertInstance(t, IPointerType.class);  // parameter of type array is converted to pointer
+		t= ((IPointerType) t).getType();
+		assertInstance(t, IPointerType.class);
+		t= ((IPointerType) t).getType();
+		assertInstance(t, IBasicType.class);
+		
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	// class X {
+	//    virtual void pv() = 0;
+	//    void (*ptrToFunc) ()= 0;
+	// };
+	public void testPureVirtualVsInitDeclarator_267184() throws Exception {
+		final String code = getAboveComment();
+		IASTTranslationUnit tu= parseAndCheckBindings(code, ParserLanguage.CPP);
+		ICPPASTCompositeTypeSpecifier ct= getCompositeType(tu, 0);
+		IASTSimpleDeclaration sdecl= getDeclaration(ct, 0);
+		ICPPASTFunctionDeclarator dtor= (ICPPASTFunctionDeclarator) sdecl.getDeclarators()[0];
+		assertTrue(dtor.isPureVirtual());
+		assertNull(dtor.getInitializer());
+
+		sdecl= getDeclaration(ct, 1);
+		dtor= (ICPPASTFunctionDeclarator) sdecl.getDeclarators()[0];
+		assertFalse(dtor.isPureVirtual());
+		assertNotNull(dtor.getInitializer());
+
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	namespace ns {
+	//		struct S {
+	//			int a;
+	//		};
+	//	}
+	//	class A {
+	//		public:
+	//			operator ns::S*(){return 0;};
+	//	};
+	//	namespace ns {
+	//		void bla() {
+	//			A a;
+	//			a.operator S *();
+	//		}
+	//	}
+	public void testLookupScopeForConversionNames_267221() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	
+	//	struct A {int a;};
+	//
+	//	int foo();
+	//	int bar(A);
+	//
+	//	int func() {
+	//		bar((A){foo()});
+	//	}
+	public void testBug268714() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	void f(int volatile * const * ) {}
+	//	void f(int const volatile * const *) {}
+	//	void test() {
+	//	   int ** x;
+	//	   f(x);  // problem binding here
+	//	}
+	public void testRankingOfQualificationConversion_Bug269321() throws Exception {		
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	class C {
+	//		C& operator()() {return *this;}
+	//	};
+	//	void test() {
+	//		C c;
+	//		c()()()()()()()()()()()()()();
+	//	}
+	public void testNestedOverloadedFunctionCalls_Bug283324() throws Exception {
+		final String code = getAboveComment();
+		IASTTranslationUnit tu= parseAndCheckBindings(code, ParserLanguage.CPP);
+		IASTFunctionDefinition test= getDeclaration(tu, 1);
+		IASTExpressionStatement stmt= getStatement(test, 1);
+		long now= System.currentTimeMillis();
+		IType t= stmt.getExpression().getExpressionType();
+		assertInstance(t, ICPPReferenceType.class);
+		final long time = System.currentTimeMillis() - now;
+		assertTrue("Lasted " + time + "ms", time < 5000);
+	}
+	
+	
+	//	struct A { int a; };
+	//	struct B { int b; };
+	//
+	//	struct X {
+	//	    A operator+(int);
+	//	    X(int);
+	//	};
+	//
+	//	A operator+(X,X);
+	//	B operator+(X,double);
+	//
+	//	void test(X x) {
+	//	    (x + 1).a; //1
+	//	    (1 + x).a; //2
+	//	    (x + 1.0).b; //3
+	//	}
+	public void testOverloadResolutionForOperators_Bug266211() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+    	ba.assertNonProblem("a; //1", 1, ICPPField.class);
+    	ba.assertNonProblem("a; //2", 1, ICPPField.class);
+    	ba.assertNonProblem("b; //3", 1, ICPPField.class);
+	}
+	
+	
+	//	struct A { int a; };
+	//	struct X {
+	//	    A operator+(X);
+	//	    void m();
+	//	};
+	//
+	//	A operator+(X,double);
+	//
+	//	void X::m() {
+	//	    X x;
+	//	    (x + x).a; //1
+	//	    (x + 1.0).a; //2
+	//	}
+	public void testOverloadResolutionForOperators_Bug268534() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+    	ba.assertNonProblem("a; //1", 1, ICPPField.class);
+    	ba.assertNonProblem("a; //2", 1, ICPPField.class);
+	}
+
+	//	class C {
+	//		operator int(){return 0;}
+	//	};
+	//	void test(int) {}
+	//	void ref() {
+	//		C* c= 0;
+	//		test(c);
+	//	}
+	public void testInvalidUserDefinedConversion_Bug269729() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+    	ba.assertProblem("test(c)", 4);
+	}
+	
+
+	//	int foo(char * x);
+	//	int foo(wchar_t * x);
+	//  int foo(char x);
+	//	int foo(wchar_t x);
+	//
+	//	int main() {
+	//		foo("asdf");
+	//		foo(L"asdf");
+	//		foo('a');
+	//		foo(L'a');
+	//	}
+	public void testWideCharacterLiteralTypes_Bug270892() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP); 
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertSame(col.getName(0).resolveBinding(), col.getName(9).resolveBinding());
+		assertSame(col.getName(2).resolveBinding(), col.getName(10).resolveBinding());
+		assertSame(col.getName(4).resolveBinding(), col.getName(11).resolveBinding());
+		assertSame(col.getName(6).resolveBinding(), col.getName(12).resolveBinding());
+	}
+
+	//	namespace ns {
+	//	  struct A {};
+	//	}
+	//	using ns::A;
+	//	struct A;
+	//	A a;
+	public void testForwardDeclarationAfterUsing_271236() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+    	ba.assertNonProblem("A a;", 1, ICPPClassType.class);
+	}
+	
+	//	template <class T> class Moo;
+	//	bool getFile(Moo <class Foo> & res);
+	public void testScopeOfClassFwdDecl_270831() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+    	ICPPClassType t= ba.assertNonProblem("Foo", 3, ICPPClassType.class);
+    	IScope scope= t.getScope();
+    	assertEquals(EScopeKind.eGlobal, scope.getKind());
+	}
+	
+	//	class C {};
+	//	class D : public C {};
+	//	class E {
+	//	   public: E(D) {}
+	//	};
+	//	void test(C c) {}
+	//	void test(E e) {}
+	//
+	//	void xx() {
+	//	   D d1;
+	//	   const D d2= D();
+	//	   test(d1); // problem binding here although test(C c) has to be selected
+	//	   test(d2); // problem binding here although test(C c) has to be selected
+	//	}
+	public void testDerivedToBaseConversion_269318() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper ba= new BindingAssertionHelper(code, true);
+		ICPPFunction t= ba.assertNonProblem("test(d1);", 4, ICPPFunction.class);
+		ICPPClassType ct= (ICPPClassType) t.getParameters()[0].getType();
+    	assertEquals("C", ct.getName());
+
+		t= ba.assertNonProblem("test(d2);", 4, ICPPFunction.class);
+		ct= (ICPPClassType) t.getParameters()[0].getType();
+    	assertEquals("C", ct.getName());
+
+    	parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+
+	//	class A {
+	//	  friend inline void m(A p) {}
+	//	};
+	//
+	//	void test(A a) {
+	//	  m(a);
+	//	}
+	public void testInlineFriendFunction_284690() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+
+	//	void f(int t);
+	//	void f(unsigned int t);
+	//	void f(long t);
+	//
+	//	enum IntEnum { i1 };
+	//	enum UnsignedEnum { u1 = 0x7FFFFFFF, u2 };
+	//	enum LongEnum { l1 = -1, l2 = 0x7FFFFFFF, l3 };
+	//
+	//	void test() {
+	//	  f(i1);
+	//	  f(u1);
+	//	  f(l1);
+	//	}
+	public void testEnumToIntConversion_285368() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+    	ICPPFunction f1 = ba.assertNonProblem("f(i1)", 1, ICPPFunction.class);
+    	IType t1 = f1.getType().getParameterTypes()[0];
+    	assertTrue(t1 instanceof ICPPBasicType);
+    	assertEquals(IBasicType.t_int, ((ICPPBasicType) t1).getType());
+    	assertEquals(0, ((ICPPBasicType) t1).getQualifierBits());
+    	ICPPFunction f2 = ba.assertNonProblem("f(u1)", 1, ICPPFunction.class);
+    	IType t2 = f2.getType().getParameterTypes()[0];
+    	assertTrue(t2 instanceof ICPPBasicType);
+    	assertEquals(IBasicType.t_int, ((ICPPBasicType) t2).getType());
+    	assertEquals(ICPPBasicType.IS_UNSIGNED, ((ICPPBasicType) t2).getQualifierBits());
+    	ICPPFunction f3 = ba.assertNonProblem("f(l1)", 1, ICPPFunction.class);
+    	IType t3 = f3.getType().getParameterTypes()[0];
+    	assertTrue(t3 instanceof ICPPBasicType);
+    	assertEquals(IBasicType.t_int, ((ICPPBasicType) t3).getType());
+    	assertEquals(ICPPBasicType.IS_LONG, ((ICPPBasicType) t3).getQualifierBits());
+	}
+
+	// typedef enum enum_name enum_name;
+	public void testTypedefRecursion_285457() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertProblem("enum_name", 9);
+	}
+	
+	//	class CL {
+	//		typedef int x;
+	//		friend void test() {
+	//			x a;  // problem on x
+	//		}
+	//	};
+	public void testLookupFromInlineFriend_284690() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+	}
+	
+	//	int v1;
+	//	static int v2;
+	//	extern int v3;
+	//	int v4= 12;
+	//	static int v5= 1;
+	//	class X {
+	//		int v6;
+	//		static const int v7;
+	//		static const int v8= 1;
+	//	};
+	//	const int X::v7= 1;
+	public void testVariableDefVsDecl_286259() throws Exception {
+		String[] declNames= {"v3"};
+		String[] defNames=  {"v1", "v2", "v4", "v5", "X::v7"};
+		IASTTranslationUnit tu= parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+		checkDeclDef(declNames, defNames, tu.getDeclarations());
+
+		declNames= new String[] {"v7", "v8"};
+		defNames=  new String[] {"v6"};
+		IASTCompositeTypeSpecifier cls= getCompositeType(tu, 5);
+		checkDeclDef(declNames, defNames, cls.getMembers());
+	}
+	
+	//	extern "C" int v1;
+	//	class X {
+	//		static const int v2= 1;
+	//	};
+	//	const int X::v2;
+	public void testVariableDefVsDecl_292635() throws Exception {
+		String[] declNames= {"v1"};
+		String[] defNames=  {"X::v2"};
+		IASTTranslationUnit tu= parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+		checkDeclDef(declNames, defNames, tu.getDeclarations());
+
+		declNames= new String[] {"v2"};
+		defNames=  new String[] {};
+		IASTCompositeTypeSpecifier cls= getCompositeType(tu, 1);
+		checkDeclDef(declNames, defNames, cls.getMembers());
+	}
+
+	private void checkDeclDef(String[] declNames, String[] defNames, IASTDeclaration[] decls) {
+		int i=0, j=0; 
+		for (IASTDeclaration decl : decls) {
+			if (decl instanceof ICPPASTLinkageSpecification) {
+				decl= ((ICPPASTLinkageSpecification) decl).getDeclarations()[0];
+			}
+			final IASTDeclarator[] dtors = ((IASTSimpleDeclaration) decl).getDeclarators();
+			for (IASTDeclarator dtor : dtors) {
+				final String name = dtor.getName().toString();
+				switch (dtor.getRoleForName(dtor.getName())) {
+				case IASTNameOwner.r_declaration:
+					assertTrue("Unexpected decl " + name, i < declNames.length);
+					assertEquals(declNames[i++], name);
+					break;
+				case IASTNameOwner.r_definition:
+					assertTrue("Unexpected decl " + name, j < defNames.length);
+					assertEquals(defNames[j++], name);
+					break;
+				default:
+					assertTrue(name, false);
+				}
+			}
+		}
+		assertEquals(declNames.length, i);
+		assertEquals(defNames.length, j);
+	}
+	
+	//	class X {
+	//	    struct S* m1;  
+	//	    struct T;
+	//	    struct T* m2;  
+	//	};
+	public void testStructOwner_290693() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		ICPPClassType S= bh.assertNonProblem("S*", 1);
+		assertNull(S.getOwner());
+
+		ICPPClassType X= bh.assertNonProblem("X {", 1);
+		ICPPClassType T= bh.assertNonProblem("T;", 1);
+		assertSame(X, T.getOwner());
+
+		T= bh.assertNonProblem("T* m2", 1);
+		assertSame(X, T.getOwner());
+	}
+
+	//	class ULONGLONG { 
+	//	public : 
+	//	   ULONGLONG (unsigned long long val) {}
+  	//	   friend ULONGLONG operator ~ ( const ULONGLONG & ) { return 0; }
+	//	};
+	//
+	//	int main() {
+	//	    return ~0;
+	//	}
+	public void testNonUserdefinedOperator_Bug291409_2() throws Exception {
+		final String code = getAboveComment();
+		IASTTranslationUnit tu= parseAndCheckBindings(code, ParserLanguage.CPP);
+		IASTFunctionDefinition def= getDeclaration(tu, 1);
+		IASTReturnStatement rstmt= getStatement(def, 0);
+		IASTImplicitNameOwner expr= (IASTImplicitNameOwner) rstmt.getReturnValue();
+		assertEquals(0, expr.getImplicitNames().length);
+	}
+	
+	//	class Test {
+	//	   template <int T> void t() {}
+	//	   inline void t();
+	//	};
+	//
+	//	inline void Test::t() {
+	//	   t<1>();
+	//	}
+	public void testMethodTemplateWithSameName_292051() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		ICPPMethod m= bh.assertNonProblem("t<1>", 1);
+		assertTrue(m.isInline());
+	}
+	
+	//	class ULONGLONG {
+	//  public :
+	//	   ULONGLONG ( unsigned long long val ) {}
+	//	   friend bool operator == ( const ULONGLONG & , const int ) { return true; }
+	//	};
+	//	enum E {A, B, C};
+	//	int main() {
+	//		return B == 23;
+	//	}
+	public void testInvalidOverload_291409() throws Exception {
+		final String code = getAboveComment();
+		IASTTranslationUnit tu= parseAndCheckBindings(code, ParserLanguage.CPP);
+		IASTFunctionDefinition fdef= getDeclaration(tu, 2);
+		IASTReturnStatement stmt= getStatement(fdef, 0);
+		IASTImplicitNameOwner no= (IASTImplicitNameOwner) stmt.getReturnValue();
+		assertEquals(0, no.getImplicitNames().length);
+	}
+}
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CSpecTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CSpecTest.java
new file mode 100644
index 0000000..38189e5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CSpecTest.java
@@ -0,0 +1,2109 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import org.eclipse.cdt.core.parser.ParserLanguage;
+
+/**
+ * @author dsteffle
+ */
+public class AST2CSpecTest extends AST2SpecBaseTest {
+
+	public AST2CSpecTest() {
+	}
+
+	public AST2CSpecTest(String name) {
+		super(name);
+	}
+
+	/**
+	 [--Start Example(C 4-6):
+	#ifdef _ _STDC_IEC_559_ _ // FE_UPWARD defined 
+	fesetround(FE_UPWARD);
+	#endif
+	 --End Example]
+	 */
+	public void test4s6() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#ifdef __STDC_IEC_559__ /* FE_UPWARD defined */\n"); //$NON-NLS-1$
+		buffer.append("fesetround(FE_UPWARD);\n"); //$NON-NLS-1$
+		buffer.append("#endif\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 5.1.1.3-2):
+	char i;
+	int i;
+	 --End Example]
+	 */
+	public void test5_1_1_3s2() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("char i;\n"); //$NON-NLS-1$
+		buffer.append("int i;\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 5.1.2.3-10):
+	int f() {
+	char c1, c2;
+	c1 = c1 + c2;
+	}
+	 --End Example]
+	 */
+	public void test5_1_2_3s10() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("char c1, c2;\n"); //$NON-NLS-1$
+		buffer.append("c1 = c1 + c2;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 5.1.2.3-11):
+	int f() {
+	float f1, f2;
+	double d;
+	f1 = f2 * d;
+	}
+	 --End Example]
+	 */
+	public void test5_1_2_3s11() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("float f1, f2;\n"); //$NON-NLS-1$
+		buffer.append("double d;\n"); //$NON-NLS-1$
+		buffer.append("f1 = f2 * d;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 5.1.2.3-12):
+	int f() {
+	double d1, d2;
+	float f;
+	d1 = f = 1;
+	d2 = (float) 1;
+	}
+	 --End Example]
+	 */
+	public void test5_1_2_3s12() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("double d1, d2;\n"); //$NON-NLS-1$
+		buffer.append("float f;\n"); //$NON-NLS-1$
+		buffer.append("d1 = f = 1;\n"); //$NON-NLS-1$
+		buffer.append("d2 = (float) 1;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$		
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 5.1.2.3-13):
+	int f() {
+	double x, y, z;
+	x = (x * y) * z; // not equivalent tox *= y * z;
+	z = (x - y) + y ; // not equivalent toz = x;
+	z = x + x * y; // not equivalent toz = x * (1.0 + y);
+	y = x / 5.0; // not equivalent toy = x * 0.2;
+	}
+	 --End Example]
+	 */
+	public void test5_1_2_3s13() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("double x, y, z;\n"); //$NON-NLS-1$
+		buffer.append("x = (x * y) * z; // not equivalent tox *= y * z;\n"); //$NON-NLS-1$
+		buffer.append("z = (x - y) + y ; // not equivalent toz = x;\n"); //$NON-NLS-1$
+		buffer.append("z = x + x * y; // not equivalent toz = x * (1.0 + y);\n"); //$NON-NLS-1$
+		buffer.append("y = x / 5.0; // not equivalent toy = x * 0.2;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 5.1.2.3-14):
+	int f() {
+	int a, b;
+	a = a + 32760 + b + 5;
+	a = (((a + 32760) + b) + 5);
+	a = ((a + b) + 32765);
+	a = ((a + 32765) + b);
+	a = (a + (b + 32765));
+	}
+	 --End Example]
+	 */
+	public void test5_1_2_3s14() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("int a, b;\n"); //$NON-NLS-1$
+		buffer.append("a = a + 32760 + b + 5;\n"); //$NON-NLS-1$
+		buffer.append("a = (((a + 32760) + b) + 5);\n"); //$NON-NLS-1$
+		buffer.append("a = ((a + b) + 32765);\n"); //$NON-NLS-1$
+		buffer.append("a = ((a + 32765) + b);\n"); //$NON-NLS-1$
+		buffer.append("a = (a + (b + 32765));\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 5.1.2.3-15):
+	//#include <stdio.h>
+	int f() {
+	int sum;
+	char *p;
+	sum = sum * 10 - '0' + (*p++ = getchar());
+	sum = (((sum * 10) - '0') + ((*(p++)) = (getchar())));
+	}
+	 --End Example]
+	 */
+	public void test5_1_2_3s15() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("//#include <stdio.h>\n"); //$NON-NLS-1$
+		buffer.append("int f() {");
+		buffer.append("int sum;\n"); //$NON-NLS-1$
+		buffer.append("char *p;\n"); //$NON-NLS-1$
+		buffer.append("sum = sum * 10 - '0' + (*p++ = getchar());\n"); //$NON-NLS-1$
+		buffer.append("sum = (((sum * 10) - '0') + ((*(p++)) = (getchar())));\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.2.5-28):
+	struct tag (* a[5])(float);
+	 --End Example]
+	 */
+	public void test6_2_5s28() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("struct tag (* a[5])(float);\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.2.7-5):
+	int f(int (*)(), double (*)[3]);
+	int f(int (*)(char *), double (*)[]);
+	int f(int (*)(char *), double (*)[3]);
+	 --End Example]
+	 */
+	public void test6_2_7s5() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f(int (*)(), double (*)[3]);\n"); //$NON-NLS-1$
+		buffer.append("int f(int (*)(char *), double (*)[]);\n"); //$NON-NLS-1$
+		buffer.append("int f(int (*)(char *), double (*)[3]);\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.4.4.4-12):
+	char x='\023';
+	char y='\0';
+	char z='\x13';
+	 --End Example]
+	 */
+	public void test6_4_4_4s12() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("char x='\\023';\n"); //$NON-NLS-1$
+		buffer.append("char y='\\0';\n"); //$NON-NLS-1$
+		buffer.append("char z='\\x13';\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.2.2-12):
+	int f1() {}
+	int f2() {}
+	int f3() {}
+	int f4() {}
+	int (*pf[5])(int a, int b);
+	int foo() {
+	int x=(*pf[f1()]) (f2(), f3() + f4());
+	}
+	 --End Example]
+	 */
+	public void test6_5_2_2s12() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f1() {}\n"); //$NON-NLS-1$
+		buffer.append("int f2() {}\n"); //$NON-NLS-1$
+		buffer.append("int f3() {}\n"); //$NON-NLS-1$
+		buffer.append("int f4() {}\n"); //$NON-NLS-1$
+		buffer.append("int (*pf[5])(int a, int b);\n"); //$NON-NLS-1$
+		buffer.append("int foo() {\n"); //$NON-NLS-1$
+		buffer.append("int x=(*pf[f1()]) (f2(), f3() + f4());\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.2.3-7):
+	struct s { int i; const int ci; };
+	struct s s;
+	const struct s cs;
+	volatile struct s vs;
+	int f() {
+	s.i; // int
+	s.ci; // const int
+	cs.i; // const int
+	cs.ci; // const int
+	vs.i; // volatile int
+	vs.ci; // volatile const int
+	}
+	 --End Example]
+	 */
+	public void test6_5_2_3s7() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("struct s { int i; const int ci; };\n"); //$NON-NLS-1$
+		buffer.append("struct s s;\n"); //$NON-NLS-1$
+		buffer.append("const struct s cs;\n"); //$NON-NLS-1$
+		buffer.append("volatile struct s vs;\n"); //$NON-NLS-1$
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("s.i; // int\n"); //$NON-NLS-1$
+		buffer.append("s.ci; // const int\n"); //$NON-NLS-1$
+		buffer.append("cs.i; // const int\n"); //$NON-NLS-1$
+		buffer.append("cs.ci; // const int\n"); //$NON-NLS-1$
+		buffer.append("vs.i; // volatile int\n"); //$NON-NLS-1$
+		buffer.append("vs.ci; // volatile const int\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.2.3-8a):
+	union {
+	struct {
+	int alltypes;
+	} n;
+	struct {
+	int type;
+	int intnode;
+	} ni;
+	struct {
+	int type;
+	double doublenode;
+	} nf;
+	} u;
+	int f() {
+	u.nf.type = 1;
+	u.nf.doublenode = 3.14;
+	if (u.n.alltypes == 1)
+	return 0;
+	if (sin(u.nf.doublenode) == 0.0)
+	return 0;
+	}
+	 --End Example]
+	 */
+	public void test6_5_2_3s8a() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("union {\n"); //$NON-NLS-1$
+		buffer.append("struct {\n"); //$NON-NLS-1$
+		buffer.append("int alltypes;\n"); //$NON-NLS-1$
+		buffer.append("} n;\n"); //$NON-NLS-1$
+		buffer.append("struct {\n"); //$NON-NLS-1$
+		buffer.append("int type;\n"); //$NON-NLS-1$
+		buffer.append("int intnode;\n"); //$NON-NLS-1$
+		buffer.append("} ni;\n"); //$NON-NLS-1$
+		buffer.append("struct {\n"); //$NON-NLS-1$
+		buffer.append("int type;\n"); //$NON-NLS-1$
+		buffer.append("double doublenode;\n"); //$NON-NLS-1$
+		buffer.append("} nf;\n"); //$NON-NLS-1$
+		buffer.append("} u;\n"); //$NON-NLS-1$
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("u.nf.type = 1;\n"); //$NON-NLS-1$
+		buffer.append("u.nf.doublenode = 3.14;\n"); //$NON-NLS-1$
+		buffer.append("if (u.n.alltypes == 1)\n"); //$NON-NLS-1$
+		buffer.append("return 0;\n"); //$NON-NLS-1$
+		buffer.append("if (sin(u.nf.doublenode) == 0.0)\n"); //$NON-NLS-1$
+		buffer.append("return 0;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.2.3-8b):
+	struct t1 { int m; };
+	struct t2 { int m; };
+	int f(struct t1 * p1, struct t2 * p2)
+	{
+	if (p1->m < 0)
+	p2->m = -p2->m;
+	return p1->m;
+	}
+	int g()
+	{
+	union {
+	struct t1 s1;
+	struct t2 s2;
+	} u;
+	return f(&u.s1, &u.s2);
+	}
+	 --End Example]
+	 */
+	public void test6_5_2_3s8b() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("struct t1 { int m; };\n"); //$NON-NLS-1$
+		buffer.append("struct t2 { int m; };\n"); //$NON-NLS-1$
+		buffer.append("int f(struct t1 * p1, struct t2 * p2)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("if (p1->m < 0)\n"); //$NON-NLS-1$
+		buffer.append("p2->m = -p2->m;\n"); //$NON-NLS-1$
+		buffer.append("return p1->m;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("int g()\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("union {\n"); //$NON-NLS-1$
+		buffer.append("struct t1 s1;\n"); //$NON-NLS-1$
+		buffer.append("struct t2 s2;\n"); //$NON-NLS-1$
+		buffer.append("} u;\n"); //$NON-NLS-1$
+		buffer.append("return f(&u.s1, &u.s2);\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.2.5-9):
+	int *p = (int []){2, 4};
+	 --End Example]
+	 */
+	public void test6_5_2_5s9() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int *p = (int []){2, 4};\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.2.5-10):
+	void f(void)
+	{
+	int *p;
+	p = (int [2]){*p};
+	}
+	 --End Example]
+	 */
+	public void test6_5_2_5s10() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("void f(void)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("int *p;\n"); //$NON-NLS-1$
+		buffer.append("p = (int [2]){*p};\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.2.5-11):
+	int f(){
+	drawline((struct point){.x=1, .y=1},
+	(struct point){.x=3, .y=4});
+	drawline(&(struct point){.x=1, .y=1},
+	&(struct point){.x=3, .y=4});
+	}
+	 --End Example]
+	 */
+	public void test6_5_2_5s11() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f(){\n"); //$NON-NLS-1$
+		buffer.append("drawline((struct point){.x=1, .y=1},\n"); //$NON-NLS-1$
+		buffer.append("(struct point){.x=3, .y=4});\n"); //$NON-NLS-1$
+		buffer.append("drawline(&(struct point){.x=1, .y=1},\n"); //$NON-NLS-1$
+		buffer.append("&(struct point){.x=3, .y=4});\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.2.5-12):
+	int f() {
+	(const float []){1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6};
+	}
+	 --End Example]
+	 */
+	public void test6_5_2_5s12() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("(const float []){1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6};\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.2.5-13):
+	int f() {
+	"/tmp/fileXXXXXX";
+	(char []){"/tmp/fileXXXXXX"};
+	(const char []){"/tmp/fileXXXXXX"};
+	}
+	 --End Example]
+	 */
+	public void test6_5_2_5s13() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("\"/tmp/fileXXXXXX\";\n"); //$NON-NLS-1$
+		buffer.append("(char []){\"/tmp/fileXXXXXX\"};\n"); //$NON-NLS-1$
+		buffer.append("(const char []){\"/tmp/fileXXXXXX\"};\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.2.5-14):
+	int f() {
+	(const char []){"abc"} == "abc";
+	}
+	 --End Example]
+	 */
+	public void test6_5_2_5s14() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("(const char []){\"abc\"} == \"abc\";\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.2.5-15):
+	int f() {
+	struct int_list { int car; struct int_list *cdr; };
+	struct int_list endless_zeros = {0, &endless_zeros};
+	eval(endless_zeros);
+	}
+	 --End Example]
+	 */
+	public void test6_5_2_5s15() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("struct int_list { int car; struct int_list *cdr; };\n"); //$NON-NLS-1$
+		buffer.append("struct int_list endless_zeros = {0, &endless_zeros};\n"); //$NON-NLS-1$
+		buffer.append("eval(endless_zeros);\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.2.5-16):
+	struct s { int i; };
+	int f (void)
+	{
+	struct s *p = 0, *q;
+	int j = 0;
+	again:
+	q = p, p = &((struct s){ j++ });
+	if (j < 2) goto again;
+	return p == q && q->i == 1;
+	}
+	 --End Example]
+	 */
+	public void test6_5_2_5s16() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("struct s { int i; };\n"); //$NON-NLS-1$
+		buffer.append("int f (void)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("struct s *p = 0, *q;\n"); //$NON-NLS-1$
+		buffer.append("int j = 0;\n"); //$NON-NLS-1$
+		buffer.append("again:\n"); //$NON-NLS-1$
+		buffer.append("q = p, p = &((struct s){ j++ });\n"); //$NON-NLS-1$
+		buffer.append("if (j < 2) goto again;\n"); //$NON-NLS-1$
+		buffer.append("return p == q && q->i == 1;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.3.4-5):
+	extern void *alloc(size_t);
+	double *dp = alloc(sizeof *dp);
+	 --End Example]
+	 */
+	public void test6_5_3_4s5() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("extern void *alloc(size_t);\n"); //$NON-NLS-1$
+		buffer.append("double *dp = alloc(sizeof *dp);\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.3.4-6):
+	int f() {
+	int array[5];
+	int x = sizeof array / sizeof array[0];
+	}
+	 --End Example]
+	 */
+	public void test6_5_3_4s6() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("int array[5];\n"); //$NON-NLS-1$
+		buffer.append("int x = sizeof array / sizeof array[0];\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.6-10):
+	int f() {
+	int n = 4, m = 3;
+	int a[n][m];
+	int (*p)[m] = a; // p == &a[0]
+	p += 1; // p == &a[1]
+	(*p)[2] = 99; // a[1][2] == 99
+	n = p - a; // n == 1
+	}
+	 --End Example]
+	 */
+	public void test6_5_6s10() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("int n = 4, m = 3;\n"); //$NON-NLS-1$
+		buffer.append("int a[n][m];\n"); //$NON-NLS-1$
+		buffer.append("int (*p)[m] = a; // p == &a[0]\n"); //$NON-NLS-1$
+		buffer.append("p += 1; // p == &a[1]\n"); //$NON-NLS-1$
+		buffer.append("(*p)[2] = 99; // a[1][2] == 99\n"); //$NON-NLS-1$
+		buffer.append("n = p - a; // n == 1\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.15-8):
+	int f() {
+	const void *c_vp;
+	void *vp;
+	const int *c_ip;
+	volatile int *v_ip;
+	int *ip;
+	const char *c_cp;
+	}
+	 --End Example]
+	 */
+	public void test6_5_15s8() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("const void *c_vp;\n"); //$NON-NLS-1$
+		buffer.append("void *vp;\n"); //$NON-NLS-1$
+		buffer.append("const int *c_ip;\n"); //$NON-NLS-1$
+		buffer.append("volatile int *v_ip;\n"); //$NON-NLS-1$
+		buffer.append("int *ip;\n"); //$NON-NLS-1$
+		buffer.append("const char *c_cp;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.16.1-5):
+	int f() {
+	char c;
+	int i;
+	long l;
+	l = (c = i);
+	}
+	 --End Example]
+	 */
+	public void test6_5_16_1s5() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("char c;\n"); //$NON-NLS-1$
+		buffer.append("int i;\n"); //$NON-NLS-1$
+		buffer.append("long l;\n"); //$NON-NLS-1$
+		buffer.append("l = (c = i);\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.5.16.1-6):
+	int f() {
+	const char **cpp;
+	char *p;
+	const char c = 'A';
+	cpp = &p; // constraint violation
+	*cpp = &c; // valid
+	*p = 0; // valid
+	}
+	 --End Example]
+	 */
+	public void test6_5_16_1s6() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("const char **cpp;\n"); //$NON-NLS-1$
+		buffer.append("char *p;\n"); //$NON-NLS-1$
+		buffer.append("const char c = 'A';\n"); //$NON-NLS-1$
+		buffer.append("cpp = &p; // constraint violation\n"); //$NON-NLS-1$
+		buffer.append("*cpp = &c; // valid\n"); //$NON-NLS-1$
+		buffer.append("*p = 0; // valid\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.2.1-17):
+	struct s { int n; double d[]; };
+	struct ss { int n; double d[1]; };
+	int f() {
+	sizeof (struct s);
+	offsetof(struct s, d);
+	offsetof(struct ss, d);
+	}
+	 --End Example]
+	 */
+	public void test6_7_2_1s17() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		// offsetoff is a macro defined in stddef.h, using GNU definition
+		buffer.append("#define offsetof(TYPE, MEMBER) ((size_t) (&((TYPE *)0)->MEMBER))\n");
+
+		buffer.append("struct s { int n; double d[]; };\n"); //$NON-NLS-1$
+		buffer.append("struct ss { int n; double d[1]; };\n"); //$NON-NLS-1$
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("sizeof (struct s);\n"); //$NON-NLS-1$
+		buffer.append("offsetof(struct s, d);\n"); //$NON-NLS-1$
+		buffer.append("offsetof(struct ss, d);\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.2.1-18a):
+	int f() {
+	struct s *s1;
+	struct s *s2;
+	s1 = malloc(sizeof (struct s) + 64);
+	s2 = malloc(sizeof (struct s) + 46);
+	}
+	 --End Example]
+	 */
+	public void test6_7_2_1s18a() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("struct s *s1;\n"); //$NON-NLS-1$
+		buffer.append("struct s *s2;\n"); //$NON-NLS-1$
+		buffer.append("s1 = malloc(sizeof (struct s) + 64);\n"); //$NON-NLS-1$
+		buffer.append("s2 = malloc(sizeof (struct s) + 46);\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.2.1-18b):
+	struct { int n; double d[8]; } *s1;
+	struct { int n; double d[5]; } *s2;
+	 --End Example]
+	 */
+	public void test6_7_2_1s18b() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("struct { int n; double d[8]; } *s1;\n"); //$NON-NLS-1$
+		buffer.append("struct { int n; double d[5]; } *s2;\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.2.2-5):
+	int f() {
+	enum hue { chartreuse, burgundy, claret=20, winedark };
+	enum hue col, *cp;
+	col = claret;
+	cp = &col;
+	if (*cp != burgundy)
+	return 0;
+	}
+	 --End Example]
+	 */
+	public void test6_7_2_2s5() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("enum hue { chartreuse, burgundy, claret=20, winedark };\n"); //$NON-NLS-1$
+		buffer.append("enum hue col, *cp;\n"); //$NON-NLS-1$
+		buffer.append("col = claret;\n"); //$NON-NLS-1$
+		buffer.append("cp = &col;\n"); //$NON-NLS-1$
+		buffer.append("if (*cp != burgundy)\n"); //$NON-NLS-1$
+		buffer.append("return 0;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.2.3-9):
+	struct tnode {
+	int count;
+	struct tnode *left, *right;
+	};
+	struct tnode s, *sp;
+	 --End Example]
+	 */
+	public void test6_7_2_3s9() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("struct tnode {\n"); //$NON-NLS-1$
+		buffer.append("int count;\n"); //$NON-NLS-1$
+		buffer.append("struct tnode *left, *right;\n"); //$NON-NLS-1$
+		buffer.append("};\n"); //$NON-NLS-1$
+		buffer.append("struct tnode s, *sp;\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.2.3-10):
+	typedef struct tnode TNODE;
+	struct tnode {
+	int count;
+	TNODE *left, *right;
+	};
+	TNODE s, *sp;
+	 --End Example]
+	 */
+	public void test6_7_2_3s10() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("typedef struct tnode TNODE;\n"); //$NON-NLS-1$
+		buffer.append("struct tnode {\n"); //$NON-NLS-1$
+		buffer.append("int count;\n"); //$NON-NLS-1$
+		buffer.append("TNODE *left, *right;\n"); //$NON-NLS-1$
+		buffer.append("};\n"); //$NON-NLS-1$
+		buffer.append("TNODE s, *sp;\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.2.3-11):
+	struct s2;
+	struct s1 { struct s2 *s2p; }; // D1
+	struct s2 { struct s1 *s1p; }; // D2
+	 --End Example]
+	 */
+	public void test6_7_2_3s11() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("struct s2;\n"); //$NON-NLS-1$
+		buffer.append("struct s1 { struct s2 *s2p; }; // D1\n"); //$NON-NLS-1$
+		buffer.append("struct s2 { struct s1 *s1p; }; // D2\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.3-10):
+		extern const volatile int real_time_clock;
+	 --End Example]
+	 */
+	public void test6_7_3s10() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("extern const volatile int real_time_clock;\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.3-11):
+	int f() {
+	const struct s { int mem; } cs = { 1 };
+	struct s ncs; // the object ncs is modifiable
+	typedef int A[2][3];
+	const A a = {{4, 5, 6}, {7, 8, 9}}; // array of array of const int
+	int *pi;
+	const int *pci;
+	ncs = cs; // valid
+	cs = ncs; // violates modifiable lvalue constraint for =
+	pi = &ncs.mem; // valid
+	pi = &cs.mem; // violates type constraints for =
+	pci = &cs.mem; // valid
+	pi = a[0]; // invalid: a[0] has type ''const int *''
+	}
+	 --End Example]
+	 */
+	public void test6_7_3s11() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("const struct s { int mem; } cs = { 1 };\n"); //$NON-NLS-1$
+		buffer.append("struct s ncs; // the object ncs is modifiable\n"); //$NON-NLS-1$
+		buffer.append("typedef int A[2][3];\n"); //$NON-NLS-1$
+		buffer.append("const A a = {{4, 5, 6}, {7, 8, 9}}; // array of array of const int\n"); //$NON-NLS-1$
+		buffer.append("int *pi;\n"); //$NON-NLS-1$
+		buffer.append("const int *pci;\n"); //$NON-NLS-1$
+		buffer.append("ncs = cs; // valid\n"); //$NON-NLS-1$
+		buffer.append("cs = ncs; // violates modifiable lvalue constraint for =\n"); //$NON-NLS-1$
+		buffer.append("pi = &ncs.mem; // valid\n"); //$NON-NLS-1$
+		buffer.append("pi = &cs.mem; // violates type constraints for =\n"); //$NON-NLS-1$
+		buffer.append("pci = &cs.mem; // valid\n"); //$NON-NLS-1$
+		buffer.append("pi = a[0]; // invalid: a[0] has type ''const int *''\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.3.1-7):
+	int * restrict a;
+	int * restrict b;
+	extern int c[];
+	 --End Example]
+	 */
+	public void test6_7_3_1s7() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int * restrict a;\n"); //$NON-NLS-1$
+		buffer.append("int * restrict b;\n"); //$NON-NLS-1$
+		buffer.append("extern int c[];\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.3.1-8):
+	void f(int n, int * restrict p, int * restrict q)
+	{
+	while (n-- > 0)
+	*p++ = *q++;
+	}
+	 --End Example]
+	 */
+	public void test6_7_3_1s8() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("void f(int n, int * restrict p, int * restrict q)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("while (n-- > 0)\n"); //$NON-NLS-1$
+		buffer.append("*p++ = *q++;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.3.1-9):
+	void f(int n, int * restrict p, int * restrict q)
+	{
+	while (n-- > 0)
+	*p++ = *q++;
+	}
+	void g(void)
+	{
+	extern int d[100];
+	f(50, d + 50, d); // valid
+	f(50, d + 1, d); // undefined behavior
+	}
+	 --End Example]
+	 */
+	public void test6_7_3_1s9() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("void f(int n, int * restrict p, int * restrict q)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("while (n-- > 0)\n"); //$NON-NLS-1$
+		buffer.append("*p++ = *q++;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("void g(void)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("extern int d[100];\n"); //$NON-NLS-1$
+		buffer.append("f(50, d + 50, d); // valid\n"); //$NON-NLS-1$
+		buffer.append("f(50, d + 1, d); // undefined behavior\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.3.1-10):
+	void h(int n, int * restrict p, int * restrict q, int * restrict r)
+	{
+	int i;
+	for (i = 0; i < n; i++)
+	p[i] = q[i] + r[i];
+	}
+	 --End Example]
+	 */
+	public void test6_7_3_1s10() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("void h(int n, int * restrict p, int * restrict q, int * restrict r)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("int i;\n"); //$NON-NLS-1$
+		buffer.append("for (i = 0; i < n; i++)\n"); //$NON-NLS-1$
+		buffer.append("p[i] = q[i] + r[i];\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.3.1-11):
+	int f()
+	{
+	int * restrict p1;
+	int * restrict q1;
+	p1 = q1; // undefined behavior
+	{
+	int * restrict p2 = p1; // valid
+	int * restrict q2 = q1; // valid
+	p1 = q2; // undefined behavior
+	p2 = q2; // undefined behavior
+	}
+	}
+	 --End Example]
+	 */
+	public void test6_7_3_1s11() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f()\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("int * restrict p1;\n"); //$NON-NLS-1$
+		buffer.append("int * restrict q1;\n"); //$NON-NLS-1$
+		buffer.append("p1 = q1; // undefined behavior\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("int * restrict p2 = p1; // valid\n"); //$NON-NLS-1$
+		buffer.append("int * restrict q2 = q1; // valid\n"); //$NON-NLS-1$
+		buffer.append("p1 = q2; // undefined behavior\n"); //$NON-NLS-1$
+		buffer.append("p2 = q2; // undefined behavior\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.3.1-12):
+	typedef struct { int n; float * restrict v; } vector;
+	vector new_vector(int n)
+	{
+	vector t;
+	t.n = n;
+	t.v = malloc(n * sizeof (float));
+	return t;
+	}
+	 --End Example]
+	 */
+	public void test6_7_3_1s12() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("typedef struct { int n; float * restrict v; } vector;\n"); //$NON-NLS-1$
+		buffer.append("vector new_vector(int n)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("vector t;\n"); //$NON-NLS-1$
+		buffer.append("t.n = n;\n"); //$NON-NLS-1$
+		buffer.append("t.v = malloc(n * sizeof (float));\n"); //$NON-NLS-1$
+		buffer.append("return t;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.4-7):
+	inline double fahr(double t)
+	{
+	return (9.0 * t) / 5.0 + 32.0;
+	}
+	inline double cels(double t)
+	{
+	return (5.0 * (t - 32.0)) / 9.0;
+	}
+	extern double fahr(double); // creates an external definition
+	double convert(int is_fahr, double temp)
+	{
+	return is_fahr ? cels(temp) : fahr(temp);
+	}
+	 --End Example]
+	 */
+	public void test6_7_4s7() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("inline double fahr(double t)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("return (9.0 * t) / 5.0 + 32.0;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("inline double cels(double t)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("return (5.0 * (t - 32.0)) / 9.0;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("extern double fahr(double); // creates an external definition\n"); //$NON-NLS-1$
+		buffer.append("double convert(int is_fahr, double temp)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("return is_fahr ? cels(temp) : fahr(temp);\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.5.1-4):
+	const int *ptr_to_constant;
+	int *const constant_ptr1;
+	typedef int *int_ptr;
+	const int_ptr constant_ptr2;
+	 --End Example]
+	 */
+	public void test6_7_5_1s4() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("const int *ptr_to_constant;\n"); //$NON-NLS-1$
+		buffer.append("int *const constant_ptr1;\n"); //$NON-NLS-1$
+		buffer.append("typedef int *int_ptr;\n"); //$NON-NLS-1$
+		buffer.append("const int_ptr constant_ptr2;\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.5.2-7):
+	float fa[11], *afp[17];
+	 --End Example]
+	 */
+	public void test6_7_5_2s7() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("float fa[11], *afp[17];\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.5.2-8):
+	extern int *x;
+	extern int y[];
+	 --End Example]
+	 */
+	public void test6_7_5_2s8() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("extern int *x;\n"); //$NON-NLS-1$
+		buffer.append("extern int y[];\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.5.2-9):
+	extern int n;
+	extern int m;
+	void fcompat(void)
+	{
+	int a[n][6][m];
+	int (*p)[4][n+1];
+	int c[n][n][6][m];
+	int (*r)[n][n][n+1];
+	p = a; // invalid: not compatible because4 != 6
+	r = c; // compatible, but defined behavior only if
+	// n == 6 andm == n+1
+	}
+	 --End Example]
+	 */
+	public void test6_7_5_2s9() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("extern int n;\n"); //$NON-NLS-1$
+		buffer.append("extern int m;\n"); //$NON-NLS-1$
+		buffer.append("void fcompat(void)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("int a[n][6][m];\n"); //$NON-NLS-1$
+		buffer.append("int (*p)[4][n+1];\n"); //$NON-NLS-1$
+		buffer.append("int c[n][n][6][m];\n"); //$NON-NLS-1$
+		buffer.append("int (*r)[n][n][n+1];\n"); //$NON-NLS-1$
+		buffer.append("p = a; // invalid: not compatible because4 != 6\n"); //$NON-NLS-1$
+		buffer.append("r = c; // compatible, but defined behavior only if\n"); //$NON-NLS-1$
+		buffer.append("// n == 6 andm == n+1\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.5.2-10):
+	extern int n;
+	int A[n]; // invalid: file scope VLA
+	extern int (*p2)[n]; // invalid: file scope VM
+	int B[100]; // valid: file scope but not VM
+	void fvla(int m, int C[m][m]); // valid: VLA with prototype scope
+	void fvla(int m, int C[m][m]) // valid: adjusted to auto pointer to VLA
+	{
+	typedef int VLA[m][m]; // valid: block scope typedef VLA
+	struct tag {
+	int (*y)[n]; // invalid: y not ordinary identifier
+	int z[n]; // invalid: z not ordinary identifier
+	};
+	int D[m]; // valid: auto VLA
+	static int E[m]; // invalid: static block scope VLA
+	extern int F[m]; // invalid: F has linkage and is VLA
+	int (*s)[m]; // valid: auto pointer to VLA
+	extern int (*r)[m]; // invalid: r has linkage and points to VLA
+	static int (*q)[m] = &B; // valid: q is a static block pointer to VLA
+	}
+	 --End Example]
+	 */
+	public void test6_7_5_2s10() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("extern int n;\n"); //$NON-NLS-1$
+		buffer.append("int A[n]; // invalid: file scope VLA\n"); //$NON-NLS-1$
+		buffer.append("extern int (*p2)[n]; // invalid: file scope VM\n"); //$NON-NLS-1$
+		buffer.append("int B[100]; // valid: file scope but not VM\n"); //$NON-NLS-1$
+		buffer.append("void fvla(int m, int C[m][m]); // valid: VLA with prototype scope\n"); //$NON-NLS-1$
+		buffer.append("void fvla(int m, int C[m][m]) // valid: adjusted to auto pointer to VLA\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("typedef int VLA[m][m]; // valid: block scope typedef VLA\n"); //$NON-NLS-1$
+		buffer.append("struct tag {\n"); //$NON-NLS-1$
+		buffer.append("int (*y)[n]; // invalid: y not ordinary identifier\n"); //$NON-NLS-1$
+		buffer.append("int z[n]; // invalid: z not ordinary identifier\n"); //$NON-NLS-1$
+		buffer.append("};\n"); //$NON-NLS-1$
+		buffer.append("int D[m]; // valid: auto VLA\n"); //$NON-NLS-1$
+		buffer.append("static int E[m]; // invalid: static block scope VLA\n"); //$NON-NLS-1$
+		buffer.append("extern int F[m]; // invalid: F has linkage and is VLA\n"); //$NON-NLS-1$
+		buffer.append("int (*s)[m]; // valid: auto pointer to VLA\n"); //$NON-NLS-1$
+		buffer.append("extern int (*r)[m]; // invalid: r has linkage and points to VLA\n"); //$NON-NLS-1$
+		buffer.append("static int (*q)[m] = &B; // valid: q is a static block pointer to VLA\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.5.3-16):
+	int f(void), *fip(), (*pfi)();
+	 --End Example]
+	 */
+	public void test6_7_5_3s16() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f(void), *fip(), (*pfi)();\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.5.3-18):
+	int (*apfi[3])(int *x, int *y);
+	 --End Example]
+	 */
+	public void test6_7_5_3s18() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int (*apfi[3])(int *x, int *y);\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.5.3-19):
+	int (*fpfi(int (*)(long), int))(int, ...);
+	 --End Example]
+	 */
+	public void test6_7_5_3s19() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int (*fpfi(int (*)(long), int))(int, ...);\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.5.3-20):
+	void addscalar(int n, int m,
+	double a[n][n*m+300], double x);
+	int main()
+	{
+	double b[4][308];
+	addscalar(4, 2, b, 2.17);
+	return 0;
+	}
+	void addscalar(int n, int m,
+	double a[n][n*m+300], double x)
+	{
+	for (int i = 0; i < n; i++)
+	for (int j = 0, k = n*m+300; j < k; j++)
+	// a is a pointer to a VLA with n*m+300 elements
+	a[i][j] += x;
+	}
+	 --End Example]
+	 */
+	public void test6_7_5_3s20() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("void addscalar(int n, int m,\n"); //$NON-NLS-1$
+		buffer.append("double a[n][n*m+300], double x);\n"); //$NON-NLS-1$
+		buffer.append("int main()\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("double b[4][308];\n"); //$NON-NLS-1$
+		buffer.append("addscalar(4, 2, b, 2.17);\n"); //$NON-NLS-1$
+		buffer.append("return 0;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("void addscalar(int n, int m,\n"); //$NON-NLS-1$
+		buffer.append("double a[n][n*m+300], double x)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("for (int i = 0; i < n; i++)\n"); //$NON-NLS-1$
+		buffer.append("for (int j = 0, k = n*m+300; j < k; j++)\n"); //$NON-NLS-1$
+		buffer.append("// a is a pointer to a VLA with n*m+300 elements\n"); //$NON-NLS-1$
+		buffer.append("a[i][j] += x;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.5.3-21):
+	double maximum1(int n, int m, double a[n][m]);
+	double maximum2(int n, int m, double a[*][*]);
+	double maximum3(int n, int m, double a[ ][*]);
+	double maximum4(int n, int m, double a[ ][m]);
+	void f1(double (* restrict a)[5]);
+	void f2(double a[restrict][5]);
+	void f3(double a[restrict 3][5]);
+	void f4(double a[restrict static 3][5]);
+	 --End Example]
+	 */
+	public void test6_7_5_3s21() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("double maximum1(int n, int m, double a[n][m]);\n"); //$NON-NLS-1$
+		buffer.append("double maximum2(int n, int m, double a[*][*]);\n"); //$NON-NLS-1$
+		buffer.append("double maximum3(int n, int m, double a[ ][*]);\n"); //$NON-NLS-1$
+		buffer.append("double maximum4(int n, int m, double a[ ][m]);\n"); //$NON-NLS-1$
+		buffer.append("void f1(double (* restrict a)[5]);\n"); //$NON-NLS-1$
+		buffer.append("void f2(double a[restrict][5]);\n"); //$NON-NLS-1$
+		buffer.append("void f3(double a[restrict 3][5]);\n"); //$NON-NLS-1$
+		buffer.append("void f4(double a[restrict static 3][5]);\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.7-4):
+	typedef int MILES, KLICKSP();
+	typedef struct { double hi, lo; } range;
+	MILES distance;
+	extern KLICKSP *metricp;
+	range x;
+	range z, *zp;
+	 --End Example]
+	 */
+	public void test6_7_7s4() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("typedef int MILES, KLICKSP();\n"); //$NON-NLS-1$
+		buffer.append("typedef struct { double hi, lo; } range;\n"); //$NON-NLS-1$
+		buffer.append("MILES distance;\n"); //$NON-NLS-1$
+		buffer.append("extern KLICKSP *metricp;\n"); //$NON-NLS-1$
+		buffer.append("range x;\n"); //$NON-NLS-1$
+		buffer.append("range z, *zp;\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.7-5):
+	typedef struct s1 { int x; } t1, *tp1;
+	typedef struct s2 { int x; } t2, *tp2;
+	 --End Example]
+	 */
+	public void test6_7_7s5() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("typedef struct s1 { int x; } t1, *tp1;\n"); //$NON-NLS-1$
+		buffer.append("typedef struct s2 { int x; } t2, *tp2;\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.7-7):
+	typedef void fv(int), (*pfv)(int);
+	void (*signal(int, void (*)(int)))(int);
+	fv *signal(int, fv *);
+	pfv signal(int, pfv);
+	 --End Example]
+	 */
+	public void test6_7_7s7() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("typedef void fv(int), (*pfv)(int);\n"); //$NON-NLS-1$
+		buffer.append("void (*signal(int, void (*)(int)))(int);\n"); //$NON-NLS-1$
+		buffer.append("fv *signal(int, fv *);\n"); //$NON-NLS-1$
+		buffer.append("pfv signal(int, pfv);\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.7-8):
+	void copyt(int n)
+	{
+	typedef int B[n]; // B is n ints, n evaluated now
+	n += 1;
+	B a; // ais n ints, n without += 1
+	int b[n]; // a and b are different sizes
+	for (int i = 1; i < n; i++)
+	a[i-1] = b[i];
+	}
+	 --End Example]
+	 */
+	public void test6_7_7s8() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("void copyt(int n)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("typedef int B[n]; // B is n ints, n evaluated now\n"); //$NON-NLS-1$
+		buffer.append("n += 1;\n"); //$NON-NLS-1$
+		buffer.append("B a; // ais n ints, n without += 1\n"); //$NON-NLS-1$
+		buffer.append("int b[n]; // a and b are different sizes\n"); //$NON-NLS-1$
+		buffer.append("for (int i = 1; i < n; i++)\n"); //$NON-NLS-1$
+		buffer.append("a[i-1] = b[i];\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.8-24):
+	int i = 3.5;
+	complex c = 5 + 3 * I;
+	 --End Example]
+	 */
+	public void test6_7_8s24() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int i = 3.5;\n"); //$NON-NLS-1$
+		buffer.append("complex c = 5 + 3 * I;\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.8-25):
+	int x[] = { 1, 3, 5 };
+	 --End Example]
+	 */
+	public void test6_7_8s25() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int x[] = { 1, 3, 5 };\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.8-26a):
+	int y[4][3] = {
+	{ 1, 3, 5 },
+	{ 2, 4, 6 },
+	{ 3, 5, 7 },
+	};
+	 --End Example]
+	 */
+	public void test6_7_8s26a() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int y[4][3] = {\n"); //$NON-NLS-1$
+		buffer.append("{ 1, 3, 5 },\n"); //$NON-NLS-1$
+		buffer.append("{ 2, 4, 6 },\n"); //$NON-NLS-1$
+		buffer.append("{ 3, 5, 7 },\n"); //$NON-NLS-1$
+		buffer.append("};\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.8-26b):
+	int y[4][3] = {
+	1, 3, 5, 2, 4, 6, 3, 5, 7
+	};
+	 --End Example]
+	 */
+	public void test6_7_8s26b() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int y[4][3] = {\n"); //$NON-NLS-1$
+		buffer.append("1, 3, 5, 2, 4, 6, 3, 5, 7\n"); //$NON-NLS-1$
+		buffer.append("};\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.8-27):
+	int z[4][3] = {
+	{ 1 }, { 2 }, { 3 }, { 4 }
+	};
+	 --End Example]
+	 */
+	public void test6_7_8s27() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int z[4][3] = {\n"); //$NON-NLS-1$
+		buffer.append("{ 1 }, { 2 }, { 3 }, { 4 }\n"); //$NON-NLS-1$
+		buffer.append("};\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.8-28):
+	struct { int a[3], b; } w[] = { { 1 }, 2 };
+	 --End Example]
+	 */
+	public void test6_7_8s28() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("struct { int a[3], b; } w[] = { { 1 }, 2 };\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.8-29):
+	short q1[4][3][2] = {
+	{ 1 },
+	{ 2, 3 },
+	{ 4, 5, 6 }
+	};
+	short q2[4][3][2] = {
+	1, 0, 0, 0, 0, 0,
+	2, 3, 0, 0, 0, 0,
+	4, 5, 6
+	};
+	short q3[4][3][2] = {
+	{
+	{ 1 },
+	},
+	{
+	{ 2, 3 },
+	},
+	{
+	{ 4, 5 },
+	{ 6 },
+	}
+	};
+	 --End Example]
+	 */
+	public void test6_7_8s29() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("short q1[4][3][2] = {\n"); //$NON-NLS-1$
+		buffer.append("{ 1 },\n"); //$NON-NLS-1$
+		buffer.append("{ 2, 3 },\n"); //$NON-NLS-1$
+		buffer.append("{ 4, 5, 6 }\n"); //$NON-NLS-1$
+		buffer.append("};\n"); //$NON-NLS-1$
+		buffer.append("short q2[4][3][2] = {\n"); //$NON-NLS-1$
+		buffer.append("1, 0, 0, 0, 0, 0,\n"); //$NON-NLS-1$
+		buffer.append("2, 3, 0, 0, 0, 0,\n"); //$NON-NLS-1$
+		buffer.append("4, 5, 6\n"); //$NON-NLS-1$
+		buffer.append("};\n"); //$NON-NLS-1$
+		buffer.append("short q3[4][3][2] = {\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("{ 1 },\n"); //$NON-NLS-1$
+		buffer.append("},\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("{ 2, 3 },\n"); //$NON-NLS-1$
+		buffer.append("},\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("{ 4, 5 },\n"); //$NON-NLS-1$
+		buffer.append("{ 6 },\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("};\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.8-31):
+	typedef int A[]; // OK - declared with block scope
+	A a1 = { 1, 2 }, b1 = { 3, 4, 5 };
+	int a2[] = { 1, 2 }, b2[] = { 3, 4, 5 };
+	 --End Example]
+	 */
+	public void test6_7_8s31() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("typedef int A[]; // OK - declared with block scope\n"); //$NON-NLS-1$
+		buffer.append("A a1 = { 1, 2 }, b1 = { 3, 4, 5 };\n"); //$NON-NLS-1$
+		buffer.append("int a2[] = { 1, 2 }, b2[] = { 3, 4, 5 };\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.8-32):
+	int foo() {
+	char s1[] = "abc", t1[3] = "abc";
+	char s2[] = { 'a', 'b', 'c', '\0' },
+	t2[] = { 'a', 'b', 'c' };
+	char *p = "abc";
+	}
+	 --End Example]
+	 */
+	public void test6_7_8s32() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int foo() {\n"); //$NON-NLS-1$
+		buffer.append("char s1[] = \"abc\", t1[3] = \"abc\";\n"); //$NON-NLS-1$
+		buffer.append("char s2[] = { 'a', 'b', 'c', '\0' },\n"); //$NON-NLS-1$
+		buffer.append("t2[] = { 'a', 'b', 'c' };\n"); //$NON-NLS-1$
+		buffer.append("char *p = \"abc\";\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.8-33):
+	enum { member_one, member_two };
+	const char *nm[] = {
+	[member_two] = "member two",
+	[member_one] = "member one",
+	};
+	 --End Example]
+	 */
+	public void test6_7_8s33() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("enum { member_one, member_two };\n"); //$NON-NLS-1$
+		buffer.append("const char *nm[] = {\n"); //$NON-NLS-1$
+		buffer.append("[member_two] = \"member two\",\n"); //$NON-NLS-1$
+		buffer.append("[member_one] = \"member one\",\n"); //$NON-NLS-1$
+		buffer.append("};\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.8-34):
+	div_t answer = { .quot = 2, .rem = -1 };
+	 --End Example]
+	 */
+	public void test6_7_8s34() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("div_t answer = { .quot = 2, .rem = -1 };\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 1); // div_t (correctly) cannot be resolved
+	}
+	
+	/**
+	 [--Start Example(C 6.7.8-35):
+	struct { int a[3], b; } w[] =
+	{ [0].a = {1}, [1].a[0] = 2 };
+	 --End Example]
+	 */
+	public void test6_7_8s35() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("struct { int a[3], b; } w[] =\n"); //$NON-NLS-1$
+		buffer.append("{ [0].a = {1}, [1].a[0] = 2 };\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.8-36):
+	int MAX=15;
+	int a[MAX] = {
+	1, 3, 5, 7, 9, [MAX-5] = 8, 6, 4, 2, 0
+	};
+	 --End Example]
+	 */
+	public void test6_7_8s36() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int MAX=15;\n"); //$NON-NLS-1$
+		buffer.append("int a[MAX] = {\n"); //$NON-NLS-1$
+		buffer.append("1, 3, 5, 7, 9, [MAX-5] = 8, 6, 4, 2, 0\n"); //$NON-NLS-1$
+		buffer.append("};\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.8-38):
+	union { int any_member; } u = { .any_member = 42 };
+	 --End Example]
+	 */
+	public void test6_7_8s38() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("union { int any_member; } u = { .any_member = 42 };\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.8.3-4):
+	int p(int);
+	int f() {
+	(void)p(0);
+	}
+	 --End Example]
+	 */
+	public void test6_8_3s4() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int p(int);\n"); //$NON-NLS-1$
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("(void)p(0);\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.8.3-5):
+	int f() {
+	char *s;
+	while (*s++ != '\0')
+	;
+	}
+	 --End Example]
+	 */
+	public void test6_8_3s5() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("char *s;\n"); //$NON-NLS-1$
+		buffer.append("while (*s++ != '\0')\n"); //$NON-NLS-1$
+		buffer.append(";\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.8.3-6):
+	int f() {
+	int i=1;
+	while (i) {
+	while (1) {
+	i=0;
+	if (1)
+	goto end_loop1;
+	}
+	end_loop1: ;
+	}
+	}
+	 --End Example]
+	 */
+	public void test6_8_3s6() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("int i=1;\n"); //$NON-NLS-1$
+		buffer.append("while (i) {\n"); //$NON-NLS-1$
+		buffer.append("while (1) {\n"); //$NON-NLS-1$
+		buffer.append("i=0;\n"); //$NON-NLS-1$
+		buffer.append("if (1)\n"); //$NON-NLS-1$
+		buffer.append("goto end_loop1;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("end_loop1: ;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.8.4-7):
+	int f(int a) {}
+	int g(int expr) {
+	switch (expr)
+	{
+	int i = 4;
+	f(i);
+	case 0:
+	i = 17;
+	default:
+	f(i+1);
+	}
+	}
+	 --End Example]
+	 */
+	public void test6_8_4s7() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f(int a) {}\n"); //$NON-NLS-1$
+		buffer.append("int g(int expr) {\n"); //$NON-NLS-1$
+		buffer.append("switch (expr)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("int i = 4;\n"); //$NON-NLS-1$
+		buffer.append("f(i);\n"); //$NON-NLS-1$
+		buffer.append("case 0:\n"); //$NON-NLS-1$
+		buffer.append("i = 17;\n"); //$NON-NLS-1$
+		buffer.append("default:\n"); //$NON-NLS-1$
+		buffer.append("f(i+1);\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.8.6.1-3):
+	int f() {
+	goto first_time;
+	for (;;) {
+	// determine next operation
+	if (1) {
+	// reinitialize-only code
+	first_time:
+	// general initialization code
+	continue;
+	}
+	// handle other operations
+	}
+	}
+	 --End Example]
+	 */
+	public void test6_8_6_1s3() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("goto first_time;\n"); //$NON-NLS-1$
+		buffer.append("for (;;) {\n"); //$NON-NLS-1$
+		buffer.append("// determine next operation\n"); //$NON-NLS-1$
+		buffer.append("if (1) {\n"); //$NON-NLS-1$
+		buffer.append("// reinitialize-only code\n"); //$NON-NLS-1$
+		buffer.append("first_time:\n"); //$NON-NLS-1$
+		buffer.append("// general initialization code\n"); //$NON-NLS-1$
+		buffer.append("continue;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("// handle other operations\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.8.6.1-4):
+	int f() {
+	goto lab3; // invalid: going INTO scope of VLA.
+	{
+	double a[n];
+	a[j] = 4.4;
+	lab3:
+	a[j] = 3.3;
+	goto lab4; // valid: going WITHIN scope of VLA.
+	a[j] = 5.5;
+	lab4:
+	a[j] = 6.6;
+	}
+	goto lab4; // invalid: going INTO scope of VLA.
+	}
+	 --End Example]
+	 */
+	public void test6_8_6_1s4() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("goto lab3; // invalid: going INTO scope of VLA.\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("double a[n];\n"); //$NON-NLS-1$
+		buffer.append("a[j] = 4.4;\n"); //$NON-NLS-1$
+		buffer.append("lab3:\n"); //$NON-NLS-1$
+		buffer.append("a[j] = 3.3;\n"); //$NON-NLS-1$
+		buffer.append("goto lab4; // valid: going WITHIN scope of VLA.\n"); //$NON-NLS-1$
+		buffer.append("a[j] = 5.5;\n"); //$NON-NLS-1$
+		buffer.append("lab4:\n"); //$NON-NLS-1$
+		buffer.append("a[j] = 6.6;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("goto lab4; // invalid: going INTO scope of VLA.\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.8.6.4-4):
+	struct s { double i; } f(void);
+	union {
+	struct {
+	int f1;
+	struct s f2;
+	} u1;
+	struct {
+	struct s f3;
+	int f4;
+	} u2;
+	} g;
+	struct s f(void)
+	{
+	return g.u1.f2;
+	}
+	int foo() {
+	g.u2.f3 = f();
+	}
+	 --End Example]
+	 */
+	public void test6_8_6_4s4() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("struct s { double i; } f(void);\n"); //$NON-NLS-1$
+		buffer.append("union {\n"); //$NON-NLS-1$
+		buffer.append("struct {\n"); //$NON-NLS-1$
+		buffer.append("int f1;\n"); //$NON-NLS-1$
+		buffer.append("struct s f2;\n"); //$NON-NLS-1$
+		buffer.append("} u1;\n"); //$NON-NLS-1$
+		buffer.append("struct {\n"); //$NON-NLS-1$
+		buffer.append("struct s f3;\n"); //$NON-NLS-1$
+		buffer.append("int f4;\n"); //$NON-NLS-1$
+		buffer.append("} u2;\n"); //$NON-NLS-1$
+		buffer.append("} g;\n"); //$NON-NLS-1$
+		buffer.append("struct s f(void)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("return g.u1.f2;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("int foo() {\n"); //$NON-NLS-1$
+		buffer.append("g.u2.f3 = f();\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.9.1-13):
+	extern int max(int a, int b)
+	{
+	return a > b ? a : b;
+	}
+	 --End Example]
+	 */
+	public void test6_9_1s13() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("extern int max(int a, int b)\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("return a > b ? a : b;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.9.1-14):
+	void g(int (*funcp)(void))
+	{
+	(*funcp)();
+	funcp();
+	}
+	 --End Example]
+	 */
+	public void test6_9_1s14() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("void g(int (*funcp)(void))\n"); //$NON-NLS-1$
+		buffer.append("{\n"); //$NON-NLS-1$
+		buffer.append("(*funcp)();\n"); //$NON-NLS-1$
+		buffer.append("funcp();\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.9.2-4):
+	int i1 = 1; // definition, external linkage
+	static int i2 = 2; // definition, internal linkage
+	extern int i3 = 3; // definition, external linkage
+	int i4; // tentative definition, external linkage
+	static int i5; // tentative definition, internal linkage
+	int i1; // valid tentative definition, refers to pre vious
+	//int i2; // 6.2.2 renders undefined, linkage disagreement
+	int i3; // valid tentative definition, refers to pre vious
+	int i4; // valid tentative definition, refers to pre vious
+	//int i5; // 6.2.2 renders undefined, linkage disagreement
+	extern int i1; // refers to pre vious, whose linkage is external
+	extern int i2; // refers to pre vious, whose linkage is internal
+	extern int i3; // refers to pre vious, whose linkage is external
+	extern int i4; // refers to pre vious, whose linkage is external
+	extern int i5; // refers to pre vious, whose linkage is internal
+	 --End Example]
+	 */
+	public void test6_9_2s4() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int i1 = 1; // definition, external linkage\n"); //$NON-NLS-1$
+		buffer.append("static int i2 = 2; // definition, internal linkage\n"); //$NON-NLS-1$
+		buffer.append("extern int i3 = 3; // definition, external linkage\n"); //$NON-NLS-1$
+		buffer.append("int i4; // tentative definition, external linkage\n"); //$NON-NLS-1$
+		buffer.append("static int i5; // tentative definition, internal linkage\n"); //$NON-NLS-1$
+		buffer.append("int i1; // valid tentative definition, refers to pre vious\n"); //$NON-NLS-1$
+		buffer.append("//int i2; // 6.2.2 renders undefined, linkage disagreement\n"); //$NON-NLS-1$
+		buffer.append("int i3; // valid tentative definition, refers to pre vious\n"); //$NON-NLS-1$
+		buffer.append("int i4; // valid tentative definition, refers to pre vious\n"); //$NON-NLS-1$
+		buffer.append("//int i5; // 6.2.2 renders undefined, linkage disagreement\n"); //$NON-NLS-1$
+		buffer.append("extern int i1; // refers to pre vious, whose linkage is external\n"); //$NON-NLS-1$
+		buffer.append("extern int i2; // refers to pre vious, whose linkage is internal\n"); //$NON-NLS-1$
+		buffer.append("extern int i3; // refers to pre vious, whose linkage is external\n"); //$NON-NLS-1$
+		buffer.append("extern int i4; // refers to pre vious, whose linkage is external\n"); //$NON-NLS-1$
+		buffer.append("extern int i5; // refers to pre vious, whose linkage is internal\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.10.1-4):
+	int g() {}
+	int f() {
+	#if 'z' - 'a' == 25
+	g();
+	#endif
+	if ('z' - 'a' == 25)
+	g();
+	}
+	 --End Example]
+	 */
+	public void test6_10_1s4() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int g() {}\n"); //$NON-NLS-1$
+		buffer.append("int f() {\n"); //$NON-NLS-1$
+		buffer.append("#if 'z' - 'a' == 25\n"); //$NON-NLS-1$
+		buffer.append("g();\n"); //$NON-NLS-1$
+		buffer.append("#endif\n"); //$NON-NLS-1$
+		buffer.append("if ('z' - 'a' == 25)\n"); //$NON-NLS-1$
+		buffer.append("g();\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.10.3.3-4):
+	#define hash_hash # ## #
+	#define mkstr(a) # a
+	#define in_between(a) mkstr(a)
+	#define join(c, d) in_between(c hash_hash d)
+	char p[] = join(x, y); // equivalent to
+	// char p[] = "x ## y";
+	 --End Example]
+	 */
+	public void test6_10_3_3s4() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define hash_hash # ## #\n"); //$NON-NLS-1$
+		buffer.append("#define mkstr(a) # a\n"); //$NON-NLS-1$
+		buffer.append("#define in_between(a) mkstr(a)\n"); //$NON-NLS-1$
+		buffer.append("#define join(c, d) in_between(c hash_hash d)\n"); //$NON-NLS-1$
+		buffer.append("char p[] = join(x, y); // equivalent to\n"); //$NON-NLS-1$
+		buffer.append("// char p[] = \"x ## y\";\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.10.3.5-3):
+	#define TABSIZE 100
+	int table[TABSIZE];
+	 --End Example]
+	 */
+	public void test6_10_3_5s3() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define TABSIZE 100\n"); //$NON-NLS-1$
+		buffer.append("int table[TABSIZE];\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.10.3.5-4):
+	#define max(a, b) ((a) > (b) ? (a) : (b))
+	 --End Example]
+	 */
+	public void test6_10_3_5s4() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define max(a, b) ((a) > (b) ? (a) : (b))\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.10.3.5-5):
+	#define x 3
+	#define f(a) f(x * (a))
+	#undef x
+	#define x 2
+	#define g f
+	#define z z[0]
+	#define h g(~
+	#define m(a) a(w)
+	#define w 0,1
+	#define t(a) a
+	#define p() int
+	#define q(x) x
+	#define r(x,y) x ## y
+	#define str(x) # x
+	int foo() {
+	p() i[q()] = { q(1), r(2,3), r(4,), r(,5), r(,) };
+	char c[2][6] = { str(hello), str() };
+	}
+	 --End Example]
+	 */
+	public void test6_10_3_5s5() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define x 3\n"); //$NON-NLS-1$
+		buffer.append("#define f(a) f(x * (a))\n"); //$NON-NLS-1$
+		buffer.append("#undef x\n"); //$NON-NLS-1$
+		buffer.append("#define x 2\n"); //$NON-NLS-1$
+		buffer.append("#define g f\n"); //$NON-NLS-1$
+		buffer.append("#define z z[0]\n"); //$NON-NLS-1$
+		buffer.append("#define h g(~\n"); //$NON-NLS-1$
+		buffer.append("#define m(a) a(w)\n"); //$NON-NLS-1$
+		buffer.append("#define w 0,1\n"); //$NON-NLS-1$
+		buffer.append("#define t(a) a\n"); //$NON-NLS-1$
+		buffer.append("#define p() int\n"); //$NON-NLS-1$
+		buffer.append("#define q(x) x\n"); //$NON-NLS-1$
+		buffer.append("#define r(x,y) x ## y\n"); //$NON-NLS-1$
+		buffer.append("#define str(x) # x\n"); //$NON-NLS-1$
+		buffer.append("int foo() {\n"); //$NON-NLS-1$
+		buffer.append("p() i[q()] = { q(1), r(2,3), r(4,), r(,5), r(,) };\n"); //$NON-NLS-1$
+		buffer.append("char c[2][6] = { str(hello), str() };\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+
+	/**
+	 [--Start Example(C 6.10.3.5-6):
+	#define str(s) # s
+	#define xstr(s) str(s)
+	#define debug(s, t) printf("x" # s "= %d, x" # t "= %s", \
+	x ## s, x ## t)
+	#define INCFILE(n) vers ## n
+	#define glue(a, b) a ## b
+	#define xglue(a, b) glue(a, b)
+	#define HIGHLOW "hello"
+	#define LOW LOW ", world"
+	int f() {
+	debug(1, 2);
+	fputs(str(strncmp("abc\0d", "abc", '\4') // this goes away
+	== 0) str(: @\n), s);
+	//#include xstr(INCFILE(2).h)
+	glue(HIGH, LOW);
+	xglue(HIGH, LOW)
+	}
+	 --End Example]
+	 */
+	public void test6_10_3_5s6() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define str(s) # s                    \n"); //$NON-NLS-1$
+		buffer.append("#define xstr(s) str(s)                \n"); //$NON-NLS-1$
+		buffer.append("#define debug(s, t) printf(\"x\" # s \"= %d, x\" # t \"= %s\", \\\n"); //$NON-NLS-1$
+		buffer.append("x ## s, x ## t)                       \n"); //$NON-NLS-1$
+		buffer.append("#define INCFILE(n) vers ## n          \n"); //$NON-NLS-1$
+		buffer.append("#define glue(a, b) a ## b             \n"); //$NON-NLS-1$
+		buffer.append("#define xglue(a, b) glue(a, b)        \n"); //$NON-NLS-1$
+		buffer.append("#define HIGHLOW \"hello\"             \n"); //$NON-NLS-1$
+		buffer.append("#define LOW LOW \", world\"           \n"); //$NON-NLS-1$
+		buffer.append("void printf( char *, ...);            \n"); //$NON-NLS-1$
+		buffer.append("void fputs( char *, ... );            \n"); //$NON-NLS-1$
+		buffer.append("int x1, x2, s;                        \n"); //$NON-NLS-1$
+		buffer.append("int f() {                             \n"); //$NON-NLS-1$
+		buffer.append("   debug(1, 2);                       \n"); //$NON-NLS-1$
+		buffer.append("   fputs(str(strncmp(\"abc\0d\", \"abc\", '\4') // this goes away\n"); //$NON-NLS-1$
+		buffer.append("   == 0) str(: @\n), s);              \n"); //$NON-NLS-1$
+		buffer.append("   char * c = glue(HIGH, LOW);        \n"); //$NON-NLS-1$
+		buffer.append("   c = xglue(HIGH, LOW);              \n"); //$NON-NLS-1$
+		buffer.append("}                                     \n"); //$NON-NLS-1$
+
+		parseCandCPP(buffer.toString(), false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.10.3.5-7):
+	#define t(x,y,z) x ## y ## z
+	int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,),
+	t(10,,), t(,11,), t(,,12), t(,,) };
+	 --End Example]
+	 */
+	public void test6_10_3_5s7() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define t(x,y,z) x ## y ## z\n"); //$NON-NLS-1$
+		buffer.append("int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,),\n"); //$NON-NLS-1$
+		buffer.append("t(10,,), t(,11,), t(,,12), t(,,) };\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+
+	/**
+	 [--Start Example(C 6.10.3.5-8):
+	#define OBJ_LIKE1 (1-1)
+	#define OBJ_LIKE2    \
+        	(1-1)       \
+	#define FUNC_LIKE1(a) ( a )
+	#define FUNC_LIKE2( a )(              \
+                	a                    \
+                      	)
+	 --End Example]
+	 */
+	public void test6_10_3_5s8() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define OBJ_LIKE1 (1-1)\n"); //$NON-NLS-1$
+		buffer.append("#define OBJ_LIKE2    \\n"); //$NON-NLS-1$
+	    buffer.append("         (1-1)       \\n"); //$NON-NLS-1$
+		buffer.append("#define FUNC_LIKE1(a) ( a )\n"); //$NON-NLS-1$
+		buffer.append("#define FUNC_LIKE2( a )(              \\n"); //$NON-NLS-1$
+	    buffer.append("                 a                    \\n"); //$NON-NLS-1$
+		buffer.append("                                      )\n"); //$NON-NLS-1$
+		parseCandCPP(buffer.toString(), true, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.10.3.5-9):
+	#define debug(...) fprintf(stderr, __VA_ARGS__)
+	#define showlist(...) puts(#__VA_ARGS__)
+	#define report(test, ...) ((test)?puts(#test):\
+	printf(__VA_ARGS__))
+	int f() {
+	debug("Flag");
+	debug("X = %d\n", x);
+	showlist(The first, second, and third items.);
+	report(x>y, "x is %d but y is %d", x, y);
+	}
+	 --End Example]
+	 */
+	public void test6_10_3_5s9() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define debug(...) fprintf(stderr, __VA_ARGS__)\n"); //$NON-NLS-1$
+		buffer.append("#define showlist(...) puts(#__VA_ARGS__)\n"); //$NON-NLS-1$
+		buffer.append("#define report(test, ...) ((test)?puts(#test):\\\n"); //$NON-NLS-1$
+		buffer.append("printf(__VA_ARGS__))                             \n"); //$NON-NLS-1$
+		buffer.append("void fprintf( ... );                             \n"); //$NON-NLS-1$
+		buffer.append("void puts(char * );                              \n"); //$NON-NLS-1$
+		buffer.append("void printf( char *, ... );                      \n"); //$NON-NLS-1$
+		buffer.append("int stderr, x, y;                                \n");//$NON-NLS-1$
+		buffer.append("int f() {                                        \n"); //$NON-NLS-1$
+		buffer.append("   debug(\"Flag\");                              \n"); //$NON-NLS-1$
+		buffer.append("   debug(\"X = %d\\n\", x);                      \n"); //$NON-NLS-1$
+		buffer.append("   showlist(The first, second, and third items.);\n"); //$NON-NLS-1$
+		buffer.append("   report(x>y, \"x is %d but y is %d\", x, y);   \n"); //$NON-NLS-1$
+		buffer.append("}                                                \n"); //$NON-NLS-1$
+
+		parseCandCPP(buffer.toString(), false, 0);
+	}
+	
+	/**
+	 [--Start Example(C 6.7.7-6):
+	typedef signed int t;
+	typedef int plain;
+	struct tag {
+	unsigned t:4;
+	const t:5;
+	plain r:5;
+	};
+	t f(t (t));
+	long t;
+	 --End Example]
+	 */
+	public void test6_7_7s6() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("typedef signed int t;\n"); //$NON-NLS-1$
+		buffer.append("typedef int plain;\n"); //$NON-NLS-1$
+		buffer.append("struct tag {\n"); //$NON-NLS-1$
+		buffer.append("unsigned t:4;\n"); //$NON-NLS-1$
+		buffer.append("const t:5;\n"); //$NON-NLS-1$
+		buffer.append("plain r:5;\n"); //$NON-NLS-1$
+		buffer.append("};\n"); //$NON-NLS-1$
+		buffer.append("t f(t (t));\n"); //$NON-NLS-1$
+		buffer.append("long t;\n"); //$NON-NLS-1$
+
+		parse(buffer.toString(), ParserLanguage.C, true, 0);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2FileBasePluginTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2FileBasePluginTest.java
new file mode 100644
index 0000000..d6f9967
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2FileBasePluginTest.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/*
+ * Created on Sept 28, 2004
+ */
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.FileManager;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * @author dsteffle
+ */
+public class AST2FileBasePluginTest extends TestCase {
+    static NullProgressMonitor		monitor;
+    static IWorkspace 				workspace;
+    static IProject 				project;
+    static FileManager 				fileManager;
+    static int						numProjects = 0;
+    static Class					className;
+	static ICProject cPrj;
+
+    public AST2FileBasePluginTest() {
+	}
+
+	public AST2FileBasePluginTest(String name) {
+		super(name);
+	}
+
+	private void initialize(Class aClassName){
+        if( CCorePlugin.getDefault() != null && CCorePlugin.getDefault().getCoreModel() != null){
+			//(CCorePlugin.getDefault().getCoreModel().getIndexManager()).reset();
+			monitor = new NullProgressMonitor();
+			
+			workspace = ResourcesPlugin.getWorkspace();
+			
+	        try {
+	        	cPrj = CProjectHelper.createCCProject("AST2BasedProjectMofo", "bin", IPDOMManager.ID_NO_INDEXER); //$NON-NLS-1$ //$NON-NLS-2$
+	        	
+	            project = cPrj.getProject();
+	            
+	            // ugly
+	            if (className == null || !className.equals(aClassName)) {
+	            	className = aClassName;
+	            	numProjects++;
+	            }
+	        } catch ( CoreException e ) {
+	            /*boo*/
+	        }
+			if (project == null)
+				throw new NullPointerException("Unable to create project"); //$NON-NLS-1$
+	
+			//Create file manager
+			fileManager = new FileManager();
+        }
+    }
+
+    public AST2FileBasePluginTest(String name, Class className)
+    {
+    	super(name);
+    	initialize(className);
+    }
+    
+    public void cleanupProject() throws Exception {
+    	numProjects--;
+    	
+    	try{
+    		if (numProjects == 0) {
+    			project.delete( true, false, monitor );
+    			project = null;
+    		}
+	    } catch( Throwable e ){
+	        /*boo*/
+	    }
+    }
+
+    protected void tearDown() throws Exception {
+        if( project == null || !project.exists() )
+            return;
+        
+        IResource [] members = project.members();
+        for( int i = 0; i < members.length; i++ ){
+            if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
+                continue;
+            if (members[i].getName().equals(".settings"))
+            	continue;
+            try{
+                members[i].delete( false, monitor );
+            } catch( Throwable e ){
+                /*boo*/
+            }
+        }
+	}
+
+    protected IFolder importFolder(String folderName) throws Exception {
+    	IFolder folder = project.getProject().getFolder(folderName);
+		
+		//Create file input stream
+		if( !folder.exists() )
+			folder.create( false, false, monitor );
+		
+		return folder;
+    }
+    public IFile importFile(String fileName, String contents ) throws Exception{
+		//Obtain file handle
+		IFile file = project.getProject().getFile(fileName);
+		
+		InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+		//Create file input stream
+		if( file.exists() )
+		    file.setContents( stream, false, false, monitor );
+		else
+			file.create( stream, false, monitor );
+		
+		fileManager.addFile(file);
+		
+		return file;
+	}
+    
+	protected StringBuffer[] getContents(int sections) throws IOException {
+		return TestSourceReader.getContentsForTest(
+				CTestPlugin.getDefault().getBundle(), "parser", getClass(), getName(), sections);
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2KnRTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2KnRTests.java
new file mode 100644
index 0000000..d9353f9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2KnRTests.java
@@ -0,0 +1,680 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *    IBM Rational Software - Initial API and implementation
+ *    Anton Leherbauer (Wind River Systems)
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTArraySubscriptExpression;
+import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
+import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
+import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarationStatement;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionStatement;
+import org.eclipse.cdt.core.dom.ast.IASTFieldReference;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionCallExpression;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNamedTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTNullStatement;
+import org.eclipse.cdt.core.dom.ast.IASTProblemDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTReturnStatement;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IField;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.IPointerType;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.c.ICASTTypedefNameSpecifier;
+import org.eclipse.cdt.core.dom.ast.c.ICBasicType;
+import org.eclipse.cdt.core.dom.ast.gnu.c.ICASTKnRFunctionDeclarator;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.internal.core.dom.parser.c.CParameter;
+import org.eclipse.cdt.internal.core.dom.parser.c.CScope;
+import org.eclipse.cdt.internal.core.dom.parser.c.CVisitor;
+import org.eclipse.cdt.internal.core.dom.parser.c.ICInternalBinding;
+
+/**
+ * @author dsteffle
+ */
+public class AST2KnRTests extends AST2BaseTest {
+	
+    public AST2KnRTests() {
+	}
+
+	public AST2KnRTests(String name) {
+		super(name);
+	}
+
+	public void testSimpleKRCTest1() throws Exception {
+    	StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$
+    	buffer.append( "int f(char x);\n" ); //$NON-NLS-1$
+    	buffer.append( "int f(x) char x;\n" ); //$NON-NLS-1$
+    	buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C, true );
+    	
+    	IASTSimpleDeclaration f1 = (IASTSimpleDeclaration)tu.getDeclarations()[0];
+    	IASTFunctionDefinition f2 = (IASTFunctionDefinition)tu.getDeclarations()[1];
+    	
+    	assertTrue( f1.getDeclarators()[0] instanceof IASTStandardFunctionDeclarator );
+    	
+    	IParameter x4 = (IParameter)((IASTIdExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f2.getBody()).getStatements()[0]).getReturnValue()).getOperand1()).getName().resolveBinding();
+    	IParameter x3 = (IParameter)((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)f2.getDeclarator()).getParameterDeclarations()[0]).getDeclarators()[0].getName().resolveBinding();
+    	IParameter x2 = (IParameter)((ICASTKnRFunctionDeclarator)f2.getDeclarator()).getParameterNames()[0].resolveBinding();
+    	IParameter x1 = (IParameter)((IASTStandardFunctionDeclarator)f1.getDeclarators()[0]).getParameters()[0].getDeclarator().getName().resolveBinding();
+	    	
+    	assertNotNull( x1 );
+    	assertNotNull( x2 );
+    	assertNotNull( x3 );
+    	assertNotNull( x4 );
+    	assertEquals( x1, x2 );
+    	assertEquals( x2, x3 );
+    	assertEquals( x3, x4 );
+    	
+		// test tu.getDeclarationsInAST(IBinding)
+		IASTName[] decls = tu.getDeclarationsInAST(x1);
+		assertEquals( decls.length, 2 );
+		assertEquals( decls[0], ((IASTStandardFunctionDeclarator)f1.getDeclarators()[0]).getParameters()[0].getDeclarator().getName() );
+		assertEquals( decls[1], ((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)f2.getDeclarator()).getParameterDeclarations()[0]).getDeclarators()[0].getName() );
+
+		assertNotNull( ((CScope)tu.getScope()).getBinding(CScope.NAMESPACE_TYPE_OTHER, new String("f").toCharArray()) ); //$NON-NLS-1$
+		assertNotNull( ((CScope)((IASTCompoundStatement)f2.getBody()).getScope()).getBinding(CScope.NAMESPACE_TYPE_OTHER, new String("x").toCharArray()) ); //$NON-NLS-1$
+    }
+
+    public void testSimpleKRCTest2() throws Exception {
+    	StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$
+    	buffer.append( "int f();\n" ); //$NON-NLS-1$
+    	buffer.append( "int f(x) char x;\n" ); //$NON-NLS-1$
+    	buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C, true );
+    	
+    	IASTSimpleDeclaration f1 = (IASTSimpleDeclaration)tu.getDeclarations()[0];
+    	IASTFunctionDefinition f2 = (IASTFunctionDefinition)tu.getDeclarations()[1];
+    	
+    	assertTrue( f1.getDeclarators()[0] instanceof IASTStandardFunctionDeclarator );
+    	
+    	IParameter x4 = (IParameter)((IASTIdExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f2.getBody()).getStatements()[0]).getReturnValue()).getOperand1()).getName().resolveBinding();
+    	IParameter x3 = (IParameter)((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)f2.getDeclarator()).getParameterDeclarations()[0]).getDeclarators()[0].getName().resolveBinding();
+    	IParameter x2 = (IParameter)((ICASTKnRFunctionDeclarator)f2.getDeclarator()).getParameterNames()[0].resolveBinding();
+	    	
+    	assertNotNull( x2 );
+    	assertNotNull( x3 );
+    	assertNotNull( x4 );
+    	assertEquals( x2, x3 );
+    	assertEquals( x3, x4 );
+    	
+		// test tu.getDeclarationsInAST(IBinding)
+		IASTName[] decls = tu.getDeclarationsInAST(x2); 
+		assertEquals( decls.length, 1 );
+		assertEquals( decls[0], ((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)f2.getDeclarator()).getParameterDeclarations()[0]).getDeclarators()[0].getName() );
+
+		assertNotNull( ((CScope)tu.getScope()).getBinding(CScope.NAMESPACE_TYPE_OTHER, new String("f").toCharArray()) ); //$NON-NLS-1$
+		assertNotNull( ((CScope)((IASTCompoundStatement)f2.getBody()).getScope()).getBinding(CScope.NAMESPACE_TYPE_OTHER, new String("x").toCharArray()) ); //$NON-NLS-1$
+    }
+
+    public void testSimpleKRCTest3() throws Exception {
+    	StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$
+    	buffer.append( "int const *f();\n" ); //$NON-NLS-1$
+    	buffer.append( "int const *f(x) char x;\n" ); //$NON-NLS-1$
+    	buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C, true );
+    	
+    	IASTSimpleDeclaration f1 = (IASTSimpleDeclaration)tu.getDeclarations()[0];
+    	IASTFunctionDefinition f2 = (IASTFunctionDefinition)tu.getDeclarations()[1];
+    	
+    	assertTrue( f1.getDeclarators()[0] instanceof IASTStandardFunctionDeclarator );
+    	
+    	IParameter x4 = (IParameter)((IASTIdExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f2.getBody()).getStatements()[0]).getReturnValue()).getOperand1()).getName().resolveBinding();
+    	IParameter x3 = (IParameter)((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)f2.getDeclarator()).getParameterDeclarations()[0]).getDeclarators()[0].getName().resolveBinding();
+    	IParameter x2 = (IParameter)((ICASTKnRFunctionDeclarator)f2.getDeclarator()).getParameterNames()[0].resolveBinding();
+	    	
+    	assertNotNull( x2 );
+    	assertNotNull( x3 );
+    	assertNotNull( x4 );
+    	assertEquals( x2, x3 );
+    	assertEquals( x3, x4 );
+    }
+    
+    public void testKRC_1() throws Exception {
+    	StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$
+    	buffer.append( "int isroot (x, y) /* comment */ \n" ); //$NON-NLS-1$
+    	buffer.append( "int x;\n" ); //$NON-NLS-1$
+    	buffer.append( "int y;\n" ); //$NON-NLS-1$
+    	buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C, true );
+    	
+    	IASTFunctionDefinition isroot_def = (IASTFunctionDefinition)tu.getDeclarations()[0];
+    	
+    	IASTName ret_x = ((IASTIdExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)isroot_def.getBody()).getStatements()[0]).getReturnValue()).getOperand1()).getName();
+    	IASTDeclarator isroot_decltor = isroot_def.getDeclarator();
+    	
+    	assertTrue( isroot_decltor instanceof ICASTKnRFunctionDeclarator );
+    	IASTDeclarator x1 = ((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)isroot_decltor).getParameterDeclarations()[0]).getDeclarators()[0];
+    	IASTDeclarator y1 = ((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)isroot_decltor).getParameterDeclarations()[1]).getDeclarators()[0];
+    	
+    	IParameter x_parm = (IParameter)x1.getName().resolveBinding();
+    	IParameter y_parm = (IParameter)y1.getName().resolveBinding();
+    	assertNotNull( x_parm );
+    	assertNotNull( y_parm );
+
+    	IASTDeclarator x2 = ((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)isroot_decltor).getParameterDeclarations()[0]).getDeclarators()[0];
+    	IASTDeclarator y2 = ((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)isroot_decltor).getParameterDeclarations()[1]).getDeclarators()[0];
+    	
+    	IParameter x_parm2 = (IParameter)x2.getName().resolveBinding();
+    	IParameter y_parm2 = (IParameter)y2.getName().resolveBinding();
+    	
+    	assertNotNull( x_parm2 );
+    	assertNotNull( y_parm2 );
+    	assertNotNull( ret_x.resolveBinding() );    	
+    	
+    	assertEquals( x_parm, x_parm2 );
+    	assertEquals( y_parm, y_parm2 );
+    	assertEquals( ret_x.resolveBinding(), x_parm );
+
+		// test tu.getDeclarationsInAST(IBinding)
+		IASTName[] decls = tu.getDeclarationsInAST(ret_x.resolveBinding()); 
+		assertEquals( decls.length, 1 );
+		assertEquals( decls[0], x1.getName() );
+
+		assertNotNull( ((CScope)tu.getScope()).getBinding(CScope.NAMESPACE_TYPE_OTHER, new String("isroot").toCharArray()) ); //$NON-NLS-1$
+		assertNotNull( ((CScope)((IASTCompoundStatement)isroot_def.getBody()).getScope()).getBinding(CScope.NAMESPACE_TYPE_OTHER, new String("x").toCharArray()) ); //$NON-NLS-1$
+		assertNotNull( ((CScope)((IASTCompoundStatement)isroot_def.getBody()).getScope()).getBinding(CScope.NAMESPACE_TYPE_OTHER, new String("y").toCharArray()) ); //$NON-NLS-1$
+    }
+
+    public void testKRCWithTypes() throws Exception {
+    	StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$
+    	buffer.append( "typedef char c;\n" ); //$NON-NLS-1$
+    	buffer.append( "int isroot (c);\n" ); //$NON-NLS-1$
+    	buffer.append( "int isroot (x) \n" ); //$NON-NLS-1$
+    	buffer.append( "c x;\n" ); //$NON-NLS-1$
+    	buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C, true );
+    	
+    	IASTSimpleDeclaration c_decl = (IASTSimpleDeclaration)tu.getDeclarations()[0];
+    	IASTSimpleDeclaration isroot_decl = (IASTSimpleDeclaration)tu.getDeclarations()[1];
+    	IASTFunctionDefinition isroot_def = (IASTFunctionDefinition)tu.getDeclarations()[2];
+
+    	//IASTName x0 = ((IASTStandardFunctionDeclarator)isroot_decl.getDeclarators()[0]).getParameters()[0].getDeclarator().getName();
+    	IASTName x1 = ((ICASTKnRFunctionDeclarator)isroot_def.getDeclarator()).getParameterNames()[0];
+    	IASTName x2 = ((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)isroot_def.getDeclarator()).getParameterDeclarations()[0]).getDeclarators()[0].getName();
+    	IASTName x3 = ((IASTIdExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)isroot_def.getBody()).getStatements()[0]).getReturnValue()).getOperand1()).getName();
+    	
+    	IParameter x1_var = (IParameter)x1.resolveBinding();
+    	IParameter x2_var = (IParameter)x2.resolveBinding();
+    	IParameter x3_var = (IParameter)x3.resolveBinding();
+    	
+    	assertNotNull(x1_var);
+    	assertNotNull(x2_var);
+    	assertNotNull(x3_var);
+    	assertEquals(x1_var, x2_var);
+    	assertEquals(x2_var, x3_var);
+    	
+    	IASTName c1 = c_decl.getDeclarators()[0].getName();
+    	IASTName c2 = ((IASTNamedTypeSpecifier)((IASTStandardFunctionDeclarator)isroot_decl.getDeclarators()[0]).getParameters()[0].getDeclSpecifier()).getName();
+    	IASTName c3 = ((IASTNamedTypeSpecifier)((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)isroot_def.getDeclarator()).getParameterDeclarations()[0]).getDeclSpecifier()).getName();
+    	
+    	ITypedef c1_t = (ITypedef)c1.resolveBinding();
+    	ITypedef c2_t = (ITypedef)c2.resolveBinding();
+    	ITypedef c3_t = (ITypedef)c3.resolveBinding();
+    	
+    	assertNotNull(c1_t);
+    	assertNotNull(c2_t);
+    	assertNotNull(c3_t);
+    	assertEquals(c1_t, c2_t);
+    	assertEquals(c2_t, c3_t);
+    	assertTrue(c1_t.getType() instanceof IBasicType);
+    	assertEquals(((IBasicType)c1_t.getType()).getType(), IBasicType.t_char);
+    	
+		// test tu.getDeclarationsInAST(IBinding)
+		IASTName[] decls = tu.getDeclarationsInAST(x3.resolveBinding()); 
+		assertEquals( decls.length, 1 );
+		assertEquals( decls[0], x2 );
+		
+		assertNotNull( ((CScope)tu.getScope()).getBinding(CScope.NAMESPACE_TYPE_OTHER, new String("c").toCharArray()) ); //$NON-NLS-1$
+		assertNotNull( ((CScope)tu.getScope()).getBinding(CScope.NAMESPACE_TYPE_OTHER, new String("isroot").toCharArray()) ); //$NON-NLS-1$
+		assertNotNull( ((CScope)((IASTCompoundStatement)isroot_def.getBody()).getScope()).getBinding(CScope.NAMESPACE_TYPE_OTHER, new String("x").toCharArray()) ); //$NON-NLS-1$
+    }
+
+    public void testKRCProblem1() throws Exception {
+    	StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$
+    	buffer.append( "int f(x) char\n" ); //$NON-NLS-1$
+    	buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C, true, false );
+    	IASTDeclaration[] decls= tu.getDeclarations();
+    
+    	assertTrue(CVisitor.getProblems(tu).length > 0); 
+    }
+    
+    public void testKRCProblem2() throws Exception {
+    	StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$
+    	buffer.append( "int i=0;\n" ); //$NON-NLS-1$
+    	buffer.append( "int f(x) i++;\n" ); //$NON-NLS-1$
+    	buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C, true, false );
+    	
+    	IASTSimpleDeclaration sd= getDeclaration(tu, 0);
+    	assertTrue(CVisitor.getProblems(tu).length > 0); 
+	}
+
+    public void testKRCProblem3() throws Exception {
+    	StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$
+    	buffer.append( "int f(x) char y;\n" ); //$NON-NLS-1$
+    	buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C, true, false );
+
+    	IASTFunctionDefinition f = (IASTFunctionDefinition)tu.getDeclarations()[0];
+    	assertTrue(f.getDeclarator() instanceof ICASTKnRFunctionDeclarator);
+    	ICASTKnRFunctionDeclarator f_kr = (ICASTKnRFunctionDeclarator)f.getDeclarator();
+    	assertEquals(f_kr.getName().toString(), "f"); //$NON-NLS-1$
+    	assertEquals(f_kr.getParameterNames()[0].toString(), "x"); //$NON-NLS-1$
+    	assertTrue(f_kr.getParameterDeclarations()[0] instanceof IASTProblemDeclaration);
+    	assertTrue(f.getBody() instanceof IASTCompoundStatement);
+    	assertTrue(((IASTCompoundStatement)f.getBody()).getStatements()[0] instanceof IASTReturnStatement);
+    	assertTrue(((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue() instanceof IASTBinaryExpression);
+    	assertTrue(((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand1() instanceof IASTIdExpression);
+    	assertEquals(((IASTIdExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand1()).getName().toString(), "x"); //$NON-NLS-1$
+    	assertTrue(((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand2() instanceof IASTLiteralExpression);
+    	assertEquals(((IASTLiteralExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand2()).toString(), "0"); //$NON-NLS-1$
+
+		// test tu.getDeclarationsInAST(IBinding)
+		IASTName[] decls = tu.getDeclarationsInAST(((IASTIdExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand1()).getName().resolveBinding()); 
+		assertEquals( decls.length, 0 );
+    }
+
+    public void testKRCProblem4() throws Exception {
+    	StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$
+    	buffer.append( "int f(x,y,z) char x,y,z; int a;\n" ); //$NON-NLS-1$
+    	buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C, true, false );
+
+    	IASTFunctionDefinition f = (IASTFunctionDefinition)tu.getDeclarations()[0];
+    	assertTrue(f.getDeclarator() instanceof ICASTKnRFunctionDeclarator);
+    	ICASTKnRFunctionDeclarator f_kr = (ICASTKnRFunctionDeclarator)f.getDeclarator();
+    	assertEquals(f_kr.getName().toString(), "f"); //$NON-NLS-1$
+    	assertEquals(f_kr.getParameterNames()[0].toString(), "x"); //$NON-NLS-1$
+    	assertTrue(f_kr.getParameterDeclarations()[0] instanceof IASTSimpleDeclaration);
+    	assertTrue(f_kr.getParameterDeclarations()[1] instanceof IASTProblemDeclaration);
+    	assertTrue(f.getBody() instanceof IASTCompoundStatement);
+    	assertTrue(((IASTCompoundStatement)f.getBody()).getStatements()[0] instanceof IASTReturnStatement);
+    	assertTrue(((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue() instanceof IASTBinaryExpression);
+    	assertTrue(((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand1() instanceof IASTIdExpression);
+    	assertEquals(((IASTIdExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand1()).getName().toString(), "x"); //$NON-NLS-1$
+    	assertTrue(((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand2() instanceof IASTLiteralExpression);
+    	assertEquals(((IASTLiteralExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand2()).toString(), "0"); //$NON-NLS-1$
+
+    	// bindings should still be ok
+    	IASTName x1 = f_kr.getParameterNames()[0];
+    	IASTName y1 = f_kr.getParameterNames()[1];
+    	IASTName z1 = f_kr.getParameterNames()[2];
+    	IASTName x2 = ((IASTSimpleDeclaration)f_kr.getParameterDeclarations()[0]).getDeclarators()[0].getName();
+    	IASTName y2 = ((IASTSimpleDeclaration)f_kr.getParameterDeclarations()[0]).getDeclarators()[1].getName();
+    	IASTName z2 = ((IASTSimpleDeclaration)f_kr.getParameterDeclarations()[0]).getDeclarators()[2].getName();
+    	IASTName x3 = ((IASTIdExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand1()).getName();
+    	
+    	IParameter x1_parm = (IParameter)x1.resolveBinding();
+    	IParameter x2_parm = (IParameter)x2.resolveBinding();
+    	IParameter x3_parm = (IParameter)x3.resolveBinding();
+    	IParameter y1_parm = (IParameter)y1.resolveBinding();
+    	IParameter y2_parm = (IParameter)y2.resolveBinding();
+    	IParameter z1_parm = (IParameter)z1.resolveBinding();
+    	IParameter z2_parm = (IParameter)z2.resolveBinding();
+    	
+    	assertEquals(x1_parm, x2_parm);
+    	assertEquals(x2_parm, x3_parm);
+    	assertEquals(y1_parm, y2_parm);
+    	assertEquals(z1_parm, z2_parm);
+    	
+		// test tu.getDeclarationsInAST(IBinding)
+		IASTName[] decls = tu.getDeclarationsInAST(((IASTIdExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand1()).getName().resolveBinding()); 
+		assertEquals( decls.length, 1 );
+		assertEquals( decls[0], x2 );
+		
+    }
+
+    public void testKRCProblem5() throws Exception {
+    	StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$
+    	buffer.append( "int f(x) char x,a;\n" ); //$NON-NLS-1$
+    	buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C, true, false );
+
+    	IASTFunctionDefinition f = (IASTFunctionDefinition)tu.getDeclarations()[0];
+    	assertTrue(f.getDeclarator() instanceof ICASTKnRFunctionDeclarator);
+    	ICASTKnRFunctionDeclarator f_kr = (ICASTKnRFunctionDeclarator)f.getDeclarator();
+    	assertEquals(f_kr.getName().toString(), "f"); //$NON-NLS-1$
+    	assertEquals(f_kr.getParameterNames()[0].toString(), "x"); //$NON-NLS-1$
+    	assertTrue(f_kr.getParameterDeclarations()[0] instanceof IASTProblemDeclaration);
+    	assertTrue(f.getBody() instanceof IASTCompoundStatement);
+    	assertTrue(((IASTCompoundStatement)f.getBody()).getStatements()[0] instanceof IASTReturnStatement);
+    	assertTrue(((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue() instanceof IASTBinaryExpression);
+    	assertTrue(((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand1() instanceof IASTIdExpression);
+    	assertEquals(((IASTIdExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand1()).getName().toString(), "x"); //$NON-NLS-1$
+    	assertTrue(((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand2() instanceof IASTLiteralExpression);
+    	assertEquals(((IASTLiteralExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand2()).toString(), "0"); //$NON-NLS-1$
+    	
+		// test tu.getDeclarationsInAST(IBinding)
+		IASTName[] decls = tu.getDeclarationsInAST(((IASTIdExpression)((IASTBinaryExpression)((IASTReturnStatement)((IASTCompoundStatement)f.getBody()).getStatements()[0]).getReturnValue()).getOperand1()).getName().resolveBinding()); 
+		assertEquals( decls.length, 0 );    	
+    }
+    
+    
+    public void testKRC_monop_cards1() throws Exception {
+    	StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$
+    	buffer.append( "#ifdef __STDC__\n" ); //$NON-NLS-1$
+    	buffer.append( "#define __P(x) x\n" ); //$NON-NLS-1$
+    	buffer.append( "#else\n" ); //$NON-NLS-1$
+    	buffer.append( "#define __P(x) ()\n" ); //$NON-NLS-1$
+    	buffer.append( "#endif\n" ); //$NON-NLS-1$
+    	buffer.append( "struct A_struct {\n" ); //$NON-NLS-1$
+    	buffer.append( "int a;\n" ); //$NON-NLS-1$
+    	buffer.append( "long *c;\n" ); //$NON-NLS-1$
+    	buffer.append( "};\n" ); //$NON-NLS-1$
+    	buffer.append( "typedef struct A_struct A;\n" ); //$NON-NLS-1$
+    	buffer.append( "static void f __P((A *));\n" ); //$NON-NLS-1$
+    	buffer.append( "static void\n" ); //$NON-NLS-1$
+    	buffer.append( "f(x)\n" ); //$NON-NLS-1$
+    	buffer.append( "A *x; {\n" ); //$NON-NLS-1$
+    	buffer.append( "x->a = 0;\n" ); //$NON-NLS-1$
+    	buffer.append( "x->c[1]=x->c[2];\n" ); //$NON-NLS-1$
+    	buffer.append( "}\n" ); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C, true );
+    	
+    	IASTSimpleDeclaration A_struct = (IASTSimpleDeclaration)tu.getDeclarations()[0];
+    	IASTSimpleDeclaration A = (IASTSimpleDeclaration)tu.getDeclarations()[1];
+    	IASTSimpleDeclaration f_decl = (IASTSimpleDeclaration)tu.getDeclarations()[2];
+    	IASTFunctionDefinition f_def = (IASTFunctionDefinition)tu.getDeclarations()[3];
+    	
+    	// check A_struct
+    	assertTrue( A_struct.getDeclSpecifier() instanceof IASTCompositeTypeSpecifier );
+    	assertEquals( A_struct.getDeclarators().length, 0 );
+    	IASTName A_struct_name1 = ((IASTCompositeTypeSpecifier)A_struct.getDeclSpecifier()).getName();
+    	assertEquals( A_struct_name1.toString(), "A_struct" ); //$NON-NLS-1$
+    	ICompositeType A_struct_type1 = (ICompositeType)A_struct_name1.resolveBinding();
+    	assertEquals( ((ICInternalBinding)A_struct_type1).getPhysicalNode(), ((IASTCompositeTypeSpecifier)A_struct.getDeclSpecifier()).getName() );
+    	IField[] fields = A_struct_type1.getFields();
+    	IField a1 = fields[0];
+    	IField c1 = fields[1];
+    	assertEquals( a1.getName().toString(), "a" ); //$NON-NLS-1$
+    	assertEquals( c1.getName().toString(), "c" ); //$NON-NLS-1$
+    	IBasicType a1_t = (IBasicType)a1.getType();
+    	IPointerType c1_t = (IPointerType)c1.getType();
+    	assertEquals( a1_t.getType(), IBasicType.t_int );
+    	assertTrue( c1_t.getType() instanceof IBasicType );
+    	assertTrue( ((IBasicType)c1_t.getType()).isLong() );
+    	
+    	// check A
+    	IASTName A_name1 = A.getDeclarators()[0].getName();
+    	assertEquals( A_name1.toString(), "A" ); //$NON-NLS-1$
+    	ITypedef A_var1 = (ITypedef)A_name1.resolveBinding();
+    	assertTrue( A.getDeclSpecifier() instanceof IASTElaboratedTypeSpecifier );
+    	IASTName A_struct_name_2 = ((IASTElaboratedTypeSpecifier)A.getDeclSpecifier()).getName();
+    	assertEquals( A_struct_name_2.toString(), "A_struct" ); //$NON-NLS-1$
+    	assertEquals( ((IASTElaboratedTypeSpecifier)A.getDeclSpecifier()).getStorageClass(), IASTDeclSpecifier.sc_typedef );
+    	ICompositeType A_struct_type2 = (ICompositeType)A_struct_name_2.resolveBinding();
+    	assertEquals( A_struct_type2, A_struct_type1 );
+    	
+    	// check f_decl
+    	assertTrue( f_decl.getDeclarators()[0] instanceof IASTStandardFunctionDeclarator );
+    	IASTStandardFunctionDeclarator f_decltor1 = ((IASTStandardFunctionDeclarator)f_decl.getDeclarators()[0]); 
+    	IASTName f_name1 = f_decltor1.getName();
+    	IFunction f_fun1 = (IFunction)f_name1.resolveBinding();
+    	assertEquals( f_name1.toString(), "f" ); //$NON-NLS-1$
+    	assertEquals( f_decltor1.getParameters().length, 1 );
+    	//IASTName x0 = f_decltor1.getParameters()[0].getDeclarator().getName();
+    	IASTName A_name2 = ((ICASTTypedefNameSpecifier)f_decltor1.getParameters()[0].getDeclSpecifier()).getName();
+    	assertEquals( A_name2.toString(), "A" ); //$NON-NLS-1$
+    	ITypedef A_var2 = (ITypedef)A_name2.resolveBinding();
+    	assertEquals( A_var1, A_var2 );
+    	
+    	// check f_def
+    	assertTrue( f_def.getDeclarator() instanceof ICASTKnRFunctionDeclarator );
+    	
+    	ICASTKnRFunctionDeclarator f_decltor2 = (ICASTKnRFunctionDeclarator)f_def.getDeclarator();
+    	assertEquals( f_decltor2.getName().toString(), "f" ); //$NON-NLS-1$
+    	IFunction f_fun2 = (IFunction)f_decltor2.getName().resolveBinding();
+    	assertEquals( f_fun1, f_fun2 );
+    	ICBasicType f_ret_t = (ICBasicType)f_fun2.getType().getReturnType();
+    	assertEquals( f_ret_t.getType(), IBasicType.t_void );
+    	IASTName x1 = f_decltor2.getParameterNames()[0];
+    	assertEquals( x1.toString(), "x" ); //$NON-NLS-1$
+    	IASTSimpleDeclaration x_parm = (IASTSimpleDeclaration)f_decltor2.getParameterDeclarations()[0];
+    	IASTName x2 = x_parm.getDeclarators()[0].getName();
+    	assertEquals( x2.toString(), "x" ); //$NON-NLS-1$
+    	assertEquals( x_parm.getDeclarators()[0].getPointerOperators().length, 1 );
+    	IASTName A3 = ((IASTNamedTypeSpecifier)x_parm.getDeclSpecifier()).getName();
+    	ITypedef A_var3 = (ITypedef)A3.resolveBinding();
+    	assertEquals( A_var2, A_var3 );
+    	assertEquals( A3.toString(), "A" ); //$NON-NLS-1$;
+    	assertEquals( x1.resolveBinding(), x2.resolveBinding() );
+    	
+    	// check f_def body
+    	assertTrue( f_def.getBody() instanceof IASTCompoundStatement );
+    	IASTCompoundStatement f_def_body = (IASTCompoundStatement)f_def.getBody();
+    	IASTExpressionStatement stmt1 = (IASTExpressionStatement)f_def_body.getStatements()[0];
+    	IASTExpressionStatement stmt2 = (IASTExpressionStatement)f_def_body.getStatements()[1];
+    	IASTName a2 = ((IASTFieldReference)((IASTBinaryExpression)stmt1.getExpression()).getOperand1()).getFieldName();
+    	assertEquals( ((IASTName)((ICInternalBinding)a1).getPhysicalNode()).resolveBinding(), a2.resolveBinding() );
+    	IASTName x3 = ((IASTIdExpression)((IASTFieldReference)((IASTBinaryExpression)stmt1.getExpression()).getOperand1()).getFieldOwner()).getName();
+    	assertEquals( x2.resolveBinding(), x3.resolveBinding() );
+    	assertEquals( ((IASTBinaryExpression)stmt1.getExpression()).getOperand2().toString(), "0" ); //$NON-NLS-1$
+    	assertTrue( ((IASTBinaryExpression)stmt2.getExpression()).getOperand1() instanceof  IASTArraySubscriptExpression );
+    	assertTrue( ((IASTBinaryExpression)stmt2.getExpression()).getOperand2() instanceof  IASTArraySubscriptExpression );
+    	IASTName c2 = ((IASTFieldReference)((IASTArraySubscriptExpression)((IASTBinaryExpression)stmt2.getExpression()).getOperand1()).getArrayExpression()).getFieldName();
+    	IASTName x4 = ((IASTIdExpression)((IASTFieldReference)((IASTArraySubscriptExpression)((IASTBinaryExpression)stmt2.getExpression()).getOperand1()).getArrayExpression()).getFieldOwner()).getName();
+    	IASTName c3 = ((IASTFieldReference)((IASTArraySubscriptExpression)((IASTBinaryExpression)stmt2.getExpression()).getOperand2()).getArrayExpression()).getFieldName();
+    	IASTName x5 = ((IASTIdExpression)((IASTFieldReference)((IASTArraySubscriptExpression)((IASTBinaryExpression)stmt2.getExpression()).getOperand1()).getArrayExpression()).getFieldOwner()).getName();
+    	assertEquals( ((IASTName)((ICInternalBinding)c1).getPhysicalNode()).resolveBinding(), c2.resolveBinding() );
+    	assertEquals( ((IASTName)((ICInternalBinding)c1).getPhysicalNode()).resolveBinding(), c3.resolveBinding() );
+    	assertEquals( x3.resolveBinding(), x4.resolveBinding() );
+    	assertEquals( x4.resolveBinding(), x5.resolveBinding() );
+    	
+    	// test CFunction.getParameters size
+    	IParameter[] f1_parms = f_fun1.getParameters();
+    	assertEquals( f1_parms.length, 1 );
+
+		// test tu.getDeclarationsInAST(IBinding)
+		IASTName[] decls = tu.getDeclarationsInAST(x2.resolveBinding()); 
+		assertEquals( decls.length, 1 );
+		assertEquals( decls[0], x2 );
+		
+		assertNotNull( ((CScope)tu.getScope()).getBinding(CScope.NAMESPACE_TYPE_TAG, new String("A_struct").toCharArray()) ); //$NON-NLS-1$
+		assertNotNull( ((CScope)tu.getScope()).getBinding(CScope.NAMESPACE_TYPE_OTHER, new String("A").toCharArray()) ); //$NON-NLS-1$
+		assertNotNull( ((CScope)tu.getScope()).getBinding(CScope.NAMESPACE_TYPE_OTHER, new String("f").toCharArray()) ); //$NON-NLS-1$
+		assertNotNull( ((CScope)((IASTCompoundStatement)f_def.getBody()).getScope()).getBinding(CScope.NAMESPACE_TYPE_OTHER, new String("x").toCharArray()) ); //$NON-NLS-1$
+    }
+    
+    public void testKRC_monop_cards2() throws Exception {
+    	StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$
+    	buffer.append( "int\n" ); //$NON-NLS-1$
+    	buffer.append( "getinp(prompt, list)\n" ); //$NON-NLS-1$
+    	buffer.append( "        const char *prompt, *const list[];\n" ); //$NON-NLS-1$
+    	buffer.append( "{\n	*list[1] = 'a';\n}\n" ); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C, true );
+    	
+    	IASTFunctionDefinition getinp = (IASTFunctionDefinition)tu.getDeclarations()[0];
+    	
+    	IASTName prompt1 = ((ICASTKnRFunctionDeclarator)getinp.getDeclarator()).getParameterNames()[0];
+    	IASTName list1 = ((ICASTKnRFunctionDeclarator)getinp.getDeclarator()).getParameterNames()[1];
+    	IASTName prompt2 = ((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)getinp.getDeclarator()).getParameterDeclarations()[0]).getDeclarators()[0].getName();
+    	IASTName list2 = ((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)getinp.getDeclarator()).getParameterDeclarations()[0]).getDeclarators()[1].getName();
+    	IASTName list3 = ((IASTIdExpression)((IASTArraySubscriptExpression)((IASTUnaryExpression)((IASTBinaryExpression)((IASTExpressionStatement)((IASTCompoundStatement)getinp.getBody()).getStatements()[0]).getExpression()).getOperand1()).getOperand()).getArrayExpression()).getName();
+    	
+    	assertEquals( prompt1.resolveBinding(), prompt2.resolveBinding() );
+    	assertEquals( list1.resolveBinding(), list2.resolveBinding() );
+    	assertEquals( list2.resolveBinding(), list3.resolveBinding() );
+    	
+    	IASTSimpleDeclaration parm_decl = (IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)getinp.getDeclarator()).getParameterDeclarations()[0];
+    	assertTrue( ((IASTSimpleDeclSpecifier)parm_decl.getDeclSpecifier()).isConst() );
+    	assertEquals( ((IASTSimpleDeclSpecifier)parm_decl.getDeclSpecifier()).getType(), IASTSimpleDeclSpecifier.t_char );
+    	IASTDeclarator prompt = parm_decl.getDeclarators()[0];
+    	IASTArrayDeclarator list = (IASTArrayDeclarator)parm_decl.getDeclarators()[1];
+    	assertEquals( prompt.getName().toString(), "prompt" ); //$NON-NLS-1$
+    	assertEquals( prompt.getPointerOperators().length, 1 );
+    	assertEquals( list.getName().toString(), "list" ); //$NON-NLS-1$
+    	assertEquals( list.getArrayModifiers().length, 1 );
+    	assertNull( list.getArrayModifiers()[0].getConstantExpression() );
+    	assertEquals( list.getPointerOperators().length, 1 );
+    	
+		// test tu.getDeclarationsInAST(IBinding)
+		IASTName[] decls = tu.getDeclarationsInAST(list3.resolveBinding()); 
+		assertEquals( decls.length, 1 );
+		assertEquals( decls[0], list2 );
+    	
+		decls = tu.getDeclarationsInAST(prompt1.resolveBinding()); 
+		assertEquals( decls.length, 1 );
+		assertEquals( decls[0], prompt2 );
+    }
+    
+    public void testKRC_getParametersOrder() throws Exception {
+    	StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$
+    	buffer.append( "int f(a, b) int b,a;{}\n" ); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C, true );
+    	
+    	IASTFunctionDefinition f = (IASTFunctionDefinition)tu.getDeclarations()[0];
+    	ICASTKnRFunctionDeclarator f_decltor = (ICASTKnRFunctionDeclarator)f.getDeclarator();
+    	IFunction f_fun = (IFunction)f_decltor.getName().resolveBinding();
+    	IParameter [] f_parms = f_fun.getParameters();
+    	assertEquals( f_parms.length, 2 );
+    	assertEquals( ((CParameter)f_parms[0]).getName(), "a" ); //$NON-NLS-1$
+    	assertEquals( ((CParameter)f_parms[1]).getName(), "b" ); //$NON-NLS-1$
+    	
+    }
+
+    public void testKRC_Ethereal_1() throws Exception {
+    	StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$
+    	buffer.append( "struct symbol {\n" ); //$NON-NLS-1$
+    	buffer.append( "int lambda;\n};\n" ); //$NON-NLS-1$
+    	buffer.append( "struct lemon {\n" ); //$NON-NLS-1$
+    	buffer.append( "struct symbol **symbols;\n" ); //$NON-NLS-1$
+    	buffer.append( "int errorcnt;\n};\n" ); //$NON-NLS-1$
+    	buffer.append( "void f(lemp)\n" ); //$NON-NLS-1$
+    	buffer.append( "struct lemon *lemp;\n{\n" ); //$NON-NLS-1$
+    	buffer.append( "lemp->symbols[1]->lambda = 1;\n" ); //$NON-NLS-1$
+    	buffer.append( "lemp->errorcnt++;}\n" ); //$NON-NLS-1$
+    	IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C, true );
+    	
+    	IASTSimpleDeclaration symbol_decl = (IASTSimpleDeclaration)tu.getDeclarations()[0];
+    	IASTSimpleDeclaration lemon_decl = (IASTSimpleDeclaration)tu.getDeclarations()[1];
+    	IASTFunctionDefinition f_def = (IASTFunctionDefinition)tu.getDeclarations()[2];
+    	
+    	IASTName symbol_name1 = ((IASTCompositeTypeSpecifier)symbol_decl.getDeclSpecifier()).getName();
+    	IASTName lambda_name1 = ((IASTSimpleDeclaration)((IASTCompositeTypeSpecifier)symbol_decl.getDeclSpecifier()).getMembers()[0]).getDeclarators()[0].getName();
+    	IASTName lemon_name1 = ((IASTCompositeTypeSpecifier)lemon_decl.getDeclSpecifier()).getName();
+    	IASTName symbol_name2 =  ((IASTElaboratedTypeSpecifier)((IASTSimpleDeclaration)((IASTCompositeTypeSpecifier)lemon_decl.getDeclSpecifier()).getMembers()[0]).getDeclSpecifier()).getName();
+    	IASTName symbols_name1 = ((IASTSimpleDeclaration)((IASTCompositeTypeSpecifier)lemon_decl.getDeclSpecifier()).getMembers()[0]).getDeclarators()[0].getName();
+    	IASTName errorcnt_name1 = ((IASTSimpleDeclaration)((IASTCompositeTypeSpecifier)lemon_decl.getDeclSpecifier()).getMembers()[1]).getDeclarators()[0].getName();
+    	IASTName lemp_name1 = ((ICASTKnRFunctionDeclarator)f_def.getDeclarator()).getParameterNames()[0];
+    	IASTName lemon_name2 = ((IASTElaboratedTypeSpecifier)((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)f_def.getDeclarator()).getParameterDeclarations()[0]).getDeclSpecifier()).getName();
+    	IASTName lemp_name2 = ((IASTSimpleDeclaration)((ICASTKnRFunctionDeclarator)f_def.getDeclarator()).getParameterDeclarations()[0]).getDeclarators()[0].getName();
+    	IASTName lemp_name3 = ((IASTIdExpression)((IASTFieldReference)((IASTArraySubscriptExpression)((IASTFieldReference)((IASTBinaryExpression)((IASTExpressionStatement)((IASTCompoundStatement)f_def.getBody()).getStatements()[0]).getExpression()).getOperand1()).getFieldOwner()).getArrayExpression()).getFieldOwner()).getName();
+    	IASTName symbols_name2 = ((IASTFieldReference)((IASTArraySubscriptExpression)((IASTFieldReference)((IASTBinaryExpression)((IASTExpressionStatement)((IASTCompoundStatement)f_def.getBody()).getStatements()[0]).getExpression()).getOperand1()).getFieldOwner()).getArrayExpression()).getFieldName();
+    	IASTName lambda_name2 = ((IASTFieldReference)((IASTBinaryExpression)((IASTExpressionStatement)((IASTCompoundStatement)f_def.getBody()).getStatements()[0]).getExpression()).getOperand1()).getFieldName();
+    	
+    	IASTName lemp_name4 = ((IASTIdExpression)((IASTFieldReference)((IASTUnaryExpression)((IASTExpressionStatement)((IASTCompoundStatement)f_def.getBody()).getStatements()[1]).getExpression()).getOperand()).getFieldOwner()).getName();
+    	IASTName errorcnt_name2 = ((IASTFieldReference)((IASTUnaryExpression)((IASTExpressionStatement)((IASTCompoundStatement)f_def.getBody()).getStatements()[1]).getExpression()).getOperand()).getFieldName();
+    	
+    	assertEquals( symbol_name1.resolveBinding(), symbol_name2.resolveBinding() );
+    	assertEquals( lambda_name1.resolveBinding(), lambda_name2.resolveBinding() );
+    	assertEquals( lemon_name1.resolveBinding(), lemon_name2.resolveBinding() );
+    	assertEquals( symbols_name1.resolveBinding(), symbols_name2.resolveBinding() );
+    	assertEquals( errorcnt_name1.resolveBinding(), errorcnt_name2.resolveBinding() );
+    	assertEquals( lemp_name1.resolveBinding(), lemp_name2.resolveBinding() );
+    	assertEquals( lemp_name2.resolveBinding(), lemp_name3.resolveBinding() );
+    	assertEquals( lemp_name3.resolveBinding(), lemp_name4.resolveBinding() );
+    }
+    
+    public void testBug97447() throws Exception {
+    	StringBuffer buffer = new StringBuffer();
+    	buffer.append("void f( a ) int a; {} \n"); //$NON-NLS-1$
+    	buffer.append("void f( int );        \n"); //$NON-NLS-1$
+    	
+		IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.C, true);
+        CNameCollector col = new CNameCollector();
+        tu.accept(col);
+
+        IFunction def = (IFunction) col.getName(0).resolveBinding();
+        IFunction f1 = (IFunction) col.getName(3).resolveBinding();
+        IParameter a = (IParameter) col.getName(4).resolveBinding();
+    }
+    
+    public void testBug100104() throws Exception {
+    	StringBuffer buffer = new StringBuffer();
+    	buffer.append("typedef int ush;\n"); //$NON-NLS-1$
+    	buffer.append("int f()\n"); //$NON-NLS-1$
+    	buffer.append("{\n"); //$NON-NLS-1$
+    	buffer.append("int a=1;\n"); //$NON-NLS-1$
+    	buffer.append("((ush)(a)*(ush)(a) * a);\n"); //$NON-NLS-1$
+    	buffer.append("{\n"); //$NON-NLS-1$
+    	buffer.append("};\n"); //$NON-NLS-1$
+    	buffer.append("}\n"); //$NON-NLS-1$
+    	
+		IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.C, true, true);
+        assertTrue( tu.getDeclarations()[0] instanceof IASTSimpleDeclaration );
+        assertTrue( tu.getDeclarations()[1] instanceof IASTFunctionDefinition );
+        IASTStatement[] stmts = ((IASTCompoundStatement)((IASTFunctionDefinition)tu.getDeclarations()[1]).getBody()).getStatements();
+        assertTrue( stmts[0] instanceof IASTDeclarationStatement );
+        assertTrue( stmts[1] instanceof IASTExpressionStatement );
+        assertTrue( stmts[2] instanceof IASTCompoundStatement );
+        assertTrue( stmts[3] instanceof IASTNullStatement );
+    }
+    
+    // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=203050
+    public void testBug203050() throws Exception {
+    	StringBuffer buffer = new StringBuffer();
+    	buffer.append("typedef long time_t;\n" +  //$NON-NLS-1$
+    			"\n" +  //$NON-NLS-1$
+    			"void (foo)(timep)\n" +  //$NON-NLS-1$
+    			"	const time_t * const timep;\n" +  //$NON-NLS-1$
+    			"{\n" +  //$NON-NLS-1$
+    			"	struct tm tmp;\n" +  //$NON-NLS-1$
+    			"	bar(timep, &tmp);\n" +  //$NON-NLS-1$
+    			"}\n" +  //$NON-NLS-1$
+    			"int (bar)(timep, tmp)\n" +  //$NON-NLS-1$
+    			"	const time_t * const	timep;\n" +  //$NON-NLS-1$
+    			"	struct tm * tmp;\n" +  //$NON-NLS-1$
+    			"{\n" +  //$NON-NLS-1$
+    			"	return 0;\n" +  //$NON-NLS-1$
+    			"}\n"); //$NON-NLS-1$
+    	
+		IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.C, true, true);
+        assertTrue( tu.getDeclarations()[0] instanceof IASTSimpleDeclaration );
+        assertTrue( tu.getDeclarations()[1] instanceof IASTFunctionDefinition );
+        assertTrue( tu.getDeclarations()[2] instanceof IASTFunctionDefinition );
+        IASTStatement[] stmts = ((IASTCompoundStatement)((IASTFunctionDefinition)tu.getDeclarations()[1]).getBody()).getStatements();
+        assertTrue( stmts[0] instanceof IASTDeclarationStatement );
+        assertTrue( stmts[1] instanceof IASTExpressionStatement );
+        IASTExpression expr= ((IASTExpressionStatement)stmts[1]).getExpression();
+        assertTrue(expr instanceof IASTFunctionCallExpression);
+        IASTIdExpression fnameExpr= (IASTIdExpression)((IASTFunctionCallExpression)expr).getFunctionNameExpression();
+        fnameExpr.getName().resolveBinding();
+        
+        IASTName fname= ((IASTFunctionDefinition)tu.getDeclarations()[2]).getDeclarator().getName();
+        try {
+        	fname.resolveBinding();
+        } catch (StackOverflowError e) {
+        	fail(e.getMessage());
+        }
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SelectionParseBaseTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SelectionParseBaseTest.java
new file mode 100644
index 0000000..6129d75
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SelectionParseBaseTest.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import org.eclipse.cdt.core.dom.CDOM;
+import org.eclipse.cdt.core.dom.IASTServiceProvider.UnsupportedDialectException;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.parser.ISourceCodeParser;
+import org.eclipse.cdt.core.dom.parser.c.ANSICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.GCCParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.ICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ANSICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.GPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.IParserLogService;
+import org.eclipse.cdt.core.parser.IScanner;
+import org.eclipse.cdt.core.parser.NullLogService;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.ParserMode;
+import org.eclipse.cdt.core.parser.ScannerInfo;
+import org.eclipse.cdt.core.parser.tests.FileBasePluginTest;
+import org.eclipse.cdt.internal.core.dom.parser.c.CVisitor;
+import org.eclipse.cdt.internal.core.dom.parser.c.GNUCSourceParser;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+import org.eclipse.core.resources.IFile;
+
+/**
+ * @author dsteffle
+ */
+public class AST2SelectionParseBaseTest extends FileBasePluginTest {
+
+    public AST2SelectionParseBaseTest() {
+	}
+
+	public AST2SelectionParseBaseTest(String name) {
+		super(name);
+	}
+
+	private static final IParserLogService NULL_LOG = new NullLogService();
+        
+	public AST2SelectionParseBaseTest(String name, Class className) {
+		super(name, className);
+	}
+
+	protected IASTNode parse(String code, ParserLanguage lang, int offset, int length) throws ParserException {
+		return parse(code, lang, false, false, offset, length);
+	}
+	
+	protected IASTNode parse(IFile file, ParserLanguage lang, int offset, int length) throws ParserException {
+		IASTTranslationUnit tu = parse(file, lang, false, false);
+		return tu.getNodeSelector(null).findNode(offset, length);
+	}
+	
+	protected IASTNode parse(String code, ParserLanguage lang, int offset, int length, boolean expectedToPass) throws ParserException {
+		return parse(code, lang, false, expectedToPass, offset, length);
+	}
+	
+	protected IASTNode parse(String code, ParserLanguage lang, boolean useGNUExtensions, boolean expectNoProblems, int offset, int length) throws ParserException {
+		IASTTranslationUnit tu = parse(code, lang, useGNUExtensions, expectNoProblems);
+		return tu.getNodeSelector(null).findNode(offset, length);
+	}	
+
+    /**
+     * @param string
+     * @param c
+     * @return
+     * @throws ParserException
+     */
+    protected IASTTranslationUnit parse( String code, ParserLanguage lang, boolean useGNUExtensions, boolean expectNoProblems ) throws ParserException {
+        CodeReader codeReader = new CodeReader(code
+                .toCharArray());
+        ScannerInfo scannerInfo = new ScannerInfo();
+        IScanner scanner= AST2BaseTest.createScanner(codeReader, lang, ParserMode.COMPLETE_PARSE, scannerInfo);
+        
+        ISourceCodeParser parser2 = null;
+        if( lang == ParserLanguage.CPP )
+        {
+            ICPPParserExtensionConfiguration config = null;
+            if (useGNUExtensions)
+            	config = new GPPParserExtensionConfiguration();
+            else
+            	config = new ANSICPPParserExtensionConfiguration();
+            parser2 = new GNUCPPSourceParser(scanner, ParserMode.COMPLETE_PARSE,
+                NULL_LOG,
+                config );
+        }
+        else
+        {
+            ICParserExtensionConfiguration config = null;
+
+            if (useGNUExtensions)
+            	config = new GCCParserExtensionConfiguration();
+            else
+            	config = new ANSICParserExtensionConfiguration();
+            
+            parser2 = new GNUCSourceParser( scanner, ParserMode.COMPLETE_PARSE, 
+                NULL_LOG, config );
+        }
+        
+        IASTTranslationUnit tu = parser2.parse();
+
+        if( parser2.encounteredError() && expectNoProblems )
+            throw new ParserException( "FAILURE"); //$NON-NLS-1$
+         
+        if( lang == ParserLanguage.C && expectNoProblems )
+        {
+        	assertEquals( CVisitor.getProblems(tu).length, 0 );
+        	assertEquals( tu.getPreprocessorProblems().length, 0 );
+        }
+        else if ( lang == ParserLanguage.CPP && expectNoProblems )
+        {
+        	assertEquals( CPPVisitor.getProblems(tu).length, 0 );
+        	assertEquals( tu.getPreprocessorProblems().length, 0 );
+        }
+        if( expectNoProblems )
+            assertEquals( 0, tu.getPreprocessorProblems().length );
+        
+        
+        return tu;
+    }
+    
+    protected IASTTranslationUnit parse( IFile file, ParserLanguage lang, boolean useGNUExtensions, boolean expectNoProblems ) throws ParserException {
+
+    	IASTTranslationUnit tu=null;
+		try {
+			tu = CDOM.getInstance().getASTService().getTranslationUnit(file);
+		} catch (UnsupportedDialectException e) {
+			assertFalse(true); // shouldn't happen
+		}
+
+        if( lang == ParserLanguage.C && expectNoProblems )
+        {
+        	assertEquals( CVisitor.getProblems(tu).length, 0 );
+        	assertEquals( tu.getPreprocessorProblems().length, 0 );
+        }
+        else if ( lang == ParserLanguage.CPP && expectNoProblems )
+        {
+        	assertEquals( CPPVisitor.getProblems(tu).length, 0 );
+        	assertEquals( tu.getPreprocessorProblems().length, 0 );
+        }
+        if( expectNoProblems )
+            assertEquals( 0, tu.getPreprocessorProblems().length );
+        
+        
+        return tu;
+    }
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SelectionParseTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SelectionParseTest.java
new file mode 100644
index 0000000..0c1dd6a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SelectionParseTest.java
@@ -0,0 +1,1668 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.io.StringWriter;
+import java.io.Writer;
+
+import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IASTIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTInitializerExpression;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNamedTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTPointer;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IEnumeration;
+import org.eclipse.cdt.core.dom.ast.IField;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.c.ICASTPointer;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+import org.eclipse.core.resources.IFile;
+
+/**
+ * @author dsteffle
+ */
+public class AST2SelectionParseTest extends AST2SelectionParseBaseTest {
+
+	public AST2SelectionParseTest() {
+	}
+
+	public AST2SelectionParseTest(String name, Class className) {
+		super(name, className);
+	}
+
+	public AST2SelectionParseTest(String name) {
+		super(name, AST2SelectionParseTest.class);
+	}
+
+	public void testBaseCase_VariableReference() throws Exception
+	{
+		String code = "void f() { int x; x=3; }"; //$NON-NLS-1$
+		int offset1 = code.indexOf( "x=" ); //$NON-NLS-1$
+		int length = "x".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, offset1, length ).getParent();
+		assertNotNull(node);
+		assertTrue( node instanceof IASTIdExpression );
+		assertEquals(((IASTIdExpression)node).getName().toString(), "x"); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, offset1, length ).getParent();
+		assertNotNull(node);
+		assertTrue( node instanceof IASTIdExpression );
+		assertEquals(((IASTIdExpression)node).getName().toString(), "x"); //$NON-NLS-1$
+		IASTName name = ((IASTIdExpression)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IVariable);
+		assertEquals(((IVariable)name.resolveBinding()).getName(), "x"); //$NON-NLS-1$
+	}
+
+	public void testBaseCase_FunctionReference() throws Exception
+	{
+		String code = "int x(){x( );}"; //$NON-NLS-1$
+		int offset1 = code.indexOf( "x( " ); //$NON-NLS-1$
+		int length = "x".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, offset1, length ).getParent();
+		assertNotNull(node);
+		assertTrue( node instanceof IASTIdExpression );
+		assertEquals(((IASTIdExpression)node).getName().toString(), "x"); //$NON-NLS-1$
+		IASTName name = ((IASTIdExpression)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "x"); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, offset1, length ).getParent();
+		assertNotNull(node);
+		assertTrue( node instanceof IASTIdExpression );
+		assertEquals(((IASTIdExpression)node).getName().toString(), "x"); //$NON-NLS-1$
+		name = ((IASTIdExpression)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "x"); //$NON-NLS-1$
+	}
+	
+	public void testBaseCase_Error() throws Exception
+	{
+		String code = "int x() { y( ) }"; //$NON-NLS-1$
+		int offset1 = code.indexOf( "y( " ); //$NON-NLS-1$
+		int length = "y".length(); //$NON-NLS-1$
+		assertNull( parse( code, ParserLanguage.C, offset1, length, false ));
+		assertNull( parse( code, ParserLanguage.CPP, offset1, length, false ));
+	}
+	
+	public void testBaseCase_FunctionDeclaration() throws Exception
+	{
+		String code = "int x(); x( );"; //$NON-NLS-1$
+		int offset1 = code.indexOf( "x()" ); //$NON-NLS-1$
+		int length = "x".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, offset1, length );
+		assertNotNull(node);
+		assertTrue( node instanceof IASTName );
+		assertEquals(node.toString(), "x"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "x"); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, offset1, length );
+		assertNotNull(node);
+		assertTrue( node instanceof IASTName );
+		assertEquals(node.toString(), "x"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "x"); //$NON-NLS-1$
+	}
+	
+	public void testBaseCase_FunctionDeclaration2() throws Exception
+	{
+		String code = "int printf( const char *, ... ); "; //$NON-NLS-1$
+		int offset1 = code.indexOf( "printf" ); //$NON-NLS-1$
+		int length = "printf".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, offset1, length );
+		assertNotNull(node);
+		assertTrue( node instanceof IASTName );
+		assertEquals(node.toString(), "printf"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "printf"); //$NON-NLS-1$		
+		node = parse( code, ParserLanguage.CPP, offset1, length );
+		assertNotNull(node);
+		assertTrue( node instanceof IASTName );
+		assertEquals(node.toString(), "printf"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "printf"); //$NON-NLS-1$
+	}
+
+	public void testBaseCase_VariableDeclaration() throws Exception
+	{
+		String code = "int x = 3;"; //$NON-NLS-1$
+		int offset1 = code.indexOf( "x" ); //$NON-NLS-1$
+		int length = "x".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, offset1, length );
+		assertNotNull(node);
+		assertTrue( node instanceof IASTName );
+		assertEquals(node.toString(), "x"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IVariable);
+		assertEquals(((IVariable)name.resolveBinding()).getName(), "x"); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, offset1, length );
+		assertNotNull(node);
+		assertTrue( node instanceof IASTName );
+		assertEquals(node.toString(), "x"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IVariable);
+		assertEquals(((IVariable)name.resolveBinding()).getName(), "x"); //$NON-NLS-1$
+	}
+	
+	public void testBaseCase_Parameter() throws Exception
+	{
+		String code = "int main( int argc ) { int x = argc; }"; //$NON-NLS-1$
+		int offset1 = code.indexOf( "argc;" ); //$NON-NLS-1$
+		int length = "argc".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, offset1, length ).getParent().getParent();
+		assertNotNull(node);
+		assertTrue( node instanceof IASTInitializerExpression );
+		assertEquals( ((IASTIdExpression)((IASTInitializerExpression)node).getExpression()).getName().toString(), "argc" ); //$NON-NLS-1$
+		IASTName name = ((IASTIdExpression)((IASTInitializerExpression)node).getExpression()).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IParameter);
+		assertEquals(((IParameter)name.resolveBinding()).getName(), "argc"); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, offset1, length ).getParent().getParent();
+		assertNotNull(node);
+		assertTrue( node instanceof IASTInitializerExpression );
+		assertEquals( ((IASTIdExpression)((IASTInitializerExpression)node).getExpression()).getName().toString(), "argc" ); //$NON-NLS-1$
+		name = ((IASTIdExpression)((IASTInitializerExpression)node).getExpression()).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IParameter);
+		assertEquals(((IParameter)name.resolveBinding()).getName(), "argc"); //$NON-NLS-1$
+	}
+	
+	public void testBug57898() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class Gonzo {  public: void playHorn(); };\n" ); //$NON-NLS-1$
+		writer.write( "void Gonzo::playHorn() { return; }\n" ); //$NON-NLS-1$
+		writer.write( "int	main(int argc, char **argv) { Gonzo gonzo; gonzo.playHorn(); }\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		for( int i = 0; i < 3; ++i )
+		{
+			int start = -1, stop = -1;
+			switch( i )
+			{
+				case 0:
+					start = code.indexOf( "void playHorn") + 5; //$NON-NLS-1$
+					break;
+				case 1:
+					start = code.indexOf( "::playHorn") + 2; //$NON-NLS-1$
+					break;
+				case 2:
+					start = code.indexOf( ".playHorn") + 1; //$NON-NLS-1$
+					break;
+			}
+			stop = 8;
+			IASTNode node = parse( code, ParserLanguage.CPP, start, stop );
+			assertNotNull(node);
+			assertTrue( node instanceof IASTName );
+			assertEquals( node.toString(), "playHorn" ); //$NON-NLS-1$
+			IASTName name = (IASTName)node;
+			assertNotNull(name.resolveBinding());
+			assertTrue(name.resolveBinding() instanceof ICPPMethod);
+			assertEquals(((ICPPMethod)name.resolveBinding()).getName(), "playHorn"); //$NON-NLS-1$
+		}
+	}
+	
+	public void testConstructorDestructorDeclaration() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class Gonzo { Gonzo(); ~Gonzo(); };"); //$NON-NLS-1$
+		String code = writer.toString();
+		int offset = code.indexOf( " Gonzo()") + 1; //$NON-NLS-1$
+		int length = "Gonzo".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, offset, length );
+		assertNotNull(node);
+		assertTrue( node instanceof IASTName );
+		assertEquals(node.toString(), "Gonzo"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPConstructor);
+		assertEquals(((ICPPConstructor)name.resolveBinding()).getName(), "Gonzo"); //$NON-NLS-1$
+		offset = code.indexOf( " ~Gonzo") + 1; //$NON-NLS-1$
+		length = "~Gonzo".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, offset, length );
+		assertNotNull(node);
+		assertTrue( node instanceof IASTName );
+		assertEquals(node.toString(), "~Gonzo"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPMethod);
+		assertEquals(((ICPPMethod)name.resolveBinding()).getName(), "~Gonzo"); //$NON-NLS-1$
+
+	}	
+	
+	public void testBug60264() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "namespace Muppets { int i;	}\n" ); //$NON-NLS-1$
+		writer.write( "int	main(int argc, char **argv) {	Muppets::i = 1; }\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int index = code.indexOf( "Muppets::"); //$NON-NLS-1$
+		int length = "Muppets".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "Muppets"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPNamespace);
+		assertEquals(((ICPPNamespace)name.resolveBinding()).getName(), "Muppets"); //$NON-NLS-1$
+		index = code.indexOf( "e Muppets") + 2; //$NON-NLS-1$
+		length = "Muppets".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "Muppets"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPNamespace);
+		assertEquals(((ICPPNamespace)name.resolveBinding()).getName(), "Muppets"); //$NON-NLS-1$
+
+	}
+	
+	public void testBug61613() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class Foo {  // ** (A) **\n" ); //$NON-NLS-1$
+		writer.write( "	public:\n" ); //$NON-NLS-1$
+		writer.write( "Foo() {};\n" ); //$NON-NLS-1$
+		writer.write( "};\n" ); //$NON-NLS-1$
+		writer.write( "int \n" ); //$NON-NLS-1$
+		writer.write( "main(int argc, char **argv) {\n" ); //$NON-NLS-1$
+		writer.write( "Foo foo;  // ** (B) **\n" ); //$NON-NLS-1$
+		writer.write( "}\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int index = code.indexOf( "class Foo") + 6; //$NON-NLS-1$
+		int length = "Foo".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "Foo"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPClassType);
+		assertEquals(((ICPPClassType)name.resolveBinding()).getName(), "Foo"); //$NON-NLS-1$
+	}
+	
+	public void testBug60038() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class Gonzo {\n");		 //$NON-NLS-1$
+		writer.write( "public:\n"); //$NON-NLS-1$
+		writer.write( "Gonzo( const Gonzo & other ){}\n"); //$NON-NLS-1$
+		writer.write( "Gonzo()	{}\n"); //$NON-NLS-1$
+		writer.write( "~Gonzo(){}\n"); //$NON-NLS-1$
+		writer.write( "};\n"); //$NON-NLS-1$
+		writer.write( "int main(int argc, char **argv) {\n"); //$NON-NLS-1$
+		writer.write( " Gonzo * g = new Gonzo();\n"); //$NON-NLS-1$
+		writer.write( " Gonzo * g2 = new Gonzo( *g );\n"); //$NON-NLS-1$
+		writer.write( " g->~Gonzo();\n"); //$NON-NLS-1$
+		writer.write( " return (int) g2;\n"); //$NON-NLS-1$
+		writer.write( "}\n"); //$NON-NLS-1$
+		String code = writer.toString();
+		for( int i = 0; i < 3; ++i )
+		{
+			int startOffset = 0, length = 0;
+			switch( i )
+			{
+				case 0:
+					startOffset = code.indexOf( "new Gonzo()") + 4; //$NON-NLS-1$
+					length = 5;
+					break;
+				case 1:
+					startOffset = code.indexOf( "new Gonzo( ") + 4; //$NON-NLS-1$
+					length = 5;
+					break;
+				default:
+					startOffset = code.indexOf( "->~") + 2; //$NON-NLS-1$
+					length = 6;
+			}
+			IASTNode node = parse( code, ParserLanguage.CPP, startOffset, length );
+			assertNotNull(node);
+			IASTName name = null;
+			switch( i )
+			{
+				case 0:
+				case 1: 
+					node= node.getParent().getParent();
+					assertTrue(node instanceof IASTTypeId);
+					assertEquals(((IASTNamedTypeSpecifier)((IASTTypeId)node).getDeclSpecifier()).getName().toString(), "Gonzo"); //$NON-NLS-1$
+					name = ((IASTNamedTypeSpecifier)((IASTTypeId)node).getDeclSpecifier()).getName();
+					assertNotNull(name.resolveBinding());
+					assertTrue(name.resolveBinding() instanceof ICPPConstructor);
+					assertEquals(((ICPPConstructor)name.resolveBinding()).getName(), "Gonzo"); //$NON-NLS-1$
+					break;
+				default: 
+					assertTrue(node instanceof IASTName);
+					assertEquals(node.toString(), "~Gonzo"); //$NON-NLS-1$
+					name = (IASTName)node;
+					assertNotNull(name.resolveBinding());
+					assertTrue(name.resolveBinding() instanceof ICPPMethod);
+					assertEquals(((ICPPMethod)name.resolveBinding()).getName(), "~Gonzo"); //$NON-NLS-1$
+					break;
+					
+			}
+		}
+	}
+	
+	public void testMethodReference() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class Sample { public:\n"); //$NON-NLS-1$
+		writer.write( "  int getAnswer() const;\n"); //$NON-NLS-1$
+		writer.write( "};\n"); //$NON-NLS-1$
+		writer.write( "int main(int argc, char **argv) {\n" ); //$NON-NLS-1$
+		writer.write( " Sample * s = new Sample();\n" ); //$NON-NLS-1$
+		writer.write( " return s->getAnswer();\n" ); //$NON-NLS-1$
+		writer.write( "}\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int startIndex = code.indexOf( "->getAnswer") + 2; //$NON-NLS-1$
+		int length = "getAnswer".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, startIndex, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "getAnswer"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPMethod);
+		assertEquals(((ICPPMethod)name.resolveBinding()).getName(), "getAnswer"); //$NON-NLS-1$
+	}
+	
+	public void testConstructorDefinition() throws Exception
+	{
+		String code = "class ABC { public: ABC(); }; ABC::ABC(){}"; //$NON-NLS-1$
+		int startIndex = code.indexOf( "::ABC") + 2; //$NON-NLS-1$
+		int length = "ABC".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, startIndex, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertEquals(node.toString(), "ABC"); //$NON-NLS-1$
+		assertTrue(name.resolveBinding() instanceof ICPPConstructor);
+		assertEquals(((ICPPConstructor)name.resolveBinding()).getName(), "ABC"); //$NON-NLS-1$
+	}
+	
+	public void testBug63966() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "void foo(int a) {}\n" ); //$NON-NLS-1$
+		writer.write( "void foo(long a) {}\n" ); //$NON-NLS-1$
+		writer.write( "int main(int argc, char **argv) {\n" ); //$NON-NLS-1$
+		writer.write( "foo(1); \n }" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int startIndex = code.indexOf( "foo(1)"); //$NON-NLS-1$
+		int length = "foo".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, startIndex, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTIdExpression);
+		assertEquals(((IASTIdExpression)node).getName().toString(), "foo"); //$NON-NLS-1$
+		IASTName name = ((IASTIdExpression)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "foo"); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, startIndex, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTIdExpression);
+		assertEquals(((IASTIdExpression)node).getName().toString(), "foo"); //$NON-NLS-1$
+		name = ((IASTIdExpression)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "foo"); //$NON-NLS-1$
+	}
+	
+	public void testBug66744() throws Exception
+	{
+		Writer writerCPP = new StringWriter();
+		writerCPP.write( "enum EColours { RED, GREEN, BLUE };      \n" ); //$NON-NLS-1$
+		writerCPP.write( "void foo() {  EColours color = GREEN; }  \n" ); //$NON-NLS-1$
+		
+		Writer writerC = new StringWriter();
+		writerC.write( "enum EColours { RED, GREEN, BLUE };      \n" ); //$NON-NLS-1$
+		writerC.write( "void foo() { enum EColours color = GREEN; }  \n" ); //$NON-NLS-1$
+		
+		String codeCPP = writerCPP.toString();
+		String codeC = writerC.toString();
+		int startIndex = codeC.indexOf( "EColours color"); //$NON-NLS-1$
+		int length = "EColours".length(); //$NON-NLS-1$
+		IASTNode node = parse( codeC, ParserLanguage.C, startIndex, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "EColours"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IEnumeration);
+		assertEquals(((IEnumeration)name.resolveBinding()).getName(), "EColours"); //$NON-NLS-1$
+		startIndex = codeCPP.indexOf( "EColours color"); //$NON-NLS-1$
+		node = parse( codeCPP, ParserLanguage.CPP, startIndex, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTNamedTypeSpecifier);
+		assertEquals(((IASTNamedTypeSpecifier)node).getName().toString(), "EColours"); //$NON-NLS-1$
+		name = ((IASTNamedTypeSpecifier)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IEnumeration);
+		assertEquals(((IEnumeration)name.resolveBinding()).getName(), "EColours"); //$NON-NLS-1$
+	}
+	
+
+	
+	public void testBug68527() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write("struct X;\n"); //$NON-NLS-1$
+		writer.write("struct X anA;"); //$NON-NLS-1$
+		String code = writer.toString();
+		int startIndex = code.indexOf( "X anA"); //$NON-NLS-1$
+		int length = "X".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, startIndex, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "X"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICompositeType);
+		assertEquals(((ICompositeType)name.resolveBinding()).getName(), "X"); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, startIndex, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "X"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICompositeType);
+		assertEquals(((ICompositeType)name.resolveBinding()).getName(), "X"); //$NON-NLS-1$
+	}
+
+	public void testBug60407() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "struct ZZZ { int x, y, z; };\n" ); //$NON-NLS-1$
+		writer.write( "typedef struct ZZZ _FILE;\n" ); //$NON-NLS-1$
+		writer.write( "typedef _FILE FILE;\n" ); //$NON-NLS-1$
+		writer.write( "static void static_function(FILE * lcd){}\n" ); //$NON-NLS-1$
+		writer.write( "int	main(int argc, char **argv) {\n" ); //$NON-NLS-1$
+		writer.write( "FILE * file = 0;\n" ); //$NON-NLS-1$
+		writer.write( "static_function( file );\n" ); //$NON-NLS-1$
+		writer.write( "return 0;\n" );	 //$NON-NLS-1$
+		writer.write( "}\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int startIndex = code.indexOf( "static_function( file )"); //$NON-NLS-1$
+		int length = "static_function".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, startIndex, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTIdExpression);
+		assertEquals(((IASTIdExpression)node).getName().toString(), "static_function"); //$NON-NLS-1$
+		IASTName name = ((IASTIdExpression)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "static_function"); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, startIndex, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTIdExpression);
+		assertEquals(((IASTIdExpression)node).getName().toString(), "static_function"); //$NON-NLS-1$
+		name = ((IASTIdExpression)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "static_function"); //$NON-NLS-1$
+	}
+	
+	public void testBug61800() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class B {};\n"); //$NON-NLS-1$
+		writer.write( "class ABCDEF {\n"); //$NON-NLS-1$
+		writer.write( " static B stInt; };\n"); //$NON-NLS-1$
+		writer.write( "B ABCDEF::stInt = 5;\n"); //$NON-NLS-1$
+		String code = writer.toString();
+		int startIndex = code.indexOf( "::stInt") + 2; //$NON-NLS-1$
+		int length = "stInt".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, startIndex, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "stInt"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPField);
+		assertEquals(((ICPPField)name.resolveBinding()).getName(), "stInt"); //$NON-NLS-1$
+	}
+	
+	public void testBug68739() throws Exception
+	{
+	    Writer writer = new StringWriter();
+	    writer.write( "int fprintf( int *, const char *, ... );               \n" ); //$NON-NLS-1$
+	    writer.write( "void boo( int * lcd ) {                                \n" ); //$NON-NLS-1$
+	    writer.write( "  /**/fprintf( lcd, \"%c%s 0x%x\", ' ', \"bbb\", 2 );  \n" ); //$NON-NLS-1$
+	    writer.write( "}                                                      \n" ); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+		int startIndex = code.indexOf( "/**/fprintf") + 4; //$NON-NLS-1$
+		int length = "fprintf".length(); //$NON-NLS-1$
+		
+		IASTNode node = parse( code, ParserLanguage.C, startIndex, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTIdExpression);
+		assertEquals(((IASTIdExpression)node).getName().toString(), "fprintf"); //$NON-NLS-1$
+		IASTName name = ((IASTIdExpression)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "fprintf"); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, startIndex, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTIdExpression);
+		assertEquals(((IASTIdExpression)node).getName().toString(), "fprintf"); //$NON-NLS-1$
+		name = ((IASTIdExpression)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "fprintf"); //$NON-NLS-1$
+	}
+	
+	public void testBug72818() throws Exception
+	{
+		Writer writerCPP = new StringWriter();
+		writerCPP.write( "union Squaw	{	int x;	double u; };\n" ); //$NON-NLS-1$
+		writerCPP.write( "int	main(int argc, char **argv) {\n" ); //$NON-NLS-1$
+		writerCPP.write( "return sizeof( Squaw );\n" ); //$NON-NLS-1$
+		writerCPP.write( "}\n" ); //$NON-NLS-1$
+		
+		Writer writerC = new StringWriter();
+		writerC.write( "union Squaw	{	int x;	double u; };\n" ); //$NON-NLS-1$
+		writerC.write( "int	main(int argc, char **argv) {\n" ); //$NON-NLS-1$
+		writerC.write( "return sizeof( union Squaw );\n" ); //$NON-NLS-1$
+		writerC.write( "}\n" ); //$NON-NLS-1$
+		
+		String codeC = writerC.toString();
+		String codeCPP = writerCPP.toString();
+		int startIndex = codeC.indexOf( "sizeof( union ") + "sizeof( union ".length();  //$NON-NLS-1$ //$NON-NLS-2$
+		int length = "Squaw".length(); //$NON-NLS-1$
+		IASTNode node = parse( codeC, ParserLanguage.C, startIndex, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "Squaw"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICompositeType);
+		assertEquals(((ICompositeType)name.resolveBinding()).getName(), "Squaw"); //$NON-NLS-1$
+		startIndex = codeCPP.indexOf( "sizeof( ") + "sizeof( ".length();  //$NON-NLS-1$ //$NON-NLS-2$
+		node = parse( codeCPP, ParserLanguage.CPP, startIndex, length ).getParent().getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTTypeId);
+		assertEquals(((IASTNamedTypeSpecifier)((IASTTypeId)node).getDeclSpecifier()).getName().toString(), "Squaw"); //$NON-NLS-1$
+		name = ((IASTNamedTypeSpecifier)((IASTTypeId)node).getDeclSpecifier()).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPClassType);
+		assertEquals(((ICPPClassType)name.resolveBinding()).getName(), "Squaw"); //$NON-NLS-1$
+	}
+	
+	public void test72220() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "const int FOUND_ME = 1;\n" ); //$NON-NLS-1$
+		writer.write( "class Test{\n" ); //$NON-NLS-1$
+		writer.write( "public:\n" ); //$NON-NLS-1$
+		writer.write( "const int findCode() const;\n" ); //$NON-NLS-1$
+		writer.write( "};\n" ); //$NON-NLS-1$
+		writer.write( "const int Test::findCode() const {\n" ); //$NON-NLS-1$
+		writer.write( "return FOUND_ME;\n" ); //$NON-NLS-1$
+		writer.write( "}\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int startIndex = code.indexOf( "return ") + "return ".length();  //$NON-NLS-1$ //$NON-NLS-2$
+		int length = "FOUND_ME".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, startIndex, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTIdExpression);
+		assertEquals(((IASTIdExpression)node).getName().toString(), "FOUND_ME"); //$NON-NLS-1$
+		IASTName name = ((IASTIdExpression)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IVariable);
+		assertEquals(((IVariable)name.resolveBinding()).getName(), "FOUND_ME"); //$NON-NLS-1$
+	}
+	
+	public void testBug72721() throws Exception{
+	    Writer writer = new StringWriter();
+	    writer.write(" class ABC { public: ABC(int); };   \n"); //$NON-NLS-1$
+	    writer.write("void f() {                          \n"); //$NON-NLS-1$
+	    writer.write("   int j = 1;                       \n"); //$NON-NLS-1$
+	    writer.write("   new ABC( j + 1 );                \n"); //$NON-NLS-1$
+	    writer.write("}                                   \n"); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+	    int startIndex = code.indexOf( "ABC(" ); //$NON-NLS-1$
+		int length = "ABC".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, startIndex, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "ABC"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPConstructor);
+		assertEquals(((ICPPConstructor)name.resolveBinding()).getName(), "ABC"); //$NON-NLS-1$
+	}
+	
+	public void testBug72372() throws Exception{
+	    Writer writer = new StringWriter();
+	    writer.write("namespace B {                                   \n"); //$NON-NLS-1$
+	    writer.write("   class SD_02 { void f_SD(); };                \n"); //$NON-NLS-1$
+	    writer.write("}                                               \n"); //$NON-NLS-1$
+	    writer.write("using namespace B;                              \n"); //$NON-NLS-1$
+	    writer.write("void SD_02::f_SD(){}                            \n"); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+	    int startIndex = code.indexOf( ":f_SD" ) + 1; //$NON-NLS-1$
+		int length = "f_SD".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, startIndex, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "f_SD"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPMethod);
+		assertEquals(((ICPPMethod)name.resolveBinding()).getName(), "f_SD"); //$NON-NLS-1$
+	}
+	public void testBug72372_2() throws Exception{
+	    Writer writer = new StringWriter();
+	    writer.write("namespace A {                                   \n"); //$NON-NLS-1$
+	    writer.write("   namespace B {                                \n"); //$NON-NLS-1$
+	    writer.write("      void f_SD();                              \n"); //$NON-NLS-1$
+	    writer.write("   }                                            \n"); //$NON-NLS-1$
+	    writer.write("}                                               \n"); //$NON-NLS-1$
+	    writer.write("namespace C {                                   \n"); //$NON-NLS-1$
+	    writer.write("   using namespace A;                           \n"); //$NON-NLS-1$
+	    writer.write("}                                               \n"); //$NON-NLS-1$
+	    writer.write("void C::B::f_SD(){}                             \n"); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+	    int startIndex = code.indexOf( ":f_SD" ) + 1; //$NON-NLS-1$
+		int length = "f_SD".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, startIndex, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "f_SD"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "f_SD"); //$NON-NLS-1$
+	}
+	
+	public void testBug72713() throws Exception{
+	    Writer writer = new StringWriter();
+	    writer.write( "class Deck{ void initialize(); };   \n"); //$NON-NLS-1$
+	    writer.write( "void Deck::initialize(){}           \n"); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+	    int startIndex = code.indexOf( ":initialize" ) + 1; //$NON-NLS-1$
+	    int length = "initialize".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, startIndex, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "initialize"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPMethod);
+		assertEquals(((ICPPMethod)name.resolveBinding()).getName(), "initialize"); //$NON-NLS-1$
+	}
+	
+	public void testBug72712() throws Exception{
+	    Writer writer = new StringWriter();
+	    writer.write( "class B{ public: B(); }; void f(){ B* b; b = new B(); }" ); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+	    int startIndex = code.indexOf( "new B" ) + 4; //$NON-NLS-1$
+	    int length = "B".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, startIndex, length ).getParent().getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTTypeId);
+		assertEquals(((IASTNamedTypeSpecifier)((IASTTypeId)node).getDeclSpecifier()).getName().toString(), "B"); //$NON-NLS-1$
+		IASTName name = ((IASTNamedTypeSpecifier)((IASTTypeId)node).getDeclSpecifier()).getName();
+		assertNotNull(name.resolveBinding());
+	    assertTrue(name.resolveBinding() instanceof ICPPConstructor);
+		assertEquals(((ICPPConstructor)name.resolveBinding()).getName(), "B"); //$NON-NLS-1$
+	}
+	
+	public void testBug72712_2() throws Exception{
+	    Writer writer = new StringWriter();
+	    writer.write( "class A {};                                        \n"); //$NON-NLS-1$
+	    writer.write( "class B{ public: B( A* ); };                       \n"); //$NON-NLS-1$
+	    writer.write( "void f(){ B* b; b = new B( (A*)0 ); }              \n"); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+	    int startIndex = code.indexOf( "(A*)" ) + 1; //$NON-NLS-1$
+	    int length = "A".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, startIndex, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTNamedTypeSpecifier);
+		assertEquals(((IASTNamedTypeSpecifier)node).getName().toString(), "A"); //$NON-NLS-1$
+		IASTName name = ((IASTNamedTypeSpecifier)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPClassType);
+		assertEquals(((ICPPClassType)name.resolveBinding()).getName(), "A"); //$NON-NLS-1$
+	}
+	
+	public void testBug72710() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class Card{\n" ); //$NON-NLS-1$
+		writer.write( "	Card( int rank );\n" ); //$NON-NLS-1$
+		writer.write( " int rank;\n" ); //$NON-NLS-1$
+		writer.write( "};\n" ); //$NON-NLS-1$
+		writer.write( "Card::Card( int rank ) {\n" ); //$NON-NLS-1$
+		writer.write( "this->rank = rank;\n" ); //$NON-NLS-1$
+		writer.write( "}\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int index = code.indexOf( "this->rank") + 6; //$NON-NLS-1$
+		int length = "rank".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "rank"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPField);
+		assertEquals(((ICPPField)name.resolveBinding()).getName(), "rank"); //$NON-NLS-1$
+	}
+	
+	
+	public void testBug75731() throws Exception 
+	{
+		Writer writer = new StringWriter();
+		writer.write("int rank() {\n"); //$NON-NLS-1$
+		writer.write("return 5;\n}\n"); //$NON-NLS-1$
+		writer.write("class Card{\n"); //$NON-NLS-1$
+		writer.write("private:\n"); //$NON-NLS-1$
+		writer.write("Card( int rank );\n"); //$NON-NLS-1$
+		writer.write("int rank;\n"); //$NON-NLS-1$
+		writer.write("public:\n");  //$NON-NLS-1$
+		writer.write("int getRank();\n};\n"); //$NON-NLS-1$
+		writer.write("Card::Card( int rank )\n{\n");  //$NON-NLS-1$
+		writer.write("this->rank = ::rank();\n"); //$NON-NLS-1$
+		writer.write("this->rank = this->rank;\n"); //$NON-NLS-1$
+		writer.write("this->rank = rank;\n"); //$NON-NLS-1$
+		writer.write("this->rank = Card::rank;\n"); //$NON-NLS-1$
+		writer.write("this->rank = getRank();\n}\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+		int index = code.indexOf( "int rank() {") + 4; //$NON-NLS-1$
+		int length = "rank".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "rank"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "rank"); //$NON-NLS-1$
+		
+		index = code.indexOf( "class Card{") + 6; //$NON-NLS-1$
+		length = "Card".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "Card"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPClassType);
+		assertEquals(((ICPPClassType)name.resolveBinding()).getName(), "Card"); //$NON-NLS-1$
+		
+		index = code.indexOf( "Card( int rank );"); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "Card"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPConstructor);
+		assertEquals(((ICPPConstructor)name.resolveBinding()).getName(), "Card"); //$NON-NLS-1$
+		
+		index = code.indexOf( "Card( int rank );") + 10; //$NON-NLS-1$
+		length = "rank".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTDeclarator);
+		assertEquals(((IASTDeclarator)node).getName().toString(), "rank"); //$NON-NLS-1$
+		name = ((IASTDeclarator)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IVariable);
+		assertEquals(((IVariable)name.resolveBinding()).getName(), "rank"); //$NON-NLS-1$
+
+		index = code.indexOf( "int rank;") + 4; //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTDeclarator);
+		assertEquals(((IASTDeclarator)node).getName().toString(), "rank"); //$NON-NLS-1$
+		name = ((IASTDeclarator)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPField);
+		assertEquals(((ICPPField)name.resolveBinding()).getName(), "rank"); //$NON-NLS-1$
+		
+		index = code.indexOf( "int getRank();") + 4; //$NON-NLS-1$
+		length = "getRank".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "getRank"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPMethod);
+		assertEquals(((ICPPMethod)name.resolveBinding()).getName(), "getRank"); //$NON-NLS-1$
+		
+		index = code.indexOf( "Card::Card( int rank )"); //$NON-NLS-1$
+		length = "Card".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "Card"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPClassType);
+		assertEquals(((ICPPClassType)name.resolveBinding()).getName(), "Card"); //$NON-NLS-1$
+		
+		index = code.indexOf( "Card::Card( int rank )") + 6; //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "Card"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPConstructor);
+		assertEquals(((ICPPConstructor)name.resolveBinding()).getName(), "Card"); //$NON-NLS-1$
+		
+		index = code.indexOf( "Card::Card( int rank )") + 16; //$NON-NLS-1$
+		length = "rank".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTDeclarator);
+		assertEquals(((IASTDeclarator)node).getName().toString(), "rank"); //$NON-NLS-1$
+		name = ((IASTDeclarator)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IVariable);
+		assertEquals(((IVariable)name.resolveBinding()).getName(), "rank"); //$NON-NLS-1$
+		
+		index = code.indexOf( "this->rank = ::rank();") + 6; //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "rank"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPField);
+		assertEquals(((ICPPField)name.resolveBinding()).getName(), "rank"); //$NON-NLS-1$
+		
+		index = code.indexOf( "this->rank = ::rank();") + 15; //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "rank"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IFunction);
+		assertEquals(((IFunction)name.resolveBinding()).getName(), "rank"); //$NON-NLS-1$
+		
+		index = code.indexOf( "this->rank = this->rank;") + 6; //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "rank"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPField);
+		assertEquals(((ICPPField)name.resolveBinding()).getName(), "rank"); //$NON-NLS-1$
+		
+		index = code.indexOf( "this->rank = this->rank;") + 19; //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "rank"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPField);
+		assertEquals(((ICPPField)name.resolveBinding()).getName(), "rank"); //$NON-NLS-1$
+		
+		index = code.indexOf( "this->rank = rank;") + 6; //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "rank"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPField);
+		assertEquals(((ICPPField)name.resolveBinding()).getName(), "rank"); //$NON-NLS-1$
+		
+		index = code.indexOf( "this->rank = rank;") + 13; //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTIdExpression);
+		assertEquals(((IASTIdExpression)node).getName().toString(), "rank"); //$NON-NLS-1$
+		name = ((IASTIdExpression)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IVariable);
+		assertEquals(((IVariable)name.resolveBinding()).getName(), "rank"); //$NON-NLS-1$
+		
+		index = code.indexOf( "this->rank = Card::rank;") + 6; //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "rank"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPField);
+		assertEquals(((ICPPField)name.resolveBinding()).getName(), "rank"); //$NON-NLS-1$
+		
+		index = code.indexOf( "this->rank = Card::rank;") + 19; //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "rank"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPField);
+		assertEquals(((ICPPField)name.resolveBinding()).getName(), "rank"); //$NON-NLS-1$
+		
+		index = code.indexOf( "this->rank = getRank();") + 6; //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "rank"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPField);
+		assertEquals(((ICPPField)name.resolveBinding()).getName(), "rank"); //$NON-NLS-1$
+		
+		index = code.indexOf( "this->rank = getRank();") + 13; //$NON-NLS-1$
+		length = "getRank".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTIdExpression);
+		assertEquals(((IASTIdExpression)node).getName().toString(), "getRank"); //$NON-NLS-1$
+		name = ((IASTIdExpression)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPMethod);
+		assertEquals(((ICPPMethod)name.resolveBinding()).getName(), "getRank"); //$NON-NLS-1$
+	}
+
+	public void testBug77989() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("namespace N {        /* A */\n"); //$NON-NLS-1$
+		writer.write("class C{};\n}\n"); //$NON-NLS-1$
+		writer.write("using namespace N;   /* B */\n"); //$NON-NLS-1$
+		writer.write("N::C c;              /* C */\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+		int index = code.indexOf( "using namespace N;") + 16; //$NON-NLS-1$
+		int length = "N".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "N"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICPPNamespace);
+		assertEquals(((ICPPNamespace)name.resolveBinding()).getName(), "N"); //$NON-NLS-1$
+	}
+
+	public void testBug78435() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("int itself;          //A\n"); //$NON-NLS-1$ 
+		writer.write("void f(int itself){} //B\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+		int index = code.indexOf( "void f(int itself){}") + 11; //$NON-NLS-1$
+		int length = "itself".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, index, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTDeclarator);
+		assertEquals(((IASTDeclarator)node).getName().toString(), "itself"); //$NON-NLS-1$
+		IASTName name = ((IASTDeclarator)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IVariable);
+		assertEquals(((IVariable)name.resolveBinding()).getName(), "itself"); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTDeclarator);
+		assertEquals(((IASTDeclarator)node).getName().toString(), "itself"); //$NON-NLS-1$
+		name = ((IASTDeclarator)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IVariable);
+		assertEquals(((IVariable)name.resolveBinding()).getName(), "itself"); //$NON-NLS-1$
+	}
+
+	public void testBug78231A() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("struct Base {\n"); //$NON-NLS-1$
+		writer.write("int Data; // 1\n"); //$NON-NLS-1$
+		writer.write("struct Data; // 2\n};\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+		int index = code.indexOf("struct Data;") + 7; //$NON-NLS-1$
+		int length = "Data".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "Data"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICompositeType);
+		assertEquals(((ICompositeType)name.resolveBinding()).getName(), "Data"); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "Data"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICompositeType);
+		assertEquals(((ICompositeType)name.resolveBinding()).getName(), "Data"); //$NON-NLS-1$
+	}
+	
+	public void testBug78231B() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("int Data;\n"); //$NON-NLS-1$
+		writer.write("struct Base {\n"); //$NON-NLS-1$
+		writer.write("int Data; // 1\n"); //$NON-NLS-1$
+		writer.write("struct Data; // 2\n};\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+		int index = code.indexOf("struct Data;") + 7; //$NON-NLS-1$
+		int length = "Data".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "Data"); //$NON-NLS-1$
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICompositeType);
+		assertEquals(((ICompositeType)name.resolveBinding()).getName(), "Data"); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		assertEquals(node.toString(), "Data"); //$NON-NLS-1$
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ICompositeType);
+		assertEquals(((ICompositeType)name.resolveBinding()).getName(), "Data"); //$NON-NLS-1$
+	}
+	
+	public void testSimpleKRCTest1() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+    	buffer.append( "int f(char x);\n" ); //$NON-NLS-1$
+    	buffer.append( "int f(x) char x;\n" ); //$NON-NLS-1$
+    	buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+		
+		String code = buffer.toString();
+		int index = code.indexOf("x;"); //$NON-NLS-1$
+		int length = "x".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, true, true, index, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTDeclarator);
+		assertEquals(((IASTDeclarator)node).getName().toString(), "x"); //$NON-NLS-1$
+		IASTName name = ((IASTDeclarator)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IParameter);
+		assertEquals(((IParameter)name.resolveBinding()).getName(), "x"); //$NON-NLS-1$
+	}
+	
+	public void testSimpleKRCTest2() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "int f();\n" ); //$NON-NLS-1$
+		buffer.append( "int f(x) char x;\n" ); //$NON-NLS-1$
+		buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+		
+		String code = buffer.toString();
+		int index = code.indexOf("x;"); //$NON-NLS-1$
+		int length = "x".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, true, true, index, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTDeclarator);
+		assertEquals(((IASTDeclarator)node).getName().toString(), "x"); //$NON-NLS-1$
+		IASTName name = ((IASTDeclarator)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IParameter);
+		assertEquals(((IParameter)name.resolveBinding()).getName(), "x"); //$NON-NLS-1$
+	}
+	
+	public void testSimpleKRCTest3() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "int const *f();\n" ); //$NON-NLS-1$
+		buffer.append( "int const *f(x) char x;\n" ); //$NON-NLS-1$
+		buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+
+		String code = buffer.toString();
+		int index = code.indexOf("char x;"); //$NON-NLS-1$
+		int length = "char x;".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, true, true, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTSimpleDeclaration);
+		assertEquals( ((IASTSimpleDeclaration)node).getDeclarators()[0].getName().toString(), "x" ); //$NON-NLS-1$
+		IASTName name = ((IASTSimpleDeclaration)node).getDeclarators()[0].getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue( name.resolveBinding() instanceof IParameter );
+		assertEquals( ((IParameter)name.resolveBinding()).getName(), "x" ); //$NON-NLS-1$
+	}
+	
+	public void testKRC_1() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "int isroot (x, y) /* comment */ \n" ); //$NON-NLS-1$
+		buffer.append( "int x;\n" ); //$NON-NLS-1$
+		buffer.append( "int y;\n" ); //$NON-NLS-1$
+		buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+
+		String code = buffer.toString();
+		int index = code.indexOf("y;"); //$NON-NLS-1$
+		int length = "y".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, true, true, index, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTDeclarator);
+		assertEquals(((IASTDeclarator)node).getName().toString(), "y"); //$NON-NLS-1$
+		IASTName name = ((IASTDeclarator)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IParameter);
+		assertEquals(((IParameter)name.resolveBinding()).getName(), "y"); //$NON-NLS-1$
+	}
+	
+	public void testKRCWithTypes() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "typedef char c;\n" ); //$NON-NLS-1$
+		buffer.append( "int isroot (c);\n" ); //$NON-NLS-1$
+		buffer.append( "int isroot (x) \n" ); //$NON-NLS-1$
+		buffer.append( "c x;\n" ); //$NON-NLS-1$
+		buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
+
+		String code = buffer.toString();
+		int index = code.indexOf("c x;"); //$NON-NLS-1$
+		int length = "c".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, true, true, index, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTNamedTypeSpecifier);
+		assertEquals(((IASTNamedTypeSpecifier)node).getName().toString(), "c"); //$NON-NLS-1$
+		IASTName name = ((IASTNamedTypeSpecifier)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof ITypedef);
+		assertEquals(((ITypedef)name.resolveBinding()).getName(), "c"); //$NON-NLS-1$
+		
+		index = code.indexOf("x;"); //$NON-NLS-1$
+		length = "x".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.C, true, true, index, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTDeclarator);
+		assertEquals(((IASTDeclarator)node).getName().toString(), "x"); //$NON-NLS-1$
+		name = ((IASTDeclarator)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IParameter);
+		assertEquals(((IParameter)name.resolveBinding()).getName(), "x"); //$NON-NLS-1$
+	}
+	
+	public void testKRC_monop_cards1() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "#ifdef __STDC__\n" ); //$NON-NLS-1$
+		buffer.append( "#define __P(x) x\n" ); //$NON-NLS-1$
+		buffer.append( "#else\n" ); //$NON-NLS-1$
+		buffer.append( "#define __P(x) ()\n" ); //$NON-NLS-1$
+		buffer.append( "#endif\n" ); //$NON-NLS-1$
+		buffer.append( "struct A_struct {\n" ); //$NON-NLS-1$
+		buffer.append( "int a;\n" ); //$NON-NLS-1$
+		buffer.append( "long *c;\n" ); //$NON-NLS-1$
+		buffer.append( "};\n" ); //$NON-NLS-1$
+		buffer.append( "typedef struct A_struct A;\n" ); //$NON-NLS-1$
+		buffer.append( "static void f __P((A *));\n" ); //$NON-NLS-1$
+		buffer.append( "static void\n" ); //$NON-NLS-1$
+		buffer.append( "f(x)\n" ); //$NON-NLS-1$
+		buffer.append( "A *x; {\n" ); //$NON-NLS-1$
+		buffer.append( "x->a = 0;\n" ); //$NON-NLS-1$
+		buffer.append( "x->c[1]=x->c[2];\n" ); //$NON-NLS-1$
+		buffer.append( "}\n" ); //$NON-NLS-1$
+
+		String code = buffer.toString();
+		int index = code.indexOf("*c;"); //$NON-NLS-1$
+		int length = "*".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof ICASTPointer);
+		
+		
+		index = code.indexOf("*c;") + 1; //$NON-NLS-1$
+		length = "c".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.C, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IField);
+		assertEquals(((IField)name.resolveBinding()).getName(), "c"); //$NON-NLS-1$
+		
+		index = code.indexOf("c[2]"); //$NON-NLS-1$
+		length = "c".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.C, true, true, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IField);
+		assertEquals(((IField)name.resolveBinding()).getName(), "c"); //$NON-NLS-1$
+	}
+	
+	public void testKRC_monop_cards2() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "int\n" ); //$NON-NLS-1$
+		buffer.append( "getinp(prompt, list)\n" ); //$NON-NLS-1$
+		buffer.append( "        const char *prompt, *const list[];\n" ); //$NON-NLS-1$
+		buffer.append( "{\n	*list[1] = 'a';\n}\n" ); //$NON-NLS-1$
+
+		String code = buffer.toString();
+		int index = code.indexOf("list[]"); //$NON-NLS-1$
+		int length = "list".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, true, true, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		IASTName name = (IASTName)node;
+		assertEquals(name.toString(), "list"); //$NON-NLS-1$
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IParameter);
+		assertEquals(((IParameter)name.resolveBinding()).getName(), "list"); //$NON-NLS-1$
+		
+		index = code.indexOf("[]"); //$NON-NLS-1$
+		length = "[]".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.C, true, true, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTArrayModifier);
+		
+		index = code.indexOf("*const list[]"); //$NON-NLS-1$
+		length = "*const".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.C, true, true, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTPointer);
+	}
+	
+	
+	public void testKRC_getParametersOrder() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "int f(a, b) int b,a;{}\n" ); //$NON-NLS-1$
+
+		String code = buffer.toString();
+		int index = code.indexOf("b,a"); //$NON-NLS-1$
+		int length = "b".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, true, true, index, length ).getParent();
+		assertNotNull(node);
+		assertTrue(node instanceof IASTDeclarator);
+		IASTName name = ((IASTDeclarator)node).getName();
+		assertEquals(name.toString(), "b"); //$NON-NLS-1$
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IParameter);
+		assertEquals(((IParameter)name.resolveBinding()).getName(), "b"); //$NON-NLS-1$
+	}
+	
+	public void testKRC_Ethereal_1() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "struct symbol {\n" ); //$NON-NLS-1$
+		buffer.append( "int lambda;\n};\n" ); //$NON-NLS-1$
+		buffer.append( "struct lemon {\n" ); //$NON-NLS-1$
+		buffer.append( "struct symbol **symbols;\n" ); //$NON-NLS-1$
+		buffer.append( "int errorcnt;\n};\n" ); //$NON-NLS-1$
+		buffer.append( "void f(lemp)\n" ); //$NON-NLS-1$
+		buffer.append( "struct lemon *lemp;\n{\n" ); //$NON-NLS-1$
+		buffer.append( "lemp->symbols[1]->lambda = 1;\n" ); //$NON-NLS-1$
+		buffer.append( "lemp->errorcnt++;}\n" ); //$NON-NLS-1$
+
+		String code = buffer.toString();
+		int index = code.indexOf("**symbols"); //$NON-NLS-1$
+		int length = "*".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTPointer);
+		
+		index = code.indexOf("**symbols") + 1; //$NON-NLS-1$
+		length = "*".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.C, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTPointer);
+
+		index = code.indexOf("**symbols") + 2; //$NON-NLS-1$
+		length = "symbols".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.C, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IField);
+		assertEquals(((IField)name.resolveBinding()).getName(), "symbols"); //$NON-NLS-1$
+		
+		index = code.indexOf("lemp->symbols") + 6; //$NON-NLS-1$
+		length = "symbols".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.C, true, true, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IField);
+		assertEquals(((IField)name.resolveBinding()).getName(), "symbols"); //$NON-NLS-1$
+	}
+
+	public void testBug86698() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "struct C;\n"); //$NON-NLS-1$
+		buffer.append( "void no_opt(C*);\n"); //$NON-NLS-1$
+		buffer.append( "struct C {\n"); //$NON-NLS-1$
+		buffer.append( "int c;\n"); //$NON-NLS-1$
+		buffer.append( "C() : c(0) { no_opt(this); }\n"); //$NON-NLS-1$
+		buffer.append( "};\n"); //$NON-NLS-1$
+
+		String code = buffer.toString();
+		int index = code.indexOf("c(0)"); //$NON-NLS-1$
+		int length = "c".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.CPP, index, length );
+		assertNotNull(node);
+		assertTrue(node instanceof IASTName);
+		IASTName name = (IASTName)node;
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IField);
+		assertEquals(((IField)name.resolveBinding()).getName(), "c"); //$NON-NLS-1$
+		
+	}
+	
+	public void testLittleThings() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("int a[3];\r\n"); //$NON-NLS-1$
+		buffer.append("int *b;\r\n"); //$NON-NLS-1$
+		buffer.append("int &c;\r\n"); //$NON-NLS-1$
+		buffer.append("char d='e';\r\n"); //$NON-NLS-1$
+		
+		String code = buffer.toString();
+		int index = 0; 
+		int length = 0;
+		
+		IASTNode node = null;
+		ParserLanguage lang = null;
+		for(int i=0; i<2; i++) {
+			lang = i==0 ? ParserLanguage.C : ParserLanguage.CPP;
+			
+			index = code.indexOf("[3]"); //$NON-NLS-1$
+			length = "[3]".length(); //$NON-NLS-1$
+			node = parse( code, lang, index, length );
+			assertNotNull(node);
+			
+			index = code.indexOf("3"); //$NON-NLS-1$
+			length = "3".length(); //$NON-NLS-1$
+			node = parse( code, lang, index, length );
+			assertNotNull(node);
+			
+			index = code.indexOf("*"); //$NON-NLS-1$
+			length = "*".length(); //$NON-NLS-1$
+			node = parse( code, lang, index, length );
+			assertNotNull(node);
+			
+			if (lang != ParserLanguage.C) {
+				index = code.indexOf("&"); //$NON-NLS-1$
+				length = "&".length(); //$NON-NLS-1$
+				node = parse( code, lang, index, length );
+				assertNotNull(node);
+				
+				index = code.indexOf("&c"); //$NON-NLS-1$
+				length = "&c".length(); //$NON-NLS-1$
+				node = parse( code, lang, index, length );
+				assertNotNull(node);
+			}
+			
+			index = code.indexOf("int a"); //$NON-NLS-1$
+			length = "int".length(); //$NON-NLS-1$
+			node = parse( code, lang, index, length );
+			assertNotNull(node);
+			
+			index = code.indexOf("int a[3];"); //$NON-NLS-1$
+			length = "int a[3];".length(); //$NON-NLS-1$
+			node = parse( code, lang, index, length );
+			assertNotNull(node);
+			
+			index = code.indexOf("a[3]"); //$NON-NLS-1$
+			length = "a[3]".length(); //$NON-NLS-1$
+			node = parse( code, lang, index, length );
+			assertNotNull(node);
+			
+			index = code.indexOf("*b"); //$NON-NLS-1$
+			length = "*b".length(); //$NON-NLS-1$
+			node = parse( code, lang, index, length );
+			assertNotNull(node);
+			
+			index = code.indexOf("'e'"); //$NON-NLS-1$
+			length = "'e'".length(); //$NON-NLS-1$
+			node = parse( code, lang, index, length );
+			assertNotNull(node);
+		}
+	}
+	
+	public void testSimpleWindowsPreprocessorSelections() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define ONE 1\r\n"); //$NON-NLS-1$
+		buffer.append("#ifdef ONE\r\n"); //$NON-NLS-1$
+		buffer.append("int x=0;\r\n"); //$NON-NLS-1$
+		buffer.append("#else\r\n"); //$NON-NLS-1$
+		buffer.append("char c='c';\r\n"); //$NON-NLS-1$
+		buffer.append("#endif\r\n"); //$NON-NLS-1$
+		
+		String code = buffer.toString();
+		int index = 0; 
+		int length = 0;
+		
+		IASTNode node = null;
+		ParserLanguage lang = null;
+		for(int i=0; i<2; i++) {
+			lang = i==0 ? ParserLanguage.C : ParserLanguage.CPP;
+			
+			index = code.indexOf("#define ONE 1"); //$NON-NLS-1$
+			length = "#define ONE 1".length(); //$NON-NLS-1$
+			node = parse( code, lang, index, length );
+			assertNotNull(node);
+
+			// TODO bug 87179
+//			index = code.indexOf("#ifdef ONE"); //$NON-NLS-1$
+//			length = "#ifdef ONE".length(); //$NON-NLS-1$
+//			node = parse( code, lang, index, length );
+//			assertNotNull(node);
+			
+			index = code.indexOf("int x=0;"); //$NON-NLS-1$
+			length = "int x=0;".length(); //$NON-NLS-1$
+			node = parse( code, lang, index, length );
+			assertNotNull(node);
+			
+			index = code.indexOf("#else"); //$NON-NLS-1$
+			length = "#else".length(); //$NON-NLS-1$
+			node = parse( code, lang, index, length );
+			assertNotNull(node);
+			
+			index = code.indexOf("#endif"); //$NON-NLS-1$
+			length = "#endif".length(); //$NON-NLS-1$
+			node = parse( code, lang, index, length );
+			assertNotNull(node);
+		}
+	}
+	
+	public void testBug86993() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define _BEGIN_STD_C extern \"C\" {\r\n"); //$NON-NLS-1$
+		buffer.append("#define _END_STD_C  }\r\n"); //$NON-NLS-1$
+		buffer.append("_BEGIN_STD_C\r\n"); //$NON-NLS-1$
+		buffer.append("char c;\r\n"); //$NON-NLS-1$
+		buffer.append("_END_STD_C\r\n"); //$NON-NLS-1$
+		
+		String code = buffer.toString();
+		int index = 0; 
+		int length = 0;
+		
+		IASTNode node = null;
+		
+		index = code.indexOf("c;"); //$NON-NLS-1$
+		length = "c".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.CPP, index, length ).getParent();
+		assertNotNull(node);
+		assertTrue( node instanceof IASTDeclarator);
+		assertEquals(((IASTDeclarator)node).getName().toString(), "c"); //$NON-NLS-1$
+		IASTName name = ((IASTDeclarator)node).getName();
+		assertNotNull(name.resolveBinding());
+		assertTrue(name.resolveBinding() instanceof IVariable);
+	}
+	
+	public void testBug86870() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#if VERSION == 1\r\n"); //$NON-NLS-1$
+		buffer.append("#define INCFILE \"vers1.h\"\r\n"); //$NON-NLS-1$
+		buffer.append("#elif VERSION == 2\r\n"); //$NON-NLS-1$
+		buffer.append("#define INCFILE \"vers2.h\" /* and so on */\r\n"); //$NON-NLS-1$
+		buffer.append("#else\r\n"); //$NON-NLS-1$
+		buffer.append("#define INCFILE \"versN.h\"\r\n"); //$NON-NLS-1$
+		buffer.append("#endif\r\n"); //$NON-NLS-1$
+		
+		String code = buffer.toString();
+		int offset1 = code.indexOf( "#if VERSION == 1" ); //$NON-NLS-1$
+		int length = "#if VERSION == 1".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, offset1, length );
+		assertNotNull(node);
+		assertEquals( ((ASTNode)node).getLength(), length);
+		
+		offset1 = code.indexOf( "#elif VERSION == 2" ); //$NON-NLS-1$
+		length = "#elif VERSION == 2".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.C, offset1, length );
+		assertNotNull(node);
+		assertEquals( ((ASTNode)node).getLength(), length);
+		
+		offset1 = code.indexOf( "#else" ); //$NON-NLS-1$
+		length = "#else".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.C, offset1, length );
+		assertNotNull(node);
+		assertEquals( ((ASTNode)node).getLength(), length);
+
+		offset1 = code.indexOf( "#define INCFILE \"versN.h\"" ); //$NON-NLS-1$
+		length = "#define INCFILE \"versN.h\"".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.C, offset1, length );
+		assertNotNull(node);
+		assertEquals( ((ASTNode)node).getLength(), length);
+		
+		offset1 = code.indexOf( "INCFILE \"versN.h\"" ); //$NON-NLS-1$
+		length = "INCFILE".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.C, offset1, length );
+		assertNotNull(node);
+		assertEquals( ((ASTNode)node).getLength(), length);
+		
+		offset1 = code.indexOf( "#endif" ); //$NON-NLS-1$
+		length = "#endif".length(); //$NON-NLS-1$
+		node = parse( code, ParserLanguage.C, offset1, length );
+		assertNotNull(node);
+		assertEquals( ((ASTNode)node).getLength(), length);
+	}
+		
+	public void testBug87179() throws Exception
+	{
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define ONE 1\r\n"); //$NON-NLS-1$
+		buffer.append("#ifdef ONE\r\n"); //$NON-NLS-1$
+		buffer.append("int x=0;\r\n"); //$NON-NLS-1$
+		buffer.append("#else\r\n"); //$NON-NLS-1$
+		buffer.append("char c='c';\r\n"); //$NON-NLS-1$
+		buffer.append("#endif\r\n"); //$NON-NLS-1$
+		
+		String code = buffer.toString();
+		int offset1 = code.indexOf( "#ifdef ONE" ); //$NON-NLS-1$
+		int length = "#ifdef ONE".length(); //$NON-NLS-1$
+		IASTNode node = parse( code, ParserLanguage.C, offset1, length );
+		assertNotNull(node);
+	}
+
+	public void testBug96702() throws Exception {
+		importFile("test.h", "int x;\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		String code = "#include \"test.h\"   // comment \nvoid f();   // comment \n"; //$NON-NLS-1$
+		
+		int offset = code.indexOf( "f()" ); //$NON-NLS-1$
+		IFile file = importFile("blah.c", code);
+		IASTNode node = parse( file, ParserLanguage.C, offset, 1 ); // select f();
+		assertTrue(node instanceof IASTName);
+		assertEquals(((ASTNode)node).getOffset(), 44);
+		assertEquals(((ASTNode)node).getLength(), 1);
+	}
+	
+	public void testBug97301() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		// test2.h:
+		buffer.append("#ifndef _WINGDI_H\r\n"); //$NON-NLS-1$
+		buffer.append("#define _WINGDI_H\r\n"); //$NON-NLS-1$
+		buffer.append("#define _WINGDI_\r\n"); //$NON-NLS-1$
+		buffer.append("#if __GNUC__ >= 3\r\n"); //$NON-NLS-1$
+		buffer.append("#pragma GCC system_header\r\n"); //$NON-NLS-1$
+		buffer.append("#endif\r\n"); //$NON-NLS-1$
+		buffer.append("#ifdef __cplusplus\r\n"); //$NON-NLS-1$
+		buffer.append("extern \"C\" {\r\n"); //$NON-NLS-1$
+		buffer.append("#endif\r\n"); //$NON-NLS-1$
+		buffer.append("#define WINGDIAPI\r\n"); //$NON-NLS-1$
+		buffer.append("#ifdef __cplusplus\r\n"); //$NON-NLS-1$
+		buffer.append("}\r\n"); //$NON-NLS-1$
+		buffer.append("#endif\r\n"); //$NON-NLS-1$
+		String test2_h = buffer.toString();
+		importFile("test2.h", test2_h); //$NON-NLS-1$
+		
+	
+		// test1.h:
+		buffer = new StringBuffer();
+		buffer.append("#ifdef RC_INVOKED\r\n"); //$NON-NLS-1$
+		buffer.append("#else\r\n"); //$NON-NLS-1$
+		buffer.append("#if !(defined NOGDI || defined  _WINGDI_H)\r\n"); //$NON-NLS-1$
+		buffer.append("#include \"test2.h\"\r\n"); //$NON-NLS-1$
+		buffer.append("#endif\r\n"); //$NON-NLS-1$
+		buffer.append("#endif\r\n"); //$NON-NLS-1$
+		importFile("test1.h", buffer.toString()); //$NON-NLS-1$
+		
+		// test.c:
+		IFile file = importFile("test.c", "#include \"test1.h\""); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		IASTTranslationUnit tu = parse(file, ParserLanguage.CPP, false, true);
+		IASTPreprocessorStatement[] stmts = tu.getAllPreprocessorStatements();
+		IASTFileLocation fileLoc = stmts[5].getFileLocation();
+		int fileOffset = test2_h.indexOf("#ifndef _WINGDI_H");
+		int fileLocOffset = fileLoc.getNodeOffset(); 
+		assertEquals(fileOffset, fileLocOffset);
+	}
+	
+	public void testBug86126() throws Exception {
+		String header= "foo"+System.currentTimeMillis()+".h";
+		String source= "blah"+System.currentTimeMillis()+".c";
+		importFile(header, "int x;\r\n"); //$NON-NLS-1$ 
+		String code = "#include \""+header+"\"\r\n"; //$NON-NLS-1$
+		IFile file = importFile(source, code);
+		int offset1 = code.indexOf( "#include \""+header+"\"" ); //$NON-NLS-1$
+		int length = ("#include \""+header+"\"").length(); //$NON-NLS-1$
+		IASTNode node = parse( file, ParserLanguage.C, offset1, length );
+		assertNotNull(node);
+	}
+
+    
+    public void testBug98806() throws Exception {
+        String code = "template <class T> class A { typedef typename T::B _B;};";
+        IASTNode node = parse( code, ParserLanguage.CPP, code.indexOf( "T::B"), "T::B".length() );
+        assertNotNull( node );
+        assertTrue( node instanceof IASTName );
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SpecBaseTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SpecBaseTest.java
new file mode 100644
index 0000000..b46c803
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2SpecBaseTest.java
@@ -0,0 +1,197 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IProblemBinding;
+import org.eclipse.cdt.core.dom.parser.ISourceCodeParser;
+import org.eclipse.cdt.core.dom.parser.c.ANSICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.GCCParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.ICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ANSICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.GPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.IScanner;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.ParserMode;
+import org.eclipse.cdt.core.parser.ScannerInfo;
+import org.eclipse.cdt.internal.core.dom.parser.c.CVisitor;
+import org.eclipse.cdt.internal.core.dom.parser.c.GNUCSourceParser;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+/**
+ * @author dsteffle
+ */
+public class AST2SpecBaseTest extends AST2BaseTest {
+	public AST2SpecBaseTest() {
+		super();
+	}
+
+	public AST2SpecBaseTest(String name) {
+		super(name);
+	}
+
+	/**
+	 * checkSemantics is used to specify whether the example should have semantics checked
+	 * since several spec examples have syntactically correct code ONLY this flag was added
+	 * so that future tests can ensure that examples are checked against syntax/semantics where necessary
+	 * @param code
+	 * @param expectedProblemBindings the number of problem bindings you expect to encounter
+	 * @throws ParserException
+	 */
+	protected void parseCandCPP(String code, boolean checkBindings, int expectedProblemBindings) throws ParserException {
+		parse(code, ParserLanguage.C, false, true, checkBindings, expectedProblemBindings, null);
+		parse(code, ParserLanguage.CPP, false, true, checkBindings, expectedProblemBindings, null);
+	}
+
+	protected IASTTranslationUnit parseWithErrors(String code, ParserLanguage lang) throws ParserException {
+    	return parse(code, lang, false, false, false, 0, null);
+    }
+
+	protected IASTTranslationUnit parse(String code, ParserLanguage lang, boolean checkBindings, int expectedProblemBindings) throws ParserException {
+    	return parse(code, lang, false, true, checkBindings, expectedProblemBindings, null);
+    }
+	
+	protected IASTTranslationUnit parse(String code, ParserLanguage lang, String[] problems) throws ParserException {
+    	return parse(code, lang, false, true, true, problems.length, problems);
+	}
+    
+    private IASTTranslationUnit parse(String code, ParserLanguage lang, boolean useGNUExtensions, boolean expectNoProblems, 
+    		boolean checkBindings, int expectedProblemBindings, String[] problems) throws ParserException {
+		// TODO beef this up with tests... i.e. run once with \n, and then run again with \r\n replacing \n ... etc
+		// TODO another example might be to replace all characters with corresponding trigraph/digraph tests...
+		
+		CodeReader codeReader = new CodeReader(code.toCharArray());
+		return parse(codeReader, lang, useGNUExtensions, expectNoProblems, checkBindings, expectedProblemBindings, problems);
+    }
+	
+//	private IASTTranslationUnit parse(IFile filename, ParserLanguage lang, boolean useGNUExtensions, boolean expectNoProblems) throws ParserException {
+//		CodeReader codeReader=null;
+//		try {
+//			codeReader = new CodeReader(filename.getName(), filename.getContents());
+//		} catch (IOException e) {
+//			e.printStackTrace();
+//		} catch (CoreException e) {
+//			e.printStackTrace();
+//		}
+//		
+//		return parse(codeReader, lang, useGNUExtensions, expectNoProblems);
+//    }
+	
+	private IASTTranslationUnit parse(CodeReader codeReader, ParserLanguage lang,
+			boolean useGNUExtensions, boolean expectNoProblems, boolean checkBindings,
+			int expectedProblemBindings, String[] problems) throws ParserException {
+        ScannerInfo scannerInfo = new ScannerInfo();
+        IScanner scanner= AST2BaseTest.createScanner(codeReader, lang, ParserMode.COMPLETE_PARSE, scannerInfo);
+        
+        ISourceCodeParser parser2 = null;
+        if (lang == ParserLanguage.CPP) {
+            ICPPParserExtensionConfiguration config = null;
+            if (useGNUExtensions)
+            	config = new GPPParserExtensionConfiguration();
+            else
+            	config = new ANSICPPParserExtensionConfiguration();
+            parser2 = new GNUCPPSourceParser(scanner, ParserMode.COMPLETE_PARSE, NULL_LOG, config);
+        } else {
+            ICParserExtensionConfiguration config = null;
+
+            if (useGNUExtensions)
+            	config = new GCCParserExtensionConfiguration();
+            else
+            	config = new ANSICParserExtensionConfiguration();
+            
+            parser2 = new GNUCSourceParser(scanner, ParserMode.COMPLETE_PARSE, 
+            		NULL_LOG, config);
+        }
+        
+        if (expectedProblemBindings > 0)
+    		CPPASTNameBase.sAllowNameComputation= true;
+
+        IASTTranslationUnit tu = parser2.parse();
+		
+		// resolve all bindings
+		if (checkBindings) {
+			NameResolver res = new NameResolver();
+	        tu.accept(res);
+			if (res.problemBindings.size() != expectedProblemBindings)
+				throw new ParserException("Expected " + expectedProblemBindings +
+						" problems, encountered " + res.problemBindings.size()); 
+			if (problems != null) {
+				for (int i = 0; i < problems.length; i++) {
+					assertEquals(problems[i], res.problemBindings.get(i));
+				}
+			}
+		}
+
+        if (parser2.encounteredError() && expectNoProblems)
+            throw new ParserException("FAILURE"); 
+         
+        if (lang == ParserLanguage.C && expectNoProblems) {
+			if (CVisitor.getProblems(tu).length != 0) {
+				throw new ParserException("CVisitor has AST Problems"); 
+			}
+			if (tu.getPreprocessorProblems().length != 0) {
+				throw new ParserException("C TranslationUnit has Preprocessor Problems"); 
+			}
+        } else if (lang == ParserLanguage.CPP && expectNoProblems) {
+			if (CPPVisitor.getProblems(tu).length != 0) {
+				throw new ParserException("CPPVisitor has AST Problems"); 
+			}
+			if (tu.getPreprocessorProblems().length != 0) {
+				throw new ParserException("CPP TranslationUnit has Preprocessor Problems"); 
+			}
+        }
+        
+        return tu;
+	}
+	
+	static protected class NameResolver extends ASTVisitor {
+		{
+			shouldVisitNames = true;
+		}
+		
+		public List<IASTName> nameList = new ArrayList<IASTName>();
+		public List<String> problemBindings = new ArrayList<String>();
+		public int numNullBindings = 0;
+		
+		@Override
+		public int visit(IASTName name) {
+			nameList.add(name);
+			IBinding binding = name.resolveBinding();
+			if (binding instanceof IProblemBinding)
+				problemBindings.add(name.toString());
+			if (binding == null)
+				numNullBindings++;
+			return PROCESS_CONTINUE;
+		}
+		
+		public IASTName getName(int idx) {
+			if (idx < 0 || idx >= nameList.size())
+				return null;
+			return nameList.get(idx);
+		}
+		
+		public int size() { 
+			return nameList.size(); 
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java
new file mode 100644
index 0000000..2c0804f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java
@@ -0,0 +1,4142 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM - Initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *     Bryan Wilkinson (QNX)
+ *     Andrew Ferguson (Symbian)
+ *     Sergey Prigogin (Google)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.getUltimateType;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
+import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
+import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionStatement;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IField;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IFunctionType;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.IPointerType;
+import org.eclipse.cdt.core.dom.ast.IProblemBinding;
+import org.eclipse.cdt.core.dom.ast.IQualifierType;
+import org.eclipse.cdt.core.dom.ast.IScope;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamedTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateId;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUnaryExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBasicType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassSpecialization;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplatePartialSpecialization;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPReferenceType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateDefinition;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateNonTypeParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTemplateParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTypeParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPUsingDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.util.ObjectMap;
+import org.eclipse.cdt.internal.core.dom.parser.Value;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDeferredClassInstance;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalUnknownScope;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding;
+
+/**
+ * @author aniefer
+ */
+public class AST2TemplateTests extends AST2BaseTest {
+	
+	public AST2TemplateTests() {
+	}
+	
+	public AST2TemplateTests(String name) {
+		super(name);
+	}
+	
+	public static TestSuite suite() {
+		return suite(AST2TemplateTests.class);
+	}
+	
+	public void testBasicClassTemplate() throws Exception {
+		IASTTranslationUnit tu = parse("template <class T> class A{ T t; };", ParserLanguage.CPP); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 4);
+		ICPPClassTemplate A = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPTemplateParameter T = (ICPPTemplateParameter) col.getName(0).resolveBinding();
+		
+		ICPPTemplateScope scope = (ICPPTemplateScope) T.getScope();
+		IScope s2 = A.getScope();
+		assertSame(scope, s2);
+		
+		ICPPField t = (ICPPField) col.getName(3).resolveBinding();
+		ICPPTemplateParameter T2 = (ICPPTemplateParameter) col.getName(2).resolveBinding();
+		
+		assertSame(T, T2);
+		IType type = t.getType();
+		assertSame(type, T);
+		
+		assertNotNull(T);
+		assertNotNull(A);
+	}
+	
+	// template < class T > class A {             
+	//    T t1;                                   
+	//    T * t2;                                 
+	// };                                         
+	// void f(){                                  
+	//    A<int> a;                               
+	//    a.t1; a.t2;                             
+	// }                                          
+	public void testBasicTemplateInstance_1() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 14);
+		
+		ICPPClassTemplate A = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPTemplateParameter T = (ICPPTemplateParameter) col.getName(0).resolveBinding();
+		ICPPField t1 = (ICPPField) col.getName(3).resolveBinding();
+		ICPPField t2 = (ICPPField) col.getName(5).resolveBinding();
+		
+		assertSame(t1.getType(), T);
+		assertSame(((IPointerType)t2.getType()).getType(), T);
+		
+		ICPPVariable a = (ICPPVariable) col.getName(9).resolveBinding();
+		
+		ICPPClassType A_int = (ICPPClassType) col.getName(7).resolveBinding();
+		assertSame(A_int, a.getType());
+		
+		assertTrue(A_int instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)A_int).getTemplateDefinition(), A);
+		
+		ICPPClassScope A_int_Scope = (ICPPClassScope) A_int.getCompositeScope();
+		assertNotSame(A_int_Scope, ((ICompositeType) A).getCompositeScope());
+		
+		ICPPField t = (ICPPField) col.getName(11).resolveBinding();
+		assertTrue(t instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)t).getSpecializedBinding(), t1);
+		assertSame(t.getScope(), A_int_Scope);
+		IType type = t.getType();
+		assertTrue(type instanceof IBasicType);
+		assertEquals(((IBasicType)type).getType(), IBasicType.t_int);
+		
+		t = (ICPPField) col.getName(13).resolveBinding();
+		assertTrue(t instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)t).getSpecializedBinding(), t2);
+		assertSame(t.getScope(), A_int_Scope);
+		type = t.getType();
+		assertTrue(type instanceof IPointerType);
+		assertTrue(((IPointerType)type).getType() instanceof IBasicType);
+		assertEquals(((IBasicType)((IPointerType)type).getType()).getType(), IBasicType.t_int);
+	}
+	
+	// template < class T > class A {             
+	//    T f(T *);                              
+	// };                                         
+	// void g(){                                  
+	//    A<int> a;                               
+	//    a.f((int*)0);                         
+	// }                                          
+	public void testBasicTemplateInstance_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType A = (ICPPClassType) col.getName(1).resolveBinding();
+		ICPPTemplateParameter T = (ICPPTemplateParameter) col.getName(0).resolveBinding();
+		ICPPMethod f = (ICPPMethod) col.getName(3).resolveBinding();
+		IFunctionType ft = f.getType();
+		
+		assertSame(ft.getReturnType(), T);
+		assertSame(((IPointerType)ft.getParameterTypes()[0]).getType(), T);
+		
+		ICPPClassType A_int = (ICPPClassType) col.getName(7).resolveBinding();
+		assertTrue(A_int instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)A_int).getTemplateDefinition(), A);
+		
+		ICPPMethod f_int = (ICPPMethod) col.getName(11).resolveBinding();
+		assertTrue(f_int instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)f_int).getSpecializedBinding(), f);
+		ft = f_int.getType();
+		assertTrue(ft.getReturnType() instanceof IBasicType);
+		assertTrue(((IPointerType)ft.getParameterTypes()[0]).getType() instanceof IBasicType);
+	}
+	
+	// template <class T > void f(T);          
+	// template <class T > void f(T) {         
+	//    T * d;                                 
+	// }                                         
+	// void foo() {                              
+	//    f<int>(0);                           
+	// }                                         
+	public void testBasicTemplateFunction() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunctionTemplate f = (ICPPFunctionTemplate) col.getName(1).resolveBinding();
+		ICPPTemplateParameter T = (ICPPTemplateParameter) col.getName(0).resolveBinding();
+		
+		IParameter p1 = (IParameter) col.getName(3).resolveBinding();
+		
+		ICPPTemplateParameter T2 = (ICPPTemplateParameter) col.getName(4).resolveBinding();
+		ICPPFunction f2 = (ICPPFunction) col.getName(5).resolveBinding();
+		IParameter p2 = (IParameter) col.getName(7).resolveBinding();
+		
+		assertSame(T, T2);
+		assertSame(f, f2);
+		assertSame(p1, p2);
+		assertSame(p1.getType(), T);
+		
+		ICPPFunction f3 = (ICPPFunction) col.getName(11).resolveBinding();
+		assertTrue(f3 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)f3).getTemplateDefinition(), f);
+		
+		assertInstances(col, T, 5);
+	}
+	
+	// template < class T > class pair {                
+	//    template < class U > pair(const pair<U> &); 
+	// };                                               
+	public void testStackOverflow() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertTrue(col.getName(0).resolveBinding() instanceof ICPPTemplateParameter);
+		ICPPClassTemplate pair = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPTemplateParameter U = (ICPPTemplateParameter) col.getName(2).resolveBinding();
+		assertTrue(col.getName(3).resolveBinding() instanceof ICPPFunctionTemplate);
+		ICPPTemplateInstance pi = (ICPPTemplateInstance) col.getName(4).resolveBinding();
+		ICPPClassTemplate p = (ICPPClassTemplate) col.getName(5).resolveBinding();
+		ICPPTemplateParameter U2 = (ICPPTemplateParameter) col.getName(6).resolveBinding();
+		
+		assertSame(U, U2);
+		assertSame(pair, p);
+		assertSame(pi.getTemplateDefinition(), pair);
+	}
+	
+	// template < class T > class A {};       
+	// template < class T > class A< T* > {}; 
+	// template < class T > class A< T** > {}; 
+	public void testBasicClassPartialSpecialization() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPTemplateParameter T1 = (ICPPTemplateParameter) col.getName(0).resolveBinding();
+		ICPPClassTemplate A1 = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPTemplateParameter T2 = (ICPPTemplateParameter) col.getName(2).resolveBinding();
+		ICPPClassTemplatePartialSpecialization A2 = (ICPPClassTemplatePartialSpecialization) col.getName(3).resolveBinding();
+		ICPPTemplateParameter T3 = (ICPPTemplateParameter) col.getName(5).resolveBinding();
+		ICPPClassTemplatePartialSpecialization A3 = (ICPPClassTemplatePartialSpecialization) col.getName(7).resolveBinding();
+		ICPPTemplateParameter T4 = (ICPPTemplateParameter) col.getName(6).resolveBinding();
+		
+		assertSame(A2.getPrimaryClassTemplate(), A1);
+		assertSame(A3.getPrimaryClassTemplate(), A1);
+		assertNotSame(T1, T2);
+		assertNotSame(A1, A2);
+		assertNotSame(A1, A3);
+		assertNotSame(A2, A3);
+		assertSame(T2, T3);
+		assertNotSame(T2, T4);
+	}
+	
+	// template < class T > class A { typedef int TYPE; };  
+	// template < class T > typename A<T>::TYPE foo(T);            
+	// template < class T > typename A<T>::TYPE foo(T);            
+	public void testStackOverflow_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPTemplateParameter T0 = (ICPPTemplateParameter) col.getName(0).resolveBinding();
+		ICPPClassTemplate A = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPTemplateParameter T1 = (ICPPTemplateParameter) col.getName(3).resolveBinding();
+		ICPPTemplateParameter T2 = (ICPPTemplateParameter) col.getName(12).resolveBinding();
+		
+		assertNotSame(T0, T1);
+		assertSame(T1, T2);
+		
+		ICPPFunctionTemplate foo1 = (ICPPFunctionTemplate) col.getName(9).resolveBinding();
+		ICPPFunctionTemplate foo2 = (ICPPFunctionTemplate) col.getName(18).resolveBinding();
+		assertSame(foo1, foo2);
+		
+		ITypedef TYPE = (ITypedef) col.getName(2).resolveBinding();
+		IBinding b0 = col.getName(8).resolveBinding();
+		IBinding b1 = col.getName(17).resolveBinding();
+		assertSame(b1, b0);
+		
+		// the instantiation of A<T> has to be deferred.
+		assertInstance(b0, ICPPUnknownBinding.class);
+		final ICPPBinding parent = ((ICPPInternalUnknownScope)b0.getScope()).getScopeBinding();
+		assertInstance(parent, ICPPDeferredClassInstance.class);
+		assertSame(((ICPPDeferredClassInstance) parent).getSpecializedBinding(), A);
+
+		assertInstances(col, T1, 6);
+	}
+	
+	// template < class T > class A {                       
+	//    void f();                                         
+	// };                                                   
+	// template < class T > void A<T>::f() { }              
+	public void testTemplateMemberDef() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPMethod f1 = (ICPPMethod) col.getName(2).resolveBinding();
+		ICPPMethod f2 = (ICPPMethod) col.getName(8).resolveBinding();
+		
+		assertSame(f2, f1);
+	}
+	
+	// template < class T > void f (T);           
+	// void main() {                                
+	//    f(1);                                   
+	// }                                            
+	public void testTemplateFunctionImplicitInstantiation() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunctionTemplate f1 = (ICPPFunctionTemplate) col.getName(1).resolveBinding();
+		IFunction f2 = (IFunction) col.getName(5).resolveBinding();
+		
+		assertTrue(f2 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)f2).getTemplateDefinition(), f1);
+	}
+	
+	// template < class T > void f(T);         // #1 
+	// template < class T > void f(T*);        // #2
+	// template < class T > void f(const T*);  // #3 
+	// void main() {                            
+	//    const int *p;                         
+	//    f(p); //calls f(const T *) , 3 is more specialized than 1 or 2
+	// }                                        
+	public void test_14_5_5_2s5_OrderingFunctionTemplates_1() throws Exception{
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunctionTemplate f1 = (ICPPFunctionTemplate) col.getName(1).resolveBinding();
+		ICPPFunctionTemplate f2 = (ICPPFunctionTemplate) col.getName(5).resolveBinding();
+		ICPPFunctionTemplate f3 = (ICPPFunctionTemplate) col.getName(9).resolveBinding();
+		
+		assertNotSame(f1, f2);
+		assertNotSame(f2, f3);
+		assertNotSame(f3, f1);
+		
+		IFunction f = (IFunction) col.getName(14).resolveBinding();
+		assertTrue(f instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)f).getTemplateDefinition(), f3);
+	}
+	
+	// template < class T > void f(T);    // #1
+	// template < class T > void f(T&);   // #2
+	// void main() {                            
+	//    float x;                              
+	//    f(x); //ambiguous 1 or 2
+	// }                                        
+	public void test_14_5_5_2s5_OrderingFunctionTemplates_2() throws Exception{
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunctionTemplate f1 = (ICPPFunctionTemplate) col.getName(1).resolveBinding();
+		ICPPFunctionTemplate f2 = (ICPPFunctionTemplate) col.getName(5).resolveBinding();
+		
+		assertNotSame(f1, f2);
+		
+		IProblemBinding f = (IProblemBinding) col.getName(10).resolveBinding();
+		assertEquals(f.getID(), IProblemBinding.SEMANTIC_AMBIGUOUS_LOOKUP);
+	}
+	
+	// template < class T, template < class X > class U, T *pT > class A {   
+	// };                                                                    
+	public void testTemplateParameters() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPTemplateTypeParameter T = (ICPPTemplateTypeParameter) col.getName(0).resolveBinding();
+		ICPPTemplateTemplateParameter U = (ICPPTemplateTemplateParameter) col.getName(2).resolveBinding();
+		ICPPTemplateNonTypeParameter pT = (ICPPTemplateNonTypeParameter) col.getName(4).resolveBinding();
+		
+		ICPPTemplateTypeParameter X = (ICPPTemplateTypeParameter) col.getName(1).resolveBinding();
+		
+		ICPPTemplateParameter[] ps = U.getTemplateParameters();
+		assertEquals(ps.length, 1);
+		assertSame(ps[0], X);
+		
+		IPointerType ptype = (IPointerType) pT.getType();
+		assertSame(ptype.getType(), T);
+	}
+	
+	// template <class T> class A {        
+	//    A<T>* a;                         
+	//    A<T>* a2;                        
+	// };                                  
+	// void f(){                           
+	//    A<int> * b;                      
+	//    b->a;                            
+	// }                                   
+	public void testDeferredInstances() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate A = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPTemplateInstance A_T = (ICPPTemplateInstance) col.getName(2).resolveBinding();
+		assertSame(A_T.getTemplateDefinition(), A);
+		
+		ICPPTemplateInstance A_T2 = (ICPPTemplateInstance) col.getName(6).resolveBinding();
+		assertSame(A_T, A_T2);
+		
+		ICPPVariable a = (ICPPVariable) col.getName(5).resolveBinding();
+		IPointerType pt = (IPointerType) a.getType();
+		assertSame(pt.getType(), A_T);
+		
+		ICPPVariable b = (ICPPVariable) col.getName(13).resolveBinding();
+		IType bt = b.getType();
+		assertTrue(bt instanceof IPointerType);
+		
+		ICPPVariable a2 = (ICPPVariable) col.getName(15).resolveBinding();
+		assertTrue(a2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)a2).getSpecializedBinding(), a);
+		IType at = a2.getType();
+		assertTrue(at instanceof IPointerType);
+		
+		assertSame(((IPointerType)at).getType(), ((IPointerType)bt).getType());
+	}
+	
+	// template < class T1, class T2, int I > class A                {}; //#1   
+	// template < class T, int I >            class A < T, T*, I >   {}; //#2   
+	// template < class T1, class T2, int I > class A < T1*, T2, I > {}; //#3   
+	// template < class T >                   class A < int, T*, 5 > {}; //#4   
+	// template < class T1, class T2, int I > class A < T1, T2*, I > {}; //#5   
+	//
+	// A <int, int, 1>   a1;		//uses #1                                    
+	// A <int, int*, 1>  a2;		//uses #2, T is int, I is 1                  
+	// A <int, char*, 5> a3;		//uses #4, T is char                         
+	// A <int, char*, 1> a4;		//uses #5, T is int, T2 is char, I is1       
+	// A <int*, int*, 2> a5;		//ambiguous, matches #3 & #5.                
+	public void test_14_5_4_1s2_MatchingTemplateSpecializations() throws Exception{
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate A1 = (ICPPClassTemplate) col.getName(3).resolveBinding();
+		ICPPClassTemplate A2 = (ICPPClassTemplate) col.getName(6).resolveBinding();
+		ICPPClassTemplate A3 = (ICPPClassTemplate) col.getName(14).resolveBinding();
+		ICPPClassTemplate A4 = (ICPPClassTemplate) col.getName(20).resolveBinding();
+		ICPPClassTemplate A5 = (ICPPClassTemplate) col.getName(26).resolveBinding();
+		
+		assertTrue(A3 instanceof ICPPClassTemplatePartialSpecialization);
+		assertSame(((ICPPClassTemplatePartialSpecialization)A3).getPrimaryClassTemplate(), A1);
+		
+		ICPPTemplateTypeParameter T1 = (ICPPTemplateTypeParameter) col.getName(11).resolveBinding();
+		ICPPTemplateTypeParameter T2 = (ICPPTemplateTypeParameter) col.getName(12).resolveBinding();
+		ICPPTemplateNonTypeParameter I = (ICPPTemplateNonTypeParameter) col.getName(13).resolveBinding();
+		
+		ICPPTemplateParameter TR1 = (ICPPTemplateParameter) col.getName(16).resolveBinding();
+		ICPPTemplateParameter TR2 = (ICPPTemplateParameter) col.getName(17).resolveBinding();
+		ICPPTemplateParameter TR3 = (ICPPTemplateParameter) col.getName(18).resolveBinding();
+		
+		assertSame(T1, TR1);
+		assertSame(T2, TR2);
+		assertSame(I, TR3);
+		
+		ICPPTemplateInstance R1 = (ICPPTemplateInstance) col.getName(31).resolveBinding();
+		ICPPTemplateInstance R2 = (ICPPTemplateInstance) col.getName(34).resolveBinding();
+		ICPPTemplateInstance R3 = (ICPPTemplateInstance) col.getName(37).resolveBinding();
+		ICPPTemplateInstance R4 = (ICPPTemplateInstance) col.getName(40).resolveBinding();
+		IProblemBinding R5 = (IProblemBinding) col.getName(43).resolveBinding();
+		assertEquals(R5.getID(), IProblemBinding.SEMANTIC_AMBIGUOUS_LOOKUP);
+		
+		assertSame(R1.getTemplateDefinition(), A1);
+		assertSame(R2.getTemplateDefinition(), A2);
+		assertSame(R4.getTemplateDefinition(), A5);
+		assertSame(R3.getTemplateDefinition(), A4);
+	}
+	
+	// template <class T> void f(T);                  
+	// template <class T> void f(T*);                 
+	// template <> void f(int);       //ok            
+	// template <> void f<int>(int*); //ok            
+	public void test14_7_3_FunctionExplicitSpecialization() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunctionTemplate fT1 = (ICPPFunctionTemplate) col.getName(1).resolveBinding();
+		ICPPFunctionTemplate fT2 = (ICPPFunctionTemplate) col.getName(5).resolveBinding();
+		
+		ICPPSpecialization f1 = (ICPPSpecialization) col.getName(8).resolveBinding();
+		ICPPSpecialization f2 = (ICPPSpecialization) col.getName(10).resolveBinding();
+		
+		assertSame(f1.getSpecializedBinding(), fT1);
+		assertSame(f2.getSpecializedBinding(), fT2);
+	}
+	
+	// template<class T> void f(T*);        
+	// void g(int* p) { f(p); }             
+	public void test_14_5_5_1_FunctionTemplates_1() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunctionTemplate f = (ICPPFunctionTemplate) col.getName(1).resolveBinding();
+		
+		ICPPFunction ref = (ICPPFunction) col.getName(6).resolveBinding();
+		assertTrue(ref instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)ref).getTemplateDefinition(), f);
+	}
+	
+	// template<class T> void f(T);        
+	// void g(int* p) { f(p); }            
+	public void test_14_5_5_1_FunctionTemplates_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunctionTemplate f = (ICPPFunctionTemplate) col.getName(1).resolveBinding();
+		
+		ICPPFunction ref = (ICPPFunction) col.getName(6).resolveBinding();
+		assertTrue(ref instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)ref).getTemplateDefinition(), f);
+	}
+	
+	// template<class X, class Y> X f(Y);                      
+	// void g(){                                               
+	//    int i = f<int>(5); // Y is int                       
+	// }                                                       
+	public void test_14_8_1s2_FunctionTemplates() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunctionTemplate f = (ICPPFunctionTemplate) col.getName(3).resolveBinding();
+		ICPPFunction ref1 = (ICPPFunction) col.getName(8).resolveBinding();
+		
+		assertTrue(ref1 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance) ref1).getTemplateDefinition(), f);
+	}
+	
+	// template<class T> void f(T);  
+	// void g(){                     
+	//    f("Annemarie");          
+	// }                             
+	public void test14_8_3s6_FunctionTemplates() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunctionTemplate f = (ICPPFunctionTemplate) col.getName(1).resolveBinding();
+		ICPPFunction ref = (ICPPFunction) col.getName(5).resolveBinding();
+		assertTrue(ref instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)ref).getTemplateDefinition(), f);
+	}
+	
+	// template<class T> void f(T);         // #1
+	// template<class T> void f(T*, int=1); // #2
+	// template<class T> void g(T);         // #3
+	// template<class T> void g(T*, ...);   // #4
+	// int main() {                              
+	//    int* ip;                               
+	//    f(ip);                       //calls #2
+	//    g(ip);                       //calls #4
+	// }                                         
+	public void test14_5_5_2s6_FunctionTemplates() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunctionTemplate f1 = (ICPPFunctionTemplate) col.getName(1).resolveBinding();
+		ICPPFunctionTemplate f2 = (ICPPFunctionTemplate) col.getName(5).resolveBinding();
+		assertNotSame(f1, f2);
+		
+		ICPPFunctionTemplate g1 = (ICPPFunctionTemplate) col.getName(10).resolveBinding();
+		ICPPFunctionTemplate g2 = (ICPPFunctionTemplate) col.getName(14).resolveBinding();
+		assertNotSame(g1, g2);
+		
+		ICPPFunction ref1 = (ICPPFunction) col.getName(19).resolveBinding();
+		ICPPFunction ref2 = (ICPPFunction) col.getName(21).resolveBinding();
+		
+		assertTrue(ref1 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance) ref1).getTemplateDefinition(), f2);
+		
+		assertTrue(ref2 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance) ref2).getTemplateDefinition(), g2);
+	}
+	
+	// template<class T> class X {           
+	//    X* p;               // meaning X<T>
+	//    X<T>* p2;                          
+	// };                                    
+	public void test14_6_1s1_LocalNames() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate X = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPClassType x1 = (ICPPClassType) col.getName(2).resolveBinding();
+		ICPPClassType x2 = (ICPPClassType) col.getName(4).resolveBinding();
+		
+		assertTrue(x1 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)x1).getTemplateDefinition(), X);
+		
+		assertSame(x1, x2);
+	}
+	
+	// template<class T> T f(T* p){                  
+	// };                                            
+	// void g(int a, char* b){                       
+	//    f(&a);              //call f<int>(int*)    
+	//    f(&b);              //call f<char*>(char**)
+	// }                                             
+	public void test14_8s2_() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunctionTemplate f = (ICPPFunctionTemplate) col.getName(2).resolveBinding();
+		
+		ICPPFunction f1 = (ICPPFunction) col.getName(8).resolveBinding();
+		ICPPFunction f2 = (ICPPFunction) col.getName(10).resolveBinding();
+		
+		assertNotSame(f1, f2);
+		assertTrue(f1 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)f1).getTemplateDefinition(), f);
+		assertTrue(f2 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)f2).getTemplateDefinition(), f);
+		
+		IType fr1 = f1.getType().getReturnType();
+		IType fr2 = f2.getType().getReturnType();
+		
+		assertTrue(fr1 instanceof IBasicType);
+		assertEquals(((IBasicType)fr1).getType(), IBasicType.t_int);
+		
+		assertTrue(fr2 instanceof IPointerType);
+		assertTrue(((IPointerType)fr2).getType() instanceof IBasicType);
+		assertEquals(((IBasicType) ((IPointerType)fr2).getType()).getType(), IBasicType.t_char);
+	}
+	
+	// template<class T> void f(T) {  }                  
+	// template<class T> inline T g(T) {  }              
+	// template<> inline void f<>(int) {  } //OK: inline 
+	// template<> int g<>(int) {  }     // OK: not inline
+	public void test14_7_3s14() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunctionTemplate f1 = (ICPPFunctionTemplate) col.getName(1).resolveBinding();
+		ICPPFunctionTemplate g1 = (ICPPFunctionTemplate) col.getName(6).resolveBinding();
+		
+		ICPPSpecialization f2 = (ICPPSpecialization) col.getName(9).resolveBinding();
+		ICPPSpecialization g2 = (ICPPSpecialization) col.getName(12).resolveBinding();
+		
+		assertSame(f2.getSpecializedBinding(), f1);
+		assertSame(g2.getSpecializedBinding(), g1);
+		
+		assertFalse(((ICPPFunction)f1).isInline());
+		assertTrue(((ICPPFunction)g1).isInline());
+		assertTrue(((ICPPFunction)f2).isInline());
+		assertFalse(((ICPPFunction)g2).isInline());
+	}
+	
+	// template<class T> class X {                                       
+	//    X<T*> a; // implicit generation of X<T> requires               
+	//             // the implicit instantiation of X<T*> which requires 
+	//             // the implicit instantiation of X<T**> which ...     
+	// };                                                                
+	// void f() {                                                        
+	//    X<int> x;                                                      
+	//    x.a.a.a.a;                                                     
+	// }                                                                 
+	public void test14_7_1s14_InfiniteInstantiation() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate X = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPVariable x = (ICPPVariable) col.getName(9).resolveBinding();
+		IType t = x.getType();
+		assertTrue(t instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance) t).getTemplateDefinition(), X);
+		
+		ICPPField a = (ICPPField) col.getName(5).resolveBinding();
+		ICPPField a1 = (ICPPField) col.getName(11).resolveBinding();
+		ICPPField a2 = (ICPPField) col.getName(12).resolveBinding();
+		ICPPField a3 = (ICPPField) col.getName(13).resolveBinding();
+		ICPPField a4 = (ICPPField) col.getName(14).resolveBinding();
+		
+		assertTrue(a1 instanceof ICPPSpecialization);
+		assertTrue(a2 instanceof ICPPSpecialization);
+		assertTrue(a3 instanceof ICPPSpecialization);
+		assertTrue(a4 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)a1).getSpecializedBinding(), a);
+		assertSame(((ICPPSpecialization)a2).getSpecializedBinding(), a);
+		assertSame(((ICPPSpecialization)a3).getSpecializedBinding(), a);
+		assertSame(((ICPPSpecialization)a4).getSpecializedBinding(), a);
+	}
+	
+	// template<class T> class Y;         
+	// template<> class Y<int> {          
+	//    Y* p; // meaning Y<int>         
+	//    Y<char>* q; // meaning Y<char>  
+	// };                                 
+	public void test14_6_1s2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate Y = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPSpecialization Yspec = (ICPPSpecialization) col.getName(2).resolveBinding();
+		
+		assertTrue(Yspec instanceof ICPPClassType);
+		assertSame(Yspec.getSpecializedBinding(), Y);
+		
+		ICPPClassType y1 = (ICPPClassType) col.getName(4).resolveBinding();
+		assertSame(y1, Yspec);
+		
+		ICPPClassType y2 = (ICPPClassType) col.getName(6).resolveBinding();
+		assertTrue(y2 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)y2).getTemplateDefinition(), Y);
+	}
+	
+	// template < class T, class U > void f (T (*) (T, U));   
+	// int g (int, char);                                       
+	// void foo () {                                              
+	//    f(g);                                                 
+	// }                                                          
+	public void testBug45129() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunction f1 = (ICPPFunction) col.getName(2).resolveBinding();
+		ICPPFunction g1 = (ICPPFunction) col.getName(9).resolveBinding();
+		
+		IBinding f2 = col.getName(13).resolveBinding();
+		IBinding g2 = col.getName(14).resolveBinding();
+		
+		assertTrue(f2 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)f2).getTemplateDefinition(), f1);
+		assertSame(g1, g2);
+	}
+	
+	// template <class T, class U = T > class A {   
+	//    U u;                                      
+	// };                                           
+	// void f() {                                   
+	//    A<int> a;                                 
+	//    a.u;                                      
+	// }                                            
+	public void testBug76951_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPTemplateParameter T = (ICPPTemplateParameter) col.getName(0).resolveBinding();
+		ICPPTemplateTypeParameter U = (ICPPTemplateTypeParameter) col.getName(1).resolveBinding();
+		assertSame(U.getDefault(), T);
+		
+		ICPPClassTemplate A = (ICPPClassTemplate) col.getName(3).resolveBinding();
+		ICPPField u1 = (ICPPField) col.getName(5).resolveBinding();
+		assertSame(u1.getType(), U);
+		
+		ICPPClassType A1 = (ICPPClassType) col.getName(7).resolveBinding();
+		assertTrue(A1 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)A1).getTemplateDefinition(), A);
+		
+		ICPPField u2 = (ICPPField) col.getName(11).resolveBinding();
+		assertTrue(u2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)u2).getSpecializedBinding(), u1);
+		
+		IType type = u2.getType();
+		assertTrue(type instanceof IBasicType);
+		assertEquals(((IBasicType)type).getType(), IBasicType.t_int);
+	}
+	
+	// template < class T > class A {               
+	//    A< int > a;                               
+	// };                                           
+	// void f(A<int> p) { }                       
+	public void testInstances() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate A = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPClassType A1 = (ICPPClassType) col.getName(2).resolveBinding();
+		ICPPClassType A2 = (ICPPClassType) col.getName(6).resolveBinding();
+		
+		assertSame(A1, A2);
+		assertTrue(A1 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)A1).getTemplateDefinition(), A);
+	}
+	
+	// template <class T> void f(T);      
+	// template <class T> void f(T) {}    
+	public void testTemplateParameterDeclarations() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPTemplateParameter T1 = (ICPPTemplateParameter) col.getName(4).resolveBinding();
+		ICPPTemplateParameter T2 = (ICPPTemplateParameter) col.getName(2).resolveBinding();
+		
+		assertSame(T1, T2);
+		
+		assertInstances(col, T1, 4);
+	}
+	
+	// template < class T > class A {                                
+	//    int f(A *);                                              
+	//    A < T > *pA;                                               
+	// };                                                            
+	// void f () {                                                   
+	//    A< int > *a;                                               
+	//    a->f(a);                                                 
+	//    a->pA;                                                     
+	// };                                                            
+	public void testDeferredInstantiation() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate A = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPMethod f = (ICPPMethod) col.getName(2).resolveBinding();
+		ICPPClassType A1 = (ICPPClassType) col.getName(3).resolveBinding();
+		ICPPClassType A2 = (ICPPClassType) col.getName(5).resolveBinding();
+		ICPPField pA = (ICPPField) col.getName(8).resolveBinding();
+		
+		assertSame(A1, A2);
+		assertTrue(A1 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)A1).getTemplateDefinition(), A);
+		
+		ICPPClassType AI = (ICPPClassType) col.getName(10).resolveBinding();
+		ICPPMethod f2 = (ICPPMethod) col.getName(14).resolveBinding();
+		ICPPField pA2 = (ICPPField) col.getName(17).resolveBinding();
+		
+		assertTrue(f2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)f2).getSpecializedBinding(), f);
+		assertTrue(pA2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)pA2).getSpecializedBinding(), pA);
+		
+		IType paT = pA2.getType();
+		assertTrue(paT instanceof IPointerType);
+		assertSame(((IPointerType)paT).getType(), AI);
+		
+		IParameter p = f2.getParameters()[0];
+		IType pT = p.getType();
+		assertTrue(pT instanceof IPointerType);
+		assertSame(((IPointerType)pT).getType(), AI);
+	}
+	
+	// template <class T> struct A {                                 
+	//    void f(int);                                               
+	//    template <class T2> void f(T2);                            
+	// };                                                            
+	// template <> void A<int>::f(int) { } //nontemplate             
+	// template <> template <> void A<int>::f<>(int) { } //template  
+	// int main() {                                                  
+	//    A<int> ac;                                                 
+	//    ac.f(1);   //nontemplate                                   
+	//    ac.f('c'); //template                                      
+	//    ac.f<>(1); //template                                      
+	// }                                                             
+	public void test14_5_2s2_MemberSpecializations() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate A = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPMethod f1 = (ICPPMethod) col.getName(2).resolveBinding();
+		ICPPMethod f2 = (ICPPMethod) col.getName(5).resolveBinding();
+		
+		ICPPMethod f1_2 = (ICPPMethod) col.getName(11).resolveBinding();
+		assertNotSame(f1, f1_2);
+		assertTrue(f1_2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)f1_2).getSpecializedBinding(), f1);
+		
+		ICPPClassType A2 = (ICPPClassType) col.getName(9).resolveBinding();
+		assertTrue(A2 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)A2).getTemplateDefinition(), A);
+		
+		ICPPMethod f2_2 = (ICPPMethod) col.getName(16).resolveBinding();
+		assertTrue(f2_2 instanceof ICPPSpecialization);
+		IBinding speced = ((ICPPSpecialization)f2_2).getSpecializedBinding();
+		assertTrue(speced instanceof ICPPFunctionTemplate && speced instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)speced).getSpecializedBinding(), f2);
+		
+		ICPPClassType A3 = (ICPPClassType) col.getName(14).resolveBinding();
+		assertSame(A2, A3);
+		
+		ICPPClassType A4 = (ICPPClassType) col.getName(20).resolveBinding();
+		assertSame(A2, A4);
+		
+		IFunction r1 = (IFunction) col.getName(24).resolveBinding();
+		IFunction r2 = (IFunction) col.getName(26).resolveBinding();
+		IFunction r3 = (IFunction) col.getName(28).resolveBinding();
+		
+		assertSame(r1, f1_2);
+		assertTrue(r2 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)r2).getTemplateDefinition(), speced);
+		assertSame(r3, f2_2);
+	}
+	
+	// template <class T> class A { };       
+	// template <> class A<int> {};          
+	// A<char> ac;                           
+	// A<int> ai;                            
+	public void testClassSpecializations() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate A1 = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPClassType A2 = (ICPPClassType) col.getName(2).resolveBinding();
+		
+		assertTrue(A2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)A2).getSpecializedBinding(), A1);
+		
+		ICPPClassType r1 = (ICPPClassType) col.getName(4).resolveBinding();
+		ICPPClassType r2 = (ICPPClassType) col.getName(7).resolveBinding();
+		
+		assertTrue(r1 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)r1).getTemplateDefinition(), A1);
+		assertSame(r2, A2);
+	}
+	
+	// template<class T> struct A {                                           
+	//    void f(T) {  }                                                      
+	// };                                                                     
+	// template<> struct A<int> {                                             
+	//    void f(int);                                                        
+	// };                                                                     
+	// void h(){                                                              
+	//    A<int> a;                                                           
+	//    a.f(16);   // A<int>::f must be defined somewhere                   
+	// }                                                                      
+	// // explicit specialization syntax not used for a member of             
+	// // explicitly specialized class template specialization                
+	// void A<int>::f(int) {  }                                               
+	public void test14_7_3s5_SpecializationMemberDefinition() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate A1 = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPMethod f1 = (ICPPMethod) col.getName(2).resolveBinding();
+		
+		ICPPClassType A2 = (ICPPClassType) col.getName(5).resolveBinding();
+		assertTrue(A2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)A2).getSpecializedBinding(), A1);
+		
+		ICPPMethod f2 = (ICPPMethod) col.getName(7).resolveBinding();
+		assertNotSame(f1, f2);
+		
+		ICPPClassType A3 = (ICPPClassType) col.getName(10).resolveBinding();
+		assertSame(A3, A2);
+		ICPPMethod f3 = (ICPPMethod) col.getName(14).resolveBinding();
+		assertSame(f3, f2);
+		
+		ICPPClassType A4 = (ICPPClassType) col.getName(16).resolveBinding();
+		assertSame(A4, A2);
+		ICPPMethod f4 = (ICPPMethod) col.getName(18).resolveBinding();
+		assertSame(f4, f3);
+	}
+	
+	// class C{};                                                     
+	// template <class T> class A {                                   
+	//    template <class T2> class B {                               
+	//       T f(T2);                                               
+	//    };                                                          
+	// };                                                             
+	// void g(){                                                      
+	//    A<int>::B<C> b;                                             
+	//    C c;                                                        
+	//    b.f(c);                                                   
+	// }                                                              
+	public void testNestedSpecializations() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType C = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPClassTemplate A = (ICPPClassTemplate) col.getName(2).resolveBinding();
+		ICPPClassTemplate B = (ICPPClassTemplate) col.getName(4).resolveBinding();
+		ICPPMethod f = (ICPPMethod) col.getName(6).resolveBinding();
+		
+		ICPPClassType A1 = (ICPPClassType) col.getName(11).resolveBinding();
+		assertTrue(A1 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)A1).getTemplateDefinition(), A);
+		
+		ICPPClassType B1 = (ICPPClassType) col.getName(13).resolveBinding();
+		assertTrue(B1 instanceof ICPPTemplateInstance);
+		ICPPClassType B2 = (ICPPClassType) ((ICPPTemplateInstance)B1).getTemplateDefinition();
+		assertTrue(B2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)B2).getSpecializedBinding(), B);
+		
+		ICPPMethod f1 = (ICPPMethod) col.getName(20).resolveBinding();
+		assertTrue(f1 instanceof ICPPSpecialization);
+		assertTrue(((ICPPSpecialization)f1).getSpecializedBinding() instanceof ICPPMethod);
+		ICPPMethod f2 = (ICPPMethod) ((ICPPSpecialization)f1).getSpecializedBinding();
+		assertTrue(f2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)f2).getSpecializedBinding(), f);
+		
+		IFunctionType ft = f1.getType();
+		assertTrue(ft.getReturnType() instanceof IBasicType);
+		assertEquals(((IBasicType)ft.getReturnType()).getType(), IBasicType.t_int);
+		
+		assertSame(ft.getParameterTypes()[0], C);
+	}
+	
+	// namespace N {                                                
+	//    template<class T1, class T2> class A { };                 
+	// }                                                            
+	// using N::A;                                                  
+	// namespace N {                                                
+	//    template<class T> class A<T, T*> { };                     
+	// }                                                            
+	// A<int,int*> a;                                               
+	public void test14_5_4s7_UsingClassTemplate() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate A1 = (ICPPClassTemplate) col.getName(3).resolveBinding();
+		ICPPClassTemplatePartialSpecialization A2 = (ICPPClassTemplatePartialSpecialization) col.getName(9).resolveBinding();
+		
+		ICPPClassType A3 = (ICPPClassType) col.getName(13).resolveBinding();
+		assertTrue(A3 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)A3).getTemplateDefinition(), A2);
+		
+		ICPPClassTemplate A4 = (ICPPClassTemplate) col.getName(14).resolveBinding();
+		assertSame(A4, A1);
+	}
+	
+	// template<class T> class A {                      
+	//    int x;                                        
+	// };                                               
+	// template<class T> class A<T*> {                  
+	//    char x;                                       
+	// };                                               
+	// template<template<class U> class V> class C {    
+	//    V<int> y;                                     
+	//    V<int*> z;                                    
+	// };                                               
+	// void f() {                                       
+	//    C<A> c;                                       
+	//    c.y.x;   c.z.x;                               
+	// }                                                
+	public void testTemplateTemplateParameter() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate A1 = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPField x1 = (ICPPField) col.getName(2).resolveBinding();
+		ICPPClassTemplatePartialSpecialization A2 = (ICPPClassTemplatePartialSpecialization) col.getName(4).resolveBinding();
+		ICPPField x2 = (ICPPField) col.getName(7).resolveBinding();
+		
+		ICPPClassTemplate C = (ICPPClassTemplate) col.getName(10).resolveBinding();
+		ICPPField y = (ICPPField) col.getName(13).resolveBinding();
+		ICPPField z = (ICPPField) col.getName(16).resolveBinding();
+		
+		ICPPClassType C1 = (ICPPClassType) col.getName(18).resolveBinding();
+		assertTrue(C1 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)C1).getTemplateDefinition(), C);
+		
+		ICPPField y2 = (ICPPField) col.getName(23).resolveBinding();
+		assertTrue(y2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)y2).getSpecializedBinding(), y);
+		IType t = y2.getType();
+		assertTrue(t instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)t).getTemplateDefinition(), A1);
+		ICPPField x3 = (ICPPField) col.getName(24).resolveBinding();
+		assertTrue(x3 instanceof ICPPSpecialization);
+		assertEquals(((ICPPSpecialization)x3).getSpecializedBinding(), x1);
+		
+		ICPPField z2 = (ICPPField) col.getName(26).resolveBinding();
+		assertTrue(z2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)z2).getSpecializedBinding(), z);
+		t = z2.getType();
+		assertTrue(t instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)t).getTemplateDefinition(), A2);
+		ICPPField x4 = (ICPPField) col.getName(27).resolveBinding();
+		assertTrue(x4 instanceof ICPPSpecialization);
+		assertEquals(((ICPPSpecialization)x4).getSpecializedBinding(), x2);
+	}
+	
+	// template <class T> class A {               
+	//    typedef T _T;                           
+	//   _T t;                                    
+	// };                                         
+	// void f() {                                 
+	//    A<int> a;                               
+	//    a.t;                                    
+	// }                                          
+	public void testNestedTypeSpecializations() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPTemplateParameter T = (ICPPTemplateParameter) col.getName(0).resolveBinding();
+		ITypedef _T = (ITypedef) col.getName(3).resolveBinding();
+		assertSame(_T.getType(), T);
+		
+		ICPPField t = (ICPPField) col.getName(5).resolveBinding();
+		assertSame(t.getType(), _T);
+		
+		ICPPField t2 = (ICPPField) col.getName(11).resolveBinding();
+		assertTrue(t2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)t2).getSpecializedBinding(), t);
+		
+		IType type = t2.getType();
+		assertTrue(type instanceof ITypedef);
+		assertTrue(type instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)type).getSpecializedBinding(), _T);
+		
+		type = ((ITypedef)type).getType();
+		assertTrue(type instanceof IBasicType);
+		assertEquals(((IBasicType)type).getType(), IBasicType.t_int);
+	}
+	
+	// template <class T> class A {                          
+	//    class B { T t; };                                  
+	//    B b;                                               
+	// };                                                    
+	// void f() {                                            
+	//    A<int> a;                                          
+	//    a.b.t;                                             
+	// }                                                     
+	public void testNestedClassTypeSpecializations() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPTemplateParameter T = (ICPPTemplateParameter) col.getName(0).resolveBinding();
+		ICPPClassType B = (ICPPClassType) col.getName(2).resolveBinding();
+		ICPPField t = (ICPPField) col.getName(4).resolveBinding();
+		assertSame(t.getType(), T);
+		ICPPField b = (ICPPField) col.getName(6).resolveBinding();
+		assertSame(b.getType(), B);
+		
+		ICPPField b2 = (ICPPField) col.getName(12).resolveBinding();
+		ICPPField t2 = (ICPPField) col.getName(13).resolveBinding();
+		
+		assertTrue(b2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)b2).getSpecializedBinding(), b);
+		
+		IType type = b2.getType();
+		assertTrue(type instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)type).getSpecializedBinding(), B);
+		
+		assertTrue(t2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)t2).getSpecializedBinding(), t);
+		assertTrue(t2.getType() instanceof IBasicType);
+		assertEquals(((IBasicType)t2.getType()).getType(), IBasicType.t_int);
+	}
+	
+	// template <class T> class A {                     
+	//    typedef typename T::X _xx;                    
+	//    _xx s;                                        
+	// };                                               
+	// class B {};                                      
+	// template < class T > class C {                   
+	//    typedef T X;                                  
+	// };                                               
+	// void f() {                                       
+	//    A< C<B> > a; a.s;                             
+	// };                                               
+	public void testTemplateParameterQualifiedType_1() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPTemplateTypeParameter T = (ICPPTemplateTypeParameter) col.getName(0).resolveBinding();
+		ICPPClassTemplate A = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		
+		IBinding T1 = col.getName(3).resolveBinding();
+		assertSame(T1, T);
+		
+		ICPPClassType X = (ICPPClassType) col.getName(4).resolveBinding();
+		
+		ITypedef _xx = (ITypedef) col.getName(5).resolveBinding();
+		
+		IBinding _xx2 = col.getName(6).resolveBinding();
+		assertSame(_xx, _xx2);
+		assertSame(_xx.getType(), X);
+		
+		ICPPField s = (ICPPField) col.getName(7).resolveBinding();
+		
+		ICPPClassType B = (ICPPClassType) col.getName(8).resolveBinding();
+		ITypedef X2 = (ITypedef) col.getName(12).resolveBinding();
+		
+		ICPPClassType Acb = (ICPPClassType) col.getName(14).resolveBinding();
+		assertTrue(Acb instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)Acb).getTemplateDefinition(), A);
+		
+		ICPPField  s2 = (ICPPField) col.getName(21).resolveBinding();
+		assertTrue(s2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)s2).getSpecializedBinding(), s);
+		
+		IType t = s2.getType();
+		//		assertTrue(t instanceof ITypedef);
+		//		assertTrue(t instanceof ICPPSpecialization);
+		//		assertSame(((ICPPSpecialization)t).getSpecializedBinding(), _xx);
+		
+		t = ((ITypedef)t).getType();
+		assertTrue(t instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)t).getSpecializedBinding(), X2);
+		
+		t = ((ITypedef)t).getType();
+		assertSame(t, B);
+	}
+	
+	// template <class T> class A {               
+	//    A<T> a;                                 
+	//    void f();                               
+	// };                                         
+	// template <class U> void A<U>::f(){         
+	//    U u;                                    
+	// }                                          
+	public void testTemplateScopes() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPTemplateParameter T = (ICPPTemplateParameter) col.getName(0).resolveBinding();
+		ICPPClassTemplate A = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPClassType A2 = (ICPPClassType) col.getName(2).resolveBinding();
+		
+		ICPPTemplateParameter U = (ICPPTemplateParameter) col.getName(7).resolveBinding();
+		assertSame(U, T);
+		ICPPClassType A3 = (ICPPClassType) col.getName(9).resolveBinding();
+		assertSame(A, A3);
+		
+		
+		ICPPTemplateParameter U2 = (ICPPTemplateParameter) col.getName(13).resolveBinding();
+		assertSame(U, U2);
+		assertSame(T, U);
+	}
+	
+	// class A {                              
+	//    template < class T > void f(T);     
+	// };                                     
+	// template <class U> void A::f<>(U){}    
+	public void testTemplateScopes_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPTemplateParameter T = (ICPPTemplateParameter) col.getName(1).resolveBinding();
+		ICPPFunctionTemplate f1 = (ICPPFunctionTemplate) col.getName(2).resolveBinding();
+		ICPPTemplateParameter T2 = (ICPPTemplateParameter) col.getName(3).resolveBinding();
+		assertSame(T, T2);
+		
+		ICPPTemplateParameter U = (ICPPTemplateParameter) col.getName(5).resolveBinding();
+		assertSame(T, U);
+		ICPPClassType A2 = (ICPPClassType) col.getName(7).resolveBinding();
+		assertSame(A, A2);
+		ICPPMethod f2 = (ICPPMethod) col.getName(8).resolveBinding();
+		IBinding U2 = col.getName(10).resolveBinding();
+		assertSame(U, U2);
+		
+		assertSame(f1, f2);
+	}
+	
+	// template<typename T>
+    // class A {};
+    //
+    // class B {};
+    // 
+    // template<>
+    // class A<B> {};
+    //
+    // class C {};
+    //
+    // A<B> ab;
+    // A<C> ac;
+    public void testEnclosingScopes_a() throws Exception {
+    	BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+    	
+    	ICPPSpecialization   b0= ba.assertNonProblem("A<B>", 4, ICPPSpecialization.class, ICPPClassType.class);
+    	ICPPTemplateInstance b1= ba.assertNonProblem("A<C>", 4, ICPPTemplateInstance.class, ICPPClassType.class);
+    	
+    	ICPPClassType sc0= assertInstance(b0.getSpecializedBinding(), ICPPClassType.class);
+    	ICPPClassType sc1= assertInstance(b1.getSpecializedBinding(), ICPPClassType.class);
+    	assertTrue(sc0.isSameType(sc1));
+    	    	
+    	assertInstance(b0, ICPPSpecialization.class);
+    	assertInstance(b1, ICPPTemplateInstance.class);
+    	
+    	assertInstance(b0.getScope(), ICPPTemplateScope.class);
+    	
+    	IScope ts0= ((ICPPClassType) b0.getSpecializedBinding()).getScope();
+    	IScope ts1= ((ICPPClassType) b1.getSpecializedBinding()).getScope();
+    	
+    	assertInstance(ts0, ICPPTemplateScope.class);
+    	
+    	assertSame(ts0, ts1);
+    	assertNotSame(ts0, b0.getScope());
+    	assertSame(ts1, b1.getScope()); // a class instance exists in the same scope as the template its defined from
+    }
+    
+    // template<typename T>
+    // class A {
+    //    public:
+    //    class B {};
+    // };
+    //
+    // class C {}; class D {};
+    //
+    // template<>
+    // class A<C> {
+    //   public:
+    //   class B {};
+    // };
+    //
+    // void refs() {
+    //    A<C>::B acb;
+    //    A<D>::B adb;
+    // }
+    public void testEnclosingScopes_b() throws Exception {
+    	BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+    	
+    	ICPPClassType b0= ba.assertNonProblem("B acb", 1, ICPPClassType.class);
+    	ICPPClassType b1= ba.assertNonProblem("B adb", 1, ICPPClassType.class, ICPPSpecialization.class);
+    	ICPPClassType b2= ba.assertNonProblem("A<C>", 4, ICPPClassType.class, ICPPSpecialization.class);
+    	ICPPClassType b3= ba.assertNonProblem("A {", 1, ICPPClassType.class, ICPPTemplateDefinition.class);
+    	ICPPClassType b4= ba.assertNonProblem("B {}", 1, ICPPClassType.class);
+    	
+    	assertFalse(b0 instanceof ICPPSpecialization);
+    	
+    	assertSame(b0.getScope(), b2.getCompositeScope());
+    	ICPPClassScope cs1= assertInstance(b1.getScope(), ICPPClassScope.class);
+    	assertInstance(cs1.getClassType(), ICPPTemplateInstance.class);
+    	assertSame(b4.getScope(), b3.getCompositeScope());
+    }
+	
+	// class A {};
+	// 
+	// template<typename T>
+	// class X {
+	// public:
+	//    class Y {
+	//    public:
+	//       class Z {};
+	//    };
+	// };
+	//
+	// X<A>::Y::Z xayz;
+    public void testEnclosingScopes_c() throws Exception {
+    	BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+    	
+    	ICPPClassType b0= ba.assertNonProblem("Y::Z x", 1, ICPPClassType.class);
+    	ICPPClassType b1= ba.assertNonProblem("Z xayz", 1, ICPPClassType.class);
+    	
+    	ICPPClassScope cs0= assertInstance(b0.getScope(), ICPPClassScope.class);
+    	assertInstance(cs0.getClassType(), ICPPSpecialization.class);
+    	
+    	ICPPClassScope cs1= assertInstance(b1.getScope(), ICPPClassScope.class);
+    	assertInstance(cs1.getClassType(), ICPPSpecialization.class);    	
+    }
+    
+    // class A {}; class B {};
+    //
+    // template<typename T1, typename T2>
+    // class X {};
+    //
+    // template<typename T3>
+    // class X<T3, A> {
+    // public:
+    //     class N {};
+    // };
+    //
+    // X<B,A>::N n;
+    public void testEnclosingScopes_d() throws Exception {
+    	BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+    	
+    	ICPPClassType b0= ba.assertNonProblem("N n", 1, ICPPClassType.class);
+    	ICPPClassType b1= ba.assertNonProblem("N {", 1, ICPPClassType.class);
+    	
+    	ICPPClassScope s0= assertInstance(b0.getScope(), ICPPClassScope.class);
+    	assertInstance(s0.getClassType(), ICPPTemplateInstance.class);
+    	
+    	ICPPClassScope s1= assertInstance(b1.getScope(), ICPPClassScope.class);
+    	assertInstance(s1.getClassType(), ICPPTemplateDefinition.class);
+    	
+    	ICPPTemplateScope s2= assertInstance(s1.getClassType().getScope(), ICPPTemplateScope.class);
+    }
+	
+	// template<class T> struct A {                              
+	//    void f(T);                                             
+	//    template<class X> void g(T,X);                         
+	//    void h(T) { }                                          
+	// };                                                        
+	// template<> void A<int>::f(int);                           
+	// template<class T> template<class X> void A<T>::g(T,X) { } 
+	// template<> template<class X> void A<int>::g(int,X);       
+	// template<> template<> void A<int>::g(int,char);           
+	// template<> template<> void A<int>::g<char>(int,char);     
+	// template<> void A<int>::h(int) { }                        
+	public void test14_7_3s16() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPTemplateParameter T = (ICPPTemplateParameter) col.getName(0).resolveBinding();
+		ICPPClassType A = (ICPPClassType) col.getName(1).resolveBinding();
+		ICPPMethod f = (ICPPMethod) col.getName(2).resolveBinding();
+		ICPPTemplateParameter T2 = (ICPPTemplateParameter) col.getName(3).resolveBinding();
+		assertSame(T, T2);
+		
+		ICPPTemplateParameter X = (ICPPTemplateParameter) col.getName(5).resolveBinding();
+		ICPPFunctionTemplate g = (ICPPFunctionTemplate) col.getName(6).resolveBinding();
+		ICPPTemplateParameter T3 = (ICPPTemplateParameter) col.getName(7).resolveBinding();
+		assertSame(T, T3);
+		ICPPTemplateParameter X2 = (ICPPTemplateParameter) col.getName(9).resolveBinding();
+		assertSame(X, X2);
+		
+		ICPPMethod h = (ICPPMethod) col.getName(11).resolveBinding();
+		ICPPTemplateParameter T4 = (ICPPTemplateParameter) col.getName(12).resolveBinding();
+		assertSame(T, T4);
+		
+		ICPPClassType A2 = (ICPPClassType) col.getName(15).resolveBinding();
+		assertTrue(A2 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)A2).getTemplateDefinition(), A);
+		ICPPMethod f2 = (ICPPMethod) col.getName(17).resolveBinding();
+		assertTrue(f2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)f2).getSpecializedBinding(), f);
+		
+		ICPPTemplateParameter TR = (ICPPTemplateParameter) col.getName(19).resolveBinding();
+		assertSame(T, TR);
+		ICPPTemplateParameter XR = (ICPPTemplateParameter) col.getName(20).resolveBinding();
+		assertSame(X, XR);
+		ICPPClassType A3 = (ICPPClassType) col.getName(22).resolveBinding();
+		assertSame(A3, A);
+		
+		ICPPMethod g2 = (ICPPMethod) col.getName(25).resolveBinding();
+		assertSame(g2, g);
+		TR = (ICPPTemplateParameter) col.getName(26).resolveBinding();
+		assertSame(T, TR);
+		XR = (ICPPTemplateParameter) col.getName(28).resolveBinding();
+		assertSame(X, XR);
+		
+		assertSame(col.getName(32).resolveBinding(), A2);
+		assertSame(col.getName(39).resolveBinding(), A2);
+		assertSame(col.getName(45).resolveBinding(), A2);
+		assertSame(col.getName(52).resolveBinding(), A2);
+		
+		ICPPMethod h2 = (ICPPMethod) col.getName(54).resolveBinding();
+		assertTrue(h2 instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)h2).getSpecializedBinding(), h);
+	}
+	
+	// namespace N {                                                 
+	//    int C;                                                     
+	//    template<class T> class B {                                
+	//       void f(T);                                              
+	//    };                                                         
+	// }                                                             
+	// template<class C> void N::B<C>::f(C) {                        
+	//    C b; // C is the template parameter, not N::C              
+	// }                                                             
+	public void test14_6_1s6() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPTemplateParameter T = (ICPPTemplateParameter) col.getName(2).resolveBinding();
+		ICPPClassTemplate B = (ICPPClassTemplate) col.getName(3).resolveBinding();
+		ICPPMethod f = (ICPPMethod) col.getName(4).resolveBinding();
+		ICPPTemplateParameter TR = (ICPPTemplateParameter) col.getName(5).resolveBinding();
+		assertSame(T, TR);
+		
+		ICPPTemplateParameter C = (ICPPTemplateParameter) col.getName(7).resolveBinding();
+		assertSame(C, T);
+		
+		ICPPClassType B2 = (ICPPClassType) col.getName(10).resolveBinding();
+		assertSame(B2, B);
+		
+		ICPPTemplateParameter CR = (ICPPTemplateParameter) col.getName(12).resolveBinding();
+		assertSame(CR, T);
+		
+		ICPPMethod f2 = (ICPPMethod) col.getName(13).resolveBinding();
+		assertSame(f2, f);
+		
+		CR = (ICPPTemplateParameter) col.getName(14).resolveBinding();
+		assertSame(CR, T);
+
+		CR = (ICPPTemplateParameter) col.getName(16).resolveBinding();
+		assertSame(CR, T);
+	}
+	
+	// template <class T> class Array {};                    
+	// template <class T> void sort(Array<T> &);           
+	// template void sort<>(Array<int> &);                 
+	public void testBug90689_ExplicitInstantiation() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate A = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPFunctionTemplate s = (ICPPFunctionTemplate) col.getName(3).resolveBinding();
+		
+		ICPPClassType A2 = (ICPPClassType) col.getName(4).resolveBinding();
+		assertTrue(A2 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)A2).getTemplateDefinition(), A);
+		
+		ICPPFunction s2 = (ICPPFunction) col.getName(8).resolveBinding();
+		assertTrue(s2 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)s2).getTemplateDefinition(), s);
+		
+		ICPPClassType A3 = (ICPPClassType) col.getName(10).resolveBinding();
+		assertTrue(A3 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)A3).getTemplateDefinition(), A);
+		assertNotSame(A2, A3);
+	}
+	
+	// template<class T> class Array { };                              
+	// template class Array<char>;                                     
+	// template<class T> void sort(Array<T>& v) {  }                   
+	// template void sort(Array<char>&); // argument is deduced here   
+	public void test14_7_2s2_ExplicitInstantiation() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate A1 = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPClassType A2 = (ICPPClassType) col.getName(2).resolveBinding();
+		assertTrue(A2 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)A2).getTemplateDefinition(), A1);
+		
+		ICPPFunctionTemplate s1 = (ICPPFunctionTemplate) col.getName(5).resolveBinding();
+		ICPPFunction s2 = (ICPPFunction) col.getName(10).resolveBinding();
+		assertTrue(s2 instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)s2).getTemplateDefinition(), s1);
+		
+		ICPPClassType A3 = (ICPPClassType) col.getName(11).resolveBinding();
+		assertSame(A2, A3);
+	}
+	
+	// template <class T> class A {       
+	//    A<T>* p;                        
+	//    void f() { this; }              
+	// };                                 
+	public void testBug74204() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IField p = (IField) col.getName(5).resolveBinding();
+		
+		IASTName f = col.getName(6);
+		IASTFunctionDefinition fdef = (IASTFunctionDefinition) f.getParent().getParent();
+		IASTExpressionStatement statement = (IASTExpressionStatement) ((IASTCompoundStatement)fdef.getBody()).getStatements()[0];
+		IType type = statement.getExpression().getExpressionType();
+		
+		assertTrue(type.isSameType(p.getType()));
+	}
+	
+	// template <class T > void f(T);               
+	// template <class T > void g(T t){             
+	//    f(t);                                     
+	// }                                              
+	public void testDeferredFunctionTemplates() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunctionTemplate f = (ICPPFunctionTemplate) col.getName(1).resolveBinding();
+		ICPPFunction f2 = (ICPPFunction) col.getName(8).resolveBinding();
+		assertTrue(f2 instanceof ICPPUnknownBinding);
+	}
+	
+	// template < class T > class A {};                          
+	// template < class T > class B {                            
+	//    void init(A<T> *);                                   
+	// };                                                        
+	// template < class T > class C : public B<T> {              
+	//    C(A<T> * a) {                                        
+	//       init(a);                                          
+	//    }                                                      
+	// };                                                        
+	public void testRelaxationForTemplateInheritance() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPMethod init = (ICPPMethod) col.getName(4).resolveBinding();
+		// the instantiation of B<T> has to be deferred, therefore 'init' is an unknown binding.
+		assertInstance(col.getName(19).resolveBinding(), ICPPUnknownBinding.class);
+	}
+	
+	// template <class Tp, class Tr > class iter {                         
+	//    Tp operator -> () const;                                         
+	//    Tr operator [] (int) const;                                      
+	// };                                                                  
+	// template <class T> class list {                                     
+	//    typedef iter< T*, T& > iterator;                                 
+	//    iterator begin();                                                
+	//    iterator end();                                                  
+	// };                                                                  
+	// class Bar { public: int foo; };                                     
+	// void f() {                                                          
+	//    list<Bar> bar;                                                   
+	//    for(list<Bar>::iterator i = bar.begin(); i != bar.end(); ++i){ 
+	//       i->foo;  i[0].foo;                                            
+	//    }                                                                
+	// }                                                                   
+	public void testBug91707() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPMethod begin = (ICPPMethod) col.getName(16).resolveBinding();
+		ICPPMethod end = (ICPPMethod) col.getName(18).resolveBinding();
+		
+		ICPPField foo = (ICPPField) col.getName(20).resolveBinding();
+		
+		IBinding r = col.getName(33).resolveBinding();
+		assertTrue(r instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)r).getSpecializedBinding(), begin);
+		
+		r = col.getName(36).resolveBinding();
+		assertTrue(r instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)r).getSpecializedBinding(), end);
+		
+		assertSame(foo, col.getName(39).resolveBinding());
+		assertSame(foo, col.getName(41).resolveBinding());
+	}
+	
+	// class B { int i; };                       
+	// template <class T > class A {             
+	//    typedef T* _T;                         
+	// };                                        
+	// void f(){                                 
+	//    A<B>::_T t;                            
+	//    (*t).i;                                
+	// }                                         
+	public void testBug98961() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassType B = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPField i = (ICPPField) col.getName(1).resolveBinding();
+		ITypedef _T = (ITypedef) col.getName(5).resolveBinding();
+		ICPPVariable t = (ICPPVariable) col.getName(12).resolveBinding();
+		
+		IType type = t.getType();
+		assertTrue(type instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)type).getSpecializedBinding(), _T);
+		assertSame(((IPointerType)((ITypedef)type).getType()).getType(), B);
+		assertSame(i, col.getName(14).resolveBinding());
+	}
+	
+	// class A {                                 
+	//    template <class T > void f(T) {      
+	//       begin();                            
+	//    }                                      
+	//    void begin();                          
+	// };                                        
+	public void testBug98784() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertSame(col.getName(5).resolveBinding(), col.getName(6).resolveBinding());
+	}
+	
+	// template <class T> class A {                  
+	//    A(T t);                                  
+	// };                                            
+	// void f(A<int> a);                           
+	// void m(){                                     
+	//    f(A<int>(1));                            
+	// }                                             
+	public void testBug99254() throws Exception{
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPConstructor ctor = (ICPPConstructor) col.getName(2).resolveBinding();
+		ICPPFunction f = (ICPPFunction) col.getName(5).resolveBinding();
+		
+		ICPPSpecialization spec = (ICPPSpecialization) col.getName(11).resolveBinding();
+		assertSame(spec.getSpecializedBinding(), ctor);
+		
+		assertSame(f, col.getName(10).resolveBinding());
+	}
+	
+	// namespace core {                                
+	//    template<class T> class A {                  
+	//       A(T x, T y);                            
+	//    };                                           
+	// }                                               
+	// class B {                                       
+	//    int add(const core::A<int> &rect);          
+	// };                                              
+	// void f(B* b){                                 
+	//    b->add(core::A<int>(10, 2));               
+	// }                                               
+	public void testBug99254_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPConstructor ctor = (ICPPConstructor) col.getName(3).resolveBinding();
+		ICPPMethod add = (ICPPMethod) col.getName(9).resolveBinding();
+		
+		ICPPSpecialization spec = (ICPPSpecialization) col.getName(20).resolveBinding();
+		assertSame(spec.getSpecializedBinding(), ctor);
+		
+		assertSame(add, col.getName(19).resolveBinding());
+	}
+	
+	// template <class T> class A { A(T); };         
+	// typedef signed int s32;                         
+	// class B {                                       
+	//    int add(const A<s32> &rect);                
+	// };                                              
+	// void f(B* b){                                 
+	//    b->add(A<int>(10));                        
+	// }                                               
+	public void testBug99254_3() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPConstructor ctor = (ICPPConstructor) col.getName(2).resolveBinding();
+		ICPPMethod add = (ICPPMethod) col.getName(7).resolveBinding();
+		
+		ICPPSpecialization spec = (ICPPSpecialization) col.getName(17).resolveBinding();
+		assertSame(spec.getSpecializedBinding(), ctor);
+		
+		assertSame(add, col.getName(16).resolveBinding());
+	}
+	
+	public void testBug98666() throws Exception {
+		CPPASTNameBase.sAllowNameComputation= true;
+		IASTTranslationUnit tu = parse("A::template B<T> b;", ParserLanguage.CPP); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPASTQualifiedName qn = (ICPPASTQualifiedName) col.getName(0);
+		IASTName[] ns = qn.getNames();
+		assertTrue(ns[1] instanceof ICPPASTTemplateId);
+		assertEquals(ns[1].toString(), "B<T>"); //$NON-NLS-1$
+	}
+	
+	// template <class T> struct A{                          
+	//    class C {                                          
+	//       template <class T2> struct B {};                
+	//    };                                                 
+	// };                                                    
+	// template <class T> template <class T2>                
+	// struct A<T>::C::B<T2*>{};                             
+	// A<short>::C::B<int*> ab;                              
+	public void testBug90678() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPTemplateParameter T = (ICPPTemplateParameter) col.getName(0).resolveBinding();
+		ICPPTemplateParameter T2 = (ICPPTemplateParameter) col.getName(3).resolveBinding();
+		
+		ICPPClassTemplate B = (ICPPClassTemplate) col.getName(4).resolveBinding();
+		
+		assertSame(T, col.getName(5).resolveBinding());
+		final IBinding T2ofPartialSpec = col.getName(6).resolveBinding();
+		assertNotSame(T2, T2ofPartialSpec); // partial spec has its own template params
+		assertSame(T, col.getName(10).resolveBinding());
+		assertSame(T2ofPartialSpec, col.getName(14).resolveBinding());
+		
+		ICPPClassTemplatePartialSpecialization spec = (ICPPClassTemplatePartialSpecialization) col.getName(12).resolveBinding();
+		assertSame(spec.getPrimaryClassTemplate(), B);
+		
+		ICPPClassType BI = (ICPPClassType) col.getName(19).resolveBinding();
+		assertTrue(BI instanceof ICPPTemplateInstance);
+		final IBinding partialSpecSpec = ((ICPPTemplateInstance)BI).getSpecializedBinding();
+		assertTrue(partialSpecSpec instanceof ICPPSpecialization);
+		IBinding partialSpec= ((ICPPSpecialization) partialSpecSpec).getSpecializedBinding();
+		assertSame(partialSpec, spec);
+	}
+	
+	// template <class T> int f(T); // #1
+	// int f(int);                  // #2
+	// int k = f(1);           // uses #2
+	// int l = f<>(1);         // uses #1
+	public void testBug95208() throws Exception {
+	    String content= getAboveComment();
+		IASTTranslationUnit tu = parse(content, ParserLanguage.CPP);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPFunctionTemplate f1 = (ICPPFunctionTemplate) col.getName(1).resolveBinding();
+		ICPPFunction f2 = (ICPPFunction) col.getName(4).resolveBinding();
+		
+		assertSame(f2, col.getName(7).resolveBinding());
+		
+		IBinding b = col.getName(9).resolveBinding(); // resolve the binding of the ICPPASTTemplateId first
+		assertTrue(b instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)b).getSpecializedBinding(), f1);
+		assertSame(f1, col.getName(10).resolveBinding());
+		
+		
+		tu = parse(content,ParserLanguage.CPP);
+		col = new CPPNameCollector();
+		tu.accept(col);
+		
+		f1 = (ICPPFunctionTemplate) col.getName(1).resolveBinding();
+		assertSame(f1, col.getName(10).resolveBinding());
+	}
+	
+	// template <class T, int someConst = 0 >  class A {};      
+	// int f() {                                                
+	//    const int local = 10;                                 
+	//    A<int, local> broken;                                 
+	// };                                                       
+	public void testBug103578() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate A = (ICPPClassTemplate) col.getName(2).resolveBinding();
+		IVariable local = (IVariable) col.getName(4).resolveBinding();
+		
+		ICPPClassType a = (ICPPClassType) col.getName(5).resolveBinding();
+		assertTrue(a instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)a).getTemplateDefinition(), A);
+		assertSame(local, col.getName(7).resolveBinding());
+	}
+	
+	// template <class T> class A : public T {};   
+	// class B { int base; };                      
+	// void f() {                                  
+	//    A< B > a;                                
+	//    a.base;                                  
+	// }                                           
+	public void testBug103715() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPField base = (ICPPField) col.getName(4).resolveBinding();
+		assertSame(base, col.getName(11).resolveBinding());
+		
+		ICPPClassType B = (ICPPClassType) col.getName(3).resolveBinding();
+		ICPPClassType A = (ICPPClassType) col.getName(6).resolveBinding();
+		
+		ICPPBase[] bases = A.getBases();
+		assertEquals(bases.length, 1);
+		assertSame(bases[0].getBaseClass(), B);
+	}
+	
+	// template < class T > class complex;         
+	// template <> class complex <float>;          
+	// template < class T > class complex{         
+	// };                                          
+	// template <> class complex< float > {        
+	//    void f(float);                         
+	// };                                          
+	// void complex<float>::f(float){              
+	// }                                           
+	public void testBug74276() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPClassTemplate complex = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPClassType cspec = (ICPPClassType) col.getName(2).resolveBinding();
+		assertTrue(cspec instanceof ICPPSpecialization);
+		assertSame(((ICPPSpecialization)cspec).getSpecializedBinding(), complex);
+		
+		assertSame(complex, col.getName(5).resolveBinding());
+		assertSame(cspec, col.getName(6).resolveBinding());
+		
+		ICPPMethod f = (ICPPMethod) col.getName(8).resolveBinding();
+		assertSame(f, col.getName(10).resolveBinding());
+	}
+	
+	// template< class T1, int q > class C {};      
+	// template< class T1, class T2> class A {};    
+	// template< class T1, class T2, int q1, int q2>
+	// class A< C<T1, q1>, C<T2, q2> > {};          
+	// class N {};                                  
+	// typedef A<C<N,1>, C<N,1> > myType;            
+	// void m(){                                    
+	//    myType t;                                 
+	// }                                            
+	public void testBug105852() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ITypedef myType = (ITypedef) col.getName(31).resolveBinding();
+		ICPPClassType A = (ICPPClassType) myType.getType();
+		
+		ICPPSpecialization Aspec = (ICPPSpecialization) col.getName(10).resolveBinding();
+		
+		assertTrue(A instanceof ICPPTemplateInstance);
+		assertSame(((ICPPTemplateInstance)A).getTemplateDefinition(), Aspec);
+	}
+	
+	// template< class T > class A : public T {};      
+	// class C { public: int c; };                     
+	// class B : public A<C> { };                      
+	// void main(){                                    
+	//    B k;                                         
+	//    k.c;                                         
+	// }                                               
+	public void testBug105769() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPVariable c = (ICPPVariable) col.getName(13).resolveBinding();
+		assertSame(c, col.getName(4).resolveBinding());
+	}
+	
+	// template< class T > class C {                   
+	//    public: void * blah;                         
+	//    template<typename G> C(G* g) : blah(g) {}    
+	//    template <> C(char * c) : blah(c) {}         
+	//    template <> C(wchar_t * c) : blah(c) {}      
+	// };                                              
+	public void testBug162230() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPTemplateParameter T = (ICPPTemplateParameter) col.getName(0).resolveBinding();
+		ICPPClassTemplate C = (ICPPClassTemplate) col.getName(1).resolveBinding();
+		ICPPField blah = (ICPPField) col.getName(2).resolveBinding();
+		ICPPTemplateTypeParameter G = (ICPPTemplateTypeParameter) col.getName(3).resolveBinding();
+		ICPPFunctionTemplate ctor = (ICPPFunctionTemplate) col.getName(4).resolveBinding();
+		
+		assertSame(G, col.getName(5).resolveBinding());
+		ICPPParameter g = (ICPPParameter) col.getName(6).resolveBinding();
+		assertSame(blah, col.getName(7).resolveBinding());
+		assertSame(g, col.getName(8).resolveBinding());
+		
+		ICPPSpecialization spec = (ICPPSpecialization) col.getName(9).resolveBinding();
+		assertSame(spec.getSpecializedBinding(), ctor);
+		
+		ICPPSpecialization c = (ICPPSpecialization) col.getName(10).resolveBinding();
+		assertSame(c.getSpecializedBinding(), g);
+		
+		assertSame(blah, col.getName(11).resolveBinding());
+		assertSame(c, col.getName(12).resolveBinding());
+		
+		ICPPSpecialization spec2 = (ICPPSpecialization) col.getName(13).resolveBinding();
+		assertSame(spec.getSpecializedBinding(), ctor);
+		
+		ICPPSpecialization c2 = (ICPPSpecialization) col.getName(14).resolveBinding();
+		assertSame(c2.getSpecializedBinding(), g);
+		
+		assertSame(blah, col.getName(15).resolveBinding());
+		assertSame(c2, col.getName(16).resolveBinding());
+	}
+	
+	// template< class T > class C {};                 
+	// typedef struct C<int> CInt;                     
+	public void testBug169628() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertTrue(col.getName(2).resolveBinding() instanceof ICPPSpecialization);
+	}
+	
+    // template<class T1>
+    // struct Closure {
+    //   Closure(T1* obj1, void (T1::*method1)()) {}
+    // };
+    //
+    // template<class T2>
+    // Closure<T2>* makeClosure(T2* obj2, void (T2::*method2)()) {
+    //   return new Closure<T2>(obj2, method2);
+    // }
+    //
+    // struct A {
+    //   void m1() {}
+    //   void m2() {
+    //     makeClosure(this, &A::m1);
+    //   }
+    // };
+    public void testBug201204() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction fn= bh.assertNonProblem("makeClosure(this", 11, ICPPFunction.class);
+    }
+
+	// template <class R, class T, class P1, class P2, class P3, class P4>
+	// class A {};
+	//
+	// template <class R, class T, class P1, class P2, class P3, class P4>
+	// A<R, T, P1, P2, P3, P4>* func(const T* obj, R (T::*m)(P1, P2, P3, P4) const);
+	//
+	// template <class R, class T, class P1, class P2, class P3, class P4>
+	// class B {};
+	//
+	// template <class R, class T, class P1, class P2, class P3, class P4>
+	// B<R, T, P1, P2, P3, P4>* func(T* obj, R (T::*m)(P1, P2, P3, P4));
+	//
+	// struct C {
+	//	 int m1(int a1, int a2, int a3, int a4);
+	//	 int m2(int a1, int a2, int a3, int a4) const;
+	// };
+	//
+	// void f(C* c, const C* d) {
+	//	 func(c, &C::m1);
+	//	 func(d, &C::m2);
+	// }
+    public void testBug233889() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction fn1= bh.assertNonProblem("func(c", 4, ICPPFunction.class);
+		ICPPFunction fn2= bh.assertNonProblem("func(d", 4, ICPPFunction.class);
+		assertNotSame(fn1, fn2);
+    }
+
+    // template<class _T1, class _T2>
+    // struct pair {
+    //   typedef _T1 first_type;
+    // };
+    //
+    // template <typename _Key, typename _Tp>
+    // struct map {
+    //   typedef pair<_Key, _Tp> value_type;
+    // };
+    //
+    // template <class _C>
+    // typename _C::value_type GetPair(_C& collection, typename _C::value_type::first_type key);
+    // 
+    // int main(map<int, int> x) {
+    //   GetPair(x, 1);
+    // }
+    public void testBug229917_1() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction fn = bh.assertNonProblem("GetPair(x", 7, ICPPFunction.class);
+    }
+
+    // template<class _T1, class _T2>
+    // struct pair {
+    //   typedef _T1 first_type;
+    // };
+    //
+    // template <typename _Key, typename _Tp>
+    // struct map {
+    //   typedef pair<_Key, _Tp> value_type;
+    // };
+    //
+    // template <class _C>
+    // typename _C::value_type GetPair(_C& collection, typename _C::value_type::first_type key);
+    public void testBug229917_2() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		IBinding b0 = bh.assertNonProblem("value_type GetPair", 10, IBinding.class);
+    }
+
+    // template<typename _T1>
+    // class A {};
+    //
+    // template<typename _T2, template<typename> class _Base = A>
+    // struct B {
+    //   const _T2* m() const { return 0; }
+    // };
+    //
+    // template<typename _T3>
+    // class C : public B<_T3> {};
+    //
+    // void f(C<char>& str) {
+    //   str.m();
+    // }
+    public void testBug232086() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction b0 = bh.assertNonProblem("m();", 1, ICPPFunction.class);
+    }
+
+    //    class A {};
+	//
+	//    template <class T> class C {
+	//    public:
+	//    	inline C(T& aRef) {}
+	//    	inline operator T&() {}
+	//    };
+	//
+	//    void foo(A a) {}
+	//    void bar(C<const A> ca) {}
+	//
+	//    void main2() {
+	//    	const A a= *new A();
+	//    	const C<const A> ca= *new C<const A>(*new A());
+	//
+	//    	foo(a); 
+	//    	bar(ca);
+	//    }
+	public void testBug214646() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		
+		IBinding b0= bh.assertNonProblem("foo(a)", 3);
+		IBinding b1= bh.assertNonProblem("bar(ca)", 3);
+		
+		assertInstance(b0, ICPPFunction.class);
+		assertInstance(b1, ICPPFunction.class);
+		
+		ICPPFunction f0= (ICPPFunction) b0, f1= (ICPPFunction) b1;
+		assertEquals(1, f0.getParameters().length);
+		assertEquals(1, f1.getParameters().length);
+		
+		assertInstance(f0.getParameters()[0].getType(), ICPPClassType.class);
+		assertFalse(f0 instanceof ICPPTemplateInstance);
+		assertFalse(f0 instanceof ICPPTemplateDefinition);
+		assertInstance(f1.getParameters()[0].getType(), ICPPClassType.class);
+		assertInstance(f1.getParameters()[0].getType(), ICPPTemplateInstance.class);
+	}
+
+	//	struct A {};
+	//
+	//	template <class T1>
+	//	void func(const T1& p) {
+	//	}
+	//
+	//	void test() {
+	//	  A a1;
+	//	  const A a2;
+	//	  func(a1);
+	//	  func(a2);
+	//	}
+	public void testFunctionTemplate_245049_1() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction b0= bh.assertNonProblem("func(a1)", 4, ICPPFunction.class);
+		assertInstance(b0, ICPPTemplateInstance.class);
+		ICPPFunction b1= bh.assertNonProblem("func(a2)", 4, ICPPFunction.class);
+		assertSame(b0, b1);
+	}
+	
+	//	struct A {};
+	//
+	//	template <class T1>
+	//	void func(const T1& p) {
+	//	}
+	//	template <class T2>
+	//	void func(T2& p) {
+	//	}
+	//
+	//	void test() {
+	//	  A a1;
+	//	  const A a2;
+	//	  func(a1);
+	//	  func(a2);
+	//	}
+	public void testFunctionTemplate_245049_2() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction b0= bh.assertNonProblem("func(a1)", 4, ICPPFunction.class);
+		assertInstance(b0, ICPPTemplateInstance.class);
+		ICPPFunction b1= bh.assertNonProblem("func(a2)", 4, ICPPFunction.class);
+		assertNotSame(b0, b1);
+	}
+	
+	// namespace ns {
+	//
+	// template<class _M1, class _M2>
+	// struct pair {
+	//   pair(const _M1& _a, const _M2& _b) {}
+	// };
+    //
+	// template<class _T1, class _T2>
+	// pair<_T1, _T2> make_pair(_T1 _x, _T2 _y) { return pair<_T1, _T2>(_x, _y); }
+	//
+	// }
+	//
+	// using ns::pair;
+	// using ns::make_pair;
+	// pair<int, int> p = make_pair(1, 2);
+    public void testFunctionTemplateWithUsing() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		bh.assertNonProblem("make_pair(1", 9, ICPPFunction.class);
+    }
+
+    
+	//	template<class T>
+	//	struct A {};
+	//
+	//	template<class T>
+	//	A<T> a(T p);
+	//
+	//	void f(A<int> p);
+	//
+	//	typedef int& B;
+	//
+	//	void test(B x) {
+	//	  f(a(x));
+	//	}
+    public void testFunctionTemplate_264963() throws Exception {
+    	BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+    	bh.assertNonProblem("f(a(x));", 1, ICPPFunction.class);
+    }
+
+	//	template <class T, class P>
+	//	void f(void (T::*member)(P));
+	//
+	//	struct A {
+	//	  void m(int& p);
+	//	};
+	//
+	//	void test() {
+	//	  f(&A::m);
+	//	}
+    public void testFunctionTemplate_266532() throws Exception {
+    	BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+    	bh.assertNonProblem("f(&A::m);", 1, ICPPFunction.class);
+    }
+
+	//	template<typename T, typename U = int>
+	//	class A {};
+	//
+	//	template <typename P>
+	//	void f(A<P> p);
+	//
+	//	class B {};
+	//
+	//	void test(A<B> p) {
+	//	  f(p);
+	//	}
+	public void testFunctionTemplate_272848_1() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);		
+	}
+
+	//	template <typename S>
+	//	class B {};
+	//
+	//	template <typename T, typename U = B<T> >
+	//	class A {};
+	//
+	//	template <typename P>
+	//	void f(A<P*> p);
+	//
+	//	void test(A<int*> p) {
+	//	  f(p);
+	//	}
+	public void testFunctionTemplate_272848_2() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);		
+	}
+
+	
+	//	template<class U> void f1(void(*f)(const U&)) {}
+	//	void f2(const int& b){}
+	//	void test() {
+	//	  f1(&f2); // problem on f1
+	//	}
+	public void testSimplifiedFunctionTemplateWithFunctionPointer_281783() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);		
+	}
+
+	//	template <class T>
+	//	class A {};
+	//
+	//	class B {};
+	//
+	//	template <class U>
+	//	void f1(const A<U>& a, void (*f)(const U&));
+	//
+	//	void f2(const B& b);
+	//
+	//	void test(A<B> x) {
+	//	  f1(x, &f2);
+	//	}
+	public void testFunctionTemplateWithFunctionPointer_281783() throws Exception {
+    	BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+    	bh.assertNonProblem("f1(x, &f2);", 2, ICPPFunction.class);
+	}
+
+	// // Brian W.'s example from bugzilla#167098
+	//    template<class K>
+	//    class D { //CPPClassTemplate
+	//    public:
+	//            template<class T, class X>
+	//            D(T t, X x) {} // CPPConstructorTemplate
+	//
+	//            template<class T, class X>
+	//            void foo(T t, X x) {} // CPPMethodTemplate
+	//    };
+	//
+	//    void bar() {
+	//            D<int> *var = new D<int>(5, 6);
+	//            // First D<int>: CPPClassInstance
+	//            // Second D<int>: CPPConstructorInstance
+	//            // Now, getting the instance's specialized binding should
+	//            // result in a CPPConstructorTemplateSpecialization
+	//            var->foo<int,int>(7, 8);
+	//            // foo -> CPPMethodTemplateSpecialization
+	//            // foo<int,int> -> CPPMethodInstance
+	//    }
+	public void testCPPConstructorTemplateSpecialization() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		ICPPASTTemplateId tid= (ICPPASTTemplateId) col.getName(20);
+		IASTName cn= col.getName(21);
+		assertInstance(cn.resolveBinding(), ICPPClassTemplate.class); // *D*<int>(5, 6)
+		assertInstance(cn.resolveBinding(), ICPPClassType.class); // *D*<int>(5, 6)
+		assertInstance(tid.resolveBinding(), ICPPTemplateInstance.class); // *D<int>*(5, 6)
+		assertInstance(tid.resolveBinding(), ICPPConstructor.class); // *D<int>*(5, 6)
+		
+		IBinding tidSpc= ((ICPPTemplateInstance)tid.resolveBinding()).getSpecializedBinding();
+		assertInstance(tidSpc, ICPPConstructor.class);
+		assertInstance(tidSpc, ICPPSpecialization.class);
+		assertInstance(tidSpc, ICPPFunctionTemplate.class);
+	}
+	
+	// template<class T> const T& (max)(const T& lhs, const T& rhs) {
+	//    return (lhs < rhs ? rhs : lhs);
+	// }
+	public void testNestedFuncTemplatedDeclarator_bug190241() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		IASTName name;
+		for (Object element : col.nameList) {
+			name = (IASTName) element;
+			assertFalse(name.resolveBinding() instanceof IProblemBinding);
+		}
+		
+		name= col.nameList.get(0);
+		assertTrue(name.resolveBinding() instanceof ICPPTemplateParameter);
+		name= col.nameList.get(1);
+		assertTrue(name.resolveBinding() instanceof ICPPTemplateParameter);
+		name= col.nameList.get(2);
+		assertTrue(name.resolveBinding() instanceof ICPPFunction);
+		name= col.nameList.get(3);
+		assertTrue(name.resolveBinding() instanceof ICPPTemplateParameter);
+		name= col.nameList.get(4);
+		assertTrue(name.resolveBinding() instanceof IParameter);
+		name= col.nameList.get(5);
+		assertTrue(name.resolveBinding() instanceof ICPPTemplateParameter);
+		name= col.nameList.get(6);
+		assertTrue(name.resolveBinding() instanceof IParameter);
+		name= col.nameList.get(7);
+		assertTrue(name.resolveBinding() instanceof IParameter);
+		name= col.nameList.get(8);
+		assertTrue(name.resolveBinding() instanceof IParameter);
+		name= col.nameList.get(9);
+		assertTrue(name.resolveBinding() instanceof IParameter);
+		name= col.nameList.get(10);
+		assertTrue(name.resolveBinding() instanceof IParameter);
+	}
+	
+	// template<typename TpA>
+	// class A {
+	// public:
+	//   typedef TpA ta;
+	// };
+	//
+	// template<typename TpB>
+	// class B {
+	// public:
+	//   typedef typename A<TpB>::ta tb;
+	// };
+	//
+	// void f(B<int>::tb r) {}
+	public void testTemplateTypedef_214447() throws Exception {
+		CPPASTNameBase.sAllowNameComputation= true;
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		for (IASTName name : col.nameList) {
+			if ("r".equals(String.valueOf(name))) {
+				IBinding b0 = name.resolveBinding();
+				IType type = ((ICPPVariable) b0).getType();
+				type = getUltimateType(type, false);
+				assertInstance(type, IBasicType.class);
+				assertEquals("int", ASTTypeUtil.getType(type));
+			}
+		}
+	}
+
+	// template<typename _TpAllocator>
+	// class Allocator {
+	// public:
+	//   typedef _TpAllocator& alloc_reference;
+	//   template<typename _TpRebind>
+	//   struct rebind {
+	//     typedef Allocator<_TpRebind> other;
+	//   };
+	// };
+	//
+	// template<typename _Tp, typename _Alloc = Allocator<_Tp> >
+	// class Vec {
+	// public:
+	//   typedef typename _Alloc::template rebind<_Tp>::other::alloc_reference reference;
+	// };
+	//
+	// void f(Vec<int>::reference r) {}
+	public void testRebindPattern_214447_1() throws Exception {
+		CPPASTNameBase.sAllowNameComputation= true;
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		for (IASTName name : col.nameList) {
+			if ("r".equals(String.valueOf(name))) {
+				IBinding b0 = name.resolveBinding();
+				IType type = ((ICPPVariable) b0).getType();
+				type = getUltimateType(type, false);
+				assertInstance(type, IBasicType.class);
+				assertEquals("int", ASTTypeUtil.getType(type));
+			}
+		}
+	}
+	
+	// template<typename _TpAllocator>
+	// class Allocator {
+	// public:
+	//   typedef _TpAllocator& alloc_reference;
+	//   template<typename _TpRebind>
+	//   struct rebind {
+	//     typedef Allocator<_TpRebind> other;
+	//   };
+	// };
+	//
+	// template<typename _TpBase, typename _AllocBase>
+	// class VecBase {
+	// public:
+	//   typedef typename _AllocBase::template rebind<_TpBase>::other _Tp_alloc_type;
+	// };
+	//
+	// template<typename _Tp, typename _Alloc = Allocator<_Tp> >
+	// class Vec : protected VecBase<_Tp, _Alloc> {
+	// public:
+	//   typedef typename VecBase<_Tp, _Alloc>::_Tp_alloc_type::alloc_reference reference;
+	// };
+	//
+	// void f(Vec<int>::reference r) {}
+	public void testRebindPattern_214447_2() throws Exception {
+		CPPASTNameBase.sAllowNameComputation= true;
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		for (IASTName name : col.nameList) {
+			if ("r".equals(String.valueOf(name))) {
+				IBinding b0 = name.resolveBinding();
+				IType type = ((ICPPVariable) b0).getType();
+				type = getUltimateType(type, false);
+				assertInstance(type, IBasicType.class);
+				assertEquals("int", ASTTypeUtil.getType(type));
+			}
+		}
+	}
+
+	// template<typename _Tp>
+	// struct allocator {
+	//   template<typename _Tp1>
+	//   struct rebind {
+	//     typedef allocator<_Tp1> other;
+	//   };
+	// };
+	//
+	// template<typename _Val1, typename _Alloc1 = allocator<_Val1> >
+	// struct _Rb_tree {
+	//   typedef _Val1 value_type1;
+	// };
+	//
+	// template <typename _Val2, typename _Alloc2 = allocator<_Val2> >
+	// struct map {
+	//   typedef _Val2 value_type2;
+	//   typedef typename _Alloc2::template rebind<value_type2>::other _Val_alloc_type;
+	//   typedef _Rb_tree<_Val2, _Val_alloc_type> _Rep_type;
+	//   typedef typename _Rep_type::value_type1 value_type;
+	// };
+	//
+	// void f(map<int>::value_type r) {}
+	public void testRebindPattern_236197() throws Exception {
+		CPPASTNameBase.sAllowNameComputation= true;
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		for (IASTName name : col.nameList) {
+			if ("r".equals(String.valueOf(name))) {
+				IBinding b0 = name.resolveBinding();
+				IType type = ((ICPPVariable) b0).getType();
+				type = getUltimateType(type, false);
+				assertInstance(type, IBasicType.class);
+				assertEquals("int", ASTTypeUtil.getType(type));
+			}
+		}
+	}
+
+	// template<typename _Iterator>
+	// struct IterTraits {
+	//   typedef typename _Iterator::iter_reference traits_reference;
+	// };
+	//
+	// template<typename _Tp>
+	// struct IterTraits<_Tp*> {
+	//   typedef _Tp& traits_reference;
+	// };
+	//
+	// template<typename _Pointer>
+	// struct Iter {
+	//   typedef typename IterTraits<_Pointer>::traits_reference iter_reference;
+	// };
+    //
+    // void main(Iter<int*>::iter_reference r);
+    public void testSpecializationSelection_229218() throws Exception {
+		CPPASTNameBase.sAllowNameComputation= true;
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		for (IASTName name : col.nameList) {
+			if ("r".equals(String.valueOf(name))) {
+				IBinding b0 = name.resolveBinding();
+				IType type = ((ICPPVariable) b0).getType();
+				type = getUltimateType(type, false);
+				assertInstance(type, IBasicType.class);
+				assertEquals("int", ASTTypeUtil.getType(type));
+			}
+		}
+    }
+
+    // template<typename _Tp>
+	// class A {
+	// public:
+	//   typedef _Tp a;
+	// };
+	//
+	// template<typename _Tp1, typename _Tp2 = A<_Tp1> >
+	// class B {
+	// public:
+	//   typedef _Tp2 b;
+	// };
+	//
+	// B<int>::b::a x;
+	public void testDefaultTemplateParameter() throws Exception {
+		CPPASTNameBase.sAllowNameComputation= true;
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		for (IASTName name : col.nameList) {
+			if ("x".equals(String.valueOf(name))) {
+				IBinding b0 = name.resolveBinding();
+				IType type = ((ICPPVariable) b0).getType();
+				type = getUltimateType(type, false);
+				assertInstance(type, IBasicType.class);
+				assertEquals("int", ASTTypeUtil.getType(type));
+			}
+		}
+	}
+
+	//	template<class T, class U> class A;
+	//  template<class T, int U> class AI;
+	//  template<class T, template<typename V1, typename V2> class U> class AT;
+	//
+	//	class B {};
+	//
+	//	template<class T, class U = B> class A {};
+	//  template<class T, int U=1> class AI {};
+	//  template<class T, template<typename V1, typename V2> class U=A> class AT {};
+	//
+	//	A<char> x;
+	//  AI<char> y;
+	//  AT<char> z;
+	public void testDefaultTemplateParameter_281781() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+
+	//    class A {};
+	//    class B {};
+	//    template<typename T>
+	//    class C {
+	//    public:
+	//    	T t;
+	//    	operator B() {B b; return b;}
+	//    };
+	//    template<typename T>
+	//    class D : public C<T> {};
+	//    void foo(B b) {}
+	//
+	//    void refs() {
+	//    	D<A> d;
+	//    	foo(d);
+	//    }
+	public void testUserDefinedConversions_224364() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction fn= bh.assertNonProblem("foo(d)", 3, ICPPFunction.class);
+	}
+	
+	//    class B {};
+	//    template<typename T>
+	//    class C {
+	//    public:
+	//    	T t;
+	//    	operator T() {return t;}
+	//    };
+	//    template<typename T>
+	//    class D : public C<T> {};
+	//    void foo(B b) {}
+	//
+	//    void refs() {
+	//    	D<B> d;
+	//    	foo(d);
+	//    }
+	public void testUserDefinedConversions_224364_2() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction fn= bh.assertNonProblem("foo(d)", 3, ICPPFunction.class);
+	}
+	
+	//    class Z {};
+	//    template<typename TA>
+	//    class A {
+	//    	public:
+	//    		TA ta;
+	//          operator TA() {return ta;}
+	//    };
+	//    template<typename TB>
+	//    class B : public A<TB> {};
+	//    template<typename TC>
+	//    class C : public B<TC> {}; 
+	//    template<typename TD>
+	//    class D : public C<TD> {};
+	//    template<typename TE>
+	//    class E : public D<TE> {};
+	//    Z foo(Z z) {return z;}
+	//
+	//    Z z= foo(*new E<Z>());
+	public void testUserDefinedConversions_224364_3() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction fn= bh.assertNonProblem("foo(*new", 3, ICPPFunction.class);
+	}
+	
+	//    class X {}; class B {};
+	//    template<typename T>
+	//    class C {
+	//    	public:
+	//    		T t;
+	//          operator T() {return t;}
+	//    };
+	//    template<>
+	//    class C<X> {
+	//    	public:
+	//    		X t;
+	//          operator B() {B b; return b;}
+	//    };
+	//    void foo(B b) {}
+	//
+	//    void refs() {
+	//    	C<X> cx;
+	//    	foo(cx);
+	//    }
+	public void testUserDefinedConversions_226231() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction fn= bh.assertNonProblem("foo(cx", 3, ICPPFunction.class);
+	}
+	
+	//	class A;
+	//
+	//	int foo(A a);
+	//
+	//	template <class T>
+	//	class C {
+	//	public:
+	//		inline operator A();
+	//	};
+	//
+	//	template<typename T>
+	//	void ref(C<T> c) {
+	//	 return foo(c);
+	//	}
+	public void testUserDefinedConversions_239023() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("foo(c);", 3);
+	}
+	
+	//	template<int x>
+	//	class A {};
+	//
+	//	const int i= 1;
+	//	A<i> a1;
+	public void testNonTypeArgumentIsIDExpression_229942_a() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertInstance(col.getName(4).getParent(), ICPPASTTemplateId.class);
+		assertInstance(col.getName(5).getParent(), IASTIdExpression.class);
+	}
+	
+	//  class X {
+	//	   template<int x>
+	//	   class A {};
+	//
+	//	   void foo() {
+   	//	      A<i> a1;
+	//     }
+	//
+	//     const int i= 1;
+	//  };
+	public void testNonTypeArgumentIsIDExpression_229942_b() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertInstance(col.getName(5).getParent(), ICPPASTTemplateId.class);
+		assertInstance(col.getName(6).getParent(), IASTIdExpression.class);
+	}
+	
+	//	template<int x>
+	//	class A {};
+	//
+	//	const int i= 1;
+	//	A<i+1> a1;
+	public void testExpressionArgumentIsExpression_229942_c() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertInstance(col.getName(4).getParent(), ICPPASTTemplateId.class);
+		assertInstance(col.getName(5).getParent(), IASTIdExpression.class);
+		assertInstance(col.getName(5).getParent().getParent(), IASTBinaryExpression.class);
+	}
+	
+	//	template<int x>
+	//	class A {};
+	//
+	//	const int i= 1;
+	//	A<typeid(1)> a1;
+	public void testTypeIdOperatorArgumentIsUnaryExpression_229942_d() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertInstance(col.getName(3), ICPPASTTemplateId.class);
+		assertInstance(((ICPPASTTemplateId)col.getName(3)).getTemplateArguments()[0], ICPPASTUnaryExpression.class);
+	}
+	
+	// template<class T1, int q> class C {};    
+	// template<class T1, class T2> class A {};
+	// template< class T1, class T2, int q1, int q2>
+	// class A< C<T1, q1>, C<T2, q2> > {};      
+	public void testTemplateIdAsTemplateArgumentIsTypeId_229942_e() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		// 12 is template-id: C<T1, q1>
+		assertInstance(col.getName(12), ICPPASTTemplateId.class);
+		assertInstance(col.getName(12).getParent(), ICPPASTNamedTypeSpecifier.class);
+		assertInstance(col.getName(12).getParent().getParent(), IASTTypeId.class);
+
+		// 16 is template-id: C<T2, q2>
+		assertInstance(col.getName(16), ICPPASTTemplateId.class);
+		assertInstance(col.getName(16).getParent(), ICPPASTNamedTypeSpecifier.class);
+		assertInstance(col.getName(16).getParent().getParent(), IASTTypeId.class);
+	}
+	
+	//	template <class T>
+	//	struct A {
+	//		A(T* t) {}
+	//	};
+	//
+	//	template <class T>
+	//	inline const A<T> foo(T* t) {
+	//		return A<T>(t);
+	//	}
+	//
+	//	template <class T>
+	//	inline const A<T> foo(const A<T> at) {
+	//		return at;
+	//	}
+	public void testTypeIdAsTemplateArgumentIsTypeId_229942_f() throws Exception {
+		BindingAssertionHelper ba=new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("T> at) {", 1);
+		
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertInstance(col.getName(23).getParent().getParent(), IASTTypeId.class);
+		assertInstance(col.getName(23).resolveBinding(), ICPPTemplateTypeParameter.class);
+	}
+	
+	//	template <class T>
+	//	struct A {};
+	//
+	//	template <class T>
+	//	inline const void foo(void (*f)(A<T>), T t) {
+	//	}
+	//
+	//	const int i= 5;
+	//	template <class T>
+	//	inline const void foo(void (*f)(A<i>), T* t) { // disallowed, but we're testing the AST
+	//	}
+	public void testTypeIdAsTemplateArgumentIsTypeId_229942_g() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		// 7 is T in A<T>
+		assertInstance(col.getName(7).getParent(), ICPPASTNamedTypeSpecifier.class);
+		assertInstance(col.getName(7).getParent().getParent(), IASTTypeId.class);
+		
+		// 17 is i in A<i>
+		assertInstance(col.getName(17).getParent(), IASTIdExpression.class);
+	}
+	
+	//	typedef int td;
+	//	template<> class Alias<td const *> {
+	//	};
+	public void testNonAmbiguityCase_229942_h() throws Exception {
+		IASTTranslationUnit tu= parse(getAboveComment(), ParserLanguage.CPP);
+		CPPNameCollector col= new CPPNameCollector();
+		tu.accept(col);
+
+		// 2 is Alias
+		ICPPASTTemplateId tid= assertInstance(col.getName(2).getParent(), ICPPASTTemplateId.class);
+		IASTNode[] args= tid.getTemplateArguments();
+		assertEquals(1, args.length);
+		assertInstance(args[0], IASTTypeId.class);
+	}
+	
+	//  // From discussion in 207840. See 14.3.4.
+	//	class A {};
+	//
+	//	template<typename T>
+	//	class B {};
+	//
+	//	template<typename T = A>
+	//	class C {};
+	//
+	//	B b1;
+	//	B<> b2; // error - no default args
+	//
+	//	C c1;   
+	//	C<> c2; // ok - default args
+	public void testMissingTemplateArgumentLists() throws Exception {
+		BindingAssertionHelper ba=new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertProblem("B b1", 1);
+		ba.assertNonProblem("B<> b2", 1, ICPPTemplateDefinition.class, ICPPClassType.class);
+		ba.assertProblem("B<> b2", 3);
+		ba.assertProblem("C c1", 1);
+		ba.assertNonProblem("C<> c2", 1, ICPPTemplateDefinition.class, ICPPClassType.class);
+		ba.assertNonProblem("C<> c2", 3, ICPPTemplateInstance.class, ICPPClassType.class);
+	}
+	
+	//	template<class T1, int N> class TestClass {
+	//		int member1;
+	//		void fun1(void);
+	//	};
+	//	template<class T1,int N> inline void TestClass<T1,N>::fun1(void) {
+	//		member1 = 0; 
+	//	}
+	public void testDefinitionOfClassTemplateWithNonTypeParameter() throws Exception {
+		BindingAssertionHelper ba=new BindingAssertionHelper(getAboveComment(), true);
+		ICPPMethod f1= ba.assertNonProblem("fun1(void);", 4, ICPPMethod.class);
+		ICPPField m1= ba.assertNonProblem("member1;", 7, ICPPField.class);
+		ICPPMethod f2= ba.assertNonProblem("fun1(void) {", 4, ICPPMethod.class);
+		ICPPField m2= ba.assertNonProblem("member1 =", 7, ICPPField.class);
+		assertSame(m1, m2);
+		assertSame(f1, f2);
+	}
+
+	//	class Z {};
+	//	
+	//	template<typename T1>
+	//	class A {
+	//		public:
+	//			template<typename T2 = Z> class B;
+	//	};
+	//	
+	//	template<> template<typename T3> class A<short>::B {
+	//		public:
+	//			T3 foo() { return (T3) 0; }
+	//	};
+	//	
+	//	void ref() {
+	//		A<short>::B<> b;
+	//	}
+	public void testNestedTemplateDefinitionParameter() throws Exception  {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPTemplateTypeParameter T3a= ba.assertNonProblem("T3 f", 2, ICPPTemplateTypeParameter.class);
+		ICPPTemplateTypeParameter T3b= ba.assertNonProblem("T3)", 2, ICPPTemplateTypeParameter.class);
+		ICPPClassType b= ba.assertNonProblem("B<>", 3, ICPPClassType.class, ICPPTemplateInstance.class);
+	}
+
+	//	template<class T, int x> class A {public: class X {};};
+	//	template<class T1> class A<T1,1> {public: class Y {};};
+	//	template<class T2> class A<T2,2> {public: class Z {};};
+	//
+	//	class B {};
+	//
+	//	A<B, 0>::X x;
+	//	A<B, 1>::Y y;
+	//	A<B, 2>::Z z;
+	public void testNonTypeArgumentDisambiguation_233460() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPClassType b2= ba.assertNonProblem("A<B, 0>", 7, ICPPClassType.class, ICPPTemplateInstance.class);
+		ICPPClassType b3= ba.assertNonProblem("A<B, 1>", 7, ICPPClassType.class, ICPPTemplateInstance.class);
+		ICPPClassType b4= ba.assertNonProblem("A<B, 2>", 7, ICPPClassType.class, ICPPTemplateInstance.class);
+		
+		assertTrue(!b2.isSameType(b3));
+		assertTrue(!b3.isSameType(b4));
+		assertTrue(!b4.isSameType(b2));
+		
+		ICPPClassType X= ba.assertNonProblem("X x", 1, ICPPClassType.class);
+		ICPPClassType Y= ba.assertNonProblem("Y y", 1, ICPPClassType.class);
+		ICPPClassType Z= ba.assertNonProblem("Z z", 1, ICPPClassType.class);
+		
+		assertTrue(!X.isSameType(Y));
+		assertTrue(!Y.isSameType(Z));
+		assertTrue(!Z.isSameType(X));
+	}
+	
+	//	template<class T, bool b> class A {public: class X {};};
+	//	template<class T1> class A<T1,true> {public: class Y {};};
+	//
+	//	class B {};
+	//
+	//	A<B, false>::X x; //1
+	//	A<B, true>::Y y; //2
+	//
+	//	A<B, true>::X x; //3 should be an error
+	//	A<B, false>::Y y; //4 should be an error
+	public void testNonTypeBooleanArgumentDisambiguation() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		
+		ICPPClassType X= ba.assertNonProblem("X x; //1", 1, ICPPClassType.class);
+		ICPPClassType Y= ba.assertNonProblem("Y y; //2", 1, ICPPClassType.class);
+		ba.assertProblem("X x; //3", 1);
+		ba.assertProblem("Y y; //4", 1);
+		
+		assertTrue(!X.isSameType(Y));
+	}
+	
+	//	template <int x>
+	//	class C {
+	//	public:
+	//		inline C() {};
+	//	};
+	//
+	//	const int _256=0x100;
+	//
+	//	typedef C<_256> aRef;
+	//
+	//	void foo(aRef& aRefence) {}
+	//	void bar(C<_256>& aRefence) {}
+	//	void baz(void) {}
+	//
+	//	int main (void) {
+	//		C<256> t;
+	//		foo(t);
+	//		bar(t);
+	//		baz();
+	//	}
+	public void testBug207871() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		
+		ICPPVariable _256= ba.assertNonProblem("_256=0x100", 4, ICPPVariable.class);
+		IQualifierType qt1= assertInstance(_256.getType(), IQualifierType.class);
+		ICPPBasicType bt1= assertInstance(qt1.getType(), ICPPBasicType.class);
+		assertEquals(256, _256.getInitialValue().numericalValue().intValue());
+		
+		ICPPVariable t= ba.assertNonProblem("t;", 1, ICPPVariable.class);
+		ICPPTemplateInstance ci1= assertInstance(t.getType(), ICPPTemplateInstance.class, ICPPClassType.class);
+		ObjectMap args1= ci1.getArgumentMap();
+		assertEquals(1, args1.size());
+		assertInstance(args1.keyAt(0), ICPPTemplateNonTypeParameter.class);
+		
+		// non-type arguments are currently modelled as a type with attached expression
+		ICPPBasicType bt0= assertInstance(args1.getAt(0), ICPPBasicType.class);
+		assertEquals(bt0.getType(), IBasicType.t_int);
+		assertEquals(256, ci1.getTemplateArguments()[0].getNonTypeValue().numericalValue().intValue());
+		
+		ICPPTemplateInstance ct= ba.assertNonProblem("C<_256> ", 7, ICPPTemplateInstance.class, ICPPClassType.class);
+		ObjectMap args= ct.getArgumentMap();
+		assertEquals(1, args.size());
+		assertInstance(args.keyAt(0), ICPPTemplateNonTypeParameter.class);
+		
+		// non-type arguments are currently modelled as a type with attached expression
+		ICPPBasicType bt= assertInstance(args.getAt(0), ICPPBasicType.class);
+		assertEquals(bt.getType(), IBasicType.t_int);
+		assertEquals(256, ct.getTemplateArguments()[0].getNonTypeValue().numericalValue().intValue());
+		
+		ba.assertNonProblem("foo(t)", 3);
+		ba.assertNonProblem("bar(t)", 3);
+	}
+	
+	//	template<int x>
+	//	class C {};
+	//
+	//	template<int y>
+	//	class D {
+	//	public:
+	//		C<y> go();
+	//	};
+	public void testDeferredNonTypeArgument() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPDeferredClassInstance ci= ba.assertNonProblem("C<y>", 4, ICPPDeferredClassInstance.class);
+		ICPPTemplateArgument[] args= ci.getTemplateArguments();
+		assertEquals(1, args.length);
+		assertEquals(0, Value.isTemplateParameter(args[0].getNonTypeValue()));
+	}
+	
+	//	template<int x>
+	//	class A {};
+	//
+	//	A<int> aint; // should be an error
+	public void testTypeArgumentToNonTypeParameter() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertProblem("A<int>", 6);
+	}
+	
+	//	template<int I>
+	//	class That {
+	//	public:
+	//		That(int x) {}
+	//	};
+	//
+	//	template<int T>
+	//	class This : public That<T> {
+	//	public:
+	//		inline This();
+	//	};
+	//
+	//	template <int I>
+	//	inline This<I>::This() : That<I>(I) {
+	//	}
+	public void testParameterReferenceInChainInitializer_a() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		
+		// These intermediate assertions will not hold until deferred non-type arguments are
+		// correctly modelled
+		ICPPClassType tid= ba.assertNonProblem("This<I>::T", 7, ICPPClassType.class);
+		assertFalse(tid instanceof ICPPSpecialization);
+		ICPPConstructor th1sCtor= ba.assertNonProblem("This() :", 4, ICPPConstructor.class);
+		assertFalse(th1sCtor instanceof ICPPSpecialization);
+		
+		ICPPTemplateNonTypeParameter np = ba.assertNonProblem("I>(I)", 1, ICPPTemplateNonTypeParameter.class);
+		ICPPConstructor clazz= ba.assertNonProblem("That<I>(I)", 4, ICPPConstructor.class);
+		ICPPConstructor ctor= ba.assertNonProblem("That<I>(I)", 7, ICPPConstructor.class);
+
+		ICPPTemplateNonTypeParameter np1 = ba.assertNonProblem("I)", 1, ICPPTemplateNonTypeParameter.class);
+		assertSame(np, np1);
+	}
+	
+	//	template<typename I>
+	//	class That {
+	//		public:
+	//			That() {}
+	//	};
+	//
+	//	template<typename T>
+	//	class This : public That<T> {
+	//		public:
+	//			inline This();
+	//	};
+	//
+	//	template <typename I>
+	//	inline This<I>::This() : That<I>() {
+	//	}
+	public void testParameterReferenceInChainInitializer_b() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+	
+		ICPPClassType tid= ba.assertNonProblem("This<I>::T", 7, ICPPClassType.class);
+		assertFalse(tid instanceof ICPPSpecialization);
+		ICPPConstructor th1sCtor= ba.assertNonProblem("This() :", 4, ICPPConstructor.class);
+		assertFalse(th1sCtor instanceof ICPPSpecialization);
+		
+		ICPPTemplateTypeParameter np= ba.assertNonProblem("I>()", 1, ICPPTemplateTypeParameter.class);
+		ICPPConstructor clazz= ba.assertNonProblem("That<I>()", 4, ICPPConstructor.class);
+		ICPPConstructor ctor= ba.assertNonProblem("That<I>()", 7, ICPPConstructor.class);
+	}
+	
+	// template<typename T, int I>
+	// class C {};
+	//
+	// template<typename T>
+	// class C<T, 5> {};
+	// 
+	// class A {}; 
+	//
+	// C<A,5L> ca5L;
+	public void testIntegralConversionInPartialSpecializationMatching_237914() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPTemplateInstance ctps= ba.assertNonProblem("C<A,5L>", 7, ICPPTemplateInstance.class, ICPPClassType.class);
+		assertInstance(ctps.getTemplateDefinition(), ICPPClassTemplatePartialSpecialization.class);
+	}
+	
+	// template<typename T, int I>
+	// class C {};
+	//
+	// class A {};
+	//
+	// template<>
+	// class C<A, 5> {
+	// public: int test;
+	// };
+	//
+	// C<A,5L> ca5L;
+	// void xx() {
+	//    ca5L.test= 0;
+	// }
+	public void testIntegralConversionInSpecializationMatching_237914() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPSpecialization ctps= ba.assertNonProblem("C<A,5L>", 7, ICPPSpecialization.class, ICPPClassType.class);
+		ba.assertNonProblem("test=", 4, ICPPField.class);
+	}
+	
+	//	class A {
+	//		public:
+	//			A(const A& a) {}
+	//	};
+	//
+	//	template<typename T>
+	//	class B : A {
+	//		public:
+	//			B(const B<T>& other) : A(other) {}
+	//	};
+	public void testChainInitializerLookupThroughDeferredClassBase() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("A(other", 1);
+	}
+	
+	//	class A {};
+	//
+	//	class B {
+	//	public:
+	//		void foo(const A* b);
+	//	};
+	//
+	//	template<typename T>
+	//	class C : public B {
+	//	public:
+	//		void foo(T *t) {
+	//			B::foo(static_cast<A*>(t));
+	//		}
+	//	};
+	public void testMemberLookupThroughDeferredClassBase() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("foo(s", 3);
+	}
+	
+	//	template <class T>
+	//	class A {
+	//	public:
+	//		inline int foo() const;
+	//		inline int bar() const;
+	//	};
+	//
+	//	template <class T>
+	//	inline int A<T>::bar() const {
+	//		return foo();
+	//	}
+	public void testMemberReferenceFromTemplatedMethodDefinition_238232() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("foo();", 3);
+	}
+	
+	//	namespace result_of {
+	//		template <typename Sequence, typename T, bool is_associative_sequence = false>
+	//		struct find;
+	//
+	//		template <typename Sequence, typename T>
+	//		struct find<Sequence, T, false> {
+	//			typedef
+	//			detail::static_seq_find_if<
+	//			typename result_of::begin<Sequence>::type
+	//			, typename result_of::end<Sequence>::type
+	//			, is_same<mpl::_, T>
+	//			>
+	//			filter;
+	//		};
+	//
+	//		template <typename Sequence, typename T>
+	//		struct find<Sequence, T, true> {
+	//			typedef detail::assoc_find<Sequence, T> filter;
+	//		}; 
+	//	}
+	public void testBug238180_ArrayOutOfBounds() throws Exception {
+		// the code above used to trigger an ArrayOutOfBoundsException
+		parse(getAboveComment(), ParserLanguage.CPP);
+	}
+	
+	//	namespace detail {
+	//		template<bool AtoB, bool BtoA, bool SameType, class A, class B>
+	//		struct str;
+	//		template<class A, class B>
+	//		struct str<true, true, false, A, B> {
+	//			typedef
+	//			detail::return_type_deduction_failure<str> type;
+	//			// ambiguous type in conditional expression
+	//		};
+	//		template<class A, class B>
+	//		struct str<true, true, true, A, B> {
+	//			typedef A type;
+	//		};
+	//	} // detail
+	public void testBug238180_ClassCast() throws Exception {
+		// the code above used to trigger a ClassCastException
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		String tmplId= "str<true, true, false, A, B>";
+		ICPPClassType p= ba.assertNonProblem(tmplId, tmplId.length(), ICPPClassType.class);
+		ICPPConstructor con= p.getConstructors()[1];
+		ICPPReferenceType reftype= (ICPPReferenceType) con.getType().getParameterTypes()[0];
+		IQualifierType qt= (IQualifierType) reftype.getType();
+		ICPPDeferredClassInstance dcl= (ICPPDeferredClassInstance) qt.getType();
+		ICPPClassTemplatePartialSpecialization spec= (ICPPClassTemplatePartialSpecialization) dcl.getSpecializedBinding();
+		ICPPTemplateTypeParameter tp= (ICPPTemplateTypeParameter) spec.getTemplateParameters()[0];
+		assertNull(tp.getDefault());
+	}
+	
+	//	class X {
+	//		template <typename S> X(S s);
+	//	};
+	//
+	//	void test(X* a);
+	//	void bla(int g) {
+	//		test(new X(g));
+	//	} 
+	public void testBug239586_ClassCast() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+	}
+	
+	//	template<typename T1> class CT {
+	//		static int x;
+	//	};
+	//	template<typename T> int CT<T>::x = sizeof(T);
+	public void testUsingTemplParamInInitializerOfStaticField() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPTemplateTypeParameter t= ba.assertNonProblem("T)", 1, ICPPTemplateTypeParameter.class);
+	}
+	
+	//	template<class T1, T1 v1>
+	//	struct integral_constant {
+	//	  static const T1 value = v1;
+	//	  typedef T1 value_type;
+	//	  typedef integral_constant<T1, v1> type;
+	//	};
+	//	template <class T2, T2 v2> const T2 integral_constant<T2, v2>::value;
+	//	typedef integral_constant<bool, true>  true_type;
+	//	typedef integral_constant<bool, false> false_type;
+	//
+	//	template<bool cond, typename A1, typename B1>
+	//	struct if_{
+	//	  typedef A1 type;
+	//	};
+	//	template<typename A2, typename B2>
+	//	struct if_<false, A2, B2> {
+	//	  typedef B2 type;
+	//	};
+	//
+	//	struct AA {
+	//	  int a;
+	//	  void method() {}
+	//	};
+	//	void func(AA oa) {}
+	//
+	//	struct BB {
+	//	  int b;
+	//	  void method() {}
+	//	};
+	//	void func(BB ob) {}
+	//
+	//	template<class T>
+	//	struct CC : public if_<T::value, AA, BB>::type {};
+	//
+	//	void test() {
+	//	  CC<true_type> ca;
+	//	  CC<false_type> cb;
+	//	  ca.method();
+	//	  ca.a = 5;
+	//	  cb.b = 6;
+	//	  func(cb);
+	//	}
+	public void testTemplateMetaProgramming_245027() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPMethod method= ba.assertNonProblem("method();", 6, ICPPMethod.class);
+		ICPPVariable a= ba.assertNonProblem("a =", 1, ICPPVariable.class);
+		ICPPVariable b= ba.assertNonProblem("b =", 1, ICPPVariable.class);
+		ICPPFunction func= ba.assertNonProblem("func(cb)", 4, ICPPFunction.class);
+	}
+
+	//	class Incomplete;
+	//
+	//	char probe(Incomplete* p);
+	//	char (&probe(...))[2];
+	//
+	//	namespace ns1 {
+	//
+	//	template<bool VAL>
+	//	class A {
+	//	 public:
+	//	  static bool m(int a) {}
+	//	};
+	//	}
+	//
+	//	void test() {
+	//	  int x;
+	//	  ns1::A<(sizeof(probe(x)) == 1)>::m(x);
+	//	}
+    public void testNonTypeTemplateParameter_252108() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("x))", 1, ICPPVariable.class);
+    }
+    
+    //    template<typename T, typename U> class TL {};
+    //    typedef int T;
+    //    typedef
+    //    TL<T, TL< T, TL< T, TL< T, TL<T,
+    //    TL<T, TL< T, TL< T, TL< T, TL<T,
+    //    TL<T, TL< T, TL< T, TL< T, TL<T,
+    //    TL<T, TL< T, TL< T, TL< T, TL<T,
+    //    TL<T, TL< T, TL< T, TL< T, TL<T,
+    //    T
+    //    > > > > >
+    //    > > > > >
+    //    > > > > >
+    //    > > > > >
+    //    > > > > >
+    //    type;
+    public void testNestedArguments_246079() throws Throwable {
+    	final Throwable[] th= {null};
+    	Thread t= new Thread(){
+    		@Override
+			public void run() {
+    			try {
+	    				parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+    			} catch (Throwable e) {
+    				th[0]= e;
+    			}
+    		}
+    	};
+    	
+    	t.start();
+    	t.join(4000);
+    	assertFalse(t.isAlive());
+    	if (th[0] != null)
+    		throw th[0];
+    }
+    
+    //	template<class T, class U> class A {};
+    //	template<class T> class A<T, int> {   
+    //	   void foo(T t);                     
+    //	};                                    
+    //	template<class T> void A<T, int>::foo(T t) {} 
+    public void testBug177418() throws Exception {
+    	IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, true, true );
+
+    	CPPNameCollector col = new CPPNameCollector();
+    	tu.accept( col );
+
+    	ICPPTemplateParameter T1 = (ICPPTemplateParameter) col.getName(0).resolveBinding();
+    	ICPPTemplateParameter U = (ICPPTemplateParameter) col.getName(1).resolveBinding();
+    	ICPPClassTemplate A = (ICPPClassTemplate) col.getName(2).resolveBinding();
+
+    	ICPPTemplateParameter T2 = (ICPPTemplateParameter) col.getName(3).resolveBinding();
+    	assertNotSame(T1, T2);
+
+    	ICPPClassTemplatePartialSpecialization A2 = (ICPPClassTemplatePartialSpecialization) col.getName(4).resolveBinding();
+    	assertSame(A2.getPrimaryClassTemplate(), A);
+    	assertSame(A, col.getName(5).resolveBinding());
+    	assertSame(T2, col.getName(6).resolveBinding());
+
+    	ICPPMethod foo = (ICPPMethod) col.getName(7).resolveBinding(); 
+    	assertSame(T2, col.getName(8).resolveBinding());
+    	assertSame(T2, col.getName(10).resolveBinding());
+    	ICPPParameter t = (ICPPParameter) col.getName(9).resolveBinding();
+
+    	assertSame(A2, col.getName(12).resolveBinding());
+    	assertSame(A, col.getName(13).resolveBinding());
+    	assertSame(T2, col.getName(14).resolveBinding());
+    	assertSame(foo, col.getName(15).resolveBinding());
+    	assertSame(T2, col.getName(16).resolveBinding());
+    	assertSame(t, col.getName(17).resolveBinding());
+    }
+    
+    //    template <typename T, typename U> class CT {
+    //    	T* instance(void);
+    //    };
+    //    template <class T, class U> T * CT<T, U>::instance (void) {
+    //    	return new CT<T, U>;
+    //    }
+    public void testNewOfThisTemplate() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+    }
+    
+    //    template <class T> void f(T);
+    //    class X {
+    //    	friend void f<>(int);
+    //    };
+    public void testFunctionSpecializationAsFriend() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		ICPPFunctionTemplate f= bh.assertNonProblem("f(T)", 1);
+		IFunction fref1= bh.assertNonProblem("f<>", 1);
+		assertSame(fref1, f);
+		IFunction fref2= bh.assertNonProblem("f<>", 3);
+		assertInstance(fref2, ICPPTemplateInstance.class);
+		assertSame(f, ((ICPPTemplateInstance) fref2).getSpecializedBinding());
+    }
+    
+    //    template <typename T> class XT {
+    //    	typedef int mytype1;
+    //    	mytype1 m1();
+    //    };
+    //    template <typename T> class XT<T*> {
+    //    	typedef int mytype2;
+    //    	mytype2 m2();
+    //    };
+    //    template <> class XT<int> {
+    //    	typedef int mytype3;
+    //    	mytype3 m3();
+    //    };
+    //    template <typename T> typename XT<T>::mytype1 XT<T>::m1() {}
+    //    template <typename T> typename XT<T*>::mytype2 XT<T*>::m2() {}
+    //    XT<int>::mytype3 XT<int>::m3() {}
+    public void testMethodImplWithNonDeferredType() throws Exception {
+		final String code = getAboveComment();
+        parseAndCheckBindings(code, ParserLanguage.CPP);
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		ICPPMethod m1= bh.assertNonProblem("m1();", 2);
+		ICPPMethod m2= bh.assertNonProblem("m1() ", 2);
+		assertSame(m1, m2);
+		m1= bh.assertNonProblem("m2();", 2);
+		m2= bh.assertNonProblem("m2() ", 2);
+		assertSame(m1, m2);
+		m1= bh.assertNonProblem("m3();", 2);
+		m2= bh.assertNonProblem("m3() ", 2);
+		assertSame(m1, m2);
+    }
+    
+    //    template<typename S> class A1 {
+    //        template<typename T> void f1(T);
+    //    };
+    //    template<> template<typename T> void A1<float>::f1(T){}   
+    //
+    //    template<typename T> class A {};
+    //    template<> class A<float> {
+    //    	  template<typename T> void f(T);
+    //    };
+    //    template<typename T> void A<float>::f(T){}   //problem on f
+    public void testClassTemplateMemberFunctionTemplate_Bug104262() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+        BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+
+        ICPPClassTemplate A1= bh.assertNonProblem("A1", 2);
+        ICPPMethod method= bh.assertNonProblem("A1<float>::f1", 13);
+        IBinding owner= method.getOwner();
+        assertInstance(owner, ICPPClassSpecialization.class);
+        assertSame(A1, ((ICPPClassSpecialization) owner).getSpecializedBinding());
+        
+        ICPPClassSpecialization special= bh.assertNonProblem("A<float>", 8);
+        method= bh.assertNonProblem("A<float>::f", 11);
+        assertSame(method.getOwner(), special);
+    }    
+    
+    //    template<typename T> class XT {
+    //    	class Nested {
+    //    		template<typename V> void Nested::m(V);
+    //    	};
+    //    };
+    //    template<typename T> template <typename V> void XT<T>::Nested::m(V) {
+    //    }
+    public void testQualifiedMethodTemplate() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+        BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+
+        ICPPMethod mt1= bh.assertNonProblem("m(V);", 1);
+        ICPPMethod mt2= bh.assertNonProblem("m(V) ", 1);
+        assertSame(mt1, mt2);
+        assertInstance(mt1, ICPPFunctionTemplate.class);
+    }
+    
+    //    template <typename T, typename U=T> class XT {};
+    //    template <typename T> class XT<T,T> {public: int partial;};
+    //    void test() {
+    //       XT<int> xt;
+    //       xt.partial;
+    //    }
+    public void testDefaultArgsWithPartialSpecialization() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+    }
+    
+    //    template <typename T> class XT {
+    //   	public:
+    //   		int a;
+    //    	void m() {
+    //    		this->a= 1;
+    //    	}
+    //    };
+    public void testFieldReference_Bug257186() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+        BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+
+        IBinding a1= bh.assertNonProblem("a;", 1);
+        IBinding a2= bh.assertNonProblem("a=", 1);
+        assertInstance(a1, ICPPField.class);
+        assertSame(a1, a2);
+    }
+    
+    //    void f(int); void f(char);
+    //    void g(int);
+    //    template<typename T> void h(T);
+    //    template<typename T> struct A  {
+    //      void m(int); void m(char);
+    //    	void m() {
+    //    		typename T::B b;
+    //    		b.func(); b.var;
+    //    		f(b); g(b); h(b); m(b);
+    //    	}
+    //    };
+    public void testUnknownReferences_Bug257194() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+        BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+
+        bh.assertNonProblem("func();", 4, ICPPUnknownBinding.class);
+        bh.assertNonProblem("var;", 3, ICPPUnknownBinding.class);
+        bh.assertNonProblem("f(b)", 1, ICPPUnknownBinding.class, IFunction.class);
+        bh.assertNonProblem("h(b)", 1, ICPPUnknownBinding.class, IFunction.class);
+        bh.assertNonProblem("m(b)", 1, ICPPUnknownBinding.class, IFunction.class);
+        IFunction g= bh.assertNonProblem("g(b)", 1); 
+        assertFalse(g instanceof ICPPUnknownBinding);
+    }
+
+    //    template<typename T> struct A  {
+    //    	void m() {
+    //    		T::b.c;
+    //	        T::b.f();
+    //    		T::b.f().d;
+    //          T::f1();
+    //          T v;
+    //			v.x; v.y();
+    //    	}
+    //    };
+    public void testTypeOfUnknownReferences_Bug257194a() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP); 
+        BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+
+        bh.assertNonProblem("b.c", 1, ICPPUnknownBinding.class);
+        bh.assertNonProblem("c;", 1, ICPPUnknownBinding.class);
+        bh.assertNonProblem("f();", 1, ICPPUnknownBinding.class, IFunction.class);
+        bh.assertNonProblem("f().", 1, ICPPUnknownBinding.class, IFunction.class);
+        bh.assertNonProblem("d;", 1, ICPPUnknownBinding.class);
+        bh.assertNonProblem("f1();", 2, ICPPUnknownBinding.class, IFunction.class);
+        bh.assertNonProblem("x;", 1, ICPPUnknownBinding.class);
+        bh.assertNonProblem("y();", 1, ICPPUnknownBinding.class, IFunction.class);
+    }
+
+    //    template<typename T> struct A  {
+    //    	void m() {
+    //    		T::b->c;
+    //	        T::b->f();
+    //    		T::b->f()->d;
+    //          T::f1();
+    //          T v;
+    //          v->x; v->y();
+    //    	}
+    //    };
+    public void testTypeOfUnknownReferences_Bug257194b() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP); 
+        BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+
+        bh.assertNonProblem("b->c", 1, ICPPUnknownBinding.class);
+        bh.assertNonProblem("c;", 1, ICPPUnknownBinding.class);
+        bh.assertNonProblem("f();", 1, ICPPUnknownBinding.class, IFunction.class);
+        bh.assertNonProblem("f()->", 1, ICPPUnknownBinding.class, IFunction.class);
+        bh.assertNonProblem("d;", 1, ICPPUnknownBinding.class);
+        bh.assertNonProblem("f1();", 2, ICPPUnknownBinding.class, IFunction.class);
+        bh.assertNonProblem("x;", 1, ICPPUnknownBinding.class);
+        bh.assertNonProblem("y();", 1, ICPPUnknownBinding.class, IFunction.class);
+    }
+
+    //    template<typename T> class XT {
+    //    	typename T::template type<T::a> x;
+    //    	typename T::template type<typename T::A> y;
+    //      using T::b;
+    //      using typename T::B;
+    //      void m() {
+    //         T::f();
+    //         typename T::F();
+    //      }
+    //    };
+    public void testTypeVsExpressionInArgsOfDependentTemplateID_257194() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP); 
+        BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+
+        ICPPUnknownBinding b= bh.assertNonProblem("a>", 1);
+        assertFalse(b instanceof IType);
+        b= bh.assertNonProblem("A>", 1);
+        assertTrue(b instanceof IType);
+        
+        ICPPUsingDeclaration ud= bh.assertNonProblem("b;", 1);
+        b= (ICPPUnknownBinding) ud.getDelegates()[0];
+        assertFalse(b instanceof IType);
+        ud= bh.assertNonProblem("B;", 1);
+        b= (ICPPUnknownBinding) ud.getDelegates()[0];
+        assertTrue(b instanceof IType);
+
+        b= bh.assertNonProblem("f();", 1);
+        assertFalse(b instanceof IType);
+        b= bh.assertNonProblem("F();", 1);
+        assertTrue(b instanceof IType);
+    }
+
+	//  template <typename Val>
+	//  struct A {
+	//    typedef const Val value;
+	//  };
+	//
+	//  template<typename T>
+	//  struct B {
+	//    typedef typename T::value& reference;
+	//  };
+	//
+	//  void func(int a);
+	//
+	//  void test(B<A<int> >::reference p) {
+	//    func(p);
+	//  }
+    public void testTypedefReference_259871() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		bh.assertNonProblem("func(p)", 4, ICPPFunction.class);
+    }
+
+	//  template <typename CL, typename T>
+	//  struct A {
+	//    template<typename U> struct C {
+	//      typedef T (U::*method1)() const;
+	//    };
+	//    typedef typename C<CL>::method1 method2;
+	//
+	//    A(method2 p);
+	//  };
+	//
+	//  struct B {
+	//    int m() const;
+	//
+	//    void test() {
+	//      new A<B, int>(&B::m);
+	//    }
+	//  };
+    public void testNestedTemplates_259872_1() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		bh.assertNonProblem("A<B, int>", 9, ICPPConstructor.class);
+    }
+    
+	//  template <typename CL, typename T>
+	//  struct A {
+	//    template<typename U> struct C {
+	//      typedef T (U::*method1)();
+	//    };
+	//	  template<typename U> struct C<const U> {
+	//	    typedef T (U::*method1)();
+	//	  };
+	//    typedef typename C<CL>::method1 method2;
+	//
+	//    A(method2 p);
+	//  };
+	//
+	//  struct B {
+	//    int m();
+	//
+	//    void test() {
+	//      new A<B, int>(&B::m);
+	//    }
+	//  };
+    public void testNestedTemplates_259872_2() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		bh.assertNonProblem("A<B, int>", 9, ICPPConstructor.class);
+    }
+
+    //    template <class T>
+    //    class DumbPtr {
+    //    public:
+    //    	DumbPtr<T> (const DumbPtr<T>& aObj);
+    //    	~DumbPtr<T> ();
+    //    };
+    //    template <class T>
+    //    DumbPtr<T>::DumbPtr<T>/**/ (const DumbPtr<T>& aObj) {
+    //    }
+    //    template <class T>
+    //    DumbPtr<T>::~DumbPtr<T>/**/ () {
+    //    }
+    public void testCtorWithTemplateID_259600() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP); 
+        BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+        ICPPConstructor ctor= bh.assertNonProblem("DumbPtr<T>/**/", 10);
+        ICPPMethod dtor= bh.assertNonProblem("~DumbPtr<T>/**/", 11);
+    }
+    
+    //    template <class T> class XT {
+    //    public:
+    //       template<typename X> XT(X*);
+    //       template<typename X> XT(X&);
+    //    };
+    //    template <class T> template <class X> XT<T>::XT/**/(X* a) {}
+    //    template <class T> template <class X> XT<T>::XT<T>/**/(X& a) {}
+    public void testCtorTemplateWithTemplateID_259600() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP); 
+        BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+        ICPPConstructor ctor= bh.assertNonProblem("XT/**/", 2);
+        ctor= bh.assertNonProblem("XT<T>/**/", 5);
+    }
+    
+    //    template <typename T> class XT {
+    //    	public:
+    //    		typedef typename T::Nested TD;
+    //    };
+    //
+    //    class Base {
+    //    	public:
+    //    		typedef int Nested;
+    //    };
+    //
+    //    class Derived : public Base {
+    //    };
+    //
+    //    void test() {
+    //    	XT<Derived>::TD x;
+    //    }
+    public void testResolutionOfUnknownBindings_262163() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP); 
+        BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+        IVariable x= bh.assertNonProblem("x;", 1);
+        ITypedef Nested= bh.assertNonProblem("Nested;", 6);
+        IType t= x.getType();
+        assertInstance(t, ITypedef.class);
+        t= ((ITypedef) t).getType();
+        assertSame(t, Nested);
+    }
+
+	//  template<typename _CharT>
+	//  struct StringBase {
+	//    typedef int size_type;
+	//  };
+	//
+	//  template<typename _CharT, template<typename> class _Base = StringBase>
+	//  struct VersaString;
+	//
+	//  template<typename _CharT, template<typename> class _Base>
+	//  struct VersaString : private _Base<_CharT> {
+	//    typedef typename _Base<_CharT>::size_type size_type;
+	//  };
+	//
+	//  template<typename _CharT>
+	//  struct BasicString : public VersaString<_CharT> {
+	//    typedef typename VersaString<_CharT>::size_type size_type;
+	//    BasicString substr(size_type pos) const;
+	//  };
+	//
+	//  void test(BasicString<char> s) {
+	//    s.substr(0);
+	//  }
+    public void testResolutionOfUnknownBindings_262328() throws Exception {
+		BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+		bh.assertNonProblem("substr(0)", 6, ICPPMethod.class);
+    }
+    
+    // class C {};
+    // template<typename T> class XT {
+    //    T field;
+    //    void bla() {
+    //       C c;
+    //       field.m(c);
+    //    }
+    // };
+    public void testResolutionOfUnknownFunctions() throws Exception {
+    	String code= getAboveComment();
+    	parseAndCheckBindings(code, ParserLanguage.CPP);
+    }
+    
+    // class C {};
+    // template<typename T> class XT {
+    //    T field;
+    //    void bla() {
+    //       C c;
+    //       field[0].m(c);
+    //    }
+    // };
+    public void testResolutionOfUnknownArrayAccess() throws Exception {
+    	String code= getAboveComment();
+    	parseAndCheckBindings(code, ParserLanguage.CPP);
+    }
+    
+    // template <typename T> class CT {
+    // public:
+    //    void append(unsigned int __n, T __c) {}
+    //    template<class P> void append(P __first, P __last) {}
+    // };
+    // void test() {
+    //    CT<char> x;
+    //    x.append(3, 'c');
+    // }
+    public void testConflictInTemplateArgumentDeduction() throws Exception {
+    	String code= getAboveComment();
+    	parseAndCheckBindings(code, ParserLanguage.CPP);
+    	BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+    	ICPPMethod m= bh.assertNonProblem("append(3", 6);
+    	assertFalse(m instanceof ICPPTemplateInstance);
+    }
+
+	//	struct A {
+	//	  void m() const;
+	//	};
+	//
+	//	template<typename T>
+	//	struct B : public A {
+	//	};
+	//
+	//	typedef B<char> C;
+	//
+	//	void test(const C& p) {
+	//	  p.m();
+	//	}
+    public void testConversionSequence_263159() throws Exception {
+    	BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), true);
+    	ICPPMethod m= bh.assertNonProblem("m();", 1, ICPPMethod.class);
+    }
+
+	//	template <class C> class A;
+	//
+	//	template <class C>
+	//	A<C> make_A(C* p);
+	//
+	//	template <class C>
+	//	struct A {
+	//	  A(C* p);
+	//	  friend A<C> make_A<C>(C* p);
+	//	};
+	//
+	//	template <class C>
+	//	A<C> make_A(C* p) {
+	//	  return A<C>(p);
+	//	}
+	public void testForwardDeclarations_264109() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		bh.assertNonProblem("A<C> make_A(C* p) {", 4, ICPPTemplateInstance.class);
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	template <typename T> class CT {
+	//		public:
+	//			template <typename U> CT(U u) {}
+	//	};
+	//	template <typename T> void any(T t) {}
+	//	void test() {
+	//		int* iptr;
+	//		any(CT<int>(iptr));
+	//	}
+	public void testConstructorTemplateInClassTemplate_264314() throws Exception {
+		String code= getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	template <typename T> class XT {};
+	//	template <typename T> void func(T t, XT<typename T::A> a) {}
+	//	template <typename T, typename S> void func(S s, XT<typename S::A> a, T t) {}
+	//
+	//	class X {typedef int A;};
+	//	class Y {typedef X A;};
+	//
+	//	void test() {
+	//	    X x; Y y;
+	//	    XT<int> xint; XT<X> xy;
+	//	    func(x, xint);
+	//	    func(y, xy, xint);
+	//	}
+	public void testDistinctDeferredInstances_264367() throws Exception {
+		String code= getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+
+	// template <typename T> class XT {
+	//    void m(T t) {
+	//       m(0); // ok with a conversion from 0 to T
+	//    }
+	// };
+	public void testUnknownParameter_264988() throws Exception { 
+		String code= getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+
+	//	template<int V>
+	//	struct A {
+	//	  enum E { e };
+	//	};
+	//
+	//	int x = A<0>::e;
+	//	A<0>::E y;
+	public void testEnumeratorInTemplateInstance_265070() throws Exception { 
+		String code= getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	template<typename T> class CT {};
+	//	template<class T> CT<T>& getline1(CT<T>& __in);
+	//	template<class T> CT<T>& getline2(CT<T>& __in);
+	//	void test() {
+	//		CT<int> i;
+	//		getline2(i);
+	//	}
+	public void testAmbiguousDeclaratorInFunctionTemplate_265342() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		bh.assertNonProblem("getline2(i)", 8, ICPPTemplateInstance.class);
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	// class C {
+	//   friend int f1(int);
+	// };
+	// template <typename T> class CT {
+	//   template <typename S> friend int f2(S);
+	// };
+	// template <typename T1> class C1 {
+	//   template <typename T2> class C2 {
+	//      template<typename T3> class C3 {
+	//      }; 
+	//   }; 
+	// };
+	public void testOwnerOfFriendTemplate_265671() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		IFunction f= bh.assertNonProblem("f1(", 2, IFunction.class);
+		IBinding owner= f.getOwner();
+		assertNull(owner);
+		ICPPFunctionTemplate ft= bh.assertNonProblem("f2(", 2, ICPPFunctionTemplate.class);
+		owner= f.getOwner();
+		assertNull(owner);
+		ICPPTemplateParameter tpar= ft.getTemplateParameters()[0];
+		assertEquals(0, tpar.getTemplateNestingLevel());
+		
+		tpar= bh.assertNonProblem("T1", 2,  ICPPTemplateParameter.class);
+		assertEquals(0, tpar.getTemplateNestingLevel());
+		tpar= bh.assertNonProblem("T2", 2,  ICPPTemplateParameter.class);
+		assertEquals(1, tpar.getTemplateNestingLevel());
+		tpar= bh.assertNonProblem("T3", 2,  ICPPTemplateParameter.class);
+		assertEquals(2, tpar.getTemplateNestingLevel());
+		
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	// template <typename T> void f(T t) {
+	//     g(t);
+	// }
+	// template <typename T> void g(T t) {}
+	public void testDependentNameReferencingLaterDeclaration_265926a() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		IFunction gref= bh.assertNonProblem("g(t)", 1);
+		assertInstance(gref, ICPPUnknownBinding.class);
+		IFunction gdecl= bh.assertNonProblem("g(T t)", 1);
+		
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	class C;
+	//	C* c(void*) {return 0;}
+	//
+	//	template <typename T> class XT {
+	//		void m();
+	//		C* ptr() {return 0;}
+	//	};
+	//
+	//	template <typename T> void XT<T>::m() {
+	//		c(this)->a();
+	//		ptr()->a();
+	//	};
+	//
+	//	class C {
+	//		void a() {};
+	//	};
+	public void testDependentNameReferencingLaterDeclaration_265926b() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	// template<typename T> class XT {
+	//    operator T() {return 0;}
+	//    void m() {
+	//       XT<T*> xt;
+	//       xt.operator T*()->something();
+	//    }
+	// };
+	public void testDeferredConversionOperator() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	template <typename T> class X {};
+	//	template <typename T> class X1 {
+	//		friend class X<T>;
+	//	};
+	//	template <typename T> class Y  : X1<int> {
+	//		void test() {
+	//			X<int> x; // problem binding on X<int>
+	//		}
+	//	};
+	public void testFriendClassTemplate_266992() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);		
+	}
+
+	//	template <int N>
+	//	void S(int (&array)[N]);
+	//
+	//	int a[1];
+	//	void test() {
+	//	  S(a);
+	//	}
+	public void _testFunctionTemplateWithArrayReferenceParameter_269926() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);		
+	}
+
+	//	template <typename T>
+	//	struct A {};
+	//
+	//	struct B {
+	//	  template <typename T>
+	//	  operator A<T>();
+	//	};
+	//
+	//	void f(A<int> p);
+	//
+	//	void test(B p) {
+	//	  f(p);
+	//	}
+	public void testTemplateConversionOperator_271948_1() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+
+	//	template <typename T>
+	//	struct A {
+	//	};
+	//
+	//	template <class U>
+	//	struct B {
+	//	  template <typename T>
+	//	  operator A<T>();
+	//	};
+	//
+	//	void f(const A<char*>& p);
+	//
+	//	void test(B<int> x) {
+	//	  f(x);
+	//	}
+	public void testTemplateConversionOperator_271948_2() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	template<unsigned int> struct ST{};
+	//	template<template<unsigned int> class T> class CT {};
+	//	typedef CT<ST> TDef;
+	public void testUsingTemplateTemplateParameter_279619() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+
+	//	template <typename T>
+	//	struct A {
+	//	  typedef A<T> Self;
+	//	  friend Self f(Self p) { return Self(); }
+	//	};
+	//
+	//	void test(A<int> x) {
+	//	  f(x);
+	//	}
+	public void testInlineFriendFunction_286741() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	class NullType {};
+	//	template <typename T, typename U> struct TypeList {
+	//	   typedef T Head;
+	//	   typedef U Tail;
+	//	};
+	//
+	//	template <typename T1 = NullType, typename T2 = NullType> struct CreateTL {
+	//	    typedef TypeList<T1, typename CreateTL<T2>::Type> Type;
+	//	};
+	//
+	//	template<> struct CreateTL<NullType, NullType> {
+	//	   typedef NullType Type;
+	//	};
+	public void testDefaultArgument_289132() throws Exception {
+		final String code= getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java
new file mode 100644
index 0000000..cff0b15
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java
@@ -0,0 +1,6545 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    Doug Schaefer (IBM) - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *    Andrew Ferguson (Symbian)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.io.IOException;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.ASTSignatureUtil;
+import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.ExpansionOverlapsBoundaryException;
+import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTArraySubscriptExpression;
+import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
+import org.eclipse.cdt.core.dom.ast.IASTCaseStatement;
+import org.eclipse.cdt.core.dom.ast.IASTCastExpression;
+import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
+import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarationStatement;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTDoStatement;
+import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionStatement;
+import org.eclipse.cdt.core.dom.ast.IASTFieldReference;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IASTForStatement;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionCallExpression;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTIfStatement;
+import org.eclipse.cdt.core.dom.ast.IASTImageLocation;
+import org.eclipse.cdt.core.dom.ast.IASTInitializer;
+import org.eclipse.cdt.core.dom.ast.IASTInitializerExpression;
+import org.eclipse.cdt.core.dom.ast.IASTInitializerList;
+import org.eclipse.cdt.core.dom.ast.IASTLabelStatement;
+import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNamedTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTNullStatement;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTProblem;
+import org.eclipse.cdt.core.dom.ast.IASTProblemDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTProblemStatement;
+import org.eclipse.cdt.core.dom.ast.IASTReturnStatement;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.eclipse.cdt.core.dom.ast.IASTSwitchStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
+import org.eclipse.cdt.core.dom.ast.IASTWhileStatement;
+import org.eclipse.cdt.core.dom.ast.IArrayType;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IEnumeration;
+import org.eclipse.cdt.core.dom.ast.IEnumerator;
+import org.eclipse.cdt.core.dom.ast.IField;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IFunctionType;
+import org.eclipse.cdt.core.dom.ast.ILabel;
+import org.eclipse.cdt.core.dom.ast.IMacroBinding;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.IPointerType;
+import org.eclipse.cdt.core.dom.ast.IProblemBinding;
+import org.eclipse.cdt.core.dom.ast.IQualifierType;
+import org.eclipse.cdt.core.dom.ast.IScope;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.IValue;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator;
+import org.eclipse.cdt.core.dom.ast.c.ICASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.c.ICASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.c.ICASTDesignatedInitializer;
+import org.eclipse.cdt.core.dom.ast.c.ICASTEnumerationSpecifier;
+import org.eclipse.cdt.core.dom.ast.c.ICASTFieldDesignator;
+import org.eclipse.cdt.core.dom.ast.c.ICASTPointer;
+import org.eclipse.cdt.core.dom.ast.c.ICASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.c.ICArrayType;
+import org.eclipse.cdt.core.dom.ast.c.ICBasicType;
+import org.eclipse.cdt.core.dom.ast.c.ICExternalBinding;
+import org.eclipse.cdt.core.dom.ast.c.ICFunctionScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
+import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPBasicType;
+import org.eclipse.cdt.core.parser.IToken;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+import org.eclipse.cdt.internal.core.dom.parser.c.CFunction;
+import org.eclipse.cdt.internal.core.dom.parser.c.CVisitor;
+import org.eclipse.cdt.internal.core.dom.parser.c.ICInternalBinding;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+/**
+ * Testcases on the AST.
+ */
+public class AST2Tests extends AST2BaseTest {
+	
+	private static final int NUM_TESTS = 3;
+	
+	public static TestSuite suite() {
+		return suite(AST2Tests.class);
+	}
+	
+	public AST2Tests() {
+		super();
+	}
+	
+	public AST2Tests(String name) {
+		super(name);
+	}
+	
+	protected IASTTranslationUnit parseAndCheckBindings(String code) throws Exception {
+		return parseAndCheckBindings(code, ParserLanguage.C);
+	}
+	
+	public void testBug75189() throws Exception {
+		parseAndCheckBindings("struct A{};\n typedef int (*F) (struct A*);"); //$NON-NLS-1$
+		parseAndCheckBindings("struct A{};\n typedef int (*F) (A*);", ParserLanguage.CPP); //$NON-NLS-1$
+	}
+	
+	public void testBug75340() throws Exception {
+		IASTTranslationUnit tu = parseAndCheckBindings("void f(int i = 0, int * p = 0);", ParserLanguage.CPP); //$NON-NLS-1$
+		IASTSimpleDeclaration sd = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+		assertEquals(ASTSignatureUtil.getParameterSignature(sd.getDeclarators()[0]), "(int, int *)"); //$NON-NLS-1$
+	}
+	
+	// int *p1; int *p2;
+	// union {
+	// struct {int a; int b;} A;
+	// struct {int a; int b;};
+	// } MyStruct;
+	// void test (void) {
+	// p1 = &MyStruct.A.a;
+	// p2 = &MyStruct.b;
+	//         MyStruct.b = 1;
+	// }
+	public void testBug78103() throws Exception {
+		parseAndCheckBindings(getAboveComment());
+	}
+	
+	// int m(int);
+	// int (*pm)(int) = &m;
+	// int f(int);
+	// int x = f((*pm)(5));
+	public void testBug43241() throws Exception {
+		parseAndCheckBindings(getAboveComment());
+	}
+	
+	// int *zzz1 (char);
+	// int (*zzz2) (char); 
+	// int ((*zzz3)) (char); 
+	// int (*(zzz4)) (char); 
+	public void testBug40768() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C); 
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		assertNoProblemBindings(col);
+	}
+	
+	// int x;
+	// void f(int y) {
+	//    int z = x + y;
+	// }
+	public void testBasicFunction() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IScope globalScope = tu.getScope();
+			
+			IASTDeclaration[] declarations = tu.getDeclarations();
+			
+			// int x
+			IASTSimpleDeclaration decl_x = (IASTSimpleDeclaration) declarations[0];
+			IASTSimpleDeclSpecifier declspec_x = (IASTSimpleDeclSpecifier) decl_x
+			.getDeclSpecifier();
+			assertEquals(IASTSimpleDeclSpecifier.t_int, declspec_x.getType());
+			IASTDeclarator declor_x = decl_x.getDeclarators()[0];
+			IASTName name_x = declor_x.getName();
+			assertEquals("x", name_x.toString()); //$NON-NLS-1$
+			
+			// function - void f()
+			IASTFunctionDefinition funcdef_f = (IASTFunctionDefinition) declarations[1];
+			IASTSimpleDeclSpecifier declspec_f = (IASTSimpleDeclSpecifier) funcdef_f
+			.getDeclSpecifier();
+			assertEquals(IASTSimpleDeclSpecifier.t_void, declspec_f.getType());
+			IASTFunctionDeclarator declor_f = funcdef_f.getDeclarator();
+			IASTName name_f = declor_f.getName();
+			assertEquals("f", name_f.toString()); //$NON-NLS-1$
+			
+			// parameter - int y
+			assertTrue(declor_f instanceof IASTStandardFunctionDeclarator);
+			IASTParameterDeclaration decl_y = ((IASTStandardFunctionDeclarator) declor_f)
+			.getParameters()[0];
+			IASTSimpleDeclSpecifier declspec_y = (IASTSimpleDeclSpecifier) decl_y
+			.getDeclSpecifier();
+			assertEquals(IASTSimpleDeclSpecifier.t_int, declspec_y.getType());
+			IASTDeclarator declor_y = decl_y.getDeclarator();
+			IASTName name_y = declor_y.getName();
+			assertEquals("y", name_y.toString()); //$NON-NLS-1$
+			
+			// int z
+			IASTCompoundStatement body_f = (IASTCompoundStatement) funcdef_f
+			.getBody();
+			IASTDeclarationStatement declstmt_z = (IASTDeclarationStatement) body_f
+			.getStatements()[0];
+			IASTSimpleDeclaration decl_z = (IASTSimpleDeclaration) declstmt_z
+			.getDeclaration();
+			IASTSimpleDeclSpecifier declspec_z = (IASTSimpleDeclSpecifier) decl_z
+			.getDeclSpecifier();
+			assertEquals(IASTSimpleDeclSpecifier.t_int, declspec_z.getType());
+			IASTDeclarator declor_z = decl_z.getDeclarators()[0];
+			IASTName name_z = declor_z.getName();
+			assertEquals("z", name_z.toString()); //$NON-NLS-1$
+			
+			// = x + y
+			IASTInitializerExpression initializer = (IASTInitializerExpression) declor_z
+			.getInitializer();
+			IASTBinaryExpression init_z = (IASTBinaryExpression) initializer
+			.getExpression();
+			assertEquals(IASTBinaryExpression.op_plus, init_z.getOperator());
+			IASTIdExpression ref_x = (IASTIdExpression) init_z.getOperand1();
+			IASTName name_ref_x = ref_x.getName();
+			assertEquals("x", name_ref_x.toString()); //$NON-NLS-1$
+			
+			IASTIdExpression ref_y = (IASTIdExpression) init_z.getOperand2();
+			IASTName name_ref_y = ref_y.getName();
+			assertEquals("y", name_ref_y.toString()); //$NON-NLS-1$
+			
+			// BINDINGS
+			// resolve the binding to get the variable object
+			IVariable var_x = (IVariable) name_x.resolveBinding();
+			assertEquals(globalScope, var_x.getScope());
+			IFunction func_f = (IFunction) name_f.resolveBinding();
+			assertEquals(globalScope, func_f.getScope());
+			IParameter var_y = (IParameter) name_y.resolveBinding();
+			assertEquals(((IASTCompoundStatement) funcdef_f.getBody()).getScope(),
+					var_y.getScope());
+			
+			IVariable var_z = (IVariable) name_z.resolveBinding();
+			assertEquals(((ICFunctionScope) func_f.getFunctionScope())
+					.getBodyScope(), var_z.getScope());
+			
+			// make sure the variable referenced is the same one we declared above
+			assertEquals(var_x, name_ref_x.resolveBinding());
+			assertEquals(var_y, name_ref_y.resolveBinding());
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(name_x.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_x);
+			
+			decls = tu.getDeclarationsInAST(name_f.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_f);
+			
+			decls = tu.getDeclarationsInAST(name_y.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_y);
+			
+			decls = tu.getDeclarationsInAST(name_z.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_z);
+			
+			decls = tu.getDeclarationsInAST(name_ref_x.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_x);
+			
+			decls = tu.getDeclarationsInAST(name_ref_y.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_y);
+		
+			// // test clearBindings
+			// assertNotNull(((ICScope) tu.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_OTHER, new String("x").toCharArray()));
+			// //$NON-NLS-1$
+			// assertNotNull(((ICScope) tu.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_OTHER, new String("f").toCharArray()));
+			// //$NON-NLS-1$
+			// assertNotNull(((ICScope) body_f.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_OTHER, new String("z").toCharArray()));
+			// //$NON-NLS-1$
+			// assertNotNull(((ICScope) body_f.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_OTHER, new String("y").toCharArray()));
+			// //$NON-NLS-1$
+			// CVisitor.clearBindings(tu);
+			// assertNull(((ICScope) tu.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_OTHER, new String("x").toCharArray()));
+			// //$NON-NLS-1$
+			// assertNull(((ICScope) tu.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_OTHER, new String("f").toCharArray()));
+			// //$NON-NLS-1$
+			// assertNull(((ICScope) body_f.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_OTHER, new String("z").toCharArray()));
+			// //$NON-NLS-1$
+			// assertNull(((ICScope) body_f.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_OTHER, new String("y").toCharArray()));
+			// //$NON-NLS-1$
+			
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// typedef struct {
+	//     int x;
+	// } S;
+	//
+	// void f() {
+	//     S myS;
+	//     myS.x = 5;
+	// }
+	public void testSimpleStruct() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			IASTCompositeTypeSpecifier type = (IASTCompositeTypeSpecifier) decl
+			.getDeclSpecifier();
+			
+			// it's a typedef
+			assertEquals(IASTDeclSpecifier.sc_typedef, type.getStorageClass());
+			// this an anonymous struct
+			IASTName name_struct = type.getName();
+			assertTrue(name_struct.isDeclaration());
+			assertFalse(name_struct.isReference());
+			assertEquals("", name_struct.toString()); //$NON-NLS-1$
+			// member - x
+			IASTSimpleDeclaration decl_x = (IASTSimpleDeclaration) type
+			.getMembers()[0];
+			IASTSimpleDeclSpecifier spec_x = (IASTSimpleDeclSpecifier) decl_x
+			.getDeclSpecifier();
+			// it's an int
+			assertEquals(IASTSimpleDeclSpecifier.t_int, spec_x.getType());
+			IASTDeclarator tor_x = decl_x.getDeclarators()[0];
+			IASTName name_x = tor_x.getName();
+			assertEquals("x", name_x.toString()); //$NON-NLS-1$
+			
+			// declarator S
+			IASTDeclarator tor_S = decl.getDeclarators()[0];
+			IASTName name_S = tor_S.getName();
+			assertEquals("S", name_S.toString()); //$NON-NLS-1$
+			
+			// function f
+			IASTFunctionDefinition def_f = (IASTFunctionDefinition) tu
+			.getDeclarations()[1];
+			// f's body
+			IASTCompoundStatement body_f = (IASTCompoundStatement) def_f.getBody();
+			// the declaration statement for myS
+			IASTDeclarationStatement declstmt_myS = (IASTDeclarationStatement) body_f
+			.getStatements()[0];
+			// the declaration for myS
+			IASTSimpleDeclaration decl_myS = (IASTSimpleDeclaration) declstmt_myS
+			.getDeclaration();
+			// the type specifier for myS
+			IASTNamedTypeSpecifier type_spec_myS = (IASTNamedTypeSpecifier) decl_myS
+			.getDeclSpecifier();
+			// the type name for myS
+			IASTName name_type_myS = type_spec_myS.getName();
+			// the declarator for myS
+			IASTDeclarator tor_myS = decl_myS.getDeclarators()[0];
+			// the name for myS
+			IASTName name_myS = tor_myS.getName();
+			// the assignment expression statement
+			IASTExpressionStatement exprstmt = (IASTExpressionStatement) body_f
+			.getStatements()[1];
+			// the assignment expression
+			IASTBinaryExpression assexpr = (IASTBinaryExpression) exprstmt
+			.getExpression();
+			// the field reference to myS.x
+			IASTFieldReference fieldref = (IASTFieldReference) assexpr
+			.getOperand1();
+			// the reference to myS
+			IASTIdExpression ref_myS = (IASTIdExpression) fieldref.getFieldOwner();
+			IASTLiteralExpression lit_5 = (IASTLiteralExpression) assexpr
+			.getOperand2();
+			assertEquals("5", lit_5.toString()); //$NON-NLS-1$
+			
+			// Logical Bindings In Test
+			ICompositeType type_struct = (ICompositeType) name_struct
+			.resolveBinding();
+			ITypedef typedef_S = (ITypedef) name_S.resolveBinding();
+			// make sure the typedef is hooked up correctly
+			assertEquals(type_struct, typedef_S.getType());
+			// the typedef S for myS
+			ITypedef typedef_myS = (ITypedef) name_type_myS.resolveBinding();
+			assertEquals(typedef_S, typedef_myS);
+			// get the real type for S which is our anonymous struct
+			ICompositeType type_myS = (ICompositeType) typedef_myS.getType();
+			assertEquals(type_myS, type_struct);
+			// the variable myS
+			IVariable var_myS = (IVariable) name_myS.resolveBinding();
+			assertEquals(typedef_S, var_myS.getType());
+			assertEquals(var_myS, ref_myS.getName().resolveBinding());
+			IField field_x = (IField) name_x.resolveBinding();
+			assertEquals(field_x, fieldref.getFieldName().resolveBinding());
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(name_struct.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_struct);
+			
+			decls = tu.getDeclarationsInAST(name_x.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_x);
+			
+			decls = tu.getDeclarationsInAST(def_f.getDeclarator().getName()
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], def_f.getDeclarator().getName());
+			
+			decls = tu.getDeclarationsInAST(name_S.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_S);
+			
+			decls = tu.getDeclarationsInAST(name_myS.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_myS);
+			
+			decls = tu.getDeclarationsInAST(ref_myS.getName().resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_myS);
+			
+			decls = tu.getDeclarationsInAST(fieldref.getFieldName().resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_x);
+			
+			tu = validateCopy(tu);
+		}
+	}
+	
+	public void testCExpressions() throws ParserException {
+		validateSimpleUnaryExpressionC("++x", IASTUnaryExpression.op_prefixIncr); //$NON-NLS-1$
+		validateSimpleUnaryExpressionC("--x", IASTUnaryExpression.op_prefixDecr); //$NON-NLS-1$
+		validateSimpleUnaryExpressionC("+x", IASTUnaryExpression.op_plus); //$NON-NLS-1$
+		validateSimpleUnaryExpressionC("-x", IASTUnaryExpression.op_minus); //$NON-NLS-1$
+		validateSimpleUnaryExpressionC("!x", IASTUnaryExpression.op_not); //$NON-NLS-1$
+		validateSimpleUnaryExpressionC("~x", IASTUnaryExpression.op_tilde); //$NON-NLS-1$
+		validateSimpleUnaryExpressionC("*x", IASTUnaryExpression.op_star); //$NON-NLS-1$
+		validateSimpleUnaryExpressionC("&x", IASTUnaryExpression.op_amper); //$NON-NLS-1$
+		validateSimpleUnaryExpressionC(
+				"sizeof x", IASTUnaryExpression.op_sizeof); //$NON-NLS-1$
+		validateSimpleTypeIdExpressionC(
+				"sizeof(int)", IASTTypeIdExpression.op_sizeof); //$NON-NLS-1$
+		validateSimpleUnaryTypeIdExpression(
+				"(int)x", IASTCastExpression.op_cast); //$NON-NLS-1$
+		validateSimplePostfixInitializerExpressionC("(int) { 5 }"); //$NON-NLS-1$
+		validateSimplePostfixInitializerExpressionC("(int) { 5, }"); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC("x=y", IASTBinaryExpression.op_assign); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x*=y", IASTBinaryExpression.op_multiplyAssign); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x/=y", IASTBinaryExpression.op_divideAssign); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x%=y", IASTBinaryExpression.op_moduloAssign); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x+=y", IASTBinaryExpression.op_plusAssign); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x-=y", IASTBinaryExpression.op_minusAssign); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x<<=y", IASTBinaryExpression.op_shiftLeftAssign); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x>>=y", IASTBinaryExpression.op_shiftRightAssign); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x&=y", IASTBinaryExpression.op_binaryAndAssign); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x^=y", IASTBinaryExpression.op_binaryXorAssign); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x|=y", IASTBinaryExpression.op_binaryOrAssign); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC("x-y", IASTBinaryExpression.op_minus); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC("x+y", IASTBinaryExpression.op_plus); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC("x/y", IASTBinaryExpression.op_divide); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC("x*y", IASTBinaryExpression.op_multiply); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC("x%y", IASTBinaryExpression.op_modulo); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x<<y", IASTBinaryExpression.op_shiftLeft); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x>>y", IASTBinaryExpression.op_shiftRight); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC("x<y", IASTBinaryExpression.op_lessThan); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x>y", IASTBinaryExpression.op_greaterThan); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x<=y", IASTBinaryExpression.op_lessEqual); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x>=y", IASTBinaryExpression.op_greaterEqual); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC("x==y", IASTBinaryExpression.op_equals); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x!=y", IASTBinaryExpression.op_notequals); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x&y", IASTBinaryExpression.op_binaryAnd); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x^y", IASTBinaryExpression.op_binaryXor); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC("x|y", IASTBinaryExpression.op_binaryOr); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x&&y", IASTBinaryExpression.op_logicalAnd); //$NON-NLS-1$
+		validateSimpleBinaryExpressionC(
+				"x||y", IASTBinaryExpression.op_logicalOr); //$NON-NLS-1$
+		validateConditionalExpressionC("x ? y : x"); //$NON-NLS-1$
+	}
+	
+	public void testMultipleDeclarators() throws Exception {
+		IASTTranslationUnit tu = parse("int r, s;", ParserLanguage.C); //$NON-NLS-1$
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			IASTDeclarator[] declarators = decl.getDeclarators();
+			assertEquals(2, declarators.length);
+			
+			IASTDeclarator dtor1 = declarators[0];
+			IASTDeclarator dtor2 = declarators[1];
+			
+			IASTName name1 = dtor1.getName();
+			IASTName name2 = dtor2.getName();
+			
+			assertEquals(name1.resolveBinding().getName(), "r"); //$NON-NLS-1$
+			assertEquals(name2.resolveBinding().getName(), "s"); //$NON-NLS-1$
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(name1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name1);
+			
+			decls = tu.getDeclarationsInAST(name2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name2);
+			
+			tu = validateCopy(tu);
+		}
+	}
+	
+	
+	public void testStructureTagScoping_1() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("struct A;             \n"); //$NON-NLS-1$
+		buffer.append("void f() {             \n"); //$NON-NLS-1$
+		buffer.append("   struct A;          \n"); //$NON-NLS-1$
+		buffer.append("   struct A * a;      \n"); //$NON-NLS-1$
+		buffer.append("}                     \n"); //$NON-NLS-1$
+		
+		IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.C);
+		
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			// struct A;
+			IASTSimpleDeclaration decl1 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			IASTElaboratedTypeSpecifier compTypeSpec = (IASTElaboratedTypeSpecifier) decl1
+			.getDeclSpecifier();
+			assertEquals(0, decl1.getDeclarators().length);
+			IASTName nameA1 = compTypeSpec.getName();
+			
+			// void f() {
+			IASTFunctionDefinition fndef = (IASTFunctionDefinition) tu
+			.getDeclarations()[1];
+			IASTCompoundStatement compoundStatement = (IASTCompoundStatement) fndef
+			.getBody();
+			assertEquals(2, compoundStatement.getStatements().length);
+			
+			// struct A;
+			IASTDeclarationStatement declStatement = (IASTDeclarationStatement) compoundStatement
+			.getStatements()[0];
+			IASTSimpleDeclaration decl2 = (IASTSimpleDeclaration) declStatement
+			.getDeclaration();
+			compTypeSpec = (IASTElaboratedTypeSpecifier) decl2.getDeclSpecifier();
+			assertEquals(0, decl2.getDeclarators().length);
+			IASTName nameA2 = compTypeSpec.getName();
+			
+			// struct A * a;
+			declStatement = (IASTDeclarationStatement) compoundStatement
+			.getStatements()[1];
+			IASTSimpleDeclaration decl3 = (IASTSimpleDeclaration) declStatement
+			.getDeclaration();
+			compTypeSpec = (IASTElaboratedTypeSpecifier) decl3.getDeclSpecifier();
+			IASTName nameA3 = compTypeSpec.getName();
+			IASTDeclarator dtor = decl3.getDeclarators()[0];
+			IASTName namea = dtor.getName();
+			assertEquals(1, dtor.getPointerOperators().length);
+			assertTrue(dtor.getPointerOperators()[0] instanceof ICASTPointer);
+			
+			// bindings
+			ICompositeType str1 = (ICompositeType) nameA1.resolveBinding();
+			ICompositeType str2 = (ICompositeType) nameA2.resolveBinding();
+			IVariable var = (IVariable) namea.resolveBinding();
+			IType str3pointer = var.getType();
+			assertTrue(str3pointer instanceof IPointerType);
+			ICompositeType str3 = (ICompositeType) ((IPointerType) str3pointer)
+			.getType();
+			ICompositeType str4 = (ICompositeType) nameA3.resolveBinding();
+			assertNotNull(str1);
+			assertNotNull(str2);
+			assertNotSame(str1, str2);
+			assertSame(str2, str3);
+			assertSame(str3, str4);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(nameA1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], nameA1);
+			
+			decls = tu.getDeclarationsInAST(fndef.getDeclarator().getName()
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], fndef.getDeclarator().getName());
+			
+			decls = tu.getDeclarationsInAST(nameA2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], nameA2);
+			
+			decls = tu.getDeclarationsInAST(nameA3.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], nameA2);
+			
+			decls = tu.getDeclarationsInAST(namea.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], namea);
+		
+			tu = validateCopy(tu);
+		}
+	}
+	
+	public void testStructureTagScoping_2() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("struct A;             \n"); //$NON-NLS-1$
+		buffer.append("void f() {             \n"); //$NON-NLS-1$
+		buffer.append("   struct A * a;      \n"); //$NON-NLS-1$
+		buffer.append("}                     \r\n"); //$NON-NLS-1$
+		
+		IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.C);
+		
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			// struct A;
+			IASTSimpleDeclaration decl1 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			IASTElaboratedTypeSpecifier compTypeSpec = (IASTElaboratedTypeSpecifier) decl1
+			.getDeclSpecifier();
+			assertEquals(0, decl1.getDeclarators().length);
+			IASTName nameA1 = compTypeSpec.getName();
+			
+			// void f() {
+			IASTFunctionDefinition fndef = (IASTFunctionDefinition) tu
+			.getDeclarations()[1];
+			IASTCompoundStatement compoundStatement = (IASTCompoundStatement) fndef
+			.getBody();
+			assertEquals(1, compoundStatement.getStatements().length);
+			
+			// struct A * a;
+			IASTDeclarationStatement declStatement = (IASTDeclarationStatement) compoundStatement
+			.getStatements()[0];
+			IASTSimpleDeclaration decl2 = (IASTSimpleDeclaration) declStatement
+			.getDeclaration();
+			compTypeSpec = (IASTElaboratedTypeSpecifier) decl2.getDeclSpecifier();
+			IASTName nameA2 = compTypeSpec.getName();
+			IASTDeclarator dtor = decl2.getDeclarators()[0];
+			IASTName namea = dtor.getName();
+			assertEquals(1, dtor.getPointerOperators().length);
+			assertTrue(dtor.getPointerOperators()[0] instanceof ICASTPointer);
+			
+			// bindings
+			ICompositeType str1 = (ICompositeType) nameA1.resolveBinding();
+			ICompositeType str2 = (ICompositeType) nameA2.resolveBinding();
+			IVariable var = (IVariable) namea.resolveBinding();
+			IPointerType str3pointer = (IPointerType) var.getType();
+			ICompositeType str3 = (ICompositeType) str3pointer.getType();
+			assertNotNull(str1);
+			assertSame(str1, str2);
+			assertSame(str2, str3);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(nameA1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], nameA1);
+			
+			decls = tu.getDeclarationsInAST(fndef.getDeclarator().getName()
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], fndef.getDeclarator().getName());
+			
+			decls = tu.getDeclarationsInAST(nameA2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], nameA1);
+			
+			decls = tu.getDeclarationsInAST(namea.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], namea);
+			
+			tu = validateCopy(tu);
+		}
+	}
+	
+	public void testStructureDef() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("struct A;                \r\n"); //$NON-NLS-1$
+		buffer.append("struct A * a;            \n"); //$NON-NLS-1$
+		buffer.append("struct A { int i; };     \n"); //$NON-NLS-1$
+		buffer.append("void f() {               \n"); //$NON-NLS-1$
+		buffer.append("   a->i;                 \n"); //$NON-NLS-1$
+		buffer.append("}                        \n"); //$NON-NLS-1$
+		
+		IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.C);
+		
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			// struct A;
+			IASTSimpleDeclaration decl1 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			IASTElaboratedTypeSpecifier elabTypeSpec = (IASTElaboratedTypeSpecifier) decl1
+			.getDeclSpecifier();
+			assertEquals(0, decl1.getDeclarators().length);
+			IASTName name_A1 = elabTypeSpec.getName();
+			
+			// struct A * a;
+			IASTSimpleDeclaration decl2 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[1];
+			elabTypeSpec = (IASTElaboratedTypeSpecifier) decl2.getDeclSpecifier();
+			IASTName name_A2 = elabTypeSpec.getName();
+			IASTDeclarator dtor = decl2.getDeclarators()[0];
+			IASTName name_a = dtor.getName();
+			assertEquals(1, dtor.getPointerOperators().length);
+			assertTrue(dtor.getPointerOperators()[0] instanceof ICASTPointer);
+			
+			// struct A {
+			IASTSimpleDeclaration decl3 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[2];
+			ICASTCompositeTypeSpecifier compTypeSpec = (ICASTCompositeTypeSpecifier) decl3
+			.getDeclSpecifier();
+			IASTName name_Adef = compTypeSpec.getName();
+			
+			// int i;
+			IASTSimpleDeclaration decl4 = (IASTSimpleDeclaration) compTypeSpec
+			.getMembers()[0];
+			dtor = decl4.getDeclarators()[0];
+			IASTName name_i = dtor.getName();
+			
+			// void f() {
+			IASTFunctionDefinition fndef = (IASTFunctionDefinition) tu
+			.getDeclarations()[3];
+			IASTCompoundStatement compoundStatement = (IASTCompoundStatement) fndef
+			.getBody();
+			assertEquals(1, compoundStatement.getStatements().length);
+			
+			// a->i;
+			IASTExpressionStatement exprstmt = (IASTExpressionStatement) compoundStatement
+			.getStatements()[0];
+			IASTFieldReference fieldref = (IASTFieldReference) exprstmt
+			.getExpression();
+			IASTIdExpression id_a = (IASTIdExpression) fieldref.getFieldOwner();
+			IASTName name_aref = id_a.getName();
+			IASTName name_iref = fieldref.getFieldName();
+			
+			// bindings
+			IVariable var_a1 = (IVariable) name_aref.resolveBinding();
+			IVariable var_i1 = (IVariable) name_iref.resolveBinding();
+			IPointerType structA_1pointer = (IPointerType) var_a1.getType();
+			ICompositeType structA_1 = (ICompositeType) structA_1pointer.getType();
+			ICompositeType structA_2 = (ICompositeType) name_A1.resolveBinding();
+			ICompositeType structA_3 = (ICompositeType) name_A2.resolveBinding();
+			ICompositeType structA_4 = (ICompositeType) name_Adef.resolveBinding();
+			
+			IVariable var_a2 = (IVariable) name_a.resolveBinding();
+			IVariable var_i2 = (IVariable) name_i.resolveBinding();
+			
+			assertSame(var_a1, var_a2);
+			assertSame(var_i1, var_i2);
+			assertSame(structA_1, structA_2);
+			assertSame(structA_2, structA_3);
+			assertSame(structA_3, structA_4);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(name_A1.resolveBinding());
+			assertEquals(decls.length, 2);
+			assertEquals(decls[0], name_A1);
+			assertEquals(decls[1], name_Adef);
+			
+			decls = tu.getDeclarationsInAST(name_A2.resolveBinding());
+			assertEquals(decls.length, 2);
+			assertEquals(decls[0], name_A1);
+			assertEquals(decls[1], name_Adef);
+			
+			decls = tu.getDeclarationsInAST(name_a.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_a);
+			
+			decls = tu.getDeclarationsInAST(name_Adef.resolveBinding());
+			assertEquals(decls.length, 2);
+			assertEquals(decls[0], name_A1);
+			assertEquals(decls[1], name_Adef);
+			
+			decls = tu.getDeclarationsInAST(name_i.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_i);
+			
+			decls = tu.getDeclarationsInAST(fndef.getDeclarator().getName()
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], fndef.getDeclarator().getName());
+			
+			decls = tu.getDeclarationsInAST(name_aref.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_a);
+			
+			decls = tu.getDeclarationsInAST(name_iref.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_i);
+			
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// struct x {};        
+	// void f(int x) {   
+	//    struct x i;      
+	// }  
+	public void testStructureNamespace() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration declaration1 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			IASTCompositeTypeSpecifier typeSpec = (IASTCompositeTypeSpecifier) declaration1
+			.getDeclSpecifier();
+			IASTName x_1 = typeSpec.getName();
+			
+			IASTFunctionDefinition fdef = (IASTFunctionDefinition) tu
+			.getDeclarations()[1];
+			assertTrue(fdef.getDeclarator() instanceof IASTStandardFunctionDeclarator);
+			IASTParameterDeclaration param = ((IASTStandardFunctionDeclarator) fdef
+					.getDeclarator()).getParameters()[0];
+			IASTName x_2 = param.getDeclarator().getName();
+			
+			IASTCompoundStatement compound = (IASTCompoundStatement) fdef.getBody();
+			IASTDeclarationStatement declStatement = (IASTDeclarationStatement) compound
+			.getStatements()[0];
+			IASTSimpleDeclaration declaration2 = (IASTSimpleDeclaration) declStatement
+			.getDeclaration();
+			IASTElaboratedTypeSpecifier elab = (IASTElaboratedTypeSpecifier) declaration2
+			.getDeclSpecifier();
+			IASTName x_3 = elab.getName();
+			
+			ICompositeType x1 = (ICompositeType) x_1.resolveBinding();
+			IVariable x2 = (IVariable) x_2.resolveBinding();
+			ICompositeType x3 = (ICompositeType) x_3.resolveBinding();
+			
+			assertNotNull(x1);
+			assertNotNull(x2);
+			assertSame(x1, x3);
+			assertNotSame(x2, x3);
+			
+			IASTDeclarator decl_i = declaration2.getDeclarators()[0];
+			decl_i.getName().resolveBinding(); // add i's binding to the scope
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(x_1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], x_1);
+			
+			decls = tu.getDeclarationsInAST(fdef.getDeclarator().getName()
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], fdef.getDeclarator().getName());
+			
+			decls = tu.getDeclarationsInAST(x_2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], x_2);
+			
+			decls = tu.getDeclarationsInAST(x_3.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], x_1);
+			
+			decls = tu.getDeclarationsInAST(declaration2.getDeclarators()[0].getName()
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], declaration2.getDeclarators()[0].getName());
+			
+			// assertNotNull(((ICScope) tu.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_TAG, new String("x").toCharArray()));
+			// //$NON-NLS-1$
+			// assertNotNull(((ICScope) tu.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_OTHER, new String("f").toCharArray()));
+			// //$NON-NLS-1$
+			// assertNotNull(((ICScope) compound.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_OTHER, new String("x").toCharArray()));
+			// //$NON-NLS-1$
+			// assertNotNull(((ICScope) compound.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_OTHER, new String("i").toCharArray()));
+			// //$NON-NLS-1$
+			// CVisitor.clearBindings(tu);
+			// assertNull(((ICScope) tu.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_TAG, new String("x").toCharArray()));
+			// //$NON-NLS-1$
+			// assertNull(((ICScope) tu.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_OTHER, new String("f").toCharArray()));
+			// //$NON-NLS-1$
+			// assertNull(((ICScope) compound.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_OTHER, new String("x").toCharArray()));
+			// //$NON-NLS-1$
+			// assertNull(((ICScope) compound.getScope()).getBinding(
+			// ICScope.NAMESPACE_TYPE_OTHER, new String("i").toCharArray()));
+			// //$NON-NLS-1$
+			
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// void f(int a);        
+	// void f(int b) {        
+	//    b;                   
+	// }     
+	public void testFunctionParameters() throws Exception {
+		final String code = getAboveComment();
+		IASTTranslationUnit tu = parse(code, ParserLanguage.C);
+		
+		assertTrue(tu.isFrozen());
+		// void f(
+		IASTSimpleDeclaration f_decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+		IASTStandardFunctionDeclarator dtor = (IASTStandardFunctionDeclarator) f_decl.getDeclarators()[0];
+		IASTName f_name1 = dtor.getName();
+		// int a);
+		IASTParameterDeclaration param1 = dtor.getParameters()[0];
+		IASTDeclarator paramDtor = param1.getDeclarator();
+		IASTName name_param1 = paramDtor.getName();
+
+		// void f(
+		IASTFunctionDefinition f_defn = (IASTFunctionDefinition) tu.getDeclarations()[1];
+		assertTrue(f_defn.getDeclarator() instanceof IASTStandardFunctionDeclarator);
+		dtor = (IASTStandardFunctionDeclarator) f_defn.getDeclarator();
+		IASTName f_name2 = dtor.getName();
+		// int b);
+		IASTParameterDeclaration param2 = dtor.getParameters()[0];
+		paramDtor = param2.getDeclarator();
+		IASTName name_param2 = paramDtor.getName();
+
+		// b;
+		IASTCompoundStatement compound = (IASTCompoundStatement) f_defn.getBody();
+		IASTExpressionStatement expStatement = (IASTExpressionStatement) compound.getStatements()[0];
+		IASTIdExpression idexp = (IASTIdExpression) expStatement.getExpression();
+		IASTName name_param3 = idexp.getName();
+
+		// bindings
+		IParameter param_1 = (IParameter) name_param3.resolveBinding();
+		IParameter param_2 = (IParameter) name_param2.resolveBinding();
+		IParameter param_3 = (IParameter) name_param1.resolveBinding();
+		IFunction f_1 = (IFunction) f_name1.resolveBinding();
+		IFunction f_2 = (IFunction) f_name2.resolveBinding();
+
+		assertNotNull(param_1);
+		assertNotNull(f_1);
+		assertSame(param_1, param_2);
+		assertSame(param_2, param_3);
+		assertSame(f_1, f_2);
+
+		tu = parse(code, ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		// void f(
+		f_decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+		dtor = (IASTStandardFunctionDeclarator) f_decl.getDeclarators()[0];
+		f_name1 = dtor.getName();
+		// int a);
+		param1 = dtor.getParameters()[0];
+		paramDtor = param1.getDeclarator();
+		name_param1 = paramDtor.getName();
+
+		// void f(
+		f_defn = (IASTFunctionDefinition) tu.getDeclarations()[1];
+		dtor = (IASTStandardFunctionDeclarator) f_defn.getDeclarator();
+		f_name2 = dtor.getName();
+		// int b);
+		param2 = dtor.getParameters()[0];
+		paramDtor = param2.getDeclarator();
+		name_param2 = paramDtor.getName();
+
+		// b;
+		compound = (IASTCompoundStatement) f_defn.getBody();
+		expStatement = (IASTExpressionStatement) compound.getStatements()[0];
+		idexp = (IASTIdExpression) expStatement.getExpression();
+		name_param3 = idexp.getName();
+
+		// bindings
+		param_1 = (IParameter) name_param1.resolveBinding();
+		param_2 = (IParameter) name_param3.resolveBinding();
+		param_3 = (IParameter) name_param2.resolveBinding();
+		f_1 = (IFunction) f_name2.resolveBinding();
+		f_2 = (IFunction) f_name1.resolveBinding();
+		assertNotNull(param_1);
+		assertNotNull(f_1);
+		assertSame(param_1, param_2);
+		assertSame(param_2, param_3);
+		assertSame(f_1, f_2);
+
+		// test tu.getDeclarationsInAST(IBinding)
+		IASTName[] decls = tu.getDeclarationsInAST(f_name1.resolveBinding());
+		assertEquals(decls.length, 2);
+		assertEquals(decls[0], f_name1);
+		assertEquals(decls[1], f_name2);
+
+		decls = tu.getDeclarationsInAST(name_param1.resolveBinding());
+		assertEquals(decls.length, 2);
+		assertEquals(decls[0], name_param1);
+		assertEquals(decls[1], name_param2);
+
+		decls = tu.getDeclarationsInAST(f_name2.resolveBinding());
+		assertEquals(decls.length, 2);
+		assertEquals(decls[0], f_name1);
+		assertEquals(decls[1], f_name2);
+
+		decls = tu.getDeclarationsInAST(name_param2.resolveBinding());
+		assertEquals(decls.length, 2);
+		assertEquals(decls[0], name_param1);
+		assertEquals(decls[1], name_param2);
+
+		tu = validateCopy(tu);
+	}
+	
+	// void f(int a, int b) { }
+	public void testSimpleFunction() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTFunctionDefinition fDef = (IASTFunctionDefinition) tu
+			.getDeclarations()[0];
+			assertTrue(fDef.getDeclarator() instanceof IASTStandardFunctionDeclarator);
+			IASTStandardFunctionDeclarator fDtor = (IASTStandardFunctionDeclarator) fDef
+			.getDeclarator();
+			IASTName fName = fDtor.getName();
+			
+			IASTParameterDeclaration a = fDtor.getParameters()[0];
+			IASTName name_a = a.getDeclarator().getName();
+			
+			IASTParameterDeclaration b = fDtor.getParameters()[1];
+			IASTName name_b = b.getDeclarator().getName();
+			
+			IFunction function = (IFunction) fName.resolveBinding();
+			IParameter param_a = (IParameter) name_a.resolveBinding();
+			IParameter param_b = (IParameter) name_b.resolveBinding();
+			
+			assertEquals("f", function.getName()); //$NON-NLS-1$
+			assertEquals("a", param_a.getName()); //$NON-NLS-1$
+			assertEquals("b", param_b.getName()); //$NON-NLS-1$
+			
+			IParameter[] params = function.getParameters();
+			assertEquals(2, params.length);
+			assertSame(params[0], param_a);
+			assertSame(params[1], param_b);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(fName.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], fName);
+			
+			decls = tu.getDeclarationsInAST(name_a.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_a);
+			
+			decls = tu.getDeclarationsInAST(name_b.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_b);
+			
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// void f();              
+	// void g() {             
+	//    f();                
+	// }                      
+	// void f() { }   
+	public void testSimpleFunctionCall() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			// void f();
+			IASTSimpleDeclaration fdecl = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			IASTStandardFunctionDeclarator fdtor = (IASTStandardFunctionDeclarator) fdecl
+			.getDeclarators()[0];
+			IASTName name_f = fdtor.getName();
+			
+			// void g() {
+			IASTFunctionDefinition gdef = (IASTFunctionDefinition) tu
+			.getDeclarations()[1];
+			
+			// f();
+			IASTCompoundStatement compound = (IASTCompoundStatement) gdef.getBody();
+			IASTExpressionStatement expStatement = (IASTExpressionStatement) compound
+			.getStatements()[0];
+			IASTFunctionCallExpression fcall = (IASTFunctionCallExpression) expStatement
+			.getExpression();
+			IASTIdExpression fcall_id = (IASTIdExpression) fcall
+			.getFunctionNameExpression();
+			IASTName name_fcall = fcall_id.getName();
+			assertNull(fcall.getParameterExpression());
+			
+			// void f() {}
+			IASTFunctionDefinition fdef = (IASTFunctionDefinition) tu
+			.getDeclarations()[2];
+			assertTrue(fdef.getDeclarator() instanceof IASTStandardFunctionDeclarator);
+			fdtor = (IASTStandardFunctionDeclarator) fdef.getDeclarator();
+			IASTName name_fdef = fdtor.getName();
+			
+			// bindings
+			IFunction function_1 = (IFunction) name_fcall.resolveBinding();
+			IFunction function_2 = (IFunction) name_f.resolveBinding();
+			IFunction function_3 = (IFunction) name_fdef.resolveBinding();
+			
+			assertNotNull(function_1);
+			assertSame(function_1, function_2);
+			assertSame(function_2, function_3);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(name_f.resolveBinding());
+			assertEquals(decls.length, 2);
+			assertEquals(decls[0], name_f);
+			assertEquals(decls[1], name_fdef);
+			
+			decls = tu.getDeclarationsInAST(gdef.getDeclarator().getName()
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], gdef.getDeclarator().getName());
+			
+			decls = tu.getDeclarationsInAST(name_fcall.resolveBinding());
+			assertEquals(decls.length, 2);
+			assertEquals(decls[0], name_f);
+			assertEquals(decls[1], name_fdef);
+			
+			decls = tu.getDeclarationsInAST(name_fdef.resolveBinding());
+			assertEquals(decls.length, 2);
+			assertEquals(decls[0], name_f);
+			assertEquals(decls[1], name_fdef);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// void f() {                         
+	//    for (int i = 0; i < 5; i++) {  
+	//       i;                           
+	//    }                               
+	// }  
+	public void testForLoop() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			// void f() {
+			IASTFunctionDefinition fdef = (IASTFunctionDefinition) tu
+			.getDeclarations()[0];
+			IASTCompoundStatement compound = (IASTCompoundStatement) fdef.getBody();
+			
+			// for(
+			IASTForStatement for_stmt = (IASTForStatement) compound.getStatements()[0];
+			// int i = 0;
+			
+			IASTSimpleDeclaration initDecl = (IASTSimpleDeclaration) ((IASTDeclarationStatement) for_stmt
+					.getInitializerStatement()).getDeclaration();
+			IASTDeclarator dtor = initDecl.getDeclarators()[0];
+			IASTName name_i = dtor.getName();
+			// i < 5;
+			IASTBinaryExpression exp = (IASTBinaryExpression) for_stmt
+			.getConditionExpression();
+			IASTIdExpression id_i = (IASTIdExpression) exp.getOperand1();
+			IASTName name_i2 = id_i.getName();
+			IASTLiteralExpression lit_5 = (IASTLiteralExpression) exp.getOperand2();
+			assertEquals(IASTLiteralExpression.lk_integer_constant, lit_5.getKind());
+			// i++) {
+			IASTUnaryExpression un = (IASTUnaryExpression) for_stmt
+			.getIterationExpression();
+			IASTIdExpression id_i2 = (IASTIdExpression) un.getOperand();
+			IASTName name_i3 = id_i2.getName();
+			assertEquals(IASTUnaryExpression.op_postFixIncr, un.getOperator());
+			
+			// i;
+			compound = (IASTCompoundStatement) for_stmt.getBody();
+			IASTExpressionStatement exprSt = (IASTExpressionStatement) compound
+			.getStatements()[0];
+			IASTIdExpression id_i3 = (IASTIdExpression) exprSt.getExpression();
+			IASTName name_i4 = id_i3.getName();
+			
+			// bindings
+			IVariable var_1 = (IVariable) name_i4.resolveBinding();
+			IVariable var_2 = (IVariable) name_i.resolveBinding();
+			IVariable var_3 = (IVariable) name_i2.resolveBinding();
+			IVariable var_4 = (IVariable) name_i3.resolveBinding();
+			
+			assertSame(var_1, var_2);
+			assertSame(var_2, var_3);
+			assertSame(var_3, var_4);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(fdef.getDeclarator().getName()
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], fdef.getDeclarator().getName());
+			
+			decls = tu.getDeclarationsInAST(name_i.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_i);
+			
+			decls = tu.getDeclarationsInAST(name_i2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_i);
+			
+			decls = tu.getDeclarationsInAST(name_i3.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_i);
+			
+			decls = tu.getDeclarationsInAST(name_i4.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_i);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// struct A { int x; };    
+	// void f() {               
+	//    ((struct A *) 1)->x; 
+	// }   
+	public void testExpressionFieldReference() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration simpleDecl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			IASTCompositeTypeSpecifier compType = (IASTCompositeTypeSpecifier) simpleDecl.getDeclSpecifier();
+			IASTSimpleDeclaration decl_x = (IASTSimpleDeclaration) compType.getMembers()[0];
+			IASTName name_x1 = decl_x.getDeclarators()[0].getName();
+			IASTFunctionDefinition fdef = (IASTFunctionDefinition) tu.getDeclarations()[1];
+			IASTCompoundStatement body = (IASTCompoundStatement) fdef.getBody();
+			IASTExpressionStatement expStatement = (IASTExpressionStatement) body.getStatements()[0];
+			IASTFieldReference fieldRef = (IASTFieldReference) expStatement.getExpression();
+			IASTName name_x2 = fieldRef.getFieldName();
+
+			IField x1 = (IField) name_x1.resolveBinding();
+			IField x2 = (IField) name_x2.resolveBinding();
+
+			assertNotNull(x1);
+			assertSame(x1, x2);
+
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(compType.getName().resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], compType.getName());
+
+			decls = tu.getDeclarationsInAST(name_x1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_x1);
+
+			decls = tu.getDeclarationsInAST(fdef.getDeclarator().getName().resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], fdef.getDeclarator().getName());
+
+			IASTCastExpression castExpression = (IASTCastExpression) ((IASTUnaryExpression) ((IASTFieldReference) expStatement.getExpression()).getFieldOwner())
+					.getOperand();
+			IASTElaboratedTypeSpecifier elaboratedTypeSpecifier = ((IASTElaboratedTypeSpecifier) castExpression.getTypeId().getDeclSpecifier());
+			decls = tu.getDeclarationsInAST(elaboratedTypeSpecifier.getName().resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], compType.getName());
+
+			decls = tu.getDeclarationsInAST(name_x2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_x1);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// void f() {          
+	//    while (1) {     
+	//       if (1)       
+	//          goto end;  
+	//    }                
+	//    end: ;           
+	// }                  
+	public void testLabels() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			CNameCollector collector = new CNameCollector();
+			tu.accept(collector);
+			
+			assertEquals(collector.size(), 3);
+			IFunction function = (IFunction) collector.getName(0).resolveBinding();
+			ILabel label_1 = (ILabel) collector.getName(1).resolveBinding();
+			ILabel label_2 = (ILabel) collector.getName(2).resolveBinding();
+			assertNotNull(function);
+			assertNotNull(label_1);
+			assertEquals(label_1, label_2);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(collector.getName(0)
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], collector.getName(0));
+			
+			decls = tu.getDeclarationsInAST(collector.getName(1).resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], collector.getName(2));
+			
+			decls = tu.getDeclarationsInAST(collector.getName(2).resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], collector.getName(2));
+			
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// typedef struct { } X;
+	// int f(X x);
+	public void testAnonStruct() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTSimpleDeclaration decl1 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			IASTSimpleDeclaration decl2 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[1];
+			IASTName name_X1 = decl1.getDeclarators()[0].getName();
+			IASTName name_f = decl2.getDeclarators()[0].getName();
+			IASTName name_X2 = ((IASTNamedTypeSpecifier) ((IASTStandardFunctionDeclarator) decl2
+					.getDeclarators()[0]).getParameters()[0].getDeclSpecifier())
+					.getName();
+			IASTName name_x = ((IASTStandardFunctionDeclarator) decl2
+					.getDeclarators()[0]).getParameters()[0].getDeclarator()
+					.getName();
+			
+			IASTName[] decls = tu.getDeclarationsInAST(name_X1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_X1);
+			
+			decls = tu.getDeclarationsInAST(name_f.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_f);
+			
+			decls = tu.getDeclarationsInAST(name_X2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_X1);
+			
+			decls = tu.getDeclarationsInAST(name_x.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_x);
+			
+			tu = validateCopy(tu);
+		}
+		
+	}
+	
+	public void testLongLong() throws ParserException {
+		IASTTranslationUnit tu = parse("long long x;\n", ParserLanguage.C); //$NON-NLS-1$
+		
+		// test tu.getDeclarationsInAST(IBinding)
+		IASTSimpleDeclaration decl1 = (IASTSimpleDeclaration) tu
+		.getDeclarations()[0];
+		IASTName name_x = decl1.getDeclarators()[0].getName();
+		
+		IASTName[] decls = tu.getDeclarationsInAST(name_x.resolveBinding());
+		assertEquals(decls.length, 1);
+		assertEquals(decls[0], name_x);
+	}
+	
+	// enum hue { red, blue, green };     
+	// enum hue col, *cp;                 
+	// void f() {                         
+	//    col = blue;                     
+	//    cp = &col;                      
+	//    if (*cp != red)                
+	//       return;                      
+	// }   
+	public void testEnumerations() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration decl1 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			assertEquals(decl1.getDeclarators().length, 0);
+			ICASTEnumerationSpecifier enumSpec = (ICASTEnumerationSpecifier) decl1
+			.getDeclSpecifier();
+			IASTEnumerator e1 = enumSpec.getEnumerators()[0];
+			IASTEnumerator e2 = enumSpec.getEnumerators()[1];
+			IASTEnumerator e3 = enumSpec.getEnumerators()[2];
+			IASTName name_hue = enumSpec.getName();
+			
+			IASTSimpleDeclaration decl2 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[1];
+			IASTDeclarator dtor = decl2.getDeclarators()[0];
+			IASTName name_col = dtor.getName();
+			dtor = decl2.getDeclarators()[1];
+			IASTName name_cp = dtor.getName();
+			IASTElaboratedTypeSpecifier spec = (IASTElaboratedTypeSpecifier) decl2
+			.getDeclSpecifier();
+			assertEquals(spec.getKind(), IASTElaboratedTypeSpecifier.k_enum);
+			IASTName name_hue2 = spec.getName();
+			
+			IASTFunctionDefinition fn = (IASTFunctionDefinition) tu
+			.getDeclarations()[2];
+			IASTCompoundStatement compound = (IASTCompoundStatement) fn.getBody();
+			IASTExpressionStatement expStatement1 = (IASTExpressionStatement) compound
+			.getStatements()[0];
+			IASTBinaryExpression exp = (IASTBinaryExpression) expStatement1
+			.getExpression();
+			assertEquals(exp.getOperator(), IASTBinaryExpression.op_assign);
+			IASTIdExpression id1 = (IASTIdExpression) exp.getOperand1();
+			IASTIdExpression id2 = (IASTIdExpression) exp.getOperand2();
+			IASTName r_col = id1.getName();
+			IASTName r_blue = id2.getName();
+			
+			IASTExpressionStatement expStatement2 = (IASTExpressionStatement) compound
+			.getStatements()[1];
+			exp = (IASTBinaryExpression) expStatement2.getExpression();
+			assertEquals(exp.getOperator(), IASTBinaryExpression.op_assign);
+			id1 = (IASTIdExpression) exp.getOperand1();
+			IASTUnaryExpression ue = (IASTUnaryExpression) exp.getOperand2();
+			id2 = (IASTIdExpression) ue.getOperand();
+			IASTName r_cp = id1.getName();
+			IASTName r_col2 = id2.getName();
+			
+			IASTIfStatement ifStatement = (IASTIfStatement) compound
+			.getStatements()[2];
+			exp = (IASTBinaryExpression) ifStatement.getConditionExpression();
+			ue = (IASTUnaryExpression) exp.getOperand1();
+			id1 = (IASTIdExpression) ue.getOperand();
+			id2 = (IASTIdExpression) exp.getOperand2();
+			
+			IASTName r_cp2 = id1.getName();
+			IASTName r_red = id2.getName();
+			
+			IEnumeration hue = (IEnumeration) name_hue.resolveBinding();
+			IEnumerator red = (IEnumerator) e1.getName().resolveBinding();
+			IEnumerator blue = (IEnumerator) e2.getName().resolveBinding();
+			IEnumerator green = (IEnumerator) e3.getName().resolveBinding();
+			IVariable col = (IVariable) name_col.resolveBinding();
+			IVariable cp = (IVariable) name_cp.resolveBinding();
+			IEnumeration hue_2 = (IEnumeration) name_hue2.resolveBinding();
+			IVariable col2 = (IVariable) r_col.resolveBinding();
+			IEnumerator blue2 = (IEnumerator) r_blue.resolveBinding();
+			IVariable cp2 = (IVariable) r_cp.resolveBinding();
+			IVariable col3 = (IVariable) r_col2.resolveBinding();
+			IVariable cp3 = (IVariable) r_cp2.resolveBinding();
+			IEnumerator red2 = (IEnumerator) r_red.resolveBinding();
+			
+			assertNotNull(hue);
+			assertSame(hue, hue_2);
+			assertNotNull(red);
+			assertNotNull(green);
+			assertNotNull(blue);
+			assertNotNull(col);
+			assertNotNull(cp);
+			assertSame(col, col2);
+			assertSame(blue, blue2);
+			assertSame(cp, cp2);
+			assertSame(col, col3);
+			assertSame(cp, cp3);
+			assertSame(red, red2);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(name_hue.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_hue);
+			
+			decls = tu.getDeclarationsInAST(e1.getName().resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], e1.getName());
+			
+			decls = tu.getDeclarationsInAST(e2.getName().resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], e2.getName());
+			
+			decls = tu.getDeclarationsInAST(e3.getName().resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], e3.getName());
+			
+			decls = tu.getDeclarationsInAST(name_hue2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_hue);
+			
+			decls = tu.getDeclarationsInAST(name_col.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_col);
+			
+			decls = tu.getDeclarationsInAST(name_cp.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_cp);
+			
+			decls = tu.getDeclarationsInAST(fn.getDeclarator().getName()
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], fn.getDeclarator().getName());
+			
+			decls = tu.getDeclarationsInAST(r_col.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_col);
+			
+			decls = tu.getDeclarationsInAST(r_blue.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], e2.getName());
+			
+			decls = tu.getDeclarationsInAST(r_cp.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_cp);
+			
+			decls = tu.getDeclarationsInAST(r_col2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_col);
+			
+			decls = tu.getDeclarationsInAST(r_cp2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_cp);
+			
+			decls = tu.getDeclarationsInAST(r_red.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], e1.getName());
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	public void testPointerToFunction() throws Exception {
+		IASTTranslationUnit tu = parse("int (*pfi)();", ParserLanguage.C); //$NON-NLS-1$
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			assertEquals(tu.getDeclarations().length, 1);
+			IASTSimpleDeclaration d = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			assertEquals(d.getDeclarators().length, 1);
+			IASTStandardFunctionDeclarator f = (IASTStandardFunctionDeclarator) d
+			.getDeclarators()[0];
+			assertEquals(f.getName().toString(), ""); //$NON-NLS-1$
+			assertNotNull(f.getNestedDeclarator());
+			assertEquals(f.getNestedDeclarator().getName().toString(), "pfi"); //$NON-NLS-1$
+			assertTrue(f.getPointerOperators().length == 0);
+			assertFalse(f.getNestedDeclarator().getPointerOperators().length == 0);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(f.getNestedDeclarator().getName()
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], f.getNestedDeclarator().getName());
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// int a;       
+	// char * b;    
+	// const int c; 
+	// const char * const d; 
+	// const char ** e; 
+	// const char * const * const volatile ** const * f; 
+	public void testBasicTypes() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			IVariable a = (IVariable) decl.getDeclarators()[0].getName()
+			.resolveBinding();
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[1];
+			IVariable b = (IVariable) decl.getDeclarators()[0].getName()
+			.resolveBinding();
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[2];
+			IVariable c = (IVariable) decl.getDeclarators()[0].getName()
+			.resolveBinding();
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[3];
+			IVariable d = (IVariable) decl.getDeclarators()[0].getName()
+			.resolveBinding();
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[4];
+			IVariable e = (IVariable) decl.getDeclarators()[0].getName()
+			.resolveBinding();
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[5];
+			IVariable f = (IVariable) decl.getDeclarators()[0].getName()
+			.resolveBinding();
+			
+			IType t_a_1 = a.getType();
+			assertTrue(t_a_1 instanceof IBasicType);
+			assertFalse(((IBasicType) t_a_1).isLong());
+			assertFalse(((IBasicType) t_a_1).isShort());
+			assertFalse(((IBasicType) t_a_1).isSigned());
+			assertFalse(((IBasicType) t_a_1).isUnsigned());
+			assertEquals(((IBasicType) t_a_1).getType(), IBasicType.t_int);
+			
+			IType t_b_1 = b.getType();
+			assertTrue(t_b_1 instanceof IPointerType);
+			IType t_b_2 = ((IPointerType) t_b_1).getType();
+			assertTrue(t_b_2 instanceof IBasicType);
+			assertEquals(((IBasicType) t_b_2).getType(), IBasicType.t_char);
+			
+			IType t_c_1 = c.getType();
+			assertTrue(t_c_1 instanceof IQualifierType);
+			assertTrue(((IQualifierType) t_c_1).isConst());
+			IType t_c_2 = ((IQualifierType) t_c_1).getType();
+			assertTrue(t_c_2 instanceof IBasicType);
+			assertEquals(((IBasicType) t_c_2).getType(), IBasicType.t_int);
+			
+			IType t_d_1 = d.getType();
+			assertTrue(t_d_1 instanceof IPointerType);
+			assertTrue(((IPointerType) t_d_1).isConst());
+			IType t_d_2 = ((IPointerType) t_d_1).getType();
+			assertTrue(t_d_2 instanceof IQualifierType);
+			assertTrue(((IQualifierType) t_d_2).isConst());
+			IType t_d_3 = ((IQualifierType) t_d_2).getType();
+			assertTrue(t_d_3 instanceof IBasicType);
+			assertEquals(((IBasicType) t_d_3).getType(), IBasicType.t_char);
+			
+			IType t_e_1 = e.getType();
+			assertTrue(t_e_1 instanceof IPointerType);
+			assertFalse(((IPointerType) t_e_1).isConst());
+			IType t_e_2 = ((IPointerType) t_e_1).getType();
+			assertTrue(t_e_2 instanceof IPointerType);
+			assertFalse(((IPointerType) t_e_2).isConst());
+			IType t_e_3 = ((IPointerType) t_e_2).getType();
+			assertTrue(t_e_3 instanceof IQualifierType);
+			assertTrue(((IQualifierType) t_e_3).isConst());
+			IType t_e_4 = ((IQualifierType) t_e_3).getType();
+			assertTrue(t_e_4 instanceof IBasicType);
+			assertEquals(((IBasicType) t_e_4).getType(), IBasicType.t_char);
+			
+			IType t_f_1 = f.getType();
+			assertTrue(t_f_1 instanceof IPointerType);
+			assertFalse(((IPointerType) t_f_1).isConst());
+			assertFalse(((IPointerType) t_f_1).isVolatile());
+			IType t_f_2 = ((IPointerType) t_f_1).getType();
+			assertTrue(t_f_2 instanceof IPointerType);
+			assertTrue(((IPointerType) t_f_2).isConst());
+			assertFalse(((IPointerType) t_f_2).isVolatile());
+			IType t_f_3 = ((IPointerType) t_f_2).getType();
+			assertTrue(t_f_3 instanceof IPointerType);
+			assertFalse(((IPointerType) t_f_3).isConst());
+			assertFalse(((IPointerType) t_f_3).isVolatile());
+			IType t_f_4 = ((IPointerType) t_f_3).getType();
+			assertTrue(t_f_4 instanceof IPointerType);
+			assertTrue(((IPointerType) t_f_4).isConst());
+			assertTrue(((IPointerType) t_f_4).isVolatile());
+			IType t_f_5 = ((IPointerType) t_f_4).getType();
+			assertTrue(t_f_5 instanceof IPointerType);
+			assertTrue(((IPointerType) t_f_5).isConst());
+			assertFalse(((IPointerType) t_f_5).isVolatile());
+			IType t_f_6 = ((IPointerType) t_f_5).getType();
+			assertTrue(t_f_6 instanceof IQualifierType);
+			assertTrue(((IQualifierType) t_f_6).isConst());
+			IType t_f_7 = ((IQualifierType) t_f_6).getType();
+			assertTrue(t_f_7 instanceof IBasicType);
+			assertEquals(((IBasicType) t_f_7).getType(), IBasicType.t_char);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// int plainInt = 7;
+	// signed int signedInt = -2;
+	// unsigned int unsignedInt = 99;
+	// noSpec= 12;
+	public void testBug270275_int_is_equivalent_to_signed_int() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		IASTDeclaration[] declarations = tu.getDeclarations();
+		IType plainInt = ((IVariable)((IASTSimpleDeclaration)declarations[0]).getDeclarators()[0].getName().resolveBinding()).getType();
+		IType signedInt = ((IVariable)((IASTSimpleDeclaration)declarations[1]).getDeclarators()[0].getName().resolveBinding()).getType();
+		IType unsignedInt = ((IVariable)((IASTSimpleDeclaration)declarations[2]).getDeclarators()[0].getName().resolveBinding()).getType();
+		IType noSpec = ((IVariable)((IASTSimpleDeclaration)declarations[3]).getDeclarators()[0].getName().resolveBinding()).getType();
+		assertTrue(plainInt.isSameType(signedInt));
+		assertFalse(plainInt.isSameType(unsignedInt));
+		assertFalse(signedInt.isSameType(unsignedInt));
+		assertTrue(plainInt.isSameType(noSpec));
+	}
+	
+	// struct A {} a1;              
+	// typedef struct A * AP;       
+	// struct A * const a2;         
+	// AP a3;   
+	public void testCompositeTypes() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			IASTCompositeTypeSpecifier compSpec = (IASTCompositeTypeSpecifier) decl
+			.getDeclSpecifier();
+			ICompositeType A = (ICompositeType) compSpec.getName().resolveBinding();
+			IASTName name_a1 = decl.getDeclarators()[0].getName();
+			IVariable a1 = (IVariable) decl.getDeclarators()[0].getName()
+			.resolveBinding();
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[1];
+			IASTName name_A2 = ((IASTElaboratedTypeSpecifier) decl
+					.getDeclSpecifier()).getName();
+			IASTName name_AP = decl.getDeclarators()[0].getName();
+			ITypedef AP = (ITypedef) decl.getDeclarators()[0].getName()
+			.resolveBinding();
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[2];
+			IASTName name_A3 = ((IASTElaboratedTypeSpecifier) decl
+					.getDeclSpecifier()).getName();
+			IVariable a2 = (IVariable) decl.getDeclarators()[0].getName()
+			.resolveBinding();
+			IASTName name_a2 = decl.getDeclarators()[0].getName();
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[3];
+			IVariable a3 = (IVariable) decl.getDeclarators()[0].getName()
+			.resolveBinding();
+			IASTName name_a3 = decl.getDeclarators()[0].getName();
+			IASTName name_AP2 = ((IASTNamedTypeSpecifier) decl.getDeclSpecifier())
+			.getName();
+			
+			IType t_a1 = a1.getType();
+			assertSame(t_a1, A);
+			
+			IType t_a2 = a2.getType();
+			assertTrue(t_a2 instanceof IPointerType);
+			assertTrue(((IPointerType) t_a2).isConst());
+			assertSame(((IPointerType) t_a2).getType(), A);
+			
+			IType t_a3 = a3.getType();
+			assertSame(t_a3, AP);
+			IType t_AP = AP.getType();
+			assertTrue(t_AP instanceof IPointerType);
+			assertSame(((IPointerType) t_AP).getType(), A);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(compSpec.getName()
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], compSpec.getName());
+			
+			decls = tu.getDeclarationsInAST(name_a1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_a1);
+			
+			decls = tu.getDeclarationsInAST(name_A2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], compSpec.getName());
+			
+			decls = tu.getDeclarationsInAST(name_AP.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_AP);
+			
+			decls = tu.getDeclarationsInAST(name_A3.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], compSpec.getName());
+			
+			decls = tu.getDeclarationsInAST(name_a2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_a2);
+			
+			decls = tu.getDeclarationsInAST(name_AP2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_AP);
+			
+			decls = tu.getDeclarationsInAST(name_a3.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_a3);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// int a[restrict];       
+	// char * b[][];    
+	// const char * const c[][][]; 
+	// char* d[const][];
+	public void testArrayTypes() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			IASTName name_a = decl.getDeclarators()[0].getName();
+			IVariable a = (IVariable) decl.getDeclarators()[0].getName().resolveBinding();
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[1];
+			IASTName name_b = decl.getDeclarators()[0].getName();
+			IVariable b = (IVariable) decl.getDeclarators()[0].getName().resolveBinding();
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[2];
+			IASTName name_c = decl.getDeclarators()[0].getName();
+			IVariable c = (IVariable) decl.getDeclarators()[0].getName().resolveBinding();
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[3];
+			IASTName name_d = decl.getDeclarators()[0].getName();
+			IVariable d = (IVariable) decl.getDeclarators()[0].getName().resolveBinding();
+			
+			IType t_a_1 = a.getType();
+			assertTrue(t_a_1 instanceof ICArrayType);
+			assertTrue(((ICArrayType) t_a_1).isRestrict());
+			IType t_a_2 = ((IArrayType) t_a_1).getType();
+			assertTrue(t_a_2 instanceof IBasicType);
+			assertEquals(((IBasicType) t_a_2).getType(), IBasicType.t_int);
+			
+			IType t_b_1 = b.getType();
+			assertTrue(t_b_1 instanceof IArrayType);
+			IType t_b_2 = ((IArrayType) t_b_1).getType();
+			assertTrue(t_b_2 instanceof IArrayType);
+			IType t_b_3 = ((IArrayType) t_b_2).getType();
+			assertTrue(t_b_3 instanceof IPointerType);
+			IType t_b_4 = ((IPointerType) t_b_3).getType();
+			assertTrue(t_b_4 instanceof IBasicType);
+			assertEquals(((IBasicType) t_b_4).getType(), IBasicType.t_char);
+			
+			t_b_1 = d.getType();
+			assertTrue(t_b_1 instanceof IArrayType);
+			t_b_2 = ((IArrayType) t_b_1).getType();
+			assertTrue(t_b_2 instanceof IArrayType);
+			t_b_3 = ((IArrayType) t_b_2).getType();
+			assertTrue(t_b_3 instanceof IPointerType);
+			t_b_4 = ((IPointerType) t_b_3).getType();
+			assertTrue(t_b_4 instanceof IBasicType);
+			assertEquals(((IBasicType) t_b_4).getType(), IBasicType.t_char);
+	
+			IType t_c_1 = c.getType();
+			assertTrue(t_c_1 instanceof IArrayType);
+			IType t_c_2 = ((IArrayType) t_c_1).getType();
+			assertTrue(t_c_2 instanceof IArrayType);
+			IType t_c_3 = ((IArrayType) t_c_2).getType();
+			assertTrue(t_c_3 instanceof IArrayType);
+			IType t_c_4 = ((IArrayType) t_c_3).getType();
+			assertTrue(t_c_4 instanceof IPointerType);
+			assertTrue(((IPointerType) t_c_4).isConst());
+			IType t_c_5 = ((IPointerType) t_c_4).getType();
+			assertTrue(t_c_5 instanceof IQualifierType);
+			assertTrue(((IQualifierType) t_c_5).isConst());
+			IType t_c_6 = ((IQualifierType) t_c_5).getType();
+			assertTrue(t_c_6 instanceof IBasicType);
+			assertEquals(((IBasicType) t_c_6).getType(), IBasicType.t_char);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(name_a.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_a);
+			
+			decls = tu.getDeclarationsInAST(name_b.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_b);
+			
+			decls = tu.getDeclarationsInAST(name_c.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_c);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// struct A;                           
+	// int * f(int i, char c);           
+	// void (*g) (struct A *);         
+	// void (* (*h)(struct A**)) (int d); 
+	public void testFunctionTypes() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			IASTElaboratedTypeSpecifier elabSpec = (IASTElaboratedTypeSpecifier) decl
+			.getDeclSpecifier();
+			ICompositeType A = (ICompositeType) elabSpec.getName().resolveBinding();
+			IASTName name_A1 = elabSpec.getName();
+			assertTrue(name_A1.isDeclaration());
+			
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[1];
+			IFunction f = (IFunction) decl.getDeclarators()[0].getName()
+			.resolveBinding();
+			IASTName name_f = decl.getDeclarators()[0].getName();
+			IASTName name_i = ((IASTStandardFunctionDeclarator) decl
+					.getDeclarators()[0]).getParameters()[0].getDeclarator()
+					.getName();
+			IASTName name_c = ((IASTStandardFunctionDeclarator) decl
+					.getDeclarators()[0]).getParameters()[1].getDeclarator()
+					.getName();
+			
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[2];
+			IVariable g = (IVariable) decl.getDeclarators()[0]
+			                                                .getNestedDeclarator().getName().resolveBinding();
+			IASTName name_g = decl.getDeclarators()[0].getNestedDeclarator()
+			.getName();
+			IASTName name_A2 = ((IASTElaboratedTypeSpecifier) ((IASTStandardFunctionDeclarator) decl
+					.getDeclarators()[0]).getParameters()[0].getDeclSpecifier())
+					.getName();
+			
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[3];
+			IVariable h = (IVariable) decl.getDeclarators()[0]
+			                                                .getNestedDeclarator().getNestedDeclarator().getName()
+			                                                .resolveBinding();
+			IASTName name_h = decl.getDeclarators()[0].getNestedDeclarator()
+			.getNestedDeclarator().getName();
+			IASTName name_A3 = ((IASTElaboratedTypeSpecifier) ((IASTStandardFunctionDeclarator) decl
+					.getDeclarators()[0].getNestedDeclarator()).getParameters()[0]
+					                                                            .getDeclSpecifier()).getName();
+			IASTName name_d = ((IASTStandardFunctionDeclarator) decl
+					.getDeclarators()[0]).getParameters()[0].getDeclarator()
+					.getName();
+			
+			IFunctionType t_f = f.getType();
+			IType t_f_return = t_f.getReturnType();
+			assertTrue(t_f_return instanceof IPointerType);
+			assertTrue(((IPointerType) t_f_return).getType() instanceof IBasicType);
+			IType[] t_f_params = t_f.getParameterTypes();
+			assertEquals(t_f_params.length, 2);
+			assertTrue(t_f_params[0] instanceof IBasicType);
+			assertTrue(t_f_params[1] instanceof IBasicType);
+			
+			// g is a pointer to a function that returns void and has 1 parameter
+			// struct A *
+			IType t_g = g.getType();
+			assertTrue(t_g instanceof IPointerType);
+			assertTrue(((IPointerType) t_g).getType() instanceof IFunctionType);
+			IFunctionType t_g_func = (IFunctionType) ((IPointerType) t_g).getType();
+			IType t_g_func_return = t_g_func.getReturnType();
+			assertTrue(t_g_func_return instanceof IBasicType);
+			IType[] t_g_func_params = t_g_func.getParameterTypes();
+			assertEquals(t_g_func_params.length, 1);
+			IType t_g_func_p1 = t_g_func_params[0];
+			assertTrue(t_g_func_p1 instanceof IPointerType);
+			assertSame(((IPointerType) t_g_func_p1).getType(), A);
+			
+			// h is a pointer to a function that returns a pointer to a function
+			// the returned pointer to function returns void and takes 1 parameter
+			// int
+			// the *h function takes 1 parameter struct A**
+			IType t_h = h.getType();
+			assertTrue(t_h instanceof IPointerType);
+			assertTrue(((IPointerType) t_h).getType() instanceof IFunctionType);
+			IFunctionType t_h_func = (IFunctionType) ((IPointerType) t_h).getType();
+			IType t_h_func_return = t_h_func.getReturnType();
+			IType[] t_h_func_params = t_h_func.getParameterTypes();
+			assertEquals(t_h_func_params.length, 1);
+			IType t_h_func_p1 = t_h_func_params[0];
+			assertTrue(t_h_func_p1 instanceof IPointerType);
+			assertTrue(((IPointerType) t_h_func_p1).getType() instanceof IPointerType);
+			assertSame(((IPointerType) ((IPointerType) t_h_func_p1).getType())
+					.getType(), A);
+			
+			assertTrue(t_h_func_return instanceof IPointerType);
+			IFunctionType h_return = (IFunctionType) ((IPointerType) t_h_func_return)
+			.getType();
+			IType h_r = h_return.getReturnType();
+			IType[] h_ps = h_return.getParameterTypes();
+			assertTrue(h_r instanceof IBasicType);
+			assertEquals(h_ps.length, 1);
+			assertTrue(h_ps[0] instanceof IBasicType);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(name_A1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_A1);
+			
+			decls = tu.getDeclarationsInAST(name_f.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_f);
+			
+			decls = tu.getDeclarationsInAST(name_i.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_i);
+			
+			decls = tu.getDeclarationsInAST(name_c.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_c);
+			
+			decls = tu.getDeclarationsInAST(name_g.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_g);
+			
+			decls = tu.getDeclarationsInAST(name_A2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_A1);
+			
+			decls = tu.getDeclarationsInAST(name_h.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_h);
+			
+			decls = tu.getDeclarationsInAST(name_A3.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_A1);
+			
+			assertNull("Expected null, got "+name_d.resolveBinding(), name_d.resolveBinding());
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// typedef struct {
+	//  int x;
+	//  int y;
+	// } Coord;
+	// typedef struct {
+	// Coord *pos;
+	// int width;
+	// } Point;
+	// int main(int argc, char *argv[])
+	// {
+	// Coord xy = {.y = 10, .x = 11};
+	// Point point = {.width = 100, .pos = &xy};
+	// }
+	public void testDesignatedInitializers() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			assertNotNull(tu);
+			IASTDeclaration[] declarations = tu.getDeclarations();
+			IASTName name_Coord = ((IASTSimpleDeclaration) declarations[0])
+			.getDeclarators()[0].getName();
+			IASTName name_x = ((IASTSimpleDeclaration) ((IASTCompositeTypeSpecifier) ((IASTSimpleDeclaration) declarations[0])
+					.getDeclSpecifier()).getMembers()[0]).getDeclarators()[0]
+					                                                       .getName();
+			IASTName name_y = ((IASTSimpleDeclaration) ((IASTCompositeTypeSpecifier) ((IASTSimpleDeclaration) declarations[0])
+					.getDeclSpecifier()).getMembers()[1]).getDeclarators()[0]
+					                                                       .getName();
+			IASTName name_Point = ((IASTSimpleDeclaration) declarations[1])
+			.getDeclarators()[0].getName();
+			IASTName name_pos = ((IASTSimpleDeclaration) ((IASTCompositeTypeSpecifier) ((IASTSimpleDeclaration) declarations[1])
+					.getDeclSpecifier()).getMembers()[0]).getDeclarators()[0]
+					                                                       .getName();
+			IASTName name_width = ((IASTSimpleDeclaration) ((IASTCompositeTypeSpecifier) ((IASTSimpleDeclaration) declarations[1])
+					.getDeclSpecifier()).getMembers()[1]).getDeclarators()[0]
+					                                                       .getName();
+			IASTFunctionDefinition main = (IASTFunctionDefinition) declarations[2];
+			IASTStatement[] statements = ((IASTCompoundStatement) main.getBody())
+			.getStatements();
+			
+			IASTSimpleDeclaration xy = (IASTSimpleDeclaration) ((IASTDeclarationStatement) statements[0])
+			.getDeclaration();
+			IASTName name_Coord2 = ((IASTNamedTypeSpecifier) xy.getDeclSpecifier())
+			.getName();
+			IASTName name_xy = xy.getDeclarators()[0].getName();
+			IASTDeclarator declarator_xy = xy.getDeclarators()[0];
+			IASTInitializer[] initializers1 = ((IASTInitializerList) declarator_xy
+					.getInitializer()).getInitializers();
+			IASTName name_y2 = ((ICASTFieldDesignator) ((ICASTDesignatedInitializer) initializers1[0])
+					.getDesignators()[0]).getName();
+			
+			// test bug 87649
+			assertEquals(((ASTNode) (ICASTDesignatedInitializer) initializers1[0])
+					.getLength(), 7);
+			
+			IASTName name_x2 = ((ICASTFieldDesignator) ((ICASTDesignatedInitializer) initializers1[1])
+					.getDesignators()[0]).getName();
+			
+			IASTSimpleDeclaration point = (IASTSimpleDeclaration) ((IASTDeclarationStatement) statements[1])
+			.getDeclaration();
+			IASTName name_Point2 = ((IASTNamedTypeSpecifier) point
+					.getDeclSpecifier()).getName();
+			IASTName name_point = point.getDeclarators()[0].getName();
+			IASTDeclarator declarator_point = point.getDeclarators()[0];
+			IASTInitializer[] initializers2 = ((IASTInitializerList) declarator_point
+					.getInitializer()).getInitializers();
+			IASTName name_width2 = ((ICASTFieldDesignator) ((ICASTDesignatedInitializer) initializers2[0])
+					.getDesignators()[0]).getName();
+			IASTName name_pos2 = ((ICASTFieldDesignator) ((ICASTDesignatedInitializer) initializers2[1])
+					.getDesignators()[0]).getName();
+			IASTName name_xy2 = ((IASTIdExpression) ((IASTUnaryExpression) ((IASTInitializerExpression) ((ICASTDesignatedInitializer) initializers2[1])
+					.getOperandInitializer()).getExpression()).getOperand())
+					.getName();
+			
+			for (int j = 0; j < 2; ++j) {
+				ICASTDesignatedInitializer designatedInitializer = (ICASTDesignatedInitializer) initializers1[j];
+				assertEquals(designatedInitializer.getDesignators().length, 1);
+				ICASTFieldDesignator fieldDesignator = (ICASTFieldDesignator) designatedInitializer.getDesignators()[0];
+				assertNotNull(fieldDesignator.getName().toString());
+			}
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(name_Coord2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_Coord);
+			
+			decls = tu.getDeclarationsInAST(name_xy.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_xy);
+			
+			decls = tu.getDeclarationsInAST(name_y2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_y);
+			
+			decls = tu.getDeclarationsInAST(name_x2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_x);
+			
+			decls = tu.getDeclarationsInAST(name_Point2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_Point);
+			
+			decls = tu.getDeclarationsInAST(name_point.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_point);
+			
+			decls = tu.getDeclarationsInAST(name_width2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_width);
+			
+			decls = tu.getDeclarationsInAST(name_pos2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_pos);
+			
+			decls = tu.getDeclarationsInAST(name_xy2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_xy);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// struct S {
+	//  int a;
+	//  int b;
+	// } s;
+	// int f() {
+	// struct S s = {.a=1,.b=2};
+	// }
+	public void testMoregetDeclarationsInAST1() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration S_decl = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			IASTFunctionDefinition f_def = (IASTFunctionDefinition) tu
+			.getDeclarations()[1];
+			
+			IASTName a1 = ((IASTSimpleDeclaration) ((IASTCompositeTypeSpecifier) S_decl
+					.getDeclSpecifier()).getMembers()[0]).getDeclarators()[0]
+					                                                       .getName();
+			IASTName b1 = ((IASTSimpleDeclaration) ((IASTCompositeTypeSpecifier) S_decl
+					.getDeclSpecifier()).getMembers()[1]).getDeclarators()[0]
+					                                                       .getName();
+			IASTName a2 = ((ICASTFieldDesignator) ((ICASTDesignatedInitializer) ((IASTInitializerList) ((IASTSimpleDeclaration) ((IASTDeclarationStatement) ((IASTCompoundStatement) f_def
+					.getBody()).getStatements()[0]).getDeclaration())
+					.getDeclarators()[0].getInitializer()).getInitializers()[0])
+					.getDesignators()[0]).getName();
+			IASTName b2 = ((ICASTFieldDesignator) ((ICASTDesignatedInitializer) ((IASTInitializerList) ((IASTSimpleDeclaration) ((IASTDeclarationStatement) ((IASTCompoundStatement) f_def
+					.getBody()).getStatements()[0]).getDeclaration())
+					.getDeclarators()[0].getInitializer()).getInitializers()[1])
+					.getDesignators()[0]).getName();
+			
+			assertEquals(a1.resolveBinding(), a2.resolveBinding());
+			assertEquals(b1.resolveBinding(), b2.resolveBinding());
+			
+			IASTName[] decls = tu.getDeclarationsInAST(a1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(a1, decls[0]);
+			
+			decls = tu.getDeclarationsInAST(b1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(b1, decls[0]);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	//  struct S { 
+	//  int a; 
+	//  int b; 
+	// } s = {.a=1,.b=2};
+	public void testMoregetDeclarationsInAST2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration S_decl = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			
+			IASTName a1 = ((IASTSimpleDeclaration) ((IASTCompositeTypeSpecifier) S_decl
+					.getDeclSpecifier()).getMembers()[0]).getDeclarators()[0]
+					                                                       .getName();
+			IASTName b1 = ((IASTSimpleDeclaration) ((IASTCompositeTypeSpecifier) S_decl
+					.getDeclSpecifier()).getMembers()[1]).getDeclarators()[0]
+					                                                       .getName();
+			IASTName a2 = ((ICASTFieldDesignator) ((ICASTDesignatedInitializer) ((IASTInitializerList) S_decl
+					.getDeclarators()[0].getInitializer()).getInitializers()[0])
+					.getDesignators()[0]).getName();
+			IASTName b2 = ((ICASTFieldDesignator) ((ICASTDesignatedInitializer) ((IASTInitializerList) S_decl
+					.getDeclarators()[0].getInitializer()).getInitializers()[1])
+					.getDesignators()[0]).getName();
+			
+			assertEquals(a1.resolveBinding(), a2.resolveBinding());
+			assertEquals(b1.resolveBinding(), b2.resolveBinding());
+			
+			IASTName[] decls = tu.getDeclarationsInAST(a1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(a1, decls[0]);
+			
+			decls = tu.getDeclarationsInAST(b1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(b1, decls[0]);
+			
+			tu = validateCopy(tu);
+		}
+	}
+	
+	//  typedef struct S { 
+	//  int a; 
+	//  int b; 
+	// } s;
+	// typedef s t;
+	// typedef t y;
+	// y x = {.a=1,.b=2};
+	public void testMoregetDeclarationsInAST3() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration S_decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			IASTSimpleDeclaration x_decl = (IASTSimpleDeclaration) tu.getDeclarations()[3];
+			
+			IASTName a1 = ((IASTSimpleDeclaration) ((IASTCompositeTypeSpecifier) S_decl
+					.getDeclSpecifier()).getMembers()[0]).getDeclarators()[0]
+					                                                       .getName();
+			IASTName b1 = ((IASTSimpleDeclaration) ((IASTCompositeTypeSpecifier) S_decl
+					.getDeclSpecifier()).getMembers()[1]).getDeclarators()[0]
+					                                                       .getName();
+			IASTName a2 = ((ICASTFieldDesignator) ((ICASTDesignatedInitializer) ((IASTInitializerList) x_decl
+					.getDeclarators()[0].getInitializer()).getInitializers()[0])
+					.getDesignators()[0]).getName();
+			IASTName b2 = ((ICASTFieldDesignator) ((ICASTDesignatedInitializer) ((IASTInitializerList) x_decl
+					.getDeclarators()[0].getInitializer()).getInitializers()[1])
+					.getDesignators()[0]).getName();
+			
+			assertEquals(a1.resolveBinding(), a2.resolveBinding());
+			assertEquals(b1.resolveBinding(), b2.resolveBinding());
+			
+			IASTName[] decls = tu.getDeclarationsInAST(a1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(a1, decls[0]);
+			
+			decls = tu.getDeclarationsInAST(b1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(b1, decls[0]);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	public void testFnReturningPtrToFn() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"void (* f(int))() {}", ParserLanguage.C); //$NON-NLS-1$
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTFunctionDefinition def = (IASTFunctionDefinition) tu.getDeclarations()[0];
+			final IASTName fname = def.getDeclarator().getName();
+			IFunction f = (IFunction) fname.resolveBinding();
+			
+			IFunctionType ft = f.getType();
+			assertTrue(ft.getReturnType() instanceof IPointerType);
+			assertTrue(((IPointerType) ft.getReturnType()).getType() instanceof IFunctionType);
+			assertEquals(ft.getParameterTypes().length, 1);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(f);
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], fname);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// test C99: 6.7.5.3-7 A declaration of a parameter as ''array of type''
+	// shall be adjusted to ''qualified pointer to
+	// type'', where the type qualifiers (if any) are those specified within the
+	// [ and ] of the
+	// array type derivation.
+	public void testArrayTypeToQualifiedPointerTypeParm() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"void f(int parm[const 3]);", ParserLanguage.C); //$NON-NLS-1$
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration def = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			IFunction f = (IFunction) def.getDeclarators()[0].getName().resolveBinding();
+			
+			IFunctionType ft = f.getType();
+			assertTrue(ft.getParameterTypes()[0] instanceof IPointerType);
+			assertTrue(((IPointerType) ft.getParameterTypes()[0]).isConst());
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName name_parm = ((IASTStandardFunctionDeclarator) def
+					.getDeclarators()[0]).getParameters()[0].getDeclarator()
+					.getName();
+			IASTName[] decls = tu.getDeclarationsInAST(name_parm.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_parm);
+
+			tu = validateCopy(tu);
+		}
+	}
+
+	//	void func(int** p);
+	//
+	//	void test(int a[]) {
+	//	  func(&a);
+	//	}
+	public void testArrayPointer_261417() throws Exception {
+    	String code= getAboveComment();
+   		BindingAssertionHelper baC= new BindingAssertionHelper(code, false);
+   		baC.assertNonProblem("func(&a)", 4, IFunction.class);
+   		BindingAssertionHelper baCpp= new BindingAssertionHelper(code, true);
+   		baCpp.assertNonProblem("func(&a)", 4, ICPPFunction.class);
+	}
+
+	// int f() {}
+	// int *f2() {}
+	// int (* f3())() {}
+	public void testFunctionDefTypes() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C); 
+		
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTFunctionDefinition def1 = (IASTFunctionDefinition) tu
+			.getDeclarations()[0];
+			IFunction f = (IFunction) def1.getDeclarator().getName()
+			.resolveBinding();
+			IASTFunctionDefinition def2 = (IASTFunctionDefinition) tu
+			.getDeclarations()[1];
+			IFunction f2 = (IFunction) def2.getDeclarator().getName()
+			.resolveBinding();
+			IASTFunctionDefinition def3 = (IASTFunctionDefinition) tu
+			.getDeclarations()[2];
+			IFunction f3 = (IFunction) def3.getDeclarator().getName()
+			.resolveBinding();
+			
+			IFunctionType ft = f.getType();
+			IFunctionType ft2 = f2.getType();
+			IFunctionType ft3 = f3.getType();
+			
+			assertTrue(ft.getReturnType() instanceof IBasicType);
+			assertTrue(ft2.getReturnType() instanceof IPointerType);
+			assertTrue(((IPointerType) ft2.getReturnType()).getType() instanceof IBasicType);
+			assertTrue(ft3.getReturnType() instanceof IPointerType);
+			assertTrue(((IPointerType) ft3.getReturnType()).getType() instanceof IFunctionType);
+			assertTrue(((IFunctionType) ((IPointerType) ft3.getReturnType())
+					.getType()).getReturnType() instanceof IBasicType);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu.getDeclarationsInAST(def1.getDeclarator().getName()
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], def1.getDeclarator().getName());
+			
+			decls = tu.getDeclarationsInAST(def2.getDeclarator().getName()
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], def2.getDeclarator().getName());
+			
+			decls = tu.getDeclarationsInAST(def3.getDeclarator().getName().resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], def3.getDeclarator().getName());
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// any parameter to type function returning T is adjusted to be pointer to
+	// function returning T
+	public void testParmToFunction() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"int f(int g(void)) { return g();}", ParserLanguage.C); //$NON-NLS-1$
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTFunctionDefinition def = (IASTFunctionDefinition) tu
+			.getDeclarations()[0];
+			IFunction f = (IFunction) def.getDeclarator().getName()
+			.resolveBinding();
+			
+			IType ft = ((CFunction) f).getType();
+			assertTrue(ft instanceof IFunctionType);
+			IType gt_1 = ((IFunctionType) ft).getParameterTypes()[0];
+			assertTrue(gt_1 instanceof IPointerType);
+			IType gt_2 = ((IPointerType) gt_1).getType();
+			assertTrue(gt_2 instanceof IFunctionType);
+			IType gt_ret = ((IFunctionType) gt_2).getReturnType();
+			assertTrue(gt_ret instanceof IBasicType);
+			assertEquals(((IBasicType) gt_ret).getType(), IBasicType.t_int);
+			IType gt_parm = ((IFunctionType) gt_2).getParameterTypes()[0];
+			assertTrue(gt_parm instanceof IBasicType);
+			assertEquals(((IBasicType) gt_parm).getType(), IBasicType.t_void);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			assertTrue(def.getDeclarator() instanceof IASTStandardFunctionDeclarator);
+			IASTName name_g = ((IASTStandardFunctionDeclarator) def.getDeclarator())
+			.getParameters()[0].getDeclarator().getName();
+			IASTName name_g_call = ((IASTIdExpression) ((IASTFunctionCallExpression) ((IASTReturnStatement) ((IASTCompoundStatement) def
+					.getBody()).getStatements()[0]).getReturnValue())
+					.getFunctionNameExpression()).getName();
+			IASTName[] decls = tu.getDeclarationsInAST(name_g_call.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_g);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	public void testArrayPointerFunction() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"int (*v[])(int *x, int *y);", ParserLanguage.C); //$NON-NLS-1$
+		
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			IVariable v = (IVariable) ((IASTStandardFunctionDeclarator) decl
+					.getDeclarators()[0]).getNestedDeclarator().getName()
+					.resolveBinding();
+			
+			IType vt_1 = v.getType();
+			assertTrue(vt_1 instanceof IArrayType);
+			IType vt_2 = ((IArrayType) vt_1).getType();
+			assertTrue(vt_2 instanceof IPointerType);
+			IType vt_3 = ((IPointerType) vt_2).getType();
+			assertTrue(vt_3 instanceof IFunctionType);
+			IType vt_ret = ((IFunctionType) vt_3).getReturnType();
+			assertTrue(vt_ret instanceof IBasicType);
+			assertEquals(((IBasicType) vt_ret).getType(), IBasicType.t_int);
+			assertEquals(((IFunctionType) vt_3).getParameterTypes().length, 2);
+			IType vpt_1 = ((IFunctionType) vt_3).getParameterTypes()[0];
+			assertTrue(vpt_1 instanceof IPointerType);
+			IType vpt_1_2 = ((IPointerType) vpt_1).getType();
+			assertTrue(vpt_1_2 instanceof IBasicType);
+			assertEquals(((IBasicType) vpt_1_2).getType(), IBasicType.t_int);
+			IType vpt_2 = ((IFunctionType) vt_3).getParameterTypes()[0];
+			assertTrue(vpt_2 instanceof IPointerType);
+			IType vpt_2_2 = ((IPointerType) vpt_1).getType();
+			assertTrue(vpt_2_2 instanceof IBasicType);
+			assertEquals(((IBasicType) vpt_2_2).getType(), IBasicType.t_int);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName[] decls = tu
+			.getDeclarationsInAST(((IASTStandardFunctionDeclarator) decl
+					.getDeclarators()[0]).getNestedDeclarator().getName()
+					.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], ((IASTStandardFunctionDeclarator) decl
+					.getDeclarators()[0]).getNestedDeclarator().getName());
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// typedef void DWORD;
+	// typedef DWORD v;
+	// v signal(int);
+	public void testTypedefExample4a() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration decl1 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			ITypedef dword = (ITypedef) decl1.getDeclarators()[0].getName()
+			.resolveBinding();
+			IType dword_t = dword.getType();
+			assertTrue(dword_t instanceof IBasicType);
+			assertEquals(((IBasicType) dword_t).getType(), IBasicType.t_void);
+			
+			IASTSimpleDeclaration decl2 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[1];
+			ITypedef v = (ITypedef) decl2.getDeclarators()[0].getName()
+			.resolveBinding();
+			IType v_t_1 = v.getType();
+			assertTrue(v_t_1 instanceof ITypedef);
+			IType v_t_2 = ((ITypedef) v_t_1).getType();
+			assertTrue(v_t_2 instanceof IBasicType);
+			assertEquals(((IBasicType) v_t_2).getType(), IBasicType.t_void);
+			
+			IASTSimpleDeclaration decl3 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[2];
+			IFunction signal = (IFunction) decl3.getDeclarators()[0].getName()
+			.resolveBinding();
+			IFunctionType signal_t = signal.getType();
+			IType signal_ret = signal_t.getReturnType();
+			assertTrue(signal_ret instanceof ITypedef);
+			IType signal_ret2 = ((ITypedef) signal_ret).getType();
+			assertTrue(signal_ret2 instanceof ITypedef);
+			IType signal_ret3 = ((ITypedef) signal_ret2).getType();
+			assertTrue(signal_ret3 instanceof IBasicType);
+			assertEquals(((IBasicType) signal_ret3).getType(), IBasicType.t_void);
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName name_DWORD = decl1.getDeclarators()[0].getName();
+			IASTName name_v = decl2.getDeclarators()[0].getName();
+			
+			IASTName[] decls = tu.getDeclarationsInAST(name_DWORD.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_DWORD);
+			
+			decls = tu.getDeclarationsInAST(((IASTNamedTypeSpecifier) decl2
+					.getDeclSpecifier()).getName().resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_DWORD);
+			
+			decls = tu.getDeclarationsInAST(((IASTNamedTypeSpecifier) decl3
+					.getDeclSpecifier()).getName().resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_v);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// typedef void DWORD;
+	// typedef DWORD (*pfv)(int);
+	// pfv signal(int, pfv);
+	public void testTypedefExample4b() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration decl1 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			ITypedef dword = (ITypedef) decl1.getDeclarators()[0].getName()
+			.resolveBinding();
+			IType dword_t = dword.getType();
+			assertTrue(dword_t instanceof IBasicType);
+			assertEquals(((IBasicType) dword_t).getType(), IBasicType.t_void);
+			
+			IASTSimpleDeclaration decl2 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[1];
+			ITypedef pfv = (ITypedef) decl2.getDeclarators()[0]
+			                                                 .getNestedDeclarator().getName().resolveBinding();
+			IType pfv_t_1 = pfv.getType();
+			assertTrue(pfv_t_1 instanceof IPointerType);
+			IType pfv_t_2 = ((IPointerType) pfv_t_1).getType();
+			assertTrue(pfv_t_2 instanceof IFunctionType);
+			IType pfv_t_2_ret_1 = ((IFunctionType) pfv_t_2).getReturnType();
+			assertTrue(pfv_t_2_ret_1 instanceof ITypedef);
+			IType pfv_t_2_ret_2 = ((ITypedef) pfv_t_2_ret_1).getType();
+			assertTrue(pfv_t_2_ret_2 instanceof IBasicType);
+			assertEquals(((IBasicType) pfv_t_2_ret_2).getType(), IBasicType.t_void);
+			assertTrue(((ITypedef) pfv_t_2_ret_1).getName().equals("DWORD")); //$NON-NLS-1$
+			IType pfv_t_2_parm = ((IFunctionType) pfv_t_2).getParameterTypes()[0];
+			assertTrue(pfv_t_2_parm instanceof IBasicType);
+			assertEquals(((IBasicType) pfv_t_2_parm).getType(), IBasicType.t_int);
+			
+			IASTSimpleDeclaration decl3 = (IASTSimpleDeclaration) tu
+			.getDeclarations()[2];
+			IFunction signal = (IFunction) decl3.getDeclarators()[0].getName()
+			.resolveBinding();
+			IFunctionType signal_t = signal.getType();
+			IType signal_ret_1 = signal_t.getReturnType();
+			assertTrue(signal_ret_1 instanceof ITypedef);
+			IType signal_ret_2 = ((ITypedef) signal_ret_1).getType();
+			assertTrue(signal_ret_2 instanceof IPointerType);
+			IType signal_ret_3 = ((IPointerType) signal_ret_2).getType();
+			assertTrue(signal_ret_3 instanceof IFunctionType);
+			IType signal_ret_ret_1 = ((IFunctionType) signal_ret_3).getReturnType();
+			assertTrue(signal_ret_ret_1 instanceof ITypedef);
+			IType signal_ret_ret_2 = ((ITypedef) signal_ret_ret_1).getType();
+			assertTrue(signal_ret_ret_2 instanceof IBasicType);
+			assertEquals(((IBasicType) signal_ret_ret_2).getType(),
+					IBasicType.t_void);
+			assertTrue(((ITypedef) signal_ret_ret_1).getName().equals("DWORD")); //$NON-NLS-1$
+			
+			IType signal_parm_t1 = signal_t.getParameterTypes()[0];
+			assertTrue(signal_parm_t1 instanceof IBasicType);
+			assertEquals(((IBasicType) signal_parm_t1).getType(), IBasicType.t_int);
+			IType signal_parm_t2 = signal_t.getParameterTypes()[1];
+			assertTrue(signal_parm_t2 instanceof ITypedef);
+			IType signal_parm_t2_1 = ((ITypedef) signal_parm_t2).getType();
+			assertTrue(signal_parm_t2_1 instanceof IPointerType);
+			IType signal_parm_t2_2 = ((IPointerType) signal_parm_t2_1).getType();
+			assertTrue(signal_parm_t2_2 instanceof IFunctionType);
+			IType signal_parm_t2_ret_1 = ((IFunctionType) signal_parm_t2_2)
+			.getReturnType();
+			assertTrue(signal_parm_t2_ret_1 instanceof ITypedef);
+			IType signal_parm_t2_ret_2 = ((ITypedef) signal_parm_t2_ret_1)
+			.getType();
+			assertTrue(signal_parm_t2_ret_2 instanceof IBasicType);
+			assertEquals(((IBasicType) signal_parm_t2_ret_2).getType(),
+					IBasicType.t_void);
+			assertTrue(((ITypedef) signal_parm_t2_ret_1).getName().equals("DWORD")); //$NON-NLS-1$
+			
+			// test tu.getDeclarationsInAST(IBinding)
+			IASTName name_pfv = decl2.getDeclarators()[0].getNestedDeclarator()
+			.getName();
+			IASTName name_pfv1 = ((IASTNamedTypeSpecifier) decl3.getDeclSpecifier())
+			.getName();
+			IASTName name_pfv2 = ((IASTNamedTypeSpecifier) ((IASTStandardFunctionDeclarator) decl3
+					.getDeclarators()[0]).getParameters()[1].getDeclSpecifier())
+					.getName();
+			
+			IASTName[] decls = tu.getDeclarationsInAST(name_pfv1.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_pfv);
+			
+			decls = tu.getDeclarationsInAST(name_pfv2.resolveBinding());
+			assertEquals(decls.length, 1);
+			assertEquals(decls[0], name_pfv);
+			
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// typedef void fv(int), (*pfv)(int);
+	// void (*signal1(int, void (*)(int)))(int);
+	// fv *signal2(int, fv *);
+	// pfv signal3(int, pfv);
+	public void testTypedefExample4c() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu
+			.getDeclarations()[0];
+			ITypedef fv = (ITypedef) decl.getDeclarators()[0].getName()
+			.resolveBinding();
+			ITypedef pfv = (ITypedef) decl.getDeclarators()[1]
+			                                                .getNestedDeclarator().getName().resolveBinding();
+			
+			IType fv_t = fv.getType();
+			assertEquals(((IBasicType) ((IFunctionType) fv_t).getReturnType())
+					.getType(), IBasicType.t_void);
+			assertEquals(
+					((IBasicType) ((IFunctionType) fv_t).getParameterTypes()[0])
+					.getType(), IBasicType.t_int);
+			
+			IType pfv_t = pfv.getType();
+			assertEquals(((IBasicType) ((IFunctionType) ((IPointerType) pfv_t)
+					.getType()).getReturnType()).getType(), IBasicType.t_void);
+			assertEquals(((IBasicType) ((IFunctionType) ((IPointerType) pfv
+					.getType()).getType()).getParameterTypes()[0]).getType(),
+					IBasicType.t_int);
+			
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[1];
+			IFunction signal1 = (IFunction) decl.getDeclarators()[0]
+			                                                      .getNestedDeclarator().getName().resolveBinding();
+			IType signal1_t = signal1.getType();
+			
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[2];
+			IFunction signal2 = (IFunction) decl.getDeclarators()[0].getName()
+			.resolveBinding();
+			IType signal2_t = signal2.getType();
+			
+			decl = (IASTSimpleDeclaration) tu.getDeclarations()[3];
+			IFunction signal3 = (IFunction) decl.getDeclarators()[0].getName()
+			.resolveBinding();
+			IType signal3_t = signal3.getType();
+			
+			assertEquals(
+					((IBasicType) ((IFunctionType) ((IPointerType) ((IFunctionType) signal1_t)
+							.getReturnType()).getType()).getReturnType()).getType(),
+							IBasicType.t_void);
+			assertEquals(((IBasicType) ((IFunctionType) signal1_t)
+					.getParameterTypes()[0]).getType(), IBasicType.t_int);
+			assertEquals(
+					((IBasicType) ((IFunctionType) ((IPointerType) ((IFunctionType) signal1_t)
+							.getParameterTypes()[1]).getType()).getReturnType())
+							.getType(), IBasicType.t_void);
+			assertEquals(
+					((IBasicType) ((IFunctionType) ((IPointerType) ((IFunctionType) signal1_t)
+							.getParameterTypes()[1]).getType()).getParameterTypes()[0])
+							.getType(), IBasicType.t_int);
+			
+			assertEquals(
+					((IBasicType) ((IFunctionType) ((ITypedef) ((IPointerType) ((IFunctionType) signal2_t)
+							.getReturnType()).getType()).getType()).getReturnType())
+							.getType(), IBasicType.t_void);
+			assertEquals(((IBasicType) ((IFunctionType) signal2_t)
+					.getParameterTypes()[0]).getType(), IBasicType.t_int);
+			assertEquals(
+					((IBasicType) ((IFunctionType) ((ITypedef) ((IPointerType) ((IFunctionType) signal2_t)
+							.getParameterTypes()[1]).getType()).getType())
+							.getReturnType()).getType(), IBasicType.t_void);
+			assertEquals(
+					((IBasicType) ((IFunctionType) ((ITypedef) ((IPointerType) ((IFunctionType) signal2_t)
+							.getParameterTypes()[1]).getType()).getType())
+							.getParameterTypes()[0]).getType(), IBasicType.t_int);
+			
+			assertEquals(
+					((IBasicType) ((IFunctionType) ((IPointerType) ((ITypedef) ((IFunctionType) signal3_t)
+							.getReturnType()).getType()).getType()).getReturnType())
+							.getType(), IBasicType.t_void);
+			assertEquals(((IBasicType) ((IFunctionType) signal3_t)
+					.getParameterTypes()[0]).getType(), IBasicType.t_int);
+			assertEquals(
+					((IBasicType) ((IFunctionType) ((IPointerType) ((ITypedef) ((IFunctionType) signal3_t)
+							.getParameterTypes()[1]).getType()).getType())
+							.getReturnType()).getType(), IBasicType.t_void);
+			assertEquals(
+					((IBasicType) ((IFunctionType) ((IPointerType) ((ITypedef) ((IFunctionType) signal3_t)
+							.getParameterTypes()[1]).getType()).getType())
+							.getParameterTypes()[0]).getType(), IBasicType.t_int);
+
+			tu = validateCopy(tu);
+		}
+		
+	}
+	
+	// const int x = 10;
+	// int y [ const static x ];
+	public void testBug80992() throws Exception {
+		ICASTArrayModifier mod = (ICASTArrayModifier) ((IASTArrayDeclarator) ((IASTSimpleDeclaration) parse(
+				getAboveComment(), ParserLanguage.C).getDeclarations()[1])
+				.getDeclarators()[0]).getArrayModifiers()[0];
+		assertTrue(mod.isConst());
+		assertTrue(mod.isStatic());
+		assertFalse(mod.isRestrict());
+		assertFalse(mod.isVolatile());
+		assertFalse(mod.isVariableSized());
+	}
+	
+	
+	// int y (int [ const *]);
+	public void testBug80978() throws Exception {
+		ICASTArrayModifier mod = (ICASTArrayModifier) ((IASTArrayDeclarator) ((IASTStandardFunctionDeclarator) ((IASTSimpleDeclaration) parse(
+				getAboveComment(), ParserLanguage.C).getDeclarations()[0])
+				.getDeclarators()[0]).getParameters()[0].getDeclarator())
+				.getArrayModifiers()[0];
+		assertTrue(mod.isConst());
+		assertTrue(mod.isVariableSized());
+		assertFalse(mod.isStatic());
+		assertFalse(mod.isRestrict());
+		assertFalse(mod.isVolatile());
+	}
+	
+	//AJN: bug 77383 don't do external variables	  
+	//    // void f() {               
+	//    //    if (a == 0)          
+	//    //       a = a + 3;         
+	//    // }                        
+	//    public void testExternalVariable() throws Exception {
+	//        IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+	//        CNameCollector col = new CNameCollector();
+	//        tu.accept(col);
+	//
+	//        IVariable a = (IVariable) col.getName(1).resolveBinding();
+	//        assertNotNull(a);
+	//        assertTrue(a instanceof ICExternalBinding);
+	//        assertInstances(col, a, 3);
+	//    }
+	
+	// void f() {               
+	//    int a = 1;            
+	//    if (a == 0)          
+	//       g(a);            
+	//    if (a < 0)           
+	//       g(a >> 1);       
+	//    if (a > 0)           
+	//       g(*(&a + 2));    
+	// }            
+	public void testExternalDefs() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			CNameCollector col = new CNameCollector();
+			tu.accept(col);
+			
+			IVariable a = (IVariable) col.getName(1).resolveBinding();
+			IFunction g = (IFunction) col.getName(3).resolveBinding();
+			assertNotNull(a);
+			assertNotNull(g);
+			assertTrue(g instanceof ICExternalBinding);
+			
+			assertEquals(col.size(), 11);
+			assertInstances(col, a, 7);
+			assertInstances(col, g, 3);
+	
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// typedef struct { int x; int y; } Coord;  
+	// int f() {                               
+	//    Coord xy = { .x = 10, .y = 11 };     
+	// }      
+	public void testFieldDesignators() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			CNameCollector col = new CNameCollector();
+			tu.accept(col);
+			
+			assertEquals(col.size(), 9);
+			IField x = (IField) col.getName(1).resolveBinding();
+			IField y = (IField) col.getName(2).resolveBinding();
+			ITypedef Coord = (ITypedef) col.getName(3).resolveBinding();
+			
+			assertInstances(col, x, 2);
+			assertInstances(col, y, 2);
+			assertInstances(col, Coord, 2);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// enum { member_one, member_two };
+	// const char *nm[] = {
+	//    [member_one] = "one",
+	//    [member_two] = "two"
+	// };
+	public void testArrayDesignator() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			CNameCollector col = new CNameCollector();
+			tu.accept(col);
+			
+			assertEquals(col.size(), 6);
+			IEnumerator one = (IEnumerator) col.getName(1).resolveBinding();
+			IEnumerator two = (IEnumerator) col.getName(2).resolveBinding();
+			
+			assertInstances(col, one, 2);
+			assertInstances(col, two, 2);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// void f() {
+	// if (a == 0)
+	// g(a);
+	// else if (a < 0)
+	// g(a >> 1);
+	// else if (a > 0)
+	// g(*(&a + 2));
+	// }
+	public void testBug83737() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			IASTIfStatement if_statement = (IASTIfStatement) ((IASTCompoundStatement) ((IASTFunctionDefinition) tu
+					.getDeclarations()[0]).getBody()).getStatements()[0];
+			assertEquals(((IASTBinaryExpression) if_statement
+					.getConditionExpression()).getOperator(),
+					IASTBinaryExpression.op_equals);
+			IASTIfStatement second_if_statement = (IASTIfStatement) if_statement
+			.getElseClause();
+			assertEquals(((IASTBinaryExpression) second_if_statement
+					.getConditionExpression()).getOperator(),
+					IASTBinaryExpression.op_lessThan);
+			IASTIfStatement third_if_statement = (IASTIfStatement) second_if_statement
+			.getElseClause();
+			assertEquals(((IASTBinaryExpression) third_if_statement
+					.getConditionExpression()).getOperator(),
+					IASTBinaryExpression.op_greaterThan);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// void f() {                    
+	//    while (1) {                  
+	//       if (1) goto end;       
+	//    }                          
+	//    end: ;                     
+	// }    
+	public void testBug84090_LabelReferences() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			CNameCollector col = new CNameCollector();
+			tu.accept(col);
+			
+			assertEquals(col.size(), 3);
+			ILabel end = (ILabel) col.getName(1).resolveBinding();
+			
+			IASTName[] refs = tu.getReferences(end);
+			assertEquals(refs.length, 1);
+			assertSame(refs[0].resolveBinding(), end);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// enum col { red, blue };
+	// enum col c;
+	public void testBug84092_EnumReferences() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			CNameCollector collector = new CNameCollector();
+			tu.accept(collector);
+			
+			assertEquals(collector.size(), 5);
+			IEnumeration col = (IEnumeration) collector.getName(0).resolveBinding();
+			
+			IASTName[] refs = tu.getReferences(col);
+			assertEquals(refs.length, 1);
+			assertSame(refs[0].resolveBinding(), col);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	public void testBug84096_FieldDesignatorRef() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"struct s { int a; } ss = { .a = 1 }; \n", ParserLanguage.C); //$NON-NLS-1$
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			CNameCollector collector = new CNameCollector();
+			tu.accept(collector);
+			
+			assertEquals(collector.size(), 4);
+			IField a = (IField) collector.getName(1).resolveBinding();
+			
+			IASTName[] refs = tu.getReferences(a);
+			assertEquals(refs.length, 1);
+			assertSame(refs[0].resolveBinding(), a);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	public void testProblems() throws Exception {
+		
+		IASTTranslationUnit tu = parse(
+				"    a += ;", ParserLanguage.C, true, false); //$NON-NLS-1$
+		IASTProblem[] ps = CVisitor.getProblems(tu);
+		assertEquals(ps.length, 1);
+		ps[0].getMessage();
+	}
+	
+	// enum e;
+	// enum e{ one };
+	public void testEnumerationForwards() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			CNameCollector col = new CNameCollector();
+			tu.accept(col);
+			
+			assertEquals(col.size(), 3);
+			IEnumeration e = (IEnumeration) col.getName(0).resolveBinding();
+			IEnumerator[] etors = e.getEnumerators();
+			assertTrue(etors.length == 1);
+			assertFalse(etors[0] instanceof IProblemBinding);
+			
+			assertInstances(col, e, 2);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// void f() {                 
+	//    int (*p) [2];         
+	//    (&p)[0] = 1;            
+	// }     
+	public void testBug84185() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 3);
+		IVariable p = (IVariable) col.getName(1).resolveBinding();
+		assertTrue(p.getType() instanceof IPointerType);
+		assertTrue(((IPointerType) p.getType()).getType() instanceof IArrayType);
+		IArrayType at = (IArrayType) ((IPointerType) p.getType()).getType();
+		assertTrue(at.getType() instanceof IBasicType);
+		
+		assertInstances(col, p, 2);
+	}
+	
+	// void f() {                 
+	//    int (*p) [2];         
+	//    (&p)[0] = 1;            
+	// }       
+	public void testBug84185_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 3);
+		
+		IVariable p_ref = (IVariable) col.getName(2).resolveBinding();
+		IVariable p_decl = (IVariable) col.getName(1).resolveBinding();
+		
+		assertSame(p_ref, p_decl);
+	}
+	
+	// // example from: C99 6.5.2.5-16
+	// struct s { int i; };
+	// void f (void)
+	// {
+	// 		 struct s *p = 0, *q;
+	// int j = 0;
+	// q = p;
+	// p = &((struct s) { j++ }); 
+	// }
+	public void testBug84176() throws Exception {
+		parse(getAboveComment(), ParserLanguage.C, false, true);
+	}
+	
+	// struct s { double i; } f(void);  
+	// struct s f(void) {}    
+	public void testBug84266() throws Exception {
+		final String code = getAboveComment();
+		IASTTranslationUnit tu = parse(code, ParserLanguage.C);
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		assertEquals(col.size(), 7);
+
+		ICompositeType s_ref = (ICompositeType) col.getName(4).resolveBinding();
+		ICompositeType s_decl = (ICompositeType) col.getName(0).resolveBinding();
+		assertSame(s_ref, s_decl);
+
+		tu = parse(code, ParserLanguage.C);
+		col = new CNameCollector();
+		tu.accept(col);
+		assertEquals(col.size(), 7);
+
+		s_decl = (ICompositeType) col.getName(0).resolveBinding();
+		s_ref = (ICompositeType) col.getName(4).resolveBinding();
+		assertSame(s_ref, s_decl);
+	}
+	
+	public void testBug84266_2() throws Exception {
+		IASTTranslationUnit tu = parse("struct s f(void);", ParserLanguage.C); //$NON-NLS-1$
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 3);
+		
+		ICompositeType s = (ICompositeType) col.getName(0).resolveBinding();
+		assertNotNull(s);
+		
+		tu = parse("struct s f(void) {}", ParserLanguage.C); //$NON-NLS-1$
+		col = new CNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 3);
+		
+		s = (ICompositeType) col.getName(0).resolveBinding();
+		assertNotNull(s);
+	}
+	
+	public void testBug84250() throws Exception {
+		assertTrue(((IASTDeclarationStatement) ((IASTCompoundStatement) ((IASTFunctionDefinition) parse(
+				"void f() { int (*p) [2]; }", ParserLanguage.C).getDeclarations()[0]).getBody()).getStatements()[0]).getDeclaration() instanceof IASTSimpleDeclaration); //$NON-NLS-1$
+	}
+	
+	// struct s1 { struct s2 *s2p; /* ... */ }; // D1 
+	// struct s2 { struct s1 *s1p; /* ... */ }; // D2 
+	public void testBug84186() throws Exception {
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			final String code = getAboveComment();
+			IASTTranslationUnit tu = parse(code, lang);
+			CNameCollector col = new CNameCollector();
+			tu.accept(col);
+			assertEquals(col.size(), 6);
+
+			ICompositeType s_ref = (ICompositeType) col.getName(1).resolveBinding();
+			ICompositeType s_decl = (ICompositeType) col.getName(3).resolveBinding();
+			assertSame(s_ref, s_decl);
+
+
+			tu = parse(code, lang);
+			col = new CNameCollector();
+			tu.accept(col);
+			assertEquals(col.size(), 6);
+
+			s_decl = (ICompositeType) col.getName(3).resolveBinding();
+			s_ref = (ICompositeType) col.getName(1).resolveBinding();
+			assertSame(s_ref, s_decl);
+		}
+	}
+	
+	// typedef struct { int a; } S;      
+	// void g(S* (*funcp) (void)) {    
+	//    (*funcp)()->a;                 
+	//    funcp()->a;                    
+	// }    
+	public void testBug84267() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 11);
+		
+		ITypedef S = (ITypedef) col.getName(2).resolveBinding();
+		IField a = (IField) col.getName(10).resolveBinding();
+		IParameter funcp = (IParameter) col.getName(7).resolveBinding();
+		assertNotNull(funcp);
+		assertInstances(col, funcp, 3);
+		assertInstances(col, a, 3);
+		
+		assertTrue(funcp.getType() instanceof IPointerType);
+		IType t = ((IPointerType) funcp.getType()).getType();
+		assertTrue(t instanceof IFunctionType);
+		IFunctionType ft = (IFunctionType) t;
+		assertTrue(ft.getReturnType() instanceof IPointerType);
+		assertSame(((IPointerType) ft.getReturnType()).getType(), S);
+	}
+	
+	// void f(int m, int c[m][m]);        
+	// void f(int m, int c[m][m]) {        
+	//    int x;                            
+	//    { int x = x; }                    
+	// }   
+	public void testBug84228() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		assertEquals(col.size(), 13);
+		
+		IParameter m = (IParameter) col.getName(3).resolveBinding();
+		IVariable x3 = (IVariable) col.getName(12).resolveBinding();
+		IVariable x2 = (IVariable) col.getName(11).resolveBinding();
+		IVariable x1 = (IVariable) col.getName(10).resolveBinding();
+		
+		assertSame(x2, x3);
+		assertNotSame(x1, x2);
+		
+		assertInstances(col, m, 6);
+		assertInstances(col, x1, 1);
+		assertInstances(col, x2, 2);
+		
+		IASTName[] ds = tu.getDeclarationsInAST(x2);
+		assertEquals(ds.length, 1);
+		assertSame(ds[0], col.getName(11));
+	}
+	
+	public void testBug84236() throws Exception {
+		String code = "double maximum(double a[ ][*]);"; //$NON-NLS-1$
+		IASTSimpleDeclaration d = (IASTSimpleDeclaration) parse(code,
+				ParserLanguage.C).getDeclarations()[0];
+		IASTStandardFunctionDeclarator fd = (IASTStandardFunctionDeclarator) d
+		.getDeclarators()[0];
+		IASTParameterDeclaration p = fd.getParameters()[0];
+		IASTArrayDeclarator a = (IASTArrayDeclarator) p.getDeclarator();
+		ICASTArrayModifier star = (ICASTArrayModifier) a.getArrayModifiers()[1];
+		assertTrue(star.isVariableSized());
+		
+	}
+	
+	// typedef int B;
+	// void g() {
+	// B * bp;  //1
+	// }
+	public void testBug85049() throws Exception {
+		IASTTranslationUnit t = parse(getAboveComment(), ParserLanguage.C);
+		IASTFunctionDefinition g = (IASTFunctionDefinition) t.getDeclarations()[1];
+		IASTCompoundStatement body = (IASTCompoundStatement) g.getBody();
+		final IASTStatement statement = body.getStatements()[0];
+		assertTrue(statement instanceof IASTDeclarationStatement);
+		IASTSimpleDeclaration bp = (IASTSimpleDeclaration) ((IASTDeclarationStatement) statement)
+		.getDeclaration();
+		assertTrue(bp.getDeclarators()[0].getName().resolveBinding() instanceof IVariable);
+		
+	}
+	
+	public void testBug86766() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"char foo; void foo() {}", ParserLanguage.C); //$NON-NLS-1$
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		IVariable foo = (IVariable) col.getName(0).resolveBinding();
+		IProblemBinding prob = (IProblemBinding) col.getName(1)
+		.resolveBinding();
+		assertEquals(prob.getID(), IProblemBinding.SEMANTIC_INVALID_OVERLOAD);
+		assertNotNull(foo);
+	}
+	
+	public void testBug88338_C() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"struct A; struct A* a;", ParserLanguage.C); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+		
+		assertTrue(col.getName(0).isDeclaration());
+		assertFalse(col.getName(0).isReference());
+		assertTrue(col.getName(1).isReference());
+		assertFalse(col.getName(1).isDeclaration());
+		
+		tu = parse("struct A* a; struct A;", ParserLanguage.C); //$NON-NLS-1$
+		col = new CPPNameCollector();
+		tu.accept(col);
+		
+		col.getName(2).resolveBinding();
+		
+		assertTrue(col.getName(0).isDeclaration());
+		assertFalse(col.getName(0).isReference());
+		
+		assertTrue(col.getName(2).isDeclaration());
+		assertFalse(col.getName(2).isReference());
+	}
+	
+	public void test88460() throws Exception {
+		IASTTranslationUnit tu = parse("void f();", ParserLanguage.C); //$NON-NLS-1$
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		IFunction f = (IFunction) col.getName(0).resolveBinding();
+		assertFalse(f.isStatic());
+	}
+	
+	public void testBug90253() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"void f(int par) { int v1; };", ParserLanguage.C); //$NON-NLS-1$
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		IFunction f = (IFunction) col.getName(0).resolveBinding();
+		IParameter p = (IParameter) col.getName(1).resolveBinding();
+		IVariable v1 = (IVariable) col.getName(2).resolveBinding();
+		
+		IASTFunctionDefinition fdef= getDeclaration(tu, 0);
+		IScope scope = ((IASTCompoundStatement) fdef.getBody()).getScope();
+		
+		IBinding[] bs = scope.find("par"); //$NON-NLS-1$
+		assertEquals(1, bs.length);
+		assertSame(bs[0], p);
+		
+		bs = scope.find("v1"); //$NON-NLS-1$
+		assertEquals(bs.length, 1);
+		assertSame(bs[0], v1);
+	}
+	
+	// struct S {};                
+	// int S;                      
+	// void f() {                 
+	//    int S;                   
+	//    {                        
+	//       S :  ;                
+	//    }                        
+	// }                           
+	public void testFind() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		ICompositeType S1 = (ICompositeType) col.getName(0).resolveBinding();
+		IVariable S2 = (IVariable) col.getName(1).resolveBinding();
+		IFunction f = (IFunction) col.getName(2).resolveBinding();
+		IVariable S3 = (IVariable) col.getName(3).resolveBinding();
+		ILabel S4 = (ILabel) col.getName(4).resolveBinding();
+		
+		IASTFunctionDefinition fdef= getDeclaration(tu, 2);
+		IScope scope = ((IASTCompoundStatement) fdef.getBody()).getScope();
+		
+		IBinding[] bs = scope.find("S"); //$NON-NLS-1$
+		
+		assertNotNull(S2);
+		assertEquals(bs.length, 3);
+		assertSame(bs[0], S3);
+		assertSame(bs[1], S1);
+		assertSame(bs[2], S4);
+	}
+	
+	public void test92791() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"void f() { int x, y; x * y; }", ParserLanguage.C); //$NON-NLS-1$
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		for (int i = 0; i < col.size(); ++i)
+			assertFalse(col.getName(i).resolveBinding() instanceof IProblemBinding);
+		
+		tu = parse(
+				"int y; void f() { typedef int x; x * y; }", ParserLanguage.C); //$NON-NLS-1$
+		col = new CNameCollector();
+		tu.accept(col);
+		for (int i = 0; i < col.size(); ++i)
+			assertFalse(col.getName(i).resolveBinding() instanceof IProblemBinding);
+	}
+	
+	public void testBug85786() throws Exception {
+		IASTTranslationUnit tu = parse(
+				"void f(int); void foo () { void * p = &f; ((void (*) (int)) p) (1); }", ParserLanguage.C); //$NON-NLS-1$
+		CNameCollector nameResolver = new CNameCollector();
+		tu.accept(nameResolver);
+		assertNoProblemBindings(nameResolver);
+	}
+	
+	// void func() {
+	//     int i=0;
+	// i= i&0x00ff;
+	// i= (i)&0x00ff;
+	// }
+	public void testBug95720() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		CNameCollector nameResolver = new CNameCollector();
+		tu.accept(nameResolver);
+		assertNoProblemBindings(nameResolver);        
+	}
+	
+	// #define ONE(a, ...) int x
+	// #define TWO(b, args...) int y
+	// int main()
+	// {
+	// ONE("string"); /* err */
+	// TWO("string"); /* err */
+	// return 0;	
+	// }
+	public void testBug94365() throws Exception {
+		parse(getAboveComment(), ParserLanguage.C);
+	}
+	
+	// #define MACRO(a)
+	// void main() {
+	// MACRO('"');
+	// }
+	public void testBug95119_a() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		IASTDeclaration[] declarations = tu.getDeclarations();
+		assertEquals(declarations.length, 1);
+		assertNotNull(declarations[0]);
+		assertTrue(declarations[0] instanceof IASTFunctionDefinition);
+		assertEquals(((IASTFunctionDefinition) declarations[0]).getDeclarator()
+				.getName().toString(), "main"); //$NON-NLS-1$
+		assertTrue(((IASTCompoundStatement) ((IASTFunctionDefinition) declarations[0])
+				.getBody()).getStatements()[0] instanceof IASTNullStatement);
+	}
+	
+	// #define MACRO(a)
+	// void main() {
+	// MACRO('X');
+	// }
+	public void testBug95119_b() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C);
+		IASTDeclaration[] declarations = tu.getDeclarations();
+		assertEquals(declarations.length, 1);
+		assertNotNull(declarations[0]);
+		assertTrue(declarations[0] instanceof IASTFunctionDefinition);
+		assertEquals(((IASTFunctionDefinition) declarations[0]).getDeclarator()
+				.getName().toString(), "main"); //$NON-NLS-1$
+		assertTrue(((IASTCompoundStatement) ((IASTFunctionDefinition) declarations[0])
+				.getBody()).getStatements()[0] instanceof IASTNullStatement);
+	}
+	
+	// typedef long _TYPE;
+	// typedef _TYPE TYPE;
+	// int function(TYPE (* pfv)(int parm));
+	public void testBug81739() throws Exception {
+		parse(getAboveComment(), ParserLanguage.C);
+	}
+	
+	// float _Complex x;
+	// double _Complex y;
+	public void testBug95757() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C, true, true);
+		IASTDeclaration[] decls = tu.getDeclarations();
+		
+		assertTrue(((ICASTSimpleDeclSpecifier)((IASTSimpleDeclaration)decls[0]).getDeclSpecifier()).isComplex());
+		assertEquals(((ICASTSimpleDeclSpecifier)((IASTSimpleDeclaration)decls[0]).getDeclSpecifier()).getType(), IASTSimpleDeclSpecifier.t_float);
+		assertTrue(((ICASTSimpleDeclSpecifier)((IASTSimpleDeclaration)decls[1]).getDeclSpecifier()).isComplex());
+		assertEquals(((ICASTSimpleDeclSpecifier)((IASTSimpleDeclaration)decls[1]).getDeclSpecifier()).getType(), IASTSimpleDeclSpecifier.t_double);
+	}
+	
+	// int foo();                 
+	// typeof({ int x = foo();    
+	//          x; }) zoot;    
+	public void testBug93980() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C, true);
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		IFunction foo = (IFunction) col.getName(0).resolveBinding();
+		assertSame(foo, col.getName(2).resolveBinding());
+		
+		IVariable zoot = (IVariable) col.getName(4).resolveBinding();
+		IType t = zoot.getType();
+		assertTrue(t instanceof IBasicType);
+		assertEquals(((IBasicType)t).getType(), IBasicType.t_int);
+	}
+	
+	public void testBug95866() throws Exception {
+		IASTTranslationUnit tu = parse("int test[10] = { [0 ... 9] = 2 };", ParserLanguage.C, true, true); //$NON-NLS-1$
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		assertNoProblemBindings(col);
+	}
+	
+	public void testBug98502() throws Exception {
+		IASTTranslationUnit tu = parse("typedef enum { ONE } e;", ParserLanguage.C, true, true); //$NON-NLS-1$
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		IEnumeration etion = (IEnumeration) col.getName(0).resolveBinding();
+		ITypedef e = (ITypedef) col.getName(2).resolveBinding();
+		assertSame(e.getType(), etion);
+	}
+	
+	// typedef struct _loop_data {   
+	//    enum { PIPERR } pipe_err;  
+	// } loop_data;                  
+	// void f() {                     
+	//    PIPERR;                    
+	// }       
+	public void testBug98365() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C, true);
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		IEnumerator etor = (IEnumerator) col.getName(2).resolveBinding();
+		assertSame(etor, col.getName(6).resolveBinding());
+	}
+	
+	public void testBug99262() throws Exception {
+		parse("void foo() {void *f; f=__null;}", ParserLanguage.C, true, true); //$NON-NLS-1$
+	}
+	
+	// void f1(int*) {
+	// }
+	// void f2() {
+	//   f1(__null);
+	// }
+	public void testBug240567() throws Exception {    	  
+    	BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), false);
+		bh.assertNonProblem("f1(__null", 2, IFunction.class);
+	}
+	
+	// void f() {                    
+	//    int a;                     
+	//    { a; int a; }              
+	// }   
+	public void testBug98960() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C, true);
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		IVariable a1 = (IVariable) col.getName(1).resolveBinding();
+		IVariable a2 = (IVariable) col.getName(2).resolveBinding();
+		IVariable a3 = (IVariable) col.getName(3).resolveBinding();
+		
+		assertSame(a1, a2);
+		assertNotSame(a2, a3);
+	}
+	
+	public void testBug100408() throws Exception {
+		IASTTranslationUnit tu = parse("int foo() { int x=1; (x)*3; }", ParserLanguage.C);  //$NON-NLS-1$
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		assertNoProblemBindings(col);
+	}
+	
+	// struct nfa;                   
+	// void f() {                    
+	//    struct nfa * n;            
+	//    freenfa(n);              
+	// }                             
+	// static void freenfa(nfa)    
+	// struct nfa * nfa;             
+	// {                             
+	// }     
+	public void testBug98760() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C, true);
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		IFunction free = (IFunction) col.getName(4).resolveBinding();
+		IParameter [] ps = free.getParameters();
+		assertEquals(ps.length, 1);
+		
+		assertSame(free, col.getName(6).resolveBinding());
+	}
+	
+	// void testCasting() {
+	// typedef struct {
+	//     int employee_id;
+	// int dept_id;
+	// } Employee;
+	// #define MY_DETAILS { 20, 30 }
+	// Employee e = (Employee)MY_DETAILS; 
+	// }
+	public void testBug79650() throws Exception {
+		parseAndCheckBindings(getAboveComment());
+	}
+	
+	public void testBug80171() throws Exception {
+		parseAndCheckBindings("static var;"); //$NON-NLS-1$
+	}
+	
+	// enum E_OPTIONCODE {
+	//     red = 1,
+	// black = 2,
+	// };
+	// void arithConversionTest(enum E_OPTIONCODE eOption)
+	// {
+	// int myColor = 5;
+	// int temp = eOption - myColor; /* Syntax error */
+	// if (eOption-myColor) /* Invalid arithmetic conversion */
+	// {
+	// }
+	// }
+	public void testBug79067() throws Exception {
+		parseAndCheckBindings(getAboveComment());
+	}
+	
+	// enum COLOR {
+	// RED=1
+	// };
+	// enum COLOR getColor() {
+	// enum COLOR ret;
+	// return ret;
+	// }
+	public void testBug84759() throws Exception {
+		IASTTranslationUnit tu = parseAndCheckBindings(getAboveComment());
+		IASTFunctionDefinition fd = (IASTFunctionDefinition) tu.getDeclarations()[1];
+		assertEquals(fd.getDeclSpecifier().getRawSignature(), "enum COLOR"); //$NON-NLS-1$
+		
+	}
+	
+	// int f() {
+	// int x = 4;  while (x < 10) blah: ++x;
+	// }
+	public void test1043290() throws Exception {
+		IASTTranslationUnit tu = parseAndCheckBindings(getAboveComment());
+		IASTFunctionDefinition fd = (IASTFunctionDefinition) tu.getDeclarations()[0];
+		IASTStatement [] statements = ((IASTCompoundStatement)fd.getBody()).getStatements();
+		IASTWhileStatement whileStmt = (IASTWhileStatement) statements[1];
+		IASTLabelStatement labelStmt = (IASTLabelStatement) whileStmt.getBody();
+		assertTrue(labelStmt.getNestedStatement() instanceof IASTExpressionStatement);
+		IASTExpressionStatement es = (IASTExpressionStatement) labelStmt.getNestedStatement();
+		assertTrue(es.getExpression() instanceof IASTUnaryExpression);
+	}
+	
+	// void f() {                         
+	//    int x;                          
+	//    for (int x; ;)                 
+	//       blah: x;                     
+	// }        
+	public void testBug104390_2() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C, true);
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		IVariable x = (IVariable) col.getName(1).resolveBinding();
+		IVariable x2 = (IVariable) col.getName(2).resolveBinding();
+		assertNotSame(x, x2);
+		assertSame(x2, col.getName(4).resolveBinding());
+		assertTrue(col.getName(3).resolveBinding() instanceof ILabel);
+	}
+	
+	// int f() { 
+	// int i;
+	// do { ++i; } while (i < 10);
+	// return 0;
+	// }
+	public void testBug104800() throws Exception {
+		IASTTranslationUnit tu = parseAndCheckBindings(getAboveComment());
+		IASTFunctionDefinition f = (IASTFunctionDefinition) tu.getDeclarations()[0];
+		IASTCompoundStatement body = (IASTCompoundStatement) f.getBody();
+		assertEquals(body.getStatements().length, 3);
+	}
+	
+	public void testBug107150() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define FUNC_PROTOTYPE_PARAMS(list)    list\r\n"); //$NON-NLS-1$
+		buffer.append("int func1 FUNC_PROTOTYPE_PARAMS((int arg1)) {\r\n"); //$NON-NLS-1$
+		buffer.append("return 0;\r\n"); //$NON-NLS-1$
+		buffer.append("}\r\n"); //$NON-NLS-1$
+		buffer.append("int func2 FUNC_PROTOTYPE_PARAMS\r\n"); //$NON-NLS-1$
+		buffer.append("((int arg1)) {\r\n"); //$NON-NLS-1$
+		buffer.append("return 0;\r\n"); //$NON-NLS-1$
+		buffer.append("}\r\n"); //$NON-NLS-1$
+		IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.C);
+		assertFalse(tu.getDeclarations()[1] instanceof IASTProblemDeclaration);
+		tu = parse(buffer.toString(), ParserLanguage.CPP);
+		assertFalse(tu.getDeclarations()[1] instanceof IASTProblemDeclaration);
+		
+		buffer = new StringBuffer();
+		buffer.append("#define FUNC_PROTOTYPE_PARAMS(list)    list\n"); //$NON-NLS-1$
+		buffer.append("int func1 FUNC_PROTOTYPE_PARAMS((int arg1)) {\n"); //$NON-NLS-1$
+		buffer.append("return 0;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("int func2 FUNC_PROTOTYPE_PARAMS\n"); //$NON-NLS-1$
+		buffer.append("((int arg1)) {\n"); //$NON-NLS-1$
+		buffer.append("return 0;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		tu= parse(buffer.toString(), ParserLanguage.C);
+		assertFalse(tu.getDeclarations()[1] instanceof IASTProblemDeclaration);
+		tu= parse(buffer.toString(), ParserLanguage.CPP);
+		assertFalse(tu.getDeclarations()[1] instanceof IASTProblemDeclaration);
+	}
+	
+	public void testBug107150b() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define FUNC_PROTOTYPE_PARAMS(list)    list\r\n"); //$NON-NLS-1$
+		buffer.append("int func1 FUNC_PROTOTYPE_PARAMS((int arg1)) {\r\n"); //$NON-NLS-1$
+		buffer.append("return 0;\r\n"); //$NON-NLS-1$
+		buffer.append("}\r\n"); //$NON-NLS-1$
+		buffer.append("int func2 FUNC_PROTOTYPE_PARAMS\r\n \r\n \t \r\n    \r\n "); //$NON-NLS-1$
+		buffer.append("((int arg1)) {\r\n"); //$NON-NLS-1$
+		buffer.append("return 0;\r\n"); //$NON-NLS-1$
+		buffer.append("}\r\n"); //$NON-NLS-1$
+		IASTTranslationUnit tu= parse(buffer.toString(), ParserLanguage.C);
+		assertFalse(tu.getDeclarations()[1] instanceof IASTProblemDeclaration);
+		
+		tu = parse(buffer.toString(), ParserLanguage.CPP);
+		assertFalse(tu.getDeclarations()[1] instanceof IASTProblemDeclaration);
+		
+		buffer = new StringBuffer();
+		buffer.append("#define FUNC_PROTOTYPE_PARAMS(list)    list\n"); //$NON-NLS-1$
+		buffer.append("int func1 FUNC_PROTOTYPE_PARAMS((int arg1)) {\n"); //$NON-NLS-1$
+		buffer.append("return 0;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("int func2 FUNC_PROTOTYPE_PARAMS\n"); //$NON-NLS-1$
+		buffer.append("((int arg1)) {\n"); //$NON-NLS-1$
+		buffer.append("return 0;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		tu = parse(buffer.toString(), ParserLanguage.C);
+		assertFalse(tu.getDeclarations()[1] instanceof IASTProblemDeclaration);
+		tu = parse(buffer.toString(), ParserLanguage.CPP);
+		assertFalse(tu.getDeclarations()[1] instanceof IASTProblemDeclaration);
+	}
+	
+	// NWindow NewWindowDuplicate(NWindow theWindow, bool insert)\n");
+	// {
+	//         NWindow newWindow;
+	//                 newWindow = new GenericWindow();
+	//     if (newWindow == NULL)
+	//     return NULL;
+	//     TwinWindowOF(theWindow) = newWindow;
+	//     TwinWindowOF(newWindow) = NULL;
+	//     ParentWindowOF(newWindow) = ParentWindowOF(theWindow);
+	//     DGlobalsOF(newWindow) = DGlobalsOF(theWindow);
+	//     HashMapOF(newWindow) = HashMapOF(theWindow);
+	//     OwnerWindowOF(newWindow) = OwnerWindowOF(theWindow);
+	//     ChildOF(newWindow) = ChildOF(theWindow);
+	//         MakeNameOF(newWindow, NameOF(theWindow));
+	//     KindOF(newWindow) = KindOF(theWindow);
+	//     IsVisibleOF(newWindow) = IsVisibleOF(theWindow);
+	//     FocusOF(newWindow) = FocusOF(theWindow);
+	//     IsFloating(newWindow) = IsFloating(theWindow);
+	//     HasCloseBox(newWindow) = HasCloseBox(theWindow);
+	//     IsSearchNB(newWindow) = IsSearchNB(theWindow);
+	//     IsFBWindow(newWindow) = FALSE;
+	//     ShellOF(newWindow) = ShellOF(theWindow);
+	//     DrawOnOF(newWindow) = DrawOnOF(theWindow);
+	//     IsBusyOF(newWindow) = IsBusyOF(theWindow);
+	//     InvalRgnOF(newWindow) = XCreateRegion();
+	//     IdleOF(newWindow) = IdleOF(theWindow);
+	//     ShellPainterOF(newWindow)  = ShellPainterOF(theWindow);
+	//     CanvasPainterOF(newWindow) = CanvasPainterOF(theWindow);
+	//     StatusPainterOF(newWindow) = StatusPainterOF(theWindow);
+	//     NotebookOF(newWindow) = NotebookOF(theWindow);
+	//     PopupWindowOF(newWindow) = PopupWindowOF(theWindow);
+	//     IC_IsFromIM(theWindow) = FALSE;
+	//     IsDestroyPendingOF(newWindow) = FALSE;
+	//     if (IsNotebookWindow(newWindow))
+	//             DockedWindowOF(newWindow) = NewDockedWindow(newWindow, false);
+	//     else
+	//         DockedWindowOF(newWindow) = NULL;
+	//     if (insert)
+	//         _addToListHead(newWindow);
+	//     return newWindow;
+	// }
+	public void testBug143502() throws Exception {
+		parse(getAboveComment(), ParserLanguage.C, true, false);
+	}
+	
+	// void func(int a) {
+	//    int z=0;
+	//    z= (a)+z;
+	//    z= (a)-z;
+	//    z= (a)*z;
+	//    z= (a)&z;
+	//    z= (a)|z;
+	//    z= (a)/z;
+	//    z= (a)%z;
+	// }
+	public void testBracketAroundIdentifier_168924() throws IOException, ParserException {
+		String content= getAboveComment();
+		IASTTranslationUnit tu= parse(content, ParserLanguage.C, true, true);
+		IASTFunctionDefinition func= (IASTFunctionDefinition) tu.getDeclarations()[0];
+		IASTParameterDeclaration[] params= ((IASTStandardFunctionDeclarator) func.getDeclarator()).getParameters();
+		IBinding binding= params[0].getDeclarator().getName().resolveBinding();
+		assertEquals(7, tu.getReferences(binding).length);
+		
+		tu= parse(content, ParserLanguage.CPP, true, true);
+		func= (IASTFunctionDefinition) tu.getDeclarations()[0];
+		params= ((IASTStandardFunctionDeclarator) func.getDeclarator()).getParameters();
+		binding= params[0].getDeclarator().getName().resolveBinding();
+		assertEquals(7, tu.getReferences(binding).length);
+	}
+	
+	//  #define MAC(x) x
+	//  void func() {
+	//     MAC(");
+	//  }
+	public void testBug179383() throws ParserException, IOException {
+		parse(getAboveComment(), ParserLanguage.C, false, false);
+	}
+	
+	/**
+	 * Bug in not removing single-line comments from macros.
+	 * @throws Exception
+	 */
+	public void testMacroCommentsBug_177154() throws Exception {
+		// simple case
+		String simple = 
+			"#define LIT 1  // my value\r\n" + 
+			"int func(int x) {\r\n" + 
+			"}\r\n" + 
+			"int main() {\r\n" + 
+			"  return func(LIT);   // fails to parse\r\n" + 
+			"}\r\n"; 
+		
+		IASTTranslationUnit tu = parse(simple, ParserLanguage.CPP, true, true);
+		
+		// actual reduced test case, plus extra cases
+		String text =
+			"#define KBOOT		1 //0x00000002\r\n" + 
+			"#define KBOOT2	 /* value */	1  /* another */ //0x00000002\r\n" + 
+			"#define KBOOT3	 /* value \r\n" +
+			" multi line\r\n"+
+			" comment */	1  \\\r\n"+
+			"/* another */ + \\\r\n"+
+			"2 //0x00000002\r\n" + 
+			"#define DEBUGNUM(x) (KDebugNum(x))\r\n" + 
+			"bool KDebugNum(int aBitNum);\r\n" + 
+			"#define __KTRACE_OPT(a,p) {if ((DEBUGNUM(a)))p;}\r\n" +
+			"void fail();\r\n"+
+			"void test() {\r\n"+
+			"__KTRACE_OPT(KBOOT,fail());\r\n" + 
+			"__KTRACE_OPT(KBOOT2,fail());\r\n" + 
+			"}\r\n"
+			;
+		
+		// essential test: this code should be parseable
+		tu = parse(text, ParserLanguage.CPP, true, true);
+		
+		// verify macros
+		IASTPreprocessorMacroDefinition[] macroDefinitions = tu.getMacroDefinitions();
+		assertEquals(5, macroDefinitions.length);
+		assertEquals("1", macroDefinitions[0].getExpansion());
+		assertEquals("1", macroDefinitions[1].getExpansion());
+		// regression test for #64268 and #71733 which also handle comments
+		String expectExpansion= "1 + 2";
+		assertEquals(expectExpansion, macroDefinitions[2].getExpansion());
+		assertEquals("(KDebugNum(x))", macroDefinitions[3].getExpansion());
+		assertEquals("{if ((DEBUGNUM(a)))p;}", macroDefinitions[4].getExpansion());
+		
+		// TODO: exhaustive macro testing
+	}
+	
+	// void (decl)(char);
+	// void foo() {
+	//    decl('a');
+	// }
+	public void testBug181305_1() throws Exception {
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			IASTTranslationUnit tu = parse(getAboveComment(), lang, true, true);
+			
+			// check class
+			IASTFunctionDefinition fd = (IASTFunctionDefinition) tu.getDeclarations()[1];
+			IASTCompoundStatement comp_stmt= (IASTCompoundStatement) fd.getBody();
+			IASTExpressionStatement expr_stmt= (IASTExpressionStatement) comp_stmt.getStatements()[0];
+			IASTFunctionCallExpression expr= (IASTFunctionCallExpression) expr_stmt.getExpression();
+			IASTIdExpression idExpr= (IASTIdExpression) expr.getFunctionNameExpression();
+			IBinding binding= idExpr.getName().resolveBinding();
+			assertTrue(lang.toString(),  binding instanceof IFunction);
+			assertFalse(lang.toString(), binding instanceof IProblemBinding);
+			assertEquals(binding.getName(), "decl");
+		}
+	}
+	
+	// void (*decl)(char);
+	// void foo() {
+	//    decl('a');
+	// }
+	public void testBug181305_2() throws Exception {
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			IASTTranslationUnit tu = parse(getAboveComment(), lang, true, true);
+			
+			// check class
+			IASTFunctionDefinition fd = (IASTFunctionDefinition) tu.getDeclarations()[1];
+			IASTCompoundStatement comp_stmt= (IASTCompoundStatement) fd.getBody();
+			IASTExpressionStatement expr_stmt= (IASTExpressionStatement) comp_stmt.getStatements()[0];
+			IASTFunctionCallExpression expr= (IASTFunctionCallExpression) expr_stmt.getExpression();
+			IASTIdExpression idExpr= (IASTIdExpression) expr.getFunctionNameExpression();
+			IBinding binding= idExpr.getName().resolveBinding();
+			assertTrue(lang.toString(),  binding instanceof IVariable);
+			assertFalse(lang.toString(), binding instanceof IProblemBinding);
+		}
+	}
+	
+	public void testBug181735() throws Exception {
+		String code=
+			"int (*f)(int);\n"
+			+	"int g(int n) {return n;}\n"
+			+   "int g(int n, int m) {return n;}\n"
+			+   "void foo() { f=g; }";
+		
+		for (ParserLanguage lang : ParserLanguage.values())
+			parseAndCheckBindings(code, lang);
+	}
+	
+	// void test() {
+	//    char d= *"b";
+	// }
+	public void testBug181942() throws Exception {
+		for (ParserLanguage lang : ParserLanguage.values()) 
+			parse(getAboveComment(), lang, true, true);
+	}
+	
+	public void testMacroCommentsBug_177154_2() throws Exception {
+		String noCommentMacro =
+			"#define Sonar16G(x) ((Sonr16G(x)<<16)|0xff000000L)\r\n"; 
+		String commentMacro = 	
+			"#define Sonar16G(x) ((Sonr16G(x)<<16)|0xff000000L)	// add the varf value\r\n"; 
+		
+		String textTail = "\r\n" + 
+		"const int snd16SonarR[32] = {\r\n" + 
+		"		0xFF000000L,   Sonar16G(0x01), Sonar16G(0x02), Sonar16G(0x03),\r\n" + 
+		"		Sonar16G(0x04), Sonar16G(0x05), Sonar16G(0x06), Sonar16G(0x07),\r\n" + 
+		"		Sonar16G(0x08), Sonar16G(0x09), Sonar16G(0x0A), Sonar16G(0x0B),\r\n" + 
+		"		Sonar16G(0x0C), Sonar16G(0x0D), Sonar16G(0x0E), Sonar16G(0x0F),\r\n" + 
+		"		Sonar16G(0x10), Sonar16G(0x11), Sonar16G(0x12), Sonar16G(0x13),\r\n" + 
+		"		Sonar16G(0x14), Sonar16G(0x15), Sonar16G(0x16), Sonar16G(0x17),\r\n" + 
+		"		Sonar16G(0x18), Sonar16G(0x19), Sonar16G(0x1A), Sonar16G(0x1B),\r\n" + 
+		"		Sonar16G(0x1C), Sonar16G(0x1D), Sonar16G(0x1E), Sonar16G(0x1F),\r\n" + 
+		"	};\r\n" + 
+		"\r\n" + 
+		"";
+		
+		// this should work
+		String textNoComment = noCommentMacro + textTail;
+		IASTTranslationUnit tu = parse(textNoComment, ParserLanguage.CPP, true, true);
+		
+		// this fails
+		String textComment = commentMacro + textTail;
+		tu = parse(textComment, ParserLanguage.CPP, true, true);
+		
+	}
+	
+	// int __builtin_sin;
+	public void testBug182464() throws Exception {
+		for (ParserLanguage lang : ParserLanguage.values())
+			parseAndCheckBindings(getAboveComment(), lang, true);
+	}
+	
+	public void testBug186018() throws Exception {
+		String code = 
+			"int main() { \n" +
+			"    switch(1) { \n" +
+			"        case 1 : \n" +
+			"        case 2 : \n" +
+			"            printf(\"pantera rules\"); \n" +
+			"    } \n" +
+			"}\n";
+		
+		parseAndCheckBindings(code, ParserLanguage.C);
+	}
+	
+	//	template <typename T>
+	//	class auto_ptr {
+	//	private:
+	//	  T* ptr;
+	//	public:
+	//	  explicit auto_ptr(T* p = 0) : ptr(p) {}
+	//	  ~auto_ptr()                 { delete ptr; }
+	//	  T& operator*()              { return *ptr; }
+	//	  T* operator->()             { return ptr; }
+	//	};
+	//
+	//	class A {
+	//	public:
+	//	  int method() { return 0; }
+	//	};
+	//
+	//	class B {
+	//	  auto_ptr<A> a;
+	//
+	//	  void f() {
+	//	    int b = a->method();        // Problem: method
+	//	    int c = (*a).method();      // Problem: method
+	//	  }
+	//	};
+	public void test186736() throws Exception {
+		IASTTranslationUnit tu= parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			CNameCollector col = new CNameCollector();
+			tu.accept(col);
+			IBinding methodb= col.getName(27).resolveBinding();
+			IBinding methodc= col.getName(30).resolveBinding();
+			assertEquals("method", methodb.getName());
+			assertEquals("method", methodc.getName());
+			assertInstance(methodb, ICPPMethod.class);
+			assertInstance(methodc, ICPPMethod.class);
+			assertEquals("A", ((ICPPMethod)methodb).getClassOwner().getName());
+			assertEquals("A", ((ICPPMethod)methodc).getClassOwner().getName());
+			
+			tu = validateCopy(tu);
+		}
+	}
+	
+	//	template <typename T, typename U>
+	//	class odd_pair {
+	//	private:
+	//	  T* ptr1;
+	//	  U* ptr2;
+	//	public:
+	//	  T* operator->()             { return 0; }
+	//	  U* operator->() const       { return 0; }
+	//	};
+	//
+	//	class A {
+	//	public:
+	//	  int method() { return 0; }
+	//	};
+	//
+	//	class AA {
+	//	public:
+	//	  int method() { return 0; }
+	//	};
+	//
+	//	class B {
+	//	public:
+	//	  odd_pair<A, AA> a1;
+	//	  const odd_pair<A, AA> a2;
+	//
+	//	  B() {
+	//	  }
+	//
+	//	  void f() {
+	//	    int b1 = a1->method();        // Problem: method
+	//	    int b2 = a2->method();        // Problem: method
+	//	  }
+	//	};
+	public void test186736_variant1() throws Exception {
+		IASTTranslationUnit tu= parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			CNameCollector col = new CNameCollector();
+			tu.accept(col);
+			IBinding methodA= col.getName(30).resolveBinding();
+			IBinding methodAA= col.getName(33).resolveBinding();
+			assertEquals("method", methodA.getName());
+			assertEquals("method", methodAA.getName());
+			assertInstance(methodA, ICPPMethod.class);
+			assertInstance(methodAA, ICPPMethod.class);
+			assertEquals("A", ((ICPPMethod)methodA).getClassOwner().getName());
+			assertEquals("AA", ((ICPPMethod)methodAA).getClassOwner().getName());
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	//	class B {
+	//		public:
+	//			void bar() {}
+	//	};
+	//	class A {
+	//		public:
+	//			B* operator->() { return new B(); }
+	//			void foo() {}
+	//	};
+	//
+	//	void main() {
+	//		A a, &aa=a, *ap= new A();
+	//		a.foo();
+	//		ap->foo();
+	//		aa.foo();
+	//		(*ap)->bar();
+	//		(&aa)->foo();
+	//		(&a)->foo();
+	//	}
+	public void test186736_variant2() throws Exception {
+		IASTTranslationUnit tu= parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+		validateCopy(tu);
+	}
+	
+	// typedef int int32;
+	// int32 f(int32 (*p)) {
+	//   return *p;
+	// }
+	public void test167833() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.C);
+	}	
+	
+	// // this is a \
+	// single line comment 
+	// char str[] = " multi \
+	// line \
+	// string";
+	public void testBug188707_backslashNewline() throws Exception {
+		parseAndCheckBindings(getAboveComment());
+	}
+	
+	// typedef A B;
+	// typedef C D;
+	// typedef E E;
+	// typedef typeof(G) G;
+	// typedef H *H;
+	// typedef I *************I;
+	// typedef int (*J)(J);
+	public void testBug192165() throws Exception {
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			IASTTranslationUnit tu = parse(getAboveComment(), lang, true, false);
+			CNameCollector col = new CNameCollector();
+			tu.accept(col);
+			assertInstance(col.getName(0).resolveBinding(), IProblemBinding.class);
+			assertInstance(col.getName(1).resolveBinding(), ITypedef.class);
+			assertInstance(col.getName(2).resolveBinding(), IProblemBinding.class);
+			assertInstance(col.getName(3).resolveBinding(), ITypedef.class);
+			assertInstance(col.getName(4).resolveBinding(), IProblemBinding.class);
+			assertInstance(col.getName(5).resolveBinding(), ITypedef.class);
+			assertInstance(col.getName(6).resolveBinding(), IProblemBinding.class);
+			assertInstance(col.getName(7).resolveBinding(), ITypedef.class);
+			assertInstance(col.getName(8).resolveBinding(), IProblemBinding.class);
+			assertInstance(col.getName(9).resolveBinding(), ITypedef.class);
+			assertInstance(col.getName(10).resolveBinding(), IProblemBinding.class);
+			assertInstance(col.getName(11).resolveBinding(), ITypedef.class);
+			
+			// function ptr
+			final IBinding typedef = col.getName(12).resolveBinding();
+			final IBinding secondJ = col.getName(13).resolveBinding();
+			assertInstance(typedef, ITypedef.class);
+			if (lang == ParserLanguage.CPP) {
+				assertInstance(secondJ, IProblemBinding.class);
+			} else {
+				// for plain C this is actually not a problem, the second J has to be interpreted as a (useless) 
+				// parameter name.
+				assertInstance(typedef, ITypedef.class);
+				isTypeEqual(((ITypedef) typedef).getType(), "int (int) *");
+			}
+		}
+	}
+	
+	// /* a comment */
+	// #define INVALID(a, b)  ## a ## b
+	// INVALID(1, 2)
+	//
+	public void test192639() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, false, false); 
+		parse(getAboveComment(), ParserLanguage.C, false, false); 
+	}
+	
+	public void test195943() throws Exception {
+		final int depth= 100;
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define M0 1\n");
+		for (int i = 1; i < depth; i++) {
+			buffer.append("#define M" + i + " (M" + (i-1) + "+1)\n");
+		}
+		buffer.append("int a= M" + (depth-1) + ";\n");
+		long time= System.currentTimeMillis();
+		parse(buffer.toString(), ParserLanguage.CPP); 
+		parse(buffer.toString(), ParserLanguage.C);
+		assertTrue(System.currentTimeMillis()-time < 2000);
+	}
+	
+	// int array[12]= {};
+	public void testBug196468_emptyArrayInitializer() throws Exception {
+		final String content = getAboveComment();
+		parse(content, ParserLanguage.CPP, false); 
+		parse(content, ParserLanguage.CPP, true); 
+		parse(content, ParserLanguage.C, true);
+		try {
+			parse(content, ParserLanguage.C, false);
+			fail("C89 does not allow empty braces in array initializer");
+		}
+		catch (ParserException e) {
+		}
+	}
+	
+	//  #define foo(f,...)
+	//	void bar(void) {}
+	//	int main(int argc, char **argv) {
+	//	   foo("a", bar);        // ok
+	//	   foo("a", bar, bar);   // ok
+	//	   foo("a", bar());      // Eclipse Syntax error
+	//	   foo("a", bar, bar()); // Eclipse Syntax error
+	//	   foo("a", bar(), bar); // Eclipse Syntax error
+	//     return 0;
+	//  }
+	public void testBug197633_parenthesisInVarargMacros() throws Exception {
+		final String content = getAboveComment();
+		parse(content, ParserLanguage.CPP); 
+		parse(content, ParserLanguage.C); 
+	}
+	
+	// void  (__attribute__((__stdcall__))* foo1) (int);
+	// void  (* __attribute__((__stdcall__)) foo2) (int);
+	// void  (* __attribute__((__stdcall__))* foo3) (int);
+	public void testBug191450_attributesInBetweenPointers() throws Exception {
+		parse(getAboveComment(), ParserLanguage.CPP, true, true);
+		parse(getAboveComment(), ParserLanguage.C, true, true);
+	}
+	
+	// class NameClash {}; 
+	// namespace NameClash {};
+	// namespace NameClash2 {};
+	// class NameClash2 {}; 
+	public void testBug202271_nameClash() throws Exception {
+		IASTTranslationUnit tu= parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP, true);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			CNameCollector col = new CNameCollector();
+			tu.accept(col);
+			assertInstance(col.getName(0).resolveBinding(), ICPPClassType.class);
+			assertInstance(col.getName(1).resolveBinding(), ICPPNamespace.class);
+			assertInstance(col.getName(2).resolveBinding(), ICPPNamespace.class);
+			assertInstance(col.getName(3).resolveBinding(), ICPPClassType.class);
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// #define WRAP(var) var
+	// #define MACRO 1
+	// int a= MACRO;
+	// int b= WRAP(MACRO);
+	public void testBug94673_refsForMacrosAsArguments() throws Exception {
+		String content= getAboveComment();
+		IASTTranslationUnit tu= parseAndCheckBindings(content, ParserLanguage.CPP, true);
+		IASTPreprocessorMacroDefinition[] defs= tu.getMacroDefinitions();
+		assertEquals(2, defs.length);
+		IASTPreprocessorMacroDefinition md= defs[1];
+		assertEquals("MACRO", md.getName().toString());
+		IMacroBinding binding= (IMacroBinding) md.getName().resolveBinding();
+		assertNotNull(binding);
+		IASTName[] refs= tu.getReferences(binding);
+		assertEquals(2, refs.length);
+		IASTFileLocation loc= refs[1].getFileLocation();
+		final int idx = content.indexOf("WRAP(MACRO)");
+		assertEquals(idx, loc.getNodeOffset());
+		IASTImageLocation iloc= refs[1].getImageLocation();
+		assertEquals(idx+5, iloc.getNodeOffset());
+	}
+	
+	//	void OSi_Panic(const char *file, int line) {};
+	//	void OSi_Panic(const char *file, int line, const char *fmt, ...) {};
+	//
+	//	#define ASSERT(exp, args...)\
+	//	{\
+	//	    if (!(exp))\
+	//	    {\
+	//	        OSi_Panic(__FILE__, __LINE__, ##args);\
+	//	    }\
+	//	}\
+	//
+	//	int main()
+	//	{
+	//	    int a = 0;
+	//	    int b = 0;
+	//	    ASSERT(a > b, "Error: a=%d, b=%d", a, b);// marked with error
+	//	    ASSERT(a > b, "Error!");// marked with error also
+	//	    ASSERT(false);// fine
+	//	}
+	
+	//	void OSi_Panic(const char *file, int line) {};
+	//	void OSi_Panic(const char *file, int line, const char *fmt, ...) {};
+	//
+	//	#define ASSERT(exp, ...)\
+	//	{\
+	//	    if (!(exp))\
+	//	    {\
+	//	        OSi_Panic(__FILE__, __LINE__, ##__VA_ARGS__);\
+	//	    }\
+	//	}\
+	//
+	//	int main()
+	//	{
+	//	    int a = 0;
+	//	    int b = 0;
+	//	    ASSERT(a > b, "Error: a=%d, b=%d", a, b);// marked with error
+	//	    ASSERT(a > b, "Error!");// marked with error also
+	//	    ASSERT(false);// fine
+	//	}
+	public void testBug188855_gccExtensionForVariadicMacros() throws Exception {
+		StringBuffer[] buffer = getContents(2);
+		final String content1 = buffer[0].toString();
+		final String content2 = buffer[1].toString();
+		parse(content1, ParserLanguage.CPP); 
+		parse(content1, ParserLanguage.C); 
+		parse(content2, ParserLanguage.CPP); 
+		parse(content2, ParserLanguage.C); 
+	}
+	
+	
+	// typedef struct Point {
+	// 	int x;
+	// 	int y;
+	// } Point ;
+	// 
+	// typedef struct Tag {
+	// 	int tag;
+	// } Tag ;
+	// 
+	// typedef struct Line {
+	// 	Point p1;
+	// 	Point p2;
+	// 	Tag t;
+	// } Line ;
+	//  
+	// int foo() {
+	// 	Point p1 = {.x = 1, .y = 2}; 
+	// 	 
+	// 	Line l1 = {.p1 = {.x = 1, .y = 2}, {.x = 1, .y = 2}, {.tag = 5}}; 
+	// 	Line l2 = {.t.tag = 9, .p1.x = 1, .p2.x = 3, .p1.y = 4, .p2.y = 9};
+	// 	
+	// 	Point points[] = {{.x=1, .y=1}, {.x=2, .y=2}};
+	// }   
+	public void _testBug210019_nestedDesignatedInitializers() throws Exception {
+		IASTTranslationUnit tu = parseAndCheckBindings(getAboveComment(), ParserLanguage.C);
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		
+		// Point p1        
+		assertField(col.getName(18).resolveBinding(), "x", "Point");
+		assertField(col.getName(19).resolveBinding(), "y", "Point");
+		
+		// Line l1
+		assertField(col.getName(22).resolveBinding(), "p1", "Line");
+		assertField(col.getName(23).resolveBinding(), "x", "Point");
+		assertField(col.getName(24).resolveBinding(), "y", "Point");
+		assertField(col.getName(25).resolveBinding(), "x", "Point");
+		assertField(col.getName(26).resolveBinding(), "y", "Point");
+		assertField(col.getName(27).resolveBinding(), "tag", "Tag");
+		
+		// Line l2
+		assertField(col.getName(30).resolveBinding(), "t",  "Line");
+		assertField(col.getName(31).resolveBinding(), "tag", "Tag");
+		assertField(col.getName(32).resolveBinding(), "p1", "Line");
+		assertField(col.getName(33).resolveBinding(), "x", "Point");
+		assertField(col.getName(34).resolveBinding(), "p2", "Line");
+		assertField(col.getName(35).resolveBinding(), "x", "Point");
+		assertField(col.getName(36).resolveBinding(), "p1", "Line");
+		assertField(col.getName(37).resolveBinding(), "y", "Point");
+		assertField(col.getName(38).resolveBinding(), "p2", "Line");
+		assertField(col.getName(39).resolveBinding(), "y", "Point");
+		
+		// Point points[]
+		assertField(col.getName(42).resolveBinding(), "x", "Point");
+		assertField(col.getName(43).resolveBinding(), "y", "Point");
+		assertField(col.getName(44).resolveBinding(), "x", "Point");
+		assertField(col.getName(45).resolveBinding(), "y", "Point");
+	}
+	
+	
+	// struct S1 { 
+	//   int i; 
+	//   float f;
+	//   int a[2];
+	// };
+	// 
+	// struct S1 x = {
+	//   .f=3.1, 
+	//   .i=2,
+	//   .a[1]=9
+	// };
+	//  
+	// struct S2 {
+	//   int x, y;
+	// };
+	// 
+	// struct S2 a1[3] = {1, 2, 3, 4, 5, 6};
+	// 
+	// struct S2 a2[3] =
+	// {{1, 2},{3, 4}, 5, 6};
+	// 
+	// struct S2 a3[3] =
+	// {
+	//   [2].y=6, [2].x=5,
+	//   [1].y=4, [1].x=3,
+	//   [0].y=2, [0].x=1
+	// };
+	//   
+	// struct S2 a4[3] =
+	// {
+	//   [0].x=1, [0].y=2,
+	//   {.x=3, .y=4},
+	//   5, [2].y=6
+	// };
+	// 
+	// struct S2 a5[3] =
+	// {
+	//   [2].x=5, 6,
+	//   [0].x=1, 2,
+	//   3, 4
+	// };
+	public void testBug210019_designatedInitializers() throws Exception {
+		IASTTranslationUnit tu = parseAndCheckBindings(getAboveComment(), ParserLanguage.C);
+		assertTrue(tu.isFrozen());
+		for (int i = 0; i < NUM_TESTS; i++) {
+			CNameCollector col = new CNameCollector();
+			tu.accept(col);
+			
+			assertField(col.getName(6).resolveBinding(), "f", "S1");
+			assertField(col.getName(7).resolveBinding(), "i", "S1");
+			assertField(col.getName(8).resolveBinding(), "a", "S1");
+			
+			assertField(col.getName(18).resolveBinding(), "y", "S2");
+			assertField(col.getName(19).resolveBinding(), "x", "S2");
+			assertField(col.getName(20).resolveBinding(), "y", "S2");
+			assertField(col.getName(21).resolveBinding(), "x", "S2");
+			assertField(col.getName(22).resolveBinding(), "y", "S2");
+			assertField(col.getName(23).resolveBinding(), "x", "S2");
+			
+			assertField(col.getName(26).resolveBinding(), "x", "S2");
+			assertField(col.getName(27).resolveBinding(), "y", "S2");
+			assertField(col.getName(28).resolveBinding(), "x", "S2");
+			assertField(col.getName(29).resolveBinding(), "y", "S2");
+			assertField(col.getName(30).resolveBinding(), "y", "S2");
+			
+			assertField(col.getName(33).resolveBinding(), "x", "S2");
+			assertField(col.getName(34).resolveBinding(), "x", "S2");
+
+			tu = validateCopy(tu);
+		}
+	}
+	
+	// extern "C" {
+	// extern "C" {
+	//    void externFunc();
+	// }
+	// }
+	// void test() {
+	//    externFunc();
+	// }
+	public void testBug183126_nestedLinkageSpecs() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
+	}
+	
+	// int* i= 0;
+	// void f1(const int**);
+	// void f2(int *const*);
+	// void f3(const int *const*);
+	//
+	// void test() {
+	//  f1(&i); // forbidden
+	//  f2(&i); // ok
+	//  f3(&i); // ok
+	// }
+	public void testBug213029_cvConversion() throws Exception {
+		IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.CPP, false); 
+		CNameCollector col = new CNameCollector();
+		tu.accept(col);
+		for (Object o : col.nameList) {
+			IASTName n = (IASTName)o; 
+			if (n.isReference() && "f1".equals(n.toString()))
+				assertTrue(n.resolveBinding() instanceof IProblemBinding);
+			else
+				assertFalse(n.resolveBinding() instanceof IProblemBinding);
+		}
+	}
+	
+	// void isTrue(int field, int bit) {
+	//    return ((field) & (bit));
+	// }
+	// void test() {
+	//   int foux=0, bhar=0;
+	//   foux = (foux) - bhar1;
+	// }
+	public void testBug100641_106279_castAmbiguity() throws Exception {
+		boolean cpp= false;
+		do {
+			BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), cpp);
+			ba.assertNonProblem("field)", 5);
+			ba.assertNonProblem("bit))", 3);
+			ba.assertNonProblem("foux)", 4);
+			cpp= !cpp;
+		} while (cpp);
+	}
+	
+	//    void f1(int& r) {}
+	//    void f2(const int& r) {}
+	//    void f3(volatile int& r) {}
+	//    void f4(const volatile int& r) {}
+	//
+	//    void ref() {
+	//    	int i= 1;
+	//    	const int ci= 1;
+	//    	volatile int vi= 2;
+	//    	const volatile int cvi = 3;
+	//    	
+	//    	f1(i);
+	//    	f1(ci); // should be an error
+	//    	f1(vi); // should be an error
+	//    	f1(cvi); // should be an error
+	//    	
+	//    	f2(i);
+	//    	f2(ci);
+	//    	f2(vi); // should be an error
+	//    	f2(cvi); // should be an error
+	//    	
+	//    	f3(i);
+	//    	f3(ci); // should be an error
+	//    	f3(vi);
+	//    	f3(cvi); // should be an error
+	//    	
+	//    	f4(i); 
+	//    	f4(ci);
+	//    	f4(vi);
+	//    	f4(cvi);
+	//    }
+	public void testBug222418_a() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("f1(i)",2);
+		ba.assertProblem("f1(ci)",  2);
+		ba.assertProblem("f1(vi)",  2);
+		ba.assertProblem("f1(cvi)", 2);
+		
+		ba.assertNonProblem("f2(i)", 2);
+		ba.assertNonProblem("f2(ci)",2);
+		ba.assertProblem("f2(vi)",   2);
+		ba.assertProblem("f2(cvi)",  2);
+		
+		ba.assertNonProblem("f3(i)", 2);
+		ba.assertProblem("f3(ci)",   2);
+		ba.assertNonProblem("f3(vi)",2);
+		ba.assertProblem("f3(cvi)",  2);
+		
+		ba.assertNonProblem("f4(i)",  2);
+		ba.assertNonProblem("f4(ci)", 2);
+		ba.assertNonProblem("f4(vi)", 2);
+		ba.assertNonProblem("f4(cvi)",2);
+	}
+	
+	//    void f1(int& r) {} // 1
+	//    void f1(const int& r) {} // 2 
+	//    void f1(volatile int& r) {} // 3
+	//    void f1(const volatile int& r) {} // 4
+	//
+	//    void ref() {
+	//    	int i= 1;
+	//    	const int ci= 1;
+	//    	volatile int vi= 2;
+	//    	const volatile int cvi = 3;
+	//    	
+	//    	f1(i); // (1)
+	//    	f1(ci); // (2) 
+	//    	f1(vi); // (3)
+	//    	f1(cvi); // (4)
+	//    }
+	public void testBug222418_b() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		
+		ICPPFunction f1_1= ba.assertNonProblem("f1(i)",  2, ICPPFunction.class);
+		ICPPFunction f1_2= ba.assertNonProblem("f1(ci)", 2, ICPPFunction.class);
+		ICPPFunction f1_3= ba.assertNonProblem("f1(vi)", 2, ICPPFunction.class);
+		ICPPFunction f1_4= ba.assertNonProblem("f1(cvi)",2, ICPPFunction.class);
+		
+		assertEquals(ASTTypeUtil.getParameterTypeString(f1_1.getType()), "(int &)");
+		assertEquals(ASTTypeUtil.getParameterTypeString(f1_2.getType()), "(const int &)");
+		assertEquals(ASTTypeUtil.getParameterTypeString(f1_3.getType()), "(volatile int &)");
+		assertEquals(ASTTypeUtil.getParameterTypeString(f1_4.getType()), "(const volatile int &)");
+	}
+	
+	//    void f1(int r) {} // 1
+	//    void f1(const int r) {} // 2 
+	//    void f1(volatile int r) {} // 3
+	//    void f1(const volatile int r) {} // 4
+	public void testBug222418_b_regression() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);    	
+		ba.assertNonProblem("f1(int",  2, ICPPFunction.class);
+		ba.assertProblem("f1(const i", 2);
+		ba.assertProblem("f1(vol", 2);
+		ba.assertProblem("f1(const v",2);
+	}
+	
+	//    void fa(int& r) {}
+	//    void fb(const int& r) {}
+	//    void fc(volatile int& r) {}
+	//    void fd(const volatile int& r) {}
+	//
+	//    int five() { return 5; }
+	//
+	//    void ref() {
+	//    	fa(5); // should be an error
+	//    	fb(5); // ok 
+	//    	fc(5); // should be an error
+	//    	fd(5); // should be an error
+	//
+	//    	fb(five()); // ok
+	//      fa(five()); // should be an error 
+	//    	fc(five()); // should be an error
+	//    	fd(five()); // should be an error
+	//    }
+	public void testBug222418_c() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);    	
+		
+		ICPPFunction fn= ba.assertNonProblem("five() {", 4, ICPPFunction.class);
+		assertFalse(fn.getType().getReturnType() instanceof IProblemBinding);
+		
+		ba.assertProblem("fa(5",  2);
+		ICPPFunction fb= ba.assertNonProblem("fb(5", 2, ICPPFunction.class);
+		ba.assertProblem("fc(5", 2);
+		ba.assertProblem("fd(5",2);
+		
+		ICPPFunction fb2= ba.assertNonProblem("fb(f", 2, ICPPFunction.class);
+		ba.assertProblem("fa(f",2);
+		ba.assertProblem("fc(f",2);
+		ba.assertProblem("fd(f",2);
+		
+		assertEquals(ASTTypeUtil.getParameterTypeString(fb.getType()), "(const int &)");
+		assertEquals(ASTTypeUtil.getParameterTypeString(fb2.getType()), "(const int &)");
+	}
+	
+	//	class X {
+	//		public:
+	//			X(int x) {}
+	//	};
+	//
+	//	void f_const(const X& x) {}
+	//	void f_nonconst(X& x) {}
+	//
+	//	void ref() {
+	//		f_const(2);    // ok
+	//		f_nonconst(2); // should be an error
+	//	}
+	public void testBug222418_d() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);    	
+		ba.assertNonProblem("f_const(2",  7, ICPPFunction.class);
+		ba.assertProblem("f_nonconst(2",  10);
+	}
+	
+	//	class A {};
+	//
+	//	void f1(A& r) {}
+	//	void f2(const A& r) {}
+	//	void f3(volatile A& r) {}
+	//	void f4(const volatile A& r) {}
+	//
+	//	void ref() {
+	//		A i= *new A();
+	//		const A ci= *new A();
+	//		volatile A vi= *new A();
+	//		const volatile A cvi = *new A();
+	//
+	//		f1(i);
+	//		f1(ci);  // should be an error
+	//		f1(vi);  // should be an error
+	//		f1(cvi); // should be an error
+	//
+	//		f2(i);
+	//		f2(ci);
+	//		f2(vi);  // should be an error
+	//		f2(cvi); // should be an error
+	//
+	//		f3(i);
+	//		f3(ci);  // should be an error
+	//		f3(vi);
+	//		f3(cvi); // should be an error
+	//
+	//		f4(i); 
+	//		f4(ci);
+	//		f4(vi);
+	//		f4(cvi);
+	//	}
+	public void testBug222418_e() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("f1(i)",2);
+		ba.assertProblem("f1(ci)",  2);
+		ba.assertProblem("f1(vi)",  2);
+		ba.assertProblem("f1(cvi)", 2);
+		
+		ba.assertNonProblem("f2(i)", 2);
+		ba.assertNonProblem("f2(ci)",2);
+		ba.assertProblem("f2(vi)",   2);
+		ba.assertProblem("f2(cvi)",  2);
+		
+		ba.assertNonProblem("f3(i)", 2);
+		ba.assertProblem("f3(ci)",   2);
+		ba.assertNonProblem("f3(vi)",2);
+		ba.assertProblem("f3(cvi)",  2);
+		
+		ba.assertNonProblem("f4(i)",  2);
+		ba.assertNonProblem("f4(ci)", 2);
+		ba.assertNonProblem("f4(vi)", 2);
+		ba.assertNonProblem("f4(cvi)",2);
+	}
+	
+	//	class B {};
+	//
+	//	class A {
+	//	public:
+	//		A() {}
+	//		A(const A&) {}
+	//		A(int i) {}
+	//		A(B b, int i=5) {}
+	//	};
+	//
+	//	class C {
+	//		public:
+	//			C() {}
+	//		operator A&() {return *new A();}
+	//	};
+	//
+	//	class D {
+	//		public:
+	//			D() {}
+	//		operator A() {return *new A();}
+	//	};
+	//
+	//
+	//	void foo1(A a) {}
+	//	void foo2(A& a) {}
+	//
+	//	int refs() {
+	//		A a;
+	//		B b;
+	//		C c;
+	//		D d;
+	//
+	//		foo1(a); 
+	//		foo2(a); // not copied
+	//
+	//		foo1(3); 
+	//		foo2(4); // should be an error (222418)
+	//
+	//		foo1(A(5));
+	//		foo2(A(6)); // should be an error (222418)
+	//
+	//		foo1(c);
+	//		foo2(c);
+	//
+	//		foo1(d);
+	//		foo2(d); // should be an error
+	//
+	//		foo1(b); 
+	//		foo2(b); // should be an error
+	//
+	//		return 0;
+	//	}
+	public void testBug222418_f() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true); 
+		ba.assertNonProblem("foo1(a)", 4);
+		ba.assertNonProblem("foo2(a)", 4);
+		ba.assertNonProblem("foo1(3)", 4);
+		ba.assertProblem("foo2(4)", 4);
+		ba.assertNonProblem("foo1(A(", 4);
+		ba.assertProblem("foo2(A(", 4);
+		ba.assertNonProblem("foo1(c)", 4);
+		ba.assertNonProblem("foo2(c)", 4);
+		ba.assertNonProblem("foo1(d)", 4);
+		ba.assertProblem("foo2(d)", 4);
+		ba.assertNonProblem("foo1(b)", 4);
+		ba.assertProblem("foo2(b)", 4);
+	}
+	
+	
+	// class A {};
+	// class B : public A {};
+	//
+	// void f(const A) {}
+	// void ref() {
+	//    B b;
+	//    const B& b2= b;
+	//    f(b2);
+	// }
+	public void testBug222418_g_regression() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("f(b2)", 1);
+	}
+	
+	// void f(int &i) {}
+	// void ref() {
+	//    int a=3;
+	//    int& r= a;
+	//    f(r);
+	// }
+	public void testBug222418_h_regression() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("f(r)", 1);
+	}
+	
+	// class A {};
+	// class B : public A {};
+	// void f(A &a) {}
+	// void ref() {
+	//    B b;
+	//    B& b2= b;
+	//    f(b2);
+	// }
+	public void testBug222418_i_regression() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("f(b2)", 1);
+	}
+	
+	//  // test adapted from IndexNamesTests.testReadWriteFlagsCpp()
+	// 
+	//	int ri, wi, rwi, ridebug;
+	//	int* rp; int* wp; int* rwp; 
+	//	int* const rpc= 0;
+	//	const int * const rcpc= 0;
+	//	void fi(int);
+	//	void fp(int*);
+	//	void fr(int&);
+	//	void fcp(const int*);
+	//	void fcr(const int&);
+	//	void fpp(int**);
+	//	void fpr(int*&);
+	//	void fcpp(int const**);
+	//	void fcpr(int const*&);
+	//	void fpcp(int *const*);
+	//	void fpcr(int *const&);
+	//	void fcpcp(int const *const*);
+	//	void fcpcr(int const *const&);
+	//
+	//	int test() {
+	//		fi(ri); fp(&rwi); fcp(&ri); 
+	//		fi(*rp); fp(rp); fcp(rp); fpp(&rwp); fpcp(&rpc); fcpcp(&rcpc); 
+	//		fr(rwi); fcr(ri);
+	//		fpcr(&rwi); fcpcr(&ri);
+	//		fpr(rwp); fpcr(rp); fcpcr(rp);
+	//		
+	//		fcpp(&rwp);     // should be error 
+	//		fpr(&rwi);      // should be error
+	//		fcpr(&ridebug); // should be error
+	//		fcpr(rwp);      // should be error
+	//		
+	//		return ri;
+	//	}
+	public void testBug222418_j() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		
+		ba.assertNonProblem("fi(ri)", 2);
+		ba.assertNonProblem("fp(&rwi)", 2);
+		ba.assertNonProblem("fcp(&ri)", 3);
+		
+		ba.assertNonProblem("fi(*rp)", 2);
+		ba.assertNonProblem("fp(rp)", 2);
+		ba.assertNonProblem("fcp(rp)", 3);
+		ba.assertNonProblem("fpp(&rwp)", 3);
+		ba.assertNonProblem("fpcp(&rpc)", 4);
+		ba.assertNonProblem("fcpcp(&rcpc)", 5);
+		
+		ba.assertNonProblem("fr(rwi)", 2);
+		ba.assertNonProblem("fcr(ri)", 3);
+		
+		ba.assertNonProblem("fpcr(&rwi)", 4);
+		ba.assertNonProblem("fcpcr(&ri)", 5);
+		
+		ba.assertNonProblem("fpr(rwp)", 3);
+		ba.assertNonProblem("fpcr(rp)", 4);
+		ba.assertNonProblem("fcpcr(rp)", 5);
+		
+		ba.assertProblem("fcpp(&rwp)", 4);
+		ba.assertProblem("fpr(&rwi)", 3);
+		ba.assertProblem("fcpr(&ridebug)", 4);
+		ba.assertProblem("fcpr(rwp)", 4);
+	}
+	
+	// class A {
+	//    public:
+	//       void foo() {}
+	//       void foo() const {}
+	// };
+	// void ref() {
+	//    A a;
+	//    a.foo();
+	// }
+	public void testBug222418_k_regression() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ba.assertNonProblem("foo();", 3);
+	}
+	
+	//	class B {};
+	//
+	//	class C { 
+	//	public: 
+	//		operator const B() const { return *new B();}
+	//	}; 
+	//
+	//	void foo(B b) {}
+	//
+	//	void refs() {
+	//		const C c= *new C();
+	//		const B b= *new B();
+	//
+	//		foo(b); 
+	//		foo(c); 
+	//	}
+	public void _testBug222444_a() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction foo1= ba.assertNonProblem("foo(b", 3, ICPPFunction.class);
+		ICPPFunction foo2= ba.assertNonProblem("foo(c", 3, ICPPFunction.class);
+	}
+	
+	//	class A {};
+	//  class B : public A {};
+	// 
+	//	class C { 
+	//	public: 
+	//		operator const B() { return *new B();}
+	//	}; 
+	//
+	//	void foo(A a) {}
+	//
+	//	void refs() {
+	//		C c= *new C();
+	// 
+	//		foo(c);
+	//	}
+	public void _testBug222444_b() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPFunction foo2= ba.assertNonProblem("foo(c", 3, ICPPFunction.class);
+	}
+	
+	// int a, b, c;
+	// void test() {
+	//    a= b ? : c;
+	// }
+	public void testOmittedPositiveExpression_Bug212905() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C);
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	// #define __inline__ __inline__ __attribute__((always_inline))
+	// typedef int __u32;
+	// static __inline__  __u32 f(int x) {
+	//   return x;
+	// }
+	public void testRedefinedGCCKeywords_Bug226112() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C, true);
+		parseAndCheckBindings(code, ParserLanguage.CPP, true);
+	}
+	
+	//	int foo asm ("myfoo") __attribute__((__used__)), ff asm("ss") = 2;
+	//	extern void func () asm ("FUNC") __attribute__((__used__)); 
+	public void testASMLabels_Bug226121() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C, true);
+		parseAndCheckBindings(code, ParserLanguage.CPP, true);
+	}
+	
+	// void test() {
+	//    ({1;}) != 0;
+	// }
+	public void testCompoundStatementExpression_Bug226274() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C, true);
+		parseAndCheckBindings(code, ParserLanguage.CPP, true);
+	}		
+	
+	// void test(int count) {
+	//    __typeof__(count) a= 1;
+	//    int ret0 = ((__typeof__(count)) 1);
+	// }
+	public void testTypeofUnaryExpression_Bug226492() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C, true);
+		parseAndCheckBindings(code, ParserLanguage.CPP, true);
+	}
+	
+	// void test(int count) {
+	//    typeof(count==1) a= 1;
+	// }
+	public void testTypeofExpression_Bug226492() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C, true);
+		parseAndCheckBindings(code, ParserLanguage.CPP, true);
+	}
+	
+	//	void func() {
+	//	  typeof(__attribute__((regparm(3)))void (*)(int *)) a;
+	//	} 
+	public void testTypeofExpressionWithAttribute_Bug226492() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C, true);
+		parseAndCheckBindings(code, ParserLanguage.CPP, true);
+	}
+	
+	// void test(int count) {
+	//    switch(count) {
+	//       case 1 ... 3: break;
+	//    }
+	// }
+	public void testCaseRange_Bug211882() throws Exception {
+		final String code = getAboveComment();
+		{
+			IASTTranslationUnit tu = parseAndCheckBindings(code, ParserLanguage.C, true);
+			IASTCompoundStatement body = (IASTCompoundStatement)((IASTFunctionDefinition)tu.getDeclarations()[0]).getBody();
+			IASTSwitchStatement switchStmt = (IASTSwitchStatement)body.getStatements()[0];
+			IASTCaseStatement caseStmt = (IASTCaseStatement)((IASTCompoundStatement)switchStmt.getBody()).getStatements()[0];
+			IASTBinaryExpression binExpr = (IASTBinaryExpression)caseStmt.getExpression();
+			assertTrue(binExpr.getOperator() == IASTBinaryExpression.op_ellipses);
+			assertTrue(binExpr.getOperand1() instanceof IASTLiteralExpression);
+			assertTrue(binExpr.getOperand2() instanceof IASTLiteralExpression);
+		}
+		{
+			IASTTranslationUnit tu = parseAndCheckBindings(code, ParserLanguage.CPP, true);
+			IASTCompoundStatement body = (IASTCompoundStatement)((IASTFunctionDefinition)tu.getDeclarations()[0]).getBody();
+			IASTSwitchStatement switchStmt = (IASTSwitchStatement)body.getStatements()[0];
+			IASTCaseStatement caseStmt = (IASTCaseStatement)((IASTCompoundStatement)switchStmt.getBody()).getStatements()[0];
+			IASTBinaryExpression binExpr = (IASTBinaryExpression)caseStmt.getExpression();
+			assertTrue(binExpr.getOperator() == IASTBinaryExpression.op_ellipses);
+			assertTrue(binExpr.getOperand1() instanceof IASTLiteralExpression);
+			assertTrue(binExpr.getOperand2() instanceof IASTLiteralExpression);
+		}
+	}
+	
+	//	typedef int* TIntPtr;
+	//	int x(int (int * a));
+	//	int x(int(TIntPtr));
+	public void testInfiniteRecursion_Bug269052() throws Exception {
+		final String code= getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C, true);
+		parseAndCheckBindings(code, ParserLanguage.CPP, true);
+	}
+	
+	//	template<typename T> class X {
+	//		typename T::t func() {
+	//			return typename T::t();
+	//		}
+	//	};
+	public void testTypenameInExpression() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	struct __attribute__((declspec)) bla;
+	public void testAttributeInElaboratedTypeSpecifier_Bug227085() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C, true);
+		parseAndCheckBindings(code, ParserLanguage.CPP, true);
+	}
+	
+	// struct X;
+	// void test(struct X* __restrict result);
+	public void testRestrictReference_Bug227110() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP, true);
+	}
+	
+	// char buf[256];
+	// int x= sizeof(buf)[0];
+	public void testSizeofUnaryWithParenthesis_Bug227122() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C);
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}	
+	
+	//	class X {
+	//		public:
+	//			void* operator new(unsigned int sz, char* buf) {return buf;}
+	//	};
+	//
+	//	char* buffer;
+	//	void test1() {
+	//		X* it = buffer == 0 ?  new (buffer) X : 0;
+	//	}
+	public void testPlacementNewInConditionalExpression_Bug227104() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}	
+	
+    // int f(x) {
+    //    return 0;
+    // }
+    public void testBug228422_noKnrParam() throws Exception {
+    	StringBuffer buffer = getContents(1)[0];
+    	parse(buffer.toString(), ParserLanguage.C, false);
+    }
+    
+    //    struct {
+    //    	char foo;
+    //    } myStruct, *myStructPointer;
+    //
+    //    union {
+    //    	char foo;
+    //    } myUnion, *myUnionPointer;
+    //
+    //    void test() {
+    //    	myStruct.foo=1;
+    //    	myStructPointer->foo=2;
+    //    	myUnion.foo=3;
+    //    	myUnionPointer->foo=4;
+    //
+    //    	myStruct.bar=1;
+    //    	myStructPointer->bar=2;
+    //    	myUnion.bar=3;
+    //    	myUnionPointer->bar=4;
+    //    }  
+    public void testBug228504_nonExistingMembers() throws Exception {
+    	boolean[] isCpps= {true, false};
+    	for (boolean isCpp : isCpps) {
+    		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), isCpp);
+    		for (int i=1; i < 5; i++) {
+				ba.assertNonProblem("foo=" + i, 3);
+				ba.assertProblem("bar=" + i, 3);
+			}
+		}
+    }
+    
+    //    struct S {
+    //    	int value; 
+    //    };
+    //    typedef struct S *PtrS; 
+    //    struct T {
+    //    	PtrS ptrS;  
+    //    };
+    //
+    //    void testint(int x);
+    //    void testptr(struct T* x);
+    //
+    //    void test() {
+    //    	struct T* t;
+    //    	t->ptrS->value;
+    //    	(t->ptrS+1)->value;
+    //    	testptr(t-0);
+    //    	testint(t-t);
+    //    	testint(0-t);
+    //    }  
+    public void testTypeOfPointerOperations() throws Exception {
+    	String code= getAboveComment();
+    	parseAndCheckBindings(code, ParserLanguage.C);
+    	parseAndCheckBindings(code, ParserLanguage.CPP);
+    }
+    
+    //    int globalArray[4] = {1,2,3,4};
+    //    void function1(); // decl
+    //
+    //    void function1() {
+    //        getArray()[0] = 1; 
+    //    }
+    //
+    //    void function2() {
+    //        function1(); // ref
+    //    }
+    public void testOutOfOrderResolution_Bug232300() throws Exception {
+    	final boolean[] isCpps= {false, true};
+    	String code= getAboveComment();
+    	for (boolean isCpp : isCpps) {
+    		BindingAssertionHelper ba= new BindingAssertionHelper(code, isCpp);
+    		IBinding b1= ba.assertNonProblem("function1(); // decl", 9);
+    		IBinding b2= ba.assertNonProblem("function1() {", 9);
+    		IBinding b3= ba.assertNonProblem("function1(); // ref", 9);
+    		assertSame(b1, b2);
+    		assertSame(b2, b3);
+		}
+    }
+    
+    // #define foo __typeof__((int*)0 - (int*)0)
+    // typedef foo ptrdiff_t;
+    public void testRedefinePtrdiff_Bug230895() throws Exception {
+    	final boolean[] isCpps= {false, true};
+    	String code= getAboveComment();
+    	for (boolean isCpp : isCpps) {
+    		BindingAssertionHelper ba= new BindingAssertionHelper(code, isCpp);
+    		IBinding b1= ba.assertNonProblem("ptrdiff_t", 9);
+    		assertInstance(b1, ITypedef.class);
+    		ITypedef td= (ITypedef) b1;
+    		IType t= td.getType();
+    		assertFalse(t instanceof ITypedef);
+		}    	
+    }
+    
+    // int a;
+    // int b= a; // ref
+    // struct S;
+    // typedef struct S S; // td
+    public void testRedefineStructInScopeThatIsFullyResolved() throws Exception {
+    	final boolean[] isCpps= {false, true};
+    	String code= getAboveComment();
+    	for (boolean isCpp : isCpps) {
+    		BindingAssertionHelper ba= new BindingAssertionHelper(code, isCpp);
+    		ba.assertNonProblem("a; // ref", 1);
+    		// now scope is fully resolved
+    		ICompositeType ct= ba.assertNonProblem("S;", 1, ICompositeType.class);
+    		ITypedef td= ba.assertNonProblem("S; // td", 1, ITypedef.class);
+    		IType t= td.getType();
+    		assertFalse(t instanceof IProblemBinding);
+    		assertSame(t, ct);
+		}    	
+    }
+    
+    //    void checkLong(long);
+    //    void test() {
+    //    	checkLong(__builtin_expect(1, 1));
+    //    }
+    public void testReturnTypeOfBuiltin_Bug234309() throws Exception {
+    	String code= getAboveComment();
+    	parseAndCheckBindings(code, ParserLanguage.C, true);
+    	parseAndCheckBindings(code, ParserLanguage.CPP, true);
+    }
+    
+    //    typedef void VOID;
+    //    VOID func(VOID) {
+    //    }
+    public void testTypedefVoid_Bug221567() throws Exception {
+    	final boolean[] isCpps= {false, true};
+    	String code= getAboveComment();
+    	for (boolean isCpp : isCpps) {
+    		BindingAssertionHelper ba= new BindingAssertionHelper(code, isCpp);
+    		ITypedef td= ba.assertNonProblem("VOID;", 4, ITypedef.class);
+    		IBinding ref= ba.assertNonProblem("VOID)", 4);
+    		assertSame(td, ref);
+    		
+    		IFunction func= ba.assertNonProblem("func", 4, IFunction.class);
+    		IFunctionType ft= func.getType();
+    		IType rt= ft.getReturnType();
+    		IType[] pts= ft.getParameterTypes();
+    		assertEquals(1, pts.length);
+			IType pt = pts[0];
+			assertInstance(rt, ITypedef.class);
+			assertInstance(pt, ITypedef.class);
+			rt= ((ITypedef)rt).getType();
+			pt= ((ITypedef)pt).getType();
+
+			assertTrue(rt instanceof IBasicType);
+    		assertEquals(IBasicType.t_void, ((IBasicType)rt).getType());
+    		assertTrue(pt instanceof IBasicType);
+    		assertEquals(IBasicType.t_void, ((IBasicType)pt).getType());
+    	}
+    }
+    
+    //    #define str(s) # s
+    //
+    //    void foo() {
+    //    	printf(str(this is a // this should go away
+    //    	string));	
+    //    }
+    public void testCommentInExpansion_Bug84276() throws Exception {
+    	IASTTranslationUnit tu= parseAndCheckBindings(getAboveComment());
+    	IASTFunctionDefinition func= (IASTFunctionDefinition) tu.getDeclarations()[0];
+    	
+    	IASTFunctionCallExpression fcall= (IASTFunctionCallExpression) ((IASTExpressionStatement)((IASTCompoundStatement) func.getBody()).getStatements()[0]).getExpression();
+    	IASTLiteralExpression lit= (IASTLiteralExpression) fcall.getParameterExpression();
+    	assertEquals("\"this is a string\"", lit.toString());
+    }
+    
+    // typedef int tint;
+    // tint f1(tint (tint));
+    // int f2(int (int));
+    // int f3(int (tint));
+    // int f4(int (identifier));
+    // int f5(int *(tint[10])); 
+    public void testParamWithFunctionType_Bug84242() throws Exception {
+    	final String comment= getAboveComment();
+    	final boolean[] isCpps= {false, true};
+    	for (boolean isCpp : isCpps) {
+        	BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp);
+
+        	IFunction f= ba.assertNonProblem("f1", 2, IFunction.class);
+        	isTypeEqual(f.getType(), "int (int (int) *)");
+
+        	f= ba.assertNonProblem("f2", 2, IFunction.class);
+        	isTypeEqual(f.getType(), "int (int (int) *)");
+
+        	f= ba.assertNonProblem("f3", 2, IFunction.class);
+        	isTypeEqual(f.getType(), "int (int (int) *)");
+
+        	f= ba.assertNonProblem("f4", 2, IFunction.class);
+        	isTypeEqual(f.getType(), "int (int)");
+        	
+        	f= ba.assertNonProblem("f5", 2, IFunction.class);
+        	isTypeEqual(f.getType(), "int (int * (int *) *)");
+    	}
+    }
+
+    // class C { };
+    // void f1(int(C)) { }     
+    public void testParamWithFunctionTypeCpp_Bug84242() throws Exception {
+    	BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+
+    	IFunction f= ba.assertNonProblem("f1", 2, IFunction.class);
+    	isTypeEqual(f.getType(), "void (int (C) *)");
+    }
+
+    // int (*f1(int par))[5] {};
+    // int (*f1 (int par))[5];
+    public void testFunctionReturningPtrToArray_Bug216609() throws Exception {
+    	final String comment= getAboveComment();
+    	final boolean[] isCpps= {false, true};
+    	for (boolean isCpp : isCpps) {
+    		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), isCpp);
+
+    		IFunction f= ba.assertNonProblem("f1", 2, IFunction.class);
+    		isTypeEqual(f.getType(), "int [] * (int)");
+    		
+    		f= ba.assertNonProblem("f1 ", 2, IFunction.class);
+    		isTypeEqual(f.getType(), "int [] * (int)");
+    	}
+    }
+    
+    // void f1() {}
+    // void (f2)() {}
+    // void (f3()) {}
+    // void ((f4)()) {}
+    // void f1();
+    // void (f2)();
+    // void (f3());
+    // void ((f4)());
+    public void testNestedFunctionDeclarators() throws Exception {
+    	final String comment= getAboveComment();
+    	final boolean[] isCpps= {false, true};
+    	for (ParserLanguage lang: ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parseAndCheckBindings(comment, lang);
+    		IASTFunctionDefinition fdef= getDeclaration(tu, 0);
+    		IASTDeclarator dtor= fdef.getDeclarator();
+    		assertNull(dtor.getNestedDeclarator());
+    		assertInstance(dtor.getParent(), IASTFunctionDefinition.class);
+    		assertInstance(dtor.getName().resolveBinding(), IFunction.class);
+
+    		fdef= getDeclaration(tu, 1);
+    		dtor= fdef.getDeclarator();
+    		assertNotNull(dtor.getNestedDeclarator());
+    		assertInstance(dtor.getParent(), IASTFunctionDefinition.class);
+    		assertInstance(dtor.getNestedDeclarator().getName().resolveBinding(), IFunction.class);
+
+    		fdef= getDeclaration(tu, 2);
+    		dtor= fdef.getDeclarator();
+    		assertNull(dtor.getNestedDeclarator());
+    		assertInstance(dtor.getParent().getParent(), IASTFunctionDefinition.class);
+    		assertInstance(dtor.getName().resolveBinding(), IFunction.class);
+
+    		fdef= getDeclaration(tu, 3);
+    		dtor= fdef.getDeclarator();
+    		assertNotNull(dtor.getNestedDeclarator());
+    		assertInstance(dtor.getParent().getParent(), IASTFunctionDefinition.class);
+    		assertInstance(dtor.getNestedDeclarator().getName().resolveBinding(), IFunction.class);
+
+    		IASTSimpleDeclaration sdef= getDeclaration(tu, 4);
+    		IBinding binding= sdef.getDeclarators()[0].getName().resolveBinding();
+    		assertInstance(binding, IFunction.class);
+    		assertEquals(2, tu.getDeclarationsInAST(binding).length);
+    		
+    		sdef= getDeclaration(tu, 5);
+    		binding= sdef.getDeclarators()[0].getNestedDeclarator().getName().resolveBinding();
+    		assertInstance(binding, IFunction.class);
+    		assertEquals(2, tu.getDeclarationsInAST(binding).length);
+
+    		sdef= getDeclaration(tu, 6);
+    		binding= sdef.getDeclarators()[0].getNestedDeclarator().getName().resolveBinding();
+    		assertInstance(binding, IFunction.class);
+    		assertEquals(2, tu.getDeclarationsInAST(binding).length);
+
+    		sdef= getDeclaration(tu, 7);
+    		binding= sdef.getDeclarators()[0].getNestedDeclarator().getNestedDeclarator().getName().resolveBinding();
+    		assertInstance(binding, IFunction.class);
+    		assertEquals(2, tu.getDeclarationsInAST(binding).length);
+    	}
+    }
+
+    //  void f() {                    
+    //    int a,b;                     
+    //    { b; a; int a; }              
+    //  }
+    public void testLocalVariableResolution_Bug235831() throws Exception {
+    	final String comment= getAboveComment();
+    	final boolean[] isCpps= {false, true};
+    	for (boolean isCpp : isCpps) {
+    		BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp);
+
+    		ba.assertNonProblem("b; a", 1, IVariable.class);	// fill cache of inner block
+    		IVariable v3= ba.assertNonProblem("a; }", 1, IVariable.class);
+    		IVariable v2= ba.assertNonProblem("a; int", 1, IVariable.class);
+    		IVariable v1= ba.assertNonProblem("a,", 1, IVariable.class);
+    		assertSame(v1, v2);
+    		assertNotSame(v2, v3);
+    	}
+    }
+    
+    // int foo(int (*ptr) (int, int));
+    public void testComplexParameterBinding_Bug214482() throws Exception {
+    	final String comment= getAboveComment();
+    	final boolean[] isCpps= {false, true};
+    	for (boolean isCpp : isCpps) {
+    		BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp);
+    		IParameter p= ba.assertNonProblem("ptr", 3, IParameter.class);
+    		assertEquals("ptr", p.getName());
+    	}
+    }
+    
+    // void test() {}
+    // +
+    public void testTrailingSyntaxErrorInTU() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang, false, false);
+    		IASTDeclaration decl= getDeclaration(tu, 0);
+    		IASTProblemDeclaration pdecl= getDeclaration(tu, 1);
+    		assertEquals("+", pdecl.getRawSignature());
+    	}
+    }
+
+    // struct X {
+    // int test;
+    // +
+    // };
+    public void testTrailingSyntaxErrorInCompositeType() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang, false, false);
+    		IASTCompositeTypeSpecifier ct= getCompositeType(tu, 0);
+    		IASTDeclaration decl= getDeclaration(ct, 0);
+    		IASTProblemDeclaration pdecl= getDeclaration(ct, 1);
+    		assertEquals("+", pdecl.getRawSignature());
+    	}
+    }
+    
+    // void func() {
+    //    {
+    //       int test;
+    //       +
+    //    }
+    // }
+    public void testTrailingSyntaxErrorInCompoundStatements() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang, false, false);
+    		IASTFunctionDefinition def= getDeclaration(tu, 0);
+    		IASTCompoundStatement compStmt= getStatement(def, 0);
+    		IASTDeclarationStatement dstmt= getStatement(compStmt, 0);
+    		IASTProblemStatement pstmt= getStatement(compStmt, 1);
+    		assertEquals("+", pstmt.getRawSignature());
+    	}
+    }
+    
+    // struct X {
+    //  ;
+    // };
+    // ;
+    public void testEmptyDeclarations() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang, false, false);
+    		IASTCompositeTypeSpecifier ct= getCompositeType(tu, 0);
+    		IASTDeclaration empty= getDeclaration(ct, 0);
+    		assertEquals(";", empty.getRawSignature());
+    		empty= getDeclaration(tu, 1);
+    		assertEquals(";", empty.getRawSignature());
+    	}
+    }
+    
+    // void test() {
+    //    int foux = 3;
+    //    switch(foux)    // no brace!
+    //       case 0:
+    //       case 1:
+    //          foux= 0;
+    //    foux= 1;
+    // }
+    public void testSwitchWithoutCompound_Bug105334() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang);
+    		IASTFunctionDefinition fdef= getDeclaration(tu, 0);
+    		IASTSwitchStatement sw= getStatement(fdef, 1);
+    		IASTStatement stmt= getStatement(fdef, 2);
+    		assertEquals("foux= 1;", stmt.getRawSignature());
+    	}
+    }
+    
+    // typedef int t;
+    // int a,b;
+    // void test() {
+    
+    // b* (t)+a *b	 		// b,t,a,unary+,cast,*,b,*
+    // b*(a) + a*b			// b,a,*,a,b,*,+
+    // b* (t)-a *b 			// b,t,a,unary-,cast,*,b,*
+    // b*(a) - a*b			// b,a,*,a,b,*,-
+    // b* (t)*a *b 			// b,t,a,unary*,cast,*,b,*
+    // b*(a) * a * b		// b,a,*,a,*,b,*
+    // b == (t)&a < b 		// b,t,a,unary&,cast,b,<,==
+    // b < (t)&a == b 		// b,t,a,unary&,cast,<,b,==
+    // b==(a) & a<b			// b,a,==,a,b,<,&
+    // +(t)+1				// t,1,unary+,cast,unary+
+    // +(a)+1				// a,unary+,1,+
+    // sizeof +(t)+1       	// t,1,unary+,cast,unary+,sizeof
+    // sizeof +(a)+1       	// a,unary+,sizeof,1,+
+    // b* (t)(t)+a * b		// b,t,t,a,unary+,cast,cast,*,b,*
+    // b* (t)(a)+a * b		// b,t,a,cast,*,a,b,*,+
+    // (int)(t)+1 		    // int,t,1,unary+,cast,cast
+    // (int)(a)+1 		    // int,a,cast,1,+
+    // a*a*(t)+a*a*a		// a,a,*,t,a,unary+,cast,*,a,*,a,*
+    // (typeof a)(t)-a  	// typeof a,t,a,unary-,cast,cast
+    // (typeof a)(a)-a  	// typeof a,a,cast,a,-
+    public void testBinaryVsCastAmbiguities_Bug237057() throws Exception {
+    	StringBuffer[] input= getContents(2);
+    	String code= input[0].toString();
+    	String[] samples= input[1].toString().split("\n");
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		for (String s : samples) {
+				final String[] io= s.split("//");
+	    		final String exprStr = io[0].trim();
+	    		final IASTTranslationUnit tu= parse(code + exprStr + ";}", lang);
+	    		final IASTFunctionDefinition fdef= getDeclaration(tu, 2);
+	    		IASTExpression expr= getExpressionOfStatement(fdef, 0);
+				assertEquals("expr: " + exprStr, io[1].trim(), polnishNotation(expr));
+	    		assertEquals(exprStr, expr.getRawSignature());
+	    		checkOffsets(exprStr, expr);
+			}
+    	}
+    }
+
+    // struct s {int b;};
+    // typedef int t;
+    // struct s* a;
+    // struct s* f(struct s*);
+    // void test() {
+    
+    // (t)(a)	 			// t,a,cast
+    // (f)(a)				// f,a,()
+    // (t)(t)(a)			// t,t,a,cast,cast
+    // (t)(f)(a)			// t,f,a,(),cast
+    // (f)(a)(a)			// f,a,(),a,()
+    // (t)(f)(a)++			// t,f,a,(),++,cast
+    // (t)(t)(a)++			// t,t,a,++,cast,cast
+    // (t)(f)(a)--			// t,f,a,(),--,cast
+    // (t)(t)(a)--			// t,t,a,--,cast,cast
+    // (t)(f)(a)[0]			// t,f,a,(),0,[],cast
+    // (t)(t)(a)[0]			// t,t,a,0,[],cast,cast
+    // (t)(f)(a)->b			// t,f,a,(),b,->,cast
+    // (t)(t)(a)->b			// t,t,a,b,->,cast,cast
+    // (t)(a)+1				// t,a,cast,1,+
+    // (f)(a)+1				// f,a,(),1,+
+    // (t)(t)+1				// t,t,1,unary+,cast,cast
+    public void testCastVsFunctionCallAmbiguities_Bug237057() throws Exception {
+    	StringBuffer[] input= getContents(2);
+    	String code= input[0].toString();
+    	String[] samples= input[1].toString().split("\n");
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		for (String s : samples) {
+				final String[] io= s.split("//");
+	    		final String exprStr = io[0].trim();
+	    		final IASTTranslationUnit tu= parse(code + exprStr + ";}", lang);
+	    		final IASTFunctionDefinition fdef= getDeclaration(tu, 4);
+	    		IASTExpression expr= getExpressionOfStatement(fdef, 0);
+				assertEquals("expr: " + exprStr, io[1].trim(), polnishNotation(expr));
+	    		assertEquals(exprStr, expr.getRawSignature());
+	    		checkOffsets(exprStr, expr);
+			}
+    	}
+    }
+
+	private void checkOffsets(String exprStr, IASTExpression expr) {
+		if (expr instanceof IASTBinaryExpression) {
+			IASTBinaryExpression bexpr= (IASTBinaryExpression) expr;
+			checkOffsets(exprStr, bexpr.getOperand1());
+			checkOffsets(exprStr, bexpr.getOperand2());
+			assertEquals("in expr: " + exprStr, offset(bexpr), offset(bexpr.getOperand1()));
+			assertTrue("in expr: " + exprStr, endOffset(bexpr.getOperand1()) < offset(bexpr.getOperand2()));
+			assertEquals("in expr: " + exprStr, endOffset(bexpr), endOffset(bexpr.getOperand2()));
+		} else if (expr instanceof IASTCastExpression) {
+			IASTCastExpression castExpr= (IASTCastExpression) expr;
+			checkOffsets(exprStr, castExpr.getOperand());
+			assertTrue("in expr: " + exprStr, offset(castExpr) < offset(castExpr.getTypeId()));
+			assertTrue("in expr: " + exprStr, endOffset(castExpr.getTypeId()) < offset(castExpr.getOperand()));
+			assertEquals("in expr: " + exprStr, endOffset(castExpr), endOffset(castExpr.getOperand()));
+		} else if (expr instanceof IASTUnaryExpression) {
+			IASTUnaryExpression unaryExpr= (IASTUnaryExpression) expr;
+			checkOffsets(exprStr, unaryExpr.getOperand());
+			switch (unaryExpr.getOperator()) {
+			case IASTUnaryExpression.op_bracketedPrimary:
+				assertTrue("in expr: " + exprStr, offset(unaryExpr) < offset(unaryExpr.getOperand()));
+				assertTrue("in expr: " + exprStr, endOffset(unaryExpr.getOperand()) < endOffset(unaryExpr));
+				break;
+			case IASTUnaryExpression.op_postFixDecr:
+			case IASTUnaryExpression.op_postFixIncr:
+				assertEquals("in expr: " + exprStr, offset(expr), offset(unaryExpr.getOperand()));
+				assertTrue("in expr: " + exprStr, endOffset(unaryExpr.getOperand()) < endOffset(expr));
+				break;
+			default:
+				assertTrue("in expr: " + exprStr, offset(unaryExpr) < offset(unaryExpr.getOperand()));
+				assertEquals("in expr: " + exprStr, endOffset(unaryExpr), endOffset(unaryExpr.getOperand()));
+				break;
+			}
+		} 
+	}
+
+	private int offset(IASTNode expr) {
+		return ((ASTNode) expr).getOffset();
+	}
+
+	private int endOffset(IASTNode expr) {
+		return ((ASTNode) expr).getOffset() + ((ASTNode) expr).getLength();
+	}
+
+	private String polnishNotation(IASTExpression expr) {
+		StringBuilder buf= new StringBuilder();
+		polnishNotation(expr, buf);
+		return buf.toString();
+	}
+
+	private void polnishNotation(IASTExpression expr, StringBuilder buf) {
+		if (expr instanceof IASTBinaryExpression) {
+			IASTBinaryExpression bexpr= (IASTBinaryExpression) expr;
+			polnishNotation(bexpr.getOperand1(), buf);
+			buf.append(',');
+			polnishNotation(bexpr.getOperand2(), buf);
+			buf.append(',');
+			buf.append(ASTSignatureUtil.getBinaryOperatorString(bexpr));
+		} else if (expr instanceof IASTCastExpression) {
+			IASTCastExpression castExpr= (IASTCastExpression) expr;
+			buf.append(castExpr.getTypeId().getRawSignature());
+			buf.append(',');
+			polnishNotation(castExpr.getOperand(), buf);
+			buf.append(",cast");
+		} else if (expr instanceof IASTFunctionCallExpression) {
+			IASTFunctionCallExpression f= (IASTFunctionCallExpression) expr;
+			polnishNotation(f.getFunctionNameExpression(), buf);
+			buf.append(',');
+			polnishNotation(f.getParameterExpression(), buf);
+			buf.append(",()");
+		} else if (expr instanceof IASTArraySubscriptExpression) {
+			IASTArraySubscriptExpression f= (IASTArraySubscriptExpression) expr;
+			polnishNotation(f.getArrayExpression(), buf);
+			buf.append(',');
+			polnishNotation(f.getSubscriptExpression(), buf);
+			buf.append(",[]");
+		} else if (expr instanceof IASTFieldReference) {
+			IASTFieldReference f= (IASTFieldReference) expr;
+			polnishNotation(f.getFieldOwner(), buf);
+			buf.append(',');
+			buf.append(f.getFieldName().toString());
+			buf.append(',');
+			buf.append(f.isPointerDereference() ? "->" : ".");
+		} else if (expr instanceof IASTUnaryExpression) {
+			IASTUnaryExpression unaryExpr= (IASTUnaryExpression) expr;
+			polnishNotation(unaryExpr.getOperand(), buf);
+			switch (unaryExpr.getOperator()) {
+			case IASTUnaryExpression.op_amper:
+			case IASTUnaryExpression.op_plus:
+			case IASTUnaryExpression.op_minus:
+			case IASTUnaryExpression.op_star:
+				buf.append(",unary");
+				buf.append(ASTSignatureUtil.getUnaryOperatorString(unaryExpr));
+				break;
+			case IASTUnaryExpression.op_bracketedPrimary:
+				break;
+			default:
+				buf.append(',');
+				buf.append(ASTSignatureUtil.getUnaryOperatorString(unaryExpr));
+				break;
+			}
+		} else {
+			buf.append(expr.getRawSignature());
+		}
+	}
+	
+	//	typedef struct {
+	//		int x;
+	//	} spinlock_t;
+	//	spinlock_t _lock = (spinlock_t) {  }; 
+	public void testCompoundInitializer_bug145387() throws Exception  {
+		// valid in C99, not in C++.
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.C, true);
+	}
+	
+	// enum __declspec(uuid("uuid")) bla { a, b};
+	public void testDeclspecInEnumSpecifier_bug241203() throws Exception  {
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			parseAndCheckBindings(getAboveComment(), lang, true);
+		}
+	}
+	
+	// struct Outer {
+	//    struct {int a1;}; 
+	//    struct {int a2;} a3;
+	// };
+	// void test() {
+	//    struct Outer o;
+	//    o.a1=0; o.a2=0; o.a3=0;
+	// }
+	public void testAnonymousUnionMember() throws Exception {
+		final boolean[] isCpps= {false, true};
+		for (boolean isCpp : isCpps) {
+			BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), isCpp);
+			bh.assertNonProblem("a1=", 2);
+			bh.assertProblem("a2=", 2);
+			bh.assertNonProblem("a3=", 2);
+		}
+	}
+	
+	// void test() {
+	//    char* p;
+	//    if (__builtin_types_compatible_p(typeof(p), char[])) {
+	//    }
+	// }
+	public void testBuiltinTypesCompatible_bug241570() throws Exception  {
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			parseAndCheckBindings(getAboveComment(), lang, true);
+		}
+	}
+	
+	//	void alloc(const char * id) {}
+	//	void test() {
+	//	    alloc(__func__); 
+	//	}
+	public void testPredefinedFunctionName_Bug247747() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.C, false);
+	}
+
+	//	void alloc(const char * id) {}
+	//	void test() {
+	//	    alloc(__func__); 
+	//	    alloc(__FUNCTION__); 
+	//	    alloc(__PRETTY_FUNCTION__); 
+	//	}
+	public void testPredefinedFunctionNameGcc_Bug247747() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.C, true);
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP, true);
+	}
+	
+	//	int foo = 42;
+	//  typedef char StupidType;
+	//  StupidType const *bar = (StupidType const*)&foo;
+	public void testUnusualDeclSpecOrdering_Bug251514() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.C, true);
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP, true);
+	}
+	
+	//	#define IF      if
+	//	#define IF_P    if (
+	//	#define IF_P_T  if (1
+	//	#define SEMI_IF ; if 
+	//	#define IF_COND if (1)
+	//  void test() {
+	public void testLeadingSyntax_Bug250251() throws Exception {
+		String code= getAboveComment();
+
+		IASTTranslationUnit tu= parseAndCheckBindings(code + "if (1) {};}");
+		IASTFunctionDefinition f= getDeclaration(tu, 0);
+		IASTIfStatement i = getStatement(f, 0);
+		IASTExpression x= i.getConditionExpression();
+		IToken syntax= x.getLeadingSyntax();
+		checkToken(syntax, "if", -4); syntax= syntax.getNext();
+		checkToken(syntax, "(", -1);  syntax= syntax.getNext();
+		assertNull(syntax);
+
+		tu= parseAndCheckBindings(code + "if(  1) {}}");
+		f= getDeclaration(tu, 0); i= getStatement(f, 0); x= i.getConditionExpression();
+		syntax= x.getLeadingSyntax();
+		checkToken(syntax, "if", -5); syntax= syntax.getNext();
+		checkToken(syntax, "(", -3);  syntax= syntax.getNext();
+		assertNull(syntax);
+
+		tu= parseAndCheckBindings(code + "if(1) ; else ;}");
+		f= getDeclaration(tu, 0); i= getStatement(f, 0); IASTStatement est= i.getElseClause();
+		syntax= est.getLeadingSyntax();
+		checkToken(syntax, "else", -5); syntax= syntax.getNext();
+		assertNull(syntax);
+
+		tu= parseAndCheckBindings(code + "IF(1) {}}");
+		f= getDeclaration(tu, 0); i= getStatement(f, 0); x= i.getConditionExpression();
+		syntax= x.getLeadingSyntax();
+		checkToken(syntax, "IF", -3); syntax= syntax.getNext();
+		checkToken(syntax, "(", -1);  syntax= syntax.getNext();
+		assertNull(syntax);
+
+		tu= parseAndCheckBindings(code + "IF_P 1) {}}");
+		f= getDeclaration(tu, 0); i= getStatement(f, 0); x= i.getConditionExpression();
+		syntax= x.getLeadingSyntax();
+		checkToken(syntax, "IF_P", -5); syntax= syntax.getNext();
+		assertNull(syntax);
+
+		tu= parseAndCheckBindings(code + "IF_P_T ) {}}");
+		f= getDeclaration(tu, 0); i= getStatement(f, 0); x= i.getConditionExpression();
+		try {
+			syntax= x.getLeadingSyntax();
+			fail();
+		} catch (ExpansionOverlapsBoundaryException e) {}
+
+		tu= parseAndCheckBindings(code + "SEMI_IF (1) {}}");
+		f= getDeclaration(tu, 0); i= getStatement(f, 1); x= i.getConditionExpression();
+		try {
+			syntax= x.getLeadingSyntax();
+			fail();
+		} catch (ExpansionOverlapsBoundaryException e) {}
+
+		tu= parseAndCheckBindings(code + "IF_COND {}}");
+		f= getDeclaration(tu, 0); i= getStatement(f, 0); x= i.getConditionExpression();
+		try {
+			syntax= x.getLeadingSyntax();
+			fail();
+		} catch (ExpansionOverlapsBoundaryException e) {}
+	}
+
+	//  #define P(x) )
+	//	#define BLOCK() {}
+	//  #define T_P 1)
+	//  #define P_BLOCK ){}
+	//	#define IF_COND if (1)
+	//  void test() {
+	public void testTrailingSyntax_Bug250251() throws Exception {
+		String code= getAboveComment();
+
+		IASTTranslationUnit tu= parseAndCheckBindings(code + "if (1) {};}");
+		IASTFunctionDefinition f= getDeclaration(tu, 0);
+		IASTIfStatement i = getStatement(f, 0);
+		IASTExpression x= i.getConditionExpression();
+		IToken syntax= x.getTrailingSyntax();
+		checkToken(syntax, ")", 0); syntax= syntax.getNext();
+		assertNull(syntax);
+		
+		tu= parseAndCheckBindings(code + "do {} while(1 );}");
+		f= getDeclaration(tu, 0); IASTDoStatement dstmt= getStatement(f, 0); x= dstmt.getCondition();
+		syntax= x.getTrailingSyntax();
+		checkToken(syntax, ")", 1);  syntax= syntax.getNext();
+		checkToken(syntax, ";", 2);  syntax= syntax.getNext();
+		assertNull(syntax);
+		
+
+		tu= parseAndCheckBindings(code + "if(1 ) BLOCK()}");
+		f= getDeclaration(tu, 0); i= getStatement(f, 0); x= i.getConditionExpression();
+		syntax= x.getTrailingSyntax();
+		checkToken(syntax, ")", 1);  syntax= syntax.getNext();
+		assertNull(syntax);
+
+		tu= parseAndCheckBindings(code + "if(1 P(0) {}}");
+		f= getDeclaration(tu, 0); i= getStatement(f, 0); x= i.getConditionExpression();
+		syntax= x.getTrailingSyntax();
+		checkToken(syntax, "P", 1); syntax= syntax.getNext();
+		checkToken(syntax, "(", 2); syntax= syntax.getNext();
+		checkToken(syntax, "0", 3); syntax= syntax.getNext();
+		checkToken(syntax, ")", 4); syntax= syntax.getNext();
+		assertNull(syntax);
+
+		tu= parseAndCheckBindings(code + "if (T_P {}}");
+		f= getDeclaration(tu, 0); i= getStatement(f, 0); x= i.getConditionExpression();
+		try {
+			syntax= x.getTrailingSyntax();
+			fail();
+		} catch (ExpansionOverlapsBoundaryException e) {}
+
+		tu= parseAndCheckBindings(code + "if (1 P_BLOCK }");
+		f= getDeclaration(tu, 0); i= getStatement(f, 0); x= i.getConditionExpression();
+		try {
+			syntax= x.getTrailingSyntax();
+			fail();
+		} catch (ExpansionOverlapsBoundaryException e) {
+		}
+
+		tu= parseAndCheckBindings(code + "IF_COND {}}");
+		f= getDeclaration(tu, 0); i= getStatement(f, 0); x= i.getConditionExpression();
+		try {
+			syntax= x.getTrailingSyntax();
+			fail();
+		} catch (ExpansionOverlapsBoundaryException e) {
+		}
+	}
+	
+	//	#define IF      if
+	//	#define IF_P    if (
+	//	#define IF_P_T  if (1
+	//	#define SEMI_IF ; if 
+	//	#define IF_COND if (1)
+	//  void test() {
+	public void testSyntax_Bug250251() throws Exception {
+		String code= getAboveComment();
+
+		IASTTranslationUnit tu= parseAndCheckBindings(code + "if (1) {};}");
+		IASTFunctionDefinition f= getDeclaration(tu, 0);
+		IASTIfStatement x = getStatement(f, 0);
+		IToken syntax= x.getSyntax();
+		checkToken(syntax, "if", 0); syntax= syntax.getNext();
+		checkToken(syntax, "(",  3);  syntax= syntax.getNext();
+		checkToken(syntax, "1",  4);  syntax= syntax.getNext();
+		checkToken(syntax, ")",  5);  syntax= syntax.getNext();
+		checkToken(syntax, "{",  7);  syntax= syntax.getNext();
+		checkToken(syntax, "}",  8);  syntax= syntax.getNext();
+		assertNull(syntax);
+
+		tu= parseAndCheckBindings(code + "if(  1) {}}");
+		f= getDeclaration(tu, 0); x= getStatement(f, 0); 
+		syntax= x.getSyntax();
+		checkToken(syntax, "if", 0); syntax= syntax.getNext();
+		checkToken(syntax, "(", 2);  syntax= syntax.getNext();
+		checkToken(syntax, "1",  5);  syntax= syntax.getNext();
+		checkToken(syntax, ")",  6);  syntax= syntax.getNext();
+		checkToken(syntax, "{",  8);  syntax= syntax.getNext();
+		checkToken(syntax, "}",  9);  syntax= syntax.getNext();
+		assertNull(syntax);
+
+		tu= parseAndCheckBindings(code + "IF(1) {}}");
+		f= getDeclaration(tu, 0); x= getStatement(f, 0);
+		syntax= x.getSyntax();
+		checkToken(syntax, "IF", 0); syntax= syntax.getNext();
+		checkToken(syntax, "(",  2);  syntax= syntax.getNext();
+		checkToken(syntax, "1",  3);  syntax= syntax.getNext();
+		checkToken(syntax, ")",  4);  syntax= syntax.getNext();
+		checkToken(syntax, "{",  6);  syntax= syntax.getNext();
+		checkToken(syntax, "}",  7);  syntax= syntax.getNext();
+		assertNull(syntax);
+
+		tu= parseAndCheckBindings(code + "SEMI_IF (1) {}}");
+		f= getDeclaration(tu, 0); x= getStatement(f, 1);
+		try {
+			syntax= x.getSyntax();
+			fail();
+		} catch (ExpansionOverlapsBoundaryException e) {
+		}
+	}
+
+	private void checkToken(IToken token, String image, int offset) {
+		assertEquals(image, token.getImage());
+		assertEquals(offset, token.getOffset());
+		assertEquals(image.length(), token.getLength());		
+	}
+	
+	//	void test() {
+	//	   int x,y;
+	//	   x
+	//     << 
+	//     y;
+	// }
+	public void testSyntaxWithNL_Bug280175() throws Exception {
+		String code= getAboveComment();
+		int offsetX= code.indexOf('x', code.indexOf('x')+1);
+		int offsetShift= code.indexOf('<');
+		int offsetY= code.indexOf('y', offsetX);
+		
+		IASTTranslationUnit tu= parseAndCheckBindings(code);
+		IASTFunctionDefinition f= getDeclaration(tu, 0);
+		IASTExpressionStatement i = getStatement(f, 1);
+		final IASTBinaryExpression expr = (IASTBinaryExpression) i.getExpression();
+		IASTExpression x= expr.getOperand1();
+		IASTExpression y= expr.getOperand2();
+		
+		IToken syntax= x.getTrailingSyntax();
+		checkToken(syntax, "<<", offsetShift-offsetX-1); syntax= syntax.getNext();
+		assertNull(syntax);
+
+		syntax= y.getLeadingSyntax();
+		checkToken(syntax, "<<", offsetShift - offsetY); syntax= syntax.getNext();
+		assertNull(syntax);
+
+		syntax= expr.getSyntax();
+		checkToken(syntax, "x", 0); syntax= syntax.getNext();
+		checkToken(syntax, "<<", offsetShift-offsetX); syntax= syntax.getNext();
+		checkToken(syntax, "y", offsetY-offsetX); syntax= syntax.getNext();
+		assertNull(syntax);
+	}
+
+	// int a= 1+2-3*4+10/2; // -4
+	// int b= a+4;
+	// int* c= &b;
+	// enum X {e0, e4=4, e5, e2=2, e3};
+	public void testValues() throws Exception {
+		final String code= getAboveComment();
+		boolean isCpp= false;
+		do {
+			BindingAssertionHelper bh= new BindingAssertionHelper(code, false);
+			IVariable v= (IVariable) bh.assertNonProblem("a=", 1);
+			checkValue(v.getInitialValue(), -4);
+			v= (IVariable) bh.assertNonProblem("b=", 1);
+			checkValue(v.getInitialValue(), 0);
+			v= (IVariable) bh.assertNonProblem("c=", 1);
+			assertNull(v.getInitialValue().numericalValue());
+
+			IEnumerator e= (IEnumerator) bh.assertNonProblem("e0", 2);
+			checkValue(e.getValue(), 0);
+			e= (IEnumerator) bh.assertNonProblem("e2", 2);
+			checkValue(e.getValue(), 2);
+			e= (IEnumerator) bh.assertNonProblem("e3", 2);
+			checkValue(e.getValue(), 3);
+			e= (IEnumerator) bh.assertNonProblem("e4", 2);
+			checkValue(e.getValue(), 4);
+			e= (IEnumerator) bh.assertNonProblem("e5", 2);
+			checkValue(e.getValue(), 5);
+			isCpp= !isCpp;
+		} while (isCpp);
+	}
+
+	private void checkValue(IValue initialValue, int i) {
+		assertNotNull(initialValue);
+		final Long numericalValue = initialValue.numericalValue();
+		assertNotNull(numericalValue);
+		assertEquals(i, numericalValue.intValue());
+	}
+	
+	//	void myfunc(char *arg) {}
+	//	void (*funcVar2)(char *) = myfunc;
+	//	void caller() {
+	//	   myfunc("");
+	//	}
+	public void testReferencesInInitializer_Bug251514() throws Exception {
+		final String code = getAboveComment();
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			IASTTranslationUnit tu= parseAndCheckBindings(code, lang, true);
+			IASTFunctionDefinition fdef= getDeclaration(tu, 0);
+			IASTName name= fdef.getDeclarator().getName();
+			assertEquals(2, tu.getReferences(name.resolveBinding()).length);
+		}
+	}
+
+	// void test() {
+	//    const void* p = &"string";
+	// }
+	public void testAdressOfStringLiteral_Bug252970() throws Exception {
+		final String code = getAboveComment();
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			parseAndCheckBindings(code, lang);
+		}
+	}
+	
+	// int a[]= {
+	
+	// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+	
+	// };
+	public void testScalabilityOfLargeTrivialInitializer_Bug253690() throws Exception {
+		sValidateCopy= false;
+		final int AMOUNT= 250000;
+		final StringBuffer[] input = getContents(3);
+		StringBuilder buf= new StringBuilder();
+		buf.append(input[0].toString());
+		final String line= input[1].toString();
+		for (int i = 0; i < AMOUNT/10; i++) {
+			buf.append(line);
+		}
+		buf.append(input[2].toString());
+		final String code= buf.toString();
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			long mem= memoryUsed();
+			IASTTranslationUnit tu= parse(code, lang, false, true, true);
+			long diff= memoryUsed()-mem;
+			// allow a copy of the buffer + not even 1 byte per initializer
+			final int expected = code.length()*2 + AMOUNT/2;  
+			assertTrue(String.valueOf(diff) + " expected < " + expected, diff < expected);
+			assertTrue(tu.isFrozen());
+		}
+	}
+
+	private long memoryUsed() throws InterruptedException {
+		System.gc();Thread.sleep(200);System.gc();
+		final Runtime runtime = Runtime.getRuntime();
+		return runtime.totalMemory()-runtime.freeMemory();
+	}
+
+	// int n= 0;
+	// int a[]= {0x00, sizeof(n)};
+	public void testNonTrivialInitializer_Bug253690() throws Exception {
+		final String code= getAboveComment();
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			IASTTranslationUnit tu= parse(code, lang, false, true, true);
+			IASTSimpleDeclaration d= getDeclaration(tu, 0);
+			IBinding b= d.getDeclarators()[0].getName().resolveBinding();
+			IASTName[] refs = tu.getReferences(b);
+			assertEquals(1, refs.length);
+		}
+	}
+
+	// void test() {
+	//    const void* p = 1+2;
+	// }
+	public void testGetChildren_Bug256127() throws Exception {
+		final String code = getAboveComment();
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			IASTNode node= parseAndCheckBindings(code, lang);
+			
+			IASTNode[] children= node.getChildren();
+			assertEquals(1, children.length);
+			assertInstance(children[0], IASTFunctionDefinition.class);
+			
+			children= children[0].getChildren();
+			assertEquals(3, children.length);
+			assertInstance(children[0], IASTDeclSpecifier.class);
+			assertInstance(children[1], IASTDeclarator.class);
+			assertInstance(children[2], IASTCompoundStatement.class);
+			
+			children= children[2].getChildren();
+			assertEquals(1, children.length);
+			assertInstance(children[0], IASTDeclarationStatement.class);
+
+			children= children[0].getChildren()[0].getChildren();  // skip declaration
+			assertEquals(2, children.length);
+			assertInstance(children[0], IASTDeclSpecifier.class);
+			assertInstance(children[1], IASTDeclarator.class);
+
+			children= children[1].getChildren();  
+			assertEquals(3, children.length);
+			assertInstance(children[0], IASTPointerOperator.class);
+			assertInstance(children[1], IASTName.class);
+			assertInstance(children[2], IASTInitializer.class);
+
+			children= children[2].getChildren()[0].getChildren(); // skip binary expression  
+			assertEquals(2, children.length);
+			assertInstance(children[0], IASTLiteralExpression.class);
+			assertInstance(children[1], IASTLiteralExpression.class);
+			
+			assertEquals(0, children[0].getChildren().length);
+		}
+	}
+	
+	//	struct s {
+	//		int (mem);
+	//	};
+	//	void foo() {
+	//		struct s v;
+	//		v.mem = 1;
+	//	}
+	public void testNestedDeclarator_Bug257540() throws Exception {
+		final String code= getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C);
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	//	typedef struct {
+	//	    float a;
+	//	    int b;
+	//	} cs;
+	//	void x(void) {
+	//	    cs foo;
+	//	    foo = ((cs) {1.2,1});
+	//	}
+	public void testCompoundLiterals_Bug258496() throws Exception {
+		final String code= getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C);
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	// void f1(const int* p);
+	// void f2(const int* p) {}
+	public void testDroppingOfStorageDecl_293322() throws Exception {
+		final String code = getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, false);
+		IFunction f= bh.assertNonProblem("f1", 2);
+		assertEquals("const int *", ASTTypeUtil.getType(f.getParameters()[0].getType()));
+		f= bh.assertNonProblem("f2", 2);
+		assertEquals("const int *", ASTTypeUtil.getType(f.getParameters()[0].getType()));
+	}
+
+	// __thread int i;
+	// static __thread int j;
+	// extern __thread int k;
+	public void testThreadLocalVariables_Bug260387() throws Exception {
+		final String code= getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C, true);
+		parseAndCheckBindings(code, ParserLanguage.CPP, true);
+	}
+	
+	// void test() {
+	//    int a,b;
+	//    if ((a)+b);
+	// }
+	public void testAmbiguityResolutionInIfCondition_Bug261043() throws Exception {
+		final String code= getAboveComment();
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			IASTTranslationUnit tu= parseAndCheckBindings(code, lang, true);
+			IASTFunctionDefinition fdef= getDeclaration(tu, 0);
+			IASTIfStatement ifstmt= getStatement(fdef, 1);
+			IASTExpression expr= ifstmt.getConditionExpression();
+			assertInstance(expr, IASTBinaryExpression.class);
+		}
+	}
+	
+	// typedef int TInt;
+	// struct X {
+	//    const TInt; // declaration without name
+	//    const a;    // declares a;
+	// };
+	public void testAmbiguousDeclaration_Bug259373() throws Exception {
+		final String code= getAboveComment();
+		IASTTranslationUnit tu= parseAndCheckBindings(code, ParserLanguage.C, true);
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, false);
+		ITypedef td= bh.assertNonProblem("TInt; //", 4);
+		IField f= bh.assertNonProblem("a;", 1);
+	}
+	
+	//	struct beta {
+	//		int glob;
+	//	};
+	//	void foo() {
+	//		struct beta* pg;
+	//		struct beta;
+	//		struct beta* pl;
+	//
+	//		struct beta {
+	//			char loc;
+	//		};
+	//		pg->glob= 0;
+	//		pl->loc= 1;
+	//	}
+	public void testLocalVsGlobalStruct_Bug255973() throws Exception {
+		final String code= getAboveComment();
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			IASTTranslationUnit tu= parseAndCheckBindings(code, lang, true);
+		}
+	}
+	
+	// typedef struct A A;
+	// struct A; // struct
+	// struct A* a;
+	public void testTypedefWithSameName() throws Exception {
+		final String code= getAboveComment();
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			IASTTranslationUnit tu= parseAndCheckBindings(code, lang, true);
+			
+			BindingAssertionHelper ba= new BindingAssertionHelper(code, lang == ParserLanguage.CPP);
+			ITypedef t= ba.assertNonProblem("A;", 1);
+			ICompositeType s1= ba.assertNonProblem("A; // struct", 1);
+			ICompositeType s2= ba.assertNonProblem("A*", 1);
+			assertSame(s1, s2);
+			assertSame(s1, t.getType());
+		}
+	}
+	
+    // typedef int TInt;
+    // int a= TInt; //ref 
+    public void testTypeAsExpressionIsProblem_261175() throws Exception {
+		final String code= getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
+		bh.assertProblem("TInt; //ref", 4);
+
+		bh= new BindingAssertionHelper(code, false);
+		bh.assertProblem("TInt; //ref", 4);
+    }
+    
+    // typedef int x, y;
+    // void func(int c) {
+    //    c= sizeof(x(y));
+    //    x(y);
+    // }
+    public void testSizeofFunctionType_252243() throws Exception {
+		final String code= getAboveComment();
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			BindingAssertionHelper ba= new BindingAssertionHelper(code, lang == ParserLanguage.CPP);
+			ba.assertProblem("y));", 1);
+			IVariable v= ba.assertNonProblem("y);", 1);
+		}
+    }
+    
+    // int* v;
+    public void testPointerOperatorsAsChildren_260461() throws Exception {
+		final String code= getAboveComment();
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			IASTTranslationUnit tu= parseAndCheckBindings(code, lang, true);
+			IASTSimpleDeclaration decl= getDeclaration(tu, 0);
+			IASTDeclarator dtor= decl.getDeclarators()[0];
+			IASTNode[] nodes = dtor.getChildren();
+			assertEquals(2, nodes.length);
+			assertInstance(nodes[0], IASTPointerOperator.class);
+		}
+    }
+    
+
+    //  int a = -142;
+    //  int b = 456L;
+    //  int c = 100000LL;
+    //  int d = 0U;
+    //  int e = 1UL;
+    //  int f = 9u;
+    //  int g = 1234l;
+    //  int h = -123ll;
+    //  int i = 8888uL;
+    public void testBug269705_int_literal() throws Exception {
+		final String code= getAboveComment();
+		
+		for (ParserLanguage lang : ParserLanguage.values()) {
+			IASTTranslationUnit tu = parseAndCheckBindings(code, lang);
+			IASTDeclaration[] declarations = tu.getDeclarations();
+			
+			// int a = -142;
+			{ 
+    			IBasicType t = getTypeForDeclaration(declarations, 0);
+				assertTrue(t.getType() == IBasicType.t_int);
+				assertFalse(t.isUnsigned());
+				assertFalse(t.isSigned());
+				assertFalse(t.isLong());
+				assertFalse(isLongLong(t));
+			}
+			
+			// int b = 456L;
+			{
+    			IBasicType t = getTypeForDeclaration(declarations, 1);
+				assertTrue(t.getType() == IBasicType.t_int);
+				assertFalse(t.isUnsigned());
+				assertFalse(t.isSigned());
+				assertTrue(t.isLong());
+				assertFalse(isLongLong(t));
+			}
+			
+			// int c = 100000LL;
+			{
+    			IBasicType t = getTypeForDeclaration(declarations, 2);
+				assertTrue(t.getType() == IBasicType.t_int);
+				assertFalse(t.isUnsigned());
+				assertFalse(t.isSigned());
+				assertFalse(t.isLong());
+				assertTrue(isLongLong(t));
+			}
+			
+			// int d = 0U;
+			{
+    			IBasicType t = getTypeForDeclaration(declarations, 3);
+				assertTrue(t.getType() == IBasicType.t_int);
+				assertTrue(t.isUnsigned());
+				assertFalse(t.isSigned());
+				assertFalse(isLongLong(t));
+				assertFalse(t.isLong());
+
+			}
+			
+			// int e = 1UL;
+			{
+    			IBasicType t = getTypeForDeclaration(declarations, 4);
+				assertTrue(t.getType() == IBasicType.t_int);
+				assertTrue(t.isUnsigned());
+				assertFalse(t.isSigned());
+				assertTrue(t.isLong());
+				assertFalse(isLongLong(t));
+			}
+			
+			// int f = 9u;
+			{
+    			IBasicType t = getTypeForDeclaration(declarations, 5);
+				assertTrue(t.getType() == IBasicType.t_int);
+				assertTrue(t.isUnsigned());
+				assertFalse(t.isSigned());
+				assertFalse(isLongLong(t));
+				assertFalse(t.isLong());
+
+			}
+			
+			// int g = 1234l;
+			{
+    			IBasicType t = getTypeForDeclaration(declarations, 6);
+				assertTrue(t.getType() == IBasicType.t_int);
+				assertFalse(t.isUnsigned());
+				assertFalse(t.isSigned());
+				assertTrue(t.isLong());
+				assertFalse(isLongLong(t));
+			}
+			
+			// int h = -123ll;
+			{
+    			IBasicType t = getTypeForDeclaration(declarations, 7);
+				assertTrue(t.getType() == IBasicType.t_int);
+				assertFalse(t.isUnsigned());
+				assertFalse(t.isSigned());
+				assertFalse(t.isLong());
+				assertTrue(isLongLong(t));
+			}
+			
+			// int i = 8888uL;
+			{
+    			IBasicType t = getTypeForDeclaration(declarations, 8);
+				assertTrue(t.getType() == IBasicType.t_int);
+				assertTrue(t.isUnsigned());
+				assertFalse(t.isSigned());
+				assertTrue(t.isLong());
+				assertFalse(isLongLong(t));
+			}
+		}
+    }
+    
+    
+    //  int a = -142.0;
+    //  int b = 456.1f;
+    //  int c = 100000.99F;
+    //  int d = 0.123l;
+    //  int e = 1.3L;
+    public void testBug269705_float_literal() throws Exception {
+    	final String code= getAboveComment();
+
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu = parseAndCheckBindings(code, lang);
+    		IASTDeclaration[] declarations = tu.getDeclarations();
+
+    		// int a = -142.0;
+    		{
+    			IBasicType t = getTypeForDeclaration(declarations, 0);
+    			assertTrue(t.getType() == IBasicType.t_double);
+    			assertFalse(t.isSigned());
+    			assertFalse(t.isUnsigned());
+    			assertFalse(t.isLong());
+    			assertFalse(isLongLong(t));
+    		}
+
+    		//  int b = 456.1f;
+    		{
+    			IBasicType t = getTypeForDeclaration(declarations, 1);
+    			assertTrue(t.getType() == IBasicType.t_float);
+    			assertFalse(t.isSigned());
+    			assertFalse(t.isUnsigned());
+    			assertFalse(t.isLong());
+    			assertFalse(isLongLong(t));
+    		}
+
+    		// int c = 100000.99F;
+    		{
+    			IBasicType t = getTypeForDeclaration(declarations, 2);
+    			assertTrue(t.getType() == IBasicType.t_float);
+    			assertFalse(t.isSigned());
+    			assertFalse(t.isUnsigned());
+    			assertFalse(t.isLong());
+    			assertFalse(isLongLong(t));
+    		}
+
+    		// int d = 0.123l;
+    		{
+    			IBasicType t = getTypeForDeclaration(declarations, 3);
+    			assertTrue(t.getType() == IBasicType.t_double);
+    			assertFalse(t.isSigned());
+    			assertFalse(t.isUnsigned());
+    			assertFalse(isLongLong(t));
+    			assertTrue(t.isLong());
+    		}
+
+    		// int e = 1.3L;
+    		{
+    			IBasicType t = getTypeForDeclaration(declarations, 4);
+    			assertTrue(t.getType() == IBasicType.t_double);
+    			assertFalse(t.isSigned());
+    			assertFalse(t.isUnsigned());
+    			assertTrue(t.isLong());
+    			assertFalse(isLongLong(t));
+    		}
+    	}
+    }
+
+    boolean isLongLong(IType t) throws DOMException {
+     	if (t instanceof ICBasicType) {
+    		return ((ICBasicType) t).isLongLong();
+    	}
+    	if (t instanceof IGPPBasicType) {
+    		return ((IGPPBasicType) t).isLongLong();
+    	}
+    	return false;
+    }
+    
+	/**
+	 * @param declarations
+	 * @param index
+	 * @return
+	 */
+	private IBasicType getTypeForDeclaration(IASTDeclaration[] declarations, int index) {
+		IASTInitializer init = ((IASTSimpleDeclaration)declarations[index]).getDeclarators()[0].getInitializer();
+		return (IBasicType)((IASTInitializerExpression)init).getExpression().getExpressionType();
+	}
+	
+	
+	//	void test() {
+	//	    __DATE__;
+	//	    __FILE__;
+	//	    __LINE__;
+	//	    __STDC_HOSTED__;
+	//	    __STDC_VERSION__;
+	//	    __TIME__;
+	//	}
+	public void testPredefinedMacroNamesC() throws Exception {
+		parseAndCheckBindings(getAboveComment(), ParserLanguage.C);
+	}
+	
+	//
+	//  int MyGlobal[10];
+	//
+	public void testBug273797() throws Exception {
+		IASTTranslationUnit tu = parseAndCheckBindings(getAboveComment(), ParserLanguage.C);
+		IASTName n = ((IASTSimpleDeclaration)tu.getDeclarations()[0]).getDeclarators()[0].getName();
+		IVariable v = (IVariable) n.resolveBinding();
+		
+		ICArrayType t = (ICArrayType)v.getType();
+		assertFalse(t.isConst());
+		assertFalse(t.isRestrict());
+		assertFalse(t.isVolatile());
+		assertFalse(t.isVariableLength());
+		assertFalse(t.isStatic());
+
+		IASTExpression e = t.getArraySizeExpression();
+		assertNotNull(e);
+		assertTrue(e instanceof IASTLiteralExpression);
+	}
+
+	// void f () __attribute__ ((int));
+	public void testAttributeSyntax_298841() throws Exception {
+        final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C, true);
+		parseAndCheckBindings(code, ParserLanguage.CPP, true);
+	}
+	//	enum myenum { value1, value2, value3 };
+	//
+	//	void test() {
+	//	        (int) value1;
+	//	}
+	public void testBug278797() throws Exception {
+		IASTTranslationUnit tu = parseAndCheckBindings(getAboveComment(), ParserLanguage.C);
+		IASTFunctionDefinition func = (IASTFunctionDefinition)tu.getDeclarations()[1];
+		IASTExpressionStatement stmt = ((IASTExpressionStatement)((IASTCompoundStatement)func.getBody()).getStatements()[0]);
+		IType t = ((IASTCastExpression)stmt.getExpression()).getOperand().getExpressionType();
+		assertNotNull(t);
+		assertTrue(t instanceof IEnumeration);
+	}
+	
+	
+	// /*Check that sizes are stored correctly in chains of IArrayType*/
+	//int a[2][3] = {{1,2,3},{4,5,6}};
+	//int b[3][2] = {{1,2},{3,4},{5,6}};
+	//
+	public void testBug277458() throws Exception {
+		for(ParserLanguage lang : ParserLanguage.values()) {
+			IASTTranslationUnit tu = parseAndCheckBindings(getAboveComment(), lang);
+			assertTrue(tu.isFrozen());
+			//int a[2][3] = {{1,2,3},{4,5,6}};
+			{
+				IASTDeclaration d = tu.getDeclarations()[0];
+				IBinding b = ((IASTSimpleDeclaration)d).getDeclarators()[0].getName().resolveBinding();
+				IType t = ((IVariable)b).getType();
+				assertTrue(t instanceof IArrayType);
+				IArrayType at1 = (IArrayType)t;
+				IASTExpression size1 = at1.getArraySizeExpression();
+				assertTrue(at1.getType() instanceof IArrayType);
+				IArrayType at2 = (IArrayType) at1.getType();
+				IASTExpression size2 = at2.getArraySizeExpression();
+				assertTrue(size1 instanceof IASTLiteralExpression);
+				assertEquals(((IASTLiteralExpression)size1).getValue()[0], '2');
+				assertTrue(size2 instanceof IASTLiteralExpression);
+				assertEquals(((IASTLiteralExpression)size2).getValue()[0], '3');
+			}
+			//int b[3][2] = {{1,2},{3,4},{5,6}};
+			{
+				IASTDeclaration d = tu.getDeclarations()[1];
+				IBinding b = ((IASTSimpleDeclaration)d).getDeclarators()[0].getName().resolveBinding();
+				IType t = ((IVariable)b).getType();
+				assertTrue(t instanceof IArrayType);
+				IArrayType at1 = (IArrayType)t;
+				IASTExpression size1 = at1.getArraySizeExpression();
+				assertTrue(at1.getType() instanceof IArrayType);
+				IArrayType at2 = (IArrayType) at1.getType();
+				IASTExpression size2 = at2.getArraySizeExpression();
+				assertTrue(size1 instanceof IASTLiteralExpression);
+				assertEquals(((IASTLiteralExpression)size1).getValue()[0], '3');
+				assertTrue(size2 instanceof IASTLiteralExpression);
+				assertEquals(((IASTLiteralExpression)size2).getValue()[0], '2');
+			}
+		}
+	}
+	
+	
+	// /* Check that a parameter declared as a typedef'd array 
+	//  * is treated as a pointer
+	//  */
+	//typedef int my_buf[16];
+	//void goo(my_buf in);
+	//
+	public void testBug284248() throws Exception {
+	    for(ParserLanguage lang : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parseAndCheckBindings(getAboveComment(), lang);
+            assertTrue(tu.isFrozen());
+            IASTName n = ((IASTSimpleDeclaration)tu.getDeclarations()[1]).getDeclarators()[0].getName();
+            assertTrue(((IFunction)n.resolveBinding()).getType().getParameterTypes()[0] instanceof IPointerType);
+	    }
+	}
+	//
+	// extern void goo();
+	// struct MyStruct {
+	//      int a;
+	//      void (*ptr)();
+	// };
+	// void foo() {
+	//     struct MyStruct structure;
+	//     structure.a = 1;
+	//     structure.ptr = goo;
+	// }
+	//
+	public void testBindingsOnFields() throws Exception {
+	    IASTTranslationUnit tu = parse(getAboveComment(), ParserLanguage.C, false);
+	    IASTCompoundStatement bodyStmt  = (IASTCompoundStatement)((IASTFunctionDefinition)tu.getDeclarations()[2]).getBody();
+
+	    // Get the IFields bindings from the type used in the declaration of structure
+	    IASTName n = ((IASTSimpleDeclaration)((IASTDeclarationStatement)bodyStmt.getStatements()[0]).getDeclaration()).getDeclarators()[0].getName();
+	    ICompositeType t = (ICompositeType)((IVariable)n.resolveBinding()).getType();
+	    IField[] fields = t.getFields();
+	    assertTrue( fields.length ==2 );
+
+	    // Get the IField for the first assignment
+	    IASTFieldReference ref1 = (IASTFieldReference)((IASTBinaryExpression)((IASTExpressionStatement)bodyStmt.getStatements()[1]).getExpression()).getOperand1();
+	    IBinding field1 = ref1.getFieldName().resolveBinding();
+	    
+	    // Get the IField for the second assignment
+	    IASTFieldReference ref2 = (IASTFieldReference)((IASTBinaryExpression)((IASTExpressionStatement)bodyStmt.getStatements()[2]).getExpression()).getOperand1();
+	    IBinding field2 = ref2.getFieldName().resolveBinding();
+
+	    // Compare the IField from the type and the assignments
+	    assertEquals( fields[0], field1);
+	    assertEquals( fields[1], field2); // fails
+	    
+	    assertEquals(1, ((ICInternalBinding) field1).getDeclarations().length);
+	    assertEquals(1, ((ICInternalBinding) field2).getDeclarations().length);
+	}
+	
+	
+	
+    //	/*
+    //	 * Check that the type returned by CASTArraySubscriptExpression
+    //	 * handles typedefs correctly.
+    //	 *
+    //	 */
+    //	struct s {
+    //	    int a;
+    //	};
+    //	typedef struct s* ptr;
+    //	typedef struct s array[10];
+	//  typedef array newArray;
+    //	ptr var1;
+    //	struct s* var2;
+    //	array var3;
+    //	struct s var4[10];
+    //  newArray var5;
+    //
+    //	void foo() {
+	//      /* The type of the arraysubscript expression should be struct s 
+	//       * each of the following statements
+	//       */
+    //	    var1[1].a  = 1;
+    //	    var2[1].a  = 1;
+    //	    var3[1].a  = 1;
+    //	    var4[1].a  = 1;
+	//	    var5[1].a  = 1;
+    //	}
+	public void testArraySubscriptExpressionGetExpressionType() throws Exception {
+	    for(ParserLanguage lang : ParserLanguage.values()) {
+	        IASTTranslationUnit tu = parseAndCheckBindings(getAboveComment(), lang);
+	        assertTrue(tu.isFrozen());
+	        for (IASTDeclaration d : tu.getDeclarations()) {
+	            if (d instanceof IASTFunctionDefinition) {
+	                for (IASTStatement s : ((IASTCompoundStatement)((IASTFunctionDefinition)d).getBody()).getStatements()) {
+	                    IASTExpression op1 = ((IASTBinaryExpression)((IASTExpressionStatement)s).getExpression()).getOperand1();
+	                    IASTExpression owner = ((IASTFieldReference)op1).getFieldOwner();
+	                    IType t = owner.getExpressionType();
+	                    assertTrue( t instanceof ICompositeType );
+	                    assertEquals( "s",((ICompositeType)t).getName());
+	                }
+	            }
+	        }
+	    }
+	}
+	
+	
+	
+	
+	//
+	// /* check that enumerator values are evaluated correctly for
+	//  * conditional expressions */
+	//
+	//enum
+	//{
+	//    _ISalnum = 11 < 8 ? 1 : 2,
+	//    _ISalnum2 = 11 > 8 ? 1 : 2
+	//};
+	//
+	public void testBug295851() throws Exception {
+	    for(ParserLanguage lang : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parseAndCheckBindings(getAboveComment(), lang);
+            IASTEnumerationSpecifier enumSpec = (IASTEnumerationSpecifier)((IASTSimpleDeclaration)tu.getDeclarations()[0]).getDeclSpecifier();
+            IEnumerator enumeratorBinding = (IEnumerator)enumSpec.getEnumerators()[0].getName().resolveBinding();
+            IValue value = enumeratorBinding.getValue();
+            assertEquals( 2, value.numericalValue().longValue());
+            IEnumerator enumeratorBinding2 = (IEnumerator)enumSpec.getEnumerators()[1].getName().resolveBinding();
+            IValue value2 = enumeratorBinding2.getValue();
+            assertEquals( 1, value2.numericalValue().longValue());
+	    }
+	}
+	
+	//	static a[2]= {0,0};
+	public void testSkipAggregateInitializer_297550() throws Exception {
+        final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.C, false, true);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2UtilOldTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2UtilOldTests.java
new file mode 100644
index 0000000..2311033
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2UtilOldTests.java
@@ -0,0 +1,449 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTInitializerExpression;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+
+public class AST2UtilOldTests extends AST2BaseTest {
+	public AST2UtilOldTests() {
+	}
+	public AST2UtilOldTests(String name) {
+		super(name);
+	}
+	// Kind PRIMARY_EMPTY : void
+	public void testPrimaryEmpty() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int x = f();".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "f()" ); //$NON-NLS-1$
+	}	
+	// Kind PRIMARY_INTEGER_LITERAL : int 
+	public void testPrimaryIntegerLiteral() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int x = f(1, 2+3);".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "f(1, 2 + 3)" ); //$NON-NLS-1$
+	}	
+	// Kind PRIMARY_CHAR_LITERAL : char
+	public void testPrimaryCharLiteral() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int x = f('c');".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "f('c')" ); //$NON-NLS-1$
+	}	
+	// Kind PRIMARY_FLOAT_LITERAL : float
+	public void testPrimaryFloatLiteral() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int x = f(1.13);".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "f(1.13)" ); //$NON-NLS-1$
+	}	
+	// Kind PRIMARY_STRING_LITERAL : char*
+	public void testPrimaryStringLiteral() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int x = f(\"str\");".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "f(\"str\")" ); //$NON-NLS-1$
+	}	
+	// Kind PRIMARY_BOOLEAN_LITERAL : bool
+	public void testPrimaryBooleanLiteral() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int x = f(true);".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "f(true)" ); //$NON-NLS-1$
+	}
+	// Kind PRIMARY_THIS : type of inner most enclosing structure scope
+	public void testPrimaryThis() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int x = f(this);".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "f(this)" ); //$NON-NLS-1$
+	}	
+	// Kind PRIMARY_BRACKETED_EXPRESSION : LHS
+	public void testPrimaryBracketedExpression() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int x = f(1, (2+3));".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "f(1, (2 + 3))" ); //$NON-NLS-1$
+	}
+	// Kind ID_EXPRESSION : type of the ID
+	public void testIdExpression() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int x = f(a);".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "f(a)" ); //$NON-NLS-1$
+	}	
+	// Kind POSTFIX_SUBSCRIPT	
+	public void testPostfixSubscript() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int x = f(pa[1]);".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "f(pa[1])" ); //$NON-NLS-1$
+	}
+		
+ 	public void testPostfixSubscriptA() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int x = f(pa[1][2]);".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "f(pa[1][2])" ); //$NON-NLS-1$
+	}	 
+  
+	// Kind POSTFIX_FUNCTIONCALL : return type of called function
+	public void testPostfixFunctioncallBug42822() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int x = bar( foo( 3.0 ), foo( 5.0 ) ) ;".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "bar(foo(3.0), foo(5.0))" ); //$NON-NLS-1$
+	}
+	// Kind POSTFIX_SIMPLETYPE_* : simple type
+	public void testPostfixSimpletypesBug42823() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int someInt = foo( int(3), short(4), double(3.0), float(4.0), char( 'a'), wchar_t( 'a' ), signed( 2 ), unsigned( 3 ), bool( false ), long( 3L ) );".toString(), ParserLanguage.CPP); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(int(3), short(4), double(3.0), float(4.0), char('a'), wchar_t('a'), signed(2), unsigned(3), bool(false), long(3L))" ); //$NON-NLS-1$
+	}
+	
+	// Kind POSTFIX_DOT_IDEXPRESSION : type of member in the scope of the container
+	public void testPostfixDotExpression() throws Exception{
+		IASTTranslationUnit tu = parse("class A {int m;}; \n A  a; \n int foo(char); int foo( int ); \n int x = foo( a.m );".toString(), ParserLanguage.CPP); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[4]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a.m)" ); //$NON-NLS-1$
+	}
+	// Kind POSTFIX_ARROW_IDEXPRESSION : type of member in the scope of the container
+	public void testPostfixArrowExpression() throws Exception{
+		IASTTranslationUnit tu = parse("class A {int m;}; \n A * a; \n int foo(char); int foo( int ); \n int x = foo( a->m );".toString(), ParserLanguage.CPP); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[4]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a->m)" ); //$NON-NLS-1$
+	}
+	// Kind POSTFIX_INCREMENT : LHS 
+	public void testPostfixIncrement() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int y = foo( x++ );".toString(), ParserLanguage.CPP); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(x++)" ); //$NON-NLS-1$
+	}
+	// Kind POSTFIX_DECREMENT : LHS
+	public void testPostfixDecrement() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int y = foo( x-- );".toString(), ParserLanguage.CPP); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(x--)" ); //$NON-NLS-1$
+	}
+	// Kind POSTFIX_DYNAMIC_CAST 
+	public void testPostfixDynamicCast() throws Exception{
+		IASTTranslationUnit tu = parse("int x = foo( dynamic_cast<B*>(a) );".toString(), ParserLanguage.CPP); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(dynamic_cast<B *>(a))" ); //$NON-NLS-1$
+	}
+	// Kind POSTFIX_REINTERPRET_CAST
+	public void testPostfixReinterpretCast() throws Exception{
+		IASTTranslationUnit tu = parse("int x = foo( reinterpret_cast<double *>(a) );".toString(), ParserLanguage.CPP); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(reinterpret_cast<double *>(a))" ); //$NON-NLS-1$
+	}
+	// Kind POSTFIX_STATIC_CAST
+	public void testPostfixStaticCast() throws Exception{
+		IASTTranslationUnit tu = parse("int x = foo( static_cast<char>(a) );".toString(), ParserLanguage.CPP); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(static_cast<char>(a))" ); //$NON-NLS-1$
+	}
+	// Kind POSTFIX_CONST_CAST
+	public void testPostfixConstCast() throws Exception{
+		IASTTranslationUnit tu = parse("int x = foo( const_cast<int *>(&a) );".toString(), ParserLanguage.CPP); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(const_cast<int *>(&a))" ); //$NON-NLS-1$
+	}	
+	// Kind POSTFIX_TYPEID_EXPRESSION : LHS
+	public void testPostfixTypeIdExpression() throws Exception{
+		IASTTranslationUnit tu = parse("int x = foo( typeid(5) );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(typeid(5))" ); //$NON-NLS-1$
+	}
+	// Kind POSTFIX_TYPEID_EXPRESSION : type of the ID
+	public void testPostfixTypeIdExpression2() throws Exception{
+		IASTTranslationUnit tu = parse("int x = foo( typeid(a) );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(typeid(a))" ); //$NON-NLS-1$
+	}
+	// Kind POSTFIX_TYPEID_TYPEID : type of the ID
+
+	public void testPostfixTypeIdTypeId2() throws Exception{
+		IASTTranslationUnit tu = parse("class A { }; int foo( int ); int x = foo( typeid(const A) );".toString(), ParserLanguage.CPP); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[2]).getDeclarators()[0].getInitializer()).getExpression(), "foo(typeid (const A))" ); //$NON-NLS-1$
+	}	
+	// Kind UNARY_INCREMENT : LHS             
+	public void testUnaryIncrement() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int y = foo( ++x );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(++x)" ); //$NON-NLS-1$
+	}	
+	// Kind UNARY_DECREMENT : LHS             
+	public void testUnaryDecrement() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int y = foo( --x );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(--x)" ); //$NON-NLS-1$
+	}
+	// Kind UNARY_STAR_CASTEXPRESSION : LHS + t_pointer	
+	public void testUnaryStarCastExpression() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int x = f(*pa);".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "f(*pa)" ); //$NON-NLS-1$
+	}
+	// Kind UNARY_AMPSND_CASTEXPRESSION : LHS + t_reference
+	public void testUnaryAmpersandCastExpression() throws Exception
+	{
+		IASTTranslationUnit tu = parse("int x = f(&pa);".toString(), ParserLanguage.CPP); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "f(&pa)" ); //$NON-NLS-1$
+	}
+	// Kind UNARY_PLUS_CASTEXPRESSION  : LHS
+	public void testUnaryPlusCastExpression() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( +5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(+5)" ); //$NON-NLS-1$
+	}
+	// Kind UNARY_MINUS_CASTEXPRESSION : LHS
+	public void testUnaryMinusCastExpression() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( -5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(-5)" ); //$NON-NLS-1$
+	}
+	// Kind UNARY_NOT_CASTEXPRESSION : LHS   
+	public void testUnaryNotCastExpression() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( !b );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(!b)" ); //$NON-NLS-1$
+	}
+	// Kind UNARY_TILDE_CASTEXPRESSION : LHS   
+	public void testTildeNotCastExpression() throws Exception { 
+		IASTTranslationUnit tu = parse("int y = foo( ~x );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(~x)" ); //$NON-NLS-1$
+	}
+	// Kind UNARY_SIZEOF_UNARYEXPRESSION : unsigned int 
+	public void testUnarySizeofUnaryExpression() throws Exception { 
+		IASTTranslationUnit tu = parse("int y = foo( sizeof(5) );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(sizeof (5))" ); //$NON-NLS-1$
+	}
+	// Kind UNARY_SIZEOF_TYPEID : unsigned int          
+	public void testUnarySizeofTypeId() throws Exception { 
+		IASTTranslationUnit tu = parse("int x, y = foo( sizeof(x) );".toString(), ParserLanguage.CPP); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		final IASTExpression expression = ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[1].getInitializer()).getExpression();
+        isExpressionStringEqual( expression, "foo(sizeof (x))" ); //$NON-NLS-1$
+	}
+	// Kind NEW_TYPEID                   
+	public void testNewTypeId() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( new A() );".toString(), ParserLanguage.CPP); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(new A())" ); //$NON-NLS-1$
+	}
+
+	// Kind CASTEXPRESSION      
+	public void testCastExpression() throws Exception{
+		IASTTranslationUnit tu = parse("int x = foo( (A*)b );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo((A *)b)" ); //$NON-NLS-1$
+	}
+	         
+	// Kind MULTIPLICATIVE_MULTIPLY : usual arithmetic conversions
+	public void testMultiplicativeMultiply() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a * b );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a * b)" ); //$NON-NLS-1$
+	}
+	// Kind MULTIPLICATIVE_DIVIDE : usual arithmetic conversions        
+	public void testMultiplicativeDivide() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( b / a );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(b / a)" ); //$NON-NLS-1$
+	}	
+	// Kind MULTIPLICATIVE_MODULUS : usual arithmetic conversions      
+	public void testMultiplicativeModulus() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( b % a );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(b % a)" ); //$NON-NLS-1$
+	}	
+	// Kind ADDITIVE_PLUS : usual arithmetic conversions              
+	public void testAdditivePlus() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( b + a );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(b + a)" ); //$NON-NLS-1$
+	}	
+	// Kind ADDITIVE_MINUS : usual arithmetic conversions           
+	public void testAdditiveMinus() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( b - a );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(b - a)" ); //$NON-NLS-1$
+	}	
+	// Kind SHIFT_LEFT : LHS
+	public void testShiftLeft() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a << 5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a << 5)" ); //$NON-NLS-1$
+	}              
+	// Kind SHIFT_RIGHT : LHS                  
+	public void testShiftRight() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a >> 5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a >> 5)" ); //$NON-NLS-1$
+	}
+	// Kind RELATIONAL_LESSTHAN : bool          
+	public void testRelationalLessThan() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( b < 3 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(b < 3)" ); //$NON-NLS-1$
+	}
+	// Kind RELATIONAL_GREATERTHAN : bool      
+	public void testRelationalGreaterThan() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( b > 3 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(b > 3)" ); //$NON-NLS-1$
+	}
+	// Kind RELATIONAL_LESSTHANEQUALTO : bool  
+	public void testRelationalLessThanOrEqual() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( b <= 3 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(b <= 3)" ); //$NON-NLS-1$
+	}
+	// Kind RELATIONAL_GREATERTHANEQUALTO : bool
+	public void testRelationalGreaterThanOrEqual() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( b >= 3 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(b >= 3)" ); //$NON-NLS-1$
+	}
+	// Kind EQUALITY_EQUALS : bool         
+	public void testEqualityEquals() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( b == 3 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(b == 3)" ); //$NON-NLS-1$
+	}
+	// Kind EQUALITY_NOTEQUALS : bool      
+	public void testEqualityNotEquals() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( b != 3 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(b != 3)" ); //$NON-NLS-1$
+	}
+	// Kind ANDEXPRESSION  : usual arithmetic conversions          
+	public void testAndExpression() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a & b );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a & b)" ); //$NON-NLS-1$
+	}
+	// Kind EXCLUSIVEOREXPRESSION : usual arithmetic conversions      
+	public void testExclusiveOrExpression() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a ^ b );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a ^ b)" ); //$NON-NLS-1$
+	}
+	// Kind INCLUSIVEOREXPRESSION : : usual arithmetic conversions     
+	public void testInclusiveOrExpression() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a | b );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a | b)" ); //$NON-NLS-1$
+	}
+	// Kind LOGICALANDEXPRESSION : bool      
+	public void testLogicalAndExpression() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a && b );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a && b)" ); //$NON-NLS-1$
+	}
+	// Kind LOGICALOREXPRESSION  : bool      
+	public void testLogicalOrExpression() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a || b );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a || b)" ); //$NON-NLS-1$
+	}
+	// Kind CONDITIONALEXPRESSION : conditional Expression Conversions     
+	public void testConditionalExpression() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a > 5 ? b : c );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a > 5 ? b : c)" ); //$NON-NLS-1$
+	}
+	            
+	// Kind ASSIGNMENTEXPRESSION_NORMAL : LHS
+	public void testAssignmentExpressionNormal() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a = 5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a = 5)" ); //$NON-NLS-1$
+	}
+	// Kind ASSIGNMENTEXPRESSION_PLUS : LHS  
+	public void testAssignmentExpressionPlus() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a += 5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a += 5)" ); //$NON-NLS-1$
+	}
+	// Kind ASSIGNMENTEXPRESSION_MINUS : LHS 
+	public void testAssignmentExpressionMinus() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a -= 5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a -= 5)" ); //$NON-NLS-1$
+	}
+	// Kind ASSIGNMENTEXPRESSION_MULT : LHS  
+	public void testAssignmentExpressionMulti() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a *= 5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a *= 5)" ); //$NON-NLS-1$
+	}
+	// Kind ASSIGNMENTEXPRESSION_DIV : LHS   
+	public void testAssignmentExpressionDiv() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a /= 5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a /= 5)" ); //$NON-NLS-1$
+	}
+	// Kind ASSIGNMENTEXPRESSION_MOD : LHS   
+	public void testAssignmentExpressionMod() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a %= 5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a %= 5)" ); //$NON-NLS-1$
+	}
+	// Kind ASSIGNMENTEXPRESSION_LSHIFT : LHS
+	public void testAssignmentExpressionLShift() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a >>= 5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a >>= 5)" ); //$NON-NLS-1$
+	}
+	// Kind ASSIGNMENTEXPRESSION_RSHIFT : LHS
+	public void testAssignmentExpressionRShift() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a <<= 5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a <<= 5)" ); //$NON-NLS-1$
+	}
+	// Kind ASSIGNMENTEXPRESSION_AND : LHS
+	public void testAssignmentExpressionAnd() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a &= 5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a &= 5)" ); //$NON-NLS-1$
+	}
+	// Kind ASSIGNMENTEXPRESSION_OR : LHS 
+	public void testAssignmentExpressionOr() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a |= 5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a |= 5)" ); //$NON-NLS-1$
+	}
+	// Kind ASSIGNMENTEXPRESSION_XOR : LHS
+	public void testAssignmentExpressionXOr() throws Exception { 
+		IASTTranslationUnit tu = parse("int x = foo( a ^= 5 );".toString(), ParserLanguage.C); //$NON-NLS-1$
+		IASTDeclaration[] d = tu.getDeclarations();
+		isExpressionStringEqual( ((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression(), "foo(a ^= 5)" ); //$NON-NLS-1$
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2UtilTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2UtilTests.java
new file mode 100644
index 0000000..083e76a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2UtilTests.java
@@ -0,0 +1,188 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     Rational Software - initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import org.eclipse.cdt.core.dom.ast.ASTSignatureUtil;
+import org.eclipse.cdt.core.dom.ast.IASTCastExpression;
+import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTInitializerExpression;
+import org.eclipse.cdt.core.dom.ast.IASTReturnStatement;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.internal.core.parser.scanner.ExpressionEvaluator;
+
+/**
+ * @author dsteffle
+ */
+public class AST2UtilTests extends AST2BaseTest {
+	public AST2UtilTests() {
+	}
+
+	public AST2UtilTests(String name) {
+		super(name);
+	}
+
+	public void testSimpleSignature() throws Exception {
+	    StringBuffer buff = new StringBuffer();
+	    buff.append("int l, m, n=0;\n"); //$NON-NLS-1$
+		buff.append("int j = l ? m : n;\n"); //$NON-NLS-1$
+		buff.append("int i = l^m;\n"); //$NON-NLS-1$
+		buff.append("int g = i<<=j;\n"); //$NON-NLS-1$
+		buff.append("int f = sizeof( int );\n"); //$NON-NLS-1$
+		buff.append("int e = ~f;\n"); //$NON-NLS-1$
+		buff.append("int d = ++e;\n"); //$NON-NLS-1$
+		buff.append("int b = d++;\n"); //$NON-NLS-1$
+		buff.append("int c = sizeof b;\n"); //$NON-NLS-1$
+		buff.append("int a = b + c;\n"); //$NON-NLS-1$
+	    
+	    IASTTranslationUnit tu = parse(buff.toString(), ParserLanguage.C);
+		IASTDeclaration[] d = tu.getDeclarations();
+		
+		isExpressionStringEqual(((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[2].getInitializer()).getExpression(), "0"); //$NON-NLS-1$
+		isExpressionStringEqual(((IASTInitializerExpression)((IASTSimpleDeclaration)d[1]).getDeclarators()[0].getInitializer()).getExpression(), "l ? m : n"); //$NON-NLS-1$
+		isExpressionStringEqual(((IASTInitializerExpression)((IASTSimpleDeclaration)d[2]).getDeclarators()[0].getInitializer()).getExpression(), "l ^ m"); //$NON-NLS-1$
+		isExpressionStringEqual(((IASTInitializerExpression)((IASTSimpleDeclaration)d[3]).getDeclarators()[0].getInitializer()).getExpression(), "i <<= j"); //$NON-NLS-1$
+		isExpressionStringEqual(((IASTInitializerExpression)((IASTSimpleDeclaration)d[4]).getDeclarators()[0].getInitializer()).getExpression(), "sizeof (int)"); //$NON-NLS-1$
+		isExpressionStringEqual(((IASTInitializerExpression)((IASTSimpleDeclaration)d[5]).getDeclarators()[0].getInitializer()).getExpression(), "~f"); //$NON-NLS-1$
+		isExpressionStringEqual(((IASTInitializerExpression)((IASTSimpleDeclaration)d[6]).getDeclarators()[0].getInitializer()).getExpression(), "++e"); //$NON-NLS-1$
+		isExpressionStringEqual(((IASTInitializerExpression)((IASTSimpleDeclaration)d[7]).getDeclarators()[0].getInitializer()).getExpression(), "d++"); //$NON-NLS-1$
+		isExpressionStringEqual(((IASTInitializerExpression)((IASTSimpleDeclaration)d[8]).getDeclarators()[0].getInitializer()).getExpression(), "sizeof b"); //$NON-NLS-1$
+		isExpressionStringEqual(((IASTInitializerExpression)((IASTSimpleDeclaration)d[9]).getDeclarators()[0].getInitializer()).getExpression(), "b + c"); //$NON-NLS-1$
+	}
+	
+	public void testSimpleParameter() throws Exception {
+	    StringBuffer buff = new StringBuffer();
+	    buff.append("int a(int x);\n"); //$NON-NLS-1$
+		buff.append("int * b(char y, int x);\n"); //$NON-NLS-1$
+		buff.append("void c(int * z, float **b);\n"); //$NON-NLS-1$
+		buff.append("static int d(int a[restrict]);\n"); //$NON-NLS-1$
+        buff.append("void e(const char* const);\n"); //$NON-NLS-1$
+	    
+	    IASTTranslationUnit tu = parse(buff.toString(), ParserLanguage.C);
+		IASTDeclaration[] d = tu.getDeclarations();
+		
+		isParameterSignatureEqual(((IASTSimpleDeclaration)d[0]).getDeclarators()[0], "(int)"); //$NON-NLS-1$
+		isParameterSignatureEqual(((IASTSimpleDeclaration)d[1]).getDeclarators()[0], "(char, int)"); //$NON-NLS-1$
+		isParameterSignatureEqual(((IASTSimpleDeclaration)d[2]).getDeclarators()[0], "(int *, float * *)"); //$NON-NLS-1$
+		isParameterSignatureEqual(((IASTSimpleDeclaration)d[3]).getDeclarators()[0], "(int [restrict])"); //$NON-NLS-1$
+        isParameterSignatureEqual(((IASTSimpleDeclaration)d[4]).getDeclarators()[0], "(const char * const)"); //$NON-NLS-1$
+		
+		isSignatureEqual(((IASTSimpleDeclaration)d[0]).getDeclarators()[0], "int (int)"); //$NON-NLS-1$
+		isSignatureEqual(((IASTSimpleDeclaration)d[1]).getDeclarators()[0], "int *(char, int)"); //$NON-NLS-1$
+		isSignatureEqual(((IASTSimpleDeclaration)d[2]).getDeclarators()[0], "void (int *, float * *)"); //$NON-NLS-1$
+		isSignatureEqual(((IASTSimpleDeclaration)d[3]).getDeclarators()[0], "static int (int [restrict])"); //$NON-NLS-1$
+        isSignatureEqual(((IASTSimpleDeclaration)d[4]).getDeclarators()[0], "void (const char * const)"); //$NON-NLS-1$
+		
+		isSignatureEqual(((IASTSimpleDeclaration)d[0]).getDeclSpecifier(), "int"); //$NON-NLS-1$
+		isSignatureEqual(((IASTSimpleDeclaration)d[1]).getDeclSpecifier(), "int"); //$NON-NLS-1$
+		isSignatureEqual(((IASTSimpleDeclaration)d[2]).getDeclSpecifier(), "void"); //$NON-NLS-1$
+		isSignatureEqual(((IASTSimpleDeclaration)d[3]).getDeclSpecifier(), "static int"); //$NON-NLS-1$
+        isSignatureEqual(((IASTSimpleDeclaration)d[4]).getDeclSpecifier(), "void"); //$NON-NLS-1$
+		
+		isTypeEqual(((IASTSimpleDeclaration)d[0]).getDeclarators()[0], "int (int)"); //$NON-NLS-1$
+		isTypeEqual(((IASTSimpleDeclaration)d[1]).getDeclarators()[0], "int * (char, int)"); //$NON-NLS-1$
+		isTypeEqual(((IASTSimpleDeclaration)d[2]).getDeclarators()[0], "void (int *, float * *)"); //$NON-NLS-1$
+		isTypeEqual(((IASTSimpleDeclaration)d[3]).getDeclarators()[0], "int (int * restrict)"); //$NON-NLS-1$
+        isTypeEqual(((IASTSimpleDeclaration)d[4]).getDeclarators()[0], "void (const char * const)"); //$NON-NLS-1$
+		
+		isTypeEqual(((IFunction)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getName().resolveBinding()).getType(), "int (int)"); //$NON-NLS-1$
+		isTypeEqual(((IFunction)((IASTSimpleDeclaration)d[1]).getDeclarators()[0].getName().resolveBinding()).getType(), "int * (char, int)"); //$NON-NLS-1$
+		isTypeEqual(((IFunction)((IASTSimpleDeclaration)d[2]).getDeclarators()[0].getName().resolveBinding()).getType(), "void (int *, float * *)"); //$NON-NLS-1$
+		isTypeEqual(((IFunction)((IASTSimpleDeclaration)d[3]).getDeclarators()[0].getName().resolveBinding()).getType(), "int (int * restrict)"); //$NON-NLS-1$
+        isTypeEqual(((IFunction)((IASTSimpleDeclaration)d[4]).getDeclarators()[0].getName().resolveBinding()).getType(), "void (const char * const)"); //$NON-NLS-1$
+		
+		isParameterTypeEqual(((IFunction)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getName().resolveBinding()).getType(), "(int)"); //$NON-NLS-1$
+		isParameterTypeEqual(((IFunction)((IASTSimpleDeclaration)d[1]).getDeclarators()[0].getName().resolveBinding()).getType(), "(char, int)"); //$NON-NLS-1$
+		isParameterTypeEqual(((IFunction)((IASTSimpleDeclaration)d[2]).getDeclarators()[0].getName().resolveBinding()).getType(), "(int *, float * *)"); //$NON-NLS-1$
+		isParameterTypeEqual(((IFunction)((IASTSimpleDeclaration)d[3]).getDeclarators()[0].getName().resolveBinding()).getType(), "(int * restrict)"); //$NON-NLS-1$
+        isParameterTypeEqual(((IFunction)((IASTSimpleDeclaration)d[4]).getDeclarators()[0].getName().resolveBinding()).getType(), "(const char * const)"); //$NON-NLS-1$
+	}
+	
+	public void testSimpleCParameterSignature() throws Exception {
+	    StringBuffer buff = new StringBuffer();
+	    buff.append("int a(int x);\n"); //$NON-NLS-1$
+		buff.append("int * b(char y, int x);\n"); //$NON-NLS-1$
+		buff.append("void c(int * z, float **b);\n"); //$NON-NLS-1$
+		buff.append("static int d(int a[restrict]);\n"); //$NON-NLS-1$
+	    
+	    IASTTranslationUnit tu = parse(buff.toString(), ParserLanguage.C);
+		IASTDeclaration[] d = tu.getDeclarations();
+		
+		isParameterSignatureEqual(((IASTSimpleDeclaration)d[0]).getDeclarators()[0], "(int)"); //$NON-NLS-1$
+		isParameterSignatureEqual(((IASTSimpleDeclaration)d[1]).getDeclarators()[0], "(char, int)"); //$NON-NLS-1$
+		isParameterSignatureEqual(((IASTSimpleDeclaration)d[2]).getDeclarators()[0], "(int *, float * *)"); //$NON-NLS-1$
+		isParameterSignatureEqual(((IASTSimpleDeclaration)d[3]).getDeclarators()[0], "(int [restrict])"); //$NON-NLS-1$
+	}
+	
+	public void testSimpleTypeId() throws Exception {
+		StringBuffer buff = new StringBuffer();
+	    buff.append("int x = sizeof( int );\n"); //$NON-NLS-1$
+		buff.append("union Squaw { int x; double u; };\n"); //$NON-NLS-1$
+		buff.append("int main(int argc, char **argv) {\n"); //$NON-NLS-1$
+		buff.append("return sizeof( union Squaw );\n}\n"); //$NON-NLS-1$
+		buff.append("typedef short Z; typedef Z jc;\n"); //$NON-NLS-1$
+		buff.append("int y = 4;\n"); //$NON-NLS-1$
+		buff.append("jc myJc = (jc)y;\n"); //$NON-NLS-1$
+	    
+	    IASTTranslationUnit tu = parse(buff.toString(), ParserLanguage.C);
+		IASTDeclaration[] d = tu.getDeclarations();
+		
+		// verify signatures
+		isSignatureEqual( ((IASTTypeIdExpression)((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression()).getTypeId(), "int"); //$NON-NLS-1$
+		isSignatureEqual( ((IASTTypeIdExpression)((IASTReturnStatement)((IASTCompoundStatement)((IASTFunctionDefinition)d[2]).getBody()).getStatements()[0]).getReturnValue()).getTypeId(), "Squaw"); //$NON-NLS-1$
+		isSignatureEqual( ((IASTCastExpression)((IASTInitializerExpression)((IASTSimpleDeclaration)d[6]).getDeclarators()[0].getInitializer()).getExpression()).getTypeId() , "jc"); //$NON-NLS-1$
+		
+		// verify types
+		isTypeEqual( ((IASTTypeIdExpression)((IASTInitializerExpression)((IASTSimpleDeclaration)d[0]).getDeclarators()[0].getInitializer()).getExpression()).getTypeId(), "int"); //$NON-NLS-1$
+		isTypeEqual( ((IASTTypeIdExpression)((IASTReturnStatement)((IASTCompoundStatement)((IASTFunctionDefinition)d[2]).getBody()).getStatements()[0]).getReturnValue()).getTypeId(), "Squaw"); //$NON-NLS-1$
+		isTypeEqual( ((IASTCastExpression)((IASTInitializerExpression)((IASTSimpleDeclaration)d[6]).getDeclarators()[0].getInitializer()).getExpression()).getTypeId() , "short int"); //$NON-NLS-1$
+	}
+	
+	public void testKnRC() throws Exception {
+		StringBuffer buff = new StringBuffer();
+	    buff.append("int foo(x, y) char x; int y; {}\n"); //$NON-NLS-1$
+		buff.append("int foo2(char x, int y) {}\n"); //$NON-NLS-1$
+		
+		IASTTranslationUnit tu = parse(buff.toString(), ParserLanguage.C, true);
+		IASTDeclaration[] d = tu.getDeclarations();
+		
+		String fooSignature = ASTSignatureUtil.getSignature(((IASTFunctionDefinition)d[0]).getDeclarator());
+		String foo2Signature = ASTSignatureUtil.getSignature(((IASTFunctionDefinition)d[1]).getDeclarator());
+		
+		assertEquals(fooSignature, foo2Signature);
+	}
+	
+	public void testParseIntegral() throws Exception {
+		assertEquals(0, ExpressionEvaluator.getNumber("0".toCharArray()));
+		assertEquals(0, ExpressionEvaluator.getNumber("0x0".toCharArray()));
+		assertEquals(0, ExpressionEvaluator.getNumber("00".toCharArray()));
+		assertEquals(0, ExpressionEvaluator.getNumber("000".toCharArray()));
+		assertEquals(0, ExpressionEvaluator.getNumber("0L".toCharArray()));
+		assertEquals(0, ExpressionEvaluator.getNumber("0LL".toCharArray()));
+		
+		assertEquals(1, ExpressionEvaluator.getNumber("1".toCharArray()));
+		assertEquals(1, ExpressionEvaluator.getNumber("01".toCharArray()));
+		assertEquals(1, ExpressionEvaluator.getNumber("0x1".toCharArray()));
+				
+		assertEquals(10, ExpressionEvaluator.getNumber("10".toCharArray()));
+		assertEquals(8, ExpressionEvaluator.getNumber("010".toCharArray()));
+		assertEquals(16, ExpressionEvaluator.getNumber("0x10".toCharArray()));
+
+		assertEquals(10, ExpressionEvaluator.getNumber("10LLL".toCharArray()));
+		assertEquals(8, ExpressionEvaluator.getNumber("010LLL".toCharArray()));
+		assertEquals(16, ExpressionEvaluator.getNumber("0x10LLL".toCharArray()));
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/ASTInactiveCodeTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/ASTInactiveCodeTests.java
new file mode 100644
index 0000000..e1ef494
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/ASTInactiveCodeTests.java
@@ -0,0 +1,403 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.util.BitSet;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarationListOwner;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IField;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.parser.IScanner;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+
+/**
+ * Testcases for inactive code in ast.
+ */
+public class ASTInactiveCodeTests extends AST2BaseTest {
+	
+	public static TestSuite suite() {
+		return suite(ASTInactiveCodeTests.class);
+	}
+	
+	public ASTInactiveCodeTests() {
+		super();
+	}
+	
+	public ASTInactiveCodeTests(String name) {
+		super(name);
+	}
+
+	@Override
+	protected void configureScanner(IScanner scanner) {
+		super.configureScanner(scanner);
+		scanner.setProcessInactiveCode(true);
+	}
+
+	//	#if %
+	//	   int a0;
+	//	#elif %
+	//	   int a1;
+	//	   #if %
+	//	      int a2;
+	//	   #elif %
+	//	      int a3;
+	//	   #else
+	//	      int a4;
+	//	   #endif
+	//	   int a5;
+	//	#else
+	//	   int a6;
+	//	#endif
+	//	int a7;
+	public void testIfBranches() throws Exception {
+		String codeTmpl= getAboveComment();
+		for (int i= 0; i < (1<<4); i++) {
+			testBranches(codeTmpl, ParserLanguage.C, i);
+		}
+		for (int i= 0; i < (1<<4); i++) {
+			testBranches(codeTmpl, ParserLanguage.CPP, i);
+		}
+	}
+
+	private void testBranches(String codeTmpl, ParserLanguage lang, int bits) throws Exception {
+		testBranches(codeTmpl, lang, bits, 0);
+	}
+	private void testBranches(String codeTmpl, ParserLanguage lang, int bits, int level) throws Exception {
+		BitSet bs= convert(bits);
+		char[] chars= codeTmpl.toCharArray();
+		int pos= codeTmpl.indexOf('%', 0);
+		int i= 0;
+		while (pos >= 0) {
+			chars[pos]= bs.get(i++) ? '1' : '0';
+			pos= codeTmpl.indexOf('%', pos+1);
+		}
+		IASTDeclarationListOwner tu= parse(new String(chars), lang);
+		while (level-- > 0) {
+			final IASTDeclaration decl = tu.getDeclarations(true)[0];
+			if (decl instanceof IASTSimpleDeclaration) {
+				tu= (IASTDeclarationListOwner) ((IASTSimpleDeclaration) decl).getDeclSpecifier();
+			} else {
+				tu= (IASTDeclarationListOwner) decl;
+			}
+		}
+		
+		IASTDeclaration[] decl= tu.getDeclarations(true);
+		assertEquals(8, decl.length);
+		assertEquals(bs.get(0), decl[0].isActive());
+		assertEquals(!bs.get(0) && bs.get(1), decl[1].isActive());
+		assertEquals(!bs.get(0) && bs.get(1) && bs.get(2), decl[2].isActive());
+		assertEquals(!bs.get(0) && bs.get(1) && !bs.get(2) && bs.get(3), decl[3].isActive());
+		assertEquals(!bs.get(0) && bs.get(1) && !bs.get(2) && !bs.get(3), decl[4].isActive());
+		assertEquals(!bs.get(0) && bs.get(1), decl[5].isActive());
+		assertEquals(!bs.get(0) && !bs.get(1), decl[6].isActive());
+		assertEquals(true, decl[7].isActive());
+	}
+
+	private BitSet convert(int bits) {
+		BitSet result= new BitSet(32);
+		for (int i = 0; i < 32; i++) {
+			if ((bits & (1 << i)) != 0) {
+				result.set(i);
+			}
+		}
+		return result;
+	}
+
+	//  #define A1
+	//	#ifdef A%
+	//	   int a0;
+	//	#elif %
+	//	   int a1;
+	//	   #if %
+	//	      int a2;
+	//	   #elif %
+	//	      int a3;
+	//	   #else
+	//	      int a4;
+	//	   #endif
+	//	   int a5;
+	//	#else
+	//	   int a6;
+	//	#endif
+	//	int a7;
+	public void testIfdefBranches() throws Exception {
+		String codeTmpl= getAboveComment();
+		for (int i= 0; i < (1<<4); i++) {
+			testBranches(codeTmpl, ParserLanguage.C, i);
+		}
+		for (int i= 0; i < (1<<4); i++) {
+			testBranches(codeTmpl, ParserLanguage.CPP, i);
+		}
+	}
+
+	//  #define A0
+	//	#ifndef A%
+	//	   int a0;
+	//	#elif %
+	//	   int a1;
+	//	   #if %
+	//	      int a2;
+	//	   #elif %
+	//	      int a3;
+	//	   #else
+	//	      int a4;
+	//	   #endif
+	//	   int a5;
+	//	#else
+	//	   int a6;
+	//	#endif
+	//	int a7;
+	public void testIfndefBranches() throws Exception {
+		String codeTmpl= getAboveComment();
+		for (int i= 0; i < (1<<4); i++) {
+			testBranches(codeTmpl, ParserLanguage.C, i);
+		}
+		for (int i= 0; i < (1<<4); i++) {
+			testBranches(codeTmpl, ParserLanguage.CPP, i);
+		}
+	}
+
+	// struct S {
+	//	#if %
+	//	   int a0;
+	//	#elif %
+	//	   int a1;
+	//	   #if %
+	//	      int a2;
+	//	   #elif %
+	//	      int a3;
+	//	   #else
+	//	      int a4;
+	//	   #endif
+	//	   int a5;
+	//	#else
+	//	   int a6;
+	//	#endif
+	//	int a7;
+	// };
+	public void testStructs() throws Exception {
+		String codeTmpl= getAboveComment();
+		for (int i= 0; i < (1<<4); i++) {
+			testBranches(codeTmpl, ParserLanguage.C, i, 1);
+		}
+		for (int i= 0; i < (1<<4); i++) {
+			testBranches(codeTmpl, ParserLanguage.CPP, i, 1);
+		}
+	}
+
+	// extern "C" {
+	//	#if %
+	//	   int a0;
+	//	#elif %
+	//	   int a1;
+	//	   #if %
+	//	      int a2;
+	//	   #elif %
+	//	      int a3;
+	//	   #else
+	//	      int a4;
+	//	   #endif
+	//	   int a5;
+	//	#else
+	//	   int a6;
+	//	#endif
+	//	int a7;
+	// };
+	public void testExternC() throws Exception {
+		String codeTmpl= getAboveComment();
+		for (int i= 0; i < (1<<4); i++) {
+			testBranches(codeTmpl, ParserLanguage.CPP, i, 1);
+		}
+	}
+
+	// namespace ns {
+	//	#if %
+	//	   int a0;
+	//	#elif %
+	//	   int a1;
+	//	   #if %
+	//	      int a2;
+	//	   #elif %
+	//	      int a3;
+	//	   #else
+	//	      int a4;
+	//	   #endif
+	//	   int a5;
+	//	#else
+	//	   int a6;
+	//	#endif
+	//	int a7;
+	// }
+	public void testNamespace() throws Exception {
+		String codeTmpl= getAboveComment();
+		for (int i= 0; i < (1<<4); i++) {
+			testBranches(codeTmpl, ParserLanguage.CPP, i, 1);
+		}
+	}
+	
+	// typedef int TInt;
+	// const int value= 12;
+	// #if 0
+	//    int f(TInt);
+	//    int g(value);
+	// #endif
+	public void testAmbiguity() throws Exception {
+		String code= getAboveComment();
+		IASTTranslationUnit tu= parseAndCheckBindings(code, ParserLanguage.CPP);
+		IASTDeclaration[] decls = tu.getDeclarations(true);
+		IASTSimpleDeclaration decl= (IASTSimpleDeclaration) decls[2];
+		assertTrue(decl.getDeclarators()[0] instanceof IASTFunctionDeclarator);
+		decl= (IASTSimpleDeclaration) decls[3];
+		assertFalse(decl.getDeclarators()[0] instanceof IASTFunctionDeclarator);
+	}
+	
+	// int a; // 1
+	// #if 0
+	//    int a; // 2
+	//    #if 0
+	//       int a; // 3
+	//    #endif
+	//    int b; // 1
+	// #endif
+	// int b; // 2
+	public void testDuplicateDefinition() throws Exception {
+		String code= getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, false);
+		bh.assertNonProblem("a; // 1", 1);
+		bh.assertNonProblem("a; // 2", 1);
+		bh.assertNonProblem("a; // 3", 1);
+		bh.assertNonProblem("b; // 1", 1);
+		bh.assertNonProblem("b; // 2", 1);
+
+		bh= new BindingAssertionHelper(code, true);
+		bh.assertNonProblem("a; // 1", 1);
+		bh.assertNonProblem("a; // 2", 1);
+		bh.assertNonProblem("a; // 3", 1);
+		bh.assertNonProblem("b; // 1", 1);
+		bh.assertNonProblem("b; // 2", 1);
+
+		parseAndCheckBindings(code, ParserLanguage.C);
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+	}
+	
+	// struct S {
+	// #if 0
+	//   int a;
+	// };
+	// #else
+	//   int b;
+	// };
+	// #endif
+	public void testInactiveClosingBrace() throws Exception {
+		String code= getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, false);
+		IField a= bh.assertNonProblem("a;", 1);
+		IField b= bh.assertNonProblem("b;", 1);
+		assertSame(a.getOwner(), b.getOwner());
+
+		bh= new BindingAssertionHelper(code, true);
+		a= bh.assertNonProblem("a;", 1);
+		b= bh.assertNonProblem("b;", 1);
+		assertSame(a.getOwner(), b.getOwner());
+	}
+	
+	// struct S 
+	// #if 1
+	//   {
+	//     int a;
+	// #else
+	//   int b;
+	// #endif
+	//   int c;
+	//   #if 0
+	//      int d;
+	//   #endif
+	// };
+	public void testOpenBraceInActiveBranch() throws Exception {
+		String code= getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, false);
+		IField a= bh.assertNonProblem("a;", 1);
+		bh.assertNoName("b;", 1);
+		IField c= bh.assertNonProblem("c;", 1);
+		IField d= bh.assertNonProblem("d;", 1);
+		assertSame(a.getOwner(), c.getOwner());
+		assertSame(a.getOwner(), d.getOwner());
+
+		bh= new BindingAssertionHelper(code, true);
+		a= bh.assertNonProblem("a;", 1);
+		bh.assertNoName("b;", 1);
+		c= bh.assertNonProblem("c;", 1);
+		d= bh.assertNonProblem("d;", 1);
+		assertSame(a.getOwner(), c.getOwner());
+		assertSame(a.getOwner(), d.getOwner());
+	}
+
+	// #if 0
+	//    struct S { 
+	//    #if 1
+	//      int a;
+	//    #else
+	//      int b;
+	//    #endif
+	// #elif 0
+	//    int c;
+	// #endif
+	// int d;
+	public void testOpenBraceInInactiveBranch() throws Exception {
+		String code= getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, false);
+		IField a= bh.assertNonProblem("a;", 1);
+		IField b= bh.assertNonProblem("b;", 1);
+		IVariable c= bh.assertNonProblem("c;", 1); // part of a different non-nested branch
+		IVariable d= bh.assertNonProblem("d;", 1);
+		assertSame(a.getOwner(), b.getOwner());
+		assertNull(c.getOwner());
+		assertNull(d.getOwner());
+
+		bh= new BindingAssertionHelper(code, true);
+		a= bh.assertNonProblem("a;", 1);
+		b= bh.assertNonProblem("b;", 1);
+		c= bh.assertNonProblem("c;", 1); // part of a different non-nested branch
+		d= bh.assertNonProblem("d;", 1);
+		assertSame(a.getOwner(), b.getOwner());
+		assertNull(c.getOwner());
+		assertNull(d.getOwner());
+	}
+	
+	//	 #if 0
+	//	 void f() {
+	//	   #if 1
+	//		 int a;
+	//	   #elif 0
+	//		 int b;
+	//	   #endif
+	//	 }
+	//	 #endif
+	public void testUnexpectedBranchesInInactiveCode() throws Exception {
+		String code= getAboveComment();
+		BindingAssertionHelper bh= new BindingAssertionHelper(code, false);
+		IFunction f= bh.assertNonProblem("f()", 1);
+		bh.assertNoName("a;", 1);
+		bh.assertNoName("b;", 1);
+
+		bh= new BindingAssertionHelper(code, true);
+		f= bh.assertNonProblem("f()", 1);
+		bh.assertNoName("a;", 1);
+		bh.assertNoName("b;", 1);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/ASTNodeSelectorTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/ASTNodeSelectorTest.java
new file mode 100644
index 0000000..80bed11
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/ASTNodeSelectorTest.java
@@ -0,0 +1,438 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.io.IOException;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTNodeSelector;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroExpansion;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.parser.cpp.GPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.IScanner;
+import org.eclipse.cdt.core.parser.NullLogService;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.ParserMode;
+import org.eclipse.cdt.core.parser.ScannerInfo;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser;
+
+public class ASTNodeSelectorTest extends AST2BaseTest {
+
+	static public TestSuite suite() {
+		return suite(ASTNodeSelectorTest.class);
+	}
+
+	protected String fCode;
+	protected IASTTranslationUnit fTu;
+	protected IASTNodeSelector fSelector;
+	
+	public ASTNodeSelectorTest() {
+	}
+
+	public ASTNodeSelectorTest(String name) {
+		super(name);
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		createTranslationUnit();
+	}
+
+	protected void createTranslationUnit() throws IOException {
+		fCode= getContents(1)[0].toString();
+        CodeReader codeReader = new CodeReader(fCode.toCharArray());
+        ScannerInfo scannerInfo = new ScannerInfo();
+        IScanner scanner= AST2BaseTest.createScanner(codeReader, ParserLanguage.CPP, ParserMode.COMPLETE_PARSE, scannerInfo);
+        GNUCPPSourceParser parser= new GNUCPPSourceParser(scanner, ParserMode.COMPLETE_PARSE, new NullLogService(), new GPPParserExtensionConfiguration());
+        fTu= parser.parse();
+        fSelector= fTu.getNodeSelector(null);
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	private void testContainedName(int from, int to, String sig) {
+		IASTName name= fSelector.findFirstContainedName(from, to-from);
+		verify(sig, name);
+	}
+
+	private void verify(String sig, IASTNode node) {
+		if (sig == null) {
+			assertNull("unexpexted selection: " + (node == null ? "" : node.getRawSignature()), node);
+		}
+		else {
+			assertNotNull("unable to select " + sig, node);
+			if (node instanceof IASTName) {
+				assertEquals(sig, ((IASTName) node).toString());
+			}
+			else {
+				assertEquals(sig, node.getRawSignature());
+			}
+		}
+	}
+
+	private void testContainedNode(int from, int to, String sig) {
+		IASTNode node= fSelector.findFirstContainedNode(from, to-from);
+		verify(sig, node);
+	}
+
+	private void testName(int from, int to, String sig) {
+		IASTName name= fSelector.findName(from, to-from);
+		verify(sig, name);
+	}
+
+	private void testNode(int from, int to, String sig) {
+		IASTNode node= fSelector.findNode(from, to-from);
+		verify(sig, node);
+	}
+
+	private void testEnclosingName(int from, int to, String sig) {
+		IASTName name= fSelector.findEnclosingName(from, to-from);
+		verify(sig, name);
+	}
+
+	private void testEnclosingNode(int from, int to, String sig) {
+		IASTNode node= fSelector.findEnclosingNode(from, to-from);
+		verify(sig, node);
+	}
+
+	private void testExpansion(int from, int to, String sig) {
+		IASTPreprocessorMacroExpansion exp= fSelector.findEnclosingMacroExpansion(from, to-from);
+		verify(sig, exp);
+	}
+
+	// #define shift_offsets
+	// int shift= shift_offsets;
+	//
+	// #include <test>
+	// int a;
+	public void testInclusion() {
+		int include_start= fCode.indexOf("#include");
+		int name_start= fCode.indexOf("test");
+		int include_end= fCode.indexOf(">") + 1;
+		
+		testContainedName(include_start-1, include_end+1, "test");
+		testContainedName(name_start, include_end, "test");
+		testContainedName(include_start+1, name_start+1, null);
+		testContainedName(name_start+1, name_start+7, null);
+
+		testContainedNode(include_start-1, include_end+1, "#include <test>");
+		testContainedNode(name_start, include_end, "test");
+		testContainedNode(include_start+1, name_start+1, null);
+		testContainedNode(name_start+1, name_start+7, null);
+		
+		testEnclosingName(name_start, name_start+4, "test");
+		testEnclosingName(name_start, name_start, "test");
+		testEnclosingName(name_start+4, name_start+4, "test");
+		testEnclosingName(name_start-1, name_start+1, null);
+		testEnclosingName(name_start+4, name_start+5, null);
+
+		testEnclosingNode(name_start, name_start+4, "test");
+		testEnclosingNode(name_start, name_start, "test");
+		testEnclosingNode(name_start+4, name_start+4, "test");
+		testEnclosingNode(name_start-1, name_start+1, "#include <test>");
+		testEnclosingNode(name_start+4-1, name_start+4+1, "#include <test>");
+		
+		testExpansion(name_start, name_start+4, null);
+	}
+
+	// #define shift_offsets
+	// int shift= shift_offsets;
+	//
+	// #define EMPTY
+	// #define TEST_H "test.h"
+	// void func() {
+	// #include EMPTY TEST_H
+	// }
+	public void testInclusionWithExpansions() {
+		int inclusion_start= fCode.indexOf("#include");
+		int empty_start= fCode.indexOf("EMPTY", inclusion_start);
+		int testh_start= fCode.indexOf("TEST_H", empty_start);
+		int file_end= fCode.length();
+		
+		testContainedName(inclusion_start-1, file_end-1, "EMPTY");
+		testContainedName(testh_start, file_end, "TEST_H");
+		testContainedName(testh_start+1, file_end, null);
+		testContainedName(testh_start, testh_start+5, null);
+
+		testContainedNode(inclusion_start-1, file_end+1, "#include EMPTY TEST_H");
+		testContainedNode(testh_start, file_end, "TEST_H");
+		testContainedNode(testh_start+1, file_end, null);
+		testContainedNode(testh_start, testh_start+5, null);
+		
+		testName(empty_start, empty_start+5, "EMPTY");
+		testName(empty_start-1, empty_start+5, null);
+		testName(empty_start+1, empty_start+5, null);
+		testName(empty_start, empty_start+4, null);
+		testName(empty_start, empty_start+6, null);
+
+		testNode(empty_start, empty_start+5, "EMPTY");
+		testNode(empty_start-1, empty_start+5, null);
+		testNode(empty_start+1, empty_start+5, null);
+		testNode(empty_start, empty_start+4, null);
+		testNode(empty_start, empty_start+6, null);
+
+		testEnclosingName(empty_start, empty_start+5, "EMPTY");
+		testEnclosingName(empty_start, empty_start, "EMPTY");
+		testEnclosingName(empty_start+5, empty_start+5, "EMPTY");
+		testEnclosingName(empty_start-1, empty_start, null);
+		testEnclosingName(empty_start+5, empty_start+6, "test.h");
+		testEnclosingName(testh_start, testh_start+6, "TEST_H");
+		testEnclosingName(testh_start, testh_start, "TEST_H");
+		testEnclosingName(testh_start+6, testh_start+6, "TEST_H");
+		testEnclosingName(testh_start-1, testh_start+1, "test.h");
+		testEnclosingName(testh_start+5, testh_start+7, null);
+
+		testEnclosingNode(empty_start, empty_start+5, "EMPTY");
+		testEnclosingNode(empty_start, empty_start, "EMPTY");
+		testEnclosingNode(empty_start+5, empty_start+5, "EMPTY");
+		testEnclosingNode(empty_start-1, empty_start, "#include EMPTY TEST_H");
+		testEnclosingNode(empty_start+5, empty_start+6, "test.h");
+		testEnclosingNode(testh_start, testh_start+6, "TEST_H");
+		testEnclosingNode(testh_start, testh_start, "TEST_H");
+		testEnclosingNode(testh_start+6, testh_start+6, "TEST_H");
+		testEnclosingNode(testh_start-1, testh_start+1, "test.h");
+		testEnclosingNode(testh_start+6-1, testh_start+6+1, "{\n #include EMPTY TEST_H\n }");
+		
+		testExpansion(empty_start, empty_start+5, "EMPTY");
+		testExpansion(empty_start, empty_start, "EMPTY");
+		testExpansion(empty_start+5, empty_start+5, "EMPTY");
+		testExpansion(empty_start-1, empty_start, null);
+		testExpansion(empty_start+5, empty_start+6, null);
+		testExpansion(testh_start, testh_start+6, "TEST_H");
+	}
+	
+	
+	// #define shift_offsets
+	// int shift= shift_offsets;
+	//
+	// #define xx 1
+	// #if  xx == 2
+	// #elif xx == 1
+	// #endif
+	public void testMacroInConditionalExpression() {
+		int x1= fCode.indexOf("xx");
+		int x2= fCode.indexOf("xx", x1+1);
+		int x3= fCode.indexOf("xx", x2+1);
+		
+		testContainedName(x1, x1+2, "xx");
+		testContainedName(x2-1, x2+2, "xx");
+		testContainedName(x3, x3+3, "xx");
+		testContainedName(x1, x1+1, null);
+		testContainedName(x2+1, x2+2, null);
+		testContainedName(x3+1, x3+1, null);
+
+		testName(x1, x1+2, "xx");
+		testName(x2, x2+2, "xx");
+		testName(x3, x3+2, "xx");
+		testName(x1+1, x1+2, null);
+		testName(x2-1, x2+2, null);
+		testName(x3, x3+3, null);
+		testName(x3, x3+1, null);
+
+		testEnclosingName(x1, x1+2, "xx");
+		testEnclosingName(x2+2, x2+2, "xx");
+		testEnclosingName(x3, x3, "xx");
+		testEnclosingName(x1-1, x1+2, null);
+		testEnclosingName(x2+2, x2+3, null);
+		testEnclosingName(x3-1, x3-1, null);
+
+		testExpansion(x1, x1+2, null);
+		testExpansion(x2+2, x2+2, "xx");
+		testExpansion(x3, x3, "xx");
+		testExpansion(x2+2, x2+3, null);
+		testExpansion(x3-1, x3-1, null);
+	}
+
+	// #define shift_offsets
+	// int shift= shift_offsets;
+	//
+	// #define xx 1
+	// #if !defined(xx)
+	// #elif defined(xx) == 1
+	// #endif
+	public void testMacroInDefinedExpression() {
+		int x1= fCode.indexOf("xx");
+		int x2= fCode.indexOf("xx", x1+1);
+		int x3= fCode.indexOf("xx", x2+1);
+		
+		testContainedName(x1, x1+2, "xx");
+		testContainedName(x2-1, x2+2, "xx");
+		testContainedName(x3, x3+3, "xx");
+		testContainedName(x1, x1+1, null);
+		testContainedName(x2+1, x2+2, null);
+		testContainedName(x3+1, x3+1, null);
+
+		testName(x1, x1+2, "xx");
+		testName(x2, x2+2, "xx");
+		testName(x3, x3+2, "xx");
+		testName(x1+1, x1+2, null);
+		testName(x2-1, x2+2, null);
+		testName(x3, x3+3, null);
+		testName(x3, x3+1, null);
+
+		testEnclosingName(x1, x1+2, "xx");
+		testEnclosingName(x2+2, x2+2, "xx");
+		testEnclosingName(x3, x3, "xx");
+		testEnclosingName(x1-1, x1+2, null);
+		testEnclosingName(x2+2, x2+3, null);
+		testEnclosingName(x3-1, x3-1, null);
+
+		testExpansion(x1, x1+2, null);
+		testExpansion(x2+2, x2+2, null);
+		testExpansion(x3, x3, null);
+		testExpansion(x2+2, x2+3, null);
+		testExpansion(x3-1, x3-1, null);
+	}
+
+	// #define shift_offsets
+	// int shift= shift_offsets;
+	//
+	// #define xx 1
+	// #ifndef xx
+	// #endif
+	// #ifdef xx
+	// #endif
+	// #undef xx
+	public void testMacroInConditional() {
+		int x1= fCode.indexOf("xx");
+		x1= fCode.indexOf("xx", x1+1);
+		int x2= fCode.indexOf("xx", x1+1);
+		int x3= fCode.indexOf("xx", x2+1);
+		
+		testContainedName(x1, x1+2, "xx");
+		testContainedName(x2-1, x2+2, "xx");
+		testContainedName(x3, x3+3, "xx");
+		testContainedName(x1, x1+1, null);
+		testContainedName(x2+1, x2+2, null);
+		testContainedName(x3+1, x3+1, null);
+
+		testName(x1, x1+2, "xx");
+		testName(x2, x2+2, "xx");
+		testName(x3, x3+2, "xx");
+		testName(x1+1, x1+2, null);
+		testName(x2-1, x2+2, null);
+		testName(x3, x3+3, null);
+		testName(x3, x3+1, null);
+
+		testEnclosingName(x1, x1+2, "xx");
+		testEnclosingName(x2+2, x2+2, "xx");
+		testEnclosingName(x3, x3, "xx");
+		testEnclosingName(x1-1, x1+2, null);
+		testEnclosingName(x2+2, x2+3, null);
+		testEnclosingName(x3-1, x3-1, null);
+
+		testExpansion(x1, x1+2, null);
+		testExpansion(x2+2, x2+2, null);
+		testExpansion(x3, x3, null);
+		testExpansion(x2+2, x2+3, null);
+		testExpansion(x3-1, x3-1, null);
+	}
+	
+	// #define shift_offsets
+	// int shift= shift_offsets;
+	//
+	// #define IMPLICIT 1
+	// #define EXPLICIT IMPLICIT
+	// int a= EXPLICIT;
+	public void testUnreachableImplicitMacro() {
+		int x1= fCode.indexOf("EXPLICIT;");
+		testContainedName(x1, fCode.length(), "EXPLICIT");
+		testName(x1, x1+8, "EXPLICIT");
+		testEnclosingName(x1, x1, "EXPLICIT");
+	}
+
+	// #define shift_offsets
+	// int shift= shift_offsets;
+	//
+	// #define NESTED 1
+	// #define EXPLICIT(x) x
+	// int a= EXPLICIT(NESTED);
+	public void testReachableNestedMacro() {
+		int x1= fCode.indexOf("NESTED)");
+		testContainedName(x1, fCode.length(), "NESTED");
+		testName(x1, x1+6, "NESTED");
+		testEnclosingName(x1, x1, "NESTED");
+	}
+	
+	// #define id(x,y) x y
+	// id(int a, =1);
+	// id(int b=, a);
+	public void testImageLocations() {
+		int a1= fCode.indexOf("a");
+		int a2= fCode.indexOf("a", a1+1);
+		int b1= fCode.indexOf("b");
+
+		testName(a1, a1+1, "a");
+		testContainedName(a1-1, a2+2, "a");
+		testEnclosingName(a1, a1, "a");
+		testEnclosingName(a1+1, a1+1, "a");
+
+		testName(a2, a2+1, "a");
+		testContainedName(a2-1, a2+2, "a");
+		testEnclosingName(a2, a2, "a");
+		testEnclosingName(a2+1, a2+1, "a");
+
+		testEnclosingNode(a1-1, a1+1, "id(int a, =1)");
+		testContainedNode(a1-8, a1+1, "id");
+	}
+	
+	// namespace ns {int a;}
+	// int x= ns::a;
+	// #define M int b;
+	// M
+	// #define N() int c;
+	// N()
+	// #define O
+	// #define P()
+	// P()O
+	public void testOrdering() {
+		int x1= fCode.indexOf("ns::a");
+		int x2= x1 + "ns::a".length();
+		testContainedName(x1, x2, "ns");
+		testEnclosingName(x2-1, x2-1, "a");
+		testEnclosingName(x2, x2, "a");
+		
+		x1= fCode.indexOf("M"); x1= fCode.indexOf("M", x1+1);
+		testNode(x1, x1+1, "M");
+		testEnclosingNode(x1, x1, "M");
+		testEnclosingNode(x1+1, x1+1, "M");
+		testContainedNode(x1-1, x1+2, "M");
+
+		x1= fCode.indexOf("N"); x1= fCode.indexOf("N", x1+1);
+		testNode(x1, x1+1, "N");
+		testEnclosingNode(x1, x1, "N");
+		testEnclosingNode(x1+1, x1+1, "N");
+		testContainedNode(x1-1, x1+2, "N");
+		
+		x1= fCode.indexOf("O"); x1= fCode.indexOf("O", x1+1);
+		testNode(x1, x1+1, "O");
+		testEnclosingNode(x1, x1, "O");
+		testEnclosingNode(x1+1, x1+1, "O");
+		testContainedNode(x1-1, x1+2, "O");
+	}
+	
+	// #define MACRO void m
+	// MACRO();
+	public void testEnclosingAMacro() {
+		int x1= fCode.indexOf("MACRO(");
+		int x2= x1 + "MACRO(".length();
+		testContainedName(x1, x2, "MACRO");
+		testEnclosingNode(x1, x2, "MACRO();");
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AccessControlTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AccessControlTests.java
new file mode 100644
index 0000000..11bbfd1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AccessControlTests.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Google, Inc and others.
+ * 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
+ *
+ * Contributors:
+ * 	   Sergey Prigogin (Google) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.AccessContext;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+public class AccessControlTests extends AST2BaseTest {
+	
+	protected class AccessAssertionHelper extends BindingAssertionHelper {
+		AccessAssertionHelper(String contents) throws ParserException {
+			super(contents, true);
+		}
+		
+		void assertAccessible(String section, int len) {
+			IASTName name = findName(section, len);
+			IBinding binding = name.resolveBinding();
+    		assertNotNull(binding);
+			assertTrue(AccessContext.isAccessible(binding, name));
+		}
+		
+		void assertNotAccessible(String section, int len) {
+			IASTName name = findName(section, len);
+			IBinding binding = name.resolveBinding();
+    		assertNotNull(binding);
+			assertFalse(AccessContext.isAccessible(binding, name));
+		}
+	}
+	
+	public AccessControlTests() {
+	}
+	
+	public AccessControlTests(String name) {
+		super(name);
+	}
+	
+	public static TestSuite suite() {
+		return suite(AccessControlTests.class);
+	}
+
+	//	class A {
+	//	public:
+	//	  int a;
+	//	};
+	//	class B : private A {
+	//    friend void test();
+	//    int b;
+	//	};
+	//  class C : protected B {
+	//  };
+	//	void test() {
+	//    class D : public C {
+	//      void m() {
+	//        a; //1
+	//        b; //1
+	//      }
+	//	  };
+	//    B b;
+	//    b.a; //2
+	//    b.b; //2
+	//    C c;
+	//    c.a; //3
+	//    c.b; //3
+	//	}
+	public void testFriends() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+		AccessAssertionHelper ah= new AccessAssertionHelper(code);
+		ah.assertAccessible("a; //1", 1);
+		ah.assertAccessible("b; //1", 1);
+		ah.assertAccessible("a; //2", 1);
+		ah.assertAccessible("b; //2", 1);
+		ah.assertNotAccessible("a; //3", 1);
+		ah.assertNotAccessible("b; //3", 1);
+	}
+
+	//	class A {
+	//	public:
+	//	  int a;
+	//	};
+	//
+	//	class B : public A {
+	//	private:
+	//	  int a;
+	//	};
+	//
+	//	void test(B x) {
+	//	  x.a = 0;
+	//	}
+	public void testHiddenMember() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+		AccessAssertionHelper ah= new AccessAssertionHelper(code);
+		ah.assertNotAccessible("a = 0", 1);
+	}
+	
+	//	class A0 {
+	//		public:
+	//			enum Ex {e1};
+	//	};
+	//
+	//	class A : public A0 {
+	//		class B {
+	//			void test() {
+	//				Ex a;  // we compute 'B' as the naming type, whereas it should be 'A'
+	//			}
+	//		};
+	//	};
+	public void testEnclosingAsNamingClass_292232() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+		AccessAssertionHelper ah= new AccessAssertionHelper(code);
+		ah.assertAccessible("Ex a;", 2);
+	}
+	
+	// // Example from C++-specification 11.2-3
+	// class B { 
+	//   public:
+	//     int mi;
+	//     static int si;
+	// };
+	// class D : private B {};
+	// class DD : public D {
+	//   void f();
+	// };
+	//
+	// void DD::f() {
+	//   mi=3;  // private
+	//   si=3;  // private 
+	//   B b;
+	//   b.mi=4;
+	//   b.si=4;
+	//   B* bp;
+	//   bp->mi=5;
+	// }
+	public void testEnclosingAsNamingClass_292232a() throws Exception {
+		final String code = getAboveComment();
+		parseAndCheckBindings(code, ParserLanguage.CPP);
+		AccessAssertionHelper ah= new AccessAssertionHelper(code);
+		ah.assertNotAccessible("mi=3;", 2);
+		ah.assertNotAccessible("si=3;", 2);
+		ah.assertAccessible("mi=4;", 2);
+		ah.assertAccessible("si=4;", 2);
+		ah.assertAccessible("mi=5;", 2);
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CDOMBaseTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CDOMBaseTest.java
new file mode 100644
index 0000000..c59ded3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CDOMBaseTest.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import org.eclipse.cdt.core.dom.CDOM;
+import org.eclipse.cdt.core.dom.IASTServiceProvider.UnsupportedDialectException;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.parser.tests.FileBasePluginTest;
+import org.eclipse.core.resources.IFile;
+
+/**
+ * @author dsteffle
+ */
+public class CDOMBaseTest extends FileBasePluginTest {
+
+	public CDOMBaseTest() {
+	}
+
+	public CDOMBaseTest(String name) {
+		super(name);
+	}
+
+	public CDOMBaseTest(String name, Class className) {
+		super(name, className);
+	}
+	
+	protected IASTTranslationUnit parse(String fileName, String contents) {
+		IFile file = null;
+		
+		try {
+			file = importFile(fileName, contents);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		
+		return parse(file);
+	}
+	
+	protected IASTTranslationUnit parse(IFile file) {
+		IASTTranslationUnit tu = null;
+		
+		try {
+			tu = CDOM.getInstance().getASTService().getTranslationUnit(
+			        file,
+			        CDOM.getInstance().getCodeReaderFactory(
+			              CDOM.PARSE_SAVED_RESOURCES));
+		} catch (UnsupportedDialectException e) {
+			e.printStackTrace();
+		}
+		
+		return tu;
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CharArrayMapTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CharArrayMapTest.java
new file mode 100644
index 0000000..625903f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CharArrayMapTest.java
@@ -0,0 +1,371 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.parser.util.CharArrayMap;
+import org.eclipse.cdt.core.parser.util.CharArrayObjectMap;
+
+/**
+ *
+ * @author Mike Kucera
+ */
+public class CharArrayMapTest extends TestCase {
+
+	private static class Slice { // convenience class
+		final char[] chars;
+		final int start;
+		final int length;
+		public Slice(char[] chars, int start, int length) {
+			this.chars = chars;
+			this.length = length;
+			this.start = start;
+		}
+		public String toString() {
+			return new String(chars, start, length);
+		}
+	}
+
+	public void disabled_testPerformance() {
+		final int iterations = 10000;
+		// insert tons of keys
+		char[][] keys = new char[iterations][];
+		for(int i = 0; i < keys.length; i++) {
+			keys[i] = String.valueOf(i).toCharArray();
+		}
+
+		System.gc();
+		long mapTime = timeMap(keys);
+
+		System.gc();
+		long oldMapTime = timeOldMap(keys);
+
+		System.out.println("mapTime: " + mapTime);
+		System.out.println("oldMapTime: " + oldMapTime);
+		assertTrue(oldMapTime > mapTime);
+	}
+
+	private static long timeMap(char[][] keys) {
+		long start = System.currentTimeMillis();
+		CharArrayMap<Integer> map = new CharArrayMap<Integer>(keys.length);
+		for(int i = 0; i < keys.length; i++) {
+			map.put(keys[i], i);
+		}
+		assertEquals(keys.length, map.size());
+		for(int i = 0; i < keys.length; i++) {
+			assertEquals(new Integer(i), map.get(keys[i]));
+		}
+		return System.currentTimeMillis() - start;
+	}
+
+	private static long timeOldMap(char[][] keys) {
+		long start = System.currentTimeMillis();
+		CharArrayObjectMap oldMap = new CharArrayObjectMap(keys.length);
+		for(int i = 0; i < keys.length; i++) {
+			oldMap.put(keys[i], new Integer(i));
+		}
+		assertEquals(keys.length, oldMap.size());
+		for(int i = 0; i < keys.length; i++) {
+			assertEquals(new Integer(i), oldMap.get(keys[i]));
+		}
+		return System.currentTimeMillis() - start;
+	}
+
+	public void testBasicUsage1() {
+		char[] key1 = "first key".toCharArray();
+		char[] key2 = "second key".toCharArray();
+		char[] key3 = "third key".toCharArray();
+		char[] key4 = "forth key".toCharArray();
+
+		CharArrayMap<Integer> map = new CharArrayMap<Integer>();
+		assertTrue(map.isEmpty());
+		assertEquals(0, map.size());
+
+		map.put(key1, 1);
+		map.put(key2, 2);
+		map.put(key3, 3);
+		map.put(key4, 4);
+
+		assertFalse(map.isEmpty());
+		assertEquals(4, map.size());
+
+		assertEquals(new Integer(1), map.get(key1));
+		assertEquals(new Integer(2), map.get(key2));
+		assertEquals(new Integer(3), map.get(key3));
+		assertEquals(new Integer(4), map.get(key4));
+
+		assertTrue(map.containsKey(key1));
+		assertTrue(map.containsKey(key2));
+		assertTrue(map.containsKey(key3));
+		assertTrue(map.containsKey(key4));
+
+		assertTrue(map.containsValue(1));
+		assertTrue(map.containsValue(2));
+		assertTrue(map.containsValue(3));
+		assertTrue(map.containsValue(4));
+
+		Set<Integer> values = new HashSet<Integer>();
+		values.add(1);
+		values.add(2);
+		values.add(3);
+		values.add(4);
+
+		for(int i : map.values()) {
+			assertTrue(values.remove(i));
+		}
+
+		// remove a mapping
+		assertEquals(new Integer(1), map.remove(key1));
+		assertEquals(3, map.size());
+	    assertNull(map.get(key1));
+	    assertFalse(map.containsKey(key1));
+	    assertFalse(map.containsValue(1));
+	    assertNull(map.remove(key1)); // its already removed
+
+		map.clear();
+		assertTrue(map.isEmpty());
+		assertEquals(0, map.size());
+
+		// test null values
+		map.put(key1, null);
+		assertEquals(1, map.size());
+		assertNull(map.get(key1));
+		assertTrue(map.containsKey(key1));
+		assertTrue(map.containsValue(null));
+
+		// overrideing values should
+		map.put(key1, 100);
+		assertEquals(1, map.size());
+		assertEquals(new Integer(100), map.get(key1));
+		assertTrue(map.containsValue(100));
+		assertFalse(map.containsValue(null));
+		// override the value
+		map.put(key1, 200);
+		assertEquals(1, map.size());
+		assertEquals(new Integer(200), map.get(key1));
+		assertTrue(map.containsValue(200));
+		assertFalse(map.containsValue(100));
+	}
+
+	public void testBasicUsage2() {
+		char[] chars = "pantera, megadeth, soulfly, metallica, in flames, lamb of god, carcass".toCharArray();
+
+		Slice[] slices = {
+			new Slice(chars, 0, 7),
+			new Slice(chars, 9, 8),
+			new Slice(chars, 19, 7),
+			new Slice(chars, 28, 9),
+			new Slice(chars, 39, 9),
+			new Slice(chars, 50, 11),
+			new Slice(chars, 63, 7)
+		};
+
+		char[][] keys = {
+			"pantera".toCharArray(),
+			"megadeth".toCharArray(),
+			"soulfly".toCharArray(),
+			"metallica".toCharArray(),
+			"in flames".toCharArray(),
+			"lamb of god".toCharArray(),
+			"carcass".toCharArray()
+		};
+
+		CharArrayMap<Integer> map = new CharArrayMap<Integer>();
+		assertTrue(map.isEmpty());
+		assertEquals(0, map.size());
+
+		for(int i = 0; i < slices.length; i++) {
+			Slice slice = slices[i];
+			map.put(slice.chars, slice.start, slice.length, i);
+		}
+
+		assertFalse(map.isEmpty());
+		assertEquals(7, map.size());
+
+		// should still work with equivalent keys
+		for(int i = 0; i < keys.length; i++) {
+			Slice slice = slices[i];
+			assertEquals(new Integer(i), map.get(slice.chars, slice.start, slice.length));
+			assertEquals(new Integer(i), map.get(keys[i]));
+			assertTrue(map.containsKey(slice.chars, slice.start, slice.length));
+			assertTrue(map.containsKey(keys[i]));
+			assertTrue(map.containsValue(i));
+		}
+
+		Set<Integer> values = new HashSet<Integer>();
+		for(int i = 0; i < keys.length; i++) {
+			values.add(i);
+		}
+
+		for(int i : map.values()) {
+			assertTrue(values.remove(i));
+		}
+
+		// remove the last two keys
+		map.remove(keys[5]);
+		map.remove(slices[6].chars, slices[6].start, slices[6].length);
+
+		assertEquals(5, map.size());
+
+		// remaining keys should still be there
+		for(int i = 0; i < 5; i++) {
+			Slice slice = slices[i];
+			assertEquals(new Integer(i), map.get(slice.chars, slice.start, slice.length));
+			assertEquals(new Integer(i), map.get(keys[i]));
+			assertTrue(map.containsKey(slice.chars, slice.start, slice.length));
+			assertTrue(map.containsKey(keys[i]));
+			assertTrue(map.containsValue(i));
+		}
+
+		map.clear();
+		assertTrue(map.isEmpty());
+		assertEquals(0, map.size());
+	}
+
+	
+	public void testOrderedMap() {
+		char[] chars = "alpha beta aaa cappa almost".toCharArray();
+		Slice[] slices = {
+			new Slice(chars, 0, 5),
+			new Slice(chars, 6, 4),
+			new Slice(chars, 11, 3),
+			new Slice(chars, 15, 5),
+			new Slice(chars, 21, 6)
+		};
+		int[] order = {3, 4, 1, 5, 2};
+		
+		CharArrayMap<Integer> map = CharArrayMap.createOrderedMap();
+		
+		for(int i = 0; i < slices.length; i++) {
+			Slice slice = slices[i];
+			map.put(slice.chars, slice.start, slice.length, order[i]);
+		}
+		
+		List<String> properOrder = Arrays.asList("aaa", "almost", "alpha", "beta", "cappa");
+		
+		Collection<char[]> keys = map.keys();
+		assertEquals(5, keys.size());
+		{
+			int i = 0;
+			for(char[] key : keys) {
+				assertEquals(properOrder.get(i), String.valueOf(key));
+				i++;
+			}
+		}
+		
+		Collection<Integer> values = map.values();
+		assertEquals(5, values.size());
+		{
+			int i = 1;
+			for(int value : values) {
+				assertEquals(i++, value);
+			}
+		}
+	}
+	
+	
+	public void testProperFail() {
+		char[] hello = "hello".toCharArray();
+		CharArrayMap<Integer> map = new CharArrayMap<Integer>();
+		Integer value = new Integer(9);
+
+		try {
+			map.put(null, value);
+			fail();
+		} catch(NullPointerException _) {}
+
+		try {
+			map.put(hello, -1, 5, value);
+			fail();
+		} catch(IndexOutOfBoundsException _) {}
+
+		try {
+			map.put(hello, 0, -1, value);
+			fail();
+		} catch(IndexOutOfBoundsException _) {}
+
+		try {
+			map.put(hello, 0, 100, value);
+			fail();
+		} catch(IndexOutOfBoundsException _) {}
+
+		try {
+			map.get(null);
+			fail();
+		} catch(NullPointerException _) {}
+
+		try {
+			map.get(hello, -1, 5);
+			fail();
+		} catch(IndexOutOfBoundsException _) {}
+
+		try {
+			map.get(hello, 0, -1);
+			fail();
+		} catch(IndexOutOfBoundsException _) {}
+
+		try {
+			map.get(hello, 0, 100);
+			fail();
+		} catch(IndexOutOfBoundsException _) {}
+
+		try {
+			map.remove(null);
+			fail();
+		} catch(NullPointerException _) {}
+
+		try {
+			map.remove(hello, -1, 5);
+			fail();
+		} catch(IndexOutOfBoundsException _) {}
+
+		try {
+			map.remove(hello, 0, -1);
+			fail();
+		} catch(IndexOutOfBoundsException _) {}
+
+		try {
+			map.remove(hello, 0, 100);
+			fail();
+		} catch(IndexOutOfBoundsException _) {}
+
+		try {
+			map.containsKey(null);
+			fail();
+		} catch(NullPointerException _) {}
+
+		try {
+			map.containsKey(hello, -1, 5);
+			fail();
+		} catch(IndexOutOfBoundsException _) {}
+
+		try {
+			map.containsKey(hello, 0, -1);
+			fail();
+		} catch(IndexOutOfBoundsException _) {}
+
+		try {
+			map.containsKey(hello, 0, 100);
+			fail();
+		} catch(IndexOutOfBoundsException _) {}
+
+		try {
+			new CharArrayMap<Integer>(-1);
+		} catch(IllegalArgumentException _) {}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CodeReaderCacheTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CodeReaderCacheTest.java
new file mode 100644
index 0000000..bebcce9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CodeReaderCacheTest.java
@@ -0,0 +1,191 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.CDOM;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.CodeReaderCache;
+import org.eclipse.cdt.core.parser.ICodeReaderCache;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+
+/**
+ * @author dsteffle
+ */
+public class CodeReaderCacheTest extends CDOMBaseTest {
+	
+	public CodeReaderCacheTest() {
+	}
+
+	public CodeReaderCacheTest(String name, Class className) {
+		super(name, className);
+	}
+
+	public CodeReaderCacheTest(String name) {
+		super(name, CodeReaderCacheTest.class);
+	}
+	
+    public static Test suite() {
+        TestSuite suite = new TestSuite( CodeReaderCacheTest.class );
+        suite.addTest( new CodeReaderCacheTest("cleanupProject") );    //$NON-NLS-1$
+	    return suite;
+    }
+
+	private class UpdateFileJob extends Job {
+		private IFile file = null;
+		private String fileName = null;
+		private String code = null;
+		
+		public UpdateFileJob(String name, IFile file, String fileName, String code) {
+			super(name);
+			this.file = file;
+			this.fileName = fileName;
+			this.code = code;
+		}
+		
+		protected IStatus run(IProgressMonitor monitor) {
+			while(!monitor.isCanceled()) {
+				try {
+					file = importFile(fileName, code);
+				} catch (Exception e) {
+				}
+			}
+			
+			return Status.OK_STATUS;
+		}
+		
+		public IFile getFile() {
+			return file;
+		}
+	}
+
+	// THIS MUST BE RUN FIRST IN THIS TEST
+	public void testSetCacheSize() {
+		ICodeReaderCache cache = CDOM.getInstance().getCodeReaderFactory(CDOM.PARSE_SAVED_RESOURCES).getCodeReaderCache();
+		// update the size of the cache... must be done for the first test since other test suites use 0MB cache size
+		assertTrue(cache instanceof CodeReaderCache);
+		((CodeReaderCache)cache).setCacheSize(CodeReaderCache.DEFAULT_CACHE_SIZE_IN_MB);
+	}
+	
+	public void testSimpleCacheFunctionality() {
+		StringBuffer code = new StringBuffer();
+		code.append("int x;"); //$NON-NLS-1$
+		
+		IFile file = null;
+		try {
+			file = importFile("test.c", code.toString()); //$NON-NLS-1$
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		
+		parse(file);
+		
+		ICodeReaderCache cache = CDOM.getInstance().getCodeReaderFactory(CDOM.PARSE_SAVED_RESOURCES).getCodeReaderCache();
+		cache.flush();
+		CodeReader reader = cache.get(file.getLocation().toOSString());
+		assertNotNull(reader);
+		assertEquals(cache.getCurrentSpace(), 1);
+		assertEquals(String.valueOf(reader.filename), file.getLocation().toOSString());
+		cache.remove(String.valueOf(reader.filename));
+		assertEquals(cache.getCurrentSpace(), 0);
+	}
+	
+	public void testResourceChangedUpdate() {
+		boolean hasPassed = false;
+		StringBuffer code = new StringBuffer();
+		code.append("int x;"); //$NON-NLS-1$
+		ICodeReaderCache cache = CDOM.getInstance().getCodeReaderFactory(CDOM.PARSE_SAVED_RESOURCES).getCodeReaderCache();
+		
+		IFile file = null;
+		
+		try {
+			file = importFile("test.c", code.toString()); //$NON-NLS-1$
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		
+		// start a new job that repeatedly updates the file...
+		UpdateFileJob job = new UpdateFileJob("updater", file, "test.c", code.toString()); //$NON-NLS-1$ //$NON-NLS-2$
+		job.schedule();
+		
+		while(!hasPassed) {
+			if (file != null) {
+				parse(file);
+			}
+			
+			try {
+				Thread.sleep(1000); // give the updater thread some time to update the resource
+				file = job.getFile();
+			} catch (InterruptedException e) {
+				e.printStackTrace();
+			}
+			
+			if (cache.getCurrentSpace() == 0) // item was properly removed by the updater thread 
+				hasPassed = true;
+		}
+		
+		job.cancel();
+	}
+    
+	// This is broken.
+	// I have a mind to delete any test that has a Thread.sleep() in it.
+    public void testResourceChangedNestedPathUpdate(int off) {
+        boolean hasPassed = false;
+        StringBuffer code = new StringBuffer();
+        code.append("int x;"); //$NON-NLS-1$
+        ICodeReaderCache cache = CDOM.getInstance().getCodeReaderFactory(CDOM.PARSE_SAVED_RESOURCES).getCodeReaderCache();
+        
+        IFile file = null;
+        
+        try {
+            importFolder("test");
+            file = importFile("test/test.c", code.toString()); //$NON-NLS-1$
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        
+        // start a new job that repeatedly updates the file...
+        UpdateFileJob job = new UpdateFileJob("updater", file, "test/test.c", code.toString()); //$NON-NLS-1$ //$NON-NLS-2$
+        job.schedule();
+        
+        while(!hasPassed) {
+            if (file != null) {
+                parse(file);
+            }
+            
+            try {
+                Thread.sleep(1000); // give the updater thread some time to update the resource
+                file = job.getFile();
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+            
+            if (cache.getCurrentSpace() == 0) // item was properly removed by the updater thread 
+                hasPassed = true;
+        }
+        
+        job.cancel();
+    }
+	
+	// THIS MUST BE RUN LAST IN THIS TEST
+	public void testClearCache() {
+		ICodeReaderCache cache = CDOM.getInstance().getCodeReaderFactory(CDOM.PARSE_SAVED_RESOURCES).getCodeReaderCache();
+		// now that the 
+		assertTrue(cache instanceof CodeReaderCache);
+		((CodeReaderCache)cache).setCacheSize(0);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CommentTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CommentTests.java
new file mode 100644
index 0000000..acccc8b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CommentTests.java
@@ -0,0 +1,252 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others.
+ * 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  
+ * 
+ * Contributors: 
+ * Emanuel Graf & Guido Zgraggen - initial API and implementation 
+ ******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.IASTComment;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+/**
+ * @author Guido Zgraggen
+ * 
+ */
+public class CommentTests extends AST2BaseTest {
+	
+	public static TestSuite suite() {
+		return suite(CommentTests.class);
+	}
+
+	public void testCountCommentsInHeaderFile() throws ParserException{
+		IASTTranslationUnit tu = parse(getHSource(), ParserLanguage.CPP, false, true);
+		IASTComment[] comments = tu.getComments();
+
+		assertEquals(9, comments.length);
+	}
+	
+	public void testCommentsInHeaderFile() throws ParserException{
+		IASTTranslationUnit tu = parse(getHSource(), ParserLanguage.CPP, false, true);
+		IASTComment[] comments = tu.getComments();
+
+		assertEquals("/* A very cool class\n * isn't it?\n */", new String(comments[0].getComment()));
+		assertEquals("//the Hallo", new String(comments[1].getComment()));
+		assertEquals("// the 2. Hallo", new String(comments[2].getComment()));
+		assertEquals("// comment im h", new String(comments[3].getComment()));
+		assertEquals("// comment before ", new String(comments[4].getComment()));
+		assertEquals("//Great", new String(comments[5].getComment()));
+		assertEquals("//once more", new String(comments[6].getComment()));
+		assertEquals("//value field", new String(comments[7].getComment()));
+		assertEquals("//Endcomment h", new String(comments[8].getComment()));
+	}
+	
+	public void testCountCommentsInCPPFile() throws ParserException{
+		IASTTranslationUnit tu = parse(getCppSource(), ParserLanguage.CPP, false, true);
+		IASTComment[] comments = tu.getComments();
+		
+		assertEquals(10, comments.length);
+	}
+
+	public void testCommentsInCPPFile() throws ParserException{
+		IASTTranslationUnit tu = parse(getCppSource(), ParserLanguage.CPP, false, true);
+		IASTComment[] comments = tu.getComments();
+		
+		assertEquals("// Comment in cpp", new String(comments[0].getComment()));
+		assertEquals("/*The magic 5 */", new String(comments[1].getComment()));
+		assertEquals("// Another comment", new String(comments[2].getComment()));
+		assertEquals("/* A blockcomment \n* over multiple lines */", new String(comments[3].getComment()));
+		assertEquals("//Toplevel comment", new String(comments[4].getComment()));
+		assertEquals("//A little bit code", new String(comments[5].getComment()));
+		assertEquals("//Trailing comment", new String(comments[6].getComment()));
+		assertEquals("//Comment on newline", new String(comments[7].getComment()));
+		assertEquals("//Last comment in cpp", new String(comments[8].getComment()));
+		assertEquals("//An integer", new String(comments[9].getComment()));
+	}
+	
+	public void testCountCommentsInCFile() throws ParserException{
+		IASTTranslationUnit tu = parse(getCSource(), ParserLanguage.C, false, true);
+		IASTComment[] comments = tu.getComments();
+		
+		assertEquals(4, comments.length);
+	}
+	
+	public void testCommentsInCFile() throws ParserException{
+		IASTTranslationUnit tu = parse(getCSource(), ParserLanguage.C, false, true);
+		IASTComment[] comments = tu.getComments();
+		
+		assertEquals("//A little input/output programm", new String(comments[0].getComment()));
+		assertEquals("//Read the number", new String(comments[1].getComment()));
+		assertEquals("/*\n			 * That is the answer ;-)\n			 */", new String(comments[2].getComment()));
+		assertEquals("//The end", new String(comments[3].getComment()));
+	}
+
+	private String getHSource() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#ifndef CPPCLASS_H_\n");
+		buffer.append("#define CPPCLASS_H_\n");
+		buffer.append("/* A very cool class\n");
+		buffer.append(" * isn't it?\n");
+		buffer.append(" */\n");
+		buffer.append("class CppClass\n");
+		buffer.append("{\n");
+		buffer.append("public:\n");
+		buffer.append("	CppClass(int hallo, //the Hallo\n");
+		buffer.append("		int hallo2) // the 2. Hallo\n");
+		buffer.append("	const;\n");
+		buffer.append("	// comment im h\n");
+		buffer.append("	virtual ~CppClass();\n");
+		buffer.append("	// comment before \n");
+		buffer.append("	void doIrgendwas(); //Great\n");
+		buffer.append("private:\n");
+		buffer.append("	void privateMethode(); //once more\n");
+		buffer.append("	//value field\n");
+		buffer.append("	int value;\n");
+		buffer.append("	//Endcomment h\n");
+		buffer.append("};\n");
+		buffer.append("#endif\n");
+		return buffer.toString();
+	}	
+	
+	private String getCppSource() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("void CppClass()\n");
+		buffer.append("{\n");
+		buffer.append("   // Comment in cpp\n");
+		buffer.append("   int value = 1 + /*The magic 5 */5 * 6;\n");
+		buffer.append("   // Another comment\n");
+		buffer.append("   value++;\n");
+		buffer.append("}\n");
+		buffer.append("/* A blockcomment \n");
+		buffer.append("* over multiple lines */\n");
+		buffer.append("//Toplevel comment\n");
+		buffer.append("void doIrgendwas(){\n");
+		buffer.append("   //A little bit code\n");
+		buffer.append("   int i = 3; //Trailing comment\n");
+		buffer.append("		;\n");
+		buffer.append("		switch(i){\n");
+		buffer.append("			case 1:\n");
+		buffer.append("				++i;\n");
+		buffer.append("				break;\n");
+		buffer.append("			default:\n");
+		buffer.append("				++i;\n");
+		buffer.append("				break;\n");
+		buffer.append("		}\n");
+		buffer.append("		do {\n");
+		buffer.append("			++i;\n");
+		buffer.append("		} while (i < 10);\n");
+		buffer.append("		while (i < 20){\n");
+		buffer.append("			++i;\n");
+		buffer.append("		}\n");
+		buffer.append("   //Comment on newline\n");
+		buffer.append("   int n = i++ +5;\n");
+		buffer.append("  //Last comment in cpp\n");
+		buffer.append("}\n");
+		buffer.append("int globaleFuntktion(){\n");
+		buffer.append("//An integer\n");
+		buffer.append("int i;\n");
+		buffer.append("}\n");
+		buffer.append("enum hue { red, blue, green };\n");
+		buffer.append("enum hue col, *cp;\n");
+		buffer.append("void f() {\n");
+		buffer.append("   col = blue;\n");
+		buffer.append("   cp = &col;\n");
+		buffer.append("   if( *cp != red )\n");
+		buffer.append("      return;\n");
+		buffer.append("}\n");
+		return buffer.toString();
+	}
+	
+	private String getCSource() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("//A little input/output programm\n");
+		buffer.append("int main(void){\n");
+		buffer.append("	int number = -1;\n");
+		buffer.append("\n");
+		buffer.append("	printf(\"Please enter a number: \");\n");
+		buffer.append("	scanf(\"%d\", &number); //Read the number\n");
+		buffer.append("\n");
+		buffer.append("	if(number < 10){\n");
+		buffer.append("		printf(\"You aren't a fan of big things? :-)\");\n");
+		buffer.append("	}\n");
+		buffer.append("	else{\n");
+		buffer.append("		if(number == 42){\n");
+		buffer.append("			/*\n");
+		buffer.append("			 * That is the answer ;-)\n");
+		buffer.append("			 */\n");
+		buffer.append("			printf(\"Great!!! Thats the answer!!!\");\n");
+		buffer.append("		}\n");
+		buffer.append("		else{\n");
+		buffer.append("			printf(\"You tipped: %d\",  number);\n");
+		buffer.append("		}\n");
+		buffer.append("	}\n");
+		buffer.append("	return 0; //The end\n");
+		buffer.append("}\n");
+		return buffer.toString();
+	}	
+	
+	// #ifdef xxx
+	// // comment1
+	// #else 
+	// // comment2
+	// #endif
+	public void testCommentsInInactiveCode_bug183930() throws Exception {
+		StringBuffer code= getContents(1)[0];
+		IASTTranslationUnit tu = parse(code.toString(), ParserLanguage.CPP, false, true);
+		IASTComment[] comments = tu.getComments();
+		
+		assertEquals(2, comments.length);
+		assertEquals("// comment1", new String(comments[0].getComment()));
+		assertEquals("// comment2", new String(comments[1].getComment()));
+	}
+	
+	// //comment
+	public void testCommentLocation_bug186337() throws Exception{
+		StringBuffer code= getContents(1)[0];
+		IASTTranslationUnit tu = parse(code.toString(), ParserLanguage.CPP, false, true);
+		IASTComment[] comments = tu.getComments();
+		
+		assertEquals(1, comments.length);
+		assertNotNull(comments[0].getFileLocation());
+		assertNotNull(comments[0].getNodeLocations());
+
+		tu = parse(code.toString(), ParserLanguage.C, false, true);
+		comments = tu.getComments();
+		
+		assertEquals(1, comments.length);
+		assertNotNull(comments[0].getFileLocation());
+		assertNotNull(comments[0].getNodeLocations());
+	}
+	
+	// // TODO: shows up in task list 
+	// #include "somefile.h"  // TODO: ignored
+    //
+	// #ifdef WHATEVA // TODO: ignored
+	// #endif // TODO: ignored
+	// // TODO: shows up in task list
+
+	public void testCommentInDirectives_bug192546() throws Exception {
+		StringBuffer code= getContents(1)[0];
+		IASTTranslationUnit tu = parse(code.toString(), ParserLanguage.CPP, false, false);
+		IASTComment[] comments = tu.getComments();
+		
+		assertEquals(5, comments.length);
+		assertNotNull(comments[0].getFileLocation());
+		assertNotNull(comments[0].getNodeLocations());
+		for (IASTComment comment : comments) {
+			IASTFileLocation loc= comment.getFileLocation();
+			int idx= loc.getNodeOffset() + comment.getRawSignature().indexOf("TODO");
+			assertEquals("TODO", code.substring(idx, idx+4));			
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CompleteParser2Tests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CompleteParser2Tests.java
new file mode 100644
index 0000000..8a4b047
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/CompleteParser2Tests.java
@@ -0,0 +1,2704 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarationStatement;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTIfStatement;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTProblem;
+import org.eclipse.cdt.core.dom.ast.IASTReturnStatement;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
+import org.eclipse.cdt.core.dom.ast.IArrayType;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IEnumeration;
+import org.eclipse.cdt.core.dom.ast.IEnumerator;
+import org.eclipse.cdt.core.dom.ast.IField;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IFunctionType;
+import org.eclipse.cdt.core.dom.ast.ILabel;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.IPointerType;
+import org.eclipse.cdt.core.dom.ast.IProblemBinding;
+import org.eclipse.cdt.core.dom.ast.IQualifierType;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.c.CASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPReferenceType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPUsingDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.dom.parser.ISourceCodeParser;
+import org.eclipse.cdt.core.dom.parser.c.ANSICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.GCCParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.ICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ANSICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.GPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.IScanner;
+import org.eclipse.cdt.core.parser.NullLogService;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.ParserMode;
+import org.eclipse.cdt.core.parser.ScannerInfo;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.internal.core.dom.parser.c.CVisitor;
+import org.eclipse.cdt.internal.core.dom.parser.c.GNUCSourceParser;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * @author jcamelon
+ */
+public class CompleteParser2Tests extends BaseTestCase {
+
+    private static final NullLogService NULL_LOG = new NullLogService();
+    
+    public CompleteParser2Tests() {
+	}
+	public CompleteParser2Tests(String name) {
+		super(name);
+	}
+
+    public static TestSuite suite() {
+    	return suite(CompleteParser2Tests.class);
+    }
+
+	static private class CPPNameCollector extends CPPASTVisitor {
+        {
+            shouldVisitNames = true;
+        }
+        public List nameList = new ArrayList();
+        @Override
+		public int visit( IASTName name ){
+            nameList.add( name );
+            return PROCESS_CONTINUE;
+        }
+        public IASTName getName( int idx ){
+            if( idx < 0 || idx >= nameList.size() )
+                return null;
+            return (IASTName) nameList.get( idx );
+        }
+        public int size() { return nameList.size(); } 
+    }
+    static protected class CNameCollector extends CASTVisitor {
+        {
+            shouldVisitNames = true;
+        }
+        public List nameList = new ArrayList();
+        @Override
+		public int visit( IASTName name ){
+            nameList.add( name );
+            return PROCESS_CONTINUE;
+        }
+        public IASTName getName( int idx ){
+            if( idx < 0 || idx >= nameList.size() )
+                return null;
+            return (IASTName) nameList.get( idx );
+        }
+        public int size() { return nameList.size(); } 
+    }
+    protected void assertInstances( CPPNameCollector nameCollector, IBinding binding, int num ) throws Exception {
+        int count = 0;
+        for( int i = 0; i < nameCollector.size(); i++ )
+            if( nameCollector.getName( i ).resolveBinding() == binding )
+                count++;
+        
+        assertEquals( count, num );
+    }
+    protected void assertInstances( CNameCollector nameCollector, IBinding binding, int num ) throws Exception {
+        int count = 0;
+        for( int i = 0; i < nameCollector.size(); i++ )
+            if( nameCollector.getName( i ).resolveBinding() == binding )
+                count++;
+        
+        assertEquals( count, num );
+    }
+    protected IASTTranslationUnit parse(String code, boolean expectedToPass,
+            ParserLanguage lang) throws Exception {
+        return parse(code, expectedToPass, lang, false);
+    }
+
+    protected IASTTranslationUnit parse(String code, boolean expectedToPass) throws Exception {
+        return parse(code, expectedToPass, ParserLanguage.CPP);
+    }
+
+    /**
+     * @param code
+     */
+    protected IASTTranslationUnit parse(String code) throws Exception {
+        return parse(code, true, ParserLanguage.CPP);
+    }
+    
+    /**
+     * @param string
+     * @param b
+     * @param c
+     * @param d
+     */
+    protected IASTTranslationUnit parse(String code, boolean expectedToPass,
+            ParserLanguage lang, boolean gcc) throws Exception {
+
+        
+        CodeReader codeReader = new CodeReader(code
+                .toCharArray());
+        ScannerInfo scannerInfo = new ScannerInfo();
+        ISourceCodeParser parser2 = null;
+        IScanner scanner= AST2BaseTest.createScanner(codeReader, lang, ParserMode.COMPLETE_PARSE, scannerInfo);
+        if (lang == ParserLanguage.CPP) {
+            ICPPParserExtensionConfiguration config = null;
+            if (gcc)
+                config = new GPPParserExtensionConfiguration();
+            else
+                config = new ANSICPPParserExtensionConfiguration();
+            parser2 = new GNUCPPSourceParser(scanner, ParserMode.COMPLETE_PARSE,
+                    NULL_LOG, config);
+        } else {
+            ICParserExtensionConfiguration config = null;
+            if (gcc)
+                config = new GCCParserExtensionConfiguration();
+            else
+                config = new ANSICParserExtensionConfiguration();
+
+            parser2 = new GNUCSourceParser(scanner, ParserMode.COMPLETE_PARSE,
+                     NULL_LOG, config);
+        }
+        IASTTranslationUnit tu = parser2.parse();
+        if (parser2.encounteredError() && expectedToPass)
+            throw new ParserException("FAILURE"); //$NON-NLS-1$
+        if (expectedToPass)
+        {
+            if( lang == ParserLanguage.C )
+            {
+            	IASTProblem [] problems = CVisitor.getProblems(tu);
+            	assertEquals( problems.length, 0 );
+            }
+            else if ( lang == ParserLanguage.CPP )
+            {
+            	IASTProblem [] problems = CPPVisitor.getProblems(tu);
+            	assertEquals( problems.length, 0 );
+            }
+        }
+        return tu;
+    }
+    
+    public void testEmptyCompilationUnit() throws Exception
+    {
+    	parse( "// no real code "); //$NON-NLS-1$
+    }
+    
+    public void testSimpleNamespace() throws Exception
+    {
+    	IASTTranslationUnit tu = parse( "namespace A { }"); //$NON-NLS-1$
+    	CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 1 );
+		assertTrue( col.getName(0).resolveBinding() instanceof ICPPNamespace );
+    }
+
+	public void testMultipleNamespaceDefinitions() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "namespace A { } namespace A { }"); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 2 );
+		ICPPNamespace A = (ICPPNamespace) col.getName(0).resolveBinding();
+		assertInstances( col, A, 2 );
+	}
+
+    public void testNestedNamespaceDefinitions() throws Exception
+    {
+        IASTTranslationUnit tu = parse( "namespace A { namespace B { } }"); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 2 );
+		ICPPNamespace A = (ICPPNamespace) col.getName(0).resolveBinding();
+		ICPPNamespace B = (ICPPNamespace) col.getName(1).resolveBinding();
+		
+		assertSame( A.getNamespaceScope(), B.getNamespaceScope().getParent() );
+    }
+    
+    public void testEmptyClassDeclaration() throws Exception
+    {
+        IASTTranslationUnit tu = parse( "class A { };"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 1 );
+		assertTrue( col.getName(0).resolveBinding() instanceof ICPPClassType );
+    }
+    
+    public void testSimpleSubclass() throws Exception
+    {
+        IASTTranslationUnit tu = parse( "class A { };  class B : public A { };"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 3 );
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPClassType B = (ICPPClassType) col.getName(1).resolveBinding();
+		
+		assertInstances( col, A, 2 );
+		
+		assertEquals( B.getBases().length, 1 );
+		ICPPBase base = B.getBases()[0];
+		assertSame( base.getBaseClass(), A );
+		assertEquals( base.getVisibility(), ICPPBase.v_public );
+		assertFalse( base.isVirtual() );
+    }
+    
+    public void testNestedSubclass() throws Exception
+    {
+        IASTTranslationUnit tu = parse( "namespace N { class A { }; } class B : protected virtual N::A { };"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 6 );
+		ICPPNamespace N = (ICPPNamespace) col.getName(0).resolveBinding();
+		ICPPClassType A = (ICPPClassType) col.getName(1).resolveBinding();
+		ICPPClassType B = (ICPPClassType) col.getName(2).resolveBinding();
+		
+		assertInstances( col, N, 2 );
+		assertInstances( col, A, 3 );
+		assertInstances( col, B, 1 );
+		
+		assertSame( A.getScope(), N.getNamespaceScope() );
+		
+		ICPPBase base = B.getBases()[0];
+		assertSame( base.getBaseClass(), A );
+		assertTrue( base.isVirtual() );
+		assertEquals( base.getVisibility(), ICPPBase.v_protected );
+    }
+    
+    public void testSimpleVariable() throws Exception
+    {
+        IASTTranslationUnit tu = parse( "int x;"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 1 );
+ 		IVariable x = (IVariable) col.getName(0).resolveBinding();
+ 		
+ 		assertTrue( x.getType() instanceof IBasicType );
+ 		IBasicType t = (IBasicType) x.getType();
+ 		assertEquals( t.getType(), IBasicType.t_int );
+    }
+    
+	public void testSimpleClassReferenceVariable() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "class A { }; A x;"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 3 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		IVariable x = (IVariable) col.getName(2).resolveBinding();
+ 		
+ 		assertInstances( col, A, 2 );
+ 		assertSame( x.getType(), A );
+	}
+    
+	public void testNestedClassReferenceVariable() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "namespace N { class A { }; } N::A x;"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 6 );
+ 		ICPPNamespace N = (ICPPNamespace) col.getName(0).resolveBinding();
+ 		ICPPClassType A = (ICPPClassType) col.getName(1).resolveBinding();
+ 		IVariable x =  (IVariable) col.getName(5).resolveBinding();
+ 		
+ 		assertInstances( col, N, 2 );
+ 		assertInstances( col, A, 3 );
+ 		assertSame( x.getType(), A );
+ 		assertSame( A.getScope(), N.getNamespaceScope() );
+	}
+	
+	public void testMultipleDeclaratorsVariable() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "class A { }; A x, y, z;"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 5 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		IVariable x = (IVariable) col.getName(2).resolveBinding();
+ 		IVariable y = (IVariable) col.getName(3).resolveBinding();
+ 		IVariable z = (IVariable) col.getName(4).resolveBinding();
+ 		
+ 		assertInstances( col, A, 2 );
+ 		assertSame( A, x.getType() );
+ 		assertSame( x.getType(), y.getType() );
+ 		assertSame( y.getType(), z.getType() );
+	}
+	
+	public void testSimpleField() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "class A { double x; };"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 2 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		ICPPField x = (ICPPField) col.getName(1).resolveBinding();
+ 		
+ 		assertSame( x.getScope(), A.getCompositeScope() );
+ 		IField [] fields = A.getFields();
+ 		assertEquals( fields.length, 1 );
+ 		assertSame( fields[0], x );
+ 	}
+	
+	public void testUsingClauses() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "namespace A { namespace B { int x;  class C { static int y = 5; }; } } \n " + //$NON-NLS-1$
+	    		                        "using namespace A::B;\n " + //$NON-NLS-1$
+	    		                        "using A::B::x;" + //$NON-NLS-1$
+	    		                        "using A::B::C;" + //$NON-NLS-1$
+	    		                        "using A::B::C::y;"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 21 );
+ 		ICPPNamespace A = (ICPPNamespace) col.getName(0).resolveBinding();
+ 		ICPPNamespace B = (ICPPNamespace) col.getName(1).resolveBinding();
+ 		IVariable x =  (IVariable) col.getName(2).resolveBinding();
+ 		ICPPClassType C =  (ICPPClassType) col.getName(3).resolveBinding();
+ 		ICPPField y = (ICPPField) col.getName(4).resolveBinding();
+ 		
+ 		ICPPUsingDeclaration using_x = (ICPPUsingDeclaration) col.getName(11).resolveBinding();
+ 		ICPPUsingDeclaration using_C = (ICPPUsingDeclaration) col.getName(15).resolveBinding();
+ 		ICPPUsingDeclaration using_y = (ICPPUsingDeclaration) col.getName(20).resolveBinding();
+ 		
+ 		assertInstances( col, A, 5 );
+ 		assertInstances( col, B, 6 );
+ 		assertInstances( col, x, 1 );
+ 		assertInstances( col, C, 2 );
+ 		assertInstances( col, y, 1 );
+ 		
+ 		IBinding [] ds = using_x.getDelegates();
+ 		assertSame( ds[0], x );
+ 		assertSame( using_C.getDelegates()[0], C );
+ 		assertSame( using_y.getDelegates()[0], y );
+	}
+	
+	public void testEnumerations() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "namespace A { enum E { e1, e2, e3 }; E varE;}"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 7 );
+ 		ICPPNamespace A = (ICPPNamespace) col.getName(0).resolveBinding();
+ 		IEnumeration E = (IEnumeration) col.getName(1).resolveBinding();
+ 		IEnumerator e1 = (IEnumerator) col.getName(2).resolveBinding();
+ 		IEnumerator e2 = (IEnumerator) col.getName(3).resolveBinding();
+ 		IEnumerator e3 = (IEnumerator) col.getName(4).resolveBinding();
+ 		IVariable varE = (IVariable) col.getName(6).resolveBinding();
+ 		
+ 		assertInstances( col, E, 2 );
+ 		assertSame( E.getScope(), A.getNamespaceScope() );
+ 		assertSame( e1.getScope(), A.getNamespaceScope() );
+ 		assertNotNull( e2 );
+ 		assertNotNull( e3 );
+ 		assertNotNull( varE );
+	}
+	
+	public void testSimpleFunction() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "void foo( void );"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 2 );
+ 		IFunction foo = (IFunction) col.getName(0).resolveBinding();
+ 		IParameter p =  (IParameter) col.getName(1).resolveBinding();
+ 		
+ 		assertEquals( foo.getParameters().length, 1 );
+ 		assertSame( foo.getParameters()[0], p );
+ 		assertSame( p.getScope(), foo.getFunctionScope() );
+	}
+	
+	public void testSimpleFunctionWithTypes() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "class A { public: \n class B { }; }; const A::B &  foo( A * myParam );"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 8 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		ICPPClassType B = (ICPPClassType) col.getName(1).resolveBinding();
+ 		IFunction foo = (IFunction) col.getName(5).resolveBinding();
+ 		IParameter p = (IParameter) col.getName(7).resolveBinding();
+ 		
+ 		assertInstances( col, A, 3 );
+ 		assertInstances( col, B, 3 );
+ 		
+ 		IFunctionType ftype = foo.getType();
+ 		assertTrue( ftype.getReturnType() instanceof ICPPReferenceType );
+ 		ICPPReferenceType rt = (ICPPReferenceType) ftype.getReturnType();
+ 		assertTrue( rt.getType() instanceof IQualifierType );
+ 		assertSame( ((IQualifierType)rt.getType()).getType(), B );
+ 		
+ 		IType pt = ftype.getParameterTypes()[0];
+ 		assertTrue( p.getType().isSameType( pt ) );
+ 		assertTrue( pt instanceof IPointerType );
+ 		assertSame( ((IPointerType) pt).getType(), A );
+	}
+	
+	public void testSimpleMethod() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "class A { void foo(); };"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 2 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		ICPPMethod foo = (ICPPMethod) col.getName(1).resolveBinding();
+ 		
+ 		assertSame( foo.getScope(), A.getCompositeScope() );
+	}
+	
+	public void testSimpleMethodWithTypes() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "class U { }; class A { U foo( U areDumb ); };"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 6 );
+ 		ICPPClassType U = (ICPPClassType) col.getName(0).resolveBinding();
+ 		ICPPClassType A = (ICPPClassType) col.getName(1).resolveBinding();
+ 		ICPPMethod foo = (ICPPMethod) col.getName(3).resolveBinding();
+ 		IParameter p = (IParameter) col.getName(5).resolveBinding();
+ 		
+ 		assertInstances( col, U, 3 );
+ 		assertSame( foo.getScope(), A.getCompositeScope() );
+ 		IFunctionType ft = foo.getType();
+ 		assertSame( ft.getReturnType(), U );
+ 		assertSame( p.getType(), U );
+	}
+	
+	public void testUsingDeclarationWithFunctionsAndMethods() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "namespace N { int foo(void); } class A { static int bar(void); }; using N::foo; using ::A::bar;" ); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 12 );
+ 		ICPPNamespace N = (ICPPNamespace) col.getName(0).resolveBinding();
+ 		IFunction foo = (IFunction) col.getName(1).resolveBinding();
+ 		ICPPClassType A = (ICPPClassType) col.getName(3).resolveBinding();
+ 		ICPPMethod bar = (ICPPMethod) col.getName(4).resolveBinding();
+ 		
+ 		ICPPUsingDeclaration using_foo = (ICPPUsingDeclaration) col.getName(8).resolveBinding();
+ 		ICPPUsingDeclaration using_bar = (ICPPUsingDeclaration) col.getName(11).resolveBinding();
+ 		
+ 		assertInstances( col, N, 2 );
+ 		assertInstances( col, foo, 1 );
+ 		assertInstances( col, A, 2 );
+ 		assertInstances( col, bar, 1 );
+ 		
+ 		assertSame( using_foo.getDelegates()[0], foo );
+ 		assertSame( using_bar.getDelegates()[0], bar );
+	}
+	
+	public void testLinkageSpec() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "extern \"C\" { int foo(); }"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 1 );
+ 		IFunction foo = (IFunction) col.getName(0).resolveBinding();
+ 		assertNotNull( foo );
+	}
+	
+
+	public void testBogdansExample() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "namespace A { namespace B {	enum e1{e_1,e_2};	int x;	class C	{	static int y = 5;	}; }} "); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 8 );
+ 		ICPPNamespace A = (ICPPNamespace) col.getName(0).resolveBinding();
+ 		ICPPNamespace B = (ICPPNamespace) col.getName(1).resolveBinding();
+ 		IEnumeration e1 = (IEnumeration) col.getName(2).resolveBinding();
+ 		IEnumerator e_1 = (IEnumerator) col.getName(3).resolveBinding();
+ 		IEnumerator e_2 = (IEnumerator) col.getName(4).resolveBinding();
+ 		IVariable x = (IVariable) col.getName(5).resolveBinding();
+ 		ICPPClassType C = (ICPPClassType) col.getName(6).resolveBinding();
+ 		ICPPField y = (ICPPField) col.getName(7).resolveBinding();
+ 		
+ 		assertSame( B.getScope(), A.getNamespaceScope() );
+ 		assertSame( e1.getScope(), B.getNamespaceScope() );
+ 		assertSame( e_1.getScope(), B.getNamespaceScope() );
+ 		assertSame( e_2.getType(), e1 );
+ 		assertNotNull( x );
+ 		assertNotNull( C );
+ 		assertNotNull( y );
+	}
+	
+	public void testAndrewsExample() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "namespace N{ class A {}; }	using namespace N;	class B: public A{};"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 5 );
+ 		ICPPNamespace N = (ICPPNamespace) col.getName(0).resolveBinding();
+ 		ICPPClassType A = (ICPPClassType) col.getName(1).resolveBinding();
+ 		ICPPClassType B = (ICPPClassType) col.getName(3).resolveBinding();
+ 		
+ 		assertInstances( col, N, 2 );
+ 		assertInstances( col, A, 2 );
+ 		
+ 		ICPPBase base = B.getBases()[0];
+ 		assertSame( base.getBaseClass(), A );
+	}
+	
+	public void testSimpleTypedef() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "typedef int myInt;\n myInt var;"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 3 );
+ 		ITypedef myInt = (ITypedef) col.getName(0).resolveBinding();
+ 		IVariable var = (IVariable) col.getName(2).resolveBinding();
+ 		
+ 		assertInstances( col, myInt, 2 );
+ 		assertTrue( myInt.getType() instanceof IBasicType );
+ 		assertSame( var.getType(), myInt );
+	}
+	
+	public void testComplexTypedef() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "class A{ }; typedef A ** A_DOUBLEPTR;"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 3 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		ITypedef APTR = (ITypedef) col.getName(2).resolveBinding();
+ 		
+ 		assertInstances( col, A, 2 );
+ 		assertTrue( APTR.getType() instanceof IPointerType );
+ 		IPointerType pt = (IPointerType) APTR.getType();
+ 		assertTrue( pt.getType() instanceof IPointerType );
+ 		pt = (IPointerType) pt.getType();
+ 		assertSame( pt.getType(), A );
+	}
+	
+	
+	protected void assertQualifiedName(String [] fromAST, String [] theTruth)
+	 {
+		 assertNotNull( fromAST );
+		 assertNotNull( theTruth );
+		 assertEquals( fromAST.length, theTruth.length );
+		 for( int i = 0; i < fromAST.length; ++i )
+		 {
+			 assertEquals( fromAST[i], theTruth[i]);
+		 }
+	 }
+
+	public void testBug40842() throws Exception{
+		Writer code = new StringWriter();		
+		code.write("class A {} a;\n"); //$NON-NLS-1$
+		IASTTranslationUnit tu = parse(code.toString());
+
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+		IASTCompositeTypeSpecifier comp = (IASTCompositeTypeSpecifier) decl.getDeclSpecifier();
+		ICPPClassType A = (ICPPClassType) comp.getName().resolveBinding();
+		IVariable a = (IVariable) decl.getDeclarators()[0].getName().resolveBinding();
+		assertSame( a.getType(), A );
+	}
+	
+	public void testNestedClassname() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "namespace A { } \n class A::B { };"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+        tu.accept( col );
+        
+        ICPPNamespace A = (ICPPNamespace) col.getName(0).resolveBinding();
+        ICPPClassType B = (ICPPClassType) col.getName(1).resolveBinding();
+        assertInstances( col, A, 2 );
+        assertEquals( B.getScope(), A.getNamespaceScope() );
+	}
+	
+	public void testForwardDeclaration() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "class forward;"); //$NON-NLS-1$
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+		assertEquals( decl.getDeclarators().length, 0 );
+		
+		IASTElaboratedTypeSpecifier spec = (IASTElaboratedTypeSpecifier) decl.getDeclSpecifier();
+		ICPPClassType forward = (ICPPClassType) spec.getName().resolveBinding();
+		assertNotNull( forward );
+	}
+	
+	public void testElaboratedType() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "class A; class A * a;"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 3 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		IVariable a = (IVariable) col.getName(2).resolveBinding();
+ 		IPointerType ptr = (IPointerType) a.getType();
+ 		assertInstances( col, A, 2 );
+ 		assertSame( ptr.getType(), A );
+	}
+	
+	public void testForewardDeclarationWithUsage() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "class A; A * anA;class A { };"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 4 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		IVariable anA = (IVariable) col.getName(2).resolveBinding();
+ 		assertInstances( col, A, 3 );
+ 		IPointerType ptr = (IPointerType) anA.getType();
+ 		assertSame( ptr.getType(), A );
+	}
+		
+	
+	public void testASM() throws Exception
+	{
+		parse( "asm ( \"blah blah blah\" );" ); //$NON-NLS-1$
+	}
+
+	
+	/** 
+	 *  Tests GNU extensions to asm
+	 *  e.g. asm volatile ("stuff");
+	 *       asm ("addl %%ebx,%%eax" : "=a"(foo) : "a"(foo),"b"(bar) ); 
+	 */
+	public void testGNUASMExtension() throws Exception
+	{
+		// volatile keyword
+		parse( "asm volatile( \"blah blah blah\" );", true, ParserLanguage.C, true ); //$NON-NLS-1$
+		parse( "asm volatile( \"blah blah blah\" );", true, ParserLanguage.CPP, true ); //$NON-NLS-1$
+		
+		// Use of operands
+		parse( "asm (\"addl  %%ebx,%%eax\" : \"=a\"(foo) :\"a\"(foo), \"b\"(bar) );", true, ParserLanguage.C, true );//$NON-NLS-1$
+		parse( "asm (\"addl  %%ebx,%%eax\" : \"=a\"(foo) :\"a\"(foo), \"b\"(bar) );", true, ParserLanguage.CPP, true );//$NON-NLS-1$
+		
+		// Invalid use of operands
+		parse( "asm (\"addl  %%ebx,%%eax\"  \"=a\"(foo) :\"a\"(foo) : \"b\"(bar) );", false, ParserLanguage.C, true );//$NON-NLS-1$
+		parse( "asm (\"addl  %%ebx,%%eax\"  \"=a\"(foo) :\"a\"(foo) : \"b\"(bar) );", false, ParserLanguage.CPP, true );//$NON-NLS-1$
+
+		// Code from bug 145389.
+		parse("#define mb()  __asm__ __volatile__ (\"sync\" : : : \"memory\")\r\n" + 
+				"\r\n" + 
+				"int main(int argc, char **argv) {\r\n" + 
+				"        mb();\r\n" + 
+				"}");
+		// Code from bug 117001
+		parse("static inline long\r\n" + 
+				"div_ll_X_l_rem(long long divs, long div, long *rem)\r\n" + 
+				"{\r\n" + 
+				"        long dum2;\r\n" + 
+				"      __asm__(\"divl %2\":\"=a\"(dum2), \"=d\"(*rem) // syntax error indicated at \":\"\r\n" + 
+				"      : \"rm\"(div), \"A\"(divs));\r\n" + 
+				"\r\n" + 
+				"        return dum2;\r\n" + 
+				"\r\n" + 
+				"}");
+	}
+
+	public void testOverride() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "void foo();\n void foo( int );\n"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 3 );
+ 		IFunction foo1 = (IFunction) col.getName(0).resolveBinding();
+ 		IFunction foo2 = (IFunction) col.getName(1).resolveBinding();
+ 		
+ 		assertNotSame( foo1, foo2 );
+	}	 
+	
+	public void testSimpleExpression() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "int x; int y = x;"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 3 );
+ 		IVariable x = (IVariable) col.getName(0).resolveBinding();
+ 		IVariable y = (IVariable) col.getName(1).resolveBinding();
+ 		assertInstances( col, x, 2 );
+ 		assertNotNull( y );
+	}
+	
+	public void testParameterExpressions() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "int x = 5; void foo( int sub = x ) { }"); //$NON-NLS-1$
+        CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 4 );
+ 		IVariable x = (IVariable) col.getName(0).resolveBinding();
+ 		assertInstances( col, x, 2 );
+	}
+	
+	public void testNestedNamespaceExpression() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "namespace A { int x = 666; } int y  = A::x;"); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 6 );
+ 		ICPPNamespace A = (ICPPNamespace) col.getName(0).resolveBinding();
+ 		IVariable x = (IVariable) col.getName(1).resolveBinding();
+ 		assertInstances( col, A, 2 );
+ 		assertInstances( col, x, 3 );
+	}
+	
+	public void testConstructorChain() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "int x = 5;\n class A \n{ public : \n int a; \n A() : a( x ) { } };");  //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 6 );
+ 		IVariable x = (IVariable) col.getName(0).resolveBinding();
+ 		ICPPField a = (ICPPField) col.getName(2).resolveBinding();
+ 		ICPPConstructor A = (ICPPConstructor) col.getName(3).resolveBinding();
+ 		assertNotNull( A );
+ 		assertInstances( col, x, 2 );
+ 		assertInstances( col, a, 2 );
+	}
+	
+	public void testArrayModExpression() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "const int x = 5; int y [ x ]; "); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 3 );
+ 		IVariable x = (IVariable) col.getName(0).resolveBinding();
+ 		IVariable y = (IVariable) col.getName(1).resolveBinding();
+ 		assertInstances( col, x, 2 );
+ 		assertTrue( y.getType() instanceof IArrayType );
+ 		assertTrue( ((IArrayType)y.getType()).getType() instanceof IBasicType );
+	}
+
+
+	public void testPointerVariable() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "class A { }; A * anA;"); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 3 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		IVariable anA = (IVariable) col.getName(2).resolveBinding();
+ 		assertInstances( col, A, 2 );
+ 		assertTrue( anA.getType() instanceof IPointerType );
+ 		assertSame( ((IPointerType) anA.getType()).getType(), A );
+	}	
+	
+	public void testExceptionSpecification() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "class A { }; void foo( void ) throw ( A );"); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 4 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		assertInstances( col, A, 2 );
+	}
+	 
+	public void testNewExpressions() throws Exception {
+		IASTTranslationUnit tu = parse( "typedef int A; int B; int C; int D; int P; int*p = new  (P) (A[B][C][D]);" ); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 11 );
+ 		ITypedef A = (ITypedef) col.getName(0).resolveBinding();
+ 		IVariable B = (IVariable) col.getName(1).resolveBinding();
+ 		IVariable C = (IVariable) col.getName(2).resolveBinding();
+ 		IVariable D = (IVariable) col.getName(3).resolveBinding();
+ 		IVariable P = (IVariable) col.getName(4).resolveBinding();
+ 		IVariable p = (IVariable) col.getName(5).resolveBinding();
+ 		
+ 		assertInstances( col, A, 2 );
+ 		assertInstances( col, B, 2 );
+ 		assertInstances( col, C, 2 );
+ 		assertInstances( col, D, 2 );
+ 		assertInstances( col, P, 2 );
+ 		
+ 		assertTrue( p.getType() instanceof IPointerType );
+	}
+
+	public void testBug41520() throws Exception 
+	{
+		IASTTranslationUnit tu = parse( "int f() { const int x = 666; const int y( x ); }"); //$NON-NLS-1$
+		IASTCompoundStatement s = (IASTCompoundStatement) ((IASTFunctionDefinition)tu.getDeclarations()[0]).getBody();
+        IASTDeclarationStatement ds = (IASTDeclarationStatement) s.getStatements()[1];
+        
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) ds.getDeclaration();
+		IASTDeclarator dtor = decl.getDeclarators()[0];
+		assertFalse( dtor instanceof IASTFunctionDeclarator );
+		assertNotNull( dtor.getInitializer() );
+		
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 4 );
+ 		IVariable x = (IVariable) col.getName(1).resolveBinding();
+ 		IVariable y = (IVariable) col.getName(2).resolveBinding();
+ 		assertNotNull(y);
+ 		assertInstances( col, x, 2 );
+	}
+	
+	public void testNewXReferences() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "const int max = 5;\n int * x = new int[max];"); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 3 );
+ 		IVariable max = (IVariable) col.getName(0).resolveBinding();
+ 		assertInstances( col, max, 2 );
+	}
+	
+	public void testQualifiedNameReferences() throws Exception
+	{
+		// Used to cause AST Semantic exception
+		IASTTranslationUnit tu = parse( "class A{ class B{ class C { public: int cMethod(); }; }; }; \n  int A::B::C::cMethod() {}; \n" ); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 9 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		ICPPClassType B = (ICPPClassType) col.getName(1).resolveBinding();
+ 		ICPPClassType C = (ICPPClassType) col.getName(2).resolveBinding();
+ 		ICPPMethod cMethod = (ICPPMethod) col.getName(3).resolveBinding();
+ 		
+ 		assertInstances( col, A, 2 );
+ 		assertInstances( col, B, 2 );
+ 		assertInstances( col, C, 2 );
+ 		assertInstances( col, cMethod, 3 );
+ 		assertEquals( cMethod.getVisibility(), ICPPMember.v_public );
+ 		assertSame( cMethod.getScope(), C.getCompositeScope() );
+ 		assertSame( C.getScope(), B.getCompositeScope() );
+ 		assertSame( B.getScope(), A.getCompositeScope() );
+	}
+
+	public void testIsConstructor() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "class A{ public: A(); }; \n  A::A() {}; \n" ); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 5 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		ICPPConstructor ctor = (ICPPConstructor) col.getName(1).resolveBinding();
+ 		
+ 		assertInstances( col, A, 2 );
+ 		assertInstances( col, ctor, 3 );
+	}
+
+	public void testIsDestructor() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "class A{ public: ~A(); }; \n  A::~A() {}; \n" ); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 5 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		ICPPMethod dtor = (ICPPMethod) col.getName(1).resolveBinding();
+ 		
+ 		assertInstances( col, A, 2 );
+ 		assertInstances( col, dtor, 3 );
+	}
+	
+	public void testBug41445() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "class A { }; namespace N { class B : public A { struct A {}; }; }"); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 5 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		ICPPNamespace N = (ICPPNamespace) col.getName(1).resolveBinding();
+ 		ICPPClassType B = (ICPPClassType) col.getName(2).resolveBinding();
+ 		ICPPClassType A2 = (ICPPClassType) col.getName(4).resolveBinding();
+ 		
+ 		assertInstances( col, A, 2 );
+ 		assertNotSame( A, A2 );
+ 		assertSame( A2.getScope(), B.getCompositeScope() );
+ 		assertSame( B.getScope(), N.getNamespaceScope() );
+ 		assertSame( B.getBases()[0].getBaseClass(), A );
+ 		
+	}
+	
+	public void testSimpleFunctionBody() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "class A { int f1(); }; const int x = 4; int f() { return x; } int A::f1() { return x; }"); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 9 );
+ 		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+ 		ICPPMethod f1 = (ICPPMethod) col.getName(1).resolveBinding();
+ 		IVariable x = (IVariable) col.getName(2).resolveBinding();
+ 		
+ 		assertInstances( col, A, 2 );
+ 		assertInstances( col, f1, 3 );
+ 		assertInstances( col, x, 3 );
+	}
+
+
+	public void testSimpleForLoop() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "const int FIVE = 5;  void f() {  int x = 0; for( int i = 0; i < FIVE; ++i ) { x += i; }  }"); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 9 );
+ 		IVariable FIVE = (IVariable) col.getName(0).resolveBinding();
+ 		IVariable x = (IVariable) col.getName(2).resolveBinding();
+ 		IVariable i = (IVariable) col.getName(3).resolveBinding();
+ 		
+ 		assertInstances( col, FIVE, 2 );
+ 		assertInstances( col, x, 2 );
+ 		assertInstances( col, i, 4 );
+	}
+
+	public void testBug42541() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "union{ int v; char a; } id;" ); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 4 );
+ 		
+ 		ICPPClassType unnamed = (ICPPClassType) col.getName(0).resolveBinding();
+ 		ICPPField v = (ICPPField) col.getName(1).resolveBinding();
+ 		ICPPField a = (ICPPField) col.getName(2).resolveBinding();
+ 		IVariable id = (IVariable) col.getName(3).resolveBinding();
+ 		
+ 		assertEquals( unnamed.getKey(), ICompositeType.k_union );
+ 		assertSame( v.getScope(), unnamed.getCompositeScope() );
+ 		assertSame( a.getScope(), unnamed.getCompositeScope() );
+ 		assertSame( id.getType(), unnamed );
+	}
+	
+	
+	
+	public void testSimpleIfStatement() throws Exception
+	{
+		IASTTranslationUnit tu =parse( "const bool T = true; int foo() { if( T ) { return 5; } else if( ! T ) return 20; else { return 10; } }"); //$NON-NLS-1$
+		
+		IASTFunctionDefinition foo = (IASTFunctionDefinition) tu.getDeclarations()[1];
+		IASTCompoundStatement compound  = (IASTCompoundStatement) foo.getBody();
+		IASTIfStatement ifstmt = (IASTIfStatement) compound.getStatements()[0];
+		assertTrue( ifstmt.getConditionExpression() instanceof IASTIdExpression );
+		assertTrue( ifstmt.getThenClause() instanceof IASTCompoundStatement );
+		assertTrue( ifstmt.getElseClause() instanceof IASTIfStatement );
+		ifstmt = (IASTIfStatement) ifstmt.getElseClause();
+		assertTrue( ifstmt.getConditionExpression() instanceof IASTUnaryExpression );
+		assertTrue( ifstmt.getThenClause() instanceof IASTReturnStatement );
+		assertTrue( ifstmt.getElseClause() instanceof IASTCompoundStatement );
+		
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 4 );
+ 		
+ 		IVariable T = (IVariable) col.getName(0).resolveBinding();
+ 		assertInstances( col, T, 3 );
+	}
+	
+	public void testSimpleWhileStatement() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "const bool T = true; void foo() { int x = 0; while( T ) {  ++x;  if( x == 100 ) break; } }"); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 6 );
+ 		IVariable T = (IVariable) col.getName(0).resolveBinding();
+ 		IVariable x = (IVariable) col.getName(2).resolveBinding();
+ 		assertInstances( col, T, 2 );
+ 		assertInstances( col, x, 3 );
+	}
+	
+	public void testSimpleSwitchStatement() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "const int x = 5; const int y = 10; " + //$NON-NLS-1$
+										"void foo() {                       " + //$NON-NLS-1$
+										"	while( true ) {                 " + //$NON-NLS-1$
+										"      switch( x ) {                " + //$NON-NLS-1$
+										"         case 1: break;            " + //$NON-NLS-1$
+										"         case 2: goto blah;        " + //$NON-NLS-1$
+										"         case y: continue;         " + //$NON-NLS-1$
+										"         default: break;           " + //$NON-NLS-1$
+										"      }                            " + //$NON-NLS-1$
+										"   }                               " + //$NON-NLS-1$
+										"   blah : ;                        " + //$NON-NLS-1$
+										"}                                  "); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 7 );
+ 		IVariable x = (IVariable) col.getName(0).resolveBinding();
+ 		IVariable y = (IVariable) col.getName(1).resolveBinding();
+ 		ILabel blah = (ILabel) col.getName(4).resolveBinding();
+ 		assertNotNull( blah );
+ 		assertInstances( col, x, 2 );
+ 		assertInstances( col, y, 2 );
+ 		assertInstances( col, blah, 2 );
+	}
+	
+	public void testSimpleDoStatement() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "const int x = 3; int counter = 0; void foo() { do { ++counter; } while( counter != x ); } "); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 6 );
+ 		IVariable x = (IVariable) col.getName(0).resolveBinding();
+ 		IVariable counter = (IVariable) col.getName(1).resolveBinding();
+ 		assertInstances( col, x, 2 );
+ 		assertInstances( col, counter, 3 );
+	}
+	
+	public void testThrowStatement() throws Exception {
+		IASTTranslationUnit tu = parse("class A { }; void foo() throw ( A ) { A a; throw a; throw; } "); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept(col);
+
+		assertEquals(6, col.size());
+		ICompositeType A = (ICompositeType) col.getName(0).resolveBinding();
+		assertInstances(col, A, 3);
+
+		IVariable a = (IVariable) col.getName(4).resolveBinding();
+		assertInstances(col, a, 2);
+	}
+	
+	public void testScoping() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "void foo() { int x = 3; if( x == 1 ) { int x = 4; } else int x = 2; }");  //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 5 );
+ 		IVariable x1 = (IVariable) col.getName(1).resolveBinding();
+ 		IVariable x2 = (IVariable) col.getName(3).resolveBinding();
+ 		IVariable x3 = (IVariable) col.getName(4).resolveBinding();
+ 		
+ 		assertInstances( col, x1, 2 );
+ 		assertInstances( col, x2, 1 );
+ 		assertInstances( col, x3, 1 );
+	}
+	
+	public void testEnumeratorReferences() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "enum E { e1, e2, e3 }; E anE = e1;"); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 7 );
+ 		IEnumeration E = (IEnumeration) col.getName(0).resolveBinding();
+ 		IEnumerator e1 = (IEnumerator) col.getName(1).resolveBinding();
+ 		IEnumerator e2 = (IEnumerator) col.getName(2).resolveBinding();
+ 		IEnumerator e3 = (IEnumerator) col.getName(3).resolveBinding();
+ 		IVariable anE =  (IVariable) col.getName(5).resolveBinding();
+ 		
+ 		assertInstances( col, E, 2 );
+ 		assertInstances( col, e1, 2 );
+ 		assertInstances( col, e2, 1 );
+ 		assertInstances( col, e3, 1 );
+ 		assertInstances( col, anE, 1 );
+	}
+	
+	public void testBug42840() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "void foo(); void foo() { } class SearchMe { };"); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 3 );
+ 		IFunction foo = (IFunction) col.getName(0).resolveBinding();
+ 		
+ 		assertInstances( col, foo, 2 );
+	}
+	
+	public void testBug42872() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "struct B {}; struct D : B {}; void foo(D* dp) { B* bp = dynamic_cast<B*>(dp); }" );  //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 10 );
+ 		ICompositeType B = (ICompositeType) col.getName(0).resolveBinding();
+ 		ICompositeType D = (ICompositeType) col.getName(1).resolveBinding();
+ 		
+ 		assertInstances( col, B, 4 );
+ 		assertInstances( col, D, 2 );
+	}
+	
+	public void testBug43503A() throws Exception {
+	    IASTTranslationUnit tu = parse("class SD_01 { void f_SD_01() {}}; int main(){ SD_01 * a = new SD_01(); a->f_SD_01();	} "); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 8 );
+ 		ICPPClassType SD_01 = (ICPPClassType) col.getName(0).resolveBinding();
+ 		ICPPMethod f_SD_01 = (ICPPMethod) col.getName(1).resolveBinding();
+ 		ICPPConstructor ctor = SD_01.getConstructors()[0];
+ 		assertInstances( col, SD_01, 2 );
+ 		assertInstances( col, ctor, 1 );
+ 		assertInstances( col, f_SD_01, 2 );
+	}	
+	
+	
+	public void testBug42979() throws Exception
+	{
+		Writer code = new StringWriter(); 
+		code.write( "class OperatorOverload{\n" ); //$NON-NLS-1$
+		code.write( "public:\n" ); //$NON-NLS-1$
+		code.write( "  bool operator==( const class OperatorOverload& that )\n" ); //$NON-NLS-1$
+		code.write( "  { return true; }\n" ); //$NON-NLS-1$
+		code.write( "  bool operator!=( const class OperatorOverload& that );\n" ); //$NON-NLS-1$
+		code.write( "}; \n" ); //$NON-NLS-1$
+  
+		code.write( "bool OperatorOverload::operator!=( const class OperatorOverload& that )\n" ); //$NON-NLS-1$
+		code.write( "{ return false; }\n" ); //$NON-NLS-1$
+
+		IASTTranslationUnit tu = parse( code.toString() );
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 12 );
+ 		ICompositeType OperatorOverload = (ICompositeType) col.getName(0).resolveBinding();
+ 		ICPPMethod op1 = (ICPPMethod) col.getName(1).resolveBinding();
+ 		ICPPMethod op2 = (ICPPMethod) col.getName(4).resolveBinding();
+ 		
+ 		assertInstances( col, OperatorOverload, 5 );
+ 		assertInstances( col, op1, 1 );
+ 		assertInstances( col, op2, 3 );
+	}
+	/** 
+	 * class A { static int x; } int A::x = 5;
+	 */
+	public void testBug43373() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "class A { static int x; }; int A::x = 5;" ); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 5 );
+ 		ICompositeType A = (ICompositeType) col.getName(0).resolveBinding();
+ 		ICPPField x = (ICPPField) col.getName(1).resolveBinding();
+ 		
+ 		assertInstances( col, A, 2 );
+ 		assertInstances( col, x, 3 );
+	}
+	
+	public void testBug39504() throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "const int w = 2; int x[ 5 ]; int y = sizeof ( x[w] );" ); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 5 );
+ 		IVariable w = (IVariable) col.getName(0).resolveBinding();
+ 		IVariable x = (IVariable) col.getName(1).resolveBinding();
+ 		
+ 		assertInstances( col, w, 2 );
+ 		assertInstances( col, x, 2 );		
+	}
+	
+	public void testBug43375() throws Exception
+	{
+		parse( "extern int x;"); //$NON-NLS-1$
+	}
+
+	public void testBug43503() throws Exception
+	{
+		StringBuffer buff = new StringBuffer(); 
+		
+		buff.append( "class SD_02 {                "); //$NON-NLS-1$
+		buff.append( "	public:                    "); //$NON-NLS-1$
+		buff.append( "   void f_SD_02();           "); //$NON-NLS-1$
+		buff.append( " };                          "); //$NON-NLS-1$
+		buff.append( "class SD_01 {              \n"); //$NON-NLS-1$
+		buff.append( " public:                   \n"); //$NON-NLS-1$
+		buff.append( "   SD_02 *next;            \n"); //$NON-NLS-1$  // REFERENCE SD_02 
+		buff.append( "   void f_SD_01();         \n"); //$NON-NLS-1$
+		buff.append( "};                         \n"); //$NON-NLS-1$
+		buff.append( "int main(){                \n"); //$NON-NLS-1$
+		buff.append( "   SD_01* a = new SD_01(); \n"); //$NON-NLS-1$  // REFERENCE SD_01 * 2 
+		buff.append( "   a->f_SD_01();           \n"); //$NON-NLS-1$  // REFERENCE a && REFERENCE f_SD_01 
+		buff.append( "}                          \n"); //$NON-NLS-1$
+		buff.append( "void SD_01::f_SD_01()      \n"); //$NON-NLS-1$ // REFERENCE SD_01 
+		buff.append( "{                          \n"); //$NON-NLS-1$
+		buff.append( "   next->f_SD_02();        \n"); //$NON-NLS-1$ // REFERENCE next && reference f_SD_02 
+		buff.append( "}                          \n"); //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buff.toString() );
+		
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 17 );
+ 		ICompositeType SD_02 = (ICompositeType) col.getName(0).resolveBinding();
+ 		ICPPMethod f_SD_02 = (ICPPMethod) col.getName(1).resolveBinding();
+ 		ICPPClassType SD_01 = (ICPPClassType) col.getName(2).resolveBinding();
+ 		ICPPField next = (ICPPField) col.getName(4).resolveBinding();
+ 		ICPPMethod f_SD_01 = (ICPPMethod) col.getName(5).resolveBinding();
+ 		ICPPConstructor ctor = SD_01.getConstructors()[0];
+ 		
+ 		assertInstances( col, SD_02, 2 );
+ 		assertInstances( col, f_SD_02, 2 );
+ 		assertInstances( col, SD_01, 3 );
+ 		assertInstances( col, ctor, 1 );
+ 		assertInstances( col, next, 2 );
+ 		assertInstances( col, f_SD_01, 4 );
+	}
+		
+	public void testBug43679_A () throws Exception
+	{
+	    IASTTranslationUnit tu = parse( "struct Sample { int size() const; }; extern const Sample * getSample(); int trouble() {  return getSample()->size(); } " ); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+ 		tu.accept( col );
+ 		
+ 		assertEquals( col.size(), 7 );
+ 		ICompositeType sample = (ICompositeType) col.getName(0).resolveBinding();
+ 		ICPPMethod size = (ICPPMethod) col.getName(1).resolveBinding();
+ 		IFunction getSample = (IFunction) col.getName(3).resolveBinding();
+
+ 		assertInstances( col, sample, 2 );
+ 		assertInstances( col, size, 2 );
+ 		assertInstances( col, getSample, 2 );
+	}
+
+	public void testBug43679_B () throws Exception
+	{ 
+	    IASTTranslationUnit tu = parse( "struct Sample{int size() const; }; struct Sample; " ); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 3 );
+		ICompositeType sample = (ICompositeType) col.getName(0).resolveBinding();
+		ICPPMethod size = (ICPPMethod) col.getName(1).resolveBinding();
+		
+		assertInstances( col, sample, 2 );
+		assertInstances( col, size, 1 );
+	}
+	
+	public void testBug43951() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "class B{ B(); ~B(); }; B::B(){} B::~B(){}" ); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 9 );
+		ICPPClassType B = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPConstructor constructor = (ICPPConstructor) col.getName(1).resolveBinding();
+		ICPPMethod destructor = (ICPPMethod) col.getName(2).resolveBinding();
+		
+		assertInstances( col, B, 3 );
+		assertInstances( col, constructor, 3 );
+		assertInstances( col, destructor, 3 );
+	}	
+
+	public void testBug44342() throws Exception {
+		IASTTranslationUnit tu = parse("class A { void f(){} void f(int){} }; int main(){ A * a = new A(); a->f();} "); //$NON-NLS-1$
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 10 );
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPMethod f1 = (ICPPMethod) col.getName(1).resolveBinding();
+		ICPPMethod f2 = (ICPPMethod) col.getName(2).resolveBinding();
+		
+		ICPPConstructor ctor = A.getConstructors()[0];
+		IVariable a = (IVariable) col.getName( 6 ).resolveBinding();
+		
+		assertInstances( col, A, 2 );
+		assertInstances( col, f1, 2 );
+		assertInstances( col, f2, 1 );
+		assertInstances( col, ctor, 1 );
+		assertInstances( col, a, 2 );
+	}	
+
+	
+	public void testCDesignatedInitializers() throws Exception
+	{
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "struct Inner { int a,b,c; };");  //$NON-NLS-1$
+		buffer.append( "struct A { int x; int y[]; struct Inner innerArray[]; int z []; };"); //$NON-NLS-1$
+		buffer.append( "struct A myA = { .x = 4, .y[3] = 4, .y[4] = 3, .innerArray[0].a = 3, .innerArray[1].b = 5, .innerArray[2].c=6, .z = { 1,4,5} };"); //$NON-NLS-1$
+		parse( buffer.toString(), true, ParserLanguage.C );
+	}
+	
+	public void testBug39551A() throws Exception
+	{
+		parse("extern float _Complex conjf (float _Complex);", true, ParserLanguage.C); //$NON-NLS-1$
+	}
+
+	public void testBug39551B() throws Exception
+	{
+	    //this used to be 99.99 * __I__, but I don't know where the __I__ came from, its not in C99, nor in GCC
+		parse("_Imaginary double id = 99.99 * 1i;", true, ParserLanguage.C); //$NON-NLS-1$
+	}
+	
+	public void testCBool() throws Exception
+	{
+		parse( "_Bool x;", true, ParserLanguage.C ); //$NON-NLS-1$
+	}
+	
+	public void testCBoolAsParameter() throws Exception
+	{
+		parse( "void f( _Bool b ) {} " + //$NON-NLS-1$
+							"_Bool g( _Bool b ) {} " + //$NON-NLS-1$
+							"void main(){" + //$NON-NLS-1$
+							"   _Bool b;  " + //$NON-NLS-1$
+							"   f(b);" + //$NON-NLS-1$
+							"	f( g( (_Bool) 1 )  );" + //$NON-NLS-1$
+							"}",  //$NON-NLS-1$
+							true, ParserLanguage.C );
+	}
+	
+	public void testBug44510() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "int initialize(); " + //$NON-NLS-1$
+							"int initialize( char ){} " + //$NON-NLS-1$
+							"int initialize(){ return 1; } " + //$NON-NLS-1$
+							"void main(){ int i = initialize(); }" ); //$NON-NLS-1$
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 7 );
+		IFunction init1 = (IFunction) col.getName(0).resolveBinding();
+		IFunction init2 = (IFunction) col.getName(1).resolveBinding();
+		
+		assertInstances( col, init1, 3 );
+		assertInstances( col, init2, 1 );
+	}	
+	
+	public void testBug44925() throws Exception
+	{
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "class MyClass { };");  //$NON-NLS-1$
+		buffer.append( "class MyClass myObj1;"); //$NON-NLS-1$
+		buffer.append( "enum MyEnum { Item1 };"); //$NON-NLS-1$
+		buffer.append( "enum MyEnum myObj2;"); //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString() );	
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 7 );
+		ICPPClassType myClass = (ICPPClassType) col.getName(0).resolveBinding();
+		IVariable obj1 = (IVariable) col.getName(2).resolveBinding();
+		IEnumeration myEnum = (IEnumeration) col.getName(3).resolveBinding();
+		IEnumerator item = (IEnumerator) col.getName(4).resolveBinding();
+		IVariable obj2 = (IVariable)col.getName(6).resolveBinding();
+		
+		assertInstances( col, myClass, 2 );
+		assertInstances( col, myEnum, 2 );
+		assertSame( obj1.getType(), myClass );
+		assertSame( obj2.getType(), myEnum );
+		assertSame( item.getType(), myEnum );
+	}
+	
+	public void testBug44838() throws Exception
+	{
+		StringBuffer buffer = new StringBuffer(); 
+		buffer.append( "class A { int myX; A( int x ); };\n"); //$NON-NLS-1$
+		buffer.append( "A::A( int x ) : myX( x ) { if( x == 5 ) myX++; }\n"); //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString() );	
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 12 );
+		ICPPClassType A = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPField myX = (ICPPField) col.getName(1).resolveBinding();
+		ICPPConstructor ctor = (ICPPConstructor) col.getName(2).resolveBinding();
+		IParameter x = (IParameter) col.getName(3).resolveBinding();
+		
+		assertInstances( col, A, 2 );
+		assertInstances( col, myX, 3 );
+		assertInstances( col, ctor, 3 );
+		assertInstances( col, x, 4 );
+	}
+	
+	public void testBug46165() throws Exception
+	{
+		StringBuffer buffer = new StringBuffer(); 
+		buffer.append( "class A { int myX; A( int x ); };\n"); //$NON-NLS-1$
+		buffer.append( "A::A( int x ) : myX( x ) { if( x == 5 ) myX++; }\n"); //$NON-NLS-1$
+		parse( buffer.toString() ); 
+	}
+
+	public void testBug47624() throws Exception
+	{
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "struct s { }; \n" ); //$NON-NLS-1$
+		buffer.append( "void f ( int s ) { \n" ); //$NON-NLS-1$
+		buffer.append( "   struct s sInstance; \n" ); //$NON-NLS-1$
+		buffer.append( "}\n"); //$NON-NLS-1$		
+		IASTTranslationUnit tu = parse( buffer.toString() );	
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 5 );
+		ICPPClassType s = (ICPPClassType) col.getName(0).resolveBinding();
+		IParameter s2 = (IParameter) col.getName(2).resolveBinding();
+		IVariable instance = (IVariable) col.getName(4).resolveBinding();
+
+		assertInstances( col, s, 2 );
+		assertInstances( col, s2, 1 );
+		assertSame( instance.getType(), s );
+	}
+	
+	public void testQualifiedLookup() throws Exception{
+		//this is meant to test that on a->f, the lookup for f is qualified
+		//the namespace is necessary because of bug 47926
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "namespace N {" ); //$NON-NLS-1$
+		buffer.append( "   void f () {} \n" ); //$NON-NLS-1$
+		buffer.append( "   class A { }; \n" ); //$NON-NLS-1$
+		buffer.append( "}" ); //$NON-NLS-1$
+		buffer.append( "void main() { N::A * a = new N::A();  a->f(); } "); //$NON-NLS-1$		
+		IASTTranslationUnit tu = parse( buffer.toString() );	
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 13 );
+		ICPPNamespace N = (ICPPNamespace) col.getName(0).resolveBinding();
+		IFunction f = (IFunction) col.getName(1).resolveBinding();
+		ICPPClassType A = (ICPPClassType) col.getName(2).resolveBinding();
+		
+		ICPPConstructor ctor = A.getConstructors()[0];
+		
+		IProblemBinding fp = (IProblemBinding) col.getName(12).resolveBinding();
+		assertEquals( fp.getID(), IProblemBinding.SEMANTIC_NAME_NOT_FOUND );
+		
+		assertInstances( col, N, 3 );
+		assertInstances( col, f, 1 );
+		assertInstances( col, A, 3 );
+		assertInstances( col, ctor, 2 );
+	}
+	
+	public void testBug43110() throws Exception
+	{
+		StringBuffer buffer = new StringBuffer(); 
+		buffer.append("void x( int y, ... );\n"); //$NON-NLS-1$
+		buffer.append("void y( int x... );\n"); //$NON-NLS-1$
+		buffer.append("void z(...);"); //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString() );	
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 5 );
+		IFunction x = (IFunction) col.getName(0).resolveBinding();
+		IFunction y = (IFunction) col.getName(2).resolveBinding();
+		IFunction z = (IFunction) col.getName(4).resolveBinding();
+		assertNotNull(x);
+		assertNotNull(y);
+		assertNotNull(z);
+	}
+	
+	public void testBug43110_XRef() throws Exception
+	{
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "void foo( ... ) {}\n" ); //$NON-NLS-1$
+		buffer.append( "void main( ){ foo( 1 ); }\n" ); //$NON-NLS-1$
+		
+		IASTTranslationUnit tu = parse( buffer.toString() );	
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 3 );
+		IFunction foo = (IFunction) col.getName(0).resolveBinding();
+		assertInstances( col, foo, 2 );
+	}
+	
+	public void testErrorHandling_1() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "A anA; int x = c; class A {}; A * anotherA = &anA; int b;", false ); //$NON-NLS-1$
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 9 );
+		IProblemBinding p = (IProblemBinding) col.getName(0).resolveBinding();
+		IVariable anA = (IVariable) col.getName(1).resolveBinding();
+		assertNotNull( col.getName(2).resolveBinding() );
+		IProblemBinding p2 = (IProblemBinding) col.getName(3).resolveBinding();
+		ICPPClassType A = (ICPPClassType) col.getName(4).resolveBinding();
+		
+		assertInstances( col, anA, 2 );
+		assertInstances( col, A, 2 );
+		
+		assertNotNull( p );
+		assertNotNull( p2 );
+		
+		assertSame( anA.getType(), p );
+	}
+	
+	public void testBug44340() throws Exception {
+		// inline function with reference to variables declared after them
+		IASTTranslationUnit tu = parse ("class A{ int getX() {return x[1];} int x[10];};"); //$NON-NLS-1$
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 4 );
+		
+		ICPPField x = (ICPPField) col.getName(2).resolveBinding();
+		assertInstances( col, x, 2 );
+	}
+	
+	public void testBug47628() throws Exception
+	{
+		Writer writer = new StringWriter(); 
+		writer.write( "void h(char) { }\n"); //$NON-NLS-1$
+		writer.write( "void h(unsigned char) { }\n"); //$NON-NLS-1$
+		writer.write( "void h(signed char) { }  // not shown in outline, parsed as char\n"); //$NON-NLS-1$
+		
+		parse( writer.toString() );
+	}
+	
+	public void testBug47636() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "void f( char [] ); \n" ); //$NON-NLS-1$
+		writer.write( "void f( char * ){} \n" ); //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( writer.toString() );		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 4 );
+		IFunction f1 = (IFunction) col.getName(0).resolveBinding();
+		IParameter p1 = (IParameter)col.getName(1).resolveBinding();
+		IFunction f2 = (IFunction) col.getName(2).resolveBinding();
+		IParameter p2 = (IParameter)col.getName(3).resolveBinding();
+		assertSame( f1, f2 );
+		assertSame( p1, p2 );
+	}
+	
+	public void testBug45697() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( " int f( bool ); \n"); //$NON-NLS-1$
+		writer.write( " int f( char ){ } "); //$NON-NLS-1$
+		
+		IASTTranslationUnit tu = parse( writer.toString() );		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 4 );
+		IFunction f1 = (IFunction) col.getName(0).resolveBinding();
+		IParameter p1 = (IParameter)col.getName(1).resolveBinding();
+		IFunction f2 = (IFunction) col.getName(2).resolveBinding();
+		IParameter p2 = (IParameter)col.getName(3).resolveBinding();
+		
+		assertNotSame( f1, f2 );
+		assertNotSame( p1, p2 );
+	}
+
+	public void testBug54639() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "typedef enum _A { } A, *pA; " ); //$NON-NLS-1$
+		
+		IASTTranslationUnit tu = parse( writer.toString() );		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 3 );
+		
+		IEnumeration _A = (IEnumeration) col.getName(0).resolveBinding();
+		ITypedef A = (ITypedef) col.getName(1).resolveBinding();
+		ITypedef pA = (ITypedef)col.getName(2).resolveBinding();
+		
+		assertNotNull( _A );
+		assertSame( A.getType(), _A );
+		assertTrue( pA.getType() instanceof IPointerType );
+		assertSame( ((IPointerType)pA.getType()).getType(), _A );
+	}
+	
+	public void testBug55163() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "void foo() { \n"); //$NON-NLS-1$
+		writer.write( "   int i, n; \n"); //$NON-NLS-1$
+		writer.write( "   double di; \n"); //$NON-NLS-1$
+		writer.write( "   for( i = n - 1, di = (double)( i + i ); i > 0; i-- ){ } \n"); //$NON-NLS-1$
+		writer.write( "}\n"); //$NON-NLS-1$
+		
+		IASTTranslationUnit tu = parse( writer.toString() );		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 11 );
+		IVariable i = (IVariable)col.getName(1).resolveBinding();
+		IVariable n = (IVariable)col.getName(2).resolveBinding();
+		IVariable di = (IVariable)col.getName(3).resolveBinding();
+		
+		assertInstances( col, i, 6 );
+		assertInstances( col, n, 2 );
+		assertInstances( col, di, 2 );
+	}
+	public void testBug55673() throws Exception{
+		Writer writer = new StringWriter();
+		writer.write( "struct Example { int i;  int ( * pfi ) ( int ); }; "); //$NON-NLS-1$
+		
+		parse( writer.toString() );
+		IASTTranslationUnit tu = parse( writer.toString() );		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 4 );
+		ICPPField pfi = (ICPPField)col.getName(2).resolveBinding();
+		
+		assertNotNull( pfi );
+		assertTrue( pfi.getType() instanceof IPointerType );
+		assertTrue( ((IPointerType)pfi.getType()).getType() instanceof IFunctionType );
+	}
+	
+	public void testBug54531() throws Exception
+	{
+		parse( "typedef enum _A {} A, *pA;" ); //$NON-NLS-1$
+	}
+	
+	public void testBug56516() throws Exception
+	{
+		IASTTranslationUnit tu = parse( "typedef struct blah sb;"); //$NON-NLS-1$		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 2 );
+		
+		ICPPClassType blah = (ICPPClassType) col.getName(0).resolveBinding();
+		ITypedef sb = (ITypedef) col.getName(1).resolveBinding();
+		assertSame( sb.getType(), blah );
+	}
+	
+	public void testBug53786() throws Exception
+	{
+		parse( "struct Example {  struct Data * data; };"); //$NON-NLS-1$
+	}
+	
+	public void testBug54029() throws Exception
+	{
+		parse( "typedef int T; T i;" ); //$NON-NLS-1$
+	}
+
+	public void testBug47625() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write("struct s { int num; }; "); //$NON-NLS-1$
+		writer.write("namespace ns{ "); //$NON-NLS-1$
+		writer.write("   struct s { double num; };"); //$NON-NLS-1$
+		writer.write("   s inner = { 3.14 };"); //$NON-NLS-1$
+		writer.write("   ::s outer = { 42 };"); //$NON-NLS-1$
+		writer.write("}"); //$NON-NLS-1$
+		
+		IASTTranslationUnit tu = parse( writer.toString() );
+		
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+
+		assertEquals( col.size(), 10 );
+		
+		ICPPClassType s = (ICPPClassType) col.getName(0).resolveBinding();
+		ICPPClassType s2 = (ICPPClassType) col.getName(3).resolveBinding();
+		
+		ICPPClassType ref1 = (ICPPClassType) col.getName(5).resolveBinding();
+		ICPPClassType ref2 = (ICPPClassType) col.getName( 8 ).resolveBinding();
+		
+		assertSame( s, ref2 );
+		assertSame( s2, ref1 );
+	}
+	
+	public void testBug57754() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "struct X {          " ); //$NON-NLS-1$
+		writer.write( "   typedef int T;   " ); //$NON-NLS-1$
+		writer.write( "   void f( T );     " ); //$NON-NLS-1$
+		writer.write( "};                  " ); //$NON-NLS-1$
+		writer.write( "void X::f( T ) { }  " ); //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( writer.toString() );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 10 );
+		ICPPClassType X = (ICPPClassType) col.getName(0).resolveBinding();
+		ITypedef T = (ITypedef) col.getName(1).resolveBinding();
+		ICPPMethod f = (ICPPMethod) col.getName(2).resolveBinding();
+		
+		assertInstances( col, X, 2 );
+		assertInstances( col, T, 3 );
+		assertInstances( col, f, 3 );
+	}	
+	
+	public void testBug57800() throws Exception
+	{
+		Writer writer= new StringWriter();
+		writer.write( "class G2 { int j; };"); //$NON-NLS-1$
+		writer.write( "typedef G2 AltG2;"); //$NON-NLS-1$
+		writer.write( "class AltG3 : AltG2 {  int x;};"); //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( writer.toString() );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 7 );
+		ICPPClassType G2 = (ICPPClassType) col.getName(0).resolveBinding();
+		ITypedef alt = (ITypedef) col.getName(3).resolveBinding();
+				
+		assertInstances( col, G2, 2 );
+		assertInstances( col, alt, 2 );
+	}
+	
+	public void testBug46246() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "struct A {                 "); //$NON-NLS-1$
+		writer.write( "   struct B { int ab; } b; "); //$NON-NLS-1$
+		writer.write( "   int a;                  "); //$NON-NLS-1$
+		writer.write( "};                         "); //$NON-NLS-1$
+		writer.write( "struct A a1;               "); //$NON-NLS-1$
+		writer.write( "struct B b1;               "); //$NON-NLS-1$
+		
+		IASTTranslationUnit tu = parse( writer.toString(), true, ParserLanguage.C );
+		CNameCollector col = new CNameCollector();
+		tu.accept( col );
+		
+		assertEquals( col.size(), 9 );
+		ICompositeType A = (ICompositeType) col.getName(0).resolveBinding();
+		ICompositeType B = (ICompositeType) col.getName(1).resolveBinding();
+				
+		assertInstances( col, A, 2 );
+		assertInstances( col, B, 2 );
+	}
+	
+	public void testBug45235() throws Exception
+	{
+		parse( "class A { friend class B; friend void f(); }; " ); //$NON-NLS-1$		
+	}
+	
+	public void testBug57791() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write(" void f() {                  "); //$NON-NLS-1$
+		writer.write("    struct astruct astruct;  "); //$NON-NLS-1$
+		writer.write("    astruct.foo++;           "); //$NON-NLS-1$
+		writer.write(" }"); //$NON-NLS-1$
+		
+		parse( writer.toString(), true, ParserLanguage.C );
+	}
+	
+	public void testBug44249() throws Exception
+	{
+
+		parse( "class SD_01 { public:\n	void SD_01::f_SD_01();};" ); //$NON-NLS-1$
+	}
+	
+	public void testBug59149() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class A{ friend class B; friend class B; };" ); //$NON-NLS-1$
+		writer.write( "class B{ };" ); //$NON-NLS-1$		
+		parse( writer.toString() );
+	}	
+    
+    public void testBug59302() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write("class A { class N{}; };         "); //$NON-NLS-1$
+    	writer.write("class B { friend class A::N; }; "); //$NON-NLS-1$    	
+    	parse( writer.toString() );
+	}
+	
+    
+
+    public void testULong() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "#ifndef ASMINCLUDE\n"); //$NON-NLS-1$
+    	writer.write( "typedef unsigned short         ushort;\n"); //$NON-NLS-1$
+    	writer.write( "typedef volatile unsigned long semaphore;\n"); //$NON-NLS-1$
+    	writer.write( "typedef unsigned long          ulong;\n"); //$NON-NLS-1$
+    	writer.write( "#ifndef _NO_LONGLONG\n"); //$NON-NLS-1$
+    	writer.write( "typedef long long              longlong;\n"); //$NON-NLS-1$
+    	writer.write( "typedef unsigned long long     ulonglong;\n"); //$NON-NLS-1$
+    	writer.write( "#endif  /* _NO_LONGLONG */\n"); //$NON-NLS-1$
+    	writer.write( "#endif  /*  ASMINCLUDE  */\n"); //$NON-NLS-1$
+    	writer.write( "typedef struct section_type_ {\n"); //$NON-NLS-1$
+    	writer.write( "ulong source;\n"); //$NON-NLS-1$
+    	writer.write( "ulong dest;\n"); //$NON-NLS-1$
+    	writer.write( "ulong bytes;\n"); //$NON-NLS-1$
+    	writer.write( "} section_type;\n"); //$NON-NLS-1$
+    	parse( writer.toString() );
+	}
+ 
+    public void testBug47926() throws Exception
+	{
+    	parse( "void f() {} class A {}; void main() { A * a = new A(); a->f();	}", false ); //$NON-NLS-1$
+	}
+    
+    public void testBug50984_ASTMethod_getOwnerClassSpecifier_ClassCastException() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "template < typename _OutIter >                                 " ); //$NON-NLS-1$
+    	writer.write( "class num_put {                                                " ); //$NON-NLS-1$
+    	writer.write( "   typedef _OutIter iter_type;                                 " ); //$NON-NLS-1$
+    	writer.write( "   template< typename _ValueT >                                " ); //$NON-NLS-1$
+    	writer.write( "    iter_type _M_convert_float( iter_type );                   " ); //$NON-NLS-1$
+    	writer.write( "};                                                             " ); //$NON-NLS-1$
+    	writer.write( "template < typename _OutIter >                                 " ); //$NON-NLS-1$
+    	writer.write( "template < typename _ValueT  >                                 " ); //$NON-NLS-1$
+    	writer.write( "_OutIter num_put<_OutIter>::_M_convert_float( _OutIter ) { }   " ); //$NON-NLS-1$
+    	parse( writer.toString() );    	
+   	}
+    
+    public void testGloballyQualifiedUsingDeclaration() throws Exception
+	{
+		parse( "int iii; namespace N { using ::iii; }" ); //$NON-NLS-1$
+	}
+    
+    public void test57513_new() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "class A{ A(); A( int ); };   \n" ); //$NON-NLS-1$
+    	writer.write( " void f() {                  \n" ); //$NON-NLS-1$
+    	writer.write( "    A * a1 = new A;          \n" ); //$NON-NLS-1$
+    	writer.write( "    A * a2 = new(1)A();      \n" ); //$NON-NLS-1$
+    	writer.write( "    A * a3 = new A( 1 );     \n" ); //$NON-NLS-1$
+    	writer.write( "}                            \n" ); //$NON-NLS-1$
+    	
+    	parse( writer.toString() );
+	}
+
+    public void test57513_NoConstructor() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "class A{  };   \n" ); //$NON-NLS-1$
+    	writer.write( " void f() {                  \n" ); //$NON-NLS-1$
+    	writer.write( "    A * a1 = new A;          \n" ); //$NON-NLS-1$
+    	writer.write( "}                            \n" ); //$NON-NLS-1$
+    	
+    	parse( writer.toString() );
+	}
+    
+    public void test57513_ctorinit() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "class A{ A(); A( A * ); };   \n" ); //$NON-NLS-1$
+    	writer.write( "class B : public A { B(); }; \n" ); //$NON-NLS-1$
+    	writer.write( "B::B():A( new A ){}          \n" ); //$NON-NLS-1$
+    	
+    	parse( writer.toString() );
+   	}
+    
+    public void test575513_qualified() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "namespace Foo{                     " ); //$NON-NLS-1$
+    	writer.write( "   class Bar{ public : Bar(); };   " ); //$NON-NLS-1$
+    	writer.write( "}                                  " ); //$NON-NLS-1$
+    	writer.write( "void main(){                       " ); //$NON-NLS-1$
+    	writer.write( "  Foo::Bar * bar = new Foo::Bar(); " ); //$NON-NLS-1$
+    	writer.write( "}                                  " ); //$NON-NLS-1$
+    	
+    	parse( writer.toString() );    	
+	}
+    
+    public void testBug60944() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "typedef int OurInt;\n"); //$NON-NLS-1$
+    	writer.write( "class A { int x; };\n"); //$NON-NLS-1$
+    	writer.write( "typedef A AnotherA;\n"); //$NON-NLS-1$
+    	writer.write( "typedef AnotherA SecondA;\n"); //$NON-NLS-1$
+    	writer.write( "typedef OurInt AnotherInt;\n" ); //$NON-NLS-1$
+    	parse( writer.toString() );
+	}
+    
+    public void testDestructorReference() throws Exception
+    {
+    	Writer writer = new StringWriter();
+    	writer.write( "class ABC {\n"); //$NON-NLS-1$
+    	writer.write( " public:\n"); //$NON-NLS-1$
+    	writer.write( " ~ABC(){ }\n"); //$NON-NLS-1$
+    	writer.write( "};\n"); //$NON-NLS-1$
+    	writer.write( "int main() { ABC * abc = new ABC();\n"); //$NON-NLS-1$
+    	writer.write( "abc->~ABC();\n"); //$NON-NLS-1$
+    	writer.write( "}\n"); //$NON-NLS-1$
+    	
+		parse( writer.toString() );  
+    }
+    
+    public void testBug39676_tough() throws Exception
+	{
+    	parse( "int widths[] = { [0 ... 9] = 1, [10 ... 99] = 2, [100] = 3 };", true, ParserLanguage.C, true ); //$NON-NLS-1$
+	}
+    
+    public void testBug60939() throws Exception
+	{
+    	for( int i = 0; i < 2; ++i )
+    	{
+	    	Writer writer = new StringWriter();
+	    	writer.write( "namespace ABC { class DEF { }; }\n"); //$NON-NLS-1$
+	    	if( i == 0 )
+	    		writer.write( "using namespace ABC;\n"); //$NON-NLS-1$
+	    	else
+	    		writer.write( "using ABC::DEF;\n"); //$NON-NLS-1$
+	    	writer.write( "class GHI : public DEF { };"); //$NON-NLS-1$
+	    	parse( writer.toString() );
+    	}
+    	
+
+	}
+    
+    public void testBug64010() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( " #define ONE	else if (0) { } \n"); //$NON-NLS-1$
+    	writer.write( " #define TEN	ONE ONE ONE ONE ONE ONE ONE ONE ONE ONE \n "); //$NON-NLS-1$
+    	writer.write( " #define HUN	TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN \n "); //$NON-NLS-1$
+    	writer.write( " #define THOU	HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN \n"); //$NON-NLS-1$
+		writer.write("void foo()                                                "); //$NON-NLS-1$
+		writer.write("{                                                         "); //$NON-NLS-1$
+		writer.write("   if (0) { }                                             "); //$NON-NLS-1$
+		writer.write("   /* 2,500 else if's.  */                               "); //$NON-NLS-1$
+		writer.write("   THOU THOU HUN HUN HUN HUN HUN "); //$NON-NLS-1$
+		writer.write("}                                                         "); //$NON-NLS-1$
+		
+		parse( writer.toString() );
+	}
+    
+    public void testBug64271() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "typedef int DWORD;\n" ); //$NON-NLS-1$
+		writer.write( "typedef char BYTE;\n"); //$NON-NLS-1$
+		writer.write( "#define MAKEFOURCC(ch0, ch1, ch2, ch3)                              \\\n"); //$NON-NLS-1$
+		writer.write( "((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) |       \\\n"); //$NON-NLS-1$
+		writer.write( "((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))\n"); //$NON-NLS-1$
+		writer.write( "enum e {\n"); //$NON-NLS-1$
+		writer.write( "blah1 = 5,\n"); //$NON-NLS-1$
+		writer.write( "blah2 = MAKEFOURCC('a', 'b', 'c', 'd'),\n"); //$NON-NLS-1$
+		writer.write( "blah3\n"); //$NON-NLS-1$
+		writer.write( "};\n"); //$NON-NLS-1$
+		writer.write( "e mye = blah;\n"); //$NON-NLS-1$
+		parse( writer.toString() );
+	}
+    
+    public void testBug47752() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "class BBC\n"); //$NON-NLS-1$
+    	writer.write( "{\n"); //$NON-NLS-1$
+    	writer.write( "int x;\n"); //$NON-NLS-1$
+    	writer.write( "};\n"); //$NON-NLS-1$
+    	writer.write( "void func( BBC bar )\n"); //$NON-NLS-1$
+    	writer.write( "try\n"); //$NON-NLS-1$
+    	writer.write( "{\n"); //$NON-NLS-1$
+    	writer.write( "}\n"); //$NON-NLS-1$
+    	writer.write( "catch ( BBC error )\n"); //$NON-NLS-1$
+    	writer.write( "{\n"); //$NON-NLS-1$
+    	writer.write( "		  //... error handling code ...\n"); //$NON-NLS-1$
+    	writer.write( "}\n"); //$NON-NLS-1$
+    	parse( writer.toString() );
+	}
+    public void testBug61972() throws Exception
+	{
+    	parse( "#define DEF1(A1) A1\n#define DEF2     DEF1(DEF2)\nDEF2;", false ); //$NON-NLS-1$
+	}
+    
+    public void testBug65569() throws Exception
+	{
+    	parse( "class Sample;\nstruct Sample { /* ... */ };" ); //$NON-NLS-1$
+	}
+    
+    public void testBug64268() throws Exception
+	{
+    	Writer writer = new StringWriter();
+		writer.write("#define BODY \\\n"); //$NON-NLS-1$
+		writer.write("for (;;) {	 \\\n"); //$NON-NLS-1$
+		writer.write("/* this multi-line comment messes \\\n"); //$NON-NLS-1$
+		writer.write("up the parser.  */ }\n"); //$NON-NLS-1$
+		writer.write("	void abc() {\n"); //$NON-NLS-1$
+		writer.write("BODY\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+		parse( writer.toString() );
+	}
+    
+    public void testBug67622() throws Exception
+	{
+    	parse( "const char * x = __FILE__;"); //$NON-NLS-1$
+	}
+    
+    public void testBug67680() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "template < class T> class Base {};                  \n" ); //$NON-NLS-1$
+    	writer.write( "class Derived : public Base, Base<int>, foo {};     \n" ); //$NON-NLS-1$
+    	
+    	parse( writer.toString(), false );
+	}
+    
+    public void testTypeIDSignature() throws Exception
+    {
+    	parse( "int * v = (int*)0;");//$NON-NLS-1$
+    }
+    
+    public void testUnaryAmperCast() throws Exception{
+    	Writer writer = new StringWriter();
+    	writer.write( "void f( char * );              \r\n "); //$NON-NLS-1$
+    	writer.write( "void f( char   );              \n "); //$NON-NLS-1$
+    	writer.write( "void main() {                  \n "); //$NON-NLS-1$
+    	writer.write( "   char * t = new char [ 5 ];  \n "); //$NON-NLS-1$
+    	writer.write( "   f( &t[1] );                 \n "); //$NON-NLS-1$
+    	writer.write( "}                              \n "); //$NON-NLS-1$
+    	
+    	parse( writer.toString() );
+    }
+	
+    public void testBug68235() throws Exception{
+    	Writer writer = new StringWriter();
+    	writer.write( " struct xTag { int x; };               "); //$NON-NLS-1$
+    	writer.write( " typedef xTag xType;                   "); //$NON-NLS-1$
+    	writer.write( " typedef struct yTag { int x; } yType; "); //$NON-NLS-1$
+    	writer.write( " class C1 { xType x; yType y; };       "); //$NON-NLS-1$
+    	
+    	parse( writer.toString() );    	
+    }
+    
+    public void testBug60407() throws Exception
+    {
+    	Writer writer = new StringWriter();
+    	writer.write( "struct ZZZ { int x, y, z; };\r\n" ); //$NON-NLS-1$
+    	writer.write( "typedef struct ZZZ _FILE;\n" ); //$NON-NLS-1$
+    	writer.write( "typedef _FILE FILE;\n" ); //$NON-NLS-1$
+    	writer.write( "static void static_function(FILE * lcd){}\n" ); //$NON-NLS-1$
+    	writer.write( "int	main(int argc, char **argv) {\n" ); //$NON-NLS-1$
+    	writer.write( "FILE * file = 0;\n" ); //$NON-NLS-1$
+    	writer.write( "static_function( file );\n" ); //$NON-NLS-1$
+    	writer.write( "return 0;\n" );	 //$NON-NLS-1$
+    	writer.write( "}\n" ); //$NON-NLS-1$
+    	parse( writer.toString() );
+    }
+    
+    public void testBug68623() throws Exception{
+        Writer writer = new StringWriter();
+        writer.write( "class A {                         \n" ); //$NON-NLS-1$
+        writer.write( "   A();                           \n" ); //$NON-NLS-1$
+        writer.write( "   class sub{};                   \n" ); //$NON-NLS-1$
+        writer.write( "   sub * x;                       \n" ); //$NON-NLS-1$
+        writer.write( "};                                \n" ); //$NON-NLS-1$
+        writer.write( "A::A() : x( (sub *) 0 ) {}        \n" ); //$NON-NLS-1$
+        
+        parse( writer.toString() );
+        
+        writer = new StringWriter();
+        writer.write( "class A {                         \n" ); //$NON-NLS-1$
+        writer.write( "   A() : x (0) {}                 \n" ); //$NON-NLS-1$
+        writer.write( "   int x;                         \n" ); //$NON-NLS-1$
+        writer.write( "};                                \n" ); //$NON-NLS-1$
+        
+        parse( writer.toString() );
+    }
+    
+    public void testBug69798() throws Exception{
+        Writer writer = new StringWriter();
+        writer.write( "enum Flags { FLAG1, FLAG2 };                          \n" ); //$NON-NLS-1$
+        writer.write( "int f() { int a, b;  b = ( a ? FLAG1 : 0 ) | FLAG2; } \n" ); //$NON-NLS-1$
+        
+        parse( writer.toString() );
+    }
+    
+    public void testBug69662() throws Exception{
+        Writer writer = new StringWriter();
+        writer.write( "class A { operator float * (); };  \n" ); //$NON-NLS-1$
+        writer.write( "A::operator float * () { }         \n" ); //$NON-NLS-1$
+        
+        parse( writer.toString() );
+    }
+    
+    
+    public void testBug68528() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "namespace N526026\n" ); //$NON-NLS-1$
+    	writer.write( "{\n" ); //$NON-NLS-1$
+    	writer.write( "template <typename T>\n" ); //$NON-NLS-1$
+    	writer.write( "class T526026\n" ); //$NON-NLS-1$
+    	writer.write( "{\n" ); //$NON-NLS-1$
+    	writer.write( "typedef int diff;\n" ); //$NON-NLS-1$
+    	writer.write( "};\n" ); //$NON-NLS-1$
+    	writer.write( "\n" ); //$NON-NLS-1$
+    	writer.write( "template<typename T>\n" ); //$NON-NLS-1$
+    	writer.write( "inline T526026< T >\n" );  //$NON-NLS-1$
+    	writer.write( "operator+(typename T526026<T>::diff d, const T526026<T> & x )\n" );  //$NON-NLS-1$
+    	writer.write( "{ return T526026< T >(); }\n" ); //$NON-NLS-1$
+    	writer.write( "}\n" ); //$NON-NLS-1$
+    	parse( writer.toString(), false );
+	}
+    
+    public void testBug71094() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "using namespace DOESNOTEXIST;\n" );  //$NON-NLS-1$
+    	writer.write( "class A { int x; };\n" ); //$NON-NLS-1$
+    	parse( writer.toString(), false );
+	}
+    
+	public void testPredefinedSymbol_bug70928() throws Exception {
+		// GNU builtin storage class type __cdecl preceded by a custom return type 
+		Writer writer = new StringWriter();
+		writer.write( "#define __cdecl __attribute__ ((__cdecl__))\n" ); //$NON-NLS-1$
+		writer.write( "typedef int size_t; \n int __cdecl foo(); \n" ); //$NON-NLS-1$
+		parse(writer.toString(), true, ParserLanguage.CPP, true);
+	}
+	
+	public void testPredefinedSymbol_bug70928_infinite_loop_test1() throws Exception {
+		// GNU builtin storage class type __cdecl preceded by a custom return type 
+		Writer writer = new StringWriter();
+		writer.write( "#define __cdecl __attribute__ ((__cdecl__))\n" ); //$NON-NLS-1$
+		writer.write( "typedef int size_t; \n int __cdecl foo(); \n" ); //$NON-NLS-1$
+		parse(writer.toString(), false, ParserLanguage.CPP, false);// test for an infinite loop if the GCC extensions aren't supported
+		parse(writer.toString(), false, ParserLanguage.C, false);// test for an infinite loop if the GCC extensions aren't supported
+	}
+	
+	public void testPredefinedSymbol_bug70928_infinite_loop_test2() throws Exception {
+		// GNU builtin storage class type __cdecl preceded by a custom return type 
+		Writer writer = new StringWriter();
+		writer.write( "int x __attribute__ ((aligned (16))) = 0;\n" ); //$NON-NLS-1$
+		parse(writer.toString(), false, ParserLanguage.CPP, false);// test for an infinite loop if the GCC extensions aren't supported
+		parse(writer.toString(), false, ParserLanguage.C, false);// test for an infinite loop if the GCC extensions aren't supported
+	}
+	
+	public void testBug102376() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write( "int func1 (void) __attribute__((,id2,id (,,),,,));\n" ); //$NON-NLS-1$
+		writer.write( "int func2 (void) __attribute__((id,id (id)));\n" ); //$NON-NLS-1$
+		writer.write( "int func3 (void) __attribute__((id,id (3)));\n" ); //$NON-NLS-1$
+		writer.write( "int func4 (void) __attribute__((id,id (1+2)));\n" ); //$NON-NLS-1$
+		writer.write( "void (****f1)(void) __attribute__((noreturn));\n" ); //$NON-NLS-1$
+  	    writer.write( "void (__attribute__((noreturn)) ****f2) (void);\n" ); //$NON-NLS-1$
+ 		writer.write( "char *__attribute__((aligned(8))) *f3;\n" ); //$NON-NLS-1$
+ 		writer.write( "char * __attribute__((aligned(8))) * f3;\n" ); //$NON-NLS-1$
+		writer.write( "void fatal1 () __attribute__ ((noreturn));\n" ); //$NON-NLS-1$
+		writer.write( "int square1 (int) __attribute__ ((pure));\n" ); //$NON-NLS-1$
+		writer.write( "extern int\n" ); //$NON-NLS-1$
+		writer.write( "my_printf1 (void *my_object, const char *my_format, ...)\n" ); //$NON-NLS-1$
+		writer.write( "__attribute__ ((format (printf, 2, 3)));\n" ); //$NON-NLS-1$
+		writer.write( "extern char *\n" ); //$NON-NLS-1$
+		writer.write( "my_dgettext1 (char *my_domain, const char *my_format)\n" ); //$NON-NLS-1$
+		writer.write( "__attribute__ ((format_arg (2)));\n" ); //$NON-NLS-1$
+		writer.write( "extern void *\n" ); //$NON-NLS-1$
+		writer.write( "my_memcpy1 (void *dest, const void *src, size_t len)\n" ); //$NON-NLS-1$
+		writer.write( "__attribute__((nonnull (1, 2)));\n" ); //$NON-NLS-1$
+		writer.write( "extern void *\n" ); //$NON-NLS-1$
+		writer.write( "my_memcpy2 (void *dest, const void *src, size_t len)\n" ); //$NON-NLS-1$
+		writer.write( "__attribute__((nonnull));\n" ); //$NON-NLS-1$
+		writer.write( "extern void foobar3 (void) __attribute__ ((section (\"bar\")));\n" ); //$NON-NLS-1$
+		writer.write( "int old_fn () __attribute__ ((deprecated));\n" ); //$NON-NLS-1$
+		writer.write( "void f5 () __attribute__ ((weak, alias (\"__f\")));\n" ); //$NON-NLS-1$
+		writer.write( "void __attribute__ ((visibility (\"protected\")))\n" ); //$NON-NLS-1$
+		writer.write( "f6 () { /* Do something. */; }\n" ); //$NON-NLS-1$
+		writer.write( "int i2 __attribute__ ((visibility (\"hidden\")));\n" ); //$NON-NLS-1$
+		writer.write( "void f7 () __attribute__ ((interrupt (\"IRQ\")));\n" ); //$NON-NLS-1$
+		writer.write( "void *alt_stack9;\n" ); //$NON-NLS-1$
+		writer.write( "void f8 () __attribute__ ((interrupt_handler,\n" ); //$NON-NLS-1$
+		writer.write( "sp_switch (\"alt_stack\")));\n" ); //$NON-NLS-1$
+		writer.write( "int x1 __attribute__ ((aligned (16))) = 0;\n" ); //$NON-NLS-1$
+		writer.write( "struct foo11 { int x[2] __attribute__ ((aligned (8))); };\n" ); //$NON-NLS-1$
+		writer.write( "short array12[3] __attribute__ ((aligned));\n" ); //$NON-NLS-1$
+		writer.write( "extern int old_var14 __attribute__ ((deprecated));\n" ); //$NON-NLS-1$
+		writer.write( "struct foo13\n" ); //$NON-NLS-1$
+		writer.write( "{\n" ); //$NON-NLS-1$
+		writer.write( "char a15;\n" ); //$NON-NLS-1$
+		writer.write( "int x16[2] __attribute__ ((packed));\n" ); //$NON-NLS-1$
+		writer.write( "};\n" ); //$NON-NLS-1$
+		writer.write( "struct duart15 a16 __attribute__ ((section (\"DUART_A\"))) = { 0 };\n" ); //$NON-NLS-1$
+		writer.write( "struct duart15 b17 __attribute__ ((section (\"DUART_B\"))) = { 0 };\n" ); //$NON-NLS-1$
+		writer.write( "char stack18[10000] __attribute__ ((section (\"STACK\"))) = { 0 };\n" ); //$NON-NLS-1$
+		writer.write( "int init_data19 __attribute__ ((section (\"INITDATA\"))) = 0;\n" ); //$NON-NLS-1$
+		writer.write( "int foo20 __attribute__((section (\"shared\"), shared)) = 0;\n" ); //$NON-NLS-1$
+		writer.write( "int foo21 __attribute__ ((vector_size (16)));\n" ); //$NON-NLS-1$
+		writer.write( "struct S22 { int a23; };\n" ); //$NON-NLS-1$
+		writer.write( "struct S24  __attribute__ ((vector_size (16))) foo;\n" ); //$NON-NLS-1$
+		writer.write( "struct S25 { short f27[3]; } __attribute__ ((aligned (8)));\n" ); //$NON-NLS-1$
+		writer.write( "typedef int more_aligned_int __attribute__ ((aligned (8)));\n" ); //$NON-NLS-1$
+		writer.write( "struct S26 { short f28[3]; } __attribute__ ((aligned));\n" ); //$NON-NLS-1$
+		writer.write( "\n" ); //$NON-NLS-1$
+		writer.write( "struct my_unpacked_struct29\n" ); //$NON-NLS-1$
+		writer.write( "{\n" ); //$NON-NLS-1$
+		writer.write( "char c;\n" ); //$NON-NLS-1$
+		writer.write( "int i;\n" ); //$NON-NLS-1$
+		writer.write( "};\n" ); //$NON-NLS-1$
+		writer.write( "          \n" ); //$NON-NLS-1$
+		writer.write( "struct my_packed_struct __attribute__ ((__packed__))\n" ); //$NON-NLS-1$
+		writer.write( "{\n" ); //$NON-NLS-1$
+		writer.write( "char c;\n" ); //$NON-NLS-1$
+		writer.write( "int  i;\n" ); //$NON-NLS-1$
+		writer.write( "struct my_unpacked_struct29 s;\n" ); //$NON-NLS-1$
+		writer.write( "};\n" ); //$NON-NLS-1$
+		writer.write( "\n" ); //$NON-NLS-1$
+		writer.write( "typedef union\n" ); //$NON-NLS-1$
+		writer.write( "{\n" ); //$NON-NLS-1$
+		writer.write( "int *__ip;\n" ); //$NON-NLS-1$
+		writer.write( "union wait *__up;\n" ); //$NON-NLS-1$
+		writer.write( "} wait_status_ptr_t __attribute__ ((__transparent_union__));\n" ); //$NON-NLS-1$
+		writer.write( "\n" ); //$NON-NLS-1$
+		writer.write( "typedef int T1 __attribute__ ((deprecated));\n" ); //$NON-NLS-1$
+		writer.write( "typedef short __attribute__((__may_alias__)) short_a;\n" ); //$NON-NLS-1$
+		writer.write( "extern const unsigned short int ** __ctype_b_loc (void) __attribute__ ((__const));" ); //$NON-NLS-1$
+		parse( writer.toString(), true, ParserLanguage.C, true );
+		parse( writer.toString(), true, ParserLanguage.CPP, true );
+	}
+
+    public void testBug73652() throws Exception
+	{
+    	StringWriter writer = new StringWriter();
+    	writer.write( "#define DoSuperMethodA IDoSuperMethodA\n" ); //$NON-NLS-1$
+    	writer.write( "#define IDoSuperMethodA(a,b,c) IIntuition->IDoSuperMethodA(a,b,c)\n" ); //$NON-NLS-1$
+		writer.write( "void hang(void)\n" ); //$NON-NLS-1$
+		writer.write( "{\n" ); //$NON-NLS-1$
+		writer.write( "DoSuperMethodA(0,0,0);\n" ); //$NON-NLS-1$
+		writer.write( "}\n" ); //$NON-NLS-1$
+		parse( writer.toString() , false );
+	}
+    
+    public void testBug73428() throws Exception
+	{
+    	parse( "namespace {  }");//$NON-NLS-1$
+    	parse( "namespace {  };");//$NON-NLS-1$
+    	parse( "namespace {  int abc; };");//$NON-NLS-1$
+    	parse( "namespace {  int abc; }");//$NON-NLS-1$
+	}
+    
+    public void testBug73615() throws Exception
+	{
+    	for( int i = 0; i < 2; ++i )
+    	{
+    		StringWriter writer = new StringWriter();
+    		if( i == 0 )
+    			writer.write( "class B;\n"); //$NON-NLS-1$
+    		writer.write( "class A { A( B * ); };\n"); //$NON-NLS-1$
+    		if( i == 0 )
+    			parse( writer.toString() );
+    		else
+    			parse( writer.toString(), false );
+    	}
+	}
+    
+    public void testBug74180() throws Exception
+    {
+        parse( "enum DHCPFOBoolean { false, true } additionalHB, more_payload; \n", true, ParserLanguage.C ); //$NON-NLS-1$
+    }
+    
+    public void testBug72691() throws Exception{
+        StringWriter writer = new StringWriter();
+        writer.write( "typedef int * PINT; \n" ); //$NON-NLS-1$
+        writer.write( "typedef int * PINT; \n" ); //$NON-NLS-1$
+        writer.write( "PINT pint;          \n" ); //$NON-NLS-1$
+        parse( writer.toString() );
+    }
+    
+    public void testBug72691_2() throws Exception{
+        StringWriter writer = new StringWriter();
+        writer.write( "typedef int * PINT;    \n" ); //$NON-NLS-1$
+        writer.write( "namespace N {          \n" ); //$NON-NLS-1$
+        writer.write( "   typedef int * PINT; \n" ); //$NON-NLS-1$
+        writer.write( "}                      \n" ); //$NON-NLS-1$
+        writer.write( "using namespace N;     \n" ); //$NON-NLS-1$
+        writer.write( "PINT pint;             \n" ); //$NON-NLS-1$
+        parse( writer.toString() );
+    }
+    
+    public void testBug74328() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "int\n" );  //$NON-NLS-1$
+    	writer.write( "main(int argc, char **argv) {\n" ); //$NON-NLS-1$
+    	writer.write( "	char *sign;\n" ); //$NON-NLS-1$
+    	writer.write( "sign = \"\"; // IProblem generated here, syntax error\n" ); //$NON-NLS-1$
+    	writer.write( "return argc;\n" ); //$NON-NLS-1$
+    	writer.write( "}\n" ); //$NON-NLS-1$
+    	parse( writer.toString() );
+	}
+    
+    public void testBug71733() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "void foo( int );\n"); //$NON-NLS-1$
+    	writer.write( "#define BLAH() \\\n"); //$NON-NLS-1$
+    	writer.write( "  foo ( /*  slash / is misinterpreted as end of comment */ \\\n"); //$NON-NLS-1$
+    	writer.write( "    4 );\n"); //$NON-NLS-1$
+    	writer.write( "int f() { BLAH() }\n"); //$NON-NLS-1$
+    	parse( writer.toString() );
+	}
+    
+    public void testBug69526() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "unsigned inkernel;\n" ); //$NON-NLS-1$
+    	writer.write( "#define lock_kernel() (inkernel |= 0x01)" ); //$NON-NLS-1$
+    	writer.write( "int main(int argc, char **argv) {" ); //$NON-NLS-1$
+    	writer.write( "lock_kernel();" ); //$NON-NLS-1$
+    	writer.write( "}" ); //$NON-NLS-1$
+    	parse( writer.toString() );
+	}
+    
+    public void testBug69454() throws Exception
+    {
+        Writer writer = new StringWriter();
+        writer.write( "#define CATCH_ALL_EXCEPTIONS()                         \\\n" ); //$NON-NLS-1$
+        writer.write( "   catch( Exception &ex ) { handleException( ex ); }   \\\n" ); //$NON-NLS-1$
+        writer.write( "   catch( ... )           { handleException();    }      \n" ); //$NON-NLS-1$
+        writer.write( "class Exception;                                         \n" ); //$NON-NLS-1$
+        writer.write( "void handleException( Exception & ex ) {}                \n" ); //$NON-NLS-1$
+        writer.write( "void handleException() {}                                \n" ); //$NON-NLS-1$
+        writer.write( "void f() {                                               \n" ); //$NON-NLS-1$
+        writer.write( "   try { int i; }                                        \n" ); //$NON-NLS-1$
+        writer.write( "   CATCH_ALL_EXCEPTIONS();                               \n" ); //$NON-NLS-1$
+        writer.write( "}                                                        \n" ); //$NON-NLS-1$
+
+        parse( writer.toString() );
+    }
+    
+
+    public void testBug72692A() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "extern double pow(double, double);\n"); //$NON-NLS-1$
+    	writer.write( "extern double pow2(double, double){}\n"); //$NON-NLS-1$
+    	writer.write( "namespace DS {\n"); //$NON-NLS-1$
+    	writer.write( "using ::pow;\n"); //$NON-NLS-1$
+    	writer.write( "using ::pow2;\n"); //$NON-NLS-1$
+    	writer.write( "}\n"); //$NON-NLS-1$
+    	writer.write( "using DS::pow;\n"); //$NON-NLS-1$
+    	writer.write( "using DS::pow2;\n"); //$NON-NLS-1$
+    	parse( writer.toString() );
+	}
+    
+    public void testBug72692B() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "extern double pow(double, double);\n"); //$NON-NLS-1$
+    	writer.write( "namespace DS {\n"); //$NON-NLS-1$
+    	writer.write( "using ::pow;\n"); //$NON-NLS-1$
+    	writer.write( "inline float pow(float __x, float __y)\n" ); //$NON-NLS-1$
+    	writer.write( "{ return ::pow(static_cast<double>(__x), static_cast<double>(__y)); }\n" ); //$NON-NLS-1$
+    	writer.write( "}\n"); //$NON-NLS-1$
+    	writer.write( "using namespace DS;\n"); //$NON-NLS-1$
+    	writer.write( "float foo() { double d1 = 3.0, d2 = 4.0; return pow(d1, d2); }"); //$NON-NLS-1$
+    	parse( writer.toString() );
+	}
+
+    public void testBug72692C() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "extern double pow(double, double){}\n"); //$NON-NLS-1$
+    	writer.write( "namespace DS {\n"); //$NON-NLS-1$
+    	writer.write( "using ::pow;\n"); //$NON-NLS-1$
+    	writer.write( "}\n"); //$NON-NLS-1$
+    	writer.write( "using DS::pow;\n"); //$NON-NLS-1$
+    	parse( writer.toString() );
+	}
+
+    
+    public void testBug74575A() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "double pow(double, double);\n"); //$NON-NLS-1$
+    	writer.write( "float pow(float __x, float __y)\n" ); //$NON-NLS-1$
+    	writer.write( "{ return 0; }\n"); //$NON-NLS-1$
+    	parse( writer.toString() );
+	}
+    
+    public void testBug75338() throws Exception
+	{
+    	Writer writer = new StringWriter();
+    	writer.write( "class Thrown { };\n"); //$NON-NLS-1$
+    	writer.write( "void foo() throw( Thrown );"); //$NON-NLS-1$
+    	parse( writer.toString() );
+	}
+        
+    public void testBug74847() throws Exception {
+        String code = "class A : public FOO {};"; //$NON-NLS-1$
+        parse( code, false );
+    }
+    
+    public void testBug76696() throws Exception{
+        Writer writer = new StringWriter();
+		writer.write(" void f(){       \n"); //$NON-NLS-1$
+		writer.write("    if( A a) {   \n"); //$NON-NLS-1$
+		writer.write("    } else {     \n"); //$NON-NLS-1$
+		writer.write("    }	           \n"); //$NON-NLS-1$
+		writer.write(" }               \n"); //$NON-NLS-1$
+		
+		parse( writer.toString(), false );
+    }
+    
+    public void testBug74069() throws Exception{
+        Writer writer = new StringWriter();
+        writer.write( "int f() {                \n"); //$NON-NLS-1$
+        writer.write( "   int a, b, c;          \n"); //$NON-NLS-1$
+        writer.write( "   if( a < b )           \n"); //$NON-NLS-1$
+        writer.write( "      if( b < c )        \n"); //$NON-NLS-1$
+        writer.write( "         return b;       \n"); //$NON-NLS-1$
+        writer.write( "      else if ( a < c )  \n"); //$NON-NLS-1$
+        writer.write( "         return c;       \n"); //$NON-NLS-1$
+        writer.write( "      else               \n"); //$NON-NLS-1$
+        writer.write( "         return a;       \n"); //$NON-NLS-1$
+        writer.write( "   else if( a < c )      \n"); //$NON-NLS-1$
+        writer.write( "      return a;          \n"); //$NON-NLS-1$
+        writer.write( "   else if( b < c )      \n"); //$NON-NLS-1$
+        writer.write( "      return c;          \n"); //$NON-NLS-1$
+        writer.write( "   else                  \n"); //$NON-NLS-1$
+        writer.write( "      return b;          \n"); //$NON-NLS-1$
+        writer.write( "}                        \n"); //$NON-NLS-1$
+        
+        parse( writer.toString() );
+    }
+    public void testBug77805() throws Exception {
+    	Writer writer = new StringWriter();
+    	writer.write("#if X // Do something only if X is true\n"); //$NON-NLS-1$
+    	writer.write("/* some statements */\n"); //$NON-NLS-1$
+    	writer.write("#endif\n"); //$NON-NLS-1$
+    	parse(writer.toString());
+    }
+    
+    public void testBug77821() throws Exception {
+    	Writer writer = new StringWriter();
+    	writer.write("typedef struct { /* ... */ }TYPE;\n"); //$NON-NLS-1$
+    	writer.write("void ptrArith(const TYPE* pType) {\n"); //$NON-NLS-1$
+    	writer.write("TYPE *temp = 0;\n"); //$NON-NLS-1$
+    	writer.write("temp = (TYPE*)(pType + 1); /* Parser error is here */\n}\n"); //$NON-NLS-1$
+    	parse(writer.toString());
+    }
+    
+    public void testBug77009() throws Exception
+	{
+		parse("int foo(volatile int &);\n"); //$NON-NLS-1$
+	}
+    
+    
+    public void testBug77281() throws Exception {
+    	Writer writer = new StringWriter();
+    	writer.write("void fun2(float a, float b) {}\n"); //$NON-NLS-1$
+		writer.write("int main() { fun2(0.24f, 0.25f); }\n"); //$NON-NLS-1$
+    	parse(writer.toString());
+    }
+    
+    public void testBug77921() throws Exception {
+    	Writer writer = new StringWriter();
+    	writer.write("void f()\n{\n"); //$NON-NLS-1$
+    	writer.write("static float v0[] = { -1.0f, -1.0f,  1.0f };\n}\n"); //$NON-NLS-1$
+    	parse(writer.toString());
+    }
+    
+    
+    public void testBug71317A() throws Exception {
+    	Writer writer = new StringWriter();
+    	writer.write("void f();\n"); //$NON-NLS-1$
+	    writer.write("namespace NS {\n"); //$NON-NLS-1$
+	    writer.write("using ::f;\n"); //$NON-NLS-1$
+	    writer.write("using ::f;\n}"); //$NON-NLS-1$
+	    parse(writer.toString());
+    }
+
+    public void testBug71317B() throws Exception {
+    	Writer writer = new StringWriter();
+    	writer.write("void f();\n"); //$NON-NLS-1$
+	    writer.write("namespace NS {\n"); //$NON-NLS-1$
+	    writer.write("void f();\n"); //$NON-NLS-1$
+	    writer.write("using ::f;\n}"); //$NON-NLS-1$
+	    parse(writer.toString());
+    }
+    
+    public void testBug77097() throws Exception {
+    	Writer writer = new StringWriter();
+    	writer.write("#define SOME_MACRO() { \\\r\n"); //$NON-NLS-1$
+    	writer.write("printf(\"Hello World\"); \\\r\n"); //$NON-NLS-1$
+    	writer.write("printf(\"Good morning\"); \\\r\n"); //$NON-NLS-1$
+    	parse(writer.toString());
+    }
+    
+    public void testBug77276() throws Exception {
+    	Writer writer = new StringWriter();
+    	writer.write("#if (!defined(OS_LIBMODE_R) && !defined(OS_LIBMODE_RP) && \\\r\n"); //$NON-NLS-1$
+    	writer.write("!defined(OS_LIBMODE_T))\r\n"); //$NON-NLS-1$
+    	writer.write("#define OS_LIBMODE_DP\r\n"); //$NON-NLS-1$
+    	writer.write("#endif\r\n"); //$NON-NLS-1$
+    	parse(writer.toString());
+    }
+    
+    public void testBug78165() throws Exception {
+    	Writer writer = new StringWriter();
+    	writer.write("struct Node {\n"); //$NON-NLS-1$
+    	writer.write("struct Node* Next; // OK: Refers to Node at global scope\n"); //$NON-NLS-1$
+    	writer.write("struct Data* Data; // OK: Declares type Data at global scope and member Data\n"); //$NON-NLS-1$
+    	writer.write("};\n"); //$NON-NLS-1$
+    	writer.write("struct Data {\n"); //$NON-NLS-1$
+    	writer.write("struct Node* Node; // OK: Refers to Node at global scope\n"); //$NON-NLS-1$
+    	writer.write("friend struct Glob; // OK: Refers to (as yet) undeclared Glob at global scope.\n"); //$NON-NLS-1$
+    	writer.write("};\n"); //$NON-NLS-1$
+    	writer.write("struct Base {\n"); //$NON-NLS-1$
+    	writer.write("struct Data; // OK: Declares nested Data\n"); //$NON-NLS-1$
+    	writer.write("struct ::Data* thatData; // OK: Refers to ::Data\n"); //$NON-NLS-1$
+    	writer.write("struct Base::Data* thisData; // OK: Refers to nested Data\n"); //$NON-NLS-1$
+    	writer.write("friend class ::Data; // OK: global Data is a friend\n"); //$NON-NLS-1$
+    	writer.write("friend class Data; // OK: nested Data is a friend\n"); //$NON-NLS-1$
+    	writer.write("struct Data { /* ... */ }; // Defines nested Data\n"); //$NON-NLS-1$
+    	writer.write("struct Data; // OK: Redeclares nested Data\n"); //$NON-NLS-1$
+    	writer.write("};\n"); //$NON-NLS-1$
+    	writer.write("struct Data; // OK: Redeclares Data at global scope\n"); //$NON-NLS-1$
+    	writer.write("struct Base::Data* pBase; // OK: refers to nested Data\n"); //$NON-NLS-1$
+
+    	parse( writer.toString() );
+    }
+
+    public void testBug103560() throws Exception {
+    	Writer writer = new StringWriter();
+    	writer.write("#define A( a, b ) a ## b               \n"); //$NON-NLS-1$
+    	writer.write("#define FOOBAR 1                       \n"); //$NON-NLS-1$
+    	writer.write("int i = A( FOO, BAR );                 \n"); //$NON-NLS-1$
+    	parse( writer.toString(), true, ParserLanguage.CPP );
+    }
+    
+    public void test158192_declspec_on_class() throws Exception {
+    	if(!Platform.getOS().equals(Platform.OS_WIN32))
+    		return; // XXX: see GPPParserExtensionConfiguration.supportDeclspecSpecifiers()
+    	
+    	Writer writer = new StringWriter();
+    	writer.write("class __declspec(foobar) Foo1 {};\n");
+    	writer.write("union __declspec(foobar) Foo2 {};\n");
+    	writer.write("struct __declspec(foobar) Foo3 {};\n");
+    	IASTTranslationUnit tu = parse( writer.toString(), true, ParserLanguage.CPP, true );
+
+    	CPPNameCollector col = new CPPNameCollector();
+    	tu.accept( col );
+
+    	assertEquals( 3, col.size());
+    	ICompositeType fooClass = (ICompositeType) col.getName(0).resolveBinding();
+    	ICompositeType fooUnion = (ICompositeType) col.getName(1).resolveBinding();
+    	ICompositeType fooStruct = (ICompositeType) col.getName(2).resolveBinding();
+
+    	assertEquals(ICPPClassType.k_class, fooClass.getKey());
+    	assertEquals(ICompositeType.k_union, fooUnion.getKey());
+    	assertEquals(ICompositeType.k_struct, fooStruct.getKey());
+
+    	assertInstances(col, fooClass, 1);
+    	assertInstances(col, fooUnion, 1);
+    	assertInstances(col, fooStruct, 1);
+    }
+
+    public void test158192_declspec_on_variable() throws Exception {
+    	if(!Platform.getOS().equals(Platform.OS_WIN32))
+    		return; // XXX: see GPPParserExtensionConfiguration.supportDeclspecSpecifiers()
+    
+    	Writer writer = new StringWriter();
+    	writer.write("__declspec(foobar) class Foo {} bar;\n");
+    	IASTTranslationUnit tu = parse( writer.toString(), true, ParserLanguage.CPP, true);
+
+    	CPPNameCollector col = new CPPNameCollector();
+    	tu.accept( col );
+
+    	assertEquals( 2, col.size());
+    	ICompositeType fooClass = (ICompositeType) col.getName(0).resolveBinding();
+    	ICPPVariable bar = (ICPPVariable) col.getName(1).resolveBinding();
+
+    	assertInstances(col, fooClass, 1);
+    	assertInstances(col, bar, 1);
+    }
+
+    // MSVC does not allow declspec in this position, GCC does so we test for this
+    // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=158192
+    public void test158192_declspec_in_declarator() throws Exception {
+    	if(!Platform.getOS().equals(Platform.OS_WIN32))
+    		return; // XXX: see GPPParserExtensionConfiguration.supportDeclspecSpecifiers()
+    	
+    	Writer writer = new StringWriter();
+
+    	writer.write("int * __declspec(foo) bar = 0;\n");
+    	IASTTranslationUnit tu = parse( writer.toString(), true, ParserLanguage.CPP, true);
+
+    	IASTProblem [] problems = CPPVisitor.getProblems(tu);
+    	assertFalse("__declspec rejected inside declarator", problems.length>0 );
+
+    	CPPNameCollector col = new CPPNameCollector();
+    	tu.accept( col );
+
+    	assertEquals( 1, col.size());
+    	ICPPVariable bar = (ICPPVariable) col.getName(0).resolveBinding();
+
+    	assertInstances(col, bar, 1);
+    }
+    
+    public void test173874_nestedClasses() throws Exception {
+    	String code = "class aClass { class bClass; int x; };";
+    	IASTTranslationUnit tu = parse(code, true, ParserLanguage.CPP, true);
+    	
+    	CPPNameCollector col = new CPPNameCollector();
+    	tu.accept(col);
+    	
+    	ICPPClassType cls = (ICPPClassType)col.getName(0).resolveBinding();
+    	ICPPClassType[] nested = cls.getNestedClasses();
+    	assertEquals(1, nested.length);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMFileBasePluginTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMFileBasePluginTest.java
new file mode 100644
index 0000000..b3a79a8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMFileBasePluginTest.java
@@ -0,0 +1,163 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/*
+ * Created on Sept 28, 2004
+ */
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.FileManager;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * @author dsteffle
+ */
+public class DOMFileBasePluginTest extends TestCase {
+    static NullProgressMonitor		monitor;
+    static IWorkspace 				workspace;
+    static IProject 				project;
+    static FileManager 				fileManager;
+    static int						numProjects = 0;
+    static Class					className;
+	static ICProject cPrj;
+
+    public DOMFileBasePluginTest() {
+	}
+
+	public DOMFileBasePluginTest(String name) {
+		super(name);
+	}
+
+	private void initialize(Class aClassName) {
+        if( CCorePlugin.getDefault() != null && CCorePlugin.getDefault().getCoreModel() != null){
+			//(CCorePlugin.getDefault().getCoreModel().getIndexManager()).reset();
+			monitor = new NullProgressMonitor();
+			
+			workspace = ResourcesPlugin.getWorkspace();
+			
+	        try {
+	        	cPrj = CProjectHelper.createCCProject("ParserTestProject", "bin", IPDOMManager.ID_NO_INDEXER); //$NON-NLS-1$ //$NON-NLS-2$
+	            project = cPrj.getProject();
+	            
+	            // ugly
+	            if (className == null || !className.equals(aClassName)) {
+	            	className = aClassName;
+	            	numProjects++;
+	            }
+	        } catch ( CoreException e ) {
+	            /*boo*/
+	        }
+			if (project == null)
+				throw new NullPointerException("Unable to create project"); //$NON-NLS-1$
+	
+			
+			//Create file manager
+			fileManager = new FileManager();
+        }
+    }
+
+    public DOMFileBasePluginTest(String name, Class className)
+    {
+    	super(name);
+    	initialize(className);
+    }
+	    
+    public void cleanupProject() throws Exception {
+    	numProjects--;
+    	
+    	try{
+    		if (numProjects == 0) {
+    			project.delete( true, false, monitor );
+    			project = null;
+    		}
+	    } catch( Throwable e ){
+	        /*boo*/
+	    }
+    }
+
+    protected void tearDown() throws Exception {
+        if( project == null || !project.exists() )
+            return;
+        
+        IResource [] members = project.members();
+        for( int i = 0; i < members.length; i++ ){
+            if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
+                continue;
+            if (members[i].getName().equals(".settings"))
+            	continue;
+            try{
+                members[i].delete( false, monitor );
+            } catch( Throwable e ){
+                /*boo*/
+            }
+        }
+	}
+
+    // below can be used to work with large files (too large for memory)
+//    protected IFile importFile(String fileName) throws Exception {
+//		IFile file = cPrj.getProject().getFile(fileName);
+//		if (!file.exists()) {
+//			try{
+//				FileInputStream fileIn = new FileInputStream(
+//						CTestPlugin.getDefault().getFileInPlugin(new Path("resources/parser/" + fileName)));
+//				file.create(fileIn,false, monitor);
+//			} catch (CoreException e) {
+//				e.printStackTrace();
+//			} catch (FileNotFoundException e) {
+//				e.printStackTrace();
+//			}
+//		}
+//
+//		return file;
+//    }
+    
+    protected IFolder importFolder(String folderName) throws Exception {
+    	IFolder folder = project.getProject().getFolder(folderName);
+		
+		//Create file input stream
+		if( !folder.exists() )
+			folder.create( false, false, monitor );
+		
+		return folder;
+    }
+    public IFile importFile(String fileName, String contents ) throws Exception{
+		//Obtain file handle
+		IFile file = project.getProject().getFile(fileName);
+		
+		InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+		//Create file input stream
+		if( file.exists() )
+		    file.setContents( stream, false, false, monitor );
+		else
+			file.create( stream, false, monitor );
+		
+		fileManager.addFile(file);
+		
+		return file;
+	}
+            
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMGCCParserExtensionTestSuite.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMGCCParserExtensionTestSuite.java
new file mode 100644
index 0000000..cd0c182
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMGCCParserExtensionTestSuite.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * @author jcamelon
+ *
+ */
+public class DOMGCCParserExtensionTestSuite extends TestCase {
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(DOMGCCParserExtensionTestSuite.class.getName());
+//		suite.addTestSuite( GCCScannerExtensionsTest.class );
+//		suite.addTestSuite( GCCQuickParseExtensionsTest.class );
+//		suite.addTestSuite( GCCCompleteParseExtensionsTest.class );
+		suite.addTestSuite( DOMGCCSelectionParseExtensionsTest.class);
+		return suite;
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMGCCSelectionParseExtensionsTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMGCCSelectionParseExtensionsTest.java
new file mode 100644
index 0000000..f1256dd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMGCCSelectionParseExtensionsTest.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.io.StringWriter;
+import java.io.Writer;
+
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+
+/**
+ * @author jcamelon
+ *
+ */
+public class DOMGCCSelectionParseExtensionsTest extends DOMSelectionParseBaseTest {
+
+	public DOMGCCSelectionParseExtensionsTest() {
+	}
+
+	public DOMGCCSelectionParseExtensionsTest(String name, Class className) {
+		super(name, className);
+	}
+
+	public DOMGCCSelectionParseExtensionsTest(String name) {
+		super(name, DOMGCCSelectionParseExtensionsTest.class);
+	}
+
+	public void testBug43021() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "extern int johnc(__const char *__restrict __format, ...);\n" ); //$NON-NLS-1$
+		writer.write( "void m() {johnc(\"HI\");}" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int startIndex = code.indexOf( "{johnc") + 1; //$NON-NLS-1$
+		IASTNode node = parse( code, startIndex, startIndex + 5 );
+		assertNotNull( node );
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationInclusionTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationInclusionTests.java
new file mode 100644
index 0000000..ddc284e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationInclusionTests.java
@@ -0,0 +1,614 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.io.File;
+import java.util.Collections;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.CDOM;
+import org.eclipse.cdt.core.dom.IParserConfiguration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTNodeLocation;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTProblem;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.parser.ExtendedScannerInfo;
+import org.eclipse.cdt.core.parser.IExtendedScannerInfo;
+import org.eclipse.cdt.core.parser.IScannerInfo;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.internal.core.dom.SavedCodeReaderFactory;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.content.IContentType;
+
+/**
+ * @author jcamelon
+ */
+public class DOMLocationInclusionTests extends AST2FileBasePluginTest {
+
+    public DOMLocationInclusionTests() {
+	}
+
+	public DOMLocationInclusionTests(String name, Class className) {
+		super(name, className);
+	}
+
+	public void testBug97967() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
+        buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
+        buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
+        buffer.append("typedef int (*ifp)();\n"); //$NON-NLS-1$
+        buffer.append("struct Include {\n"); //$NON-NLS-1$
+        buffer.append("int i;\n"); //$NON-NLS-1$
+        buffer.append("};\n"); //$NON-NLS-1$
+        buffer.append("#endif /*_INCLUDE_H_*/\n"); //$NON-NLS-1$
+        String[] macros = { importFile(
+                "macro.h", "#define JEDEN 1\n#define DVA 2\n#define TRI 3\n").getLocation().toOSString() }; //$NON-NLS-1$ //$NON-NLS-2$
+        String[] includes = { importFile("include.h", buffer.toString()).getLocation().toOSString() }; //$NON-NLS-1$
+        IExtendedScannerInfo scannerInfo = new ExtendedScannerInfo(
+                Collections.EMPTY_MAP, EMPTY_STRING_ARRAY, macros, includes);
+        String code = "int main() { return BEAST * sizeof( Include ); } "; //$NON-NLS-1$
+        for (ParserLanguage p : ParserLanguage.values()) {
+            String filename = (p == ParserLanguage.CPP) ? "main.cc" : "main.c"; //$NON-NLS-1$ //$NON-NLS-2$
+            IFile c = importFile(filename, code); //$NON-NLS-1$ //$NON-NLS-2$
+
+            IASTTranslationUnit tu = parse(c, scannerInfo); //$NON-NLS-1$
+            IASTFunctionDefinition fd = (IASTFunctionDefinition) tu.getDeclarations()[3];
+            IASTFileLocation floc = fd.getFileLocation();
+            assertEquals(floc.getNodeOffset(),
+                    code.indexOf("int main() { return BEAST * sizeof( Include ); }")); //$NON-NLS-1$
+            assertEquals(floc.getNodeLength(),
+                    "int main() { return BEAST * sizeof( Include ); }".length()); //$NON-NLS-1$
+        }
+    }
+
+    public void testBug101875() throws Exception {
+        for (int i = 0; i < 4; ++i) {
+            StringBuffer buffer = new StringBuffer();
+            buffer.append("#ifndef _BLAH_H_\n"); //$NON-NLS-1$
+            buffer.append("#endif"); //$NON-NLS-1$
+            if (i > 1)
+                buffer.append(" /* _BLAH_H_ */"); //$NON-NLS-1$
+            if ((i % 2) == 1)
+                buffer.append("\n"); //$NON-NLS-1$
+            importFile("blah.h", buffer.toString()); //$NON-NLS-1$
+            buffer = new StringBuffer();
+            buffer.append("#include \"blah.h\"\n"); //$NON-NLS-1$
+            buffer.append("/**\n"); //$NON-NLS-1$
+            buffer.append(" * A type used by test functions.\n"); //$NON-NLS-1$
+            buffer.append("*/\n"); //$NON-NLS-1$
+            buffer.append("int SomeStructure;\n"); //$NON-NLS-1$
+            String code = buffer.toString();
+
+            for (ParserLanguage p : ParserLanguage.values()) {
+                String filename = (p == ParserLanguage.CPP) ? "blah.cc" : "blah.c"; //$NON-NLS-1$ //$NON-NLS-2$
+                IFile source = importFile(filename, code); //$NON-NLS-1$
+                IASTTranslationUnit tu = parse(source); //$NON-NLS-1$
+                IASTSimpleDeclaration declaration = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+                assertSoleFileLocation(declaration.getDeclarators()[0], filename,
+                        code.indexOf("SomeStructure"), "SomeStructure".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            }
+        }
+    }
+
+    public class ParserConfiguration implements IParserConfiguration {
+
+        private final IScannerInfo info;
+
+        private final String dialect;
+
+        public ParserConfiguration(IScannerInfo s, IFile code) {
+            this.info = s;
+            String filename = code.getLocation().toOSString();
+            IProject prj = code.getProject();
+
+            // FIXME: ALAIN, for headers should we assume CPP ??
+            // The problem is that it really depends on how the header was
+            // included.
+            String id = null;
+            IContentType contentType = CCorePlugin.getContentType(prj, filename);
+            if (contentType != null) {
+                id = contentType.getId();
+            }
+
+            if (id != null) {
+                if (CCorePlugin.CONTENT_TYPE_CSOURCE.equals(id))
+                    dialect = "GNUC"; //$NON-NLS-1$
+                else
+                    dialect = "GNUC++"; //$NON-NLS-1$
+            } else
+                dialect = "GNUC++"; //$NON-NLS-1$
+
+        }
+
+        public IScannerInfo getScannerInfo() {
+            return info;
+        }
+
+        public String getParserDialect() {
+            return dialect;
+        }
+
+    }
+
+    private static final String[] EMPTY_STRING_ARRAY = new String[0];
+
+    /**
+     * @param name
+     * @param className
+     */
+    public DOMLocationInclusionTests(String name) {
+        super(name, DOMLocationInclusionTests.class);
+    }
+
+    protected IASTTranslationUnit parse(IFile code) throws Exception {
+        SavedCodeReaderFactory.getInstance().getCodeReaderCache().flush();
+        return CDOM.getInstance().getTranslationUnit(code);
+    }
+
+    protected IASTTranslationUnit parse(IFile code, IScannerInfo s)
+            throws Exception {
+        SavedCodeReaderFactory.getInstance().getCodeReaderCache().flush();
+        return CDOM.getInstance().getTranslationUnit(
+                code,
+                CDOM.getInstance().getCodeReaderFactory(CDOM.PARSE_SAVED_RESOURCES),
+                new ParserConfiguration(s, code));
+    }
+
+    /**
+     * @param pathEndsWith
+     *            TODO
+     * @param offset
+     * @param length
+     * @param declarator
+     */
+    protected void assertSoleFileLocation(IASTNode n, String pathEndsWith, int offset, int length) {
+        IASTNodeLocation[] locations = n.getNodeLocations();
+        assertEquals(locations.length, 1);
+        IASTFileLocation nodeLocation = (IASTFileLocation) locations[0];
+        assertTrue(nodeLocation.getFileName().endsWith(pathEndsWith));
+        assertEquals(offset, nodeLocation.getNodeOffset());
+        assertEquals(length, nodeLocation.getNodeLength());
+    }
+
+    private void assertFileLocation(IASTNode n, String pathEndsWith, int offset, int length) {
+        IASTFileLocation location = n.getFileLocation();
+        assertTrue(location.getFileName().endsWith(pathEndsWith));
+        assertEquals(offset, location.getNodeOffset());
+        assertEquals(length, location.getNodeLength());
+    }
+
+    public void testSimpleInclusion() throws Exception {
+        String foo = "int FOO;"; //$NON-NLS-1$
+        String code = "int bar;\n#include \"foo.h\"\n"; //$NON-NLS-1$
+
+        importFile("foo.h", foo); //$NON-NLS-1$
+
+        for (ParserLanguage p : ParserLanguage.values()) {
+            String filename = (p == ParserLanguage.CPP) ? "code.cc" : "code.c"; //$NON-NLS-1$ //$NON-NLS-2$
+            IFile cpp = importFile(filename, code); //$NON-NLS-1$
+            IASTTranslationUnit tu = parse(cpp); //$NON-NLS-1$
+            IASTDeclaration[] declarations = tu.getDeclarations();
+            assertEquals(declarations.length, 2);
+            IASTSimpleDeclaration bar = (IASTSimpleDeclaration) declarations[0];
+            IASTSimpleDeclaration FOO = (IASTSimpleDeclaration) declarations[1];
+            assertSoleFileLocation(bar, filename, code.indexOf("int"), code.indexOf(";") + 1); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+            assertSoleFileLocation(FOO, "foo.h", foo.indexOf("int"), foo.indexOf(";") + 1); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            IASTPreprocessorIncludeStatement[] incs = tu.getIncludeDirectives();
+            assertNotNull(incs);
+            assertEquals(incs.length, 1);
+            assertSoleFileLocation(incs[0], filename, code.indexOf("#inc"), "#include \"foo.h\"".length());
+            // test bug 166026
+            assertEquals(tu.getFilePath(), incs[0].getContainingFilename());
+            
+            checkInclude(incs[0], filename, code, "foo.h", false);
+        }
+    }
+
+    protected void checkInclude(IASTPreprocessorIncludeStatement inc, String file, String code, String name, boolean system) {
+        IASTName incName= inc.getName();
+    	
+        assertEquals(system, inc.isSystemInclude());
+        assertEquals(name, incName.toString());
+        assertSoleFileLocation(incName, file, code.indexOf(name), name.length());
+
+	}
+
+	public void testSimpleInclusion2() throws Exception {
+        String foo = "int FOO;"; //$NON-NLS-1$
+        String code = "int bar;\n#include \"foo.h\"\nfloat byob;\n"; //$NON-NLS-1$
+
+        importFile("foo.h", foo); //$NON-NLS-1$
+
+        for (ParserLanguage p : ParserLanguage.values()) {
+            String filename = (p == ParserLanguage.CPP) ? "code.cc" : "code.c"; //$NON-NLS-1$ //$NON-NLS-2$
+            IFile cpp = importFile(filename, code); //$NON-NLS-1$
+            IASTTranslationUnit tu = parse(cpp); //$NON-NLS-1$
+            IASTDeclaration[] declarations = tu.getDeclarations();
+            assertEquals(declarations.length, 3);
+            IASTSimpleDeclaration bar = (IASTSimpleDeclaration) declarations[0];
+            IASTSimpleDeclaration FOO = (IASTSimpleDeclaration) declarations[1];
+            IASTSimpleDeclaration byob = (IASTSimpleDeclaration) declarations[2];
+            assertSoleFileLocation(
+                    bar,
+                    filename,
+                    code.indexOf("int"), code.indexOf("r;") + 2 - code.indexOf("int")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+            assertSoleFileLocation(
+                    FOO,
+                    "foo.h", foo.indexOf("int"), foo.indexOf(";") + 1 - foo.indexOf("int")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+            assertSoleFileLocation(
+                    byob,
+                    filename,
+                    code.indexOf("float"), code.indexOf("b;") + 2 - code.indexOf("float")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+            IASTPreprocessorIncludeStatement[] incs = tu.getIncludeDirectives();
+            assertNotNull(incs);
+            assertEquals(incs.length, 1);
+            assertSoleFileLocation(
+                    incs[0],
+                    filename,
+                    code.indexOf("#inc"), code.indexOf(".h\"\n") + ".h\"".length() - code.indexOf("#inc")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+        }
+    }
+
+    public void testMacrosInIncludeFile() throws Exception {
+        String c_file_code = "#define X 4\n\n#include \"blarg.h\"\n\n#define POST_INCLUDE\n\n"; //$NON-NLS-1$
+        String h_file_code = "#ifndef _BLARG_H_\r\n#define _BLARG_H_\r\n// macro\r\n#define PRINT(s,m)  printf(s,m)\r\n#endif //_BLARG_H_\r\n"; //$NON-NLS-1$
+        importFile("blarg.h", h_file_code); //$NON-NLS-1$
+
+        for (ParserLanguage p : ParserLanguage.values()) {
+            String filename = (p == ParserLanguage.CPP) ? "blah.cc" : "blah.c"; //$NON-NLS-1$ //$NON-NLS-2$
+            IFile c_file = importFile(filename, c_file_code); //$NON-NLS-1$    
+            IASTTranslationUnit tu = parse(c_file); //$NON-NLS-1$
+            assertEquals(tu.getDeclarations().length, 0);
+            IASTPreprocessorMacroDefinition[] macroDefinitions = tu
+                    .getMacroDefinitions();
+            assertNotNull(macroDefinitions);
+            assertEquals(macroDefinitions.length, 4);
+            assertSoleFileLocation(
+                    macroDefinitions[0],
+                    filename,
+                    c_file_code.indexOf("#define"), c_file_code.indexOf("4") + 1 - c_file_code.indexOf("#define")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+            assertSoleFileLocation(macroDefinitions[0].getName(), filename,
+                    c_file_code.indexOf("X"), 1); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+            assertSoleFileLocation(
+                    macroDefinitions[1],
+                    "blarg.h", h_file_code.indexOf("#define _BLARG_H_"), "#define _BLARG_H_".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            assertSoleFileLocation(
+                    macroDefinitions[1].getName(),
+                    "blarg.h", h_file_code.indexOf("e _BLARG_H_") + 2, "_BLARG_H_".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            assertSoleFileLocation(
+                    macroDefinitions[2],
+                    "blarg.h", h_file_code.indexOf("#define PRINT(s,m)  printf(s,m)\r"), "#define PRINT(s,m)  printf(s,m)".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+            assertSoleFileLocation(macroDefinitions[2].getName(),
+                    "blarg.h", h_file_code.indexOf("PRINT"), "PRINT".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+            assertSoleFileLocation(
+                    macroDefinitions[3],
+                    filename,
+                    c_file_code.indexOf("#define POST_INCLUDE"), "#define POST_INCLUDE".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            assertSoleFileLocation(
+                    macroDefinitions[3].getName(),
+                    filename,
+                    c_file_code.indexOf("POST_INCLUDE"), "POST_INCLUDE".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        }
+    }
+
+    public void testBug84451() throws Exception {
+        String header1_code = "int x;\n"; //$NON-NLS-1$
+        String header2_code = "int y;\n"; //$NON-NLS-1$
+        String cpp_code = "#include \"header1.h\"\n#include \"header2.h\"\nint z;\n"; //$NON-NLS-1$
+        importFile("header1.h", header1_code); //$NON-NLS-1$ 
+        importFile("header2.h", header2_code); //$NON-NLS-1$ 
+
+        for (ParserLanguage p : ParserLanguage.values()) {
+            String filename = (p == ParserLanguage.CPP) ? "source.cc" : "source.c"; //$NON-NLS-1$ //$NON-NLS-2$
+            IFile f = importFile(filename, cpp_code); //$NON-NLS-1$
+            IASTTranslationUnit tu = parse(f);
+            IASTDeclaration[] declarations = tu.getDeclarations();
+            IASTPreprocessorIncludeStatement[] includeDirectives = tu
+                    .getIncludeDirectives();
+            assertSoleFileLocation(
+                    includeDirectives[0],
+                    filename,
+                    cpp_code.indexOf("#include \"header1.h\""), "#include \"header1.h\"".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            assertSoleFileLocation(declarations[0],
+                    "header1.h", 0, "int x;".length()); //$NON-NLS-1$ //$NON-NLS-2$
+            assertSoleFileLocation(declarations[1],
+                    "header2.h", 0, "int y;".length()); //$NON-NLS-1$ //$NON-NLS-2$
+            assertSoleFileLocation(
+                    includeDirectives[1],
+                    filename,
+                    cpp_code.indexOf("#include \"header2.h\""), "#include \"header2.h\"".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            assertSoleFileLocation(declarations[2], filename, cpp_code
+                    .indexOf("int z;"), "int z;".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+            IASTTranslationUnit.IDependencyTree tree = tu.getDependencyTree();
+            assertEquals(tree.getInclusions().length, 2);
+
+        }
+    }
+
+    public void testMacrosInIncludeFile2() throws Exception {
+        String c_file_code = "#define X 4\n\n#include \"blarg.h\"\n\n#define POST_INCLUDE\n#include \"second.h\"\n#define POST_SECOND\n"; //$NON-NLS-1$
+        String h_file_code = "#ifndef _BLARG_H_\r\n#define _BLARG_H_\r\n//macro\r\n#define PRINT(s,m) printf(s,m)\r\n#endif //_BLARG_H_\r\n"; //$NON-NLS-1$
+        String h_file2_code = "#ifndef _SECOND_H_ \n#define _SECOND_H_\n#endif\n"; //$NON-NLS-1$
+        importFile("blarg.h", h_file_code); //$NON-NLS-1$
+        importFile("second.h", h_file2_code); //$NON-NLS-1$
+
+        for (ParserLanguage p : ParserLanguage.values()) {
+            String filename = (p == ParserLanguage.CPP) ? "blah.cc" : "blah.c"; //$NON-NLS-1$ //$NON-NLS-2$
+            IFile c_file = importFile(filename, c_file_code); //$NON-NLS-1$
+            IASTTranslationUnit tu = parse(c_file); //$NON-NLS-1$
+            assertEquals(tu.getDeclarations().length, 0);
+            IASTPreprocessorMacroDefinition[] macroDefinitions = tu.getMacroDefinitions();
+            assertNotNull(macroDefinitions);
+            assertEquals(macroDefinitions.length, 6);
+            assertSoleFileLocation(
+                    macroDefinitions[0],
+                    filename,
+                    c_file_code.indexOf("#define"), c_file_code.indexOf("4") + 1 - c_file_code.indexOf("#define")); //$NON-NLS-1$ //$NON-NLS-2$    //$NON-NLS-3$ //$NON-NLS-4$
+            assertSoleFileLocation(macroDefinitions[0].getName(), filename,
+                    c_file_code.indexOf("X"), 1); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$    //$NON-NLS-4$
+            assertSoleFileLocation(
+                    macroDefinitions[1],
+                    "blarg.h", h_file_code.indexOf("#define _BLARG_H_"), "#define _BLARG_H_".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            assertSoleFileLocation(
+                    macroDefinitions[1].getName(),
+                    "blarg.h", h_file_code.indexOf("e _BLARG_H_") + 2, "_BLARG_H_".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            assertSoleFileLocation(
+                    macroDefinitions[2],
+                    "blarg.h", h_file_code.indexOf("#define PRINT(s,m) printf(s,m)\r"), "#define PRINT(s,m) printf(s,m)".length()); //$NON-NLS-1$ //$NON-NLS-2$    //$NON-NLS-3$ //$NON-NLS-4$
+            assertSoleFileLocation(macroDefinitions[2].getName(),
+                    "blarg.h", h_file_code.indexOf("PRINT"), "PRINT".length()); //$NON-NLS-1$    //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+            assertSoleFileLocation(
+                    macroDefinitions[3],
+                    filename,
+                    c_file_code.indexOf("#define POST_INCLUDE"), "#define POST_INCLUDE".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            assertSoleFileLocation(
+                    macroDefinitions[3].getName(),
+                    filename,
+                    c_file_code.indexOf("POST_INCLUDE"), "POST_INCLUDE".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            assertSoleFileLocation(
+                    macroDefinitions[4],
+                    "second.h", h_file2_code.indexOf("#define _SECOND_H_"), "#define _SECOND_H_".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            assertSoleFileLocation(
+                    macroDefinitions[5],
+                    filename,
+                    c_file_code.indexOf("#define POST_SECOND"), "#define POST_SECOND".length()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$    //$NON-NLS-4$
+
+        }
+    }
+
+    public void testBug90851() throws Exception {
+        IFile imacro_file = importFile("macro.h", "#define BEAST 666\n"); //$NON-NLS-1$ //$NON-NLS-2$
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
+        buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
+        buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
+        buffer.append("typedef int (*ifp)();\n"); //$NON-NLS-1$
+        buffer.append("struct Include {\n"); //$NON-NLS-1$
+        buffer.append("int i;\n"); //$NON-NLS-1$
+        buffer.append("};\n"); //$NON-NLS-1$
+        buffer.append("#endif /*_INCLUDE_H_*/\n"); //$NON-NLS-1$
+        final String inc_file_code = buffer.toString();
+        IFile include_file = importFile("include.h", inc_file_code); //$NON-NLS-1$ //$NON-NLS-2$
+        String[] macros = { imacro_file.getLocation().toOSString() };
+        String[] includes = { include_file.getLocation().toOSString() };
+        IExtendedScannerInfo scannerInfo = new ExtendedScannerInfo(Collections.EMPTY_MAP, EMPTY_STRING_ARRAY, macros, includes);
+        
+        for (ParserLanguage p : ParserLanguage.values()) {
+            String filename = (p == ParserLanguage.CPP) ? "main.cc" : "main.c"; //$NON-NLS-1$ //$NON-NLS-2$
+            IFile code = importFile(filename, "int main() { return BEAST * sizeof( Include ); } "); //$NON-NLS-1$ //$NON-NLS-2$
+            IASTTranslationUnit tu = parse(code, scannerInfo); //$NON-NLS-1$
+            IASTPreprocessorMacroDefinition[] macro_defs = tu.getMacroDefinitions();
+            assertEquals(macro_defs.length, 2);
+            IASTPreprocessorMacroDefinition BEAST = macro_defs[0];
+            assertEquals(BEAST.getName().toString(), "BEAST"); //$NON-NLS-1$
+            IASTPreprocessorMacroDefinition INCLUDE_H = macro_defs[1];
+            final IASTNodeLocation[] nodeLocations = INCLUDE_H.getName().getNodeLocations();
+            assertEquals(nodeLocations.length, 1);
+            final IASTFileLocation flatLoc = INCLUDE_H.getName().getFileLocation();
+            assertNotNull(flatLoc);
+            assertEquals(include_file.getLocation().toOSString(), flatLoc.getFileName());
+            assertEquals(inc_file_code.indexOf("#define _INCLUDE_H_") + "#define ".length(), flatLoc.getNodeOffset()); //$NON-NLS-1$ //$NON-NLS-2$
+            assertEquals("_INCLUDE_H_".length(), flatLoc.getNodeLength()); //$NON-NLS-1$
+        }
+    }
+
+    public void testIProblemLocation() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("#include <not_found.h>\n"); //$NON-NLS-1$
+        buffer.append("int x,y,z;"); //$NON-NLS-1$
+        String code = buffer.toString();
+
+        for (ParserLanguage p : ParserLanguage.values()) {
+            String filename = (p == ParserLanguage.CPP) ? "blah.cc" : "blah.c"; //$NON-NLS-1$ //$NON-NLS-2$
+            IFile f = importFile(filename, code); //$NON-NLS-1$
+            IASTTranslationUnit tu = parse(f); //$NON-NLS-1$
+            IASTProblem[] prbs = tu.getPreprocessorProblems();
+            assertEquals(prbs.length, 1);
+            IASTNodeLocation[] locs = prbs[0].getNodeLocations();
+            assertEquals(locs.length, 1);
+            IASTFileLocation fileLoc = (IASTFileLocation) locs[0];
+            assertEquals(code.indexOf("#include"), fileLoc.getNodeOffset()); //$NON-NLS-1$
+            assertEquals("#include <not_found.h>".length(), fileLoc.getNodeLength()); //$NON-NLS-1$  
+        }
+
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite(DOMLocationInclusionTests.class);
+        suite.addTest(new DOMLocationInclusionTests("cleanupProject")); //$NON-NLS-1$
+        return suite;
+    }
+
+    public void testBug97603() throws Exception {
+        IFile imacro_file = importFile("macro.h", "#define JEDEN 1\n#define DVA 2\n#define TRI 3\n"); //$NON-NLS-1$ //$NON-NLS-2$
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
+        buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
+        buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
+        buffer.append("typedef int (*ifp)();\n"); //$NON-NLS-1$
+        buffer.append("struct Include {\n"); //$NON-NLS-1$
+        buffer.append("int i;\n"); //$NON-NLS-1$
+        buffer.append("};\n"); //$NON-NLS-1$
+        buffer.append("#endif /*_INCLUDE_H_*/\n"); //$NON-NLS-1$
+        final String inc_file_code = buffer.toString();
+        IFile include_file = importFile("include.h", inc_file_code); //$NON-NLS-1$ //$NON-NLS-2$
+        String[] macros = { imacro_file.getLocation().toOSString() };
+        String[] includes = { include_file.getLocation().toOSString() };
+        IExtendedScannerInfo scannerInfo = new ExtendedScannerInfo(
+                Collections.EMPTY_MAP, EMPTY_STRING_ARRAY, macros, includes);
+        for (ParserLanguage p : ParserLanguage.values()) {
+            String filename = (p == ParserLanguage.CPP) ? "main.cc" : "main.c"; //$NON-NLS-1$ //$NON-NLS-2$
+            IFile code = importFile(filename, "int main() { return BEAST * sizeof( Include ); } "); //$NON-NLS-1$ //$NON-NLS-2$
+
+            IASTTranslationUnit tu = parse(code, scannerInfo); //$NON-NLS-1$
+            IASTPreprocessorMacroDefinition[] macro_defs = tu.getMacroDefinitions();
+            assertEquals(macro_defs.length, 4);
+            IASTPreprocessorMacroDefinition BEAST = macro_defs[0];
+            assertEquals(BEAST.getName().toString(), "JEDEN"); //$NON-NLS-1$
+            IASTPreprocessorMacroDefinition INCLUDE_H = macro_defs[3];
+            final IASTNodeLocation[] nodeLocations = INCLUDE_H.getName().getNodeLocations();
+            assertEquals(nodeLocations.length, 1);
+            final IASTFileLocation flatLoc = INCLUDE_H.getName().getFileLocation();
+            assertNotNull(flatLoc);
+            assertEquals(include_file.getLocation().toOSString(), flatLoc.getFileName());
+            assertEquals(inc_file_code.indexOf("#define _INCLUDE_H_") + "#define ".length(), flatLoc.getNodeOffset()); //$NON-NLS-1$ //$NON-NLS-2$
+            assertEquals("_INCLUDE_H_".length(), flatLoc.getNodeLength()); //$NON-NLS-1$
+            for (int j = 0; j < macro_defs.length; ++j)
+                assertNotNull(macro_defs[j].getName().getFileLocation());
+
+        }
+    }
+
+    public void testBug97603_2() throws Exception {
+        IFile imacro_file1= importFile("macro1.h", "#define JEDEN 1\n");
+        IFile imacro_file2= importFile("macro2.h", "#define DVA 2\n#define TRI 3\n");
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
+        buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
+        buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
+        buffer.append("typedef int (*ifp)();\n"); //$NON-NLS-1$
+        buffer.append("struct Include {\n"); //$NON-NLS-1$
+        buffer.append("int i;\n"); //$NON-NLS-1$
+        buffer.append("};\n"); //$NON-NLS-1$
+        buffer.append("#endif /*_INCLUDE_H_*/\n"); //$NON-NLS-1$
+        final String inc_file_code = buffer.toString();
+        IFile include_file = importFile("include.h", inc_file_code); //$NON-NLS-1$ //$NON-NLS-2$
+        String[] macros = { imacro_file1.getLocation().toOSString(), imacro_file2.getLocation().toOSString() };
+        String[] includes = { include_file.getLocation().toOSString() };
+        IExtendedScannerInfo scannerInfo = new ExtendedScannerInfo(Collections.EMPTY_MAP, EMPTY_STRING_ARRAY, macros, includes);
+        
+        for (ParserLanguage p : ParserLanguage.values()) {
+            String filename = (p == ParserLanguage.CPP) ? "main.cc" : "main.c"; //$NON-NLS-1$ //$NON-NLS-2$
+            IFile code = importFile(filename, "int main() { return BEAST * sizeof( Include ); } "); //$NON-NLS-1$ //$NON-NLS-2$
+
+            IASTTranslationUnit tu = parse(code, scannerInfo); 
+            IASTPreprocessorMacroDefinition[] macro_defs = tu.getMacroDefinitions();
+            assertEquals(macro_defs.length, 4);
+            IASTPreprocessorMacroDefinition BEAST = macro_defs[0];
+            assertEquals(BEAST.getName().toString(), "JEDEN"); //$NON-NLS-1$
+            IASTPreprocessorMacroDefinition INCLUDE_H = macro_defs[3];
+            final IASTNodeLocation[] nodeLocations = INCLUDE_H.getName().getNodeLocations();
+            assertEquals(nodeLocations.length, 1);
+            final IASTFileLocation flatLoc = INCLUDE_H.getName().getFileLocation();
+            assertNotNull(flatLoc);
+            assertEquals(include_file.getLocation().toOSString(), flatLoc.getFileName());
+            assertEquals(inc_file_code.indexOf("#define _INCLUDE_H_") + "#define ".length(), flatLoc.getNodeOffset()); //$NON-NLS-1$ //$NON-NLS-2$
+            assertEquals("_INCLUDE_H_".length(), flatLoc.getNodeLength()); //$NON-NLS-1$
+            for (int j = 0; j < macro_defs.length; ++j)
+                assertNotNull(macro_defs[j].getName().getFileLocation());
+
+        }
+    }
+    
+    public void testSystemInclude() throws Exception {
+        IFile incsh= importFile("incs.h", "");
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("#include <incs.h>\n"); 
+        buffer.append("#include <../AST2BasedProjectMofo/incs.h>\n"); 
+        buffer.append("#define TARG <incs.h>\n");
+        buffer.append("#include TARG\n"); 
+        String code= buffer.toString();
+        IExtendedScannerInfo scannerInfo = new ExtendedScannerInfo(Collections.EMPTY_MAP, new String[] {incsh.getLocation().removeLastSegments(1).toOSString()}, null, null);
+        
+        for (ParserLanguage p : ParserLanguage.values()) {
+            String filename = (p == ParserLanguage.CPP) ? "main.cc" : "main.c"; 
+            IFile sfile = importFile(filename, code); 
+            IASTTranslationUnit tu = parse(sfile, scannerInfo); 
+
+            IASTPreprocessorIncludeStatement[] incs = tu.getIncludeDirectives();
+            assertNotNull(incs);
+            assertEquals(3, incs.length);
+
+            assertSoleFileLocation(incs[0], filename, code.indexOf("#include <incs.h>"), "#include <incs.h>".length());
+            checkInclude(incs[0], filename, code, "incs.h", true);
+
+            assertSoleFileLocation(incs[1], filename, code.indexOf("#include <../AST2BasedProjectMofo/incs.h>"), "#include <../AST2BasedProjectMofo/incs.h>".length());
+            checkInclude(incs[1], filename, code, "../AST2BasedProjectMofo/incs.h", true);
+
+            assertFileLocation(incs[2], filename, code.indexOf("#include TARG"), "#include TARG".length());
+            IASTName incName= incs[2].getName();
+			
+			assertEquals(true, incs[2].isSystemInclude());
+			assertEquals("incs.h", incName.toString());
+			assertFileLocation(incName, filename, code.lastIndexOf("TARG"), "TARG".length());
+        }
+    }
+    
+    // #define NAME test.h
+    // #define MAKE_INCLUDE(path, header) <path/header>
+    // #include MAKE_INCLUDE(test_bug164644, NAME)
+    public void testBug164644() throws Exception {
+    	String tmpDir= System.getProperty("java.io.tmpdir");
+    	File tmpFile= new File(tmpDir + "/test_bug164644/test.h").getCanonicalFile();
+    	tmpFile.getParentFile().mkdirs();
+    	tmpFile.createNewFile();
+    	try {
+    		String code= getContents(1)[0].toString();
+    		IExtendedScannerInfo scannerInfo = new ExtendedScannerInfo(
+    				Collections.EMPTY_MAP, new String[] {tmpDir}, null, null);
+
+    		for (ParserLanguage p : ParserLanguage.values()) {
+    			String filename = (p == ParserLanguage.CPP) ? "main.cc" : "main.c"; 
+    			IFile sfile = importFile(filename, code); 
+    			IASTTranslationUnit tu = parse(sfile, scannerInfo); 
+
+    			IASTPreprocessorIncludeStatement[] incs = tu.getIncludeDirectives();
+    			assertNotNull(incs);
+    			assertEquals(1, incs.length);
+
+    			assertEquals(tmpFile.getAbsolutePath(), incs[0].getPath());
+    			assertFileLocation(incs[0], filename, code.indexOf("#include MAKE_INCLUDE(test_bug164644, NAME)"), "#include MAKE_INCLUDE(test_bug164644, NAME)".length());
+    			IASTPreprocessorIncludeStatement inc = incs[0];
+    			IASTName incName= inc.getName();
+    			assertEquals(true, inc.isSystemInclude());
+    		}
+    	}
+    	finally {
+    		tmpFile.delete();
+    		tmpFile.getParentFile().delete();
+    	}
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationMacroTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationMacroTests.java
new file mode 100644
index 0000000..04bd7cb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationMacroTests.java
@@ -0,0 +1,483 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *    Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTInitializerExpression;
+import org.eclipse.cdt.core.dom.ast.IASTMacroExpansionLocation;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNodeLocation;
+import org.eclipse.cdt.core.dom.ast.IASTPointer;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorFunctionStyleMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroExpansion;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorObjectStyleMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorUndefStatement;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IMacroBinding;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+public class DOMLocationMacroTests extends AST2BaseTest {
+
+	final ParserLanguage[] languages = new ParserLanguage[] { ParserLanguage.C, ParserLanguage.CPP };
+	
+    public DOMLocationMacroTests() {
+	}
+
+	public DOMLocationMacroTests(String name) {
+		super(name);
+	}
+
+	public void testObjectStyleMacroExpansionSimpleDeclarator() throws Exception
+    {
+        StringBuffer buffer = new StringBuffer( "#define ABC D\n" ); //$NON-NLS-1$
+        buffer.append( "int ABC;"); //$NON-NLS-1$
+        String code = buffer.toString();
+        for(int i = 0; i < languages.length; i++) {
+            IASTTranslationUnit tu = parse(code, languages[i]);
+            IASTPreprocessorObjectStyleMacroDefinition ABC = (IASTPreprocessorObjectStyleMacroDefinition) tu.getMacroDefinitions()[0];
+            IASTSimpleDeclaration var = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+            IASTDeclarator d = var.getDeclarators()[0];
+            assertEquals( d.getName().toString(), "D"); //$NON-NLS-1$
+            IASTNodeLocation [] declaratorLocations = d.getNodeLocations();
+            assertEquals( declaratorLocations.length, 1 );
+            IASTMacroExpansionLocation expansion = (IASTMacroExpansionLocation) declaratorLocations[0];
+            IASTPreprocessorObjectStyleMacroDefinition fromExpansion = (IASTPreprocessorObjectStyleMacroDefinition) expansion.getExpansion().getMacroDefinition();
+            assertEqualsMacros( fromExpansion, ABC );
+            assertEquals( expansion.getNodeOffset(), 0 );
+            assertEquals( expansion.getNodeLength(), 1 );
+            IASTNodeLocation [] macroLocation = expansion.getExpansion().getNodeLocations();
+            assertEquals( macroLocation.length, 1 );
+            assertTrue( macroLocation[0] instanceof IASTFileLocation );
+            assertEquals( macroLocation[0].getNodeOffset(), code.indexOf( "int ABC;") + "int ".length() ); //$NON-NLS-1$ //$NON-NLS-2$
+            assertEquals( macroLocation[0].getNodeLength(), "ABC".length() ); //$NON-NLS-1$
+        }
+    }
+    
+    public void testObjectMacroExpansionModestDeclarator() throws Exception
+    {
+        StringBuffer buffer = new StringBuffer( "#define ABC * D\n" ); //$NON-NLS-1$
+        buffer.append( "int ABC;"); //$NON-NLS-1$
+        String code = buffer.toString();
+        for(int i = 0; i < languages.length; i++) {
+            IASTTranslationUnit tu = parse(code, languages[i]);
+            IASTPreprocessorObjectStyleMacroDefinition ABC = (IASTPreprocessorObjectStyleMacroDefinition) tu.getMacroDefinitions()[0];
+            IASTSimpleDeclaration var = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+            IASTDeclarator d = var.getDeclarators()[0];
+            assertEquals( d.getName().toString(), "D"); //$NON-NLS-1$
+            assertEquals( d.getPointerOperators().length, 1 );
+            IASTNodeLocation [] declaratorLocations = d.getNodeLocations();
+            assertEquals( declaratorLocations.length, 1 );
+            IASTMacroExpansionLocation expansion = (IASTMacroExpansionLocation) declaratorLocations[0];
+            IASTPreprocessorObjectStyleMacroDefinition fromExpansion = (IASTPreprocessorObjectStyleMacroDefinition) expansion.getExpansion().getMacroDefinition();
+            assertEqualsMacros( fromExpansion, ABC );
+            assertEquals( expansion.getNodeOffset(), 0 );
+            assertEquals( 2, expansion.getNodeLength() );
+            IASTNodeLocation [] macroLocation = expansion.getExpansion().getNodeLocations();
+            assertEquals( macroLocation.length, 1 );
+            assertTrue( macroLocation[0] instanceof IASTFileLocation );
+            assertEquals( macroLocation[0].getNodeOffset(), code.indexOf( "int ABC;") + "int ".length() ); //$NON-NLS-1$ //$NON-NLS-2$
+            assertEquals( macroLocation[0].getNodeLength(), "ABC".length() ); //$NON-NLS-1$
+            
+            IASTName n = d.getName();
+            IASTNodeLocation [] nameLocations = n.getNodeLocations();
+            assertEquals( nameLocations.length, 1 );
+            final IASTMacroExpansionLocation nodeLocation = (IASTMacroExpansionLocation) nameLocations[0];
+            assertEquals( nodeLocation.getNodeOffset(), 1 );
+            assertEquals( nodeLocation.getNodeLength(), 1 );
+            
+            assertEquals( nodeLocation.getExpansion().getNodeLocations()[0].getNodeOffset(), macroLocation[0].getNodeOffset() );
+            assertEquals( nodeLocation.getExpansion().getNodeLocations()[0].getNodeLength(), macroLocation[0].getNodeLength() );
+            
+            IASTPointer po = (IASTPointer) d.getPointerOperators()[0];
+            assertFalse( po.isConst() );
+            assertFalse( po.isVolatile() );
+            IASTMacroExpansionLocation pointerLocation = (IASTMacroExpansionLocation) po.getNodeLocations()[0];
+            assertEquals( pointerLocation.getNodeOffset(), 0 );
+            assertEquals( pointerLocation.getNodeLength(), 1 );
+            assertEquals( pointerLocation.getExpansion().getNodeLocations()[0].getNodeOffset(), macroLocation[0].getNodeOffset() );
+            assertEquals( pointerLocation.getExpansion().getNodeLocations()[0].getNodeLength(), macroLocation[0].getNodeLength() );
+            assertEqualsMacros( pointerLocation.getExpansion().getMacroDefinition(), nodeLocation.getExpansion().getMacroDefinition() );
+        }
+    }    
+    
+    public void testObjectMacroExpansionPartialDeclSpec() throws Exception
+    {
+        StringBuffer buffer = new StringBuffer( "#define XYZ const\n"); //$NON-NLS-1$
+        buffer.append( "XYZ int var;"); //$NON-NLS-1$
+        String code = buffer.toString();
+        for(int i = 0; i < languages.length; i++) {
+            IASTTranslationUnit tu = parse(code, languages[i]);
+            IASTPreprocessorObjectStyleMacroDefinition defXYZ = (IASTPreprocessorObjectStyleMacroDefinition) tu.getMacroDefinitions()[0];
+            IASTSimpleDeclaration var = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+            IASTSimpleDeclSpecifier declSpec = (IASTSimpleDeclSpecifier) var.getDeclSpecifier();
+            IASTNodeLocation [] declSpecLocations = declSpec.getNodeLocations();
+            assertEquals( declSpecLocations.length, 2 );
+            IASTMacroExpansionLocation expansion = (IASTMacroExpansionLocation) declSpecLocations[0];
+            assertEqualsMacros( defXYZ, expansion.getExpansion().getMacroDefinition() );
+            assertEquals( expansion.getNodeOffset(), 0 );
+            assertEquals( expansion.getNodeLength(), 1 );
+            IASTNodeLocation [] expansionLocations = expansion.getExpansion().getNodeLocations();
+            assertEquals( expansionLocations.length, 1 );
+            assertTrue( expansionLocations[0] instanceof IASTFileLocation );
+            assertEquals( expansionLocations[0].getNodeOffset(), code.indexOf( "XYZ int")); //$NON-NLS-1$
+            assertEquals( expansionLocations[0].getNodeLength(), "XYZ".length()); //$NON-NLS-1$
+            IASTFileLocation second = (IASTFileLocation) declSpecLocations[1];
+            assertEquals( second.getNodeOffset(), code.indexOf( " int") ); //$NON-NLS-1$
+            assertEquals( second.getNodeLength(), " int".length() ); //$NON-NLS-1$
+        }        
+    }
+    
+    public void testObjectMacroExpansionNested() throws Exception
+    {
+        StringBuffer buffer = new StringBuffer( "#define XYZ const\n"); //$NON-NLS-1$
+        buffer.append( "#define PO *\n"); //$NON-NLS-1$
+        buffer.append( "#define C_PO PO XYZ\n"); //$NON-NLS-1$
+        buffer.append( "int C_PO var;"); //$NON-NLS-1$
+        String code = buffer.toString();
+        
+        for(int i = 0; i < languages.length; i++) {
+            IASTTranslationUnit tu = parse(code, languages[i]);
+            final IASTPreprocessorMacroDefinition[] macroDefinitions = tu.getMacroDefinitions();
+            IASTPreprocessorMacroDefinition XYZ = macroDefinitions[0];
+            IASTPreprocessorMacroDefinition PO = macroDefinitions[1];
+            IASTPreprocessorMacroDefinition C_PO = macroDefinitions[2];
+            IASTSimpleDeclaration var = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+            assertTrue( var.getDeclarators()[0].getPointerOperators().length > 0 );
+            IASTNodeLocation [] locations = var.getNodeLocations();
+            assertEquals( 3, locations.length);
+            IASTFileLocation start_loc = (IASTFileLocation) locations[0];
+            assertEquals( start_loc.getNodeOffset(), code.indexOf( "int") ); //$NON-NLS-1$
+            assertEquals( start_loc.getNodeLength(), "int ".length()); //$NON-NLS-1$
+            IASTMacroExpansionLocation mac_loc = (IASTMacroExpansionLocation) locations[1];
+            final IASTPreprocessorMacroDefinition C_PO2 = mac_loc.getExpansion().getMacroDefinition();
+            assertEqualsMacros( C_PO, C_PO2 );
+            assertEquals( 0, mac_loc.getNodeOffset());
+            assertEquals( 2, mac_loc.getNodeLength() );
+            IASTFileLocation end_loc = (IASTFileLocation) locations[2];
+            assertEquals( code.indexOf( " var"), end_loc.getNodeOffset() );  //$NON-NLS-1$
+            assertEquals( " var;".length(), end_loc.getNodeLength() ); //$NON-NLS-1$
+        }
+    }
+
+    public void testObjectMacroExpansionComplex() throws Exception
+    {
+        StringBuffer buffer = new StringBuffer( "#define XYZ const\n"); //$NON-NLS-1$
+        buffer.append( "#define PO *\n"); //$NON-NLS-1$
+        buffer.append( "#define C_PO PO XYZ\n"); //$NON-NLS-1$
+        buffer.append( "#define IT int\n"); //$NON-NLS-1$
+        buffer.append( "#define V var\n"); //$NON-NLS-1$
+        buffer.append( "XYZ IT C_PO C_PO V;"); //$NON-NLS-1$
+        String code = buffer.toString();
+        
+        for(int i = 0; i < languages.length; i++) {
+            IASTTranslationUnit tu = parse(code, languages[i]);
+            IASTPreprocessorObjectStyleMacroDefinition XYZ = (IASTPreprocessorObjectStyleMacroDefinition) tu.getMacroDefinitions()[0];
+//            IASTPreprocessorObjectStyleMacroDefinition PO = (IASTPreprocessorObjectStyleMacroDefinition) tu.getMacroDefinitions()[1];
+            IASTPreprocessorObjectStyleMacroDefinition C_PO = (IASTPreprocessorObjectStyleMacroDefinition) tu.getMacroDefinitions()[2];
+            IASTPreprocessorObjectStyleMacroDefinition IT = (IASTPreprocessorObjectStyleMacroDefinition) tu.getMacroDefinitions()[3];
+            IASTPreprocessorObjectStyleMacroDefinition V = (IASTPreprocessorObjectStyleMacroDefinition) tu.getMacroDefinitions()[4];
+            
+            IASTSimpleDeclaration var = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+            final IASTNodeLocation[] nodeLocations = var.getNodeLocations();
+            
+            assertEquals( 10, nodeLocations.length );
+            IASTMacroExpansionLocation first_loc = (IASTMacroExpansionLocation) nodeLocations[0];
+            assertEqualsMacros( first_loc.getExpansion().getMacroDefinition(), XYZ );
+            IASTFileLocation second_loc = (IASTFileLocation) nodeLocations[1];
+            assertEquals( 1, second_loc.getNodeLength() );
+            IASTMacroExpansionLocation third_loc = (IASTMacroExpansionLocation) nodeLocations[2];
+            assertEqualsMacros( third_loc.getExpansion().getMacroDefinition(), IT );
+            IASTFileLocation fourth_loc = (IASTFileLocation) nodeLocations[3];
+            assertEquals( 1, fourth_loc.getNodeLength() );
+            IASTMacroExpansionLocation fifth_loc = (IASTMacroExpansionLocation) nodeLocations[4];
+            assertEqualsMacros( fifth_loc.getExpansion().getMacroDefinition(), C_PO );
+            IASTFileLocation sixth_loc = (IASTFileLocation) nodeLocations[5];
+            assertEquals( 1, sixth_loc.getNodeLength() );
+            IASTMacroExpansionLocation seventh_loc = (IASTMacroExpansionLocation) nodeLocations[6];
+            assertEqualsMacros( seventh_loc.getExpansion().getMacroDefinition(), C_PO );
+            IASTFileLocation eighth_loc = (IASTFileLocation) nodeLocations[7];
+            assertEquals( 1, eighth_loc.getNodeLength() );
+            IASTMacroExpansionLocation ninth_loc = (IASTMacroExpansionLocation) nodeLocations[8];
+            assertEqualsMacros( ninth_loc.getExpansion().getMacroDefinition(), V );
+            IASTFileLocation tenth_loc = (IASTFileLocation) nodeLocations[9];
+            assertEquals( 1, tenth_loc.getNodeLength() );
+
+            final IASTFileLocation flatLocation = var.getFileLocation();
+            assertNotNull( flatLocation);
+            assertEquals( code.indexOf("XYZ IT C_PO C_PO V;"), flatLocation.getNodeOffset() ); //$NON-NLS-1$
+            assertEquals( "XYZ IT C_PO C_PO V;".length(), flatLocation.getNodeLength() ); //$NON-NLS-1$
+
+            
+        }        
+    }
+    
+    public void testStdioBug() throws ParserException
+    {
+        StringBuffer buffer = new StringBuffer( "#define    _PTR        void *\n"); //$NON-NLS-1$
+        buffer.append( "#define __cdecl __attribute__ ((__cdecl__))\n" ); //$NON-NLS-1$
+        buffer.append( "#define _EXFUN(name, proto)     __cdecl name proto\n"); //$NON-NLS-1$
+        buffer.append( "_PTR     _EXFUN(memchr,(const _PTR, int, size_t));\n"); //$NON-NLS-1$
+        String code = buffer.toString();
+        
+        for(int i = 0; i < languages.length; i++) {
+            IASTTranslationUnit tu = parse(code, languages[i], true, true);
+            final IASTPreprocessorMacroDefinition[] macroDefinitions = tu.getMacroDefinitions();
+            IASTPreprocessorObjectStyleMacroDefinition _PTR = (IASTPreprocessorObjectStyleMacroDefinition) macroDefinitions[0];
+            IASTPreprocessorFunctionStyleMacroDefinition _EXFUN = (IASTPreprocessorFunctionStyleMacroDefinition) macroDefinitions[2];
+            IASTSimpleDeclaration memchr = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+            IASTNodeLocation [] locations = memchr.getNodeLocations();
+            assertEquals( locations.length, 4 );
+            IASTMacroExpansionLocation loc_1 = (IASTMacroExpansionLocation) locations[0];
+            assertEqualsMacros( _PTR, loc_1.getExpansion().getMacroDefinition() );
+            IASTFileLocation loc_2 = (IASTFileLocation) locations[1];
+            assertEquals( loc_2.getNodeOffset(), code.indexOf( "     _EXFUN(")); //$NON-NLS-1$
+            assertEquals( loc_2.getNodeLength(), "     ".length() ); //$NON-NLS-1$
+            IASTMacroExpansionLocation loc_3 = (IASTMacroExpansionLocation) locations[2];
+            assertEqualsMacros( _EXFUN, loc_3.getExpansion().getMacroDefinition() );
+            IASTFileLocation loc_4 = (IASTFileLocation) locations[3];
+            assertEquals( loc_4.getNodeOffset(), code.indexOf( ";")); //$NON-NLS-1$
+            assertEquals( loc_4.getNodeLength(), 1 );
+            IASTFileLocation flat = memchr.getFileLocation();
+            assertEquals( flat.getNodeOffset() , code.indexOf( "_PTR     _EXFUN(memchr,(const _PTR, int, size_t));")); //$NON-NLS-1$
+            assertEquals( flat.getNodeLength(), "_PTR     _EXFUN(memchr,(const _PTR, int, size_t));".length() ); //$NON-NLS-1$
+            
+            IASTDeclarator d = memchr.getDeclarators()[0];
+            IASTFileLocation f = d.getFileLocation();
+            assertEquals( code.indexOf( "_PTR     _EXFUN(memchr,(const _PTR, int, size_t))"), f.getNodeOffset() ); //$NON-NLS-1$
+            assertEquals( "_PTR     _EXFUN(memchr,(const _PTR, int, size_t))".length(), f.getNodeLength() ); //$NON-NLS-1$
+        }        
+    }
+    
+    private void assertEqualsMacros(IASTPreprocessorMacroDefinition fromExpansion, IASTPreprocessorMacroDefinition source) {
+        assertEquals( fromExpansion.getExpansion(), source.getExpansion() );
+        assertEquals( fromExpansion.getName().toString(), source.getName().toString() );
+    }
+    
+    public void testMacroBindings() throws Exception
+    {
+        StringBuffer buffer = new StringBuffer( "#define ABC def\n"); //$NON-NLS-1$
+        buffer.append( "int ABC;\n"); //$NON-NLS-1$
+        buffer.append( "#undef ABC\n"); //$NON-NLS-1$
+        buffer.append( "#define ABC ghi\n"); //$NON-NLS-1$
+        buffer.append( "int ABC;\n"); //$NON-NLS-1$
+        String code = buffer.toString();
+        for(int i = 0; i < languages.length; i++) {
+            IASTTranslationUnit tu = parse(code, languages[i]);
+            IASTPreprocessorMacroDefinition [] macros = tu.getMacroDefinitions();
+            assertEquals( macros.length, 2 );
+            IASTPreprocessorObjectStyleMacroDefinition ABC1 = (IASTPreprocessorObjectStyleMacroDefinition) macros[0];
+            IASTPreprocessorObjectStyleMacroDefinition ABC2 = (IASTPreprocessorObjectStyleMacroDefinition) macros[1];
+            IMacroBinding binding1 = (IMacroBinding) ABC1.getName().resolveBinding();
+            assertNotNull( binding1 );
+            IMacroBinding binding2 = (IMacroBinding) ABC2.getName().resolveBinding();
+            assertNotNull( binding2 );
+            assertNotSame( binding1, binding2 );
+            IASTName [] firstReferences = tu.getReferences( binding1 );
+            IASTName [] firstDeclarations = tu.getDeclarationsInAST( binding1 );
+            assertEquals( firstReferences.length, 2 );
+            assertEquals( firstReferences[0].getPropertyInParent(), IASTPreprocessorMacroExpansion.EXPANSION_NAME );
+            assertEquals( firstReferences[0].getParent().getParent(), tu );
+            assertEquals( firstReferences[1].getPropertyInParent(), IASTPreprocessorStatement.MACRO_NAME );
+            assertTrue( firstReferences[1].getParent() instanceof IASTPreprocessorUndefStatement );
+            assertEquals( firstDeclarations.length, 1 );
+            assertSame( ABC1.getName(), firstDeclarations[0] );
+            IASTName [] secondReferences = tu.getReferences(binding2);
+            IASTName [] secondDeclarations = tu.getDeclarationsInAST( binding2 );
+            assertEquals( 1, secondReferences.length );
+            assertEquals( secondReferences[0].getPropertyInParent(), IASTPreprocessorMacroExpansion.EXPANSION_NAME );
+            assertEquals( secondReferences[0].getParent().getParent(), tu );
+            assertSame( ABC2.getName(), secondDeclarations[0]);
+        }
+    }
+    
+    
+    public void testBug90978() throws Exception {
+        StringBuffer buffer = new StringBuffer( "#define MACRO mm\n"); //$NON-NLS-1$
+        buffer.append( "int MACRO;\n"); //$NON-NLS-1$
+        String code = buffer.toString();
+        for(int i = 0; i < languages.length; i++) {
+            IASTTranslationUnit tu = parse(code, languages[i]);
+            IASTPreprocessorObjectStyleMacroDefinition MACRO = (IASTPreprocessorObjectStyleMacroDefinition) tu.getMacroDefinitions()[0];
+            IASTName macro_name = MACRO.getName();
+            IMacroBinding binding = (IMacroBinding) macro_name.resolveBinding();
+            IASTName [] references = tu.getReferences( binding );
+            assertEquals( references.length, 1 );
+            IASTName reference = references[0];
+            IASTNodeLocation [] nodeLocations = reference.getNodeLocations();
+            assertEquals( nodeLocations.length, 1 );
+            assertTrue( nodeLocations[0] instanceof IASTFileLocation );
+            IASTFileLocation loc = (IASTFileLocation) nodeLocations[0];
+            assertEquals( code.indexOf( "int MACRO") + "int ".length(), loc.getNodeOffset() ); //$NON-NLS-1$ //$NON-NLS-2$
+            assertEquals( "MACRO".length(), loc.getNodeLength() ); //$NON-NLS-1$
+        }
+    }
+    
+    public void testBug94933() throws Exception {
+        StringBuffer buffer = new StringBuffer( "#define API extern\n" ); //$NON-NLS-1$
+        buffer.append( "#define MYAPI API\n"); //$NON-NLS-1$
+        buffer.append( "MYAPI void func() {}" ); //$NON-NLS-1$
+        String code = buffer.toString();
+        for(int i = 0; i < languages.length; i++) {
+            IASTTranslationUnit tu = parse(code, languages[i]);
+            IASTFunctionDefinition f = (IASTFunctionDefinition) tu.getDeclarations()[0];
+            assertNotNull( f.getFileLocation() ); 
+        }
+    }
+
+    public void testFunctionMacroExpansionWithNameSubstitution_Bug173637() throws Exception
+    {
+        StringBuffer buffer = new StringBuffer( "#define PLUS5(x) (x+5)\n"); //$NON-NLS-1$
+        buffer.append( "#define FUNCTION PLUS5 \n"); //$NON-NLS-1$
+        buffer.append( "int var= FUNCTION(1);"); //$NON-NLS-1$
+        String code = buffer.toString();
+        
+        for(int i = 0; i < languages.length; i++) {
+            IASTTranslationUnit tu = parse(code, languages[i]);
+            IASTSimpleDeclaration var = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+            IASTInitializerExpression initializer= (IASTInitializerExpression)var.getDeclarators()[0].getInitializer();
+            IASTExpression expr= initializer.getExpression();
+            assertNotNull(expr.getFileLocation()); 
+            IASTNodeLocation [] locations = expr.getNodeLocations();
+            assertEquals(1, locations.length);
+            IASTMacroExpansionLocation macroExpansion = (IASTMacroExpansionLocation) locations[0];
+            IASTNodeLocation[] expLocations= macroExpansion.getExpansion().getNodeLocations();
+            assertEquals(1, expLocations.length);
+            assertEquals(code.indexOf("FUNCTION(1)"), expLocations[0].getNodeOffset());
+            assertEquals("FUNCTION(1)".length(), expLocations[0].getNodeLength());
+        }
+    }
+    
+    
+    private void assertMacroLocation(IASTDeclaration decl, int index, int length) {
+    	IASTSimpleDeclaration var = (IASTSimpleDeclaration) decl;
+        IASTInitializerExpression initializer= (IASTInitializerExpression)var.getDeclarators()[0].getInitializer();
+        IASTExpression expr= initializer.getExpression();
+        assertNotNull(expr.getFileLocation()); 
+        IASTNodeLocation [] locations = expr.getNodeLocations();
+        assertEquals(1, locations.length);
+        IASTMacroExpansionLocation macroExpansion = (IASTMacroExpansionLocation) locations[0];
+        IASTNodeLocation[] expLocations= macroExpansion.getExpansion().getNodeLocations();
+        assertEquals(1, expLocations.length);
+        IASTFileLocation fileLocation = expLocations[0].asFileLocation();
+        assertEquals(index, fileLocation.getNodeOffset());
+        assertEquals(length, fileLocation.getNodeLength());
+    }
+    
+    private void assertExpressionLocation(IASTDeclaration decl, int index, int length) {
+    	IASTSimpleDeclaration var = (IASTSimpleDeclaration) decl;
+    	IASTInitializerExpression initializer= (IASTInitializerExpression)var.getDeclarators()[0].getInitializer();
+        IASTExpression expr= initializer.getExpression();
+        IASTFileLocation fileLocation = expr.getFileLocation();
+        assertNotNull(fileLocation); 
+        assertEquals(index, fileLocation.getNodeOffset());
+        assertEquals(length, fileLocation.getNodeLength());
+    }
+    
+    
+    public void testBug186257() throws Exception {
+        StringBuffer sb = new StringBuffer();
+        sb.append("typedef char STR; \n"); //$NON-NLS-1$
+        sb.append("#define Nullstr Null(STR*) \n"); //$NON-NLS-1$
+        sb.append("#define Null(x) ((x)NULL) \n"); //$NON-NLS-1$
+        sb.append("int x = Nullstr; \n"); //$NON-NLS-1$
+        sb.append("int y = whatever; \n"); //$NON-NLS-1$
+        String code = sb.toString();
+
+        for(int i = 0; i < languages.length; i++) {
+	        IASTTranslationUnit tu = parse(code, languages[i]);
+	        IASTDeclaration[] decls = tu.getDeclarations();
+	        assertMacroLocation(decls[1], code.indexOf("Nullstr;"), "Nullstr".length()); //$NON-NLS-1$ //$NON-NLS-2$
+	        assertExpressionLocation(decls[2], code.indexOf("whatever;"), "whatever".length()); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+    }
+    
+    
+    public void testArgumentExpansion() throws Exception {
+    	StringBuffer sb = new StringBuffer();
+    	sb.append("#define ADD(a,b, c) (a) + (b) + (c) \n"); //$NON-NLS-1$
+    	sb.append("#define ONEYONENOE 111111   \n"); //$NON-NLS-1$
+    	sb.append("#define TWO 2 \n"); //$NON-NLS-1$
+    	sb.append("#define THREE 3 \n"); //$NON-NLS-1$
+    	sb.append("int x = ADD(ONEYONENOE,TWO,  THREE); \n"); //$NON-NLS-1$
+    	sb.append("int y = whatever; \n"); //$NON-NLS-1$
+    	String code = sb.toString();
+    	
+    	for(int i = 0; i < languages.length; i++) {
+	    	IASTTranslationUnit tu = parse(code, languages[i]);
+	        IASTDeclaration[] decls = tu.getDeclarations();
+	        assertMacroLocation(decls[0], code.indexOf("ADD(ONEYONENOE,TWO,  THREE)"), "ADD(ONEYONENOE,TWO,  THREE)".length()); //$NON-NLS-1$ //$NON-NLS-2$
+	        assertExpressionLocation(decls[1], code.indexOf("whatever;"), "whatever".length()); //$NON-NLS-1$ //$NON-NLS-2$
+    	}
+    }
+    
+    
+    public void testArgumentCapture() throws Exception {
+    	StringBuffer sb = new StringBuffer();
+    	sb.append("#define add(x,y) x + y \n"); //$NON-NLS-1$
+    	sb.append("#define add2 add(x,   \n"); //$NON-NLS-1$
+    	sb.append("int x = add2 z); \n"); //$NON-NLS-1$
+    	sb.append("int y = whatever; \n"); //$NON-NLS-1$
+    	String code = sb.toString();
+    	
+    	for(int i = 0; i < languages.length; i++) {
+	    	IASTTranslationUnit tu = parse(code, languages[i]);
+	        IASTDeclaration[] decls = tu.getDeclarations();
+	        assertMacroLocation(decls[0], code.indexOf("add2 z);"), "add2 z)".length()); //$NON-NLS-1$ //$NON-NLS-2$
+	        assertExpressionLocation(decls[1], code.indexOf("whatever;"), "whatever".length()); //$NON-NLS-1$ //$NON-NLS-2$
+    	}
+    }
+    
+    
+    public void testFunctionMacroNotCalled() throws Exception {
+    	StringBuffer sb = new StringBuffer();
+    	sb.append("#define FUNCTION(x) x \n"); //$NON-NLS-1$
+    	sb.append("#define YO FUNCTION \n"); //$NON-NLS-1$
+    	sb.append("int x = YO; \n"); //$NON-NLS-1$
+    	sb.append("int y = whatever; \n"); //$NON-NLS-1$
+    	String code = sb.toString();
+    	
+    	for(int i = 0; i < languages.length; i++) {
+	    	IASTTranslationUnit tu = parse(code, languages[i]);
+	        IASTDeclaration[] decls = tu.getDeclarations();
+	        assertMacroLocation(decls[0], code.indexOf("YO;"), "YO".length()); //$NON-NLS-1$ //$NON-NLS-2$
+	        assertExpressionLocation(decls[1], code.indexOf("whatever;"), "whatever".length()); //$NON-NLS-1$ //$NON-NLS-2$
+    	}
+    }
+    
+    public void testBuildFunctionMacroName() throws Exception {
+    	StringBuffer sb = new StringBuffer();
+    	sb.append("#define FUN1(x) x \n"); //$NON-NLS-1$
+    	sb.append("#define FUN1(x) x \n"); //$NON-NLS-1$
+    	sb.append("#define MAKEFUN(num) FUN ## num \n"); //$NON-NLS-1$
+    	sb.append("int x = MAKEFUN(1)(z); \n"); //$NON-NLS-1$
+    	sb.append("int y = whatever; \n"); //$NON-NLS-1$
+    	String code = sb.toString();
+    	
+    	for(int i = 0; i < languages.length; i++) {
+	    	IASTTranslationUnit tu = parse(code, languages[i]);
+	        IASTDeclaration[] decls = tu.getDeclarations();
+	        assertMacroLocation(decls[0], code.indexOf("MAKEFUN(1)(z);"), "MAKEFUN(1)(z)".length()); //$NON-NLS-1$ //$NON-NLS-2$
+	        assertExpressionLocation(decls[1], code.indexOf("whatever;"), "whatever".length()); //$NON-NLS-1$ //$NON-NLS-2$
+    	}
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationTests.java
new file mode 100644
index 0000000..a03b087
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMLocationTests.java
@@ -0,0 +1,684 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
+import org.eclipse.cdt.core.dom.ast.IASTCastExpression;
+import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
+import org.eclipse.cdt.core.dom.ast.IASTConditionalExpression;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarationStatement;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionStatement;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IASTForStatement;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionStyleMacroParameter;
+import org.eclipse.cdt.core.dom.ast.IASTIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTIfStatement;
+import org.eclipse.cdt.core.dom.ast.IASTInitializer;
+import org.eclipse.cdt.core.dom.ast.IASTInitializerExpression;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTNodeLocation;
+import org.eclipse.cdt.core.dom.ast.IASTNullStatement;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorEndifStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorFunctionStyleMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIfndefStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorObjectStyleMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorUndefStatement;
+import org.eclipse.cdt.core.dom.ast.IASTProblem;
+import org.eclipse.cdt.core.dom.ast.IASTReturnStatement;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorChainInitializer;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionWithTryBlock;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLinkageSpecification;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamedTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNewExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateId;
+import org.eclipse.cdt.core.parser.IProblem;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+/**
+ * @author jcamelon
+ */
+public class DOMLocationTests extends AST2BaseTest {
+
+    public DOMLocationTests() {
+	}
+
+	private static final String _TEXT_ = "<text>"; //$NON-NLS-1$
+
+	public DOMLocationTests(String name) {
+		setName(name);
+	}
+
+    public static TestSuite suite() {
+    	return suite(DOMLocationTests.class);
+    }
+
+	public void testBaseCase() throws ParserException {
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse("int x;", p); //$NON-NLS-1$
+            IASTDeclaration declaration = tu.getDeclarations()[0];
+            IASTNodeLocation[] nodeLocations = declaration.getNodeLocations();
+            assertNotNull(nodeLocations);
+            assertEquals(nodeLocations.length, 1);
+            assertTrue(nodeLocations[0] instanceof IASTFileLocation);
+            IASTFileLocation fileLocation = ((IASTFileLocation) nodeLocations[0]);
+            assertEquals(fileLocation.getFileName(), _TEXT_); 
+            assertEquals(fileLocation.getNodeOffset(), 0);
+            assertEquals(fileLocation.getNodeLength(), 6);
+            IASTNodeLocation[] tuLocations = tu.getNodeLocations();
+            assertEquals(tuLocations.length, nodeLocations.length);
+            assertEquals(fileLocation.getFileName(), ((IASTFileLocation) tuLocations[0]).getFileName()); 
+            assertEquals(fileLocation.getNodeOffset(), tuLocations[0].getNodeOffset());
+            assertEquals(fileLocation.getNodeLength(), tuLocations[0].getNodeLength());
+        }
+    }
+
+    public void testSimpleDeclaration() throws ParserException {
+        String code = "int xLen5, * yLength8, zLength16( int );"; //$NON-NLS-1$
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p);
+            IASTDeclaration[] declarations = tu.getDeclarations();
+            assertEquals(declarations.length, 1);
+            IASTSimpleDeclaration declaration = (IASTSimpleDeclaration) declarations[0];
+            IASTNodeLocation[] nodeLocations = declaration.getNodeLocations();
+            assertNotNull(nodeLocations);
+            assertEquals(nodeLocations.length, 1);
+            assertTrue(nodeLocations[0] instanceof IASTFileLocation);
+            IASTFileLocation fileLocation = ((IASTFileLocation) nodeLocations[0]);
+            assertEquals(fileLocation.getFileName(), _TEXT_); 
+            assertEquals(fileLocation.getNodeOffset(), 0);
+            assertEquals(fileLocation.getNodeLength(), code.indexOf(";") + 1); //$NON-NLS-1$
+            IASTDeclarator[] declarators = declaration.getDeclarators();
+            assertEquals(declarators.length, 3);
+            for (int i = 0; i < 3; ++i) {
+                IASTDeclarator declarator = declarators[i];
+                switch (i) {
+                case 0:
+                    assertSoleLocation(declarator, code.indexOf("xLen5"), "xLen5".length()); //$NON-NLS-1$ //$NON-NLS-2$
+                    break;
+                case 1:
+                    assertSoleLocation(declarator, code.indexOf("* yLength8"), "* yLength8".length()); //$NON-NLS-1$ //$NON-NLS-2$
+                    break;
+                case 2:
+                    assertSoleLocation(declarator, code.indexOf("zLength16( int )"), "zLength16( int )".length()); //$NON-NLS-1$ //$NON-NLS-2$
+                    break;
+                }
+            }
+
+        }
+    }
+
+    public void testSimpleObjectStyleMacroDefinition() throws Exception {
+        String code = "/* hi */\n#define FOOT 0x01\n\n"; //$NON-NLS-1$
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p);
+            IASTDeclaration[] declarations = tu.getDeclarations();
+            assertEquals(declarations.length, 0);
+            IASTPreprocessorMacroDefinition[] macros = tu.getMacroDefinitions();
+            assertNotNull(macros);
+            assertEquals(macros.length, 1);
+            assertSoleLocation(macros[0], code.indexOf("#"), code.indexOf("0x01") + 4 - code.indexOf("#")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            assertTrue(macros[0] instanceof IASTPreprocessorObjectStyleMacroDefinition);
+            assertEquals(macros[0].getName().toString(), "FOOT"); //$NON-NLS-1$
+            assertEquals(macros[0].getExpansion(), "0x01"); //$NON-NLS-1$
+        }
+    }
+
+    public void testSimpleFunctionStyleMacroDefinition() throws Exception {
+        String code = "#define FOOBAH( WOOBAH ) JOHN##WOOBAH\n\n"; //$NON-NLS-1$
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p);
+            IASTDeclaration[] declarations = tu.getDeclarations();
+            assertEquals(declarations.length, 0);
+            IASTPreprocessorMacroDefinition[] macros = tu.getMacroDefinitions();
+            assertNotNull(macros);
+            assertEquals(macros.length, 1);
+            assertTrue(macros[0] instanceof IASTPreprocessorFunctionStyleMacroDefinition);
+            assertSoleLocation(macros[0], code.indexOf("#define"), code.indexOf("##WOOBAH") + 8 - code.indexOf("#define")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$s
+            assertEquals(macros[0].getName().toString(), "FOOBAH"); //$NON-NLS-1$
+            assertEquals(macros[0].getExpansion(), "JOHN##WOOBAH"); //$NON-NLS-1$
+            IASTFunctionStyleMacroParameter[] parms = ((IASTPreprocessorFunctionStyleMacroDefinition) macros[0]).getParameters();
+            assertNotNull(parms);
+            assertEquals(parms.length, 1);
+            assertEquals(parms[0].getParameter(), "WOOBAH"); //$NON-NLS-1$
+        }
+
+    }
+
+    /**
+     * @param declarator
+     * @param offset
+     * @param length
+     */
+    private void assertSoleLocation(IASTNode n, int offset, int length) {
+    	assertEquals(length, ((ASTNode)n).getLength());
+        IASTNodeLocation[] locations = n.getNodeLocations();
+        assertEquals(1, locations.length);
+        IASTNodeLocation nodeLocation = locations[0];
+        assertEquals(offset, nodeLocation.getNodeOffset());
+        assertEquals(length, nodeLocation.getNodeLength());
+    }
+
+    private void assertFileLocation(IASTNode n, int offset, int length) {
+        IASTNodeLocation location = n.getFileLocation();
+        assertEquals(offset, location.getNodeOffset());
+        assertEquals(length, location.getNodeLength());
+    }
+
+    public void testBug83664() throws Exception {
+        String code = "int foo(x) int x; {\n 	return x;\n   }\n"; //$NON-NLS-1$
+        IASTTranslationUnit tu = parse(code, ParserLanguage.C, true);
+        IASTDeclaration[] declarations = tu.getDeclarations();
+        assertEquals(declarations.length, 1);
+        IASTFunctionDefinition definition = (IASTFunctionDefinition) declarations[0];
+        IASTFunctionDeclarator declarator = definition.getDeclarator();
+        assertSoleLocation(declarator, code.indexOf("foo"), code.indexOf("int x;") + 6 - code.indexOf("foo")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        IASTCompoundStatement body = (IASTCompoundStatement) definition.getBody();
+        assertEquals(body.getStatements().length, 1);
+        IASTReturnStatement returnStatement = (IASTReturnStatement) body.getStatements()[0];
+        IASTIdExpression expression = (IASTIdExpression) returnStatement.getReturnValue();
+        assertSoleLocation(expression, code.indexOf("return ") + "return ".length(), 1); //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    public void testBug84343() throws Exception {
+        String code = "class A {}; int f() {\nA * b = 0;\nreturn b;}"; //$NON-NLS-1$
+        IASTTranslationUnit tu = parse(code, ParserLanguage.CPP);
+        IASTFunctionDefinition f = (IASTFunctionDefinition) tu.getDeclarations()[1];
+        IASTDeclarationStatement ds = (IASTDeclarationStatement) ((IASTCompoundStatement) f.getBody()).getStatements()[0];
+        IASTSimpleDeclaration b = (IASTSimpleDeclaration) ds.getDeclaration();
+        ICPPASTNamedTypeSpecifier namedTypeSpec = (ICPPASTNamedTypeSpecifier) b.getDeclSpecifier();
+        assertSoleLocation(namedTypeSpec, code.indexOf("\nA") + 1, 1); //$NON-NLS-1$
+    }
+
+    public void testBug84366() throws Exception {
+        String code = "enum hue { red, blue, green };"; //$NON-NLS-1$
+        IASTTranslationUnit tu = parse(code, ParserLanguage.CPP);
+        IASTSimpleDeclaration d = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+        IASTEnumerationSpecifier enumeration = (IASTEnumerationSpecifier) d.getDeclSpecifier();
+        IASTEnumerationSpecifier.IASTEnumerator enumerator = enumeration.getEnumerators()[0];
+        assertSoleLocation(enumerator, code.indexOf("red"), "red".length()); //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    public void testBug84375() throws Exception {
+        String code = "class D { public: int x; };\nclass C : public virtual D {};"; //$NON-NLS-1$
+        IASTTranslationUnit tu = parse(code, ParserLanguage.CPP);
+        IASTSimpleDeclaration d2 = (IASTSimpleDeclaration) tu.getDeclarations()[1];
+        ICPPASTCompositeTypeSpecifier classSpec = (ICPPASTCompositeTypeSpecifier) d2.getDeclSpecifier();
+        ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier [] bases = classSpec.getBaseSpecifiers();
+        assertSoleLocation(bases[0], code.indexOf("public virtual D"), "public virtual D".length()); //$NON-NLS-1$ //$NON-NLS-2$
+
+    }
+
+    public void testBug84357() throws Exception {
+        String code = "class X {	int a;\n};\nint X::  * pmi = &X::a;"; //$NON-NLS-1$
+        IASTTranslationUnit tu = parse(code, ParserLanguage.CPP);
+        IASTSimpleDeclaration pmi = (IASTSimpleDeclaration) tu.getDeclarations()[1];
+        IASTDeclarator d = pmi.getDeclarators()[0];
+        IASTPointerOperator p = d.getPointerOperators()[0];
+        assertSoleLocation(p, code.indexOf("X::  *"), "X::  *".length()); //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    public void testBug84367() throws Exception {
+        String code = "void foo(   int   );"; //$NON-NLS-1$
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p);
+            IASTSimpleDeclaration definition = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+            IASTStandardFunctionDeclarator declarator = (IASTStandardFunctionDeclarator) definition.getDeclarators()[0];
+            IASTParameterDeclaration parameter = declarator.getParameters()[0];
+            assertSoleLocation(parameter, code.indexOf("int"), 3); //$NON-NLS-1$
+        }
+    }
+
+    public void testElaboratedTypeSpecifier() throws ParserException {
+        String code = "/* blah */ struct A anA; /* blah */"; //$NON-NLS-1$
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p);
+            IASTSimpleDeclaration declaration = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+            IASTElaboratedTypeSpecifier elabType = (IASTElaboratedTypeSpecifier) declaration.getDeclSpecifier();
+            assertSoleLocation(elabType, code.indexOf("struct"), "struct A".length()); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+    }
+
+    public void testBug83852() throws Exception {
+        String code = "/* blah */ typedef short jc;  int x = 4;  jc myJc = (jc)x; "; //$NON-NLS-1$
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p);
+            IASTDeclaration[] declarations = tu.getDeclarations();
+            assertEquals(3, declarations.length);
+            for (int i = 0; i < 3; ++i) {
+                IASTSimpleDeclaration decl = (IASTSimpleDeclaration) declarations[i];
+                int start = 0, length = 0;
+                switch (i) {
+                case 0:
+                    start = code.indexOf("typedef"); //$NON-NLS-1$
+                    length = "typedef short jc;".length(); //$NON-NLS-1$
+                    break;
+                case 1:
+                    start = code.indexOf("int x = 4;"); //$NON-NLS-1$
+                    length = "int x = 4;".length(); //$NON-NLS-1$
+                    break;
+                case 2:
+                    start = code.indexOf("jc myJc = (jc)x;"); //$NON-NLS-1$
+                    length = "jc myJc = (jc)x;".length(); //$NON-NLS-1$
+                    break;
+                }
+                assertSoleLocation(decl, start, length);
+            }
+            IASTInitializerExpression initializer = (IASTInitializerExpression) ((IASTSimpleDeclaration) declarations[2])
+                    .getDeclarators()[0].getInitializer();
+            IASTCastExpression castExpression = (IASTCastExpression) initializer.getExpression();
+            IASTTypeId typeId = castExpression.getTypeId();
+            assertSoleLocation(typeId, code.indexOf("(jc)") + 1, "jc".length()); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+    }
+
+    public void testBug83853() throws ParserException {
+        String code = "int f() {return (1?0:1);	}"; //$NON-NLS-1$
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p);
+            IASTFunctionDefinition definition = (IASTFunctionDefinition) tu.getDeclarations()[0];
+            IASTCompoundStatement statement = (IASTCompoundStatement) definition.getBody();
+            IASTReturnStatement returnStatement = (IASTReturnStatement) statement.getStatements()[0];
+            IASTUnaryExpression unaryExpression = (IASTUnaryExpression) returnStatement.getReturnValue();
+            assertEquals(unaryExpression.getOperator(), IASTUnaryExpression.op_bracketedPrimary);
+            IASTConditionalExpression conditional = (IASTConditionalExpression) unaryExpression.getOperand();
+            assertSoleLocation(conditional, code.indexOf("1?0:1"), "1?0:1".length()); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+    }
+
+    public void testBug84374() throws Exception {
+        String code = "class P1 { public: int x; };\nclass P2 { public: int x; };\nclass B : public P1, public P2 {};\nvoid main() {\nB * b = new B();\n}"; //$NON-NLS-1$
+        IASTTranslationUnit tu = parse(code, ParserLanguage.CPP);
+        IASTFunctionDefinition main = (IASTFunctionDefinition) tu.getDeclarations()[3];
+        IASTCompoundStatement statement = (IASTCompoundStatement) main.getBody();
+        IASTDeclarationStatement decl = (IASTDeclarationStatement) statement.getStatements()[0];
+        IASTSimpleDeclaration b = (IASTSimpleDeclaration) decl.getDeclaration();
+        IASTInitializerExpression initializerExpression = (IASTInitializerExpression) b.getDeclarators()[0].getInitializer();
+        assertSoleLocation(initializerExpression,code.indexOf("new B()"), "new B()".length()); //$NON-NLS-1$ //$NON-NLS-2$
+        ICPPASTNewExpression newExpression = (ICPPASTNewExpression) initializerExpression.getExpression();
+        assertSoleLocation(newExpression, code.indexOf("new B()"), "new B()".length()); //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    public void testBug83737() throws Exception {
+        String code = "void f() {  if( a == 0 ) g( a ); else if( a < 0 ) g( a >> 1 ); else if( a > 0 ) g( *(&a + 2) ); }"; //$NON-NLS-1$
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p);
+            IASTFunctionDefinition definition = (IASTFunctionDefinition) tu.getDeclarations()[0];
+            IASTCompoundStatement statement = (IASTCompoundStatement) definition.getBody();
+            IASTIfStatement first_if = (IASTIfStatement) statement.getStatements()[0];
+            IASTIfStatement second_if = (IASTIfStatement) first_if.getElseClause();
+            IASTIfStatement third_if = (IASTIfStatement) second_if.getElseClause();
+            assertNull(third_if.getElseClause());
+            int first_if_start = code.indexOf("if( a == 0 )"); //$NON-NLS-1$
+            int total_if_length = "if( a == 0 ) g( a ); else if( a < 0 ) g( a >> 1 ); else if( a > 0 ) g( *(&a + 2) );".length(); //$NON-NLS-1$
+            int total_if_end = first_if_start + total_if_length;
+            int second_if_start = code.indexOf("if( a < 0 )"); //$NON-NLS-1$
+            int third_if_start = code.indexOf("if( a > 0 )"); //$NON-NLS-1$
+            assertSoleLocation(first_if, first_if_start, total_if_length);
+            assertSoleLocation(second_if, second_if_start, total_if_end - second_if_start);
+            assertSoleLocation(third_if, third_if_start, total_if_end - third_if_start);
+        }
+    }
+
+    public void testBug84467() throws Exception {
+        String code = "class D { };\n D d1;\n const D d2;\n void foo() {\n typeid(d1) == typeid(d2);\n }"; //$NON-NLS-1$
+        IASTTranslationUnit tu = parse(code, ParserLanguage.CPP);
+        IASTBinaryExpression bexp = (IASTBinaryExpression) ((IASTExpressionStatement) ((IASTCompoundStatement) ((IASTFunctionDefinition) tu
+                .getDeclarations()[3]).getBody()).getStatements()[0]).getExpression();
+        IASTUnaryExpression exp = (IASTUnaryExpression) ((IASTBinaryExpression) ((IASTExpressionStatement) ((IASTCompoundStatement) ((IASTFunctionDefinition) tu
+                .getDeclarations()[3]).getBody()).getStatements()[0])
+                .getExpression()).getOperand1();
+
+        assertSoleLocation(bexp, code.indexOf("typeid(d1) == typeid(d2)"), "typeid(d1) == typeid(d2)".length()); //$NON-NLS-1$ //$NON-NLS-2$
+        assertSoleLocation(exp, code.indexOf("typeid(d1)"), "typeid(d1)".length()); //$NON-NLS-1$ //$NON-NLS-2$
+        exp = (IASTUnaryExpression) ((IASTBinaryExpression) ((IASTExpressionStatement) ((IASTCompoundStatement) ((IASTFunctionDefinition) tu
+                .getDeclarations()[3]).getBody()).getStatements()[0]).getExpression()).getOperand2();
+        assertSoleLocation(exp, code.indexOf("typeid(d2)"), "typeid(d2)".length()); //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    public void testBug84576() throws Exception {
+        String code = "namespace A {\n extern \"C\" int g();\n }"; //$NON-NLS-1$
+        IASTTranslationUnit tu = parse(code, ParserLanguage.CPP);
+        ICPPASTLinkageSpecification spec = (ICPPASTLinkageSpecification) ((ICPPASTNamespaceDefinition) tu.getDeclarations()[0]).getDeclarations()[0];
+        assertSoleLocation(spec, code.indexOf("extern \"C\""), "extern \"C\" int g();".length()); //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    public void testSimplePreprocessorStatements() throws Exception
+    {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "#ifndef _APPLE_H_\n"); //$NON-NLS-1$
+        buffer.append( "#define _APPLE_H_\n"); //$NON-NLS-1$
+        buffer.append( "#undef _APPLE_H_\n"); //$NON-NLS-1$
+        buffer.append( "#endif\n"); //$NON-NLS-1$
+        String code = buffer.toString();
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p);
+            assertEquals( tu.getDeclarations().length, 0 );
+            IASTPreprocessorStatement [] statements = tu.getAllPreprocessorStatements();
+            assertEquals( statements.length, 4 );
+            IASTPreprocessorIfndefStatement ifndef = (IASTPreprocessorIfndefStatement) statements[0];
+            assertTrue( ifndef.taken() );
+            assertSoleLocation( ifndef, code.indexOf( "#ifndef _APPLE_H_"), "#ifndef _APPLE_H_".length() ); //$NON-NLS-1$ //$NON-NLS-2$
+            IASTPreprocessorObjectStyleMacroDefinition definition = (IASTPreprocessorObjectStyleMacroDefinition) statements[1];
+            assertSoleLocation( definition, code.indexOf( "#define _APPLE_H_"), "#define _APPLE_H_".length() ); //$NON-NLS-1$ //$NON-NLS-2$
+            IASTPreprocessorUndefStatement undef = (IASTPreprocessorUndefStatement) statements[2];
+            assertSoleLocation( undef, code.indexOf("#undef _APPLE_H_"), "#undef _APPLE_H_".length() ); //$NON-NLS-1$ //$NON-NLS-2$
+            IASTPreprocessorEndifStatement endif = (IASTPreprocessorEndifStatement) statements[3];
+            assertSoleLocation( endif, code.indexOf( "#endif"), "#endif".length() ); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+    }
+    
+    public void testBug162180() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "#include <notfound.h>\n"); //$NON-NLS-1$
+        buffer.append( "int x;\n"); //$NON-NLS-1$
+        String code = buffer.toString();
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p, false, false);
+            IASTDeclaration[] decls= tu.getDeclarations();
+            assertEquals( decls.length, 1 );
+            IASTPreprocessorStatement [] statements = tu.getAllPreprocessorStatements();
+            assertEquals( statements.length, 1 );
+            IASTProblem[] problems = tu.getPreprocessorProblems();
+            assertEquals( problems.length, 1 );
+            assertSoleLocation( decls[0], code, "int x;");  
+        }
+    }
+
+	private void assertSoleLocation(IASTNode node, String code, String snip) {
+		assertSoleLocation(node, code.indexOf(snip), snip.length());
+	}
+
+	private void assertFileLocation(IASTNode node, String code, String snip) {
+		assertFileLocation(node, code.indexOf(snip), snip.length());
+	}
+
+    public void testBug162180_0() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "#include <notfound.h>\n"); //$NON-NLS-1$
+        buffer.append( "#include <notfound1.h> \r\n"); //$NON-NLS-1$
+        buffer.append( "#include <notfound2.h>  // more stuff \n"); //$NON-NLS-1$
+        buffer.append( "int x;\n"); //$NON-NLS-1$
+        String code = buffer.toString();
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p, false, false);
+            IASTDeclaration[] decls= tu.getDeclarations();
+            IASTPreprocessorStatement [] statements = tu.getAllPreprocessorStatements();
+            IASTProblem[] problems = tu.getPreprocessorProblems();
+            assertEquals( 1, decls.length);
+            assertEquals( 3, statements.length);
+            assertEquals( 3, problems.length);
+            String snip= "<notfound.h>";
+            assertSoleLocation(statements[0], code, "#include <notfound.h>");
+            assertSoleLocation(statements[1], code, "#include <notfound1.h>");
+            assertSoleLocation(statements[2], code, "#include <notfound2.h>");
+            assertSoleLocation(decls[0], code, "int x;");
+        }
+    }
+
+    public void test162180_1() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "#define xxx(!) int a\n"); // [0-20]
+        buffer.append( "int x;\n"); 			  // [21-27]
+        buffer.append( "int x\\i;\n"); 			  // [28-36]
+        buffer.append( "int x2;\n"); 			  // [37-44]
+        String code = buffer.toString();
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p, false, false);
+            IASTDeclaration[] decls= tu.getDeclarations();
+            IASTPreprocessorStatement [] statements = tu.getAllPreprocessorStatements();
+            IASTProblem[] problems = tu.getPreprocessorProblems();
+            assertEquals( 3, decls.length);
+            assertEquals( 0, statements.length);
+            assertEquals( 2, problems.length);
+            assertSoleLocation(problems[0], code, "xxx(!");
+            assertSoleLocation( decls[0], code, "int x;"); 
+            assertSoleLocation( problems[1], code, "\\"); 
+            assertFileLocation( decls[1], code, "int x\\i;"); 
+            assertSoleLocation( decls[2], code, "int x2;"); 
+        }
+    }
+
+    public void test162180_2() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "#define ! x\n"); 
+        buffer.append( "int x;\n"); 			  
+        String code = buffer.toString();
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p, false, false);
+            IASTDeclaration[] decls= tu.getDeclarations();
+            IASTPreprocessorStatement [] statements = tu.getAllPreprocessorStatements();
+            IASTProblem[] problems = tu.getPreprocessorProblems();
+            assertEquals( 1, decls.length);
+            assertEquals( 0, statements.length);
+            assertEquals( 1, problems.length);
+            assertSoleLocation(problems[0], code, "!");
+            assertSoleLocation( decls[0], code, "int x;"); 
+        }
+    }
+
+    public void test162180_3() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "#define nix(x) x\n"); 
+        buffer.append( "nix(y,z);");
+        buffer.append( "int x;\n"); 			  
+        String code = buffer.toString();
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p, false, false);
+            IASTDeclaration[] decls= tu.getDeclarations();
+            IASTPreprocessorStatement [] statements = tu.getAllPreprocessorStatements();
+            IASTProblem[] problems = tu.getPreprocessorProblems();
+            assertEquals( 2, decls.length);
+            assertEquals( 1, statements.length);
+            assertEquals( 1, problems.length);
+            assertSoleLocation(problems[0], code, "nix(y,");
+            assertSoleLocation( decls[1], code, "int x;"); 
+        }
+    }
+
+    public void test162180_4() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "#include \"\"\n"); 
+        buffer.append( "#else\n"); 
+        buffer.append( "int x;\n"); 			  
+        String code = buffer.toString();
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p, false, false);
+            IASTDeclaration[] decls= tu.getDeclarations();
+            IASTProblem[] problems = tu.getPreprocessorProblems();
+            assertEquals( 1, decls.length);
+            assertEquals( 2, problems.length);
+            assertSoleLocation(problems[0], code, "#include \"\"");
+            assertSoleLocation(problems[1], code, "#else");
+            assertSoleLocation( decls[0], code, "int x;"); 
+        }
+    }
+
+    public void testBug85820() throws Exception {
+		String code = "int *p = (int []){2, 4};"; //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( code, ParserLanguage.C );
+		IASTSimpleDeclaration sd = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+		IASTDeclarator d = sd.getDeclarators()[0];
+		assertSoleLocation( d, code.indexOf("*p = (int []){2, 4}"), "*p = (int []){2, 4}".length() );  //$NON-NLS-1$//$NON-NLS-2$
+	}
+    
+    public void testBug86323() throws Exception {
+		String code = "void f() { int i=0;	for (; i<10; i++) {	} }"; //$NON-NLS-1$
+        for (ParserLanguage p : ParserLanguage.values()) {
+            IASTTranslationUnit tu = parse(code, p);
+            IASTForStatement for_stmt = (IASTForStatement) ((IASTCompoundStatement)((IASTFunctionDefinition)tu.getDeclarations()[0]).getBody()).getStatements()[1];
+            assertTrue( for_stmt.getInitializerStatement() instanceof IASTNullStatement );
+        }
+	}
+	
+    public void testBug86698_1() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+        buffer.append( "struct C;\n"); //$NON-NLS-1$
+		buffer.append( "void no_opt(C*);\n"); //$NON-NLS-1$
+		buffer.append( "struct C {\n"); //$NON-NLS-1$
+		buffer.append( "int c;\n"); //$NON-NLS-1$
+		buffer.append( "C() : c(0) { no_opt(this); }\n"); //$NON-NLS-1$
+		buffer.append( "};\n"); //$NON-NLS-1$
+		
+        IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP);
+		final ICPPASTCompositeTypeSpecifier ct= getCompositeType(tu, 2);
+		final ICPPASTFunctionDefinition fdef = getDeclaration(ct, 1);
+		ICPPASTFunctionDeclarator funC = (ICPPASTFunctionDeclarator) fdef.getDeclarator();
+		assertSoleLocation( funC, buffer.toString().indexOf("C()"), "C()".length() );  //$NON-NLS-1$//$NON-NLS-2$
+		ICPPASTConstructorChainInitializer memInit= fdef.getMemberInitializers()[0];
+		assertSoleLocation( memInit, buffer.toString().indexOf("c(0)"), "c(0)".length() );  //$NON-NLS-1$//$NON-NLS-2$
+	}
+
+    public void testBug86698_2() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "int f(int);\n"); //$NON-NLS-1$
+		buffer.append( "class C {\n"); //$NON-NLS-1$
+		buffer.append( "int i;\n"); //$NON-NLS-1$
+		buffer.append( "double d;\n"); //$NON-NLS-1$
+		buffer.append( "public:\n"); //$NON-NLS-1$
+		buffer.append( "C(int, double);\n"); //$NON-NLS-1$
+		buffer.append( "};\n"); //$NON-NLS-1$
+		buffer.append( "C::C(int ii, double id)\n"); //$NON-NLS-1$
+		buffer.append( "try\n"); //$NON-NLS-1$
+		buffer.append( ": i(f(ii)), d(id)\n"); //$NON-NLS-1$
+		buffer.append( "{\n }\n"); //$NON-NLS-1$
+		buffer.append( "catch (...)\n"); //$NON-NLS-1$
+		buffer.append( "{\n }\n"); //$NON-NLS-1$
+		
+        final String code = buffer.toString();
+		IASTTranslationUnit tu = parse(code, ParserLanguage.CPP);
+		final IASTFunctionDefinition fdef = (IASTFunctionDefinition)tu.getDeclarations()[2];
+		assertInstance(fdef, ICPPASTFunctionWithTryBlock.class);
+		assertSoleLocation(fdef.getDeclarator(), code.indexOf("C::C(int ii, double id)"), "C::C(int ii, double id)".length() );  //$NON-NLS-1$//$NON-NLS-2$
+		ICPPASTFunctionWithTryBlock tryblock= ((ICPPASTFunctionWithTryBlock) fdef);
+		assertSoleLocation(tryblock.getCatchHandlers()[0], code.indexOf("catch"), "catch (...)\n{\n }".length());
+	}
+
+    public void testBug157009_1() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("#ifndef A\r\n#error X\r\n#else\r\n#error Y\r\n#endif");
+        IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP, false, false);
+
+        IASTProblem[] problems= tu.getPreprocessorProblems();
+        assertEquals(1, problems.length);
+        assertSoleLocation(problems[0], buffer.indexOf("X"), "X".length() );
+    }	   
+
+    public void testBug157009_2() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("#ifndef A\n#error X\n#else\n#error Y\n#endif");
+        IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP, false, false);
+
+        IASTProblem[] problems= tu.getPreprocessorProblems();
+        assertEquals(1, problems.length);
+        assertSoleLocation(problems[0], buffer.indexOf("X"), "X".length() );
+    }
+
+    public void testBug171520() throws Exception {
+    	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171520
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("int i = sizeof(int);");
+        IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP, false, false);
+        IASTDeclaration[] decls= tu.getDeclarations();
+        assertEquals(1, decls.length);
+        assertSoleLocation(decls[0], 0, buffer.length());
+        assertTrue(decls[0] instanceof IASTSimpleDeclaration);
+        IASTSimpleDeclaration simpleDecl= (IASTSimpleDeclaration)decls[0];
+        IASTDeclarator[] declarators= simpleDecl.getDeclarators();
+        assertEquals(1, declarators.length);
+        IASTInitializer initializer= declarators[0].getInitializer();
+        assertTrue(initializer instanceof IASTInitializerExpression);
+        IASTExpression expr= ((IASTInitializerExpression)initializer).getExpression();
+        assertTrue(expr instanceof IASTTypeIdExpression);
+        assertSoleLocation(expr, buffer.indexOf("sizeof"), "sizeof(int)".length());
+    }
+
+    public void testBug120607() throws Exception {
+ 	   // C/C++ Indexer rejects valid pre-processor directive
+ 	   // https://bugs.eclipse.org/bugs/show_bug.cgi?id=120607
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("#import \"include_once.h\"\n");
+        buffer.append("#warning \"deprecated include\"\n");
+        buffer.append("#line 5\n");
+        buffer.append("# 5 \"foo.h\"\n");
+        buffer.append("#ident \"version 1.0\"\n");
+        buffer.append("#assert thisIsTrue(value)\n");
+        buffer.append("#unassert thisIsTrue(value)\n");
+        buffer.append("#invalid");
+        String code= buffer.toString();
+        IASTTranslationUnit tu = parse(code, ParserLanguage.CPP, true, false);
+
+        IASTProblem[] problems= tu.getPreprocessorProblems();
+        assertEquals(3, problems.length);
+        assertEquals(IProblem.PREPROCESSOR_INCLUSION_NOT_FOUND, problems[0].getID());
+        assertEquals(IProblem.PREPROCESSOR_POUND_WARNING, problems[1].getID());
+        assertEquals(IProblem.PREPROCESSOR_INVALID_DIRECTIVE, problems[2].getID());
+        assertSoleLocation(problems[0], code, "#import \"include_once.h\"");
+        assertSoleLocation(problems[1], code, "\"deprecated include\"");
+        assertSoleLocation(problems[2], code, "#invalid");        	
+    }
+    
+    // int main(void){	
+    // 	#define one 1
+    //	int integer = one; 
+    //	return integer;
+    // }
+    public void testRawSignature_Bug117029() throws Exception {
+    	String content= getContents(1)[0].toString();
+    	IASTTranslationUnit tu= parse(content, ParserLanguage.CPP);
+    	IASTFunctionDefinition decl= (IASTFunctionDefinition) tu.getDeclarations()[0];
+    	IASTCompoundStatement compound= (IASTCompoundStatement) decl.getBody();
+    	assertEquals("int integer = one;", compound.getStatements()[0].getRawSignature());
+    	assertEquals("return integer;", compound.getStatements()[1].getRawSignature());
+    }
+    
+	public void testTemplateIdNameLocation_Bug211444() throws Exception {
+		IASTTranslationUnit tu = parse( "Foo::template test<T> bar;", ParserLanguage.CPP );
+		CPPNameCollector col = new CPPNameCollector();
+		tu.accept( col );
+		
+		ICPPASTQualifiedName qn = (ICPPASTQualifiedName) col.getName(0);
+		IASTName[] ns = qn.getNames();
+		assertTrue(ns[1] instanceof ICPPASTTemplateId);
+		ICPPASTTemplateId templateId= (ICPPASTTemplateId) ns[1];
+		IASTName templateIdName= templateId.getTemplateName();
+		
+		assertEquals("test", templateIdName.getRawSignature()); //$NON-NLS-1$
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMParserTestSuite.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMParserTestSuite.java
new file mode 100644
index 0000000..4d40abb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMParserTestSuite.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *    Emanuel Graf (IFS)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.parser.tests.prefix.CompletionTestSuite;
+
+/**
+ * @author jcamelon
+ */
+public class DOMParserTestSuite extends TestCase {
+	public static Test suite() {
+		TestSuite suite= new TestSuite(DOMParserTestSuite.class.getName());
+		suite.addTest(AST2Tests.suite());
+		suite.addTestSuite(GCCTests.class);
+		suite.addTest(AST2CPPTests.suite());
+		suite.addTest(AST2CPPImplicitNameTests.suite());
+		suite.addTest(AST2TemplateTests.suite());
+		suite.addTestSuite(QuickParser2Tests.class);
+		suite.addTest(CompleteParser2Tests.suite());
+		suite.addTest(DOMLocationTests.suite());
+		suite.addTestSuite(DOMLocationMacroTests.class);
+		suite.addTest(ImageLocationTests.suite());
+		suite.addTest(DOMLocationInclusionTests.suite());
+		suite.addTestSuite(AST2KnRTests.class);
+		suite.addTestSuite(AST2UtilTests.class);
+		suite.addTestSuite(AST2UtilOldTests.class);
+		suite.addTestSuite(AST2SelectionParseTest.class);
+		suite.addTest(ASTNodeSelectorTest.suite());
+		suite.addTestSuite(CodeReaderCacheTest.class);
+		suite.addTest(AST2CPPSpecTest.suite());
+		suite.addTestSuite(AST2CSpecTest.class);
+		suite.addTestSuite(DOMSelectionParseTest.class);
+		suite.addTestSuite(GCCCompleteParseExtensionsTest.class);
+		suite.addTestSuite(DOMPreprocessorInformationTest.class);
+		suite.addTest(CommentTests.suite());
+		suite.addTest(TaskParserTest.suite());
+		suite.addTest(CompletionTestSuite.suite());
+		suite.addTestSuite(CharArrayMapTest.class);
+		suite.addTest(FaultToleranceTests.suite());
+		suite.addTest(LanguageExtensionsTest.suite());
+		suite.addTest(ASTInactiveCodeTests.suite());
+		suite.addTest(AccessControlTests.suite());
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMPreprocessorInformationTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMPreprocessorInformationTest.java
new file mode 100644
index 0000000..501b167
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMPreprocessorInformationTest.java
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others.
+ * 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  
+ * 
+ * Contributors: 
+ *    Emanuel Graf - initial API and implementation 
+ *    Markus Schorn (Wind River Systems)
+ ******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import org.eclipse.cdt.core.dom.ast.IASTInitializer;
+import org.eclipse.cdt.core.dom.ast.IASTNodeLocation;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorElifStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorEndifStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorErrorStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorFunctionStyleMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIfStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIfdefStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIfndefStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorPragmaStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+
+/**
+ * @author Emanuel Graf
+ *
+ */
+public class DOMPreprocessorInformationTest extends AST2BaseTest {
+	
+	public void testPragma() throws Exception {
+		String msg = "GCC poison printf sprintf fprintf";
+		StringBuffer buffer = new StringBuffer( "#pragma " + msg + "\n" );  //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP ); 
+		IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
+		assertEquals(1, st.length);
+		assertTrue(st[0] instanceof IASTPreprocessorPragmaStatement);
+		IASTPreprocessorPragmaStatement pragma = (IASTPreprocessorPragmaStatement) st[0];
+		assertEquals(msg, new String(pragma.getMessage()));
+	}
+	
+	public void testElIf() throws Exception {
+		String cond = "2 == 2";
+		StringBuffer buffer = new StringBuffer( "#if 1 == 2\n#elif " + cond + "\n#else\n#endif\n" );  //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP ); 
+		IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
+		assertEquals(4, st.length);
+		assertTrue(st[1] instanceof IASTPreprocessorElifStatement);
+		IASTPreprocessorElifStatement pragma = (IASTPreprocessorElifStatement) st[1];
+		assertEquals(cond, new String(pragma.getCondition()));
+	}
+	
+	public void testIf() throws Exception {
+		String cond = "2 == 2";
+		StringBuffer buffer = new StringBuffer( "#if " + cond + "\n#endif\n" );  //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP ); 
+		IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
+		assertEquals(2, st.length);
+		assertTrue(st[0] instanceof IASTPreprocessorIfStatement);
+		IASTPreprocessorIfStatement pragma = (IASTPreprocessorIfStatement) st[0];
+		assertEquals(cond, new String(pragma.getCondition()));
+	}
+	
+	public void testIfDef() throws Exception{
+		String cond = "SYMBOL";
+		StringBuffer buffer = new StringBuffer( "#ifdef " + cond + "\n#endif\n" );  //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP ); 
+		IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
+		assertEquals(2, st.length);
+		assertTrue(st[0] instanceof IASTPreprocessorIfdefStatement);
+		IASTPreprocessorIfdefStatement pragma = (IASTPreprocessorIfdefStatement) st[0];
+		assertEquals(cond, new String(pragma.getCondition()));
+	}
+	
+	public void testIfnDef() throws Exception{
+		String cond = "SYMBOL";
+		StringBuffer buffer = new StringBuffer( "#ifndef " + cond + "\n#endif\n" );  //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP ); 
+		IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
+		assertEquals(2, st.length);
+		assertTrue(st[0] instanceof IASTPreprocessorIfndefStatement);
+		IASTPreprocessorIfndefStatement pragma = (IASTPreprocessorIfndefStatement) st[0];
+		assertEquals(cond, new String(pragma.getCondition()));
+	}
+	
+	public void testError() throws Exception{
+		String msg = "Message";
+		StringBuffer buffer = new StringBuffer( "#error " + msg + "\n" );  //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP, false, false ); 
+		IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
+		assertEquals(1, st.length);
+		assertTrue(st[0] instanceof IASTPreprocessorErrorStatement);
+		IASTPreprocessorErrorStatement pragma = (IASTPreprocessorErrorStatement) st[0];
+		assertEquals(msg, new String(pragma.getMessage()));
+	}
+	
+	public void testPragmaWithSpaces() throws Exception {
+		String msg = "GCC poison printf sprintf fprintf";
+		StringBuffer buffer = new StringBuffer( "#  pragma  " + msg + " \n" );  //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP ); 
+		IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
+		assertEquals(1, st.length);
+		assertTrue(st[0] instanceof IASTPreprocessorPragmaStatement);
+		IASTPreprocessorPragmaStatement pragma = (IASTPreprocessorPragmaStatement) st[0];
+		assertEquals(msg, new String(pragma.getMessage()));
+	}
+	
+	public void testElIfWithSpaces() throws Exception {
+		String cond = "2 == 2";
+		StringBuffer buffer = new StringBuffer( "#if 1 == 2\n#  elif  " + cond + " \n#else\n#endif\n" );  //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP ); 
+		IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
+		assertEquals(4, st.length);
+		assertTrue(st[1] instanceof IASTPreprocessorElifStatement);
+		IASTPreprocessorElifStatement pragma = (IASTPreprocessorElifStatement) st[1];
+		assertEquals(cond, new String(pragma.getCondition()));
+	}
+	
+	public void testIfWithSpaces() throws Exception {
+		String cond = "2 == 2";
+		StringBuffer buffer = new StringBuffer( "#  if  " + cond + " \n#endif\n" );  //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP ); 
+		IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
+		assertEquals(2, st.length);
+		assertTrue(st[0] instanceof IASTPreprocessorIfStatement);
+		IASTPreprocessorIfStatement pragma = (IASTPreprocessorIfStatement) st[0];
+		assertEquals(cond, new String(pragma.getCondition()));
+	}
+	
+	public void testIfDefWithSpaces() throws Exception{
+		String cond = "SYMBOL";
+		StringBuffer buffer = new StringBuffer( "#  ifdef  " + cond + " \n#endif\n" );  //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP ); 
+		IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
+		assertEquals(2, st.length);
+		assertTrue(st[0] instanceof IASTPreprocessorIfdefStatement);
+		IASTPreprocessorIfdefStatement pragma = (IASTPreprocessorIfdefStatement) st[0];
+		assertEquals(cond, new String(pragma.getCondition()));
+	}
+	
+	public void testIfnDefWithSpaces() throws Exception{
+		String cond = "SYMBOL";
+		StringBuffer buffer = new StringBuffer( "#  ifndef  " + cond + "\t\n#endif\n" );  //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP ); 
+		IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
+		assertEquals(2, st.length);
+		assertTrue(st[0] instanceof IASTPreprocessorIfndefStatement);
+		IASTPreprocessorIfndefStatement pragma = (IASTPreprocessorIfndefStatement) st[0];
+		assertEquals(cond, new String(pragma.getCondition()));
+	}
+	
+	public void testErrorWithSpaces() throws Exception{
+		String msg = "Message";
+		StringBuffer buffer = new StringBuffer( "#  error \t" + msg + " \n" );  //$NON-NLS-1$
+		IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP, false, false ); 
+		IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
+		assertEquals(1, st.length);
+		assertTrue(st[0] instanceof IASTPreprocessorErrorStatement);
+		IASTPreprocessorErrorStatement pragma = (IASTPreprocessorErrorStatement) st[0];
+		assertEquals(msg, new String(pragma.getMessage()));
+	}
+	
+	public void testMacroExpansion() throws Exception {
+		StringBuffer sb = new StringBuffer();
+		sb.append("#define add(a, b) (a) + (b) \n");
+		sb.append("int x = add(foo, bar); \n");
+		String code = sb.toString();
+		
+		IASTTranslationUnit tu = parse( code, ParserLanguage.CPP, false, false );
+		IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
+		assertEquals(1, st.length);
+		assertTrue(st[0] instanceof IASTPreprocessorFunctionStyleMacroDefinition);
+		
+		IASTSimpleDeclaration decl = (IASTSimpleDeclaration) tu.getDeclarations()[0];
+		IASTInitializer init = decl.getDeclarators()[0].getInitializer();
+		
+		IASTNodeLocation[] nodeLocations = init.getNodeLocations();
+		assertEquals(1, nodeLocations.length);
+	}
+	
+	// #ifdef xxx
+	// #elif
+	// #endif
+	public void testElifWithoutCondition_bug185324() throws Exception {
+		StringBuffer code= getContents(1)[0];
+		IASTTranslationUnit tu = parse(code.toString(), ParserLanguage.CPP, false, false);
+		IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
+		assertEquals(3, st.length);
+		assertTrue(st[0] instanceof IASTPreprocessorIfdefStatement);
+		IASTPreprocessorIfdefStatement ifdef = (IASTPreprocessorIfdefStatement) st[0];
+		assertEquals("xxx", new String(ifdef.getCondition()));
+
+		assertTrue(st[1] instanceof IASTPreprocessorElifStatement);
+		IASTPreprocessorElifStatement elif = (IASTPreprocessorElifStatement) st[1];
+		assertEquals("", new String(elif.getCondition()));
+
+		assertTrue(st[2] instanceof IASTPreprocessorEndifStatement);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMSearchUtil.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMSearchUtil.java
new file mode 100644
index 0000000..4f1f64b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMSearchUtil.java
@@ -0,0 +1,218 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Assert;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IName;
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.c.CASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.index.IIndexBinding;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.util.ArrayUtil;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.content.IContentType;
+
+/**
+ * Utility class to have commonly used algorithms in one place for searching with the DOM. 
+ * 
+ * @author dsteffle
+ */
+public class DOMSearchUtil {
+	private static final IASTName[] BLANK_NAME_ARRAY = new IASTName[0];
+//    private static final IASTName[] EMPTY_NAME_LIST = BLANK_NAME_ARRAY;
+
+    public static final int DECLARATIONS = 1;
+    public static final int DEFINITIONS = 2;
+    public static final int DECLARATIONS_DEFINITIONS = 3;
+    public static final int REFERENCES = 4;
+    public static final int ALL_OCCURRENCES = 5;
+    /**
+    * This retrieves the ParserLanguage from an IFile.
+    *
+    * @param file
+    * @return
+    */
+    public static ParserLanguage getLanguageFromFile(IFile file) {
+        IProject project = file.getProject();
+        IContentType contentType = CCorePlugin.getContentType(project, file.getFullPath().lastSegment());
+        if (contentType != null) {
+        	String lid = contentType.getId();
+        	if (CCorePlugin.CONTENT_TYPE_CXXSOURCE.equals(lid) || 
+        			CCorePlugin.CONTENT_TYPE_CXXHEADER.equals(lid)) {
+        		return ParserLanguage.CPP;
+        	}
+        }        
+        return ParserLanguage.C;
+    }
+
+    /**
+     * The CPPNameCollector used to get IASTNames from an IASTNode.
+     * 
+     * @author dsteffle
+     */
+    static public class CPPNameCollector extends CPPASTVisitor {
+        {
+            shouldVisitNames = true;
+        }
+        public List nameList = new ArrayList();
+        public int visit( IASTName name ){
+            nameList.add( name );
+            return PROCESS_CONTINUE;
+        }
+        public IASTName getName( int idx ){
+            if( idx < 0 || idx >= nameList.size() )
+                return null;
+            return (IASTName) nameList.get( idx );
+        }
+        public int size() { return nameList.size(); } 
+    }
+
+    /**
+     * The CNameCollector used to get IASTNames from an IASTNode.
+     * 
+     * @author dsteffle
+     */
+    static public class CNameCollector extends CASTVisitor {
+        {
+            shouldVisitNames = true;
+        }
+        public List nameList = new ArrayList();
+        public int visit( IASTName name ){
+            nameList.add( name );
+            return PROCESS_CONTINUE;
+        }
+        public IASTName getName( int idx ){
+            if( idx < 0 || idx >= nameList.size() )
+                return null;
+            return (IASTName) nameList.get( idx );
+        }
+        public int size() { return nameList.size(); } 
+    }
+    
+	/**
+	 * Returns the ParserLanguage corresponding to the IPath and IProject.  Returns ParserLanguage.CPP if the file type is a header.
+	 * 
+	 * @param path
+	 * @param project
+	 * @return
+	 */
+    public static ParserLanguage getLanguage( IPath path, IProject project )
+    {  
+    	//FIXME: ALAIN, for headers should we assume CPP ??
+    	// The problem is that it really depends on how the header was included.
+    	String id = null;
+    	IContentType contentType = CCorePlugin.getContentType(project, path.lastSegment());
+    	if (contentType != null) {
+    		id = contentType.getId();
+    	}
+    	if (id != null) {
+    		if (CCorePlugin.CONTENT_TYPE_CXXHEADER.equals(id)) {
+    			return ParserLanguage.CPP;
+    		} else if (CCorePlugin.CONTENT_TYPE_CXXSOURCE.equals(id)) {
+    			return ParserLanguage.CPP;
+    		} else if (CCorePlugin.CONTENT_TYPE_CHEADER.equals(id)) {
+    			return ParserLanguage.C; 				
+    		} else if (CCorePlugin.CONTENT_TYPE_CSOURCE.equals(id)) {
+    			return ParserLanguage.C;
+    		} else if (CCorePlugin.CONTENT_TYPE_ASMSOURCE.equals(id)) {
+    			// ???
+    			// What do we do here ?
+    		}
+    	}
+		return ParserLanguage.CPP;
+    }
+
+    /**
+     * This is used to get the names from the TU that the IASTName searchName belongs to.
+     * 
+     * @param searchName the IASTName whose references/delcarations are to be retrieved
+     * @param limitTo used to specify whether to get declarations, references, or both, one of: 
+     * ( CSearchPattern.DECLARATION | CSearchPattern.REFERENCES | CSearchPattern.ALL_OCCURRENCES ) 
+     * @return IASTName[] declarations, references, or both depending on limitTo that correspond to the IASTName searchName searched for
+     */
+    public static IName[] getNamesFromDOM(IASTName searchName, int limitTo) {
+		IName[] names = null;
+		IASTTranslationUnit tu = searchName.getTranslationUnit();
+		
+		if (tu == null) {
+			return BLANK_NAME_ARRAY;
+		}
+		
+		IBinding binding = searchName.resolveBinding();
+		if (binding instanceof IIndexBinding) {
+			Assert.fail("Not implemented");
+//			try { 
+//				ArrayList pdomNames = new ArrayList();
+//				IPDOMResolver pdom= ((PDOMBinding) binding).getPDOM();
+//				// First decls
+//				names= pdom.getDeclarations(binding);
+//				pdomNames.addAll(Arrays.asList(names));
+//				// Next defs
+//				names= pdom.getDefinitions(binding);
+//				pdomNames.addAll(Arrays.asList(names));
+//				names = (IName[])pdomNames.toArray(new IName[pdomNames.size()]);
+//			} catch (CoreException e) {
+//				CCorePlugin.log(e);
+//			}
+		} else {
+			names = getNames(tu, binding, limitTo);
+			
+			if (names == null || names.length == 0) { // try alternate strategies		
+				try {
+					// fix for 86829, 95224
+					if ((binding instanceof ICPPConstructor || (binding instanceof ICPPMethod && ((ICPPMethod)binding).isDestructor())) 
+							&& binding.getScope() instanceof ICPPClassScope) {
+						binding =  ((ICPPClassScope)binding.getScope()).getClassType();
+						names = getNames(tu, binding, limitTo);
+					}
+				} catch (DOMException e) {}
+			}
+		}
+
+		return names;
+    }
+	
+	private static IASTName[] getNames(IASTTranslationUnit tu, IBinding binding, int limitTo) {
+        IASTName[] names = null;
+		if (limitTo == DECLARATIONS ||
+			limitTo == DECLARATIONS_DEFINITIONS) {
+            names = tu.getDeclarationsInAST(binding);
+        } else if (limitTo == REFERENCES) {
+            names = tu.getReferences(binding);
+        } else if (limitTo == DEFINITIONS) {
+            names = tu.getDefinitionsInAST(binding);
+        } else if (limitTo == ALL_OCCURRENCES){
+            names = tu.getDeclarationsInAST(binding);
+            names = (IASTName[])ArrayUtil.addAll(IASTName.class, names, tu.getReferences(binding));
+        } else {  // assume ALL
+            names = tu.getDeclarationsInAST(binding);
+            names = (IASTName[])ArrayUtil.addAll(IASTName.class, names, tu.getReferences(binding));
+        }
+		
+		return names;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMSelectionParseBaseTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMSelectionParseBaseTest.java
new file mode 100644
index 0000000..a54b623
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMSelectionParseBaseTest.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM Rational Software - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IName;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.core.resources.IFile;
+
+/**
+ * @author johnc
+ *
+ */
+public class DOMSelectionParseBaseTest extends DOMFileBasePluginTest {
+
+	public DOMSelectionParseBaseTest() {
+	}
+
+	public DOMSelectionParseBaseTest(String name) {
+		super(name);
+	}
+
+	public DOMSelectionParseBaseTest(String name, Class className) {
+		super(name, className);
+	}
+
+	protected IASTNode parse(String code, int offset1, int offset2) throws Exception {
+		return parse( code, offset1, offset2, true );
+	}
+
+	protected IASTNode parse(String code, int offset1, int offset2, boolean expectedToPass) throws Exception {
+		IFile file = importFile("temp.cpp", code); //$NON-NLS-1$
+		return parse(file, offset1, offset2, expectedToPass);
+	}
+	
+	protected IASTNode parse(IFile file, int offset1, int offset2, boolean expectedToPass) throws Exception {
+		ITranslationUnit tu = (ITranslationUnit)CCorePlugin.getDefault().getCoreModel().create(file);
+		IASTTranslationUnit ast = tu.getAST();
+		IASTName name= ast.getNodeSelector(null).findName(offset1, offset2 - offset1);
+
+		if (!expectedToPass) return null;
+		
+		assertNotNull(name);
+		return name;
+	}
+	
+	protected IName[] getDeclarationOffTU(IASTName name) {
+        return DOMSearchUtil.getNamesFromDOM(name, DOMSearchUtil.DECLARATIONS);
+	}
+    
+    protected IName[] getReferencesOffTU(IASTName name) {
+        return DOMSearchUtil.getNamesFromDOM(name, DOMSearchUtil.REFERENCES);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMSelectionParseTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMSelectionParseTest.java
new file mode 100644
index 0000000..1d47a06
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/DOMSelectionParseTest.java
@@ -0,0 +1,1755 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM Rational Software - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.io.StringWriter;
+import java.io.Writer;
+
+import org.eclipse.cdt.core.dom.IName;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IEnumeration;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.ILabel;
+import org.eclipse.cdt.core.dom.ast.IMacroBinding;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.c.ICExternalBinding;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase;
+import org.eclipse.cdt.internal.core.model.CProject;
+import org.eclipse.core.resources.IFile;
+
+/**
+ * @author dsteffle
+ */
+public class DOMSelectionParseTest extends DOMSelectionParseBaseTest {
+
+	public DOMSelectionParseTest() {
+	}
+
+	public DOMSelectionParseTest(String name, Class className) {
+		super(name, className);
+	}
+
+	public DOMSelectionParseTest(String name) {
+		super(name, DOMSelectionParseTest.class);
+	}
+
+	public void testBaseCase_VariableReference() throws Exception
+	{
+		String code = "void f() { int x; x=3; }"; //$NON-NLS-1$
+		int offset1 = code.indexOf( "x=" ); //$NON-NLS-1$
+		int offset2 = code.indexOf( '=');
+		IASTNode node = parse( code, offset1, offset2 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IVariable );
+		assertEquals( ((IASTName)node).toString(), "x" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "x" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 15);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+	}
+
+	public void testBaseCase_FunctionReference() throws Exception
+	{
+		String code = "int x(){x( );}"; //$NON-NLS-1$
+		int offset1 = code.indexOf( "x( " ); //$NON-NLS-1$
+		int offset2 = code.indexOf( "( )"); //$NON-NLS-1$
+		IASTNode node = parse( code, offset1, offset2 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IFunction );
+		assertEquals( ((IASTName)node).toString(), "x" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "x" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 4);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+	}
+	
+	public void testBaseCase_Error() throws Exception
+	{
+		String code = "int x() { y( ) }"; //$NON-NLS-1$
+		int offset1 = code.indexOf( "y( " ); //$NON-NLS-1$
+		int offset2 = code.indexOf( "( )"); //$NON-NLS-1$
+		assertNull( parse( code, offset1, offset2, false ));
+	}
+	
+	public void testBaseCase_FunctionDeclaration() throws Exception
+	{
+		String code = "int x(); void test() {x( );}"; //$NON-NLS-1$
+		int offset1 = code.indexOf( "x( )" ); //$NON-NLS-1$
+		int offset2 = code.indexOf( "( )"); //$NON-NLS-1$
+		IASTNode node = parse( code, offset1, offset2 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IFunction );
+		assertEquals( ((IASTName)node).toString(), "x" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "x" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 4);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+	}
+	
+	public void testBaseCase_FunctionDeclaration2() throws Exception
+	{
+		String code = "int printf( const char *, ... ); "; //$NON-NLS-1$
+		int offset1 = code.indexOf( "printf" ); //$NON-NLS-1$
+		int offset2 = code.indexOf( "( const"); //$NON-NLS-1$
+		IASTNode node = parse( code, offset1, offset2 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IFunction );
+		assertEquals( ((IASTName)node).toString(), "printf" ); //$NON-NLS-1$
+	}
+
+	public void testBaseCase_VariableDeclaration() throws Exception
+	{
+		String code = "int x = 3;"; //$NON-NLS-1$
+		int offset1 = code.indexOf( "x" ); //$NON-NLS-1$
+		int offset2 = code.indexOf( " ="); //$NON-NLS-1$
+		IASTNode node = parse( code, offset1, offset2 );
+		assertNotNull( node );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IVariable );
+		assertEquals( ((IASTName)node).toString(), "x" ); //$NON-NLS-1$
+	}
+	
+	public void testBaseCase_Parameter() throws Exception
+	{
+		String code = "int main( int argc ) { int x = argc; }"; //$NON-NLS-1$
+		int offset1 = code.indexOf( "argc;" ); //$NON-NLS-1$
+		int offset2 = code.indexOf( ";" ); //$NON-NLS-1$
+		IASTNode node = parse( code, offset1, offset2 );
+		assertNotNull( node );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IParameter );
+		assertEquals( ((IASTName)node).toString(), "argc" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "argc" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 14);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+	}
+	
+	public void testBug57898() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class Gonzo {  public: void playHorn(); };\n" ); //$NON-NLS-1$
+		writer.write( "void Gonzo::playHorn() { return; }\n" ); //$NON-NLS-1$
+		writer.write( "int	main(int argc, char **argv) { Gonzo gonzo; gonzo.playHorn(); }\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		for( int i = 0; i < 3; ++i )
+		{
+			int start = -1, stop = -1;
+			switch( i )
+			{
+				case 0:
+					start = code.indexOf( "void playHorn") + 5; //$NON-NLS-1$
+					break;
+				case 1:
+					start = code.indexOf( "::playHorn") + 2; //$NON-NLS-1$
+					break;
+				case 2:
+					start = code.indexOf( ".playHorn") + 1; //$NON-NLS-1$
+					break;
+			}
+			stop = start + 8;
+			IASTNode node = parse( code, start, stop );
+			assertNotNull( node );
+			assertTrue( node instanceof IASTName );
+			assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPMethod );
+			assertEquals( ((IASTName)node).toString(), "playHorn" ); //$NON-NLS-1$
+			IName[] decls = getDeclarationOffTU((IASTName)node);
+			assertEquals(decls.length, 2);
+			assertEquals( decls[0].toString(), "playHorn" ); //$NON-NLS-1$
+			assertEquals( ((ASTNode)decls[0]).getOffset(), 28);
+			assertEquals( ((ASTNode)decls[0]).getLength(), 8);
+		}
+	}
+	
+	public void testConstructorDestructorDeclaration() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class Gonzo { Gonzo(); ~Gonzo(); };"); //$NON-NLS-1$
+		String code = writer.toString();
+		int offset = code.indexOf( " Gonzo()") + 1; //$NON-NLS-1$
+		IASTNode node = parse( code, offset, offset + 5 );
+		assertNotNull( node );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPConstructor );
+		assertEquals( ((IASTName)node).toString(), "Gonzo" ); //$NON-NLS-1$
+		
+		offset = code.indexOf( "~Gonzo"); //$NON-NLS-1$
+		node = parse( code, offset, offset + 6 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPMethod );
+		assertEquals( ((IASTName)node).toString(), "~Gonzo" ); //$NON-NLS-1$
+	}	
+	
+	public void testBug60264() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "namespace Muppets { int i;	}\n" ); //$NON-NLS-1$
+		writer.write( "int	main(int argc, char **argv) {	Muppets::i = 1; }\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int index = code.indexOf( "Muppets::"); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 7 );
+		assertNotNull( node );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPNamespace );
+		assertEquals( ((IASTName)node).toString(), "Muppets" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "Muppets" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 10);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 7);
+
+		index = code.indexOf( "e Muppets") + 2; //$NON-NLS-1$
+		node = parse( code, index, index + 7 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPNamespace );
+		assertEquals( ((IASTName)node).toString(), "Muppets" ); //$NON-NLS-1$
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "Muppets" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 10);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 7);
+	}
+	
+	public void testBug61613() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class Foo {  // ** (A) **\n" ); //$NON-NLS-1$
+		writer.write( "	public:\n" ); //$NON-NLS-1$
+		writer.write( "Foo() {};\n" ); //$NON-NLS-1$
+		writer.write( "};\n" ); //$NON-NLS-1$
+		writer.write( "int \n" ); //$NON-NLS-1$
+		writer.write( "main(int argc, char **argv) {\n" ); //$NON-NLS-1$
+		writer.write( "Foo foo;  // ** (B) **\n" ); //$NON-NLS-1$
+		writer.write( "}\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int index = code.indexOf( "class Foo") + 6; //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 3 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPClassType );
+		assertEquals( ((IASTName)node).toString(), "Foo" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "Foo" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 6);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 3);
+	}
+	
+	public void testBug60038() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class Gonzo {\n");		 //$NON-NLS-1$
+		writer.write( "public:\n"); //$NON-NLS-1$
+		writer.write( "Gonzo( const Gonzo & other ){}\n"); //$NON-NLS-1$
+		writer.write( "Gonzo()	{}\n"); //$NON-NLS-1$
+		writer.write( "~Gonzo(){}\n"); //$NON-NLS-1$
+		writer.write( "};\n"); //$NON-NLS-1$
+		writer.write( "int main(int argc, char **argv) {\n"); //$NON-NLS-1$
+		writer.write( " Gonzo * g = new Gonzo();\n"); //$NON-NLS-1$
+		writer.write( " Gonzo * g2 = new Gonzo( *g );\n"); //$NON-NLS-1$
+		writer.write( " g->~Gonzo();\n"); //$NON-NLS-1$
+		writer.write( " return (int) g2;\n"); //$NON-NLS-1$
+		writer.write( "}\n"); //$NON-NLS-1$
+		String code = writer.toString();
+		for( int i = 0; i < 3; ++i )
+		{
+			int startOffset = 0, endOffset = 0;
+			switch( i )
+			{
+				case 0:
+					startOffset = code.indexOf( "new Gonzo()") + 4; //$NON-NLS-1$
+					endOffset = startOffset + 5;
+					break;
+				case 1:
+					startOffset = code.indexOf( "new Gonzo( ") + 4; //$NON-NLS-1$
+					endOffset = startOffset + 5;
+					break;
+				default:
+					startOffset = code.indexOf( "->~") + 2; //$NON-NLS-1$
+					endOffset = startOffset + 6;
+			}
+			IASTNode node = parse( code, startOffset, endOffset );
+			assertTrue( node instanceof IASTName );
+			assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPMethod );
+			IBinding binding = ((IASTName)node).resolveBinding();
+			IName[] decls = null;
+			switch( i )
+			{
+				case 0:
+					assertTrue( binding instanceof ICPPConstructor );
+					decls = getDeclarationOffTU((IASTName)node);
+					assertEquals(decls.length, 1);
+					assertEquals( decls[0].toString(), "Gonzo" ); //$NON-NLS-1$
+					assertEquals( ((ASTNode)decls[0]).getOffset(), 53);
+					assertEquals( ((ASTNode)decls[0]).getLength(), 5);
+					break;
+				case 1: 
+					assertTrue( binding instanceof ICPPConstructor );
+					decls = getDeclarationOffTU((IASTName)node);
+					assertEquals(decls.length, 1);
+					assertEquals( decls[0].toString(), "Gonzo" ); //$NON-NLS-1$
+					assertEquals( ((ASTNode)decls[0]).getOffset(), 22);
+					assertEquals( ((ASTNode)decls[0]).getLength(), 5);
+					break;
+				default: 
+					assertFalse( binding instanceof ICPPConstructor );
+					String name = ((IASTName)node).toString();
+					assertEquals( name.indexOf("~"), 0); //$NON-NLS-1$
+					assertEquals( name.indexOf("Gonzo"), 1); //$NON-NLS-1$
+					decls = getDeclarationOffTU((IASTName)node);
+					assertEquals(decls.length, 1);
+					assertEquals( decls[0].toString(), "~Gonzo" ); //$NON-NLS-1$
+					assertEquals( ((ASTNode)decls[0]).getOffset(), 64);
+					assertEquals( ((ASTNode)decls[0]).getLength(), 6);
+					break;
+					
+			}
+		}
+	}
+	
+	public void testMethodReference() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class Sample { public:\n"); //$NON-NLS-1$
+		writer.write( "  int getAnswer() const;\n"); //$NON-NLS-1$
+		writer.write( "};\n"); //$NON-NLS-1$
+		writer.write( "int main(int argc, char **argv) {\n" ); //$NON-NLS-1$
+		writer.write( " Sample * s = new Sample();\n" ); //$NON-NLS-1$
+		writer.write( " return s->getAnswer();\n" ); //$NON-NLS-1$
+		writer.write( "}\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int startIndex = code.indexOf( "->getAnswer") + 2; //$NON-NLS-1$
+		IASTNode node = parse( code, startIndex, startIndex+9);
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPMethod );
+		assertEquals( ((IASTName)node).toString(), "getAnswer" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "getAnswer" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 29);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 9);
+	}
+	
+	public void testConstructorDefinition() throws Exception
+	{
+		String code = "class ABC { public: ABC(); }; ABC::ABC(){}"; //$NON-NLS-1$
+		int startIndex = code.indexOf( "::ABC") + 2; //$NON-NLS-1$
+		IASTNode node = parse( code, startIndex, startIndex + 3 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPConstructor );
+		assertEquals( ((IASTName)node).toString(), "ABC" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 2);
+		assertEquals( decls[0].toString(), "ABC" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 20);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 3);
+	}
+	
+	public void testBug63966() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "void foo(int a) {}\n" ); //$NON-NLS-1$
+		writer.write( "void foo(long a) {}\n" ); //$NON-NLS-1$
+		writer.write( "int main(int argc, char **argv) {\n" ); //$NON-NLS-1$
+		writer.write( "foo(1); \n }" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int startIndex = code.indexOf( "foo(1)"); //$NON-NLS-1$
+		parse( code, startIndex, startIndex + 3 );
+	}
+	
+	public void testBug66744() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "enum EColours { RED, GREEN, BLUE };      \n" ); //$NON-NLS-1$
+		writer.write( "void foo() {  EColours color = GREEN; }  \n" ); //$NON-NLS-1$
+		
+		String code = writer.toString();
+		int startIndex = code.indexOf( "EColours color"); //$NON-NLS-1$
+		parse( code, startIndex, startIndex + 8 );
+	}
+	
+
+	
+	public void testBug68527() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write("struct X;\n"); //$NON-NLS-1$
+		writer.write("struct X anA;"); //$NON-NLS-1$
+		String code = writer.toString();
+		int startIndex = code.indexOf( "X anA"); //$NON-NLS-1$
+		parse( code, startIndex, startIndex + 1 );
+	}
+
+	public void testBug60407() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "struct ZZZ { int x, y, z; };\n" ); //$NON-NLS-1$
+		writer.write( "typedef struct ZZZ _FILE;\n" ); //$NON-NLS-1$
+		writer.write( "typedef _FILE FILE;\n" ); //$NON-NLS-1$
+		writer.write( "static void static_function(FILE * lcd){}\n" ); //$NON-NLS-1$
+		writer.write( "int	main(int argc, char **argv) {\n" ); //$NON-NLS-1$
+		writer.write( "FILE * file = 0;\n" ); //$NON-NLS-1$
+		writer.write( "static_function( file );\n" ); //$NON-NLS-1$
+		writer.write( "return 0;\n" );	 //$NON-NLS-1$
+		writer.write( "}\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int startIndex = code.indexOf( "static_function( file )"); //$NON-NLS-1$
+		parse( code, startIndex, startIndex + "static_function".length() ); //$NON-NLS-1$
+	}
+	
+	public void testBug61800() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class B {};\n"); //$NON-NLS-1$
+		writer.write( "class ABCDEF {\n"); //$NON-NLS-1$
+		writer.write( " static B stInt; };\n"); //$NON-NLS-1$
+		writer.write( "B ABCDEF::stInt = 5;\n"); //$NON-NLS-1$
+		String code = writer.toString();
+		int startIndex = code.indexOf( "::stInt") + 2; //$NON-NLS-1$
+
+		IASTNode node = parse( code, startIndex, startIndex+ 5 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPField );
+		assertEquals( ((IASTName)node).toString(), "stInt" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 2);
+		assertEquals( decls[0].toString(), "stInt" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 37);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 5);
+	}
+	
+	public void testBug68739() throws Exception
+	{
+	    Writer writer = new StringWriter();
+	    writer.write( "int fprintf( int *, const char *, ... );               \n" ); //$NON-NLS-1$
+	    writer.write( "void boo( int * lcd ) {                                \n" ); //$NON-NLS-1$
+	    writer.write( "  /**/fprintf( lcd, \"%c%s 0x%x\", ' ', \"bbb\", 2 );  \n" ); //$NON-NLS-1$
+	    writer.write( "}                                                      \n" ); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+		int startIndex = code.indexOf( "/**/fprintf") + 4; //$NON-NLS-1$
+
+		IASTNode node = parse( code, startIndex, startIndex+ 7 );
+		
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IFunction );
+		assertEquals( ((IASTName)node).toString(), "fprintf" ); //$NON-NLS-1$
+	}
+	
+	public void testBug72818() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "union Squaw	{	int x;	double u; };\n" ); //$NON-NLS-1$
+		writer.write( "int	main(int argc, char **argv) {\n" ); //$NON-NLS-1$
+		writer.write( "return sizeof( Squaw );\n" ); //$NON-NLS-1$
+		writer.write( "}\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int startIndex = code.indexOf( "sizeof( ") + "sizeof( ".length();  //$NON-NLS-1$ //$NON-NLS-2$
+		IASTNode node = parse( code, startIndex, startIndex + 5 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPClassType );
+		assertEquals( ((IASTName)node).toString(), "Squaw" ); //$NON-NLS-1$
+		assertEquals( ((ICPPClassType)((IASTName)node).resolveBinding()).getKey(), ICompositeType.k_union );
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "Squaw" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 6);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 5);
+	}
+	
+	public void test72220() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "const int FOUND_ME = 1;\n" ); //$NON-NLS-1$
+		writer.write( "class Test{\n" ); //$NON-NLS-1$
+		writer.write( "public:\n" ); //$NON-NLS-1$
+		writer.write( "const int findCode() const;\n" ); //$NON-NLS-1$
+		writer.write( "};\n" ); //$NON-NLS-1$
+		writer.write( "const int Test::findCode() const {\n" ); //$NON-NLS-1$
+		writer.write( "return FOUND_ME;\n" ); //$NON-NLS-1$
+		writer.write( "}\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int startIndex = code.indexOf( "return ") + "return ".length();  //$NON-NLS-1$ //$NON-NLS-2$
+		IASTNode node = parse( code, startIndex, startIndex + 8 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IVariable );
+		assertEquals( ((IASTName)node).toString(), "FOUND_ME" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "FOUND_ME" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 10);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 8);
+	}
+	
+	public void testBug72721() throws Exception{
+	    Writer writer = new StringWriter();
+	    writer.write(" class ABC { public: ABC(int); };   \n"); //$NON-NLS-1$
+	    writer.write("void f() {                          \n"); //$NON-NLS-1$
+	    writer.write("   int j = 1;                       \n"); //$NON-NLS-1$
+	    writer.write("   new ABC( j + 1 );                \n"); //$NON-NLS-1$
+	    writer.write("}                                   \n"); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+	    int startIndex = code.indexOf( "ABC(" ); //$NON-NLS-1$
+	    IASTNode node = parse( code, startIndex, startIndex + 3 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPConstructor );
+		assertEquals( ((IASTName)node).toString(), "ABC" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "ABC" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 21);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 3);
+	}
+	
+	public void testBug72372() throws Exception{
+	    Writer writer = new StringWriter();
+	    writer.write("namespace B {                                   \n"); //$NON-NLS-1$
+	    writer.write("   class SD_02 { void f_SD(); };                \n"); //$NON-NLS-1$
+	    writer.write("}                                               \n"); //$NON-NLS-1$
+	    writer.write("using namespace B;                              \n"); //$NON-NLS-1$
+	    writer.write("void SD_02::f_SD(){}                            \n"); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+	    int startIndex = code.indexOf( ":f_SD" ); //$NON-NLS-1$
+	    IASTNode node = parse( code, startIndex + 1, startIndex + 5 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPMethod );
+		assertEquals( ((IASTName)node).toString(), "f_SD" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 2);
+		assertEquals( decls[0].toString(), "f_SD" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 71);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+	}
+	public void testBug72372_2() throws Exception{
+	    Writer writer = new StringWriter();
+	    writer.write("namespace A {                                   \n"); //$NON-NLS-1$
+	    writer.write("   namespace B {                                \n"); //$NON-NLS-1$
+	    writer.write("      void f_SD();                              \n"); //$NON-NLS-1$
+	    writer.write("   }                                            \n"); //$NON-NLS-1$
+	    writer.write("}                                               \n"); //$NON-NLS-1$
+	    writer.write("namespace C {                                   \n"); //$NON-NLS-1$
+	    writer.write("   using namespace A;                           \n"); //$NON-NLS-1$
+	    writer.write("}                                               \n"); //$NON-NLS-1$
+	    writer.write("void C::B::f_SD(){}                             \n"); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+	    int startIndex = code.indexOf( ":f_SD" ); //$NON-NLS-1$
+	    IASTNode node = parse( code, startIndex + 1, startIndex + 5 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IFunction );
+		assertEquals( ((IASTName)node).toString(), "f_SD" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 2);
+		assertEquals( decls[0].toString(), "f_SD" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 109);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+	}
+	
+	public void testBug72713() throws Exception{
+	    Writer writer = new StringWriter();
+	    writer.write( "class Deck{ void initialize(); };   \n"); //$NON-NLS-1$
+	    writer.write( "void Deck::initialize(){}           \n"); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+	    int startIndex = code.indexOf( ":initialize" ); //$NON-NLS-1$
+	    IASTNode node = parse( code, startIndex + 1, startIndex + 11 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPMethod );
+		assertEquals( ((IASTName)node).toString(), "initialize" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 2);
+		assertEquals( decls[0].toString(), "initialize" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 17);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 10);
+	}
+	
+	public void testBug72712() throws Exception{
+	    Writer writer = new StringWriter();
+	    writer.write( "class B{ public: B(); }; void f(){ B* b; b = new B(); }" ); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+	    int startIndex = code.indexOf( "new B" ) + 4; //$NON-NLS-1$
+	    
+	    IASTNode node = parse( code, startIndex, startIndex + 1 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPConstructor );
+		assertEquals( ((IASTName)node).toString(), "B" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "B" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 17);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+	}
+	
+	public void testBug72712_2() throws Exception{
+	    Writer writer = new StringWriter();
+	    writer.write( "class A {};                                        \n"); //$NON-NLS-1$
+	    writer.write( "class B{ public: B( A* ); };                       \n"); //$NON-NLS-1$
+	    writer.write( "void f(){ B* b; b = new B( (A*)0 ); }              \n"); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+	    int startIndex = code.indexOf( "(A*)" ) + 1; //$NON-NLS-1$
+	    
+	    IASTNode node = parse( code, startIndex, startIndex + 1 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPClassType );
+		assertEquals( ((IASTName)node).toString(), "A" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "A" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 6);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+	}
+	
+	public void testBug72814() throws Exception{
+		CPPASTNameBase.sAllowNameComputation= true;
+
+	    Writer writer = new StringWriter();
+	    writer.write( "namespace N{                                \n"); //$NON-NLS-1$
+	    writer.write( "   template < class T > class AAA { T _t; };\n"); //$NON-NLS-1$
+	    writer.write( "}                                           \n"); //$NON-NLS-1$
+	    writer.write( "N::AAA<int> a;                              \n"); //$NON-NLS-1$
+	    
+	    String code = writer.toString();
+	    int startIndex = code.indexOf( "AAA<int>" ); //$NON-NLS-1$
+	    IASTNode node = parse( code, startIndex, startIndex + 3 );
+	    
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPClassType );
+		assertEquals( ((IASTName)node).toString(), "AAA" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "AAA" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 75);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 3);
+		
+	    node = parse( code, startIndex, startIndex + 8 );
+	    
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPClassType );
+		assertEquals( ((IASTName)node).toString(), "AAA<int>" ); //$NON-NLS-1$
+		decls = getDeclarationOffTU((IASTName)node);
+		// TODO raised bug 92632 for below
+//		assertEquals(decls.length, 1);
+//		assertEquals( decls[0].toString(), "AAA" ); //$NON-NLS-1$
+//		assertEquals( ((ASTNode)decls[0]).getOffset(), 15);
+//		assertEquals( ((ASTNode)decls[0]).getLength(), 3);
+	}
+	
+	public void testBug72710() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "class Card{\n" ); //$NON-NLS-1$
+		writer.write( "	Card( int rank );\n" ); //$NON-NLS-1$
+		writer.write( " int rank;\n" ); //$NON-NLS-1$
+		writer.write( "};\n" ); //$NON-NLS-1$
+		writer.write( "Card::Card( int rank ) {\n" ); //$NON-NLS-1$
+		writer.write( "this->rank = rank;\n" ); //$NON-NLS-1$
+		writer.write( "}\n" ); //$NON-NLS-1$
+		String code = writer.toString();
+		int index = code.indexOf( "this->rank") + 6; //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPField );
+		assertEquals( ((IASTName)node).toString(), "rank" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 36);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+	}
+	
+	
+	public void testBug75731() throws Exception 
+	{
+		Writer writer = new StringWriter();
+		writer.write("int rank() {\n"); //$NON-NLS-1$
+		writer.write("return 5;\n}\n"); //$NON-NLS-1$
+		writer.write("class Card{\n"); //$NON-NLS-1$
+		writer.write("private:\n"); //$NON-NLS-1$
+		writer.write("Card( int rank );\n"); //$NON-NLS-1$
+		writer.write("int rank;\n"); //$NON-NLS-1$
+		writer.write("public:\n");  //$NON-NLS-1$
+		writer.write("int getRank();\n};\n"); //$NON-NLS-1$
+		writer.write("Card::Card( int rank )\n{\n");  //$NON-NLS-1$
+		writer.write("this->rank = ::rank();\n"); //$NON-NLS-1$
+		writer.write("this->rank = this->rank;\n"); //$NON-NLS-1$
+		writer.write("this->rank = rank;\n"); //$NON-NLS-1$
+		writer.write("this->rank = Card::rank;\n"); //$NON-NLS-1$
+		writer.write("this->rank = getRank();\n}\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+		int index = code.indexOf( "int rank() {") + 4; //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IFunction );
+		assertEquals( ((IASTName)node).toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 4);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "class Card{") + 6; //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPClassType );
+		assertEquals( ((IASTName)node).toString(), "Card" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "Card" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 31);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "Card( int rank );"); //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPConstructor );
+		assertEquals( ((IASTName)node).toString(), "Card" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 2);
+		assertEquals( decls[0].toString(), "Card" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 46);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "Card( int rank );") + 10; //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IParameter );
+		assertEquals( ((IASTName)node).toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 2);
+		assertEquals( decls[0].toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 56);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+
+		index = code.indexOf( "int rank;") + 4; //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPField );
+		assertEquals( ((IASTName)node).toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 68);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "int getRank();") + 4; //$NON-NLS-1$
+		node = parse( code, index, index + 7 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPMethod );
+		assertEquals( ((IASTName)node).toString(), "getRank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "getRank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 86);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 7);
+		
+		index = code.indexOf( "Card::Card( int rank )"); //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPClassType );
+		assertEquals( ((IASTName)node).toString(), "Card" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "Card" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 31);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "Card::Card( int rank )") + 6; //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPConstructor );
+		assertEquals( ((IASTName)node).toString(), "Card" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 2);
+		assertEquals( decls[0].toString(), "Card" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 46);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "Card::Card( int rank )") + 16; //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IParameter );
+		assertEquals( ((IASTName)node).toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 2);
+		assertEquals( decls[0].toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 56);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "this->rank = ::rank();") + 6; //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPField );
+		assertEquals( ((IASTName)node).toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 68);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "this->rank = ::rank();") + 15; //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IFunction );
+		assertEquals( ((IASTName)node).toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 4);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "this->rank = this->rank;") + 6; //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPField );
+		assertEquals( ((IASTName)node).toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 68);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "this->rank = this->rank;") + 19; //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPField );
+		assertEquals( ((IASTName)node).toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 68);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "this->rank = rank;") + 6; //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPField );
+		assertEquals( ((IASTName)node).toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 68);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "this->rank = rank;") + 13; //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IParameter );
+		assertEquals( ((IASTName)node).toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 2);
+		assertEquals( decls[0].toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 56);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "this->rank = Card::rank;") + 6; //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPField );
+		assertEquals( ((IASTName)node).toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 68);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "this->rank = Card::rank;") + 19; //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPField );
+		assertEquals( ((IASTName)node).toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 68);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "this->rank = getRank();") + 6; //$NON-NLS-1$
+		node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPField );
+		assertEquals( ((IASTName)node).toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "rank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 68);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+		
+		index = code.indexOf( "this->rank = getRank();") + 13; //$NON-NLS-1$
+		node = parse( code, index, index + 7 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPMethod );
+		assertEquals( ((IASTName)node).toString(), "getRank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "getRank" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 86);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 7);
+	}
+
+	public void testBug77989() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("namespace N {        /* A */\n"); //$NON-NLS-1$
+		writer.write("class C{};\n}\n"); //$NON-NLS-1$
+		writer.write("using namespace N;   /* B */\n"); //$NON-NLS-1$
+		writer.write("N::C c;              /* C */\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+		int index = code.indexOf( "using namespace N;") + 16; //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 1 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPNamespace );
+		assertEquals( ((IASTName)node).toString(), "N" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "N" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 10);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+	}
+
+	public void testBug78435() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("int itself;          //A\n"); //$NON-NLS-1$ 
+		writer.write("void f(int itself){} //B\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+		int index = code.indexOf( "void f(int itself){}") + 11; //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 6 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IParameter );
+		assertEquals( ((IASTName)node).toString(), "itself" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "itself" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 36);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 6);
+	}
+
+	public void testBug78231A() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("struct Base {\n"); //$NON-NLS-1$
+		writer.write("int Data; // 1\n"); //$NON-NLS-1$
+		writer.write("struct Data; // 2\n};\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+		int index = code.indexOf("struct Data;") + 7; //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICompositeType );
+		assertEquals( ((IASTName)node).toString(), "Data" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "Data" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 36);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+	}
+	
+	public void testBug78231B() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("int Data;\n"); //$NON-NLS-1$
+		writer.write("struct Base {\n"); //$NON-NLS-1$
+		writer.write("int Data; // 1\n"); //$NON-NLS-1$
+		writer.write("struct Data; // 2\n};\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+		int index = code.indexOf("struct Data;") + 7; //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 4 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICompositeType );
+		assertEquals( ((IASTName)node).toString(), "Data" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)node).getOffset(), index);
+	}
+	
+	public void testBug64326() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("class foo {\n"); //$NON-NLS-1$
+		writer.write("public:\n"); //$NON-NLS-1$
+		writer.write("foo() {}\n"); //$NON-NLS-1$
+		writer.write("int bar;\n"); //$NON-NLS-1$
+		writer.write("};\n"); //$NON-NLS-1$
+		writer.write("int\n"); //$NON-NLS-1$
+		writer.write("main(int argc, char **argv) {\n"); //$NON-NLS-1$
+		writer.write("foo* f;\n"); //$NON-NLS-1$
+		writer.write("f->bar = 1; // ** (A) **\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+				
+		String code = writer.toString();
+		int index = code.indexOf("f->bar") + 3; //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 3 );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPField );
+		assertEquals( ((IASTName)node).toString(), "bar" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "bar" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 33);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 3);
+	}
+	
+	public void testBug92605() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#define UINT32 unsigned int\n"); //$NON-NLS-1$
+		writer.write("#define HANDLE unsigned int**\n"); //$NON-NLS-1$
+		writer.write("// ...\n"); //$NON-NLS-1$
+		writer.write("void foo()\n"); //$NON-NLS-1$
+		writer.write("{\n"); //$NON-NLS-1$
+		writer.write("UINT32 u;  // line A\n"); //$NON-NLS-1$
+		writer.write("HANDLE h;  // line B\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+		String code = writer.toString();
+
+		int index = code.indexOf("UINT32 u;"); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 6, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IMacroBinding );
+		assertEquals( ((IASTName)node).toString(), "UINT32" ); //$NON-NLS-1$
+		
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "UINT32" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 8);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 6);
+	}
+	
+	public void testBug79877() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("int Func2() {\n"); //$NON-NLS-1$
+		writer.write("int i;\n"); //$NON-NLS-1$
+		writer.write("i = Func1();\n"); //$NON-NLS-1$
+		writer.write("return(0);\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+		String code = writer.toString();
+		IFile test1 = importFile("test1.c", code); //$NON-NLS-1$
+		
+		writer.write("int Func1(void) {\n"); //$NON-NLS-1$
+		writer.write("return(10);\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+		importFile("test2.c", writer.toString()); //$NON-NLS-1$
+		
+		int index = code.indexOf("Func1"); //$NON-NLS-1$
+		IASTNode node = parse( test1, index, index + 5, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICExternalBinding );
+		assertEquals( ((IASTName)node).toString(), "Func1" ); //$NON-NLS-1$
+		
+		ICElement[] scope = new ICElement[1];
+		scope[0] = new CProject(null, project);
+
+//		// TODO need to register to an index and wait for it to finish before this test will work
+//		
+//		Set matches = SearchEngine.getMatchesFromSearchEngine(SearchEngine.createCSearchScope(scope), (IASTName)node, CSearchPattern.DECLARATIONS);
+//		assertEquals(matches.size(), 1);
+	}
+	
+	public void testBug78114() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("class Point{			//line C\n"); //$NON-NLS-1$
+		writer.write("public:\n"); //$NON-NLS-1$
+		writer.write("Point(): xCoord(0){}\n"); //$NON-NLS-1$
+		writer.write("Point(int x){}		//line B	\n"); //$NON-NLS-1$
+		writer.write("private:	\n"); //$NON-NLS-1$
+		writer.write("int xCoord;	\n"); //$NON-NLS-1$
+		writer.write("};\n"); //$NON-NLS-1$
+		writer.write("int main(int argc, char **argv) {\n"); //$NON-NLS-1$
+		writer.write("Point &p2 = *(new Point(10));	// line A\n"); //$NON-NLS-1$
+		writer.write("return (0);\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+					 							
+		int index = code.indexOf("Point(10)"); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 5, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPConstructor );
+		assertEquals( ((IASTName)node).toString(), "Point" ); //$NON-NLS-1$
+		
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "Point" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 53);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 5);
+	}
+	
+	public void testBug73398() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("int joo=4;\n"); //$NON-NLS-1$
+		writer.write("#define koo 4\n"); //$NON-NLS-1$
+		writer.write("int main(int argc, char **argv) {\n"); //$NON-NLS-1$
+		writer.write("return (koo);\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+			
+		int index = code.indexOf("koo);"); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 3, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IMacroBinding );
+		assertEquals( ((IASTName)node).toString(), "koo" ); //$NON-NLS-1$
+		
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "koo" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 19);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 3);
+	}
+	
+	public void testBug() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("class Point{	\n"); //$NON-NLS-1$
+		writer.write("public:\n"); //$NON-NLS-1$
+		writer.write("Point(): xCoord(0){}\n"); //$NON-NLS-1$
+		writer.write(" Point& operator=(const Point &rhs){return *this;}	// line A\n"); //$NON-NLS-1$
+		writer.write("private:		\n"); //$NON-NLS-1$
+		writer.write("int xCoord;		\n"); //$NON-NLS-1$
+		writer.write("};\n"); //$NON-NLS-1$
+		writer.write("static const Point zero;\n"); //$NON-NLS-1$
+		writer.write("int main(int argc, char **argv) {	\n"); //$NON-NLS-1$
+		writer.write(" Point *p2 = new Point();\n"); //$NON-NLS-1$
+		writer.write("p2->operator=(zero);           // line B\n"); //$NON-NLS-1$
+		writer.write("return (0);	\n"); //$NON-NLS-1$
+		writer.write(" }\n"); //$NON-NLS-1$
+		
+	    String code = writer.toString();
+			
+		int index = code.indexOf("operator=(zero)"); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 9, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPMethod );
+		assertEquals( ((IASTName)node).toString(), "operator =" ); //$NON-NLS-1$
+		
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "operator =" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 51);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 9);
+	}
+	
+	public void testBug80826() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("void swapImpl(int& a, int& b) {/*...*/} // line C\n"); //$NON-NLS-1$
+		writer.write("#define swap(a,b) (swapImpl(a,b))   // line B\n"); //$NON-NLS-1$
+		writer.write("//		...\n"); //$NON-NLS-1$
+		writer.write("void foo(int x, int y)\n"); //$NON-NLS-1$
+		writer.write("{\n"); //$NON-NLS-1$
+		writer.write("swap(x,y); // line A\n"); //$NON-NLS-1$
+		writer.write("		  //...\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+			
+		int index = code.indexOf("swap(x,y);"); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 4, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IMacroBinding );
+		assertEquals( ((IASTName)node).toString(), "swap" ); //$NON-NLS-1$
+		
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "swap" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 58);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+	}
+	
+	public void testBug78389() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("class A{\n"); //$NON-NLS-1$
+		writer.write("void method1(){}  //line A\n"); //$NON-NLS-1$
+		writer.write("void method1(int i){} //line B\n"); //$NON-NLS-1$
+		writer.write("};\n"); //$NON-NLS-1$
+		writer.write("void f(){\n"); //$NON-NLS-1$
+		writer.write("A a; \n"); //$NON-NLS-1$
+		writer.write("a.method1(3); // F3 on method1 in this line should highlight method1 on line B\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+			
+		String code = writer.toString();
+			
+		int index = code.indexOf("method1(3)"); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 7, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPMethod );
+		assertEquals( ((IASTName)node).toString(), "method1" ); //$NON-NLS-1$
+		
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "method1" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 41);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 7);
+	}
+	
+	public void testBug78625() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("class A{            \n"); //$NON-NLS-1$
+		writer.write("public: A(int i){} \n"); //$NON-NLS-1$
+		writer.write("};\n"); //$NON-NLS-1$
+		writer.write("class B: A{\n"); //$NON-NLS-1$
+		writer.write("B():A(2) {}    //line 5\n"); //$NON-NLS-1$
+		writer.write("};\n"); //$NON-NLS-1$
+			
+		String code = writer.toString();
+			
+		int index = code.indexOf("A(2)"); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 1, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPConstructor );
+		assertEquals( ((IASTName)node).toString(), "A" ); //$NON-NLS-1$
+		
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "A" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 29);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+	}
+	
+	public void testBug78656() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("class A{\n"); //$NON-NLS-1$
+		writer.write("public: int method1(){} //line 2\n"); //$NON-NLS-1$
+		writer.write("};\n"); //$NON-NLS-1$
+		writer.write("void f() {\n"); //$NON-NLS-1$
+		writer.write("A a;\n"); //$NON-NLS-1$
+		writer.write("int i=a.method1();  //line 6\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+			
+		int index = code.indexOf("method1();"); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 7, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPMethod );
+		assertEquals( ((IASTName)node).toString(), "method1" ); //$NON-NLS-1$
+		
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "method1" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 21);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 7);
+	}
+	
+	public void testBug79965() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("int i = 2, half_i = i / 2;\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+			
+		int index = code.indexOf("i / 2"); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 1, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IVariable );
+		assertEquals( ((IASTName)node).toString(), "i" ); //$NON-NLS-1$
+		
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "i" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 4);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+	}
+	
+	public void testBug64326A() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("class foo {\n"); //$NON-NLS-1$
+		writer.write("public:\n"); //$NON-NLS-1$
+		writer.write("foo() {}\n"); //$NON-NLS-1$
+		writer.write("void bar() {}\n"); //$NON-NLS-1$
+		writer.write("};\n"); //$NON-NLS-1$
+		writer.write("int\n"); //$NON-NLS-1$
+		writer.write("main(int argc, char **argv) {\n"); //$NON-NLS-1$
+		writer.write("foo* f;\n"); //$NON-NLS-1$
+		writer.write("f->bar(); // ** (A) **\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+			
+		int index = code.indexOf("bar();"); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 3, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPMethod );
+		assertEquals( ((IASTName)node).toString(), "bar" ); //$NON-NLS-1$
+		
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "bar" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 34);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 3);
+	}
+	
+	public void testBug64326B() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("class foo {\n"); //$NON-NLS-1$
+		writer.write("public:\n"); //$NON-NLS-1$
+		writer.write("foo() {}\n"); //$NON-NLS-1$
+		writer.write("int bar;\n"); //$NON-NLS-1$
+		writer.write("};\n"); //$NON-NLS-1$
+		writer.write("int \n"); //$NON-NLS-1$
+		writer.write("main(int argc, char **argv) {\n"); //$NON-NLS-1$
+		writer.write("foo* f;\n"); //$NON-NLS-1$
+		writer.write("f->bar = 1; // ** (A) **\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+			
+		int index = code.indexOf("bar = "); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 3, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPField );
+		assertEquals( ((IASTName)node).toString(), "bar" ); //$NON-NLS-1$
+		
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "bar" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 33);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 3);
+	}
+	
+	public void testBug43128A() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("void foo()\n"); //$NON-NLS-1$
+		writer.write("{\n"); //$NON-NLS-1$
+		writer.write("int x=3;\n"); //$NON-NLS-1$
+		writer.write("		  // ...\n"); //$NON-NLS-1$
+		writer.write("x++;\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+			
+		int index = code.indexOf("x++"); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 1, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IVariable );
+		assertEquals( ((IASTName)node).toString(), "x" ); //$NON-NLS-1$
+		
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "x" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 17);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+	}
+	
+	public void testBug43128B() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("int\n"); //$NON-NLS-1$
+		writer.write("main(int argc, char **argv) {\n"); //$NON-NLS-1$
+		writer.write("int x = argc;\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+			
+		int index = code.indexOf("argc;"); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 4, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IParameter );
+		assertEquals( ((IASTName)node).toString(), "argc" ); //$NON-NLS-1$
+		
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "argc" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 13);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 4);
+	}
+	
+	public void testBug43128C() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("int j;\n"); //$NON-NLS-1$
+		writer.write("int foo(int x) \n"); //$NON-NLS-1$
+		writer.write("{	\n"); //$NON-NLS-1$
+		writer.write("int y;\n"); //$NON-NLS-1$
+		writer.write("x = 4;\n"); //$NON-NLS-1$
+		writer.write("j = 5;\n"); //$NON-NLS-1$
+		writer.write("y = 6;\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+
+		String code = writer.toString();
+			
+		int index = code.indexOf("x ="); //$NON-NLS-1$
+		IASTNode node = parse( code, index, index + 1, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IVariable );
+		assertEquals( ((IASTName)node).toString(), "x" ); //$NON-NLS-1$
+		
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "x" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 19);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+		
+		index = code.indexOf("j ="); //$NON-NLS-1$
+		node = parse( code, index, index + 1, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IVariable );
+		assertEquals( ((IASTName)node).toString(), "j" ); //$NON-NLS-1$
+		
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "j" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 4);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+		
+		index = code.indexOf("y ="); //$NON-NLS-1$
+		node = parse( code, index, index + 1, true );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IVariable );
+		assertEquals( ((IASTName)node).toString(), "y" ); //$NON-NLS-1$
+		
+		decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "y" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 30);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+	}	
+	
+    public void testBug86504() throws Exception {
+        Writer writer = new StringWriter();
+        writer.write("class C { };\n"); //$NON-NLS-1$
+        writer.write("void f(int(C)) { } // void f(int (*fp)(C c)) { }\n"); //$NON-NLS-1$
+        writer.write("// not: void f(int C);\n"); //$NON-NLS-1$
+        writer.write("int g(C);\n"); //$NON-NLS-1$
+        writer.write("void foo() {\n"); //$NON-NLS-1$
+        writer.write("f(g); // openDeclarations on g causes StackOverflowError\n"); //$NON-NLS-1$
+        writer.write("}\n"); //$NON-NLS-1$
+        
+        String code = writer.toString();
+            
+        int index = code.indexOf("g); "); //$NON-NLS-1$
+        IASTNode node = parse( code, index, index + 1, true );
+        assertTrue( node instanceof IASTName );
+        assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPFunction );
+        assertEquals( ((IASTName)node).toString(), "g" ); //$NON-NLS-1$
+        
+        IName[] decls = getDeclarationOffTU((IASTName)node);
+        assertEquals(decls.length, 1);
+        assertEquals( decls[0].toString(), "g" ); //$NON-NLS-1$
+        assertEquals( ((ASTNode)decls[0]).getOffset(), 89);
+        assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+    }   
+
+    public void testBug79811() throws Exception {
+        Writer writer = new StringWriter();
+        writer.write("enum E{E0};\n"); //$NON-NLS-1$
+        writer.write("void f() {\n"); //$NON-NLS-1$
+        writer.write("enum E{E1};\n"); //$NON-NLS-1$
+        writer.write("E e;   //this one is incorrectly found\n"); //$NON-NLS-1$
+        writer.write("}\n"); //$NON-NLS-1$
+        writer.write("E f;   //ok\n"); //$NON-NLS-1$
+        
+        String code = writer.toString();
+            
+        int index = code.indexOf("E{E0}"); //$NON-NLS-1$
+        IASTNode node = parse( code, index, index + 1, true );
+        assertTrue( node instanceof IASTName );
+        assertTrue( ((IASTName)node).resolveBinding() instanceof IEnumeration );
+        assertEquals( ((IASTName)node).toString(), "E" ); //$NON-NLS-1$
+        
+        IName[] decls = getReferencesOffTU((IASTName)node);
+        assertEquals(decls.length, 1);
+        assertEquals( decls[0].toString(), "E" ); //$NON-NLS-1$
+        assertEquals( ((ASTNode)decls[0]).getOffset(), 76);
+        assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+    }   
+
+    public void testBugLabelWithMacro() throws Exception {
+        Writer writer = new StringWriter();
+        writer.write("#define UINT32 unsigned int\n"); //$NON-NLS-1$
+        writer.write("#define HANDLE unsigned int**\n"); //$NON-NLS-1$
+        writer.write("void foo()\n"); //$NON-NLS-1$
+        writer.write("{\n"); //$NON-NLS-1$
+        writer.write("UINT32 u;\n"); //$NON-NLS-1$
+        writer.write("HANDLE h;\n"); //$NON-NLS-1$
+        writer.write("}\n"); //$NON-NLS-1$
+        writer.write("int foo2() {\n"); //$NON-NLS-1$
+        writer.write("test:\n"); //$NON-NLS-1$
+        writer.write("goto test;\n"); //$NON-NLS-1$
+        writer.write("return foo();\n"); //$NON-NLS-1$
+        writer.write("}\n"); //$NON-NLS-1$
+        
+        String code = writer.toString();
+            
+        int index = code.indexOf("HANDLE h"); //$NON-NLS-1$
+        IASTNode node = parse( code, index, index + 6, true );
+        assertTrue( node instanceof IASTName );
+        assertTrue( ((IASTName)node).resolveBinding() instanceof IMacroBinding );
+        assertEquals( ((IASTName)node).toString(), "HANDLE" ); //$NON-NLS-1$
+        
+        IName[] decls = getDeclarationOffTU((IASTName)node);
+        assertEquals(decls.length, 1);
+        assertEquals( decls[0].toString(), "HANDLE" ); //$NON-NLS-1$
+        assertEquals( ((ASTNode)decls[0]).getOffset(), 36);
+        assertEquals( ((ASTNode)decls[0]).getLength(), 6);
+        
+        index = code.indexOf("test;"); //$NON-NLS-1$
+        node = parse( code, index, index + 4, true );
+        assertTrue( node instanceof IASTName );
+        assertTrue( ((IASTName)node).resolveBinding() instanceof ILabel );
+        assertEquals( ((IASTName)node).toString(), "test" ); //$NON-NLS-1$
+        
+        decls = getDeclarationOffTU((IASTName)node);
+        assertEquals(decls.length, 1);
+        assertEquals( decls[0].toString(), "test" ); //$NON-NLS-1$
+        assertLocation(code, "test:", 4, decls[0]);
+    }   
+
+    public void testBugMethodDef() throws Exception {
+        Writer writer = new StringWriter();
+        writer.write("class tetrahedron {\n"); //$NON-NLS-1$
+        writer.write("private:\n"); //$NON-NLS-1$
+        writer.write("int color;\n"); //$NON-NLS-1$
+        writer.write("public:\n"); //$NON-NLS-1$
+        writer.write("/* Methods */\n"); //$NON-NLS-1$
+        writer.write("void setColor(int c) \n"); //$NON-NLS-1$
+        writer.write("{color = c < 0 ? 0 : c;};\n"); //$NON-NLS-1$
+        writer.write("void set();\n"); //$NON-NLS-1$
+        writer.write("};\n"); //$NON-NLS-1$
+        writer.write("void tetrahedron::set() {\n"); //$NON-NLS-1$
+        writer.write("int color;\n"); //$NON-NLS-1$
+        writer.write("setColor(color);\n"); //$NON-NLS-1$
+        writer.write("}\n"); //$NON-NLS-1$        
+        
+        String code = writer.toString();
+            
+        int index = code.indexOf("setColor(color)"); //$NON-NLS-1$
+        IASTNode node = parse( code, index, index + 8, true );
+        assertTrue( node instanceof IASTName );
+        assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPMethod );
+        assertEquals( ((IASTName)node).toString(), "setColor" ); //$NON-NLS-1$
+        
+        IName[] decls = getDeclarationOffTU((IASTName)node);
+        assertEquals(decls.length, 1);
+        assertEquals( decls[0].toString(), "setColor" ); //$NON-NLS-1$
+        assertEquals( ((ASTNode)decls[0]).getOffset(), 67);
+        assertEquals( ((ASTNode)decls[0]).getLength(), 8);
+        
+        IName[] refs = getReferencesOffTU((IASTName)node);
+        assertEquals(refs.length, 1);
+        assertEquals( refs[0].toString(), "setColor" ); //$NON-NLS-1$
+        assertEquals( ((ASTNode)refs[0]).getOffset(), 162);
+        assertEquals( ((ASTNode)refs[0]).getLength(), 8);
+    }   
+
+    public void testBug86698A() throws Exception {
+        Writer writer = new StringWriter();
+        writer.write("struct C;\n"); //$NON-NLS-1$
+        writer.write("void no_opt(C*);\n"); //$NON-NLS-1$
+        writer.write("struct C {\n"); //$NON-NLS-1$
+        writer.write("int c;\n"); //$NON-NLS-1$
+        writer.write("C() : c(0) { no_opt(this); }\n"); //$NON-NLS-1$
+        writer.write("};\n"); //$NON-NLS-1$
+        
+        String code = writer.toString();
+            
+        int index = code.indexOf("c(0)"); //$NON-NLS-1$
+        IASTNode node = parse( code, index, index + 1, true );
+        assertTrue( node instanceof IASTName );
+        assertTrue( ((IASTName)node).resolveBinding() instanceof IVariable );
+        assertEquals( ((IASTName)node).toString(), "c" ); //$NON-NLS-1$
+        
+        IName[] decls = getDeclarationOffTU((IASTName)node);
+        assertEquals(decls.length, 1);
+        assertEquals( decls[0].toString(), "c" ); //$NON-NLS-1$
+        assertEquals( ((ASTNode)decls[0]).getOffset(), 42);
+        assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+    }   
+	
+    public void testBug86698B() throws Exception {
+        Writer writer = new StringWriter();
+		writer.write("int f(int);\n"); //$NON-NLS-1$
+		writer.write("class C {\n"); //$NON-NLS-1$
+		writer.write("int i;\n"); //$NON-NLS-1$
+		writer.write("double d;\n"); //$NON-NLS-1$
+		writer.write("public:\n"); //$NON-NLS-1$
+		writer.write("C(int, double);\n"); //$NON-NLS-1$
+		writer.write("};\n"); //$NON-NLS-1$
+		writer.write("C::C(int ii, double id)\n"); //$NON-NLS-1$
+		writer.write("try\n"); //$NON-NLS-1$
+		writer.write(": i(f(ii)), d(id)\n"); //$NON-NLS-1$
+		writer.write("{\n"); //$NON-NLS-1$
+		writer.write("//		 constructor function body\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+		writer.write("catch (...)\n"); //$NON-NLS-1$
+		writer.write("{\n"); //$NON-NLS-1$
+		writer.write("//		 handles exceptions thrown from the ctorinitializer\n"); //$NON-NLS-1$
+		writer.write("//		 and from the constructor function body\n"); //$NON-NLS-1$
+		writer.write("}\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+            
+        int index = code.indexOf("i(f(ii)), d(id)"); //$NON-NLS-1$
+        IASTNode node = parse( code, index, index + 1, true );
+        assertTrue( node instanceof IASTName );
+        assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPField );
+        assertEquals( ((IASTName)node).toString(), "i" ); //$NON-NLS-1$
+        
+        IName[] decls = getDeclarationOffTU((IASTName)node);
+        assertEquals(decls.length, 1);
+        assertEquals( decls[0].toString(), "i" ); //$NON-NLS-1$
+        assertEquals( code.indexOf("int i") + 4, ((ASTNode)decls[0]).getOffset());
+        assertEquals( ((ASTNode)decls[0]).getLength(), 1);
+    }   
+
+	public void testBug64181() throws Exception
+	{
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("namespace Foo { // ** (A) **\n"); //$NON-NLS-1$
+		buffer.append("int bar;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("namespace Foo { // ** (B) **\n"); //$NON-NLS-1$
+		buffer.append("long fooboo;\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		buffer.append("int \n"); //$NON-NLS-1$
+		buffer.append("main(int argc, char **argv) {\n"); //$NON-NLS-1$
+		buffer.append("Foo::bar; // ** (C) **\n"); //$NON-NLS-1$
+		buffer.append("}\n"); //$NON-NLS-1$
+		
+		String code = buffer.toString();
+		int index = code.indexOf("Foo::bar;"); //$NON-NLS-1$
+        IASTNode node = parse( code, index, index + 3, true );
+		assertNotNull( node );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPNamespace );
+		assertEquals( ((IASTName)node).toString(), "Foo" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 2);
+		assertEquals( decls[0].toString(), "Foo" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 10);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 3);
+		assertEquals( ((ASTNode)decls[1]).getOffset(), 50);
+		assertEquals( ((ASTNode)decls[1]).getLength(), 3);
+	}
+	
+	public void testBug80823() throws Exception
+	{
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("class MyEggImpl {}; // line A\n"); //$NON-NLS-1$
+		buffer.append("#define MyChicken MyEggImpl\n"); //$NON-NLS-1$
+		buffer.append("MyChicken c; // line C\n"); //$NON-NLS-1$
+
+		String code = buffer.toString();
+		int index = code.indexOf("MyChicken c;"); //$NON-NLS-1$
+        IASTNode node = parse( code, index, index + 9, true );
+		assertNotNull( node );
+		assertTrue( node instanceof IASTName );
+		assertTrue( ((IASTName)node).resolveBinding() instanceof IMacroBinding );
+		assertEquals( ((IASTName)node).toString(), "MyChicken" ); //$NON-NLS-1$
+		IName[] decls = getDeclarationOffTU((IASTName)node);
+		assertEquals(decls.length, 1);
+		assertEquals( decls[0].toString(), "MyChicken" ); //$NON-NLS-1$
+		assertEquals( ((ASTNode)decls[0]).getOffset(), 38);
+		assertEquals( ((ASTNode)decls[0]).getLength(), 9);
+	}
+
+    public void testBug86993() throws Exception
+    {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("#define _BEGIN_STD_C extern \"C\" {\n"); //$NON-NLS-1$
+        buffer.append("#define _END_STD_C  }\n"); //$NON-NLS-1$
+        buffer.append("_BEGIN_STD_C\n"); //$NON-NLS-1$
+        buffer.append("char c; // selection on this fails because offset for \n"); //$NON-NLS-1$
+        buffer.append("_END_STD_C\n"); //$NON-NLS-1$
+        buffer.append("char foo() {\n"); //$NON-NLS-1$
+        buffer.append("return c; // ref   \n"); //$NON-NLS-1$
+        buffer.append("}\n"); //$NON-NLS-1$            
+        
+        String code = buffer.toString();
+        int index = code.indexOf("return c;"); //$NON-NLS-1$
+        IASTNode node = parse( code, index + 7, index + 8, true );
+        assertNotNull( node );
+        assertTrue( node instanceof IASTName );
+        assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPVariable );
+        assertEquals( ((IASTName)node).toString(), "c" ); //$NON-NLS-1$
+        IName[] decls = getDeclarationOffTU((IASTName)node);
+        assertEquals(decls.length, 1);
+        assertEquals( decls[0].toString(), "c" ); //$NON-NLS-1$
+        assertLocation(code, "c;", 1, decls[0]);
+        
+        index = code.indexOf("char c"); //$NON-NLS-1$
+        node = parse( code, index + 5, index + 6, true );
+        assertNotNull( node );
+        assertTrue( node instanceof IASTName );
+        assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPVariable );
+        IName[] refs = getReferencesOffTU((IASTName)node);
+        assertEquals(refs.length, 1);
+        assertEquals( refs[0].toString(), "c" ); //$NON-NLS-1$
+        assertLocation(code, "c; // ref", 1, refs[0]);
+    }
+    
+    private void assertLocation(String code, String occur, int length, IName name) {
+    	int offset= code.indexOf(occur);
+    	final IASTFileLocation loc= name.getFileLocation();
+    	assertEquals(offset, loc.getNodeOffset());
+    	assertEquals(length, loc.getNodeLength());
+	}
+
+	public void testBug92632() throws Exception
+    {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("namespace N{ \n"); //$NON-NLS-1$
+        buffer.append("            template < class T > class AAA { T _t; };\n"); //$NON-NLS-1$
+        buffer.append("}       \n"); //$NON-NLS-1$
+        buffer.append("N::AAA<int> a;  \n"); //$NON-NLS-1$
+        
+        String code = buffer.toString();
+        int index = code.indexOf("AAA<int>"); //$NON-NLS-1$
+        IASTNode node = parse( code, index, index + 8, true );
+        assertNotNull( node );
+        assertTrue( node instanceof IASTName );
+        assertTrue( ((IASTName)node).resolveBinding() instanceof ICPPTemplateInstance );
+        assertEquals( ((IASTName)node).toString(), "AAA<int>" ); //$NON-NLS-1$
+        IName[] decls = getDeclarationOffTU((IASTName)node);
+        assertEquals(decls.length, 1);
+        assertEquals( decls[0].toString(), "AAA" ); //$NON-NLS-1$
+        assertEquals( ((ASTNode)decls[0]).getOffset(), 53);
+        assertEquals( ((ASTNode)decls[0]).getLength(), 3);
+    }
+    
+}
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/FaultToleranceTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/FaultToleranceTests.java
new file mode 100644
index 0000000..ae064f0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/FaultToleranceTests.java
@@ -0,0 +1,263 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarationStatement;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTIfStatement;
+import org.eclipse.cdt.core.dom.ast.IASTProblemDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTProblemExpression;
+import org.eclipse.cdt.core.dom.ast.IASTProblemStatement;
+import org.eclipse.cdt.core.dom.ast.IASTReturnStatement;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLinkageSpecification;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+
+/**
+ * Testcases related to recovery from invalid syntax.
+ */
+public class FaultToleranceTests extends AST2BaseTest {
+	
+	public static TestSuite suite() {
+		return suite(FaultToleranceTests.class);
+	}
+	
+	public FaultToleranceTests() {
+		super();
+	}
+	
+	public FaultToleranceTests(String name) {
+		super(name);
+	}
+	
+	// typedef int tint;
+	// struct X {
+	//    int a;
+	// }
+	// tint b;
+    public void testCompositeTypeWithoutSemi() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang, false, false);
+    		IASTCompositeTypeSpecifier def= getCompositeType(tu, 1);
+    		IASTProblemDeclaration pdecl= getDeclaration(tu, 2);
+    		IASTSimpleDeclaration sdecl= getDeclaration(tu, 3);
+    	}
+    }
+
+	// typedef int tint;
+	// struct X {
+	//    int a;
+	// } c
+	// tint b;
+    public void testCompositeTypeWithDtorWithoutSemi() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang, false, false);
+    		IASTSimpleDeclaration sdecl= getDeclaration(tu, 1);
+    		assertInstance(sdecl.getDeclSpecifier(), IASTCompositeTypeSpecifier.class);
+    		assertEquals(1, sdecl.getDeclarators().length);
+    		IASTProblemDeclaration pdecl= getDeclaration(tu, 2);
+    		sdecl= getDeclaration(tu, 3);
+    	}
+    }
+    
+	// typedef int tint;
+    // int a
+	// tint b;
+    public void testVariableWithoutSemi() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang, false, false);
+    		IASTSimpleDeclaration sdecl= getDeclaration(tu, 1);
+    		assertEquals("int a", sdecl.getRawSignature());
+    		IASTProblemDeclaration pdecl= getDeclaration(tu, 2);
+    		sdecl= getDeclaration(tu, 3);
+    	}
+    }
+
+	// typedef int tint;
+    // int a()
+	// tint b;
+    public void testPrototypeWithoutSemi() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang, false, false);
+    		IASTSimpleDeclaration sdecl= getDeclaration(tu, 1);
+    		assertEquals("int a()", sdecl.getRawSignature());
+    		IASTProblemDeclaration pdecl= getDeclaration(tu, 2);
+    		sdecl= getDeclaration(tu, 3);
+    	}
+    }
+    
+    // struct X {
+    //   int a;
+    public void testIncompleteCompositeType() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang, false, false);
+    		IASTCompositeTypeSpecifier comp= getCompositeType(tu, 0);
+    		IASTProblemDeclaration pdecl= getDeclaration(tu, 1);
+    		
+    		IASTSimpleDeclaration sdecl= getDeclaration(comp, 0);
+    	}
+    }
+    
+    // void func() {
+    //   int a;
+    public void testIncompleteFunctionDefinition() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang, false, false);
+    		IASTFunctionDefinition fdef= getDeclaration(tu, 0);
+    		IASTProblemDeclaration pdecl= getDeclaration(tu, 1);
+    		
+    		IASTDeclarationStatement sdecl= getStatement(fdef, 0);
+    	}
+    }
+    
+
+    // namespace ns {
+    //   int a;
+    public void testIncompleteNamespace() throws Exception {
+    	final String comment= getAboveComment();
+    	IASTTranslationUnit tu= parse(comment, ParserLanguage.CPP, false, false);
+    	ICPPASTNamespaceDefinition ns= getDeclaration(tu, 0);
+    	IASTProblemDeclaration pdecl= getDeclaration(tu, 1);
+
+    	IASTSimpleDeclaration sdecl= getDeclaration(ns, 0);
+    }
+
+    // extern "C" {
+    //   int a;
+    public void testIncompleteLinkageSpec() throws Exception {
+    	final String comment= getAboveComment();
+    	IASTTranslationUnit tu= parse(comment, ParserLanguage.CPP, false, false);
+    	ICPPASTLinkageSpecification ls= getDeclaration(tu, 0);
+    	IASTProblemDeclaration pdecl= getDeclaration(tu, 1);
+
+    	IASTSimpleDeclaration sdecl= getDeclaration(ls, 0);
+    }
+
+    // void test() {
+    //    int a= offsetof(struct mystruct, singlechar);
+    // }
+    public void testRangeOfProblemNode_Bug238151() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang, false, false);
+    		IASTFunctionDefinition fdef= getDeclaration(tu, 0);
+    		IASTProblemStatement pdecl= getStatement(fdef, 0);
+    		assertEquals("int a= offsetof(struct mystruct, singlechar);", pdecl.getRawSignature());
+    	}
+    }
+    
+    // int f(){
+    //    if( 12 A )
+    //       return -1;
+    //    int v;
+    // }
+    public void testProblemInIfExpression_Bug100321() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang, false, false);
+    		IASTFunctionDefinition fdef= getDeclaration(tu, 0);
+    		IASTIfStatement ifstmt= getStatement(fdef, 0);
+    		assertInstance(ifstmt.getConditionExpression(), IASTProblemExpression.class);
+    		assertEquals("12 A", ifstmt.getConditionExpression().getRawSignature());
+    		assertInstance(ifstmt.getThenClause(), IASTReturnStatement.class);
+    	}
+    }
+    
+    // _MYMACRO_ myType foo();
+    // _MYMACRO_ myType foo() {}
+    // extern void foo2() _MYMACRO_;
+    public void testUndefinedMacrosInFunctionDeclarations_Bug234085() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang, false, false);
+    		IASTProblemDeclaration pd= getDeclaration(tu, 0);
+    		assertEquals("_MYMACRO_", pd.getRawSignature());
+    		IASTSimpleDeclaration sdecl= getDeclaration(tu, 1);
+    		assertEquals("myType foo();", sdecl.getRawSignature());
+    		
+    		pd= getDeclaration(tu, 2);
+    		assertEquals("_MYMACRO_", pd.getRawSignature());
+    		IASTFunctionDefinition fdef= getDeclaration(tu, 3);
+    		assertEquals("myType foo() {}", fdef.getRawSignature());
+
+    		sdecl= getDeclaration(tu, 4);
+    		assertEquals("extern void foo2()", sdecl.getRawSignature());
+    		pd= getDeclaration(tu, 5);
+    		assertEquals("", pd.getRawSignature()); // the missing semicolon
+    		
+    		if (lang == ParserLanguage.CPP) {
+    			pd= getDeclaration(tu, 6);
+    			assertEquals("_MYMACRO_;", pd.getRawSignature());
+    		} else {
+    			sdecl= getDeclaration(tu, 6);
+    			assertEquals("_MYMACRO_;", sdecl.getRawSignature());
+    		}
+    	}
+    }
+
+    // enum _T { I J, K }; // missing comma
+    // int i;
+    public void testEnumProblem() throws Exception {
+    	final String comment= getAboveComment();
+    	for (ParserLanguage lang : ParserLanguage.values()) {
+    		IASTTranslationUnit tu= parse(comment, lang, false, false);
+    		IASTSimpleDeclaration e= getDeclaration(tu, 0);
+    		IASTProblemDeclaration p= getDeclaration(tu, 1);
+    		assertEquals("J, K };", p.getRawSignature());
+    		IASTSimpleDeclaration s= getDeclaration(tu, 2);
+    		assertEquals("int i;", s.getRawSignature());
+    	}
+    }
+
+    // class A {
+    //    enum _T { I J, K }; // missing comma
+    //    int i;
+    // };
+    public void testEnumError_Bug72685() throws Exception {
+    	final String comment= getAboveComment();
+    	IASTTranslationUnit tu= parse(comment, ParserLanguage.CPP, false, false);
+    	IASTCompositeTypeSpecifier ct= getCompositeType(tu, 0);
+    	IASTSimpleDeclaration e= getDeclaration(ct, 0);
+    	IASTProblemDeclaration p= getDeclaration(ct, 1);
+    	assertEquals("J, K };", p.getRawSignature());
+    	IASTSimpleDeclaration s= getDeclaration(ct, 2);
+    	assertEquals("int i;", s.getRawSignature());
+    }
+    
+	
+	//	#define XX() .
+	//	int c;
+	//	XX(
+	//	);
+	//	int d;
+	public void testErrorRecovery_273759() throws Exception {
+		IASTTranslationUnit tu= parse(getAboveComment(), ParserLanguage.C, false, false); 
+    	IASTSimpleDeclaration s= getDeclaration(tu, 0);
+    	IASTProblemDeclaration p= getDeclaration(tu, 1);
+    	s= getDeclaration(tu, 2);
+		
+    	tu= parse(getAboveComment(), ParserLanguage.CPP, false, false); 
+    	s= getDeclaration(tu, 0);
+    	p= getDeclaration(tu, 1);
+    	s= getDeclaration(tu, 2);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/GCCCompleteParseExtensionsTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/GCCCompleteParseExtensionsTest.java
new file mode 100644
index 0000000..91db6fc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/GCCCompleteParseExtensionsTest.java
@@ -0,0 +1,411 @@
+/*******************************************************************************
+ *  Copyright (c) 2004, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *    IBM Rational Software - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.io.StringWriter;
+import java.io.Writer;
+
+import org.eclipse.cdt.core.dom.ast.ASTSignatureUtil;
+import org.eclipse.cdt.core.dom.ast.IASTASMDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTInitializerExpression;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IFunctionType;
+import org.eclipse.cdt.core.dom.ast.c.ICASTPointer;
+import org.eclipse.cdt.core.dom.ast.c.ICASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTPointer;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTFunctionDefinition;
+import org.eclipse.cdt.internal.core.dom.parser.c.CFunction;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+/**
+ * @author jcamelon
+ *
+ */
+public class GCCCompleteParseExtensionsTest extends AST2BaseTest {
+
+	public GCCCompleteParseExtensionsTest() {
+	}
+
+	public GCCCompleteParseExtensionsTest(String name) {
+		super(name);
+	}
+
+	private IASTTranslationUnit parseGCC(String code) throws ParserException {
+		IASTTranslationUnit tu = parse(code, ParserLanguage.C, true, true); 
+		
+		CNameResolver resolver = new CNameResolver();
+		tu.accept(resolver);
+		if (resolver.numProblemBindings > 0)
+			throw new ParserException(" there are " + resolver.numProblemBindings + " ProblemBindings on the tu"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (resolver.numNullBindings > 0)
+			throw new ParserException("Expected no null bindings, encountered " + resolver.numNullBindings); //$NON-NLS-1$
+		
+		return tu;
+	}
+	
+	private IASTTranslationUnit parseGPP(String code) throws ParserException {
+		IASTTranslationUnit tu = parse(code, ParserLanguage.CPP, true, true); 
+
+		CPPNameResolver resolver = new CPPNameResolver();
+		tu.accept(resolver);
+		if (resolver.numProblemBindings > 0)
+			throw new ParserException(" there are " + resolver.numProblemBindings + " ProblemBindings on the tu"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (resolver.numNullBindings > 0)
+			throw new ParserException("Expected no null bindings, encountered " + resolver.numNullBindings); //$NON-NLS-1$
+		
+		return tu;
+	}
+	
+    public void testBug39695() throws Exception
+    {
+        parseGCC("int a = __alignof__ (int);").getDeclarations(); //$NON-NLS-1$
+    }
+    
+    public void testBug39684() throws Exception
+    {
+    	IASTDeclaration bar = parseGCC("typeof(foo(1)) bar () { return foo(1); }").getDeclarations()[0]; //$NON-NLS-1$
+		assertTrue(bar instanceof CASTFunctionDefinition);
+		CFunction barFunc = (CFunction)((CASTFunctionDefinition)bar).getDeclarator().getName().resolveBinding();
+		IFunctionType type = barFunc.getType();
+		
+    	// TODO Devin typeof declSpec has 0 length, also doesn't seem to have a type for typeof... raise a bug
+//    	IASTSimpleTypeSpecifier simpleTypeSpec = ((IASTSimpleTypeSpecifier)bar.getReturnType().getTypeSpecifier());
+//		assertEquals( simpleTypeSpec.getType(), IASTGCCSimpleTypeSpecifier.Type.TYPEOF );
+    }
+
+    public void testBug39698A() throws Exception
+    {
+        IASTDeclaration[] decls = parseGPP("int a=0; \n int b=1; \n int c = a <? b;").getDeclarations(); //$NON-NLS-1$
+        assertEquals( ASTSignatureUtil.getExpressionString( ((IASTInitializerExpression)((IASTSimpleDeclaration)decls[2]).getDeclarators()[0].getInitializer()).getExpression() ), "a <? b" ); //$NON-NLS-1$
+    }
+    public void testBug39698B() throws Exception
+    {
+    	IASTDeclaration[] decls = parseGPP("int a=0; \n int b=1; \n int c = a >? b;").getDeclarations(); //$NON-NLS-1$
+        assertEquals( ASTSignatureUtil.getExpressionString( ((IASTInitializerExpression)((IASTSimpleDeclaration)decls[2]).getDeclarators()[0].getInitializer()).getExpression() ), "a >? b" ); //$NON-NLS-1$
+    }
+
+	public void testPredefinedSymbol_bug69791() throws Exception {
+		parseGPP("typedef __builtin_va_list __gnuc_va_list; \n").getDeclarations();//$NON-NLS-1$
+		parseGCC("typedef __builtin_va_list __gnuc_va_list; \n").getDeclarations();//$NON-NLS-1$
+	}
+
+	public void testBug39697() throws Exception
+	{
+		Writer writer = new StringWriter();
+		writer.write( "__asm__( \"CODE\" );\n" ); //$NON-NLS-1$
+		writer.write( "__inline__ int foo() { return 4; }\n"); //$NON-NLS-1$
+		writer.write( "__const__ int constInt;\n"); //$NON-NLS-1$
+		writer.write( "__volatile__ int volInt;\n"); //$NON-NLS-1$
+		writer.write( "__signed__ int signedInt;\n"); //$NON-NLS-1$
+		IASTDeclaration[] decls = parseGCC( writer.toString() ).getDeclarations();
+		
+        assertEquals(((IASTASMDeclaration)decls[0]).getAssembly(), "\"CODE\""); //$NON-NLS-1$
+        assertTrue( ((IASTFunctionDefinition)decls[1]).getDeclSpecifier().isInline() );
+        assertTrue( ((IASTSimpleDeclaration)decls[2]).getDeclSpecifier().isConst() );
+        assertTrue( ((IASTSimpleDeclaration)decls[3]).getDeclSpecifier().isVolatile() );
+        assertTrue( ((ICASTSimpleDeclSpecifier)((IASTSimpleDeclaration)decls[4]).getDeclSpecifier()).isSigned() );
+
+        writer = new StringWriter();
+        writer.write( "int * __restrict__ resPointer1;\n"); //$NON-NLS-1$
+        writer.write( "int * __restrict resPointer2;\n"); //$NON-NLS-1$
+        decls = parseGCC( writer.toString() ).getDeclarations();
+        assertTrue( ((ICASTPointer)((IASTSimpleDeclaration)decls[0]).getDeclarators()[0].getPointerOperators()[0]).isRestrict() );
+        assertTrue( ((ICASTPointer)((IASTSimpleDeclaration)decls[1]).getDeclarators()[0].getPointerOperators()[0]).isRestrict() );
+
+        writer = new StringWriter();
+        writer.write( "int * __restrict__ resPointer1;\n"); //$NON-NLS-1$
+        writer.write( "int * __restrict resPointer2;\n"); //$NON-NLS-1$
+        decls = parseGPP( writer.toString() ).getDeclarations();
+        assertTrue( ((IGPPASTPointer)((IASTSimpleDeclaration)decls[0]).getDeclarators()[0].getPointerOperators()[0]).isRestrict() );
+        assertTrue( ((IGPPASTPointer)((IASTSimpleDeclaration)decls[1]).getDeclarators()[0].getPointerOperators()[0]).isRestrict() );
+
+	}
+
+	public void testBug73954A() throws Exception{
+	    StringWriter writer = new StringWriter();
+		writer.write("void f(){							\n");//$NON-NLS-1$
+		writer.write("	__builtin_expect( 23, 2); 		\n");//$NON-NLS-1$
+		writer.write("	__builtin_prefetch( (const void *)0, 1, 2);				\n");//$NON-NLS-1$
+		writer.write("	__builtin_huge_val();			\n");//$NON-NLS-1$
+		writer.write("	__builtin_huge_valf();			\n");//$NON-NLS-1$
+		writer.write("	__builtin_huge_vall();			\n");//$NON-NLS-1$
+		writer.write("	__builtin_inf();				\n");//$NON-NLS-1$
+		writer.write("	__builtin_inff();				\n");//$NON-NLS-1$
+		writer.write("	__builtin_infl();				\n");//$NON-NLS-1$
+		writer.write("	__builtin_nan(\"\");			\n");//$NON-NLS-1$
+		writer.write("	__builtin_nanf(\"\");			\n");//$NON-NLS-1$
+		writer.write("	__builtin_nanl(\"\");			\n");//$NON-NLS-1$
+		writer.write("	__builtin_nans(\"\");			\n");//$NON-NLS-1$
+		writer.write("	__builtin_nansf(\"\");			\n");//$NON-NLS-1$
+		writer.write("	__builtin_nansl(\"\");			\n");//$NON-NLS-1$
+		writer.write("	__builtin_ffs (0);				\n");//$NON-NLS-1$
+		writer.write("	__builtin_clz (0);				\n");//$NON-NLS-1$
+		writer.write("	__builtin_ctz (0);				\n");//$NON-NLS-1$
+		writer.write("	__builtin_popcount (0);			\n");//$NON-NLS-1$
+		writer.write("	__builtin_parity (0);			\n");//$NON-NLS-1$
+		writer.write("	__builtin_ffsl (0);				\n");//$NON-NLS-1$
+		writer.write("	__builtin_clzl (0);				\n");//$NON-NLS-1$
+		writer.write("	__builtin_ctzl (0);				\n");//$NON-NLS-1$
+		writer.write("	__builtin_popcountl (0);		\n");//$NON-NLS-1$
+		writer.write("	__builtin_parityl (0);			\n");//$NON-NLS-1$
+		writer.write("	__builtin_ffsll (0);			\n");//$NON-NLS-1$
+		writer.write("	__builtin_clzll (0);			\n");//$NON-NLS-1$
+		writer.write("	__builtin_ctzll (0);			\n");//$NON-NLS-1$
+		writer.write("	__builtin_popcountll (0);		\n");//$NON-NLS-1$
+		writer.write("	__builtin_parityll (0); 		\n");//$NON-NLS-1$
+		writer.write("	__builtin_powi (0, 0); 			\n");//$NON-NLS-1$
+		writer.write("	__builtin_powif (0, 0);	 		\n");//$NON-NLS-1$
+		writer.write("	__builtin_powil (0, 0);   		\n");//$NON-NLS-1$
+		writer.write("}                                 \n"); //$NON-NLS-1$
+		
+	    parseGCC( writer.toString() );
+	}
+	
+    public void testBug39686() throws Exception
+    {
+        Writer code = new StringWriter();
+        code.write("__complex__ double x; // complex double\n"); //$NON-NLS-1$
+        code.write("__complex__ short int a; // complex short int\n"); //$NON-NLS-1$
+        code.write("__complex__ float y = 2.5fi; // 2.5 imaginary float literal\n"); //$NON-NLS-1$
+        code.write("__complex__ int z = 3i; // imaginary intege r literal\n"); //$NON-NLS-1$
+        code.write("double v = __real__ x; // real part of expression\n"); //$NON-NLS-1$
+        code.write("double w = __imag__ x; // imaginary part of expression\n"); //$NON-NLS-1$
+        parseGCC(code.toString());
+    }
+    
+	public void testBug39551B() throws Exception
+	{
+	    //this used to be 99.99 * __I__, but I don't know where the __I__ came from, its not in C99, nor in GCC
+		IASTDeclaration decl = parseGCC("_Imaginary double id = 99.99 * 1i;").getDeclarations()[0]; //$NON-NLS-1$
+		// TODO Devin does ICPPASTSimpleDeclSpecifier need something for isImaginary ?
+		//		assertEquals( variable.getName(), "id"); //$NON-NLS-1$
+//		assertTrue( ((IASTSimpleTypeSpecifier)variable.getAbstractDeclaration().getTypeSpecifier()).isImaginary() );
+	}
+    
+    public void testBug39681() throws Exception
+    {
+        Writer code = new StringWriter();
+        code.write("double\n"); //$NON-NLS-1$
+        code.write("foo (double a, double b)\n"); //$NON-NLS-1$
+        code.write("{\n"); //$NON-NLS-1$
+        code.write("  double square (double z) { return z * z; }\n"); //$NON-NLS-1$
+        code.write("  return square (a) + square (b);\n"); //$NON-NLS-1$
+        code.write("}\n"); //$NON-NLS-1$
+        parseGCC(code.toString());
+    }
+    
+    public void testBug39677() throws Exception
+    {
+		parseGPP("class B { public: B(); int a;}; B::B() : a(({ 1; })) {}"); //$NON-NLS-1$
+        Writer writer = new StringWriter();
+        writer.write( "int foo(); class B { public: B(); int a;};");
+        writer.write( "B::B() : a(( { int y = foo (); int z;\n" ); //$NON-NLS-1$
+        writer.write( "if (y > 0) z = y;\n" ); //$NON-NLS-1$
+        writer.write( "else z = - y;\n" );//$NON-NLS-1$
+        writer.write( "z; })) {}\n" );//$NON-NLS-1$
+		parseGPP( writer.toString() );
+        
+        writer = new StringWriter();
+        writer.write( "int x = ({ int foo() { return 1; } int y = foo (); int z;\n" ); //$NON-NLS-1$
+        writer.write( "if (y > 0) z = y;\n" ); //$NON-NLS-1$
+        writer.write( "else z = - y;\n" );//$NON-NLS-1$
+        writer.write( "z; });\n" );//$NON-NLS-1$
+		parseGPP( writer.toString() );
+        
+        writer = new StringWriter();
+        writer.write( "int foo();                       \n" ); //$NON-NLS-1$
+        writer.write( "typeof({ int y = foo ();         \n" ); //$NON-NLS-1$
+        writer.write( "         int z;                  \n" ); //$NON-NLS-1$
+        writer.write( "         if (y > 0) z = y;       \n" ); //$NON-NLS-1$
+        writer.write( "         else z = - y;           \n" ); //$NON-NLS-1$
+        writer.write( "         z;                      \n" ); //$NON-NLS-1$
+        writer.write( "       }) zoot;                  \n" ); //$NON-NLS-1$
+        
+        parseGPP( writer.toString() ); // TODO Devin raised bug 93980
+    }
+    
+    public void testBug75401() throws Exception {
+        Writer writer = new StringWriter();
+        writer.write( "#define va_list  __builtin_va_list            \n"); //$NON-NLS-1$
+        writer.write( "#define va_arg(v,l) __builtin_va_arg(v,l)     \n"); //$NON-NLS-1$
+        writer.write( "#define va_start(v,l) __builtin_va_start(v,l) \n"); //$NON-NLS-1$
+        writer.write( "#define va_end(v) __builtin_va_end(v)         \n"); //$NON-NLS-1$
+        writer.write( "void variadic(int first, ...) {               \n"); //$NON-NLS-1$
+        writer.write( "   va_list v;                                 \n"); //$NON-NLS-1$
+        writer.write( "   va_start(v, first);                        \n"); //$NON-NLS-1$
+        writer.write( "   long l = va_arg(v, long);                  \n"); //$NON-NLS-1$
+        writer.write( "   va_end(v);                                 \n"); //$NON-NLS-1$
+        writer.write( "}                                             \n"); //$NON-NLS-1$
+
+        parseGCC(writer.toString());
+        parseGPP(writer.toString());
+    }
+
+    public void testBug73954B() throws Exception {
+        Writer writer = new StringWriter();
+        writer.write( "#define foo(x)                                            \\\n"); //$NON-NLS-1$
+        writer.write( "  __builtin_choose_expr( 1, foo_d(x), (void)0 )             \n"); //$NON-NLS-1$
+        writer.write( "int foo_d( int x );                                         \n"); //$NON-NLS-1$
+        writer.write( "int main() {                                                \n"); //$NON-NLS-1$
+        writer.write( "   if( __builtin_constant_p(1) &&                           \n"); //$NON-NLS-1$
+        writer.write( "      __builtin_types_compatible_p( 1, 'c') )               \n"); //$NON-NLS-1$
+        writer.write( "          foo(1);                                           \n"); //$NON-NLS-1$
+        writer.write( "}                                                           \n"); //$NON-NLS-1$
+        
+        parseGCC( writer.toString());
+    }
+    
+	public void testGNUExternalTemplate_bug71603() throws Exception {
+		parseGPP("template <typename T> \n class A {}; \n extern template class A<int>; \n").getDeclarations(); //$NON-NLS-1$
+	}
+
+	public void testBug74190_g_assert_1() throws Exception {
+	    Writer writer = new StringWriter();
+	    writer.write( "void log( int );               \n"); //$NON-NLS-1$
+	    writer.write( "void f() {                     \n"); //$NON-NLS-1$
+	    writer.write( "    int a = 1;                 \n"); //$NON-NLS-1$
+	    writer.write( "    (void)({ if( a ){ }        \n"); //$NON-NLS-1$
+	    writer.write( "             else{ log( a ); } \n"); //$NON-NLS-1$
+	    writer.write( "           });                 \n"); //$NON-NLS-1$
+	    writer.write( "}                              \n"); //$NON-NLS-1$
+	    
+        parseGCC( writer.toString() );
+        parseGPP( writer.toString() );
+	}
+	
+	public void testBug74190_g_return_if_fail() throws Exception {
+	    Writer writer = new StringWriter();
+	    writer.write( "void f() {                     \n"); //$NON-NLS-1$
+	    writer.write( "    (void)({ if( ( ({ 0; }) ) ) \n"); //$NON-NLS-1$
+	    writer.write( "            { }                \n"); //$NON-NLS-1$
+	    writer.write( "           });                 \n"); //$NON-NLS-1$
+	    writer.write( "}                              \n"); //$NON-NLS-1$
+	    
+        parseGCC( writer.toString() );
+        parseGPP( writer.toString() );
+	}
+    
+	public void testBug95635() throws Exception{
+        StringWriter writer = new StringWriter();
+        writer.write("void f(){                         \n");//$NON-NLS-1$
+        writer.write("    char a[10];                   \n"); //$NON-NLS-1$
+        writer.write("    __builtin_va_list b;          \n"); //$NON-NLS-1$
+        writer.write("    __builtin_abort();            \n");//$NON-NLS-1$
+        writer.write("    __builtin_exit(1);            \n");//$NON-NLS-1$
+        writer.write("    __builtin__Exit(1);           \n");//$NON-NLS-1$
+        writer.write("    __builtin__exit(1);           \n");//$NON-NLS-1$
+        writer.write("    __builtin_conj(1);            \n");//$NON-NLS-1$
+        writer.write("    __builtin_conjf(1);           \n");//$NON-NLS-1$
+        writer.write("    __builtin_conjl(1);           \n");//$NON-NLS-1$
+        writer.write("    __builtin_creal(1);           \n");//$NON-NLS-1$
+        writer.write("    __builtin_crealf(1);          \n");//$NON-NLS-1$
+        writer.write("    __builtin_creall(1);          \n");//$NON-NLS-1$
+        writer.write("    __builtin_cimag(1);           \n");//$NON-NLS-1$
+        writer.write("    __builtin_cimagf(1);          \n");//$NON-NLS-1$
+        writer.write("    __builtin_cimagl(1);          \n");//$NON-NLS-1$
+        writer.write("    __builtin_imaxabs(1);         \n");//$NON-NLS-1$
+        writer.write("    __builtin_llabs(1);           \n");//$NON-NLS-1$
+        writer.write("    __builtin_vscanf(\"\",b);\n");//$NON-NLS-1$
+        writer.write("    __builtin_vsnprintf(a, 1, \"\", b); \n");//$NON-NLS-1$
+        writer.write("    __builtin_vsscanf(\"\", \"\", b);\n");//$NON-NLS-1$
+        writer.write("    __builtin_cosf(1);            \n");//$NON-NLS-1$
+        writer.write("    __builtin_cosl(1);            \n");//$NON-NLS-1$
+        writer.write("    __builtin_expf(1);            \n");//$NON-NLS-1$
+        writer.write("    __builtin_expl(1);            \n");//$NON-NLS-1$
+        writer.write("    __builtin_fabsf(1);           \n");//$NON-NLS-1$
+        writer.write("    __builtin_fabsl(1);           \n");//$NON-NLS-1$
+        writer.write("    __builtin_logf(1);            \n");//$NON-NLS-1$
+        writer.write("    __builtin_logl(1);            \n");//$NON-NLS-1$
+        writer.write("    __builtin_sinf(1);            \n");//$NON-NLS-1$
+        writer.write("    __builtin_sinl(1);            \n");//$NON-NLS-1$
+        writer.write("    __builtin_sqrtf(1);           \n");//$NON-NLS-1$
+        writer.write("    __builtin_sqrtl(1);           \n");//$NON-NLS-1$
+        writer.write("    __builtin_abs(1);             \n");//$NON-NLS-1$
+        writer.write("    __builtin_cos(1);             \n");//$NON-NLS-1$
+        writer.write("    __builtin_exp(1);             \n");//$NON-NLS-1$
+        writer.write("    __builtin_fabs(1);            \n");//$NON-NLS-1$
+        writer.write("    __builtin_fprintf((void*)0, \"\");\n");//$NON-NLS-1$
+        writer.write("    __builtin_fputs(\"\", (void*)0);\n");//$NON-NLS-1$
+        writer.write("    __builtin_labs(1);            \n");//$NON-NLS-1$
+        writer.write("    __builtin_log(1);             \n");//$NON-NLS-1$
+        writer.write("    __builtin_memcmp((void*)0, (void*)0, 1);\n");//$NON-NLS-1$
+        writer.write("    __builtin_memcpy((void*)0,(void*)0, 1);\n");//$NON-NLS-1$
+        writer.write("    __builtin_memset((void*)0, 1, 1);\n");//$NON-NLS-1$
+        writer.write("    __builtin_printf(\"\");       \n");//$NON-NLS-1$
+        writer.write("    __builtin_putchar(1);         \n");//$NON-NLS-1$
+        writer.write("    __builtin_puts(\"\");            \n");//$NON-NLS-1$
+        writer.write("    __builtin_scanf(\"\");        \n");//$NON-NLS-1$
+        writer.write("    __builtin_sin(1);             \n");//$NON-NLS-1$
+        writer.write("    __builtin_snprintf(a, 1, \"\");\n");//$NON-NLS-1$
+        writer.write("    __builtin_sprintf(a, \"\");\n");//$NON-NLS-1$
+        writer.write("    __builtin_sqrt(1);            \n");//$NON-NLS-1$
+        writer.write("    __builtin_sscanf(\"\", \"\"); \n");//$NON-NLS-1$1
+        writer.write("    __builtin_strcat(a, \"\"); \n");//$NON-NLS-1$
+        writer.write("    __builtin_strchr(\"\", 1); \n");//$NON-NLS-1$
+        writer.write("    __builtin_strcmp(\"\", \"\"); \n");//$NON-NLS-1$
+        writer.write("    __builtin_strcpy(a, \"\"); \n");//$NON-NLS-1$
+        writer.write("    __builtin_strcspn(\"\", \"\");\n");//$NON-NLS-1$
+        writer.write("    __builtin_strlen(\"\");       \n");//$NON-NLS-1$
+        writer.write("    __builtin_strncat(a, \"\", 1);\n");//$NON-NLS-1$
+        writer.write("    __builtin_strncmp(\"\", \"\", 1);\n");//$NON-NLS-1$
+        writer.write("    __builtin_strncpy(a, \"\", 1);\n");//$NON-NLS-1$
+        writer.write("    __builtin_strpbrk(\"\", \"\");\n");//$NON-NLS-1$
+        writer.write("    __builtin_strrchr(\"\", 1);   \n");//$NON-NLS-1$
+        writer.write("    __builtin_strspn(\"\", \"\"); \n");//$NON-NLS-1$
+        writer.write("    __builtin_strstr(\"\", \"\"); \n");//$NON-NLS-1$
+        writer.write("    __builtin_strstr(\"\", \"\"); \n");//$NON-NLS-1$
+        writer.write("    __builtin_vprintf(a, b);\n");//$NON-NLS-1$
+        writer.write("    __builtin_vsprintf(a, 1, \"\", b);    \n");//$NON-NLS-1$
+        writer.write("    __builtin_isgreater(1,1);      \n");//$NON-NLS-1$
+        writer.write("    __builtin_isgreaterequal(1,1);\n");//$NON-NLS-1$
+        writer.write("    __builtin_isless(1,1);        \n");//$NON-NLS-1$
+        writer.write("    __builtin_islessequal(1,1);   \n");//$NON-NLS-1$
+        writer.write("    __builtin_islessgreater(1,1); \n");//$NON-NLS-1$
+        writer.write("    __builtin_isunordered(1,1);   \n");//$NON-NLS-1$
+        writer.write("}                                 \n"); //$NON-NLS-1$
+        
+        parseGCC( writer.toString() );
+        parseGPP( writer.toString() );
+    }
+	
+	// typedef int size_t;  // will be defined in <stddef.h>
+	// struct S {int m;};
+	// void test() {
+	//    int a= __builtin_offsetof(struct S, m);  
+	// };
+	public void test__builtinOffsetof_Bug265001() throws Exception {
+		// gcc with __GNUC__ >= 4 defines:
+		// #define offsetof(type, field) __builtin_offsetof(type, field)
+
+		String code= getAboveComment();
+		parseGCC(code);
+		parseGPP(code);
+	}
+
+	// typedef struct S {int m;} T;
+	// void test() {
+	//    int a= __offsetof__(1);           
+	// };
+	public void test__offsetof__Bug265001() throws Exception {
+		// gcc with __GNUC__ < 4 defines:
+		//		#define offsetof(type, field)					\
+		//		(__offsetof__ (reinterpret_cast <__size_t>		\
+		//			 (& reinterpret_cast <const volatile char &>	\
+		//			  (static_cast<type *> (0)->field))))
+		String code= getAboveComment();
+		parseGPP(code);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/GCCTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/GCCTests.java
new file mode 100644
index 0000000..46ee3cb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/GCCTests.java
@@ -0,0 +1,833 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/*
+ * Created on Nov 22, 2004
+ */
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IEnumeration;
+import org.eclipse.cdt.core.dom.ast.IEnumerator;
+import org.eclipse.cdt.core.dom.ast.IField;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.ILabel;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+
+/**
+ * @author aniefer
+ */
+public class GCCTests extends AST2BaseTest {
+
+    public GCCTests() {
+	}
+
+	public GCCTests(String name) {
+		super(name);
+	}
+
+	public void testGCC20000113() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "struct x {                           \n" ); //$NON-NLS-1$
+        buffer.append( "   unsigned x1:1;                    \n" ); //$NON-NLS-1$
+        buffer.append( "   unsigned x2:2;                    \n" ); //$NON-NLS-1$
+        buffer.append( "   unsigned x3:3;                    \n" ); //$NON-NLS-1$
+        buffer.append( "};                                   \n" ); //$NON-NLS-1$
+        buffer.append( "foobar( int x, int y, int z ){       \n" ); //$NON-NLS-1$
+        buffer.append( "   struct x a = {x, y, z};           \n" ); //$NON-NLS-1$
+        buffer.append( "   struct x b = {x, y, z};           \n" ); //$NON-NLS-1$
+        buffer.append( "   struct x *c = &b;                 \n" ); //$NON-NLS-1$
+        buffer.append( "   c->x3 += ( a.x2 - a.x1) * c->x2;  \n" ); //$NON-NLS-1$
+        buffer.append( "   if( a.x1 != 1 || c->x3 != 5 )     \n" ); //$NON-NLS-1$
+        buffer.append( "      return -1;                     \n" ); //$NON-NLS-1$
+        buffer.append( "   return 0;                         \n" ); //$NON-NLS-1$
+        buffer.append( "}                                    \n" ); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 33 );
+        ICompositeType x = (ICompositeType) collector.getName( 0 ).resolveBinding();
+        IField    x1 = (IField)     collector.getName( 1 ).resolveBinding();
+        IField    x2 = (IField)     collector.getName( 2 ).resolveBinding();
+        IField    x3 = (IField)     collector.getName( 3 ).resolveBinding();
+        IVariable vx = (IVariable)  collector.getName( 5 ).resolveBinding();
+        IVariable vy = (IVariable)  collector.getName( 6 ).resolveBinding();
+        IVariable vz = (IVariable)  collector.getName( 7 ).resolveBinding();
+        IVariable a  = (IVariable)  collector.getName( 9 ).resolveBinding();
+        IVariable b  = (IVariable)  collector.getName( 14 ).resolveBinding();
+        IVariable c  = (IVariable)  collector.getName( 19 ).resolveBinding();
+        
+        assertInstances( collector, x, 4 );
+        assertInstances( collector, x1, 3);
+        assertInstances( collector, x2, 3);
+        assertInstances( collector, x3, 3);
+        assertInstances( collector, vx, 3);
+        assertInstances( collector, vy, 3);
+        assertInstances( collector, vz, 3);
+        assertInstances( collector, a, 4);
+        assertInstances( collector, b, 2);
+        assertInstances( collector, c, 4);
+    }
+    
+    public void testGCC20000205() throws Exception{
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "static int f( int a ) {           \n"); //$NON-NLS-1$
+        buffer.append( "   if( a == 0 )                   \n"); //$NON-NLS-1$
+        buffer.append( "      return 0;                   \n"); //$NON-NLS-1$
+        buffer.append( "   do                             \n"); //$NON-NLS-1$
+        buffer.append( "      if( a & 128 )               \n"); //$NON-NLS-1$
+        buffer.append( "         return 1;                \n"); //$NON-NLS-1$
+        buffer.append( "   while( f(0) );                 \n"); //$NON-NLS-1$
+        buffer.append( "   return 0;                      \n"); //$NON-NLS-1$
+        buffer.append( "}                                 \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 5 );
+        IFunction f = (IFunction) collector.getName( 0 ).resolveBinding();
+        IVariable a = (IVariable) collector.getName( 1 ).resolveBinding();
+        
+        assertInstances( collector, f, 2 );
+        assertInstances( collector, a, 3 );
+    }
+    
+    public void testGCC20000217() throws Exception{
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "unsigned short int showbug( unsigned short int * a,    \n"); //$NON-NLS-1$
+        buffer.append( "                            unsigned short int * b ) { \n"); //$NON-NLS-1$
+        buffer.append( "   *a += *b - 8;                                       \n"); //$NON-NLS-1$
+        buffer.append( "   return (*a >= 8 );                                  \n"); //$NON-NLS-1$
+        buffer.append( "}                                                      \n"); //$NON-NLS-1$
+        buffer.append( "int main(){                                            \n"); //$NON-NLS-1$
+        buffer.append( "   unsigned short int x = 0;                           \n"); //$NON-NLS-1$
+        buffer.append( "   unsigned short int y = 10;                          \n"); //$NON-NLS-1$
+        buffer.append( "   if( showbug( &x, &y ) != 0 )                        \n"); //$NON-NLS-1$
+        buffer.append( "      return -1;                                       \n"); //$NON-NLS-1$
+        buffer.append( "   return 0;                                           \n"); //$NON-NLS-1$
+        buffer.append( "}                                                      \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 12 );
+        
+        IFunction showBug = (IFunction) collector.getName( 0 ).resolveBinding();
+        IVariable a = (IVariable) collector.getName( 1 ).resolveBinding();
+        IVariable b = (IVariable) collector.getName( 2 ).resolveBinding();
+        IVariable x = (IVariable) collector.getName( 7 ).resolveBinding();
+        IVariable y = (IVariable) collector.getName( 8 ).resolveBinding();
+        
+        assertInstances( collector, showBug, 2 );
+        assertInstances( collector, a, 3 );
+        assertInstances( collector, b, 2 );
+        assertInstances( collector, x, 2 );
+        assertInstances( collector, y, 2 );
+    }
+    
+    public void testGCC20000224() throws Exception{
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "int loop_1 = 100;                         \n"); //$NON-NLS-1$
+        buffer.append( "int loop_2 = 7;                           \n"); //$NON-NLS-1$
+        buffer.append( "int flag = 0;                             \n"); //$NON-NLS-1$
+        buffer.append( "int test( void ) {                        \n"); //$NON-NLS-1$
+        buffer.append( "   int i;                                 \n"); //$NON-NLS-1$
+        buffer.append( "   int counter = 0;                       \n"); //$NON-NLS-1$
+        buffer.append( "   while( loop_1 > counter ) {            \n"); //$NON-NLS-1$
+        buffer.append( "      if( flag & 1 ) {                    \n"); //$NON-NLS-1$
+        buffer.append( "         for( i = 0; i < loop_2; i++ ) {  \n"); //$NON-NLS-1$
+        buffer.append( "            counter++;                    \n"); //$NON-NLS-1$
+        buffer.append( "         }                                \n"); //$NON-NLS-1$
+        buffer.append( "      }                                   \n"); //$NON-NLS-1$
+        buffer.append( "      flag++;                             \n"); //$NON-NLS-1$
+        buffer.append( "   }                                      \n"); //$NON-NLS-1$
+        buffer.append( "   return 1;                              \n"); //$NON-NLS-1$
+        buffer.append( "}                                         \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 16 );
+        IVariable loop1 = (IVariable) collector.getName( 0 ).resolveBinding();
+        IVariable loop2 = (IVariable) collector.getName( 1 ).resolveBinding();
+        IVariable flag  = (IVariable) collector.getName( 2 ).resolveBinding();
+        IVariable i  = (IVariable) collector.getName( 5 ).resolveBinding();
+        IVariable counter  = (IVariable) collector.getName( 6 ).resolveBinding();
+        
+        assertInstances( collector, loop1, 2 );
+        assertInstances( collector, loop2, 2 );
+        assertInstances( collector, flag, 3 );
+        assertInstances( collector, i, 4 );
+        assertInstances( collector, counter, 3 );
+    }
+    
+    public void testGCC20000225() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append( "int main() {                        \n"); //$NON-NLS-1$
+		buffer.append( "   int nResult, b = 0, i = -1;      \n"); //$NON-NLS-1$
+		buffer.append( "   do {                             \n"); //$NON-NLS-1$
+		buffer.append( "      if( b != 0 ) {                \n"); //$NON-NLS-1$
+		buffer.append( "         nResult = 1;               \n"); //$NON-NLS-1$
+		buffer.append( "      } else {                      \n"); //$NON-NLS-1$
+		buffer.append( "         nResult = 0;               \n"); //$NON-NLS-1$
+		buffer.append( "      }                             \n"); //$NON-NLS-1$
+		buffer.append( "      i++;                          \n"); //$NON-NLS-1$
+		buffer.append( "      b = ( i + 2 ) * 4;            \n"); //$NON-NLS-1$
+		buffer.append( "   } while ( i < 0 );               \n"); //$NON-NLS-1$
+		buffer.append( "   return -1;                       \n"); //$NON-NLS-1$
+		buffer.append( "}                                   \n"); //$NON-NLS-1$
+
+		IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 11 );
+        IVariable nResult = (IVariable) collector.getName( 1 ).resolveBinding();
+        IVariable b = (IVariable) collector.getName( 2 ).resolveBinding();
+        IVariable i  = (IVariable) collector.getName( 3 ).resolveBinding();
+        
+        assertInstances( collector, nResult, 3 );
+        assertInstances( collector, b, 3 );
+        assertInstances( collector, i, 4 );
+    }
+    
+    public void testGCC20000227() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "static const unsigned char f[] = \"\\0\\377\";        \n"); //$NON-NLS-1$
+        buffer.append( "static const unsigned char g[] = \"\\0y\";            \n"); //$NON-NLS-1$
+        buffer.append( "int main() {                                          \n"); //$NON-NLS-1$
+        buffer.append( "   if( sizeof f != 3 || sizeof g != 3 )               \n"); //$NON-NLS-1$
+        buffer.append( "      return -1;                                      \n"); //$NON-NLS-1$
+        buffer.append( "   if( f[0] != g[0] )                                 \n"); //$NON-NLS-1$
+        buffer.append( "      return -1;                                      \n"); //$NON-NLS-1$
+        buffer.append( "   if( f[1] != g[1] || f[2] != g[2] )                 \n"); //$NON-NLS-1$
+        buffer.append( "      return -1;                                      \n"); //$NON-NLS-1$
+        buffer.append( "   return 0;                                          \n"); //$NON-NLS-1$
+        buffer.append( "}                                                     \n"); //$NON-NLS-1$
+        
+		IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 11 );
+        IVariable f = (IVariable) collector.getName( 0 ).resolveBinding();
+        IVariable g = (IVariable) collector.getName( 1 ).resolveBinding();
+        
+        assertInstances( collector, f, 5 );
+        assertInstances( collector, g, 5 );
+    }
+    
+    public void testGCC20000313() throws Exception{
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "unsigned int buggy( unsigned int *param ) {           \n"); //$NON-NLS-1$
+        buffer.append( "   unsigned int accu, zero = 0, borrow;               \n"); //$NON-NLS-1$
+        buffer.append( "   accu = - *param;                                   \n"); //$NON-NLS-1$
+        buffer.append( "   borrow = - ( accu > zero );                        \n"); //$NON-NLS-1$
+        buffer.append( "   return borrow;                                     \n"); //$NON-NLS-1$
+        buffer.append( "}                                                     \n"); //$NON-NLS-1$
+        buffer.append( "int main(void){                                       \n"); //$NON-NLS-1$
+        buffer.append( "   unsigned int param = 1;                            \n"); //$NON-NLS-1$
+        buffer.append( "   unsigned int borrow = buggy (&param);              \n"); //$NON-NLS-1$
+        buffer.append( "   if( param != 0 )                                   \n"); //$NON-NLS-1$
+        buffer.append( "      return -1;                                      \n"); //$NON-NLS-1$
+        buffer.append( "   if( borrow +1 != 0 )                               \n"); //$NON-NLS-1$
+        buffer.append( "      return -1;                                      \n"); //$NON-NLS-1$
+        buffer.append( "   return 0;                                          \n"); //$NON-NLS-1$
+        buffer.append( "}                                                     \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 19 );
+        IFunction buggy = (IFunction) collector.getName(0).resolveBinding();
+        IParameter param = (IParameter) collector.getName(1).resolveBinding();
+        IVariable accu = (IVariable) collector.getName( 2 ).resolveBinding();
+        IVariable zero = (IVariable) collector.getName( 3 ).resolveBinding();
+        IVariable borrow = (IVariable) collector.getName( 4 ).resolveBinding();
+        IVariable param2 = (IVariable) collector.getName( 13 ).resolveBinding();
+        IVariable borrow2 = (IVariable) collector.getName( 14 ).resolveBinding();
+        
+        assertInstances( collector, buggy, 2 );
+        assertInstances( collector, param, 2 );
+        assertInstances( collector, accu, 3 );
+        assertInstances( collector, zero, 2 );
+        assertInstances( collector, borrow, 3 );
+        assertInstances( collector, param2, 3 );
+        assertInstances( collector, borrow2, 2 );
+    }
+    
+    public void testGCC20000314_1() throws Exception{
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "int main() {                                       \n"); //$NON-NLS-1$
+        buffer.append( "   long winds = 0;                                 \n"); //$NON-NLS-1$
+        buffer.append( "   while( winds != 0 ) {                           \n"); //$NON-NLS-1$
+        buffer.append( "      if( *(char*)winds )                          \n"); //$NON-NLS-1$
+        buffer.append( "         break;                                    \n"); //$NON-NLS-1$
+        buffer.append( "   }                                               \n"); //$NON-NLS-1$
+        buffer.append( "   if( winds == 0 || winds != 0 || *(char*)winds ) \n"); //$NON-NLS-1$
+        buffer.append( "      return 0;                                    \n"); //$NON-NLS-1$
+        buffer.append( "   return -1;                                      \n"); //$NON-NLS-1$
+        buffer.append( "}                                                  \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 7 );
+        IVariable winds = (IVariable) collector.getName( 1 ).resolveBinding();
+
+        assertInstances( collector, winds, 6 );
+    }
+    
+    public void testGCC20000314_2() throws Exception{
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "typedef unsigned long long uint64;                \n" ); //$NON-NLS-1$
+        buffer.append( "const uint64 bigconst = 1ULL << 34;               \n" ); //$NON-NLS-1$
+        buffer.append( "int a = 1;                                        \n" ); //$NON-NLS-1$
+        buffer.append( "static uint64 getmask(void) {                     \n" ); //$NON-NLS-1$
+        buffer.append( "   if(a)  return bigconst;                        \n" ); //$NON-NLS-1$
+        buffer.append( "   else   return 0;                               \n" ); //$NON-NLS-1$
+        buffer.append( "}                                                 \n" ); //$NON-NLS-1$
+        buffer.append( "main(){                                           \n" ); //$NON-NLS-1$
+        buffer.append( "   uint64 f = getmask();                          \n" ); //$NON-NLS-1$
+        buffer.append( "   if( sizeof (long long) == 8 && f != bigconst ) \n" ); //$NON-NLS-1$
+        buffer.append( "      return -1;                                  \n" ); //$NON-NLS-1$
+        buffer.append( "   return 0;                                      \n" ); //$NON-NLS-1$
+        buffer.append( "}                                                 \n" ); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 15 );
+        ITypedef uint64 = (ITypedef) collector.getName( 0 ).resolveBinding();
+        IVariable bigconst = (IVariable) collector.getName( 2 ).resolveBinding();
+        IVariable a = (IVariable) collector.getName( 3 ).resolveBinding();
+        IFunction getmask = (IFunction) collector.getName( 5 ).resolveBinding();
+        IVariable f = (IVariable) collector.getName( 11 ).resolveBinding();
+
+        assertInstances( collector, uint64, 4 );
+        assertInstances( collector, bigconst, 3 );
+        assertInstances( collector, a, 2 );
+        assertInstances( collector, getmask, 2 );
+        assertInstances( collector, f, 2 );
+    }
+    
+    public void testGCC20000403() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "extern unsigned long aa[], bb[];                                     \n"); //$NON-NLS-1$
+        buffer.append( "int seqgt( unsigned long a, unsigned short win, unsigned long b );   \n"); //$NON-NLS-1$
+        buffer.append( "int seqgt2 ( unsigned long a, unsigned short win, unsigned long b ); \n"); //$NON-NLS-1$
+        buffer.append( "main() {                                                             \n"); //$NON-NLS-1$
+        buffer.append( "   if( !seqgt( *aa, 0x1000, *bb) || !seqgt2( *aa, 0x1000, *bb) )     \n"); //$NON-NLS-1$
+        buffer.append( "      return -1;                                                     \n"); //$NON-NLS-1$
+        buffer.append( "   return 0;                                                         \n"); //$NON-NLS-1$
+        buffer.append( "}                                                                    \n"); //$NON-NLS-1$
+        buffer.append( "int seqgt( unsigned long a, unsigned short win, unsigned long b) {   \n"); //$NON-NLS-1$
+        buffer.append( "   return (long) ((a + win) - b) > 0;                                \n"); //$NON-NLS-1$
+        buffer.append( "}                                                                    \n"); //$NON-NLS-1$
+        buffer.append( "int seqgt2( unsigned long a, unsigned short win, unsigned long b) {  \n"); //$NON-NLS-1$
+        buffer.append( "   long l = ((a + win) - b);                                         \n"); //$NON-NLS-1$
+        buffer.append( "   return 1 > 0;                                                     \n"); //$NON-NLS-1$
+        buffer.append( "}                                                                    \n"); //$NON-NLS-1$
+        buffer.append( "unsigned long aa[] = { (1UL << (sizeof(long) *8 - 1)) = 0xfff };     \n"); //$NON-NLS-1$
+        buffer.append( "unsigned long bb[] = { (1UL << (sizeof(long) *8 - 1)) = 0xfff };     \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 34 );
+        IVariable aa = (IVariable) collector.getName( 0 ).resolveBinding();
+        IVariable bb = (IVariable) collector.getName( 1 ).resolveBinding();
+        IFunction seqgt = (IFunction) collector.getName( 2 ).resolveBinding();
+        IParameter a1 = (IParameter) collector.getName( 3 ).resolveBinding();
+        IParameter win1 = (IParameter) collector.getName( 4 ).resolveBinding();
+        IParameter b1 = (IParameter) collector.getName( 5 ).resolveBinding();
+        IFunction seqgt2 = (IFunction) collector.getName( 6 ).resolveBinding();
+        IParameter a2 = (IParameter) collector.getName( 7 ).resolveBinding();
+        IParameter win2 = (IParameter) collector.getName( 8 ).resolveBinding();
+        IParameter b2 = (IParameter) collector.getName( 9 ).resolveBinding();
+        
+        assertInstances( collector, aa, 4 );
+        assertInstances( collector, bb, 4 );
+        assertInstances( collector, seqgt, 3 );
+        assertInstances( collector, a1, 3 );
+        assertInstances( collector, win1, 3 );
+        assertInstances( collector, b1, 3 );
+        assertInstances( collector, seqgt2, 3 );
+        assertInstances( collector, a2, 3 );
+        assertInstances( collector, win2, 3 );
+        assertInstances( collector, b2, 3 );
+    }
+    
+    public void testGCC20000412_1 () throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "short int i = -1;                                               \n" ); //$NON-NLS-1$
+        buffer.append( "const char * const wordlist[207];                               \n" ); //$NON-NLS-1$
+        buffer.append( "const char * const * foo( void ) {                              \n" ); //$NON-NLS-1$
+        buffer.append( "   register const char * const *wordptr = &wordlist[207u + i];  \n" ); //$NON-NLS-1$
+        buffer.append( "   return wordptr;                                              \n" ); //$NON-NLS-1$
+        buffer.append( "}                                                               \n" ); //$NON-NLS-1$
+        buffer.append( "int main() {                                                    \n" ); //$NON-NLS-1$
+        buffer.append( "   if( foo() != &wordlist[206] )                                \n" ); //$NON-NLS-1$
+        buffer.append( "      return -1;                                                \n" ); //$NON-NLS-1$
+        buffer.append( "   return 0;                                                    \n" ); //$NON-NLS-1$
+        buffer.append( "}                                                               \n" ); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 11 );
+        IVariable i = (IVariable) collector.getName( 0 ).resolveBinding();
+        IVariable wordlist = (IVariable) collector.getName( 1 ).resolveBinding();
+        IFunction foo = (IFunction) collector.getName( 2 ).resolveBinding();
+        IVariable wordptr = (IVariable) collector.getName( 4 ).resolveBinding();
+        
+        assertInstances( collector, i, 2 );
+        assertInstances( collector, wordlist, 3 );
+        assertInstances( collector, foo, 2 );
+        assertInstances( collector, wordptr, 2 );
+    }
+    
+    public void testGCC20000412_2() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "int f( int a, int *y ) {                 \n"); //$NON-NLS-1$
+        buffer.append( "   int x = a;                            \n"); //$NON-NLS-1$
+        buffer.append( "   if( a == 0 )  return *y;              \n"); //$NON-NLS-1$
+        buffer.append( "   return f( a-1, &x );                  \n"); //$NON-NLS-1$
+        buffer.append( "}                                        \n"); //$NON-NLS-1$
+        buffer.append( "int main( int argc, char** argv){        \n"); //$NON-NLS-1$
+        buffer.append( "   if( f(100, (int *) 0 ) != 1)          \n"); //$NON-NLS-1$
+        buffer.append( "      return -1;                         \n"); //$NON-NLS-1$
+        buffer.append( "   return 0;                             \n"); //$NON-NLS-1$
+        buffer.append( "}                                        \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 14 );
+        IFunction f = (IFunction) collector.getName( 0 ).resolveBinding();
+        IParameter a = (IParameter) collector.getName( 1 ).resolveBinding();
+        IParameter y = (IParameter) collector.getName( 2 ).resolveBinding();
+        IVariable x = (IVariable) collector.getName( 3 ).resolveBinding();
+        
+        assertInstances( collector, f, 3 );
+        assertInstances( collector, a, 4 );
+        assertInstances( collector, y, 2 );
+        assertInstances( collector, x, 2 );
+    }
+    
+    public void testGCC20000412_3() throws Exception{
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "typedef struct {                         \n"); //$NON-NLS-1$
+        buffer.append( "   char y;                               \n"); //$NON-NLS-1$
+        buffer.append( "   char x[32];                           \n"); //$NON-NLS-1$
+        buffer.append( "} X;                                     \n"); //$NON-NLS-1$
+        buffer.append( "int z(void) {                            \n"); //$NON-NLS-1$
+        buffer.append( "   X xxx;                                \n"); //$NON-NLS-1$
+        buffer.append( "   xxx.x[0] = xxx.x[31] = '0';           \n"); //$NON-NLS-1$
+        buffer.append( "   xxx.y = 0xf;                          \n"); //$NON-NLS-1$
+        buffer.append( "   return f( xxx, xxx );                 \n"); //$NON-NLS-1$
+        buffer.append( "}                                        \n"); //$NON-NLS-1$
+        buffer.append( "int main (void) {                        \n"); //$NON-NLS-1$
+        buffer.append( "   int val;                              \n"); //$NON-NLS-1$
+        buffer.append( "   val = z();                            \n"); //$NON-NLS-1$
+        buffer.append( "   if( val != 0x60 ) return -1;          \n"); //$NON-NLS-1$
+        buffer.append( "   return 0;                             \n"); //$NON-NLS-1$
+        buffer.append( "}                                        \n"); //$NON-NLS-1$
+        buffer.append( "int f( X x, X y ) {                      \n"); //$NON-NLS-1$
+        buffer.append( "   if( x.y != y.y )                      \n"); //$NON-NLS-1$
+        buffer.append( "      return 'F';                        \n"); //$NON-NLS-1$
+        buffer.append( "   return x.x[0] + y.x[0];               \n"); //$NON-NLS-1$
+        buffer.append( "}                                        \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 36 );
+        IField    y = (IField) collector.getName( 1 ).resolveBinding();
+        IField    x = (IField) collector.getName( 2 ).resolveBinding();
+        ITypedef  X = (ITypedef) collector.getName( 3 ).resolveBinding();
+        IFunction z = (IFunction) collector.getName( 4 ).resolveBinding();
+        IVariable xxx = (IVariable) collector.getName( 7 ).resolveBinding();
+        IVariable val = (IVariable) collector.getName( 19 ).resolveBinding();
+        IParameter px = (IParameter) collector.getName( 25 ).resolveBinding();
+        IParameter py = (IParameter) collector.getName( 27 ).resolveBinding();
+        
+        assertInstances( collector, y, 4 );
+        assertInstances( collector, x, 5 );
+        assertInstances( collector, X, 4 );
+        assertInstances( collector, z, 2 );
+        assertInstances( collector, xxx, 6 );
+        assertInstances( collector, val, 3 );
+        assertInstances( collector, px, 3 );
+        assertInstances( collector, py, 3 );
+    }
+    
+    public void testGCC20000412_4() throws Exception{
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "void f(int i, int j, int radius, int width, int N) { \n"); //$NON-NLS-1$
+        buffer.append( "   const int diff = i - radius;                      \n"); //$NON-NLS-1$
+        buffer.append( "   const int lowk = (diff > 0 ? diff : 0 );          \n"); //$NON-NLS-1$
+        buffer.append( "   int k;                                            \n"); //$NON-NLS-1$
+        buffer.append( "   for( k = lowk; k <= 2; k++ ){                     \n"); //$NON-NLS-1$
+        buffer.append( "      int idx = ((k-i+radius) * width - j + radius); \n"); //$NON-NLS-1$
+        buffer.append( "      if( idx < 0 ) return -1;                       \n"); //$NON-NLS-1$
+        buffer.append( "   }                                                 \n"); //$NON-NLS-1$
+        buffer.append( "   for( k = lowk; k <= 2; k++ ) ;                    \n"); //$NON-NLS-1$
+        buffer.append( "}                                                    \n"); //$NON-NLS-1$
+        buffer.append( "int main (int argc, char** argv ){                   \n"); //$NON-NLS-1$
+        buffer.append( "   int exc_rad = 2;                                  \n"); //$NON-NLS-1$
+        buffer.append( "   int N = 8;                                        \n"); //$NON-NLS-1$
+        buffer.append( "   int i;                                            \n"); //$NON-NLS-1$
+        buffer.append( "   for( i = 1; i < 4; i++ )                          \n"); //$NON-NLS-1$
+        buffer.append( "      f( i, 1, exc_rad, 2*exc_rad + 1, N );          \n"); //$NON-NLS-1$
+        buffer.append( "   return 0;                                         \n"); //$NON-NLS-1$
+        buffer.append( "}                                                    \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 43 );
+        IFunction f = (IFunction) collector.getName( 0 ).resolveBinding();
+        IParameter i1 = (IParameter) collector.getName( 1 ).resolveBinding();
+        IParameter j = (IParameter) collector.getName( 2 ).resolveBinding();
+        IParameter radius = (IParameter) collector.getName( 3 ).resolveBinding();
+        IParameter width = (IParameter) collector.getName( 4 ).resolveBinding();
+        IParameter N1 = (IParameter) collector.getName( 5 ).resolveBinding();
+        IVariable diff = (IVariable) collector.getName( 6 ).resolveBinding();
+        IVariable lowk = (IVariable) collector.getName( 9 ).resolveBinding();
+        IVariable k = (IVariable) collector.getName( 12 ).resolveBinding();
+        IVariable idx = (IVariable) collector.getName( 17 ).resolveBinding();
+        IVariable exc_rad = (IVariable) collector.getName( 32 ).resolveBinding();
+        IVariable N2 = (IVariable) collector.getName( 33 ).resolveBinding();
+        IVariable i2 = (IVariable) collector.getName( 34 ).resolveBinding();
+
+        assertInstances( collector, f, 2 );
+        assertInstances( collector, i1, 3 );
+        assertInstances( collector, j, 2 );
+        assertInstances( collector, radius, 4 );
+        assertInstances( collector, width, 2 );
+        assertInstances( collector, N1, 1 );
+        assertInstances( collector, diff, 3 );
+        assertInstances( collector, lowk, 3 );
+        assertInstances( collector, k, 8 );
+        assertInstances( collector, idx, 2 );
+        assertInstances( collector, exc_rad, 3 );
+        assertInstances( collector, N2, 2 );
+        assertInstances( collector, i2, 5 );
+    }
+    
+    public void testGCC20000412_5() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "int main( void ) {                                      \n"); //$NON-NLS-1$
+        buffer.append( "   struct {                                             \n"); //$NON-NLS-1$
+        buffer.append( "      int node;                                         \n"); //$NON-NLS-1$
+        buffer.append( "      int type;                                         \n"); //$NON-NLS-1$
+        buffer.append( "   } lastglob[1] = { { 0, 1 } };                        \n"); //$NON-NLS-1$
+        buffer.append( "   if( lastglob[0].node != 0 || lastglob[0].type != 1 ) \n"); //$NON-NLS-1$
+        buffer.append( "      return -1;                                        \n"); //$NON-NLS-1$
+        buffer.append( "   return 0;                                            \n"); //$NON-NLS-1$
+        buffer.append( "}                                                       \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 10 );
+        IField node = (IField) collector.getName( 3 ).resolveBinding();
+        IField type = (IField) collector.getName( 4 ).resolveBinding();
+        IVariable lastglob = (IVariable) collector.getName( 5 ).resolveBinding();
+        
+        assertInstances( collector, node, 2 );
+        assertInstances( collector, type, 2 );
+        assertInstances( collector, lastglob, 3 );
+    }
+    
+    public void testGCC20000419() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "struct foo { int a, b, c; };                            \n"); //$NON-NLS-1$
+        buffer.append( "void brother( int a, int b, int c ) {                   \n"); //$NON-NLS-1$
+        buffer.append( "   if( a ) return;                                      \n"); //$NON-NLS-1$
+        buffer.append( "}                                                       \n"); //$NON-NLS-1$
+        buffer.append( "void sister( struct foo f, int b, int c ) {             \n"); //$NON-NLS-1$
+        buffer.append( "   brother( (f.b == b), b, c );                         \n"); //$NON-NLS-1$
+        buffer.append( "}                                                       \n"); //$NON-NLS-1$
+        buffer.append( "int main() {                                            \n"); //$NON-NLS-1$
+        buffer.append( "   struct foo f = { 7, 8, 9 };                          \n"); //$NON-NLS-1$
+        buffer.append( "   sister( f, 1, 2 );                                   \n"); //$NON-NLS-1$
+        buffer.append( "   return 0;                                            \n"); //$NON-NLS-1$
+        buffer.append( "}                                                       \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 25 );
+        ICompositeType foo = (ICompositeType) collector.getName( 0 ).resolveBinding();
+        IField fa = (IField) collector.getName( 1 ).resolveBinding();
+        IField fb = (IField) collector.getName( 2 ).resolveBinding();
+        IField fc = (IField) collector.getName( 3 ).resolveBinding();
+        IFunction brother =  (IFunction) collector.getName( 4 ).resolveBinding();
+        IParameter pa =  (IParameter) collector.getName( 5 ).resolveBinding();
+        IParameter pb =  (IParameter) collector.getName( 6 ).resolveBinding();
+        IParameter pc =  (IParameter) collector.getName( 7 ).resolveBinding();
+        IFunction sister = (IFunction) collector.getName( 9 ).resolveBinding();
+        IParameter sf =  (IParameter) collector.getName( 11 ).resolveBinding();
+        IParameter sb =  (IParameter) collector.getName( 12 ).resolveBinding();
+        IParameter sc =  (IParameter) collector.getName( 13 ).resolveBinding();
+        IVariable f = (IVariable) collector.getName( 22 ).resolveBinding();
+        
+        assertInstances( collector, foo, 3 );
+        assertInstances( collector, fa, 1 );
+        assertInstances( collector, fb, 2 );
+        assertInstances( collector, fc, 1 );
+        assertInstances( collector, brother, 2 );
+        assertInstances( collector, pa, 2 );
+        assertInstances( collector, pb, 1 );
+        assertInstances( collector, pc, 1 );
+        assertInstances( collector, sister, 2 );
+        assertInstances( collector, sf, 2 );
+        assertInstances( collector, sb, 3 );
+        assertInstances( collector, sc, 2 );
+        assertInstances( collector, f, 2 );
+    }
+    public void testGCC20000503() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("unsigned long sub( int a ) {                          \n"); //$NON-NLS-1$
+        buffer.append("   return ((0 > a - 2) ? 0 : a - 2) * sizeof(long);   \n"); //$NON-NLS-1$
+        buffer.append("}                                                     \n"); //$NON-NLS-1$
+        buffer.append("main(){                                               \n"); //$NON-NLS-1$
+        buffer.append("   return ( sub(0) != 0 );                            \n"); //$NON-NLS-1$
+        buffer.append("}                                                     \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 6 );
+        IFunction sub = (IFunction) collector.getName( 0 ).resolveBinding();
+        IParameter a = (IParameter) collector.getName( 1 ).resolveBinding();
+        
+        assertInstances( collector, sub, 2 );
+        assertInstances( collector, a, 3 );
+    }
+    
+    public void testGCC20000511() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("int  f( int value, int expect ) {                     \n"); //$NON-NLS-1$
+        buffer.append("   return ( value == expect );                        \n"); //$NON-NLS-1$
+        buffer.append("}                                                     \n"); //$NON-NLS-1$
+        buffer.append("main(){                                               \n"); //$NON-NLS-1$
+        buffer.append("   int a = 7, b = 6, c = 4, d = 7, e = 2;             \n"); //$NON-NLS-1$
+        buffer.append("   f( a || b % c, 1 );                                \n"); //$NON-NLS-1$
+        buffer.append("   f( a ? b % c : 0, 2 );                             \n"); //$NON-NLS-1$
+        buffer.append("   f( a = b % c, 2);                                  \n"); //$NON-NLS-1$
+        buffer.append("   f( a *= b % c, 4 );                                \n"); //$NON-NLS-1$
+        buffer.append("   f( a /= b % c, 2 );                                \n"); //$NON-NLS-1$
+        buffer.append("   f( a %= b % c, 0 );                                \n"); //$NON-NLS-1$
+        buffer.append("   f( a += b % c, 2 );                                \n"); //$NON-NLS-1$
+        buffer.append("   f( d || c && e, 1 );                               \n"); //$NON-NLS-1$
+        buffer.append("   f( d ? c && e : 0, 1 );                            \n"); //$NON-NLS-1$
+        buffer.append("   f( d = c && e, 1 );                                \n"); //$NON-NLS-1$
+        buffer.append("   f( d *= c && e, 1 );                               \n"); //$NON-NLS-1$
+        buffer.append("   f( d %= c && e, 0);                                \n"); //$NON-NLS-1$
+        buffer.append("   f( d += c && e, 1);                                \n"); //$NON-NLS-1$
+        buffer.append("   f( d -= c && e, 0);                                \n"); //$NON-NLS-1$
+        buffer.append("   f( d || c || e, 1);                                \n"); //$NON-NLS-1$
+        buffer.append("   f( d ? c || e : 0, 0);                             \n"); //$NON-NLS-1$
+        buffer.append("   f( d = c || e, 1 );                                \n"); //$NON-NLS-1$
+        buffer.append("   f( d *= c || e, 1);                                \n"); //$NON-NLS-1$
+        buffer.append("   f( d %= c || e, 0);                                \n"); //$NON-NLS-1$
+        buffer.append("   f( d += c || e, 1);                                \n"); //$NON-NLS-1$
+        buffer.append("   f( d -= c || e, 0 );                               \n"); //$NON-NLS-1$
+        buffer.append("}                                                     \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 95 );
+        IFunction f = (IFunction) collector.getName( 0 ).resolveBinding();
+        IParameter v = (IParameter) collector.getName( 1 ).resolveBinding();
+        IParameter ex = (IParameter) collector.getName( 2 ).resolveBinding();
+        IVariable a = (IVariable) collector.getName( 6 ).resolveBinding();
+        IVariable b = (IVariable) collector.getName( 7 ).resolveBinding();
+        IVariable c = (IVariable) collector.getName( 8 ).resolveBinding();
+        IVariable d = (IVariable) collector.getName( 9 ).resolveBinding();
+        IVariable e = (IVariable) collector.getName( 10).resolveBinding();
+        
+        
+        assertInstances( collector, f, 22 );
+        assertInstances( collector, v, 2 );
+        assertInstances( collector, ex, 2 );
+        assertInstances( collector, a, 8 );
+        assertInstances( collector, b, 8 );
+        assertInstances( collector, c, 22 );
+        assertInstances( collector, d, 15 );
+        assertInstances( collector, e, 15 );
+    }
+    public void testGCC20000603() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "struct s1 { double d; };                                \n"); //$NON-NLS-1$
+        buffer.append( "struct s2 { double d; };                                \n"); //$NON-NLS-1$
+        buffer.append( "double f( struct s1 * a, struct s2 *b) {                \n"); //$NON-NLS-1$
+        buffer.append( "   a->d = 1.0;                                          \n"); //$NON-NLS-1$
+        buffer.append( "   return b->d + 1.0;                                   \n"); //$NON-NLS-1$
+        buffer.append( "}                                                       \n"); //$NON-NLS-1$
+        buffer.append( "int main() {                                            \n"); //$NON-NLS-1$
+        buffer.append( "   struct s1 a;                                         \n"); //$NON-NLS-1$
+        buffer.append( "   a.d = 0.0;                                           \n"); //$NON-NLS-1$
+        buffer.append( "   if( f( &a, (struct s2 *)&a ) != 2.0 )                \n"); //$NON-NLS-1$
+        buffer.append( "      return -1;                                        \n"); //$NON-NLS-1$
+        buffer.append( "   return 0;                                            \n"); //$NON-NLS-1$
+        buffer.append( "}                                                       \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 22 );
+        ICompositeType s1 = (ICompositeType) collector.getName( 0 ).resolveBinding();
+        IField d1 = (IField) collector.getName( 1 ).resolveBinding();
+        ICompositeType s2 = (ICompositeType) collector.getName( 2 ).resolveBinding();
+        IField d2 = (IField) collector.getName( 3 ).resolveBinding();
+        IFunction f = (IFunction) collector.getName( 4 ).resolveBinding();
+        IParameter pa = (IParameter) collector.getName( 6 ).resolveBinding();
+        IParameter pb = (IParameter) collector.getName( 8 ).resolveBinding();
+        IVariable a = (IVariable) collector.getName( 15 ).resolveBinding();
+        
+        assertInstances( collector, s1, 3 );
+        assertInstances( collector, s2, 3 );
+        assertInstances( collector, d1, 3 );
+        assertInstances( collector, d2, 2 );
+        assertInstances( collector, f, 2 );
+        assertInstances( collector, pa, 2 );
+        assertInstances( collector, pb, 2 );
+        assertInstances( collector, a, 4 );
+    }
+    public void testGCC20000605_2() throws Exception{
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "struct F { int i; };                                    \n"); //$NON-NLS-1$
+        buffer.append( "void f1( struct F *x, struct F * y ) {                  \n"); //$NON-NLS-1$
+        buffer.append( "   int timeout = 0;                                     \n"); //$NON-NLS-1$
+        buffer.append( "   for( ; ((const struct F*)x)->i < y->i; x->i++ )      \n"); //$NON-NLS-1$
+        buffer.append( "      if( ++timeout > 5 )                               \n"); //$NON-NLS-1$
+        buffer.append( "         return;                                        \n"); //$NON-NLS-1$
+        buffer.append( "}                                                       \n"); //$NON-NLS-1$
+        buffer.append( "main() {                                                \n"); //$NON-NLS-1$
+        buffer.append( "   struct F x, y;                                       \n"); //$NON-NLS-1$
+        buffer.append( "   x.i = 0;   y.i = 1;                                  \n"); //$NON-NLS-1$
+        buffer.append( "   f1( &x, &y );                                        \n"); //$NON-NLS-1$
+        buffer.append( "}                                                       \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 27 );
+        ICompositeType F = (ICompositeType) collector.getName( 0 ).resolveBinding();
+        IField i = (IField) collector.getName( 1 ).resolveBinding();
+        IFunction f1 = (IFunction) collector.getName( 2 ).resolveBinding();
+        IParameter px = (IParameter) collector.getName( 4 ).resolveBinding();
+        IParameter py = (IParameter) collector.getName( 6 ).resolveBinding();
+        IVariable timeout = (IVariable) collector.getName( 7 ).resolveBinding();
+        IVariable x = (IVariable) collector.getName( 18 ).resolveBinding();
+        IVariable y = (IVariable) collector.getName( 19 ).resolveBinding();
+        
+        assertInstances( collector, F, 5 );
+        assertInstances( collector, i, 6 );
+        assertInstances( collector, f1, 2 );
+        assertInstances( collector, px, 3 );
+        assertInstances( collector, py, 2 );
+        assertInstances( collector, timeout, 2 );
+        assertInstances( collector, x, 3 );
+        assertInstances( collector, y, 3 );
+    }
+    public void testGCC20000605_3() throws Exception{
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "struct F { int x; int y; };                             \n"); //$NON-NLS-1$
+        buffer.append( "int main() {                                            \n"); //$NON-NLS-1$
+        buffer.append( "   int timeout = 0, x = 0;                              \n"); //$NON-NLS-1$
+        buffer.append( "   while( 1 ) {                                         \n"); //$NON-NLS-1$
+        buffer.append( "      const struct F i = { x++, };                      \n"); //$NON-NLS-1$
+        buffer.append( "      if( i.x > 0 )                                     \n"); //$NON-NLS-1$
+        buffer.append( "         break;                                         \n"); //$NON-NLS-1$
+        buffer.append( "      if( ++timeout > 5 )                                \n"); //$NON-NLS-1$
+        buffer.append( "         goto die;                                      \n"); //$NON-NLS-1$
+        buffer.append( "   }                                                    \n"); //$NON-NLS-1$
+        buffer.append( "   die: return 0;                                       \n"); //$NON-NLS-1$
+        buffer.append( "}                                                       \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 14 );
+        ICompositeType F = (ICompositeType) collector.getName( 0 ).resolveBinding();
+        IField fx = (IField) collector.getName( 1 ).resolveBinding();
+        IField fy = (IField) collector.getName( 2 ).resolveBinding();
+        IVariable timeout = (IVariable) collector.getName( 4 ).resolveBinding();
+        IVariable x = (IVariable) collector.getName( 5 ).resolveBinding();
+        IVariable i = (IVariable) collector.getName( 7 ).resolveBinding();
+        ILabel die = (ILabel) collector.getName( 13 ).resolveBinding();
+        
+        assertInstances( collector, F, 2 );
+        assertInstances( collector, fx, 2 );
+        assertInstances( collector, fy, 1 );
+        assertInstances( collector, timeout, 2 );
+        assertInstances( collector, x, 2 );
+        assertInstances( collector, i, 2 );
+        assertInstances( collector, die, 2 );
+    }
+    public void testGCCenum_2() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "enum foo { FOO, BAR };                                  \n"); //$NON-NLS-1$
+        buffer.append( "int main() {                                            \n"); //$NON-NLS-1$
+        buffer.append( "   int i;                                               \n"); //$NON-NLS-1$
+        buffer.append( "   for( i = BAR; i >= FOO; --i )                        \n"); //$NON-NLS-1$
+        buffer.append( "      if( i == -1 ) return -1;                          \n"); //$NON-NLS-1$
+        buffer.append( "   return 0;                                            \n"); //$NON-NLS-1$
+        buffer.append( "}                                                       \n"); //$NON-NLS-1$
+        
+        IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.C );
+        CNameCollector collector = new CNameCollector();
+        tu.accept( collector );
+        
+        assertEquals( collector.size(), 11 );
+        IEnumeration foo = (IEnumeration) collector.getName( 0 ).resolveBinding();
+        IEnumerator FOO = (IEnumerator) collector.getName( 1 ).resolveBinding();
+        IEnumerator BAR = (IEnumerator) collector.getName( 2 ).resolveBinding();
+        IVariable i = (IVariable) collector.getName( 4 ).resolveBinding();
+
+        assertInstances( collector, foo, 1 );
+        assertInstances( collector, FOO, 2 );
+        assertInstances( collector, BAR, 2 );
+        assertInstances( collector, i, 5 );
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/ImageLocationTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/ImageLocationTests.java
new file mode 100644
index 0000000..b3c890a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/ImageLocationTests.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTImageLocation;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+
+/**
+ * @author jcamelon
+ */
+public class ImageLocationTests extends AST2BaseTest {
+
+    private static final int CODE = IASTImageLocation.REGULAR_CODE;
+    private static final int MACRO = IASTImageLocation.MACRO_DEFINITION;
+    private static final int MACRO_ARG = IASTImageLocation.ARGUMENT_TO_MACRO_EXPANSION;
+
+	public static Test suite() {
+    	return suite(ImageLocationTests.class);
+    }
+
+    public ImageLocationTests() {
+	}
+
+	public ImageLocationTests(String name) {
+		setName(name);
+	}
+
+	// int a;
+	public void testFileLocation() throws Exception {
+		String code= getContents(1)[0].toString();
+        IASTTranslationUnit tu = parse(code, ParserLanguage.CPP);
+        
+        IASTDeclaration declaration = tu.getDeclarations()[0];
+        IASTName name= getName(declaration);
+        IASTImageLocation loc= name.getImageLocation();
+        assertLocation(CODE, code, "a", 0, loc);
+	}
+
+	// #define M result1
+	// #define F() result2
+	// int M;
+	// int F();
+	public void testMacroLocation() throws Exception {
+		String code= getContents(1)[0].toString();
+        IASTTranslationUnit tu = parse(code, ParserLanguage.CPP);
+        
+        IASTDeclaration declaration = tu.getDeclarations()[0];
+        IASTName name= getName(declaration);
+        IASTImageLocation loc= name.getImageLocation();
+        assertLocation(MACRO, code, "result1", 0, loc);
+
+        declaration = tu.getDeclarations()[1];
+        name= getName(declaration);
+        loc= name.getImageLocation();
+        assertLocation(MACRO, code, "result2", 0, loc);
+	}
+
+	// #define M result
+	// #define F() M
+	// int F();
+	public void testIndirectMacroLocation() throws Exception {
+		String code= getContents(1)[0].toString();
+        IASTTranslationUnit tu = parse(code, ParserLanguage.CPP);
+        
+        IASTDeclaration declaration = tu.getDeclarations()[0];
+        IASTName name= getName(declaration);
+        IASTImageLocation loc= name.getImageLocation();
+        assertLocation(MACRO, code, "result", 0, loc);
+	}
+
+	
+	// #define M result1
+	// #define F(x) x
+	// int F(result2);
+	// int F(M);
+	public void testMacroArgumentLocation() throws Exception {
+		String code= getContents(1)[0].toString();
+        IASTTranslationUnit tu = parse(code, ParserLanguage.CPP);
+        
+        IASTDeclaration declaration = tu.getDeclarations()[0];
+        IASTName name= getName(declaration);
+        IASTImageLocation loc= name.getImageLocation();
+        assertLocation(MACRO_ARG, code, "result2", 0, loc);
+
+        declaration = tu.getDeclarations()[1];
+        name= getName(declaration);
+        loc= name.getImageLocation();
+        assertLocation(MACRO, code, "result1", 0, loc);
+	}
+
+	private void assertLocation(int kind, String code, String name, int extra, IASTImageLocation loc) {
+		assertNotNull(loc);
+		assertEquals(kind, loc.getLocationKind());
+		assertEquals(code.indexOf(name), loc.getNodeOffset());
+		assertEquals(name.length()-extra, loc.getNodeLength());
+	}
+
+	private IASTName getName(IASTNode node) {
+		final IASTName[] result= {null};
+		node.accept(new ASTVisitor() {
+			{
+				shouldVisitNames= true;
+			}
+			public int visit(IASTName name) {
+				result[0]= name;
+				return PROCESS_ABORT;
+			}
+		});
+		return result[0];
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/LanguageExtensionsTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/LanguageExtensionsTest.java
new file mode 100644
index 0000000..5e01ac1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/LanguageExtensionsTest.java
@@ -0,0 +1,243 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionList;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.parser.IScannerExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.ISourceCodeParser;
+import org.eclipse.cdt.core.dom.parser.c.GCCParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.GCCScannerExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.ICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.GPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.GPPScannerExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.POPCPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.POPCPPScannerExtensionConfiguration;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.IScanner;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.ParserMode;
+import org.eclipse.cdt.core.parser.ScannerInfo;
+import org.eclipse.cdt.core.parser.tests.scanner.FileCodeReaderFactory;
+import org.eclipse.cdt.internal.core.dom.parser.c.GNUCSourceParser;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
+import org.eclipse.cdt.internal.core.parser.scanner.CPreprocessor;
+
+/**
+ * Testcases for non-gnu language extensions.
+ */
+public class LanguageExtensionsTest extends AST2BaseTest {
+	
+	protected static final int SIZEOF_EXTENSION   = 0x1;
+	protected static final int FUNCTION_STYLE_ASM = 0x2;
+	protected static final int SLASH_PERCENT_COMMENT = 0x4;
+
+	public static TestSuite suite() {
+		return suite(LanguageExtensionsTest.class);
+	}
+	
+	public LanguageExtensionsTest() {
+		super();
+	}
+	
+	public LanguageExtensionsTest(String name) {
+		super(name);
+	}
+	
+	private IASTTranslationUnit parse(ISourceCodeParser parser) {
+		IASTTranslationUnit tu= parser.parse();
+		assertFalse(parser.encounteredError());
+		assertEquals(0, tu.getPreprocessorProblemsCount());
+		assertEquals(0, CPPVisitor.getProblems(tu).length);
+		return tu;
+	}
+
+	protected IASTTranslationUnit parse(String code, IScannerExtensionConfiguration sext,
+			ICPPParserExtensionConfiguration pext) throws Exception {
+		IScanner scanner= 
+			new CPreprocessor(new CodeReader(code.toCharArray()), new ScannerInfo(), ParserLanguage.CPP, NULL_LOG, 
+					sext, FileCodeReaderFactory.getInstance());
+		GNUCPPSourceParser parser= new GNUCPPSourceParser(scanner, ParserMode.COMPLETE_PARSE, NULL_LOG, pext);
+		return  parse(parser);
+	}
+
+	protected IASTTranslationUnit parse(String code, IScannerExtensionConfiguration sext,
+			ICParserExtensionConfiguration pext) throws Exception {
+		IScanner scanner= 
+			new CPreprocessor(new CodeReader(code.toCharArray()), new ScannerInfo(), ParserLanguage.C, NULL_LOG, 
+					sext, FileCodeReaderFactory.getInstance());
+		GNUCSourceParser parser= new GNUCSourceParser(scanner, ParserMode.COMPLETE_PARSE, NULL_LOG, pext);
+		return parse(parser);
+	}
+	
+	protected IASTTranslationUnit parseCPPWithExtension(String code, final int extensions) throws Exception {
+		return parse(code,
+			new GPPScannerExtensionConfiguration() {
+				@Override
+				public boolean supportSlashPercentComments() {
+					return (extensions & SLASH_PERCENT_COMMENT) != 0;
+				}
+			},
+			new GPPParserExtensionConfiguration() {
+				@Override
+				public boolean supportExtendedSizeofOperator() {
+					return (extensions & SIZEOF_EXTENSION) != 0;
+				}
+				@Override
+				public boolean supportFunctionStyleAssembler() {
+					return (extensions & FUNCTION_STYLE_ASM) != 0;
+				}
+			}
+		);
+	}
+
+	protected IASTTranslationUnit parseCWithExtension(String code, final int extensions) throws Exception {
+		return parse(code, 
+			new GCCScannerExtensionConfiguration() {
+				@Override
+				public boolean supportSlashPercentComments() {
+					return (extensions & SLASH_PERCENT_COMMENT) != 0;
+				}
+			},
+			new GCCParserExtensionConfiguration() {
+				@Override
+				public boolean supportExtendedSizeofOperator() {
+					return (extensions & SIZEOF_EXTENSION) != 0;
+				}
+				@Override
+				public boolean supportFunctionStyleAssembler() {
+					return (extensions & FUNCTION_STYLE_ASM) != 0;
+				}
+			}
+		);
+	}
+
+	// parclass ExampleClass {
+    // };
+    public void testPOP_parclass() throws Exception {
+    	IASTTranslationUnit tu= parse(getAboveComment(), 
+				POPCPPScannerExtensionConfiguration.getInstance(), 
+				POPCPPParserExtensionConfiguration.getInstance()
+		);
+    	ICPPASTCompositeTypeSpecifier comp= getCompositeType(tu, 0);
+    }
+    
+	// parclass Table {
+    //    void sort([in, out, size=n] int *data, int n);
+    // };
+    public void testPOP_marshallingData() throws Exception {
+    	IASTTranslationUnit tu= parse(getAboveComment(), 
+				POPCPPScannerExtensionConfiguration.getInstance(), 
+				POPCPPParserExtensionConfiguration.getInstance()
+		);
+    	ICPPASTCompositeTypeSpecifier comp= getCompositeType(tu, 0);
+    	IASTSimpleDeclaration sd= getDeclaration(comp, 0);
+    	assertInstance(sd.getDeclarators()[0], IASTFunctionDeclarator.class);
+    }
+    
+    //    parclass Bird {
+    //    	public:
+    //    		Bird(float P) @{ od.power(P);
+    //    		od.memory(100,60);
+    //    		od.protocol("socket http"); };
+    //    };
+    public void testPOP_objectDescriptor() throws Exception {
+    	IASTTranslationUnit tu= parse(getAboveComment(), 
+				POPCPPScannerExtensionConfiguration.getInstance(), 
+				POPCPPParserExtensionConfiguration.getInstance()
+		);
+    	ICPPASTCompositeTypeSpecifier comp= getCompositeType(tu, 0);
+    	IASTSimpleDeclaration sd= getDeclaration(comp, 1);
+    	assertInstance(sd.getDeclarators()[0], IASTFunctionDeclarator.class);
+    }
+    
+    // @pack(Stack, Queue, List)
+    // int a();
+    public void testPOP_packDirective() throws Exception {
+    	IASTTranslationUnit tu= parse(getAboveComment(), 
+				POPCPPScannerExtensionConfiguration.getInstance(), 
+				POPCPPParserExtensionConfiguration.getInstance()
+		);
+    	IASTSimpleDeclaration sd= getDeclaration(tu, 0);
+    	assertInstance(sd.getDeclarators()[0], IASTFunctionDeclarator.class);
+    }
+    
+
+    
+    // void test() {
+    // sizeof(int, 1);
+    // sizeof(int, 2, 2);
+    // }
+    public void testSizeofExtension() throws Exception {
+    	IASTTranslationUnit tu= parseCWithExtension(getAboveComment(), SIZEOF_EXTENSION);
+    	IASTFunctionDefinition fdef= getDeclaration(tu, 0);
+    	IASTUnaryExpression expr= getExpressionOfStatement(fdef, 0);
+    	assertEquals(IASTUnaryExpression.op_sizeof, expr.getOperator());
+    	assertInstance(expr.getOperand(), IASTExpressionList.class);
+    	expr= getExpressionOfStatement(fdef, 1);
+    	assertEquals(IASTUnaryExpression.op_sizeof, expr.getOperator());
+    	assertInstance(expr.getOperand(), IASTExpressionList.class);
+
+    	tu= parseCPPWithExtension(getAboveComment(), SIZEOF_EXTENSION);
+    	fdef= getDeclaration(tu, 0);
+    	expr= getExpressionOfStatement(fdef, 0);
+    	assertEquals(IASTUnaryExpression.op_sizeof, expr.getOperator());
+    	assertInstance(expr.getOperand(), IASTExpressionList.class);
+    	expr= getExpressionOfStatement(fdef, 1);
+    	assertEquals(IASTUnaryExpression.op_sizeof, expr.getOperator());
+    	assertInstance(expr.getOperand(), IASTExpressionList.class);
+    }
+    
+    //  asm volatile int a1() {
+    //     assembler code here
+    //  }
+    //  asm int a2() {
+    //     assembler code here
+    //  }
+    //  asm volatile a3(int) {
+    //     assembler code here
+    //  }
+    //  asm a4() {
+    //     assembler code here
+    //  }
+    public void testFunctionStyleAssembler() throws Exception {
+    	IASTTranslationUnit tu= parseCWithExtension(getAboveComment(), FUNCTION_STYLE_ASM);
+    	IASTFunctionDefinition fdef= getDeclaration(tu, 0);
+    	fdef= getDeclaration(tu, 1);
+    	fdef= getDeclaration(tu, 2);
+    	fdef= getDeclaration(tu, 3);
+
+    	tu= parseCPPWithExtension(getAboveComment(), FUNCTION_STYLE_ASM);
+    	fdef= getDeclaration(tu, 0);
+    	fdef= getDeclaration(tu, 1);
+    	fdef= getDeclaration(tu, 2);
+    	fdef= getDeclaration(tu, 3);
+    }
+    	
+	// /% a comment %/
+	// int a;
+	public void testSlashPercentComment() throws Exception {
+    	IASTTranslationUnit tu= parseCWithExtension(getAboveComment(), SLASH_PERCENT_COMMENT);
+
+		IASTDeclaration d= getDeclaration(tu, 0);
+		assertEquals("int a;", d.getRawSignature());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/QuickParser2Tests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/QuickParser2Tests.java
new file mode 100644
index 0000000..0756418
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/QuickParser2Tests.java
@@ -0,0 +1,1566 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM Rational Software - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.dom.ast.IASTProblem;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.parser.ISourceCodeParser;
+import org.eclipse.cdt.core.dom.parser.c.ANSICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.GCCParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.ICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ANSICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.GPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.IScanner;
+import org.eclipse.cdt.core.parser.IScannerInfo;
+import org.eclipse.cdt.core.parser.NullLogService;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.ParserMode;
+import org.eclipse.cdt.core.parser.ScannerInfo;
+import org.eclipse.cdt.internal.core.dom.parser.c.CVisitor;
+import org.eclipse.cdt.internal.core.dom.parser.c.GNUCSourceParser;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+/**
+ * @author jcamelon
+ */
+public class QuickParser2Tests extends TestCase {
+
+    private static final NullLogService NULL_LOG = new NullLogService();
+
+    /**
+     *  
+     */
+    public QuickParser2Tests() {
+        super();
+    }
+
+    /**
+     * @param name
+     */
+    public QuickParser2Tests(String name) {
+        super(name);
+    }
+
+    
+    @Override
+	protected void setUp() throws Exception {
+    	CPPASTNameBase.sAllowRecursionBindings= false;
+    	CPPASTNameBase.sAllowNameComputation= false;
+	}
+
+	/**
+     * Test code: int x = 5; Purpose: to test the simple decaration in it's
+     * simplest form.
+     */
+    public void testIntGlobal() throws Exception {
+        // Parse and get the translation Unit
+        parse("int x = 5;"); 
+    }
+
+    /**
+     * Test code: class A { } a; Purpose: tests the use of a classSpecifier in
+     */
+    public void testEmptyClass() throws Exception {
+        // Parse and get the translation unit
+        Writer code = new StringWriter();
+        code.write("class A { } a;"); 
+        parse(code.toString());
+    }
+
+    /**
+     * Test code: class A { public: int x; }; Purpose: tests a declaration in a
+     * class scope.
+     */
+    public void testSimpleClassMember() throws Exception {
+        // Parse and get the translaton unit
+        Writer code = new StringWriter();
+        code.write("class A { public: int x; };"); 
+        parse(code.toString());
+    }
+
+    protected void parse(String code, boolean expectedToPass,
+            ParserLanguage lang) throws Exception {
+        parse(code, expectedToPass, lang, false);
+    }
+
+    protected void parse(String code, boolean expectedToPass) throws Exception {
+        parse(code, expectedToPass, ParserLanguage.CPP);
+    }
+
+    /**
+     * @param code
+     */
+    protected void parse(String code) throws Exception {
+        parse(code, true, ParserLanguage.CPP);
+    }
+
+    public void testNamespaceDefinition() throws Exception {
+        for (int i = 0; i < 2; ++i) {
+            if (i == 0)
+                parse("namespace KingJohn { int x; }"); 
+            else
+                parse("namespace { int x; }"); 
+        }
+    }
+
+    public void testLinkageSpecification() throws Exception {
+        for (int i = 0; i < 2; ++i) {
+            if (i == 0)
+                parse("extern \"C\" { int x(void); }"); 
+            else
+                parse("extern \"ADA\" int x(void);"); 
+        }
+    }
+
+    public void testEnumSpecifier() throws Exception {
+        Writer code = new StringWriter();
+        code.write("enum { yo, go = 3, away };\n"); 
+        code.write("enum hasAString { last = 666 };"); 
+        parse(code.toString());
+    }
+
+    public void testTypedef() throws Exception {
+        parse("typedef const struct A * const cpStructA;"); 
+    }
+
+    public void testUsingClauses() throws Exception {
+        Writer code = new StringWriter();
+        code.write("using namespace A::B::C;\n"); 
+        code.write("using namespace C;\n"); 
+        code.write("using B::f;\n"); 
+        code.write("using ::f;\n"); 
+        code.write("using typename crap::de::crap;"); 
+        parse(code.toString());
+    }
+
+    /**
+     * Test code: class A : public B, private C, virtual protected D { public:
+     * int x, y; float a,b,c; } Purpose: tests a declaration in a class scope.
+     */
+    public void testSimpleClassMembers() throws Exception {
+        // Parse and get the translaton unit
+        Writer code = new StringWriter();
+        code
+                .write("class A : public B, private C, virtual protected D { public: int x, y; float a,b,c; };"); 
+        parse(code.toString());
+    }
+
+    /**
+     * Test code: int myFunction( void );
+     */
+    public void testSimpleFunctionDeclaration() throws Exception {
+        // Parse and get the translaton unit
+        Writer code = new StringWriter();
+        code.write("void myFunction( void );"); 
+        parse(code.toString());
+    }
+
+    /**
+     * Test code: bool myFunction( int parm1 = 3 * 4, double parm2 );
+     * 
+     * @throws Exception
+     */
+    public void testFunctionDeclarationWithParameters() throws Exception {
+        // Parse and get the translaton unit
+        Writer code = new StringWriter();
+        code.write("bool myFunction( int parm1 = 3 * 4, double parm2 );"); 
+        parse(code.toString());
+    }
+
+    public void testAssignmentExpressions() throws Exception {
+        parse("int x = y = z = 5;"); 
+    }
+
+    public void testBug39348() throws Exception {
+        parse("unsigned char a[sizeof (struct sss)];"); 
+    }
+
+    public void testBug39501() throws Exception {
+        parse("struct A { A() throw (int); };"); 
+    }
+
+    public void testBug39349() throws Exception {
+        parse("enum foo {  foo1   = 0,  foo2   = 0xffffffffffffffffULL,  foo3   = 0xf0fffffffffffffeLLU };"); 
+    }
+
+    public void testBug39544() throws Exception {
+        parse("wchar_t wc = L'X';"); 
+    }
+
+    public void testBug36290() throws Exception {
+        parse("typedef void ( A:: * pMethod ) ( void ); "); 
+        parse("typedef void (boo) ( void ); "); 
+        parse("typedef void boo (void); "); 
+    }
+
+    public void testBug36769B() throws Exception {
+        parse("class X { operator int(); }; \n"); 
+        parse("class X { operator int*(); }; \n"); 
+        parse("class X { operator int&(); }; \n"); 
+        parse("class X { operator A(); }; \n"); 
+        parse("class X { operator A*(); }; \n"); 
+        parse("class X { operator A&(); }; \n"); 
+
+        parse("X::operator int() { } \n"); 
+        parse("X::operator int*() { } \n"); 
+        parse("X::operator int&() { } \n"); 
+        parse("X::operator A() { } \n"); 
+        parse("X::operator A*() { } \n"); 
+        parse("X::operator A&() { } \n"); 
+
+        parse("template <class A,B> class X<A,C> { operator int(); }; \n"); 
+        parse("template <class A,B> class X<A,C> { operator int*(); }; \n"); 
+        parse("template <class A,B> class X<A,C> { operator int&(); }; \n"); 
+        parse("template <class A,B> class X<A,C> { operator A(); }; \n"); 
+        parse("template <class A,B> class X<A,C> { operator A*(); }; \n"); 
+        parse("template <class A,B> class X<A,C> { operator A&(); }; \n"); 
+
+        parse("template <class A,B> X<A,C>::operator int() { }; \n"); 
+        parse("template <class A,B> X<A,C>::operator int*() { }; \n"); 
+        parse("template <class A,B> X<A,C>::operator int&() { }; \n"); 
+        parse("template <class A,B> X<A,C>::operator A() { }; \n"); 
+        parse("template <class A,B> X<A,C>::operator A*() { }; \n"); 
+        parse("template <class A,B> X<A,C>::operator A&() { }; \n"); 
+    }
+
+	// failing, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=236856
+    public void _testBug36932C() throws Exception {
+        parse("X::X( ) : var( new int ) {}"); 
+        parse("X::X( ) : var( new int(5) ) {}"); 
+        parse("X::X( ) : var( new int(B) ) {}"); 
+        parse("X::X( ) : var( new int(B,C) ) {}"); 
+        parse("X::X( ) : var( new int[5] ) {}"); 
+        parse("X::X( ) : var( new int[5][10] ) {}"); 
+        parse("X::X( ) : var( new int[B] ) {}"); 
+        parse("X::X( ) : var( new int[B][C][D] ) {}"); 
+
+        parse("X::X( ) : var( new A ) {}"); 
+        parse("X::X( ) : var( new A(5) ) {}"); 
+        parse("X::X( ) : var( new A(B) ) {}"); 
+        parse("X::X( ) : var( new A(B,C) ) {}"); 
+        parse("X::X( ) : var( new A[5] ) {}"); 
+        parse("X::X( ) : var( new A[5][10] ) {}"); 
+        parse("X::X( ) : var( new A[B] ) {}"); 
+        parse("X::X( ) : var( new A[B][C][D] ) {}"); 
+
+        parse("X::X( ) : var( new (int) ) {}"); 
+        parse("X::X( ) : var( new (int)(5) ) {}"); 
+        parse("X::X( ) : var( new (int)(B) ) {}"); 
+        parse("X::X( ) : var( new (int)(B,C) ) {}"); 
+        parse("X::X( ) : var( new (int[5]) ) {}"); 
+        parse("X::X( ) : var( new (int[5][10]) ) {}"); 
+        parse("X::X( ) : var( new (int[B]) ) {}"); 
+        parse("X::X( ) : var( new (int[B][C][D]) ) {}"); 
+
+        parse("X::X( ) : var( new (A) ) {}"); 
+        parse("X::X( ) : var( new (A)(5) ) {}"); 
+        parse("X::X( ) : var( new (A)(B) ) {}"); 
+        parse("X::X( ) : var( new (A)(B,C) ) {}"); 
+        parse("X::X( ) : var( new (A[5]) ) {}"); 
+        parse("X::X( ) : var( new (A[5][10]) ) {}"); 
+        parse("X::X( ) : var( new (A[B]) ) {}"); 
+        parse("X::X( ) : var( new (A[B][C][D]) ) {}"); 
+
+        parse("X::X( ) : var( new (0) int ) {}"); 
+        parse("X::X( ) : var( new (0) int(5) ) {}"); 
+        parse("X::X( ) : var( new (0) int(B) ) {}"); 
+        parse("X::X( ) : var( new (0) int(B,C) ) {}"); 
+        parse("X::X( ) : var( new (0) int[5] ) {}"); 
+        parse("X::X( ) : var( new (0) int[5][10] ) {}"); 
+        parse("X::X( ) : var( new (0) int[B] ) {}"); 
+        parse("X::X( ) : var( new (0) int[B][C][D] ) {}"); 
+
+        parse("X::X( ) : var( new (0) A ) {}"); 
+        parse("X::X( ) : var( new (0) A(5) ) {}"); 
+        parse("X::X( ) : var( new (0) A(B) ) {}"); 
+        parse("X::X( ) : var( new (0) A(B,C) ) {}"); 
+        parse("X::X( ) : var( new (0) A[5] ) {}"); 
+        parse("X::X( ) : var( new (0) A[5][10] ) {}"); 
+        parse("X::X( ) : var( new (0) A[B] ) {}"); 
+        parse("X::X( ) : var( new (0) A[B][C][D] ) {}"); 
+
+        parse("X::X( ) : var( new (0) (int) ) {}"); 
+        parse("X::X( ) : var( new (0) (int)(5) ) {}"); 
+        parse("X::X( ) : var( new (0) (int)(B) ) {}"); 
+        parse("X::X( ) : var( new (0) (int)(B,C) ) {}"); 
+        parse("X::X( ) : var( new (0) (int[5]) ) {}"); 
+        parse("X::X( ) : var( new (0) (int[5][10]) ) {}"); 
+        parse("X::X( ) : var( new (0) (int[B]) ) {}"); 
+        parse("X::X( ) : var( new (0) (int[B][C][D]) ) {}"); 
+
+        parse("X::X( ) : var( new (0) (A) ) {}"); 
+        parse("X::X( ) : var( new (0) (A)(5) ) {}"); 
+        parse("X::X( ) : var( new (0) (A)(B) ) {}"); 
+        parse("X::X( ) : var( new (0) (A)(B,C) ) {}"); 
+        parse("X::X( ) : var( new (0) (A[5]) ) {}"); 
+        parse("X::X( ) : var( new (0) (A[5][10]) ) {}"); 
+        parse("X::X( ) : var( new (0) (A[B]) ) {}"); 
+        parse("X::X( ) : var( new (0) (A[B][C][D]) ) {}"); 
+
+        parse("X::X( ) : var( new (P) int ) {}"); 
+        parse("X::X( ) : var( new (P) int(5) ) {}"); 
+        parse("X::X( ) : var( new (P) int(B) ) {}"); 
+        parse("X::X( ) : var( new (P) int(B,C) ) {}"); 
+        parse("X::X( ) : var( new (P) int[5] ) {}"); 
+        parse("X::X( ) : var( new (P) int[5][10] ) {}"); 
+        parse("X::X( ) : var( new (P) int[B] ) {}"); 
+        parse("X::X( ) : var( new (P) int[B][C][D] ) {}"); 
+
+        parse("X::X( ) : var( new (P) A ) {}"); 
+        parse("X::X( ) : var( new (P) A(5) ) {}"); 
+        parse("X::X( ) : var( new (P) A(B) ) {}"); 
+        parse("X::X( ) : var( new (P) A(B,C) ) {}"); 
+        parse("X::X( ) : var( new (P) A[5] ) {}"); 
+        parse("X::X( ) : var( new (P) A[5][10] ) {}"); 
+        parse("X::X( ) : var( new (P) A[B] ) {}"); 
+        parse("X::X( ) : var( new (P) A[B][C][D] ) {}"); 
+
+        parse("X::X( ) : var( new (P) (int) ) {}"); 
+        parse("X::X( ) : var( new (P) (int)(5) ) {}"); 
+        parse("X::X( ) : var( new (P) (int)(B) ) {}"); 
+        parse("X::X( ) : var( new (P) (int)(B,C) ) {}"); 
+        parse("X::X( ) : var( new (P) (int[5]) ) {}"); 
+        parse("X::X( ) : var( new (P) (int[5][10]) ) {}"); 
+        parse("X::X( ) : var( new (P) (int[B]) ) {}"); 
+        parse("X::X( ) : var( new (P) (int[B][C][D]) ) {}"); 
+
+        parse("X::X( ) : var( new (P) (A) ) {}"); 
+        parse("X::X( ) : var( new (P) (A)(5) ) {}"); 
+        parse("X::X( ) : var( new (P) (A)(B) ) {}"); 
+        parse("X::X( ) : var( new (P) (A)(B,C) ) {}"); 
+        parse("X::X( ) : var( new (P) (A[5]) ) {}"); 
+        parse("X::X( ) : var( new (P) (A[5][10]) ) {}"); 
+        parse("X::X( ) : var( new (P) (A[B]) ) {}"); 
+        parse("X::X( ) : var( new (P) (A[B][C][D]) ) {}"); 
+    }
+
+    public void testBugSingleton192() throws Exception {
+        parse("int Test::* pMember_;"); 
+    }
+
+    public void testBug36931() throws Exception {
+        parse("A::nested::nested(){}; "); 
+        parse("int A::nested::foo() {} "); 
+        parse("int A::nested::operator+() {} "); 
+        parse("A::nested::operator int() {} "); 
+        parse("static const int A::nested::i = 1; "); 
+
+        parse("template <class B,C> A<B>::nested::nested(){}; "); 
+        parse("template <class B,C> int A::nested<B,D>::foo() {} "); 
+        parse("template <class B,C> int A<B,C>::nested<C,B>::operator+() {} "); 
+        parse("template <class B,C> A::nested::operator int() {} "); 
+    }
+
+    public void testBug37019() throws Exception {
+        parse("static const A a( 1, 0 );"); 
+    }
+
+    public void testBug36766and36769A() throws Exception {
+        Writer code = new StringWriter();
+        code.write("template <class _CharT, class _Alloc>\n"); 
+        code.write("rope<_CharT, _Alloc>::rope(size_t __n, _CharT __c,\n"); 
+        code.write("const allocator_type& __a): _Base(__a)\n"); 
+        code.write("{}\n"); 
+        parse(code.toString());
+    }
+
+    public void testBug36766and36769B() throws Exception {
+        Writer code = new StringWriter();
+        code.write("template<class _CharT>\n"); 
+        code.write("bool _Rope_insert_char_consumer<_CharT>::operator()\n"); 
+        code.write("(const _CharT* __leaf, size_t __n)\n"); 
+        code.write("{}\n"); 
+        parse(code.toString());
+    }
+
+    public void testBug36766and36769C() throws Exception {
+        //TODO - requires CPPVisitor
+        Writer code = new StringWriter();
+        code.write("template <class _CharT, class _Alloc>\n"); 
+        code.write("_Rope_char_ref_proxy<_CharT, _Alloc>&\n"); 
+        code
+                .write("_Rope_char_ref_proxy<_CharT, _Alloc>::operator= (_CharT __c)\n"); 
+        code.write("{}\n"); 
+        parse(code.toString());
+    }
+
+    public void testBug36766and36769D() throws Exception {
+        //TODO - requires CPPVisitor
+        Writer code = new StringWriter();
+        code.write("template <class _CharT, class _Alloc>\n"); 
+        code.write("rope<_CharT, _Alloc>::~rope()\n"); 
+        code.write("{}\n"); 
+        parse(code.toString());
+    }
+
+    public void testBug36932A() throws Exception {
+        parse("A::A( ) : var( new char [ (unsigned)bufSize ] ) {}"); 
+    }
+
+	// failing, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=236856
+    public void _testBug36932B() throws Exception {
+        parse(" p = new int; "); 
+        parse(" p = new int(5); "); 
+        parse(" p = new int(B); "); 
+        parse(" p = new int(B,C); "); 
+        parse(" p = new int[5]; "); 
+        parse(" p = new int[5][10]; "); 
+        parse(" p = new int[B]; "); 
+        parse(" p = new int[B][C][D]; "); 
+
+        parse(" p = new A; "); 
+        parse(" p = new A(5); "); 
+        parse(" p = new A(B); "); 
+        parse(" p = new A(B,C); "); 
+        parse(" p = new A[5]; "); 
+        parse(" p = new A[5][10]; "); 
+        parse(" p = new A[B]; "); 
+        parse(" p = new A[B][C][D]; "); 
+
+        parse(" p = new (int); "); 
+        parse(" p = new (int)(5); "); 
+        parse(" p = new (int)(B); "); 
+        parse(" p = new (int)(B,C); "); 
+        parse(" p = new (int[5]); "); 
+        parse(" p = new (int[5][10]); "); 
+        parse(" p = new (int[B]); "); 
+        parse(" p = new (int[B][C][D]); "); 
+
+        parse(" p = new (A); "); 
+        parse(" p = new (A)(5); "); 
+        parse(" p = new (A)(B); "); 
+        parse(" p = new (A)(B,C); "); 
+        parse(" p = new (A[5]); "); 
+        parse(" p = new (A[5][10]); "); 
+        parse(" p = new (A[B]); "); 
+        parse(" p = new (A[B][C][D]); "); 
+
+        parse(" p = new (0) int; "); 
+        parse(" p = new (0) int(5); "); 
+        parse(" p = new (0) int(B); "); 
+        parse(" p = new (0) int(B,C); "); 
+        parse(" p = new (0) int[5]; "); 
+        parse(" p = new (0) int[5][10]; "); 
+        parse(" p = new (0) int[B]; "); 
+        parse(" p = new (0) int[B][C][D]; "); 
+
+        parse(" p = new (0) A; "); 
+        parse(" p = new (0) A(5); "); 
+        parse(" p = new (0) A(B); "); 
+        parse(" p = new (0) A(B,C); "); 
+        parse(" p = new (0) A[5]; "); 
+        parse(" p = new (0) A[5][10]; "); 
+        parse(" p = new (0) A[B]; "); 
+        parse(" p = new (0) A[B][C][D]; "); 
+
+        parse(" p = new (0) (int); "); 
+        parse(" p = new (0) (int)(5); "); 
+        parse(" p = new (0) (int)(B); "); 
+        parse(" p = new (0) (int)(B,C); "); 
+        parse(" p = new (0) (int[5]); "); 
+        parse(" p = new (0) (int[5][10]); "); 
+        parse(" p = new (0) (int[B]); "); 
+        parse(" p = new (0) (int[B][C][D]); "); 
+
+        parse(" p = new (0) (A); "); 
+        parse(" p = new (0) (A)(5); "); 
+        parse(" p = new (0) (A)(B); "); 
+        parse(" p = new (0) (A)(B,C); "); 
+        parse(" p = new (0) (A[5]); "); 
+        parse(" p = new (0) (A[5][10]); "); 
+        parse(" p = new (0) (A[B]); "); 
+        parse(" p = new (0) (A[B][C][D]); "); 
+
+        parse(" p = new (P) int; "); 
+        parse(" p = new (P) int(5); "); 
+        parse(" p = new (P) int(B); "); 
+        parse(" p = new (P) int(B,C); "); 
+        parse(" p = new (P) int[5]; "); 
+        parse(" p = new (P) int[5][10]; "); 
+        parse(" p = new (P) int[B]; "); 
+        parse(" p = new (P) int[B][C][D]; "); 
+
+        parse(" p = new (P) A; "); 
+        parse(" p = new (P) A(5); "); 
+        parse(" p = new (P) A(B); "); 
+        parse(" p = new (P) A(B,C); "); 
+        parse(" p = new (P) A[5]; "); 
+        parse(" p = new (P) A[5][10]; "); 
+        parse(" p = new (P) A[B]; "); 
+        parse(" p = new (P) A[B][C][D]; "); 
+
+        parse(" p = new (P) (int); "); 
+        parse(" p = new (P) (int)(5); "); 
+        parse(" p = new (P) (int)(B); "); 
+        parse(" p = new (P) (int)(B,C); "); 
+        parse(" p = new (P) (int[5]); "); 
+        parse(" p = new (P) (int[5][10]); "); 
+        parse(" p = new (P) (int[B]); "); 
+        parse(" p = new (P) (int[B][C][D]); "); 
+
+        parse(" p = new (P) (A); "); 
+        parse(" p = new (P) (A)(5); "); 
+        parse(" p = new (P) (A)(B); "); 
+        parse(" p = new (P) (A)(B,C); "); 
+        parse(" p = new (P) (A[5]); "); 
+        parse(" p = new (P) (A[5][10]); "); 
+        parse(" p = new (P) (A[B]); "); 
+        parse(" p = new (P) (A[B][C][D]); "); 
+    }
+
+    public void testBug36769A() throws Exception {
+
+        parse("template <class A, B> cls<A, C>::operator otherType() const {}\n"); 
+        parse("template <class A, B> cls<A, C>::cls() {}\n"); 
+        parse("template <class A, B> cls<A, C>::~cls() {}\n"); 
+    }
+
+    public void testBug36714() throws Exception {
+        Writer code = new StringWriter();
+        code.write("unsigned long a = 0UL;\n"); 
+        code.write("unsigned long a2 = 0L; \n"); 
+
+        parse(code.toString());
+    }
+
+    public void testBugFunctor758() throws Exception {
+        parse(
+        	"class Functor {"+
+        	"template <typename Fun> Functor(Fun fun) : spImpl_(new FunctorHandler<Functor, Fun>(fun)){}" +
+        	"};"
+        ); 
+    }
+
+    public void testBug36932() throws Exception {
+        parse("A::A(): b( new int( 5 ) ), b( new B ), c( new int ) {}"); 
+    }
+
+    public void testBug36704() throws Exception {
+        Writer code = new StringWriter();
+        code.write("template<typename T, typename U> class Typelist;");
+        code.write("template<typename T> struct Length {};");
+        code.write("template <class T, class U>\n"); 
+        code.write("struct Length< Typelist<T, U> >\n"); 
+        code.write("{\n"); 
+        code.write("enum { value = 1 + Length<U>::value };\n"); 
+        code.write("};\n"); 
+        parse(code.toString());
+    }
+
+    public void testBug36699() throws Exception {
+        Writer code = new StringWriter();
+        code.write("template <	template <class> class ThreadingModel = DEFAULT_THREADING,\n"); 
+        code.write("std::size_t chunkSize = DEFAULT_CHUNK_SIZE,\n"); 
+        code.write("std::size_t maxSmallObjectSize = MAX_SMALL_OBJECT_SIZE	>\n"); 
+        code.write("class SmallObject : public ThreadingModel<\n"); 
+        code.write("SmallObject<ThreadingModel, chunkSize, maxSmallObjectSize> >\n"); 
+        code.write("{};\n"); 
+        parse(code.toString());
+    }
+
+    public void testBug36691() throws Exception {
+        Writer code = new StringWriter();
+        code.write("template <class T, class H>\n"); 
+        code.write("typename H::template Rebind<T>::Result& Field(H& obj)\n"); 
+        code.write("{	return obj;	}\n"); 
+        parse(code.toString());
+    }
+
+    public void testBug36702() throws Exception {
+        Writer code = new StringWriter();
+        code.write("void mad_decoder_init(struct mad_decoder *, void *,\n"); 
+        code.write("			  enum mad_flow (*)(void *, struct mad_stream *),\n"); 
+        code
+                .write("			  enum mad_flow (*)(void *, struct mad_header const *),\n"); 
+        code.write("			  enum mad_flow (*)(void *,\n"); 
+        code.write("					struct mad_stream const *,\n"); 
+        code.write("					struct mad_frame *),\n"); 
+        code.write("			  enum mad_flow (*)(void *,\n"); 
+        code.write("					struct mad_header const *,\n"); 
+        code.write("					struct mad_pcm *),\n"); 
+        code.write("			  enum mad_flow (*)(void *,\n"); 
+        code.write("					struct mad_stream *,\n"); 
+        code.write("					struct mad_frame *),\n"); 
+        code.write("			  enum mad_flow (*)(void *, void *, unsigned int *)\n"); 
+        code.write(");\n"); 
+
+        parse(code.toString());
+
+    }
+
+    public void testBug36852() throws Exception {
+        Writer code = new StringWriter();
+        code
+                .write("int CBT::senseToAllRect( double id_standardQuot = DOSE, double id_minToleranz =15.0,\n"); 
+        code
+                .write("double id_maxToleranz = 15.0, unsigned int iui_minY = 0, \n"); 
+        code.write("unsigned int iui_maxY = HEIGHT );\n"); 
+        parse(code.toString());
+    }
+
+    public void testBug36689() throws Exception {
+        Writer code = new StringWriter();
+        code.write("template\n"); 
+        code.write("<\n"); 
+        code.write("class AbstractFact,\n"); 
+        code
+                .write("template <class, class> class Creator = OpNewFactoryUnit,\n"); 
+        code.write("class TList = typename AbstractFact::ProductList\n"); 
+        code.write(">\n"); 
+        code.write("class ConcreteFactory\n"); 
+        code.write(": public GenLinearHierarchy<\n"); 
+        code
+                .write("typename TL::Reverse<TList>::Result, Creator, AbstractFact>\n"); 
+        code.write("{\n"); 
+        code.write("public:\n"); 
+        code.write("typedef typename AbstractFact::ProductList ProductList;\n"); 
+        code.write("typedef TList ConcreteProductList;\n"); 
+        code.write("};\n"); 
+        parse(code.toString());
+    }
+
+    public void testBug36707() throws Exception {
+        parse("enum { exists = sizeof(typename H::Small) == sizeof((H::Test(H::MakeT()))) };"); 
+    }
+
+    public void testBug36717() throws Exception {
+        parse("enum { eA = A::b };"); 
+    }
+
+    public void testBug36693() throws Exception {
+        parse("FixedAllocator::Chunk* FixedAllocator::VicinityFind(void* p){}"); 
+    }
+
+    public void testWeirdExpression() throws Exception {
+        parse("int x = rhs.spImpl_.get();"); 
+    }
+
+    public void testBug36696() throws Exception {
+        Writer code = new StringWriter();
+        code.write("template<typename T> class RefCounted {");
+        code.write("template <typename P1> RefCounted(const RefCounted<P1>& rhs)\n"); 
+        code.write(": pCount_(reinterpret_cast<const RefCounted&>(rhs).pCount_) {}\n"); 
+        code.write("};"); 
+        parse(code.toString());
+    }
+
+    public void testArrayOfPointerToFunctions() throws Exception {
+        parse("unsigned char (*main_data)[MAD_BUFFER_MDLEN];"); 
+    }
+
+    public void testBug36073() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("class A{\n"); 
+        writer.write("int x;\n"); 
+        writer.write("public:\n"); 
+        writer.write("A(const A&);\n"); 
+        writer.write("};\n"); 
+        writer.write("A::A(const A&v) : x(v.x) { }\n"); 
+        parse(writer.toString());
+    }
+
+    public void testTemplateSpecialization() throws Exception {
+        parse("template<> class stream<char> { /* ... */ };"); 
+    }
+
+    public void testTemplateInstantiation() throws Exception {
+        parse("template class Array<char>;"); 
+    }
+
+    /**
+     * Test code: "class A { int floor( double input ), someInt; };"
+     */
+    public void testMultipleDeclarators() throws Exception {
+        // Parse and get the translaton unit
+        parse("class A { int floor( double input ), someInt; };"); 
+    }
+
+    public void testFunctionModifiers() throws Exception {
+        parse("class A {virtual void foo( void ) const throw ( yay, nay, we::dont::care ) = 0;};"); 
+    }
+
+    public void testArrays() throws Exception {
+        parse("int x [5][];"); 
+    }
+
+    public void testElaboratedParms() throws Exception {
+        parse("int x( struct A myA ) { /* junk */ }"); 
+    }
+
+    public void testMemberDeclarations() throws Exception {
+        Writer code = new StringWriter();
+        code.write("class A {\n"); 
+        code.write("public:\n"); 
+        code.write(" int is0;\n"); 
+        code.write("private:\n"); 
+        code.write(" int is1;\n"); 
+        code.write("protected:\n"); 
+        code.write(" int is2;\n"); 
+        code.write("};"); 
+        parse(code.toString());
+    }
+
+    public void testPointerOperators() throws Exception {
+        parse("int * x = 0, & y, * const * volatile * z;"); 
+    }
+
+    public void testBug26467() throws Exception {
+        StringWriter code = new StringWriter();
+        code.write("struct foo { int fooInt; char fooChar;	};\n"); 
+        code.write("typedef struct foo fooStruct;\n"); 
+        code.write("typedef struct { int anonInt; char anonChar; } anonStruct;\n"); 
+        parse(code.toString());
+    }
+
+    public void testASMDefinition() throws Exception {
+        parse("asm( \"mov ep1 ds2\");"); 
+    }
+
+    public void testConstructorChain() throws Exception {
+        //TODO - requires CPPVisitor in order to reduce ambiguities
+        parse("TrafficLight_Actor::TrafficLight_Actor( RTController * rtg_rts, RTActorRef * rtg_ref )	: RTActor( rtg_rts, rtg_ref ), myId( 0 ) {}"); 
+    }
+
+    public void testBug36237() throws Exception {
+        parse("A::A():B( (char *)0 ){}"); 
+    }
+
+    public void testBug36532() throws Exception {
+        try {
+            parse("template<int f() {\n"); 
+            fail("We should not make it this far"); 
+        } catch (ParserException pe) {
+        } catch (Exception e) {
+            fail("We should have gotten a ParserException rather than" + e); 
+        }
+    }
+
+    public void testPreprocessor() throws Exception {
+        parse("#include <stdio.h>\n#define DEF VALUE\n");
+    }
+
+    public void testTemplateDeclarationOfFunction() throws Exception {
+        parse("template<class A, typename B=C> A aTemplatedFunction( B bInstance );"); 
+    }
+
+    public void testTemplateDeclarationOfClass() throws Exception {
+        parse("template<class T, typename Tibor = junk, class, typename, int x, float y,template <class Y> class, template<class A> class AClass> class myarray { /* ... */ };"); 
+    }
+
+    public void testBug35906() throws Exception {
+        StringWriter code = new StringWriter();
+        code.write("void TTest::MTest() {}\n"); 
+        code.write("struct TTest::STest *TTest::FTest (int i) {}\n"); 
+        parse(code.toString());
+    }
+
+    public void testBug36288() throws Exception {
+        parse("int foo() {}\nlong foo2(){}"); 
+    }
+
+    public void testBug36250() throws Exception {
+        parse("int f( int = 0 );"); 
+    }
+
+    public void testBug36240() throws Exception {
+        parse("A & A::operator=( A ){}"); 
+    }
+
+    public void testBug36254() throws Exception {
+        parse("unsigned i;\nvoid f( unsigned p1 = 0 );"); 
+    }
+
+    public void testBug36432() throws Exception {
+        Writer code = new StringWriter();
+        code.write("#define CMD_GET		\"g\"\n"); 
+        code.write("#define CMD_ACTION   	\"a\"\n"); 
+        code.write("#define CMD_QUIT		\"q\"\n"); 
+        code
+                .write("static const memevent_cmd_func memevent_cmd_funcs[sizeof memevent_cmds - 1] = {\n"); 
+        code.write("memevent_get,\n"); 
+        code.write("memevent_action,\n"); 
+        code.write("memevent_quit,\n"); 
+        code.write("};\n"); 
+        parse(code.toString());
+    }
+
+    public void testBug36594() throws Exception {
+        parse("const int n = sizeof(A) / sizeof(B);"); 
+    }
+
+    public void testBug36794() throws Exception {
+        parse("template<> class allocator<void> {};"); 
+    }
+
+    public void testBug36799() throws Exception {
+        parse("static const int __WORD_BIT = int(CHAR_BIT*sizeof(unsigned int));"); 
+    }
+
+    public void testBug36764() throws Exception {
+        parse("struct{ int x : 4; int y : 8; };"); 
+    }
+
+    public void testOrder() throws Exception {
+        //TODO - requires CPPVisitor
+        Writer code = new StringWriter();
+        code.write("#define __SGI_STL_INTERNAL_ALGOBASE_H\n"); 
+        code.write("#include <string.h>\n"); 
+        code.write("template <class _Tp>\n"); 
+        code.write("inline void swap(_Tp& __a, _Tp& __b) {\n"); 
+        code.write("__STL_REQUIRES(_Tp, _Assignable);\n"); 
+        code.write("_Tp __tmp = __a;\n"); 
+        code.write("__a = __b;\n"); 
+        code.write("__b = __tmp;\n"); 
+        code.write("}\n"); 
+        parse(code.toString());
+    }
+
+    public void testBug36771() throws Exception {
+        Writer code = new StringWriter();
+        code.write("#include /**/ \"foo.h\"\n"); 
+
+        parse(code.toString());
+    }
+
+    public void testBug36811() throws Exception {
+        Writer code = new StringWriter();
+        code.write("using namespace std;\n"); 
+        code.write("class Test {};"); 
+        parse(code.toString());
+    }
+
+    public void testBug36708() throws Exception {
+        parse("enum { isPointer = PointerTraits<T>::result };"); 
+    }
+
+    public void testBug36690() throws Exception {
+        parse(
+        	"class Functor {" +
+        	"Functor(const Functor& rhs) : spImpl_(Impl::Clone(rhs.spImpl_.get())){}" +
+        	"};"
+        ); 
+    }
+
+    public void testBug36703() throws Exception {
+        parse("const std::type_info& Get() const;"); 
+    }
+
+    public void testBug36692() throws Exception {
+        Writer code = new StringWriter();
+        code.write("template <typename T, typename Destroyer>\n"); 
+        code
+                .write("void SetLongevity(T* pDynObject, unsigned int longevity,\n"); 
+        code.write("Destroyer d = Private::Deleter<T>::Delete){}\n"); 
+        parse(code.toString());
+    }
+
+    public void testBug36551() throws Exception {
+        Writer code = new StringWriter();
+        code.write("class TextFrame {\n"); 
+        code.write("BAD_MACRO()\n"); 
+        code.write("};"); 
+        parse(code.toString(), false);
+    }
+
+//    public void testBug36247() throws Exception {
+//        Writer code = new StringWriter();
+//        code.write("class A {\n"); 
+//        code.write("INLINE_DEF int f ();\n"); 
+//        code.write("INLINE_DEF A   g ();"); 
+//        code.write("INLINE_DEF A * h ();"); 
+//        code.write("INLINE_DEF A & unlock( void );"); 
+//        code.write("};"); 
+//        parse(code.toString());
+//    }
+
+    public void testStruct() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("struct mad_bitptr { unsigned char const *byte;\n"); 
+        writer.write("unsigned short cache;\n unsigned short left;};"); 
+        parse(writer.toString());
+    }
+
+    public void testBug36559() throws Exception {
+        Writer code = new StringWriter();
+        code.write("namespace myNameSpace {\n"); 
+        code.write("template<typename T=short> class B {};\n"); 
+        code.write("template<> class B<int> {};\n"); 
+        code.write("}\n"); 
+        parse(code.toString());
+    }
+
+    public void testPointersToFunctions() throws Exception {
+        Writer code = new StringWriter();
+        code.write("void (*name)( void );\n"); 
+        code
+                .write("static void * (* const orig_malloc_hook)(const char *file, int line, size_t size);\n"); 
+
+        parse(code.toString());
+    }
+
+    public void testBug36600() throws Exception {
+        parse("enum mad_flow (*input_func)(void *, struct mad_stream *);"); 
+    }
+
+    public void testBug36713() throws Exception {
+        Writer code = new StringWriter();
+        code.write("A ( * const fPtr) (void *); \n"); 
+        code.write("A (* const fPtr2) ( A * ); \n"); 
+        parse(code.toString());
+    }
+
+    // K&R Test hasn't been ported from DOMTests
+    // still need to figure out how to represent these in the AST
+    //	public void testOldKRFunctionDeclarations() throws Exception
+    //	{
+    //		// Parse and get the translaton unit
+    //		Writer code = new StringWriter();
+    //		code.write("bool myFunction( parm1, parm2, parm3 )\n");
+    //		code.write("const char* parm1;\n");
+    //		code.write("int (*parm2)(float);\n");
+    //		code.write("{}");
+    //		TranslationUnit translationUnit = parse(code.toString());
+    //
+    //		// Get the declaration
+    //		List declarations = translationUnit.getDeclarations();
+    //		assertEquals(1, declarations.size());
+    //		SimpleDeclaration simpleDeclaration =
+    // (SimpleDeclaration)declarations.get(0);
+    //		assertEquals( simpleDeclaration.getDeclSpecifier().getType(),
+    // DeclSpecifier.t_bool );
+    //		List declarators = simpleDeclaration.getDeclarators();
+    //		assertEquals( 1, declarators.size() );
+    //		Declarator functionDeclarator = (Declarator)declarators.get( 0 );
+    //		assertEquals( functionDeclarator.getName().toString(), "myFunction" );
+    //        
+    //		ParameterDeclarationClause pdc = functionDeclarator.getParms();
+    //		assertNotNull( pdc );
+    //		List parameterDecls = pdc.getDeclarations();
+    //		assertEquals( 3, parameterDecls.size() );
+    //		ParameterDeclaration parm1 = (ParameterDeclaration)parameterDecls.get( 0
+    // );
+    //		assertNotNull( parm1.getDeclSpecifier().getName() );
+    //		assertEquals( "parm1", parm1.getDeclSpecifier().getName().toString() );
+    //		List parm1Decls = parm1.getDeclarators();
+    //		assertEquals( 1, parm1Decls.size() );
+    //
+    //		ParameterDeclaration parm2 = (ParameterDeclaration)parameterDecls.get( 1
+    // );
+    //		assertNotNull( parm2.getDeclSpecifier().getName() );
+    //		assertEquals( "parm2", parm2.getDeclSpecifier().getName().toString() );
+    //		List parm2Decls = parm2.getDeclarators();
+    //		assertEquals( 1, parm2Decls.size() );
+    //        
+    //		ParameterDeclaration parm3 = (ParameterDeclaration)parameterDecls.get( 2
+    // );
+    //		assertNotNull( parm3.getDeclSpecifier().getName() );
+    //		assertEquals( "parm3", parm3.getDeclSpecifier().getName().toString() );
+    //		List parm3Decls = parm3.getDeclarators();
+    //		assertEquals( 1, parm3Decls.size() );
+    //        
+    //		OldKRParameterDeclarationClause clause = pdc.getOldKRParms();
+    //		assertNotNull( clause );
+    //		assertEquals( clause.getDeclarations().size(), 2 );
+    //		SimpleDeclaration decl1 =
+    // (SimpleDeclaration)clause.getDeclarations().get(0);
+    //		assertEquals( decl1.getDeclarators().size(), 1 );
+    //		assertTrue(decl1.getDeclSpecifier().isConst());
+    //		assertFalse(decl1.getDeclSpecifier().isVolatile());
+    //		assertEquals( decl1.getDeclSpecifier().getType(), DeclSpecifier.t_char);
+    //		Declarator declarator1 = (Declarator)decl1.getDeclarators().get( 0 );
+    //		assertEquals( declarator1.getName().toString(), "parm1" );
+    //		List ptrOps1 = declarator1.getPointerOperators();
+    //		assertNotNull( ptrOps1 );
+    //		assertEquals( 1, ptrOps1.size() );
+    //		PointerOperator po1 = (PointerOperator)ptrOps1.get(0);
+    //		assertNotNull( po1 );
+    //		assertFalse( po1.isConst() );
+    //		assertFalse( po1.isVolatile() );
+    //		assertEquals( po1.getType(), PointerOperator.t_pointer );
+    //        
+    //		SimpleDeclaration declaration =
+    // (SimpleDeclaration)clause.getDeclarations().get(1);
+    //		assertEquals( declaration.getDeclSpecifier().getType(),
+    // DeclSpecifier.t_int );
+    //		assertEquals( declaration.getDeclarators().size(), 1);
+    //		assertNull( ((Declarator)declaration.getDeclarators().get(0)).getName()
+    // );
+    //		assertNotNull(
+    // ((Declarator)declaration.getDeclarators().get(0)).getDeclarator() );
+    //		assertEquals(
+    // ((Declarator)declaration.getDeclarators().get(0)).getDeclarator().getName().toString(),
+    // "parm2" );
+    //		ParameterDeclarationClause clause2 =
+    // ((Declarator)declaration.getDeclarators().get(0)).getParms();
+    //		assertEquals( clause2.getDeclarations().size(), 1 );
+    //		assertEquals(
+    // ((ParameterDeclaration)clause2.getDeclarations().get(0)).getDeclarators().size(),
+    // 1 );
+    //		assertNull(
+    // ((Declarator)((ParameterDeclaration)clause2.getDeclarations().get(0)).getDeclarators().get(0)).getName()
+    // );
+    //		assertEquals(
+    // ((ParameterDeclaration)clause2.getDeclarations().get(0)).getDeclSpecifier().getType(),
+    // DeclSpecifier.t_float );
+    //	}
+
+    public void testPointersToMemberFunctions() throws Exception {
+        parse("void (A::*name)(void);"); 
+    }
+
+    public void testBug39550() throws Exception {
+        parse("double x = 0x1.fp1;"); 
+    }
+
+    // digraphs/trigraphs have been temporarily remove
+    public void testBug39552A(int x) throws Exception {
+        Writer code = new StringWriter();
+        code.write("%:define glue(x, y) x %:%: y	/* #define glue(x, y) x ## y. */\n"); 
+        code.write("#ifndef glue\n"); 
+        code.write("#error glue not defined!\n"); 
+        code.write("#endif\n"); 
+
+        code.write("%:define str(x) %:x		/* #define str(x) #x */\n"); 
+
+        code.write("int main (int argc, char *argv<::>) /* argv[] */\n"); 
+        code.write("glue (<, %) /* { */\n"); 
+        code.write("			 /* di_str[] = */\n"); 
+        code.write("  const char di_str glue(<, :)glue(:, >) = str(%:%:<::><%%>%:);\n"); 
+        code.write("  /* Check the glue macro actually pastes, and that the spelling of\n"); 
+        code.write("	 all digraphs is preserved.  */\n"); 
+        code.write("  if (glue(strc, mp) (di_str, \"%:%:<::><%%>%:\"))\n"); 
+        code.write("	err (\"Digraph spelling not preserved!\");\n"); 
+        code.write("  return 0;\n"); 
+        code.write("glue (%, >) /* } */\n"); 
+
+        parse(code.toString());
+    }
+
+    // digraphs/trigraphs have been temporarily remove
+    public void testBug39552B(int x) throws Exception {
+        Writer code = new StringWriter();
+
+        code.write("??=include <stdio.h>\n"); 
+        code.write("??=define TWELVE 1??/\n"); 
+        code.write("2\n"); 
+
+        code.write("static const char str??(??) = \"0123456789??/n\";\n"); 
+
+        code.write("int\n"); 
+        code.write("main(void)\n"); 
+        code.write("??<\n"); 
+        code.write("  unsigned char x = 5;\n"); 
+        code.write("  if (sizeof str != TWELVE)\n"); 
+        code.write("	abort ();\n"); 
+        code
+                .write("  /* Test ^=, the only multi-character token to come from trigraphs.  */\n"); 
+        code.write("  x ??'= 3;\n"); 
+        code.write("  if (x != 6)\n"); 
+        code.write("	abort ();\n"); 
+        code.write("  if ((5 ??! 3) != 7)\n"); 
+        code.write("	abort ();\n"); 
+        code.write("  return 0;\n"); 
+        code.write("??>\n"); 
+
+        parse(code.toString());
+    }
+
+    public void testBug39553() throws Exception {
+        parse("#define COMP_INC \"foobar.h\"  \n" + "#include COMP_INC\n");  //$NON-NLS-2$
+    }
+
+    public void testBug39537() throws Exception {
+        parse("typedef foo<(U::id > 0)> foobar;"); 
+    }
+
+    public void testBug39546() throws Exception {
+        parse("signed char c = (signed char) 0xffffffff;"); 
+    }
+
+    public void testIndirectDeclarators() throws Exception {
+        parse("void (*x)( int );"); 
+    }
+
+    public void testBug39532() throws Exception {
+        parse("class N1::N2::B : public A {};"); 
+    }
+
+    public void testBug39540() throws Exception {
+        parse("class {} const null;"); 
+    }
+
+    public void testBug39530() throws Exception {
+        parse("X sPassed(-1);"); 
+    }
+
+    public void testBug39526() throws Exception {
+        parse("UnitList unit_list (String(\"keV\"));"); 
+    }
+
+    public void testBug39535() throws Exception {
+        parse("namespace bar = foo;"); 
+    }
+
+    public void testBug39504B() throws Exception {
+        parse("int y = sizeof (int*);"); 
+    }
+
+    public void testBug39505A() throws Exception {
+        parse("int AD::* gp_down = static_cast<int AD::*>(gp_stat);"); 
+    }
+
+    public void testBug39505B() throws Exception {
+        parse("int* gp_down = static_cast<int*>(gp_stat);"); 
+    }
+
+    public void testBug42985() throws Exception {
+        parse("const int x = 4; int y = ::x;"); 
+    }
+
+    public void testBug40419() throws Exception {
+        Writer code = new StringWriter();
+        try {
+            code.write("template <class T, class U>	struct SuperSubclass {\n"); 
+            code.write("enum { value = (::Loki::Conversion<const volatile U*, const volatile T*>::exists && \n"); 
+            code.write("!::Loki::Conversion<const volatile T*, const volatile void*>::sameType) };	};"); 
+        } catch (IOException ioe) {
+        }
+        parse(code.toString());
+    }
+
+    public void testBug39556() throws Exception {
+        parse("int *restrict ip_fn (void);", true, ParserLanguage.C); 
+    }
+
+    /**
+     * Test code: struct Example { Example(); Example(int); ~Example();};
+     * Purpose: tests a declaration in a class scope.
+     */
+    public void testBug43371() throws Exception {
+        // Parse and get the translaton unit
+        Writer code = new StringWriter();
+        code.write("struct Example { Example(); Example(int); ~Example();};"); 
+        parse(code.toString());
+    }
+
+    public void testBug43644() throws Exception {
+        parse("void foo();{ int x; }", false); 
+    }
+
+    public void testBug43062() throws Exception {
+        parse("class X { operator short  (); 	operator int unsigned(); operator int signed(); };"); 
+    }
+
+    public void testBug39531() throws Exception {
+        parse("class AString { operator char const *() const; };"); 
+    }
+
+    public void testBug40007() throws Exception {
+        parse("int y = #;", false); 
+    }
+
+    public void testBug40759() throws Exception {
+        parse("#define X SomeName \n class X {};"); 
+    }
+
+    public void testBug44633() throws Exception {
+        Writer writer = new StringWriter();
+        writer.write("template <typename T> class A {};\n"); 
+        writer.write("class B {  template <typename T> friend class A;\n"); 
+        writer.write("void method();\n"); 
+        writer.write("};\n"); 
+        parse(writer.toString());
+    }
+
+    public void testBug39525() throws Exception {
+        parse("C &(C::*DD)(const C &x) = &C::operator=;"); 
+    }
+
+    public void testBug41935() throws Exception {
+        parse("namespace A	{  int x; } namespace B = A;"); 
+    }
+
+    public void testBug39528() throws Exception {
+        Writer code = new StringWriter();
+        try {
+            code.write("struct B: public A {\n"); 
+            code.write("  A a;\n"); 
+            code.write("  B() try : A(1), a(2)\n"); 
+            code.write("	{ throw 1; }\n"); 
+            code.write("  catch (...)\n"); 
+            code.write("	{ if (c != 3) r |= 1; }\n"); 
+            code.write("};\n"); 
+        } catch (IOException ioe) {
+        }
+        parse(code.toString());
+    }
+
+    public void testBug39538() throws Exception {
+        parse("template C::operator int<float> ();"); 
+    }
+
+    public void testBug39536() throws Exception {
+        Writer writer = new StringWriter();
+        writer.write("template<class E>\n"); 
+        writer.write("class X {\n"); 
+        writer.write("X<E>();  // This fails \n"); 
+        writer.write("inline X<E>(int); // This also fails \n"); 
+        writer.write("inline ~X<E>(); // This works fine \n"); 
+        writer.write("};\n"); 
+        parse(writer.toString());
+    }
+
+    public void testBug39536A() throws Exception {
+        parse("template<class E> class X { X<E>(); };"); 
+    }
+
+    public void testBug39536B() throws Exception {
+        parse("template<class E> class X { inline X<E>(int); };"); 
+    }
+
+    public void testBug39542() throws Exception {
+        parse("void f(int a, struct {int b[a];} c) {}"); 
+    }
+
+    //Here starts C99-specific section
+    public void testBug39549() throws Exception {
+        parse("struct X x = { .b = 40, .z = { sizeof(X), 42 }, .t[3] = 2, .t.f[3].x = A * B };", true, ParserLanguage.C); 
+        // with trailing commas
+        parse("struct X x = { .b = 40, .z = { sizeof(X), 42,}, .t[3] = 2, .t.f[3].x = A * B  ,};", true, ParserLanguage.C); 
+    }
+
+    public void testBug39551A() throws Exception {
+        parse("extern float _Complex conjf (float _Complex);", true, ParserLanguage.C); 
+    }
+
+    public void testBug39551B() throws Exception {
+        parse("_Imaginary double id = 99.99 * __I__;", true, ParserLanguage.C); 
+    }
+
+    public void testCBool() throws Exception {
+        parse("_Bool x;", true, ParserLanguage.C); 
+    }
+
+    public void testBug39678() throws Exception {
+        parse("char *s = L\"a\" \"b\";"); 
+    }
+
+    public void testBug43110() throws Exception {
+        parse("void x( int y, ... );"); 
+    }
+
+    //	public void testBug44370() throws Exception
+    //	{
+    //		parse( "#define SWAP(x,y) {x|=y;y|=x;x|=y;}\n"); 
+    //		Iterator macros = quickParseCallback.getMacros();
+    //		assertNotNull(macros);
+    //		assertTrue( macros.hasNext());
+    //		IASTMacro swap = (IASTMacro) macros.next();
+    //		assertFalse( macros.hasNext() );
+    //		assertEquals( swap.getName(), "SWAP"); 
+    //		assertEquals( swap.getMacroType(),
+    // IMacroDescriptor.MacroType.FUNCTION_LIKE );
+    //		String [] params = swap.getParameters();
+    //		assertEquals( params.length, 2 );
+    //		assertEquals( params[0], "x"); 
+    //		assertEquals( params[1], "y"); 
+    //		String completeSignature = swap.getCompleteSignature().trim();
+    //		assertEquals( completeSignature, "#define SWAP(x,y) {x|=y;y|=x;x|=y;}");
+    // 
+    //		assertEquals( swap.getExpansionSignature().trim(),"{x|=y;y|=x;x|=y;}");
+    // 
+    //		IToken [] tokens = swap.getTokenizedExpansion();
+    //		validateToken( tokens[0], IToken.tLBRACE);
+    //		validateIdentifier( tokens[1], "x"); 
+    //		validateToken( tokens[2], IToken.tBITORASSIGN );
+    //		validateIdentifier( tokens[3], "y"); 
+    //		validateToken( tokens[4], IToken.tSEMI );
+    //		validateIdentifier( tokens[5], "y"); 
+    //		validateToken( tokens[6], IToken.tBITORASSIGN );
+    //		validateIdentifier( tokens[7], "x"); 
+    //		validateToken( tokens[8], IToken.tSEMI );
+    //		validateIdentifier( tokens[9], "x"); 
+    //		validateToken( tokens[10], IToken.tBITORASSIGN );
+    //		validateIdentifier( tokens[11], "y"); 
+    //		validateToken( tokens[12], IToken.tSEMI );
+    //		validateToken( tokens[13], IToken.tRBRACE );
+    //	}
+    //	/**
+    //	 * @param token
+    //	 * @param string
+    //	 */
+    //	private void validateIdentifier(IToken token, String identifierName ) {
+    //		validateToken( token, IToken.tIDENTIFIER);
+    //		assertEquals( token.getImage(), identifierName );
+    //	}
+    //	/**
+    //	 * @param token
+    //	 * @param i
+    //	 */
+    //	private void validateToken(IToken token, int signal) {
+    //		assertEquals( token.getType(), signal );
+    //	}
+
+    public void testBug47752() throws Exception {
+        //TODO requires CPPVisitor
+        parse("void func( cFoo bar ) try {	} catch ( const char * error ){	}"); 
+    }
+
+    public void testBug47628() throws Exception {
+        Writer writer = new StringWriter();
+        writer.write("void h(char) { }\n"); 
+        writer.write("void h(unsigned char) { }\n"); 
+        writer.write("void h(signed char) { }  // not shown in outline, parsed as char\n"); 
+        parse(writer.toString());
+    }
+
+    public void testBug44336() throws Exception {
+        parse("class A {};  typedef typename A foo;"); 
+    }
+
+    public void testBug39705() throws Exception {
+        parse("#ident \"@(#)filename.c   1.3 90/02/12\""); 
+    }
+
+    public void testBug45235() throws Exception {
+        parse("class A { friend class B; friend void f(); }; "); 
+    }
+
+    public void testBug59179() throws Exception {
+        parse("class __decl  main{  int main; };", false); 
+    }
+
+    public void testBug57652() throws Exception {
+        parse("struct file_operations driver_fops = {  open: device_open, release: device_release	};", true, ParserLanguage.C, true); 
+    }
+
+    /**
+     * @param string
+     * @param b
+     * @param c
+     * @param d
+     */
+    protected void parse(String code, boolean expectedToPass,
+            ParserLanguage lang, boolean gcc) throws Exception {
+
+        CodeReader codeReader = new CodeReader( code.toCharArray() );
+        IScannerInfo scannerInfo = new ScannerInfo();
+        IScanner scanner= AST2BaseTest.createScanner(codeReader, lang, ParserMode.COMPLETE_PARSE, scannerInfo);
+        ISourceCodeParser parser2 = null;
+        if (lang == ParserLanguage.CPP) {
+            ICPPParserExtensionConfiguration config = null;
+            if (gcc)
+                config = new GPPParserExtensionConfiguration();
+            else
+                config = new ANSICPPParserExtensionConfiguration();
+            parser2 = new GNUCPPSourceParser(scanner, ParserMode.QUICK_PARSE,
+                    NULL_LOG, config);
+        } else {
+            ICParserExtensionConfiguration config = null;
+            if (gcc)
+                config = new GCCParserExtensionConfiguration();
+            else
+                config = new ANSICParserExtensionConfiguration();
+
+            parser2 = new GNUCSourceParser(scanner, ParserMode.QUICK_PARSE,
+                    NULL_LOG, config);
+        }
+        IASTTranslationUnit tu = parser2.parse();
+        if (parser2.encounteredError() && expectedToPass)
+            throw new ParserException("FAILURE"); 
+        if (expectedToPass)
+        {
+            if( lang == ParserLanguage.C )
+            {
+            	IASTProblem [] problems = CVisitor.getProblems(tu);
+            	assertEquals( problems.length, 0 );
+            }
+            else if ( lang == ParserLanguage.CPP )
+            {
+            	IASTProblem [] problems = CPPVisitor.getProblems(tu);
+            	assertEquals( problems.length, 0 );
+            }
+        }
+    }
+
+    public void testBug60142() throws Exception {
+        parse("unsigned long var;"); 
+    }
+
+    public void testBug61431() throws Exception {
+        for (int i = 0; i < 2; ++i) {
+            ParserLanguage language = (i == 0) ? ParserLanguage.C
+                    : ParserLanguage.CPP;
+            parse("int k[][] = { {0, {1}, {2,3}};", false, language); 
+        }
+    }
+
+    public void testBadIdentifier() throws Exception {
+        parse("class 0302 { private: int stinks; };", false); 	
+    }
+
+    public void testBug67622() throws Exception {
+        parse("const char * x = __FILE__;"); 
+    }
+
+    public void testBug68116() throws Exception {
+        StringBuffer buffer = new StringBuffer("char dummy[] = \"0123456789"); 
+        for (int i = 0; i < 5000; ++i)
+            buffer.append("0123456789"); 
+        buffer.append("\";"); 
+        parse(buffer.toString());
+    }
+
+    public void testBug69161() throws Exception {
+        Writer writer = new StringWriter();
+        writer.write("#define MACRO(s) s\n "); 
+        writer.write("char *testQueries[] =\n"); 
+        writer.write("{\n"); 
+        writer.write("MACRO(\",\"),\n"); 
+        writer.write("MACRO(\"(\"),\n"); 
+        writer.write("MACRO(\")\")\n"); 
+        writer.write("};\n"); 
+        parse(writer.toString());
+    }
+
+    public void testBug73524() throws Exception {
+        Writer writer = new StringWriter();
+        writer.write("static char fmt_1002[] = \"(/,\\002At iterate\\002,i5,4x,\\002f= \\002,1p,d12\\\r\n"); 
+        writer.write(".5,4x,\\002|proj g|= \\002,1p,d12.5)\";"); 
+        parse(writer.toString(), true, ParserLanguage.C);
+    }
+
+    public void testBug39694() throws Exception {
+        parse("int ab$cd = 1;"); 
+    }
+
+    public void testBug39704A() throws Exception {
+    	StringWriter writer = new StringWriter();
+    	writer.write("#define __declspec(x) __attribute__((x))"); 
+    	writer.write("__declspec (dllimport) int foo;"); 
+        parse( writer.toString() );
+    }
+
+    public void testBug39704D() throws Exception {
+    	StringWriter writer = new StringWriter();
+    	writer.write("#define __declspec(x) __attribute__((x))"); 
+    	writer.write("__declspec(dllexport) int func1 (int a) {}"); 
+        parse( writer.toString() );    	
+    }
+
+    public void testBug39695() throws Exception {
+        parse("int a = __alignof__ (int);", true, ParserLanguage.CPP, true); 
+    }
+
+    public void testBug39684() throws Exception {
+        parse("typeof(foo(1)) bar () { return foo(1); }", true, ParserLanguage.CPP, true); 
+    }
+
+    public void testBug39703() throws Exception {
+        Writer code = new StringWriter();
+        code.write("/* __extension__ enables GNU C mode for the duration of the declaration.  */\n"); 
+        code.write("__extension__ struct G {\n"); 
+        code.write("  struct { char z; };\n"); 
+        code.write("  char g;\n"); 
+        code.write("};\n"); 
+        parse(code.toString(), true, ParserLanguage.CPP, true);
+    }
+
+    public void testBug39698A() throws Exception {
+        parse("int c = a <? b;", true, ParserLanguage.CPP, true); 
+    }
+
+    public void testBug39698B() throws Exception {
+        parse("int c = a >? b;", true, ParserLanguage.CPP, true); 
+    }
+
+    public void testBug39554() throws Exception {
+        parse("_Pragma(\"foobar\")", true, ParserLanguage.C); 
+    }
+
+    public void testBug39704B() throws Exception {
+        parse("extern int (* import) (void) __attribute__((dllimport));", true, ParserLanguage.CPP, true); 
+    }
+
+    public void testBug39704C() throws Exception {
+        parse("int func2 (void) __attribute__((dllexport));", true, ParserLanguage.CPP, true); 
+    }
+
+    public void testBug39686() throws Exception {
+        Writer code = new StringWriter();
+        code.write("__complex__ double x; // complex double\n"); 
+        code.write("__complex__ short int a; // complex short int\n"); 
+        code
+                .write("__complex__ float y = 2.5fi; // 2.5 imaginary float literal\n"); 
+        code.write("__complex__ int a = 3i; // imaginary intege r literal\n"); 
+        code.write("double v = __real__ x; // real part of expression\n"); 
+        code.write("double w = __imag__ x; // imaginary part of expression\n"); 
+        parse(code.toString(), true, ParserLanguage.C, true);
+    }
+
+    public void testBug39681() throws Exception {
+        Writer code = new StringWriter();
+        code.write("double\n"); 
+        code.write("foo (double a, double b)\n"); 
+        code.write("{\n"); 
+        code.write("  double square (double z) { return z * z; }\n"); 
+        code.write("  return square (a) + square (b);\n"); 
+        code.write("}\n"); 
+        parse(code.toString());
+    }
+
+    public void testBug39677() throws Exception {
+        parse("B::B() : a(({ 1; })) {}", true, ParserLanguage.CPP, true); 
+        Writer writer = new StringWriter();
+        writer.write("B::B() : a(( { int y = foo (); int z;\n"); 
+        writer.write("if (y > 0) z = y;\n"); 
+        writer.write("else z = - y;\n");
+        writer.write("z; })) {}\n");
+        parse(writer.toString(), true, ParserLanguage.CPP, true);
+        writer = new StringWriter();
+        writer.write("int x = ({ int y = foo (); int z;\n"); 
+        writer.write("if (y > 0) z = y;\n"); 
+        writer.write("else z = - y;\n");
+        writer.write("z; });\n");
+        parse(writer.toString(), true, ParserLanguage.CPP, true);
+        writer = new StringWriter();
+        writer.write("typeof({ int y = foo (); int z;\n"); 
+        writer.write("if (y > 0) z = y;\n"); 
+        writer.write("else z = - y;\n");
+        writer.write("z; }) zoot;\n");
+        parse(writer.toString(), true, ParserLanguage.CPP, true);
+    }
+
+    public void testBug39701A() throws Exception {
+        parse("extern template int max (int, int);", true, ParserLanguage.CPP, true); 
+    }
+
+    public void testBug39701B() throws Exception {
+        parse("inline template class Foo<int>;", true, ParserLanguage.CPP, true); 
+    }
+
+    public void testBug39701C() throws Exception {
+        parse("static template class Foo<int>;", true, ParserLanguage.CPP, true); 
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/SemanticsTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/SemanticsTests.java
new file mode 100644
index 0000000..e1a07d8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/SemanticsTests.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil;
+
+/**
+ * Directly tests parts of the semantics package
+ */
+public class SemanticsTests extends AST2BaseTest {
+
+	public SemanticsTests() {}
+	public SemanticsTests(String name) { super(name); }
+	
+
+	//	class A {};
+	//	class B {};
+	//
+	//	class X {
+	//	public:
+	//		// unary
+	//		A* operator !() { return new A(); } // logical not
+	//		B* operator &() { return new B(); } // address of
+	//		A* operator ~() { return new A(); } // one's complement
+	//		B* operator *() { return new B(); } // ptr deference
+	//		A* operator +() { return new A(); } // unary plus
+	//		A* operator -() { return new A(); } // unary negation
+	//		void operator ->() {} // Member selection
+	//		X& operator++();       // Prefix increment operator.
+	//	    X operator++(int);     // Postfix increment operator.
+	//	    X& operator--();       // Prefix decrement operator.
+	//	    X operator--(int);     // Postfix decrement operator.
+	//
+	//		// binary
+	//		void operator ,(int x)  {} // comma
+	//		void operator ,(long x) {} // comma (overloaded)
+	//		void operator !=(int x) {} // NE
+	//		void operator !=(long x){} // NE (overloaded)
+	//		void operator %(int x)  {} // modulus
+	//		void operator %=(int x) {} // modulus with assignment
+	//		void operator &(int x)  {} // bitwise AND
+	//		void operator &&(A a)   {} // logical AND
+	//		void operator &=(A a)   {} // Bitwise AND/assignment
+	//		void operator *(B b)    {} // multiplication
+	//		void operator *=(X x)   {} // multiplication with assignment
+	//		void operator +(X x)    {} // Addition
+	//		A operator +=(int y)    {} // Addition with assignment
+	//		B operator -(X x)       {} // Subtraction
+	//		void operator -=(int y) {} // Subtraction with assignment	
+	//		void operator ->*(int z){} // ptr-to-member selection
+	//		void operator /(int x)  {} // division
+	//		void operator /=(int y) {} // division with assignment
+	//		void operator <(int x)  {} // LT
+	//		void operator <<(int x) {} // L shift
+	//		void operator <<=(int x){} // L shift assignment
+	//		void operator <=(int x) {} // LE
+	//		void operator =(int x)  {} // assignment
+	//		void operator ==(int y) {} // EQ
+	//		void operator >(int x)  {} // GT
+	//		void operator >=(int y) {} // GE
+	//		void operator >>(int x) {} // R shift
+	//		void operator >>=(int x){} // R shift with assignment
+	//		void operator ^(int x)  {} // XOR
+	//		void operator ^=(int x) {} // XOR assignment
+	//		void operator |(int x)  {} // Bitwise OR
+	//		void operator |=(int x) {} // Bitwise OR with assignment
+	//		void operator ||(int x) {} // logical OR
+	//
+	//		void operator()(int a, int b, int c) {} // function call
+	//
+	//		void operator[](int i) {} // subscripting
+	//      
+	//      operator A(); // conversion
+	//      operator B(); // conversion
+	//	};
+	public void testGetDeclaredConversionOperators() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPClassType c= ba.assertNonProblem("X {", 1, ICPPClassType.class);
+		ICPPMethod[] cops= SemanticUtil.getDeclaredConversionOperators(c);
+		assertEquals(2, cops.length);
+		Set actual= new HashSet();
+		actual.add(cops[0].getName()); actual.add(cops[1].getName());
+		Set expected= new HashSet();
+		expected.add("operator A"); expected.add("operator B");
+		assertEquals(expected, actual);
+	}
+	
+	public void testIsConversionOperator() throws Exception {
+		BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
+		ICPPClassType c= ba.assertNonProblem("X {", 1, ICPPClassType.class);
+		ICPPMethod[] dms= c.getDeclaredMethods();
+		assertEquals(48, dms.length);
+		
+		for(ICPPMethod method : dms) {
+			String name= method.getName();
+			boolean isConvOp= name.equals("operator A") || name.equals("operator B");
+			assertEquals(isConvOp, SemanticUtil.isConversionOperator(method));
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/TaskParserTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/TaskParserTest.java
new file mode 100644
index 0000000..4b212a6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/TaskParserTest.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Google, Inc and others.
+ * 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
+ *
+ * Contributors:
+ * 	   Sergey Prigogin (Google) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.internal.core.pdom.indexer.TodoTaskParser;
+import org.eclipse.cdt.internal.core.pdom.indexer.TodoTaskParser.Task;
+
+public class TaskParserTest extends AST2BaseTest {
+	
+	public static TestSuite suite() {
+		return suite(TaskParserTest.class);
+	}
+
+	public void testTaskParser() throws Exception {
+		final char[][] taskTags = new char[][] {
+				"TODO".toCharArray(),
+				"TODO(my name):".toCharArray(),
+				"FIXME".toCharArray()
+			};
+		final int PRIORITY_LOW = 1; 
+		final int PRIORITY_NORMAL = 2; 
+		final int PRIORITY_HIGH = 3; 
+		final int[] taskPriorities = new int[] {
+				PRIORITY_LOW,
+				PRIORITY_NORMAL,
+				PRIORITY_HIGH
+			};
+		final boolean isTaskCaseSensitive = true;
+		
+		String code = "/* TODO tag 1\n" + 
+		              " * FIXME   tag 2\n" + 
+		              " */\n" + 
+		              "\n" + 
+		              "// TODO(my name): tag 3\n" + 
+		              "// TODO(his name): tag 4\n" + 
+		              "// todo Not a tag\n" + 
+		              "// TODO FIXME tag 5\n" + 
+		              "\n" + 
+		              "const char* x = \"TODO Not a tag\";"; 
+		IASTTranslationUnit tu = parse(code, ParserLanguage.CPP, false, true);
+		TodoTaskParser parser =	new TodoTaskParser(taskTags, taskPriorities, isTaskCaseSensitive);
+		Task[] tasks = parser.parse(tu.getComments());
+	
+		assertEquals(6, tasks.length);
+		assertEquals("TODO", tasks[0].getTag());
+		assertEquals("tag 1", tasks[0].getMessage());
+		assertEquals(PRIORITY_LOW, tasks[0].getPriority());
+		assertEquals(1, tasks[0].getLineNumber());
+		assertEquals(3, tasks[0].getStart());
+		assertEquals(13, tasks[0].getEnd());
+		
+		assertEquals("FIXME", tasks[1].getTag());
+		assertEquals("tag 2", tasks[1].getMessage());
+		assertEquals(PRIORITY_HIGH, tasks[1].getPriority());
+		assertEquals(2, tasks[1].getLineNumber());
+		
+		assertEquals("TODO(my name):", tasks[2].getTag());
+		assertEquals("tag 3", tasks[2].getMessage());
+		assertEquals(PRIORITY_NORMAL, tasks[2].getPriority());
+		assertEquals(5, tasks[2].getLineNumber());
+	
+		assertEquals("TODO", tasks[3].getTag());
+		assertEquals("(his name): tag 4", tasks[3].getMessage());
+		assertEquals(PRIORITY_LOW, tasks[3].getPriority());
+		assertEquals(6, tasks[3].getLineNumber());
+
+		assertEquals("TODO", tasks[4].getTag());
+		assertEquals("tag 5", tasks[4].getMessage());
+		assertEquals(PRIORITY_LOW, tasks[4].getPriority());
+		assertEquals(8, tasks[4].getLineNumber());
+	
+		assertEquals("FIXME", tasks[5].getTag());
+		assertEquals("tag 5", tasks[5].getMessage());
+		assertEquals(PRIORITY_HIGH, tasks[5].getPriority());
+		assertEquals(8, tasks[5].getLineNumber());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/TestLexerLog.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/TestLexerLog.java
new file mode 100644
index 0000000..8581196
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/TestLexerLog.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.core.parser.tests.ast2;
+
+import java.util.ArrayList;
+
+import org.eclipse.cdt.internal.core.parser.scanner.ILexerLog;
+
+public class TestLexerLog implements ILexerLog {
+
+	private ArrayList fComments= new ArrayList();
+	private ArrayList fProblems= new ArrayList();
+	private String fInput;
+	
+	public void setInput(String input) {
+		fInput= input;
+	}
+
+	public void handleComment(boolean isBlockComment, int offset, int endOffset) {
+		fComments.add(fInput.substring(offset, endOffset));
+	}
+
+	public void handleProblem(int problemID, char[] arg, int offset, int endOffset) {
+		fProblems.add(createString(problemID, new String(arg)));
+	}
+
+	public String createString(int problemID, String image) {
+		return String.valueOf(problemID) + ":" + image;
+	}
+	
+	public void clear() {
+		fComments.clear();
+		fProblems.clear();
+	}
+
+	public int getProblemCount() {
+		return fProblems.size();
+	}
+
+	public int getCommentCount() {
+		return fComments.size();
+	}
+
+	public String removeFirstProblem() {
+		if (fProblems.isEmpty()) {
+			return "no problems have been reported";
+		}
+		return (String) fProblems.remove(0);
+	}
+
+	public String removeFirstComment() {
+		if (fComments.isEmpty()) {
+			return "no comments have been reported";
+		}
+		return (String) fComments.remove(0);
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/BasicCompletionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/BasicCompletionTest.java
new file mode 100644
index 0000000..7c3340f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/BasicCompletionTest.java
@@ -0,0 +1,194 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bryan Wilkinson (QNX)
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.prefix;
+
+import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+
+public class BasicCompletionTest extends CompletionTestBase {
+
+	private void testVar(IASTCompletionNode node) throws Exception {
+		IASTName[] names = node.getNames();
+		assertEquals(1, names.length);
+		IBinding[] bindings = names[0].getCompletionContext().findBindings(names[0], true);
+		assertEquals(1, bindings.length);
+		IVariable var = (IVariable)bindings[0];
+		assertEquals("blah", var.getName());
+	}
+	
+	public void testVar() throws Exception {
+		String code = 
+			"int blah = 4;" +
+			"int two = bl";
+		
+		testVar(getGPPCompletionNode(code));
+		testVar(getGCCCompletionNode(code));
+	}
+
+	public void testFunction() throws Exception {
+		String code =
+			"void func(int x) { }" +
+			"void func2() { fu";
+		
+		// C++
+		IASTCompletionNode node = getGPPCompletionNode(code);
+		IASTName[] names = node.getNames();
+		// There are two names, one as an expression, one that isn't connected, one as a declaration
+		assertTrue(names.length > 1);
+		// The expression points to our functions
+		IBinding[] bindings = names[0].getCompletionContext().findBindings(names[0], true);
+		// There should be two since they both start with fu
+		assertEquals(2, bindings.length);
+		assertEquals("func", ((IFunction)bindings[0]).getName());
+		assertEquals("func2", ((IFunction)bindings[1]).getName());
+		// The other names shouldn't be hooked up
+		for (int i = 1; i < names.length; i++) {
+			assertNull(names[i].getTranslationUnit());
+		}
+
+		// C
+		node = getGCCCompletionNode(code);
+		names = node.getNames();
+		// There are two names, one as an expression, one as a declaration
+		assertTrue(names.length > 1);
+		// The expression points to our functions
+		bindings = sortBindings(names[0].getCompletionContext().findBindings(names[0], true));
+		// There should be two since they both start with fu
+		assertEquals(2, bindings.length);
+		assertEquals("func", ((IFunction)bindings[0]).getName());
+		assertEquals("func2", ((IFunction)bindings[1]).getName());
+		// The other names shouldn't be hooked up
+		for (int i = 1; i < names.length; i++) {
+			assertNull(names[i].getTranslationUnit());
+		}
+	}
+
+	public void testTypedef() throws Exception {
+		String code = 
+			"void test() {typedef int blah;" +
+			"bl";
+		
+		// C++
+		IASTCompletionNode node = getGPPCompletionNode(code);
+		IASTName[] names = node.getNames();
+		assertEquals(2, names.length);
+		assertNull(names[1].getTranslationUnit());
+		IBinding[] bindings = names[0].getCompletionContext().findBindings(names[0], true);
+		assertEquals(1, bindings.length);
+		assertEquals("blah", ((ITypedef)bindings[0]).getName());
+		
+		// C
+		node = getGCCCompletionNode(code);
+		names = node.getNames();
+		assert(names.length > 0);
+		bindings = names[0].getCompletionContext().findBindings(names[0], true);
+		assertEquals(1, bindings.length);
+		assertEquals("blah", ((ITypedef)bindings[0]).getName());
+	}
+	
+	public void testBug181624() throws Exception {
+		String code = 
+			"void foo() {" +
+			"  switch (";
+		
+		// C++
+		IASTCompletionNode node = getGPPCompletionNode(code);
+		assertNotNull(node);
+		
+		// C
+		node = getGCCCompletionNode(code);
+		assertNotNull(node);
+		
+		code = 
+			"void foo() {" +
+			"  while (";
+		
+		// C++
+		node = getGPPCompletionNode(code);
+		assertNotNull(node);
+		
+		// C
+		node = getGCCCompletionNode(code);
+		assertNotNull(node);
+	}
+	
+	//	template <typename T> class CT {};
+	//	template <typename T> class B: public A<T> {
+	//	public: 
+	//       void doit(){}
+	//	};
+	//	int main() {
+	//	   B<int> b;
+	//	   b.
+	public void testBug267911() throws Exception {
+		String code = getAboveComment();
+		String[] expected= {"B", "doit"};
+		checkCompletion(code, true, expected);
+	}
+	
+	//	typedef struct MyType {
+	//		int aField;
+	//	} MyType;
+	//  M
+	public void testBug279931() throws Exception {
+		String code = getAboveComment();
+		String[] expected= {"MyType", "MyType"};
+		checkCompletion(code, true, expected);
+		expected= new String[] {"MyType"};
+		checkCompletion(code, false, expected);
+	}
+
+	//	typedef struct MyType {
+	//		int aField;
+	//	} MyType;
+	//  struct M
+	public void testBug279931a() throws Exception {
+		String code = getAboveComment();
+		String[] expected= {"MyType"};
+		checkCompletion(code, true, expected);
+		checkCompletion(code, false, expected);
+	}
+	
+	// template <t
+	public void testBug280934() throws Exception {
+		String code = getAboveComment();
+		String[] expected= {};
+		checkCompletion(code, true, expected);
+	}
+	
+	//	struct s1 {
+	//		struct {
+	//			int a1;
+	//			int a2;
+	//		};
+	//		union {
+	//			int u1;
+	//			char u2;
+	//		};
+	//		int b;
+	//	};
+	//	int test() {
+	//		struct s1 s;
+	//		s.
+	public void testBug284245() throws Exception {
+		String code = getAboveComment();
+		String[] expectedCpp= {"a1", "a2", "b", "s1", "u1", "u2"};
+		String[] expectedC= {"a1", "a2", "b", "u1", "u2"};
+		checkCompletion(code, true, expectedCpp);
+		checkCompletion(code, false, expectedC);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/CompletionTestBase.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/CompletionTestBase.java
new file mode 100644
index 0000000..1b3ef81
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/CompletionTestBase.java
@@ -0,0 +1,165 @@
+/**********************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.prefix;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
+import junit.framework.AssertionFailedError;
+
+import org.eclipse.cdt.core.dom.ast.IASTCompletionContext;
+import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.parser.ISourceCodeParser;
+import org.eclipse.cdt.core.dom.parser.c.ANSICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.GCCParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.ICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ANSICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.GPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.IParserLogService;
+import org.eclipse.cdt.core.parser.IScanner;
+import org.eclipse.cdt.core.parser.NullLogService;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.ParserMode;
+import org.eclipse.cdt.core.parser.ScannerInfo;
+import org.eclipse.cdt.core.parser.tests.ast2.AST2BaseTest;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.dom.parser.c.GNUCSourceParser;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+public class CompletionTestBase extends BaseTestCase {
+
+    private static final IParserLogService NULL_LOG = new NullLogService();
+
+	protected IASTCompletionNode getCompletionNode(String code, ParserLanguage lang, boolean useGNUExtensions) throws ParserException {
+        CodeReader codeReader = new CodeReader(code.trim().toCharArray());
+        ScannerInfo scannerInfo = new ScannerInfo();
+        IScanner scanner= AST2BaseTest.createScanner(codeReader, lang, ParserMode.COMPLETE_PARSE, scannerInfo);
+        
+        ISourceCodeParser parser = null;
+        if( lang == ParserLanguage.CPP )
+        {
+            ICPPParserExtensionConfiguration config = null;
+            if (useGNUExtensions)
+            	config = new GPPParserExtensionConfiguration();
+            else
+            	config = new ANSICPPParserExtensionConfiguration();
+            parser = new GNUCPPSourceParser(scanner, ParserMode.COMPLETE_PARSE,
+                NULL_LOG,
+                config );
+        }
+        else
+        {
+            ICParserExtensionConfiguration config = null;
+
+            if (useGNUExtensions)
+            	config = new GCCParserExtensionConfiguration();
+            else
+            	config = new ANSICParserExtensionConfiguration();
+            
+            parser = new GNUCSourceParser( scanner, ParserMode.COMPLETE_PARSE, 
+                NULL_LOG, config );
+        }
+        
+		scanner.setContentAssistMode(code.length());
+        parser.parse();
+		return parser.getCompletionNode();
+    }
+
+	protected IASTCompletionNode getGPPCompletionNode(String code) throws ParserException {
+		return getCompletionNode(code, ParserLanguage.CPP, true);
+	}
+	
+	protected IASTCompletionNode getGCCCompletionNode(String code) throws ParserException {
+		return getCompletionNode(code, ParserLanguage.C, true);
+	}
+	
+	protected void checkCompletion(String code, boolean isCpp, String[] expected) throws ParserException {
+		IASTCompletionNode node = isCpp ? getGPPCompletionNode(code) : getGCCCompletionNode(code);
+		assertNotNull(node);
+		List<IBinding> bindings= proposeBindings(node);
+		String[] names= getSortedNames(bindings);
+		int len= Math.min(expected.length, names.length);
+		for (int i = 0; i < len; i++) {
+			assertEquals(expected[i], names[i]);
+		}
+		assertEquals(expected.length, names.length);
+	}
+	
+	private static class BindingsComparator implements Comparator {
+		public int compare(Object o1, Object o2) {
+			IBinding b1 = (IBinding)o1;
+			IBinding b2 = (IBinding)o2;
+			return b1.getName().compareTo(b2.getName());
+		}
+	}
+	
+	private static BindingsComparator bindingsComparator  = new BindingsComparator();
+	
+	protected IBinding[] sortBindings(IBinding[] bindings) {
+		Arrays.sort(bindings, bindingsComparator);
+		return bindings;
+	}
+	
+	protected String getAboveComment() throws IOException {
+		return getContents(1)[0].toString();
+	}
+	
+	protected StringBuffer[] getContents(int sections) throws IOException {
+		CTestPlugin plugin = CTestPlugin.getDefault();
+		if (plugin == null)
+			throw new AssertionFailedError("This test must be run as a JUnit plugin test");
+		return TestSourceReader.getContentsForTest(plugin.getBundle(), "parser", getClass(), getName(), sections);
+	}
+	
+	protected List<IBinding> proposeBindings(IASTCompletionNode completionNode) {
+		List<IBinding> proposals = new ArrayList<IBinding>();
+		boolean handleMacros= false;
+		IASTName[] names = completionNode.getNames();
+
+		for (int i = 0; i < names.length; ++i) {
+			if (names[i].getTranslationUnit() == null)
+				// The node isn't properly hooked up, must have backtracked out of this node
+				continue;
+
+			IASTCompletionContext astContext = names[i].getCompletionContext();
+			if (astContext == null) {
+				continue;
+			} 
+			IBinding[] bindings = astContext.findBindings(names[i], true);
+			if (bindings != null)
+				for (int j = 0; j < bindings.length; ++j)
+					proposals.add(bindings[j]);
+		}
+		return proposals;
+	}
+	
+	protected String[] getSortedNames(List<IBinding> bindings) {
+		String[] result= new String[bindings.size()];
+		Iterator<IBinding> it= bindings.iterator();
+		for (int i = 0; i < result.length; i++) {
+			result[i]= it.next().getName();
+		}
+		Arrays.sort(result);
+		return result;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/CompletionTestSuite.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/CompletionTestSuite.java
new file mode 100644
index 0000000..69f095d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/prefix/CompletionTestSuite.java
@@ -0,0 +1,24 @@
+/**********************************************************************
+ * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.prefix;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class CompletionTestSuite extends TestCase {
+
+	public static Test suite() { 
+		TestSuite suite= new TestSuite(CompletionTestSuite.class.getName());
+		suite.addTestSuite(BasicCompletionTest.class);
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteBaseTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteBaseTest.java
new file mode 100644
index 0000000..8952f7d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteBaseTest.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.Vector;
+
+import org.eclipse.cdt.core.tests.BaseTestFramework;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.ILogListener;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.text.TextSelection;
+
+/**
+ * @author Guido Zgraggen IFS
+ *
+ */
+public abstract class RewriteBaseTest extends BaseTestFramework implements ILogListener{
+	protected static final NullProgressMonitor NULL_PROGRESS_MONITOR = new NullProgressMonitor();
+	
+	protected TreeMap<String, TestSourceFile> fileMap = new TreeMap<String, TestSourceFile>();
+	protected String fileWithSelection;
+	protected TextSelection selection;
+
+	protected RewriteBaseTest(String name) {
+		super(name);
+	}
+	
+	public RewriteBaseTest(String name, Vector<TestSourceFile> files) {
+		super(name);
+		for (TestSourceFile file : files) {
+			fileMap.put(file.getName(), file);
+		}
+	}
+
+	@Override
+	protected abstract void runTest() throws Throwable;
+	
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		for (TestSourceFile testFile : fileMap.values()) {
+			if(testFile.getSource().length() > 0) {
+				importFile(testFile.getName(), testFile.getSource());
+			}
+		}
+	}
+	
+	protected void assertEquals(TestSourceFile file, IFile file2) throws Exception {
+		StringBuffer code = getCodeFromIFile(file2);
+		assertEquals(file.getExpectedSource(), TestHelper.unifyNewLines(code.toString()));
+	}
+	
+	protected void compareFiles(Map<String,TestSourceFile> testResourceFiles) throws Exception {
+		for (String fileName : testResourceFiles.keySet()) {
+			TestSourceFile file = testResourceFiles.get(fileName);
+			IFile iFile = project.getFile(new Path(fileName));
+			StringBuffer code = getCodeFromIFile(iFile);
+			assertEquals(TestHelper.unifyNewLines(file.getExpectedSource()), TestHelper.unifyNewLines(code.toString()));
+		}
+	}
+
+	protected StringBuffer getCodeFromIFile(IFile file) throws Exception {
+		BufferedReader br = new BufferedReader(new InputStreamReader(file.getContents()));
+		StringBuffer code = new StringBuffer();
+		String line;
+		while((line = br.readLine()) != null) {
+			code.append(line);
+			code.append('\n');
+		}
+		br.close();
+		return code;
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		System.gc();
+		fileManager.closeAllFiles();
+		super.tearDown();
+	}
+
+	public void logging(IStatus status, String plugin) {
+		Throwable ex = status.getException();
+		StringBuffer stackTrace = new StringBuffer();
+		if(ex != null) {
+			stackTrace.append('\n');
+			for(StackTraceElement ste : ex.getStackTrace()) {
+				stackTrace.append(ste.toString());
+			}
+		}
+		fail("Log-Message: " + status.getMessage() + stackTrace.toString());		 //$NON-NLS-1$
+	}
+
+	public void setFileWithSelection(String fileWithSelection) {
+		this.fileWithSelection = fileWithSelection;
+	}
+
+	public void setSelection(TextSelection selection) {
+		this.selection = selection;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java
new file mode 100644
index 0000000..ee1912a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java
@@ -0,0 +1,215 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.text.TextSelection;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Emanuel Graf
+ *
+ */
+public class RewriteTester extends TestSuite{
+	
+	enum MatcherState{skip, inTest, inSource, inExpectedResult}
+	
+	private static final String classRegexp = "//#(.*)\\s*(\\w*)*$"; //$NON-NLS-1$
+	private static final String testRegexp = "//!(.*)\\s*(\\w*)*$"; //$NON-NLS-1$
+	private static final String fileRegexp = "//@(.*)\\s*(\\w*)*$"; //$NON-NLS-1$
+	private static final String resultRegexp = "//=.*$"; //$NON-NLS-1$
+	
+	public static Test suite(String name, String file)throws Exception {
+		BufferedReader in = createReader(file);
+
+		ArrayList<RewriteBaseTest> testCases = createTests(in);
+		in.close();
+		return createSuite(testCases, name);
+	}
+	
+	protected static BufferedReader createReader(String file) throws IOException {
+		Bundle bundle = CTestPlugin.getDefault().getBundle();
+		Path path = new Path(file);
+		String file2 = FileLocator.toFileURL(FileLocator.find(bundle, path, null)).getFile();
+		return new BufferedReader(new FileReader(file2));
+	}
+	
+	private static ArrayList<RewriteBaseTest> createTests(BufferedReader inputReader) throws Exception {
+		
+		String line;
+		Vector<TestSourceFile> files = new Vector<TestSourceFile>();
+		TestSourceFile actFile = null;
+		MatcherState matcherState = MatcherState.skip;
+		ArrayList<RewriteBaseTest> testCases = new ArrayList<RewriteBaseTest>();
+		String testName = null;
+		String className = null;
+		boolean bevorFirstTest = true;
+		
+		while ((line = inputReader.readLine()) != null){
+			
+			if(lineMatchesBeginOfTest(line)) {
+				if(!bevorFirstTest) {
+					RewriteBaseTest test = createTestClass(className, testName, files);
+					testCases.add(test);
+					files = new Vector<TestSourceFile>();
+					className = null;
+					testName = null;
+				}
+				matcherState = MatcherState.inTest;
+				testName = getNameOfTest(line);
+				bevorFirstTest = false;
+				continue;
+			}	else if (lineMatchesBeginOfResult(line)) {
+				matcherState = MatcherState.inExpectedResult;
+				continue;
+			}else if (lineMatchesFileName(line)) {
+				matcherState = MatcherState.inSource;
+				actFile = new TestSourceFile(getFileName(line));
+				files.add(actFile);
+				continue;
+			}else if(lineMatchesClassName(line)) {
+				className = getNameOfClass(line);
+				continue;
+			}
+			
+			switch(matcherState) {
+			case inSource:
+				if(actFile != null) {
+					actFile.addLineToSource(line);
+				}
+				break;
+			case inExpectedResult:
+				if(actFile != null) {
+					actFile.addLineToExpectedSource(line);
+				}
+				break;
+			default:
+				break;
+			}
+		}
+		RewriteBaseTest test = createTestClass(className, testName, files);
+		testCases.add(test);
+		return testCases;
+	}
+	
+
+	
+	private static RewriteBaseTest createTestClass(String className, String testName, Vector<TestSourceFile> files) throws Exception {
+		
+		
+		try {
+			Class<?> refClass = Class.forName(className);
+			Class<?> paratypes[] = new Class[2];
+			paratypes[0] = testName.getClass();
+			paratypes[1] = files.getClass();
+			Constructor<?> ct = refClass.getConstructor(paratypes);
+			Object arglist[] = new Object[2];
+			arglist[0] = testName;
+			arglist[1] = files;
+			RewriteBaseTest test = (RewriteBaseTest) ct.newInstance(arglist);
+			for (TestSourceFile file : files) {
+				TextSelection sel = file.getSelection();
+				if(sel != null) {
+					test.setFileWithSelection(file.getName());
+					test.setSelection(sel);
+					break;
+				}
+			}
+			return test;
+		} catch (ClassNotFoundException e) {
+			throw new Exception("Unknown TestClass: " + e.getMessage() + ". Make sure the test's sourcefile specifies a valid test class."); 
+		} catch (SecurityException e) {
+			throw new Exception("Security Exception during Test creation", e); 
+		} catch (NoSuchMethodException e) {
+			throw new Exception("Test class does not provied required constructor."); 
+		} catch (IllegalArgumentException e) {
+			throw new Exception("IllegalArgumentException during Test creation", e); 
+		} catch (InstantiationException e) {
+			throw new Exception("InstantiationException during Test creation", e); 
+		} catch (IllegalAccessException e) {
+			throw new Exception("IllegalAccessException during Test creation", e); 
+		} catch (InvocationTargetException e) {
+			throw new Exception("InvocationTargetException during Test creation", e); 
+		}
+	}
+
+	private static String getFileName(String line) {
+		Matcher matcherBeginOfTest = createMatcherFromString(fileRegexp, line);
+		if(matcherBeginOfTest.find())
+			return matcherBeginOfTest.group(1);
+		else
+			return null;
+	}
+
+	private static String getNameOfClass(String line) {
+		Matcher matcherBeginOfTest = createMatcherFromString(classRegexp, line);
+		if(matcherBeginOfTest.find())
+			return matcherBeginOfTest.group(1);
+		else
+			return null;
+	}
+
+	private static boolean lineMatchesBeginOfTest(String line) {
+		return createMatcherFromString(testRegexp, line).find();
+	}
+	
+	private static boolean lineMatchesClassName(String line) {
+		return createMatcherFromString(classRegexp, line).find();
+	}
+	
+	private static boolean lineMatchesFileName(String line) {
+		return createMatcherFromString(fileRegexp, line).find();
+	}
+
+	protected static Matcher createMatcherFromString(String pattern, String line) {
+		return Pattern.compile(pattern).matcher(line);
+	}
+	
+	private static String getNameOfTest(String line) {
+		Matcher matcherBeginOfTest = createMatcherFromString(testRegexp, line);
+		if(matcherBeginOfTest.find())
+			return matcherBeginOfTest.group(1);
+		else
+			return "Not Named"; 
+	}
+	
+	private static boolean lineMatchesBeginOfResult(String line) {
+		return createMatcherFromString(resultRegexp, line).find();
+	}
+	
+	private static TestSuite createSuite(ArrayList<RewriteBaseTest> testCases, String name) {
+		TestSuite suite = new TestSuite(name);
+		Iterator<RewriteBaseTest> it = testCases.iterator();
+		while(it.hasNext()) {
+			RewriteBaseTest subject =it.next();
+			suite.addTest(subject);
+		}
+		return suite;
+	}
+}
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTests.java
new file mode 100644
index 0000000..fe6d725
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTests.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.parser.tests.rewrite.astwriter.AstWriterTestSuite;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTestSuite;
+import org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTestSuite;
+
+public class RewriteTests extends TestSuite {
+
+	public static Test suite() throws Exception {
+		TestSuite suite = new TestSuite(RewriteTests.class.getName()); 
+		suite.addTest(AstWriterTestSuite.suite());
+		suite.addTest(CommentHandlingTestSuite.suite());
+		suite.addTest(ChangeGeneratorTestSuite.suite());
+		return suite;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/TestHelper.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/TestHelper.java
new file mode 100644
index 0000000..3bd8ac7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/TestHelper.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite;
+
+public class TestHelper {
+
+	public static String unifyNewLines(String code) {
+		String replacement = System.getProperty("line.separator"); //$NON-NLS-1$
+		return code.replaceAll("(\n)|(\r\n)", replacement); //$NON-NLS-1$
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/TestSourceFile.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/TestSourceFile.java
new file mode 100644
index 0000000..e2d3f4d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/TestSourceFile.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.jface.text.TextSelection;
+
+/**
+ * @author Emanuel Graf
+ *
+ */
+public class TestSourceFile {
+	
+	private static final String REPLACEMENT = ""; //$NON-NLS-1$
+	private String name;
+	private StringBuffer source = new StringBuffer();
+	private StringBuffer expectedSource = new StringBuffer();
+	private String separator = System.getProperty("line.separator"); //$NON-NLS-1$
+	private int selectionStart = -1;
+	private int selectionEnd = -1;
+	
+	protected static final String selectionStartRegex = "//\\$"; //$NON-NLS-1$
+	protected static final String selectionEndRegex = "\\$//"; //$NON-NLS-1$
+	protected static final String selectionStartLineRegex = "(.*)(" + selectionStartRegex + ")(.*)"; //$NON-NLS-1$ //$NON-NLS-2$
+	protected static final String selectionEndLineRegex = "(.*)("+ selectionEndRegex + ")(.*)"; //$NON-NLS-1$ //$NON-NLS-2$
+	
+	public TestSourceFile(String name) {
+		super();
+		this.name = name;
+	}
+	public String getExpectedSource() {
+		String exp = expectedSource.toString();
+		if(exp.length() == 0) {
+			return getSource();
+		}else {
+			return exp;
+		}
+	}
+	public String getName() {
+		return name;
+	}
+	public String getSource() {
+		return source.toString();
+	}
+	
+	public void addLineToSource(String code) {
+		Matcher start = createMatcherFromString(selectionStartLineRegex, code);
+		if(start.matches()) {
+			selectionStart = start.start(2) + source.length();
+			code = code.replaceAll(selectionStartRegex, REPLACEMENT);
+		}
+		Matcher end = createMatcherFromString(selectionEndLineRegex, code);
+		if(end.matches()) {
+			selectionEnd = end.start(2) + source.length();
+			code = code.replaceAll(selectionEndRegex, REPLACEMENT);
+		}
+		source.append(code);
+		source.append(separator);
+	}
+	
+	public void addLineToExpectedSource(String code) {
+		expectedSource.append(code);
+		expectedSource.append(separator);
+	}
+	
+	public TextSelection getSelection() {
+		if(selectionStart < 0 || selectionEnd <0 ) {
+			return null;
+		}else {
+			return new TextSelection(selectionStart, selectionEnd -selectionStart);
+		}
+	}
+
+	protected static Matcher createMatcherFromString(String pattern, String line) {
+		return Pattern.compile(pattern).matcher(line);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/ASTWriterTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/ASTWriterTest.java
new file mode 100644
index 0000000..d40c54b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/ASTWriterTest.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.astwriter;
+
+import java.util.Map;
+
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.parser.ISourceCodeParser;
+import org.eclipse.cdt.core.dom.parser.c.ANSICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.GCCParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.ICParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ANSICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.GPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.ICPPParserExtensionConfiguration;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.IParserLogService;
+import org.eclipse.cdt.core.parser.IScanner;
+import org.eclipse.cdt.core.parser.NullLogService;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.ParserMode;
+import org.eclipse.cdt.core.parser.ScannerInfo;
+import org.eclipse.cdt.core.parser.tests.ast2.AST2BaseTest;
+import org.eclipse.cdt.core.parser.tests.rewrite.RewriteBaseTest;
+import org.eclipse.cdt.core.parser.tests.rewrite.TestHelper;
+import org.eclipse.cdt.core.parser.tests.rewrite.TestSourceFile;
+import org.eclipse.cdt.internal.core.dom.parser.c.GNUCSourceParser;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.GNUCPPSourceParser;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationMap;
+import org.eclipse.cdt.internal.core.dom.rewrite.astwriter.ASTWriter;
+import org.eclipse.cdt.internal.core.dom.rewrite.commenthandler.ASTCommenter;
+import org.eclipse.cdt.internal.core.dom.rewrite.commenthandler.NodeCommentMap;
+import org.eclipse.core.resources.IFile;
+
+/**
+ * @author Guido Zgraggen
+ */
+public class ASTWriterTest extends RewriteBaseTest {
+	private static final IParserLogService NULL_LOG = new NullLogService();
+	
+	private	IFile file;
+	
+	public ASTWriterTest(String name, ASTWriterTestSourceFile file) {
+		super(name);
+		fileMap.put(file.getName(), file);
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		for (TestSourceFile testFile : fileMap.values()) {
+			if(testFile.getSource().length() > 0) {
+				file = importFile(testFile.getName(), testFile.getSource());
+			}
+		}
+	}
+	
+
+	@Override
+	protected void runTest() throws Throwable {
+		file = project.getFile("ASTWritterTest.h"); //$NON-NLS-1$
+		compareFiles(fileMap);
+	}
+	
+	@Override
+	protected void compareFiles(Map<String,TestSourceFile> testResourceFiles) throws Exception {
+		for (String fileName : testResourceFiles.keySet()) {
+			TestSourceFile testFile = testResourceFiles.get(fileName);
+			String code = generateSource(testFile);
+			assertEquals(TestHelper.unifyNewLines(testFile.getExpectedSource()), TestHelper.unifyNewLines(code + System.getProperty("line.separator"))); //$NON-NLS-1$
+		}
+	}
+	
+	public String generateSource(TestSourceFile testFile) throws Exception {
+		IASTTranslationUnit unit = getParser(testFile).parse();
+		NodeCommentMap commentMap = ASTCommenter.getCommentedNodeMap(unit);		
+		ASTModificationMap map = new ASTModificationMap();
+		map.getModificationsForNode(unit.getDeclarations()[0]);
+		ASTWriter writer = new ASTWriter();
+		return writer.write(unit, null, commentMap);
+	}
+	
+	protected ISourceCodeParser getParser(TestSourceFile testFile) throws Exception {
+		CodeReader codeReader = new CodeReader(file.getLocation().toOSString(), file.getContents());
+	
+        ScannerInfo scannerInfo = new ScannerInfo();
+        ParserLanguage language = getLanguage(testFile);
+    	boolean useGNUExtensions = getGNUExtension(testFile);
+                
+        IScanner scanner = AST2BaseTest.createScanner(codeReader, language, ParserMode.COMPLETE_PARSE, scannerInfo);
+        
+        ISourceCodeParser parser2 = null;
+        if( language == ParserLanguage.CPP ) {
+            ICPPParserExtensionConfiguration config = null;
+            if (useGNUExtensions){
+            	config = new GPPParserExtensionConfiguration();
+            } else{
+            	config = new ANSICPPParserExtensionConfiguration();
+            }
+            parser2 = new GNUCPPSourceParser(scanner, ParserMode.COMPLETE_PARSE, NULL_LOG, config );
+        } else {
+            ICParserExtensionConfiguration config = null;
+
+            if (useGNUExtensions){
+            	config = new GCCParserExtensionConfiguration();	
+            } else{
+            	config = new ANSICParserExtensionConfiguration();
+            }
+            
+            parser2 = new GNUCSourceParser(scanner, ParserMode.COMPLETE_PARSE, NULL_LOG, config );
+        }
+        return parser2;
+	}
+	
+	private boolean getGNUExtension(TestSourceFile file) {
+		if(file instanceof ASTWriterTestSourceFile) {
+			return ((ASTWriterTestSourceFile)file).isUseGNUExtensions();
+		}
+		else {
+			return false;
+		}
+	}
+
+	private ParserLanguage getLanguage(TestSourceFile file) {
+		if(file instanceof ASTWriterTestSourceFile) {
+			return ((ASTWriterTestSourceFile)file).getParserLanguage();
+		}
+		else {
+			return ParserLanguage.CPP;
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/ASTWriterTestSourceFile.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/ASTWriterTestSourceFile.java
new file mode 100644
index 0000000..82024fe
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/ASTWriterTestSourceFile.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ * 
+ * Contributors: 
+ * Institute for Software - initial API and implementation 
+ ******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.astwriter;
+
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.tests.rewrite.TestSourceFile;
+
+/**
+ * @author Guido Zgraggen IFS
+ *
+ */
+public class ASTWriterTestSourceFile extends TestSourceFile {
+	private ParserLanguage parserLanguage = ParserLanguage.CPP;
+	private boolean useGNUExtensions = false;
+
+	public ASTWriterTestSourceFile(String name) {
+		super(name);
+	}
+	
+	public void setParserLanguage(ParserLanguage lang) {
+		this.parserLanguage = lang;
+	}
+
+	public ParserLanguage getParserLanguage() {
+		return parserLanguage;
+	}
+
+	public boolean isUseGNUExtensions() {
+		return useGNUExtensions;
+	}
+
+	public void setUseGNUExtensions(boolean useGNUExtensions) {
+		this.useGNUExtensions = useGNUExtensions;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/AstWriterTestSuite.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/AstWriterTestSuite.java
new file mode 100644
index 0000000..01542de
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/AstWriterTestSuite.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.astwriter;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Emanuel Graf
+ *
+ */
+public class AstWriterTestSuite{
+
+	public static Test suite() throws Exception {
+		TestSuite suite = new TestSuite("AstWriterTests");
+		suite.addTest(SourceRewriteTester.suite("ExpressionTests", "resources/rewrite/ASTWriterExpressionTestSource.awts"));
+		
+		suite.addTest(SourceRewriteTester.suite("DelcSpecifierTests", "resources/rewrite/ASTWriterDeclSpecTestSource.awts"));
+		suite.addTest(SourceRewriteTester.suite("Commented DelcSpecifierTests",
+				"resources/rewrite/ASTWriterCommentedDeclSpecTestSource.awts"));
+		
+		suite.addTest(SourceRewriteTester.suite("DeclaratorTests", "resources/rewrite/ASTWriterDeclaratorTestSource.awts"));
+		suite.addTest(SourceRewriteTester.suite("Commented DeclaratorTests",
+				"resources/rewrite/ASTWriterCommentedDeclaratorTestSource.awts"));
+		
+		suite.addTest(SourceRewriteTester.suite("StatementsTests", "resources/rewrite/ASTWriterStatementTestSource.awts"));
+		suite.addTest(SourceRewriteTester
+				.suite("Commented StatementsTests", "resources/rewrite/ASTWriterCommentedStatementTestSource.awts"));
+		
+		suite.addTest(SourceRewriteTester.suite("NameTests", "resources/rewrite/ASTWriterNameTestSource.awts"));
+		suite.addTest(SourceRewriteTester.suite("Commented NameTests", "resources/rewrite/ASTWriterCommentedNameTestSource.awts"));
+		
+		suite.addTest(SourceRewriteTester.suite("InitializerTests", "resources/rewrite/ASTWriterInitializerTestSource.awts"));
+		
+		suite.addTest(SourceRewriteTester.suite("DeclarationTests", "resources/rewrite/ASTWriterDeclarationTestSource.awts"));
+		suite.addTest(SourceRewriteTester.suite("Commented DeclarationTests",
+				"resources/rewrite/ASTWriterCommentedDeclarationTestSource.awts"));
+
+		suite.addTest(SourceRewriteTester.suite("TemplatesTests", "resources/rewrite/ASTWriterTemplateTestSource.awts"));
+		
+		suite.addTest(SourceRewriteTester.suite("CommentTests", "resources/rewrite/ASTWriterCommentedTestSource.awts"));
+		suite.addTest(SourceRewriteTester.suite("NewCommentTests", "resources/rewrite/ASTWriterCommentedTestSource2.awts"));
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/SourceRewriteTester.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/SourceRewriteTester.java
new file mode 100644
index 0000000..26ba7fd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/astwriter/SourceRewriteTester.java
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.astwriter;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.tests.rewrite.RewriteBaseTest;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.text.TextSelection;
+import org.osgi.framework.Bundle;
+
+public class SourceRewriteTester extends TestSuite {
+	
+	private static final String testRegexp = "//!(.*)\\s*(\\w*)*$"; //$NON-NLS-1$
+	private static final String codeTypeRegexp = "//%(C|CPP)( GNU)?$"; //$NON-NLS-1$
+	private static final String resultRegexp = "//=.*$"; //$NON-NLS-1$
+	
+	enum MatcherState{skip, inTest, inSource, inExpectedResult}
+
+	protected static BufferedReader createReader(String file) throws IOException {
+		Bundle bundle = CTestPlugin.getDefault().getBundle();
+		Path path = new Path(file);
+		String file2 = FileLocator.toFileURL(FileLocator.find(bundle, path, null)).getFile();
+		return new BufferedReader(new FileReader(file2));
+	}
+
+	public static Test suite(String name, String file)throws Exception {
+		BufferedReader in = createReader(file);
+
+		ArrayList<RewriteBaseTest> testCases = createTests(in);
+		in.close();
+		return createSuite(testCases, name);
+	}
+
+	private static TestSuite createSuite(ArrayList<RewriteBaseTest> testCases, String name) {
+		TestSuite suite = new TestSuite(name);
+		Iterator<RewriteBaseTest> it = testCases.iterator();
+		while(it.hasNext()) {
+			RewriteBaseTest subject =it.next();
+			suite.addTest(subject);
+		}
+		return suite;
+	}
+
+	protected static boolean lineMatchesBeginOfTest(String line) {
+		return createMatcherFromString(testRegexp, line).find();
+	}
+	
+	protected static boolean lineMatchesCodeType(String line) {
+		return createMatcherFromString(codeTypeRegexp, line).find();
+	}
+
+	protected static Matcher createMatcherFromString(String pattern, String line) {
+		return Pattern.compile(pattern).matcher(line);
+	}
+	
+	protected static String getNameOfTest(String line) {
+		Matcher matcherBeginOfTest = createMatcherFromString(testRegexp, line);
+		if(matcherBeginOfTest.find())
+			return matcherBeginOfTest.group(1);
+		else
+			return "Not Named";
+	}
+
+	protected static boolean lineMatchesBeginOfResult(String line) {
+		return createMatcherFromString(resultRegexp, line).find();
+	}
+
+	private static ArrayList<RewriteBaseTest> createTests(BufferedReader inputReader) throws Exception {
+		String line;
+		ASTWriterTestSourceFile file = null;
+		MatcherState matcherState = MatcherState.skip;
+		ArrayList<RewriteBaseTest> testCases = new ArrayList<RewriteBaseTest>();
+		
+		while ((line = inputReader.readLine()) != null){
+			if(lineMatchesBeginOfTest(line)) {
+				matcherState = MatcherState.inTest;
+				file = new ASTWriterTestSourceFile("ASTWritterTest.h"); //$NON-NLS-1$
+				testCases.add(createTestClass(getNameOfTest(line), file));
+				continue;
+			}	else if (lineMatchesBeginOfResult(line)) {
+				matcherState = MatcherState.inExpectedResult;
+				continue;
+			}else if (lineMatchesCodeType(line)) {
+				matcherState = MatcherState.inSource;
+				if(file != null) {
+					file.setParserLanguage(getParserLanguage(line));
+					file.setUseGNUExtensions(useGNUExtensions(line));
+				}
+				continue;
+			}
+			
+			switch(matcherState) {
+			case inSource:
+				if(file != null) {
+					file.addLineToSource(line);
+				}
+				break;
+			case inExpectedResult:
+				if(file != null) {
+					file.addLineToExpectedSource(line);
+				}
+				break;
+			default:
+				break;
+			}
+		}
+		return testCases;
+	}
+
+	protected static boolean useGNUExtensions(String line) {
+		Matcher matcherBeginOfTest = createMatcherFromString(codeTypeRegexp, line);
+		if(matcherBeginOfTest.find()) {
+			String codeType = matcherBeginOfTest.group(2);
+			if(codeType == null) {
+				return false;
+			}else {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	protected static ParserLanguage getParserLanguage(String line) {
+		Matcher matcherBeginOfTest = createMatcherFromString(codeTypeRegexp, line);
+		if(matcherBeginOfTest.find()) {
+			String codeType = matcherBeginOfTest.group(1);
+			if(codeType.equalsIgnoreCase("CPP")) { //$NON-NLS-1$
+				return ParserLanguage.CPP;
+			}else {
+				return ParserLanguage.C;
+			}
+		}
+		return ParserLanguage.C;
+	}
+	
+	private static RewriteBaseTest createTestClass(String testName, ASTWriterTestSourceFile file) throws Exception {
+		ASTWriterTest test = new ASTWriterTest(testName,file);
+		TextSelection sel = file.getSelection();
+		if(sel != null) {
+			test.setFileWithSelection(file.getName());
+			test.setSelection(sel);
+		}
+		return test;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/ChangeGeneratorTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/ChangeGeneratorTest.java
new file mode 100644
index 0000000..287ecc7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/ChangeGeneratorTest.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.CDOM;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.index.IIndexManager;
+import org.eclipse.cdt.core.parser.tests.rewrite.TestHelper;
+import org.eclipse.cdt.core.tests.BaseTestFramework;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.changegenerator.ChangeGenerator;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.text.Document;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+
+public abstract class ChangeGeneratorTest extends BaseTestFramework {
+
+	protected String source;
+	protected String expectedSource;
+
+	public ChangeGeneratorTest() {
+		super();
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		CCorePlugin.getIndexManager().joinIndexer(IIndexManager.FOREVER, new NullProgressMonitor());
+		super.setUp();
+	}
+
+	@Override
+	public void runTest() {
+		final ASTModificationStore modStore = new ASTModificationStore();
+		final ChangeGenerator changegenartor = new ChangeGenerator(modStore);
+		try {
+			importFile("source.h", source); //$NON-NLS-1$
+	
+			IASTTranslationUnit unit = CDOM.getInstance().getTranslationUnit(
+					project.getFile(new Path("source.h")), //$NON-NLS-1$
+			        CDOM.getInstance().getCodeReaderFactory(
+			              CDOM.PARSE_SAVED_RESOURCES),
+			        true);
+			CPPASTVisitor visitor = createModificator(modStore);
+		
+			unit.accept(visitor);
+			
+
+			//			assertEquals(expectedSource, changegenartor.write(unit));
+			changegenartor.generateChange(unit);
+			Document doc = new Document(source);
+			for(Change curChange : ((CompositeChange)changegenartor.getChange()).getChildren()){
+				if (curChange instanceof TextFileChange) {
+					TextFileChange textChange = (TextFileChange) curChange;
+					textChange.getEdit().apply(doc);
+				}
+			}
+			assertEquals(TestHelper.unifyNewLines(expectedSource), TestHelper.unifyNewLines(doc.get()));
+		} catch (Exception e) {
+			e.printStackTrace();
+			assertTrue(false);
+		}
+	}
+
+	protected abstract CPPASTVisitor createModificator(ASTModificationStore modStore);
+
+	public ChangeGeneratorTest(String name) {
+		super(name);
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		System.gc();
+		fileManager.closeAllFiles();
+		super.tearDown();
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/ChangeGeneratorTestSuite.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/ChangeGeneratorTestSuite.java
new file mode 100644
index 0000000..f3027d9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/ChangeGeneratorTestSuite.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.append.AppendTestSuite;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.insertbefore.InsertBeforeTestSuite;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove.RemoveTestSuite;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace.ReplaceTestSuite;
+
+/**
+ * @author Thomas Corbat
+ *
+ */
+public class ChangeGeneratorTestSuite{
+
+	public static Test suite() throws Exception {
+		TestSuite suite = new TestSuite("ChangeGeneratorTests");
+
+		suite.addTest(ReplaceTestSuite.suite());
+		suite.addTest(RemoveTestSuite.suite());
+		suite.addTest(InsertBeforeTestSuite.suite());
+		suite.addTest(AppendTestSuite.suite());
+				
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/AppendTestSuite.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/AppendTestSuite.java
new file mode 100644
index 0000000..f4cce8f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/AppendTestSuite.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.append;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Thomas Corbat
+ *
+ */
+public class AppendTestSuite{
+
+	public static Test suite() throws Exception {
+		TestSuite suite = new TestSuite("Changegenerator Append Child Tests");
+
+		suite.addTest(ParameterTest.suite());
+		suite.addTest(ParameterToListTest.suite());
+		suite.addTest(PointerToParameterTest.suite());
+		suite.addTest(PointerToPointerParameterTest.suite());
+		suite.addTest(ExceptionTest.suite());
+		suite.addTest(CtorChainInitializerTest.suite());
+		suite.addTest(ArrayModifierTest.suite());
+		suite.addTest(ExpressionTest.suite());
+		suite.addTest(ArraySizeExpressionTest.suite());
+				
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ArrayModifierTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ArrayModifierTest.java
new file mode 100644
index 0000000..9f43f94
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ArrayModifierTest.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.append;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTArrayModifier;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTLiteralExpression;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class ArrayModifierTest extends ChangeGeneratorTest {
+
+	public ArrayModifierTest(){
+		super("Replace Array Modifier"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+
+		
+		source = "int *pi[5];"; //$NON-NLS-1$
+		expectedSource = "int *pi[5][3];"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof IASTArrayDeclarator) {
+					IASTArrayDeclarator arrayDeclarator = (IASTArrayDeclarator)declarator;
+					arrayDeclarator.getArrayModifiers();
+					IASTArrayModifier newModifier = new CPPASTArrayModifier();
+					IASTExpression expr = new CPPASTLiteralExpression(0, "3"); //$NON-NLS-1$
+					newModifier.setConstantExpression(expr);
+					ASTModification modification = new ASTModification(ModificationKind.APPEND_CHILD, declarator, newModifier, null);
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}	
+		};
+	}
+	
+	public static Test suite() {
+		return new ArrayModifierTest();
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ArraySizeExpressionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ArraySizeExpressionTest.java
new file mode 100644
index 0000000..e4d6f8d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ArraySizeExpressionTest.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.append;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNewExpression;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTArrayModifier;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTLiteralExpression;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+public class ArraySizeExpressionTest extends ChangeGeneratorTest {
+
+	public ArraySizeExpressionTest(){
+		super("Append Array Size Expression"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "int *values = new int[6];"; //$NON-NLS-1$
+		expectedSource = "int *values = new int[6][5];"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitExpressions = true;
+			}
+			
+			@Override
+			public int visit(IASTExpression expression) {
+				if (expression instanceof ICPPASTNewExpression) {
+					ICPPASTNewExpression newExpression = (ICPPASTNewExpression) expression;
+					IASTTypeId id= newExpression.getTypeId();
+					IASTArrayDeclarator dtor= (IASTArrayDeclarator) id.getAbstractDeclarator();
+					IASTArrayModifier[] mods= dtor.getArrayModifiers();
+					IASTArrayModifier add= new CPPASTArrayModifier(new CPPASTLiteralExpression(0, "5"));
+					ASTModification modification = new ASTModification(ASTModification.ModificationKind.APPEND_CHILD, dtor, add, null); 
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	public static Test suite() {
+		return new ArraySizeExpressionTest();
+		
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/CtorChainInitializerTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/CtorChainInitializerTest.java
new file mode 100644
index 0000000..e652e23
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/CtorChainInitializerTest.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.append;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorChainInitializer;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTConstructorChainInitializer;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDefinition;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTIdExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class CtorChainInitializerTest extends ChangeGeneratorTest {
+
+
+	public CtorChainInitializerTest(){
+		super("Append Ctor Initializer"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+
+		source = "TestClass::TestClass(int a, int b):beta(b){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "TestClass::TestClass(int a, int b):beta(b), alpha(a){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarations = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclaration decl) {
+				if (decl instanceof CPPASTFunctionDefinition) {
+					CPPASTFunctionDefinition fdef = (CPPASTFunctionDefinition)decl;
+					CPPASTIdExpression initExpr = new CPPASTIdExpression(new CPPASTName("a".toCharArray())); //$NON-NLS-1$
+					CPPASTName initName = new CPPASTName("alpha".toCharArray()); //$NON-NLS-1$
+					ICPPASTConstructorChainInitializer newInitializer = new CPPASTConstructorChainInitializer(initName, initExpr);
+					ASTModification modification = new ASTModification(ModificationKind.APPEND_CHILD, fdef, newInitializer, null);
+					modStore.storeModification(null, modification);
+					
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+
+	public static Test suite() {
+		return new CtorChainInitializerTest();
+		
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ExceptionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ExceptionTest.java
new file mode 100644
index 0000000..f82e7e0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ExceptionTest.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.append;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTypeId;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class ExceptionTest extends ChangeGeneratorTest {
+
+	public ExceptionTest(){
+		super("Append Exception Declaration"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int parameter){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int parameter) throw (int){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					IASTTypeId exception = new CPPASTTypeId();
+					CPPASTDeclarator exceptionDeclarator = new CPPASTDeclarator();
+					exceptionDeclarator.setName(new CPPASTName());
+					CPPASTSimpleDeclSpecifier exDeclSpec = new CPPASTSimpleDeclSpecifier();
+					exDeclSpec.setType(IASTSimpleDeclSpecifier.t_int);
+					exception.setDeclSpecifier(exDeclSpec);
+					exception.setAbstractDeclarator(exceptionDeclarator);
+					ASTModification modification = new ASTModification(ModificationKind.APPEND_CHILD, declarator, exception, null);
+					modStore.storeModification(null, modification);
+					
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	public static Test suite() {
+		return new ExceptionTest();
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ExpressionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ExpressionTest.java
new file mode 100644
index 0000000..75f7c3c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ExpressionTest.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.append;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionList;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTBinaryExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTIdExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTLiteralExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+public class ExpressionTest extends ChangeGeneratorTest {
+
+
+	public ExpressionTest(){
+		super("Append Expression"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void main(){int s = 0, c = 0, h = 0;\ns = 3, h = 5;}"; //$NON-NLS-1$
+		expectedSource = "void main(){int s = 0, c = 0, h = 0;\ns = 3, h = 5, c = 9;}"; //$NON-NLS-1$
+		super.setUp();
+	}
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitExpressions = true;
+			}
+			
+			@Override
+			public int visit(IASTExpression expression) {
+				if (expression instanceof IASTExpressionList) {
+					IASTExpressionList expressionList = (IASTExpressionList) expression;
+					expressionList.getExpressions();
+					CPPASTBinaryExpression binEx = new CPPASTBinaryExpression(IASTBinaryExpression.op_assign, new CPPASTIdExpression(new CPPASTName("c".toCharArray())), new CPPASTLiteralExpression(0, "9")); //$NON-NLS-1$ //$NON-NLS-2$
+					ASTModification modification = new ASTModification(ASTModification.ModificationKind.APPEND_CHILD, expressionList, binEx, null);
+					modStore.storeModification(null, modification);
+				}
+
+				return PROCESS_CONTINUE;
+			}
+			
+		};
+	}
+	public static Test suite() {
+		return new ExpressionTest();
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ParameterTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ParameterTest.java
new file mode 100644
index 0000000..9b82650
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ParameterTest.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.append;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTParameterDeclaration;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclSpecifier;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+
+
+
+
+public class ParameterTest extends ChangeGeneratorTest {
+
+	public ParameterTest(){
+		super("Append Parameter to List"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int existing){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int existing, int newParameter){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					
+					CPPASTParameterDeclaration insertedParameter = new CPPASTParameterDeclaration();
+					CPPASTDeclarator parameterDeclarator = new CPPASTDeclarator();
+					CPPASTName parameterName = new CPPASTName("newParameter".toCharArray()); //$NON-NLS-1$
+					parameterDeclarator.setName(parameterName);
+					insertedParameter.setDeclarator(parameterDeclarator);
+					CPPASTSimpleDeclSpecifier parameterDeclSpec = new CPPASTSimpleDeclSpecifier();
+					parameterDeclSpec.setType(IASTSimpleDeclSpecifier.t_int);
+					insertedParameter.setDeclSpecifier(parameterDeclSpec);
+					ASTModification modification = new ASTModification(ModificationKind.APPEND_CHILD, functionDeclarator, insertedParameter, null);
+					modStore.storeModification(null, modification);	
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	public static Test suite() {
+		return new ParameterTest();
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ParameterToListTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ParameterToListTest.java
new file mode 100644
index 0000000..ddccfe2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/ParameterToListTest.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.append;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTParameterDeclaration;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclSpecifier;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+
+
+
+
+public class ParameterToListTest extends ChangeGeneratorTest {
+
+	public ParameterToListTest(){
+		super("Append Parameter to Empty List"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int newParameter){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					
+					CPPASTParameterDeclaration insertedParameter = new CPPASTParameterDeclaration();
+					CPPASTDeclarator parameterDeclarator = new CPPASTDeclarator();
+					CPPASTName parameterName = new CPPASTName("newParameter".toCharArray()); //$NON-NLS-1$
+					parameterDeclarator.setName(parameterName);
+					insertedParameter.setDeclarator(parameterDeclarator);
+					CPPASTSimpleDeclSpecifier parameterDeclSpec = new CPPASTSimpleDeclSpecifier();
+					parameterDeclSpec.setType(IASTSimpleDeclSpecifier.t_int);
+					insertedParameter.setDeclSpecifier(parameterDeclSpec);
+					ASTModification modification = new ASTModification(ModificationKind.APPEND_CHILD, functionDeclarator, insertedParameter, null);
+					modStore.storeModification(null, modification);					
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	public static Test suite() {
+		return new ParameterToListTest();
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/PointerToParameterTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/PointerToParameterTest.java
new file mode 100644
index 0000000..3f17405
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/PointerToParameterTest.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.append;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTPointer;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class PointerToParameterTest extends ChangeGeneratorTest {
+
+
+	public PointerToParameterTest(){
+		super("Append Pointer to Parameter"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int parameter){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int *parameter){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					IASTParameterDeclaration[] parameters = functionDeclarator.getParameters();
+					for(IASTParameterDeclaration curParam : parameters){
+						if(String.valueOf(curParam.getDeclarator().getName().toCharArray()).equals("parameter")){ //$NON-NLS-1$
+							CPPASTPointer addedPointer = new CPPASTPointer();
+							ASTModification modification = new ASTModification(ModificationKind.APPEND_CHILD, curParam.getDeclarator(), addedPointer, null);
+							modStore.storeModification(null, modification);
+						}
+					}
+				}
+				return PROCESS_CONTINUE;
+			}
+			
+		};
+	}
+	
+	public static Test suite() {
+		return new PointerToParameterTest();
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/PointerToPointerParameterTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/PointerToPointerParameterTest.java
new file mode 100644
index 0000000..5312a2d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/append/PointerToPointerParameterTest.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.append;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTPointer;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class PointerToPointerParameterTest extends ChangeGeneratorTest {
+
+	public PointerToPointerParameterTest(){
+		super("Append Pointer to Pointer Parameter"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int *parameter){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int **parameter){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					IASTParameterDeclaration[] parameters = functionDeclarator.getParameters();
+					for(IASTParameterDeclaration curParam : parameters){
+						if(String.valueOf(curParam.getDeclarator().getName().toCharArray()).equals("parameter")){ //$NON-NLS-1$
+							CPPASTPointer addedPointer = new CPPASTPointer();
+							ASTModification modification = new ASTModification(ModificationKind.APPEND_CHILD, curParam.getDeclarator(), addedPointer, null);
+							modStore.storeModification(null, modification);
+						}
+					}
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	public static Test suite() {
+		return new PointerToPointerParameterTest();
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/AddDeclarationBug.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/AddDeclarationBug.java
new file mode 100644
index 0000000..72daee6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/AddDeclarationBug.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others.
+ * 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  
+ * 
+ * Contributors: 
+ * Institute for Software (IFS)- initial API and implementation 
+ ******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.insertbefore;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTParameterDeclaration;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTParameterDeclaration;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclaration;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+/**
+ * @author Emanuel Graf IFS
+ *
+ */
+public class AddDeclarationBug extends ChangeGeneratorTest {
+	
+	
+	
+	
+	public AddDeclarationBug() {
+		super("Add Declaration Bug Test");
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "class A\n{\npublic:\n	A();\n	virtual ~A();\n	int foo();\n	\nprivate:\n	int help();\n};"; //$NON-NLS-1$
+		expectedSource = "class A\n{\npublic:\n	A();\n	virtual ~A();\n	int foo();\n	\nprivate:\n	int help();\n    int exp(int i);\n};"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclSpecifiers = true;
+			}
+
+			@Override
+			public int visit(IASTDeclSpecifier declSpec) {
+				if (declSpec instanceof ICPPASTCompositeTypeSpecifier) {
+					ICPPASTCompositeTypeSpecifier classNode = (ICPPASTCompositeTypeSpecifier) declSpec;
+					IASTSimpleDeclaration newDecl = new CPPASTSimpleDeclaration();
+					
+					IASTSimpleDeclSpecifier returnTyp = new CPPASTSimpleDeclSpecifier();
+					returnTyp.setType(IASTSimpleDeclSpecifier.t_int);
+					newDecl.setDeclSpecifier(returnTyp);
+					
+					IASTStandardFunctionDeclarator declarator = new CPPASTFunctionDeclarator(new CPPASTName("exp".toCharArray()));
+					IASTSimpleDeclSpecifier paramTyp = new CPPASTSimpleDeclSpecifier();
+					paramTyp.setType(IASTSimpleDeclSpecifier.t_int);
+					IASTDeclarator decl = new CPPASTDeclarator(new CPPASTName("i".toCharArray()));
+					ICPPASTParameterDeclaration param = new CPPASTParameterDeclaration(paramTyp, decl);
+					declarator.addParameterDeclaration(param);
+					newDecl.addDeclarator(declarator);
+					
+					ASTModification mod= new ASTModification(ModificationKind.APPEND_CHILD, classNode, newDecl, null);
+					modStore.storeModification(null, mod);
+				}
+				return PROCESS_CONTINUE;
+			}
+			
+			
+		};
+	}
+	
+	public static Test suite() {
+		return new AddDeclarationBug();
+		
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/ArrayModifierTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/ArrayModifierTest.java
new file mode 100644
index 0000000..4a16a9d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/ArrayModifierTest.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.insertbefore;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTArrayModifier;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTLiteralExpression;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class ArrayModifierTest extends ChangeGeneratorTest {
+
+	public ArrayModifierTest(){
+		super("Replace Array Modifier"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "int *pi[3];"; //$NON-NLS-1$
+		expectedSource = "int *pi[5][3];"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof IASTArrayDeclarator) {
+					IASTArrayDeclarator arrayDeclarator = (IASTArrayDeclarator)declarator;
+					
+					IASTArrayModifier[] modifiers = arrayDeclarator.getArrayModifiers();
+					IASTArrayModifier newModifier = new CPPASTArrayModifier();
+					IASTExpression expr = new CPPASTLiteralExpression(0, "5"); //$NON-NLS-1$
+					newModifier.setConstantExpression(expr);
+					ASTModification modification = new ASTModification(ModificationKind.INSERT_BEFORE, modifiers[0], newModifier, null);
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	public static Test suite() {
+		return new ArrayModifierTest();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/ArraySizeExpressionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/ArraySizeExpressionTest.java
new file mode 100644
index 0000000..a92f8c4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/ArraySizeExpressionTest.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.insertbefore;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNewExpression;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTArrayModifier;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTLiteralExpression;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+public class ArraySizeExpressionTest extends ChangeGeneratorTest {
+
+	public ArraySizeExpressionTest(){
+		super("Insert Array Size Expression"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "int *values = new int[5];"; //$NON-NLS-1$
+		expectedSource = "int *values = new int[6][5];"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitExpressions = true;
+			}
+			
+			@Override
+			public int visit(IASTExpression expression) {
+				if (expression instanceof ICPPASTNewExpression) {
+					ICPPASTNewExpression newExpression = (ICPPASTNewExpression) expression;
+					IASTTypeId id= newExpression.getTypeId();
+					IASTArrayDeclarator dtor= (IASTArrayDeclarator) id.getAbstractDeclarator();
+					IASTArrayModifier[] mods= dtor.getArrayModifiers();
+					IASTArrayModifier add= new CPPASTArrayModifier(new CPPASTLiteralExpression(0, "6"));
+					ASTModification modification = new ASTModification(ASTModification.ModificationKind.INSERT_BEFORE, mods[0], add, null); 
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	public static Test suite() {
+		return new ArraySizeExpressionTest();
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/CtorChainInitializerTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/CtorChainInitializerTest.java
new file mode 100644
index 0000000..cbb71d1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/CtorChainInitializerTest.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.insertbefore;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorChainInitializer;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTConstructorChainInitializer;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTIdExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class CtorChainInitializerTest extends ChangeGeneratorTest {
+
+	public CtorChainInitializerTest(){
+		super("Insert Before Ctor Initializer"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "TestClass::TestClass(int a, int b):beta(b){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "TestClass::TestClass(int a, int b):alpha(a), beta(b){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					ICPPASTConstructorChainInitializer ctorInitializer = functionDeclarator.getConstructorChain()[0];
+					CPPASTIdExpression initExpr = new CPPASTIdExpression(new CPPASTName("a".toCharArray())); //$NON-NLS-1$
+					CPPASTName initName = new CPPASTName("alpha".toCharArray()); //$NON-NLS-1$
+					ICPPASTConstructorChainInitializer newInitializer = new CPPASTConstructorChainInitializer(initName, initExpr);
+					ASTModification modification = new ASTModification(ModificationKind.INSERT_BEFORE, ctorInitializer, newInitializer, null);
+					modStore.storeModification(null, modification);
+					
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	public static Test suite() {
+		return new CtorChainInitializerTest();
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/ExceptionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/ExceptionTest.java
new file mode 100644
index 0000000..ed44c47
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/ExceptionTest.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.insertbefore;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTypeId;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class ExceptionTest extends ChangeGeneratorTest {
+
+	public ExceptionTest(){
+		super("Insert Before Exception Declaration"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int parameter) throw (/*Test*/float) /*Test2*/{\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int parameter) throw (int, /*Test*/float) /*Test2*/{\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					IASTTypeId existingException = functionDeclarator.getExceptionSpecification()[0];
+					
+					IASTTypeId exception = new CPPASTTypeId();
+					CPPASTDeclarator exceptionDeclarator = new CPPASTDeclarator();
+					exceptionDeclarator.setName(new CPPASTName());
+					CPPASTSimpleDeclSpecifier exDeclSpec = new CPPASTSimpleDeclSpecifier();
+					exDeclSpec.setType(IASTSimpleDeclSpecifier.t_int);
+					exception.setDeclSpecifier(exDeclSpec);
+					exception.setAbstractDeclarator(exceptionDeclarator);
+					ASTModification modification = new ASTModification(ModificationKind.INSERT_BEFORE, existingException, exception, null);
+					modStore.storeModification(null, modification);
+					
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	public static Test suite() {
+		return new ExceptionTest();
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/ExpressionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/ExpressionTest.java
new file mode 100644
index 0000000..e5e811f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/ExpressionTest.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.insertbefore;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionList;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTBinaryExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTIdExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTLiteralExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+
+
+public class ExpressionTest extends ChangeGeneratorTest {
+
+	public ExpressionTest(){
+		super("Insert Expression"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void main(){int s = 0, c = 0, h = 0;\ns = 3, h = 5;}"; //$NON-NLS-1$
+		expectedSource = "void main(){int s = 0, c = 0, h = 0;\ns = 3, c = 9, h = 5;}"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitExpressions = true;
+			}
+			
+			@Override
+			public int visit(IASTExpression expression) {
+				if (expression instanceof IASTExpressionList) {
+					IASTExpressionList expressionList = (IASTExpressionList) expression;
+					IASTExpression[] expressions = expressionList.getExpressions();
+					CPPASTBinaryExpression binEx = new CPPASTBinaryExpression(IASTBinaryExpression.op_assign, new CPPASTIdExpression(new CPPASTName("c".toCharArray())), new CPPASTLiteralExpression(0, "9")); //$NON-NLS-1$ //$NON-NLS-2$
+					ASTModification modification = new ASTModification(ASTModification.ModificationKind.INSERT_BEFORE, expressions[1], binEx, null);
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	public static Test suite() {
+		return new ExpressionTest();
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/FirstParameterTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/FirstParameterTest.java
new file mode 100644
index 0000000..8509f69
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/FirstParameterTest.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.insertbefore;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTParameterDeclaration;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclSpecifier;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+
+
+
+
+public class FirstParameterTest extends ChangeGeneratorTest {
+
+	public FirstParameterTest(){
+		super("Insert Before First Parameter"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int a){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int newParameter, int a){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					IASTParameterDeclaration[] parameters = functionDeclarator.getParameters();
+					for(IASTParameterDeclaration curParam : parameters){
+						if(String.valueOf(curParam.getDeclarator().getName().toCharArray()).equals("a")){ //$NON-NLS-1$
+							CPPASTParameterDeclaration insertedParameter = new CPPASTParameterDeclaration();
+							CPPASTDeclarator parameterDeclarator = new CPPASTDeclarator();
+							CPPASTName parameterName = new CPPASTName("newParameter".toCharArray()); //$NON-NLS-1$
+							parameterDeclarator.setName(parameterName);
+							insertedParameter.setDeclarator(parameterDeclarator);
+							CPPASTSimpleDeclSpecifier parameterDeclSpec = new CPPASTSimpleDeclSpecifier();
+							parameterDeclSpec.setType(IASTSimpleDeclSpecifier.t_int);
+							insertedParameter.setDeclSpecifier(parameterDeclSpec);
+							ASTModification modification = new ASTModification(ModificationKind.INSERT_BEFORE, curParam, insertedParameter, null);
+							modStore.storeModification(null, modification);
+						}
+					}
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	public static Test suite() {
+		return new FirstParameterTest();
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/InsertBeforeTestSuite.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/InsertBeforeTestSuite.java
new file mode 100644
index 0000000..111fb8c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/InsertBeforeTestSuite.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.insertbefore;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Thomas Corbat
+ *
+ */
+public class InsertBeforeTestSuite{
+
+	public static Test suite() throws Exception {
+		TestSuite suite = new TestSuite("Changegenerator InsertBefore Tests");
+
+		suite.addTest(FirstParameterTest.suite());
+		suite.addTest(PointerParameterTest.suite());
+		suite.addTest(ExceptionTest.suite());
+		suite.addTest(CtorChainInitializerTest.suite());
+		suite.addTest(ArrayModifierTest.suite());
+		suite.addTest(ExpressionTest.suite());
+		suite.addTest(ArraySizeExpressionTest.suite());
+		suite.addTest(AddDeclarationBug.suite());
+				
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/PointerParameterTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/PointerParameterTest.java
new file mode 100644
index 0000000..c496ed4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/insertbefore/PointerParameterTest.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.insertbefore;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTPointer;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class PointerParameterTest extends ChangeGeneratorTest {
+
+	public PointerParameterTest(){
+		super("Insert Pointer for Parameter"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int *parameter){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int **parameter){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					IASTParameterDeclaration[] parameters = functionDeclarator.getParameters();
+					for(IASTParameterDeclaration curParam : parameters){
+						if(String.valueOf(curParam.getDeclarator().getName().toCharArray()).equals("parameter")){ //$NON-NLS-1$
+							IASTPointerOperator pointer = curParam.getDeclarator().getPointerOperators()[0];
+							CPPASTPointer insertedPointer = new CPPASTPointer();
+							ASTModification modification = new ASTModification(ModificationKind.INSERT_BEFORE, pointer, insertedPointer, null);
+							modStore.storeModification(null, modification);
+						}
+					}
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	public static Test suite() {
+		return new PointerParameterTest();
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/ArrayModifierTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/ArrayModifierTest.java
new file mode 100644
index 0000000..05b0d13
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/ArrayModifierTest.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class ArrayModifierTest extends ChangeGeneratorTest {
+
+	public ArrayModifierTest(){
+		super("Remove Array Modifier"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "int *pi[3];"; //$NON-NLS-1$
+		expectedSource = "int *pi;"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {
+		return new ArrayModifierTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof IASTArrayDeclarator) {
+					IASTArrayDeclarator arrayDeclarator = (IASTArrayDeclarator)declarator;
+					
+					IASTArrayModifier[] modifiers = arrayDeclarator.getArrayModifiers();
+					ASTModification modification = new ASTModification(ModificationKind.REPLACE, modifiers[0], null, null);
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/ArraySizeExpressionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/ArraySizeExpressionTest.java
new file mode 100644
index 0000000..75c3d82
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/ArraySizeExpressionTest.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNewExpression;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+public class ArraySizeExpressionTest extends ChangeGeneratorTest {
+
+	public ArraySizeExpressionTest(){
+		super("Remove Array Size Expression"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "int *values = new int[5][6];"; //$NON-NLS-1$
+		expectedSource = "int *values = new int[5];"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitExpressions = true;
+			}
+			
+			@Override
+			public int visit(IASTExpression expression) {
+				if (expression instanceof ICPPASTNewExpression) {
+					ICPPASTNewExpression newExpression = (ICPPASTNewExpression) expression;
+					IASTTypeId id= newExpression.getTypeId();
+					IASTArrayDeclarator dtor= (IASTArrayDeclarator) id.getAbstractDeclarator();
+					IASTArrayModifier[] mods= dtor.getArrayModifiers();
+					ASTModification modification = new ASTModification(ASTModification.ModificationKind.REPLACE, mods[1], null, null);
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+		
+	public static Test suite() {
+		return new ArraySizeExpressionTest();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/CtorChainInitializerTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/CtorChainInitializerTest.java
new file mode 100644
index 0000000..1b6846d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/CtorChainInitializerTest.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorChainInitializer;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class CtorChainInitializerTest extends ChangeGeneratorTest {
+
+	public CtorChainInitializerTest(){
+		super("Remove Ctor Initializer"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "TestClass::TestClass(int a):alpha(a){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "TestClass::TestClass(int a){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {
+		return new CtorChainInitializerTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					ICPPASTConstructorChainInitializer[] ctorInitializers = functionDeclarator.getConstructorChain();
+					for(ICPPASTConstructorChainInitializer curInitializer : ctorInitializers){		
+							ASTModification modification = new ASTModification(ModificationKind.REPLACE, curInitializer, null, null);
+							modStore.storeModification(null, modification);
+					}
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/DeclarationTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/DeclarationTest.java
new file mode 100644
index 0000000..c09c553
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/DeclarationTest.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclaration;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+
+
+public class DeclarationTest extends ChangeGeneratorTest {
+
+	public DeclarationTest(){
+		super("Remove Declaration Node"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "#ifndef A_H_\n#define A_H_\n\nclass A {\n\nprivate:\n	int b;\n	int c;\n};\n\n#endif /*A_H_*/\n\n"; //$NON-NLS-1$
+		expectedSource = "#ifndef A_H_\n#define A_H_\n\nclass A {\n\nprivate:\n	int b;\n};\n\n#endif /*A_H_*/\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {
+		
+		return new DeclarationTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarations = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclaration declaration) {
+				if (declaration instanceof CPPASTSimpleDeclaration) {
+					CPPASTSimpleDeclaration simpleDeclaration = (CPPASTSimpleDeclaration) declaration;
+					if(simpleDeclaration.getDeclarators().length > 0){
+						String name = String.valueOf(simpleDeclaration.getDeclarators()[0].getName().toCharArray());
+						if(name.equals("c")){ //$NON-NLS-1$
+							ASTModification modification = new ASTModification(ASTModification.ModificationKind.REPLACE, declaration, null, null);
+							modStore.storeModification(null, modification);
+						}
+					}
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/ExceptionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/ExceptionTest.java
new file mode 100644
index 0000000..aa0d6f0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/ExceptionTest.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class ExceptionTest extends ChangeGeneratorTest {
+
+	public ExceptionTest(){
+		super("Remove Exception Declaration"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int parameter) throw (int){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int parameter) throw (){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {
+		return new ExceptionTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					IASTTypeId[] exceptions = functionDeclarator.getExceptionSpecification();
+					for(IASTTypeId curException : exceptions){		
+							ASTModification modification = new ASTModification(ModificationKind.REPLACE, curException, null, null);
+							modStore.storeModification(null, modification);
+					}
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/ExpressionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/ExpressionTest.java
new file mode 100644
index 0000000..9283ca3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/ExpressionTest.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionList;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+
+
+public class ExpressionTest extends ChangeGeneratorTest {
+
+	public ExpressionTest(){
+		super("Remove Expression"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void main(){int s = 0, c = 0, h = 0;\ns = 3, c = 4, h = 5;}"; //$NON-NLS-1$
+		expectedSource = "void main(){int s = 0, c = 0, h = 0;\ns = 3, h = 5;}"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {
+		return new ExpressionTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitExpressions = true;
+			}
+			
+			@Override
+			public int visit(IASTExpression expression) {
+				if (expression instanceof IASTExpressionList) {
+					IASTExpressionList expressionList = (IASTExpressionList) expression;
+					IASTExpression[] expressions = expressionList.getExpressions();
+					ASTModification modification = new ASTModification(ASTModification.ModificationKind.REPLACE, expressions[1], null, null);
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/FirstParameterTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/FirstParameterTest.java
new file mode 100644
index 0000000..ac28054
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/FirstParameterTest.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+
+
+
+
+public class FirstParameterTest extends ChangeGeneratorTest {
+
+	public FirstParameterTest(){
+		super("Remove First Parameter Node"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int a, int b, int c){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int b, int c){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {
+		return new FirstParameterTest();
+		
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					IASTParameterDeclaration[] parameters = functionDeclarator.getParameters();
+					for(IASTParameterDeclaration curParam : parameters){
+						if(String.valueOf(curParam.getDeclarator().getName().toCharArray()).equals("a")){ //$NON-NLS-1$
+							ASTModification modification = new ASTModification(ModificationKind.REPLACE, curParam, null, null);
+							modStore.storeModification(null, modification);
+						}
+					}
+				}
+				return PROCESS_CONTINUE;
+			}
+			
+		};
+	}
+	
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/LastParameterTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/LastParameterTest.java
new file mode 100644
index 0000000..bd900c9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/LastParameterTest.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+
+
+public class LastParameterTest extends ChangeGeneratorTest {
+
+	public LastParameterTest(){
+		super("Remove Last Parameter Node"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int a, int b, int c){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int a, int b){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {
+		return new LastParameterTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					IASTParameterDeclaration[] parameters = functionDeclarator.getParameters();
+					for(IASTParameterDeclaration curParam : parameters){
+						if(String.valueOf(curParam.getDeclarator().getName().toCharArray()).equals("c")){ //$NON-NLS-1$
+							ASTModification modification = new ASTModification(ModificationKind.REPLACE, curParam, null, null);
+							modStore.storeModification(null, modification);
+						}
+					}
+				}
+
+
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/MiddleParameterTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/MiddleParameterTest.java
new file mode 100644
index 0000000..80d23a3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/MiddleParameterTest.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+
+
+
+
+public class MiddleParameterTest extends ChangeGeneratorTest {
+
+	public MiddleParameterTest(){
+		super("Remove Middle Parameter Node"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int a, int b, int c){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int a, int c){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+
+	public static Test suite() {
+		return new MiddleParameterTest();
+	}
+
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					IASTParameterDeclaration[] parameters = functionDeclarator.getParameters();
+					for(IASTParameterDeclaration curParam : parameters){
+						if(String.valueOf(curParam.getDeclarator().getName().toCharArray()).equals("b")){ //$NON-NLS-1$
+							ASTModification modification = new ASTModification(ModificationKind.REPLACE, curParam, null, null);
+							modStore.storeModification(null, modification);
+						}
+					}
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/NewInitializerExpressionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/NewInitializerExpressionTest.java
new file mode 100644
index 0000000..5b37499
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/NewInitializerExpressionTest.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNewExpression;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+
+
+public class NewInitializerExpressionTest extends ChangeGeneratorTest {
+
+	public NewInitializerExpressionTest(){
+		super("Remove New Initializer Expression"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public void setUp() throws Exception{
+		source = "int *value = new int(5);"; //$NON-NLS-1$
+		expectedSource = "int *value = new int();"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitExpressions = true;
+			}
+			
+			@Override
+			public int visit(IASTExpression expression) {
+				if (expression instanceof ICPPASTNewExpression) {
+					ICPPASTNewExpression newExpression = (ICPPASTNewExpression) expression;
+					ASTModification modification = new ASTModification(ASTModification.ModificationKind.REPLACE, newExpression.getNewInitializer(), null, null);
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	public static Test suite() {
+		return new NewInitializerExpressionTest();
+		
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/PointerInParameterTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/PointerInParameterTest.java
new file mode 100644
index 0000000..4ba51c1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/PointerInParameterTest.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class PointerInParameterTest extends ChangeGeneratorTest {
+
+	public PointerInParameterTest(){
+		super("Remove Pointer in Parameter"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int *parameter){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int parameter){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+
+	public static Test suite() {
+		return new PointerInParameterTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					IASTParameterDeclaration[] parameters = functionDeclarator.getParameters();
+					for(IASTParameterDeclaration curParam : parameters){
+						if(String.valueOf(curParam.getDeclarator().getName().toCharArray()).equals("parameter")){ //$NON-NLS-1$
+							IASTPointerOperator pointer = curParam.getDeclarator().getPointerOperators()[0];
+							ASTModification modification = new ASTModification(ModificationKind.REPLACE, pointer, null, null);
+							modStore.storeModification(null, modification);
+						}
+					}
+				}
+
+
+				return PROCESS_CONTINUE;
+			}
+			
+		};
+	}
+	
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/RemoveTestSuite.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/RemoveTestSuite.java
new file mode 100644
index 0000000..be547e4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/RemoveTestSuite.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Thomas Corbat
+ *
+ */
+public class RemoveTestSuite{
+
+	public static Test suite() throws Exception {
+		TestSuite suite = new TestSuite("Changegenerator Remove Tests");
+
+		suite.addTest(DeclarationTest.suite());
+		suite.addTest(FirstParameterTest.suite());
+		suite.addTest(MiddleParameterTest.suite());
+		suite.addTest(LastParameterTest.suite());
+		suite.addTest(SingleParameterTest.suite());
+		suite.addTest(PointerInParameterTest.suite());
+		suite.addTest(ExceptionTest.suite());
+		suite.addTest(CtorChainInitializerTest.suite());
+		suite.addTest(ArrayModifierTest.suite());
+		suite.addTest(ExpressionTest.suite());
+		suite.addTest(ArraySizeExpressionTest.suite());
+		suite.addTest(NewInitializerExpressionTest.suite());
+		suite.addTest(StatementTest.suite());
+				
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/SingleParameterTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/SingleParameterTest.java
new file mode 100644
index 0000000..1cd12f3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/SingleParameterTest.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class SingleParameterTest extends ChangeGeneratorTest {
+
+	public SingleParameterTest(){
+		super("Remove The Only Parameter Node"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int parameter){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+
+	public static Test suite() {
+		return new SingleParameterTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					IASTParameterDeclaration[] parameters = functionDeclarator.getParameters();
+					for(IASTParameterDeclaration curParam : parameters){
+						if(String.valueOf(curParam.getDeclarator().getName().toCharArray()).equals("parameter")){ //$NON-NLS-1$
+							ASTModification modification = new ASTModification(ModificationKind.REPLACE, curParam, null, null);
+							modStore.storeModification(null, modification);
+						}
+					}
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/StatementTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/StatementTest.java
new file mode 100644
index 0000000..4aeea89
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/remove/StatementTest.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.remove;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTIfStatement;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+
+
+public class StatementTest extends ChangeGeneratorTest {
+
+	public StatementTest(){
+		super("Remove Then-Statement"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "int f()\r\n{\r\n\tint i = 0;\r\n\tif(i < 1){\r\n\t\t++i;\r\n\t}\r\n}\r\n"; //$NON-NLS-1$
+		expectedSource = "int f()\r\n{\r\n\tint i = 0;\r\n}\r\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {		
+		return new StatementTest();
+	}
+
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitStatements = true;
+			}
+			
+			@Override
+			public int visit(IASTStatement statement) {
+				if (statement instanceof IASTIfStatement) {
+					IASTIfStatement ifStatement = (IASTIfStatement) statement;
+
+					ASTModification modification = new ASTModification(ASTModification.ModificationKind.REPLACE, ifStatement, null, null);
+					modStore.storeModification(null, modification);
+				}
+
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ArrayModifierTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ArrayModifierTest.java
new file mode 100644
index 0000000..a75f7ce
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ArrayModifierTest.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTArrayModifier;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTLiteralExpression;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class ArrayModifierTest extends ChangeGeneratorTest {
+
+	public ArrayModifierTest(){
+		super("Replace Array Modifier"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "int *pi[3];"; //$NON-NLS-1$
+		expectedSource = "int *pi[15];"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {
+		return new ArrayModifierTest();
+	}
+
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof IASTArrayDeclarator) {
+					IASTArrayDeclarator arrayDeclarator = (IASTArrayDeclarator)declarator;
+					IASTArrayModifier[] modifiers = arrayDeclarator.getArrayModifiers();
+					IASTArrayModifier newModifier = new CPPASTArrayModifier();
+					IASTExpression expr = new CPPASTLiteralExpression(0, "15"); //$NON-NLS-1$
+					newModifier.setConstantExpression(expr);
+					ASTModification modification = new ASTModification(ModificationKind.REPLACE, modifiers[0], newModifier, null);
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ArraySizeExpressionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ArraySizeExpressionTest.java
new file mode 100644
index 0000000..b4f8b84
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ArraySizeExpressionTest.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNewExpression;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTLiteralExpression;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+
+
+public class ArraySizeExpressionTest extends ChangeGeneratorTest {
+
+	public ArraySizeExpressionTest(){
+		super("Relpace Array Size Expression"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "int *values = new int[5][6];"; //$NON-NLS-1$
+		expectedSource = "int *values = new int[5][7];"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {		
+		return new ArraySizeExpressionTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitExpressions = true;
+			}
+			
+			@Override
+			public int visit(IASTExpression expression) {
+				if (expression instanceof ICPPASTNewExpression) {
+					ICPPASTNewExpression newExpression = (ICPPASTNewExpression) expression;
+					IASTTypeId id= newExpression.getTypeId();
+					IASTArrayDeclarator dtor= (IASTArrayDeclarator) id.getAbstractDeclarator();
+					IASTArrayModifier[] mods= dtor.getArrayModifiers();
+					IASTExpression expr= mods[1].getConstantExpression();
+					ASTModification modification = new ASTModification(ASTModification.ModificationKind.REPLACE, expr, new CPPASTLiteralExpression(0, "7"), null); //$NON-NLS-1$
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/CtorChainInitializerTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/CtorChainInitializerTest.java
new file mode 100644
index 0000000..8db4323
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/CtorChainInitializerTest.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorChainInitializer;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTConstructorChainInitializer;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTIdExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class CtorChainInitializerTest extends ChangeGeneratorTest {
+
+	public CtorChainInitializerTest(){
+		super("Replace Ctor Initializer"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "TestClass::TestClass(int a):beta(b){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "TestClass::TestClass(int a): alpha(a){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {
+		return new CtorChainInitializerTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					ICPPASTConstructorChainInitializer[] ctorInitializers = functionDeclarator.getConstructorChain();
+					for(ICPPASTConstructorChainInitializer curInitializer : ctorInitializers){		
+						CPPASTIdExpression initExpr = new CPPASTIdExpression(new CPPASTName("a".toCharArray())); //$NON-NLS-1$
+						CPPASTName initName = new CPPASTName("alpha".toCharArray()); //$NON-NLS-1$
+						ICPPASTConstructorChainInitializer newInitializer = new CPPASTConstructorChainInitializer(initName, initExpr);
+						ASTModification modification = new ASTModification(ModificationKind.REPLACE, curInitializer, newInitializer, null);
+						modStore.storeModification(null, modification);
+					}
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ExceptionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ExceptionTest.java
new file mode 100644
index 0000000..131fd1a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ExceptionTest.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTypeId;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class ExceptionTest extends ChangeGeneratorTest {
+
+
+	public ExceptionTest(){
+		super("Remove Exception Declaration"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int parameter) throw (float){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int parameter) throw (int){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+	public static Test suite() {
+		return new ExceptionTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					IASTTypeId existingException = functionDeclarator.getExceptionSpecification()[0];
+					
+					IASTTypeId exception = new CPPASTTypeId();
+					CPPASTDeclarator exceptionDeclarator = new CPPASTDeclarator();
+					exceptionDeclarator.setName(new CPPASTName());
+					CPPASTSimpleDeclSpecifier exDeclSpec = new CPPASTSimpleDeclSpecifier();
+					exDeclSpec.setType(IASTSimpleDeclSpecifier.t_int);
+					exception.setDeclSpecifier(exDeclSpec);
+					exception.setAbstractDeclarator(exceptionDeclarator);
+					ASTModification modification = new ASTModification(ModificationKind.REPLACE, existingException, exception, null);
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ExpressionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ExpressionTest.java
new file mode 100644
index 0000000..ddf4f69
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ExpressionTest.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionList;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTBinaryExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTIdExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTLiteralExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+
+
+public class ExpressionTest extends ChangeGeneratorTest {
+
+	public ExpressionTest(){
+		super("Replace Expression"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void main(){int s = 0, c = 0, h = 0;\ns = 3, c = 4, h = 5;}"; //$NON-NLS-1$
+		expectedSource = "void main(){int s = 0, c = 0, h = 0;\ns = 3, c = 9, h = 5;}"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {		
+		return new ExpressionTest();
+	}
+
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitExpressions = true;
+			}
+			
+			@Override
+			public int visit(IASTExpression expression) {
+				if (expression instanceof IASTExpressionList) {
+					IASTExpressionList expressionList = (IASTExpressionList) expression;
+					IASTExpression[] expressions = expressionList.getExpressions();
+					CPPASTBinaryExpression binEx = new CPPASTBinaryExpression(IASTBinaryExpression.op_assign, new CPPASTIdExpression(new CPPASTName("c".toCharArray())), new CPPASTLiteralExpression(0, "9")); //$NON-NLS-1$ //$NON-NLS-2$
+					ASTModification modification = new ASTModification(ASTModification.ModificationKind.REPLACE, expressions[1], binEx, null);
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/IdenticalTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/IdenticalTest.java
new file mode 100644
index 0000000..6b60c8d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/IdenticalTest.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+
+
+public class IdenticalTest extends ChangeGeneratorTest {
+
+	public IdenticalTest(){
+		super("Replace Node Same Node"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "#ifndef A_H_\n#define A_H_\n\nclass A {\n\nprivate:\n	int c;\n};\n\n#endif /*A_H_*/\n\n"; //$NON-NLS-1$
+		expectedSource = "#ifndef A_H_\n#define A_H_\n\nclass A {\n\nprivate:\n	int c;\n};\n\n#endif /*A_H_*/\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {
+		return new IdenticalTest();	
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				ASTModification modification = new ASTModification(ASTModification.ModificationKind.REPLACE, declarator.getName(), declarator.getName(), null);
+				modStore.storeModification(null, modification);
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/InitializerTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/InitializerTest.java
new file mode 100644
index 0000000..b7257f9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/InitializerTest.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTInitializer;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTInitializerExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTLiteralExpression;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class InitializerTest extends ChangeGeneratorTest {
+
+	public InitializerTest(){
+		super("Replace Initializer"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "int hs = 5;"; //$NON-NLS-1$
+		expectedSource = "int hs = 999;"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {
+		return new InitializerTest();
+	}
+
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTDeclarator) {
+					CPPASTDeclarator fieldDeclarator = (CPPASTDeclarator)declarator;
+					IASTInitializer initializer = fieldDeclarator.getInitializer();
+					
+					CPPASTLiteralExpression litEx = new CPPASTLiteralExpression(0, "999"); //$NON-NLS-1$
+					CPPASTInitializerExpression initExpr = new CPPASTInitializerExpression(litEx);
+					
+					ASTModification modification = new ASTModification(ModificationKind.REPLACE, initializer, initExpr, null);
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/MoveRenameTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/MoveRenameTest.java
new file mode 100644
index 0000000..44f497b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/MoveRenameTest.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTCompositeTypeSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclaration;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+
+
+public class MoveRenameTest extends ChangeGeneratorTest {
+
+	public MoveRenameTest(){
+		super("Swap Rename Declarations"); //$NON-NLS-1$
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		
+		source = "#ifndef A_H_\r\n#define A_H_\r\n\r\nclass A {\r\n\r\nprivate:\r\n    int b;\r\n    int a;\r\n};\r\n\r\n#endif /*A_H_*/\r\n\r\n"; //$NON-NLS-1$
+		expectedSource = "#ifndef A_H_\r\n#define A_H_\r\n\r\nclass A {\r\n\r\nprivate:\r\n    int d;\r\n    int b;\r\n};\r\n\r\n#endif /*A_H_*/\r\n\r\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+
+	public static Test suite() {
+		return new MoveRenameTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclSpecifiers = true;
+			}
+
+			@Override
+			public int visit(IASTDeclSpecifier declSpec) {
+				if (declSpec instanceof ICPPASTCompositeTypeSpecifier) {
+					CPPASTCompositeTypeSpecifier classSpecifier = (CPPASTCompositeTypeSpecifier) declSpec;
+					IASTDeclaration[] members = classSpecifier.getMembers();
+					ASTModification swap1 = new ASTModification(ASTModification.ModificationKind.REPLACE, members[1], members[2], null);
+					ASTModification swap2 = new ASTModification(ASTModification.ModificationKind.REPLACE, members[2], members[1], null);
+					IASTName name =((CPPASTSimpleDeclaration)members[2]).getDeclarators()[0].getName();
+					modStore.storeModification(null, swap1);
+					modStore.storeModification(null, swap2);
+					modStore.storeModification(swap1, new ASTModification(ASTModification.ModificationKind.REPLACE, name, new CPPASTName("d".toCharArray()), null)); //$NON-NLS-1$
+				}
+				return super.visit(declSpec);
+			}
+			
+		};
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/MoveTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/MoveTest.java
new file mode 100644
index 0000000..71104ae
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/MoveTest.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTCompositeTypeSpecifier;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+
+
+public class MoveTest extends ChangeGeneratorTest {
+
+	public MoveTest(){
+		super("Swap Declarations"); //$NON-NLS-1$
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		source = "#ifndef A_H_\r\n#define A_H_\r\n\r\nclass A {\r\n\r\nprivate:\r\n    int b;\r\n    int a;\r\n};\r\n\r\n#endif /*A_H_*/\r\n\r\n"; //$NON-NLS-1$
+		expectedSource = "#ifndef A_H_\r\n#define A_H_\r\n\r\nclass A {\r\n\r\nprivate:\r\n    int a;\r\n    int b;\r\n};\r\n\r\n#endif /*A_H_*/\r\n\r\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+	public static Test suite() {
+		return new MoveTest();
+		
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclSpecifiers = true;
+			}
+
+			@Override
+			public int visit(IASTDeclSpecifier declSpec) {
+				if (declSpec instanceof ICPPASTCompositeTypeSpecifier) {
+					CPPASTCompositeTypeSpecifier classSpecifier = (CPPASTCompositeTypeSpecifier) declSpec;
+					IASTDeclaration[] members = classSpecifier.getMembers();
+					ASTModification swap1 = new ASTModification(ASTModification.ModificationKind.REPLACE, members[1], members[2], null);
+					ASTModification swap2 = new ASTModification(ASTModification.ModificationKind.REPLACE, members[2], members[1], null);
+					modStore.storeModification(null, swap1);
+					modStore.storeModification(null, swap2);
+				}
+				return super.visit(declSpec);
+			}
+			
+		};
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/NameTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/NameTest.java
new file mode 100644
index 0000000..501e098
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/NameTest.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+
+
+public class NameTest extends ChangeGeneratorTest {
+
+
+	public NameTest(){
+		super("Replace Name Node"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "#ifndef A_H_\r\n#define A_H_\r\n\r\nclass A {\r\n\r\nprivate:\r\n	int c;\r\n};\r\n\r\n#endif /*A_H_*/\r\n\r\n"; //$NON-NLS-1$
+		expectedSource = "#ifndef A_H_\r\n#define A_H_\r\n\r\nclass A {\r\n\r\nprivate:\r\n	int b;\r\n};\r\n\r\n#endif /*A_H_*/\r\n\r\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {
+		return new NameTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				char[] newName = new char[]{'b'};
+				IASTName name = new CPPASTName(newName);
+				ASTModification modification = new ASTModification(ASTModification.ModificationKind.REPLACE, declarator.getName(), name, null);
+				modStore.storeModification(null, modification);					
+				return PROCESS_CONTINUE;
+			}
+			
+		};
+	}
+	
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/NewInitializerExpressionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/NewInitializerExpressionTest.java
new file mode 100644
index 0000000..323a588
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/NewInitializerExpressionTest.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNewExpression;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTLiteralExpression;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+
+
+public class NewInitializerExpressionTest extends ChangeGeneratorTest {
+
+	public NewInitializerExpressionTest(){
+		super("Replace New Initializer Expression"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "int *value = new int(5);"; //$NON-NLS-1$
+		expectedSource = "int *value = new int(6);"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {	
+		return new NewInitializerExpressionTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitExpressions = true;
+			}
+			
+			@Override
+			public int visit(IASTExpression expression) {
+				if (expression instanceof ICPPASTNewExpression) {
+					ICPPASTNewExpression newExpression = (ICPPASTNewExpression) expression;
+					ASTModification modification = new ASTModification(ASTModification.ModificationKind.REPLACE, newExpression.getNewInitializer(), new CPPASTLiteralExpression(0, "6"), null); //$NON-NLS-1$
+					modStore.storeModification(null, modification);
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+	
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/PointerInParameterTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/PointerInParameterTest.java
new file mode 100644
index 0000000..a11276a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/PointerInParameterTest.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTPointer;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind;
+
+public class PointerInParameterTest extends ChangeGeneratorTest {
+
+	public PointerInParameterTest(){
+		super("Replace Pointer for Parameter"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "void foo(int &parameter){\n}\n\n"; //$NON-NLS-1$
+		expectedSource = "void foo(int *parameter){\n}\n\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+	
+	public static Test suite() {
+		return new PointerInParameterTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				if (declarator instanceof CPPASTFunctionDeclarator) {
+					CPPASTFunctionDeclarator functionDeclarator = (CPPASTFunctionDeclarator)declarator;
+					IASTParameterDeclaration[] parameters = functionDeclarator.getParameters();
+					for(IASTParameterDeclaration curParam : parameters){
+						if(String.valueOf(curParam.getDeclarator().getName().toCharArray()).equals("parameter")){ //$NON-NLS-1$
+							IASTPointerOperator pointer = curParam.getDeclarator().getPointerOperators()[0];
+							CPPASTPointer newPointer = new CPPASTPointer();
+							ASTModification modification = new ASTModification(ModificationKind.REPLACE, pointer, newPointer, null);
+							modStore.storeModification(null, modification);
+						}
+					}
+				}
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ReplaceTestSuite.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ReplaceTestSuite.java
new file mode 100644
index 0000000..6c4f52b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ReplaceTestSuite.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Thomas Corbat
+ *
+ */
+public class ReplaceTestSuite{
+
+	public static Test suite() throws Exception {
+		TestSuite suite = new TestSuite("ChangegeneratorReplaceTests");
+	
+		suite.addTest(NameTest.suite());
+		suite.addTest(MoveTest.suite());
+		suite.addTest(MoveRenameTest.suite());
+		suite.addTest(SameNameTest.suite());
+		suite.addTest(IdenticalTest.suite());
+		suite.addTest(PointerInParameterTest.suite());
+		suite.addTest(ExceptionTest.suite());
+		suite.addTest(ArrayModifierTest.suite());
+		suite.addTest(InitializerTest.suite());
+		suite.addTest(ExpressionTest.suite());
+		suite.addTest(ArraySizeExpressionTest.suite());
+		suite.addTest(NewInitializerExpressionTest.suite());
+		suite.addTest(StatementTest.suite());
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/SameNameTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/SameNameTest.java
new file mode 100644
index 0000000..3d19b40
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/SameNameTest.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+
+
+public class SameNameTest extends ChangeGeneratorTest {
+
+	public SameNameTest(){
+		super("Replace Name Node Same Name"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+
+		source = "#ifndef A_H_\r\n#define A_H_\r\n\r\nclass A {\r\n\r\nprivate:\r\n	int c;\r\n};\r\n\r\n#endif /*A_H_*/\r\n\r\n"; //$NON-NLS-1$
+		expectedSource = "#ifndef A_H_\r\n#define A_H_\r\n\r\nclass A {\r\n\r\nprivate:\r\n	int c;\r\n};\r\n\r\n#endif /*A_H_*/\r\n\r\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {
+		return new SameNameTest();
+	}
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitDeclarators = true;
+			}
+			
+			@Override
+			public int visit(IASTDeclarator declarator) {
+				char[] newName = new char[]{'c'};
+				IASTName name = new CPPASTName(newName);
+				ASTModification modification = new ASTModification(ASTModification.ModificationKind.REPLACE, declarator.getName(), name, null);
+				modStore.storeModification(null, modification);
+				return PROCESS_CONTINUE;
+			}
+			
+		};
+	}
+	
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/StatementTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/StatementTest.java
new file mode 100644
index 0000000..4b552cb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/StatementTest.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IASTIfStatement;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTCompoundStatement;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTExpressionStatement;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTIdExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTUnaryExpression;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification;
+import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore;
+
+
+
+
+
+public class StatementTest extends ChangeGeneratorTest {
+
+	public StatementTest(){
+		super("Replace Then-Statement"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		source = "int f()\r\n{\r\n\tint i = 0;\r\n\tif(i < 1){\r\n\t\t++i;\r\n\t}\r\n}\r\n"; //$NON-NLS-1$
+		expectedSource = "int f()\r\n{\r\n\tint i = 0;\r\n\tif(i < 1){\r\n\t    i++;\r\n\t}\r\n}\r\n"; //$NON-NLS-1$
+		super.setUp();
+	}
+
+	public static Test suite() {		
+		return new StatementTest();
+	}
+
+
+	@Override
+	protected CPPASTVisitor createModificator(
+			final ASTModificationStore modStore) {
+		return new CPPASTVisitor() {
+			{
+				shouldVisitStatements = true;
+			}
+			
+			@Override
+			public int visit(IASTStatement statement) {
+				if (statement instanceof IASTIfStatement) {
+					IASTIfStatement ifStatement = (IASTIfStatement) statement;
+					CPPASTCompoundStatement compound = new CPPASTCompoundStatement();
+					
+					CPPASTExpressionStatement expr = new CPPASTExpressionStatement(new CPPASTUnaryExpression(IASTUnaryExpression.op_postFixIncr, new CPPASTIdExpression(new CPPASTName("i".toCharArray())))); //$NON-NLS-1$
+					compound.addStatement(expr);
+					ASTModification modification = new ASTModification(ASTModification.ModificationKind.REPLACE, ifStatement.getThenClause(), compound, null);
+					modStore.storeModification(null, modification);
+				}
+
+				return PROCESS_CONTINUE;
+			}
+		};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java
new file mode 100644
index 0000000..63ac04f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ * 
+ * Contributors: 
+ * Institute for Software - initial API and implementation 
+ ******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.comenthandler;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.TreeSet;
+import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ast.IASTComment;
+import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.parser.tests.rewrite.RewriteBaseTest;
+import org.eclipse.cdt.core.parser.tests.rewrite.TestSourceFile;
+import org.eclipse.cdt.internal.core.dom.rewrite.commenthandler.ASTCommenter;
+import org.eclipse.cdt.internal.core.dom.rewrite.commenthandler.NodeCommentMap;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * This test tests the behavoir of the class ASTCommenter. It checks if the ASTCommenter assigns the comments contained in an AST to the right ASTNodes.<br>
+ * The source for the CommentHandling tests is located at /resources/rewrite/CommentHandlingTestSource.rts.<br>
+ * This file contains the source code and the expected output for all the tests. Following a little example how such a test looks like:<br><br>
+ * 
+ * <code><pre>
+ * //!NameOfTheTest - will be used as JUnit test name
+ * //#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+ * //@NameOfASourceFile.h
+ * class myTestClass
+ * {
+ *  //myLeadingComment
+ *  void aMethod(); //myTrailingComment
+ *  //myFreestandingComment
+ *  //myFreestandingComment2
+ * };
+ * 
+ * //=
+ * =>leading
+ * void aMethod(); = //myLeadingComment
+ * 
+ * =>trailing
+ * void aMethod(); = //myTrailingComment
+ * 
+ * =>freestanding
+ * void aMethod(); = //myFreestandingComment , //myFreestandingComment2
+ * </pre></code>
+ * 
+ * The second line (//#org.eclipse.cdt...) indicates the test class (in this case this class).<br>
+ * The "//=" indicates the beginning of the expected test result.<br>
+ * The test result contains three sections (separated by "=>leading", "=>trailing" and "=>freestanding").<br>
+ * Each section contains the raw signature of the node to which a comment is assigned plus " = " and the comment. If there are several comments
+ * assigned to the same node they are concatenated with a " , ".
+ * 
+ * @author Guido Zgraggen IFS, Lukas Felber IFS
+ * 
+ */
+public class CommentHandlingTest extends RewriteBaseTest {
+
+	private static final String ANY_CHAR_REGEXP = "(.*)"; //$NON-NLS-1$
+	private static final String SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
+
+	private static final String LEADING_COMMENT_SEPARATOR = "=>leading"; //$NON-NLS-1$
+	private static final String TRAILING_COMMENT_SEPARATOR = "=>trailing"; //$NON-NLS-1$
+	private static final String FREESTANDING_COMMENT_SEPARATOR = "=>freestanding"; //$NON-NLS-1$
+
+	private static final String LEADING_COMMENT_TITLE = "<<<=== Leading Comment Test Section ===>>>"; //$NON-NLS-1$
+	private static final String TRAILING_COMMENT_TITLE = "<<<=== Trailing Comment Test Section ===>>>"; //$NON-NLS-1$
+	private static final String FREESTANDING_COMMENT_TITLE = "<<<=== Freestanding Comment Test Section ===>>>"; //$NON-NLS-1$
+	
+	public CommentHandlingTest(String name, Vector<TestSourceFile> files) {
+		super(name, files);
+	}
+
+	@Override
+	protected void runTest() throws Throwable {
+
+		if (fileMap.size() == 0) {
+			fail("No file for testing"); //$NON-NLS-1$
+		}
+		
+		for(String fileName : fileMap.keySet()) {
+			TestSourceFile file = fileMap.get(fileName);
+			NodeCommentMap nodeMap = ASTCommenter.getCommentedNodeMap(getUnit(fileName));
+			
+			StringBuilder expectedResultBuilder = buildExpectedResult(file);
+			StringBuilder actualResultBuilder = buildActualResult(nodeMap);
+			
+			assertEquals(expectedResultBuilder.toString(), actualResultBuilder.toString());
+		}
+	}
+
+	private StringBuilder buildExpectedResult(TestSourceFile file) {
+
+		Matcher matcher = Pattern.compile(CommentHandlingTest.getSeparatingRegexp(), Pattern.MULTILINE | Pattern.DOTALL).matcher(file.getExpectedSource());
+		if (!matcher.find()) {
+			fail("Missing expected section. Expected result code must be of the following format:\n\"=>leading\n...\n=>trailing\n...\n=>freestanding\""); //$NON-NLS-1$
+		}
+		StringBuilder expectedResultBuilder = new StringBuilder();
+		
+		String leadingResult = matcher.group(1);
+		String trailingResult = matcher.group(2);
+		String freestandingResult = matcher.group(3);
+		
+		appendLineTrimmed(expectedResultBuilder, LEADING_COMMENT_TITLE);
+		appendLineTrimmed(expectedResultBuilder, leadingResult);
+		appendLineTrimmed(expectedResultBuilder, TRAILING_COMMENT_TITLE);
+		appendLineTrimmed(expectedResultBuilder, trailingResult);
+		appendLineTrimmed(expectedResultBuilder, FREESTANDING_COMMENT_TITLE);
+		appendLineTrimmed(expectedResultBuilder, freestandingResult);
+
+		return expectedResultBuilder;
+	}
+
+	private StringBuilder buildActualResult(NodeCommentMap nodeMap) {
+		StringBuilder actualResultBuilder = new StringBuilder();
+		appendLineTrimmed(actualResultBuilder, LEADING_COMMENT_TITLE);
+		appendLineTrimmed(actualResultBuilder, getCommentMapResult(nodeMap.getLeadingMap()));
+		appendLineTrimmed(actualResultBuilder, TRAILING_COMMENT_TITLE);
+		appendLineTrimmed(actualResultBuilder, getCommentMapResult(nodeMap.getTrailingMap()));
+		appendLineTrimmed(actualResultBuilder, FREESTANDING_COMMENT_TITLE);
+		appendLineTrimmed(actualResultBuilder, getCommentMapResult(nodeMap.getFreestandingMap()));
+		return actualResultBuilder;
+	}
+
+	private String getCommentMapResult(HashMap<IASTNode, ArrayList<IASTComment>> map) {
+		TreeSet<IASTNode> keyTree = new TreeSet<IASTNode>(new NodeOffsetComparator());
+		keyTree.addAll(map.keySet());
+		StringBuilder output = new StringBuilder();
+		for (IASTNode actNode : keyTree) {
+			ArrayList<IASTComment> comments = map.get(actNode);
+
+			output.append(getSignature(actNode) + " = "); //$NON-NLS-1$
+			boolean first = true;
+			for (IASTComment actComment : comments) {
+				if (!first) {
+					output.append(" , "); //$NON-NLS-1$
+				}
+				output.append(actComment.getRawSignature());
+				first = false;
+			}
+			output.append(SEPARATOR);
+		}
+		return output.toString().trim();
+	}
+
+	private String getSignature(IASTNode actNode) {
+		if (actNode instanceof IASTCompositeTypeSpecifier) {
+			IASTCompositeTypeSpecifier comp = (IASTCompositeTypeSpecifier) actNode;
+			return comp.getName().toString();
+		} else if (actNode instanceof IASTEnumerationSpecifier) {
+			IASTEnumerationSpecifier comp = (IASTEnumerationSpecifier) actNode;
+			return comp.getName().toString();
+		}
+		return actNode.getRawSignature();
+	}
+
+	private static String getSeparatingRegexp() {
+		return LEADING_COMMENT_SEPARATOR + ANY_CHAR_REGEXP + TRAILING_COMMENT_SEPARATOR + ANY_CHAR_REGEXP + FREESTANDING_COMMENT_SEPARATOR + ANY_CHAR_REGEXP;
+	}
+	
+	private IASTTranslationUnit getUnit(String fileName) throws CoreException {
+		ITranslationUnit tu = (ITranslationUnit) CCorePlugin.getDefault().getCoreModel().create(project.getFile(fileName));
+		return tu.getAST();
+	}
+	
+	private final class NodeOffsetComparator implements Comparator<IASTNode> {
+		public int compare(IASTNode o1, IASTNode o2) {
+			int offDif = o1.getFileLocation().getNodeOffset() - o2.getFileLocation().getNodeOffset();
+			if (offDif == 0) {
+				return o1.getFileLocation().getNodeLength() - o2.getFileLocation().getNodeLength();
+			}
+			return offDif;
+		}
+	}
+	
+	private void appendLineTrimmed(StringBuilder builderToAppendTo, String line) {
+		builderToAppendTo.append(line.trim());
+		builderToAppendTo.append(SEPARATOR);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTestSuite.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTestSuite.java
new file mode 100644
index 0000000..0aa0ead
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTestSuite.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ * 
+ * Contributors: 
+ * Institute for Software - initial API and implementation 
+ ******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.comenthandler;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.parser.tests.rewrite.RewriteTester;
+
+/**
+ * @author Guido Zgraggen IFS
+ *
+ */
+public class CommentHandlingTestSuite extends TestSuite {
+	
+	public static Test suite() throws Exception {
+		TestSuite suite = new TestSuite(CommentHandlingTestSuite.class.getName());
+		
+		suite.addTest(RewriteTester.suite("CommentTests", "resources/rewrite/CommentHandlingTestSource.rts")); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		suite.addTestSuite(NodeCommentMapTest.class);
+		
+		return suite;
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/NodeCommentMapTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/NodeCommentMapTest.java
new file mode 100644
index 0000000..443417f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/NodeCommentMapTest.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ * 
+ * Contributors: 
+ * Institute for Software - initial API and implementation 
+ ******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.rewrite.comenthandler;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.dom.ast.IASTComment;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.rewrite.commenthandler.NodeCommentMap;
+
+/**
+ * @author Guido Zgraggen IFS
+ *
+ */
+public class NodeCommentMapTest extends TestCase {
+
+	private NodeCommentMap map;
+	
+	@Override
+	protected void setUp() throws Exception {
+		map = new NodeCommentMap();
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		map = null;
+	}
+	
+	public void testNoComment(){
+		ASTNode node = new CPPASTName();
+		
+		assertEquals(0, map.getLeadingCommentsForNode(node).size());
+		assertEquals(0, map.getTrailingCommentsForNode(node).size());
+		assertEquals(0, map.getFreestandingCommentsForNode(node).size());
+	}
+	
+	public void testOneComment(){
+		ASTNode node = new CPPASTName();
+		IASTComment comm1 = new Comment();
+		IASTComment comm2 = new Comment();
+		IASTComment comm3 = new Comment();
+		
+		
+		map.addLeadingCommentToNode(node, comm1);
+		map.addTrailingCommentToNode(node, comm2);
+		map.addFreestandingCommentToNode(node, comm3);
+		
+		assertEquals(1, map.getLeadingCommentsForNode(node).size());
+		assertEquals(1, map.getTrailingCommentsForNode(node).size());
+		assertEquals(1, map.getFreestandingCommentsForNode(node).size());
+
+		assertEquals(comm1, map.getLeadingCommentsForNode(node).get(0));
+		assertEquals(comm2, map.getTrailingCommentsForNode(node).get(0));
+		assertEquals(comm3, map.getFreestandingCommentsForNode(node).get(0));
+	}
+	
+	public void testTwoComment(){
+		ASTNode node = new CPPASTName();
+		IASTComment com1 = new Comment();
+		IASTComment com2 = new Comment();
+		
+		map.addLeadingCommentToNode(node, com1);
+		map.addLeadingCommentToNode(node, com2);
+		map.addTrailingCommentToNode(node, com1);
+		map.addTrailingCommentToNode(node, com2);
+		map.addFreestandingCommentToNode(node, com1);
+		map.addFreestandingCommentToNode(node, com2);
+		
+		assertEquals(2, map.getLeadingCommentsForNode(node).size());
+		assertEquals(2, map.getTrailingCommentsForNode(node).size());
+		assertEquals(2, map.getFreestandingCommentsForNode(node).size());
+
+		assertEquals(com1, map.getLeadingCommentsForNode(node).get(0));
+		assertEquals(com2, map.getLeadingCommentsForNode(node).get(1));
+		assertEquals(com1, map.getTrailingCommentsForNode(node).get(0));
+		assertEquals(com2, map.getTrailingCommentsForNode(node).get(1));
+		assertEquals(com1, map.getFreestandingCommentsForNode(node).get(0));
+		assertEquals(com2, map.getFreestandingCommentsForNode(node).get(1));
+	}
+	
+	
+	public void testCommentOnDifferentNodes(){
+		ASTNode node1 = new CPPASTName();
+		ASTNode node2 = new CPPASTName();
+		IASTComment com1 = new Comment();
+		IASTComment com2 = new Comment();
+		IASTComment com3 = new Comment();
+
+		map.addLeadingCommentToNode(node1, com1);
+		map.addLeadingCommentToNode(node2, com2);
+		map.addLeadingCommentToNode(node1, com3);
+		
+		map.addTrailingCommentToNode(node1, com1);
+		map.addTrailingCommentToNode(node2, com2);
+		map.addTrailingCommentToNode(node1, com3);
+		
+		map.addFreestandingCommentToNode(node1, com1);
+		map.addFreestandingCommentToNode(node2, com2);
+		map.addFreestandingCommentToNode(node1, com3);
+
+		assertEquals(2, map.getLeadingCommentsForNode(node1).size());
+		assertEquals(1, map.getLeadingCommentsForNode(node2).size());
+		assertEquals(2, map.getTrailingCommentsForNode(node1).size());
+		assertEquals(1, map.getTrailingCommentsForNode(node2).size());
+		assertEquals(2, map.getFreestandingCommentsForNode(node1).size());
+		assertEquals(1, map.getFreestandingCommentsForNode(node2).size());
+		
+		assertEquals(com1, map.getLeadingCommentsForNode(node1).get(0));
+		assertEquals(com2, map.getLeadingCommentsForNode(node2).get(0));
+		assertEquals(com3, map.getLeadingCommentsForNode(node1).get(1));
+		
+		assertEquals(com1, map.getTrailingCommentsForNode(node1).get(0));
+		assertEquals(com2, map.getTrailingCommentsForNode(node2).get(0));
+		assertEquals(com3, map.getTrailingCommentsForNode(node1).get(1));
+		
+		assertEquals(com1, map.getFreestandingCommentsForNode(node1).get(0));
+		assertEquals(com2, map.getFreestandingCommentsForNode(node2).get(0));
+		assertEquals(com3, map.getFreestandingCommentsForNode(node1).get(1));
+	}
+	
+	
+	//=== InternalComment class for testing 
+	private class Comment extends ASTNode implements IASTComment{
+		private char[] comment;
+		
+		public char[] getComment() {
+			return comment;
+		}
+		public void setComment(char[] comment) {
+			this.comment = comment;
+		}
+		//not used
+		public boolean isBlockComment() {return false;}
+		public IASTNode copy() {
+			return null;
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/ExpansionExplorerTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/ExpansionExplorerTests.java
new file mode 100644
index 0000000..f47e241
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/ExpansionExplorerTests.java
@@ -0,0 +1,361 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.scanner;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.parser.c.GCCScannerExtensionConfiguration;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.IToken;
+import org.eclipse.cdt.core.parser.NullLogService;
+import org.eclipse.cdt.core.parser.OffsetLimitReachedException;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.ScannerInfo;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.dom.NullCodeReaderFactory;
+import org.eclipse.cdt.internal.core.parser.scanner.CPreprocessor;
+import org.eclipse.cdt.internal.core.parser.scanner.MacroExpander;
+import org.eclipse.cdt.internal.core.parser.scanner.MacroExpansionTracker;
+import org.eclipse.text.edits.ReplaceEdit;
+
+
+public class ExpansionExplorerTests extends BaseTestCase {
+	
+	public static TestSuite suite() {
+		return suite(ExpansionExplorerTests.class);
+	}
+	
+	private void performTest(int steps) throws Exception {
+		StringBuffer[] bufs= TestSourceReader.getContentsForTest(
+				CTestPlugin.getDefault().getBundle(), "parser", getClass(), getName(), steps+2);
+		String[] input= new String[steps+2];
+		int i= -1;
+		for (StringBuffer buf : bufs) {
+			input[++i]= buf.toString().trim();
+		}
+		final MacroExpander expander= createExpander(input[0]);
+		final String original= input[1];
+		
+		verifyStepCount(expander, original, steps);
+
+		verifyStep(expander, original, Integer.MAX_VALUE, original, input[steps+1]);
+		for (i= 0; i < steps; i++) {
+			verifyStep(expander, original, i, input[i+1], input[i+2]);
+		}
+	}
+
+	private void verifyStepCount(MacroExpander expander, String original, int steps) {
+		MacroExpansionTracker tracker= new MacroExpansionTracker(Integer.MAX_VALUE);
+		expander.expand(original, tracker, "", 1, false);
+		assertEquals(steps, tracker.getStepCount());
+	}
+
+	private void verifyStep(MacroExpander expander, String original, int step, String expectedPre,
+			String expectedPost) {
+		MacroExpansionTracker tracker= new MacroExpansionTracker(step);
+		expander.expand(original, tracker, "", 1, false);
+		String pre = tracker.getCodeBeforeStep();
+		ReplaceEdit replacement = tracker.getReplacement();
+		assertNotNull(pre);
+		assertNotNull(replacement);
+		String post= apply(pre, replacement);
+		
+		assertEquals("incorrect value pre " + step, expectedPre, pre);
+		assertEquals("incorrect value post " + step, expectedPost, post);
+	}
+
+	private String apply(String pre, ReplaceEdit replacement) {
+		StringBuilder buf= new StringBuilder();
+		buf.append(pre, 0, replacement.getOffset());
+		buf.append(replacement.getText());
+		buf.append(pre, replacement.getExclusiveEnd(), pre.length());
+		return buf.toString();
+	}
+
+	private MacroExpander createExpander(final String macrodefs) throws OffsetLimitReachedException {
+		CPreprocessor cpp= new CPreprocessor(new CodeReader(macrodefs.toCharArray()),
+				new ScannerInfo(), ParserLanguage.C, new NullLogService(), 
+				GCCScannerExtensionConfiguration.getInstance(), NullCodeReaderFactory.getInstance());
+		int type;
+		do {
+			type= cpp.nextTokenRaw().getType();
+		} while (type != IToken.tEND_OF_INPUT);
+		return (MacroExpander) cpp.getAdapter(MacroExpander.class);
+	}
+	
+	// #define A
+	
+	// B
+	
+	// B
+	public void testNoOp() throws Exception {
+		performTest(0);
+	}
+	
+	// #define A B
+	
+	// A
+	
+	// B
+	public void testObject() throws Exception {
+		performTest(1);
+	}
+
+	// #define A A1
+	// #define A1 A2
+	// #define A2 A
+	
+	// A
+	
+	// A1
+	
+	// A2
+	
+	// A
+	public void testObjectChain() throws Exception {
+		performTest(3);
+	}
+
+	// #define A(x) B+x
+	
+	// A(c)
+	
+	// B+c
+	public void testFunction() throws Exception {
+		performTest(1);
+	}
+	
+
+	// #define A(x) x+x
+	// #define _t t
+	
+	// A(_t)
+	
+	// A(t)
+	
+	// t+t
+	public void testFunctionParam() throws Exception {
+		performTest(2);
+	}
+
+	// #define A(x,y) x+y
+	// #define _t t
+	
+	// A(_t, _t)
+	
+	// A(t, _t)
+
+	// A(t, t)
+
+	// t+t
+	public void test2Params() throws Exception {
+		performTest(3);
+	}
+
+	// #define A(x,y,z) x + y + z
+	// #define _t t
+	
+	// A ( _t , , _t )
+	
+	// A ( t , , _t )
+
+	// A ( t , , t )
+
+	// t +  + t
+	public void test3Params() throws Exception {
+		performTest(3);
+	}
+	
+	// #define m !(m)+n 
+	// #define n(n) n(m)
+	
+	// m(m)
+	
+	// !(m)+n(m)
+	
+	// !(m)+n(!(m)+n)
+	
+	// !(m)+!(m)+n(m)
+	
+	// !(m)+!(m)+n(!(m)+n)
+    public void testRecursiveExpansion() throws Exception {
+    	performTest(4);
+    }
+
+    // #define f(x,y) (x + y)
+    // #define g(x,y) (x*y)
+    // #define _a a
+    // #define _b b
+    
+    // f( g(_a,_b), g(_b,_a) )
+
+    // f( g(a,_b), g(_b,_a) )
+
+    // f( g(a,b), g(_b,_a) )
+
+    // f( (a*b), g(_b,_a) )
+
+    // f( (a*b), g(b,_a) )
+
+    // f( (a*b), g(b,a) )
+    
+    // f( (a*b), (b*a) )
+
+    // ((a*b) + (b*a))
+    public void testNestedFunctions() throws Exception {
+    	performTest(7);
+    }
+    
+    // #define id(x) x
+    
+    // id(
+    //    id(a))
+    
+    // id(
+    //    a)
+    
+    // a
+    public void testNewline() throws Exception {
+    	performTest(2);
+    }
+    
+    // #define f x  _a  _b  x
+    // #define _a a
+    // #define _b b
+    
+    // f
+     
+    // x  _a  _b  x
+    
+    // x  a  _b  x
+    
+    // x  a  b  x
+    public void testSpace() throws Exception {
+    	performTest(3);
+    }
+    
+    // #define L __LINE__
+    // #define x(a) a
+    
+    // x(L)
+
+    // x(__LINE__)
+
+    // x(1)
+    
+    // 1
+    public void testLineNumber() throws Exception {
+    	performTest(3);
+    }
+    
+    // #define L __LINE__
+    // #define x(a,b) a,b
+    
+    // x(L,
+    //   L)
+
+    // x(__LINE__,
+    //   L)
+
+    // x(2,
+    //   L)
+
+    // x(2,
+    //   __LINE__)
+
+    // x(2,
+    //   2)
+    
+    // 2,2
+    public void testLineNumber2() throws Exception {
+    	performTest(5);
+    }
+
+    // #define str(x) #x
+    // #define xstr(x) str(x)
+    
+    // xstr(__LINE__)
+    
+    // xstr(1)
+    
+    // str(1)
+    
+    // "1"
+    public void testStringify() throws Exception {
+    	performTest(3);
+    }
+    
+    // #define vararg(x, y...) bla(x, y)
+    // #define _p p
+    
+    // vararg( _p );
+
+    // vararg( p );
+
+    // bla(p, );
+    public void testVararg1() throws Exception {
+    	performTest(2);
+    }
+
+    // #define vararg(x, y...) bla(x, ##y)
+    // #define _p p
+    
+    // vararg( _p );
+
+    // vararg( p );
+
+    // bla(p);
+    public void testVararg1x() throws Exception {
+    	performTest(2);
+    }
+
+    // #define vararg(x, y...) bla(x, y)
+    // #define _p p
+    
+    // vararg( _p , _p );
+
+    // vararg( p , _p );
+
+    // vararg( p , p );
+
+    // bla(p, p);
+    public void testVararg2() throws Exception {
+    	performTest(3);
+    }
+
+    // #define vararg(x, y...) bla(x,  ## y)
+    // #define _p p
+    
+    // vararg( _p , _p );
+
+    // vararg( p , _p );
+
+    // vararg( p , p );
+
+    // bla(p,  p);
+    public void testVararg2x() throws Exception {
+    	performTest(3);
+    }
+
+    // #define func2(x,y) (x,y)
+    // #define _p p
+    
+    // func2(_p);
+    
+    // func2(p);
+    
+    // (p,);
+    public void testTooFewArgs() throws Exception {
+    	performTest(2);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/FileCodeReaderFactory.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/FileCodeReaderFactory.java
new file mode 100644
index 0000000..4acf6ee
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/FileCodeReaderFactory.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.scanner;
+
+import org.eclipse.cdt.core.dom.ICodeReaderFactory;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.ICodeReaderCache;
+import org.eclipse.cdt.internal.core.dom.parser.EmptyCodeReaderCache;
+
+/**
+ * @author jcamelon
+ */
+public class FileCodeReaderFactory implements ICodeReaderFactory {
+
+    private static FileCodeReaderFactory instance;
+	private ICodeReaderCache cache = null;
+
+    private FileCodeReaderFactory(ICodeReaderCache cache)
+    {
+		this.cache = cache;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.dom.ICodeReaderFactory#getUniqueIdentifier()
+     */
+    public int getUniqueIdentifier() {
+        return 3;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.dom.ICodeReaderFactory#createCodeReaderForTranslationUnit(java.lang.String)
+     */
+    public CodeReader createCodeReaderForTranslationUnit(String path) {
+		return cache.get(path);
+	}
+
+    public CodeReader createCodeReaderForTranslationUnit(ITranslationUnit tu) {
+		return new CodeReader(tu.getPath().toOSString(), tu.getContents());
+    }
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.cdt.core.dom.ICodeReaderFactory#createCodeReaderForInclusion(org.eclipse.cdt.core.dom.ICodeReaderFactoryCallback, java.lang.String)
+     */
+    public CodeReader createCodeReaderForInclusion(String path) {
+		return cache.get(path);
+	}
+
+    /**
+     * @return
+     */
+    public static FileCodeReaderFactory getInstance() {
+        if( instance == null )
+            instance = new FileCodeReaderFactory(new EmptyCodeReaderCache());
+        return instance;
+    }
+
+	public ICodeReaderCache getCodeReaderCache() {
+		return cache;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/InactiveCodeTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/InactiveCodeTests.java
new file mode 100644
index 0000000..0c258e6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/InactiveCodeTests.java
@@ -0,0 +1,278 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.scanner;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.parser.IToken;
+
+
+/**
+ * Tests for using the preprocessor on inactive code
+ */
+public class InactiveCodeTests extends PreprocessorTestsBase {
+	
+	public static TestSuite suite() {
+		return suite(InactiveCodeTests.class);
+	}
+	
+	@Override
+	protected void initializeScanner() throws Exception {
+		super.initializeScanner();
+		fScanner.setProcessInactiveCode(true);
+	}
+	
+	private void validate(char[] activeInactive) throws Exception {
+		boolean active= true;
+		for (char c : activeInactive) {
+			switch(c) {
+			case 'a':
+				if (!active) {
+					validateToken(IToken.tINACTIVE_CODE_END);
+					active= true;
+				}
+				validateIdentifier("a");
+				break;
+			case 'i':
+				validateToken(active ? IToken.tINACTIVE_CODE_START : IToken.tINACTIVE_CODE_SEPARATOR);
+				active= false;
+				validateIdentifier("i");
+				break;
+			default:
+				fail();
+			}
+		}
+	}
+
+
+	// #define D
+	// #ifdef D
+	//   a
+	// #elif 1
+	//   i
+	// #elif 0
+	//   i
+	// #else
+	//   i
+	// #endif
+	// a
+	// #ifdef UD
+	//   i
+	// #elif 1
+	//   a
+	// #elif 0
+	//   i
+	// #else
+	//   i
+	// #endif
+	// a
+	// #ifdef UD
+	//   i
+	// #elif 0
+	//   i
+	// #elif 1
+	//   a
+	// #else
+	//   i
+	// #endif
+	// a
+	// #ifdef UD
+	//   i
+	// #elif 0
+	//   i
+	// #else
+	//   a
+	// #endif
+	public void testIfDef() throws Exception {
+		initializeScanner();
+		validate("aiiiaiaiiaiiaiaiia".toCharArray());
+		validateEOF();
+	}
+
+	// #define D
+	// #ifndef UD
+	//   a
+	// #elif 1
+	//   i
+	// #elif 0
+	//   i
+	// #else
+	//   i
+	// #endif
+	// a
+	// #ifndef D
+	//   i
+	// #elif 1
+	//   a
+	// #elif 0
+	//   i
+	// #else
+	//   i
+	// #endif
+	// a
+	// #ifndef D
+	//   i
+	// #elif 0
+	//   i
+	// #elif 1
+	//   a
+	// #else
+	//   i
+	// #endif
+	// a
+	// #ifndef D
+	//   i
+	// #elif 0
+	//   i
+	// #else
+	//   a
+	// #endif
+	public void testIfnDef() throws Exception {
+		initializeScanner();
+		validate("aiiiaiaiiaiiaiaiia".toCharArray());
+		validateEOF();
+	}
+	
+	// #if 1
+	//   a
+	// #elif 1
+	//   i
+	// #elif 0
+	//   i
+	// #else
+	//   i
+	// #endif
+	// a
+	// #if 0
+	//   i
+	// #elif 1
+	//   a
+	// #elif 0
+	//   i
+	// #else
+	//   i
+	// #endif
+	// a
+	// #if 0
+	//   i
+	// #elif 0
+	//   i
+	// #elif 1
+	//   a
+	// #else
+	//   i
+	// #endif
+	// a
+	// #if 0
+	//   i
+	// #elif 0
+	//   i
+	// #else
+	//   a
+	// #endif
+	public void testIf() throws Exception {
+		initializeScanner();
+		validate("aiiiaiaiiaiiaiaiia".toCharArray());
+		validateEOF();
+	}
+
+	// #if 0
+	//   i
+	//   #if 1
+	//     i
+	//   #elif 0
+	//     i
+	//   #else
+	//     i
+	//   #endif
+	//   i
+	// #endif
+	// a
+	// #if 0
+	//   i
+	//   #if 0
+	//     i
+	//   #elif 1
+	//     i
+	//   #else
+	//     i
+	//   #endif
+	//   i
+	// #endif
+	// a
+	// #if 0
+	//   i
+	//   #if 0
+	//     i
+	//   #elif 0
+	//     i
+	//   #else
+	//     i
+	//   #endif
+	//   i
+	// #endif
+	// a
+	public void testNestedInInactive() throws Exception {
+		initializeScanner();
+		validate("iiiiiaiiiiiaiiiiia".toCharArray());
+		validateEOF();
+	}
+	
+	// #if 0
+	//    i
+	//    #define M
+	// #endif
+	// a
+	// #ifdef M
+	//    i
+	// #endif
+	// a
+	public void testInactiveMacroDefinition() throws Exception {
+		initializeScanner();
+		validate("iaia".toCharArray());
+		validateEOF();
+		assertNull(fScanner.getMacroDefinitions().get("M"));
+	}
+	
+	//	#ifdef X
+	//	# if 0
+	//	# endif
+	//	#elif defined (Y)
+	//	#endif
+	public void testDefinedSyntax() throws Exception {
+		initializeScanner();
+		validateToken(IToken.tINACTIVE_CODE_START);
+		fScanner.skipInactiveCode();
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	//	"part1"
+	//	#ifdef SOME_OPTION
+	//	   "part2"
+	//	#else
+	//	   "part3"
+	//	#endif
+	//
+	//	"part4"
+	//	#ifndef SOME_OPTION
+	//	   "part5"
+	//	#else
+	//	   "part6"
+	//	#endif
+	public void testStringLiteralConcatenation_281745() throws Exception {
+		initializeScanner();
+		validateString("part1part3part4part5");
+		validateEOF();
+		validateProblemCount(0);
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/InclusionTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/InclusionTests.java
new file mode 100644
index 0000000..003dee2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/InclusionTests.java
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *    Sergey Prigogin (Google)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.scanner;
+
+import java.util.Collections;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.ExtendedScannerInfo;
+import org.eclipse.cdt.core.parser.IScannerInfo;
+import org.eclipse.cdt.core.parser.IToken;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.ParserMode;
+import org.eclipse.cdt.core.parser.ScannerInfo;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.pdom.indexer.PDOMNullIndexer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * Scanner2Tests ported to use the CPreprocessor
+ */
+public class InclusionTests extends PreprocessorTestsBase {
+    public static TestSuite suite() {
+		return suite(InclusionTests.class);
+	}
+
+	private ICProject fProject;
+
+	public InclusionTests() {
+		super();
+	}
+
+	public InclusionTests(String name) {
+		super(name);
+	}
+
+	protected void tearDown() throws Exception {
+		if (fProject != null) {
+			CProjectHelper.delete(fProject);
+			fProject= null;
+		}
+		super.tearDown();
+	}
+	
+	public final static int SIZEOF_TRUTHTABLE = 10;
+
+	private IFile importFile(String fileName, String contents ) throws Exception{
+    	if (fProject == null) {
+    		fProject= CProjectHelper.createCProject(getClass().getName(), null, PDOMNullIndexer.ID);
+    	}
+    	return TestSourceReader.createFile(fProject.getProject(), fileName, contents);
+	}
+
+    private IFolder importFolder(String name) throws Exception{
+    	if (fProject == null) {
+    		fProject= CProjectHelper.createCProject(getClass().getName(), null, PDOMNullIndexer.ID);
+    	}
+    	IFolder folder= fProject.getProject().getFolder(name);
+    	if (!folder.exists()) {
+    		folder.create(true, true, new NullProgressMonitor());
+    	}
+    	return folder;
+	}
+
+    public void testIncludeNext() throws Exception	{    	
+    	String baseFile = "int zero; \n#include \"foo.h\""; //$NON-NLS-1$
+    	String i1Next = "int one; \n#include_next <bar/foo.h>"; //$NON-NLS-1$
+    	String i2Next = "int two; \n#include_next \"bar/foo.h\""; //$NON-NLS-1$
+    	String i3Next = "int three; \n"; //$NON-NLS-1$
+
+    	IFolder one = importFolder("one"); //$NON-NLS-1$
+    	IFolder oneTwo = importFolder("one/two"); //$NON-NLS-1$
+    	IFolder oneTwoBar = importFolder("one/two/bar"); //$NON-NLS-1$
+    	IFolder oneThree = importFolder("one/three"); //$NON-NLS-1$
+    	IFolder oneThreeBar = importFolder("one/three/bar"); //$NON-NLS-1$
+    	IFile base = importFile("base.cpp", baseFile); //$NON-NLS-1$
+    	importFile("one/foo.h", i1Next); //$NON-NLS-1$
+    	importFile("one/two/bar/foo.h", i2Next); //$NON-NLS-1$
+    	importFile("one/three/bar/foo.h", i3Next); //$NON-NLS-1$
+    	
+    	String[] path = new String[3];
+    	path[0] = one.getLocation().toOSString();
+    	path[1] = oneTwo.getLocation().toOSString();
+    	path[2] = oneThree.getLocation().toOSString();
+    	
+    	IScannerInfo scannerInfo = new ExtendedScannerInfo(Collections.EMPTY_MAP, path, new String[]{}, null);
+    	CodeReader reader= new CodeReader(base.getLocation().toString());
+    	initializeScanner(reader, ParserLanguage.C, ParserMode.COMPLETE_PARSE, scannerInfo);
+
+    	validateToken(IToken.t_int);
+    	validateIdentifier("zero");
+    	validateToken(IToken.tSEMI);
+
+    	validateToken(IToken.t_int);
+    	validateIdentifier("one");
+    	validateToken(IToken.tSEMI);
+
+    	validateToken(IToken.t_int);
+    	validateIdentifier("two");
+    	validateToken(IToken.tSEMI);
+
+    	validateToken(IToken.t_int);
+    	validateIdentifier("three");
+    	validateToken(IToken.tSEMI);
+    	
+    	validateEOF();
+	}
+
+    public void testIncludePathOrdering() throws Exception
+	{    	
+    	// create directory structure:
+    	//  project/base.cpp
+    	//  project/foo.h
+    	//  project/two/foo.h
+    	//  project/three/foo.h
+    	
+    	// this test sets the include path to be two;three and include foo.h (we should see the contents of two/foo.h
+    	// then we change to three;two and we should see the contents of three/foo.h.
+    	
+    	String baseFile = "#include <foo.h>"; //$NON-NLS-1$
+    	String i1Next = "int one;\n"; //$NON-NLS-1$
+    	String i2Next = "int two;\n"; //$NON-NLS-1$
+    	String i3Next = "int three;\n"; //$NON-NLS-1$   	
+    	
+    	IFile base = importFile( "base.cpp", baseFile ); //$NON-NLS-1$
+    	importFile( "foo.h", i1Next ); //$NON-NLS-1$
+    	IFolder twof = importFolder("two"); //$NON-NLS-1$
+    	IFolder threef = importFolder("three"); //$NON-NLS-1$
+    	importFile( "two/foo.h", i2Next ); //$NON-NLS-1$
+    	importFile( "three/foo.h", i3Next ); //$NON-NLS-1$
+    	
+    	String [] path = new String[2];
+    	path[0] = twof.getLocation().toOSString();
+       	path[1] = threef.getLocation().toOSString();
+   	
+    	IScannerInfo scannerInfo = new ExtendedScannerInfo( Collections.EMPTY_MAP, path, new String[]{}, null );
+    	CodeReader reader= new CodeReader(base.getLocation().toString());
+    	initializeScanner(reader, ParserLanguage.C, ParserMode.COMPLETE_PARSE, scannerInfo);
+
+    	validateToken(IToken.t_int);
+    	validateIdentifier("two");
+    	validateToken(IToken.tSEMI);
+    	validateEOF();
+    	 	
+    	path[0] = threef.getLocation().toOSString();
+       	path[1] = twof.getLocation().toOSString();
+
+    	scannerInfo = new ExtendedScannerInfo( Collections.EMPTY_MAP, path, new String[]{}, null );
+    	initializeScanner(reader, ParserLanguage.C, ParserMode.COMPLETE_PARSE, scannerInfo);
+
+    	validateToken(IToken.t_int);
+    	validateIdentifier("three");
+    	validateToken(IToken.tSEMI);
+    	validateEOF();
+	}
+    
+    public void testBug91086() throws Exception {
+        IFile inclusion = importFile( "file.h", "#define FOUND 666\n" ); //$NON-NLS-1$ //$NON-NLS-2$
+        StringBuffer buffer = new StringBuffer( "#include \"" ); //$NON-NLS-1$
+        buffer.append( inclusion.getLocation().toOSString() );
+        buffer.append( "\"\n"); //$NON-NLS-1$
+        buffer.append( "int var = FOUND;\n"); //$NON-NLS-1$
+    	IFile base = importFile( "base.cpp", buffer.toString() ); //$NON-NLS-1$
+
+    	CodeReader reader= new CodeReader(base.getLocation().toString());
+    	ParserLanguage lang[]= {ParserLanguage.C, ParserLanguage.CPP};
+    	for (int i = 0; i < lang.length; i++) {
+    		initializeScanner(reader, lang[i], ParserMode.COMPLETE_PARSE, new ScannerInfo());
+    		validateToken(IToken.t_int);
+    		validateIdentifier("var");
+    		validateToken(IToken.tASSIGN);
+    		validateInteger("666");
+    		validateToken(IToken.tSEMI);
+    		validateEOF();
+        }
+    }
+    
+    public void testBug156990() throws Exception {
+        IFile inclusion = importFile( "file.h", "ok" ); 
+        StringBuffer buffer = new StringBuffer( "#include \"file.h\"" );
+    	IFile base = importFile( "base.cpp", buffer.toString() ); //$NON-NLS-1$
+
+    	CodeReader reader= new CodeReader(base.getLocation().toString());
+    	initializeScanner(reader, ParserLanguage.CPP, ParserMode.COMPLETE_PARSE, new ScannerInfo());
+    	validateIdentifier("ok");
+    	validateEOF();
+    }
+    
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/LexerTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/LexerTests.java
new file mode 100644
index 0000000..135c917
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/LexerTests.java
@@ -0,0 +1,709 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.scanner;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.parser.IGCCToken;
+import org.eclipse.cdt.core.parser.IProblem;
+import org.eclipse.cdt.core.parser.IToken;
+import org.eclipse.cdt.core.parser.tests.ast2.TestLexerLog;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.internal.core.parser.scanner.Lexer;
+import org.eclipse.cdt.internal.core.parser.scanner.Token;
+import org.eclipse.cdt.internal.core.parser.scanner.Lexer.LexerOptions;
+
+
+public class LexerTests extends BaseTestCase {
+	private static final LexerOptions DEFAULT_OPTIONS = new LexerOptions();
+	private static final LexerOptions NO_DOLLAR = new LexerOptions();
+	private static final LexerOptions NO_MINMAX = new LexerOptions();
+	private static final LexerOptions SLASH_PERCENT = new LexerOptions();
+	static {
+		NO_DOLLAR.fSupportDollarInIdentifiers= false;
+		NO_MINMAX.fSupportMinAndMax= false;
+		SLASH_PERCENT.fSupportSlashPercentComments= true;
+	}
+	
+	static String TRIGRAPH_REPLACES_CHARS= "#^[]|{}~\\";
+	static String TRIGRAPH_CHARS= "='()!<>-/";
+
+	public static TestSuite suite() {
+		return suite(LexerTests.class);
+	}
+
+	private Lexer fLexer;
+	private TestLexerLog fLog= new TestLexerLog();
+	private int fLastEndOffset;
+
+	public LexerTests() {
+		super();
+	}
+
+	public LexerTests(String name) {
+		super(name);
+	}
+
+	private void init(String input) throws Exception {
+		init(input, DEFAULT_OPTIONS);
+	}
+
+	private void init(String input, LexerOptions options) throws Exception {
+		fLog.clear();
+		fLexer= new Lexer(input.toCharArray(), options, fLog, null);
+		fLog.setInput(input);
+		fLexer.nextToken();
+		fLastEndOffset= 0;
+	}
+
+	private void token(int tokenType) throws Exception {
+		token(tokenType, null);
+	}
+	
+	private void token(int tokenType, String image) throws Exception {
+		Token t= fLexer.currentToken();
+		assertEquals(tokenType, t.getType());
+		assertEquals(fLastEndOffset, t.getOffset());
+		fLastEndOffset= t.getEndOffset();
+		if (image != null) {
+			assertEquals(image, new String(t.getCharImage()));
+		}
+		fLexer.nextToken();
+	}
+	
+	private void integer(String expectedImage) throws Exception {
+		token(IToken.tINTEGER, expectedImage);
+	}
+
+	private void floating(String expectedImage) throws Exception {
+		token(IToken.tFLOATINGPT, expectedImage);
+	}
+
+	private void id(String expectedImage) throws Exception {
+		token(IToken.tIDENTIFIER, expectedImage);
+	}
+
+	private void str(String expectedImage) throws Exception {
+		token(IToken.tSTRING, "\"" + expectedImage + "\"");
+	}
+
+	private void wstr(String expectedImage) throws Exception {
+		token(IToken.tLSTRING, "L\"" + expectedImage + "\"");
+	}
+
+	private void utf16str(String expectedImage) throws Exception {
+		token(IToken.tUTF16STRING, "u\"" + expectedImage + "\"");
+	}
+	
+	private void utf32str(String expectedImage) throws Exception {
+		token(IToken.tUTF32STRING, "U\"" + expectedImage + "\"");
+	}
+	
+	private void ch(String expectedImage) throws Exception {
+		token(IToken.tCHAR, expectedImage);
+	}
+
+	private void wch(String expectedImage) throws Exception {
+		token(IToken.tLCHAR, expectedImage);
+	}
+	
+	private void utf16ch(String expectedImage) throws Exception {
+		token(IToken.tUTF16CHAR, expectedImage);
+	}
+	
+	private void utf32ch(String expectedImage) throws Exception {
+		token(IToken.tUTF32CHAR, expectedImage);
+	}
+
+	private void eof() throws Exception {
+		IToken t= fLexer.nextToken();
+		assertEquals("superfluous token " + t, IToken.tEND_OF_INPUT, t.getType());
+		assertEquals(0, fLog.getProblemCount());
+		assertEquals(0, fLog.getCommentCount());
+	}
+	
+	private void nl() throws Exception {
+		token(Lexer.tNEWLINE);
+	}
+
+	private void ws() throws Exception {
+		int offset= fLexer.currentToken().getOffset();
+		assertTrue(offset > fLastEndOffset);
+		fLastEndOffset= offset;
+	}
+
+	private void problem(int kind, String img) throws Exception {
+		assertEquals(fLog.createString(kind, img), fLog.removeFirstProblem());
+	}
+
+	private void comment(String img) throws Exception {
+		ws();
+		assertEquals(img, fLog.removeFirstComment());
+	}
+
+	public void testTrigraphSequences() throws Exception {
+		init("\"??=??/??'??(??)??!??<??>??-\"");
+		str("#\\^[]|{}~");
+		eof();
+		
+		init("??=??'??(??)??!??<??>??-");
+		token(IToken.tPOUND);
+		token(IToken.tXOR);
+		token(IToken.tLBRACKET);
+		token(IToken.tRBRACKET);
+		token(IToken.tBITOR);
+		token(IToken.tLBRACE);
+		token(IToken.tRBRACE);
+		token(IToken.tBITCOMPLEMENT);
+		eof();
+		
+		init("a??/\nb");
+		id("ab");
+		eof();
+	}
+	
+	public void testWindowsLineEnding() throws Exception {
+		init("\n\n");
+		nl(); nl(); eof();
+		init("\r\n\r\n");
+		nl(); nl(); eof();
+	}
+	
+	public void testLineSplicingTrigraph() throws Exception {
+		// a trigraph cannot be spliced
+		init("??\\\n="); 
+		token(IToken.tQUESTION);
+		token(IToken.tQUESTION);
+		token(IToken.tASSIGN);
+		eof();
+
+		init("??\\\r\n="); 
+		token(IToken.tQUESTION);
+		token(IToken.tQUESTION);
+		token(IToken.tASSIGN);
+		eof();
+		
+		// trigraph can be used to splice a line
+		init("a??/\nb");
+		id("ab");
+		eof();
+	}
+		
+	public void testLineSplicingStringLiteral() throws Exception {
+		// splicing in string literal
+		init("\"a\\\nb\""); 
+		str("ab"); 
+		eof();
+
+		init("\"a\\\r\nb\"");
+		str("ab"); 
+		eof();
+	}
+
+	public void testLineSplicingCharLiteral() throws Exception {
+		init("'a\\\nb'"); 
+		ch("'ab'"); 
+		eof();
+
+		init("'a\\\r\nb'");
+		ch("'ab'"); 
+		eof();
+	}
+
+	public void testLineSplicingHeaderName() throws Exception {
+		init("p\"a\\\nb\""); 
+		fLexer.setInsideIncludeDirective(true);
+		id("p");
+		token(Lexer.tQUOTE_HEADER_NAME, "\"ab\""); 
+		eof();
+
+		init("p\"a\\\r\nb\"");
+		fLexer.setInsideIncludeDirective(true);
+		id("p");
+		token(Lexer.tQUOTE_HEADER_NAME, "\"ab\""); 
+		eof();
+
+		init("p<a\\\nb>"); 
+		fLexer.setInsideIncludeDirective(true);
+		id("p");
+		token(Lexer.tSYSTEM_HEADER_NAME, "<ab>"); 
+		eof();
+
+		init("p<a\\\r\nb>");
+		fLexer.setInsideIncludeDirective(true);
+		id("p");
+		token(Lexer.tSYSTEM_HEADER_NAME, "<ab>"); 
+		eof();
+	}
+
+	public void testLineSplicingComment() throws Exception {
+		init("// a\\\nb\n");
+		comment("// a\\\nb");
+		nl();
+		eof();
+
+		init("// a\\\nb\n");
+		comment("// a\\\nb");
+		nl();
+		eof();
+
+		init("/\\\n\\\n/ ab\n");
+		comment("/\\\n\\\n/ ab");
+		nl();
+		eof();
+
+		init("/\\\n* a\\\nb*\\\n/");
+		comment("/\\\n* a\\\nb*\\\n/");
+		eof();
+	}
+
+	public void testLineSplicingIdentifier() throws Exception {
+		init("a\\\nb");
+		id("ab");
+		eof();
+
+		init("a\\\r\nb");
+		id("ab");
+		eof();
+	}
+
+	public void testLineSplicingNumber() throws Exception {
+		init(".\\\n1");
+		floating(".1");
+		eof();
+
+		init(".\\\r\n1");
+		floating(".1");
+		eof();
+	}
+
+	public void testComments() throws Exception {
+		init("// /*\na");
+		comment("// /*");
+		nl();
+		id("a");
+		eof();
+		
+		init("/* // /* \n xxx*/a");
+		comment("/* // /* \n xxx*/");
+		id("a");
+		eof();
+	}
+
+	public void testSlashPercentComments() throws Exception {
+		init("// /%\na", SLASH_PERCENT);
+		comment("// /%");
+		nl();
+		id("a");
+		eof();
+		
+		init("/% // /% \n xxx%/a", SLASH_PERCENT);
+		comment("/% // /% \n xxx%/");
+		id("a");
+		eof();
+	}
+
+	public void testMinimalComment() throws Exception {
+		init("a/**/b/**/");
+		id("a");
+		comment("/**/");
+		id("b");
+		comment("/**/");
+		eof();
+		init("a//\nb//\r\nc");
+		id("a");
+		comment("//");
+		nl();
+		id("b");
+		comment("//");
+		nl();
+		id("c");
+		eof();
+	}
+
+	public void testHeaderName() throws Exception {
+		init("p\"'/*//\\\"");
+		fLexer.setInsideIncludeDirective(true);
+		id("p");
+		token(Lexer.tQUOTE_HEADER_NAME, "\"'/*//\\\"");
+		eof();
+
+		init("p<'\"/*//>");
+		fLexer.setInsideIncludeDirective(true);
+		id("p");
+		token(Lexer.tSYSTEM_HEADER_NAME, "<'\"/*//>");
+		eof();
+	}
+	
+	public void testIdentifier() throws Exception {
+		final String ident= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$\\u1234\\U123456780123456789";
+		int unc1= ident.indexOf('\\');
+		for (int i = 0; i <= unc1; i++) {
+			String id= ident.substring(i);
+			init(id); 
+			id(id);
+			eof();
+		}
+		String id= ident.substring(ident.indexOf('\\', unc1+1));
+		init(id); 
+		id(id);
+		eof();
+		
+		for (int i= 0; i <10; i++) {
+			String nonid= ident.substring(ident.length()-i-1);
+			init(nonid);
+			integer(nonid);
+			eof();
+		}
+		
+		init(ident, NO_DOLLAR); 
+		final int idxDollar = ident.indexOf('$');
+		id(ident.substring(0, idxDollar));
+		token(Lexer.tOTHER_CHARACTER, "$");
+		id(ident.substring(idxDollar+1));
+	}
+	
+	public void testNumber() throws Exception {
+		final String number= ".0123456789.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_" +
+			"\\uaaaa\\Uaaaaaaaae+e-E+E-";
+		for (int i = 0; i < 11; i++) {
+			String n= number.substring(i);
+			init(n); 
+			floating(n);
+			eof();
+		}
+		int idxPlus= number.indexOf('+');
+		for (int i = 11; i < number.length(); i++) {
+			String n= number.substring(i);
+			init(n);
+			int startString= 0;
+			if (i==11) {token(IToken.tDOT); startString=1;}
+			if (i<idxPlus) id(n.substring(startString, idxPlus-i));
+			if (i<idxPlus+1) token(IToken.tPLUS);
+			if (i<idxPlus+2) id("e");
+			if (i<idxPlus+3) token(IToken.tMINUS);
+			if (i<idxPlus+4) id("E");
+			if (i<idxPlus+5) token(IToken.tPLUS);
+			if (i<idxPlus+6) id("E");
+			token(IToken.tMINUS);
+			eof();
+		}
+	}
+	
+	public void testCharLiteral() throws Exception {
+		String lit= "'abc0123\\'\".:; \\\\'";
+		init(lit);
+		ch(lit);
+		eof();
+
+		String lit2= 'L'+lit;
+		init(lit2);
+		wch(lit2);
+		eof();
+		
+		lit2= 'u'+lit;
+		init(lit2);
+		utf16ch(lit2);
+		eof();
+		
+		lit2= 'U'+lit;
+		init(lit2);
+		utf32ch(lit2);
+		eof();
+
+		lit= "'ut\n";
+		init(lit);
+		problem(IProblem.SCANNER_BAD_CHARACTER, "'ut");
+		ch("'ut");
+		nl();
+		eof();
+
+		lit2= 'L'+lit;
+		init(lit2);
+		problem(IProblem.SCANNER_BAD_CHARACTER, "L'ut");
+		wch("L'ut");
+		nl();
+		eof();
+		
+		lit2= 'u'+lit;
+		init(lit2);
+		problem(IProblem.SCANNER_BAD_CHARACTER, "u'ut");
+		utf16ch("u'ut");
+		nl();
+		eof();
+		
+		lit2= 'U'+lit;
+		init(lit2);
+		problem(IProblem.SCANNER_BAD_CHARACTER, "U'ut");
+		utf32ch("U'ut");
+		nl();
+		eof();
+		
+		lit= "'ut\\'";
+		init(lit);
+		problem(IProblem.SCANNER_BAD_CHARACTER, lit);
+		ch("'ut\\'");
+		eof();
+
+		lit2= 'L'+lit;
+		init(lit2);
+		problem(IProblem.SCANNER_BAD_CHARACTER, lit2);
+		wch("L'ut\\'");
+		eof();
+		
+		lit2= 'u'+lit;
+		init(lit2);
+		problem(IProblem.SCANNER_BAD_CHARACTER, lit2);
+		utf16ch("u'ut\\'");
+		eof();
+		
+		lit2= 'U'+lit;
+		init(lit2);
+		problem(IProblem.SCANNER_BAD_CHARACTER, lit2);
+		utf32ch("U'ut\\'");
+		eof();
+	}
+
+	public void testStringLiteral() throws Exception {
+		String lit= "abc0123\\\"'.:; \\\\";
+		init('"' + lit + '"');
+		str(lit);
+		eof();
+
+		init("L\"" + lit + '"');
+		wstr(lit);
+		eof();
+		
+		init("u\"" + lit + '"');
+		utf16str(lit);
+		eof();
+		
+		init("U\"" + lit + '"');
+		utf32str(lit);
+		eof();
+
+		lit= "ut\n";
+		init('"' + lit);
+		problem(IProblem.SCANNER_UNBOUNDED_STRING, "\"ut");
+		token(IToken.tSTRING, "\"ut");
+		nl();
+		eof();
+
+		init("L\"" + lit);
+		problem(IProblem.SCANNER_UNBOUNDED_STRING, "L\"ut");
+		token(IToken.tLSTRING, "L\"ut");
+		nl();
+		eof();
+		
+		init("u\"" + lit);
+		problem(IProblem.SCANNER_UNBOUNDED_STRING, "u\"ut");
+		token(IToken.tUTF16STRING, "u\"ut");
+		nl();
+		eof();
+		
+		init("U\"" + lit);
+		problem(IProblem.SCANNER_UNBOUNDED_STRING, "U\"ut");
+		token(IToken.tUTF32STRING, "U\"ut");
+		nl();
+		eof();
+		
+		lit= "\"ut\\\"";
+		init(lit);
+		problem(IProblem.SCANNER_UNBOUNDED_STRING, lit);
+		token(IToken.tSTRING, "\"ut\\\"");
+		eof();
+
+		String lit2= 'L'+lit;
+		init(lit2);
+		problem(IProblem.SCANNER_UNBOUNDED_STRING, lit2);
+		token(IToken.tLSTRING, "L\"ut\\\"");
+		eof();
+		
+		lit2= 'u'+lit;
+		init(lit2);
+		problem(IProblem.SCANNER_UNBOUNDED_STRING, lit2);
+		token(IToken.tUTF16STRING, "u\"ut\\\"");
+		eof();
+		
+		lit2= 'U'+lit;
+		init(lit2);
+		problem(IProblem.SCANNER_UNBOUNDED_STRING, lit2);
+		token(IToken.tUTF32STRING, "U\"ut\\\"");
+		eof();
+	}
+
+	public void testOperatorAndPunctuators() throws Exception {
+		final String ops= "{}[]###()<::><%%>%:%:%:;:...?.::..*+-*/%^&|~=!<>+=-=*=/=%=" +
+		"^=&=|=<<>><<=>>===!=<=>=&&||++--,->*-><?>?\\";
+		final int[] tokens= new int[] {
+				IToken.tLBRACE, IToken.tRBRACE, IToken.tLBRACKET, IToken.tRBRACKET,	IToken.tPOUNDPOUND, 
+				IToken.tPOUND, IToken.tLPAREN, IToken.tRPAREN, IToken.tLBRACKET, IToken.tRBRACKET, 
+				IToken.tLBRACE, IToken.tRBRACE, IToken.tPOUNDPOUND, IToken.tPOUND, IToken.tSEMI, 
+				IToken.tCOLON, IToken.tELLIPSIS, IToken.tQUESTION, IToken.tDOT, IToken.tCOLONCOLON, IToken.tDOT,
+				IToken.tDOTSTAR, IToken.tPLUS, IToken.tMINUS, IToken.tSTAR, IToken.tDIV, IToken.tMOD,
+				IToken.tXOR, IToken.tAMPER, IToken.tBITOR, IToken.tBITCOMPLEMENT, IToken.tASSIGN, IToken.tNOT, 
+				IToken.tLT, IToken.tGT, IToken.tPLUSASSIGN, IToken.tMINUSASSIGN, IToken.tSTARASSIGN, 
+				IToken.tDIVASSIGN, IToken.tMODASSIGN, IToken.tXORASSIGN, IToken.tAMPERASSIGN, 
+				IToken.tBITORASSIGN, IToken.tSHIFTL, IToken.tSHIFTR, IToken.tSHIFTLASSIGN, 
+				IToken.tSHIFTRASSIGN, IToken.tEQUAL, IToken.tNOTEQUAL, IToken.tLTEQUAL, IToken.tGTEQUAL,
+				IToken.tAND, IToken.tOR, IToken.tINCR, IToken.tDECR, IToken.tCOMMA, IToken.tARROWSTAR,
+				IToken.tARROW, IGCCToken.tMIN, IGCCToken.tMAX, Lexer.tOTHER_CHARACTER,
+			};
+		
+		for (int splices=0; splices<9; splices++) {
+			for (int trigraphs= 0; trigraphs<6; trigraphs++) {
+				StringBuffer buf= new StringBuffer();
+				String input= useTrigraphs(ops.toCharArray(), trigraphs);
+				init(instertLineSplices(input, splices)); 
+				for (int i = 0; i < tokens.length; i++) {
+					Token token= fLexer.currentToken();
+					buf.append(token.getCharImage());
+					token(tokens[i]);
+				}
+				eof();
+				assertEquals(ops, buf.toString()); // check token image
+
+				init(input, NO_MINMAX); 
+				for (int i = 0; i < tokens.length; i++) {
+					switch (tokens[i]) {
+					case IGCCToken.tMIN:
+						token(IToken.tLT);
+						token(IToken.tQUESTION);
+						break;
+					case IGCCToken.tMAX:
+						token(IToken.tGT);
+						token(IToken.tQUESTION);
+						break;
+					default:
+						token(tokens[i]);
+					break;
+					}
+				}
+				eof();
+			}
+		}
+	}
+
+	private String instertLineSplices(String input, int splices) {
+		int m1= splices%3;
+		int m2= (splices-m1)/3;
+		char[] c= input.toCharArray();
+		StringBuffer result= new StringBuffer();
+		for (int i = 0; i < c.length; i++) {
+			result.append(c[i]);
+			if (c[i]=='?' && i+2 < c.length && c[i+1] == '?' && TRIGRAPH_CHARS.indexOf(c[i+2]) >= 0) {
+				result.append(c[++i]);
+				result.append(c[++i]);
+			}
+			switch(m1) {
+			case 1:
+				result.append("\\\n");
+				break;
+			case 2:
+				result.append("\\ \n");
+				break;
+			}
+			switch(m2) {
+			case 1:
+				result.append("\\\r\n");
+				break;
+			case 2:
+				result.append("\\\t\r\n");
+				break;
+			}
+		}
+		return result.toString();
+	}
+
+	private String useTrigraphs(char[] input, int mode) {
+		if (mode == 0) {
+			return new String(input);
+		}
+
+		boolean yes= mode > 1;
+		StringBuffer result= new StringBuffer();
+		for (int i = 0; i < input.length; i++) {
+			char c = input[i];
+			int idx= TRIGRAPH_REPLACES_CHARS.indexOf(c);
+			if (idx > 0) {
+				if (yes) {
+					result.append("??");
+					result.append(TRIGRAPH_CHARS.charAt(idx));
+				}
+				else {
+					result.append(c);
+				}
+				if (mode < 3) {
+					yes= !yes;
+				}
+			}
+			else {
+				result.append(c);
+			}
+		}
+		return result.toString();
+	}
+	
+	public void testLineSplicingOperator() throws Exception {
+		// splicing in operator
+		init("|\\\n|");
+		token(IToken.tOR);
+		eof();
+		
+		init("|\\\r\n|");
+		token(IToken.tOR); 
+		eof();
+	}
+	
+	public void testNextDirective() throws Exception {
+		init("#if \n /*\n#*/ \"#\" '#' \\\n# ??/\n# \n## \n#\\\n# \n#??/\n# \n#ok \r\n#");
+		token(IToken.tPOUND);
+		id("if");
+		fLexer.consumeLine(0);
+		assertEquals(Lexer.tNEWLINE, fLexer.currentToken().getType());
+		fLexer.nextDirective();
+		comment("/*\n#*/");
+		token(IToken.tPOUND);
+		id("ok");
+		fLexer.nextDirective();
+		ws();
+		token(IToken.tPOUND);
+		eof();
+
+		init("#if \n??=??= \n#??= \n??=# \n??=\\\n??= \n#\\\n??= \n??=\\\n# \n??=ok \n??=");
+		token(IToken.tPOUND);
+		id("if");
+		fLexer.consumeLine(0);
+		assertEquals(Lexer.tNEWLINE, fLexer.currentToken().getType());
+		fLexer.nextDirective();
+		ws();
+		token(IToken.tPOUND);
+		id("ok");
+		fLexer.nextDirective();
+		ws();
+		token(IToken.tPOUND);
+		eof();
+
+		init("#if \n%:%: \n%:\\\n%: \n%:??/\n%: \n%:ok \n%:");
+		token(IToken.tPOUND);
+		id("if");
+		fLexer.consumeLine(0);
+		assertEquals(Lexer.tNEWLINE, fLexer.currentToken().getType());
+		fLexer.nextDirective();
+		ws();
+		token(IToken.tPOUND);
+		id("ok");
+		fLexer.nextDirective();
+		ws();
+		token(IToken.tPOUND);
+		eof();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/LocationMapTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/LocationMapTests.java
new file mode 100644
index 0000000..ea9f47a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/LocationMapTests.java
@@ -0,0 +1,578 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.core.parser.tests.scanner;
+
+import java.io.IOException;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
+import org.eclipse.cdt.core.dom.ast.IASTComment;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionStyleMacroParameter;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNameOwner;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorElifStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorElseStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorEndifStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorErrorStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorFunctionStyleMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIfStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIfdefStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIfndefStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroExpansion;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorPragmaStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorUndefStatement;
+import org.eclipse.cdt.core.dom.ast.IASTProblem;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IMacroBinding;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit.IDependencyTree;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit.IDependencyTree.IASTInclusionNode;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.dom.Linkage;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTranslationUnit;
+import org.eclipse.cdt.internal.core.parser.scanner.ILocationCtx;
+import org.eclipse.cdt.internal.core.parser.scanner.ImageLocationInfo;
+import org.eclipse.cdt.internal.core.parser.scanner.LocationMap;
+import org.eclipse.cdt.internal.core.parser.scanner.Lexer.LexerOptions;
+
+public class LocationMapTests extends BaseTestCase {
+	public class Loc implements IASTFileLocation {
+		private String fFile;
+		private int fOffset;
+		private int fEndOffset;
+		public Loc(String file, int offset, int endOffset) {
+			fFile= file;
+			fOffset= offset;
+			fEndOffset= endOffset;
+		}
+		public int getEndingLineNumber() {
+			return 0;
+		}
+		public String getFileName() {
+			return fFile;
+		}
+		public int getNodeLength() {
+			return fEndOffset-fOffset;
+		}
+		public int getNodeOffset() {
+			return fOffset;
+		}
+		public int getStartingLineNumber() {
+			return 0;
+		}
+		public IASTFileLocation asFileLocation() {
+			return this;
+		}
+	}
+
+	private static final String FN = "filename";
+	private static final int ROLE_DEFINITION = IASTNameOwner.r_definition;
+	private static final int ROLE_UNCLEAR = IASTNameOwner.r_unclear;
+	private static final int ROLE_REFERENCE = IASTNameOwner.r_reference;
+	private static final ASTNodeProperty PROP_PST = IASTTranslationUnit.PREPROCESSOR_STATEMENT;
+	final static char[] DIGITS= "0123456789abcdef".toCharArray();
+	final static char[] LONGDIGITS= new char[1024];
+	static {
+		for (int i = 0; i < LONGDIGITS.length; i++) {
+			LONGDIGITS[i]= (char) i;
+		}
+	}
+	private LocationMap fLocationMap;
+	private CPPASTTranslationUnit fTu;
+
+	public static TestSuite suite() {
+		return suite(LocationMapTests.class);
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		fLocationMap= new LocationMap(new LexerOptions());
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		fLocationMap= null;
+		super.tearDown();
+	}
+
+	protected StringBuffer[] getContents(int sections) throws IOException {
+		return TestSourceReader.getContentsForTest(
+				CTestPlugin.getDefault().getBundle(), "parser", getClass(), getName(), sections);
+	}
+
+	private void init(char[] content) {
+		fLocationMap.pushTranslationUnit(FN, content);
+		fTu= new CPPASTTranslationUnit();
+		fTu.setLocationResolver(fLocationMap);
+	}
+
+	private void checkASTNode(IASTNode node, IASTNode parent, ASTNodeProperty property,
+			String filename, int offset, int length, int line, int endline, String sig) {
+		assertTrue(node.contains(node));
+		assertSame(parent, node.getParent());
+		assertEquals(property, node.getPropertyInParent());
+		assertSame(parent.getTranslationUnit(), node.getTranslationUnit());
+		assertEquals(filename, node.getContainingFilename());
+		
+		if (offset >= 0) {
+			IASTFileLocation loc= node.getFileLocation();
+			checkLocation(loc, filename, offset, length, line, endline);
+			assertEquals(sig, node.getRawSignature());
+		}
+		else {
+			assertNull(node.getFileLocation());
+		}
+	}
+	
+	private void checkName(IASTName name, IBinding binding, String nameString,
+			IASTNode parent, ASTNodeProperty property, int role, 
+			String filename, int offset, int length, int line, int endline, String sig) {
+		assertSame(binding, name.getBinding());
+		assertSame(binding, name.resolveBinding());
+		assertEquals(Linkage.CPP_LINKAGE, name.getLinkage());
+		assertEquals(nameString, name.toString());
+		checkASTNode(name, parent, property, filename, offset, length, line, endline, sig);
+		assertEquals(name.isDeclaration(), role == IASTNameOwner.r_declaration);
+		assertEquals(name.isDefinition(), role == ROLE_DEFINITION);
+		assertEquals(name.isReference(), role == IASTNameOwner.r_reference);
+	}
+	
+	private void checkLocation(IASTFileLocation loc, String filename, int offset, int length, int line, int endline) {
+		if (loc == null) {
+			assertEquals(0, offset);
+			assertEquals(0, length);
+		}
+		else {
+			assertEquals(filename, loc.getFileName());
+			assertEquals(offset, loc.getNodeOffset());
+			assertEquals(length, loc.getNodeLength());
+			assertEquals(line, loc.getStartingLineNumber());
+			assertEquals(endline, loc.getEndingLineNumber());
+		}
+	}
+	
+	private void checkComment(IASTComment comment, String content, boolean blockComment,  
+			String filename, int offset, int length, int line, int endline) {
+		assertEquals(content, new String(comment.getComment()));
+		assertEquals(blockComment, comment.isBlockComment());
+		checkASTNode(comment, fTu, PROP_PST, filename, offset, length, line, endline, content);
+		assertEquals(filename, comment.getContainingFilename());
+		assertEquals(content, new String(comment.getComment()));
+		assertEquals(blockComment, comment.isBlockComment());
+	}
+
+	private void checkProblem(IASTProblem problem, int id, String arg, String marked, 
+			String filename, int offset, int length, int line, int endline) {
+		assertEquals(id, problem.getID());
+		if (arg != null) {
+			assertEquals(arg, problem.getArguments()[0]);
+		}
+		assertFalse(problem.isError());
+		assertTrue(problem.isWarning());
+		checkASTNode(problem, fTu, IASTTranslationUnit.SCANNER_PROBLEM, filename, offset, length, line, endline, marked);
+	}
+
+	private void checkError(IASTPreprocessorStatement s, String directive, String condition,  
+			String filename, int offset, int length, int line) {
+		IASTPreprocessorErrorStatement st= (IASTPreprocessorErrorStatement) s;
+		assertEquals(condition, new String(st.getMessage()));
+		checkASTNode(st, fTu, PROP_PST, filename, offset, length, line, line, directive);
+	}
+
+	private void checkPragma(IASTPreprocessorStatement s, String directive, String condition, 
+			String filename, int offset, int length, int line) {
+		IASTPreprocessorPragmaStatement st= (IASTPreprocessorPragmaStatement) s;
+		assertEquals(condition, new String(st.getMessage()));
+		checkASTNode(st, fTu, PROP_PST, filename, offset, length, line, line, directive);
+	}
+
+	private void checkInclude(IASTPreprocessorIncludeStatement include, String directive,
+			String nameImage, String name, String fileTarget, boolean user, boolean active,
+			String filename, int offset, int length, int line, int nameOffset, int nameLength) {
+		assertEquals(fileTarget, include.getPath());
+		assertEquals(user, !include.isSystemInclude());
+		assertEquals(active, include.isActive());
+		assertEquals(fileTarget.length() > 0, include.isResolved());
+		
+		checkName(include.getName(), null, name, include, IASTPreprocessorIncludeStatement.INCLUDE_NAME, ROLE_UNCLEAR, filename, nameOffset, nameLength, line, line, nameImage);
+		checkASTNode(include, fTu, PROP_PST, filename, offset, length, line, line, directive);
+	}
+
+	private void checkIf(IASTPreprocessorStatement s, String directive, String condition, boolean active,
+			String filename, int offset, int length, int line) {
+		IASTPreprocessorIfStatement st= (IASTPreprocessorIfStatement) s;
+		assertEquals(condition, new String(st.getCondition()));
+		assertEquals(active, st.taken());
+		checkASTNode(st, fTu, PROP_PST, filename, offset, length, line, line, directive);
+	}
+
+	private void checkIfdef(IASTPreprocessorStatement s, String directive, String condition, boolean active,
+			String filename, int offset, int length, int line) {
+		IASTPreprocessorIfdefStatement st= (IASTPreprocessorIfdefStatement) s;
+		assertEquals(condition, new String(st.getCondition()));
+		assertEquals(active, st.taken());
+		checkASTNode(st, fTu, PROP_PST, filename, offset, length, line, line, directive);
+	}
+
+	private void checkIfndef(IASTPreprocessorStatement s, String directive, String condition, boolean active,
+			String filename, int offset, int length, int line) {
+		IASTPreprocessorIfndefStatement st= (IASTPreprocessorIfndefStatement) s;
+		assertEquals(condition, new String(st.getCondition()));
+		assertEquals(active, st.taken());
+		checkASTNode(st, fTu, PROP_PST, filename, offset, length, line, line, directive);
+	}
+
+	private void checkElif(IASTPreprocessorStatement s, String directive, String condition, boolean active,
+			String filename, int offset, int length, int line) {
+		IASTPreprocessorElifStatement st= (IASTPreprocessorElifStatement) s;
+		assertEquals(condition, new String(st.getCondition()));
+		assertEquals(active, st.taken());
+		checkASTNode(st, fTu, PROP_PST, filename, offset, length, line, line, directive);
+	}
+
+	private void checkElse(IASTPreprocessorStatement s, String directive, boolean active,
+			String filename, int offset, int length, int line) {
+		IASTPreprocessorElseStatement st= (IASTPreprocessorElseStatement) s;
+		assertEquals(active, st.taken());
+		checkASTNode(st, fTu, PROP_PST, filename, offset, length, line, line, directive);
+	}
+
+	private void checkEndif(IASTPreprocessorStatement s, String directive,
+			String filename, int offset, int length, int line) {
+		IASTPreprocessorEndifStatement st= (IASTPreprocessorEndifStatement) s;
+		checkASTNode(st, fTu, PROP_PST, filename, offset, length, line, line, directive);
+	}
+
+	private void checkMacroDefinition(IASTPreprocessorMacroDefinition macro, IMacroBinding binding, String image, String name, 
+			String nameImage, String expansion, String[] parameters, 
+			String filename, int offset, int length, int line, int nameOffset, int nameLength) {
+		assertEquals(expansion, macro.getExpansion());
+		checkName(macro.getName(), binding, name, macro, IASTPreprocessorMacroDefinition.MACRO_NAME, ROLE_DEFINITION, filename, nameOffset, nameLength, line, line, nameImage);
+		checkASTNode(macro, fTu, PROP_PST, filename, offset, length, line, line, image);
+		
+		if (parameters != null) {
+			IASTPreprocessorFunctionStyleMacroDefinition fd= (IASTPreprocessorFunctionStyleMacroDefinition) macro;
+			IASTFunctionStyleMacroParameter[] params= fd.getParameters();
+			for (int i = 0; i < params.length; i++) {
+				IASTFunctionStyleMacroParameter mp = params[i];
+				assertEquals(parameters[i], mp.getParameter());
+				checkASTNode(mp, fd, IASTPreprocessorFunctionStyleMacroDefinition.PARAMETER, filename, -1, 0, -1, 0, null);
+			}
+		}
+		IASTName[] decls= fLocationMap.getDeclarations(binding);
+		assertEquals(1, decls.length);
+		assertSame(macro.getName(), decls[0]);
+	}
+
+	private void checkMacroUndef(IASTPreprocessorStatement s, IBinding binding, String image, String name, String nameImage, 
+			String filename, int offset, int length, int line, int nameOffset, int nameLength) {
+		IASTPreprocessorUndefStatement st= (IASTPreprocessorUndefStatement) s;
+		checkName(st.getMacroName(), binding, name, st, IASTPreprocessorStatement.MACRO_NAME, ROLE_UNCLEAR, filename, nameOffset, nameLength, line, line, nameImage);
+		checkASTNode(st, fTu, PROP_PST, filename, offset, length, line, line, image);
+	}
+
+	public void testComment() {
+		init(DIGITS);
+		fLocationMap.encounteredComment(0, 0, false);
+		fLocationMap.encounteredComment(1,3, true);
+		fLocationMap.encounteredComment(5,16,true);
+		IASTComment[] comments= fLocationMap.getComments();
+		assertEquals(3, comments.length);
+		checkComment(comments[0], "", false, FN, 0, 0, 1, 1);
+		checkComment(comments[1], "12", true, FN, 1,2,1,1);
+		checkComment(comments[2], "56789abcdef", true, FN, 5,11,1,1);
+	}
+
+
+	public void testProblems() {
+		init(DIGITS);
+		fLocationMap.encounterProblem(0, null, 0, 0);
+		fLocationMap.encounterProblem(1, "a".toCharArray(), 1, 3);
+		fLocationMap.encounterProblem(2, "b".toCharArray(), 5,16);
+		IASTProblem[] problems= fLocationMap.getScannerProblems();
+		assertEquals(3, problems.length);
+		checkProblem(problems[0], 0, null, "", FN, 0,0,1,1);
+		checkProblem(problems[1], 1, "a", "12", FN,1,2,1,1);
+		checkProblem(problems[2], 2, "b", "56789abcdef", FN,5,11,1,1);
+	}
+
+	public void testPoundError() {
+		init(DIGITS);
+		fLocationMap.encounterPoundError(0, 0, 0, 0);
+		fLocationMap.encounterPoundError(0, 1, 3, 16);
+		IASTPreprocessorStatement[] prep= fLocationMap.getAllPreprocessorStatements();
+		assertEquals(2, prep.length);
+		checkError(prep[0], "", "",FN,0,0,1);
+		checkError(prep[1], "012", "12", FN,0,3,1);
+	}
+
+	public void testPragma() {
+		init(DIGITS);
+		fLocationMap.encounterPoundPragma(0, 0, 0, 0);
+		fLocationMap.encounterPoundPragma(0, 1, 3, 16);
+		IASTPreprocessorStatement[] prep= fLocationMap.getAllPreprocessorStatements();
+		assertEquals(2, prep.length);
+		checkPragma(prep[0], "", "", FN,0,0,1);
+		checkPragma(prep[1], "012", "12", FN,0,3,1);
+	}
+
+	public void testIncludes() {
+		init(DIGITS);
+		fLocationMap.encounterPoundInclude(0, 0, 0, 0, "n1".toCharArray(), null, true, false, false);
+		fLocationMap.encounterPoundInclude(0, 1, 3, 16, "n2".toCharArray(), "f2", false , true, false);
+		IASTPreprocessorIncludeStatement[] includes= fLocationMap.getIncludeDirectives();
+		assertEquals(2, includes.length);
+		checkInclude(includes[0], "", "", "n1", "", true, false, FN, 0, 0, 1, 0, 0);
+		checkInclude(includes[1], new String(DIGITS), "12", "n2", "f2", false, true, FN, 0, 16, 1, 1, 2);
+	}
+
+	public void testIf() {
+		init(DIGITS);
+		fLocationMap.encounterPoundIf(0, 0, 0, 0, false, IASTName.EMPTY_NAME_ARRAY);
+		fLocationMap.encounterPoundIf(0, 1, 3, 16, true, IASTName.EMPTY_NAME_ARRAY);
+		IASTPreprocessorStatement[] prep= fLocationMap.getAllPreprocessorStatements();
+		assertEquals(2, prep.length);
+		checkIf(prep[0], "", "", false, FN, 0, 0, 1);
+		checkIf(prep[1], "012", "12", true, FN, 0, 3, 1);
+	}
+
+	public void testIfdef() {
+		init(DIGITS);
+		fLocationMap.encounterPoundIfdef(0, 0, 0, 0, false, null);
+		fLocationMap.encounterPoundIfdef(0, 1, 3, 16, true, null);
+		IASTPreprocessorStatement[] prep= fLocationMap.getAllPreprocessorStatements();
+		assertEquals(2, prep.length);
+		checkIfdef(prep[0], "", "", false, FN, 0, 0, 1);
+		checkIfdef(prep[1], "012", "12", true, FN, 0, 3, 1);
+	}
+
+	public void testIfndef() {
+		init(DIGITS);
+		fLocationMap.encounterPoundIfndef(0, 0, 0, 0, false, null);
+		fLocationMap.encounterPoundIfndef(0, 1, 3, 16, true, null);
+		IASTPreprocessorStatement[] prep= fLocationMap.getAllPreprocessorStatements();
+		assertEquals(2, prep.length);
+		checkIfndef(prep[0], "", "", false, FN, 0, 0, 1);
+		checkIfndef(prep[1], "012", "12", true, FN, 0, 3, 1);
+	}
+
+	public void testElif() {
+		init(DIGITS);
+		fLocationMap.encounterPoundElif(0, 0, 0, 0, false, IASTName.EMPTY_NAME_ARRAY);
+		fLocationMap.encounterPoundElif(0, 1, 3, 16, true, IASTName.EMPTY_NAME_ARRAY);
+		IASTPreprocessorStatement[] prep= fLocationMap.getAllPreprocessorStatements();
+		assertEquals(2, prep.length);
+		checkElif(prep[0], "", "", false, FN, 0, 0, 1);
+		checkElif(prep[1], "012", "12", true, FN, 0, 3, 1);
+	}
+
+	public void testElse() {
+		init(DIGITS);
+		fLocationMap.encounterPoundElse(0, 0, false);
+		fLocationMap.encounterPoundElse(0, 16, true);
+		IASTPreprocessorStatement[] prep= fLocationMap.getAllPreprocessorStatements();
+		assertEquals(2, prep.length);
+		checkElse(prep[0], "", false, FN, 0, 0, 1);
+		checkElse(prep[1], new String(DIGITS),  true, FN, 0, 16, 1);
+	}
+
+	public void testEndif() {
+		init(DIGITS);
+		fLocationMap.encounterPoundEndIf(0, 0);
+		fLocationMap.encounterPoundEndIf(0, 16);
+		IASTPreprocessorStatement[] prep= fLocationMap.getAllPreprocessorStatements();
+		assertEquals(2, prep.length);
+		checkEndif(prep[0], "", FN, 0, 0, 1);
+		checkEndif(prep[1], new String(DIGITS), FN, 0, 16, 1);
+	}
+
+	public void testDefine() {
+		IMacroBinding macro1= new TestMacro("n1", "exp1", null);
+		final String[] params = new String[]{"p1", "p2"};
+		IMacroBinding macro2= new TestMacro("n2", "exp2", params);
+		init(DIGITS);
+		fLocationMap.encounterPoundDefine(0, 0, 0, 0, 0, true, macro1);
+		fLocationMap.encounterPoundDefine(0, 1, 3, 10, 16, true, macro2);
+		IASTPreprocessorMacroDefinition[] prep= fLocationMap.getMacroDefinitions();
+		assertEquals(2, prep.length);
+		checkMacroDefinition(prep[0], macro1, "", "n1", "", "exp1", null, FN, 0, 0, 1, 0, 0);
+		checkMacroDefinition(prep[1], macro2, new String(DIGITS), "n2", "12", "exp2", params, FN, 0, 16, 1, 1, 2);
+	}
+
+	public void testPredefine() {
+		IMacroBinding macro1= new TestMacro("n1", "exp1", null);
+		final String[] params = new String[]{"p1", "p2"};
+		IMacroBinding macro2= new TestMacro("n2", "exp2", params);
+		init(DIGITS);
+		fLocationMap.registerPredefinedMacro(macro1);
+		fLocationMap.registerPredefinedMacro(macro2);
+		IASTPreprocessorMacroDefinition[] prep= fLocationMap.getBuiltinMacroDefinitions();
+		assertEquals(2, prep.length);
+		checkMacroDefinition(prep[0], macro1, "", "n1", "n1", "exp1", null, "", -1, 0, 0, -1, 0);
+		checkMacroDefinition(prep[1], macro2, "", "n2", "n2", "exp2", params, "", -1, 0, 0, -1, 0);
+	}
+
+	public void testIndexDefine() {
+		IMacroBinding macro1= new TestMacro("n1", "exp1", null);
+		final String[] params = new String[]{"p1", "p2"};
+		IMacroBinding macro2= new TestMacro("n2", "exp2", params);
+		init(DIGITS);
+		fLocationMap.registerMacroFromIndex(macro1, new Loc("fidx1", 0, 0), 0);
+		fLocationMap.registerMacroFromIndex(macro2, new Loc("fidx2", 1, 4), 8);
+		IASTPreprocessorMacroDefinition[] prep= fLocationMap.getBuiltinMacroDefinitions();
+		assertEquals(2, prep.length);
+		checkMacroDefinition(prep[0], macro1, "", "n1", "n1", "exp1", null, "fidx1", -1, 0, 0, 0, 0);
+		checkMacroDefinition(prep[1], macro2, "", "n2", "n2", "exp2", params, "fidx2", -1, 0, 0, 1, 3);
+	}
+
+	public void testUndefine() {
+		IMacroBinding macro1= new TestMacro("n1", "exp1", null);
+
+		init(DIGITS);
+		fLocationMap.encounterPoundUndef(null, 0, 0, 0, 0, "n1".toCharArray(), true);
+		fLocationMap.encounterPoundUndef(macro1, 0, 3, 7, 16, "n2".toCharArray(), true);
+		IASTPreprocessorStatement[] prep= fLocationMap.getAllPreprocessorStatements();
+		assertEquals(2, prep.length);
+		checkMacroUndef(prep[0], null, "", "n1", "", FN, 0, 0, 1, 0, 0);
+		checkMacroUndef(prep[1], macro1, "0123456", "n2", "3456", FN, 0, 7, 1, 3, 4);
+	}
+
+	public void testMacroExpansion() {
+		IMacroBinding macro1= new TestMacro("n1", "exp1", null);
+		IMacroBinding macro2= new TestMacro("n2", "exp2", null);
+		IMacroBinding macro3= new TestMacro("n3", "exp3", null);
+		init(LONGDIGITS);
+		assertEquals(1, fLocationMap.getCurrentLineNumber('\n'));
+		assertEquals(2, fLocationMap.getCurrentLineNumber('\n'+1));
+		fLocationMap.registerPredefinedMacro(macro1);
+		fLocationMap.registerMacroFromIndex(macro2, new Loc("ifile", 2, 12), 32);
+		fLocationMap.encounterPoundDefine(3, 13, 33, 63, 103, true, macro3);
+		IASTName name1= fLocationMap.encounterImplicitMacroExpansion(macro1, null);
+		IASTName name2= fLocationMap.encounterImplicitMacroExpansion(macro2, null);
+		fLocationMap.pushMacroExpansion(110, 115, 125, 30, macro3, new IASTName[]{name1, name2}, new ImageLocationInfo[0]);
+		fLocationMap.encounteredComment(12, 23, false);
+		checkComment(fLocationMap.getComments()[0], new String(LONGDIGITS, 110, 15), false, FN, 110, 15, 2, 2);
+		
+		IASTName[] refs= fLocationMap.getReferences(macro3);
+		assertEquals(1, refs.length);
+		IASTName macro3ref= refs[0];
+		checkName(refs[0], macro3, "n3", refs[0].getParent(), IASTPreprocessorMacroExpansion.EXPANSION_NAME, ROLE_REFERENCE, FN, 110, 5, 2, 2, new String(LONGDIGITS, 110, 5));
+
+		refs= fLocationMap.getReferences(macro1);
+		assertEquals(1, refs.length);
+		checkName(refs[0], macro1, "n1", refs[0].getParent(), IASTPreprocessorMacroExpansion.NESTED_EXPANSION_NAME, ROLE_REFERENCE, FN, 110, 15, 2, 2, new String(LONGDIGITS, 110, 15));
+
+		refs= fLocationMap.getReferences(macro2);
+		assertEquals(1, refs.length);
+		checkName(refs[0], macro2, "n2", refs[0].getParent(), IASTPreprocessorMacroExpansion.NESTED_EXPANSION_NAME, ROLE_REFERENCE, FN, 110, 15, 2, 2, new String(LONGDIGITS, 110, 15));
+	}
+	
+	public void testContexts() {
+		init(DIGITS);
+		assertEquals(FN, fLocationMap.getTranslationUnitPath());
+		assertEquals(FN, fLocationMap.getCurrentFilePath());
+		// number: [30,36)[46,50)
+		ILocationCtx pre1= fLocationMap.pushPreInclusion("0102030405".toCharArray(), 0, false);
+		assertEquals(FN, fLocationMap.getCurrentFilePath());
+		// number: [0,6)[26,30)
+		ILocationCtx pre2= fLocationMap.pushPreInclusion("a1a2a3a4a5".toCharArray(), 0, true);
+		assertEquals(FN, fLocationMap.getCurrentFilePath());
+		fLocationMap.encounteredComment(0,2,true);
+		// number: [6,15)[25,26)
+		ILocationCtx i1= fLocationMap.pushInclusion(0, 2, 4, 6, "b1b2b3b4b5".toCharArray(), "pre1", "pre1".toCharArray(), false, false, false);
+		assertEquals("pre1", fLocationMap.getCurrentFilePath());
+		fLocationMap.encounteredComment(2,4,true);
+		// number: [15,25)
+		ILocationCtx i2= fLocationMap.pushInclusion(6, 7, 8, 9, "c1c2c3c4c5".toCharArray(), "pre11", "pre11".toCharArray(), false, false, false);
+		assertEquals("pre11", fLocationMap.getCurrentFilePath());
+		fLocationMap.encounteredComment(2,6,true);
+		fLocationMap.popContext(i2);
+		// add a comment before the include
+		fLocationMap.encounteredComment(4,6,false);
+
+		assertEquals("pre1", fLocationMap.getCurrentFilePath());
+		fLocationMap.popContext(i1);
+		assertEquals(FN, fLocationMap.getCurrentFilePath());
+		fLocationMap.popContext(pre2);
+		assertEquals(FN, fLocationMap.getCurrentFilePath());
+		// number [36, 46)
+		ILocationCtx i3= fLocationMap.pushInclusion(0, 2, 4, 6, "d1d2d3d4d5".toCharArray(), "pre2", "pre2".toCharArray(), false, false, false);
+		assertEquals("pre2", fLocationMap.getCurrentFilePath());
+		fLocationMap.encounteredComment(0,2,true);
+		fLocationMap.popContext(i3);
+		fLocationMap.popContext(pre1);
+		assertEquals(FN, fLocationMap.getCurrentFilePath());
+		
+		
+		IASTComment[] comments= fLocationMap.getComments();
+		checkComment(comments[0], "", true, FN, 0, 0, 1, 1);
+		checkComment(comments[1], "b2", true, "pre1", 2, 2, 1, 1);
+		checkComment(comments[2], "c2c3", true, "pre11", 2, 4, 1, 1);
+		checkComment(comments[3], "b3", false, "pre1", 4, 2, 1, 1);		
+		checkComment(comments[4], "d1", true, "pre2", 0, 2, 1, 1);
+
+		checkLocation(fLocationMap.getMappedFileLocation(0, 6), FN, 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(6, 9), "pre1", 0, 9, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(15, 10), "pre11", 0, 10, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(25, 1), "pre1", 9, 1, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(26, 4), FN, 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(30, 6), FN, 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(36, 10), "pre2", 0, 10, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(46, 4), FN, 0, 0, 1, 1);
+
+		checkLocation(fLocationMap.getMappedFileLocation(0, 0), FN, 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(5, 0), FN, 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(6, 0), "pre1", 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(14, 0), "pre1", 8, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(15, 0), "pre11", 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(24, 0), "pre11", 9, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(25, 0), "pre1", 9, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(26, 0), FN, 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(29, 0), FN, 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(30, 0), FN, 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(35, 0), FN, 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(36, 0), "pre2", 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(45, 0), "pre2", 9, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(46, 0), FN, 0, 0, 1, 1);
+		
+		checkLocation(fLocationMap.getMappedFileLocation(0, 7), FN, 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(6, 10), "pre1", 0, 9, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(6, 20), "pre1", 0, 10, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(15, 11), "pre1", 6, 4, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(25, 2), FN, 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(26, 5), FN, 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(30, 7), FN, 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(36, 11), FN, 0, 0, 1, 1);
+		checkLocation(fLocationMap.getMappedFileLocation(46, 5), FN, 0, 1, 1, 1);
+		
+		IDependencyTree tree= fLocationMap.getDependencyTree();
+		assertEquals(FN, tree.getTranslationUnitPath());
+		IASTInclusionNode[] inclusions= tree.getInclusions();
+		assertEquals(2, inclusions.length);
+		checkInclude(inclusions[0].getIncludeDirective(), "", "", "pre1", "pre1", false, true, FN, 0, 0, 1, 0, 0);
+		checkInclude(inclusions[1].getIncludeDirective(), "", "", "pre2", "pre2", false, true, FN, 0, 0, 1, 0, 0);
+		assertEquals(0, inclusions[1].getNestedInclusions().length);
+		
+		inclusions= inclusions[0].getNestedInclusions();
+		assertEquals(1, inclusions.length);
+		checkInclude(inclusions[0].getIncludeDirective(), "b4b", "4", "pre11", "pre11", false, true, "pre1", 6, 3, 1, 7, 1);
+		assertEquals(0, inclusions[0].getNestedInclusions().length);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PortedScannerTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PortedScannerTests.java
new file mode 100644
index 0000000..80c8625
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PortedScannerTests.java
@@ -0,0 +1,2465 @@
+/*******************************************************************************
+ *  Copyright (c) 2004, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *    IBM - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.scanner;
+
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement;
+import org.eclipse.cdt.core.dom.ast.IASTProblem;
+import org.eclipse.cdt.core.dom.ast.IMacroBinding;
+import org.eclipse.cdt.core.dom.parser.IScannerExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.GPPScannerExtensionConfiguration;
+import org.eclipse.cdt.core.parser.IGCCToken;
+import org.eclipse.cdt.core.parser.IProblem;
+import org.eclipse.cdt.core.parser.IToken;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.ParserMode;
+
+/**
+ * Scanner2Tests ported to use the CPreprocessor
+ */
+public class PortedScannerTests extends PreprocessorTestsBase {
+    public static TestSuite suite() {
+		return suite(PortedScannerTests.class);
+	}
+
+	public PortedScannerTests() {
+		super();
+	}
+
+	public PortedScannerTests(String name) {
+		super(name);
+	}
+
+	public void testBug102825_1() throws Exception {
+		StringBuffer buffer = new StringBuffer(
+				"#define CURLOPTTYPE_OBJECTPOINT   10000\n"); 
+		buffer.append("#define CINIT = CURLOPTTYPE_##OBJECTPOINT + 1\n"); 
+		buffer.append("CINIT\n"); 
+		initializeScanner(buffer.toString());
+		validateToken(IToken.tASSIGN);
+		validateInteger("10000"); 
+	}
+
+	public void testBug102825_2() throws Exception {
+		StringBuffer buffer = new StringBuffer(
+				"#define CURLOPTTYPE_OBJECTPOINT   10000\n"); 
+		buffer
+				.append("#define CINIT(name,type,number) = CURLOPTTYPE_##type + number\n"); 
+		buffer.append("CINIT(FILE, OBJECTPOINT, 1)\n"); 
+		initializeScanner(buffer.toString());
+		validateToken(IToken.tASSIGN);
+		validateInteger("10000"); 
+	}
+
+	public void testBug102825_3() throws Exception {
+		StringBuffer buffer = new StringBuffer(
+				"#define CURLOPTTYPE_OBJECTPOINT   10000\n"); 
+		buffer
+				.append("#define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_	## type + number\n"); 
+		buffer.append("CINIT(FILE, OBJECTPOINT, 1)\n"); 
+		initializeScanner(buffer.toString());
+		validateIdentifier("CURLOPT_FILE"); 
+		validateToken(IToken.tASSIGN);
+		validateInteger("10000"); 
+	}
+
+	public void testBug102825_4() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define glue( a, b ) a ## b\n"); 
+		buffer.append("#define HIGHLOW \"hello\"\n"); 
+		buffer.append("glue( HIGH, LOW )\n"); 
+
+		initializeScanner(buffer.toString(), ParserMode.QUICK_PARSE);
+		validateString("hello"); 
+		validateProblemCount(0);
+	}
+
+	public void testBug195610_1() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define glue(x, y, z) x ## y ## z\n"); 
+		buffer.append("glue(, b, c)\n"); 
+
+		initializeScanner(buffer.toString(), ParserMode.QUICK_PARSE);
+		validateIdentifier("bc"); 
+		validateProblemCount(0);
+	}
+
+	public void testBug195610_2() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define glue(x, y, z) x ## y ## z\n"); 
+		buffer.append("glue(a, , c)\n"); 
+
+		initializeScanner(buffer.toString(), ParserMode.QUICK_PARSE);
+		validateIdentifier("ac"); 
+		validateProblemCount(0);
+	}
+
+	public void testBug195610_3() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define glue(x, y, z) x ## y ## z\n"); 
+		buffer.append("glue(a, b, )\n"); 
+
+		initializeScanner(buffer.toString(), ParserMode.QUICK_PARSE);
+		validateIdentifier("ab"); 
+		validateProblemCount(0);
+	}
+
+	public class TableRow {
+		private int[] values;
+		private int length;
+
+		public TableRow(int[] v) {
+			length = v.length;
+			values = new int[length];
+			System.arraycopy(v, 0, values, 0, length);
+		}
+
+		public String toString() {
+			StringBuffer s = new StringBuffer();
+			for (int i = 0; i < length; ++i) {
+				s
+						.append("var").append(i).append("=").append(values[i]).append(" ");   //$NON-NLS-3$
+			}
+			return s.toString();
+		}
+
+		public String symbolName(int index) {
+			return "DEFINITION" + index; 
+		}
+
+		public int symbolValue(int index) {
+			return new Long(Math.round(Math.pow(index, index))).intValue();
+		}
+
+		public String generateCode() {
+			if (length < 2) {
+				return "Array must have at least 2 elements"; 
+			}
+			int numberOfElsifs = length - 1;
+			StringBuffer buffer = new StringBuffer();
+			buffer.append("#if ").append(values[0]).append("\n#\tdefine ");  
+			buffer.append(symbolName(0)).append(" ").append(symbolValue(0)); 
+			for (int i = 0; i < numberOfElsifs; ++i)
+				buffer.append("\n#elif ") 
+						.append(values[1 + i]).append("\n#\tdefine ") 
+						.append(symbolName(i + 1)).append(" ") 
+						.append(symbolValue(i + 1));
+			buffer.append("\n#else \n#\tdefine ") 
+					.append(symbolName(length)).append(" ") 
+					.append(symbolValue(length)).append("\n#endif"); 
+			return buffer.toString();
+		}
+
+		public int selectWinner() {
+			for (int i = 0; i < values.length; ++i) {
+				if (values[i] != 0) {
+					return i;
+				}
+			}
+			return length;
+		}
+
+		/**
+		 * Returns the length.
+		 * @return int
+		 */
+		public int getLength() {
+			return length;
+		}
+
+	}
+
+	public class TruthTable {
+		private int numberOfVariables;
+		private int numberOfRows;
+		public TableRow[] rows;
+
+		public TruthTable(int n) {
+			numberOfVariables = n;
+			numberOfRows = new Long(Math.round(Math.pow(2, n))).intValue();
+
+			rows = new TableRow[numberOfRows];
+			for (int i = 0; i < numberOfRows; ++i) {
+				String Z = Integer.toBinaryString(i);
+
+				int[] input = new int[numberOfVariables];
+				for (int j = 0; j < numberOfVariables; ++j) {
+					int padding = numberOfVariables - Z.length();
+					int k = 0;
+					for (; k < padding; ++k) {
+						input[k] = 0;
+					}
+					for (int l = 0; l < Z.length(); ++l) {
+						char c = Z.charAt(l);
+						int value = Character.digit(c, 10);
+						input[k++] = value;
+					}
+				}
+				rows[i] = new TableRow(input);
+			}
+		}
+
+		/**
+		 * Returns the numberOfRows.
+		 * @return int
+		 */
+		public int getNumberOfRows() {
+			return numberOfRows;
+		}
+
+	}
+
+	public final static int SIZEOF_TRUTHTABLE = 10;
+
+	public void testWeirdStrings() throws Exception {
+		initializeScanner("Living Life L\"LONG\""); 
+		validateIdentifier("Living"); 
+		validateIdentifier("Life"); 
+		validateLString("LONG"); 
+		validateEOF();
+
+	}
+	
+	public void testUTFStrings() throws Exception {
+		IScannerExtensionConfiguration config = new GPPScannerExtensionConfiguration() {
+			@Override public boolean supportUTFLiterals() { return true; }
+		};
+		initializeScanner("ubiquitous u\"utf16\" User U\"utf32\"", ParserLanguage.CPP, config); 
+		validateIdentifier("ubiquitous"); 
+		validateUTF16String("utf16"); 
+		validateIdentifier("User"); 
+		validateUTF32String("utf32"); 
+		validateEOF();
+	}
+	
+	public void testUTFChars() throws Exception {
+		IScannerExtensionConfiguration config = new GPPScannerExtensionConfiguration() {
+			@Override public boolean supportUTFLiterals() { return true; }
+		};
+		initializeScanner("u'asdf' U'1234'", ParserLanguage.CPP, config);
+		validateUTF16Char("asdf");
+		validateUTF32Char("1234");
+		validateEOF();
+	}
+
+	public void testNumerics() throws Exception {
+		initializeScanner("3.0 0.9 .5 3. 4E5 2.01E-03 ..."); 
+		validateFloatingPointLiteral("3.0"); 
+		validateFloatingPointLiteral("0.9"); 
+		validateFloatingPointLiteral(".5"); 
+		validateFloatingPointLiteral("3."); 
+		validateFloatingPointLiteral("4E5"); 
+		validateFloatingPointLiteral("2.01E-03"); 
+		validateToken(IToken.tELLIPSIS);
+		validateEOF();
+
+	}
+
+	public void testPreprocessorDefines() throws Exception {
+		initializeScanner("#define SIMPLE_NUMERIC 5\nint x = SIMPLE_NUMERIC"); 
+		validateToken(IToken.t_int);
+		validateDefinition("SIMPLE_NUMERIC", "5");  
+		validateIdentifier("x"); 
+		validateToken(IToken.tASSIGN);
+		validateInteger("5"); 
+		validateEOF();
+
+		initializeScanner("#define SIMPLE_STRING \"This is a simple string.\"\n\nconst char * myVariable = SIMPLE_STRING;"); 
+		validateToken(IToken.t_const);
+		validateDefinition("SIMPLE_STRING", "\"This is a simple string.\"");  
+		validateToken(IToken.t_char);
+		validateToken(IToken.tSTAR);
+		validateIdentifier("myVariable"); 
+		validateToken(IToken.tASSIGN);
+		validateString("This is a simple string."); 
+		validateToken(IToken.tSEMI);
+		validateEOF();
+
+		initializeScanner("#define FOOL 5  \n int tryAFOOL = FOOL + FOOL;"); 
+		validateToken(IToken.t_int);
+		validateIdentifier("tryAFOOL"); 
+		validateToken(IToken.tASSIGN);
+		validateInteger("5"); 
+		validateToken(IToken.tPLUS);
+		validateInteger("5"); 
+		validateToken(IToken.tSEMI);
+		validateEOF();
+
+		initializeScanner("#define FOOL 5  \n int FOOLer = FOOL;"); 
+		validateToken(IToken.t_int);
+		validateIdentifier("FOOLer"); 
+		validateToken(IToken.tASSIGN);
+		validateInteger("5"); 
+		validateToken(IToken.tSEMI);
+		validateEOF();
+
+		// the case we were failing against in ctype.h
+		// this is a definition, not a macro!
+		initializeScanner("#define _ALPHA (0x0100|_UPPER|_LOWER)"); 
+		validateEOF();
+		validateDefinition("_ALPHA", "(0x0100|_UPPER|_LOWER)");  
+
+		// test for comments after the macro
+		initializeScanner("#define NO_COMMENT// ignore me"); 
+		validateEOF();
+		validateDefinition("NO_COMMENT", "");  
+
+		initializeScanner("#define NO_COMMENT/* ignore me*/"); 
+		validateEOF();
+		validateDefinition("NO_COMMENT", "");  
+
+		initializeScanner("#define ANSWER 42 // i think"); 
+		validateEOF();
+		validateDefinition("ANSWER", "42");  
+
+		initializeScanner("#define ANSWER 42 /* i think */"); 
+		validateEOF();
+		validateDefinition("ANSWER", "42");  
+
+		initializeScanner("#define MULTILINE 3 /* comment \n that goes more than one line */"); 
+		validateEOF();
+		validateDefinition("MULTILINE", "3");  
+
+		initializeScanner("#define MULTICOMMENT X /* comment1 */ + Y /* comment 2 */"); 
+		validateEOF();
+		validateDefinition("MULTICOMMENT", "X + Y");  
+
+		initializeScanner("#define SIMPLE_STRING This is a simple string.\n"); 
+		validateEOF();
+		validateDefinition("SIMPLE_STRING", 
+				"This is a simple string."); 
+
+		initializeScanner("#	define SIMPLE_NUMERIC 5\n"); 
+		validateEOF();
+		validateDefinition("SIMPLE_NUMERIC", "5");  
+
+		initializeScanner("#	define		SIMPLE_NUMERIC   	5\n"); 
+		validateEOF();
+		validateDefinition("SIMPLE_NUMERIC", "5");  
+
+		initializeScanner("#define 		SIMPLE_STRING \"This 	is a simple     string.\"\n"); 
+		validateEOF();
+		validateDefinition("SIMPLE_STRING", 
+				"\"This 	is a simple     string.\""); 
+
+		initializeScanner("#define SIMPLE_STRING 	  	This 	is a simple 	string.\n"); 
+		validateEOF();
+		validateDefinition("SIMPLE_STRING", "This is a simple string."); 
+
+		initializeScanner("#define FLAKE\n\nFLAKE"); 
+		validateEOF();
+		validateDefinition("FLAKE", "");  
+
+		initializeScanner("#define SIMPLE_STRING 	  	This 	is a simple 	string.\\\n		Continue please."); 
+		validateEOF();
+		validateDefinition("SIMPLE_STRING", "This is a simple string. Continue please."); 
+	}
+
+	public void testBug67834() throws Exception {
+		initializeScanner("#if ! BAR\n" + 
+				"foo\n" + 
+				"#else\n" + 
+				"bar\n" + 
+				"#endif\n" 
+		);
+		validateIdentifier("foo"); 
+		validateEOF();
+		initializeScanner("#if ! (BAR)\n" + 
+				"foo\n" + 
+				"#else\n" + 
+				"bar\n" + 
+				"#endif\n" 
+		);
+		validateIdentifier("foo"); 
+		validateEOF();
+	}
+
+	public void testConcatenation() throws Exception {
+		initializeScanner("#define F1 3\n#define F2 F1##F1\nint x=F2;"); 
+		validateToken(IToken.t_int);
+		validateDefinition("F1", "3");  
+		validateDefinition("F2", "F1##F1");  
+		validateIdentifier("x"); 
+		validateToken(IToken.tASSIGN);
+		validateIdentifier("F1F1"); 
+		validateToken(IToken.tSEMI);
+		validateEOF();
+
+		initializeScanner("#define PREFIX RT_\n#define RUN PREFIX##Run"); 
+		validateEOF();
+		validateDefinition("PREFIX", "RT_");  
+		validateDefinition("RUN", "PREFIX##Run");  
+
+		initializeScanner("#define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name\n DECLARE_HANDLE( joe )"); 
+		validateToken(IToken.t_struct);
+		validateIdentifier("joe__"); 
+		validateToken(IToken.tLBRACE);
+		validateToken(IToken.t_int);
+		validateIdentifier("unused"); 
+		validateToken(IToken.tSEMI);
+		validateToken(IToken.tRBRACE);
+		validateToken(IToken.tSEMI);
+		validateToken(IToken.t_typedef);
+		validateToken(IToken.t_struct);
+		validateIdentifier("joe__"); 
+		validateToken(IToken.tSTAR);
+		validateIdentifier("joe"); 
+		validateEOF();
+	}
+
+	public void testSimpleIfdef() throws Exception {
+		initializeScanner("#define SYMBOL 5\n#ifdef SYMBOL\nint counter(SYMBOL);\n#endif"); 
+		validateToken(IToken.t_int);
+		validateIdentifier("counter"); 
+		validateToken(IToken.tLPAREN);
+		validateInteger("5"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+
+		initializeScanner("#define SYMBOL 5\n#ifndef SYMBOL\nint counter(SYMBOL);\n#endif"); 
+		validateEOF();
+
+		initializeScanner("#ifndef DEFINED\n#define DEFINED 100\n#endif\nint count = DEFINED;"); 
+		validateToken(IToken.t_int);
+		validateDefinition("DEFINED", "100");  
+
+		validateIdentifier("count"); 
+		validateToken(IToken.tASSIGN);
+		validateInteger("100"); 
+		validateToken(IToken.tSEMI);
+		validateEOF();
+
+		initializeScanner("#ifndef DEFINED\n#define DEFINED 100\n#endif\nint count = DEFINED;"); 
+		addDefinition("DEFINED", "101");  
+		validateDefinition("DEFINED", "101");  
+		validateToken(IToken.t_int);
+		validateIdentifier("count"); 
+		validateToken(IToken.tASSIGN);
+		validateInteger("101"); 
+		validateToken(IToken.tSEMI);
+		validateEOF();
+
+		initializeScanner("/* NB: This is #if 0'd out */"); 
+		validateEOF();
+	}
+
+	/**
+	 * @param string
+	 * @param string2
+	 */
+	private void addDefinition(String string, String string2) {
+		fScanner.addMacroDefinition(string.toCharArray(), string2.toCharArray());
+	}
+
+	public void testMultipleLines() throws Exception {
+		Writer code = new StringWriter();
+		code.write("#define COMPLEX_MACRO 33 \\\n"); 
+		code.write("	+ 44\n\nCOMPLEX_MACRO"); 
+		initializeScanner(code.toString());
+		validateInteger("33"); 
+		validateToken(IToken.tPLUS);
+		validateInteger("44"); 
+	}
+
+	public void testSlightlyComplexIfdefStructure() throws Exception {
+		initializeScanner("#ifndef BASE\n#define BASE 10\n#endif\n#ifndef BASE\n#error BASE is defined\n#endif"); 
+		validateEOF();
+
+		initializeScanner("#ifndef ONE\n#define ONE 1\n#ifdef TWO\n#define THREE ONE + TWO\n#endif\n#endif\nint three(THREE);"); 
+
+		validateToken(IToken.t_int);
+		validateDefinition("ONE", "1");  
+		validateAsUndefined("TWO"); 
+		validateAsUndefined("THREE"); 
+		validateIdentifier("three"); 
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("THREE"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		initializeScanner(
+				"#ifndef ONE\n" +
+				   "#define ONE 1\n" +
+				   "#ifdef TWO\n" +
+				      "#define THREE ONE + TWO\n" +
+				   "#endif\n"+
+				"#endif\n"+
+				"int three(THREE);"); 
+		addDefinition("TWO", "2");  
+		validateToken(IToken.t_int);
+		validateDefinition("ONE", "1");  
+		validateDefinition("TWO", "2");  
+		validateDefinition("THREE", "ONE + TWO");  
+
+		validateIdentifier("three"); 
+		validateToken(IToken.tLPAREN);
+		validateInteger("1"); 
+		validateToken(IToken.tPLUS);
+		validateInteger("2"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		initializeScanner("#ifndef FOO\n#define FOO 4\n#else\n#undef FOO\n#define FOO 6\n#endif"); 
+		validateEOF();
+		validateDefinition("FOO", "4");  
+
+		initializeScanner("#ifndef FOO\n#define FOO 4\n#else\n#undef FOO\n#define FOO 6\n#endif"); 
+		addDefinition("FOO", "2");  
+		validateEOF();
+		validateDefinition("FOO", "6");  
+
+		initializeScanner("#ifndef ONE\n#   define ONE 1\n#   ifndef TWO\n#       define TWO ONE + ONE \n#   else\n#       undef TWO\n#       define TWO 2 \n#   endif\n#else\n#   ifndef TWO\n#      define TWO ONE + ONE \n#   else\n#       undef TWO\n#       define TWO 2 \n#   endif\n#endif\n"); 
+		validateEOF();
+		validateDefinition("ONE", "1");  
+		validateDefinition("TWO", "ONE + ONE");  
+
+		initializeScanner("#ifndef ONE\r\n" + 
+				"#   define ONE 1\n" + 
+				"#   ifndef TWO\n" + 
+				"#       define TWO ONE + ONE \n" + 
+				"#   else\n" + 
+				"#       undef TWO\n" + 
+				"#       define TWO 2 \n" + 
+				"#   endif\n" + 
+				"#else\n" + 
+				"#   ifndef TWO\n" + 
+				"#      define TWO ONE + ONE \n" + 
+				"#   else\n" + 
+				"#       undef TWO\n" + 
+				"#       define TWO 2 \n" + 
+				"#   endif\n" + 
+		"#endif\n"); 
+
+		addDefinition("ONE", "one");  
+		validateEOF();
+		validateDefinition("ONE", "one");  
+		validateDefinition("TWO", "ONE + ONE");  
+
+		initializeScanner("#ifndef ONE\n#   define ONE 1\n#   ifndef TWO\n#       define TWO ONE + ONE \n#   else\n#       undef TWO\n#       define TWO 2 \n#   endif\n#else\n#   ifndef TWO\n#      define TWO ONE + ONE \n#   else\n#       undef TWO\n#       define TWO 2 \n#   endif\n#endif\n"); 
+		addDefinition("ONE", "one");  
+		addDefinition("TWO", "two");  
+		validateEOF();
+		validateDefinition("ONE", "one");  
+		validateDefinition("TWO", "2");  
+
+		initializeScanner("#ifndef ONE\n#   define ONE 1\n#   ifndef TWO\n#       define TWO ONE + ONE \n#   else\n#       undef TWO\n#       define TWO 2 \n#   endif\n#else\n#   ifndef TWO\n#      define TWO ONE + ONE \n#   else\n#       undef TWO\n#       define TWO 2 \n#   endif\n#endif\n"); 
+		addDefinition("TWO", "two");  
+		validateEOF();
+		validateDefinition("ONE", "1");  
+		validateDefinition("TWO", "2");  
+	}
+
+	public void testIfs() throws Exception {
+		initializeScanner("#if 0\n#error NEVER\n#endif\n"); 
+		validateEOF();
+		initializeScanner("#define X 5\n#define Y 7\n#if (X < Y)\n#define Z X + Y\n#endif"); 
+		validateEOF();
+		validateDefinition("X", "5");  
+		validateDefinition("Y", "7");  
+		validateDefinition("Z", "X + Y");  
+
+		initializeScanner("#if T < 20\n#define Z T + 1\n#endif"); 
+		addDefinition("X", "5");  
+		addDefinition("Y", "7");  
+		addDefinition("T", "X + Y");  
+		validateEOF();
+		validateDefinition("X", "5");  
+		validateDefinition("Y", "7");  
+		validateDefinition("T", "X + Y");  
+		validateDefinition("Z", "T + 1");  
+
+		initializeScanner("#if ( 10 / 5 ) != 2\n#error 10/5 seems to not equal 2 anymore\n#endif\n"); 
+		validateEOF();
+
+		initializeScanner("#ifndef FIVE \n" + 
+				"#define FIVE 5\n" + 
+				"#endif \n" + 
+				"#ifndef TEN\n" + 
+				"#define TEN 2 * FIVE\n" + 
+				"#endif\n" + 
+				"#if TEN != 10\n" + 
+				"#define MISTAKE 1\n" + 
+				"#error Five does not equal 10\n" + 
+				"#endif\n", ParserMode.QUICK_PARSE); 
+		addDefinition("FIVE", "55");  
+		validateEOF();
+		validateDefinition("FIVE", "55");  
+		validateDefinition("TEN", "2 * FIVE");  
+		validateDefinition("MISTAKE", "1");  
+		validateProblemCount(1);
+
+		initializeScanner("#if ((( FOUR / TWO ) * THREE )< FIVE )\n#error 6 is not less than 5 \n#endif\n#if ( ( FIVE * ONE ) != (( (FOUR) + ONE ) * ONE ) )\n#error 5 should equal 5\n#endif \n"); 
+
+		addDefinition("ONE", "1");  
+		addDefinition("TWO", "(ONE + ONE)");  
+		addDefinition("THREE", "(TWO + ONE)");  
+		addDefinition("FOUR", "(TWO * TWO)");  
+		addDefinition("FIVE", "(THREE + TWO)");  
+
+		validateEOF();
+		validateDefinition("ONE", "1");  
+		validateDefinition("TWO", "(ONE + ONE)");  
+		validateDefinition("THREE", "(TWO + ONE)");  
+		validateDefinition("FOUR", "(TWO * TWO)");  
+		validateDefinition("FIVE", "(THREE + TWO)");  
+
+		TruthTable table = new TruthTable(SIZEOF_TRUTHTABLE);
+		int numberOfRows = table.getNumberOfRows();
+		TableRow[] rows = table.rows;
+
+		for (int i = 0; i < numberOfRows; ++i) {
+			TableRow row = rows[i];
+			String code = row.generateCode();
+			initializeScanner(code);
+			validateEOF();
+			validateAllDefinitions(row);
+		}
+
+		initializeScanner("#if ! 0\n#error Correct!\n#endif"); 
+		validateEOF();
+	}
+
+	public void testPreprocessorMacros() throws Exception {
+		initializeScanner("#define GO(x) x+1\nint y(5);\ny = GO(y);");
+		validateToken(IToken.t_int);
+		validateIdentifier("y");
+		validateToken(IToken.tLPAREN);
+		validateInteger("5");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateIdentifier("y");
+		validateToken(IToken.tASSIGN);
+		validateIdentifier("y");
+		validateToken(IToken.tPLUS);
+		validateInteger("1");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		initializeScanner("#define ONE 1\n"
+				+ "#define SUM(a,b,c,d,e,f,g) ( a + b + c + d + e + f + g )\n"
+				+ "int daSum = SUM(ONE,3,5,7,9,11,13);");
+		validateToken(IToken.t_int);
+		validateIdentifier("daSum");
+		validateToken(IToken.tASSIGN);
+		validateToken(IToken.tLPAREN);
+		validateInteger("1");
+		validateToken(IToken.tPLUS);
+		validateInteger("3");
+		validateToken(IToken.tPLUS);
+		validateInteger("5");
+		validateToken(IToken.tPLUS);
+		validateInteger("7");
+		validateToken(IToken.tPLUS);
+		validateInteger("9");
+		validateToken(IToken.tPLUS);
+		validateInteger("11");
+		validateToken(IToken.tPLUS);
+		validateInteger("13");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+
+		initializeScanner("#define LOG( format, var1)   printf( format, var1 )\nLOG( \"My name is %s\", \"Bogdan\" );\n");
+		validateIdentifier("printf");
+		validateToken(IToken.tLPAREN);
+		validateString("My name is %s");
+		validateToken(IToken.tCOMMA);
+		validateString("Bogdan");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+
+		initializeScanner("#define INCR( x )   ++x\nint y(2);\nINCR(y);");
+		validateToken(IToken.t_int);
+		validateIdentifier("y");
+		validateToken(IToken.tLPAREN);
+		validateInteger("2");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateToken(IToken.tINCR);
+		validateIdentifier("y");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+
+		initializeScanner("#define CHECK_AND_SET( x, y, z )     if( x ) { \\\n y = z; \\\n }\n\nCHECK_AND_SET( 1, balance, 5000 );\nCHECK_AND_SET( confused(), you, dumb );");
+		validateToken(IToken.t_if);
+		validateToken(IToken.tLPAREN);
+		validateInteger("1");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tLBRACE);
+		validateIdentifier("balance");
+		validateToken(IToken.tASSIGN);
+		validateInteger("5000");
+		validateToken(IToken.tSEMI);
+		validateToken(IToken.tRBRACE);
+		validateToken(IToken.tSEMI);
+
+		validateToken(IToken.t_if);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("confused");
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tLBRACE);
+		validateIdentifier("you");
+		validateToken(IToken.tASSIGN);
+		validateIdentifier("dumb");
+		validateToken(IToken.tSEMI);
+		validateToken(IToken.tRBRACE);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+
+		initializeScanner(
+				"#define ON 7\n"+
+				"#if defined(ON)\n"+
+				   "int itsOn = ON;\n"+
+				"#endif");
+		validateToken(IToken.t_int);
+		validateIdentifier("itsOn");
+		validateToken(IToken.tASSIGN);
+		validateInteger("7");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		initializeScanner("#if defined( NOTHING ) \nint x = NOTHING;\n#endif");
+		validateEOF();
+	}
+
+	public void testQuickScan() throws Exception {
+		initializeScanner("#if X + 5 < 7\n  int found = 1;\n#endif", ParserMode.QUICK_PARSE); 
+		validateToken(IToken.t_int);
+		validateIdentifier("found"); 
+		validateToken(IToken.tASSIGN);
+		validateInteger("1"); 
+		validateToken(IToken.tSEMI);
+		validateEOF();
+
+		initializeScanner("#if 0\n  int error = 666;\n#endif"); 
+		validateEOF();
+
+	}
+
+	public void testOtherPreprocessorCommands() throws Exception {
+		initializeScanner("#\n#\t\n#define MAX_SIZE 1024\n#\n#  "); 
+		validateEOF();
+		validateDefinition("MAX_SIZE", "1024");  
+
+		for (int i = 0; i < 4; ++i) {
+			switch (i) {
+			case 0:
+				initializeScanner("#  ape"); 
+				break;
+			case 1:
+				initializeScanner("#  #"); 
+				break;
+			case 2:
+				initializeScanner("#  32"); 
+				break;
+			case 3:
+				initializeScanner("#  defines"); 
+				break;
+			}
+
+			validateEOF();
+			// These are no longer fScanner exceptions, the are simply ignored.
+		}
+	}
+
+	public void validateAllDefinitions(TableRow row) {
+		int winner = row.selectWinner();
+		int rowLength = row.getLength();
+		for (int i = 0; i <= rowLength; ++i) {
+			if (i == winner)
+				validateDefinition(row.symbolName(i), row.symbolValue(i));
+			else
+				validateAsUndefined(row.symbolName(i));
+		}
+	}
+
+	public void testBug36287() throws Exception {
+		initializeScanner("X::X( const X & rtg_arg ) : U( rtg_arg ) , Z( rtg_arg.Z ) , er( rtg_arg.er ){}"); 
+		validateIdentifier("X"); 
+		validateToken(IToken.tCOLONCOLON);
+		validateIdentifier("X"); 
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.t_const);
+		validateIdentifier("X"); 
+		validateToken(IToken.tAMPER);
+		validateIdentifier("rtg_arg"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tCOLON);
+		validateIdentifier("U"); 
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("rtg_arg"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("Z"); 
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("rtg_arg"); 
+		validateToken(IToken.tDOT);
+		validateIdentifier("Z"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("er"); 
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("rtg_arg"); 
+		validateToken(IToken.tDOT);
+		validateIdentifier("er"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tLBRACE);
+		validateToken(IToken.tRBRACE);
+		validateEOF();
+
+		initializeScanner("foo.*bar"); 
+		validateIdentifier("foo"); 
+		validateToken(IToken.tDOTSTAR);
+		validateIdentifier("bar"); 
+		validateEOF();
+
+		initializeScanner("foo...bar"); 
+		validateIdentifier("foo"); 
+		validateToken(IToken.tELLIPSIS);
+		validateIdentifier("bar"); 
+		validateEOF();
+	}
+
+	public void testBug35892() throws Exception {
+		initializeScanner("'c'"); 
+		validateChar("c");
+		validateEOF();
+	}
+
+	public void testBug36045() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append('"');
+		buffer.append('\\');
+		buffer.append('"');
+		buffer.append('"');
+
+		buffer.append('"');
+		buffer.append('\\');
+		buffer.append('\\');
+		buffer.append('"');
+		buffer.append("\n\n"); 
+		initializeScanner(buffer.toString());
+		validateString("\\\"\\\\"); 
+	}
+
+	public void testConditionalWithBraces() throws Exception {
+		for (int i = 0; i < 4; ++i) {
+			initializeScanner(
+					"int foobar(int a) { if(a == 0) {\n"+
+					"#ifdef THIS\n"+
+					   "} else {}\n"+
+					"#elif THAT\n" +
+					   "} else {}\n"+
+					"#endif\n"+
+					"return 0;}"); 
+			switch (i) {
+			case 0:
+				addDefinition("THIS", "1");  
+				addDefinition("THAT", "1");  
+				break;
+			case 1:
+				addDefinition("THIS", "1");  
+				addDefinition("THAT", "0");  
+				break;
+			case 2:
+				addDefinition("THAT", "1");  
+				break;
+			case 3:
+				addDefinition("THAT", "0");  
+				break;
+			}
+
+			validateToken(IToken.t_int);
+			validateIdentifier("foobar"); 
+			validateToken(IToken.tLPAREN);
+			validateToken(IToken.t_int);
+			validateIdentifier("a"); 
+			validateToken(IToken.tRPAREN);
+			validateToken(IToken.tLBRACE);
+			validateToken(IToken.t_if);
+			validateToken(IToken.tLPAREN);
+			validateIdentifier("a"); 
+			validateToken(IToken.tEQUAL);
+			validateInteger("0"); 
+			validateToken(IToken.tRPAREN);
+			validateToken(IToken.tLBRACE);
+
+			if (i <= 1) {
+				validateToken(IToken.tRBRACE);
+				validateToken(IToken.t_else);
+				validateToken(IToken.tLBRACE);
+				validateToken(IToken.tRBRACE);
+			}
+
+			if (i == 2) {
+				validateToken(IToken.tRBRACE);
+				validateToken(IToken.t_else);
+				validateToken(IToken.tLBRACE);
+				validateToken(IToken.tRBRACE);
+			}
+
+			validateToken(IToken.t_return);
+			validateInteger("0"); 
+			validateToken(IToken.tSEMI);
+			validateToken(IToken.tRBRACE);
+			validateEOF();
+		}
+
+	}
+
+	public void testNestedRecursiveDefines() throws Exception {
+		initializeScanner("#define C B A\n#define B C C\n#define A B\nA"); 
+
+		validateIdentifier("B"); 
+		validateDefinition("A", "B");  
+		validateDefinition("B", "C C");  
+		validateDefinition("C", "B A");  
+		validateIdentifier("A"); 
+		validateIdentifier("B"); 
+		validateIdentifier("A"); 
+		validateEOF();
+	}
+
+	public void testBug36316() throws Exception {
+		initializeScanner("#define A B->A\nA"); 
+
+		validateIdentifier("B"); 
+		validateDefinition("A", "B->A");  
+		validateToken(IToken.tARROW);
+		validateIdentifier("A"); 
+		validateEOF();
+	}
+
+	public void testBug36434() throws Exception {
+		initializeScanner("#define X(Y)\nX(55)"); 
+		validateEOF();
+		/*IMacroDescriptor macro = fScanner.getDefinition( "X" ); 
+		assertNotNull( macro ); 
+		assertEquals( macro.getParameters().length, 1 );
+		assertEquals( macro.getParameters()[0], "Y" ); 
+		assertEquals( macro.getTokenizedExpansion().length, 0 );*/
+	}
+
+	public void testBug36047() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("# define MAD_VERSION_STRINGIZE(str)	#str\n"); 
+		writer
+				.write("# define MAD_VERSION_STRING(num)	MAD_VERSION_STRINGIZE(num)\n"); 
+		writer
+				.write("# define MAD_VERSION		MAD_VERSION_STRING(MAD_VERSION_MAJOR) \".\" \\\n"); 
+		writer
+				.write("                         MAD_VERSION_STRING(MAD_VERSION_MINOR) \".\" \\\n"); 
+		writer
+				.write("                         MAD_VERSION_STRING(MAD_VERSION_PATCH) \".\" \\\n"); 
+		writer
+				.write("                         MAD_VERSION_STRING(MAD_VERSION_EXTRA)\n"); 
+		writer.write("# define MAD_VERSION_MAJOR 2\n"); 
+		writer.write("# define MAD_VERSION_MINOR 1\n"); 
+		writer.write("# define MAD_VERSION_PATCH 3\n"); 
+		writer.write("# define MAD_VERSION_EXTRA boo\n"); 
+		writer.write("MAD_VERSION\n"); 
+		initializeScanner(writer.toString());
+
+		validateString("2.1.3.boo"); 
+
+		validateEOF();
+	}
+
+	public void testBug36475() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write(" \"A\" \"B\" \"C\" "); 
+
+		initializeScanner(writer.toString());
+
+		validateString("ABC"); 
+		validateEOF();
+	}
+
+	public void testBug36509() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer
+				.write("#define debug(s, t) printf(\"x\" # s \"= %d, x\" # t \"= %s\", \\\n"); 
+		writer.write("                    x ## s, x ## t) \n"); 
+		writer.write("debug(1, 2);"); 
+
+		initializeScanner(writer.toString());
+		//printf("x1=%d, x2= %s", x1, x2); 
+		validateIdentifier("printf"); 
+		validateToken(IToken.tLPAREN);
+		validateString("x1= %d, x2= %s"); 
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("x1"); 
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("x2"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+	}
+
+	public void testBug36695() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("\'\\4\'  \'\\n\'"); 
+		initializeScanner(writer.toString());
+
+		validateChar("\\4"); 
+		validateChar("\\n"); 
+		validateEOF();
+	}
+
+	public void testBug36521() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("#define str(s)      # s\n"); 
+		writer.write("fputs(str(strncmp(\"abc\\0d\", \"abc\", \'\\4\')\n"); 
+		writer.write("        == 0), s);\n"); 
+
+		initializeScanner(writer.toString());
+		validateIdentifier("fputs"); 
+		validateToken(IToken.tLPAREN);
+
+		//TODO as in 36701B, whitespace is not properly replaced inside the string, ok for now.
+		validateString("strncmp(\\\"abc\\\\0d\\\", \\\"abc\\\", '\\\\4') == 0");  
+		//validateString("strncmp(\\\"abc\\\\0d\\\", \\\"abc\\\", '\\\\4')         == 0"); 
+
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("s"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+	}
+
+	public void testBug36770() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("#define A 0\n"); 
+		writer.write("#if ( A == 1 )\n"); 
+		writer.write("#  define foo 1\n"); 
+		writer.write("#else\n"); 
+		writer.write("# define foo 2\n"); 
+		writer.write("#endif\n"); 
+		writer.write("foo\n"); 
+		initializeScanner(writer.toString());
+		validateInteger("2"); 
+		validateEOF();
+	}
+
+	public void testBug36816() throws Exception {
+		initializeScanner("#include \"foo.h", ParserMode.QUICK_PARSE); 
+		validateEOF();
+		validateProblemCount(2);
+
+		initializeScanner("#include <foo.h", ParserMode.QUICK_PARSE); 
+		validateEOF();
+		validateProblemCount(2);
+
+		initializeScanner("#define FOO(A", ParserMode.QUICK_PARSE); 
+		validateEOF();
+		validateProblemCount(1);
+
+		initializeScanner("#define FOO(A \\ B", ParserMode.QUICK_PARSE); 
+		validateEOF();
+		validateProblemCount(1);
+	}
+
+	public void testBug36255() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("#if defined ( A ) \n"); 
+		writer.write("   #if defined ( B ) && ( B != 0 ) \n"); 
+		writer.write("      boo\n"); 
+		writer.write("   #endif /*B*/\n"); 
+		writer.write("#endif /*A*/"); 
+
+		initializeScanner(writer.toString());
+		validateEOF();
+	}
+
+	public void testBug37011() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("#define A \"//\""); 
+
+		initializeScanner(writer.toString());
+
+		validateEOF();
+		validateDefinition("A", "\"//\"");  
+	}
+
+	public void testOtherPreprocessorDefines() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("#define A a//boo\n"); 
+		writer.write("#define B a /*boo*/ a\n"); 
+		writer.write("#define C a \" //boo \"\n"); 
+		writer.write("#define D a \\\"//boo\n"); 
+		writer.write("#define E a \\n \"\\\"\"\n"); 
+		writer.write("#define F a\\\n b\n"); 
+		writer.write("#define G a '\"'//boo\n"); 
+		writer.write("#define H a '\\'//b'\"/*bo\\o*/\" b\n"); 
+
+		initializeScanner(writer.toString());
+
+		validateEOF();
+
+		validateDefinition("A", "a");  
+		validateDefinition("B", "a a");  
+		validateDefinition("C", "a \" //boo \"");  
+		validateDefinition("D", "a \\\"//boo");  
+		validateDefinition("E", "a \\n \"\\\"\"");  
+		validateDefinition("F", "a b");  
+		validateDefinition("G", "a '\"'");  
+		validateDefinition("H", "a '\\'//b'\"/*bo\\o*/\" b");  
+	}
+
+	public void testBug38065() throws Exception {
+		initializeScanner("Foo\\\nBar"); 
+
+		validateIdentifier("FooBar"); 
+		validateEOF();
+
+	}
+
+	public void testBug36701A() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("#define str(s) # s\n"); 
+		writer.write("str( @ \\n )\n"); 
+
+		initializeScanner(writer.toString());
+		validateString("@ \\n"); 
+		validateEOF();
+	}
+
+	public void testBug36701B() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("#define str(s) # s\n"); 
+		writer.write("str( @ /*ff*/  \\n  hh  \"aa\"  )\n"); 
+
+		initializeScanner(writer.toString());
+
+		validateString("@ \\n hh \\\"aa\\\""); 
+		validateEOF();
+	}
+
+	public void testBug44305() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("#define WCHAR_MAX 0 \n"); 
+		writer.write("#if WCHAR_MAX <= 0xff\n"); 
+		writer.write("bool\n"); 
+		writer.write("#endif"); 
+		initializeScanner(writer.toString());
+		validateToken(IToken.t_bool);
+		validateEOF();
+	}
+
+	public void testBug45287() throws Exception {
+		initializeScanner("'abcdefg' L'hijklmnop'"); 
+		validateChar("abcdefg"); 
+		validateWideChar("hijklmnop"); 
+		validateEOF();
+	}
+
+	public void testBug45476() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define X 5\n"); 
+		buffer.append("#if defined X\n"); 
+		buffer.append("#define Y 10\n"); 
+		buffer.append("#endif"); 
+		initializeScanner(buffer.toString());
+		validateEOF();
+		validateDefinition("Y", "10");  
+	}
+
+	public void testBug45477() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define D\n"); 
+		buffer.append("#define D\n"); 
+		buffer.append("#define sum(x,y) x+y\n"); 
+		buffer.append("#define E 3\n"); 
+		buffer.append("#define E 3\n"); 
+		buffer.append("#define sum(x,y) x+y\n"); 
+		buffer.append("#if defined(D)\n"); 
+		buffer.append("printf\n"); 
+		buffer.append("#endif\n"); 
+		buffer.append("#if defined(sum)\n"); 
+		buffer.append("scanf\n"); 
+		buffer.append("#endif\n"); 
+		buffer.append("#if defined(E)\n"); 
+		buffer.append("sprintf\n"); 
+		buffer.append("#endif\n"); 
+		initializeScanner(buffer.toString());
+		validateIdentifier("printf"); 
+		validateIdentifier("scanf"); 
+		validateIdentifier("sprintf"); 
+		validateEOF();
+
+		for (int i = 0; i < 5; ++i) {
+
+			buffer = new StringBuffer();
+
+			buffer.append("#define D blah\n"); 
+
+			switch (i) {
+			case 0:
+				buffer.append("#define D\n"); 
+				break;
+			case 1:
+				buffer.append("#define D( x ) echo\n"); 
+				break;
+			case 2:
+				buffer.append("#define D ACDC\n"); 
+				break;
+			case 3:
+				buffer.append("#define D defined( D )\n"); 
+				break;
+			case 4:
+				buffer.append("#define D blahh\n"); 
+				break;
+
+			}
+
+			initializeScanner(buffer.toString());
+			validateEOF();
+		}
+
+		buffer = new StringBuffer();
+		buffer.append("#define X 5\n"); 
+		buffer.append("#define Y 7\n"); 
+		buffer.append("#define SUMXY X    _+     Y"); 
+		buffer.append("#define SUMXY   X + Y"); 
+		initializeScanner(buffer.toString());
+		validateEOF();
+	}
+
+	public void testBug45551() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define stdio someNonExistantIncludeFile\n"); 
+		buffer.append("#include <stdio.h>\n"); 
+
+		initializeScanner(buffer.toString());
+		validateEOF();
+		validateProblemCount(1); // file does not exist
+		IASTPreprocessorIncludeStatement[] includes= fLocationResolver.getIncludeDirectives();
+		assertEquals(1, includes.length);
+		assertEquals("stdio.h", includes[0].getName().toString()); 
+	}
+
+	public void testBug46402() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define X 5\n"); 
+		buffer.append("#if defined( X )\n"); 
+		buffer.append("// blah\n"); 
+		buffer.append("#elif Y > 5 \n"); 
+		buffer.append("// coo\n"); 
+		buffer.append("#endif\n"); 
+		initializeScanner(buffer.toString(), ParserMode.COMPLETE_PARSE);
+		validateEOF();
+	}
+
+	public void testBug50821() throws Exception {
+		initializeScanner("\'\n\n\n", ParserMode.QUICK_PARSE); 
+		fScanner.nextToken();
+		validateProblemCount(1);
+	}
+
+	public void test54778() throws Exception {
+		initializeScanner("#if 1 || 0 < 3 \n printf \n #endif\n"); 
+		validateIdentifier("printf"); 
+		validateEOF();
+		initializeScanner("#if !defined FOO || FOO > 3\nprintf\n#endif\n"); 
+		validateIdentifier("printf"); 
+		validateEOF();
+		initializeScanner("#if !defined FOO || FOO < 3\nprintf\n#endif\n"); 
+		validateIdentifier("printf"); 
+		validateEOF();
+	}
+
+	public void test68229() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#define COUNT 0     \n"); 
+		writer.write("1                   \n"); 
+		writer.write("#if COUNT           \n"); 
+		writer.write("   2                \n"); 
+		writer.write("#endif              \n"); 
+		writer.write("3                   \n"); 
+
+		initializeScanner(writer.toString());
+
+		IToken t1 = fScanner.nextToken();
+		IToken t3 = fScanner.nextToken();
+
+		assertEquals(t1.getImage(), "1"); 
+		assertEquals(t3.getImage(), "3"); 
+		assertEquals(t1.getNext(), t3);
+		validateEOF();
+
+		writer = new StringWriter();
+		writer.write("#define FOO( x ) x   \n"); 
+		writer.write("1  FOO( 2 )  3       \n"); 
+
+		initializeScanner(writer.toString());
+		t1 = fScanner.nextToken();
+		IToken t2 = fScanner.nextToken();
+		t3 = fScanner.nextToken();
+		validateEOF();
+
+		assertEquals(t1.getImage(), "1"); 
+		assertEquals(t2.getImage(), "2"); 
+		assertEquals(t3.getImage(), "3"); 
+
+		assertEquals(t1.getNext(), t2);
+	}
+
+	public void testBug56517() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#if 0 \n"); 
+		writer.write("char * x = \"#boo\";\n"); 
+		writer.write("#endif\n"); 
+		initializeScanner(writer.toString());
+		validateEOF();
+	}
+
+	public void testBug36770B() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#define A 0\n"); 
+		writer.write("#if ( A == 1 )\n"); 
+		writer.write("#  define foo\n"); 
+		writer.write("#else\n"); 
+		writer.write("#   define bar\n"); 
+		writer.write("#endif\n"); 
+		initializeScanner(writer.toString(), ParserMode.QUICK_PARSE);
+		validateEOF();
+		validateDefinition("A", 0); 
+		validateDefinition("bar", "");  
+
+	}
+
+	public void testBug47797() throws Exception {
+		initializeScanner("\"\\uABCD\" \'\\uABCD\' \\uABCD_ident \\u001A01BC_ident ident\\U01AF ident\\u01bc00AF"); 
+		validateString("\\uABCD"); 
+		validateChar("\\uABCD"); 
+		validateIdentifier("\\uABCD_ident"); 
+		validateIdentifier("\\u001A01BC_ident"); 
+		validateIdentifier("ident\\U01AF"); 
+		validateIdentifier("ident\\u01bc00AF"); 
+		validateEOF();
+	}
+
+	public void testBug59768() throws Exception {
+		initializeScanner("#define A A\nA"); 
+		validateIdentifier("A"); 
+		validateEOF();
+		/*IMacroDescriptor d = fScanner.getDefinition( "A"); 
+		assertTrue( d.isCircular() );*/
+	}
+
+	public void testBug60764() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#define P   a,b\n"); 
+		writer.write("#define M(x) M1(x)\n"); 
+		writer.write("#define M1(x,y) #x  #y\n"); 
+		writer.write("M(P)\n"); 
+		initializeScanner(writer.toString());
+		validateString("ab"); 
+		validateEOF();
+	}
+
+	public void testBug62042() throws Exception {
+		initializeScanner("0x", ParserMode.QUICK_PARSE); 
+		validateInteger("0x"); // to me this is a valid number 
+		validateEOF();
+	}
+
+	public void testBug61968() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("unsigned int ui = 2172748163; //ok \n"); 
+		writer.write("int big = 999999999999999;//ok \n"); 
+		writer.write("void main() { \n"); 
+		writer.write("caller(4);  //ok\n"); 
+		writer
+				.write("caller(2172748163);//causes java.lang.NumberFormatException \n"); 
+		writer
+				.write("caller(999999999999999); //also causes NumberFormatException \n"); 
+		writer.write("}\n"); 
+		initializeScanner(writer.toString(), ParserMode.QUICK_PARSE);
+		fullyTokenize();
+		validateProblemCount(0);
+	}
+
+	public void testBug62378() throws Exception {
+		initializeScanner("\"\\?\\?<\""); 
+		validateString("\\?\\?<"); 
+	}
+
+	public void testBug62384() throws Exception {
+		initializeScanner("18446744073709551615LL"); 
+		validateInteger("18446744073709551615LL"); 
+	}
+
+	public void testBug62390() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#define f(x) x\n"); 
+		writer.write("#if f(\n"); 
+		writer.write("5) == 5\n"); 
+		writer.write("true1\n"); 
+		writer.write("#endif\n"); 
+		writer.write("#if A\n"); 
+		writer.write("#elif f(\n"); 
+		writer.write("5) == 5\n"); 
+		writer.write("true2\n"); 
+		writer.write("#endif\n"); 
+		writer.write("#undef f\n"); 
+		writer.write("#define f(x) \"A0I70_001.h\"\n"); 
+		writer.write("#include f(\n"); 
+		writer.write("5\n"); 
+		writer.write(")\n"); 
+		writer.write("#undef f\n"); 
+		writer.write("#define f(x) 1467\n"); 
+		writer.write("#line f(\n"); 
+		writer.write("5\n"); 
+		writer.write(")\n"); 
+		writer.write("#pragma f(\n"); 
+		writer.write("5\n"); 
+		writer.write(")\n"); 
+		writer.write("}\n"); 
+		initializeScanner(writer.toString(), ParserMode.QUICK_PARSE);
+		fullyTokenize();
+	}
+
+	public void testBug62009() throws Exception {
+		initializeScanner("#define def(x) (x#)\ndef(orange)\n", ParserMode.QUICK_PARSE); 
+		fullyTokenize();
+		validateProblemCount(1); 
+	}
+
+	public void testBug61972() throws Exception {
+		initializeScanner("#define DEF1(A1) A1\n#define DEF2     DEF1(DEF2)\nDEF2;"); 
+		validateIdentifier("DEF2"); 
+		validateToken(IToken.tSEMI);
+		validateEOF();
+	}
+
+	public void testBug64268() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#define BODY \\\n"); 
+		writer.write(" {	 \\\n"); 
+		writer.write(" /* this multi-line comment messes \\\n"); 
+		writer.write(" up the parser.  */ }\n"); 
+		writer.write("BODY "); 
+		initializeScanner(writer.toString());
+		validateToken(IToken.tLBRACE);
+		validateToken(IToken.tRBRACE);
+		validateEOF();
+	}
+
+	public void testUndef() throws Exception {
+		initializeScanner("#define A 5\n" + 
+				"#define B 10\n" + 
+				"#undef A\n" + 
+				"A B"); 
+		validateIdentifier("A"); 
+		validateInteger("10"); 
+		validateEOF();
+	}
+
+	public void testWackyFunctionMacros() throws Exception {
+		initializeScanner("#define A(X) hi##X\n" + 
+				"#define B(Y) A(Y)\n" + 
+				"B(there)"); 
+		validateIdentifier("hithere"); 
+		validateEOF();
+	}
+
+	public void testSlashes() throws Exception {
+		initializeScanner("__q / __n"); 
+		validateIdentifier("__q"); 
+		validateToken(IToken.tDIV);
+		validateIdentifier("__n"); 
+		validateEOF();
+	}
+
+	public void testStringify() throws Exception {
+		initializeScanner("#define xS(s) #s\n#define S(s) xS(s)\n#define X hi\nS(X)"); 
+		validateString("hi"); 
+		validateEOF();
+	}
+
+	public void testWideToNarrowConcatenation() throws Exception {
+		initializeScanner("\"ONE\" L\"TWO\""); 
+		validateLString("ONETWO"); 
+		validateEOF();
+	}
+	
+	public void testUTFStringConcatenation() throws Exception {
+		IScannerExtensionConfiguration config = new GPPScannerExtensionConfiguration() {
+			@Override public boolean supportUTFLiterals() { return true; }
+		};
+		initializeScanner("u\"a\" u\"b\"", ParserLanguage.CPP, config);
+		validateUTF16String("ab");
+		validateEOF();
+		initializeScanner("u\"a\" \"b\"", ParserLanguage.CPP, config);
+		validateUTF16String("ab");
+		validateEOF();
+		initializeScanner("\"a\" u\"b\"", ParserLanguage.CPP, config);
+		validateUTF16String("ab");
+		validateEOF();
+		
+		initializeScanner("U\"a\" U\"b\"", ParserLanguage.CPP, config);
+		validateUTF32String("ab");
+		validateEOF();
+		initializeScanner("U\"a\" \"b\"", ParserLanguage.CPP, config);
+		validateUTF32String("ab");
+		validateEOF();
+		initializeScanner("\"a\" U\"b\"", ParserLanguage.CPP, config);
+		validateUTF32String("ab");
+		validateEOF();
+	}
+
+	public void testEmptyIncludeDirective() throws Exception {
+		initializeScanner("#include \n#include <foo.h>\n"); 
+		validateEOF();
+		IASTPreprocessorIncludeStatement[] includes= fLocationResolver.getIncludeDirectives();
+		assertEquals(1, includes.length);
+		assertEquals("foo.h", includes[0].getName().toString()); 
+	}
+
+	public void testBug69412() throws Exception {
+		initializeScanner("\'\\\\\'", ParserMode.COMPLETE_PARSE); 
+		validateChar("\\\\"); 
+		validateEOF();
+		validateProblemCount(0);
+	}
+
+	public void testBug70072() throws Exception {
+		initializeScanner("#if 1/0\nint i;\n#elif 2/0\nint j;\n#endif\nint k;\n"); 
+		fullyTokenize();
+	}
+
+	public void testBug70261() throws Exception {
+		initializeScanner("0X0"); 
+		validateInteger("0X0"); 
+	}
+
+	public void testBug62571() throws Exception {
+		StringBuffer buffer = new StringBuffer("#define J(X,Y) X##Y\n"); 
+		buffer.append("J(A,1Xxyz)\n"); 
+		buffer.append("J(B,1X1X1Xxyz)\n"); 
+		buffer.append("J(C,0Xxyz)\n"); 
+		buffer.append("J(CC,0Xxyz)\n"); 
+		buffer.append("J(D,0xxyz)\n"); 
+		buffer.append("J(E,0x0x0xxyz)\n"); 
+		initializeScanner(buffer.toString());
+		validateIdentifier("A1Xxyz"); 
+		validateIdentifier("B1X1X1Xxyz"); 
+		validateIdentifier("C0Xxyz"); 
+		validateIdentifier("CC0Xxyz"); 
+		validateIdentifier("D0xxyz"); 
+		validateIdentifier("E0x0x0xxyz"); 
+	}
+
+	public void testBug69134() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("# ifdef YYDEBUG\n"); 
+		writer.write("if (yyDebug) {\n"); 
+		writer.write("(void) fprintf (yyTrace,\n"); 
+		writer.write("\"  # |Position|State|Mod|Lev|Action |Terminal and Lookahead or Rule\\n\");\n"); 
+		writer.write("yyNl ();\n"); 
+		writer.write("}\n"); 
+		writer.write("# endif\n"); 
+		initializeScanner(writer.toString());
+		fullyTokenize();
+		validateProblemCount(0);
+	}
+
+	public void testBug70073() throws Exception {
+		StringBuffer buffer = new StringBuffer(
+				"#if CONST \n #endif \n #elif CONST \n int"); 
+		final List problems = new ArrayList();
+		initializeScanner(buffer.toString());
+		validateToken(IToken.t_int);
+		validateProblemCount(1);
+	}
+
+	public void testBug73652() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("#define DoSuperMethodA IDoSuperMethodA\n"); 
+		writer
+				.write("#define IDoSuperMethodA(a,b,c) IIntuition->IDoSuperMethodA(a,b,c)\n"); 
+		writer.write("DoSuperMethodA(0,0,0);\n"); 
+
+		initializeScanner(writer.toString());
+
+		validateIdentifier("IIntuition"); 
+		validateToken(IToken.tARROW);
+		validateIdentifier("IDoSuperMethodA"); 
+		validateToken(IToken.tLPAREN);
+		validateInteger("0"); 
+		validateToken(IToken.tCOMMA);
+		validateInteger("0"); 
+		validateToken(IToken.tCOMMA);
+		validateInteger("0"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+	}
+
+	public void testBug73652_2() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("#define DoSuperMethodA DoSuperMethodB //doobalie\n"); 
+		writer.write("#define DoSuperMethodB DoSuperMethodC /*oogalie*/ \n"); 
+		writer.write("#define DoSuperMethodC IDoSuperMethodA \\\n\n"); 
+		writer
+				.write("#define IDoSuperMethodA(a,b,c) IIntuition->IDoSuperMethodA(a,b,c)\n"); 
+		writer.write("DoSuperMethodA  (0,0,0);\n"); 
+
+		initializeScanner(writer.toString());
+
+		validateIdentifier("IIntuition"); 
+		validateToken(IToken.tARROW);
+		validateIdentifier("IDoSuperMethodA"); 
+		validateToken(IToken.tLPAREN);
+		validateInteger("0"); 
+		validateToken(IToken.tCOMMA);
+		validateInteger("0"); 
+		validateToken(IToken.tCOMMA);
+		validateInteger("0"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+
+	}
+
+	public void testBug72997() throws Exception {
+		initializeScanner("'\\\\'"); 
+		validateChar("\\\\"); 
+		validateEOF();
+	}
+
+	public void testBug72725() throws Exception {
+		for (int i = 0; i < 2; ++i) {
+			StringBuffer buffer = new StringBuffer();
+			buffer.append("#define a \\"); 
+			if (i == 0)
+				buffer.append("\r"); 
+			buffer.append("\n"); 
+			buffer.append("long macro stuff"); 
+			if (i == 0)
+				buffer.append("\r"); 
+			buffer.append("\n"); 
+
+			initializeScanner(buffer.toString());
+			validateEOF();
+			validateProblemCount(0);
+		}
+	}
+
+	public void testBug72506() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("#define INCFILE(x) ver ## x\n"); 
+		writer.write("#define xstr(x) str(x)\n"); 
+		writer.write("#define str(x) #x\n"); 
+		writer.write("xstr(INCFILE(2).h)\n"); 
+
+		initializeScanner(writer.toString());
+		validateString("ver2.h"); 
+		validateEOF();
+	}
+
+	public void testBug72506_2() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("#define str(x) #x\n"); 
+		writer.write("#define A B\n"); 
+		writer.write("#define B A\n"); 
+		writer.write("str(B)\n"); 
+
+		initializeScanner(writer.toString());
+		validateString("B"); 
+		validateEOF();
+	}
+
+	public void testMacroPastingError() throws Exception {
+		StringWriter writer = new StringWriter();
+		writer.write("#define m(expr) \\\r\n"); 
+		writer.write("    foo( #expr )  \r\n"); 
+
+		initializeScanner(writer.toString());
+		validateEOF();
+		validateProblemCount(0);
+	}
+
+	public void testBug74176() throws Exception {
+		initializeScanner("#define MYSTRING \"X Y Z "); 
+		validateEOF();
+
+		initializeScanner("#define m(b) #"); 
+		validateEOF();
+
+		initializeScanner("#define m(foo,b) #b"); 
+		validateEOF();
+	}
+
+	public void testBug74180() throws Exception {
+		initializeScanner("true false", ParserLanguage.C); 
+		validateIdentifier("true"); 
+		validateIdentifier("false"); 
+
+		initializeScanner("true false", ParserLanguage.CPP); 
+		validateToken(IToken.t_true);
+		validateToken(IToken.t_false);
+	}
+
+	public void testBug73492() throws Exception {
+		String code = "#define PTR void *\n" + 
+				"PTR;\n"; 
+
+		int offset = code.indexOf("PTR;") + 3;  
+		initializeScanner(code);
+
+		IToken t = fScanner.nextToken();
+		assertEquals(t.getType(), IToken.t_void);
+		assertEquals(offset, t.getOffset());
+
+		t = fScanner.nextToken();
+		assertEquals(t.getType(), IToken.tSTAR);
+		assertEquals(offset + 1, t.getOffset());
+
+		t = fScanner.nextToken();
+		assertEquals(t.getType(), IToken.tSEMI);
+		assertEquals(offset + 2, t.getOffset());
+	}
+
+	public void testBug74328() throws Exception {
+		initializeScanner("\"\";\n"); 
+		validateString(""); 
+		validateToken(IToken.tSEMI);
+		validateEOF();
+	}
+
+	public void testBug72537() throws Exception {
+		initializeScanner("FOO BAR(boo)"); 
+		fScanner.addMacroDefinition("FOO".toCharArray(), "foo".toCharArray()); 
+		fScanner.addMacroDefinition("BAR(x)".toCharArray(), "x".toCharArray()); 
+
+		validateIdentifier("foo"); 
+		validateIdentifier("boo"); 
+		validateEOF();
+	}
+
+	public void testBug75083() throws Exception {
+		String code = "#define blah() { extern foo\n blah()\n"; 
+		initializeScanner(code);
+
+		int idx = code.indexOf("\n blah()") + 2 + 6; 
+		IToken t = fScanner.nextToken();
+		assertEquals(IToken.tLBRACE, t.getType());
+		assertEquals(idx, t.getOffset());
+		assertEquals(idx + 1, t.getEndOffset());
+
+		t = fScanner.nextToken();
+		assertEquals(IToken.t_extern, t.getType());
+		assertEquals(idx + 1, t.getOffset());
+		assertEquals(idx + 2, t.getEndOffset());
+
+		t = fScanner.nextToken();
+		assertEquals(IToken.tIDENTIFIER, t.getType());
+		assertEquals(idx + 2, t.getOffset());
+		assertEquals(idx + 3, t.getEndOffset());
+	}
+
+	// when fixing 75532 several IProblems were added to ExpressionEvaluator and one to Scanner2, this is to test them
+	// the problems currently don't get reported when using the DOMScanner
+	public void testBug75532IProblems() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#if 09 == 9\n#endif\n"); // malformed octal 
+		writer.write("#if 1A == 0x1A\n#endif\n"); // malformed decimal 
+		writer.write("#if 0x == 0x0\n#endif\n"); // malformed hex 
+		writer.write("#if 0xAX == 0xA\n#endif\n"); // malformed hex 
+		writer.write("#if 1/0 == 1\n#endif\n"); // division by zero  
+		writer.write("#if defined ( sadf a\n#endif\n"); // missing ')' in defined  
+		writer.write("#if defined ( sadf\n#endif\n"); // missing ')' in defined  
+		writer.write("#if defined ( 2sadf )\n#endif\n"); // illegal identifier in defined  
+		writer.write("#if ( 1 == 1 ? 1\n#endif\n"); // bad conditional expression   
+		writer.write("#if (  \n#endif\n"); // expression syntax error  
+		writer.write("#if @\n#endif\n"); // expression syntax error  
+		writer.write("#if \n#endif\n"); // expression syntax error  
+		writer.write("#if -\n#endif\n"); // expression syntax error  
+		writer.write("#if ( 1 == 1\n#endif\n"); // missing ')'  
+		writer.write("#if 1 = 1\n#endif\n"); // assignment not allowed 
+
+		writer.write("int main(int argc, char **argv) {\n"); 
+		writer.write("if ( 09 == 9 )\n"); // added while fixing this bug, IProblem on invalid octal number 
+		writer.write("return 1;\nreturn 0;\n}\n"); 
+
+		initializeScanner(writer.toString());
+		fullyTokenize();
+		IASTProblem[] problems= fLocationResolver.getScannerProblems();
+		assertEquals(17, problems.length);
+		int i= 0;
+		assertEquals(IProblem.SCANNER_BAD_OCTAL_FORMAT,          problems[i].getID() );  
+		assertEquals(IProblem.SCANNER_BAD_DECIMAL_FORMAT,        problems[++i].getID() );  
+		assertEquals(IProblem.SCANNER_BAD_HEX_FORMAT,            problems[++i].getID() );  
+		assertEquals(IProblem.SCANNER_BAD_HEX_FORMAT,            problems[++i].getID() );  
+		assertEquals(IProblem.SCANNER_DIVIDE_BY_ZERO,            problems[++i].getID() );  
+		assertEquals(IProblem.SCANNER_MISSING_R_PAREN,           problems[++i].getID() );  
+		assertEquals(IProblem.SCANNER_MISSING_R_PAREN,           problems[++i].getID() );  
+		assertEquals(IProblem.SCANNER_ILLEGAL_IDENTIFIER,        problems[++i].getID() );  
+		assertEquals(IProblem.SCANNER_BAD_CONDITIONAL_EXPRESSION,problems[++i].getID() );  
+		assertEquals(IProblem.SCANNER_EXPRESSION_SYNTAX_ERROR,   problems[++i].getID() );  
+		assertEquals(IProblem.SCANNER_BAD_CHARACTER,   			 problems[++i].getID() );  
+		assertEquals(IProblem.SCANNER_EXPRESSION_SYNTAX_ERROR,   problems[++i].getID() ); 
+		assertEquals(IProblem.SCANNER_EXPRESSION_SYNTAX_ERROR,   problems[++i].getID() ); 
+		assertEquals(IProblem.SCANNER_EXPRESSION_SYNTAX_ERROR,   problems[++i].getID() ); 
+		assertEquals(IProblem.SCANNER_MISSING_R_PAREN,           problems[++i].getID() ); 
+		assertEquals(IProblem.SCANNER_ASSIGNMENT_NOT_ALLOWED,    problems[++i].getID() ); 
+		assertEquals(IProblem.SCANNER_BAD_OCTAL_FORMAT,          problems[++i].getID() ); 
+	}
+
+	public void testExpressionEvalProblems() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write(" #if 1 == 1L       \n"); 
+		writer.write(" #endif            \n"); 
+
+		initializeScanner(writer.toString());
+		validateEOF();
+		validateProblemCount(0);
+	}
+
+	public void testExpressionEvalProblems_2() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#define FOO( a, b ) a##b    \n"); 
+		writer.write("#if FOO ( 1, 0 ) == 10      \n"); 
+		writer.write("1                           \n"); 
+		writer.write("#endif                      \n"); 
+
+		initializeScanner(writer.toString());
+		validateInteger("1"); 
+		validateEOF();
+		validateProblemCount(0);
+	}
+
+	public void testUnExpandedFunctionMacro() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#define foo( a ) #a         \n"); 
+		writer.write("foo( 1 )   foo              \n"); 
+
+		initializeScanner(writer.toString());
+		validateString("1"); 
+		validateIdentifier("foo"); 
+		validateEOF();
+	}
+
+	public void testBug39688A() throws Exception { // test valid IProblems
+		Writer writer = new StringWriter();
+		writer.write("#define decl1(type, ...    \\\n  )   type var;\n"); 
+		writer.write("decl1(int, x, y, z)\n"); 
+		writer.write("#define decl2(type, args...) type args;"); 
+		writer.write("decl2(int, a, b, c, x, y, z)\n"); 
+		writer.write("#define decl3(type, args...) \\\n   type args;"); 
+		writer.write("decl3(int, a, b, c, x, y)\n"); 
+		writer.write("#define decl4(type, args... \\\n   ) type args;"); 
+		writer.write("decl4(int, a, b, z)\n"); 
+		writer.write("#define decl5(type, ...) type __VA_ARGS__;"); 
+		writer.write("decl5(int, z)\n"); 
+		writer.write("#define decl6(type, ...    \\\n) type __VA_ARGS__;"); 
+		writer.write("decl6(int, a, b, c, x)\n"); 
+		writer.write("#define foo(a) a __VA_ARGS__;\n");  // C99: 6.10.3.5 this should produce an IProblem
+		writer.write("#define foo2(a) a #__VA_ARGS__;\n");  // C99: 6.10.3.5 this should produce an IProblem
+
+		initializeScanner(writer.toString());
+		fullyTokenize();
+		IASTProblem[] problems= fLocationResolver.getScannerProblems();
+		assertEquals(2, problems.length);
+		assertTrue(problems[0].getID() == IProblem.PREPROCESSOR_INVALID_VA_ARGS);
+		assertTrue(problems[1].getID() == IProblem.PREPROCESSOR_MACRO_PASTING_ERROR);
+	}
+
+	public void testBug39688B() throws Exception { // test C99
+		Writer writer = new StringWriter();
+		writer.write("#define debug(...) fprintf(stderr, __VA_ARGS__)\n"); 
+		writer.write("#define showlist(...) puts(#__VA_ARGS__)\n"); 
+		writer
+				.write("#define report(test, ...) ((test)?puts(#test):\\\n   printf(__VA_ARGS__))\n"); 
+		writer.write("int main() {\n"); 
+		writer.write("debug(\"Flag\");\n"); 
+		writer.write("debug(\"X = %d\\n\", x);\n"); 
+		writer.write("showlist(The first, second, and third items.);\n"); 
+		writer.write("report(x>y, \"x is %d but y is %d\", x, y);\n"); 
+		writer.write("return 0; }\n"); 
+
+		initializeScanner(writer.toString());
+		fullyTokenize();
+		validateProblemCount(0);
+
+		Map<String, IMacroBinding> defs = fScanner.getMacroDefinitions();
+		assertTrue(defs.containsKey("debug")); 
+		assertTrue(defs.containsKey("showlist")); 
+		assertTrue(defs.containsKey("report")); 
+		IMacroBinding debug = defs.get("debug"); 
+		assertTrue(new String(debug.getParameterPlaceholderList()[0]).equals("__VA_ARGS__")); 
+		assertEquals("fprintf(stderr, __VA_ARGS__)", new String(debug.getExpansion())); 
+		
+		IMacroBinding showlist = defs.get("showlist"); 
+		assertTrue(new String(showlist.getParameterPlaceholderList()[0]).equals("__VA_ARGS__")); 
+		assertTrue(new String(showlist.getExpansion())
+				.equals("puts(#__VA_ARGS__)")); 
+		IMacroBinding report = defs.get("report"); 
+		assertTrue(new String(report.getParameterPlaceholderList()[0]).equals("test")); 
+		assertTrue(new String(report.getParameterPlaceholderList()[1]).equals("__VA_ARGS__")); 
+		assertTrue(new String(report.getExpansion())
+				.equals("((test)?puts(#test): printf(__VA_ARGS__))")); 
+
+		check39688Tokens(writer);
+	}
+
+	public void testBug39688C() throws Exception { // test GCC
+		Writer writer = new StringWriter();
+		writer.write("#define debug(vars...) fprintf(stderr, vars)\n"); 
+		writer.write("#define showlist(vars...) puts(#vars)\n"); 
+		writer
+				.write("#define report(test, vars...) ((test)?puts(#test):\\\n   printf(vars))\n"); 
+		writer.write("int main() {\n"); 
+		writer.write("debug(\"Flag\");\n"); 
+		writer.write("debug(\"X = %d\\n\", x);\n"); 
+		writer.write("showlist(The first, second, and third items.);\n"); 
+		writer.write("report(x>y, \"x is %d but y is %d\", x, y);\n"); 
+		writer.write("return 0; }\n"); 
+
+		initializeScanner(writer.toString());
+		fullyTokenize();
+		validateProblemCount(0);
+
+		Map defs = fScanner.getMacroDefinitions();
+		assertTrue(defs.containsKey("debug")); 
+		assertTrue(defs.containsKey("showlist")); 
+		assertTrue(defs.containsKey("report")); 
+		IMacroBinding debug = (IMacroBinding) defs.get("debug"); 
+		assertTrue(new String(debug.getParameterPlaceholderList()[0]).equals("vars")); 
+		assertTrue(new String(debug.getExpansion())
+				.equals("fprintf(stderr, vars)")); 
+		IMacroBinding showlist = (IMacroBinding) defs.get("showlist"); 
+		assertTrue(new String(showlist.getParameterPlaceholderList()[0]).equals("vars")); 
+		assertTrue(new String(showlist.getExpansion()).equals("puts(#vars)")); 
+		IMacroBinding report = (IMacroBinding) defs.get("report"); 
+		assertTrue(new String(report.getParameterPlaceholderList()[0]).equals("test")); 
+		assertTrue(new String(report.getParameterPlaceholderList()[1]).equals("vars")); 
+		assertTrue(new String(report.getExpansion())
+				.equals("((test)?puts(#test): printf(vars))")); 
+
+		check39688Tokens(writer);
+	}
+
+	private void check39688Tokens(Writer writer) throws Exception {
+		initializeScanner(writer.toString());
+
+		validateToken(IToken.t_int);
+		validateIdentifier("main"); 
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tLBRACE);
+
+		validateIdentifier("fprintf"); 
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("stderr"); 
+		validateToken(IToken.tCOMMA);
+		validateString("Flag"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateIdentifier("fprintf"); 
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("stderr"); 
+		validateToken(IToken.tCOMMA);
+		validateString("X = %d\\n"); 
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("x"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateIdentifier("puts"); 
+		validateToken(IToken.tLPAREN);
+		validateString("The first, second, and third items."); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("x"); 
+		validateToken(IToken.tGT);
+		validateIdentifier("y"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tQUESTION);
+		validateIdentifier("puts"); 
+		validateToken(IToken.tLPAREN);
+		validateString("x>y"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tCOLON);
+		validateIdentifier("printf"); 
+		validateToken(IToken.tLPAREN);
+		validateString("x is %d but y is %d"); 
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("x"); 
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("y"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateToken(IToken.t_return);
+		validateInteger("0"); 
+		validateToken(IToken.tSEMI);
+		validateToken(IToken.tRBRACE);
+
+		validateEOF();
+	}
+
+	public void testMacroArgumentExpansion() throws Exception {
+		Writer writer = new StringWriter();
+		writer
+				.write("#define g_return( expr ) ( expr )                                   \n"); 
+		writer
+				.write("#define ETH( obj ) ( CHECK( (obj), boo ) )                          \n"); 
+		writer
+				.write("#define CHECK CHECK_INSTANCE                                        \n"); 
+		writer
+				.write("#define CHECK_INSTANCE( instance, type ) (foo((instance), (type)))  \n"); 
+		writer
+				.write("g_return( ETH(ooga) )                                               \n"); 
+
+		initializeScanner(writer.toString());
+
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("foo"); 
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("ooga"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tCOMMA);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("boo"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+	}
+
+	public void testBug75956() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#define ROPE( name ) name##Alloc\n"); 
+		writer.write("#define _C 040                  \n"); 
+		writer.write("ROPE( _C )                      \n"); 
+
+		initializeScanner(writer.toString());
+		validateIdentifier("_CAlloc"); 
+		validateEOF();
+
+		writer = new StringWriter();
+		writer.write("#define ROPE( name ) Alloc ## name \n"); 
+		writer.write("#define _C 040                     \n"); 
+		writer.write("ROPE( _C )                         \n"); 
+
+		initializeScanner(writer.toString());
+		validateIdentifier("Alloc_C"); 
+		validateEOF();
+
+		writer = new StringWriter();
+		writer.write("#define ROPE( name ) name##Alloc\n"); 
+		writer.write("#define _C 040                  \n"); 
+		writer.write("#define _CAlloc ooga            \n"); 
+		writer.write("ROPE( _C )                      \n"); 
+
+		initializeScanner(writer.toString());
+		validateIdentifier("ooga"); 
+		validateEOF();
+	}
+
+	public void testUnExpandedFunctionMacros() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#define ETH(x) x  \n"); 
+		writer.write("#define E ETH     \n"); 
+		writer.write("ETH( c ), ETH, E; \n"); 
+		initializeScanner(writer.toString());
+		validateIdentifier("c"); 
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("ETH"); 
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("ETH"); 
+		validateToken(IToken.tSEMI);
+		validateEOF();
+	}
+
+	public void testBug79490A() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#define TEST 'n'\n"); 
+		writer.write("#if TEST == 'y'\n"); 
+		writer.write("#define TRUE 1\n"); 
+		writer.write("#else\n"); 
+		writer.write("#define FALSE 1\n"); 
+		writer.write("#endif\n"); 
+		initializeScanner(writer.toString());
+		validateEOF();
+		validateDefinition("TEST", "'n'");  
+		validateDefinition("FALSE", "1");  
+	}
+
+	public void testBug79490B() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#define TEST 'y'\n"); 
+		writer.write("#if TEST == 'y'\n"); 
+		writer.write("#define TRUE 1\n"); 
+		writer.write("#else\n"); 
+		writer.write("#define FALSE 1\n"); 
+		writer.write("#endif\n"); 
+		initializeScanner(writer.toString());
+		validateEOF();
+		validateDefinition("TEST", "'y'");  
+		validateDefinition("TRUE", "1");  
+	}
+
+	public void testBug102568A() throws Exception {
+		initializeScanner("///*\r\nint x;\r\n"); 
+		validateToken(IToken.t_int);
+		validateIdentifier("x"); 
+		validateToken(IToken.tSEMI);
+		validateEOF();
+	}
+
+	public void testBug102568B() throws Exception {
+		initializeScanner("// bla some thing /* ... \r\nint x;\r\n"); 
+		validateToken(IToken.t_int);
+		validateIdentifier("x"); 
+		validateToken(IToken.tSEMI);
+		validateEOF();
+	}
+
+	public void testbug84270() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#define h g( ~\n"); 
+		writer.write("#define g f\n"); 
+		writer.write("#define f(a) f(x * (a))\n"); 
+		writer.write("h 5) \n"); 
+		initializeScanner(writer.toString());
+		fullyTokenize();
+	}
+
+	public void testBug107150() throws Exception {
+		Writer writer = new StringWriter();
+		writer.write("#define FUNC_PROTOTYPE_PARAMS(list)    list\r\n"); 
+		writer.write("int func2 FUNC_PROTOTYPE_PARAMS\r\n"); 
+		writer.write("((int arg1)){\r\n"); 
+		writer.write("    return 0;\r\n"); 
+		writer.write("}\r\n"); 
+		initializeScanner(writer.toString());
+		validateToken(IToken.t_int);
+		validateIdentifier("func2"); 
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.t_int);
+		validateIdentifier("arg1"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tLBRACE);
+		validateToken(IToken.t_return);
+		validateInteger("0"); 
+		validateToken(IToken.tSEMI);
+		validateToken(IToken.tRBRACE);
+		validateEOF();
+
+		writer = new StringWriter();
+		writer.write("#define FUNC_PROTOTYPE_PARAMS(list)    list\n"); 
+		writer.write("int func2 FUNC_PROTOTYPE_PARAMS\n"); 
+		writer.write("((int arg1)){\n"); 
+		writer.write("    return 0;\n"); 
+		writer.write("}\n"); 
+		initializeScanner(writer.toString());
+		validateToken(IToken.t_int);
+		validateIdentifier("func2"); 
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.t_int);
+		validateIdentifier("arg1"); 
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tLBRACE);
+		validateToken(IToken.t_return);
+		validateInteger("0"); 
+		validateToken(IToken.tSEMI);
+		validateToken(IToken.tRBRACE);
+		validateEOF();
+	}
+
+	public void testBug126136() throws Exception {
+		StringBuffer buffer = new StringBuffer("#define C C\n"); 
+		buffer.append("#if !C\n"); 
+		buffer.append("true\n"); 
+		buffer.append("#endif\n"); 
+		initializeScanner(buffer.toString(), ParserLanguage.CPP);
+		fullyTokenize();
+	}
+
+	public void testBug156137() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#if (3 % 2 == 1)                              \n");
+		buffer.append("C                                             \n");
+		buffer.append("#endif                                        \n");
+
+		initializeScanner(buffer.toString());
+		validateIdentifier("C");
+		validateEOF();
+	}
+
+	public void testBug162214() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#ifdef xxx  // is not defined            \n");
+		buffer.append("A                                        \n");
+		buffer.append("#endif                                   \n");
+		buffer.append("B                                        \n");
+
+		initializeScanner(buffer.toString());
+		validateIdentifier("B");
+		validateEOF();
+
+		buffer.setLength(0);
+		buffer.append("#ifdef xxx  //* is not defined           \n");
+		buffer.append("A                                        \n");
+		buffer.append("#endif                                   \n");
+		buffer.append("B                                        \n");
+
+		initializeScanner(buffer.toString());
+		validateIdentifier("B");
+		validateEOF();
+	}
+
+	public void testBug156988() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define a        			\n");
+		buffer.append("#define b \"      		\n");
+		buffer.append("#define c <     			\n");
+		buffer.append("#define d \"\"   			\n");
+		buffer.append("#define e <>      		\n");
+		buffer.append("#define f f     			\n");
+		buffer.append("#define g gg     			\n");
+		buffer.append("#include a                \n");
+		buffer.append("#include b                \n");
+		buffer.append("#include c                \n");
+		buffer.append("#include d                \n");
+		buffer.append("#include e                \n");
+		buffer.append("#include f                \n");
+		buffer.append("#include g                \n");
+		buffer.append("A			                \n");
+
+		initializeScanner(buffer.toString());
+		validateIdentifier("A");
+		validateEOF();
+	}
+
+	public void testBug156988_1() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define a(x) x  			\n");
+		buffer.append("#define b \"      		\n");
+		buffer.append("#define c <     			\n");
+		buffer.append("#define d \"\"   			\n");
+		buffer.append("#define e <>      		\n");
+		buffer.append("#define f f     			\n");
+		buffer.append("#define g gg     			\n");
+		buffer.append("#include a()              \n");
+		buffer.append("#include a(<)             \n");
+		buffer.append("#include a(\"\")          \n");
+		buffer.append("#include a(<>)            \n");
+		buffer.append("#include a(f)             \n");
+		buffer.append("#include a(gg)            \n");
+		buffer.append("#include a(g\\\ng)        \n");
+		buffer.append("A				            \n");
+
+		initializeScanner(buffer.toString());
+		validateIdentifier("A");
+		validateEOF();
+	}
+
+	public void testBug162410() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#pragma message (\"test\") \n");
+		buffer.append("a       		             \n");
+		initializeScanner(buffer.toString());
+		validateIdentifier("a");
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=180172
+	public void testBug180172() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		String value = "\"https://bugs.eclipse.org/bugs/show_bug.cgi?id=180172\"";
+		buffer.append("#define bug180172 ").append(value).append(" // bla \n");
+		initializeScanner(buffer.toString());
+		fullyTokenize();
+		validateDefinition("bug180172", value);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=182180
+	public void testBug182180_1() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#ifdef _bug_182180_\n").append(
+				"printf(\"Hello World /*.ap\\n\");\n").append("#endif\n")
+				.append("bug182180\n");
+		initializeScanner(buffer.toString());
+		validateIdentifier("bug182180");
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=182180
+	public void testBug182180_2() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#ifdef _bug_182180_\n").append(
+				"char c='\"'; printf(\"Hello World /*.ap\\n\");\n").append(
+				"#endif\n").append("bug182180\n");
+		initializeScanner(buffer.toString());
+		validateIdentifier("bug182180");
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=182180
+	public void testBug182180_3() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#ifdef _bug_182180_\n").append(
+				"char c1='\\'',c2='\\\"'; printf(\"Hello World /*.ap\\n\");\n")
+				.append("#endif\n").append("bug182180\n");
+		initializeScanner(buffer.toString());
+		validateIdentifier("bug182180");
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=182180
+	public void testBug182180_4() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#ifdef _bug_182180_\n").append(
+				"printf(\"Hello '\"'World /*.ap\\n\");\n").append("#endif\n")
+				.append("bug182180\n");
+		initializeScanner(buffer.toString());
+		validateIdentifier("bug182180");
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=182180
+	public void testBug182180_5() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#ifdef _bug_182180_\n").append(
+				"printf(\"Hello \\\"World /*.ap\\n\");\n").append("#endif\n")
+				.append("bug182180\n");
+		initializeScanner(buffer.toString());
+		validateIdentifier("bug182180");
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=200830
+	public void testBug200830_1() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define string BROKEN\r\n");
+		buffer.append("#define macro(inst) (char*)inst\r\n");
+		buffer.append("macro(\"string\");\r\n");
+		initializeScanner(buffer.toString());
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.t_char);
+		validateToken(IToken.tSTAR);
+		validateToken(IToken.tRPAREN);
+		validateString("string");
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=200830
+	public void testBug200830_2() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define string BROKEN\r\n");
+		buffer.append("#define macro(inst) (char*)inst\r\n");
+		buffer.append("macro(\" string \");\r\n");
+		initializeScanner(buffer.toString());
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.t_char);
+		validateToken(IToken.tSTAR);
+		validateToken(IToken.tRPAREN);
+		validateString(" string ");
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=200830
+	public void testBug200830_3() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define string BROKEN\r\n");
+		buffer.append("#define macro(inst) (char*)inst\r\n");
+		buffer.append("macro(\"\\\"string \");\r\n");
+		initializeScanner(buffer.toString());
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.t_char);
+		validateToken(IToken.tSTAR);
+		validateToken(IToken.tRPAREN);
+		validateString("\\\"string ");
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=200830
+	public void testBug200830_4() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define s B\r\n");
+		buffer.append("#define macro(inst) (char*)inst\r\n");
+		buffer.append("macro('s');\r\n");
+		initializeScanner(buffer.toString());
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.t_char);
+		validateToken(IToken.tSTAR);
+		validateToken(IToken.tRPAREN);
+		validateChar("s");
+	}
+
+	public void testBug185120_1() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define TEST_DEFINE 1UL\n");
+		buffer.append("#if TEST_DEFINE != 1UL\n");
+		buffer.append("-\n");
+		buffer.append("#else\n");
+		buffer.append("+\n");
+		buffer.append("#endif\n");
+		initializeScanner(buffer.toString());
+		validateToken(IToken.tPLUS);
+	}
+
+	public void testBug185120_2() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("#define TEST_DEFINE 1LLU\n");
+		buffer.append("#if TEST_DEFINE != 1ULL\n");
+		buffer.append("-\n");
+		buffer.append("#else\n");
+		buffer.append("+\n");
+		buffer.append("#endif\n");
+		initializeScanner(buffer.toString());
+		validateToken(IToken.tPLUS);
+	}
+	
+    public void testBug39698() throws Exception	{
+    	initializeScanner( "<? >?"); 
+    	validateToken( IGCCToken.tMIN );
+    	validateToken( IGCCToken.tMAX );
+    	validateEOF();
+	}
+
+    public void test__attribute__() throws Exception {
+    	initializeScanner(
+    			"#define __cdecl __attribute__((cdecl))\n" + 
+				"__cdecl;"); 
+    	validateToken(IGCCToken.t__attribute__);
+    	validateToken(IToken.tLPAREN);
+    	validateToken(IToken.tLPAREN);
+    	validateToken(IToken.tIDENTIFIER);
+    	validateToken(IToken.tRPAREN);
+    	validateToken(IToken.tRPAREN);
+    	validateToken(IToken.tSEMI);
+    	validateEOF();
+	}
+        
+    public void testImaginary() throws Exception {
+        initializeScanner( "3i", ParserLanguage.C ); 
+        validateInteger( "3i" ); 
+        validateEOF();
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorBugsTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorBugsTests.java
new file mode 100644
index 0000000..82eeac7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorBugsTests.java
@@ -0,0 +1,278 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.scanner;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.parser.IProblem;
+import org.eclipse.cdt.core.parser.IToken;
+
+
+/**
+ * Scanner2Tests ported to use the CPreprocessor plus additional bugs fixed in 
+ * the CPreprocessor, afterwards.
+ */
+public class PreprocessorBugsTests extends PreprocessorTestsBase {
+	
+	public static TestSuite suite() {
+		return suite(PreprocessorBugsTests.class);
+	}
+
+	// #define NOP(x)        x
+	// #define CPUINC(cpu)   <NOP(reg)NOP(cpu).sfr>
+	// #include CPUINC(xag4)
+	public void testMacroInInclusion_Bug122891() throws Exception {
+		initializeScanner();
+		validateEOF();
+		validateProblem(0, IProblem.PREPROCESSOR_INCLUSION_NOT_FOUND, "<regxag4.sfr>");
+		validateProblemCount(1);
+	}
+	
+	//	#define FUNKY(x) __##x##__
+	//	#define __foo__ 127
+	//
+	//	#if FUNKY(foo) == 0x7f
+	//	#define MSG "hello"
+	//	#else
+	//	#define MSG "goodbye"
+	//	#endif
+	//  MSG
+	public void testTokenPaste_Bug210344() throws Exception {
+		initializeScanner();
+		validateString("hello");
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	// #ifndef PREFIX
+	// #define PREFIX
+	// #endif
+	// #define STRING(x) #x
+	// #define CONCAT(x,y) STRING(x##y)
+	// #define EXPAND(x,y) CONCAT(x,y)
+	// #define PREFIXED(x) EXPAND(PREFIX,x)
+	// #include PREFIXED(bar.h)
+	public void testEmptyStringInMacroInInclusion_Bug145270() throws Exception {
+		initializeScanner();
+		validateEOF();
+		validateProblem(0, IProblem.PREPROCESSOR_INCLUSION_NOT_FOUND, "\"bar.h\"");
+		validateProblemCount(1);
+	}
+	
+	// #define D
+	// #if defined D 
+	//     x;
+	// #endif 
+	// #if defined(D) 
+	//     y;
+	// #endif 
+	public void testBug186047() throws Exception {
+		initializeScanner();
+		
+		validateIdentifier("x");
+		validateToken(IToken.tSEMI);
+		validateIdentifier("y");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	// __CDT_PARSER__
+	public void testPredefinedCDTMacro_Bug173848() throws Exception {
+		initializeScanner();
+		validateInteger("1");
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	//	#define FOO(ARG) defined(ARG##_BAZ)
+	//	#define BAR_BAZ UNDEFINED
+	//	#if FOO(BAR)
+	//	    juhuu
+	//	#else
+	//	    ojeh
+	//	#endif
+	//  FOO(BAR) // here expansion has to take place
+	//
+	//  #define PLATFORM(WTF_FEATURE) (defined( WTF_PLATFORM_##WTF_FEATURE ) && WTF_PLATFORM_##WTF_FEATURE)
+	//  #define WTF_PLATFORM_FOO 1
+    //  #if PLATFORM(FOO)
+	//  ok
+	//  #endif
+
+	
+	public void testIndirectDefined_Bug225562() throws Exception {
+		initializeScanner();
+		validateIdentifier("juhuu");
+		validateIdentifier("defined");
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("UNDEFINED"); // here the expansion has to take place
+		validateToken(IToken.tRPAREN);
+		
+		validateIdentifier("ok");
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	// "unintentionally unbounded
+	// "
+	//
+	public void testUnboundedEmptyStringLiteral_Bug190884() throws Exception {
+		initializeScanner();
+		validateString("unintentionally unbounded");
+		validateEOF();
+		validateProblemCount(2);
+	}
+	
+	// #if true
+	// yes
+	// #else
+	// no
+	// #endif
+	// #if false
+	// no
+	// #else
+	// yes
+	// #endif
+	public void testTrueInConditionalExpression_Bug246369() throws Exception {
+		initializeScanner();
+		validateIdentifier("yes");
+		validateIdentifier("yes");
+		validateEOF();
+		validateProblemCount(0);
+	}
+
+	// #if if
+	// no
+	// #else
+	// yes
+	// #endif
+	// #if or
+	// no
+	// #endif
+	public void testKeywordsInConditionalExpression_Bug246369() throws Exception {
+		initializeScanner();
+		validateIdentifier("yes");
+		validateEOF();
+		validateProblemCount(1);
+		validateProblem(0, IProblem.SCANNER_EXPRESSION_SYNTAX_ERROR, null);
+	}
+	
+	//	#define BAR1_RX_BLOCK_SIZE 1
+	//	#define MAX(__x,__y) ((__x)>(__y)?(__x):(__y))
+	//	#define BAR_BLOCK_SIZE    (MAX(BAR1_RX_BLOCK_SIZE, 
+	//	int main(void) {
+	//	   BAR_BLOCK_SIZE;
+	//	}
+	public void testMissingClosingParenthesis_Bug251734() throws Exception {
+		initializeScanner();
+		validateToken(IToken.t_int);
+		validateIdentifier("main");
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.t_void);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tLBRACE);
+		validateToken(IToken.tLPAREN);
+		validateEOF();
+		validateProblemCount(1);
+		validateProblem(0, IProblem.PREPROCESSOR_MISSING_RPAREN_PARMLIST, null);
+	}
+
+	//  /**/ #if 0
+	//  bug
+	//  /**/ #endif
+	//  passed
+	//
+	//  /*
+	//   */ #if 0
+	//  bug
+	//  /**/ #endif
+	//  passed
+	//
+	//	#if 0
+	//	/**/ #else
+	//	OK1
+	//	#endif
+	//
+	//	#if 0
+	//	/*
+	//   */ #else
+	//	OK2
+	//	#endif
+	//
+	//	#if 0
+	//	a /**/ #else
+	//	bug
+	//	#endif
+	//  passed
+	//
+	//	#if 0
+	//	a /*
+	//     */ #else   // interesting, gcc ignores this directive, we mimic the behavior
+	//	bug
+	//	#endif
+	//  passed
+	public void testCommentBeforeDirective_Bug255318() throws Exception {
+		initializeScanner();
+		validateIdentifier("passed");
+		validateIdentifier("passed");
+		validateIdentifier("OK1");
+		validateIdentifier("OK2");
+		validateIdentifier("passed");
+		validateIdentifier("passed");
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	//	#define ID(x) x
+	//	ID(
+	//	#include "bbb"
+	//	) 
+	//  passed1
+	//
+	//  ID(
+	//	#if ID(b)
+	//	#elif ID(c)
+	//	#else
+	//		d
+	//	#endif
+	//	)
+	//  passed2
+	//  ID(
+	//	#if 0
+	//	#include "bbb"
+	//	#endif
+	//	)
+	//  passed3
+	public void testDirectiveInExpansion_Bug240194() throws Exception {
+		initializeScanner();
+		validateIdentifier("passed1");
+		validateIdentifier("d");
+		validateIdentifier("passed2");
+		validateIdentifier("passed3");
+		validateEOF();
+		validateProblemCount(2);  // the inclusions
+	}
+	
+	// #if 0xe000
+	// ok
+	// #endif
+	// 0x1p2 0xe0
+	public void testHexConstant_Bug265927() throws Exception {
+		initializeScanner();
+		validateIdentifier("ok");
+		validateFloatingPointLiteral("0x1p2");
+		validateInteger("0xe0");
+		validateEOF();
+		validateProblemCount(0); 
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorSpeedTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorSpeedTest.java
new file mode 100644
index 0000000..a8e953d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorSpeedTest.java
@@ -0,0 +1,220 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.scanner;
+
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.eclipse.cdt.core.dom.ICodeReaderFactory;
+import org.eclipse.cdt.core.dom.parser.IScannerExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.GCCScannerExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.GPPScannerExtensionConfiguration;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.EndOfFileException;
+import org.eclipse.cdt.core.parser.IScannerInfo;
+import org.eclipse.cdt.core.parser.IToken;
+import org.eclipse.cdt.core.parser.NullLogService;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.ParserMode;
+import org.eclipse.cdt.core.parser.ScannerInfo;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTranslationUnit;
+import org.eclipse.cdt.internal.core.parser.scanner.CPreprocessor;
+
+public class PreprocessorSpeedTest  {
+	
+	private PrintStream stream;
+
+	public static void main(String[] args) {
+		try {
+			PrintStream stream = null;
+			if (args.length > 0)
+				stream = new PrintStream(new FileOutputStream(args[0]));
+
+			new PreprocessorSpeedTest().runTest(stream, 30);
+		} catch (Exception e) {
+			System.out.println(e);
+		}
+	}
+
+	public void test() throws Exception {
+		runTest(10);
+	}
+
+	public void runTest(PrintStream stream, int n) throws Exception {
+		this.stream = stream;
+		runTest(n);
+	}
+	
+	private void runTest(int n) throws Exception {
+		String code = 
+			"#include <windows.h>\n" +
+			"#include <stdio.h>\n" +
+			"#include <iostream>\n";
+		
+		CodeReader reader = new CodeReader(code.toCharArray());
+		IScannerInfo info = getScannerInfo();
+		long totalTime = 0;
+		for (int i = 0; i < n; ++i) {
+			long time = testScan(reader, false, info, ParserLanguage.CPP);
+			if (i > 0)
+				totalTime += time;
+		}
+		
+		if (n > 1) {
+			System.out.println("Average Time: " + (totalTime / (n - 1)) + " millisecs");
+		}
+	}
+
+	protected long testScan(CodeReader reader, boolean quick, IScannerInfo info, ParserLanguage lang) throws Exception {
+		ICodeReaderFactory readerFactory= FileCodeReaderFactory.getInstance();
+		IScannerExtensionConfiguration scannerConfig;
+	    if (lang == ParserLanguage.C) {
+	    	scannerConfig= GCCScannerExtensionConfiguration.getInstance();
+	    }
+	    else {
+	    	scannerConfig= GPPScannerExtensionConfiguration.getInstance();
+	    }
+		ParserMode mode = ParserMode.COMPLETE_PARSE;
+		CPreprocessor cpp= new CPreprocessor(reader, info, lang, new NullLogService(), scannerConfig, readerFactory);
+		cpp.getLocationMap().setRootNode(new CPPASTTranslationUnit());
+		long startTime = System.currentTimeMillis();
+		int count = 0;
+		try {
+			while (true) {
+					IToken t = cpp.nextToken();
+					
+					if (stream != null)
+						stream.println(t.getImage());
+					
+					if (t == null)
+						break;
+					++count;
+				
+			}
+		} catch (EndOfFileException e2) {
+		}
+		long totalTime = System.currentTimeMillis() - startTime;
+		System.out.println( "Resulting scan took " + totalTime + " millisecs " +
+				count + " tokens");
+		return totalTime;
+	}
+	
+	protected IScannerInfo getScannerInfo() {
+		String config = System.getProperty("speedTest.config"); 
+
+		if (config == null)
+			return mingwScannerInfo();
+
+		if (config.equals("msvc"))
+			return msvcScannerInfo();
+		else if (config.equals("msvc98"))
+			return msvc98ScannerInfo();
+		else if (config.equals("ydl"))
+			return ydlScannerInfo();
+		else
+			return mingwScannerInfo();
+	}
+
+	private IScannerInfo msvcScannerInfo() {
+		Map definitions = new Hashtable();
+		//definitions.put( "__GNUC__", "3" );  //$NON-NLS-1$ //$NON-NLS-2$
+
+		String [] includePaths = new String[] {
+			"C:\\Program Files\\Microsoft SDK\\Include",
+			"C:\\Program Files\\Microsoft Visual C++ Toolkit 2003\\include"
+		};
+		return new ScannerInfo( definitions, includePaths );
+	}
+
+	protected IScannerInfo msvc98ScannerInfo() {
+		Map definitions = new Hashtable();
+		String [] includePaths = new String[] {
+			"C:\\Program Files\\Microsoft Visual Studio\\VC98\\Include"
+		};
+		return new ScannerInfo( definitions, includePaths );
+	}
+	
+	protected IScannerInfo mingwScannerInfo() {
+		// TODO It would be easier and more flexible if we used discovery for this
+		Map definitions = new Hashtable();
+		definitions.put("__GNUC__", "3");
+		definitions.put("__GNUC_MINOR__", "2");
+		definitions.put("__GNUC_PATCHLEVEL__", "3");
+		definitions.put("__GXX_ABI_VERSION", "102");
+		definitions.put("_WIN32", "");
+		definitions.put("__WIN32", "");
+		definitions.put("__WIN32__", "");
+		definitions.put("WIN32", "");
+		definitions.put("__MINGW32__", "");
+		definitions.put("__MSVCRT__", "");
+		definitions.put("WINNT", "");
+		definitions.put("_X86_", "1");
+		definitions.put("__WINNT", "");
+		definitions.put("_NO_INLINE__", "");
+		definitions.put("__STDC_HOSTED__", "1");
+		definitions.put("i386", "");
+		definitions.put("__i386", "");
+		definitions.put("__i386__", "");
+		definitions.put("__tune_i586__", "");
+		definitions.put("__tune_pentium__", "");
+		definitions.put("__stdcall", "__attribute__((__stdcall__))");
+		definitions.put("__cdecl", "__attribute__((__cdecl__))");
+		definitions.put("__fastcall", "__attribute__((__fastcall__))");
+		definitions.put("_stdcall", "__attribute__((__stdcall__))");
+		definitions.put("_cdecl", "__attribute__((__cdecl__))");
+		definitions.put("_fastcall", "__attribute__((__fastcall__))");
+		definitions.put("__declspec(x)", "__attribute__((x))");
+		definitions.put("__DEPRECATED", "");
+		definitions.put("__EXCEPTIONS", "");
+		
+		String [] includePaths = new String[] {
+			"c:/mingw/include/c++/3.2.3",
+			"c:/mingw/include/c++/3.2.3/mingw32",
+			"c:/mingw/include/c++/3.2.3/backward",
+			"c:/mingw/include",
+			"c:/mingw/lib/gcc-lib/mingw32/3.2.3/include"
+		};
+
+		return new ScannerInfo( definitions, includePaths );
+	}
+
+	protected IScannerInfo ydlScannerInfo() {
+		// TODO It would be easier and more flexible if we used discovery for this
+		Map definitions = new Hashtable();
+		definitions.put("__GNUC__", "3");
+		definitions.put("__GNUC_MINOR__", "3");
+		definitions.put("__GNUC_PATCHLEVEL__", "3");
+		definitions.put("_GNU_SOURCE", "");
+		definitions.put("__unix__", "");
+		definitions.put("__gnu_linux__", "");
+		definitions.put("__linux__", "");
+		definitions.put("unix", "");
+		definitions.put("__unix", "");
+		definitions.put("linux", "");
+		definitions.put("__linux", "");
+		definitions.put("__GNUG__", "3");
+		
+		String [] includePaths = new String[] {
+			"/usr/include/g++",
+			"/usr/include/g++/powerpc-yellowdog-linux",
+			"/usr/include/g++/backward",
+			"/usr/local/include",
+			"/usr/lib/gcc-lib/powerpc-yellowdog-linux/3.3.3/include",
+			"/usr/include"
+		};
+
+		return new ScannerInfo( definitions, includePaths );
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorTests.java
new file mode 100644
index 0000000..12693db
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorTests.java
@@ -0,0 +1,1365 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.scanner;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.parser.IProblem;
+import org.eclipse.cdt.core.parser.IToken;
+
+
+/**
+ * Scanner2Tests ported to use the CPreprocessor
+ */
+public class PreprocessorTests extends PreprocessorTestsBase {
+	
+	public static TestSuite suite() {
+		return suite(PreprocessorTests.class);
+	}
+
+	// #define f(x) x+x
+	// #define obj_f f
+	// #define obj_fx f x
+	// #define obj_fopen f (
+	// obj_f 
+	// (y)
+	// obj_f
+	// y
+	// obj_fx
+	// (y)
+	// obj_fopen y)
+	public void testParenthesisOnNextLine() throws Exception {
+		initializeScanner();
+		validateIdentifier("y");
+		validateToken(IToken.tPLUS);
+		validateIdentifier("y");
+
+		validateIdentifier("f");
+		validateIdentifier("y");
+
+		validateIdentifier("f");
+		validateIdentifier("x");
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("y");
+		validateToken(IToken.tRPAREN);
+		
+		validateIdentifier("y");
+		validateToken(IToken.tPLUS);
+		validateIdentifier("y");
+		validateEOF();
+	}
+	
+	// #define f(x) x
+	// f(f(x));
+	// f(f);
+	// f(f)(x);
+	public void testRecursiveInArgument() throws Exception {
+		initializeScanner();
+		validateIdentifier("x");
+		validateToken(IToken.tSEMI);
+
+		validateIdentifier("f");
+		validateToken(IToken.tSEMI);
+		
+		validateIdentifier("f");
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("x");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+	}
+	
+	
+	// #define f(x) x
+	// f(f(
+	public void testMissingParenthesis() throws Exception {
+		initializeScanner();
+		validateEOF();
+		validateProblemCount(1);
+		validateProblem(0, IProblem.PREPROCESSOR_MISSING_RPAREN_PARMLIST, "f");
+	}
+	
+	// #define b(x) ok
+	// #define step1 b
+	// #define step2 step1 (x)
+	// step2
+	public void testSpaceBeforeParenthesis() throws Exception {
+		initializeScanner();
+		validateIdentifier("ok");
+		validateEOF();
+	}
+	
+	// #define m1(x) a1
+	// #define m2(x...) a2
+	// m1(1,2);
+	// m2(1,2);
+	public void testSuperfluousComma() throws Exception {
+		initializeScanner();
+		validateIdentifier("a1");
+		validateInteger("2");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateIdentifier("a2");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(1);
+		validateProblem(0, IProblem.PREPROCESSOR_MACRO_USAGE_ERROR, "m1");
+	}
+
+	// #define str(x,y) #x#y
+	//	str(a,b );
+	//	str( a,b);
+	//	str(a a,b);
+	//	str(a, b);
+	public void testSpaceInArgs() throws Exception {
+		initializeScanner();
+		validateString("ab");
+		validateToken(IToken.tSEMI);
+
+		validateString("ab");
+		validateToken(IToken.tSEMI);
+
+		validateString("a ab");
+		validateToken(IToken.tSEMI);
+
+		validateString("ab");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+
+	// #define str(x) #x
+	// #define m0( )    a0
+	// #define m1(x)    str( .x. )
+	// #define m2(x,y)  str( .x.y. )
+	// #define open0 m0(
+	// #define open1 m1(
+	// #define open2 m2(
+	// open0 );
+	// open1 a );
+	// open2 a , b c );
+	public void testSpaceInArgsViaOpenMacro() throws Exception {
+		initializeScanner();
+		validateIdentifier("a0");
+		validateToken(IToken.tSEMI);
+
+		validateString(".a.");
+		validateToken(IToken.tSEMI);
+
+		validateString(".a.b c.");
+		validateToken(IToken.tSEMI);
+
+		validateEOF();
+		validateProblemCount(0);
+	}
+
+	// #define str(x) #x
+	// #define m0( )    a0
+	// #define m1(x)    str(.x.)
+	// #define m2(x,y)  str(.x.y.)
+	// #define _a a
+	// #define _b b
+	// #define _c c
+	// #define use0 m0( )
+	// #define use1 m1( _a )
+	// #define use2 m2( _a , _b _c )
+	// use0;
+	// use1;
+	// use2;
+	public void testSpaceInArgsViaExpansion() throws Exception {
+		initializeScanner();
+		validateIdentifier("a0");
+		validateToken(IToken.tSEMI);
+
+		validateString(".a.");
+		validateToken(IToken.tSEMI);
+
+		validateString(".a.b c.");
+		validateToken(IToken.tSEMI);
+
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	// #define m0() a
+	// m0;
+	// m0();
+	// m0( );
+	// m0(x);
+	public void testFunctionStyleWithoutArgs() throws Exception {
+		initializeScanner();
+		validateIdentifier("m0");
+		validateToken(IToken.tSEMI);
+
+		validateIdentifier("a");
+		validateToken(IToken.tSEMI);
+
+		validateIdentifier("a");
+		validateToken(IToken.tSEMI);
+
+		validateIdentifier("a");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateEOF();
+		validateProblemCount(1);
+		validateProblem(0, IProblem.PREPROCESSOR_MACRO_USAGE_ERROR, "m0");
+	}
+	
+	// #define tp(x,y) #x##y
+	// tp(a, );
+	// tp(a,b);
+	public void testStringifyAndPaste() throws Exception {
+		initializeScanner();
+		validateString("a");
+		validateToken(IToken.tSEMI);
+
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(1);
+		validateProblem(0, IProblem.PREPROCESSOR_MACRO_PASTING_ERROR, "tp");
+	}
+	
+	// #define tp(x,y) x##y
+	// tp(a, b c);
+	// tp(a b,c);
+	public void testPasteMultipleTokens() throws Exception {
+		initializeScanner();
+		validateIdentifier("ab");
+		validateIdentifier("c");
+		validateToken(IToken.tSEMI);
+
+		validateIdentifier("a");
+		validateIdentifier("bc");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+
+	// #define obj a b ## c ## d e
+	// obj;
+	public void testObjectStyleTokenPaste() throws Exception {
+		initializeScanner();
+		validateIdentifier("a");
+		validateIdentifier("bcd");
+		validateIdentifier("e");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	// #define variadic(x...) (a, ##x)
+	// variadic();
+	// variadic(b);
+	// variadic(c,d);
+	public void testGccVariadicMacroExtensions() throws Exception {
+		initializeScanner();
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("a");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("a");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("b");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("a");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("c");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("d");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+
+	// #define variadic(x...) (a, ##x)
+	// #define _c c
+	// variadic();
+	// variadic(_c);
+	// variadic(_c,_c);
+	public void testGccVariadicMacroExtensions2() throws Exception {
+		initializeScanner();
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("a");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("a");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("c");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("a");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("c");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("c");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+
+	// #define variadic(y, x...) (a, ##x)
+	// #define _c c
+	// variadic(1);
+	// variadic(,_c);
+	// variadic(,_c,_c);
+	public void testGccVariadicMacroExtensions3() throws Exception {
+		initializeScanner();
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("a");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("a");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("c");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("a");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("c");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("c");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateEOF();
+		validateProblemCount(0);
+	}
+
+	// #define str(x) #x
+	// str();
+	public void testEmptyStringify() throws Exception {
+		initializeScanner();
+		validateString("");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	// #define tp(x,y) x##y
+	// #define _p p
+	// tp(_p,);
+	// tp(_p, a);
+	public void testRescanAfterTokenPaste() throws Exception {
+		initializeScanner();
+		validateIdentifier("p");
+		validateToken(IToken.tSEMI);
+
+		validateIdentifier("_pa");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	// #define vararg(a, ...) (__VA_ARGS__)
+	// vararg();
+	// vararg( );
+	// vararg(a);
+	// vararg(a,b);
+	// vararg(a, ,c);
+	public void testVaargs() throws Exception {
+		initializeScanner();
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("b");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("c");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	// #define OBJ __VA_ARGS__
+	// #define func(x) __VA_ARGS__
+	// OBJ;
+	// func(a);
+	public void testVaargsWarning() throws Exception {
+		initializeScanner();
+		validateIdentifier("__VA_ARGS__");
+		validateToken(IToken.tSEMI);
+
+		validateIdentifier("__VA_ARGS__");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		// gcc actually warns about using __VA_ARGS__ in object-style macros too. 
+		validateProblemCount(1);
+		validateProblem(0, IProblem.PREPROCESSOR_INVALID_VA_ARGS, null);
+	}
+	
+	// #define str(x) #x
+	// #define _p p
+	// #define obj str(_p)  // str is expanded before _p is rescanned.
+	// obj;
+	public void testRescanOrder() throws Exception {
+		initializeScanner();
+		validateString("_p");
+		validateToken(IToken.tSEMI);
+
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	// #define obj #str
+	// obj;
+	public void testStringifyOperatorInObject() throws Exception { 
+		initializeScanner();
+		validateToken(IToken.tPOUND);
+		validateIdentifier("str");
+		validateToken(IToken.tSEMI);
+
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	// #define str(x) #x
+	// #define open_str() str(a
+	// open_str()b);
+	public void testOpenStringify() throws Exception { 
+		initializeScanner();
+		validateString("ab");
+		validateToken(IToken.tSEMI);
+
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+    // #define ONE(a, ...) int x
+    // #define TWO(b, args...) int y
+    // ONE("string"); 
+    // TWO("string"); 
+    public void testSkippingVarags() throws Exception {
+		initializeScanner();
+		validateToken(IToken.t_int);
+		validateIdentifier("x");
+		validateToken(IToken.tSEMI);
+		
+		validateToken(IToken.t_int);
+		validateIdentifier("y");
+		validateToken(IToken.tSEMI);
+
+		validateEOF();
+		validateProblemCount(0);
+    }
+    
+    // #define eval(f,x) f(x)
+    // #define m(x) m[x]
+    // eval(m,y);
+    public void testReconsiderArgsForExpansion() throws Exception {
+		initializeScanner();
+		validateIdentifier("m");
+		validateToken(IToken.tLBRACKET);
+		validateIdentifier("y");
+		validateToken(IToken.tRBRACKET);
+		validateToken(IToken.tSEMI);
+
+		validateEOF();
+		validateProblemCount(0);
+    }
+    
+    //#define f\
+    //(x) ok
+    // f(x)
+    public void testLineSpliceInMacroDefinition() throws Exception {
+		initializeScanner();
+		validateIdentifier("ok");
+		validateEOF();
+		validateProblemCount(0);
+    }
+    
+    // #define f() fval
+    // #define nospace f()f()
+    // #define space f() f()
+    // #define str(x) #x
+    // #define xstr(x) str(x)
+    // #define tp1(x,y,z) [x ## y ## z]
+    // #define tp2(x,y,z) [ x ## y ## z ]
+    // #define tstr1(x,y) [#x#y]
+    // #define tstr2(x,y) [ #x #y ]
+    // #define spaceBeforeStr(x) a #x b
+    // xstr(nospace);
+    // xstr(space);
+    // xstr(tp1(a b, c d , e f));
+    // xstr(tp2(a b, c d , e f));
+    // xstr(tp1(a-b, c-d , e-f));
+    // xstr(tp2(a-b, c-d , e-f));
+    // xstr(tstr1(a b, c d));
+    // xstr(tstr2(a b, c d));
+    // xstr(spaceBeforeStr(c));
+    public void testSpaceInStringify() throws Exception {
+		initializeScanner();
+		validateString("fvalfval");
+		validateToken(IToken.tSEMI);
+		
+		validateString("fval fval");
+		validateToken(IToken.tSEMI);
+		
+		validateString("[a bc de f]");
+		validateToken(IToken.tSEMI);
+		
+		validateString("[ a bc de f ]");
+		validateToken(IToken.tSEMI);
+
+		validateString("[a-bc-de-f]");
+		validateToken(IToken.tSEMI);
+		
+		validateString("[ a-bc-de-f ]");
+		validateToken(IToken.tSEMI);
+
+		validateString("[\\\"a b\\\"\\\"c d\\\"]");
+		validateToken(IToken.tSEMI);
+
+		validateString("[ \\\"a b\\\" \\\"c d\\\" ]");
+		validateToken(IToken.tSEMI);
+
+		validateString("a \\\"c\\\" b");
+		validateToken(IToken.tSEMI);
+
+		validateEOF();
+		validateProblemCount(0);
+    }
+
+    // #define empty
+    // #define paste1(y) x##y z
+    // #define paste2(x) x##empty z
+    // paste1();
+    // paste1(empty);
+    // paste2();
+    // paste2(empty);
+    // paste2(a);
+    public void testTokenPasteWithEmptyParam() throws Exception {
+		initializeScanner();
+		validateIdentifier("x");
+		validateIdentifier("z");
+		validateToken(IToken.tSEMI);
+		
+		validateIdentifier("xempty");
+		validateIdentifier("z");
+		validateToken(IToken.tSEMI);
+		
+		validateIdentifier("z");
+		validateToken(IToken.tSEMI);
+		
+		validateIdentifier("emptyempty");
+		validateIdentifier("z");
+		validateToken(IToken.tSEMI);
+
+		validateIdentifier("aempty");
+		validateIdentifier("z");
+		validateToken(IToken.tSEMI);
+
+		validateEOF();
+		validateProblemCount(0);    	
+    }
+    
+    // #define empty
+    // #define paste1(y) x##y z
+    // #define paste2(x) x##empty z
+    // paste1();
+    // paste1(empty);
+    // paste2();
+    // paste2(empty);
+    // paste2(a);
+    public void testSpacesBeforeStringify() throws Exception {
+		initializeScanner();
+		validateIdentifier("x");
+		validateIdentifier("z");
+		validateToken(IToken.tSEMI);
+		
+		validateIdentifier("xempty");
+		validateIdentifier("z");
+		validateToken(IToken.tSEMI);
+		
+		validateIdentifier("z");
+		validateToken(IToken.tSEMI);
+		
+		validateIdentifier("emptyempty");
+		validateIdentifier("z");
+		validateToken(IToken.tSEMI);
+
+		validateIdentifier("aempty");
+		validateIdentifier("z");
+		validateToken(IToken.tSEMI);
+
+		validateEOF();
+		validateProblemCount(0);    	
+    }
+
+    // #define paste(x,y,z) x##y##z
+    // paste(a,b,c);
+    // paste(1,2,3);
+    public void testTokenPasteChain() throws Exception {
+    	initializeScanner();
+		validateIdentifier("abc");
+		validateToken(IToken.tSEMI);
+
+		validateInteger("123");
+		validateToken(IToken.tSEMI);
+
+		validateEOF();
+		validateProblemCount(0);    	    	
+    }
+    
+    
+	// #define A(x,y,z) x + y + z
+	// #define _t t
+	// A ( _t , , _t )
+    public void testEmptyToken() throws Exception {
+    	initializeScanner();
+    	validateIdentifier("t");
+		validateToken(IToken.tPLUS);
+		validateToken(IToken.tPLUS);
+    	validateIdentifier("t");
+    }
+
+    
+    // #define FOO 5
+    // # define BAR 10
+    // int x = FOO + BAR;
+    public void testSimpleObjectLike1() throws Exception {
+    	initializeScanner();
+    	validateToken(IToken.t_int);
+    	validateIdentifier("x");
+    	validateToken(IToken.tASSIGN);
+    	validateInteger("5");
+    	validateToken(IToken.tPLUS);
+    	validateInteger("10");
+    	validateToken(IToken.tSEMI);
+    	validateEOF();
+		validateProblemCount(0);
+	}
+	
+    // #define FOO BAR
+    // # define BAR 10
+    // int x = BAR;
+	public void testSimpleObjectLike2() throws Exception {
+		initializeScanner();
+		validateToken(IToken.t_int);
+		validateIdentifier("x");
+		validateToken(IToken.tASSIGN);
+		validateInteger("10");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	// #define MAX(a, b) (a) > (b) ? (a) : (b)
+	// int max = MAX(x, y);
+	public void testSimpleFunctionLike1() throws Exception {
+		// int max = (x) > (y) ? (x) : (y);
+		initializeScanner();
+
+		validateToken(IToken.t_int);
+		validateIdentifier("max");
+		validateToken(IToken.tASSIGN);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("x");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tGT);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("y");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tQUESTION);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("x");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tCOLON);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("y");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	// #define ADD(a, b) (a) + (b)
+	// #define ADDPART(a) ADD(a
+	// int sum = ADDPART (x) , y);
+	public void testSimpleFunctionLike2() throws Exception {
+		// int sum = (x) + (y) ;
+		initializeScanner();
+
+		validateToken(IToken.t_int);
+		validateIdentifier("sum");
+		validateToken(IToken.tASSIGN);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("x");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tPLUS);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("y");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	// #define ADD(a, b) (a) + (b)
+	// int sum = ADD(x+1,y+1);
+	public void testSimpleFunctionLike3() throws Exception {
+		// int sum = (x+1) + (y+1) ;
+		initializeScanner();
+		
+		validateToken(IToken.t_int);
+		validateIdentifier("sum");
+		validateToken(IToken.tASSIGN);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("x");
+		validateToken(IToken.tPLUS);
+		validateInteger("1");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tPLUS);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("y");
+		validateToken(IToken.tPLUS);
+		validateInteger("1");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	// #define ADD(a, b) (a) + (b)
+	// int sum = ADD(f(x,y),z+1);
+	public void testSimpleFunctionLike4() throws Exception {
+		// int sum = (f(x,y)) + (z+1) ;
+		initializeScanner();
+		
+		validateToken(IToken.t_int);
+		validateIdentifier("sum");
+		validateToken(IToken.tASSIGN);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("f");
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("x");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("y");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tPLUS);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("z");
+		validateToken(IToken.tPLUS);
+		validateInteger("1");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	// #define hash_hash # ## #
+	// #define mkstr(a) # a
+	// #define in_between(a) mkstr(a)
+	// #define join(c, d) in_between(c hash_hash d)
+	// char p[] = join(x, y); 
+	public void testSpecHashHashExample() throws Exception {
+		// char p[] = "x ## y" ;
+		initializeScanner();
+		
+		validateToken(IToken.t_char);
+		validateIdentifier("p");
+		validateToken(IToken.tLBRACKET);
+		validateToken(IToken.tRBRACKET);
+		validateToken(IToken.tASSIGN);
+		validateString("x ## y");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	private static StringBuffer getExample3Defines() {
+		return new StringBuffer()
+			.append("#define x 3 \n")
+			.append("#define f(a) f(x * (a)) \n")
+			.append("#undef x \n")
+			.append("#define x 2 \n")
+			.append("#define g f \n")
+			.append("#define z z[0] \n")
+			.append("#define h g(~ \n")
+			.append("#define m(a) a(w) \n")
+			.append("#define w 0,1 \n")
+			.append("#define t(a) a \n")
+			.append("#define p() int \n")
+			.append("#define q(x) x \n")
+			.append("#define r(x,y) x ## y \n")
+			.append("#define str(x) # x \n");
+	}
+	
+	
+	
+	public void testSpecExample3_1() throws Exception {
+		StringBuffer sb = getExample3Defines();
+		sb.append("f(y+1) + f(f(z)) % t(t(g)(0) + t)(1); \n"); 
+		
+		// f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);
+		initializeScanner(sb.toString());
+		
+		validateIdentifier("f");
+		validateToken(IToken.tLPAREN);
+		validateInteger("2");
+		validateToken(IToken.tSTAR);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("y");
+		validateToken(IToken.tPLUS);
+		validateInteger("1");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tPLUS);
+		validateIdentifier("f");
+		validateToken(IToken.tLPAREN);
+		validateInteger("2");
+		validateToken(IToken.tSTAR);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("f");
+		validateToken(IToken.tLPAREN);
+		validateInteger("2");
+		validateToken(IToken.tSTAR);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("z");
+		validateToken(IToken.tLBRACKET);
+		validateInteger("0");
+		validateToken(IToken.tRBRACKET);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tMOD);
+		validateIdentifier("f");
+		validateToken(IToken.tLPAREN);
+		validateInteger("2");
+		validateToken(IToken.tSTAR);
+		validateToken(IToken.tLPAREN);
+		validateInteger("0");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tPLUS);
+		validateIdentifier("t");
+		validateToken(IToken.tLPAREN);
+		validateInteger("1");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	public void testSpecExample3_2() throws Exception {
+		StringBuffer sb = getExample3Defines();
+		sb.append("g(x+(3,4)-w) | h 5) & m (f)^m(m); \n");
+		
+		// f(2 * (2+(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1); //47
+		initializeScanner(sb.toString());
+		
+		validateIdentifier("f");
+		validateToken(IToken.tLPAREN);
+		validateInteger("2");
+		validateToken(IToken.tSTAR);
+		validateToken(IToken.tLPAREN);
+		validateInteger("2");
+		validateToken(IToken.tPLUS);
+		validateToken(IToken.tLPAREN);
+		validateInteger("3");
+		validateToken(IToken.tCOMMA);
+		validateInteger("4");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tMINUS);
+		validateInteger("0");
+		validateToken(IToken.tCOMMA);
+		validateInteger("1");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tBITOR);
+		validateIdentifier("f");
+		validateToken(IToken.tLPAREN);
+		validateInteger("2");
+		validateToken(IToken.tSTAR);
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.tBITCOMPLEMENT);
+		validateInteger("5");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tAMPER);
+		validateIdentifier("f");
+		validateToken(IToken.tLPAREN);
+		validateInteger("2");
+		validateToken(IToken.tSTAR);
+		validateToken(IToken.tLPAREN);
+		validateInteger("0");
+		validateToken(IToken.tCOMMA);
+		validateInteger("1");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tXOR);
+		validateIdentifier("m");
+		validateToken(IToken.tLPAREN);
+		validateInteger("0");
+		validateToken(IToken.tCOMMA);
+		validateInteger("1");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	
+	public void testSpecExample3_3() throws Exception {
+		StringBuffer sb = getExample3Defines();
+		sb.append("p() i[q()] = { q(1), r(2,3), r(4,), r(,5), r(,) }; \n");
+		
+		// int i[] = { 1, 23, 4, 5, };
+		initializeScanner(sb.toString());
+		
+		validateToken(IToken.t_int);
+		validateIdentifier("i");
+		validateToken(IToken.tLBRACKET);
+		validateToken(IToken.tRBRACKET);
+		validateToken(IToken.tASSIGN);
+		validateToken(IToken.tLBRACE);
+		validateInteger("1");
+		validateToken(IToken.tCOMMA);
+		validateInteger("23");
+		validateToken(IToken.tCOMMA);
+		validateInteger("4");
+		validateToken(IToken.tCOMMA);
+		validateInteger("5");
+		validateToken(IToken.tCOMMA);
+		validateToken(IToken.tRBRACE);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	public void testSpecExample3_4() throws Exception {
+		StringBuffer sb = getExample3Defines();
+		sb.append("char c[2][6] = { str(hello), str() }; \n");   //31
+		
+		// char c[2][6] = { "hello", "" }; //15
+		initializeScanner(sb.toString());
+
+		validateToken(IToken.t_char);
+		validateIdentifier("c");
+		validateToken(IToken.tLBRACKET);
+		validateInteger("2");
+		validateToken(IToken.tRBRACKET);
+		validateToken(IToken.tLBRACKET);
+		validateInteger("6");
+		validateToken(IToken.tRBRACKET);
+		validateToken(IToken.tASSIGN);
+		validateToken(IToken.tLBRACE);
+		validateString("hello");
+		validateToken(IToken.tCOMMA);
+		validateString("");
+		validateToken(IToken.tRBRACE);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	private static StringBuffer getExample4Defines() {
+		return new StringBuffer()
+			.append("#define str(s) # s \n")
+			.append("#define xstr(s) str(s) \n")
+			.append("#define debug(s, t) printf(\"x\" # s \"= %d, x\" # t \"= %s\", \\ \n")
+			.append("x ## s, x ## t) \n")
+			.append("#define INCFILE(n) vers ## n \n")
+			.append("#define glue(a, b) a ## b \n")
+			.append("#define xglue(a, b) glue(a, b) \n")
+			.append("#define HIGHLOW \"hello\" \n")
+			.append("#define LOW LOW \", world\" \n");
+	}
+	
+
+	public void testSpecExample4_1() throws Exception {
+		StringBuffer sb = getExample4Defines();
+		sb.append("debug(1, 2); \n");  //31
+		
+		// printf("x1= %d, x2= %s", x1, x2); // 9
+		initializeScanner(sb.toString());
+		
+		validateIdentifier("printf");
+		validateToken(IToken.tLPAREN);
+		validateString("x1= %d, x2= %s");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("x1");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("x2");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	public void testSpecExample4_2() throws Exception {
+		StringBuffer sb = getExample4Defines();
+		sb.append("fputs(str(strncmp(\"abc\\0d\", \"abc\", '\\4') // this goes away   \n");
+		sb.append("== 0) str(: @\\n), s); \n");
+		
+		// fputs( "strncmp(\"abc\\0d\", \"abc\", '\\4') == 0: @\n", s); // 7
+		initializeScanner(sb.toString());
+		
+		validateIdentifier("fputs");
+		validateToken(IToken.tLPAREN);
+		validateString("strncmp(\\\"abc\\\\0d\\\", \\\"abc\\\", '\\\\4') == 0: @\\n");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("s");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	public void testSpecExample4_3() throws Exception {
+		StringBuffer sb = getExample4Defines();
+		sb.append("xglue(HIGH, LOW) \n");
+		
+		// "hello, world"
+		initializeScanner(sb.toString());
+		
+		validateString("hello, world");
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	public void testSpecExample4_4() throws Exception {
+		StringBuffer sb = getExample4Defines();
+		sb.append("glue(HIGH, LOW); \n");
+		
+		// "hello";
+		initializeScanner(sb.toString());
+
+		validateString("hello");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+
+	// #define t(x,y,z) x ## y ## z 
+	// int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,), t(10,,), t(,11,), t(,,12), t(,,) };
+	public void testSpecExample5() throws Exception {
+		// int j[] = {123, 45, 67, 89, 10, 11, 12, };
+		initializeScanner();
+		
+		validateToken(IToken.t_int);
+		validateIdentifier("j");
+		validateToken(IToken.tLBRACKET);
+		validateToken(IToken.tRBRACKET);
+		validateToken(IToken.tASSIGN);
+		validateToken(IToken.tLBRACE);
+		validateInteger("123");
+		validateToken(IToken.tCOMMA);
+		validateInteger("45");
+		validateToken(IToken.tCOMMA);
+		validateInteger("67");
+		validateToken(IToken.tCOMMA);
+		validateInteger("89");
+		validateToken(IToken.tCOMMA);
+		validateInteger("10");
+		validateToken(IToken.tCOMMA);
+		validateInteger("11");
+		validateToken(IToken.tCOMMA);
+		validateInteger("12");
+		validateToken(IToken.tCOMMA);
+		validateToken(IToken.tRBRACE);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	public StringBuffer getExample7Defines() {
+		return new StringBuffer()
+			.append("#define debug(...) fprintf(stderr, __VA_ARGS__) \n ")
+			.append("#define showlist(...) puts(#__VA_ARGS__)\n ")
+			.append("#define report(test, ...) ((test)?puts(#test):\\ \n ")
+			.append("printf(__VA_ARGS__))  \n ");
+	}
+	
+	
+	public void testSpecExample7_1() throws Exception {
+		StringBuffer sb = getExample7Defines();
+		sb.append("debug(\"Flag\"); \n");
+		
+		// fprintf(stderr, "Flag" ); //7
+		initializeScanner(sb.toString());
+		
+		validateIdentifier("fprintf");
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("stderr");
+		validateToken(IToken.tCOMMA);
+		validateString("Flag");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	public void testSpecExample7_2() throws Exception {
+		StringBuffer sb = getExample7Defines();
+		sb.append("debug(\"X = %d\\n\", x); \n");
+		
+		// fprintf(stderr, "X = %d\n", x ); //9
+		initializeScanner(sb.toString());
+		
+		validateIdentifier("fprintf");
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("stderr");
+		validateToken(IToken.tCOMMA);
+		validateString("X = %d\\n");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("x");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);	
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	public void testSpecExample7_3() throws Exception {
+		StringBuffer sb = getExample7Defines();
+		sb.append("showlist(The first, second, and third items.); \n");
+		
+		// puts( "The first, second, and third items." ); //5
+		initializeScanner(sb.toString());
+		
+		validateIdentifier("puts");
+		validateToken(IToken.tLPAREN);
+		validateString("The first, second, and third items.");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	
+	public void testSpecExample7_4() throws Exception {
+		StringBuffer sb = getExample7Defines();
+		sb.append("report(x>y, \"x is %d but y is %d\", x, y); \n");
+		
+		// ( (x>y) ? puts("x>y") : printf("x is %d but y is %d", x, y) ); //22
+		initializeScanner(sb.toString());
+		
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("x");
+		validateToken(IToken.tGT);
+		validateIdentifier("y");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tQUESTION);
+		validateIdentifier("puts");
+		validateToken(IToken.tLPAREN);
+		validateString("x>y");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tCOLON);
+		validateIdentifier("printf");
+		validateToken(IToken.tLPAREN );
+		validateString("x is %d but y is %d");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("x");
+		validateToken(IToken.tCOMMA);
+		validateIdentifier("y");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	
+	// #define foo g g g
+	// #define g f##oo
+	// foo
+	public void testRecursiveExpansion() throws Exception {
+		initializeScanner();
+		
+		validateIdentifier("foo");
+		validateIdentifier("foo");
+		validateIdentifier("foo");
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	// #define m !(m)+n 
+	// #define n(n) n(m)
+	// m(m)
+	public void testRecursiveExpansion2() throws Exception {
+		// !(m)+ !(m)+n(!(m)+n)
+		initializeScanner();
+		
+		validateToken(IToken.tNOT);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("m");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tPLUS);
+		validateToken(IToken.tNOT);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("m");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tPLUS);
+		validateIdentifier("n");
+		validateToken(IToken.tLPAREN);
+		validateToken(IToken.tNOT);
+		validateToken(IToken.tLPAREN);
+		validateIdentifier("m");
+		validateToken(IToken.tRPAREN);
+		validateToken(IToken.tPLUS);
+		validateIdentifier("n");
+		validateToken(IToken.tRPAREN);
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	// #define f g
+	// #define cat(a,b) a ## b
+	// #define g bad
+	// cat(f, f)
+	public void testRecursiveExpansion3() throws Exception {
+		// ff
+		initializeScanner();
+		
+		validateIdentifier("ff");
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	
+	//	f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);
+	//	f(2 * (2+(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);
+	//	int i[] = { 1, 23, 4, 5, };
+	//	char c[2][6] = { "hello", "" };
+	//  --
+	//	#define x 3
+	//	#define f(a) f(x * (a))
+	//	#undef x
+	//	#define x 2
+	//	#define g f
+	//	#define z z[0]
+	//	#define h g(~
+	//	#define m(a) a(w)
+	//	#define w 0,1
+	//	#define t(a) a
+	//	#define p() int
+	//	#define q(x) x
+	//	#define r(x,y) x ## y
+	//	#define str(x) # x
+	//
+	//	f(y+1) + f(f(z)) % t(t(g)(0) + t)(1);
+	//	g(x+(3,4)-w) | h 5) & m
+	//	(f)^m(m);
+	//	p() i[q()] = { q(1), r(2,3), r(4,), r(,5), r(,) };
+	//	char c[2][6] = { str(hello), str() };
+	public void testC99_6_7_5_3_5_Bug104869() throws Exception {
+		initializeScanner();
+		// read in expected tokens
+		List<IToken> expect= new ArrayList<IToken>();
+		IToken t= fScanner.nextToken();
+		while(t.getType() != IToken.tDECR) {
+			expect.add(t);
+			t= fScanner.nextToken();
+		}
+		
+		for (IToken et : expect) {
+			t= fScanner.nextToken();
+			assertEquals(et.getImage(), t.getImage());
+			assertEquals(et.getType(), t.getType());
+		}
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	//	#define hash_hash # ## #
+	//	#define mkstr(a) # a
+	//	#define in_between(a) mkstr(a)
+	//	#define join(c, d) in_between(c hash_hash d)
+	//  join(x, y)
+	public void testC99_6_10_3_3_4_Bug84268() throws Exception {
+		initializeScanner();
+		validateString("x ## y");
+		validateEOF();
+		validateProblemCount(0);
+	}
+	
+	// #define BIN 0b10101010
+	// #define HEX 0xAA
+	// #define OCT 0252
+	// #define DEC 170
+	// #if (BIN == HEX && HEX == OCT && OCT == DEC)
+	// int foo = BIN;
+	// #endif
+	public void testGCC43BinaryNumbers() throws Exception {
+		initializeScanner();
+		validateToken(IToken.t_int);
+		validateIdentifier("foo");
+		validateToken(IToken.tASSIGN);
+		validateInteger("0b10101010");
+		validateToken(IToken.tSEMI);
+		validateEOF();
+		validateProblemCount(0);
+	
+		String badbinary = "{0b012, 0b01b, 0b1111e01, 0b1111p10, 0b10010.10010}";
+		initializeScanner(badbinary);
+		fullyTokenize();
+		validateProblemCount(5);
+		for (int i = 0; i < 5; i++) {
+			validateProblem(i, IProblem.SCANNER_BAD_BINARY_FORMAT, null);
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorTestsBase.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorTestsBase.java
new file mode 100644
index 0000000..455ec81
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/PreprocessorTestsBase.java
@@ -0,0 +1,205 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.core.parser.tests.scanner;
+
+import java.io.IOException;
+
+import junit.framework.ComparisonFailure;
+
+import org.eclipse.cdt.core.dom.ICodeReaderFactory;
+import org.eclipse.cdt.core.dom.ast.IASTProblem;
+import org.eclipse.cdt.core.dom.ast.IMacroBinding;
+import org.eclipse.cdt.core.dom.parser.IScannerExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.c.GCCScannerExtensionConfiguration;
+import org.eclipse.cdt.core.dom.parser.cpp.GPPScannerExtensionConfiguration;
+import org.eclipse.cdt.core.parser.CodeReader;
+import org.eclipse.cdt.core.parser.EndOfFileException;
+import org.eclipse.cdt.core.parser.IParserLogService;
+import org.eclipse.cdt.core.parser.IScannerInfo;
+import org.eclipse.cdt.core.parser.IToken;
+import org.eclipse.cdt.core.parser.NullLogService;
+import org.eclipse.cdt.core.parser.ParserLanguage;
+import org.eclipse.cdt.core.parser.ParserMode;
+import org.eclipse.cdt.core.parser.ScannerInfo;
+import org.eclipse.cdt.core.parser.util.CharArrayUtils;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.parser.scanner.CPreprocessor;
+import org.eclipse.cdt.internal.core.parser.scanner.ILocationResolver;
+
+public abstract class PreprocessorTestsBase extends BaseTestCase {
+
+	private static final IParserLogService NULL_LOG = new NullLogService();
+	protected CPreprocessor fScanner;
+	protected ILocationResolver fLocationResolver;
+
+	public PreprocessorTestsBase(String name) {
+		super(name);
+	}
+
+	public PreprocessorTestsBase() {
+		super();
+	}
+
+	protected void initializeScanner(String input) throws IOException {
+		initializeScanner(input, ParserMode.COMPLETE_PARSE);
+	}
+
+	protected void initializeScanner(String input, ParserMode mode) throws IOException {
+		initializeScanner(new CodeReader(input.toCharArray()), ParserLanguage.CPP, mode, new ScannerInfo());
+	}
+
+	protected void initializeScanner(String input, ParserLanguage lang) throws IOException {
+		initializeScanner(new CodeReader(input.toCharArray()), lang, ParserMode.COMPLETE_PARSE, new ScannerInfo());
+	}
+	
+	protected void initializeScanner(String input, ParserLanguage lang, IScannerExtensionConfiguration scannerConfig) throws IOException {
+		initializeScanner(new CodeReader(input.toCharArray()), lang, ParserMode.COMPLETE_PARSE, new ScannerInfo(), scannerConfig);
+	}
+
+	protected void initializeScanner(CodeReader input, ParserLanguage lang, ParserMode mode, IScannerInfo scannerInfo) throws IOException {
+		initializeScanner(input, lang, mode, scannerInfo, null);
+	}
+	
+	protected void initializeScanner(CodeReader input, ParserLanguage lang, ParserMode mode, IScannerInfo scannerInfo, IScannerExtensionConfiguration scannerConfig) throws IOException {
+		ICodeReaderFactory readerFactory= FileCodeReaderFactory.getInstance();
+		//IScannerExtensionConfiguration scannerConfig;
+	
+		if(scannerConfig == null) {
+		    if (lang == ParserLanguage.C) {
+		    	scannerConfig= GCCScannerExtensionConfiguration.getInstance();
+		    }
+		    else {
+		    	scannerConfig= GPPScannerExtensionConfiguration.getInstance();
+		    }
+		}
+	    
+		fScanner= new CPreprocessor(input, scannerInfo, lang, NULL_LOG, scannerConfig, readerFactory);
+		fLocationResolver= fScanner.getLocationMap();
+	}
+
+	protected void initializeScanner() throws Exception {
+		StringBuffer[] input= TestSourceReader.getContentsForTest(
+				CTestPlugin.getDefault().getBundle(), "parser", getClass(), getName(), 1);
+		initializeScanner(input[0].toString());
+	}
+
+	protected void fullyTokenize() throws Exception {
+		try	{
+			for(;;) {
+				IToken t= fScanner.nextToken();
+			}
+		}
+		catch ( EndOfFileException e){
+		}
+	}
+
+	protected void validateToken(int tokenType) throws Exception {
+		IToken t= fScanner.nextToken();
+		assertEquals(tokenType, t.getType());
+	}
+
+	protected void validateToken(int tokenType, String image) throws Exception {
+		try {
+			IToken t= fScanner.nextToken();
+			assertEquals(tokenType, t.getType());
+			assertEquals(image, t.getImage());
+		} catch (EndOfFileException e) {
+			fail("Missing token " + image);
+		}
+	}
+
+	protected void validateInteger(String expectedImage) throws Exception {
+		validateToken(IToken.tINTEGER, expectedImage);
+	}
+
+	protected void validateIdentifier(String expectedImage) throws Exception {
+		validateToken(IToken.tIDENTIFIER, expectedImage);
+	}
+
+	protected void validateString(String expectedImage) throws Exception {
+		validateToken(IToken.tSTRING, "\"" + expectedImage + "\"");
+	}
+
+	protected void validateLString(String expectedImage) throws Exception {
+		validateToken(IToken.tLSTRING, "L\"" + expectedImage + "\"");
+	}
+	
+	protected void validateUTF16String(String expectedImage) throws Exception {
+		validateToken(IToken.tUTF16STRING, "u\"" + expectedImage + "\"");
+	}
+	
+	protected void validateUTF32String(String expectedImage) throws Exception {
+		validateToken(IToken.tUTF32STRING, "U\"" + expectedImage + "\"");
+	}
+	
+	protected void validateChar(String expectedImage) throws Exception {
+		validateToken(IToken.tCHAR, "'" + expectedImage + "'");
+	}
+
+	protected void validateWideChar(String expectedImage) throws Exception {
+		validateToken(IToken.tLCHAR, "L'" + expectedImage + "'");
+	}
+	
+	protected void validateUTF16Char(String expectedImage) throws Exception {
+		validateToken(IToken.tUTF16CHAR, "u'" + expectedImage + "'");
+	}
+	
+	protected void validateUTF32Char(String expectedImage) throws Exception {
+		validateToken(IToken.tUTF32CHAR, "U'" + expectedImage + "'");
+	}
+	
+	protected void validateFloatingPointLiteral(String expectedImage) throws Exception {
+		validateToken(IToken.tFLOATINGPT, expectedImage);
+	}
+
+	protected void validateEOF() throws Exception {
+		try {
+			IToken t= fScanner.nextToken();
+			fail("superfluous token " + t);
+		}
+		catch(EndOfFileException e) {
+		}
+	}
+
+	private void assertCharArrayEquals(char[] expected, char[] actual) {
+		if (!CharArrayUtils.equals(expected, actual))
+			throw new ComparisonFailure(null, new String(expected), new String(actual));
+	}
+
+	protected void validateDefinition(String name, String value) {
+		IMacroBinding expObject = fScanner.getMacroDefinitions().get(name);
+		assertNotNull(expObject);
+		assertCharArrayEquals(value.toCharArray(), expObject.getExpansion());
+	}
+
+	protected void validateDefinition(String name, int value) {
+		validateDefinition(name, String.valueOf(value));
+	}
+
+	protected void validateAsUndefined(String name) {
+		assertNull(fScanner.getMacroDefinitions().get(name.toCharArray()));
+	}
+
+	protected void validateProblemCount(int count) throws Exception {
+		assertEquals(count, fLocationResolver.getScannerProblems().length);
+	}
+	
+	protected void validateProblem(int idx, int problemID, String detail) throws Exception {
+		IASTProblem problem= fLocationResolver.getScannerProblems()[idx];
+		assertEquals(problemID, problem.getID());
+		if (detail != null) {
+			assertEquals(detail, problem.getArguments()[0]);
+		}
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/ScannerTestSuite.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/ScannerTestSuite.java
new file mode 100644
index 0000000..05de077
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/ScannerTestSuite.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.parser.tests.scanner;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class ScannerTestSuite extends TestSuite {
+
+	public static Test suite() { 
+		TestSuite suite= new ScannerTestSuite();
+		suite.addTest(LexerTests.suite());
+		suite.addTest(LocationMapTests.suite());
+		suite.addTest(PortedScannerTests.suite());
+		suite.addTest(PreprocessorTests.suite());
+		suite.addTest(InclusionTests.suite());
+		suite.addTest(PreprocessorBugsTests.suite());
+		suite.addTest(ExpansionExplorerTests.suite());
+		suite.addTest(InactiveCodeTests.suite());
+		return suite;
+	}	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/TestMacro.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/TestMacro.java
new file mode 100644
index 0000000..6faae13
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/TestMacro.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.core.parser.tests.scanner;
+
+import org.eclipse.cdt.core.dom.ILinkage;
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IMacroBinding;
+import org.eclipse.cdt.core.dom.ast.IScope;
+import org.eclipse.core.runtime.CoreException;
+
+final class TestMacro implements IMacroBinding {
+	private String fName;
+	private String fExpansion;
+	private String[] fParams;
+
+	public TestMacro(String name, String expansion, String[] params) {
+		fName= name;
+		fExpansion= expansion;
+		fParams= params;
+	}
+
+	public char[] getExpansion() {
+		return fExpansion.toCharArray();
+	}
+
+	public boolean isFunctionStyle() {
+		return fParams != null;
+	}
+
+	public ILinkage getLinkage() throws CoreException {
+		return null;
+	}
+
+	public String getName() {
+		return fName;
+	}
+
+	public char[] getNameCharArray() {
+		return fName.toCharArray();
+	}
+
+	public IScope getScope() throws DOMException {
+		return null;
+	}
+
+	public Object getAdapter(Class adapter) {
+		return null;
+	}
+
+	public char[][] getParameterList() {
+		if (fParams == null) {
+			return null;
+		}
+		char[][] result= new char[fParams.length][];
+		for (int i = 0; i < result.length; i++) {
+			result[i]= fParams[i].toCharArray();
+		}
+		return result;
+	}
+
+	public char[] getExpansionImage() {
+		return getExpansion();
+	}
+
+	public char[][] getParameterPlaceholderList() {
+		return getParameterList();
+	}
+
+	public boolean isDynamic() {
+		return false;
+	}
+
+	public IBinding getOwner() {
+		return null;
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/Bug246129.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/Bug246129.java
new file mode 100644
index 0000000..4148be8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/Bug246129.java
@@ -0,0 +1,268 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.internal.index.tests;
+
+import java.io.File;
+import java.io.FileWriter;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IScope;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexBinding;
+import org.eclipse.cdt.core.index.IIndexFile;
+import org.eclipse.cdt.core.index.IIndexFileLocation;
+import org.eclipse.cdt.core.index.IIndexInclude;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IPathEntry;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.TestScannerProvider;
+import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+
+public class Bug246129 extends IndexTestBase {
+
+	public static TestSuite suite() {
+		TestSuite suite = suite(Bug246129.class, "_");
+		// suite.addTest(new Bug246129("include ext/../type.h"));
+		return suite;
+	}
+
+	private ICProject fProject;
+
+	private IFile fSource; 
+	
+	private IFolder fWrapperIncludeFolder;
+
+	private IFolder fIncludeFolder;
+	
+	private File fTmpDir;
+	
+	private File fExternalWrapperIncludeFolder;
+
+	private File fExternalWrapperHeader;
+	
+	private File fExternalIncludeFolder;
+	
+	private File fExternalHeader;
+	
+	private File fExternalExtFolder;
+	
+	IIndex fIndex;
+	
+	boolean fFalseFriendsAccepted;
+	
+	public Bug246129(String name) {
+		super(name);
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		if (fProject == null) {
+
+			// Populate workspace
+			fProject = createProject(true, "resources/indexTests/bug246129");
+			
+			fSource = fProject.getProject().getFile("source.cpp");
+			
+			fWrapperIncludeFolder = fProject.getProject().getFolder(
+					"wrapper_include");
+			
+			fIncludeFolder = fProject.getProject().getFolder("include");
+
+			// Create header files external to the workspace.
+			fTmpDir = CProjectHelper.freshDir();
+			
+			fExternalWrapperIncludeFolder = new File(fTmpDir,
+					"wrapper_include");
+			fExternalWrapperIncludeFolder.mkdir();
+			
+			fExternalWrapperHeader = new File(
+					fExternalWrapperIncludeFolder, "external_type.h");
+			fExternalWrapperHeader.createNewFile();
+			FileWriter writer = new FileWriter(fExternalWrapperHeader);
+			writer.write("#ifndef EXTERNAL_WRAPPER_TYPE_H_\n");
+			writer.write("#define EXTERNAL_WRAPPER_TYPE_H_\n");
+			writer.write("#include <ext/../external_type.h>\n");
+			writer.write("class ExternalWrapper {\n");
+			writer.write("};\n");
+			writer.write("#endif\n");
+			writer.close();
+			
+			fExternalIncludeFolder = new File(fTmpDir, "include");
+			fExternalIncludeFolder.mkdir();
+			
+			fExternalExtFolder = new File(fExternalIncludeFolder, "ext");
+			fExternalExtFolder.mkdir();
+
+			fExternalHeader = new File(fExternalIncludeFolder,
+					"external_type.h");
+			fExternalHeader.createNewFile();
+			writer = new FileWriter(fExternalHeader);
+			writer.write("#ifndef EXTERNAL_TYPE_H_\n");
+			writer.write("#define EXTERNAL_TYPE_H_\n");
+			writer.write("class ExternalType {\n");
+			writer.write("};\n");
+			writer.write("#endif\n");
+			writer.close();
+
+			// The indexer needs non-empty build info in order to index
+			// source files if index-all-files is turned off.
+			IPathEntry[] entries = new IPathEntry[] { CoreModel
+					.newIncludeEntry(fProject.getPath(), null,
+							fWrapperIncludeFolder.getLocation()),
+					CoreModel.newIncludeEntry(fProject.getPath(), null,
+							fIncludeFolder.getLocation()) };
+			
+			fProject.setRawPathEntries(entries, NPM);
+
+			// However, the scanner info provider used by the unit tests
+			// needs separate setup, and this one must be complete.
+			TestScannerProvider.sIncludes = new String[] {
+					fWrapperIncludeFolder.getLocation().toOSString(),
+					fIncludeFolder.getLocation().toOSString(),
+					fExternalWrapperIncludeFolder.getAbsolutePath(),
+					fExternalIncludeFolder.getAbsolutePath() };
+
+			IndexerPreferences.set(fProject.getProject(),
+					IndexerPreferences.KEY_INDEX_UNUSED_HEADERS_WITH_DEFAULT_LANG, "false");
+
+			File falseFriendDirectory = new File(fWrapperIncludeFolder
+					.getLocation().toOSString()
+					+ "/ext/..");
+
+			fFalseFriendsAccepted = falseFriendDirectory.exists();
+			
+			CCorePlugin.getIndexManager().reindex(fProject);
+			assertTrue(CCorePlugin.getIndexManager().joinIndexer(10000, NPM));
+			fIndex = CCorePlugin.getIndexManager().getIndex(fProject);
+		}
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		fExternalWrapperHeader.delete();
+		fExternalWrapperIncludeFolder.delete();
+		
+		fExternalHeader.delete();
+		fExternalExtFolder.delete();
+		fExternalIncludeFolder.delete();
+
+		fTmpDir.delete();
+		
+		super.tearDown();
+	}
+
+	private void assertSymbolInIndex(String symbolName) throws Exception {
+		IIndexBinding[] bindings = fIndex.findBindings(
+				symbolName
+				.toCharArray(), false, IndexFilter.ALL, NPM);
+		assertTrue(bindings.length > 0);
+	}
+	
+	public void testIndex() throws Exception {
+
+		try {
+
+			fIndex.acquireReadLock();
+			IIndexFile[] indexFiles = fIndex.getAllFiles();
+
+			// Check that all header files have been found, provided the
+			// File implementation does support it.
+			if (fFalseFriendsAccepted) {
+				assertEquals(3, indexFiles.length);
+			} else {
+				assertEquals(5, indexFiles.length);
+			}
+			
+			// The wrapper classes are found regardless whether false friends
+			// are
+			// accepted or not.
+			assertSymbolInIndex("Wrapper");
+			assertSymbolInIndex("ExternalWrapper");
+
+			// The Type class is only known on platforms with a File
+			// implementation sorting out the false friends.
+			if (!fFalseFriendsAccepted) {
+				assertSymbolInIndex("Type");
+				assertSymbolInIndex("ExternalType");
+			}
+			
+			// Check that all paths are normalized.
+			for (IIndexFile indexFile : indexFiles) {
+
+				IIndexInclude[] includes = indexFile.getIncludes();
+				
+				for (IIndexInclude i : includes) {
+					IIndexFileLocation location = i.getIncludesLocation();
+					assertNotNull(location);
+					
+					assertFalse(location.getURI().toASCIIString()
+							.contains(".."));
+
+					String fullPath = location.getFullPath();
+					if (fullPath != null) {
+						assertFalse(fullPath.contains(".."));
+					}
+				}
+			}
+			
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	private void assertSymbolInAst(IScope scope, String symbolName)
+			throws Exception {
+		IBinding[] bindings = scope.find(symbolName);
+		assertTrue(bindings.length > 0);
+	}
+	
+	public void testAst() throws Exception {
+		ITranslationUnit tu = CoreModel.getDefault().createTranslationUnitFrom(
+				fProject, fSource.getLocation());
+
+		IASTTranslationUnit ast = tu.getAST();
+		
+		// The wrapper classes are found regardless whether false friends
+		// are
+		// accepted or not.
+		IScope topLevel = ast.getScope();
+		assertSymbolInAst(topLevel, "Wrapper");
+		assertSymbolInAst(topLevel, "ExternalWrapper");
+
+		// The Type class is only known on platforms with a File
+		// implementation sorting out the false friends.
+		if (!fFalseFriendsAccepted) {
+			assertSymbolInAst(topLevel, "Type");
+			assertSymbolInAst(topLevel, "ExternalType");
+		}
+
+		// Check that all paths are normalized.
+		IASTPreprocessorIncludeStatement[] includes = ast
+				.getIncludeDirectives();		
+		for (IASTPreprocessorIncludeStatement i : includes) {
+			String includedPath = i.getPath();
+
+			assertNotNull(includedPath);
+			assertFalse(includedPath.contains(".."));
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/EmptyIndexFragment.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/EmptyIndexFragment.java
new file mode 100644
index 0000000..eb1aec2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/EmptyIndexFragment.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Symbian Software Ltd. and others.
+ * 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
+ *
+ * Contributors:
+ *    Andrew Ferguson (Symbian) - initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.index.tests;
+
+import java.util.regex.Pattern;
+
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.index.IIndexFileLocation;
+import org.eclipse.cdt.core.index.IIndexLinkage;
+import org.eclipse.cdt.core.index.IIndexMacro;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.internal.core.index.IIndexFragment;
+import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
+import org.eclipse.cdt.internal.core.index.IIndexFragmentFile;
+import org.eclipse.cdt.internal.core.index.IIndexFragmentFileSet;
+import org.eclipse.cdt.internal.core.index.IIndexFragmentInclude;
+import org.eclipse.cdt.internal.core.index.IIndexFragmentName;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ * An empty index fragment implementation
+ * @since 4.0.1
+ */
+public class EmptyIndexFragment implements IIndexFragment {
+	public void acquireReadLock() throws InterruptedException {}
+
+	public IIndexFragmentBinding adaptBinding(IBinding binding) {
+		return null;
+	}
+
+	public IIndexFragmentBinding findBinding(IASTName astName) {
+		return null;
+	}
+
+	public IIndexFragmentBinding[] findBindings(Pattern[] patterns,
+			boolean isFullyQualified, IndexFilter filter,
+			IProgressMonitor monitor) throws CoreException {
+		return IIndexFragmentBinding.EMPTY_INDEX_BINDING_ARRAY;
+	}
+
+	public IIndexFragmentBinding[] findBindings(char[][] names,
+			IndexFilter filter, IProgressMonitor monitor) throws CoreException {
+		return IIndexFragmentBinding.EMPTY_INDEX_BINDING_ARRAY;
+	}
+
+	public IIndexFragmentBinding[] findBindings(char[] name,
+			boolean filescope, IndexFilter filter, IProgressMonitor monitor)
+			throws CoreException {
+		return IIndexFragmentBinding.EMPTY_INDEX_BINDING_ARRAY;
+	}
+
+	public IIndexFragmentBinding[] findBindingsForPrefix(char[] prefix,
+			boolean filescope, IndexFilter filter, IProgressMonitor monitor)
+			throws CoreException {
+		return IIndexFragmentBinding.EMPTY_INDEX_BINDING_ARRAY;
+	}
+
+	public IIndexMacro[] findMacros(char[] name, boolean isPrefix, boolean caseSensitive, IndexFilter filter, IProgressMonitor monitor) {
+		return IIndexMacro.EMPTY_INDEX_MACRO_ARRAY;
+	}
+
+	public IIndexFragmentInclude[] findIncludedBy(IIndexFragmentFile file)
+			throws CoreException {
+		return IIndexFragmentInclude.EMPTY_FRAGMENT_INCLUDES_ARRAY;
+	}
+
+	public IIndexFragmentName[] findNames(IBinding binding,	int flags) {
+		return IIndexFragmentName.EMPTY_NAME_ARRAY;
+	}
+
+	public IIndexFragmentBinding[] findMacroContainers(Pattern pattern, IndexFilter filter, IProgressMonitor monitor) {
+		return IIndexFragmentBinding.EMPTY_INDEX_BINDING_ARRAY;
+	}
+
+	public long getCacheHits() {
+		return 0;
+	}
+
+	public long getCacheMisses() {
+		return 0;
+	}
+
+	public IIndexFragmentFile getFile(int linkageID, IIndexFileLocation location)
+			throws CoreException {
+		return null;
+	}
+
+	
+	public IIndexFragmentFile[] getFiles(IIndexFileLocation location) throws CoreException {
+		return new IIndexFragmentFile[0];
+	}
+
+	public long getLastWriteAccess() {
+		return 0;
+	}
+
+	public IIndexLinkage[] getLinkages() {
+		return IIndexLinkage.EMPTY_INDEX_LINKAGE_ARRAY;
+	}
+
+	public String getProperty(String key) throws CoreException {
+		if(IIndexFragment.PROPERTY_FRAGMENT_ID.equals(key)) {
+			return "org.eclipse.cdt.internal.core.index.EmptyIndexFragment"; //$NON-NLS-1$
+		}
+		if(IIndexFragment.PROPERTY_FRAGMENT_FORMAT_ID.equals(key)) {
+			return "org.eclipse.cdt.internal.core.index.EmptyIndexFragmentFormat"; //$NON-NLS-1$
+		}
+		if(IIndexFragment.PROPERTY_FRAGMENT_FORMAT_VERSION.equals(key)) {
+			return "0"; //$NON-NLS-1$
+		}
+		return null;
+	}
+
+	public void releaseReadLock() {}
+	public void resetCacheCounters() {}
+
+	public IIndexFragmentFileSet createFileSet() {
+		return null;
+	}
+	public IIndexFragmentFile[] getAllFiles() {
+		return IIndexFragmentFile.EMPTY_ARRAY;
+	}
+
+	public Object getCachedResult(Object key) {
+		return null;
+	}
+
+	public Object putCachedResult(Object key, Object value, boolean replace) {
+		return value;
+	}
+
+	public void clearResultCache() {
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/FakeIndexer.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/FakeIndexer.java
new file mode 100644
index 0000000..4aa6ca7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/FakeIndexer.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.internal.index.tests;
+
+import org.eclipse.cdt.core.dom.IPDOMIndexerTask;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.internal.core.pdom.indexer.AbstractPDOMIndexer;
+
+public class FakeIndexer extends AbstractPDOMIndexer {
+	static final String ID = "org.eclipse.cdt.core.tests.FakeIndexer";
+
+	public IPDOMIndexerTask createTask(ITranslationUnit[] added,
+			ITranslationUnit[] changed, ITranslationUnit[] removed) {
+		return null;
+	}
+
+	public String getID() {
+		return ID;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBindingResolutionTestBase.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBindingResolutionTestBase.java
new file mode 100644
index 0000000..1cf4a4a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBindingResolutionTestBase.java
@@ -0,0 +1,421 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *    Andrew Ferguson (Symbian) - Initial implementation
+ *    IBM Corporation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.index.tests;
+
+import java.io.IOException;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IFunctionType;
+import org.eclipse.cdt.core.dom.ast.IPointerType;
+import org.eclipse.cdt.core.dom.ast.IProblemBinding;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.TestScannerProvider;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;
+import org.eclipse.cdt.internal.pdom.tests.PDOMPrettyPrinter;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.osgi.framework.Bundle;
+
+/**
+ * When the PDOM is used to avoid parsing work (i.e. an AST is obtained which
+ * is backed by the PDOM), it must be possible to resolve which binding a name
+ * in the AST is referring to. If the binding is not defined in the AST fragment
+ * then it is assumed to have come from a file which is already indexed.
+ * 
+ * This class is for testing the process by which bindings are looked up in
+ * the PDOM purely from AST information (i.e. without a real binding from the DOM)
+ */
+public abstract class IndexBindingResolutionTestBase extends BaseTestCase {
+	private static final boolean DEBUG= false;
+	protected ITestStrategy strategy;
+	
+	public void setStrategy(ITestStrategy strategy) {
+		this.strategy = strategy;
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		strategy.setUp();
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		strategy.tearDown();
+		super.tearDown();
+	}
+	
+	protected IASTName findName(String section, int len) {
+		IASTTranslationUnit ast = strategy.getAst();
+		return ast.getNodeSelector(null).findName(strategy.getTestData()[1].indexOf(section), len);
+	}
+	
+	/**
+	 * Attempts to get an IBinding from the initial specified number of characters
+	 * from the specified code fragment. Fails the test if
+	 * <ul>
+	 *  <li> There is not a unique name with the specified criteria
+	 *  <li> The binding associated with the name is null or a problem binding
+     *  <li> The binding is not an instance of the specified class
+	 * </ul>
+	 * @param section the code fragment to search for in the AST. The first occurrence of an identical section is used.
+	 * @param len the length of the specified section to use as a name. This can also be useful for distinguishing between
+	 * template names, and template ids.
+	 * @param clazz an expected class type or interface that the binding should extend/implement
+	 * @return the associated name's binding
+	 */
+	protected <T> T getBindingFromASTName(String section, int len, Class<T> clazz, Class ... cs) {
+		IASTName name= findName(section, len);
+		assertNotNull("name not found for \""+section+"\"", name);
+		assertEquals(section.substring(0, len), name.getRawSignature());
+		
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding for "+name.getRawSignature(), binding);
+		assertFalse("Binding is a ProblemBinding for name "+name.getRawSignature(), IProblemBinding.class.isAssignableFrom(name.resolveBinding().getClass()));
+		assertInstance(binding, clazz, cs);
+		return clazz.cast(binding);
+	}
+	
+	/*
+	 * @see IndexBindingResolutionTestBase#getBindingFromASTName(Class, String, int)
+	 */
+	protected <T extends IBinding> T getBindingFromASTName(String section, int len) {
+		IASTName name= findName(section, len);
+		assertNotNull("name not found for \""+section+"\"", name);
+		assertEquals(section.substring(0, len), name.getRawSignature());
+		
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding for "+name.getRawSignature(), binding);
+		assertFalse("Binding is a ProblemBinding for name "+name.getRawSignature(), IProblemBinding.class.isAssignableFrom(name.resolveBinding().getClass()));
+		return (T) binding;
+	}
+
+	/**
+	 * Attempts to verify that the resolved binding for a name is a problem binding.
+	 * @param section the code fragment to search for in the AST. The first occurrence of an identical section is used.
+	 * @param len the length of the specified section to use as a name
+	 * @return the associated name's binding
+	 */
+	protected IBinding getProblemFromASTName(String section, int len) {
+		IASTName name= findName(section, len);
+		assertNotNull("name not found for \""+section+"\"", name);
+		assertEquals(section.substring(0, len), name.getRawSignature());
+		
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding for "+name.getRawSignature(), binding);
+		assertTrue("Binding is not a ProblemBinding for name "+name.getRawSignature(), IProblemBinding.class.isAssignableFrom(name.resolveBinding().getClass()));
+		return name.resolveBinding();
+	}
+	
+	protected static void assertQNEquals(String expectedQN, IBinding b) {
+		try {
+			assertInstance(b, IBinding.class);
+			if (b instanceof ICPPBinding) {
+				assertEquals(expectedQN, CPPVisitor.renderQualifiedName(((ICPPBinding)b).getQualifiedName()));
+			} else {
+				assertEquals(expectedQN, b.getName());
+			}
+		} catch (DOMException de) {
+			fail(de.getMessage());
+		}
+	}
+
+	protected IType getVariableType(IBinding binding) throws DOMException {
+		assertTrue(binding instanceof IVariable);
+		return ((IVariable)binding).getType();
+	}
+
+	protected IType getPtrType(IBinding binding) throws DOMException {
+		// assert binding is a variable
+		IVariable v = (IVariable) binding;
+		IPointerType ptr = (IPointerType) v.getType();
+		return ptr.getType();
+	}
+
+	protected void assertParamType(int index, Class type, IType function) throws DOMException {
+		// assert function is IFunctionType
+		IFunctionType ft = (IFunctionType) function;
+		assertTrue(type.isInstance((ft.getParameterTypes()[index])));
+	}
+
+	protected void assertCompositeTypeParam(int index, int compositeTypeKey, IType function, String qn) throws DOMException {
+		// assert function is IFunctionType
+		IFunctionType ft = (IFunctionType) function;
+		assertTrue(ICPPClassType.class.isInstance((ft.getParameterTypes()[index])));
+		assertEquals(compositeTypeKey, ((ICPPClassType)ft.getParameterTypes()[index]).getKey());
+		assertEquals(qn, CPPVisitor.renderQualifiedName(((ICPPClassType)ft.getParameterTypes()[index]).getQualifiedName()));
+	}
+
+	protected static <T> T assertInstance(Object o, Class<T> clazz, Class ... cs) {
+		assertNotNull("Expected "+clazz.getName()+" but got null", o);
+		assertTrue("Expected "+clazz.getName()+" but got "+o.getClass().getName(), clazz.isInstance(o));
+		for (Class c : cs) {
+			assertTrue("Expected "+clazz.getName()+" but got "+o.getClass().getName(), c.isInstance(o));
+		}
+		return clazz.cast(o);
+	}
+	
+	protected String readTaggedComment(final String tag) throws IOException {
+		return TestSourceReader.readTaggedComment(CTestPlugin.getDefault().getBundle(), "parser", getClass(), tag);
+	}
+
+	protected IIndex getIndex() {
+		return strategy.getIndex();
+	}
+
+	interface ITestStrategy {
+		IIndex getIndex();
+		void setUp() throws Exception;
+		void tearDown() throws Exception;
+		public IASTTranslationUnit getAst();
+		public StringBuffer[] getTestData();
+		public ICProject getCProject();
+		public boolean isCompositeIndex();
+	}
+	
+	protected static void assertVariable(IBinding b, String qn, Class expType, String expTypeQN) {
+		try {
+			assertInstance(b, IVariable.class);
+			IVariable variable = (IVariable) b;
+			assertQNEquals(qn, variable);
+			assertInstance(variable.getType(), expType);
+			if (expTypeQN != null) {
+				IType type= variable.getType();
+				assertInstance(type, IBinding.class);
+				assertQNEquals(expTypeQN, (IBinding) type);
+			}
+		} catch (DOMException de) {
+			fail(de.getMessage());
+		}
+	}
+	
+	protected static void assertTypeContainer(IType conType, String expQN, Class containerType, Class expContainedType, String expContainedTypeQN) {
+		try {
+			assertInstance(conType, ITypeContainer.class);
+			assertInstance(conType, containerType);
+			IType containedType= ((ITypeContainer)conType).getType();
+			assertInstance(containedType, expContainedType);
+			if (expContainedTypeQN != null) {
+				assertInstance(containedType, IBinding.class);
+				assertQNEquals(expContainedTypeQN, (IBinding) containedType);
+			}
+		} catch (DOMException de) {
+			fail(de.getMessage());
+		}
+	}
+
+	class SinglePDOMTestStrategy implements ITestStrategy {
+		private IIndex index;
+		private ICProject cproject;
+		private StringBuffer[] testData;
+		private IASTTranslationUnit ast;
+		private boolean cpp;
+
+		public SinglePDOMTestStrategy(boolean cpp) {
+			this.cpp = cpp;
+		}
+
+		public ICProject getCProject() {
+			return cproject;
+		}
+		
+		public StringBuffer[] getTestData() {
+			return testData;
+		}
+
+		public IASTTranslationUnit getAst() {
+			return ast;
+		}
+
+		public void setUp() throws Exception {
+			cproject = cpp ? CProjectHelper.createCCProject(getName()+System.currentTimeMillis(), "bin", IPDOMManager.ID_NO_INDEXER) 
+					: CProjectHelper.createCProject(getName()+System.currentTimeMillis(), "bin", IPDOMManager.ID_NO_INDEXER);
+			Bundle b = CTestPlugin.getDefault().getBundle();
+			testData = TestSourceReader.getContentsForTest(b, "parser", IndexBindingResolutionTestBase.this.getClass(), getName(), 2);
+
+			IFile file = TestSourceReader.createFile(cproject.getProject(), new Path("header.h"), testData[0].toString());
+			CCorePlugin.getIndexManager().setIndexerId(cproject, IPDOMManager.ID_FAST_INDEXER);
+			assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+
+			IFile cppfile= TestSourceReader.createFile(cproject.getProject(), new Path("references.c" + (cpp ? "pp" : "")), testData[1].toString());
+			assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+			
+			if (DEBUG) {
+				System.out.println("Project PDOM: "+getName());
+				((PDOM)CCoreInternals.getPDOMManager().getPDOM(cproject)).accept(new PDOMPrettyPrinter());
+			}
+
+			index= CCorePlugin.getIndexManager().getIndex(cproject);
+
+			index.acquireReadLock();
+			ast = TestSourceReader.createIndexBasedAST(index, cproject, cppfile);
+		}
+
+		public void tearDown() throws Exception {
+			if (index != null) {
+				index.releaseReadLock();
+			}
+			if (cproject != null) {
+				cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+			}
+		}
+
+		public IIndex getIndex() {
+			return index;
+		}
+		
+		public boolean isCompositeIndex() {
+			return false;
+		}
+	}
+
+	class ReferencedProject implements ITestStrategy {
+		private IIndex index;
+		private ICProject cproject, referenced;
+		private StringBuffer[] testData;
+		private IASTTranslationUnit ast;
+		private boolean cpp;
+
+		public ReferencedProject(boolean cpp) {
+			this.cpp = cpp;
+		}
+
+		public ICProject getCProject() {
+			return cproject;
+		}
+		
+		public void tearDown() throws Exception {
+			if (index != null) {
+				index.releaseReadLock();
+			}
+			if (cproject != null) {
+				cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+			}
+			if (referenced != null) {
+				referenced.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+			}
+		}
+
+		public void setUp() throws Exception {
+			cproject= cpp ? CProjectHelper.createCCProject("OnlineContent"+System.currentTimeMillis(), "bin", IPDOMManager.ID_NO_INDEXER)
+					: CProjectHelper.createCProject("OnlineContent"+System.currentTimeMillis(), "bin", IPDOMManager.ID_NO_INDEXER);
+			Bundle b= CTestPlugin.getDefault().getBundle();
+			testData= TestSourceReader.getContentsForTest(b, "parser", IndexBindingResolutionTestBase.this.getClass(), getName(), 2);
+			referenced = createReferencedContent();
+
+			TestScannerProvider.sIncludes= new String[] {referenced.getProject().getLocation().toOSString()};
+			IFile references= TestSourceReader.createFile(cproject.getProject(), new Path("refs.c" + (cpp ? "pp" : "")), testData[1].toString());
+
+			IProject[] refs = new IProject[] {referenced.getProject()};
+			IProjectDescription pd = cproject.getProject().getDescription();
+			pd.setReferencedProjects(refs);
+			cproject.getProject().setDescription(pd, new NullProgressMonitor());
+
+			IndexerPreferences.set(cproject.getProject(), IndexerPreferences.KEY_INDEXER_ID, IPDOMManager.ID_FAST_INDEXER);
+			CCorePlugin.getIndexManager().reindex(cproject);
+			assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+			
+			if (DEBUG) {
+				System.out.println("Online: "+getName());
+			 	((PDOM)CCoreInternals.getPDOMManager().getPDOM(cproject)).accept(new PDOMPrettyPrinter());
+			}
+
+			index= CCorePlugin.getIndexManager().getIndex(cproject, IIndexManager.ADD_DEPENDENCIES);
+			index.acquireReadLock();
+			ast= TestSourceReader.createIndexBasedAST(index, cproject, references);
+		}
+
+		protected ICProject createReferencedContent() throws CoreException {
+			ICProject referenced = cpp ? CProjectHelper.createCCProject("ReferencedContent"+System.currentTimeMillis(), "bin", IPDOMManager.ID_NO_INDEXER)
+					: CProjectHelper.createCProject("ReferencedContent"+System.currentTimeMillis(), "bin", IPDOMManager.ID_NO_INDEXER);
+			String content = testData[0].toString();
+			IFile file = TestSourceReader.createFile(referenced.getProject(), new Path("header.h"), content);
+			
+			IndexerPreferences.set(referenced.getProject(), IndexerPreferences.KEY_INDEXER_ID, IPDOMManager.ID_FAST_INDEXER);
+			CCorePlugin.getIndexManager().reindex(referenced);
+			
+			assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+			
+			if (DEBUG) {
+				System.out.println("Referenced: "+getName());
+				((PDOM)CCoreInternals.getPDOMManager().getPDOM(referenced)).accept(new PDOMPrettyPrinter());
+			}
+			
+			return referenced;
+		}
+
+		public IASTTranslationUnit getAst() {
+			return ast;
+		}
+
+		public IIndex getIndex() {
+			return index;
+		}
+
+		public StringBuffer[] getTestData() {
+			return testData;
+		}
+		
+		public boolean isCompositeIndex() {
+			return true;
+		}
+	}
+
+	/**
+	 * When a test is failing only for the strategy where the test data is split over
+	 * multiple index fragments, we artificially fail the single fragment strategy also.
+	 * This is not ideal, but as both strategies behavior are typically the same, is 
+	 * quite rare.
+	 */
+	protected void fakeFailForSingle() {
+		if (getName().startsWith("_") && strategy instanceof SinglePDOMTestStrategy) {
+			fail("Artificially failing - see IndexBindingResolutionTestBase.fakeFailForSingle()");
+		}
+	}
+
+	/**
+	 * When a test is failing only for the strategy where the test data is not split over
+	 * multiple index fragments, we artificially fail the single fragment strategy also.
+	 * This is not ideal, but as both strategies behavior are typically the same, is 
+	 * quite rare.
+	 */
+	protected void fakeFailForMultiProject() {
+		if (getName().startsWith("_") && strategy instanceof ReferencedProject) {
+			fail("Artificially failing - see IndexBindingResolutionTestBase.fakeFailForReferenced()");
+		}
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java
new file mode 100644
index 0000000..866a3ec
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java
@@ -0,0 +1,2226 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *    Andrew Ferguson (Symbian)
+ *    Sergey Prigogin (Google)
+ *******************************************************************************/ 
+package org.eclipse.cdt.internal.index.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.util.regex.Pattern;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ILinkage;
+import org.eclipse.cdt.core.dom.IName;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTImplicitName;
+import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNodeSelector;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIfdefStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IEnumeration;
+import org.eclipse.cdt.core.dom.ast.IEnumerator;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IFunctionType;
+import org.eclipse.cdt.core.dom.ast.IProblemBinding;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPUsingDirective;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexBinding;
+import org.eclipse.cdt.core.index.IIndexFile;
+import org.eclipse.cdt.core.index.IIndexFileSet;
+import org.eclipse.cdt.core.index.IIndexInclude;
+import org.eclipse.cdt.core.index.IIndexMacro;
+import org.eclipse.cdt.core.index.IIndexManager;
+import org.eclipse.cdt.core.index.IIndexName;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.index.IndexLocationFactory;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.TestScannerProvider;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class IndexBugsTests extends BaseTestCase {
+	private static final int INDEX_WAIT_TIME = 8000;
+	private ICProject fCProject;
+	protected IIndex fIndex;
+
+	public IndexBugsTests(String name) {
+		super(name);
+	}
+
+	protected class BindingAssertionHelper {
+		protected IASTTranslationUnit tu;
+		protected String contents;
+    	
+    	public BindingAssertionHelper(IFile file, String contents, IIndex index) throws CModelException, CoreException {
+    		this.contents= contents;
+    		this.tu= TestSourceReader.createIndexBasedAST(index, fCProject, file);
+		}
+    	
+    	public IASTTranslationUnit getTranslationUnit() {
+    		return tu;
+    	}
+    	
+    	public IBinding assertProblem(String section, int len) {
+    		IBinding binding= binding(section, len);
+    		assertTrue("Non-ProblemBinding for name: " + section.substring(0, len),
+    				binding instanceof IProblemBinding);
+    		return binding;
+    	}
+    	
+    	public <T extends IBinding> T assertNonProblem(String section, int len) {
+    		IBinding binding= binding(section, len);
+    		if (binding instanceof IProblemBinding) {
+    			IProblemBinding problem= (IProblemBinding) binding;
+    			fail("ProblemBinding for name: " + section.substring(0, len) + " (" + renderProblemID(problem.getID())+")"); 
+    		}
+    		if (binding == null) {
+    			fail("Null binding resolved for name: " + section.substring(0, len));
+    		}
+    		return (T) binding;
+    	}
+
+    	public void assertNoName(String section, int len) {
+			IASTName name= findName(section,len,false);
+			if (name != null) {
+				String selection = section.substring(0, len);
+				fail("Found unexpected \"" + selection + "\": " + name.resolveBinding());
+			}
+    	}
+
+    	/**
+    	 * Asserts that there is exactly one name at the given location and that
+    	 * it resolves to the given type of binding.
+    	 */
+    	public IASTImplicitName assertImplicitName(String section, int len, Class<?> bindingClass) {
+    		IASTName name = findName(section,len,true);
+    		final String selection = section.substring(0, len);
+			assertNotNull("did not find \""+selection+"\"", name);
+			
+			assertInstance(name, IASTImplicitName.class);
+			IASTImplicitNameOwner owner = (IASTImplicitNameOwner) name.getParent();
+			IASTImplicitName[] implicits = owner.getImplicitNames();
+			assertNotNull(implicits);
+			
+			if (implicits.length > 1) {
+				boolean found = false;
+				for (IASTImplicitName n : implicits) {
+					if (((ASTNode)n).getOffset() == ((ASTNode)name).getOffset()) {
+						assertFalse(found);
+						found = true;
+					}
+				}
+				assertTrue(found);
+			}
+			
+    		assertEquals(selection, name.getRawSignature());
+    		IBinding binding = name.resolveBinding();
+    		assertNotNull(binding);
+    		assertInstance(binding, bindingClass);
+    		return (IASTImplicitName) name;
+    	}
+    	
+    	public void assertNoImplicitName(String section, int len) {
+    		IASTName name = findName(section,len,true);
+    		final String selection = section.substring(0, len);
+    		assertNull("found name \""+selection+"\"", name);
+    	}
+    	
+    	public IASTImplicitName[] getImplicitNames(String section, int len) {
+    		IASTName name = findName(section,len,true);
+    		IASTImplicitNameOwner owner = (IASTImplicitNameOwner) name.getParent();
+			IASTImplicitName[] implicits = owner.getImplicitNames();
+			return implicits;
+    	}
+    	
+    	private IASTName findName(String section, int len, boolean implicit) {
+    		final int offset = contents.indexOf(section);
+    		assertTrue(offset >= 0);
+    		IASTNodeSelector selector = tu.getNodeSelector(null);
+    		return implicit ? selector.findImplicitName(offset, len) : selector.findName(offset, len);
+    	}
+
+    	private String renderProblemID(int i) {
+    		try {
+    			for (Field field : IProblemBinding.class.getDeclaredFields()) {
+    				if (field.getName().startsWith("SEMANTIC_")) {
+    					if (field.getType() == int.class) {
+    						Integer ci= (Integer) field.get(null);
+    						if (ci.intValue() == i) {
+    							return field.getName();
+    						}
+    					}
+    				}
+    			}
+    		} catch(IllegalAccessException iae) {
+    			throw new RuntimeException(iae);
+    		}
+    		return "Unknown problem ID";
+    	}
+    	
+    	public <T extends IBinding> T assertNonProblem(String section, int len, Class<T> type, Class... cs) {
+    		IBinding binding= binding(section, len);
+    		assertTrue("ProblemBinding for name: " + section.substring(0, len),
+    				!(binding instanceof IProblemBinding));
+    		assertInstance(binding, type);
+    		for (Class c : cs) {
+    			assertInstance(binding, c);
+    		}
+    		return type.cast(binding);
+    	}
+    	
+    	private IBinding binding(String section, int len) {
+    		IASTName name = findName(section, len,false);
+    		final String selection = section.substring(0, len);
+			assertNotNull("Did not find \"" + selection + "\"", name);
+    		assertEquals(selection, name.getRawSignature());
+    			
+    		IBinding binding = name.resolveBinding();
+    		assertNotNull("No binding for " + name.getRawSignature(), binding);
+    		
+    		return name.resolveBinding();
+    	}
+    }
+
+	public static TestSuite suite() {
+		final TestSuite ts = suite(IndexBugsTests.class);
+		ts.addTest(Bug246129.suite());
+		return ts;
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		fCProject= CProjectHelper.createCCProject("__bugsTest__", "bin", IPDOMManager.ID_FAST_INDEXER);
+		CCorePlugin.getIndexManager().reindex(fCProject);
+		waitForIndexer();
+		fIndex= CCorePlugin.getIndexManager().getIndex(fCProject);
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		if (fCProject != null) {
+			CProjectHelper.delete(fCProject);
+		}
+		super.tearDown();
+	}
+	
+	protected IProject getProject() {
+		return fCProject.getProject();
+	}
+	
+    protected String[] getContentsForTest(int blocks) throws IOException {
+    	StringBuffer[] help= TestSourceReader.getContentsForTest(
+    			CTestPlugin.getDefault().getBundle(), "parser", getClass(), getName(), blocks);
+    	String[] result= new String[help.length];
+    	int i= 0;
+    	for (StringBuffer buf : help) {
+			result[i++]= buf.toString();
+		}
+    	return result;
+    }
+    
+    protected IFile createFile(IContainer container, String fileName, String contents) throws Exception {
+    	return TestSourceReader.createFile(container, new Path(fileName), contents);
+    }
+
+	private void waitForIndexer() throws InterruptedException {
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		long waitms= 1;
+		while (waitms < 2000 && indexManager.isIndexerSetupPostponed(fCProject)) {
+			Thread.sleep(waitms);
+			waitms *= 2;
+		}
+		assertTrue(indexManager.joinIndexer(INDEX_WAIT_TIME, NPM));
+	}
+
+	protected Pattern[] getPattern(String qname) {
+		String[] parts= qname.split("::");
+		Pattern[] result= new Pattern[parts.length];
+		for (int i = 0; i < result.length; i++) {
+			result[i]= Pattern.compile(parts[i]);			
+		}
+		return result;
+	}
+
+	protected void waitUntilFileIsIndexed(IFile file, int time) throws Exception {
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, time);
+	}
+
+	/**
+	 * Attempts to get an IBinding from the initial specified number of characters
+	 * from the specified code fragment. Fails the test if
+	 * <ul>
+	 *  <li> There is not a unique name with the specified criteria
+	 *  <li> The binding associated with the name is null or a problem binding
+     *  <li> The binding is not an instance of the specified class
+	 * </ul>
+	 * @param ast the AST to test.
+	 * @param source the source code corresponding to the AST.
+	 * @param section the code fragment to search for in the AST. The first occurrence of
+	 *   an identical section is used.
+	 * @param len the length of the specified section to use as a name. This can also be useful
+	 *   for distinguishing between template names, and template ids.
+	 * @param clazz an expected class type or interface that the binding should extend/implement
+	 * @return the associated name's binding
+	 */
+	protected <T> T getBindingFromASTName(IASTTranslationUnit ast, String source, String section, int len,
+			Class<T> clazz, Class... cs) {
+		IASTName name= ast.getNodeSelector(null).findName(source.indexOf(section), len);
+		assertNotNull("Name not found for \"" + section + "\"", name);
+		assertEquals(section.substring(0, len), name.getRawSignature());
+		
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding for " + section.substring(0, len), binding);
+		assertTrue("ProblemBinding for name: " + section.substring(0, len),
+				!(binding instanceof IProblemBinding));
+		assertInstance(binding, clazz, cs);
+		return clazz.cast(binding);
+	}
+
+	protected static <T> T assertInstance(Object o, Class<T> clazz, Class ... cs) {
+		assertNotNull("Expected " + clazz.getName() + " but got null", o);
+		assertTrue("Expected " + clazz.getName() + " but got " + o.getClass().getName(), clazz.isInstance(o));
+		for (Class c : cs) {
+			assertTrue("Expected " + clazz.getName() + " but got " + o.getClass().getName(), c.isInstance(o));
+		}
+		return clazz.cast(o);
+	}
+
+	// class A {
+	// public:
+	//   void one() {}
+	//   void two() {}
+	// };	
+
+	// class A {
+	// public:
+	//   void three() {}
+	//   void four() {}
+	//   void five() {}
+	// };
+	public void test154563() throws Exception {
+		// Because of fix for http://bugs.eclipse.org/193779 this test case passes.
+		// However http://bugs.eclipse.org/154563 remains to be fixed.
+		String[] content= getContentsForTest(3);
+		
+		IFile file= createFile(getProject(), "header.h", content[0]);
+		waitUntilFileIsIndexed(file, INDEX_WAIT_TIME);
+		
+		IIndex index= CCorePlugin.getIndexManager().getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IBinding[] bs= index.findBindings("A".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bs.length); 
+			assertTrue(bs[0] instanceof ICPPClassType);
+			assertEquals(2, ((ICPPClassType)bs[0]).getDeclaredMethods().length);
+		} finally {
+			index.releaseReadLock();
+		}
+		
+		file.setContents(new ByteArrayInputStream(content[1].getBytes()), true, false, NPM);
+		waitUntilFileIsIndexed(file, INDEX_WAIT_TIME);
+		
+		index= CCorePlugin.getIndexManager().getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IBinding[] bs= index.findBindings("A".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bs.length); 
+			assertTrue(bs[0] instanceof ICPPClassType);
+			assertEquals(3, ((ICPPClassType)bs[0]).getDeclaredMethods().length);
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+
+    public void test150906() throws Exception {
+    	String fileName= "bug150906.c";
+    	String varName= "arrayDataSize";
+    	StringBuffer content= new StringBuffer();
+    	content.append("unsigned char arrayData[] = {\n");
+    	for (int i= 0; i< 1024 * 250 - 1; i++) {
+    		content.append("0x00,");
+    	}
+    	content.append("0x00};\n");
+    	content.append("unsigned int arrayDataSize = sizeof(arrayData);\n");
+		int indexOfDecl = content.indexOf(varName);
+
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(INDEX_WAIT_TIME, NPM));
+		IFile file= createFile(getProject(), fileName, content.toString());
+		// must be done in a reasonable amount of time
+		waitUntilFileIsIndexed(file, INDEX_WAIT_TIME);
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings= fIndex.findBindings(getPattern("arrayDataSize"), true, IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			
+			IIndexBinding binding= bindings[0];
+			
+			// check if we have the definition
+			IIndexName[] decls= fIndex.findNames(binding, IIndex.FIND_DEFINITIONS);
+			assertEquals(1, decls.length);
+			assertEquals(indexOfDecl, decls[0].getNodeOffset());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+    }
+
+	// enum {e20070206};
+	public void test156671() throws Exception {
+		waitForIndexer();
+		String content= getContentsForTest(1)[0];
+
+		IFile file= TestSourceReader.createFile(fCProject.getProject(), "test156671.cpp", content);
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, INDEX_WAIT_TIME);
+
+		fIndex.acquireReadLock();
+		try {
+			IBinding[] bindings= fIndex.findBindings("e20070206".toCharArray(), IndexFilter.getFilter(ILinkage.CPP_LINKAGE_ID), NPM);
+			assertEquals(1, bindings.length);
+			assertTrue(bindings[0] instanceof IEnumerator);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	public void test160281_1() throws Exception {
+		waitForIndexer();
+		IFile include= TestSourceReader.createFile(fCProject.getProject(), "inc/test160281_1.h", "");
+		TestScannerProvider.sIncludes= new String[]{include.getLocation().removeLastSegments(1).toString()};
+		TestScannerProvider.sIncludeFiles= new String[]{include.getName()};
+		IFile file= TestSourceReader.createFile(fCProject.getProject(), "test160281_1.cpp", "");
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, INDEX_WAIT_TIME);
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= ifile.getIncludes();
+			assertEquals(1, includes.length);
+			IIndexInclude i= includes[0];
+			assertEquals(file.getLocationURI(), i.getIncludedByLocation().getURI());
+			assertEquals(include.getLocationURI(), i.getIncludesLocation().getURI());
+			assertEquals(true, i.isSystemInclude());
+			assertEquals(0, i.getNameOffset());
+			assertEquals(0, i.getNameLength());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	public void test160281_2() throws Exception {
+		waitForIndexer();
+		IFile include= TestSourceReader.createFile(fCProject.getProject(), "inc/test160281_2.h", "#define X y\n");
+		TestScannerProvider.sIncludes= new String[]{include.getLocation().removeLastSegments(1).toString()};
+		TestScannerProvider.sMacroFiles= new String[]{include.getName()};
+		IFile file= TestSourceReader.createFile(fCProject.getProject(), "test160281_2.cpp", "int X;");
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, INDEX_WAIT_TIME);
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= ifile.getIncludes();
+			assertEquals(1, includes.length);
+			IIndexInclude i= includes[0];
+			assertEquals(file.getLocationURI(), i.getIncludedByLocation().getURI());
+			assertEquals(include.getLocationURI(), i.getIncludesLocation().getURI());
+			assertEquals(true, i.isSystemInclude());
+			assertEquals(0, i.getNameOffset());
+			assertEquals(0, i.getNameLength());
+			IIndexBinding[] bindings= fIndex.findBindings("y".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			assertTrue(bindings[0] instanceof IVariable);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+    //  namespace ns162011 {
+    //    class Class162011 {
+    //      friend void function162011(Class162011); 
+    //    };
+    //    void function162011(Class162011 x){};
+    //  }
+    public void test162011() throws Exception {
+		String content = getContentsForTest(1)[0];
+		String fileName = "bug162011.cpp";
+		String funcName = "function162011";
+
+		int indexOfDecl = content.indexOf(funcName);
+		int indexOfDef  = content.indexOf(funcName, indexOfDecl+1);
+		IFile file= createFile(getProject(), fileName, content);
+		waitUntilFileIsIndexed(file, INDEX_WAIT_TIME);
+		
+		// make sure the ast is correct
+		ITranslationUnit tu= (ITranslationUnit) fCProject.findElement(new Path(fileName));
+		IASTTranslationUnit ast= tu.getAST();
+		IASTName name= (IASTName) ast.getNodeSelector(null).findNode(indexOfDecl, funcName.length());
+		IBinding astBinding= name.resolveBinding();
+
+		IName[] astDecls= ast.getDeclarations(astBinding);
+		assertEquals(2, astDecls.length);
+		int i1= astDecls[0].getFileLocation().getNodeOffset();
+		int i2= astDecls[1].getFileLocation().getNodeOffset();
+		assertEquals(indexOfDecl, Math.min(i1, i2));
+		assertEquals(indexOfDef, Math.max(i1, i2));
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings= fIndex.findBindings(getPattern("ns162011::function162011"), true, IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			
+			IIndexBinding binding= bindings[0];
+			
+			// check if we have the declaration
+			IIndexName[] decls= fIndex.findNames(binding, IIndex.FIND_DECLARATIONS);
+			assertEquals(1, decls.length);
+			assertEquals(indexOfDecl, decls[0].getNodeOffset());
+
+			// check if we have the definition
+			decls= fIndex.findNames(binding, IIndex.FIND_DEFINITIONS);
+			assertEquals(1, decls.length);
+			assertEquals(indexOfDef, decls[0].getNodeOffset());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+    }
+	public void test164360_1() throws Exception {
+		waitForIndexer();
+		IFile include= TestSourceReader.createFile(fCProject.getProject(), "test164360.h", "");
+		TestScannerProvider.sIncludeFiles= new String[]{include.getLocation().toOSString()};
+		IFile file= TestSourceReader.createFile(fCProject.getProject(), "test164360.cpp", "");
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, INDEX_WAIT_TIME);
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= ifile.getIncludes();
+			assertEquals(1, includes.length);
+			IIndexInclude i= includes[0];
+			assertEquals(file.getLocationURI(), i.getIncludedByLocation().getURI());
+			assertEquals(include.getLocationURI(), i.getIncludesLocation().getURI());
+			assertEquals(true, i.isSystemInclude());
+			assertEquals(0, i.getNameOffset());
+			assertEquals(0, i.getNameLength());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	public void test164360_2() throws Exception {
+		waitForIndexer();
+		IFile include= TestSourceReader.createFile(fCProject.getProject(), "test164360.h", "");
+		TestScannerProvider.sMacroFiles= new String[]{include.getLocation().toOSString()};
+		IFile file= TestSourceReader.createFile(fCProject.getProject(), "test164360.cpp", "");
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, INDEX_WAIT_TIME);
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= ifile.getIncludes();
+			assertEquals(1, includes.length);
+			IIndexInclude i= includes[0];
+			assertEquals(file.getLocationURI(), i.getIncludedByLocation().getURI());
+			assertEquals(include.getLocationURI(), i.getIncludesLocation().getURI());
+			assertEquals(true, i.isSystemInclude());
+			assertEquals(0, i.getNameOffset());
+			assertEquals(0, i.getNameLength());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	// #define macro164500 1
+	// #undef macro164500
+	// #define macro164500 2
+	public void test164500() throws Exception {
+		waitForIndexer();
+		String content= getContentsForTest(1)[0];
+
+		IFile file= TestSourceReader.createFile(fCProject.getProject(), "test164500.cpp", content);
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, INDEX_WAIT_TIME);
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+			assertNotNull(ifile);
+			IIndexMacro[] macros= ifile.getMacros();
+			assertEquals(3, macros.length);
+			IIndexMacro m= macros[0];
+			assertEquals("1", new String(m.getExpansionImage()));
+			assertEquals("macro164500", new String(m.getName()));
+
+			m= macros[2];
+			assertEquals("2", new String(m.getExpansionImage()));
+			assertEquals("macro164500", new String(m.getName()));
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	// // header.h
+	// class E {};
+	
+	// #include "header.h"
+	// E var;
+	
+	// // header.h	
+	// enum E {A,B,C};
+	public void test171834() throws Exception {
+		waitForIndexer();
+
+		ICProject cproject = CProjectHelper.createCCProject("seq1", "bin", IPDOMManager.ID_FAST_INDEXER);
+		try {
+			IIndex index = CCorePlugin.getIndexManager().getIndex(cproject);
+			String[] testData = getContentsForTest(3);
+			IFile header= TestSourceReader.createFile(cproject.getProject(), "header.h", testData[0]);
+			IFile referer= TestSourceReader.createFile(cproject.getProject(), "content.cpp", testData[1]);
+			TestSourceReader.waitUntilFileIsIndexed(index, referer, INDEX_WAIT_TIME);
+
+			index.acquireReadLock();
+			try {
+				IBinding[] bindings = index.findBindings(Pattern.compile("var"), true, IndexFilter.ALL, new NullProgressMonitor());
+				assertEquals(1, bindings.length);
+				IType type = ((ICPPVariable)bindings[0]).getType();
+				assertTrue(type instanceof ICPPClassType);
+				assertEquals("var is not of type class", ICPPClassType.k_class, ((ICPPClassType)type).getKey());
+			} finally {
+				index.releaseReadLock();
+			}
+
+			InputStream in = new ByteArrayInputStream(testData[2].getBytes()); 
+			header.setContents(in, IResource.FORCE, null);
+			TestSourceReader.waitUntilFileIsIndexed(index, header, INDEX_WAIT_TIME);
+
+			index.acquireReadLock();
+			try {
+				IBinding[] bindings = index.findBindings(Pattern.compile("var"), true, IndexFilter.ALL, new NullProgressMonitor());
+				assertEquals(1, bindings.length);
+
+				IType type = ((ICPPVariable)bindings[0]).getType();
+				assertTrue(type instanceof IEnumeration);
+			} finally {
+				index.releaseReadLock();
+			}
+		} finally {
+			CProjectHelper.delete(cproject);
+		}
+	}
+
+	// typedef struct S20070201 {
+	//    int a;
+	// } S20070201;
+	public void test172454_1() throws Exception {
+		waitForIndexer();
+		String content= getContentsForTest(1)[0];
+
+		IFile file= TestSourceReader.createFile(fCProject.getProject(), "test172454.c", content);
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, INDEX_WAIT_TIME);
+
+		fIndex.acquireReadLock();
+		try {
+			IBinding[] bindings= fIndex.findBindings("S20070201".toCharArray(), IndexFilter.getFilter(ILinkage.C_LINKAGE_ID), NPM);
+			assertEquals(2, bindings.length);
+			
+			IBinding struct, typedef;
+			if (bindings[0] instanceof ICompositeType) {
+				struct= bindings[0];
+				typedef= bindings[1];
+			}
+			else {
+				struct= bindings[1];
+				typedef= bindings[0];
+			}
+			
+			assertTrue(struct instanceof ICompositeType);
+			assertTrue(typedef instanceof ITypedef);
+			assertTrue(((ITypedef) typedef).getType() instanceof ICompositeType);
+			assertTrue(((ITypedef) typedef).isSameType((ICompositeType) struct));
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	// typedef struct S20070201 {
+	//    int a;
+	// } S20070201;
+	public void test172454_2() throws Exception {
+		waitForIndexer();
+		String content= getContentsForTest(1)[0];
+
+		IFile file= TestSourceReader.createFile(fCProject.getProject(), "test172454.cpp", content);
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, INDEX_WAIT_TIME);
+
+		fIndex.acquireReadLock();
+		try {
+			IBinding[] bindings= fIndex.findBindings("S20070201".toCharArray(), IndexFilter.getFilter(ILinkage.CPP_LINKAGE_ID), NPM);
+			assertEquals(2, bindings.length);
+			
+			IBinding struct, typedef;
+			if (bindings[0] instanceof ICPPClassType) {
+				struct= bindings[0];
+				typedef= bindings[1];
+			}
+			else {
+				struct= bindings[1];
+				typedef= bindings[0];
+			}
+			
+			assertTrue(struct instanceof ICPPClassType);
+			assertTrue(((ICPPClassType)struct).getKey()==ICompositeType.k_struct);
+			assertTrue(typedef instanceof ITypedef);
+			IType aliased = ((ITypedef) typedef).getType();
+			assertTrue(aliased instanceof ICPPClassType);
+			assertTrue(((ICPPClassType)aliased).getKey()==ICompositeType.k_struct);
+			assertTrue(((ITypedef) typedef).isSameType((ICompositeType) struct));
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	// typedef int T20070213;
+	public void test173997() throws Exception {
+		waitForIndexer();
+		String content= getContentsForTest(1)[0];
+
+		IFile file= TestSourceReader.createFile(fCProject.getProject(), "test173997.cpp", content);
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, INDEX_WAIT_TIME);
+
+		fIndex.acquireReadLock();
+		try {
+			IBinding[] bindings= fIndex.findBindings("T20070213".toCharArray(), IndexFilter.getFilter(ILinkage.CPP_LINKAGE_ID), NPM);
+			assertEquals(1, bindings.length);
+			assertTrue(bindings[0] instanceof ITypedef);
+			ITypedef td= (ITypedef) bindings[0];
+			IType type= td.getType();
+			assertTrue(type instanceof IBasicType);
+			IBasicType btype= (IBasicType) type;
+			assertEquals(IBasicType.t_int, btype.getType());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+		
+		long timestamp= file.getLocalTimeStamp();
+		content= "int UPDATED20070213;\n" + content.replaceFirst("int", "float");
+		file= TestSourceReader.createFile(fCProject.getProject(), "test173997.cpp", content);
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, INDEX_WAIT_TIME);
+
+		fIndex.acquireReadLock();
+		try {
+			// double check if file was indexed
+			IBinding[] bindings= fIndex.findBindings("UPDATED20070213".toCharArray(), IndexFilter.getFilter(ILinkage.CPP_LINKAGE_ID), NPM);
+			assertEquals(1, bindings.length);
+			
+			bindings= fIndex.findBindings("T20070213".toCharArray(), IndexFilter.getFilter(ILinkage.CPP_LINKAGE_ID), NPM);
+			assertEquals(1, bindings.length);
+			assertTrue(bindings[0] instanceof ITypedef);
+			ITypedef td= (ITypedef) bindings[0];
+			IType type= td.getType();
+			assertTrue(type instanceof IBasicType);
+			IBasicType btype= (IBasicType) type;
+			assertTrue(IBasicType.t_int != btype.getType());
+			assertEquals(IBasicType.t_float, btype.getType());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	// class A {};
+	// class B {};
+	// A var;
+	
+	// class A {};
+	// class B {};
+	// B var;
+	public void test173997_2() throws Exception {
+		String[] content= getContentsForTest(2);
+		
+		IFile file= createFile(getProject(), "header.h", content[0]);
+		waitUntilFileIsIndexed(file, INDEX_WAIT_TIME);
+		
+		IIndex index= CCorePlugin.getIndexManager().getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IBinding[] bs= index.findBindings("var".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bs.length); 
+			assertTrue(bs[0] instanceof ICPPVariable);
+			assertTrue(((ICPPVariable)bs[0]).getType() instanceof ICPPClassType);
+			assertEquals("A", ((ICPPClassType)(((ICPPVariable)bs[0]).getType())).getName());
+		} finally {
+			index.releaseReadLock();
+		}
+		
+		file.setContents(new ByteArrayInputStream(content[1].getBytes()), true, false, NPM);
+		waitUntilFileIsIndexed(file, INDEX_WAIT_TIME);
+		
+		index= CCorePlugin.getIndexManager().getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IBinding[] bs= index.findBindings("var".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bs.length); 
+			assertTrue(bs[0] instanceof ICPPVariable);
+			assertTrue(((ICPPVariable)bs[0]).getType() instanceof ICPPClassType);
+			assertEquals("B", ((ICPPClassType)(((ICPPVariable)bs[0]).getType())).getName());
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+
+	//  // header.h
+	//	template <class T1> class Test {};
+	//	template <class T2> void f() {}
+	
+	//  #include "header.h"
+	//	struct A {};
+	//	Test<A> a;
+	//  void func() {
+	//    f<A>();
+	//  }
+
+	//	template <class U1> class Test;
+	//	template <class U2> void f();
+	public void test253080() throws Exception {
+		waitForIndexer();
+
+		String[] testData = getContentsForTest(3);
+		TestSourceReader.createFile(fCProject.getProject(), "header.h", testData[0]);
+		IFile test= TestSourceReader.createFile(fCProject.getProject(), "test.cpp", testData[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "unrelated.cpp", testData[2]);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		IIndex index= indexManager.getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IASTTranslationUnit ast = TestSourceReader.createIndexBasedAST(index, fCProject, test);
+			getBindingFromASTName(ast, testData[1], "Test<A>", 7, ICPPTemplateInstance.class);
+			getBindingFromASTName(ast, testData[1], "f<A>", 4, ICPPTemplateInstance.class);
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+
+	//	// test1.h
+	//	template<class U> struct A {
+	//	  typedef U value_type;
+	//	};
+
+	//	// test2.h
+	//	#include "test1.h"
+	//	template<class T> struct B {
+	//	  typedef A<T> container_type;
+	//	  typedef typename container_type::value_type value_type;
+	//	};
+
+	//	#include "test1.h"
+
+	//	#include "test2.h"
+	//	void f(int x);
+	//	void test(B<int>::value_type x) {
+	//	  f(x);
+	//	}
+	public void test257818_1() throws Exception {
+		waitForIndexer();
+
+		String[] testData = getContentsForTest(4);
+		TestSourceReader.createFile(fCProject.getProject(), "test1.h", testData[0]);
+		TestSourceReader.createFile(fCProject.getProject(), "test2.h", testData[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "test1.cpp", testData[2]);
+		IFile test2= TestSourceReader.createFile(fCProject.getProject(), "test2.cpp", testData[3]);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		IIndex index= indexManager.getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IASTTranslationUnit ast = TestSourceReader.createIndexBasedAST(index, fCProject, test2);
+			getBindingFromASTName(ast, testData[3], "f(x)", 1, ICPPFunction.class);
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+
+	//	// test1.h
+	//	template<class U> struct A {
+	//	  typedef U value_type;
+	//	};
+
+	//	// test2.h
+	//	#include "test1.h"
+	//	template<class T> struct B {
+	//	  typedef A<T> container_type;
+	//	  typedef typename container_type::value_type value_type;
+	//	  void m(value_type* p);
+	//	};
+
+	//	#include "test1.h"
+
+	//	#include "test2.h"
+	//	class C {};
+	//	void test(B<C> x, C y) {
+	//	  x.m(&y);
+	//	}
+	public void test257818_2() throws Exception {
+		waitForIndexer();
+
+		String[] testData = getContentsForTest(4);
+		TestSourceReader.createFile(fCProject.getProject(), "test1.h", testData[0]);
+		TestSourceReader.createFile(fCProject.getProject(), "test2.h", testData[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "test1.cpp", testData[2]);
+		IFile test2= TestSourceReader.createFile(fCProject.getProject(), "test2.cpp", testData[3]);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		IIndex index= indexManager.getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IASTTranslationUnit ast = TestSourceReader.createIndexBasedAST(index, fCProject, test2);
+			getBindingFromASTName(ast, testData[3], "m(&y)", 1, ICPPMethod.class);
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+
+	// class A {}; class B {}; class C {};
+	public void testIndexContentOverProjectDelete() throws Exception {
+		waitForIndexer();
+
+		/* Check that when a project is deleted, its index contents do not
+         * appear in the initial index of a newly created project of the same name */
+         
+		String pname = "deleteTest"+System.currentTimeMillis();
+		ICProject cproject = CProjectHelper.createCCProject(pname, "bin", IPDOMManager.ID_FAST_INDEXER);
+		IIndex index = CCorePlugin.getIndexManager().getIndex(cproject);
+		String content= getContentsForTest(1)[0];
+		IFile file= TestSourceReader.createFile(cproject.getProject(), "content.cpp", content);
+		TestSourceReader.waitUntilFileIsIndexed(index, file, INDEX_WAIT_TIME);
+		CProjectHelper.delete(cproject);
+
+		cproject = CProjectHelper.createCCProject(pname, "bin", IPDOMManager.ID_FAST_INDEXER);
+		index = CCorePlugin.getIndexManager().getIndex(cproject);
+		index.acquireReadLock();
+		try {
+			IBinding[] bindings = index.findBindings(Pattern.compile(".*"), false, IndexFilter.ALL, new NullProgressMonitor());
+			assertEquals(0, bindings.length);
+		} finally {
+			index.releaseReadLock();
+			CProjectHelper.delete(cproject);
+		}
+	}
+
+	// class A {}; class B {}; class C {}; class D {};
+	public void testIndexContentOverProjectMove() throws Exception {
+		waitForIndexer();
+
+		/* Check that the contents of an index is preserved over a project
+         * move operation */
+
+		ICProject cproject = CProjectHelper.createCCProject("moveTest", "bin", IPDOMManager.ID_FAST_INDEXER);
+		IIndex index = CCorePlugin.getIndexManager().getIndex(cproject);
+		String content= getContentsForTest(1)[0];
+		IFile file= TestSourceReader.createFile(cproject.getProject(), "content.cpp", content);
+		TestSourceReader.waitUntilFileIsIndexed(index, file, INDEX_WAIT_TIME);
+
+		// move the project to a random new location
+		File newLocation = CProjectHelper.freshDir();
+		IProjectDescription description = cproject.getProject().getDescription();
+		description.setLocationURI(newLocation.toURI());
+		cproject.getProject().move(description, IResource.FORCE | IResource.SHALLOW, new NullProgressMonitor());	
+		
+		index = CCorePlugin.getIndexManager().getIndex(cproject);
+		index.acquireReadLock();
+		try {
+			IBinding[] bindings = index.findBindings(Pattern.compile(".*"), false, IndexFilter.ALL_DECLARED, new NullProgressMonitor());
+			assertEquals(4, bindings.length);
+		} finally {
+			index.releaseReadLock();
+			CProjectHelper.delete(cproject);
+		}
+	}
+
+	// class a {};
+	// class A {};
+	// namespace aa {
+	//   class a {
+	//     class e {
+	//      class AA {class A{};};
+	//     };
+	//   };
+	// };
+	public void testFindBindingsWithPrefix() throws Exception {
+		waitForIndexer();
+		String content= getContentsForTest(1)[0];
+
+		IFile file= TestSourceReader.createFile(fCProject.getProject(), "testFBWP.cpp", content);
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, INDEX_WAIT_TIME);
+
+		fIndex.acquireReadLock();
+		try {
+			final IndexFilter NON_FUNCTIONS = new IndexFilter() {
+				@Override
+				public boolean acceptBinding(IBinding binding) {
+					return !(binding instanceof IFunction);
+				}
+			};
+			
+			IBinding[] bindings= fIndex.findBindingsForPrefix(new char[] {'a'}, true, NON_FUNCTIONS, null);
+			assertEquals(3,bindings.length);
+			
+			bindings= fIndex.findBindingsForPrefix(new char[] {'a'}, false, NON_FUNCTIONS, null);
+			assertEquals(6,bindings.length);
+			
+			bindings= fIndex.findBindingsForPrefix(new char[] {'a','A'}, true, NON_FUNCTIONS, null);
+			assertEquals(1,bindings.length);
+			
+			bindings= fIndex.findBindingsForPrefix(new char[] {'a','A'}, false, NON_FUNCTIONS, null);
+			assertEquals(2, bindings.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}		
+	}
+	
+	// class a { class b { class c { void f(); }; }; };
+	public void testFilterFindBindingsFQCharArray() throws Exception {
+		waitForIndexer();
+		String content= getContentsForTest(1)[0];
+
+		IFile file= TestSourceReader.createFile(fCProject.getProject(), "testFilterFindBindingsFQCharArray.cpp", content);
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, INDEX_WAIT_TIME);
+
+		fIndex.acquireReadLock();
+		try {
+			final IndexFilter NON_CLASS = new IndexFilter() {
+				@Override
+				public boolean acceptBinding(IBinding binding) {
+					return !(binding instanceof ICPPClassType);
+				}
+			};
+			
+			IBinding[] bindings= fIndex.findBindings(new char[][]{{'a'},{'b'},{'c'},{'f'}}, NON_CLASS, NPM);
+			assertEquals(1,bindings.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}		
+	}
+	
+    // typedef struct {
+    //    float   fNumber;
+    //    int     iIdx;
+    // } StructA_T;
+	
+	// #include "../__bugsTest__/common.h"
+	// StructA_T gvar1;
+	
+	// #include "../__bugsTest__/common.h"
+	// StructA_T gvar2;
+	public void testFileInMultipleFragments_bug192352() throws Exception {
+		String[] contents= getContentsForTest(3);
+		
+		ICProject p2 = CProjectHelper.createCCProject("__bugsTest_2_", "bin", IPDOMManager.ID_FAST_INDEXER);
+		try {
+			IFile f1= TestSourceReader.createFile(fCProject.getProject(), "common.h", contents[0]);
+			IFile f2= TestSourceReader.createFile(fCProject.getProject(), "src.cpp", contents[1]);
+			IFile f3= TestSourceReader.createFile(p2.getProject(), "src.cpp", contents[2]);
+			waitForIndexer();
+
+			IIndex index= CCorePlugin.getIndexManager().getIndex(new ICProject[]{fCProject, p2});
+			index.acquireReadLock();
+			try {
+				IIndexBinding[] bindings= index.findBindings("StructA_T".toCharArray(), IndexFilter.ALL, NPM);
+				assertEquals(1, bindings.length);
+				IIndexBinding binding= bindings[0];
+				IIndexName[] names= index.findReferences(binding);
+				assertEquals(2, names.length);
+				names= index.findDeclarations(binding);
+				assertEquals(1, names.length);
+			} finally {
+				index.releaseReadLock();
+			}
+		} finally {
+			CProjectHelper.delete(p2);
+		}
+	}
+	
+	// #ifndef _h1
+	// #define _h1
+	// #define M v
+	// #endif
+	
+	// #ifndef _h1
+	// #include "header1.h"
+	// #endif
+	
+	// #include "header1.h"
+	// #include "header2.h"
+	
+	// #include "header2.h"
+	// int M;
+	
+	// #include "header2.h"
+	// #ifndef _h1
+	// #include "header1.h"
+	// #endif
+	public void testIncludeGuardsOutsideOfHeader_Bug167100() throws Exception {
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		String[] contents= getContentsForTest(5);
+		IFile f1= TestSourceReader.createFile(fCProject.getProject(), "header1.h", contents[0]);
+		IFile f2= TestSourceReader.createFile(fCProject.getProject(), "header2.h", contents[1]);
+		IFile f3= TestSourceReader.createFile(fCProject.getProject(), "src.cpp", contents[2]);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		IFile f4= TestSourceReader.createFile(fCProject.getProject(), "src2.cpp", contents[3]);
+		IFile f5= TestSourceReader.createFile(fCProject.getProject(), "src3.cpp", contents[4]);
+		waitForIndexer();
+		
+		IIndex index= indexManager.getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IIndexBinding[] bindings = index.findBindings("v".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			IIndexBinding binding = bindings[0];
+			assertTrue(binding instanceof IVariable);
+			IIndexName[] names = index.findNames(binding,
+					IIndex.FIND_ALL_OCCURRENCES);
+			assertEquals(1, names.length);
+			assertEquals(f4.getFullPath().toString(), names[0].getFile().getLocation().getFullPath());
+			
+			IIndexFile idxFile= index.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(f5));
+			IIndexInclude[] includes= idxFile.getIncludes();
+			assertEquals(2, includes.length);
+			assertTrue(includes[0].isActive());
+			assertTrue(includes[0].isResolved());
+			assertFalse(includes[1].isActive());
+			assertTrue(includes[1].isResolved());
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+	
+	// int globalVar;
+	
+	// #include "../__bugsTest__/common.h"
+	// void func() {
+	//    globalVar++;
+	// }
+	public void testDependentProjectsWithFullIndexer_Bug197311() throws Exception {
+		String[] contents= getContentsForTest(2);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		indexManager.setIndexerId(fCProject, IPDOMManager.ID_FULL_INDEXER);
+		ICProject p2 = CProjectHelper.createCCProject("bug197311", "bin", IPDOMManager.ID_FULL_INDEXER);
+		IProject[] refs = new IProject[] {fCProject.getProject()};
+		IProjectDescription pd = p2.getProject().getDescription();
+		pd.setReferencedProjects(refs);
+		p2.getProject().setDescription(pd, new NullProgressMonitor());
+		try {
+			IFile f1= TestSourceReader.createFile(fCProject.getProject(), "common.h", contents[0]);
+			IFile f2= TestSourceReader.createFile(fCProject.getProject(), "src.cpp", contents[1]);
+			IFile f3= TestSourceReader.createFile(p2.getProject(), "src.cpp", contents[1]);
+			waitForIndexer();
+
+			IIndex index= indexManager.getIndex(p2, IIndexManager.ADD_DEPENDENCIES);
+			index.acquireReadLock();
+			try {
+				IIndexBinding[] bindings= index.findBindings("globalVar".toCharArray(), IndexFilter.ALL, NPM);
+				assertEquals(1, bindings.length);
+				IIndexBinding binding= bindings[0];
+				IIndexName[] names= index.findReferences(binding);
+				assertEquals(2, names.length);
+				names= index.findDeclarations(binding);
+				assertEquals(1, names.length);
+			} finally {
+				index.releaseReadLock();
+			}
+			
+			indexManager.reindex(p2);
+			waitForIndexer();
+
+			index= indexManager.getIndex(p2, IIndexManager.ADD_DEPENDENCIES);
+			index.acquireReadLock();
+			try {
+				IIndexBinding[] bindings= index.findBindings("globalVar".toCharArray(), IndexFilter.ALL, NPM);
+				assertEquals(1, bindings.length);
+				IIndexBinding binding= bindings[0];
+				IIndexName[] names= index.findReferences(binding);
+				assertEquals(2, names.length);
+				names= index.findDeclarations(binding);
+				assertEquals(1, names.length);
+			} finally {
+				index.releaseReadLock();
+			}
+		} finally {
+			CProjectHelper.delete(p2);
+		}
+	}
+	
+	// #define MAC(...) Bug200239
+	
+	// #include "header.h"
+	// int MAC(1);
+	// void func() {
+	//    MAC()= MAC(1) + MAC(1,2);
+	// }
+	public void testVariadicMacros_Bug200239_1() throws Exception {
+		String[] contents= getContentsForTest(2);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		IFile f1= TestSourceReader.createFile(fCProject.getProject(), "header.h", contents[0]);
+		waitUntilFileIsIndexed(f1, INDEX_WAIT_TIME);
+		IFile f2= TestSourceReader.createFile(fCProject.getProject(), "src.cpp", contents[1]);
+		waitForIndexer();
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings= fIndex.findBindings("Bug200239".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			IIndexName[] refs= fIndex.findReferences(bindings[0]);
+			assertEquals(3, refs.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	// #define GMAC(x...) Bug200239
+	
+	// #include "header.h"
+	// int GMAC(1);
+	// void func() {
+	//    GMAC()= GMAC(1) + GMAC(1,2);
+	// }
+	public void testVariadicMacros_Bug200239_2() throws Exception {
+		String[] contents= getContentsForTest(2);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		IFile f1= TestSourceReader.createFile(fCProject.getProject(), "header.h", contents[0]);
+		waitUntilFileIsIndexed(f1, INDEX_WAIT_TIME);
+		IFile f2= TestSourceReader.createFile(fCProject.getProject(), "src.cpp", contents[1]);
+		waitForIndexer();
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings= fIndex.findBindings("Bug200239".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			IIndexName[] refs= fIndex.findReferences(bindings[0]);
+			assertEquals(3, refs.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	
+	// typedef bug200553_A bug200553_B;
+	// typedef bug200553_B bug200553_A;
+	public void testTypedefRecursionCpp_Bug200553() throws Exception {
+		String[] contents= getContentsForTest(1);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		IFile f1= TestSourceReader.createFile(fCProject.getProject(), "src.cpp", contents[0]);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings= fIndex.findBindings("bug200553_A".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			assertTrue(bindings[0] instanceof ITypedef);
+			checkTypedefDepth((ITypedef) bindings[0]);
+
+			bindings= fIndex.findBindings("bug200553_B".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			assertTrue(bindings[0] instanceof ITypedef);
+			checkTypedefDepth((ITypedef) bindings[0]);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+
+		indexManager.update(new ICElement[] {fCProject}, IIndexManager.UPDATE_ALL);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings= fIndex.findBindings("bug200553_A".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			assertTrue(bindings[0] instanceof ITypedef);
+			checkTypedefDepth((ITypedef) bindings[0]);
+
+			bindings= fIndex.findBindings("bug200553_B".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			assertTrue(bindings[0] instanceof ITypedef);
+			checkTypedefDepth((ITypedef) bindings[0]);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	private void checkTypedefDepth(ITypedef td) throws DOMException {
+		int maxDepth= 20;
+		IType type= td;
+		while (--maxDepth > 0 && type instanceof ITypedef) {
+			type= ((ITypedef) type).getType();
+		}
+		assertTrue(maxDepth > 0);
+	}
+	
+	// typedef bug200553_A bug200553_B;
+	// typedef bug200553_B bug200553_A;
+	public void testTypedefRecursionC_Bug200553() throws Exception {
+		String[] contents= getContentsForTest(1);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		IFile f1= TestSourceReader.createFile(fCProject.getProject(), "src.c", contents[0]);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings= fIndex.findBindings("bug200553_A".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			assertTrue(bindings[0] instanceof ITypedef);
+			checkTypedefDepth((ITypedef) bindings[0]);
+
+			bindings= fIndex.findBindings("bug200553_B".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			assertTrue(bindings[0] instanceof ITypedef);
+			checkTypedefDepth((ITypedef) bindings[0]);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+
+		indexManager.update(new ICElement[] {fCProject}, IIndexManager.UPDATE_ALL);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings= fIndex.findBindings("bug200553_A".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			assertTrue(bindings[0] instanceof ITypedef);
+			checkTypedefDepth((ITypedef) bindings[0]);
+
+			bindings= fIndex.findBindings("bug200553_B".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			assertTrue(bindings[0] instanceof ITypedef);
+			checkTypedefDepth((ITypedef) bindings[0]);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	// #ifndef GUARD
+	// #include "source.cpp"
+	// #endif
+	public void testIncludeSource_Bug199412() throws Exception {
+		String[] contents= getContentsForTest(1);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		IFile f1= TestSourceReader.createFile(fCProject.getProject(), "source.cpp", contents[0]);
+		waitForIndexer();
+		
+		final ITranslationUnit tu= (ITranslationUnit) fCProject.findElement(new Path("source.cpp"));
+		Thread th= new Thread() {
+			@Override
+			public void run() {
+				try {
+					tu.getAST(fIndex, ITranslationUnit.AST_CONFIGURE_USING_SOURCE_CONTEXT);
+				} catch (CoreException e) {
+					CCorePlugin.log(e);
+				}	
+			}
+		};
+		fIndex.acquireReadLock();
+		try {
+			th.start();
+			th.join(5000);
+			assertFalse(th.isAlive());
+		} finally {
+			try {
+				th.stop();
+			} finally {
+				fIndex.releaseReadLock();
+			}
+		}
+	}
+
+	// void func_209049(long long x);
+	public void testGPPTypes_Bug209049() throws Exception {
+		String[] contents= getContentsForTest(1);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		IFile f1= TestSourceReader.createFile(fCProject.getProject(), "source.cpp", contents[0]);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings = fIndex.findBindings("func_209049".toCharArray(),
+					IndexFilter.ALL, NPM);
+			IFunctionType ft = ((IFunction) bindings[0]).getType();
+			assertEquals("void (long long int)", ASTTypeUtil.getType(ft));
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	// static inline void staticInHeader() {};
+	
+	// #include "header.h"
+	// void f1() {
+	//    staticInHeader();
+	// }
+	public void testStaticFunctionsInHeader_Bug180305() throws Exception {
+		String[] contents= getContentsForTest(2);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		TestSourceReader.createFile(fCProject.getProject(), "header.h", contents[0]);
+		TestSourceReader.createFile(fCProject.getProject(), "source1.cpp", contents[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "source2.cpp", contents[1]);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings = fIndex.findBindings("staticInHeader".toCharArray(),
+					IndexFilter.ALL, NPM);
+			IFunction func = (IFunction) bindings[0];
+			assertTrue(func.isStatic());
+			IIndexName[] refs = fIndex.findReferences(func);
+			assertEquals(2, refs.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	// static const int staticConstInHeader= 12;
+	
+	// #include "header.h"
+	// void f1() {
+	//    int a= staticConstInHeader;
+	// }
+	public void testStaticVariableInHeader_Bug180305() throws Exception {
+		String[] contents= getContentsForTest(2);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		TestSourceReader.createFile(fCProject.getProject(), "header.h", contents[0]);
+		TestSourceReader.createFile(fCProject.getProject(), "source1.cpp", contents[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "source2.cpp", contents[1]);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings = fIndex.findBindings("staticConstInHeader".toCharArray(),
+					IndexFilter.ALL, NPM);
+			IVariable var = (IVariable) bindings[0];
+			assertTrue(var.isStatic());
+			IIndexName[] refs = fIndex.findReferences(var);
+			assertEquals(2, refs.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	// static inline void staticInHeader() {};
+	
+	// #include "header.h"
+	// void f1() {
+	//    staticInHeader();
+	// }
+	public void testStaticFunctionsInHeaderC_Bug180305() throws Exception {
+		String[] contents= getContentsForTest(2);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		TestSourceReader.createFile(fCProject.getProject(), "header.h", contents[0]);
+		TestSourceReader.createFile(fCProject.getProject(), "source1.c", contents[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "source2.c", contents[1]);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings = fIndex.findBindings("staticInHeader".toCharArray(),
+					IndexFilter.C_DECLARED_OR_IMPLICIT, NPM);
+			IFunction func = (IFunction) bindings[0];
+			assertTrue(func.isStatic());
+			IIndexName[] refs = fIndex.findReferences(func);
+			assertEquals(2, refs.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	// static const int staticConstInHeader= 12;
+	
+	// #include "header.h"
+	// void f1() {
+	//    int a= staticConstInHeader;
+	// }
+	public void testStaticVariableInHeaderC_Bug180305() throws Exception {
+		String[] contents= getContentsForTest(2);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		TestSourceReader.createFile(fCProject.getProject(), "header.h", contents[0]);
+		TestSourceReader.createFile(fCProject.getProject(), "source1.c", contents[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "source2.c", contents[1]);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings = fIndex.findBindings("staticConstInHeader".toCharArray(),
+					IndexFilter.C_DECLARED_OR_IMPLICIT, NPM);
+			IVariable var = (IVariable) bindings[0];
+			assertTrue(var.isStatic());
+			IIndexName[] refs = fIndex.findReferences(var);
+			assertEquals(2, refs.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	// int ok;
+	
+	// #include "header.x"
+	public void testNonStandardSuffix_Bug205778() throws Exception {
+		String[] contents= getContentsForTest(2);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		TestSourceReader.createFile(fCProject.getProject(), "header.x", contents[0]);
+		TestSourceReader.createFile(fCProject.getProject(), "source.cpp", contents[1]);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings = fIndex.findBindings("ok".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	// inline void MyClass::method() {}
+	
+	// class MyClass {
+	//    void method();
+	// };
+	// #include "MyClass_inline.h"
+	
+	// #include "MyClass.h"
+	public void testAddingMemberBeforeContainer_Bug203170() throws Exception {
+		String[] contents= getContentsForTest(3);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		TestSourceReader.createFile(fCProject.getProject(), "MyClass_inline.h", contents[0]);
+		TestSourceReader.createFile(fCProject.getProject(), "MyClass.h", contents[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "MyClass.cpp", contents[2]);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings = fIndex.findBindings(new char[][] { "MyClass".toCharArray(),
+					"method".toCharArray() }, IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			IIndexName[] decls = fIndex.findDeclarations(bindings[0]);
+			assertEquals(2, decls.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	
+	// typedef int unrelated;
+	
+	// class unrelated {
+	// public: int b;
+	// };
+	
+	// #include "h1.h"
+	// void test() {
+	//    unrelated a;
+	//    a.b;
+	// }
+	public void testUnrelatedTypedef_Bug214146() throws Exception {
+		String[] contents= getContentsForTest(3);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		TestSourceReader.createFile(fCProject.getProject(), "s1.cpp", contents[0]);
+		TestSourceReader.createFile(fCProject.getProject(), "h1.h", contents[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "s2.h", contents[2]);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings = fIndex.findBindings(new char[][] { "unrelated".toCharArray(),
+					"b".toCharArray() }, IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			IIndexName[] decls = fIndex.findNames(bindings[0], IIndex.FIND_ALL_OCCURRENCES);
+			assertEquals(2, decls.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	// #undef BBB
+	
+	// #define BBB
+	// #include "header.h"
+	// #ifdef BBB
+	//    int bug227088;
+	// #else
+	//    int ok;
+	// #endif
+	public void testUndefInHeader_Bug227088() throws Exception {
+		String[] contents= getContentsForTest(2);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		TestSourceReader.createFile(fCProject.getProject(), "header.h", contents[0]);
+		TestSourceReader.createFile(fCProject.getProject(), "s1.cpp", contents[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "s2.cpp", contents[1]);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings = fIndex.findBindings("bug227088".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(0, bindings.length);
+			bindings = fIndex.findBindings("ok".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			IIndexName[] decls = fIndex.findNames(bindings[0], IIndex.FIND_ALL_OCCURRENCES);
+			assertEquals(2, decls.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	// #define BUG ok
+	
+	// int BUG;
+
+	// #include "common.h"
+	// #include "header.h"
+	public void testCommonHeader_Bug228012() throws Exception {
+		String[] contents= getContentsForTest(3);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		TestSourceReader.createFile(fCProject.getProject(), "common.h", contents[0]);
+		IFile hfile= TestSourceReader.createFile(fCProject.getProject(), "header.h", contents[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "source.cpp", contents[2]);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		ITranslationUnit tu= (ITranslationUnit) CoreModel.getDefault().create(hfile);
+		fIndex.acquireReadLock();
+		try {
+			IASTTranslationUnit ast= tu.getAST(fIndex, ITranslationUnit.AST_CONFIGURE_USING_SOURCE_CONTEXT | ITranslationUnit.AST_SKIP_INDEXED_HEADERS);
+			IASTSimpleDeclaration decl= (IASTSimpleDeclaration) ast.getDeclarations()[0];
+			assertEquals("ok", decl.getDeclarators()[0].getName().toString());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	// #include "h2.h"
+	
+	// int BUG;
+
+	// #define BUG ok
+	// #include "h1.h"
+	public void testIndirectContext_Bug267907() throws Exception {
+		String[] contents= getContentsForTest(3);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		TestSourceReader.createFile(fCProject.getProject(), "h1.h", contents[0]);
+		IFile hfile= TestSourceReader.createFile(fCProject.getProject(), "h2.h", contents[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "source.cpp", contents[2]);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		ITranslationUnit tu= (ITranslationUnit) CoreModel.getDefault().create(hfile);
+		fIndex.acquireReadLock();
+		try {
+			IASTTranslationUnit ast= tu.getAST(fIndex, ITranslationUnit.AST_CONFIGURE_USING_SOURCE_CONTEXT | ITranslationUnit.AST_SKIP_INDEXED_HEADERS);
+			IASTSimpleDeclaration decl= (IASTSimpleDeclaration) ast.getDeclarations()[0];
+			assertEquals("ok", decl.getDeclarators()[0].getName().toString());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	
+	// #include <header.h>
+	// #define _CONCAT(x,y) x##y
+	// #define CONCAT(x,y) _CONCAT(x,y)
+	public void testIncludeHeuristics_Bug213562() throws Exception {
+		String contents= getContentsForTest(1)[0];
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		TestSourceReader.createFile(fCProject.getProject(), "f1/g/header.h", "#define ID one\n");
+		TestSourceReader.createFile(fCProject.getProject(), "f2/header.h",    "#define ID two\n");
+		TestSourceReader.createFile(fCProject.getProject(), "f1/g/h/header.h", "#define ID three\n");
+		TestSourceReader.createFile(fCProject.getProject(), "f1/g/source.cpp", contents + "int CONCAT(one, ID);\n");
+		TestSourceReader.createFile(fCProject.getProject(), "f2/g/source.cpp", contents + "int CONCAT(two, ID);\n");
+		TestSourceReader.createFile(fCProject.getProject(), "f1/g/h/source.cpp", contents + "int CONCAT(three, ID);\n");
+		
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings= fIndex.findBindings("oneone".toCharArray(), IndexFilter.ALL_DECLARED, new NullProgressMonitor());
+			assertEquals(1, bindings.length);
+			bindings= fIndex.findBindings("twotwo".toCharArray(), IndexFilter.ALL_DECLARED, new NullProgressMonitor());
+			assertEquals(1, bindings.length);
+			bindings= fIndex.findBindings("threethree".toCharArray(), IndexFilter.ALL_DECLARED, new NullProgressMonitor());
+			assertEquals(1, bindings.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	public void testIncludeHeuristicsFlag_Bug213562() throws Exception {
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		TestSourceReader.createFile(fCProject.getProject(), "f1/header.h", "");
+		IFile f1= TestSourceReader.createFile(fCProject.getProject(), "source1.cpp", "#include \"header.h\"\n");
+		IFile f2= TestSourceReader.createFile(fCProject.getProject(), "source2.cpp", "#include \"f1/header.h\"\n");
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile f= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(f1));
+			IIndexInclude i= f.getIncludes()[0];
+			assertTrue(i.isResolvedByHeuristics());
+
+			f= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(f2));
+			i= f.getIncludes()[0];
+			assertFalse(i.isResolvedByHeuristics());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	
+	// #include "dir"
+	// #include "header.h"
+	public void testInclusionOfFolders_Bug243682() throws Exception {
+		String contents= getContentsForTest(1)[0];
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		IFile sol= TestSourceReader.createFile(fCProject.getProject(), "f1/header.h", "");
+		TestSourceReader.createFile(fCProject.getProject(), "dir/dummy.h", "");
+		TestSourceReader.createFile(fCProject.getProject(), "header.h/dummy.h", "");
+		IFile f1= TestSourceReader.createFile(fCProject.getProject(), "source1.cpp", contents);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile f= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(f1));
+			IIndexInclude[] is= f.getIncludes();
+			assertFalse(is[0].isResolved());
+			assertTrue(is[1].isResolvedByHeuristics());
+			assertEquals(sol.getFullPath().toString(), is[1].getIncludesLocation().getFullPath());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}	
+	
+	
+	// #ifndef B_H
+	// #include "b.h"
+	// #endif
+	//
+	// #ifndef A_H_
+	// #define A_H_
+	// int aOK;
+	// #endif /* A_H_ */
+
+	// #ifndef A_H_
+	// #include "a.h"
+	// #endif
+	//
+	// #ifndef B_H_
+	// #define B_H_
+	// int bOK;
+	// #endif
+
+	// #include "a.h"
+	public void testStrangeIncludeStrategy_Bug249884() throws Exception {
+		String[] contents= getContentsForTest(3);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		IFile ah= TestSourceReader.createFile(fCProject.getProject(), "a.h", contents[0]);
+		TestSourceReader.createFile(fCProject.getProject(), "b.h", contents[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "source.cpp", contents[2]);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		ITranslationUnit tu= (ITranslationUnit) CoreModel.getDefault().create(ah);
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings= fIndex.findBindings("aOK".toCharArray(), IndexFilter.ALL_DECLARED, new NullProgressMonitor());
+			assertEquals(1, bindings.length);
+			fIndex.findBindings("bOK".toCharArray(), IndexFilter.ALL_DECLARED, new NullProgressMonitor());
+			assertEquals(1, bindings.length);
+			IASTTranslationUnit ast= tu.getAST(fIndex, ITranslationUnit.AST_CONFIGURE_USING_SOURCE_CONTEXT | ITranslationUnit.AST_SKIP_INDEXED_HEADERS);
+			final IASTDeclaration[] decls = ast.getDeclarations();
+			assertEquals(1, decls.length);
+			IASTSimpleDeclaration decl= (IASTSimpleDeclaration) decls[0];
+			assertEquals("aOK", decl.getDeclarators()[0].getName().toString());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	// struct s {int a;};
+	// struct s x[]= {{.a=1,},{.a=2}};
+	public void testReferencesInDesignators_Bug253690() throws Exception {
+		String code= getContentsForTest(1)[0];
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		IFile file= TestSourceReader.createFile(fCProject.getProject(), "test.c", code);
+		waitUntilFileIsIndexed(file, 4000);
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings = fIndex.findBindings("a".toCharArray(), false, IndexFilter.ALL_DECLARED, NPM);
+			assertEquals(1, bindings.length);
+			IIndexName[] refs = fIndex.findNames(bindings[0], IIndex.FIND_REFERENCES);
+			assertEquals(2, refs.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	//	namespace ns {
+	//		template<typename T> class X {};
+	//	}
+	//	class Y : public ns::X<int> {
+	//	};
+	public void testInstanceInheritance_258745() throws Exception {
+		String code= getContentsForTest(1)[0];
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		IFile file= TestSourceReader.createFile(fCProject.getProject(), "test.cpp", code);
+		waitUntilFileIsIndexed(file, 4000);
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] bindings = fIndex.findBindings("Y".toCharArray(), false, IndexFilter.ALL_DECLARED, NPM);
+			assertEquals(1, bindings.length);
+			ICPPClassType ct= (ICPPClassType) bindings[0];
+			final ICPPBase[] bases = ct.getBases();
+			assertEquals(1, bases.length);
+			IBinding inst = bases[0].getBaseClass();
+			assertTrue(inst instanceof ICPPTemplateInstance);
+
+			IIndexName name= (IIndexName) bases[0].getBaseClassSpecifierName();
+			IBinding inst2= fIndex.findBinding(name);
+			assertEquals(inst, inst2);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	
+	// #include "B.cpp"
+
+	// static int STATIC;
+	// void ref() {STATIC=1;}
+	public void testStaticVarInSourceIncluded_Bug265821() throws Exception {
+		String[] contents= getContentsForTest(2);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		IFile a= TestSourceReader.createFile(fCProject.getProject(), "A.cpp", contents[0]);
+		IFile b= TestSourceReader.createFile(fCProject.getProject(), "B.cpp", contents[1]);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		ITranslationUnit tu= (ITranslationUnit) CoreModel.getDefault().create(b);
+		fIndex.acquireReadLock();
+		try {
+			IASTTranslationUnit ast= tu.getAST(fIndex, ITranslationUnit.AST_CONFIGURE_USING_SOURCE_CONTEXT | ITranslationUnit.AST_SKIP_INDEXED_HEADERS);
+			IBinding var= ((IASTSimpleDeclaration) ast.getDeclarations()[0]).getDeclarators()[0].getName().resolveBinding();
+			IIndexBinding adapted = fIndex.adaptBinding(var);
+			assertNotNull(adapted);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	// int a;
+	
+	// #include "a.h"
+	// void test() {a=0;}
+	public void testDeclarationForBinding_Bug254844() throws Exception {
+		String[] contents= getContentsForTest(2);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		IFile a= TestSourceReader.createFile(fCProject.getProject(), "a.h", contents[0]);
+		IFile b= TestSourceReader.createFile(fCProject.getProject(), "b.h", contents[0]);
+		IFile source= TestSourceReader.createFile(fCProject.getProject(), "source.cpp", contents[1]);
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		ITranslationUnit tu= (ITranslationUnit) CoreModel.getDefault().create(source);
+		fIndex.acquireReadLock();
+		try {
+			IASTTranslationUnit ast= tu.getAST(fIndex, ITranslationUnit.AST_SKIP_INDEXED_HEADERS);
+			IIndexFileSet fileset= ast.getIndexFileSet();
+			IBinding var= getBindingFromASTName(ast, contents[1], "a=", 1, IBinding.class);
+			IName[] decls= ast.getDeclarations(var);
+			assertEquals(2, decls.length);
+			int check= 0;
+			for (IName name : decls) {
+				assert name instanceof IIndexName;
+				IIndexName iName= (IIndexName) name;
+				if (iName.getFileLocation().getFileName().endsWith("a.h")) {
+					check |= 1;
+					assertTrue(fileset.contains(iName.getFile()));
+				} else {
+					check |= 2;
+					assertFalse(fileset.contains(iName.getFile()));
+				}
+			}
+			assertEquals(3, check);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	//  // a.h
+	//	namespace ns {
+	//	struct A {
+	//	  int i;
+	//	};
+	//  }
+	
+	//  #include "a.h"
+	//	using ns::A;
+	//  void test() {
+	//    A a;
+	//    a.i = 0;
+	//    a.j = 0;
+	//  }
+
+	//  // b.h
+	//	struct A {
+	//	  int j;
+	//	};
+	
+	//  #include "b.h"
+	//  void test() {
+	//    A a;
+	//    a.i = 0;
+	//    a.j = 0;
+	//  }
+	public void testDisambiguationByReachability_268704_1() throws Exception {
+		waitForIndexer();
+
+		String[] testData = getContentsForTest(4);
+		TestSourceReader.createFile(fCProject.getProject(), "a.h", testData[0]);
+		IFile a = TestSourceReader.createFile(fCProject.getProject(), "a.cpp", testData[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "b.h", testData[2]);
+		IFile b = TestSourceReader.createFile(fCProject.getProject(), "b.cpp", testData[3]);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		IIndex index= indexManager.getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			BindingAssertionHelper aHelper = new BindingAssertionHelper(a, testData[1], index);
+			aHelper.assertNonProblem("A a;", 1, ICPPClassType.class);
+			aHelper.assertNonProblem("i = 0;", 1, ICPPVariable.class);
+			aHelper.assertProblem("j = 0;", 1);
+			BindingAssertionHelper bHelper = new BindingAssertionHelper(b, testData[3], index);
+			aHelper.assertNonProblem("A a;", 1, ICPPClassType.class);
+			bHelper.assertProblem("i = 0;", 1);
+			bHelper.assertNonProblem("j = 0;", 1, ICPPVariable.class);
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+
+	//  // a.h
+	//	namespace ns {
+	//	  enum E1 { e = 1 };
+	//	}
+	
+	//  #include "a.h"
+	//	using namespace ns;
+	//	int i = e;
+
+	//  // b.h
+	//	enum E2 { e = 2 };
+	
+	//  #include "b.h"
+	//	int i = e;
+	public void testDisambiguationByReachability_268704_2() throws Exception {
+		waitForIndexer();
+
+		String[] testData = getContentsForTest(4);
+		TestSourceReader.createFile(fCProject.getProject(), "a.h", testData[0]);
+		IFile a = TestSourceReader.createFile(fCProject.getProject(), "a.cpp", testData[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "b.h", testData[2]);
+		IFile b = TestSourceReader.createFile(fCProject.getProject(), "b.cpp", testData[3]);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		IIndex index= indexManager.getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			BindingAssertionHelper aHelper = new BindingAssertionHelper(a, testData[1], index);
+			IEnumerator e1 = aHelper.assertNonProblem("e;", 1, IEnumerator.class);
+			assertEquals(1, e1.getValue().numericalValue().longValue());
+			BindingAssertionHelper bHelper = new BindingAssertionHelper(b, testData[3], index);
+			IEnumerator e2 = bHelper.assertNonProblem("e;", 1, IEnumerator.class);
+			assertEquals(2, e2.getValue().numericalValue().longValue());
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+
+	//  // a.h
+	//  int xx;
+
+	//  #include "a.h"
+	//  int yy= xx;
+
+	//  // b.h
+	//  int xx();
+
+	//	#include "b.h"
+	//	void test() {
+	//	  xx();
+	//	}
+	public void testDisambiguationByReachability_268704_3() throws Exception {
+		String[] testData = getContentsForTest(4);
+		TestSourceReader.createFile(fCProject.getProject(), "a.h", testData[0]);
+		IFile a = TestSourceReader.createFile(fCProject.getProject(), "a.cpp", testData[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "b.h", testData[2]);
+		IFile b = TestSourceReader.createFile(fCProject.getProject(), "b.cpp", testData[3]);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		IIndex index= indexManager.getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			BindingAssertionHelper aHelper = new BindingAssertionHelper(a, testData[1], index);
+			IVariable b1 = aHelper.assertNonProblem("xx;", 2, IVariable.class);
+			BindingAssertionHelper bHelper = new BindingAssertionHelper(b, testData[3], index);
+			IFunction f = bHelper.assertNonProblem("xx();", 2, IFunction.class);
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+
+	//  // header.h
+	//	template<class T>
+	//	struct A {
+	//	  void m(const T& p);
+	//	};
+
+	//  #include "header.h"
+	//	namespace {
+	//	enum E { e1 };
+	//	}
+	//
+	//	void test() {
+	//	  A<E> a;
+	//	  a.m(e1);
+	//	}
+
+	//	enum E { e2	};
+	public void testDisambiguationByReachability_281782() throws Exception {
+		waitForIndexer();
+
+		String[] testData = getContentsForTest(3);
+		TestSourceReader.createFile(fCProject.getProject(), "header.h", testData[0]);
+		IFile test= TestSourceReader.createFile(fCProject.getProject(), "test.cpp", testData[1]);
+		TestSourceReader.createFile(fCProject.getProject(), "unrelated.cpp", testData[2]);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		IIndex index= indexManager.getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IASTTranslationUnit ast = TestSourceReader.createIndexBasedAST(index, fCProject, test);
+			getBindingFromASTName(ast, testData[1], "m(e1)", 1, ICPPMethod.class);
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+
+	//  // a.h
+	//	#undef AAA
+	
+	//  // b.h
+	//  #include "a.h"
+	//	#define AAA
+
+	//  // source.c
+	//	#include "b.h"
+	//  #ifdef AAA
+	//  int ok;
+	//  #endif
+	public void testPreprocessingStatementOrder_270806_1() throws Exception {
+		waitForIndexer();
+		String[] testData = getContentsForTest(3);
+		TestSourceReader.createFile(fCProject.getProject(), "a.h", testData[0]);
+		TestSourceReader.createFile(fCProject.getProject(), "b.h", testData[1]);
+		IFile s= TestSourceReader.createFile(fCProject.getProject(), "s1.c", testData[2]);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		IIndex index= indexManager.getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IASTTranslationUnit tu = TestSourceReader.createIndexBasedAST(index, fCProject, s);
+			IASTPreprocessorStatement[] pstmts= tu.getAllPreprocessorStatements();
+			IASTPreprocessorStatement ifndef= pstmts[1];
+			assertInstance(ifndef, IASTPreprocessorIfdefStatement.class);
+			assertTrue(((IASTPreprocessorIfdefStatement) ifndef).taken());
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+
+	//  // a.h
+	//	#undef AAA
+	
+	//  // b.h
+	//	#define AAA
+	//  #include "a.h"
+
+	//  // source.c
+	//	#include "b.h"
+	//  #ifdef AAA
+	//  int bug;
+	//  #endif
+	public void testPreprocessingStatementOrder_270806_2() throws Exception {
+		waitForIndexer();
+		String[] testData = getContentsForTest(3);
+		TestSourceReader.createFile(fCProject.getProject(), "a.h", testData[0]);
+		TestSourceReader.createFile(fCProject.getProject(), "b.h", testData[1]);
+		IFile s= TestSourceReader.createFile(fCProject.getProject(), "s1.c", testData[2]);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		IIndex index= indexManager.getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IASTTranslationUnit tu = TestSourceReader.createIndexBasedAST(index, fCProject, s);
+			IASTPreprocessorStatement[] pstmts= tu.getAllPreprocessorStatements();
+			IASTPreprocessorStatement ifndef= pstmts[1];
+			assertInstance(ifndef, IASTPreprocessorIfdefStatement.class);
+			assertFalse(((IASTPreprocessorIfdefStatement) ifndef).taken());
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+
+	//	namespace X {}
+	//	namespace Y {}
+	//	#define AAA
+	//	#define BBB
+	//  #include "inc.h"
+	//  #include <inc.h>
+	//  using namespace X;
+	//  using namespace Y;
+	public void testPreprocessingStatementOrder_270806_3() throws Exception {
+		waitForIndexer();
+		String[] testData = getContentsForTest(1);
+		IFile f= TestSourceReader.createFile(fCProject.getProject(), "a.cpp", testData[0]);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		waitUntilFileIsIndexed(f, 4000);
+		IIndex index= indexManager.getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IIndexFile file= index.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(f));
+			// check order of includes
+			IIndexInclude[] incs = file.getIncludes();
+			assertEquals(2, incs.length);
+			assertFalse(incs[0].isSystemInclude());
+			assertTrue(incs[1].isSystemInclude());
+			// check order of macros
+			IIndexMacro[] macros = file.getMacros();
+			assertEquals(2, macros.length);
+			assertEquals("AAA", macros[0].getName());
+			assertEquals("BBB", macros[1].getName());
+			// check order of using directives
+			ICPPUsingDirective[] uds = file.getUsingDirectives();
+			assertEquals(2, uds.length);
+			assertEquals("X", new String(uds[0].getNominatedScope().getScopeName().getSimpleID()));
+			assertEquals("Y", new String(uds[1].getNominatedScope().getScopeName().getSimpleID()));
+			assertTrue(uds[0].getPointOfDeclaration() < uds[1].getPointOfDeclaration());
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+	
+	//	template<typename T> void f(T t) throw (T) {}
+	public void testFunctionTemplateWithThrowsException_293021() throws Exception {
+		waitForIndexer();
+		String testData = getContentsForTest(1)[0].toString();
+		IFile f= TestSourceReader.createFile(fCProject.getProject(), "testFunctionTemplateWithThrowsException_293021.cpp", testData);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		waitUntilFileIsIndexed(f, 4000);
+		IIndex index= indexManager.getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IIndexFile file= index.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(f));
+			int idx= testData.indexOf("f(");
+			IIndexName[] names = file.findNames(idx, idx+1);
+			assertEquals(1, names.length);
+			ICPPFunctionTemplate ft= (ICPPFunctionTemplate) index.findBinding(names[0]);
+			final IType[] espec = ft.getExceptionSpecification();
+			ICPPTemplateParameter par= (ICPPTemplateParameter) espec[0];
+			assertEquals(ft, par.getOwner());
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+	
+	//  // a.h
+	//	class P {};
+	
+	//  // b.h
+	//	namespace P {class C {};}
+
+	//  // source1.cpp
+	// #include "a.h" 
+	// P p;
+
+	//  // source2.cpp
+	// #include "b.h" 
+	// P::C c;
+	public void testDisambiguateClassVsNamespace_297686() throws Exception {
+		waitForIndexer();
+		String[] testData = getContentsForTest(4);
+		TestSourceReader.createFile(fCProject.getProject(), "a.h", testData[0]);
+		TestSourceReader.createFile(fCProject.getProject(), "b.h", testData[1]);
+		IFile s1= TestSourceReader.createFile(fCProject.getProject(), "s1.cpp", testData[2]);
+		IFile s2= TestSourceReader.createFile(fCProject.getProject(), "s2.cpp", testData[3]);
+		final IIndexManager indexManager = CCorePlugin.getIndexManager();
+		indexManager.reindex(fCProject);
+		waitForIndexer();
+		IIndex index= indexManager.getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IASTTranslationUnit tu = TestSourceReader.createIndexBasedAST(index, fCProject, s1);
+			IASTSimpleDeclaration sdecl= (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			IVariable var= (IVariable) sdecl.getDeclarators()[0].getName().resolveBinding();
+			assertFalse(var.getType() instanceof IProblemBinding);
+			assertTrue(var.getType() instanceof ICPPClassType);
+
+			tu = TestSourceReader.createIndexBasedAST(index, fCProject, s2);
+			sdecl= (IASTSimpleDeclaration) tu.getDeclarations()[0];
+			var= (IVariable) sdecl.getDeclarators()[0].getName().resolveBinding();
+			assertFalse(var.getType() instanceof IProblemBinding);
+			assertTrue(var.getType() instanceof ICPPClassType);
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCBindingResolutionBugs.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCBindingResolutionBugs.java
new file mode 100644
index 0000000..4124bdc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCBindingResolutionBugs.java
@@ -0,0 +1,414 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *    Andrew Ferguson (Symbian)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.index.tests;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IEnumeration;
+import org.eclipse.cdt.core.dom.ast.IEnumerator;
+import org.eclipse.cdt.core.dom.ast.IField;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.IScope;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.c.ICCompositeTypeScope;
+import org.eclipse.cdt.core.index.IIndexBinding;
+
+/**
+ * For testing PDOM binding resolution
+ */
+public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase {
+
+	public static class SingleProject extends IndexCBindingResolutionBugs {
+		public SingleProject() {setStrategy(new SinglePDOMTestStrategy(false));}
+		public static TestSuite suite() {return suite(SingleProject.class);}
+	}
+	public static class ProjectWithDepProj extends IndexCBindingResolutionBugs {
+		public ProjectWithDepProj() {setStrategy(new ReferencedProject(false));}
+		public static TestSuite suite() {return suite(ProjectWithDepProj.class);}
+	}
+	
+	public static void addTests(TestSuite suite) {		
+		suite.addTest(SingleProject.suite());
+		suite.addTest(ProjectWithDepProj.suite());
+	}
+	
+	
+	// #include <stdio.h>	
+	// void func1(void)
+	//	{
+	//	    int i = 0;
+	//	    for (i=0; i<10;i++)
+	//	    {
+	//	        printf("%i", i);
+	//	    }
+	//
+	//	}
+	
+	//  #include "header.h"
+	//
+	//	int main(void)
+	//	{
+	//	    while (1)
+	//	    {
+	//	        func1();
+	//	    }
+	//	    return 0;
+	//	}
+	public void testBug175267() throws DOMException {
+		IBinding b0 = getBindingFromASTName("func1()", 5);
+		assertTrue(b0 instanceof IFunction);
+		IFunction f0 = (IFunction) b0;
+		IParameter[] params= f0.getParameters();
+		assertEquals(1, params.length);
+		IType param= params[0].getType();
+		assertTrue(param instanceof IBasicType);
+		IType returnType= f0.getType().getReturnType();
+		assertTrue(returnType instanceof IBasicType);
+	}
+
+	//  void func1(void);
+	
+	//  #include "header.h"
+	//
+	//	int main(void)
+	//	{
+	//      void* v= func1;
+	//	}
+	public void testBug181735() throws DOMException {
+		IBinding b0 = getBindingFromASTName("func1;", 5);
+		assertTrue(b0 instanceof IFunction);
+	}
+	
+    // typedef struct {
+    //    int utm;
+    // } usertype;
+    // void func(usertype t);
+
+	// #include "header.h"
+    // void test() {
+	//    usertype ut;
+	//    func(ut);
+    // }
+    public void testFuncWithTypedefForAnonymousStruct_190730() throws Exception {
+		IBinding b0 = getBindingFromASTName("func(", 4);
+		assertTrue(b0 instanceof IFunction);
+		IFunction f= (IFunction) b0;
+		IParameter[] pars= f.getParameters();
+		assertEquals(1, pars.length);
+		IType type= pars[0].getType();
+		assertInstance(type, ITypedef.class);
+		type= ((ITypedef) type).getType();
+		assertInstance(type, ICompositeType.class);
+    }
+
+    // typedef enum {
+    //    eItem
+    // } userEnum;
+    // void func(userEnum t);
+
+	// #include "header.h"
+    // void test() {
+	//    userEnum ut;
+	//    func(ut);
+    // }
+    public void testFuncWithTypedefForAnonymousEnum_190730() throws Exception {
+		IBinding b0 = getBindingFromASTName("func(", 4);
+		assertTrue(b0 instanceof IFunction);
+		IFunction f= (IFunction) b0;
+		IParameter[] pars= f.getParameters();
+		assertEquals(1, pars.length);
+		IType type= pars[0].getType();
+		assertInstance(type, ITypedef.class);
+		type= ((ITypedef) type).getType();
+		assertInstance(type, IEnumeration.class);
+		assertTrue(type instanceof IEnumeration);
+    }
+    
+    // int globalVar;
+
+	// // don't include header
+    // char globalVar;
+    public void testAstIndexConflictVariable_Bug195127() throws Exception {
+    	fakeFailForMultiProject();
+		IBinding b0 = getBindingFromASTName("globalVar;", 9);
+		assertTrue(b0 instanceof IVariable);
+		IVariable v= (IVariable) b0;
+		IType type= v.getType();
+		assertTrue(type instanceof IBasicType);
+		assertTrue(((IBasicType) type).getType() == IBasicType.t_char);
+    }
+
+    // int globalFunc();
+
+	// // don't include header
+    // char globalFunc();
+    public void testAstIndexConflictFunction_Bug195127() throws Exception {
+    	fakeFailForMultiProject();
+		IBinding b0 = getBindingFromASTName("globalFunc(", 10);
+		assertTrue(b0 instanceof IFunction);
+		IFunction f= (IFunction) b0;
+		IType type= f.getType().getReturnType();
+		assertTrue(type instanceof IBasicType);
+		assertTrue(((IBasicType) type).getType() == IBasicType.t_char);
+    }
+
+    // struct astruct {
+    //    int member;
+    // };
+
+	// // don't include header
+    // struct astruct {
+    //    char member;
+    //    int additionalMember;
+    // };
+    public void testAstIndexConflictStruct_Bug195127() throws Exception {
+    	fakeFailForMultiProject();
+		IBinding b0 = getBindingFromASTName("astruct", 7);
+		assertTrue(b0 instanceof ICompositeType);
+		ICompositeType ct= (ICompositeType) b0;
+		IField[] fields= ct.getFields();
+		assertEquals(2, fields.length);
+		IField member= fields[0];
+		IField additionalMember= fields[1];
+		if (member.getName().equals("additionalMember")) {
+			IField h= member; member= additionalMember; additionalMember= h;
+		}
+		assertEquals("member", member.getName());
+		assertEquals("additionalMember", additionalMember.getName());
+		IType type= member.getType();
+		assertTrue(type instanceof IBasicType);
+		assertTrue(((IBasicType) type).getType() == IBasicType.t_char);
+    }
+
+    // enum anenum {
+    //    eItem0
+    // };
+
+	// // don't include header
+    // enum anenum {
+    //    eItem0, eItem1
+    // };
+    public void testAstIndexConflictEnumerator_Bug195127() throws Exception {
+    	fakeFailForMultiProject();
+		IBinding b0 = getBindingFromASTName("anenum", 6);
+		assertTrue(b0 instanceof IEnumeration);
+		IEnumeration enumeration= (IEnumeration) b0;
+		IEnumerator[] enumerators= enumeration.getEnumerators();
+		assertEquals(2, enumerators.length);
+    }
+
+    // typedef int atypedef;
+
+	// // don't include header
+    // typedef char atypedef;
+    public void testAstIndexConflictTypedef_Bug195127() throws Exception {
+    	fakeFailForMultiProject();
+		IBinding b0 = getBindingFromASTName("atypedef;", 8);
+		assertTrue(b0 instanceof ITypedef);
+		ITypedef t= (ITypedef) b0;
+		IType type= t.getType();
+		assertTrue(type instanceof IBasicType);
+		assertTrue(((IBasicType) type).getType() == IBasicType.t_char);
+    }
+
+    // struct st_20070703 {
+    //    int member;
+    // };
+
+	// #include "header.h"
+    // struct st_20070703;
+    // void func(struct st_20070703* x) {
+    //    x->member= 0;
+    // }
+    public void testAstIndexStructFwdDecl_Bug195227() throws Exception {
+		IBinding b0 = getBindingFromASTName("member=", 6);
+		assertTrue(b0 instanceof IField);
+    }
+
+    // struct astruct {
+    //    int member;
+    // };
+    // enum anenum {
+    //    eItem0
+    // };
+
+	// #include "header.h"
+    // struct astruct;
+    // enum anenum;
+    // void func(struct astruct a, enum anenum b) {
+    // }
+    public void testAstIndexFwdDecl_Bug195227() throws Exception {
+		IBinding b0 = getBindingFromASTName("astruct;", 7);
+		IBinding b1 = getBindingFromASTName("anenum;", 6);
+		assertTrue(b0 instanceof ICompositeType);
+		ICompositeType t= (ICompositeType) b0;
+		IField[] f= t.getFields();
+		assertEquals(1, f.length);
+		assertTrue(b1 instanceof IEnumeration);
+		IEnumeration e= (IEnumeration) b1;
+		IEnumerator[] ei= e.getEnumerators();
+		assertEquals(1, ei.length);
+
+		b0 = getBindingFromASTName("astruct a", 7);
+		b1 = getBindingFromASTName("anenum b", 6);
+		assertTrue(b0 instanceof ICompositeType);
+		t= (ICompositeType) b0;
+		f= t.getFields();
+		assertEquals(1, f.length);
+		assertTrue(b1 instanceof IEnumeration);
+		e= (IEnumeration) b1;
+		ei= e.getEnumerators();
+		assertEquals(1, ei.length);
+    } 
+
+    // // no header needed
+    
+    // typedef struct {
+    //    int member;
+    // } t_struct;
+    // typedef union {
+    //    int member;
+    // } t_union;
+    // typedef enum {
+    //    ei
+    // } t_enum;
+	public void testIsSameAnonymousType_Bug193962() throws DOMException {
+		// struct
+		IBinding tdAST = getBindingFromASTName("t_struct;", 8);
+		assertFalse(tdAST instanceof IIndexBinding);
+		IBinding tdIndex= strategy.getIndex().adaptBinding(tdAST);
+		assertTrue(tdIndex instanceof IIndexBinding);
+		assertTrue(tdAST instanceof ITypedef);
+		assertTrue(tdIndex instanceof ITypedef);
+		
+		IType tAST= ((ITypedef) tdAST).getType();
+		IType tIndex= ((ITypedef) tdIndex).getType();
+		assertTrue(tAST instanceof ICompositeType);
+		assertTrue(tIndex instanceof ICompositeType);
+		assertTrue(tAST.isSameType(tIndex));
+		assertTrue(tIndex.isSameType(tAST));
+
+		// union
+		tdAST = getBindingFromASTName("t_union;", 7);
+		assertFalse(tdAST instanceof IIndexBinding);
+		tdIndex= strategy.getIndex().adaptBinding(tdAST);
+		assertTrue(tdIndex instanceof IIndexBinding);
+		assertTrue(tdAST instanceof ITypedef);
+		assertTrue(tdIndex instanceof ITypedef);
+		
+		tAST= ((ITypedef) tdAST).getType();
+		tIndex= ((ITypedef) tdIndex).getType();
+		assertTrue(tAST instanceof ICompositeType);
+		assertTrue(tIndex instanceof ICompositeType);
+		assertTrue(tAST.isSameType(tIndex));
+		assertTrue(tIndex.isSameType(tAST));
+
+		// enum
+		tdAST = getBindingFromASTName("t_enum;", 6);
+		assertFalse(tdAST instanceof IIndexBinding);
+		tdIndex= strategy.getIndex().adaptBinding(tdAST);
+		assertTrue(tdIndex instanceof IIndexBinding);
+		assertTrue(tdAST instanceof ITypedef);
+		assertTrue(tdIndex instanceof ITypedef);
+		
+		tAST= ((ITypedef) tdAST).getType();
+		tIndex= ((ITypedef) tdIndex).getType();
+		assertTrue(tAST instanceof IEnumeration);
+		assertTrue(tIndex instanceof IEnumeration);
+		assertTrue(tAST.isSameType(tIndex));
+		assertTrue(tIndex.isSameType(tAST));
+	}
+	
+	// struct outer {
+	//    union {
+	//       int var1;
+	//    };
+	// };
+	  
+	// #include "header.h"
+	// void test() {
+	//    struct outer x;
+	//    x.var1=1;
+	// }
+	public void testAnonymousUnion_Bug216791() throws DOMException {
+		// struct
+		IBinding b = getBindingFromASTName("var1=", 4);
+		assertTrue(b instanceof IField);
+		IField f= (IField) b;
+		IScope outer= f.getCompositeTypeOwner().getScope();
+		assertTrue(outer instanceof ICCompositeTypeScope);
+		assertEquals("outer", outer.getScopeName().toString());
+	}
+
+	// union outer {
+	//    struct {
+	//       int var1;
+	//    };
+	// };
+	  
+	// #include "header.h"
+	// void test() {
+	//    union outer x;
+	//    x.var1=1;
+	// }
+	public void testAnonymousStruct_Bug216791() throws DOMException {
+		// struct
+		IBinding b = getBindingFromASTName("var1=", 4);
+		assertTrue(b instanceof IField);
+		IField f= (IField) b;
+		IScope outer= f.getCompositeTypeOwner().getScope();
+		assertTrue(outer instanceof ICCompositeTypeScope);
+		assertEquals("outer", outer.getScopeName().toString());
+	}
+	
+	// int myFunc();
+	
+	// int myFunc(var)
+	// int var; 
+	// { 
+	//   return var; 
+	// } 
+	// int main(void) {
+	//    return myFunc(0);
+	// }
+	public void testKRStyleFunction_Bug216791() throws DOMException {
+		// struct
+		IBinding b = getBindingFromASTName("myFunc(", 6);
+		assertTrue(b instanceof IFunction);
+		IFunction f= (IFunction) b;
+		IParameter[] params= f.getParameters();
+		assertEquals(1, params.length);
+		assertTrue(params[0].getType() instanceof IBasicType);
+		assertEquals(IBasicType.t_int, ((IBasicType)params[0].getType()).getType());
+	}
+	
+	//	typedef struct S S;
+	//	void setValue(S *pSelf, int value);
+
+	//	struct S {
+	//		int value;
+	//	};
+	//	void setValue(S *pSelf, int value) {
+	//		pSelf->value = value;
+	//	}
+	public void testOpaqueStruct_Bug262719() throws Exception {
+		IBinding b = getBindingFromASTName("value =", 5);
+		assertTrue(b instanceof IField);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCBindingResolutionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCBindingResolutionTest.java
new file mode 100644
index 0000000..f7b8e5a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCBindingResolutionTest.java
@@ -0,0 +1,408 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *    Andrew Ferguson (Symbian) - Initial implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.index.tests;
+
+import java.io.IOException;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IEnumeration;
+import org.eclipse.cdt.core.dom.ast.IEnumerator;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IFunctionType;
+import org.eclipse.cdt.core.dom.ast.IPointerType;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.IValue;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+
+/**
+ * For testing PDOM binding C language resolution
+ */
+/*
+ * aftodo - once we have non-problem bindings working, each test should
+ * additionally check that the binding obtained has characteristics as
+ * expected (type,name,etc..)
+ */
+public class IndexCBindingResolutionTest extends IndexBindingResolutionTestBase {
+
+	public static class SingleProject extends IndexCBindingResolutionTest {
+		public SingleProject() {setStrategy(new SinglePDOMTestStrategy(false));}
+		public static TestSuite suite() {return suite(SingleProject.class);}
+	}
+	public static class ProjectWithDepProj extends IndexCBindingResolutionTest {
+		public ProjectWithDepProj() {setStrategy(new ReferencedProject(false));}
+		public static TestSuite suite() {return suite(ProjectWithDepProj.class);}
+	}
+	
+	public static void addTests(TestSuite suite) {		
+		suite.addTest(SingleProject.suite());
+		suite.addTest(ProjectWithDepProj.suite());
+	}
+	
+	public IndexCBindingResolutionTest() {
+		setStrategy(new SinglePDOMTestStrategy(false));
+	}
+	
+	// int (*f)(int);
+	// int g(int n){return n;}
+	
+	// void foo() {
+	//    f= g;
+	// }
+	public void testPointerToFunction() throws Exception {
+		IBinding b0 = getBindingFromASTName("f= g;", 1);		
+		IBinding b1 = getBindingFromASTName("g;", 1);
+		
+		assertInstance(b0, IVariable.class);
+		IVariable v0= (IVariable) b0;
+		assertInstance(v0.getType(), IPointerType.class);
+		IPointerType p0= (IPointerType) v0.getType();
+		assertInstance(p0.getType(), IFunctionType.class);
+		IFunctionType f0= (IFunctionType) p0.getType();
+		assertInstance(f0.getReturnType(), IBasicType.class);
+		assertEquals(1, f0.getParameterTypes().length);
+		assertInstance(f0.getParameterTypes()[0], IBasicType.class);
+		
+		assertInstance(b1, IFunction.class);
+		IFunctionType f1= ((IFunction)b1).getType();
+		assertInstance(f1.getReturnType(), IBasicType.class);
+		assertEquals(1, f1.getParameterTypes().length);
+		assertInstance(f1.getParameterTypes()[0], IBasicType.class);
+	}
+	
+	//	// header file
+	//	struct S {int x;};
+	//	union U {int x;};
+	//	enum E {ER1,ER2,ER3};
+	//	void func1(enum E e) {}
+	//	void func2(struct S s) {}
+	//	void func3(int** ppi) {}
+	//	void func4(int n) {}
+	//
+	//	int var1;
+	//	struct S var2;
+	//	struct S *var3;
+	//	typedef int Int;
+	//	typedef int *IntPtr;
+
+	//	// referencing file
+	//	void references() {
+	//	  struct S s; /*s*/
+	//	  union U u; /*u*/
+	//	  enum E e; /*e*/
+	//	  Int a; /*a*/
+	//	  IntPtr b = &a; /*b*/
+	//	  func3(&b); /*func4*/
+	//    func4(a); /*func5*/
+	//
+	//	  var1 = 1; /*var1*/
+	//	  var2 = s; /*var2*/
+	//	  var3 = &s; /*var3*/
+	//	  func1(e); /*func1*/
+	//	  func1(var1); /*func2*/
+	//	  func2(s); /*func3*/
+	//	}
+	public void testSimpleGlobalBindings() throws IOException {
+		IBinding b2 = getBindingFromASTName("S s;", 1);
+		IBinding b3 = getBindingFromASTName("s;", 1);
+		IBinding b4 = getBindingFromASTName("U u;", 1);
+		IBinding b5 = getBindingFromASTName("u; ", 1);
+		IBinding b6 = getBindingFromASTName("E e; ", 1);
+		IBinding b7 = getBindingFromASTName("e; ", 1);
+		IBinding b8 = getBindingFromASTName("var1 = 1;", 4);
+		IBinding b9 = getBindingFromASTName("var2 = s;", 4);
+		IBinding b10 = getBindingFromASTName("var3 = &s;", 4);
+		IBinding b11 = getBindingFromASTName("func1(e);", 5);
+		IBinding b12 = getBindingFromASTName("func1(var1);", 5);
+		IBinding b13 = getBindingFromASTName("func2(s);", 5);
+		IBinding b14 = getBindingFromASTName("Int a; ", 3);
+		IBinding b15 = getBindingFromASTName("a; ", 1);
+		IBinding b16 = getBindingFromASTName("IntPtr b = &a; ", 6);
+		IBinding b17 = getBindingFromASTName("b = &a; /*b*/", 1);
+		IBinding b18 = getBindingFromASTName("func3(&b);", 5);	
+		IBinding b19 = getBindingFromASTName("b); /*func4*/", 1);
+		IBinding b20 = getBindingFromASTName("func4(a);", 5);
+		IBinding b21 = getBindingFromASTName("a); /*func5*/", 1);
+	}
+
+	// // empty 
+	
+	// typedef struct S {int a;} S; 
+	// typedef enum E {A,B} E;
+	// struct A {
+	//    S *s;
+	//    E *e;
+	// };
+	public void testTypedefA() throws Exception {
+		IBinding b1 = getBindingFromASTName("S {", 1);
+		IBinding b2 = getBindingFromASTName("S;", 1);
+		IBinding b3 = getBindingFromASTName("E {", 1);
+		IBinding b4 = getBindingFromASTName("E;", 1);
+		IBinding b5 = getBindingFromASTName("S *s", 1);
+		IBinding b6 = getBindingFromASTName("E *e", 1);
+		
+		assertInstance(b1, ICompositeType.class);
+		assertInstance(b2, ITypedef.class);
+		
+		assertInstance(b3, IEnumeration.class);
+		assertInstance(b4, ITypedef.class);
+		
+		assertInstance(b5, ITypedef.class);
+		ITypedef t5= (ITypedef) b5;
+		assertInstance(t5.getType(), ICompositeType.class);
+		assertEquals(ICompositeType.k_struct, ((ICompositeType)t5.getType()).getKey());
+		
+		assertInstance(b6, ITypedef.class);
+		ITypedef t6= (ITypedef) b6;
+		assertInstance(t6.getType(), IEnumeration.class);
+	}
+
+	
+	// typedef struct S {int a;} S;
+	// typedef enum E {A,B} E;
+	
+	// struct A {
+	//    S *s;
+	//    E *e;
+	// };
+	public void testTypedefB() throws Exception {
+		IBinding b1 = getBindingFromASTName("S *s", 1);
+		IBinding b2 = getBindingFromASTName("E *e", 1);
+		
+		assertInstance(b1, ITypedef.class);
+		ITypedef t1= (ITypedef) b1;
+		assertInstance(t1.getType(), ICompositeType.class);
+		assertEquals(ICompositeType.k_struct, ((ICompositeType)t1.getType()).getKey());
+		
+		assertInstance(b2, ITypedef.class);
+		ITypedef t2= (ITypedef) b2;
+		assertInstance(t2.getType(), IEnumeration.class);
+	}
+	
+	// union U {
+	//    int x;
+	//    int y;
+	// };
+	// struct S {
+	//    union U u;
+	//    int z;
+	// };
+	// typedef struct S TS;
+	
+	// void refs() {
+	//    union U b1;
+	//    struct S b2;
+	//    union U *b3 = &b1;
+	//    struct S *b4 = &b2;
+	//    TS b5;
+	//    TS *b6 = &b5;
+	//
+	//    b1.x = 0;
+	//    b1.y = 1;
+	//    b2.u.x = 2;
+	//    b2.u.y = 3;
+	//    b3->x = 4;
+	//    b3->y = 5;
+	//    b4->u.x = 6;
+	//    b4->u.y = 7;
+	//    b4->z = 8;
+	//    b5.u.x = 9;
+	//    b5.u.y = 10;
+	//    b6->u.x = 11;
+	//    b6->u.y = 12;
+	//    b6->z = 13;
+	// }
+	public void testFieldReference() throws Exception {
+		IBinding b01 = getBindingFromASTName("b1;",2);
+		assertVariable(b01, "b1", ICompositeType.class, "U");
+		IBinding b02 = getBindingFromASTName("b2;",2);
+		assertVariable(b02, "b2", ICompositeType.class, "S");
+		IBinding b03 = getBindingFromASTName("b3 =",2);
+		assertVariable(b03, "b3", IPointerType.class, null);
+		assertTypeContainer(((IVariable)b03).getType(), null, IPointerType.class, ICompositeType.class, "U");
+		IBinding b04 = getBindingFromASTName("b4 =",2);
+		assertVariable(b04, "b4", IPointerType.class, null);
+		assertTypeContainer(((IVariable)b04).getType(), null, IPointerType.class, ICompositeType.class, "S");
+		IBinding b05 = getBindingFromASTName("b5;",2);
+		assertVariable(b05, "b5", ITypedef.class, null);
+		assertTypeContainer(((IVariable)b05).getType(), null, ITypedef.class, ICompositeType.class, "S");
+		IBinding b06 = getBindingFromASTName("b6 =",2);
+		assertVariable(b06, "b6", IPointerType.class, null);
+		assertTypeContainer(((IVariable)b06).getType(), null, IPointerType.class, ITypedef.class, "TS");
+		assertTypeContainer(((IPointerType)((IVariable)b06).getType()).getType(), null, ITypedef.class, ICompositeType.class, "S");
+		IBinding b07 = getBindingFromASTName("x = 0",1);
+		assertVariable(b07, "x", IBasicType.class, null);
+		IBinding b08 = getBindingFromASTName("y = 1",1);
+		assertVariable(b08, "y", IBasicType.class, null);
+		IBinding b09 = getBindingFromASTName("x = 0",1);
+		assertVariable(b09, "x", IBasicType.class, null);
+		IBinding b10 = getBindingFromASTName("y = 1",1);
+		assertVariable(b08, "y", IBasicType.class, null);
+		IBinding b11 = getBindingFromASTName("u.x = 2",1);
+		assertVariable(b11, "u", ICompositeType.class, "U");
+		IBinding b12 = getBindingFromASTName("x = 2",1);
+		assertVariable(b12, "x", IBasicType.class, null);
+		IBinding b13 = getBindingFromASTName("u.y = 3",1);
+		assertVariable(b13, "u", ICompositeType.class, "U");
+		IBinding b14 = getBindingFromASTName("y = 3",1);
+		assertVariable(b08, "y", IBasicType.class, null);
+		IBinding b15 = getBindingFromASTName("x = 4",1);
+		assertVariable(b15, "x", IBasicType.class, null);
+		IBinding b16 = getBindingFromASTName("y = 5",1);
+		assertVariable(b16, "y", IBasicType.class, null);
+		IBinding b17 = getBindingFromASTName("u.x = 6",1);
+		assertVariable(b17, "u", ICompositeType.class, "U");
+		IBinding b18 = getBindingFromASTName("x = 6",1);
+		assertVariable(b18, "x", IBasicType.class, null);
+		IBinding b19 = getBindingFromASTName("u.y = 7",1);
+		assertVariable(b19, "u", ICompositeType.class, "U");
+		IBinding b20 = getBindingFromASTName("y = 7",1);
+		assertVariable(b20, "y", IBasicType.class, null);
+		IBinding b21 = getBindingFromASTName("z = 8",1);
+		assertVariable(b21, "z", IBasicType.class, null);
+		IBinding b22 = getBindingFromASTName("x = 9",1);
+		assertVariable(b22, "x", IBasicType.class, null);
+		IBinding b23 = getBindingFromASTName("y = 10",1);
+		assertVariable(b23, "y", IBasicType.class, null);
+		IBinding b24 = getBindingFromASTName("u.x = 11",1);
+		assertVariable(b24, "u", ICompositeType.class, "U");
+		IBinding b25 = getBindingFromASTName("x = 11",1);
+		assertVariable(b25, "x", IBasicType.class, null);
+		IBinding b26 = getBindingFromASTName("u.y = 12",1);
+		assertVariable(b26, "u", ICompositeType.class, "U");
+		IBinding b27 = getBindingFromASTName("y = 12",1);
+		assertVariable(b27, "y", IBasicType.class, null);
+		IBinding b28 = getBindingFromASTName("z = 13",1);
+		assertVariable(b28, "z", IBasicType.class, null);
+	}
+	
+	//	 // header file
+	//		struct S {struct S* sp;};
+	//		struct S foo1(struct S s);
+	//		struct S* foo2(struct S* s);
+	//		int foo3(int i);
+	//		int foo4(int i, struct S s);
+
+	//	 // referencing content
+	//		void references() {
+	//			struct S s, *sp;
+	//			foo1/*a*/(sp[1]);                       // IASTArraySubscriptExpression
+	//			foo2/*b*/(sp+1);                        // IASTBinaryExpression
+	//			foo2/*c*/((struct S*) sp);/*1*/         // IASTCastExpression
+	//			foo1/*d*/(1==1 ? s : s);/*2*/           // IASTConditionalExpression
+	//			foo4/*e*/(5, s);/*3*/                   // IASTExpressionList
+	//			foo2/*f*/(s.sp);/*4*/ foo2(sp->sp);/*5*/// IASTFieldReference
+	//			foo1/*g*/(foo1(s));/*6*/                // IASTFunctionCallExpression
+	//			foo1/*h*/(s);/*7*/                      // IASTIdExpression
+	//			foo3/*i*/(23489);                       // IASTLiteralExpression
+	//			foo3/*j*/(sizeof(struct S));/*8*/       // IASTTypeIdExpression
+	//			foo1/*k*/(*sp);/*9*/                    // IASTUnaryExpression
+	//		}
+	public void testExpressionKindForFunctionCalls() {
+		IBinding b0 = getBindingFromASTName("foo1/*a*/", 4);
+		IBinding b0a = getBindingFromASTName("sp[1]", 2);
+		
+		IBinding b1 = getBindingFromASTName("foo2/*b*/", 4);
+		IBinding b1a = getBindingFromASTName("sp+1);", 2);
+		
+		IBinding b2 = getBindingFromASTName("foo2/*c*/", 4);
+		IBinding b2a = getBindingFromASTName("sp);/*1*/", 2);
+		
+		IBinding b3 = getBindingFromASTName("foo1/*d*/", 4);
+		IBinding b3a = getBindingFromASTName("s : s);/*2*/", 1);
+		IBinding b3b = getBindingFromASTName("s);/*2*/", 1);
+		
+		IBinding b4 = getBindingFromASTName("foo4/*e*/", 4);
+		IBinding b4a = getBindingFromASTName("s);/*3*/", 1);
+		
+		IBinding b5 = getBindingFromASTName("foo2/*f*/", 4);
+		IBinding b5a = getBindingFromASTName("s.sp);/*4*/", 1);
+		IBinding b5b = getBindingFromASTName("sp);/*4*/", 2);
+		IBinding b5c = getBindingFromASTName("sp->sp);/*5*/", 2);
+		IBinding b5d = getBindingFromASTName("sp);/*5*/", 2);
+		
+		IBinding b6 = getBindingFromASTName("foo1/*g*/", 4);
+		IBinding b6a = getBindingFromASTName("foo1(s));/*6*/", 4);
+		IBinding b6b = getBindingFromASTName("s));/*6*/", 1);
+		
+		IBinding b7 = getBindingFromASTName("foo1/*h*/", 4);
+		IBinding b7a = getBindingFromASTName("s);/*7*/", 1);
+		
+		IBinding b8 = getBindingFromASTName("foo3/*i*/", 4);
+		
+		IBinding b9 = getBindingFromASTName("foo3/*j*/", 4);
+		IBinding b9a = getBindingFromASTName("S));/*8*/", 1);
+		
+		IBinding b10 = getBindingFromASTName("foo1/*k*/", 4);
+		IBinding b10a = getBindingFromASTName("sp);/*9*/ ", 2);
+	}
+		
+	// // header file
+	// struct myStruct {
+	//    int a;
+	// };
+	// union myUnion {
+	//    int b;
+	// };
+
+	// // referencing content
+	// struct myStruct; 
+	// union myUnion;
+	// void test() {
+	//    struct myStruct* u;
+	//    union myUnion* v;
+	//    u->a= 1;  // since we include the definition, we may use the type.
+	//    v->b= 1;  // since we include the definition, we may use the type.
+	// }
+	public void testTypeDefinitionWithFwdDeclaration() {
+		getBindingFromASTName("a= 1", 1);
+		getBindingFromASTName("b= 1", 1);
+	}
+	
+	// int a= 1+2-3*4+10/2; // -4
+	// int b= a+4;
+	// int* c= &b;
+	// enum X {e0, e4=4, e5, e2=2, e3};
+    
+    // void ref() {
+    // a; b; c; e0; e2; e3; e4; e5;
+    // }
+	public void testValues() throws Exception {
+		IVariable v= (IVariable) getBindingFromASTName("a;", 1);
+		checkValue(v.getInitialValue(), -4);
+		v= (IVariable) getBindingFromASTName("b;", 1);
+		checkValue(v.getInitialValue(), 0);
+		v= (IVariable) getBindingFromASTName("c;", 1);
+		assertNull(v.getInitialValue().numericalValue());
+
+		IEnumerator e= (IEnumerator) getBindingFromASTName("e0", 2);
+		checkValue(e.getValue(), 0);
+		e= (IEnumerator) getBindingFromASTName("e2", 2);
+		checkValue(e.getValue(), 2);
+		e= (IEnumerator) getBindingFromASTName("e3", 2);
+		checkValue(e.getValue(), 3);
+		e= (IEnumerator) getBindingFromASTName("e4", 2);
+		checkValue(e.getValue(), 4);
+		e= (IEnumerator) getBindingFromASTName("e5", 2);
+		checkValue(e.getValue(), 5);
+	}
+
+	private void checkValue(IValue initialValue, int i) {
+		assertNotNull(initialValue);
+		final Long numericalValue = initialValue.numericalValue();
+		assertNotNull(numericalValue);
+		assertEquals(i, numericalValue.intValue());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPBindingResolutionBugs.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPBindingResolutionBugs.java
new file mode 100644
index 0000000..30e8212
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPBindingResolutionBugs.java
@@ -0,0 +1,1139 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *    Andrew Ferguson (Symbian)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.index.tests;
+
+import java.util.Arrays;
+import java.util.regex.Pattern;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IEnumeration;
+import org.eclipse.cdt.core.dom.ast.IField;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.IPointerType;
+import org.eclipse.cdt.core.dom.ast.IScope;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassSpecialization;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateDefinition;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexBinding;
+import org.eclipse.cdt.core.index.IIndexMacro;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.parser.util.ObjectMap;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateArgument;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInstanceCache;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * For testing PDOM binding resolution
+ */
+public class IndexCPPBindingResolutionBugs extends IndexBindingResolutionTestBase {
+
+	public static class SingleProject extends IndexCPPBindingResolutionBugs {
+		public SingleProject() {setStrategy(new SinglePDOMTestStrategy(true));}
+		public static TestSuite suite() {return suite(SingleProject.class);}
+	}
+	
+	public static class ProjectWithDepProj extends IndexCPPBindingResolutionBugs {
+		public ProjectWithDepProj() {setStrategy(new ReferencedProject(true));}
+		public static TestSuite suite() {return suite(ProjectWithDepProj.class);}
+	}
+	
+	public static void addTests(TestSuite suite) {		
+		suite.addTest(SingleProject.suite());
+		suite.addTest(ProjectWithDepProj.suite());
+	}
+	
+	public static TestSuite suite() {
+		return suite(IndexCPPBindingResolutionBugs.class);
+	}
+	
+	public IndexCPPBindingResolutionBugs() {
+		setStrategy(new SinglePDOMTestStrategy(true));
+	}
+	
+	// #define OBJ void foo()
+	// #define FUNC() void bar()
+	// #define FUNC2(A) void baz()
+	
+	// #include "header.h"
+	//
+	// OBJ {}
+	// FUNC() {}
+	// FUNC2(1) {}
+	public void testBug208558() throws CoreException {
+		IIndex index= getIndex();
+		
+		IIndexMacro[] macrosA= index.findMacros("OBJ".toCharArray(), IndexFilter.ALL, NPM);
+		IIndexMacro[] macrosB= index.findMacros("FUNC".toCharArray(), IndexFilter.ALL, NPM);
+		IIndexMacro[] macrosC= index.findMacros("FUNC2".toCharArray(), IndexFilter.ALL, NPM);
+		
+		assertEquals(1, macrosA.length);
+		assertEquals(1, macrosB.length);
+		assertEquals(1, macrosC.length);
+		IIndexMacro obj= macrosA[0];
+		IIndexMacro func= macrosB[0];
+		IIndexMacro func2= macrosC[0];
+		
+		assertEquals("OBJ", new String(obj.getName()));
+		assertEquals("FUNC", new String(func.getName()));
+		assertEquals("FUNC2", new String(func2.getName()));
+		
+		assertEquals("void foo()", new String(obj.getExpansionImage()));
+		assertEquals("void bar()", new String(func.getExpansionImage()));
+		assertEquals("void baz()", new String(func2.getExpansionImage()));
+		
+		assertEquals("OBJ", new String(obj.getName()));
+		assertNull(obj.getParameterList());
+		
+		assertEquals("FUNC", new String(func.getName()));
+		assertEquals(0, func.getParameterList().length);
+
+		assertEquals("FUNC2", new String(func2.getName()));
+		assertEquals(1, func2.getParameterList().length);
+		assertEquals("A", new String(func2.getParameterList()[0]));
+		
+		IIndexBinding[] bindings= index.findBindings(Pattern.compile(".*"), false, IndexFilter.ALL, NPM);
+		assertEquals(3, bindings.length);
+		
+		IIndexBinding foo= index.findBindings("foo".toCharArray(), IndexFilter.ALL, NPM)[0];
+		IIndexBinding bar= index.findBindings("bar".toCharArray(), IndexFilter.ALL, NPM)[0];
+		IIndexBinding baz= index.findBindings("baz".toCharArray(), IndexFilter.ALL, NPM)[0];
+		
+		assertEquals("foo", foo.getName());
+		assertEquals("bar", bar.getName());
+		assertEquals("baz", baz.getName());
+		assertInstance(foo, ICPPFunction.class);
+		assertInstance(bar, ICPPFunction.class);
+		assertInstance(baz, ICPPFunction.class);
+	}
+	
+	//	template <class T>
+	//	inline void testTemplate(T& aRef);
+	//
+	//	class Temp {
+	//	};
+
+	//	void main(void) {
+	//	    Temp testFile;
+	//	    testTemplate(testFile);
+	//	}
+	public void testBug207320() {
+		IBinding b0= getBindingFromASTName("testTemplate(", 12);
+		assertInstance(b0, ICPPFunction.class);
+		assertInstance(b0, ICPPTemplateInstance.class);
+	}
+	
+	//	class testdef{
+	//
+	//	public:
+	//		void testagain();
+	//	};
+	//
+	//	typedef void TAny;
+	//
+	//	inline void testCall(TAny* aExpected){}
+	//
+	//  testdef*  global_cBase;
+	//  testdef*& global_cBaseRef = global_cBase;
+	
+	//	#include "typedefHeader.h"
+	//
+	//
+	//	int main(void)
+	//		{
+	//			testdef*  local_cBase;
+	//          testdef*& local_cBaseRef = local_cBase;
+	//		
+	//			testCall( /*1*/ (void *) local_cBase);
+	//          testCall( /*2*/ local_cBase);
+	//
+	//			testCall( /*3*/ (void *) local_cBaseRef);
+	//          testCall( /*4*/ local_cBaseRef);
+	//
+	//			testCall( /*5*/ (void *) global_cBase);
+	//          testCall( /*6*/ global_cBase);
+	//
+	//			testCall( /*7*/ (void *)global_cBaseRef);
+	//          testCall( /*8*/ global_cBaseRef);
+	//		}
+	public void testBug206187() throws Exception {
+		IBinding b1= getBindingFromASTName("testCall( /*1*/", 8);
+		IBinding b2= getBindingFromASTName("testCall( /*2*/", 8);
+		IBinding b3= getBindingFromASTName("testCall( /*3*/", 8);
+		IBinding b4= getBindingFromASTName("testCall( /*4*/", 8);
+		IBinding b5= getBindingFromASTName("testCall( /*5*/", 8);
+		IBinding b6= getBindingFromASTName("testCall( /*6*/", 8);
+		IBinding b7= getBindingFromASTName("testCall( /*7*/", 8);
+		IBinding b8= getBindingFromASTName("testCall( /*8*/", 8);
+	}
+	
+	
+	// template<typename T1>
+    // class A {};
+    // 
+    // template<typename T2>
+    // class B : public A<T2> {};
+    // 
+    // class C {};
+    //
+    // B<C> b;
+    
+    // void foo() {C c; B<int> b;}
+    public void testBug188274() throws Exception {
+        IBinding b0= getBindingFromASTName("C", 1);
+        IBinding b1= getBindingFromASTName("B", 1);
+        assertInstance(b0, ICPPClassType.class);
+        assertInstance(b1, ICPPClassType.class);
+        assertInstance(b1, ICPPClassTemplate.class);
+        assertInstance(b1, ICPPInstanceCache.class);
+        
+        ICPPInstanceCache ct= (ICPPInstanceCache) b1;
+        ICPPSpecialization inst= ct.getInstance(new ICPPTemplateArgument[]{new CPPTemplateArgument((IType)b0)});
+        assertInstance(inst, ICPPClassType.class);
+        ICPPClassType c2t= (ICPPClassType) inst;
+        ICPPBase[] bases= c2t.getBases();
+        assertEquals(1, bases.length);
+        assertInstance(bases[0].getBaseClass(), ICPPClassType.class);
+    }
+	
+	// namespace ns {class A{};}
+	
+	// ns::A a;
+	// class B {};
+	public void testBug188324() throws Exception {
+		IASTName name= findName("B", 1);
+		IBinding b0= getBindingFromASTName("ns::A", 2);
+		assertInstance(b0, ICPPNamespace.class);
+		ICPPNamespace ns= (ICPPNamespace) b0;
+		assertEquals(0, ns.getNamespaceScope().getBindings(name, false, false).length);
+	}
+	
+	//	 template<typename T>
+	//	 class C : public C<T> {};
+	
+	// 	 void foo() {
+	//      C<int>::unresolvable();
+	//   };
+	public void testBug185828() throws Exception {
+		// Bug 185828 reports a StackOverflowException is thrown before we get here.
+		// That the SOE is thrown is detected in BaseTestCase via an Error IStatus
+		
+		IBinding b0= getBindingFromASTName("C<int>", 1);
+		IBinding b1= getBindingFromASTName("C<int>", 6);
+		IBinding b2= getProblemFromASTName("unresolvable", 12);
+		
+		assertInstance(b0, ICPPClassType.class);
+		assertInstance(b0, ICPPClassTemplate.class);
+		
+		assertInstance(b1, ICPPClassType.class);
+		assertInstance(b1, ICPPSpecialization.class);
+	}
+	
+	//	class MyClass {
+	//	public:
+	//		template<class T>
+	//		T* MopGetObject(T*& aPtr) 
+	//			{ return 0; }
+	//			
+	//		
+	//		template<class T>	
+	//		T*  MopGetObjectNoChaining(T*& aPtr)
+	//		{ return 0; }
+	//
+	//	};
+	
+	//	int main() {
+	//		MyClass* cls= new MyClass();
+	//	}
+	public void testBug184216() throws Exception {
+		IBinding b0= getBindingFromASTName("MyClass*", 7);
+		assertInstance(b0, ICPPClassType.class);
+		ICPPClassType ct= (ICPPClassType) b0;
+		ICPPMethod[] ms= ct.getDeclaredMethods(); // 184216 reports CCE thrown
+		assertEquals(2, ms.length);
+		assertInstance(ms[0], ICPPTemplateDefinition.class);
+		assertInstance(ms[1], ICPPTemplateDefinition.class);
+	}
+	
+	// // header file
+	//  class cl;
+	//	typedef cl* t1;
+	//  typedef t1 t2;
+	
+	//// referencing content
+	//  void func(t2 a);
+	//  void func(int b);
+	//  void ref() {
+	//     cl* a;
+	//     func(a);
+	//  }
+	public void testBug166954() {
+		IBinding b0 = getBindingFromASTName("func(a)", 4);
+	}
+	
+	// // header
+	//	class Base { 
+	//  public: 
+	//     void foo(int i);
+	//     int  fooint();
+	//     char* fooovr();
+	//     char* fooovr(int a);
+	//     char* fooovr(char x);
+	//  };
+
+	// // references
+	// #include "header.h"
+	// void Base::foo(int i) {}
+	// int Base::fooint() {return 0;}
+	// char* Base::fooovr() {return 0;}
+	// char* Base::fooovr(int a) {return 0;}
+	// char* Base::fooovr(char x) {return 0;}
+	//
+	// void refs() {
+	//   Base b;
+	//   b.foo(1);
+	//   b.fooint();
+	//   b.fooovr();
+	//   b.fooovr(1);
+	//   b.fooovr('a');
+	// }
+	public void testBug168020() {
+		getBindingFromASTName("foo(int i)", 3);
+		getBindingFromASTName("fooint()", 6);
+		getBindingFromASTName("fooovr()", 6);
+		getBindingFromASTName("fooovr(int", 6);
+		getBindingFromASTName("fooovr(char", 6);
+
+		getBindingFromASTName("foo(1)", 3);
+		getBindingFromASTName("fooint();", 6);
+		getBindingFromASTName("fooovr();", 6);
+		getBindingFromASTName("fooovr(1", 6);
+		getBindingFromASTName("fooovr('", 6);
+	}
+
+	
+	// // header
+	//	class Base { 
+	//  public: 
+	//     void foo(int i);
+	//     int  foo2(int i);
+	//  };
+	//
+	//  void func(int k);
+	//  void func2(int i);
+
+	// // references
+	// #include "header.h"
+	// void Base::foo(int i) {
+	//   i=2;
+	// }
+	// int Base::foo2(int j) {
+	//   j=2;
+	// }
+	// void func(int k) {
+	//  k=2;
+	// }
+	// void func2(int l) {
+	//  l=2;
+	// }
+	public void testBug168054() {
+		getBindingFromASTName("i=2", 1);
+		getBindingFromASTName("j=2", 1);
+		getBindingFromASTName("k=2", 1);
+		getBindingFromASTName("l=2", 1);
+	}
+	
+	// namespace X {}
+	
+	// namespace Y {
+	//    class Ambiguity {};
+	//    enum Ambiguity {A1,A2,A3};
+	//    void foo() {
+	//       Ambiguity problem;
+	//    }
+	// }
+	public void testBug176708_CCE() throws Exception {
+		IBinding binding= getBindingFromASTName("Y {", 1);
+		assertTrue(binding instanceof ICPPNamespace);
+		ICPPNamespace adapted= (ICPPNamespace) strategy.getIndex().adaptBinding(binding);
+		IASTName name= findName("Ambiguity problem", 9);
+		assertNotNull(name);
+		IBinding binding2= adapted.getNamespaceScope().getBinding(name, true);
+	}
+	
+	// namespace X {int i;}
+	
+	// // references
+	// #include "header.h"
+	// int a= X::i;
+	public void testBug176708_NPE() throws Exception {
+		IBinding binding= getBindingFromASTName("i;", 1);
+		assertTrue(binding instanceof ICPPVariable);
+		IScope scope= binding.getScope();
+	}
+	
+	//	template<class T, class U, class V>
+	//	class A {};
+	
+	//	template<>
+	//	class A<int, bool, double> {};
+	public void testBug180784() throws Exception {
+		IBinding b0= getBindingFromASTName("A<int, bool, double> {};", 20);
+		assertInstance(b0, ICPPSpecialization.class);
+		ICPPSpecialization s= (ICPPSpecialization) b0;
+		ObjectMap map= s.getArgumentMap();
+		IBinding b1= s.getSpecializedBinding();
+		assertInstance(b1, ICPPClassTemplate.class);
+		ICPPClassTemplate t= (ICPPClassTemplate) b1;
+		ICPPTemplateParameter[] ps = t.getTemplateParameters();
+		assertNotNull(ps);
+		assertEquals(3, ps.length);
+		assertNotNull(map.get(ps[0]));
+		assertNotNull(map.get(ps[1]));
+		assertNotNull(map.get(ps[2]));
+	}
+	
+	//	class A{};
+	//
+	//	template<typename T>
+	//	T id (T t) {return t;}
+	//
+	//	template<>
+	//	A id (A a) {return a;}
+	//
+	//	int id(int x) {return x;}
+	
+	//	void foo() {
+	//		id(*new A());
+	//		id(6);
+	//	}
+	public void testBug180948() throws Exception {
+		// Main check occurs in BaseTestCase - that no ClassCastException
+		// is thrown during indexing
+		IBinding b0= getBindingFromASTName("id(*", 2);
+		IBinding b1= getBindingFromASTName("id(6", 2);
+	}
+	
+	
+	// void func1(void);
+	
+	//  #include "header.h"
+	//
+	//	int main(void)
+	//	{
+	//      void* v= func1;
+	//	}
+	public void testBug181735() throws DOMException {
+		IBinding b0 = getBindingFromASTName("func1;", 5);
+		assertTrue(b0 instanceof IFunction);
+	}
+	
+	//	class B {
+	//  public:
+	//		class BB {
+	//		public:
+	//			int field;
+	//		};
+	//	};
+	//
+	//	class A : public B::BB {};
+	
+	//  #include "header.h"
+	//	
+	//  void foo() {
+	//		A c;
+	//		c.field;//comment
+	//	}
+	public void testBug183843() throws DOMException {
+		IBinding b0 = getBindingFromASTName("field;//", 5);
+		assertTrue(b0 instanceof ICPPField);
+	}
+	
+    // typedef struct {
+    //    int utm;
+    // } usertype;
+    // void func(usertype t);
+
+	// #include "header.h"
+    // void test() {
+	//    usertype ut;
+	//    func(ut);
+    // }
+    public void testFuncWithTypedefForAnonymousStruct_190730() throws Exception {
+		IBinding b0 = getBindingFromASTName("func(", 4);
+		assertTrue(b0 instanceof IFunction);
+		IFunction f= (IFunction) b0;
+		IParameter[] pars= f.getParameters();
+		assertEquals(1, pars.length);
+		IType type= pars[0].getType();
+		assertTrue(type instanceof ITypedef);
+		type= ((ITypedef) type).getType();
+		assertTrue(type instanceof ICPPClassType);
+    }
+
+    // typedef enum {
+    //    eItem
+    // } userEnum;
+    // void func(userEnum t);
+
+	// #include "header.h"
+    // void test() {
+	//    userEnum ut;
+	//    func(ut);
+    // }
+    public void testFuncWithTypedefForAnonymousEnum_190730() throws Exception {
+		IBinding b0 = getBindingFromASTName("func(", 4);
+		assertTrue(b0 instanceof IFunction);
+		IFunction f= (IFunction) b0;
+		IParameter[] pars= f.getParameters();
+		assertEquals(1, pars.length);
+		IType type= pars[0].getType();
+		assertTrue(type instanceof ITypedef);
+		type= ((ITypedef) type).getType();
+		assertTrue(type instanceof IEnumeration);
+    }
+    
+    // // no header needed
+    
+    // typedef class {
+    //    int member;
+    // } t_class;
+    // typedef struct {
+    //    int member;
+    // } t_struct;
+    // typedef union {
+    //    int member;
+    // } t_union;
+    // typedef enum {
+    //    ei
+    // } t_enum;
+	public void testIsSameAnonymousType_Bug193962() throws DOMException {
+		// class
+		IBinding tdAST = getBindingFromASTName("t_class;", 7);
+		assertFalse(tdAST instanceof IIndexBinding);
+		IBinding tdIndex= strategy.getIndex().adaptBinding(tdAST);
+		assertTrue(tdIndex instanceof IIndexBinding);
+		assertTrue(tdAST instanceof ITypedef);
+		assertTrue(tdIndex instanceof ITypedef);
+
+		IType tAST= ((ITypedef) tdAST).getType();
+		IType tIndex= ((ITypedef) tdIndex).getType();
+		assertTrue(tAST instanceof ICompositeType);
+		assertTrue(tIndex instanceof ICompositeType);
+		assertTrue(tAST.isSameType(tIndex));
+		assertTrue(tIndex.isSameType(tAST));
+
+		// struct
+		tdAST = getBindingFromASTName("t_struct;", 8);
+		assertFalse(tdAST instanceof IIndexBinding);
+		tdIndex= strategy.getIndex().adaptBinding(tdAST);
+		assertTrue(tdIndex instanceof IIndexBinding);
+		assertTrue(tdAST instanceof ITypedef);
+		assertTrue(tdIndex instanceof ITypedef);
+		
+		tAST= ((ITypedef) tdAST).getType();
+		tIndex= ((ITypedef) tdIndex).getType();
+		assertTrue(tAST instanceof ICompositeType);
+		assertTrue(tIndex instanceof ICompositeType);
+		assertTrue(tAST.isSameType(tIndex));
+		assertTrue(tIndex.isSameType(tAST));
+
+		// union
+		tdAST = getBindingFromASTName("t_union;", 7);
+		assertFalse(tdAST instanceof IIndexBinding);
+		tdIndex= strategy.getIndex().adaptBinding(tdAST);
+		assertTrue(tdIndex instanceof IIndexBinding);
+		assertTrue(tdAST instanceof ITypedef);
+		assertTrue(tdIndex instanceof ITypedef);
+		
+		tAST= ((ITypedef) tdAST).getType();
+		tIndex= ((ITypedef) tdIndex).getType();
+		assertTrue(tAST instanceof ICompositeType);
+		assertTrue(tIndex instanceof ICompositeType);
+		assertTrue(tAST.isSameType(tIndex));
+		assertTrue(tIndex.isSameType(tAST));
+
+		// enum
+		tdAST = getBindingFromASTName("t_enum;", 6);
+		assertFalse(tdAST instanceof IIndexBinding);
+		tdIndex= strategy.getIndex().adaptBinding(tdAST);
+		assertTrue(tdIndex instanceof IIndexBinding);
+		assertTrue(tdAST instanceof ITypedef);
+		assertTrue(tdIndex instanceof ITypedef);
+		
+		tAST= ((ITypedef) tdAST).getType();
+		tIndex= ((ITypedef) tdIndex).getType();
+		assertTrue(tAST instanceof IEnumeration);
+		assertTrue(tIndex instanceof IEnumeration);
+		assertTrue(tAST.isSameType(tIndex));
+		assertTrue(tIndex.isSameType(tAST));
+	}
+
+    // // no header needed
+    
+	// namespace ns {
+    // typedef class {
+    //    int member;
+    // } t_class;
+    // typedef struct {
+    //    int member;
+    // } t_struct;
+    // typedef union {
+    //    int member;
+    // } t_union;
+    // typedef enum {
+    //    ei
+    // } t_enum;
+	// };
+	public void testIsSameNestedAnonymousType_Bug193962() throws DOMException {
+		// class
+		IBinding tdAST = getBindingFromASTName("t_class;", 7);
+		assertFalse(tdAST instanceof IIndexBinding);
+		IBinding tdIndex= strategy.getIndex().adaptBinding(tdAST);
+		assertTrue(tdIndex instanceof IIndexBinding);
+		assertTrue(tdAST instanceof ITypedef);
+		assertTrue(tdIndex instanceof ITypedef);
+
+		IType tAST= ((ITypedef) tdAST).getType();
+		IType tIndex= ((ITypedef) tdIndex).getType();
+		assertTrue(tAST instanceof ICompositeType);
+		assertTrue(tIndex instanceof ICompositeType);
+		assertTrue(tAST.isSameType(tIndex));
+		assertTrue(tIndex.isSameType(tAST));
+
+		// struct
+		tdAST = getBindingFromASTName("t_struct;", 8);
+		assertFalse(tdAST instanceof IIndexBinding);
+		tdIndex= strategy.getIndex().adaptBinding(tdAST);
+		assertTrue(tdIndex instanceof IIndexBinding);
+		assertTrue(tdAST instanceof ITypedef);
+		assertTrue(tdIndex instanceof ITypedef);
+		
+		tAST= ((ITypedef) tdAST).getType();
+		tIndex= ((ITypedef) tdIndex).getType();
+		assertTrue(tAST instanceof ICompositeType);
+		assertTrue(tIndex instanceof ICompositeType);
+		assertTrue(tAST.isSameType(tIndex));
+		assertTrue(tIndex.isSameType(tAST));
+
+		// union
+		tdAST = getBindingFromASTName("t_union;", 7);
+		assertFalse(tdAST instanceof IIndexBinding);
+		tdIndex= strategy.getIndex().adaptBinding(tdAST);
+		assertTrue(tdIndex instanceof IIndexBinding);
+		assertTrue(tdAST instanceof ITypedef);
+		assertTrue(tdIndex instanceof ITypedef);
+		
+		tAST= ((ITypedef) tdAST).getType();
+		tIndex= ((ITypedef) tdIndex).getType();
+		assertTrue(tAST instanceof ICompositeType);
+		assertTrue(tIndex instanceof ICompositeType);
+		assertTrue(tAST.isSameType(tIndex));
+		assertTrue(tIndex.isSameType(tAST));
+
+		// enum
+		tdAST = getBindingFromASTName("t_enum;", 6);
+		assertFalse(tdAST instanceof IIndexBinding);
+		tdIndex= strategy.getIndex().adaptBinding(tdAST);
+		assertTrue(tdIndex instanceof IIndexBinding);
+		assertTrue(tdAST instanceof ITypedef);
+		assertTrue(tdIndex instanceof ITypedef);
+		
+		tAST= ((ITypedef) tdAST).getType();
+		tIndex= ((ITypedef) tdIndex).getType();
+		assertTrue(tAST instanceof IEnumeration);
+		assertTrue(tIndex instanceof IEnumeration);
+		assertTrue(tAST.isSameType(tIndex));
+		assertTrue(tIndex.isSameType(tAST));
+	}
+	
+	//	namespace FOO {
+	//		namespace BAR {
+	//		    class Bar;
+	//		}
+	//		class Foo {
+	//			BAR::Bar * Test(BAR::Bar * bar);
+	//		};
+	//	}
+
+	//	#include "header.h"
+	//	namespace FOO {
+	//	    using BAR::Bar;
+	//	 
+	//	    Bar* Foo::Test(Bar* pBar) {
+	//	       return pBar;
+	//	    }
+	//	}
+	public void testAdvanceUsingDeclaration_Bug217102() throws Exception {
+		IBinding cl = getBindingFromASTName("Bar* Foo", 3);
+
+		assertEquals("Bar", cl.getName());
+		assertTrue(cl instanceof ICPPClassType);
+		assertEquals("BAR", cl.getScope().getScopeName().toString());
+
+		cl = getBindingFromASTName("Bar* pBar", 3);
+		assertEquals("Bar", cl.getName());
+		assertTrue(cl instanceof ICPPClassType);
+		assertEquals("BAR", cl.getScope().getScopeName().toString());
+	}
+	
+	// struct outer {
+	//    union {
+	//       int var1;
+	//    };
+	// };
+	  
+	// #include "header.h"
+	// void test() {
+	//    struct outer x;
+	//    x.var1=1;
+	// }
+	public void testAnonymousUnion_Bug216791() throws DOMException {
+		// struct
+		IBinding b = getBindingFromASTName("var1=", 4);
+		assertTrue(b instanceof IField);
+		IField f= (IField) b;
+		IScope outer= f.getCompositeTypeOwner().getScope();
+		assertTrue(outer instanceof ICPPClassScope);
+		assertEquals("outer", outer.getScopeName().toString());
+	}
+
+	// union outer {
+	//    struct {
+	//       int var1;
+	//    };
+	//    struct {
+	//       int var2;
+	//    } hide;
+	// };
+	  
+	// #include "header.h"
+	// void test() {
+	//    union outer x;
+	//    x.var1=1;
+	//    x.var2= 2; // must be a problem
+	// }
+	public void testAnonymousStruct_Bug216791() throws DOMException {
+		// struct
+		IBinding b = getBindingFromASTName("var1=", 4);
+		assertTrue(b instanceof IField);
+		IField f= (IField) b;
+		IScope outer= f.getCompositeTypeOwner().getScope();
+		assertTrue(outer instanceof ICPPClassScope);
+		assertEquals("outer", outer.getScopeName().toString());
+		
+		getProblemFromASTName("var2=", 4);
+	}
+	
+	// namespace ns {
+	// int v;
+	// };
+	// using namespace ns;
+	
+	// #include "header.h"
+	// void test() {
+	//    v=1;
+	// }
+	public void testUsingDirective_Bug216527() throws Exception {
+		IBinding b = getBindingFromASTName("v=", 1);
+		assertTrue(b instanceof IVariable);
+		IVariable v= (IVariable) b;
+		IScope scope= v.getScope();
+		assertTrue(scope instanceof ICPPNamespaceScope);
+		assertEquals("ns", scope.getScopeName().toString());
+	}	
+	
+	// namespace NSA {
+	// int a;
+	// }
+	// namespace NSB {
+	// int b;
+	// }
+	// namespace NSAB {
+	//    using namespace NSA;
+	//    using namespace NSB;
+	// }
+
+	// #include "header.h"
+	// void f() {
+	//   NSAB::a= NSAB::b;
+	// }
+	public void testNamespaceComposition_Bug200673() throws Exception {
+		IBinding a = getBindingFromASTName("a=", 1);
+		assertTrue(a instanceof IVariable);
+		IVariable v= (IVariable) a;
+		IScope scope= v.getScope();
+		assertTrue(scope instanceof ICPPNamespaceScope);
+		assertEquals("NSA", scope.getScopeName().toString());
+
+		IBinding b = getBindingFromASTName("b;", 1);
+		assertTrue(b instanceof IVariable);
+		v= (IVariable) b;
+		scope= v.getScope();
+		assertTrue(scope instanceof ICPPNamespaceScope);
+		assertEquals("NSB", scope.getScopeName().toString());
+	}
+	
+	// namespace N { namespace M {}}
+
+	// namespace N {using namespace N::M;}
+	// using namespace N;
+    // void test() {x;}
+	public void testEndlessLoopWithUsingDeclaration_Bug209813() throws DOMException {
+		getProblemFromASTName("x;", 1);
+	}
+	
+	// class MyClass {};
+	
+	// void test(MyClass* ptr);
+	// class MyClass;
+	public void testClassRedeclarationAfterReference_Bug229571() throws Exception {
+		IBinding cl= getBindingFromASTName("MyClass;", 7);
+		IFunction fn= getBindingFromASTName("test(", 4, IFunction.class);
+		IType type= fn.getType().getParameterTypes()[0];
+		assertInstance(type, IPointerType.class);
+		type= ((IPointerType) type).getType();
+		assertSame(type, cl);
+	}
+	
+    // class A {
+    // public:
+    //    void foo() const volatile;
+    //    void foo() volatile;
+    //    void foo() const;
+    //    void foo();
+    //    void bar() const volatile;
+    //    void bar() volatile;
+    //    void bar() const;
+    //    void bar();
+    // };
+    
+    // void A::foo() const volatile { bar();/*1*/ }
+    // void A::foo() volatile       { bar();/*2*/ }
+    // void A::foo() const          { bar();/*3*/ }
+    // void A::foo()                { bar();/*4*/ }
+    // void test() {
+    //   A a;
+    //   const A ca;
+    //   volatile A va;
+    //   const volatile A cva;
+    //   cva.bar();/*5*/
+    //   va.bar();/*6*/
+    //   ca.bar();/*7*/
+    //   a.bar();/*8*/
+    // }
+    public void testMemberFunctionDisambiguationByCVness_238409() throws Exception {
+    	ICPPMethod bar_cv= getBindingFromASTName("bar();/*1*/", 3, ICPPMethod.class);
+    	ICPPMethod bar_v=  getBindingFromASTName("bar();/*2*/", 3, ICPPMethod.class);
+    	ICPPMethod bar_c=  getBindingFromASTName("bar();/*3*/", 3, ICPPMethod.class);
+    	ICPPMethod bar=    getBindingFromASTName("bar();/*4*/", 3, ICPPMethod.class);
+    	ICPPFunctionType bar_cv_ft= bar_cv.getType();
+    	ICPPFunctionType bar_v_ft=  bar_v.getType();
+    	ICPPFunctionType bar_c_ft=  bar_c.getType();
+    	ICPPFunctionType bar_ft=    bar.getType();
+    	
+    	assertTrue(bar_cv_ft.isConst()); assertTrue(bar_cv_ft.isVolatile());
+    	assertTrue(!bar_v_ft.isConst()); assertTrue(bar_v_ft.isVolatile());
+    	assertTrue(bar_c_ft.isConst());  assertTrue(!bar_c_ft.isVolatile());
+    	assertTrue(!bar_ft.isConst());   assertTrue(!bar_ft.isVolatile());
+    	
+    	bar_cv= getBindingFromASTName("bar();/*5*/", 3, ICPPMethod.class);
+    	bar_v=  getBindingFromASTName("bar();/*6*/", 3, ICPPMethod.class);
+    	bar_c=  getBindingFromASTName("bar();/*7*/", 3, ICPPMethod.class);
+    	bar=    getBindingFromASTName("bar();/*8*/", 3, ICPPMethod.class);
+    	bar_cv_ft= bar_cv.getType();
+    	bar_v_ft=  bar_v.getType();
+    	bar_c_ft=  bar_c.getType();
+    	bar_ft=    bar.getType();
+    	
+    	assertTrue(bar_cv_ft.isConst()); assertTrue(bar_cv_ft.isVolatile());
+    	assertTrue(!bar_v_ft.isConst()); assertTrue(bar_v_ft.isVolatile());
+    	assertTrue(bar_c_ft.isConst());  assertTrue(!bar_c_ft.isVolatile());
+    	assertTrue(!bar_ft.isConst());   assertTrue(!bar_ft.isVolatile());
+    }
+    
+	//	typedef char t[12];
+	//	void test1(char *);
+	//	void test2(char []);
+	//	void test3(t);
+    
+	//	void xx() {
+	//	   char* x= 0;
+	//	   test1(x);
+	//	   test2(x); // problem binding here
+	//	   test3(x); // problem binding here
+	//	}
+	public void testAdjustmentOfParameterTypes_Bug239975() throws Exception {
+    	getBindingFromASTName("test1(x)", 5, ICPPFunction.class);
+    	getBindingFromASTName("test2(x)", 5, ICPPFunction.class);
+    	getBindingFromASTName("test3(x)", 5, ICPPFunction.class);
+	}
+	
+	// class A {
+	//    A();
+	//    void l();
+	//    void e;
+	//    class M {};
+	// };
+	// class B {
+	//    B();
+	//    void m();
+	//    void f;
+	//    class N {};
+	// };
+	// class C : B {
+	//    C();
+	//    void n();
+	//    int g;
+	//    class O {};
+	// };
+	// template<typename T> class CT : B {
+	//    CT();
+	//    void n();
+	//    T g;
+	//    class O {};
+	// };
+	// template<> class CT<char> : A {
+	//    CT(); CT(int);
+	//    void o();
+	//    int h;
+	//    class P {};
+	// };
+	// template<typename S> class Container {
+	//    class C : B {
+	//       C();
+	//       void n();
+	//       int g;
+	//       class O {};
+	//    };
+	//    template<typename T> class CT : B {
+	//       CT();
+	//       void n();
+	//       T g;
+	//       class O {};
+	//    };
+	// };
+	//	template<> class Container<char>::C : A {
+	//		C(); C(int);
+	//		void o();
+	//		int h;
+	//		class P {};
+	//	};
+	//	template<> template<typename T> class Container<char>::CT : A {
+	//		CT(); CT(int);
+	//		void o();
+	//		int h;
+	//		class P {};
+	//	};
+	
+	// C c;
+	// CT<int> ct;
+	// CT<char> ctinst;
+	// Container<int>::C spec;
+	// Container<int>::CT<int> spect;
+	// Container<char>::C espec;
+	// Container<char>::CT<int> espect;
+	public void testClassTypes_Bug98171() throws Exception {
+		// regular class
+		ICPPClassType ct= getBindingFromASTName("C", 1);
+		assertBindings(new String[] {"B"}, ct.getBases());
+		assertBindings(new String[] {"n", "m", "B", "C"}, ct.getAllDeclaredMethods());
+		assertBindings(new String[] {"C", "C"}, ct.getConstructors());
+		assertBindings(new String[] {"g"}, ct.getDeclaredFields());
+		assertBindings(new String[] {"n", "C"}, ct.getDeclaredMethods());
+		assertBindings(new String[] {"f", "g"}, ct.getFields());
+		assertBindings(new String[] {"m", "n", "C", "C", "~C", "B", "B", "~B", "operator =", "operator ="}, ct.getMethods());
+		assertBindings(new String[] {"O"}, ct.getNestedClasses());
+
+		// class template
+		ct= getBindingFromASTName("CT<int>", 2);
+		assertInstance(ct, ICPPClassTemplate.class);
+		assertBindings(new String[] {"B"}, ct.getBases());
+		assertBindings(new String[] {"n", "m", "B", "CT"}, ct.getAllDeclaredMethods());
+		assertBindings(new String[] {"CT", "CT"}, ct.getConstructors());
+		assertBindings(new String[] {"g"}, ct.getDeclaredFields());
+		assertBindings(new String[] {"n", "CT"}, ct.getDeclaredMethods());
+		assertBindings(new String[] {"f", "g"}, ct.getFields());
+		assertBindings(new String[] {"m", "n", "CT", "CT", "~CT", "B", "B", "~B", "operator =", "operator ="}, ct.getMethods());
+		assertBindings(new String[] {"O"}, ct.getNestedClasses());
+
+		// class template instance
+		ct= getBindingFromASTName("CT<int>", 7);
+		assertInstance(ct, ICPPTemplateInstance.class);
+		assertBindings(new String[] {"B"}, ct.getBases());
+		assertBindings(new String[] {"n", "m", "B", "CT"}, ct.getAllDeclaredMethods());
+		assertBindings(new String[] {"CT", "CT"}, ct.getConstructors());
+		assertBindings(new String[] {"g"}, ct.getDeclaredFields());
+		assertBindings(new String[] {"n", "CT"}, ct.getDeclaredMethods());
+		assertBindings(new String[] {"f", "g"}, ct.getFields());
+		assertBindings(new String[] {"m", "n", "CT", "CT", "~CT", "B", "B", "~B", "operator =", "operator ="}, ct.getMethods());
+		assertBindings(new String[] {"O"}, ct.getNestedClasses());
+
+		// explicit class template instance
+		ct= getBindingFromASTName("CT<char>", 8);
+		assertInstance(ct, ICPPTemplateInstance.class);
+		assertBindings(new String[] {"A"}, ct.getBases());
+		assertBindings(new String[] {"o", "l", "A", "CT", "CT"}, ct.getAllDeclaredMethods());
+		assertBindings(new String[] {"CT", "CT", "CT"}, ct.getConstructors());
+		assertBindings(new String[] {"h"}, ct.getDeclaredFields());
+		assertBindings(new String[] {"o", "CT", "CT"}, ct.getDeclaredMethods());
+		assertBindings(new String[] {"e", "h"}, ct.getFields());
+		assertBindings(new String[] {"l", "o", "CT", "CT", "CT", "~CT", "A", "A", "~A", "operator =", "operator ="}, ct.getMethods());
+		assertBindings(new String[] {"P"}, ct.getNestedClasses());
+
+		// class specialization
+		ct= getBindingFromASTName("C spec", 1);
+		assertInstance(ct, ICPPClassSpecialization.class);
+		assertBindings(new String[] {"B"}, ct.getBases());
+		assertBindings(new String[] {"n", "m", "B", "C"}, ct.getAllDeclaredMethods());
+		assertBindings(new String[] {"C", "C"}, ct.getConstructors());
+		assertBindings(new String[] {"g"}, ct.getDeclaredFields());
+		assertBindings(new String[] {"n", "C"}, ct.getDeclaredMethods());
+		assertBindings(new String[] {"f", "g"}, ct.getFields());
+		assertBindings(new String[] {"m", "n", "C", "C", "~C", "B", "B", "~B", "operator =", "operator ="}, ct.getMethods());
+		assertBindings(new String[] {"O"}, ct.getNestedClasses());
+
+		// class template specialization
+		ct= getBindingFromASTName("CT<int> spect", 2);
+		assertInstance(ct, ICPPClassTemplate.class, ICPPClassSpecialization.class);
+		assertBindings(new String[] {"B"}, ct.getBases());
+		assertBindings(new String[] {"n", "m", "B", "CT"}, ct.getAllDeclaredMethods());
+		assertBindings(new String[] {"CT", "CT"}, ct.getConstructors());
+		assertBindings(new String[] {"g"}, ct.getDeclaredFields());
+		assertBindings(new String[] {"n", "CT"}, ct.getDeclaredMethods());
+		assertBindings(new String[] {"f", "g"}, ct.getFields());
+		assertBindings(new String[] {"m", "n", "CT", "CT", "~CT", "B", "B", "~B", "operator =", "operator ="}, ct.getMethods());
+		assertBindings(new String[] {"O"}, ct.getNestedClasses());
+		
+		// explicit class specialization
+		ct= getBindingFromASTName("C espec", 1);
+		assertInstance(ct, ICPPClassSpecialization.class);
+		assertBindings(new String[] {"A"}, ct.getBases());
+		assertBindings(new String[] {"o", "l", "A", "C", "C"}, ct.getAllDeclaredMethods());
+		assertBindings(new String[] {"C", "C", "C"}, ct.getConstructors());
+		assertBindings(new String[] {"h"}, ct.getDeclaredFields());
+		assertBindings(new String[] {"o", "C", "C"}, ct.getDeclaredMethods());
+		assertBindings(new String[] {"e", "h"}, ct.getFields());
+		assertBindings(new String[] {"l", "o", "C", "C", "C", "~C", "A", "A", "~A", "operator =", "operator ="}, ct.getMethods());
+		assertBindings(new String[] {"P"}, ct.getNestedClasses());
+
+		// explicit class template specialization
+		ct= getBindingFromASTName("CT<int> espect", 7);
+		assertInstance(ct, ICPPTemplateInstance.class);
+		assertBindings(new String[] {"A"}, ct.getBases());
+		assertBindings(new String[] {"o", "l", "A", "CT", "CT"}, ct.getAllDeclaredMethods());
+		assertBindings(new String[] {"CT", "CT", "CT"}, ct.getConstructors());
+		assertBindings(new String[] {"h"}, ct.getDeclaredFields());
+		assertBindings(new String[] {"o", "CT", "CT"}, ct.getDeclaredMethods());
+		assertBindings(new String[] {"e", "h"}, ct.getFields());
+		assertBindings(new String[] {"l", "o", "CT", "CT", "CT", "~CT", "A", "A", "~A", "operator =", "operator ="}, ct.getMethods());
+		assertBindings(new String[] {"P"}, ct.getNestedClasses());
+	}
+
+	//	void func(const int* x) {}
+	
+	//	void func(int* p) {
+	//      const int* q = p;
+	//		func(q);
+	//	}
+	public void testOverloadedFunctionFromIndex_Bug256240() throws Exception {
+    	getBindingFromASTName("func(q", 4, ICPPFunction.class);
+	}
+
+	//	class A {
+	//	  class B;
+	//	};
+	//	class A::B {
+	//	  void m();
+	//	};
+
+	//	void A::B::m() {}
+	public void testNestedClasses_Bug259683() throws Exception {
+    	getBindingFromASTName("A::B::m", 7, ICPPMethod.class);
+	}
+
+	//	namespace ns {
+	//		struct S {
+	//			int a;
+	//		};
+	//	}
+	//	class A {
+	//		public:
+	//			template<typename T> operator T*(){return 0;};
+	//	};
+
+	//	namespace ns {
+	//		void bla() {
+	//			A a;
+	//			a.operator S *();
+	//		}
+	//	}
+	public void testLookupScopeForConversionNames_267221() throws Exception {
+    	getBindingFromASTName("operator S *", 12, ICPPMethod.class);
+	}
+
+	private void assertBindings(String[] expected, ICPPBase[] bases) throws DOMException {
+		IBinding[] bindings= new IBinding[bases.length];
+		for (int i = 0; i < bindings.length; i++) {
+			bindings[i]= bases[i].getBaseClass();
+		}
+		assertBindings(expected, bindings);
+	}
+
+	private void assertBindings(String[] expected, IBinding[] binding) {
+		String[] actual= new String[binding.length];
+		for (int i = 0; i < actual.length; i++) {
+			actual[i]= binding[i].getName();
+		}		
+		Arrays.sort(actual);
+		Arrays.sort(expected);
+		assertEquals(toString(expected), toString(actual));
+	}
+	
+	private String toString(String[] actual) {
+		StringBuilder buf= new StringBuilder();
+		buf.append('{');
+		boolean isFirst= true;
+		for (String val : actual) {
+			if (!isFirst) {
+				buf.append(',');
+			}
+			buf.append(val);
+			isFirst= false;
+		}
+		buf.append('}');
+		return buf.toString();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPBindingResolutionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPBindingResolutionTest.java
new file mode 100644
index 0000000..0e5184d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPBindingResolutionTest.java
@@ -0,0 +1,1512 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *    Andrew Ferguson (Symbian) - Initial implementation
+ *    Markus Schorn (Wind River Systems)
+ *    Sergey Prigogin (Google)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.index.tests;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IEnumeration;
+import org.eclipse.cdt.core.dom.ast.IEnumerator;
+import org.eclipse.cdt.core.dom.ast.IPointerType;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.IValue;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBasicType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPPointerToMemberType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexBinding;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * For testing PDOM binding CPP language resolution
+ */
+/*
+ * aftodo - once we have non-problem bindings working, each test should
+ * additionally check that the binding obtained has characteristics as
+ * expected (type,name,etc..)
+ */
+public abstract class IndexCPPBindingResolutionTest extends IndexBindingResolutionTestBase {
+
+	public static class SingleProject extends IndexCPPBindingResolutionTest {
+		public SingleProject() {setStrategy(new SinglePDOMTestStrategy(true));}
+		public static TestSuite suite() {return suite(SingleProject.class);}
+	}
+	public static class ProjectWithDepProj extends IndexCPPBindingResolutionTest {
+		public ProjectWithDepProj() {setStrategy(new ReferencedProject(true));}
+		public static TestSuite suite() {return suite(ProjectWithDepProj.class);}
+	}
+	
+	public static void addTests(TestSuite suite) {		
+		suite.addTest(SingleProject.suite());
+		suite.addTest(ProjectWithDepProj.suite());
+	}
+	
+	//	namespace ns { class A; enum E {E1}; typedef int T; }
+	//
+	//	class B {
+	//    public:
+	//	  void m(ns::A* a);
+	//    void n(ns::E* a);
+	// 	  void o(ns::T* a);
+	//    void p(ns::E a);
+	//	};
+	
+	//	namespace ns {
+	//	  class A {};
+	//    typedef int T;
+	//	}
+	//
+	//	using ns::A;
+	//	using ns::E;
+	//	using ns::T;
+	//  using ns::E1;
+	// 
+	//	void B::m(A* a) {}
+	//	void B::n(E* a) {}
+	//	void B::o(T* a) {}
+    //  void B::p(E a) {}
+	//
+	//  void usage() {
+	//    B b;
+	//    b.p(E1);
+	//  }
+	public void testUsingTypeDirective_201177() {
+		IBinding b0= getBindingFromASTName("B::m", 4);
+		IBinding b1= getBindingFromASTName("B::n", 4);
+		IBinding b2= getBindingFromASTName("B::o", 4);
+		IBinding b3= getBindingFromASTName("p(E1)", 1);
+		assertInstance(b0, ICPPMethod.class);
+		assertInstance(b1, ICPPMethod.class);
+		assertInstance(b2, ICPPMethod.class);
+	}
+	
+	// namespace n { class A{}; class B{}; class C{}; }
+
+	// namespace m {
+	//    using namespace n;
+	//    class D{};
+	// }
+	// m::C c;
+	// m::D d;
+	public void testUsingNamingDirective_177917_1a() {
+		IBinding b0= getBindingFromASTName("C c", 1);
+		IBinding b1= getBindingFromASTName("D d", 1);
+	}
+	
+	// namespace n { class A{}; }
+	// namespace m {
+	// using namespace n;
+	//     class B {};
+	// }
+
+	// #include "header.h"
+	// namespace n { class C{}; }
+	// m::C c;
+	public void testUsingNamingDirective_177917_1b() {
+		IBinding b0= getBindingFromASTName("C c", 1);
+	}
+
+	// int ff(int x) { return x; }
+	// namespace n { class A {}; }
+	// namespace m { class B {}; enum C{CE1,CE2}; }
+	// namespace o { int (*f)(int)= ff; }
+
+	// using n::A;
+	// A a;
+	// using namespace m;
+	// B b;
+	// C c= CE1;
+	// using o::f;
+	// int g(int x) {return 4;}
+	// int g(char x) {return 2;}
+	// int nn= g(f(2));
+	public void testUsingTypeDirective_177917_1() {
+		IBinding b1= getBindingFromASTName("A a", 1);
+		IBinding b2= getBindingFromASTName("B b", 1);
+		IBinding b3= getBindingFromASTName("C c", 1);
+		IBinding b4= getBindingFromASTName("CE1", 3);
+		IBinding b5= getBindingFromASTName("f(2", 1);
+	}
+	
+	// namespace a { class A {}; }
+	// namespace b {
+	//     using a::A;
+	//     class B {};
+	// }
+
+	// #include "header.h"
+	// b::A aa;
+	// b::B bb;
+	public void testUsingTypeDirective_177917_2() {
+		IBinding b0= getBindingFromASTName("A aa", 1);
+		IBinding b1= getBindingFromASTName("B bb", 1);
+	}
+	
+	//	namespace header {
+	//		class clh {
+	//		};
+	//		void fh();
+	//		void fh(int a);
+	//		
+	//		class cl {
+	//		};
+	//		void f();
+	//		void f(int a);
+	//	}
+	//	using header::clh;
+	//	using header::fh;
+		
+	//	#include "header.h"
+	//	namespace source {
+	//		class cls {
+	//		};
+	//		void fs();
+	//		void fs(int a);
+	//		
+	//	}
+	//	using header::cl;
+	//	using header::f;
+	//
+	//
+	//	using source::cls;
+	//	using source::fs;
+	//
+	//	void test() {
+	//		fh();
+	//		fh(1);  
+	//		      
+	//		clh c;
+	//		
+	//		f();
+	//		f(1);
+	//		cl c1;
+	//
+	//		fs();
+	//		fs(1);
+	//		cls c2;
+	//	}
+	public void testUsingOverloadedFunctionDirective() {
+		IBinding b;
+		b= getBindingFromASTName("fh()", 2);
+		b= getBindingFromASTName("fh(1)", 2);
+		b= getBindingFromASTName("clh c", 3);
+		b= getBindingFromASTName("f()", 1);
+		b= getBindingFromASTName("f(1)", 1);
+		b= getBindingFromASTName("cl c1", 2);
+		b= getBindingFromASTName("fs()", 2);
+		b= getBindingFromASTName("fs(1)", 2);
+		b= getBindingFromASTName("cls c2", 3);
+	}
+
+	
+	// int (*f)(int);
+	// int g(int n){return n;}
+	// int g(int n, int m){ return n+m; }
+	
+	// void foo() {
+	//    f= g;
+	// }
+	public void testPointerToFunction() throws Exception {
+		IBinding b0 = getBindingFromASTName("f= g;", 1);		
+		IBinding b1 = getBindingFromASTName("g;", 1);
+		
+		assertInstance(b0, ICPPVariable.class);
+		ICPPVariable v0= (ICPPVariable) b0;
+		assertInstance(v0.getType(), IPointerType.class);
+		IPointerType p0= (IPointerType) v0.getType();
+		assertInstance(p0.getType(), ICPPFunctionType.class);
+		ICPPFunctionType f0= (ICPPFunctionType) p0.getType();
+		assertInstance(f0.getReturnType(), ICPPBasicType.class);
+		assertEquals(1, f0.getParameterTypes().length);
+		assertInstance(f0.getParameterTypes()[0], ICPPBasicType.class);
+		
+		assertInstance(b1, ICPPFunction.class);
+		ICPPFunctionType f1= ((ICPPFunction)b1).getType();
+		assertInstance(f1.getReturnType(), ICPPBasicType.class);
+		assertEquals(1, f1.getParameterTypes().length);
+		assertInstance(f1.getParameterTypes()[0], ICPPBasicType.class);
+	}
+
+	// // header file
+	//  class Base {public: int field; void foo() {}};
+	//	class C : public Base {
+	//		public:
+	//			struct CS { long* l; C *method(CS **); };
+	//			CS cs;
+	//			CS **cspp;
+	//			long * CS::* ouch;
+	//			long * CS::* autsch;
+	//			C* (CS::*method)(CS **);
+	//		};
+
+	// // referencing file
+	//	#include "header.h"
+	//  
+	//  C *cp = new C(); /*b0, b1*/
+	//	void references() {
+	//		long l = 5, *lp;
+	//		lp = &l;
+	//		cp->cs.*cp->ouch = lp = cp->cs.*cp->autsch; /*b2, b3, b4*/
+	//		&(cp->cs)->*cp->autsch = lp = &(cp->cs)->*cp->ouch;
+	//		(cp->cs).method(cp->cspp);/*1*/ (&(cp->cs))->method(cp->cspp);/*2*/
+	//		((cp->cs).*(cp->method))(cp->cspp);/*3*/
+	//		((&(cp->cs))->*(cp->method))(cp->cspp);/*4*/
+	//	}
+	public void testPointerToMemberFields() throws IOException, DOMException {
+		IBinding b0 = getBindingFromASTName("C *cp", 1);
+		assertClassType((ICPPClassType)b0, "C", ICPPClassType.k_class, 1, 6, 5, 9, 0, 1, 0, 2, 1);
+		
+		IBinding b1 = getBindingFromASTName("cp = new C()", 2);
+		assertVariable(b1, "cp", IPointerType.class, null);
+		IPointerType b1type = (IPointerType) ((ICPPVariable)b1).getType();
+		assertClassType(b1type.getType(), "C", ICPPClassType.k_class, 1, 6, 5, 9, 0, 1, 0, 2, 1);
+		
+		IBinding b2 = getBindingFromASTName("cs.*cp->o", 2);
+		ICPPField field0 = (ICPPField) b2;
+		assertTrue(field0.getType() instanceof ICPPClassType);
+
+		IBinding b3 = getBindingFromASTName("ouch = lp", 4);
+		assertField(b3, "C::ouch", ICPPPointerToMemberType.class, null);
+		assertPTM(((ICPPField)b3).getType(), "C::CS", null);
+
+		IBinding b4 = getBindingFromASTName("autsch;", 6);
+		assertField(b4, "C::autsch", ICPPPointerToMemberType.class, null);
+		assertPTM(((ICPPField)b4).getType(), "C::CS", null);
+
+		IBinding b5 = getBindingFromASTName("cs)->*cp->a", 2);
+		assertField(b5, "C::cs", ICPPClassType.class, "C::CS");
+		assertClassType(((ICPPField)b5).getType(), "C::CS", ICompositeType.k_struct, 0, 1, 1, 5, 1, 1, 0, 2, 0);
+
+		IBinding b6 = getBindingFromASTName("autsch = lp", 6);
+		assertField(b4, "C::autsch", ICPPPointerToMemberType.class, null);
+		assertPTM(((ICPPField)b4).getType(), "C::CS", null);
+
+		IBinding b7 = getBindingFromASTName("ouch;", 4);
+		assertField(b3, "C::ouch", ICPPPointerToMemberType.class, null);
+		assertPTM(((ICPPField)b3).getType(), "C::CS", null);
+	}
+
+	// // header file
+	// class C {}; struct S {}; union U {}; enum E {ER1,ER2,ER3};
+	// int var1; C var2; S *var3; void func(E); void func(C);
+	// namespace ns {}
+	// typedef int Int; typedef int *IntPtr;
+	// void func(int*); void func(int);
+
+	// // referencing file
+	// #include "header.h"
+	// void references() {
+	// 	C c; /*c*/ S s; /*s*/ U u; /*u*/ E e; /*e*/
+	//  var1 = 1; /*var1*/ var2 = c; /*var2*/ var3 = &s; /*var3*/
+	//  func(e); /*func1*/ func(var1); /*func2*/ func(c); /*func3*/
+	//  Int a; /*a*/
+	//  IntPtr b = &a; /*b*/
+	//  func(*b); /*func4*/ func(a); /*func5*/
+	// }
+	// class C2 : public C {}; /*base*/
+	// struct S2 : public S {}; /*base*/
+	public void testSimpleGlobalBindings() throws IOException, DOMException {
+		{
+ 			IBinding b0 = getBindingFromASTName("C c; ", 1);
+			assertClassTypeBinding(b0, "C", ICPPClassType.k_class, 0, 0, 0, 4, 0, 0, 0, 2, 0);
+
+			IBinding b1 = getBindingFromASTName("c; ", 1);
+			assertVariable(b1, "c", ICPPClassType.class, "C");
+			ICPPClassType b1type = (ICPPClassType)((ICPPVariable)b1).getType();
+			assertClassTypeBinding(b1type, "C", ICPPClassType.k_class, 0, 0, 0, 4, 0, 0, 0, 2, 0);
+			assertTrue(b1type.getScope() == null);
+			assertTrue(b1type.getCompositeScope() instanceof ICPPClassScope);
+			assertClassTypeBinding(((ICPPClassScope)b1type.getCompositeScope()).getClassType(), "C", ICPPClassType.k_class, 0, 0, 0, 4, 0, 0, 0, 2, 0);
+		}
+		{
+			IBinding b2 = getBindingFromASTName("S s;", 1);
+			assertClassTypeBinding(b2, "S", ICompositeType.k_struct, 0, 0, 0, 4, 0, 0, 0, 2, 0);
+
+			IBinding b3 = getBindingFromASTName("s;", 1);
+			assertVariable(b3, "s", ICPPClassType.class, "S");
+			ICPPClassType b3type = (ICPPClassType)((ICPPVariable)b3).getType();
+			assertClassTypeBinding(b3type, "S", ICompositeType.k_struct, 0, 0, 0, 4, 0, 0, 0, 2, 0);
+		}
+		{
+			IBinding b4 = getBindingFromASTName("U u;", 1);
+			assertClassTypeBinding(b4, "U", ICompositeType.k_union, 0, 0, 0, 4, 0, 0, 0, 2, 0);
+
+			IBinding b5 = getBindingFromASTName("u; ", 1);
+			assertVariable(b5, "u", ICPPClassType.class, "U");
+			ICPPClassType b5type = (ICPPClassType)((ICPPVariable)b5).getType();
+			assertClassTypeBinding(b5type, "U", ICompositeType.k_union, 0, 0, 0, 4, 0, 0, 0, 2, 0);
+		}
+		{
+			IBinding b6 = getBindingFromASTName("E e; ", 1);
+			assertEnumeration(b6, "E", new String[] {"ER1","ER2","ER3"});
+
+			IBinding b7 = getBindingFromASTName("e; ", 1);
+			assertVariable(b7, "e", IEnumeration.class, "E");
+			IEnumeration b5type = (IEnumeration)((ICPPVariable)b7).getType();
+			assertEnumeration(b5type, "E", new String[] {"ER1","ER2","ER3"});
+			assertTrue(b5type.getScope() == null);
+		}
+		{
+			IBinding b8 = getBindingFromASTName("var1 = 1;", 4);
+			assertVariable(b8, "var1", ICPPBasicType.class, null);
+		}
+		{
+			IBinding b9 = getBindingFromASTName("var2 = c;", 4);
+			assertVariable(b9, "var2", ICPPClassType.class, "C");
+			ICPPClassType b9type = (ICPPClassType)((ICPPVariable)b9).getType();
+			assertClassTypeBinding(b9type, "C", ICPPClassType.k_class, 0, 0, 0, 4, 0, 0, 0, 2, 0);
+		}
+		{
+			IBinding b10 = getBindingFromASTName("var3 = &s;", 4);
+			assertVariable(b10, "var3", IPointerType.class, null);
+			IPointerType b10type = (IPointerType) ((ICPPVariable)b10).getType();
+			assertClassTypeBinding((ICPPClassType) b10type.getType(), "S", ICompositeType.k_struct, 0, 0, 0, 4, 0, 0, 0, 2, 0);
+		}
+		{
+			IBinding b11 = getBindingFromASTName("func(e);", 4);
+		}
+		IBinding b12 = getBindingFromASTName("func(var1);", 4);
+		IBinding b13 = getBindingFromASTName("func(c);", 4);
+		IBinding b14 = getBindingFromASTName("Int a; ", 3);
+		IBinding b15 = getBindingFromASTName("a; ", 1);
+		IBinding b16 = getBindingFromASTName("IntPtr b = &a; ", 6);
+		IBinding b17 = getBindingFromASTName("b = &a; /*b*/", 1);
+		IBinding b18 = getBindingFromASTName("func(*b);", 4);
+		IBinding b19 = getBindingFromASTName("b); /*func4*/", 1);
+		IBinding b20 = getBindingFromASTName("func(a);", 4);
+		IBinding b21 = getBindingFromASTName("a); /*func5*/", 1);
+		IBinding b22 = getBindingFromASTName("C2 : public", 2);
+		IBinding b23 = getBindingFromASTName("C {}; /*base*/", 1);		
+		IBinding b24 = getBindingFromASTName("S2 : public", 2);
+		IBinding b25 = getBindingFromASTName("S {}; /*base*/", 1);		
+	}
+
+
+	//// header content
+	//class TopC {}; struct TopS {}; union TopU {}; enum TopE {TopER1,TopER2};
+	//short topBasic; void *topPtr; TopC *topCPtr; TopU topFunc(){return *new TopU();}
+
+	//// referencing content
+	//namespace n1 {
+	//   class TopC {}; struct TopS {}; union TopU {}; enum TopE {TopER1,TopER2};
+	//   short topBasic; void *topPtr;/*A*/ TopC *topCPtr;/*A*/ TopU topFunc(){return *new TopU();}   
+	//   class C {
+	//      class TopC {}; struct TopS {}; union TopU {}; enum TopE {TopER1,TopER2};
+	//      short topBasic; void *topPtr;/*B*/ TopC *topCPtr;/*B*/ TopU topFunc(){return *new TopU();}
+	//      void references() {
+	//         ::TopC c; ::TopS s; ::TopU u; ::TopE e = ::TopER1;
+	//         ::topBasic++; ::topPtr = &::topBasic; ::topCPtr = &c; ::topFunc();
+	//      } 
+	//   };
+	//}
+	public void testSingletonQualifiedName() {
+		IBinding b0 = getBindingFromASTName("TopC c", 4);
+		IBinding b1 = getBindingFromASTName("TopS s", 4);
+		IBinding b2 = getBindingFromASTName("TopU u", 4);
+		IBinding b3 = getBindingFromASTName("TopE e", 4);
+		IBinding b4 = getBindingFromASTName("TopER1;", 6);
+		IBinding b5 = getBindingFromASTName("topBasic++", 8);
+		IBinding b6 = getBindingFromASTName("topPtr = &", 6);
+		IBinding b7 = getBindingFromASTName("topBasic; ::", 8);
+		IBinding b8 = getBindingFromASTName("topCPtr = &", 7);
+		IBinding b9 = getBindingFromASTName("topFunc();", 7);
+
+		IBinding _b5 = getBindingFromASTName("topBasic; v", 8);
+		IBinding _b6 = getBindingFromASTName("topPtr;/*A*/", 6);
+		IBinding _b7 = getBindingFromASTName("topPtr;/*B*/", 6);
+		IBinding _b8 = getBindingFromASTName("topCPtr;/*A*/", 7);
+		IBinding _b9 = getBindingFromASTName("topCPtr;/*B*/", 7);
+		IBinding _b10 = getBindingFromASTName("topFunc(){", 7);
+	}
+
+	//	// header content
+	// namespace n1 { namespace n2 { struct S {}; } }
+	// class c1 { public: class c2 { public: struct S {}; }; };
+	// struct s1 { struct s2 { struct S {}; }; };
+	// union u1 { struct u2 { struct S {}; }; };
+	// namespace n3 { class c3 { public: struct s3 { union u3 { struct S {}; }; }; }; }
+
+	// // reference content
+	// void reference() {
+	//  ::n1::n2::S _s0; n1::n2::S _s1;
+	//  ::c1::c2::S _s2; c1::c2::S _s3;
+	//  ::s1::s2::S _s4; s1::s2::S _s5;
+	//  ::u1::u2::S _s6; u1::u2::S _s7;
+	//  ::n3::c3::s3::u3::S _s8;
+	//    n3::c3::s3::u3::S _s9;
+	// }
+	// namespace n3 { c3::s3::u3::S _s10; }
+	// namespace n1 { n2::S _s11; }
+	// namespace n1 { namespace n2 { S _s12; }} 
+	public void testQualifiedNamesForStruct() throws DOMException {
+		IBinding b0 = getBindingFromASTName("S _s0;", 1);
+		assertTrue(b0.getScope() instanceof ICPPNamespaceScope);
+		assertTrue(b0.getScope().getParent() instanceof ICPPNamespaceScope);
+		assertTrue(b0.getScope().getParent().getParent() == null);
+		assertQNEquals("n1::n2::S", b0);
+		
+		IBinding b1 = getBindingFromASTName("S _s1;", 1);
+		assertTrue(b1.getScope() instanceof ICPPNamespaceScope);
+		assertTrue(b1.getScope().getParent() instanceof ICPPNamespaceScope);
+		assertTrue(b1.getScope().getParent().getParent() == null);
+		assertQNEquals("n1::n2::S", b1);
+		
+		IBinding b2 = getBindingFromASTName("S _s2;", 1);
+		assertTrue(b2.getScope() instanceof ICPPClassScope);
+		assertTrue(b2.getScope().getParent() instanceof ICPPClassScope);
+		assertTrue(b2.getScope().getParent().getParent() == null);
+		assertQNEquals("c1::c2::S", b2);
+		
+		IBinding b3 = getBindingFromASTName("S _s3;", 1);
+		assertQNEquals("c1::c2::S", b3);
+		IBinding b4 = getBindingFromASTName("S _s4;", 1);
+		assertQNEquals("s1::s2::S", b4);
+		IBinding b5 = getBindingFromASTName("S _s5;", 1);
+		assertQNEquals("s1::s2::S", b5);
+		IBinding b6 = getBindingFromASTName("S _s6;", 1);
+		assertQNEquals("u1::u2::S", b6);
+		IBinding b7 = getBindingFromASTName("S _s7;", 1);
+		assertQNEquals("u1::u2::S", b7);
+		IBinding b8 = getBindingFromASTName("S _s8;", 1);
+		assertQNEquals("n3::c3::s3::u3::S", b8);
+		IBinding b9 = getBindingFromASTName("S _s9;", 1);
+		assertQNEquals("n3::c3::s3::u3::S", b9);
+		
+		IBinding b10 = getBindingFromASTName("S _s10;", 1);
+		assertTrue(b10.getScope() instanceof ICPPClassScope);
+		assertTrue(b10.getScope().getParent() instanceof ICPPClassScope);
+		assertTrue(b10.getScope().getParent().getParent() instanceof ICPPClassScope);
+		assertTrue(b10.getScope().getParent().getParent().getParent() instanceof ICPPNamespaceScope);
+		assertTrue(b10.getScope().getParent().getParent().getParent().getParent() == null);
+		assertQNEquals("n3::c3::s3::u3::S", b10);
+		
+		IBinding b11 = getBindingFromASTName("S _s11;", 1);
+		assertQNEquals("n1::n2::S", b11);
+		IBinding b12 = getBindingFromASTName("S _s12;", 1);
+		assertQNEquals("n1::n2::S", b12);
+	}
+
+	// // header content
+	// namespace n1 { namespace n2 { union U {}; } }
+	// class c1 { public: class c2 { public: union U {}; }; }; 
+	// struct s1 { struct s2 { union U {}; }; };
+	// union u1 { struct u2 { union U {}; }; };
+	// namespace n3 { class c3 { public: struct s3 { union u3 { union U {}; }; }; }; }
+
+	// // reference content
+	// void reference() {
+	//  ::n1::n2::U _u0; n1::n2::U _u1;
+	//  ::c1::c2::U _u2; c1::c2::U _u3;
+	//  ::s1::s2::U _u4; s1::s2::U _u5;
+	//  ::u1::u2::U _u6; u1::u2::U _u7;
+	//  ::n3::c3::s3::u3::U _u8;
+	//    n3::c3::s3::u3::U _u9;
+	// }
+	// namespace n3 { c3::s3::u3::U _u10; }
+	// namespace n1 { n2::U _u11; }
+	// namespace n1 { namespace n2 { U _u12; }} 
+	public void testQualifiedNamesForUnion() throws DOMException {
+		IBinding b0 = getBindingFromASTName("U _u0;", 1);
+		assertQNEquals("n1::n2::U", b0);
+		IBinding b1 = getBindingFromASTName("U _u1;", 1);
+		assertQNEquals("n1::n2::U", b1);
+		IBinding b2 = getBindingFromASTName("U _u2;", 1);
+		assertQNEquals("c1::c2::U", b2);
+		IBinding b3 = getBindingFromASTName("U _u3;", 1);
+		assertQNEquals("c1::c2::U", b3);
+		IBinding b4 = getBindingFromASTName("U _u4;", 1);
+		assertQNEquals("s1::s2::U", b4);
+		IBinding b5 = getBindingFromASTName("U _u5;", 1);
+		assertQNEquals("s1::s2::U", b5);
+		IBinding b6 = getBindingFromASTName("U _u6;", 1);
+		assertQNEquals("u1::u2::U", b6);
+		IBinding b7 = getBindingFromASTName("U _u7;", 1);
+		assertQNEquals("u1::u2::U", b7);
+		IBinding b8 = getBindingFromASTName("U _u8;", 1);
+		assertQNEquals("n3::c3::s3::u3::U", b8);
+		IBinding b9 = getBindingFromASTName("U _u9;", 1);
+		assertQNEquals("n3::c3::s3::u3::U", b9);
+		IBinding b10 = getBindingFromASTName("U _u10;", 1);
+		assertQNEquals("n3::c3::s3::u3::U", b10);
+		IBinding b11 = getBindingFromASTName("U _u11;", 1);
+		assertQNEquals("n1::n2::U", b11);
+		IBinding b12 = getBindingFromASTName("U _u12;", 1);
+		assertQNEquals("n1::n2::U", b12);
+	}
+
+	// // header content
+	// namespace n1 { namespace n2 { class C {}; } }
+	// class c1 { public: class c2 { public: class C {}; }; };
+	// struct s1 { struct s2 { class C {}; }; };
+	// union u1 { union u2 { class C {}; }; };
+	// namespace n3 { class c3 { public: struct s3 { union u3 { class C {}; }; }; }; }
+
+	// // reference content
+	// void reference() {
+	//  ::n1::n2::C _c0; n1::n2::C _c1;
+	//  ::c1::c2::C _c2; c1::c2::C _c3;
+	//  ::s1::s2::C _c4; s1::s2::C _c5;
+	//  ::u1::u2::C _c6; u1::u2::C _c7;
+	//  ::n3::c3::s3::u3::C _c8;
+	//    n3::c3::s3::u3::C _c9;
+	// }
+	// namespace n3 { c3::s3::u3::C _c10; }
+	// namespace n1 { n2::C _c11; }
+	// namespace n1 { namespace n2 { C _c12; }} 
+	public void testQualifiedNamesForClass() throws DOMException {
+		IBinding b0 = getBindingFromASTName("C _c0;", 1);
+		assertQNEquals("n1::n2::C", b0);
+		IBinding b1 = getBindingFromASTName("C _c1;", 1);
+		assertQNEquals("n1::n2::C", b1);
+		IBinding b2 = getBindingFromASTName("C _c2;", 1);
+		assertQNEquals("c1::c2::C", b2);
+		IBinding b3 = getBindingFromASTName("C _c3;", 1);
+		assertQNEquals("c1::c2::C", b3);
+		IBinding b4 = getBindingFromASTName("C _c4;", 1);
+		assertQNEquals("s1::s2::C", b4);
+		IBinding b5 = getBindingFromASTName("C _c5;", 1);
+		assertQNEquals("s1::s2::C", b5);
+		IBinding b6 = getBindingFromASTName("C _c6;", 1);
+		assertQNEquals("u1::u2::C", b6);
+		IBinding b7 = getBindingFromASTName("C _c7;", 1);
+		assertQNEquals("u1::u2::C", b7);
+		IBinding b8 = getBindingFromASTName("C _c8;", 1);
+		assertQNEquals("n3::c3::s3::u3::C", b8);
+		IBinding b9 = getBindingFromASTName("C _c9;", 1);
+		assertQNEquals("n3::c3::s3::u3::C", b9);
+		IBinding b10 = getBindingFromASTName("C _c10;", 1);
+		assertQNEquals("n3::c3::s3::u3::C", b10);
+		IBinding b11 = getBindingFromASTName("C _c11;", 1);
+		assertQNEquals("n1::n2::C", b11);
+		IBinding b12 = getBindingFromASTName("C _c12;", 1);
+		assertQNEquals("n1::n2::C", b12);
+	}
+
+	// // header content
+	// namespace n1 { namespace n2 { typedef int Int; } }
+	// class c1 { public: class c2 { public: typedef int Int; }; };
+	// struct s1 { struct s2 { typedef int Int; }; };
+	// union u1 { struct u2 { typedef int Int; }; };
+	// namespace n3 { class c3 { public: struct s3 { union u3 { typedef int Int; }; }; }; }
+
+	// // reference content
+	// void reference() {
+	//  ::n1::n2::Int i0; n1::n2::Int i1;
+	//  ::c1::c2::Int i2; c1::c2::Int i3;
+	//  ::s1::s2::Int i4; s1::s2::Int i5;
+	//  ::u1::u2::Int i6; u1::u2::Int i7;
+	//  ::n3::c3::s3::u3::Int i8;
+	//    n3::c3::s3::u3::Int i9;
+	// }
+	// namespace n3 { c3::s3::u3::Int i10; }
+	// namespace n1 { n2::Int i11; }
+	// namespace n1 { namespace n2 { Int i12; }} 
+	public void testQualifiedNamesForTypedef() throws DOMException {
+		IBinding b0 = getBindingFromASTName("Int i0;", 3);
+		assertQNEquals("n1::n2::Int", b0);
+		IBinding b1= getBindingFromASTName("Int i1;", 3);
+		assertQNEquals("n1::n2::Int", b1);
+
+		IBinding b2 = getBindingFromASTName("Int i2;", 3);
+		assertQNEquals("c1::c2::Int", b2);
+		IBinding b3 = getBindingFromASTName("Int i3;", 3);
+		assertQNEquals("c1::c2::Int", b3);
+
+		IBinding b4 = getBindingFromASTName("Int i4;", 3);
+		assertQNEquals("s1::s2::Int", b4);
+		IBinding b5 = getBindingFromASTName("Int i5;", 3);
+		assertQNEquals("s1::s2::Int", b5);
+
+		IBinding b6 = getBindingFromASTName("Int i6;", 3);
+		assertQNEquals("u1::u2::Int", b6);
+		IBinding b7 = getBindingFromASTName("Int i7;", 3);
+		assertQNEquals("u1::u2::Int", b7);
+
+		IBinding b8 = getBindingFromASTName("Int i8;", 3);
+		assertQNEquals("n3::c3::s3::u3::Int", b8);
+		IBinding b9 = getBindingFromASTName("Int i9;", 3);
+		assertQNEquals("n3::c3::s3::u3::Int", b9);
+		IBinding b10 = getBindingFromASTName("Int i10;", 3);
+		assertQNEquals("n3::c3::s3::u3::Int", b10);
+		IBinding b11 = getBindingFromASTName("Int i11;", 3);
+		assertQNEquals("n1::n2::Int", b11);
+		IBinding b12 = getBindingFromASTName("Int i12;", 3);
+		assertQNEquals("n1::n2::Int", b12);
+	}
+
+	// // header content
+	// enum E { ER1, ER2 };
+
+	// // referencing content
+	// class C {
+	//	 E e1;
+	//	 static E e2;
+	//	 void m1() { e1 = ER1; }
+	//	 static void m2() { e2 = ER2; }
+	// };
+	public void testEnumeratorInClassScope() {
+		IBinding b0 = getBindingFromASTName("E e1", 1);
+		IBinding b1 = getBindingFromASTName("ER1; }", 3);
+		IBinding b2 = getBindingFromASTName("ER2; }", 3);
+	}
+
+	// // header content
+	// enum E { ER1, ER2 };
+
+	// // referencing content
+	// struct S {
+	//	 E e1;
+	//	 static E e2;
+	//	 void m1() { e1 = ER1; }
+	//	 static void m2() { e2 = ER2; }
+	// };
+	public void testEnumeratorInStructScope() {
+		IBinding b0 = getBindingFromASTName("E e1", 1);
+		IBinding b1 = getBindingFromASTName("ER1; }", 3);
+		IBinding b2 = getBindingFromASTName("ER2; }", 3);
+	}
+
+	//	 // header content
+	// enum E { ER1, ER2 };
+
+	// // referencing content
+	// union U {
+	//	 E e1;
+	//	 static E e2;
+	//	 void m1() { e1 = ER1; }
+	//	 static void m2() { e2 = ER2; }
+	// };
+	public void testEnumeratorInUnionScope() {
+		IBinding b0 = getBindingFromASTName("E e1", 1);
+		IBinding b1 = getBindingFromASTName("ER1; }", 3);
+		IBinding b2 = getBindingFromASTName("ER2; }", 3);
+	}
+
+	//	 // header content
+	// enum E { ER1, ER2 };
+
+	// // referencing content
+	// namespace n1 {
+	//	 E e1;
+	//	 static E e2;
+	//	 void f1() { e1 = ER1; }
+	//	 static void f2() { e2 = ER2; }
+	// };
+	public void testEnumeratorInNamespaceScope() {
+		IBinding b0 = getBindingFromASTName("E e1", 1);
+		IBinding b1 = getBindingFromASTName("ER1; }", 3);
+		IBinding b2 = getBindingFromASTName("ER2; }", 3);
+	}
+
+	// // the header
+	// void foo(int a=2, int b=3);
+
+	// #include "header.h"
+	// void ref() { foo(); }
+	public void testFunctionDefaultArguments() {
+		IBinding b0 = getBindingFromASTName("foo();", 3);
+	}
+
+	// // the header
+	// typedef int TYPE;
+	// namespace ns {
+	//    const TYPE* foo(int a);
+	// };
+
+	// #include "header.h"
+	// const TYPE* ns::foo(int a) { return 0; }
+	public void testTypeQualifier() {
+		IBinding b0 = getBindingFromASTName("foo(", 3);
+	}
+
+	// // header
+	//	class Base { public: void foo(int i) {} };
+	//	class Derived : public Base { public: void foo(long l) {} };
+
+	// // references
+	// #include "header.h"
+	// void references() {
+	//    Derived d; /*d*/
+	//    d.foo(55L); // calls long version
+	//    d.foo(4); // also calls long version (int version is hidden)
+	//    // aftodo - does this test make sense?
+	// }
+	public void testMethodHidingInInheritance() {
+		IBinding b0 = getBindingFromASTName("d; /*d*/", 1);
+		IBinding b1 = getBindingFromASTName("foo(55L);", 3);
+		IBinding b2 = getBindingFromASTName("foo(4);", 3);
+	}
+
+	// // header content
+	// namespace x { namespace y { int i; } }
+
+	// // the references
+	// #include "header.h"
+	// class C { public:
+	//    class x { public:
+	//       class y { public:
+	//          static int j;
+	//       };
+	//    }; 
+	//    void method() {
+	//       ::x::y::i++;
+	//       x::y::j++;
+	//    }
+	// };
+	public void testGQualifiedReference() {
+		IBinding b0 = getBindingFromASTName("x::y::i++", 1);
+		assertTrue(ICPPNamespace.class.isInstance(b0));
+		IBinding b1 = getBindingFromASTName("y::i++", 1);
+		assertTrue(ICPPNamespace.class.isInstance(b1));
+		IBinding b2 = getBindingFromASTName("i++", 1);
+		assertTrue(ICPPVariable.class.isInstance(b2));
+		IBinding b3 = getBindingFromASTName("x::y::j++", 1);
+		assertTrue(ICPPClassType.class.isInstance(b3));
+		IBinding b4 = getBindingFromASTName("y::j++", 1);
+		assertTrue(ICPPClassType.class.isInstance(b4));
+		IBinding b5 = getBindingFromASTName("j++", 1);
+		assertTrue(ICPPVariable.class.isInstance(b5));
+	}
+
+
+	////header content
+	//struct S {int i;};
+	//struct SS { S s, *sp; };
+	//
+	//S* retsptr() {return 0;}
+	//S rets() { return *new S(); }
+	//S s, *sp;
+	//SS ss, *ssp;
+	//S *a[3];
+
+	////reference content
+	//void references() {
+	//	a[0]->i/*0*/++; (*a[0]).i/*1*/++;                    // IASTArraySubscriptExpression
+	//	/* not applicable ?? */                              // IASTBinaryExpression
+	//	((S*)sp)->i/*3*/++; ((S)s).i/*4*/++; //aftodo-valid? // IASTCastExpression
+	//	(true ? sp : sp)->i/*5*/++; (true ? s : s).i/*6*/++; // IASTConditionalExpression
+	//	(sp,sp)->i/*7*/++; (s,s).i/*8*/++;                   // IASTExpressionList
+	//	ss.sp->i/*9*/++; ss.s.i/*10*/++;                     // IASTFieldReference
+	//	ssp->sp->i/*11*/++; ssp->s.i/*12*/++;                // IASTFieldReference
+	//	retsptr()->i/*13*/++; rets().i/*14*/++;              // IASTFunctionCallExpression     
+	//	sp->i/*15*/++; s.i/*16*/++;                          // IASTIdExpression
+	//	/* not applicable */                                 // IASTLiteralExpression
+	//	/* not applicable */                                 // IASTTypeIdExpression
+	//	(*sp).i/*17*/++;                                     // IASTUnaryExpression
+	//	/* not applicable */                                 // ICPPASTDeleteExpression
+	//	(new S())->i/*18*/++;                                // ICPPASTNewExpression
+	//}
+	public void testFieldReference() {
+		IBinding b0 = getBindingFromASTName("i/*0*/", 1);
+		IBinding b1 = getBindingFromASTName("i/*1*/", 1);
+		// IBinding b2 = getBindingFromASTName(ast, "i/*2*/", 1);
+		IBinding b3 = getBindingFromASTName("i/*3*/", 1);
+		IBinding b4 = getBindingFromASTName("i/*4*/", 1);
+		IBinding b5 = getBindingFromASTName("i/*5*/", 1);
+		IBinding b6 = getBindingFromASTName("i/*6*/", 1);
+		IBinding b7 = getBindingFromASTName("i/*7*/", 1);
+		IBinding b8 = getBindingFromASTName("i/*8*/", 1);
+		IBinding b9 = getBindingFromASTName("i/*9*/", 1);
+		IBinding b10 = getBindingFromASTName("i/*10*/", 1);
+		IBinding b11 = getBindingFromASTName("i/*11*/", 1);
+		IBinding b12 = getBindingFromASTName("i/*12*/", 1);
+		IBinding b13 = getBindingFromASTName("i/*13*/", 1);
+		IBinding b14 = getBindingFromASTName("i/*14*/", 1);
+		IBinding b15 = getBindingFromASTName("i/*15*/", 1);
+		IBinding b16 = getBindingFromASTName("i/*16*/", 1);
+		IBinding b17 = getBindingFromASTName("i/*17*/", 1);
+		IBinding b18 = getBindingFromASTName("i/*18*/", 1);
+	}
+
+
+	// // header file
+	//	class C {public: C* cp;};
+	//	C foo(C c);
+	//	C* foo(C* c);
+	//	int foo(int i);
+	//	int foo(int i, C c);
+
+	// // referencing content
+	// #include "header.h"
+	//	void references() {
+	//		C c, *cp;
+	//		foo/*a*/(cp[1]);                        // IASTArraySubscriptExpression
+	//		foo/*b*/(cp+1);                         // IASTBinaryExpression
+	//		foo/*c*/((C*) cp);/*1*/                 // IASTCastExpression
+	//		foo/*d*/(true ? c : c);/*2*/            // IASTConditionalExpression
+	//		foo/*e*/(5, c);/*3*/                    // IASTExpressionList
+	//		foo/*f*/(c.cp);/*4*/ foo(cp->cp);/*5*/  // IASTFieldReference
+	//		foo/*g*/(foo(c));/*6*/ foo(foo(1));/*7*/// IASTFunctionCallExpression
+	//		foo/*h*/(c);/*8*/                       // IASTIdExpression
+	//		foo/*i*/(23489);                        // IASTLiteralExpression
+	//		foo/*j*/(sizeof(C));/*9*/               // IASTTypeIdExpression
+	//		foo/*k*/(*cp);/*10*/                    // IASTUnaryExpression
+	//		foo/*l*/(delete cp);/*11*/              // ICPPASTDeleteExpression
+	//		foo/*m*/(new C());/*12*/                // ICPPASTNewExpression
+	//		// ?? foo/*n*/();                       // ICPPASTSimpleTypeConstructorExpression
+	//		// ?? foo/*o*/();                       // ICPPASTTypenameExprssion
+	//		// foo/*p*/(MADE_UP_SYMBOL);            // ICPPASTTypenameExprssion
+	//	}
+	public void testExpressionKindForFunctionCalls() {
+		// depends on bug 164470 because resolution takes place during parse.
+		IBinding b0 = getBindingFromASTName("foo/*a*/", 3);
+		IBinding b0a = getBindingFromASTName("cp[1]", 2);
+		// assertCompositeTypeParam(0, ICPPClassType.k_class, b0, "C");
+
+		IBinding b1 = getBindingFromASTName("foo/*b*/", 3);
+		IBinding b1a = getBindingFromASTName("cp+1", 2);
+
+		IBinding b2 = getBindingFromASTName("foo/*c*/", 3);
+		IBinding b2a = getBindingFromASTName("cp);/*1*/", 2);
+
+		IBinding b3 = getBindingFromASTName("foo/*d*/", 3);
+		IBinding b3a = getBindingFromASTName("c : c", 1);
+		IBinding b3b = getBindingFromASTName("c);/*2*/", 1);
+
+		IBinding b4 = getBindingFromASTName("foo/*e*/", 3);
+		IBinding b4a = getBindingFromASTName("c);/*3*/", 1);
+
+		IBinding b5 = getBindingFromASTName("cp);/*4*/", 2);
+		IBinding b5a = getBindingFromASTName("foo/*f*/", 3);
+		IBinding b5b = getBindingFromASTName("cp->cp);/*5*/", 2);
+		IBinding b5c = getBindingFromASTName("cp);/*5*/", 2);
+
+		IBinding b6 = getBindingFromASTName("foo/*g*/", 3);
+		IBinding b6a = getBindingFromASTName("foo(c));/*6*/", 3);
+		IBinding b6b = getBindingFromASTName("c));/*6*/", 1);
+		IBinding b6c = getBindingFromASTName("foo(foo(1));/*7*/", 3);
+		IBinding b6d = getBindingFromASTName("foo(1));/*7*/", 3);
+
+		IBinding b7 = getBindingFromASTName("foo/*h*/", 3);
+		IBinding b7a = getBindingFromASTName("c);/*8*/", 1);
+
+		IBinding b8 = getBindingFromASTName("foo/*i*/", 3);
+
+		IBinding b9 = getBindingFromASTName("foo/*j*/", 3);
+		IBinding b9a = getBindingFromASTName("C));/*9*/", 1);
+
+		IBinding b10 = getBindingFromASTName("foo/*k*/", 3);
+		IBinding b10a = getBindingFromASTName("cp);/*10*/", 2);
+
+		IBinding b11 = getBindingFromASTName("foo/*l*/", 3);
+		IBinding b11a = getBindingFromASTName("cp);/*11*/", 2);
+
+		IBinding b12 = getBindingFromASTName("foo/*m*/", 3);
+		IBinding b12a = getBindingFromASTName("C());/*12*/", 1);
+		// IBinding b13 = getBindingFromASTName(ast, "foo/*n*/", 3);
+	}
+
+	// // header content
+	//	class C { public:
+	//	typedef int i1;	typedef long *lp1;
+	//	class C1 {}; struct S1 {}; union U1 {}; enum E1 {A1};
+	//	};
+	//	struct S { public:
+	//	typedef int i2; typedef long *lp2;
+	//	class C2 {}; struct S2 {}; union U2 {}; enum E2 {A2};
+	//	};
+	//	union U { public:
+	//	typedef int i3; typedef long *lp3;
+	//	class C3 {}; struct S3 {}; union U3 {}; enum E3 {A3};
+	//	};
+	//	enum E {A};
+	//	namespace n {
+	//		typedef int i4;	typedef long *lp4;
+	//		class C4 {}; struct S4 {}; union U4 {}; enum E4 {A4};
+	//	}
+	//	void f(int);
+	//	void f(long);
+	//	void f(C); void f(C::i1); void f(C::lp1); void f(C::S1); void f(C::U1); void f(C::E1);
+	//	void f(S); void f(S::i2); void f(S::lp2); void f(S::S2); void f(S::U2); void f(S::E2);	
+	//	void f(U); void f(U::i3); void f(U::lp3); void f(U::S3); void f(U::U3); void f(U::E3);
+	//	void f(n::i4); void f(n::lp4); void f(n::S4); void f(n::U4); void f(n::E4);
+	//	void f(E);
+
+	// // reference content
+	//  #include "header.h"
+	//	void references() {
+	//		void (*fintptr)(int), (*flongptr)(long);
+	//		void (*fC)(C), (*fCi1)(C::i1), (*fClp1)(C::lp1), (*fCS1)(C::S1), (*fCU1)(C::U1), (*fCE1)(C::E1);
+	//		void (*fS)(S), (*fSi2)(S::i2), (*fSlp2)(S::lp2), (*fSS2)(S::S2), (*fSU2)(S::U2), (*fSE2)(S::E2);
+	//		void (*fU)(U), (*fUi3)(U::i3), (*fUlp3)(U::lp3), (*fUS3)(U::S3), (*fUU3)(U::U3), (*fUE3)(U::E3);
+	//		void           (*fni4)(n::i4), (*fnlp4)(n::lp4), (*fnS4)(n::S4), (*fnU4)(n::U4), (*fnE4)(n::E4);
+	//		void (*fE)(E);
+	//		fintptr = &f;/*0*/ flongptr = &f;/*1*/
+	//		fC = &f;/*2*/ fCi1 = &f;/*3*/ fClp1 = &f;/*4*/ fCS1 = &f;/*5*/ fCU1 = &f;/*6*/ fCE1 = &f;/*7*/
+	//		fS = &f;/*8*/ fSi2 = &f;/*9*/ fSlp2 = &f;/*10*/ fSS2 = &f;/*11*/ fSU2 = &f;/*12*/ fSE2 = &f;/*13*/
+	//		fU = &f;/*14*/ fUi3 = &f;/*15*/ fUlp3 = &f;/*16*/ fUS3 = &f;/*17*/ fUU3 = &f;/*18*/ fUE3 = &f;/*19*/
+	//		         fni4 = &f;/*20*/ fnlp4 = &f;/*21*/ fnS4 = &f;/*22*/ fnU4 = &f;/*23*/ fnE4 = &f;/*24*/
+	//		fE = &f;/*25*/
+	//	}	
+	public void testAddressOfOverloadedFunction() throws DOMException {
+		IBinding b0 = getBindingFromASTName("f;/*0*/", 1);
+		IBinding b1 = getBindingFromASTName("f;/*1*/", 1);
+		IBinding b2 = getBindingFromASTName("f;/*2*/", 1);
+		IBinding b3 = getBindingFromASTName("f;/*3*/", 1);
+		IBinding b4 = getBindingFromASTName("f;/*4*/", 1);
+		IBinding b5 = getBindingFromASTName("f;/*5*/", 1);
+		IBinding b6 = getBindingFromASTName("f;/*6*/", 1);
+		IBinding b7 = getBindingFromASTName("f;/*7*/", 1);
+		IBinding b8 = getBindingFromASTName("f;/*8*/", 1);
+		IBinding b9 = getBindingFromASTName("f;/*9*/", 1);
+		IBinding b10= getBindingFromASTName("f;/*10*/", 1);
+		IBinding b11 = getBindingFromASTName("f;/*11*/", 1);
+		IBinding b12 = getBindingFromASTName("f;/*12*/", 1);
+		IBinding b13 = getBindingFromASTName("f;/*13*/", 1);
+		IBinding b14 = getBindingFromASTName("f;/*14*/", 1);
+		IBinding b15 = getBindingFromASTName("f;/*15*/", 1);
+		IBinding b16 = getBindingFromASTName("f;/*16*/", 1);
+		IBinding b17 = getBindingFromASTName("f;/*17*/", 1);
+		IBinding b18 = getBindingFromASTName("f;/*18*/", 1);
+		IBinding b19 = getBindingFromASTName("f;/*19*/", 1);
+		IBinding b20 = getBindingFromASTName("f;/*20*/", 1);
+		IBinding b21 = getBindingFromASTName("f;/*21*/", 1);
+		IBinding b22 = getBindingFromASTName("f;/*22*/", 1);
+		IBinding b23 = getBindingFromASTName("f;/*23*/", 1);
+		IBinding b24 = getBindingFromASTName("f;/*24*/", 1);
+	}
+
+	// struct C {
+	//	 int m1(int a);
+	//	 int m2(int a) const;
+	// }; 
+	//
+	// C* func(int (C::*m)(int) const);
+	// C* func(int (C::*m)(int));
+
+	// void ref() {
+	//	 func(&C::m1);
+	//	 func(&C::m2);
+	// }
+    public void testAddressOfConstMethod_233889() throws Exception {
+		IBinding fn1= getBindingFromASTName("func(&C::m1", 4, ICPPFunction.class);
+		IBinding fn2= getBindingFromASTName("func(&C::m2", 4, ICPPFunction.class);
+		assertNotSame(fn1, fn2);
+    }
+
+	// // the header
+	// void f_int(int);
+	// void f_const_int(const int);
+	// void f_int_ptr(int*);
+
+	// #include "header.h"
+	// void ref() { 
+	// 	 int 			i				= 0;
+	//   const int 		const_int		= 0;
+	//
+	//   f_int(i);				 // ok
+	//   f_int(const_int);       // ok (passed as value)
+	//   f_const_int(i);		 // ok
+	//   f_const_int(const_int); // ok
+	// }
+	//
+	//  void f_const_int(const int const_int) {
+	//     f_int_ptr(&const_int); // error
+	//  }  
+	public void testConstIntParameter() {
+		getBindingFromASTName("f_int(i)", 5);
+		getBindingFromASTName("f_int(const_int)", 5);
+		getBindingFromASTName("f_const_int(i)", 11);
+		getBindingFromASTName("f_const_int(const_int)", 11);
+		getProblemFromASTName("f_int_ptr(&const_int)", 9);
+	}
+
+	// // the header
+	// void f_int_ptr(int*);
+	// void f_const_int_ptr(const int*);
+	// void f_int_const_ptr(int const*);
+	// void f_int_ptr_const(int *const);
+	// void f_const_int_ptr_const(const int*const);
+	// void f_int_const_ptr_const(int const*const);
+
+	// #include "header.h"
+	// void ref() { 
+	// 	 int* 			int_ptr			= 0;
+	//   const int*		const_int_ptr   = 0;
+	// 	 int const*     int_const_ptr	= 0;
+	// 	 int *const     int_ptr_const	= 0;
+	//   const int*const		const_int_ptr_const   = 0;
+	//   int const*const		int_const_ptr_const   = 0;
+	//
+	//   f_int_ptr(int_ptr);				// ok
+	//   f_int_ptr(const_int_ptr);			// error
+	//   f_int_ptr(int_const_ptr);			// error
+	//   f_int_ptr(int_ptr_const);			// ok
+	//   f_int_ptr(const_int_ptr_const);	// error
+	//   f_int_ptr(int_const_ptr_const);	// error
+	//
+	//   f_const_int_ptr(int_ptr);				// ok
+	//   f_const_int_ptr(const_int_ptr);		// ok
+	//   f_const_int_ptr(int_const_ptr);		// ok
+	//   f_const_int_ptr(int_ptr_const);		// ok
+	//   f_const_int_ptr(const_int_ptr_const);	// ok
+	//   f_const_int_ptr(int_const_ptr_const);	// ok
+	//
+	//   f_int_const_ptr(int_ptr);				// ok
+	//   f_int_const_ptr(const_int_ptr);		// ok
+	//   f_int_const_ptr(int_const_ptr);		// ok
+	//   f_int_const_ptr(int_ptr_const);		// ok
+	//   f_int_const_ptr(const_int_ptr_const);	// ok
+	//   f_int_const_ptr(int_const_ptr_const);	// ok
+	//
+	//   f_int_ptr_const(int_ptr);				// ok
+	//   f_int_ptr_const(const_int_ptr);		// error
+	//   f_int_ptr_const(int_const_ptr);		// error
+	//   f_int_ptr_const(int_ptr_const);		// ok
+	//   f_int_ptr_const(const_int_ptr_const);	// error
+	//   f_int_ptr_const(int_const_ptr_const);	// error
+	//
+	//   f_const_int_ptr_const(int_ptr);			 // ok
+	//   f_const_int_ptr_const(const_int_ptr);		 // ok
+	//   f_const_int_ptr_const(int_const_ptr);		 // ok
+	//   f_const_int_ptr_const(int_ptr_const);		 // ok
+	//   f_const_int_ptr_const(const_int_ptr_const); // ok
+	//   f_const_int_ptr_const(int_const_ptr_const); // ok
+	//
+	//   f_int_const_ptr_const(int_ptr);				// ok
+	//   f_int_const_ptr_const(const_int_ptr);			// ok
+	//   f_int_const_ptr_const(int_const_ptr);			// ok
+	//   f_int_const_ptr_const(int_ptr_const);			// ok
+	//   f_int_const_ptr_const(const_int_ptr_const);	// ok
+	//   f_int_const_ptr_const(int_const_ptr_const);	// ok
+	// }
+	public void testConstIntPtrParameter() {
+		getBindingFromASTName("f_int_ptr(int_ptr)", 			9);
+		getProblemFromASTName("f_int_ptr(const_int_ptr)", 		9);
+		getProblemFromASTName("f_int_ptr(int_const_ptr)", 		9);
+		getBindingFromASTName("f_int_ptr(int_ptr_const)", 		9);
+		getProblemFromASTName("f_int_ptr(const_int_ptr_const)", 9);
+		getProblemFromASTName("f_int_ptr(int_const_ptr_const)", 9);
+
+		getBindingFromASTName("f_const_int_ptr(int_ptr)", 				15);
+		getBindingFromASTName("f_const_int_ptr(const_int_ptr)", 		15);
+		getBindingFromASTName("f_const_int_ptr(int_const_ptr)", 		15);
+		getBindingFromASTName("f_const_int_ptr(int_ptr_const)", 		15);
+		getBindingFromASTName("f_const_int_ptr(const_int_ptr_const)",	15);
+		getBindingFromASTName("f_const_int_ptr(int_const_ptr_const)", 	15);
+
+		getBindingFromASTName("f_int_const_ptr(int_ptr)", 				15);
+		getBindingFromASTName("f_int_const_ptr(const_int_ptr)", 		15);
+		getBindingFromASTName("f_int_const_ptr(int_const_ptr)", 		15);
+		getBindingFromASTName("f_int_const_ptr(int_ptr_const)", 		15);
+		getBindingFromASTName("f_int_const_ptr(const_int_ptr_const)",	15);
+		getBindingFromASTName("f_int_const_ptr(int_const_ptr_const)", 	15);
+
+		getBindingFromASTName("f_int_ptr_const(int_ptr)", 				15);
+		getProblemFromASTName("f_int_ptr_const(const_int_ptr)", 		15);
+		getProblemFromASTName("f_int_ptr_const(int_const_ptr)", 		15);
+		getBindingFromASTName("f_int_ptr_const(int_ptr_const)", 		15);
+		getProblemFromASTName("f_int_ptr_const(const_int_ptr_const)",	15);
+		getProblemFromASTName("f_int_ptr_const(int_const_ptr_const)", 	15);
+
+		getBindingFromASTName("f_const_int_ptr_const(int_ptr)", 			21);
+		getBindingFromASTName("f_const_int_ptr_const(const_int_ptr)", 		21);
+		getBindingFromASTName("f_const_int_ptr_const(int_const_ptr)", 		21);
+		getBindingFromASTName("f_const_int_ptr_const(int_ptr_const)", 		21);
+		getBindingFromASTName("f_const_int_ptr_const(const_int_ptr_const)",	21);
+		getBindingFromASTName("f_const_int_ptr_const(int_const_ptr_const)", 21);
+
+		getBindingFromASTName("f_int_const_ptr_const(int_ptr)", 			21);
+		getBindingFromASTName("f_int_const_ptr_const(const_int_ptr)", 		21);
+		getBindingFromASTName("f_int_const_ptr_const(int_const_ptr)", 		21);
+		getBindingFromASTName("f_int_const_ptr_const(int_ptr_const)", 		21);
+		getBindingFromASTName("f_int_const_ptr_const(const_int_ptr_const)",	21);
+		getBindingFromASTName("f_int_const_ptr_const(int_const_ptr_const)", 21);
+	}
+
+	// // the header
+
+	// void f(int*){}		// b1
+	// void f(const int*){}	// b2
+	// void f(int const*){}	// b2, redef
+	// void f(int *const){}	// b1, redef
+	// void f(const int*const){} // b2, redef
+	// void f(int const*const){} // b2, redef
+	public void testConstIntPtrParameterInDefinitionAST() throws CoreException {
+		IBinding binding1= getBindingFromASTName("f(int*){}", 1);
+		IBinding binding2= getBindingFromASTName("f(const int*){}", 1);
+		getProblemFromASTName("f(int const*){}", 1);
+		getProblemFromASTName("f(int *const){}", 1);
+		getProblemFromASTName("f(const int*const){}", 1);
+		getProblemFromASTName("f(int const*const){}", 1);
+	}
+
+	// // the header
+
+	// void f(int&){}		// b1
+	// void f(const int&){}	// b2
+	// void f(int const&){}	// b2, redef
+	public void testConstIntRefParameterInDefinitionAST() throws CoreException {
+		IBinding binding1= getBindingFromASTName("f(int&){}", 1);
+		IBinding binding2= getBindingFromASTName("f(const int&){}", 1);
+		getProblemFromASTName("f(int const&){}", 1);
+	}
+
+	// // the header
+
+	// void f(int*);		// b1
+	// void f(const int*);	// b2
+	// void f(int const*);	// b2
+	// void f(int *const);	// b1
+	// void f(const int*const);	// b2
+	// void f(int const*const); // b2
+	//
+	// void f(int*){}		// b1
+	// void f(const int*){}	// b2
+	//
+	// void ref() {
+	// 	 int* 			int_ptr			= 0;
+	//   const int*		const_int_ptr   = 0;
+	// 	 int const*     int_const_ptr	= 0;
+	// 	 int *const     int_ptr_const	= 0;
+	//   const int*const		const_int_ptr_const   = 0;
+	//   int const*const		int_const_ptr_const   = 0;
+	//
+	//   f(int_ptr);				// b1
+	//   f(const_int_ptr);			// b2
+	//   f(int_const_ptr);			// b2
+	//   f(int_ptr_const);			// b1
+	//   f(const_int_ptr_const);	// b2
+	//   f(int_const_ptr_const);	// b2
+	// }
+	public void testConstIntPtrParameterInDefinitionAST2() throws CoreException {
+		IBinding binding1= getBindingFromASTName("f(int*){}", 1);
+		IBinding binding2= getBindingFromASTName("f(const int*){}", 1);
+
+		assertEquals(binding1, getBindingFromASTName("f(int_ptr)", 1));
+		assertEquals(binding2, getBindingFromASTName("f(const_int_ptr)", 1));
+		assertEquals(binding2, getBindingFromASTName("f(int_const_ptr)", 1));
+		assertEquals(binding1, getBindingFromASTName("f(int_ptr_const)", 1));
+		assertEquals(binding2, getBindingFromASTName("f(const_int_ptr_const)", 1));
+		assertEquals(binding2, getBindingFromASTName("f(int_const_ptr_const)", 1));
+	}
+
+	// // the header
+	// void f(int*);		// b1
+	// void f(const int*);	// b2
+	// void f(int const*);	// b2
+	// void f(int *const);	// b1
+	// void f(const int*const);	// b2
+	// void f(int const*const); // b2
+
+	// #include "header.h"
+	// void f(int*){}		// b1
+	// void f(const int*){}	// b2
+	//
+	// void ref() {
+	// 	 int* 			int_ptr			= 0;
+	//   const int*		const_int_ptr   = 0;
+	// 	 int const*     int_const_ptr	= 0;
+	// 	 int *const     int_ptr_const	= 0;
+	//   const int*const		const_int_ptr_const   = 0;
+	//   int const*const		int_const_ptr_const   = 0;
+	//
+	//   f(int_ptr);				// b1
+	//   f(const_int_ptr);			// b2
+	//   f(int_const_ptr);			// b2
+	//   f(int_ptr_const);			// b1
+	//   f(const_int_ptr_const);	// b2
+	//   f(int_const_ptr_const);	// b2
+	// }
+	public void testConstIntPtrParameterInDefinition() throws CoreException {
+		IBinding binding1= getBindingFromASTName("f(int*){}", 1);
+		IBinding binding2= getBindingFromASTName("f(const int*){}", 1);
+
+		assertEquals(binding1, getBindingFromASTName("f(int_ptr)", 1));
+		assertEquals(binding2, getBindingFromASTName("f(const_int_ptr)", 1));
+		assertEquals(binding2, getBindingFromASTName("f(int_const_ptr)", 1));
+		assertEquals(binding1, getBindingFromASTName("f(int_ptr_const)", 1));
+		assertEquals(binding2, getBindingFromASTName("f(const_int_ptr_const)", 1));
+		assertEquals(binding2, getBindingFromASTName("f(int_const_ptr_const)", 1));
+
+		assertEquals(2, getIndex().findNames(binding1, IIndex.FIND_DECLARATIONS).length);
+		assertEquals(4, getIndex().findNames(binding2, IIndex.FIND_DECLARATIONS).length);
+		assertEquals(1, getIndex().findNames(binding1, IIndex.FIND_DEFINITIONS).length);
+		assertEquals(1, getIndex().findNames(binding2, IIndex.FIND_DEFINITIONS).length);
+	}
+
+	// // header file
+	// struct myStruct {
+	//    int a;
+	// };
+	// union myUnion {
+	//    int b;
+	// };
+
+	// // referencing content
+	// struct myStruct; 
+	// union myUnion;
+	// void test() {
+	//    struct myStruct* u;
+	//    union myUnion* v;
+	//    u->a= 1;  // since we include the definition, we may use the type.
+	//    v->b= 1;  // since we include the definition, we may use the type.
+	// }
+	public void testTypeDefinitionWithFwdDeclaration() {
+		getBindingFromASTName("a= 1", 1);
+		getBindingFromASTName("b= 1", 1);
+	}
+	
+	// namespace x {
+	//    int a(int);
+	// }
+    // using namespace x;
+	// using x::a;
+	
+	// #include "header.h"
+	// void test() {
+	//    a(1);
+	// }
+    public void testLegalConflictWithUsingDeclaration() throws Exception {
+		getBindingFromASTName("a(1)", 1);
+    }
+    
+	//	class A {};
+	//	class B {};
+	//	class C {
+	//	public:
+	//		operator B() {B b; return b;}
+	//	};
+	//	class D : public C {};
+	//	void foo(B b) {}
+	
+    //  class E : public C {};
+	//	void refs() {
+	//		C c;
+	//		foo(c);
+	//		D d;
+	//		foo(d);
+	//		E e;
+	//		foo(e);
+	//	}
+    public void testUserDefinedConversionOperator_224364() throws Exception {
+    	IBinding ca=   getBindingFromASTName("C c;", 1);
+    	assertInstance(ca, ICPPClassType.class);
+    	    	
+    	IBinding foo1= getBindingFromASTName("foo(c)", 3);
+    	
+    	IBinding da=   getBindingFromASTName("D d", 1);
+    	assertInstance(da, ICPPClassType.class);
+    	    	
+		IBinding foo2= getBindingFromASTName("foo(d)", 3);
+		IBinding foo3= getBindingFromASTName("foo(e)", 3);
+    }
+
+	// int a= 1+2-3*4+10/2; // -4
+	// int b= a+4;
+	// int* c= &b;
+	// enum X {e0, e4=4, e5, e2=2, e3};
+    
+    // void ref() {
+    // a; b; c; e0; e2; e3; e4; e5;
+    // }
+	public void testValues() throws Exception {
+		IVariable v= (IVariable) getBindingFromASTName("a;", 1);
+		checkValue(v.getInitialValue(), -4);
+		v= (IVariable) getBindingFromASTName("b;", 1);
+		checkValue(v.getInitialValue(), 0);
+		v= (IVariable) getBindingFromASTName("c;", 1);
+		assertNull(v.getInitialValue().numericalValue());
+
+		IEnumerator e= (IEnumerator) getBindingFromASTName("e0", 2);
+		checkValue(e.getValue(), 0);
+		e= (IEnumerator) getBindingFromASTName("e2", 2);
+		checkValue(e.getValue(), 2);
+		e= (IEnumerator) getBindingFromASTName("e3", 2);
+		checkValue(e.getValue(), 3);
+		e= (IEnumerator) getBindingFromASTName("e4", 2);
+		checkValue(e.getValue(), 4);
+		e= (IEnumerator) getBindingFromASTName("e5", 2);
+		checkValue(e.getValue(), 5);
+	}
+
+	//	namespace ns1 { namespace ns2 {
+	//	  class A {};
+	//	}}
+	//	using namespace ns1::ns2;
+	
+	//	#include "header.h"
+	//	A a;
+	public void testUsingDirectiveWithQualifiedName_269727() throws Exception {
+    	getBindingFromASTName("A a", 1, ICPPClassType.class);
+	}
+
+	//	class A {
+	//	  class B;
+	//	  void method();
+	//	};
+
+	//	class A::B {
+	//	  B(int x);
+	//    static void m(int p);
+	//	};
+	//
+	//	void A::method() {
+	//	  new B(0);
+	//    B::m(0);
+	//	}
+	public void testNestedClass_284665() throws Exception {
+    	ICPPClassType b0 = getBindingFromASTName("B {", 1, ICPPClassType.class);
+    	assertFalse(b0 instanceof IIndexBinding);
+    	ICPPConstructor b1 = getBindingFromASTName("B(int x)", 1, ICPPConstructor.class);
+    	assertFalse(b1 instanceof IIndexBinding);
+    	ICPPConstructor b2 = getBindingFromASTName("B(0)", 1, ICPPConstructor.class);
+    	assertFalse(b2 instanceof IIndexBinding);
+    	assertEquals(b1, b2);
+    	ICPPMethod b3 = getBindingFromASTName("m(0)", 1, ICPPMethod.class);
+    	assertFalse(b3 instanceof IIndexBinding);
+	}
+
+	//	class A {
+	//	  friend inline void m(A p) {}
+	//	};
+
+	//	void test(A a) {
+	//	  m(a);
+	//	}
+	public void testInlineFriendFunction_284690() throws Exception {
+    	getBindingFromASTName("m(a)", 1, ICPPFunction.class);
+	}
+
+	private void checkValue(IValue initialValue, int i) {
+		assertNotNull(initialValue);
+		final Long numericalValue = initialValue.numericalValue();
+		assertNotNull(numericalValue);
+		assertEquals(i, numericalValue.intValue());
+	}
+
+	/* CPP assertion helpers */
+	/* ##################################################################### */
+
+	static protected void assertField(
+			IBinding binding,
+			String qn,
+			Class expType,
+			String expTypeQN
+	) {
+		try {
+			assertTrue(binding instanceof ICPPField);
+			ICPPField field = (ICPPField) binding;
+			assertQNEquals(qn, field);
+			assertTrue(expType.isInstance(field.getType()));
+			if(expTypeQN!=null) {
+				assert(field.getType() instanceof ICPPBinding);
+				ICPPBinding tyBinding = (ICPPBinding) field.getType();
+				assertQNEquals(expTypeQN, tyBinding);
+			}
+		} catch(DOMException de) {
+			fail(de.getMessage());
+		}
+	}
+
+	static protected void assertClassTypeBinding(IBinding binding,
+			String qn,
+			int key,
+			int bases,
+			int fields,
+			int declaredFields,
+			int methods,
+			int declaredMethods,
+			int allDeclaredMethods,
+			int friends,
+			int constructors,
+			int nestedClasses) {
+		assertTrue(binding instanceof ICPPClassType);
+		assertClassType(((ICPPClassType) binding), qn, key, bases, fields, declaredFields, methods, declaredMethods, allDeclaredMethods, friends, constructors, nestedClasses);
+	}
+
+	static protected void assertClassType(
+			IType type,
+			String qn,
+			int key,
+			int bases,
+			int fields,
+			int declaredFields,
+			int methods,
+			int declaredMethods,
+			int allDeclaredMethods,
+			int friends,
+			int constructors,
+			int nestedClasses
+	) {
+		try {
+			assertTrue(type instanceof ICPPClassType);
+			ICPPClassType classType = (ICPPClassType) type;
+			assertQNEquals(qn, classType);
+			assertEquals(key, classType.getKey());
+			assertEquals(bases, classType.getBases().length);
+			assertEquals(fields, classType.getFields().length);
+			assertEquals(declaredFields, classType.getDeclaredFields().length);
+			assertEquals(methods, classType.getMethods().length);
+			assertEquals(declaredMethods, classType.getDeclaredMethods().length);
+			assertEquals(allDeclaredMethods, classType.getAllDeclaredMethods().length);
+			// assertEquals(friends, classType.getFriends().length); (PDOMNotImplementedError)
+			assertEquals(constructors, classType.getConstructors().length);
+			assertEquals(nestedClasses, classType.getNestedClasses().length);
+		} catch(DOMException de) {
+			fail(de.getMessage());
+		}
+	}
+
+	public void assertEnumeration(IBinding binding, String name, String[] enumerators) throws DOMException {
+		assertTrue(binding instanceof IEnumeration);
+		assertEquals(name, binding.getName());
+		IEnumerator[] aEnumerators = ((IEnumeration)binding).getEnumerators();
+		Set expectedEnumerators = new HashSet();
+		expectedEnumerators.addAll(Arrays.asList(enumerators));
+		Set actualEnumerators = new HashSet();
+		for (IEnumerator enumerator : aEnumerators) {
+			actualEnumerators.add(enumerator.getName());
+ 		}
+ 		assertEquals(expectedEnumerators, actualEnumerators);
+ 	}
+
+	/**
+ 	 * @param type
+ 	 * @param cqn
+ 	 * @param qn may be null
+ 	 */
+	static protected void assertPTM(IType type, String cqn, String qn) {
+		try {
+			assertTrue(type instanceof ICPPPointerToMemberType);
+			ICPPPointerToMemberType ptmt = (ICPPPointerToMemberType) type;
+			ICPPClassType classType = (ICPPClassType) ptmt.getMemberOfClass();
+			assertQNEquals(cqn, classType);
+			if(qn!=null) {
+				assert(ptmt.getType() instanceof ICPPBinding);
+				ICPPBinding tyBinding = (ICPPBinding) ptmt.getType();
+				assertQNEquals(qn, tyBinding);
+			}
+		} catch(DOMException de) {
+			fail(de.getMessage());
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java
new file mode 100644
index 0000000..ae20eea
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java
@@ -0,0 +1,1653 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Symbian Software Systems and others.
+ * 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 
+ *
+ * Contributors:
+ *    Andrew Ferguson (Symbian) - Initial implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.index.tests;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IFunctionType;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.IScope;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBasicType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassSpecialization;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplatePartialSpecialization;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateDefinition;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateNonTypeParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTemplateParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTypeParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.parser.util.ObjectMap;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPBasicType;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassSpecializationScope;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateArgument;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil;
+import org.eclipse.cdt.internal.core.index.IIndexScope;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Tests for exercising resolution of template bindings against IIndex
+ */
+public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBase {
+	public static class SingleProject extends IndexCPPTemplateResolutionTest {
+		public SingleProject() {setStrategy(new SinglePDOMTestStrategy(true));}
+		public static TestSuite suite() {return suite(SingleProject.class);}
+	}
+	
+	public static class ProjectWithDepProj extends IndexCPPTemplateResolutionTest {
+		public ProjectWithDepProj() {setStrategy(new ReferencedProject(true));}
+		public static TestSuite suite() {return suite(ProjectWithDepProj.class);}
+	}
+	
+	public static void addTests(TestSuite suite) {		
+		suite.addTest(SingleProject.suite());
+		suite.addTest(ProjectWithDepProj.suite());
+	}
+
+	public IndexCPPTemplateResolutionTest() {
+		setStrategy(new ReferencedProject(true));
+	}
+	
+    // template<typename _TpAllocator>
+    // struct Allocator {
+    //   typedef _TpAllocator& alloc_reference;
+    //   template<typename _TpRebind>
+    //   struct rebind {
+    //     typedef Allocator<_TpRebind> other;
+    //   };
+    // };
+    //
+    // template<typename _Tp, typename _Alloc = Allocator<_Tp> >
+    // struct Vec {
+    //   typedef typename _Alloc::template rebind<_Tp>::other::alloc_reference reference;
+    // };
+
+	// void f(Vec<int>::reference r) {}
+    public void testRebindPattern_214017_1() throws Exception {
+        IBinding b0= getBindingFromASTName("r)", 1);
+        assertInstance(b0, ICPPVariable.class);
+		IType type = ((ICPPVariable) b0).getType();
+		type = SemanticUtil.getUltimateType(type, false);
+		assertInstance(type, IBasicType.class);
+		assertEquals("int", ASTTypeUtil.getType(type));
+    }
+
+    // template<typename _TpAllocator>
+    // struct Allocator {
+    //   typedef _TpAllocator& alloc_reference;
+    //   template<typename _TpRebind>
+    //   struct rebind {
+    //     typedef Allocator<_TpRebind> other;
+    //   };
+    // };
+    //
+    // template<typename _TpBase, typename _AllocBase>
+    // struct VecBase {
+    //   typedef typename _AllocBase::template rebind<_TpBase>::other _Tp_alloc_type;
+    // };
+    //
+    // template<typename _Tp, typename _Alloc = Allocator<_Tp> >
+    // struct Vec : public VecBase<_Tp, _Alloc> {
+    //   typedef typename VecBase<_Tp, _Alloc>::_Tp_alloc_type::alloc_reference reference;
+    // };
+
+    // void f(Vec<int>::reference r) {}
+    public void testRebindPattern_214017_2() throws Exception {
+        IBinding b0= getBindingFromASTName("r)", 1);
+        assertInstance(b0, ICPPVariable.class);
+		IType type = ((ICPPVariable) b0).getType();
+		type = SemanticUtil.getUltimateType(type, false);
+		assertInstance(type, IBasicType.class);
+		assertEquals("int", ASTTypeUtil.getType(type));
+    }
+	
+    // template<typename _TpAllocatorForward>
+    // class Allocator;
+    //
+	// template<>
+	// struct Allocator<void> {
+	//   template<typename _TpRebind>
+	//   struct rebind {
+	//	   typedef Allocator<_TpRebind> other;
+	//   };
+	// };
+    //
+    // template<typename _TpAllocator>
+    // struct Allocator {
+    //   typedef _TpAllocator& alloc_reference;
+    //   template<typename _TpRebind>
+    //   struct rebind {
+    //     typedef Allocator<_TpRebind> other;
+    //   };
+    // };
+    //
+    // template<typename _TpBase, typename _AllocBase>
+    // struct VecBase {
+    //   typedef typename _AllocBase::template rebind<_TpBase>::other _Tp_alloc_type;
+    // };
+    //
+    // template<typename _Tp, typename _Alloc = Allocator<_Tp> >
+    // struct Vec : public VecBase<_Tp, _Alloc> {
+    //   typedef typename VecBase<_Tp, _Alloc>::_Tp_alloc_type::alloc_reference reference;
+    // };
+
+    // void f(Vec<int>::reference r) {}
+    public void testRebindPattern_214017_3() throws Exception {
+        IBinding b0= getBindingFromASTName("r)", 1);
+        assertInstance(b0, ICPPVariable.class);
+		IType type = ((ICPPVariable) b0).getType();
+		type = SemanticUtil.getUltimateType(type, false);
+		assertInstance(type, IBasicType.class);
+		assertEquals("int", ASTTypeUtil.getType(type));
+    }
+
+    // template<typename _TpAllocator>
+    // struct Allocator {
+    //   typedef _TpAllocator& alloc_reference;
+    //   template<typename _TpRebind>
+    //   struct rebind {
+    //     typedef Allocator<_TpRebind> other;
+    //   };
+    // };
+    //
+    // template<typename _TpBase, typename _AllocBase>
+    // struct VecBase {
+    //   typedef typename _AllocBase::template rebind<_TpBase*>::other unreferenced;
+    //   typedef typename _AllocBase::template rebind<_TpBase>::other _Tp_alloc_type;
+    // };
+    //
+    // template<typename _Tp, typename _Alloc = Allocator<_Tp> >
+    // struct Vec : public VecBase<_Tp, _Alloc> {
+    //   typedef typename VecBase<_Tp, _Alloc>::_Tp_alloc_type::alloc_reference reference;
+    // };
+
+	// void f(int s);
+	//
+	// void test(Vec<int>::reference p) {
+	//   f(p);
+	// }
+    public void testRebindPattern_276610() throws Exception {
+        getBindingFromASTName("f(p)", 1, ICPPFunction.class);
+    }
+
+    //	class Str1 {
+	//	public:
+	//	   Str1(const char* s) {
+	//	      s_ = s;
+	//     }
+	//
+	//	   const char* s_;
+	//	};
+	//
+	//	template<typename T>
+	//	class StrT {
+	//	public:
+	//	   StrT(const T* s) {
+	//	      s_ = s;
+	//     }
+	//
+	//     const T* s_;
+	//	};
+	//
+	//  template<typename T>
+	//	class C1 {
+	//	public:
+	//	  void m1(const Str1& s) {}
+	//	  void m2(const StrT<T> s) {}
+	//	};
+
+	//  void main() {
+	//     C1<char> c1;
+	//	   c1.m1("aaa");  // OK
+	//	   c1.m2("aaa");  // problem
+	//  }
+	public void testUnindexedConstructorInstanceImplicitReferenceToDeferred() throws Exception {
+		IBinding b0= getBindingFromASTName("C1<char> c1", 8);
+		IBinding b1= getBindingFromASTName("m1(\"aaa\")", 2);
+    	IBinding b2= getBindingFromASTName("m2(\"aaa\")", 2);
+    	
+    	assertEquals(1, getIndex().findNames(b1, IIndex.FIND_REFERENCES).length);
+    	assertEquals(1, getIndex().findNames(b2, IIndex.FIND_REFERENCES).length);
+	}
+	
+	
+	// template<typename T>
+	// class X {
+	//    public: static void foo() {}
+	// };
+	
+	// class A{};
+	// void bar() {
+	//   X<A>::foo();
+	// }
+	public void testUnindexedMethodInstance() {
+		IBinding b0= getBindingFromASTName("foo()", 3);
+		assertInstance(b0, ICPPMethod.class);
+	}
+	
+	// template<typename T>
+	// class StrT {
+	//   public: void assign(const T* s) {}
+	// };
+	
+	// void main() {
+	//   StrT<char> x;
+	//   x.assign("aaa");
+	// }
+	public void testUnindexedMethodInstance2() throws Exception {
+		IBinding b0= getBindingFromASTName("assign(\"aaa\")", 6);
+		assertInstance(b0, ICPPMethod.class);
+    	assertEquals(1, getIndex().findNames(b0, IIndex.FIND_REFERENCES).length);
+		IParameter[] parameters = ((ICPPMethod) b0).getParameters();
+		System.out.println(String.valueOf(parameters));
+		IFunctionType type = ((ICPPMethod) b0).getType();
+		System.out.println(String.valueOf(type));
+	}
+
+	// template<typename T>
+	// class X {};
+	
+	// class A{};
+	// void bar() {
+	//   X<A> xa= new X<A>();
+	// }
+	public void testUnindexedConstructorInstance() {
+		IBinding b0= getBindingFromASTName("X<A>()", 4);
+		assertInstance(b0, ICPPConstructor.class);
+	}
+
+	//	template<typename T>
+	//	class StrT {
+	//	public:
+	//	   StrT(const T* s) {
+	//	      s_ = s;
+	//     }
+	//
+	//     const T* s_;
+	//	};
+	//
+	//  template<typename T>
+	//	class C1 {
+	//	public:
+	//	  void m2(T t) {}
+	//	};
+	
+	//  class A {};
+	//  void foo() {
+	//     C1< StrT<A> > c1a;
+	//     c1a.m2(*new StrT<A>(new A()));
+	//  }
+	public void testUnindexedConstructorInstanceImplicitReference3() throws Exception {
+		IBinding b0= getBindingFromASTName("C1< StrT<A> >", 2);
+		IBinding b1= getBindingFromASTName("StrT<A> > c1a", 7);
+		IBinding b2= getBindingFromASTName("StrT<A>(", 7);
+		IBinding b3= getBindingFromASTName("c1a;", 3);
+		IBinding b4= getBindingFromASTName("m2(*", 2);
+	}
+	
+	//	class Str1 {
+	//	public:
+	//	   Str1(const char* s) {
+	//	      s_ = s;
+	//     }
+	//
+	//	   const char* s_;
+	//	};
+	//
+	//	template<typename T>
+	//	class StrT {
+	//	public:
+	//	   StrT(const T* s) {
+	//	      s_ = s;
+	//     }
+	//
+	//     const T* s_;
+	//	};
+	//
+	//	typedef StrT<char> Str2;
+	//
+	//	class C1 {
+	//	public:
+	//	  void m1(const Str1& s) {}
+	//	  void m2(const Str2& s) {}
+	//	  void m3();
+	//	};
+
+	//  void C1::m3() {
+	//	   m1("aaa");  // OK
+	//	   m2("aaa");  // problem
+	//  }
+	public void testUnindexedConstructorInstanceImplicitReference() throws Exception {
+		IBinding b0= getBindingFromASTName("m1(\"aaa\")", 2);
+    	IBinding b1= getBindingFromASTName("m2(\"aaa\")", 2);
+    	
+    	assertEquals(1, getIndex().findNames(b0, IIndex.FIND_REFERENCES).length);
+    	assertEquals(1, getIndex().findNames(b1, IIndex.FIND_REFERENCES).length);
+	}
+	
+	// // Bryan W.'s example from bugzilla#167098
+	//    template<class K>
+	//    class D { //CPPClassTemplate
+	//    public:
+	//            template<class T, class X>
+	//            D(T t, X x) {} // CPPConstructorTemplate
+	//
+	//            template<class T, class X>
+	//            void foo(T t, X x) {} // CPPMethodTemplate
+	//    };
+
+	//    void bar() {
+	//            D<int> *var = new D<int>(5, 6);
+	//            // First D<int>: CPPClassInstance
+	//            // Second D<int>: CPPConstructorInstance
+	//            // Now, getting the instance's specialized binding should
+	//            // result in a CPPConstructorTemplateSpecialization
+	//            var->foo<int,int>(7, 8);
+	//            // foo -> CPPMethodTemplateSpecialization
+	//            // foo<int,int> -> CPPMethodInstance
+	//    }
+    public void testCPPConstructorTemplateSpecialization() throws Exception {
+    	IBinding b0= getBindingFromASTName("D<int> *var", 1);
+    	IBinding b1= getBindingFromASTName("D<int> *var", 6);
+    	
+    	assertInstance(b0, ICPPClassTemplate.class); 
+    	assertInstance(b0, ICPPClassType.class); 
+    	assertInstance(b1, ICPPTemplateInstance.class);
+    	assertInstance(b1, ICPPClassType.class); 
+    	
+    	// ICPPClassType _ct= (ICPPClassType) b1;
+    	// ICPPConstructor[] _ctcs= _ct.getConstructors();
+    	// assertEquals(3, _ctcs.length); // two implicit plus the constructor template
+    	
+    	IBinding b2= getBindingFromASTName("D<int>(", 1);
+    	IBinding b3= getBindingFromASTName("D<int>(", 6);
+    	
+    	assertInstance(b2, ICPPClassTemplate.class); // *D*<int>(5, 6)
+    	assertInstance(b2, ICPPClassType.class); // *D*<int>(5, 6)
+    	assertInstance(b3, ICPPTemplateInstance.class); // *D<int>*(5, 6)
+    	assertInstance(b3, ICPPConstructor.class); // *D<int>*(5, 6)
+    	
+    	// 
+    	// ICPPClassType ct= (ICPPClassType) b2;
+    	// ICPPConstructor[] ctcs= ct.getConstructors();
+    	// assertEquals(3, ctcs.length); // two implicit plus the constructor template
+    	
+    	IBinding tidSpc= ((ICPPTemplateInstance)b3).getSpecializedBinding();
+    	assertInstance(tidSpc, ICPPConstructor.class);
+    	assertInstance(tidSpc, ICPPSpecialization.class);
+    	assertInstance(tidSpc, ICPPFunctionTemplate.class);
+    }
+	
+	// class B {};
+    //
+	//	template<typename T>
+	//	class A {
+	//	public:
+	//		T (*f)(int x);
+	//	};
+	//
+	//	template<typename T> T foo(int x) {return *new T();}
+	//	template<typename T> T foo(int x, int y) {return *new T();}
+
+	//	void qux() {
+	//		A<B> a;
+	//		a.f= foo<B>;
+	//	}
+	public void _testOverloadedFunctionTemplate() {
+		IBinding b0= getBindingFromASTName("foo<B>;", 6);
+		assertInstance(b0, ICPPFunction.class);
+		assertInstance(b0, ICPPSpecialization.class);
+	}
+	
+	//	template<typename T, template<typename U> class S>
+	//	class Foo {
+	//	public:
+	//		S<T> s;
+	//	};
+	//
+	//	template<typename Z> class X {
+	//	public:
+	//		void foo(Z z) {}
+	//	};
+	//
+	//	class A {};
+	
+	//	void qux() {
+	//		Foo<A,X> f;
+	//		f.s.foo(*new A());
+	//	}
+	public void testTemplateTemplateParameter() throws Exception {
+		IBinding b0= getBindingFromASTName("Foo<A,X>", 3);
+		IBinding b1= getBindingFromASTName("Foo<A,X>", 8);
+		IBinding b2= getBindingFromASTName("f.s.foo", 1);
+		IBinding b3= getBindingFromASTName("s.foo", 1);
+		IBinding b4= getBindingFromASTName("foo(*", 3);
+		
+		assertInstance(b0, ICPPClassTemplate.class);
+		assertInstance(b0, ICPPClassType.class);
+		ICPPTemplateParameter[] ps= ((ICPPClassTemplate)b0).getTemplateParameters();
+		assertEquals(2, ps.length);
+		assertInstance(ps[0], ICPPTemplateTypeParameter.class);
+		assertInstance(ps[1], ICPPTemplateTemplateParameter.class);
+		
+		assertInstance(b1, ICPPTemplateInstance.class);
+		assertInstance(b1, ICPPClassType.class);
+		
+		IType[] type= ((ICPPTemplateInstance)b1).getArguments();
+		assertInstance(type[0], ICPPClassType.class);
+		assertInstance(type[1], ICPPClassTemplate.class);
+		assertInstance(type[1], ICPPClassType.class);
+		
+		ObjectMap om= ((ICPPTemplateInstance)b1).getArgumentMap();
+		assertEquals(2, om.size());
+		assertInstance(om.keyAt(0), ICPPTemplateTypeParameter.class);
+		assertInstance(om.getAt(0), ICPPClassType.class);
+		assertInstance(om.keyAt(1), ICPPTemplateTemplateParameter.class);
+		assertInstance(om.getAt(1), ICPPClassType.class);
+		assertInstance(om.getAt(1), ICPPClassTemplate.class);
+		
+		IBinding b1_spcd= ((ICPPTemplateInstance)b1).getSpecializedBinding();
+		assertInstance(b1_spcd, ICPPClassTemplate.class);
+		assertInstance(b1_spcd, ICPPClassType.class);
+		assertTrue(((IType)b1_spcd).isSameType((IType)b0));
+	}
+	
+	
+	// template<typename T1, typename T2>
+	// class Foo {
+	// public:
+	//  T1* foo (T2 t) {
+	//   return 0;
+	//  }
+	// };
+	//
+	// class A {};
+	// class B {};
+	//
+	// class X : public Foo<A,B> {};
+
+	// class Y : public Foo<B,A> {};
+	//
+	// class AA {};
+	// class BB {};
+	// 
+	// class Z : public Foo<AA,BB> {};
+	//
+	// X x;
+	// Y y;
+	// Z z;
+	public void testInstanceInheritance() throws Exception {
+		IBinding[] bs= {
+				getBindingFromASTName("X x;", 1),
+				getBindingFromASTName("Y y;", 1),
+				getBindingFromASTName("Z z;", 1)
+		};
+ 
+		for (IBinding b : bs) {
+			assertInstance(b, ICPPClassType.class);
+ 			ICPPClassType c= (ICPPClassType) b;
+ 			assertEquals(1, c.getBases().length);
+ 			ICPPClassType xb= (ICPPClassType) c.getBases()[0].getBaseClass();
+ 			assertInstance(xb, ICPPTemplateInstance.class);
+ 			ICPPTemplateParameter[] templateParameters =
+ 				((ICPPTemplateInstance) xb).getTemplateDefinition().getTemplateParameters();
+ 			assertInstance(templateParameters[0], ICPPTemplateTypeParameter.class);
+ 			assertInstance(templateParameters[1], ICPPTemplateTypeParameter.class);
+ 			ICPPTemplateParameterMap args= ((ICPPTemplateInstance) xb).getTemplateParameterMap();
+ 			assertInstance(args.getArgument(0).getTypeValue(), ICPPClassType.class);
+ 			assertInstance(args.getArgument(1).getTypeValue(), ICPPClassType.class);
+ 		}
+ 	}
+
+	//  namespace ns {
+	//	template<typename T1>
+	//	struct A {
+	//	  static int a;
+	//	};
+	//	}
+	//
+	//	template<typename T2>
+	//	struct B : public ns::A<T2> {};
+
+	//	void test() {
+	//	  B<int>::a;
+	//	}
+	public void testInstanceInheritance_258745() throws Exception {
+		getBindingFromASTName("a", 1, ICPPField.class);
+	}
+
+	// class A {}; class B {}; class C {};
+	// template<typename T1, typename T2>
+	// class D {};
+	// 
+	// template<typename T3>
+	// class D<A, T3> {};
+	
+	// template<typename T3> class D<A, T3>; // harmless declaration for test purposes
+	// template<typename T3>
+	// class D<B, T3> {};
+	// template<typename T3>
+	// class D<C, T3> {};
+	public void testClassPartialSpecializations() throws Exception {
+		IBinding b0= getBindingFromASTName("D<A, T3>", 8);
+		IBinding b1= getBindingFromASTName("D<B, T3>", 8);
+		IBinding b2= getBindingFromASTName("D<C, T3>", 8);
+ 		IBinding b3= getBindingFromASTName("D<B", 1);
+ 		
+ 		List spBindings= new ArrayList();
+ 		assertInstance(b0, ICPPSpecialization.class);
+ 		assertInstance(b0, ICPPClassTemplate.class);
+ 		spBindings.add(((ICPPSpecialization)b0).getSpecializedBinding());
+ 		
+ 		assertInstance(b1, ICPPSpecialization.class);
+ 		assertInstance(b1, ICPPClassTemplate.class);
+ 		spBindings.add(((ICPPSpecialization)b1).getSpecializedBinding());
+ 		
+ 		assertInstance(b2, ICPPSpecialization.class);
+ 		assertInstance(b2, ICPPClassTemplate.class);
+ 		spBindings.add(((ICPPSpecialization)b2).getSpecializedBinding());
+ 		
+ 		for(int i=0; i<spBindings.size(); i++) {
+ 			for(int j=0; j<spBindings.size(); j++) {
+ 	 			IType ty1= (IType) spBindings.get(i);
+ 	 			IType ty2= (IType) spBindings.get(j);
+ 	 			assertTrue(ty1.isSameType(ty2));
+ 	 		}
+ 		}
+ 		
+ 		assertInstance(b3, ICPPClassTemplate.class);
+ 		ICPPClassTemplate ct= (ICPPClassTemplate) b3;
+ 		assertEquals(3, ct.getPartialSpecializations().length);
+	}
+	
+	// template<typename T1>
+	// class A {};
+	// 
+	// template<typename T2>
+	// class B : public A<T2> {
+	//    public:
+	//       static void foo() {}
+	// };
+	//
+	// B<int> bb; // make sure the instance is in the pdom
+	
+	// template<typename T3>
+	// class X : public B<T3> {};
+	//
+	// void qux() {
+	//    B<int>::foo();
+	//    B<long>::foo(); // instance not in the referenced pdom
+	//    X<int> x;
+	// }
+	public void testClassImplicitInstantiations_188274() throws Exception {
+		IBinding b2= getBindingFromASTName("X<int>", 6);
+		assertInstance(b2, ICPPClassType.class);
+		assertInstance(b2, ICPPTemplateInstance.class);
+		ICPPClassType ct2= (ICPPClassType) b2;
+		ICPPBase[] bss2= ct2.getBases();
+		assertEquals(1, bss2.length);
+		assertInstance(bss2[0].getBaseClass(), ICPPClassType.class);
+		ICPPClassType ct2b= (ICPPClassType) bss2[0].getBaseClass();
+		assertInstance(ct2b, ICPPTemplateInstance.class);
+		
+		IBinding b0= getBindingFromASTName("B<int>", 6);
+		assertInstance(b0, ICPPClassType.class);
+		ICPPClassType ct= (ICPPClassType) b0;
+		ICPPBase[] bss= ct.getBases();
+		assertEquals(1, bss.length);
+		assertInstance(bss[0].getBaseClass(), ICPPClassType.class);	
+		
+		IBinding b1= getBindingFromASTName("B<long>", 7);
+		assertInstance(b1, ICPPClassType.class);
+		ICPPClassType ct1= (ICPPClassType) b1;
+		ICPPBase[] bss1= ct1.getBases();
+		assertEquals(1, bss1.length);
+		assertInstance(bss1[0].getBaseClass(), ICPPClassType.class);
+	}
+	
+	//	class B {};
+	//
+	//	template<typename T>
+	//	class A {
+	//      T t;
+	//		T foo(T t) { return t; }
+	//      void bar(T t, int& x) {}
+	//	};
+	//
+	//	template<>
+	//	class A<B> {
+	//      B t;
+	//      int x;
+	//		B foo(B t) { B x= *new B(); return x; }
+ 	//      void bar(B t, int& x) { x++; }
+ 	//	};
+ 	
+ 	// A<B> ab;
+ 	public void testClassSpecializationMethods() throws Exception {
+ 		IBinding b0= getBindingFromASTName("A<B> ab", 4);
+ 		assertInstance(b0, ICPPClassType.class);
+ 		assertInstance(b0, ICPPSpecialization.class);
+ 		
+ 		ICPPClassType ct= (ICPPClassType) b0;
+ 		ICPPMethod[] dms= ct.getDeclaredMethods();
+ 		assertEquals(2, dms.length);
+
+ 		// if the specialization was used, we have 2 fields.
+ 		ICPPField[] fs= ct.getDeclaredFields();
+ 		assertEquals(2, fs.length);
+
+ 		ICPPMethod foo= dms[0].getName().equals("foo") ? dms[0] : dms[1];
+ 		ICPPMethod bar= dms[0].getName().equals("bar") ? dms[0] : dms[1];
+ 		
+ 		assertEquals(foo.getName(), "foo");
+ 		assertEquals(bar.getName(), "bar");
+ 		
+ 		assertInstance(foo.getType().getReturnType(), ICPPClassType.class);
+ 		assertEquals(((ICPPClassType)foo.getType().getReturnType()).getName(), "B");
+ 		assertEquals(foo.getType().getParameterTypes().length, 1);
+ 		assertInstance(foo.getType().getParameterTypes()[0], ICPPClassType.class);
+ 		assertEquals(((ICPPClassType)foo.getType().getParameterTypes()[0]).getName(), "B");
+ 		
+ 		assertInstance(bar.getType().getReturnType(), ICPPBasicType.class);
+ 		assertEquals(((ICPPBasicType)bar.getType().getReturnType()).getType(), IBasicType.t_void);
+ 	}
+ 	
+	// template<typename T> class A {
+	//    public:
+    //       typedef T TD;
+	// };
+	// 
+	// class B {};
+	// A<B>::TD foo;
+	
+	// class C {};
+	// A<C>::TD bar;
+	// 
+	// void qux() {
+	//   A<B>::TD foo2= foo;
+	//   A<C>::TD bar2= bar;
+	// }
+	public void testTypedefSpecialization() {
+		IBinding b0= getBindingFromASTName("TD foo2", 2);
+		IBinding b1= getBindingFromASTName("TD bar2", 2);
+		assertInstance(b0, ITypedef.class);
+		assertInstance(b1, ITypedef.class);
+		assertInstance(b0, ICPPSpecialization.class);
+		assertInstance(b1, ICPPSpecialization.class);
+		ObjectMap om0= ((ICPPSpecialization)b0).getArgumentMap();
+		ObjectMap om1= ((ICPPSpecialization)b1).getArgumentMap();
+		assertEquals(1, om0.size());
+		assertEquals(1, om1.size());
+		assertInstance(om0.keyAt(0), ICPPTemplateTypeParameter.class);
+		assertInstance(om0.getAt(0), ICPPClassType.class);
+		assertInstance(om1.keyAt(0), ICPPTemplateTypeParameter.class);
+		assertInstance(om1.getAt(0), ICPPClassType.class);
+		assertEquals("B", ((ICPPClassType)om0.getAt(0)).getName());
+		assertEquals("C", ((ICPPClassType)om1.getAt(0)).getName());
+	}
+
+	// template<typename T>
+	// class C {
+	// public:
+	//   typedef T value_type;
+	//   void m(value_type v) {}
+	// };
+
+	// void main() {
+	//   C<int> x;
+	//   x.m(1);
+	// }
+	public void testTypedefSpecialization_213861() throws Exception {
+		IBinding b0= getBindingFromASTName("m(1)", 1);
+		assertInstance(b0, ICPPMethod.class);
+	}
+
+	//	template<typename X>
+	//	void foo(X x) {}
+	//
+	//	template<typename A, typename B>
+	//	void foo(A a, B b) {}
+	//
+	//	class C1 {}; class C2 {}; class C3 {};
+
+	//	void bar() {
+	//		foo<C1>(*new C1());
+	//		foo<C2>(*new C2());
+	//		foo<C3>(*new C3());
+	//      foo<C1,C2>(*new C1(), *new C2());
+	//      foo<C2,C3>(*new C2(), *new C3());
+	//      foo<C3,C1>(*new C3(), *new C1());
+	//      foo<C2,C1>(*new C2(), *new C1());
+	//      foo<C3,C2>(*new C3(), *new C2());
+	//      foo<C1,C3>(*new C1(), *new C3());
+	//	}
+	public void testFunctionTemplateSpecializations() throws Exception {
+		IBinding b0= getBindingFromASTName("foo<C1>(", 3);
+		IBinding b1= getBindingFromASTName("foo<C2>(", 3);
+		IBinding b2= getBindingFromASTName("foo<C3>(", 3);
+		IBinding b3= getBindingFromASTName("foo<C1,C2>(", 3);
+		IBinding b4= getBindingFromASTName("foo<C2,C3>(", 3);
+		IBinding b5= getBindingFromASTName("foo<C3,C1>(", 3);
+		IBinding b6= getBindingFromASTName("foo<C2,C1>(", 3);
+		IBinding b7= getBindingFromASTName("foo<C3,C2>(", 3);
+		IBinding b8= getBindingFromASTName("foo<C1,C3>(", 3);
+	}
+	
+	//	class A {}; class B{}; class C {};
+	//
+	//	template<typename T1, typename T2>
+	//	void foo(T1 t1, T2 t2) {} // (0)	
+	//
+	//	template<>
+	//	void foo(C c, A a) {} // (1)
+	
+	//	void bar() {
+	//		A a;
+	//		B b;
+	//		C c;
+	//		foo(a,b); // function instance of function template (0) 
+	//		foo(c,a); // function specialization (1)
+	//	}
+	public void testFunctionInstanceSpecializationsParameters() throws Exception {
+		IBinding b0= getBindingFromASTName("foo(a,b)", 3);
+		assertInstance(b0, ICPPFunction.class);
+		assertInstance(b0, ICPPTemplateInstance.class);
+		ICPPFunctionType b0type= ((ICPPFunction)b0).getType();
+		assertInstance(b0type.getReturnType(), ICPPBasicType.class);
+		IType[] b0_ptypes= b0type.getParameterTypes();
+		assertEquals(2, b0_ptypes.length);
+		assertInstance(b0_ptypes[0], ICPPClassType.class);
+		assertInstance(b0_ptypes[1], ICPPClassType.class);
+		assertEquals("A", ((ICPPClassType)b0_ptypes[0]).getName());
+		assertEquals("B", ((ICPPClassType)b0_ptypes[1]).getName());
+		
+		IParameter[] b0_pms= ((ICPPFunction)b0).getParameters();
+		assertEquals(2, b0_pms.length);
+		assertInstance(b0_pms[0].getType(), ICPPClassType.class);
+		assertInstance(b0_pms[1].getType(), ICPPClassType.class);
+		assertEquals("A", ((ICPPClassType)b0_pms[0].getType()).getName());
+		assertEquals("B", ((ICPPClassType)b0_pms[1].getType()).getName());
+		
+		IBinding b0_spcd= ((ICPPTemplateInstance)b0).getSpecializedBinding();
+		assertInstance(b0_spcd, ICPPFunction.class);
+		assertInstance(b0_spcd, ICPPTemplateDefinition.class);
+		
+		IParameter[] b0_spcd_pms= ((ICPPFunction)b0_spcd).getParameters();
+		assertEquals(2, b0_spcd_pms.length);
+		assertInstance(b0_spcd_pms[0].getType(), ICPPTemplateTypeParameter.class);
+		assertInstance(b0_spcd_pms[1].getType(), ICPPTemplateTypeParameter.class);
+		assertEquals("T1", ((ICPPTemplateTypeParameter)b0_spcd_pms[0].getType()).getName());
+		assertEquals("T2", ((ICPPTemplateTypeParameter)b0_spcd_pms[1].getType()).getName());
+		
+		ObjectMap b0_am= ((ICPPSpecialization)b0).getArgumentMap();
+		assertEquals(2, b0_am.size());
+		assertInstance(b0_am.getAt(0), ICPPClassType.class);
+		assertInstance(b0_am.getAt(1), ICPPClassType.class);
+		assertInstance(b0_am.keyAt(0), ICPPTemplateTypeParameter.class);
+		assertInstance(b0_am.keyAt(1), ICPPTemplateTypeParameter.class);
+		assertEquals("T1", ((ICPPTemplateTypeParameter)b0_am.keyAt(0)).getName());
+		assertEquals("T2", ((ICPPTemplateTypeParameter)b0_am.keyAt(1)).getName());
+		assertEquals("A", ((ICPPClassType)b0_am.getAt(0)).getName());
+		assertEquals("B", ((ICPPClassType)b0_am.getAt(1)).getName());
+		
+		ICPPFunctionType b0_spcd_type= ((ICPPFunction)b0_spcd).getType();
+		assertInstance(b0_spcd_type.getReturnType(), ICPPBasicType.class);
+		IType[] b0_spcd_ptypes= b0_spcd_type.getParameterTypes();
+		assertEquals(2, b0_spcd_ptypes.length);
+		assertInstance(b0_spcd_ptypes[0], ICPPTemplateTypeParameter.class);
+		assertInstance(b0_spcd_ptypes[1], ICPPTemplateTypeParameter.class);
+		assertEquals("T1", ((ICPPTemplateTypeParameter)b0_spcd_ptypes[0]).getName());
+		assertEquals("T2", ((ICPPTemplateTypeParameter)b0_spcd_ptypes[1]).getName());
+		
+		IBinding b1= getBindingFromASTName("foo(c,a)", 3);
+		assertInstance(b1, ICPPFunction.class);
+		ICPPFunctionType b1type= ((ICPPFunction)b1).getType();
+		assertInstance(b1type.getReturnType(), ICPPBasicType.class);
+		IType[] b1_ptypes= b1type.getParameterTypes();
+		assertEquals(2, b1_ptypes.length);
+		assertInstance(b1_ptypes[0], ICPPClassType.class);
+		assertInstance(b1_ptypes[1], ICPPClassType.class);
+		assertEquals("C", ((ICPPClassType)b1_ptypes[0]).getName());
+		assertEquals("A", ((ICPPClassType)b1_ptypes[1]).getName());
+		
+		IParameter[] b1_pms= ((ICPPFunction)b1).getParameters();
+		assertEquals(2, b1_pms.length);
+		assertInstance(b1_pms[0].getType(), ICPPClassType.class);
+		assertInstance(b1_pms[1].getType(), ICPPClassType.class);
+		assertEquals("C", ((ICPPClassType)b1_pms[0].getType()).getName());
+		assertEquals("A", ((ICPPClassType)b1_pms[1].getType()).getName());
+		
+		assertInstance(b1, ICPPSpecialization.class);
+		ICPPSpecialization b1s= (ICPPSpecialization) b1;
+		IBinding b1_spcd= b1s.getSpecializedBinding();
+		assertInstance(b1_spcd, ICPPFunction.class);
+		assertInstance(b1_spcd, ICPPTemplateDefinition.class);
+		
+		ICPPFunctionType b1_spcd_type= ((ICPPFunction)b1_spcd).getType();
+		assertInstance(b1_spcd_type.getReturnType(), ICPPBasicType.class);
+		IType[] b1_spcd_ptypes= b1_spcd_type.getParameterTypes();
+		assertEquals(2, b1_spcd_ptypes.length);
+		assertInstance(b1_spcd_ptypes[0], ICPPTemplateTypeParameter.class);
+		assertInstance(b1_spcd_ptypes[1], ICPPTemplateTypeParameter.class);
+		assertEquals("T1", ((ICPPTemplateTypeParameter)b1_spcd_ptypes[0]).getName());
+		assertEquals("T2", ((ICPPTemplateTypeParameter)b1_spcd_ptypes[1]).getName());
+		
+		IParameter[] b1_spcd_pms= ((ICPPFunction)b1_spcd).getParameters();
+		assertEquals(2, b1_spcd_pms.length);
+		assertInstance(b1_spcd_pms[0].getType(), ICPPTemplateTypeParameter.class);
+		assertInstance(b1_spcd_pms[1].getType(), ICPPTemplateTypeParameter.class);
+		assertEquals("T1", ((ICPPTemplateTypeParameter)b1_spcd_pms[0].getType()).getName());
+		assertEquals("T2", ((ICPPTemplateTypeParameter)b1_spcd_pms[1].getType()).getName());
+		
+		ObjectMap b1_am= b1s.getArgumentMap();
+		assertEquals(2, b1_am.size());
+		assertInstance(b1_am.keyAt(0), ICPPTemplateTypeParameter.class);
+		assertInstance(b1_am.keyAt(1), ICPPTemplateTypeParameter.class);
+		assertInstance(b1_am.getAt(0), ICPPClassType.class);
+		assertInstance(b1_am.getAt(1), ICPPClassType.class);
+		assertEquals("T1", ((ICPPTemplateTypeParameter)b1_am.keyAt(0)).getName());
+		assertEquals("T2", ((ICPPTemplateTypeParameter)b1_am.keyAt(1)).getName());
+		assertEquals("C", ((ICPPClassType)b1_am.getAt(0)).getName());
+		assertEquals("A", ((ICPPClassType)b1_am.getAt(1)).getName());
+	}
+	
+	//	class A {};
+	//
+	//	template<typename T>
+	//	void foo(T t) {}
+	
+	//  void bar() {
+	//		A a;
+	//		foo(a);
+	//  }
+	public void testFunctionInstanceParameters() throws Exception {
+		IBinding b0= getBindingFromASTName("foo(a)", 3);
+		assertInstance(b0, ICPPTemplateInstance.class);
+		assertInstance(b0, ICPPFunction.class);
+		
+		ICPPFunction f= (ICPPFunction) b0;
+		ICPPFunctionType type= f.getType();
+		IType rt= type.getReturnType();
+		IType[] pts= type.getParameterTypes();
+		
+		IParameter[] ps= f.getParameters();
+		assertEquals(1, ps.length);
+		ICPPParameter param= (ICPPParameter) ps[0];
+		assertInstance(param, ICPPSpecialization.class);
+		
+		IType paramType= param.getType();
+		assertInstance(paramType, ICPPClassType.class);
+		ICPPParameter paramSpec= (ICPPParameter) ((ICPPSpecialization) param).getSpecializedBinding();
+		assertInstance(paramSpec.getType(), ICPPTemplateTypeParameter.class);
+		ICPPTemplateTypeParameter ttp= (ICPPTemplateTypeParameter) paramSpec.getType();
+		assertEquals("T", ttp.getName());
+		assertNull(ttp.getDefault());
+		
+		ICPPTemplateInstance inst= (ICPPTemplateInstance) b0;
+		IBinding sp= inst.getSpecializedBinding();
+		assertInstance(sp, ICPPFunction.class);
+		assertInstance(sp, ICPPTemplateDefinition.class);
+	}
+	
+	//	template <class T1, class T2, class R>
+	//	void func(T1* obj, R (T2::*member)()) {
+	//	}
+	//
+	//	struct A {
+	//	  void m();
+	//	};
+	
+	//	void test() {
+	//	  A a;
+	//	  func(&a, &A::m);
+	//	}
+	public void testFunctionTemplate_245030() throws Exception {
+		IBinding b0= getBindingFromASTName("func(&a, &A::m)", 4);
+		assertInstance(b0, ICPPTemplateInstance.class);
+		assertInstance(b0, ICPPFunction.class);
+	}
+
+	// template<typename T>
+	// class Foo {};
+	//
+	// class B {};
+	//
+	// template<>	
+	// class Foo<B> {};
+	
+	// Foo<B> b1; 
+	//
+	// class A {};
+	//
+	// template<>
+	// class Foo<A> {};
+	//
+	// Foo<B> b2;
+	public void testClassSpecializations_180738() {
+		IBinding b1a = getBindingFromASTName("Foo<B> b1;", 3);
+		IBinding b1b = getBindingFromASTName("Foo<B> b1;", 6);
+		
+		assertInstance(b1a, ICPPClassType.class);
+		assertInstance(b1a, ICPPClassTemplate.class);
+		
+		assertInstance(b1b, ICPPClassType.class);
+		assertInstance(b1b, ICPPSpecialization.class);
+		ICPPSpecialization b1spc= (ICPPSpecialization) b1b;
+		ObjectMap b1om= b1spc.getArgumentMap();
+		assertEquals(1, b1om.keyArray().length);
+		assertInstance(b1om.getAt(0), ICPPClassType.class);
+		ICPPClassType b1pct= (ICPPClassType) b1om.getAt(0);
+		assertEquals("B", b1pct.getName());
+		
+		IBinding b2a = getBindingFromASTName("Foo<B> b2;", 3);
+		IBinding b2b = getBindingFromASTName("Foo<B> b2;", 6);
+		
+		assertInstance(b2a, ICPPClassType.class);
+		assertInstance(b2a, ICPPClassTemplate.class);
+		
+		assertInstance(b2b, ICPPClassType.class);
+		assertInstance(b2b, ICPPSpecialization.class);
+		ICPPSpecialization b2spc= (ICPPSpecialization) b2b;
+		ObjectMap b2om= b2spc.getArgumentMap();
+		assertEquals(1, b2om.keyArray().length);
+		assertInstance(b2om.getAt(0), ICPPClassType.class);
+		ICPPClassType b2pct= (ICPPClassType) b2om.getAt(0);
+		assertEquals("B", b2pct.getName());
+	}
+	
+	// // header file
+	//	template <class T>
+	//	T left(T a, T b) {
+	//	   	return a;
+	//	}
+	//  void sanity() {}
+	//  int d;
+	
+	//  void foo() { sanity(); }
+	//	class Int {};
+	//	Int a,b;
+	//	Int c= left(a,b);
+	//  Int c= left(a,d);
+	public void testSimpleFunctionTemplate() {
+		IBinding b0 = getBindingFromASTName("sanity();", 6);
+		IBinding b1 = getBindingFromASTName("a,b;", 1);
+		IBinding b2 = getBindingFromASTName("a,b)", 1);
+		IBinding b3 = getBindingFromASTName("b)", 1);
+		IBinding b4 = getBindingFromASTName("d)", 1);
+		IBinding b5 = getBindingFromASTName("left(a,b)", 4);
+		IBinding b6 = getBindingFromASTName("left(a,b)", 4);
+	}
+	
+	// class A {};
+	// template<typename T1, typename T2> class D {};
+	// template<typename X1> class D<X1,X1> {};
+	
+	// D<A,A> daa;
+	public void testClassPartialSpecializations_199572() throws Exception {
+		IBinding b0= getBindingFromASTName("D<A,A>", 6);
+		assertInstance(b0, ICPPTemplateInstance.class);
+		assertInstance(b0, ICPPClassType.class);
+		IBinding b1= getBindingFromASTName("D<A,A>", 1);
+		assertInstance(b1, ICPPTemplateDefinition.class);
+		assertInstance(b1, ICPPClassType.class);
+	}
+
+    // template<typename _TpAllocator>
+    // class Allocator {
+    // public:
+    //   typedef _TpAllocator& alloc_reference;
+    // };
+	//
+    // template<typename _TpRebind>
+    // struct rebind {
+    //   typedef Allocator<_TpRebind> other;
+    // };
+	//
+    // template<typename _Tp, typename _Alloc = Allocator<_Tp> >
+    // class Vec {
+    // public:
+    //   typedef typename rebind<_Tp>::other::alloc_reference reference;
+    // };
+
+	// void f(Vec<int>::reference r) {}
+    public void testTemplateTypedef_214447() throws Exception {
+        IBinding b0= getBindingFromASTName("r)", 1);
+        assertInstance(b0, ICPPVariable.class);
+		IType type = ((ICPPVariable) b0).getType();
+		type = SemanticUtil.getUltimateType(type, false);
+		assertInstance(type, IBasicType.class);
+		assertEquals("int", ASTTypeUtil.getType(type));
+    }
+
+	//	class A {}; class B {}; class X {};	
+	//	template<typename T>
+	//	class C {
+	//	public:
+	//		T t;
+	//		operator B() {B b; return b;}
+	//	};
+	//	template<typename T>
+	//	class D : public C<T> {};
+	//	class E : public C<A> {};
+	//	void foo(B b) {}
+    //  template<>
+    //  class C<X> {
+    //		public:
+	//		X t;
+	//		operator B() {B b; return b;}
+    //  };
+	
+    //  class F : public C<A> {};
+	//	void refs() {
+	//		C<A> c;
+	//		foo(c);
+	//		D<A> d;
+	//		foo(d);
+	//		E e;
+	//		foo(e);
+    //      F f;
+	//		foo(f);
+    //      C<X> cx;
+    //      foo(cx);
+	//	}
+    public void testUserDefinedConversionOperator_224364() throws Exception {
+    	IBinding ca=   getBindingFromASTName("C<A>", 4);
+    	assertInstance(ca, ICPPClassType.class);
+    	assertInstance(ca, ICPPTemplateInstance.class);
+    	
+    	IBinding foo1= getBindingFromASTName("foo(c)", 3);
+    	
+    	IBinding da=   getBindingFromASTName("D<A>", 4);
+    	assertInstance(da, ICPPClassType.class);
+    	assertInstance(da, ICPPTemplateInstance.class);
+    	
+		IBinding foo2= getBindingFromASTName("foo(d)", 3);
+		IBinding foo3= getBindingFromASTName("foo(e)", 3);
+		IBinding foo4= getBindingFromASTName("foo(cx)", 3);
+		
+		assertEquals(foo1, foo2); assertEquals(foo2, foo3);
+		assertEquals(foo3, foo4);
+    }
+    
+    // template<typename T>
+    // class A {};
+    //
+    // class B {};
+    // 
+    // template<>
+    // class A<B> {};
+    
+    // class C {};
+    //
+    // A<B> ab;
+    // A<C> ac;
+    public void testEnclosingScopes_a() throws Exception {
+    	ICPPSpecialization   b0= getBindingFromASTName("A<B>", 4, ICPPSpecialization.class, ICPPClassType.class);
+    	ICPPTemplateInstance b1= getBindingFromASTName("A<C>", 4, ICPPTemplateInstance.class, ICPPClassType.class);
+    	
+    	ICPPClassType sc0= assertInstance(b0.getSpecializedBinding(), ICPPClassType.class);
+    	ICPPClassType sc1= assertInstance(b1.getSpecializedBinding(), ICPPClassType.class);
+    	assertTrue(sc0.isSameType(sc1));
+    	
+    	assertNull(sc0.getScope());
+    	assertNull(b0.getScope());
+    }
+    
+    // template<typename T>
+    // class A {
+    //    public:
+    //    class B {};
+    // };
+    //
+    // class C {}; class D {};
+    //
+    // template<>
+    // class A<C> {
+    //   public:
+    //   class B {};
+    // };
+    
+    // void refs() {
+    //    A<C>::B acb;
+    //    A<D>::B adb;
+    // }
+    public void testEnclosingScopes_b() throws Exception {
+    	ICPPClassType b0= getBindingFromASTName("B acb", 1, ICPPClassType.class);
+    	ICPPClassType b1= getBindingFromASTName("B adb", 1, ICPPClassType.class, ICPPSpecialization.class);
+    	ICPPClassType b2= getBindingFromASTName("A<C>", 4, ICPPClassType.class, ICPPSpecialization.class);
+    	
+    	ICPPClassType b3= (ICPPClassType) getIndex().findBindings("A".toCharArray(), new IndexFilter() {
+    		@Override
+    		public boolean acceptBinding(IBinding binding) throws CoreException {
+    			return !(binding instanceof ICPPSpecialization);
+    		}
+    	}, NPM)[0];
+    	
+    	ICPPClassType b4= (ICPPClassType) getIndex().findBindings(new char[][] {"A".toCharArray(), "B".toCharArray()}, new IndexFilter() {
+    		@Override
+    		public boolean acceptBinding(IBinding binding) throws CoreException {
+    			try {
+    				return !(binding.getScope() instanceof CPPClassSpecializationScope); //
+    			} catch(DOMException de) {
+    				CCorePlugin.log(de);
+    				return false;
+    			}
+    		}
+    	}, NPM)[0];
+    	
+    	assertFalse(b0 instanceof ICPPSpecialization);
+    	
+    	IIndexScope s0= (IIndexScope) b0.getScope(), s4= (IIndexScope) b4.getScope();
+    	IScope s1= b1.getScope();
+    	
+    	assertTrue(((IType)s0.getScopeBinding()).isSameType((IType)((IIndexScope)b2.getCompositeScope()).getScopeBinding()));
+    	ICPPClassScope cs1= assertInstance(s1, ICPPClassScope.class);
+    	assertInstance(cs1.getClassType(), ICPPClassType.class);
+    	assertInstance(cs1.getClassType(), ICPPTemplateInstance.class);
+    	assertTrue(((IType)s4.getScopeBinding()).isSameType( (IType) ((IIndexScope)b3.getCompositeScope()).getScopeBinding() ));
+    }
+    
+	// class A {};
+	// 
+	// template<typename T>
+	// class X {
+	// public:
+	//    class Y {
+	//    public:
+	//       class Z {};
+	//    };
+	// };
+	
+	// X<A>::Y::Z xayz;
+    public void testEnclosingScopes_c() throws Exception {
+    	ICPPClassType b0= getBindingFromASTName("Y::Z x", 1, ICPPClassType.class);
+    	ICPPClassType b1= getBindingFromASTName("Z xayz", 1, ICPPClassType.class);
+    	
+    	IScope s0= b0.getScope(), s1= b1.getScope();
+    	
+    	ICPPClassScope cs0= assertInstance(s0, ICPPClassScope.class);
+    	assertInstance(cs0.getClassType(), ICPPClassType.class);
+    	assertInstance(cs0.getClassType(), ICPPSpecialization.class);
+    	
+    	ICPPClassScope cs1= assertInstance(s1, ICPPClassScope.class);
+    	assertInstance(cs1.getClassType(), ICPPClassType.class);
+    	assertInstance(cs1.getClassType(), ICPPSpecialization.class);    	
+    }
+    
+    // class A {}; class B {};
+    //
+    // template<typename T1, typename T2>
+    // class X {};
+    //
+    // template<typename T3>
+    // class X<T3, A> {
+    // public:
+    //     class N {};
+    // };
+    
+    // X<B,A>::N n;
+    public void testEnclosingScopes_d() throws Exception {
+    	ICPPClassType b0= getBindingFromASTName("N n", 1, ICPPClassType.class, ICPPSpecialization.class);
+    	ICPPClassType b1= assertInstance(((ICPPSpecialization) b0).getSpecializedBinding(), ICPPClassType.class);
+    	
+    	ICPPClassScope s0= assertInstance(b0.getScope(), ICPPClassScope.class);
+    	assertInstance(s0.getClassType(), ICPPTemplateInstance.class);
+    	
+    	ICPPClassScope s1= assertInstance(b1.getScope(), ICPPClassScope.class);
+    	assertInstance(s1.getClassType(), ICPPTemplateDefinition.class);
+    	
+    	assertNull(s1.getClassType().getScope());
+    }
+    
+	//    typedef signed int SI;
+	//
+	//    template <SI x>
+	//    class A {};
+
+	//    const SI y= 99;
+	//    A<y> ay;
+    public void testNonTypeTemplateParameter_207840() {
+    	ICPPVariable b0= getBindingFromASTName("y>", 1, ICPPVariable.class);
+    	ICPPClassType b1= getBindingFromASTName("A<y>", 1, ICPPClassType.class, ICPPTemplateDefinition.class);
+    	ICPPTemplateInstance b2= getBindingFromASTName("A<y>", 4, ICPPTemplateInstance.class, ICPPClassType.class);
+    	ObjectMap args= b2.getArgumentMap();
+    	assertInstance(args.keyAt(0), ICPPTemplateNonTypeParameter.class);
+    	assertEquals(1, args.size());
+    }
+    
+	// template <class T> class A {                          
+	//    class B { T t; };                                  
+	//    B b;                                               
+	// };      
+    
+	// void f() {                                            
+	//    A<int> a;                                          
+	//    a.b.t;                                             
+	// }  
+	public void testNestedClassTypeSpecializations() throws Exception {
+		ICPPField t2 = getBindingFromASTName("t;", 1, ICPPField.class);
+
+		assertTrue(t2 instanceof ICPPSpecialization);
+		final IType type = t2.getType();
+		assertTrue(type instanceof IBasicType);
+		assertEquals(((IBasicType)type).getType(), IBasicType.t_int);
+	}
+	
+	//	template<typename _Iterator> struct iterator_traits {
+	//		typedef typename _Iterator::pointer           pointer;
+	//	};
+	//
+	//	template<typename _Tp> struct iterator_traits<_Tp*> {
+	//	    typedef _Tp*                        pointer;
+	//	};
+	//
+	//	template<typename _Iterator, typename _Container> class normal_iterator {
+	//	    protected:
+	//		_Iterator _M_current;
+	//	    
+	//      public:
+	//		typedef typename iterator_traits<_Iterator>::pointer   pointer;
+	//		normal_iterator() : _M_current(_Iterator()) { }
+	//
+	//		pointer operator->() const {
+	//			return _M_current;
+	//		}
+	//	};
+	//
+	//	template<typename _Tp> class allocator {
+	//		public:
+	//			typedef _Tp*       pointer;
+	//	};
+	//
+	//	template<typename _Tp, typename _Alloc = allocator<_Tp> >
+	//	class vector {
+	//		typedef vector<_Tp, _Alloc> vector_type;
+	//
+	//		public:
+	//	    typedef typename _Alloc::pointer pointer;
+	//		typedef normal_iterator<pointer, vector_type> iterator;
+	//	};
+	//
+
+	//	struct MyStruct {
+	//		int member;
+	//	};
+	//	typedef vector<MyStruct> VS1;
+	//	void test() {
+	//		VS1::iterator it;
+	//		it->member; // it->member
+	//	}
+	public void testVectorIterator() throws Exception {
+		ICPPField t2 = getBindingFromASTName("member; // it->member", 6, ICPPField.class);
+		ICPPClassType ct= t2.getClassOwner();
+		assertEquals("MyStruct", ct.getName());
+		
+		final IType type = t2.getType();
+		assertTrue(type instanceof IBasicType);
+		assertEquals(((IBasicType)type).getType(), IBasicType.t_int);
+	}
+	
+	//	template <int x>
+	//	class C {
+	//	public:
+	//		inline C() {};
+	//	};
+	//
+	//	const int _256=0x100;
+	//
+	//	typedef C<_256> aRef;
+	//
+	//	void foo(aRef& aRefence) {}
+	//	void bar(C<_256>& aRefence) {}
+	//	void baz(void) {}
+	
+	//	int main (void) {
+	//		C<256> t;
+	//		foo(t);
+	//		bar(t);
+	//		baz();
+	//	}
+	public void testClassInstanceWithNonTypeArgument_207871() throws Exception {
+		ICPPTemplateInstance c256 = getBindingFromASTName("C<256>", 6, ICPPTemplateInstance.class, ICPPClassType.class);
+		ObjectMap args= c256.getArgumentMap();
+		assertEquals(1, args.size());
+		assertInstance(args.keyAt(0), ICPPTemplateNonTypeParameter.class);
+		ICPPBasicType bt= assertInstance(args.getAt(0), ICPPBasicType.class);
+		IASTExpression val= bt.getValue();
+		
+		ICPPFunction foo = getBindingFromASTName("foo(t)", 3, ICPPFunction.class);
+		ICPPFunction bar = getBindingFromASTName("bar(t)", 3, ICPPFunction.class);
+	}
+	
+	//	template<class T, int x> class A {public: class X {};};
+	//	template<class T1> class A<T1,'y'> {public: class Y {};};
+	//	template<class T2> class A<T2,'z'> {public: class Z {};};
+	//
+	//	class B {};
+	
+	//	A<B, 'x'>::X x;
+	//	A<B, 'y'>::Y y;
+	//	A<B, 'z'>::Z z;
+	public void testNonTypeCharArgumentDisambiguation() throws Exception {
+		ICPPClassType b2= getBindingFromASTName("A<B, 'x'>", 9, ICPPClassType.class, ICPPTemplateInstance.class);
+		ICPPClassType b3= getBindingFromASTName("A<B, 'y'>", 9, ICPPClassType.class, ICPPTemplateInstance.class);
+		ICPPClassType b4= getBindingFromASTName("A<B, 'z'>", 9, ICPPClassType.class, ICPPTemplateInstance.class);
+		
+		assertTrue(!b2.isSameType(b3));
+		assertTrue(!b3.isSameType(b4));
+		assertTrue(!b4.isSameType(b2));
+		
+		ICPPClassType X= getBindingFromASTName("X x", 1, ICPPClassType.class);
+		ICPPClassType Y= getBindingFromASTName("Y y", 1, ICPPClassType.class);
+		ICPPClassType Z= getBindingFromASTName("Z z", 1, ICPPClassType.class);
+		
+		assertTrue(!X.isSameType(Y));
+		assertTrue(!Y.isSameType(Z));
+		assertTrue(!Z.isSameType(X));
+	}
+	
+	//	template<class T, bool b> class A {public: class X {};};
+	//	template<class T1> class A<T1,true> {public: class Y {};};
+	//
+	//	class B {};
+	
+	//	A<B, false>::X x; //1
+	//	A<B, true>::Y y; //2
+	//
+	//	A<B, true>::X x; //3 should be an error
+	//	A<B, false>::Y y; //4 should be an error
+	public void testNonTypeBooleanArgumentDisambiguation() throws Exception {
+		ICPPClassType X= getBindingFromASTName("X x; //1", 1, ICPPClassType.class);
+		ICPPClassType Y= getBindingFromASTName("Y y; //2", 1, ICPPClassType.class);
+		getProblemFromASTName("X x; //3", 1);
+		getProblemFromASTName("Y y; //4", 1);
+		
+		assertTrue(!X.isSameType(Y));
+	}
+	
+	// template<int x> class A {};
+	// template<> class A<5> {public: class B{};};
+	//
+	// const int FIVE= 5;
+	// const int CINQ= FIVE;
+
+	// const int FUNF= CINQ;
+	// void refs() {
+	//    A<FIVE> a5a;
+	//    A<CINQ> a5b;
+	//    A<FUNF> a5c;
+	//    A<5> a5d;
+	//    A<1> a1;
+	// }
+	public void testConstantPropagationFromHeader() throws Exception {
+		ICPPClassType a5a= getBindingFromASTName("A<FIVE>", 7, ICPPClassType.class, ICPPSpecialization.class);
+		ICPPClassType a5b= getBindingFromASTName("A<CINQ>", 7, ICPPClassType.class, ICPPSpecialization.class);
+		ICPPClassType a5c= getBindingFromASTName("A<FUNF>", 7, ICPPClassType.class, ICPPSpecialization.class);
+		ICPPClassType a5d= getBindingFromASTName("A<5>", 4, ICPPClassType.class, ICPPSpecialization.class);
+		ICPPClassType a1= getBindingFromASTName("A<1>", 4, ICPPClassType.class, ICPPTemplateInstance.class);
+		
+		assertTrue(a5a.isSameType(a5b));
+		assertTrue(a5b.isSameType(a5c));
+		assertTrue(a5c.isSameType(a5d));
+		assertTrue(a5d.isSameType(a5a));
+		
+		assertTrue(!a1.isSameType(a5a));
+		assertTrue(!a1.isSameType(a5b));
+		assertTrue(!a1.isSameType(a5c));
+		assertTrue(!a1.isSameType(a5d));
+	}
+	
+    //	template<int I>
+	//	class That {
+	//	public:
+	//		That(int x) {}
+	//	};
+	//
+	//	template<int T>
+	//	class This : public That<T> {
+	//	public:
+	//		inline This();
+	//	};
+	
+	//	template <int I>
+	//	inline This<I>::This() : That<I>(I) {
+	//  }
+	public void testParameterReferenceInChainInitializer_a() throws Exception {
+		// These intermediate assertions will not hold until deferred non-type arguments are
+		// correctly modelled
+		/*
+		ICPPClassType tid= ba.assertNonProblem("This<I>::T", 7, ICPPClassType.class);
+		assertFalse(tid instanceof ICPPSpecialization);
+		ICPPConstructor th1sCtor= ba.assertNonProblem("This() :", 4, ICPPConstructor.class);
+		assertFalse(th1sCtor instanceof ICPPSpecialization);ICPPTemplateNonTypeParameter np= ba.assertNonProblem("I)", 1, ICPPTemplateNonTypeParameter.class);
+		*/
+		
+		ICPPTemplateNonTypeParameter np= getBindingFromASTName("I>(I)", 1, ICPPTemplateNonTypeParameter.class);
+		ICPPConstructor clazz= getBindingFromASTName("That<I>(I)", 4, ICPPConstructor.class);
+		ICPPConstructor ctor= getBindingFromASTName("That<I>(I)", 7, ICPPConstructor.class);
+	}
+	
+	//	template<typename I>
+	//	class That {
+	//		public:
+	//			That() {}
+	//	};
+	//
+	//	template<typename T>
+	//	class This : public That<T> {
+	//		public:
+	//			inline This();
+	//	};
+	
+	//	template <typename I>
+	//	inline This<I>::This() : That<I>() {
+	//	}
+	public void testParameterReferenceInChainInitializer_b() throws Exception {
+		ICPPClassType tid= getBindingFromASTName("This<I>::T", 7, ICPPClassType.class);
+		assertFalse(tid instanceof ICPPSpecialization);
+		ICPPConstructor th1sCtor= getBindingFromASTName("This() :", 4, ICPPConstructor.class);
+		assertFalse(th1sCtor instanceof ICPPSpecialization);
+		
+		ICPPTemplateTypeParameter np= getBindingFromASTName("I>()", 1, ICPPTemplateTypeParameter.class);
+		ICPPConstructor clazz= getBindingFromASTName("That<I>()", 4, ICPPConstructor.class);
+		ICPPConstructor ctor= getBindingFromASTName("That<I>()", 7, ICPPConstructor.class);
+	}
+	
+	
+	// template<typename T> class CT {
+	//    public: int field;
+	// };
+	
+	// CT<int> v1;
+	public void testUniqueSpecializations_Bug241641() throws Exception {
+		ICPPVariable v1= getBindingFromASTName("v1", 2, ICPPVariable.class);
+		ICPPVariable v2= getBindingFromASTName("v1", 2, ICPPVariable.class);
+		
+		IType t1= v1.getType();
+		assertInstance(t1, ICPPClassType.class);
+		
+		ICPPClassType ct= (ICPPClassType) t1;
+		IBinding f1= ct.getCompositeScope().find("field")[0];
+		IBinding f2= ct.getCompositeScope().find("field")[0];
+		
+		assertSame(f1, f2);
+	}
+	
+	// template<typename T> class CT {
+	//    public: int field;
+	// };
+	
+	// CT<int> v1;
+	public void testUniqueInstance_Bug241641() throws Exception {
+		ICPPVariable v1= getBindingFromASTName("v1", 2, ICPPVariable.class);
+		ICPPVariable v2= getBindingFromASTName("v1", 2, ICPPVariable.class);
+		
+		IType t1= v1.getType();
+		assertInstance(t1, ICPPTemplateInstance.class);
+		
+		ICPPTemplateInstance inst= (ICPPTemplateInstance) t1;
+		final ICPPClassTemplate tmplDef = (ICPPClassTemplate) inst.getTemplateDefinition();
+		IBinding inst2= CPPTemplates.instantiate(tmplDef, inst.getTemplateArguments());
+		assertSame(inst, inst2);
+		
+		IBinding charInst1= CPPTemplates.instantiate(tmplDef, new ICPPTemplateArgument[] {new CPPTemplateArgument(new CPPBasicType(IBasicType.t_char, 0))});
+		IBinding charInst2= CPPTemplates.instantiate(tmplDef, new ICPPTemplateArgument[] {new CPPTemplateArgument(new CPPBasicType(IBasicType.t_char, 0))});
+		assertSame(charInst1, charInst2);
+	}
+	
+	//	template<typename T> class XT {
+	//     public: void method() {};
+	//  };
+	//  XT<int> x;
+	
+	//	void test() {
+	//     x.method();
+	//  }
+	public void testMethodSpecialization_Bug248927() throws Exception {
+		ICPPMethod m= getBindingFromASTName("method", 6, ICPPMethod.class);
+		assertInstance(m, ICPPSpecialization.class);
+		ICPPClassType ct= m.getClassOwner();
+		assertInstance(ct, ICPPTemplateInstance.class);
+		ICPPMethod[] ms= ct.getDeclaredMethods();
+		assertEquals(1, ms.length);
+		assertEquals(m, ms[0]);
+	}
+	
+    //	template<class T, class U> class A {};
+    //	template<class T> class A<T, int> {   
+    //	   void foo(T t);                     
+    //	};                                    
+
+	//	template<class T> void A<T, int>::foo(T t) {} 
+    public void testBug177418() throws Exception {
+		ICPPMethod m= getBindingFromASTName("foo", 3, ICPPMethod.class);
+		ICPPClassType owner= m.getClassOwner();
+		assertInstance(owner, ICPPClassTemplatePartialSpecialization.class);
+    }
+    
+    
+    // template<typename T> class XT {
+    //    int f; 
+    //    void m();
+    // };
+
+    // template<typename T> void XT<T>::m() {
+    //    m(); // 1
+    //    f; // 1
+    //    this->m(); // 2
+    //    this->f; // 2
+    // };
+    public void testUnknownBindings_Bug264988() throws Exception { 
+		ICPPMethod m= getBindingFromASTName("m(); // 1", 1, ICPPMethod.class);
+		assertFalse(m instanceof ICPPUnknownBinding);
+		m= getBindingFromASTName("m(); // 2", 1, ICPPMethod.class);
+		assertFalse(m instanceof ICPPUnknownBinding);
+		
+		ICPPField f= getBindingFromASTName("f; // 1", 1, ICPPField.class);
+		assertFalse(f instanceof ICPPUnknownBinding);
+		f= getBindingFromASTName("f; // 2", 1, ICPPField.class);
+		assertFalse(f instanceof ICPPUnknownBinding);
+    }
+    
+	// template <typename T= int> class XT;
+	
+    // #include "header.h"
+	// template <typename T> class XT {};
+	// void test() {
+	//    XT<> x;
+	// };
+	public void testDefaultTemplateArgInHeader_264988() throws Exception { 
+		ICPPTemplateInstance ti= getBindingFromASTName("XT<>", 4, ICPPTemplateInstance.class);
+	}
+	
+	// typedef int TInt;
+	// template <typename T> class XT {
+	//    void m();
+	// };
+	
+	// template<> void XT<int>::m() {
+	//    TInt t;
+	// }
+	public void testParentScopeOfSpecialization_267013() throws Exception { 
+		ITypedef ti= getBindingFromASTName("TInt", 4, ITypedef.class);
+	}
+	
+	//	template<typename T> class op {
+	//  public:
+	//		inline static int DO(T key, T key2) {
+	//			return false;
+	//	    }
+	//	};
+	//
+	//	template<typename T, int KVT_KeyCompareProc(T key, T key2)=op<T>::DO> class Noder1 {};
+
+	//	template<typename T, int KVT_KeyCompareProc(T key, T key2)=op<T>::DO> class Noder2 {};
+	//
+	//	void test() {
+	//		Noder1<int> f;
+	//		Noder2<int> g;
+	//	}
+	public void testInstantiationOfValue_284683() throws Exception { 
+		getBindingFromASTName("Noder1<int>", 11, ICPPClassSpecialization.class);
+		getBindingFromASTName("Noder2<int>", 11, ICPPClassSpecialization.class);
+	}
+	
+
+	//	template <typename> struct CT;
+	//	template <typename T> struct CT {
+	//		T f;
+	//	};
+	//	struct X {
+	//		int x;
+	//	};
+
+	//	void test() {
+	//		CT<X> p;
+	//		p.f.x; 
+	//	}
+	public void testTemplateParameterWithoutName_300978() throws Exception { 
+		getBindingFromASTName("x;", 1, ICPPField.class);
+		ICPPClassSpecialization ctx = getBindingFromASTName("CT<X>", 5, ICPPClassSpecialization.class);
+		ICPPClassTemplate ct= (ICPPClassTemplate) ctx.getSpecializedBinding();
+		assertEquals("T", ct.getTemplateParameters()[0].getName());
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCompositeTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCompositeTests.java
new file mode 100644
index 0000000..1e593ef
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCompositeTests.java
@@ -0,0 +1,475 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.index.tests;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexManager;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * Tests the behavior of the IIndex API when dealing with multiple projects
+ */
+public class IndexCompositeTests  extends BaseTestCase {
+
+	public static Test suite() {
+		return suite(IndexCompositeTests.class);
+	}
+
+	private static final int NONE = 0, REFS = IIndexManager.ADD_DEPENDENCIES;
+	private static final int REFD = IIndexManager.ADD_DEPENDENT, BOTH = REFS | REFD;
+	private static final IndexFilter FILTER= new IndexFilter() {
+		public boolean acceptBinding(IBinding binding) throws CoreException {
+			if (binding instanceof ICPPMethod) {
+				return !((ICPPMethod) binding).isImplicit();
+			}
+			return true;
+		}
+	};
+	
+	IIndex index;
+	
+	protected StringBuffer[] getContentsForTest(int blocks) throws IOException {
+		return TestSourceReader.getContentsForTest(
+				CTestPlugin.getDefault().getBundle(), "parser", getClass(), getName(), blocks);
+	}
+
+	// class A {};
+
+	// class B {};
+	public void testPairDisjointContent() throws Exception {
+		StringBuffer[] contents = getContentsForTest(2);
+		List projects = new ArrayList();
+
+		try {
+			ProjectBuilder pb = new ProjectBuilder("projB"+System.currentTimeMillis(), true);
+			pb.addFile("h1.h", contents[0]);
+			ICProject cprojB = pb.create();
+			projects.add(cprojB);
+
+			pb = new ProjectBuilder("projA"+System.currentTimeMillis(), true);
+			pb.addFile("h2.h", contents[1]).addDependency(cprojB.getProject());
+			ICProject cprojA = pb.create();
+			projects.add(cprojA);
+
+			setIndex(cprojB, NONE);	assertBCount(1, 1);
+			setIndex(cprojB, REFS);	assertBCount(1, 1);
+			setIndex(cprojB, REFD);	assertBCount(2, 2);
+			setIndex(cprojB, BOTH);	assertBCount(2, 2);
+
+			setIndex(cprojA, NONE);	assertBCount(1, 1);
+			setIndex(cprojA, REFS);	assertBCount(2, 2);
+			setIndex(cprojA, REFD);	assertBCount(1, 1);
+			setIndex(cprojA, BOTH);	assertBCount(2, 2);
+		} finally {
+			for(Iterator i = projects.iterator(); i.hasNext(); )
+				((ICProject)i.next()).getProject().delete(true, true, new NullProgressMonitor());
+		}
+	}
+
+	// class C1 {public: int i;};
+	// namespace X { class C2 {}; }
+	// enum E {E1,E2};
+	// void foo(C1 c) {}
+
+	// class B1 {};
+	// namespace X { class B2 {}; }
+	// C1 c1;
+	// X::C2 c2;
+	// void foo(B1 c) {}
+	// void foo(X::C2 c) {}
+
+	// class A1 {};
+	// void foo(X::B2 c) {}
+	// namespace X { class A2 {}; B2 b; C2 c; }
+	public void testTripleLinear() throws Exception {
+		StringBuffer[] contents = getContentsForTest(3);
+		List projects = new ArrayList();
+
+		try {
+			ProjectBuilder pb = new ProjectBuilder("projC"+System.currentTimeMillis(), true);
+			pb.addFile("h3.h", contents[0]);
+			ICProject cprojC = pb.create();
+			projects.add(cprojC);
+
+			pb = new ProjectBuilder("projB"+System.currentTimeMillis(), true);
+			pb.addFile("h2.h", contents[1]).addDependency(cprojC.getProject());
+			ICProject cprojB = pb.create();
+			projects.add(cprojB);
+
+			pb = new ProjectBuilder("projA"+System.currentTimeMillis(), true);
+			pb.addFile("h1.h", contents[2]).addDependency(cprojB.getProject());
+			ICProject cprojA = pb.create();
+			projects.add(cprojA);
+
+			/* Defines Global, Defines Namespace, References Global, References Namespace
+			 * projC: 6, 2, 0, 0
+			 * projB: 6, 1, 1, 1
+			 * projA: 3, 3, 0, 2
+			 */
+
+			setIndex(cprojC, NONE);
+			assertBCount(6, 6 +2); assertNamespaceXMemberCount(1);
+			assertFieldCount("C1", 1);
+			
+			setIndex(cprojC, REFS);
+			assertBCount(6, 6 +2);
+			assertNamespaceXMemberCount(1);
+			assertFieldCount("C1", 1);
+			
+			setIndex(cprojC, REFD);
+			assertBCount((6+(6-1)+(3-1)), (6+2)+(6+1-1)+(3+3-1));
+			assertNamespaceXMemberCount(5);
+			assertFieldCount("C1", 1);
+			
+			setIndex(cprojC, BOTH);
+			assertBCount((6+(6-1)+(3-1)), (6+2)+(6+1-1)+(3+3-1));
+			assertNamespaceXMemberCount(5);
+			assertFieldCount("C1", 1);
+
+			
+			setIndex(cprojB, NONE);
+			assertBCount(6+1, 6+1+1+1);
+			assertNamespaceXMemberCount(2);
+			assertFieldCount("C1", 1);
+			
+			setIndex(cprojB, REFS);
+			assertBCount(6+1+6-1-1, (6+1+1+1)-1-1 + (6+2) -1);
+			assertNamespaceXMemberCount(2);
+			assertFieldCount("C1", 1);
+			
+			setIndex(cprojB, REFD);
+			assertBCount(6+1+3-1, (6+1+1+1) + (3+3) -1);
+			assertNamespaceXMemberCount(5);
+			assertFieldCount("C1", 1);
+			
+			setIndex(cprojB, BOTH);
+			assertBCount((6+1)-1+3+6 -2,  (6+1+1+1)-1-1 + (3+3+2)-2 + (6+2) -2);
+			assertNamespaceXMemberCount(5);
+			assertFieldCount("C1", 1);
+
+			
+			setIndex(cprojA, NONE);
+			assertBCount(3, 8);
+			assertNamespaceXMemberCount(5);
+			// binding C1 is not referenced by cprojA
+			
+			setIndex(cprojA, REFS);
+			assertBCount(6+6+3-1-1, (6+1+1+1)-1-1 + (3+3+2)-2 + (6+2) -2);
+			assertNamespaceXMemberCount(5);
+			assertFieldCount("C1", 1);
+			
+			setIndex(cprojA, REFD);
+			assertBCount(3, 8);
+			assertNamespaceXMemberCount(5);
+			// binding C1 is not referenced by cprojA
+			
+			setIndex(cprojA, BOTH);
+			assertBCount(6+6+3-1-1, (6+1+1+1)-1-1 + (3+3+2)-2 + (6+2) -2);
+			assertNamespaceXMemberCount(5);
+			assertFieldCount("C1", 1);
+		} finally {
+			for(Iterator i = projects.iterator(); i.hasNext(); )
+				((ICProject)i.next()).getProject().delete(true, true, new NullProgressMonitor());
+		}
+	}
+
+	// class C1 {};
+	// namespace X { class C2 {}; B1 b; }
+	// enum E {E1,E2};
+	// X::B2 cb;
+	// void foo(C1 c) {}
+
+	// class B1 {};
+	// namespace X { class B2 {}; }
+	// void foo(B1 c) {}
+	// void foo(X::B2 c, B1 c) {}
+
+	// class A1 {};
+	// void foo(X::B2 c) {}
+	// namespace X { class A2 {}; }
+	// B1 ab;
+	public void testTripleUpwardV() throws Exception {
+		StringBuffer[] contents = getContentsForTest(3);
+		List projects = new ArrayList();
+
+		
+		
+		try {
+			ProjectBuilder pb = new ProjectBuilder("projB"+System.currentTimeMillis(), true);
+			pb.addFile("h2.h", contents[1]);
+			ICProject cprojB = pb.create();
+			projects.add(cprojB);
+
+			pb = new ProjectBuilder("projC"+System.currentTimeMillis(), true);
+			pb.addFile("h3.h", contents[0]).addDependency(cprojB.getProject());
+			ICProject cprojC = pb.create();
+			projects.add(cprojC);
+
+			pb = new ProjectBuilder("projB"+System.currentTimeMillis(), true);
+			pb.addFile("h1.h", contents[2]).addDependency(cprojB.getProject());
+			ICProject cprojA = pb.create();
+			projects.add(cprojA);
+
+			/*  A   C    |
+		     *   \ /     | Depends On / References
+		     *    B      V
+		     *    
+			 * Defines Global, Defines Namespace, Ext. References Global, Ext. References Namespace
+			 * projC: 7, 2, 1, 1
+			 * projB: 4, 1, 0, 0
+			 * projA: 4, 1, 1, 1
+			 */
+
+			setIndex(cprojC, NONE);
+			assertBCount(7+1, 7+2+1+1);
+			assertNamespaceXMemberCount(3);
+			setIndex(cprojC, REFS);
+			assertBCount(7+1+4-1-1, 7+1+1+2+4+1-1-2);
+			assertNamespaceXMemberCount(3);
+			setIndex(cprojC, REFD);
+			assertBCount(7+1, 7+1+1+2);
+			assertNamespaceXMemberCount(3);
+			setIndex(cprojC, BOTH);
+			assertBCount(7+4+4-2, 7+4+4-2 +2+1+1);
+			assertNamespaceXMemberCount(4);
+
+			setIndex(cprojB, NONE);
+			assertBCount(4, 4+1);
+			assertNamespaceXMemberCount(1);
+			setIndex(cprojB, REFS);
+			assertBCount(4, 4+1);
+			assertNamespaceXMemberCount(1);
+			setIndex(cprojB, REFD);
+			assertBCount(7+4+4-2, 7+4+4-2 +2+1+1);
+			assertNamespaceXMemberCount(4);
+			setIndex(cprojB, BOTH);
+			assertBCount(7+4+4-2, 7+4+4-2 +2+1+1);
+			assertNamespaceXMemberCount(4);
+
+			setIndex(cprojA, NONE);
+			assertBCount(4+1, 4+1+1+1);
+			assertNamespaceXMemberCount(2);
+			setIndex(cprojA, REFS);
+			assertBCount(4+1+4-1-1, 4+1+4-1-1 +1+1);
+			assertNamespaceXMemberCount(2);
+			setIndex(cprojA, REFD);
+			assertBCount(4+1, 4+1+1+1);
+			assertNamespaceXMemberCount(2);
+			setIndex(cprojA, BOTH);
+			assertBCount(7+4+4-2, 7+4+4-2 +2+1+1);
+			assertNamespaceXMemberCount(4);
+		} finally {
+			for(Iterator i = projects.iterator(); i.hasNext(); )
+				((ICProject)i.next()).getProject().delete(true, true, new NullProgressMonitor());
+		}
+	}
+
+	// class C1 {};
+	// namespace X { class C2 {}; }
+	// enum E {E1,E2};
+	// void foo(C1 c) {}
+
+	// class B1 {};
+	// namespace X { class B2 {}; C1 c; }
+	// void foo(A1 c) {}
+	// void foo(X::A2 c, B1 c) {}
+
+	// class A1 {};
+	// void foo(A1 a, A1 b) {}
+	// namespace X { class A2 {}; }
+	public void testTripleDownwardV() throws Exception {
+		StringBuffer[] contents = getContentsForTest(3);
+		List projects = new ArrayList();
+
+		try {
+			ProjectBuilder pb = new ProjectBuilder("projC"+System.currentTimeMillis(), true);
+			pb.addFile("h3.h", contents[0]);
+			ICProject cprojC = pb.create();
+			projects.add(cprojC);
+
+			pb = new ProjectBuilder("projA"+System.currentTimeMillis(), true);
+			pb.addFile("h1.h", contents[2]);
+			ICProject cprojA = pb.create();
+			projects.add(cprojA);
+
+			pb = new ProjectBuilder("projB"+System.currentTimeMillis(), true);
+			pb.addFile("h2.h", contents[1]).addDependency(cprojC.getProject()).addDependency(cprojA.getProject());
+			ICProject cprojB = pb.create();
+			projects.add(cprojB);
+
+			/*    B     |
+		     *   / \    | Depends On / References
+		     *  A   C   V
+		     *    
+			 *  Defines Global, Defines Namespace, References Global, References Namespace
+			 * projC: 6, 1, 0, 0
+			 * projB: 4, 2, 2, 1
+			 * projA: 3, 1, 0, 0
+			 */
+
+			setIndex(cprojC, NONE);
+			assertBCount(6, 6+1);
+			assertNamespaceXMemberCount(1);
+			setIndex(cprojC, REFS);
+			assertBCount(6, 6+1);
+			assertNamespaceXMemberCount(1);
+			setIndex(cprojC, REFD);
+			assertBCount(6+4+1-1, 6+4+1-1 +1+1+1+1 );
+			assertNamespaceXMemberCount(4);
+			setIndex(cprojC, BOTH);
+			assertBCount(6+4+3-2, 6+4+3-2 +1+2+1);
+			assertNamespaceXMemberCount(4);
+
+			setIndex(cprojB, NONE);
+			assertBCount(4+2, 4+2 +2+1);
+			assertNamespaceXMemberCount(4);
+			setIndex(cprojB, REFS);
+			assertBCount(6+4+3-2, 6+4+3-2 +1+2+1);
+			assertNamespaceXMemberCount(4);
+			setIndex(cprojB, REFD);
+			assertBCount(4+2, 4+2 +2+1);
+			assertNamespaceXMemberCount(4);
+			setIndex(cprojB, BOTH);
+			assertBCount(6+4+3-2, 6+4+3-2 +1+2+1);
+			assertNamespaceXMemberCount(4);
+
+			setIndex(cprojA, NONE);
+			assertBCount(3, 3 +1);
+			assertNamespaceXMemberCount(1);
+			setIndex(cprojA, REFS);
+			assertBCount(3, 3 +1);
+			assertNamespaceXMemberCount(1);
+			setIndex(cprojA, REFD);
+			assertBCount(4+2+3-1-1, 4+2+3-1-1 +2+1 );
+			assertNamespaceXMemberCount(4);
+			setIndex(cprojA, BOTH);
+			assertBCount(6+4+3-2, 6+4+3-2 +1+2+1);
+			assertNamespaceXMemberCount(4);
+		} finally {
+			for(Iterator i = projects.iterator(); i.hasNext(); )
+				((ICProject)i.next()).getProject().delete(true, true, new NullProgressMonitor());
+		}
+	}
+	
+	/**
+	 * Asserts binding counts, and returns the index tested against
+	 * @param cprojA the project to obtain the index for
+	 * @param options the options to obtain the index for
+	 * @param global the number of bindings expected to be found at global scope
+	 * @param all the number of bindings expected to be found at all scopes
+	 * @return
+	 * @throws CoreException
+	 */
+	private IIndex assertBCount(int global, int all) throws CoreException {
+		IBinding[] bindings = index.findBindings(Pattern.compile(".*"), true, FILTER, new NullProgressMonitor());
+		assertEquals(global, bindings.length);
+		bindings = index.findBindings(Pattern.compile(".*"), false, FILTER, new NullProgressMonitor());
+		assertEquals(all, bindings.length);
+		return index;
+	}
+	
+	private void assertNamespaceXMemberCount(int count) throws CoreException, DOMException {
+		IBinding[] bindings = index.findBindings(Pattern.compile("X"), true, FILTER, new NullProgressMonitor());
+		assertEquals(1, bindings.length);
+		assertEquals(count, ((ICPPNamespace)bindings[0]).getMemberBindings().length);
+	}
+	
+	private void assertFieldCount(String qnPattern, int count) throws CoreException, DOMException {
+		IBinding[] bindings = index.findBindings(Pattern.compile(qnPattern), true, FILTER, new NullProgressMonitor());
+		assertEquals(1, bindings.length);
+		assertEquals(count, ((ICompositeType)bindings[0]).getFields().length);
+	}
+	
+	private void setIndex(ICProject project, int options) throws CoreException, InterruptedException {
+		if(index!=null) {
+			index.releaseReadLock();
+		}
+		index = CCorePlugin.getIndexManager().getIndex(project, options);
+		index.acquireReadLock();
+	}
+	
+	protected void tearDown() throws Exception {
+		if(index!=null) {
+			index.releaseReadLock();
+		}
+		super.tearDown();
+	}
+}
+
+/*
+ * Convenience class for setting up projects.
+ */
+class ProjectBuilder {
+	private String name;
+	private List dependencies = new ArrayList();
+	private Map path2content = new HashMap();
+	private boolean cpp;
+
+	ProjectBuilder(String name, boolean cpp) {
+		this.name = name;
+		this.cpp = cpp;
+	}
+
+	ProjectBuilder addDependency(IProject project) {
+		dependencies.add(project);
+		return this;
+	}
+
+	ProjectBuilder addFile(String relativePath, StringBuffer content) {
+		path2content.put(relativePath, content.toString());
+		return this;
+	}
+
+	ICProject create() throws CoreException {
+		ICProject result = cpp ? CProjectHelper.createCCProject(name, "bin", IPDOMManager.ID_NO_INDEXER)
+				: CProjectHelper.createCCProject(name, "bin", IPDOMManager.ID_NO_INDEXER);
+
+		for(Iterator i = path2content.entrySet().iterator(); i.hasNext(); ) {
+			Map.Entry entry = (Map.Entry) i.next();
+			TestSourceReader.createFile(result.getProject(), new Path((String)entry.getKey()), (String) entry.getValue());
+		}
+
+		IProjectDescription desc = result.getProject().getDescription();
+		desc.setReferencedProjects( (IProject[]) dependencies.toArray(new IProject[dependencies.size()]) );
+		result.getProject().setDescription(desc, new NullProgressMonitor());
+
+		CCorePlugin.getIndexManager().setIndexerId(result, IPDOMManager.ID_FAST_INDEXER);
+		CCorePlugin.getIndexManager().joinIndexer(4000, new NullProgressMonitor());
+		return result;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexIncludeTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexIncludeTest.java
new file mode 100644
index 0000000..453be8a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexIncludeTest.java
@@ -0,0 +1,625 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.internal.index.tests;
+
+import java.io.ByteArrayInputStream;
+import java.util.regex.Pattern;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ILinkage;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexBinding;
+import org.eclipse.cdt.core.index.IIndexFile;
+import org.eclipse.cdt.core.index.IIndexInclude;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.index.IndexLocationFactory;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IPathEntry;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.TestScannerProvider;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class IndexIncludeTest extends IndexTestBase {
+
+	public static TestSuite suite() {
+		TestSuite suite= suite(IndexIncludeTest.class, "_");
+		suite.addTest(new IndexIncludeTest("deleteProject"));
+		return suite;
+	}
+
+	private ICProject fProject= null;
+	private IIndex fIndex= null;
+	
+	public IndexIncludeTest(String name) {
+		super(name);
+	}
+
+	@Override
+	public void setUp() throws Exception {
+		super.setUp();
+		if (fProject == null) {
+			fProject= createProject(true, "resources/indexTests/includes");
+			IPathEntry[] entries= new IPathEntry[] {
+					CoreModel.newIncludeEntry(fProject.getPath(),
+							null, fProject.getResource().getLocation())};
+			fProject.setRawPathEntries(entries, NPM);
+		}
+		fIndex= CCorePlugin.getIndexManager().getIndex(fProject);
+	}
+	
+	@Override
+	public void tearDown() throws Exception {
+		super.tearDown();
+	}
+		
+	public void deleteProject() {
+		if (fProject != null) {
+			CProjectHelper.delete(fProject);
+		}
+	}
+	
+	public void testFastIndexer() throws Exception {
+		CCorePlugin.getIndexManager().setIndexerId(fProject, IPDOMManager.ID_FAST_INDEXER);
+		IndexerPreferences.set(fProject.getProject(), IndexerPreferences.KEY_INDEX_UNUSED_HEADERS_WITH_DEFAULT_LANG, "false");
+		waitForIndexer();
+		checkHeader(false);
+
+		IndexerPreferences.set(fProject.getProject(), IndexerPreferences.KEY_INDEX_UNUSED_HEADERS_WITH_DEFAULT_LANG, "true");
+		waitForIndexer();
+		checkHeader(true);
+		
+		checkContext();
+	}
+
+	private void waitForIndexer() {
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(10000, NPM));
+	}
+
+	public void testFullIndexer() throws Exception {
+		CCorePlugin.getIndexManager().setIndexerId(fProject, IPDOMManager.ID_FULL_INDEXER);
+		IndexerPreferences.set(fProject.getProject(), IndexerPreferences.KEY_INDEX_UNUSED_HEADERS_WITH_DEFAULT_LANG, "false");
+		waitForIndexer();
+		checkHeader(false);
+
+		IndexerPreferences.set(fProject.getProject(), IndexerPreferences.KEY_INDEX_UNUSED_HEADERS_WITH_DEFAULT_LANG, "true");
+		waitForIndexer();
+		checkHeader(true);
+		
+		checkContext();
+	}
+
+	private void checkHeader(boolean all) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] result= fIndex.findBindings(Pattern.compile(".*included"), true, IndexFilter.ALL, NPM);
+			assertEquals(all ? 2 : 1, result.length);
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	private void checkContext() throws Exception {
+		final long timestamp= System.currentTimeMillis();
+		final IFile file= (IFile) fProject.getProject().findMember(new Path("included.h"));
+		assertNotNull("Can't find included.h", file);
+		waitForIndexer();
+		
+		ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+			public void run(IProgressMonitor monitor) throws CoreException {
+				file.setContents(new ByteArrayInputStream( "int included; int CONTEXT;\n".getBytes()), false, false, NPM);
+				file.setLocalTimeStamp(timestamp+1000); 
+			}
+		}, NPM);
+		assertTrue("Timestamp was not increased", file.getLocalTimeStamp() >= timestamp);
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, 4000);
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+			assertNotNull("Can't find " + file.getLocation(), ifile);
+			assertTrue("timestamp not ok", ifile.getTimestamp() >= timestamp);
+
+			IIndexBinding[] result= fIndex.findBindings(Pattern.compile("testInclude_cpp"), true, IndexFilter.ALL, NPM);
+			assertEquals(1, result.length);
+
+			result= fIndex.findBindings("testInclude_cpp".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, result.length);
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}			
+
+	// {source20061107}
+	// #include "user20061107.h"
+	// #include <system20061107.h>
+	public void testIncludeProperties() throws Exception {
+		waitForIndexer();
+		TestScannerProvider.sIncludes= new String[]{fProject.getProject().getLocation().toOSString()};
+		String content= readTaggedComment("source20061107");
+		TestSourceReader.createFile(fProject.getProject(), "user20061107.h", "");
+		TestSourceReader.createFile(fProject.getProject(), "system20061107.h", "");
+		IFile file= TestSourceReader.createFile(fProject.getProject(), "source20061107.cpp", content);
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, 4000);
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= ifile.getIncludes();
+			assertEquals(2, includes.length);
+
+			checkInclude(includes[0], content, "user20061107.h", false);
+			checkInclude(includes[1], content, "system20061107.h", true);
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	public void testIncludeProperties_2() throws Exception {
+		TestScannerProvider.sIncludes= new String[]{fProject.getProject().getLocation().toOSString()};
+		TestSourceReader.createFile(fProject.getProject(), "header20061107.h", "");
+		String content = "// comment \n#include \"header20061107.h\"\n";
+		IFile file= TestSourceReader.createFile(fProject.getProject(), "intermed20061107.h", content);
+		TestSourceReader.createFile(fProject.getProject(), "source20061107.cpp", "#include \"intermed20061107.h\"\n");
+		CCorePlugin.getIndexManager().reindex(fProject);
+		waitForIndexer();
+
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= ifile.getIncludes();
+			assertEquals(1, includes.length);
+
+			checkInclude(includes[0], content, "header20061107.h", false);
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	public void testInactiveInclude() throws Exception {
+		TestScannerProvider.sIncludes= new String[]{fProject.getProject().getLocation().toOSString()};
+		String content = "#if 0\n#include \"inactive20070213.h\"\n#endif\n";
+		IFile file= TestSourceReader.createFile(fProject.getProject(), "source20070213.cpp", content);
+		CCorePlugin.getIndexManager().reindex(fProject);
+		waitForIndexer();
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= ifile.getIncludes();
+			assertEquals(1, includes.length);
+
+			assertFalse(includes[0].isActive());
+			checkInclude(includes[0], content, "inactive20070213.h", false);
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	public void testUnresolvedInclude() throws Exception {
+		TestScannerProvider.sIncludes= new String[]{fProject.getProject().getLocation().toOSString()};
+		String content = "#include \"unresolved20070213.h\"\n";
+		IFile file= TestSourceReader.createFile(fProject.getProject(), "source20070214.cpp", content);
+		CCorePlugin.getIndexManager().reindex(fProject);
+		waitForIndexer();
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= ifile.getIncludes();
+			assertEquals(1, includes.length);
+
+			assertTrue(includes[0].isActive());
+			assertFalse(includes[0].isResolved());
+			checkInclude(includes[0], content, "unresolved20070213.h", false);
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	private void checkInclude(IIndexInclude include, String content, String includeName, boolean isSystem) throws CoreException {
+		int offset= content.indexOf(includeName);
+		assertEquals(offset, include.getNameOffset());
+		assertEquals(includeName.length(), include.getNameLength());
+		assertEquals(isSystem, include.isSystemInclude());
+	}	
+
+	public void testUpdateOfIncluded() throws Exception {
+		String content1 = "int CONTEXT_20070404(x);\n";
+		String content2 = "int CONTEXT_20070404(y);\n";
+		String content3 = "#define CONTEXT_20070404(x) ctx_20070404##x\n #include \"included_20070404.h\"\n int source_20070404;\n";
+		TestSourceReader.createFile(fProject.getProject(), "included_20070404.h", content1);
+		TestSourceReader.createFile(fProject.getProject(), "notIncluded_20070404.h", "int notIncluded_20070404\n;");
+		TestSourceReader.createFile(fProject.getProject(), "includer_20070404.cpp", content3);
+		IndexerPreferences.set(fProject.getProject(), IndexerPreferences.KEY_INDEX_UNUSED_HEADERS_WITH_DEFAULT_LANG, "false");
+		CCorePlugin.getIndexManager().reindex(fProject);
+		waitForIndexer();
+
+		fIndex.acquireReadLock();
+		try {
+			assertEquals(0, fIndex.findBindings("notIncluded_20070404".toCharArray(), IndexFilter.ALL, NPM).length);
+			assertEquals(1, fIndex.findBindings("source_20070404".toCharArray(), IndexFilter.ALL, NPM).length);
+			IBinding[] bindings= fIndex.findBindings("ctx_20070404x".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			assertTrue(bindings[0] instanceof IVariable);
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+		
+		Thread.sleep(1000);
+		// now change the header and see whether it gets parsed
+		TestSourceReader.createFile(fProject.getProject(), "included_20070404.h", content2);
+		TestSourceReader.createFile(fProject.getProject(), "notIncluded_20070404.h", "int notIncluded_20070404\n;");
+		Thread.sleep(1000);
+		waitForIndexer();
+
+		fIndex.acquireReadLock();
+		try {
+			assertEquals(0, fIndex.findBindings("notIncluded_20070404".toCharArray(), IndexFilter.ALL, NPM).length);
+			IBinding[] bindings= fIndex.findBindings("ctx_20070404y".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			assertTrue(bindings[0] instanceof IVariable);
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+		
+	}
+	
+	// #define SOME_MACRO1 ok_1_220358
+	// #define SOME_MACRO2 ok_2_220358
+	
+	// int SOME_MACRO1;
+	
+	// int SOME_MACRO2;
+
+	// #include "header1.h"
+	// #include "header2.h"
+	public void testParsingInContext_bug220358() throws Exception {
+		StringBuffer[] sources= getContentsForTest(4);
+		IFile h1= TestSourceReader.createFile(fProject.getProject(), "header1.h", sources[0].toString());
+		IFile h2= TestSourceReader.createFile(fProject.getProject(), "header2.h", sources[1].toString());
+		IFile s1= TestSourceReader.createFile(fProject.getProject(), "s1.cpp", sources[3].toString());
+		// make sure it is parsed in context
+		waitForIndexer();
+		CCorePlugin.getIndexManager().reindex(fProject);
+		waitForIndexer();
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] binding= fIndex.findBindings("ok_1_220358".toCharArray(), IndexFilter.ALL_DECLARED, NPM);
+			assertEquals(1, binding.length);
+			assertTrue(binding[0] instanceof IVariable);
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+		
+		// change header2:
+		h2= TestSourceReader.createFile(fProject.getProject(), "header2.h", sources[2].toString());
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, h2, INDEXER_WAIT_TIME);
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] binding= fIndex.findBindings("ok_2_220358".toCharArray(), IndexFilter.ALL_DECLARED, NPM);
+			assertEquals(1, binding.length);
+			assertTrue(binding[0] instanceof IVariable);
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}		
+	}
+	
+	
+	// #include "resolved20070426.h"
+	public void testFixedContext() throws Exception {
+		TestScannerProvider.sIncludes= new String[]{fProject.getProject().getLocation().toOSString()};
+		String source= getContentsForTest(1)[0].toString();
+		IFile header= TestSourceReader.createFile(fProject.getProject(), "resolved20070426.h", "");
+		IFile s1= TestSourceReader.createFile(fProject.getProject(), "s1.cpp", source);
+		// make sure it is parsed in context
+		waitForIndexer();
+		CCorePlugin.getIndexManager().reindex(fProject);
+		waitForIndexer();
+
+		IFile s2= TestSourceReader.createFile(fProject.getProject(), "s2.cpp", source);
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, s2, INDEXER_WAIT_TIME);
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(header));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= fIndex.findIncludedBy(ifile);
+			assertEquals(2, includes.length);
+			
+			IIndexInclude context= ifile.getParsedInContext();
+			assertNotNull(context);
+			assertEquals(s1.getFullPath().toString(), context.getIncludedByLocation().getFullPath());
+
+			assertEquals(s1.getFullPath().toString(), includes[0].getIncludedByLocation().getFullPath());
+			assertEquals(s2.getFullPath().toString(), includes[1].getIncludedByLocation().getFullPath());
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+		
+		s1= TestSourceReader.createFile(fProject.getProject(), "s1.cpp", source + "\nint a20070426;");
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, s1, INDEXER_WAIT_TIME);
+		fIndex.acquireReadLock();
+		try {
+			assertEquals(1, fIndex.findBindings("a20070426".toCharArray(), IndexFilter.ALL_DECLARED, NPM).length);
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(header));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= fIndex.findIncludedBy(ifile);
+			assertEquals(2, includes.length);
+			assertEquals(s1.getFullPath().toString(), includes[0].getIncludedByLocation().getFullPath());
+			assertEquals(s2.getFullPath().toString(), includes[1].getIncludedByLocation().getFullPath());
+			IIndexInclude context= ifile.getParsedInContext();
+			assertNotNull(context);
+			assertEquals(s1.getFullPath().toString(), context.getIncludedByLocation().getFullPath());
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+
+		s2= TestSourceReader.createFile(fProject.getProject(), "s2.cpp", source + "\nint b20070426;");
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, s1, INDEXER_WAIT_TIME);
+		fIndex.acquireReadLock();
+		try {
+			assertEquals(1, fIndex.findBindings("b20070426".toCharArray(), IndexFilter.ALL_DECLARED, NPM).length);
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(header));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= fIndex.findIncludedBy(ifile);
+			assertEquals(2, includes.length);
+			assertEquals(s1.getFullPath().toString(), includes[0].getIncludedByLocation().getFullPath());
+			assertEquals(s2.getFullPath().toString(), includes[1].getIncludedByLocation().getFullPath());
+			IIndexInclude context= ifile.getParsedInContext();
+			assertNotNull(context);
+			assertEquals(s1.getFullPath().toString(), context.getIncludedByLocation().getFullPath());
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	// #include "resolved20070427.h"
+	// #include "unesolved20070427.h"
+	// #if 0
+	// #include "inactive20070427.h"
+	// #endif
+
+	// #include <unesolved20070427.h>
+	// #if 0
+	// #include <inactive20070427.h>
+	// #endif
+
+	// #include <resolved20070427.h>
+	// #if 0
+	// #include <inactive20070427.h>
+	// #endif
+
+	// #include "resolved20070427.h"
+	// #include "unesolved20070427.h"
+	public void testUpdateIncludes() throws Exception {
+		waitForIndexer();
+		TestScannerProvider.sIncludes= new String[]{fProject.getProject().getLocation().toOSString()};
+		StringBuffer[] source= getContentsForTest(4);
+		IFile header= TestSourceReader.createFile(fProject.getProject(), "resolved20070427.h", "");
+		IFile s1= TestSourceReader.createFile(fProject.getProject(), "s20070427.cpp", 
+				source[0].toString() + "\nint a20070427;");
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, s1, INDEXER_WAIT_TIME);
+		standardCheckUpdateIncludes(header, s1, "a20070427");
+		
+		s1= TestSourceReader.createFile(fProject.getProject(), "s20070427.cpp", 
+				source[0].toString() + "\nint b20070427;");
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, s1, INDEXER_WAIT_TIME);
+		standardCheckUpdateIncludes(header, s1, "b20070427");
+
+		s1= TestSourceReader.createFile(fProject.getProject(), "s20070427.cpp", 
+				source[1].toString() + "\nint c20070427;");
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, s1, INDEXER_WAIT_TIME);
+		checkUpdateIncludes1(header, s1, "c20070427");
+
+		s1= TestSourceReader.createFile(fProject.getProject(), "s20070427.cpp", 
+				source[0].toString() + "\nint d20070427;");
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, s1, INDEXER_WAIT_TIME);
+		standardCheckUpdateIncludes(header, s1, "d20070427");
+
+		s1= TestSourceReader.createFile(fProject.getProject(), "s20070427.cpp", 
+				source[2].toString() + "\nint e20070427;");
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, s1, INDEXER_WAIT_TIME);
+		checkUpdateIncludes2(header, s1, "e20070427");
+
+		s1= TestSourceReader.createFile(fProject.getProject(), "s20070427.cpp", 
+				source[0].toString() + "\nint f20070427;");
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, s1, INDEXER_WAIT_TIME);
+		standardCheckUpdateIncludes(header, s1, "f20070427");
+
+		s1= TestSourceReader.createFile(fProject.getProject(), "s20070427.cpp", 
+				source[3].toString() + "\nint g20070427;");
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, s1, INDEXER_WAIT_TIME);
+		checkUpdateIncludes3(header, s1, "g20070427");
+
+		s1= TestSourceReader.createFile(fProject.getProject(), "s20070427.cpp", 
+				source[0].toString() + "\nint h20070427;");
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, s1, INDEXER_WAIT_TIME);
+		standardCheckUpdateIncludes(header, s1, "h20070427");
+
+	}
+
+	private void standardCheckUpdateIncludes(IFile header, IFile s1, String tag) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			assertEquals(1, fIndex.findBindings(tag.toCharArray(), IndexFilter.ALL_DECLARED, NPM).length);
+
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(header));
+			IIndexFile sfile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(s1));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= fIndex.findIncludedBy(ifile);
+			assertEquals(1, includes.length);
+			assertEquals(s1.getFullPath().toString(), includes[0].getIncludedByLocation().getFullPath());
+			assertEquals(header.getFullPath().toString(), includes[0].getIncludesLocation().getFullPath());
+			assertTrue(includes[0].isActive());
+			assertTrue(includes[0].isResolved());
+			assertFalse(includes[0].isSystemInclude());
+
+			assertNotNull(sfile);
+			includes= fIndex.findIncludes(sfile);
+			assertEquals(3, includes.length);
+			assertEquals(header.getFullPath().toString(), includes[0].getIncludesLocation().getFullPath());
+			assertEquals(s1.getFullPath().toString(), includes[0].getIncludedByLocation().getFullPath());
+			assertTrue(includes[0].isActive());
+			assertTrue(includes[0].isResolved());
+			assertFalse(includes[0].isSystemInclude());
+
+			assertNull(includes[1].getIncludesLocation());
+			assertEquals(s1.getFullPath().toString(), includes[1].getIncludedByLocation().getFullPath());
+			assertTrue(includes[1].isActive());
+			assertFalse(includes[1].isResolved());
+			assertFalse(includes[1].isSystemInclude());
+
+			assertNull(includes[2].getIncludesLocation());
+			assertEquals(s1.getFullPath().toString(), includes[2].getIncludedByLocation().getFullPath());
+			assertFalse(includes[2].isActive());
+			assertFalse(includes[2].isResolved());
+			assertFalse(includes[2].isSystemInclude());
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}	
+
+	private void checkUpdateIncludes1(IFile header, IFile s1, String tag) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			assertEquals(1, fIndex.findBindings(tag.toCharArray(), IndexFilter.ALL_DECLARED, NPM).length);
+
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(header));
+			IIndexFile sfile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(s1));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= fIndex.findIncludedBy(ifile);
+			assertEquals(0, includes.length);
+
+			assertNotNull(sfile);
+			includes= fIndex.findIncludes(sfile);
+			assertEquals(2, includes.length);
+
+			assertNull(includes[0].getIncludesLocation());
+			assertEquals(s1.getFullPath().toString(), includes[0].getIncludedByLocation().getFullPath());
+			assertTrue(includes[0].isActive());
+			assertFalse(includes[0].isResolved());
+			assertTrue(includes[0].isSystemInclude());
+
+			assertNull(includes[1].getIncludesLocation());
+			assertEquals(s1.getFullPath().toString(), includes[1].getIncludedByLocation().getFullPath());
+			assertFalse(includes[1].isActive());
+			assertFalse(includes[1].isResolved());
+			assertTrue(includes[1].isSystemInclude());
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}	
+
+	private void checkUpdateIncludes2(IFile header, IFile s1, String tag) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			assertEquals(1, fIndex.findBindings(tag.toCharArray(), IndexFilter.ALL_DECLARED, NPM).length);
+
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(header));
+			IIndexFile sfile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(s1));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= fIndex.findIncludedBy(ifile);
+			assertEquals(1, includes.length);
+			assertEquals(s1.getFullPath().toString(), includes[0].getIncludedByLocation().getFullPath());
+			assertEquals(header.getFullPath().toString(), includes[0].getIncludesLocation().getFullPath());
+			assertTrue(includes[0].isActive());
+			assertTrue(includes[0].isResolved());
+			assertTrue(includes[0].isSystemInclude());
+
+			assertNotNull(sfile);
+			includes= fIndex.findIncludes(sfile);
+			assertEquals(2, includes.length);
+			assertEquals(header.getFullPath().toString(), includes[0].getIncludesLocation().getFullPath());
+			assertEquals(s1.getFullPath().toString(), includes[0].getIncludedByLocation().getFullPath());
+			assertTrue(includes[0].isActive());
+			assertTrue(includes[0].isResolved());
+			assertTrue(includes[0].isSystemInclude());
+
+			assertNull(includes[1].getIncludesLocation());
+			assertEquals(s1.getFullPath().toString(), includes[1].getIncludedByLocation().getFullPath());
+			assertFalse(includes[1].isActive());
+			assertFalse(includes[1].isResolved());
+			assertTrue(includes[1].isSystemInclude());
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}	
+
+	private void checkUpdateIncludes3(IFile header, IFile s1, String tag) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			assertEquals(1, fIndex.findBindings(tag.toCharArray(), IndexFilter.ALL_DECLARED, NPM).length);
+
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(header));
+			IIndexFile sfile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(s1));
+			assertNotNull(ifile);
+			IIndexInclude[] includes= fIndex.findIncludedBy(ifile);
+			assertEquals(1, includes.length);
+			assertEquals(s1.getFullPath().toString(), includes[0].getIncludedByLocation().getFullPath());
+			assertEquals(header.getFullPath().toString(), includes[0].getIncludesLocation().getFullPath());
+			assertTrue(includes[0].isActive());
+			assertTrue(includes[0].isResolved());
+			assertFalse(includes[0].isSystemInclude());
+
+			assertNotNull(sfile);
+			includes= fIndex.findIncludes(sfile);
+			assertEquals(2, includes.length);
+			assertEquals(header.getFullPath().toString(), includes[0].getIncludesLocation().getFullPath());
+			assertEquals(s1.getFullPath().toString(), includes[0].getIncludedByLocation().getFullPath());
+			assertTrue(includes[0].isActive());
+			assertTrue(includes[0].isResolved());
+			assertFalse(includes[0].isSystemInclude());
+
+			assertNull(includes[1].getIncludesLocation());
+			assertEquals(s1.getFullPath().toString(), includes[1].getIncludedByLocation().getFullPath());
+			assertTrue(includes[1].isActive());
+			assertFalse(includes[1].isResolved());
+			assertFalse(includes[1].isSystemInclude());
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexListenerTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexListenerTest.java
new file mode 100644
index 0000000..c5c85f2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexListenerTest.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.internal.index.tests;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.index.IIndexChangeEvent;
+import org.eclipse.cdt.core.index.IIndexChangeListener;
+import org.eclipse.cdt.core.index.IIndexManager;
+import org.eclipse.cdt.core.index.IIndexerStateEvent;
+import org.eclipse.cdt.core.index.IIndexerStateListener;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+public class IndexListenerTest extends BaseTestCase {
+	private ICProject fProject1;
+	private ICProject fProject2;
+
+	public static Test suite() {
+		return suite(IndexListenerTest.class);
+	}
+
+	protected void setUp() throws Exception {
+		fProject1 = CProjectHelper.createCCProject("testIndexListener1", null, IPDOMManager.ID_FAST_INDEXER);
+		fProject2 = CProjectHelper.createCCProject("testIndexListener2", null, IPDOMManager.ID_FAST_INDEXER);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(2000, new NullProgressMonitor()));
+	}
+
+	protected void tearDown() throws Exception {
+		CProjectHelper.delete(fProject1);
+		CProjectHelper.delete(fProject2);
+	}
+
+	public void testIdleListener() throws Exception {
+		final Object mutex= new Object();
+		final int[] state= new int[] {0, 0, 0};
+		IIndexManager im= CCorePlugin.getIndexManager();
+		assertTrue(im.joinIndexer(10000, NPM));
+		
+		IIndexerStateListener listener = new IIndexerStateListener() {
+			public void indexChanged(IIndexerStateEvent event) {
+				synchronized (mutex) {
+					if (event.indexerIsIdle()) {
+						state[0]++;
+						state[2]= 0;
+					}
+					else {
+						state[1]++;
+						state[2]= 1;
+					}
+					mutex.notify();
+				}
+			}
+		};
+		
+		im.addIndexerStateListener(listener);
+		try {
+			IFile file= TestSourceReader.createFile(fProject1.getProject(), "test.cpp", "int a;");
+			synchronized (mutex) {
+				if (state[0]+state[1] < 2) {
+					mutex.wait(8000);
+					if (state[0]+state[1] < 2) {
+						mutex.wait(5000);
+					}
+				}
+				assertEquals(1, state[0]);
+				assertEquals(1, state[1]);
+				assertEquals(0, state[2]);
+			}
+		}
+		finally {
+			im.removeIndexerStateListener(listener);
+		}
+	}
+		
+
+	public void testChangeListener() throws Exception {
+		final Object mutex= new Object();
+		final List projects= new ArrayList();
+		IIndexManager im= CCorePlugin.getIndexManager();
+		
+		assertTrue(im.joinIndexer(10000, NPM));
+		IIndexChangeListener listener = new IIndexChangeListener() {
+			public void indexChanged(IIndexChangeEvent event) {
+				synchronized (mutex) {
+					projects.add(event.getAffectedProject());
+					mutex.notify();
+				}
+			}
+		};
+				
+		im.addIndexChangeListener(listener);
+		try {
+			IFile file= TestSourceReader.createFile(fProject1.getProject(), "test.cpp", "int a;");
+			
+			synchronized (mutex) {
+				mutex.wait(8000);
+			}
+			assertEquals(1, projects.size());
+			assertTrue(projects.contains(fProject1));
+			projects.clear();
+
+
+			IFile file1= TestSourceReader.createFile(fProject1.getProject(), "test.cpp", "int a;");
+			IFile file2= TestSourceReader.createFile(fProject2.getProject(), "test.cpp", "int b;");
+			synchronized (mutex) {
+				mutex.wait(1000);
+				if (projects.size() < 2) {
+					mutex.wait(1000);
+				}
+			}
+			assertEquals(2, projects.size());
+			assertTrue(projects.contains(fProject1));
+			assertTrue(projects.contains(fProject2));
+			projects.clear();
+		}
+		finally {
+			im.removeIndexChangeListener(listener);
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexLocationTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexLocationTest.java
new file mode 100644
index 0000000..2c790fc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexLocationTest.java
@@ -0,0 +1,352 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.index.tests;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexFileLocation;
+import org.eclipse.cdt.core.index.IIndexName;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.index.IndexLocationFactory;
+import org.eclipse.cdt.core.index.ResourceContainerRelativeLocationConverter;
+import org.eclipse.cdt.core.index.URIRelativeLocationConverter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Bundle;
+
+public class IndexLocationTest extends BaseTestCase {
+	private static final boolean isWin= Platform.getOS().equals(Platform.OS_WIN32);
+	protected List projects= new ArrayList();
+	protected ICProject cproject;
+	
+	public static Test suite() {
+		return suite(IndexLocationTest.class);
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+		cproject= CProjectHelper.createCProject("LocationTests"+System.currentTimeMillis(), "bin", IPDOMManager.ID_FAST_INDEXER);
+		deleteOnTearDown(cproject);
+	}
+
+	protected void tearDown() throws Exception {
+		for(Iterator i= projects.iterator(); i.hasNext(); ) {
+			ICProject ptd= (ICProject) i.next();
+			if (ptd != null) {
+				ptd.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+			}			
+		}
+		super.tearDown();
+	}
+
+	// //header
+	// class foo {};
+
+	// // external.h
+	// class bar {};
+
+	// //source
+	// #include "header.h"
+	// #include "ABS_EXTERNAL"
+	// class baz {};
+	public void testBasicLocations() throws Exception {
+		File externalHeader = new File(CProjectHelper.freshDir(),"external.h");
+
+		try {
+			Bundle b = CTestPlugin.getDefault().getBundle();
+			StringBuffer[] testData = TestSourceReader.getContentsForTest(b, "parser", getClass(), getName(), 3);
+
+			IFile file1 = TestSourceReader.createFile(cproject.getProject(), "header.h", testData[0].toString());		
+			createExternalFile(externalHeader, testData[1].toString());
+			String content = testData[2].toString().replaceAll("ABS_EXTERNAL", externalHeader.getAbsolutePath().replaceAll("\\\\","\\\\\\\\"));
+			IFile file3 = TestSourceReader.createFile(cproject.getProject(), "source.cpp", content);
+
+			CCorePlugin.getIndexManager().reindex(cproject);		
+			assertTrue(CCorePlugin.getIndexManager().joinIndexer(10000, new NullProgressMonitor()));
+
+			IIndex index = CCorePlugin.getIndexManager().getIndex(cproject);
+			index.acquireReadLock();
+			try {
+				IBinding[] bs1 = index.findBindings(Pattern.compile("foo"), true, IndexFilter.ALL, new NullProgressMonitor());
+				IBinding[] bs2 = index.findBindings(Pattern.compile("bar"), true, IndexFilter.ALL, new NullProgressMonitor());
+				IBinding[] bs3 = index.findBindings(Pattern.compile("baz"), true, IndexFilter.ALL, new NullProgressMonitor());
+				assertEquals(1, bs1.length);
+				assertEquals(1, bs2.length);
+				assertEquals(1, bs3.length);
+				bs1 = index.findBindings("foo".toCharArray(), IndexFilter.ALL, new NullProgressMonitor());
+				bs2 = index.findBindings("bar".toCharArray(), IndexFilter.ALL, new NullProgressMonitor());
+				bs3 = index.findBindings("baz".toCharArray(), IndexFilter.ALL, new NullProgressMonitor());
+				assertEquals(1, bs1.length);
+				assertEquals(1, bs2.length);
+				assertEquals(1, bs3.length);
+				IIndexName[] nms1 = index.findNames(bs1[0], IIndex.FIND_ALL_OCCURRENCES);
+				IIndexName[] nms2 = index.findNames(bs2[0], IIndex.FIND_ALL_OCCURRENCES);
+				IIndexName[] nms3 = index.findNames(bs3[0], IIndex.FIND_ALL_OCCURRENCES);
+				assertEquals(1, nms1.length);
+				assertEquals(1, nms2.length);
+				assertEquals(1, nms3.length);
+				URI workspaceRoot = ResourcesPlugin.getWorkspace().getRoot().getLocationURI();
+				assertEquals(
+						ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(cproject.getProject().getName()+"/header.h")).getLocationURI(),
+						nms1[0].getFile().getLocation().getURI()
+				);		
+				assertEquals(
+						externalHeader.toURI(),
+						nms2[0].getFile().getLocation().getURI()
+				);
+				assertEquals(
+						ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(cproject.getProject().getName()+"/source.cpp")).getLocationURI(),
+						nms3[0].getFile().getLocation().getURI()
+				);
+
+				assertEquals(
+						ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(cproject.getProject().getName()+"/header.h")).getFullPath(),
+						new Path(nms1[0].getFile().getLocation().getFullPath())
+				);
+				assertEquals(
+						null,
+						nms2[0].getFile().getLocation().getFullPath()
+				);
+				assertEquals(
+						ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(cproject.getProject().getName()+"/source.cpp")).getFullPath(),
+						new Path(nms3[0].getFile().getLocation().getFullPath())
+				);
+			}
+			finally {
+				index.releaseReadLock();
+			}
+		} finally {
+			externalHeader.delete();
+			externalHeader.getParentFile().delete();
+		}
+	}
+	
+	public void testLinkedFilesIndexedAsWithinProject() throws Exception {
+		File location = new File(CProjectHelper.freshDir(), "external2.h"); 
+		createExternalFile(location, "struct External {};\n");
+		IFolder content= cproject.getProject().getFolder("content");
+		content.createLink(new Path(location.getParentFile().getAbsolutePath()), IResource.NONE, NPM);
+		
+		CCorePlugin.getIndexManager().reindex(cproject);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(10000, new NullProgressMonitor()));
+		
+		IIndex index = CCorePlugin.getIndexManager().getIndex(cproject);
+		index.acquireReadLock();
+		try {
+			IBinding[] bs= index.findBindings("External".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bs.length);
+			IIndexName[] nms= index.findNames(bs[0], IIndex.FIND_ALL_OCCURRENCES);
+			assertEquals(1, nms.length);
+			IIndexFileLocation ilocation= nms[0].getFile().getLocation();
+			assertEquals("/"+cproject.getProject().getName()+"/content/external2.h", ilocation.getFullPath());
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+	
+	public void testSameFileLinkedToOnceInTwoProjects_186214() throws Exception {
+		File location = new File(CProjectHelper.freshDir(),"external2.h"); 
+		createExternalFile(location, "struct External {};\n");
+		IFolder content= cproject.getProject().getFolder("content");
+		content.createLink(new Path(location.getParentFile().getAbsolutePath()), IResource.NONE, null);
+		
+		ICProject cproject2= CProjectHelper.createCProject("LocationTests2"+System.currentTimeMillis(), "bin", IPDOMManager.ID_NO_INDEXER);
+		deleteOnTearDown(cproject2);
+		
+		IFolder content2= cproject2.getProject().getFolder("content");
+		content2.createLink(new Path(location.getParentFile().getAbsolutePath()), IResource.NONE, null);
+
+		CCorePlugin.getIndexManager().reindex(cproject);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(10000, new NullProgressMonitor()));
+		IIndex index = CCorePlugin.getIndexManager().getIndex(cproject);
+		index.acquireReadLock();
+		try {
+			IBinding[] bs= index.findBindings("External".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bs.length);
+			IIndexName[] nms= index.findNames(bs[0], IIndex.FIND_ALL_OCCURRENCES);
+			assertEquals(1, nms.length);
+			IIndexFileLocation ilocation= nms[0].getFile().getLocation();
+			assertEquals("/"+cproject.getProject().getName()+"/content/external2.h", ilocation.getFullPath());
+		} finally {
+			index.releaseReadLock();
+		}
+	}
+	
+	public void testResourceContainerRelativeLocationConverter() throws Exception {
+		ICProject emptyCProject= CProjectHelper.createCProject("Empty", "bin", IPDOMManager.ID_NO_INDEXER);
+		deleteOnTearDown(emptyCProject);
+		
+		String[] paths = new String[] {"this.cpp", "inc/header.h", "a b c/d/e f/g.h", "a \\b /c.d"};
+		for(int i=0; i<paths.length; i++) {
+			IFile file= cproject.getProject().getFile(paths[i]);
+			IIndexFileLocation ifl1= IndexLocationFactory.getWorkspaceIFL(file);
+			ResourceContainerRelativeLocationConverter prlc1= new ResourceContainerRelativeLocationConverter(cproject.getProject());
+			String r1= prlc1.toInternalFormat(ifl1);
+			assertNotNull(r1);
+			ResourceContainerRelativeLocationConverter prlc2= new ResourceContainerRelativeLocationConverter(emptyCProject.getProject());
+			IIndexFileLocation ifl2= prlc2.fromInternalFormat(r1);
+			assertNotNull(ifl2);
+			assertEquals(
+					new Path(ifl1.getFullPath()).removeFirstSegments(1),
+					new Path(ifl2.getFullPath()).removeFirstSegments(1)
+			);
+		}
+	}
+	
+	public void testURLC_RCRLC_Interaction1() throws Exception {
+		String[] winPaths = new String[] {
+				"c:/foo/bar/baz.cpp",
+				"c:\\foo\\bar\\a b c\\baz.cpp",
+				"c:/foo/bar/a b/baz.cpp",
+				"c:\\foo\\bar\\a b c\\a b/baz.cpp"
+			};
+		String[] unxPaths = new String[] {
+				"/home/cdt/foo/bar/baz.cpp",
+				"/home/cdt/foo/bar/a b c/baz.cpp",
+				"/home/cdt/foo/bar/a b/baz.cpp",
+				"/home/cdt/foo/bar/a b c/a b/baz.cpp"
+			};
+		URI base = URIUtil.toURI(isWin ? "c:/foo/bar/" : "/home/cdt/foo/bar/");
+		String[] paths= isWin ? winPaths : unxPaths;
+		String[] expectedFullPaths = new String[] {
+				"/"+cproject.getProject().getName()+"/baz.cpp",
+				"/"+cproject.getProject().getName()+"/a b c/baz.cpp",
+				"/"+cproject.getProject().getName()+"/a b/baz.cpp",
+				"/"+cproject.getProject().getName()+"/a b c/a b/baz.cpp"
+		};
+		IContainer root= ResourcesPlugin.getWorkspace().getRoot();
+		// loc -uri-> raw -project-> loc
+		for(int i=0; i<paths.length; i++) {
+			IIndexFileLocation ifl1 = IndexLocationFactory.getExternalIFL(paths[i]);
+			URIRelativeLocationConverter urlc = new URIRelativeLocationConverter(base);
+			String r1 = urlc.toInternalFormat(ifl1);
+			assertNotNull(r1);
+			ResourceContainerRelativeLocationConverter prlc= new ResourceContainerRelativeLocationConverter(cproject.getProject());
+			IIndexFileLocation ifl2= prlc.fromInternalFormat(r1);
+			String r2= prlc.toInternalFormat(ifl2);
+			assertNotNull(r2);
+			assertNull(ifl1.getFullPath());
+			assertEquals(expectedFullPaths[i], ifl2.getFullPath());
+			assertEquals(URIUtil.toURI(paths[i]).normalize(), ifl1.getURI());
+			assertEquals(root.getFile(new Path(expectedFullPaths[i])).getLocationURI(), ifl2.getURI());
+		}
+	}
+	
+	public void testURLC_RCRLC_Interaction2() throws Exception {
+		String[] winPaths = new String[] {
+				"a b c/d/e f/g.h",
+				"a \\b /c.d",
+				"/a b c/d-e/f.g"
+			};
+		String[] unxPaths = new String[] {
+				"a b c/d/e f/g.h",
+				"a /b /c.d",
+				"/a b c/d-e/f.g"
+			};
+		String[] paths= isWin ? winPaths : unxPaths;
+		String basePath = isWin ? "c:/foo/bar/" : "/home/cdt/foo/bar/";
+		String[] expectedFullPaths = new String[] {
+				"/"+cproject.getProject().getName()+"/a b c/d/e f/g.h",
+				"/"+cproject.getProject().getName()+"/a /b /c.d",
+				"/"+cproject.getProject().getName()+"/a b c/d-e/f.g"
+		};
+		// loc -project-> raw -uri-> loc
+		for(int i=0; i<paths.length; i++) {
+			IFile file= cproject.getProject().getFile(paths[i]);
+			IIndexFileLocation ifl1= IndexLocationFactory.getWorkspaceIFL(file);
+			ResourceContainerRelativeLocationConverter prlc= new ResourceContainerRelativeLocationConverter(cproject.getProject());
+			String r1= prlc.toInternalFormat(ifl1);
+			assertNotNull(r1);
+			URI base = URIUtil.toURI(basePath);
+			URIRelativeLocationConverter c1 = new URIRelativeLocationConverter(base);
+			IIndexFileLocation ifl2= c1.fromInternalFormat(r1);
+			assertNotNull(ifl2);
+			assertEquals(expectedFullPaths[i], ifl1.getFullPath());
+			assertNull(ifl2.getFullPath());
+			assertEquals(cproject.getProject().getFile(paths[i]).getLocationURI(), ifl1.getURI());
+			assertEquals(URIUtil.toURI(basePath+paths[i]).normalize(), ifl2.getURI());
+		}
+	}
+	
+	public void testURLC_RCRLC_Interaction3() throws Exception {
+		IFolder linkedFolder= cproject.getProject().getFolder("linkedFolder");
+		String[] winPaths = new String[] {
+				"a b c/d/e f/g.h",
+				"a \\b /c.d",
+				"/a b c/d-e/f.g"
+			};
+		String[] unxPaths = new String[] {
+				"a b c/d/e f/g.h",
+				"a /b /c.d",
+				"/a b c/d-e/f.g"
+			};
+		String[] paths= isWin ? winPaths : unxPaths;
+		String basePath = isWin ? "c:/foo/bar/" : "/home/cdt/foo/bar/";
+		String[] expectedFullPaths = new String[] {
+				linkedFolder.getFullPath()+"/a b c/d/e f/g.h",
+				linkedFolder.getFullPath()+"/a /b /c.d",
+				linkedFolder.getFullPath()+"/a b c/d-e/f.g"
+		};
+		// loc -project-> raw -uri-> loc
+		for(int i=0; i<paths.length; i++) {
+			IFile file= linkedFolder.getFile(paths[i]);
+			IIndexFileLocation ifl1= IndexLocationFactory.getWorkspaceIFL(file);
+			ResourceContainerRelativeLocationConverter prlc= new ResourceContainerRelativeLocationConverter(linkedFolder);
+			String r1= prlc.toInternalFormat(ifl1);
+			assertNotNull(r1);
+			URI base = URIUtil.toURI(basePath);
+			URIRelativeLocationConverter c1 = new URIRelativeLocationConverter(base);
+			IIndexFileLocation ifl2= c1.fromInternalFormat(r1);
+			assertNotNull(ifl2);
+			assertEquals(expectedFullPaths[i], ifl1.getFullPath());
+			assertNull(ifl2.getFullPath());
+			assertEquals(linkedFolder.getFile(paths[i]).getLocationURI(), ifl1.getURI());
+			assertEquals(URIUtil.toURI(basePath+paths[i]).normalize(), ifl2.getURI());
+		}
+	}
+	
+	private void deleteOnTearDown(ICProject cproject) {
+		if(cproject!=null) {
+			projects.add(cproject);
+		}
+	}
+	
+	private void createExternalFile(File dest, String content) throws IOException {
+		FileOutputStream fos = new FileOutputStream(dest);
+		fos.write(content.getBytes());
+		fos.close();
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexNamesTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexNamesTests.java
new file mode 100644
index 0000000..6ff62bf
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexNamesTests.java
@@ -0,0 +1,395 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.internal.index.tests;
+
+import java.io.IOException;
+import java.util.regex.Pattern;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ILinkage;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexBinding;
+import org.eclipse.cdt.core.index.IIndexFile;
+import org.eclipse.cdt.core.index.IIndexName;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.index.IndexLocationFactory;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+
+public class IndexNamesTests extends BaseTestCase {
+	private ICProject fCProject;
+	protected IIndex fIndex;
+
+	public IndexNamesTests(String name) {
+		super(name);
+	}
+
+	public static TestSuite suite() {
+		return suite(IndexNamesTests.class);
+	}
+
+	protected void setUp() throws CoreException {
+		fCProject= CProjectHelper.createCCProject("__encNamesTest__", "bin", IPDOMManager.ID_FAST_INDEXER);
+		CCorePlugin.getIndexManager().reindex(fCProject);
+		fIndex= CCorePlugin.getIndexManager().getIndex(fCProject);
+	}
+
+	protected void tearDown() throws CoreException {
+		if (fCProject != null) {
+			CProjectHelper.delete(fCProject);
+		}
+	}
+
+	protected IProject getProject() {
+		return fCProject.getProject();
+	}
+
+	protected StringBuffer[] getContentsForTest(int blocks) throws IOException {
+		return TestSourceReader.getContentsForTest(
+				CTestPlugin.getDefault().getBundle(), "parser", getClass(), getName(), blocks);
+	}
+
+	protected IFile createFile(IContainer container, String fileName, String contents) throws Exception {
+		return TestSourceReader.createFile(container, new Path(fileName), contents);
+	}
+
+	protected void waitForIndexer() {
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(10000, NPM));
+	}
+
+	protected Pattern[] getPattern(String qname) {
+		String[] parts= qname.split("::");
+		Pattern[] result= new Pattern[parts.length];
+		for (int i = 0; i < result.length; i++) {
+			result[i]= Pattern.compile(parts[i]);			
+		}
+		return result;
+	}
+
+	protected void waitUntilFileIsIndexed(IFile file, int time) throws Exception {
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, file, time);
+	}
+	
+	// void func();
+	// int var;
+	//
+	// void main() {
+	//    func();
+	//    var=1;
+	// };
+	public void testNestingWithFunction() throws Exception {
+		waitForIndexer();
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject().getProject(), "test.cpp", content);
+		waitUntilFileIsIndexed(file, 4000);
+		
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] mainBS= fIndex.findBindings(getPattern("main"), true, IndexFilter.ALL, NPM);
+			assertLength(1, mainBS);
+			IIndexBinding mainB= mainBS[0];
+			
+			IIndexName[] names= fIndex.findDefinitions(mainB);
+			assertLength(1, names);
+			IIndexName main= names[0];
+			
+			assertNull(main.getEnclosingDefinition());
+			IIndexName[] enclosed= main.getEnclosedNames();
+			assertLength(2, enclosed);
+			assertName("func", enclosed[0]);
+			assertName("var", enclosed[1]);
+			
+			IIndexName enclosing= enclosed[0].getEnclosingDefinition();
+			assertNotNull(enclosing);
+			assertName("main", enclosing);
+
+			enclosing= enclosed[1].getEnclosingDefinition();
+			assertNotNull(enclosing);
+			assertName("main", enclosing);			
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	private void assertName(String name, IIndexName iname) {
+		assertEquals(name, new String(iname.toCharArray()));
+	}
+
+	private void assertLength(int length, Object[] array) {
+		assertNotNull(array);
+		assertEquals(length, array.length);
+	}
+	
+	// class C {
+	// public:
+	//    void func();
+	//    int var;
+	// };
+	//
+	// void main() {
+	//    C c;
+	//    c.func();
+	//    c.var=1;
+	// };
+	// void C::func() {
+	//    func();
+	//    var=1;
+	// };
+	public void testNestingWithMethod() throws Exception {
+		waitForIndexer();
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject().getProject(), "test.cpp", content);
+		waitUntilFileIsIndexed(file, 4000);
+		
+		fIndex.acquireReadLock();
+		try {
+			IIndexBinding[] mainBS= fIndex.findBindings(getPattern("main"), true, IndexFilter.ALL, NPM);
+			assertLength(1, mainBS);
+			IIndexBinding mainB= mainBS[0];
+			
+			IIndexName[] names= fIndex.findDefinitions(mainB);
+			assertLength(1, names);
+			IIndexName main= names[0];
+			
+			assertNull(main.getEnclosingDefinition());
+			IIndexName[] enclosed= main.getEnclosedNames();
+			assertLength(3, enclosed);
+			assertName("C", enclosed[0]);
+			assertName("func", enclosed[1]);
+			assertName("var", enclosed[2]);
+			
+			IIndexName enclosing= enclosed[0].getEnclosingDefinition();
+			assertNotNull(enclosing);
+			assertName("main", enclosing);
+
+			enclosing= enclosed[1].getEnclosingDefinition();
+			assertNotNull(enclosing);
+			assertName("main", enclosing);			
+
+			enclosing= enclosed[2].getEnclosingDefinition();
+			assertNotNull(enclosing);
+			assertName("main", enclosing);			
+
+			IIndexBinding funcB= fIndex.findBinding(enclosed[1]);
+			assertNotNull(funcB);
+			names= fIndex.findDefinitions(funcB);
+			assertLength(1, names);
+			IIndexName funcdef= names[0];
+			
+			assertNull(funcdef.getEnclosingDefinition());
+			enclosed= funcdef.getEnclosedNames();
+			assertLength(3, enclosed);
+			assertName("C", enclosed[0]);
+			assertName("func", enclosed[1]);
+			assertName("var", enclosed[2]);
+			
+			enclosing= enclosed[0].getEnclosingDefinition();
+			assertNotNull(enclosing);
+			assertName("func", enclosing);
+
+			enclosing= enclosed[1].getEnclosingDefinition();
+			assertNotNull(enclosing);
+			assertName("func", enclosing);			
+
+			enclosing= enclosed[2].getEnclosingDefinition();
+			assertNotNull(enclosing);
+			assertName("func", enclosing);			
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	//	class X {
+	//		public:
+	//			virtual void vm() {
+	//			}
+	//		};
+	//
+	//	class Y : public X {
+	//	public:
+	//		virtual void vm() {
+	//		}	
+	//		void test();
+	//	};
+	//	void Y::test() {
+	//		X* x= this;
+	//		X& xr= *this;
+	//		X xc= *this;
+	//		
+	//		vm();		// polymorphic
+	//		X::vm(); 	// call to X::vm()
+	//		x->vm(); 	// polymorphic
+	//		x->X::vm(); // call to X::vm()
+	//		xr.vm(); 	// polymorphic
+	//		xr.X::vm(); // call to X::vm()
+	//		xc.vm();    // call to X::vm()
+	//		xc.X::vm(); // call to X::vm()
+	//	}
+	public void testCouldBePolymorphicMethodCall_Bug156691() throws Exception {
+		waitForIndexer();
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject().getProject(), "test.cpp", content);
+		waitUntilFileIsIndexed(file, 4000);
+
+		boolean[] couldbepolymorphic= {true, false, true, false, true, false, false, false};
+		String[] container= 		  {"Y",  "X",   "X",  "X",   "X",  "X",   "X",   "X"  };  
+
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile ifile= fIndex.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+			IIndexName[] names= ifile.findNames(0, content.length());
+			int j= 0;
+			for (int i = 0; i < names.length; i++) {
+				IIndexName indexName = names[i];
+				if (indexName.isReference() && indexName.toString().equals("vm")) {
+					assertEquals(couldbepolymorphic[j], indexName.couldBePolymorphicMethodCall());
+					assertEquals(container[j], fIndex.findBinding(indexName).getQualifiedName()[0]);
+					j++;
+				}
+				else {
+					assertEquals(false, indexName.couldBePolymorphicMethodCall());
+				}
+			}
+			assertEquals(couldbepolymorphic.length, j);
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	
+	//	int _i, ri, wi, rwi;
+	//  int* rp; int* wp; int* rwp;
+	//  const int* cip= &ri;
+	//  int* bla= &rwi;
+	//  void fi(int);
+	//  void fp(int*);
+	//  void fcp(const int*);
+	//  void fpp(int**);
+	//  void fcpp(int const**);
+	//  void fpcp(int *const*);
+	//  void fcpcp(int const *const*);
+	//
+	//	void test() {
+	//      _i; 	
+	//		wi= ri, _i, _i; 
+	//      rwi %= ri;     
+	//      ri ? _i : _i;   
+	//      (ri ? wi : wi)= ri; 
+	//      if (ri) _i;
+	//      for(wi=1; ri>ri; rwi++) _i;
+	//		do {_i;} while (ri);
+	//      while(ri) {_i;};
+	//      switch(ri) {case ri: _i;};
+	//      fi(ri); fp(&rwi); fcp(&ri);
+	//      fi(*rp); fp(rp); fcp(rp); fpp(&rwp); fcpp(&rwp); fpcp(&rp); fcpcp(&rp);
+	//      return ri;
+	//	}
+	public void testReadWriteFlagsC() throws Exception {
+		waitForIndexer();
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject().getProject(), "test.c", content);
+		waitUntilFileIsIndexed(file, 4000);
+
+		checkReadWriteFlags(file, ILinkage.C_LINKAGE_ID, 41);
+	}
+
+	private void checkReadWriteFlags(IFile file, int linkageID, int count) throws InterruptedException,
+			CoreException {
+		fIndex.acquireReadLock();
+		try {
+			IIndexFile ifile= fIndex.getFile(linkageID, IndexLocationFactory.getWorkspaceIFL(file));
+			IIndexName[] names= ifile.findNames(0, Integer.MAX_VALUE);
+			int j= 0;
+			for (int i = 0; i < names.length; i++) {
+				IIndexName indexName = names[i];
+				final String name = indexName.toString();
+				final char c0= name.length() > 0 ? name.charAt(0) : 0;
+				if ((c0 == '_' || c0 == 'r' || c0 == 'w') && indexName.isReference()) {
+					boolean isRead= name.charAt(0) == 'r' || name.charAt(0) == 'u';
+					boolean isWrite= name.charAt(isRead ? 1 : 0) == 'w' || name.charAt(0) == 'u';
+					String msg= "i=" + i + ", " + name + ":";
+					assertEquals(msg, isRead, indexName.isReadAccess());
+					assertEquals(msg, isWrite, indexName.isWriteAccess());
+					j++;
+				}
+				else {
+					assertEquals(false, indexName.couldBePolymorphicMethodCall());
+				}
+			}
+			assertEquals(count, j);
+		}
+		finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	//	int _i, ri, wi, rwi, rfind, ui;
+	//  int* rp; int* wp; int* rwp; int* up; 
+	//  int* const rpc= 0;
+	//  const int * const rcpc= 0;
+	//  const int* cip= &ri;
+	//  int* bla= &rwi;
+	//  void fi(int);
+	//  void fp(int*);
+	//  void fr(int&);
+	//  void fcp(const int*);
+	//  void fcr(const int&);
+	//  void fpp(int**);
+	//  void fpr(int*&);
+	//  void fcpp(int const**);
+	//  void fcpr(int const*&);
+	//  void fpcp(int *const*);
+	//  void fpcr(int *const&);
+	//  void fcpcp(int const *const*);
+	//  void fcpcr(int const *const&);
+	//
+	//	int test() {
+	//      _i; 	
+	//		wi= ri, _i, _i; // expr-list
+	//      rwi %= ri;     // assignment
+	//      ri ? _i : _i;   // conditional
+	//      (ri ? wi : wi)= ri; // conditional
+	//      if (ri) _i;
+	//      for(wi=1; ri>ri; rwi++) _i;
+	//		do {_i;} while (ri);
+	//      while(ri) {_i;};
+	//      switch(ri) {case ri: _i;};
+	//      fi(ri); fp(&rwi); fcp(&ri); 
+	//      fi(*rp); fp(rp); fcp(rp); fpp(&rwp); fcpp(&up); fpcp(&rpc); fcpcp(&rcpc); 
+	//      fr(rwi); fcr(ri); fpr(&ui); 
+	//      fcpr(&ui); fpcr(&rwi); fcpcr(&ri);
+	//      fpr(rwp); fcpr(up); fpcr(rp); fcpcr(rp);
+	//      return ri;
+	//	}
+	public void testReadWriteFlagsCpp() throws Exception {
+		waitForIndexer();
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject().getProject(), "test.cpp", content);
+		waitUntilFileIsIndexed(file, 4000);
+
+		checkReadWriteFlags(file, ILinkage.CPP_LINKAGE_ID, 47);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexProviderManagerTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexProviderManagerTest.java
new file mode 100644
index 0000000..d821e93
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexProviderManagerTest.java
@@ -0,0 +1,753 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.index.tests;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.cdtvariables.ICdtVariablesContributor;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.provider.IIndexProvider;
+import org.eclipse.cdt.core.internal.index.provider.test.DummyProviderTraces;
+import org.eclipse.cdt.core.internal.index.provider.test.Providers;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.parser.util.ArrayUtil;
+import org.eclipse.cdt.core.settings.model.CConfigurationStatus;
+import org.eclipse.cdt.core.settings.model.ICBuildSetting;
+import org.eclipse.cdt.core.settings.model.ICConfigExtensionReference;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICExternalSetting;
+import org.eclipse.cdt.core.settings.model.ICFileDescription;
+import org.eclipse.cdt.core.settings.model.ICFolderDescription;
+import org.eclipse.cdt.core.settings.model.ICLanguageSetting;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescriptionPreferences;
+import org.eclipse.cdt.core.settings.model.ICResourceDescription;
+import org.eclipse.cdt.core.settings.model.ICSettingContainer;
+import org.eclipse.cdt.core.settings.model.ICSettingEntry;
+import org.eclipse.cdt.core.settings.model.ICSettingObject;
+import org.eclipse.cdt.core.settings.model.ICSourceEntry;
+import org.eclipse.cdt.core.settings.model.ICStorageElement;
+import org.eclipse.cdt.core.settings.model.ICTargetPlatformSetting;
+import org.eclipse.cdt.core.settings.model.WriteAccessException;
+import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
+import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultConfigurationData;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.internal.core.index.IIndexFragment;
+import org.eclipse.cdt.internal.core.index.provider.IIndexFragmentProvider;
+import org.eclipse.cdt.internal.core.index.provider.IndexProviderManager;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.cdt.internal.core.pdom.PDOMManager;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.osgi.service.resolver.VersionRange;
+
+/**
+ * Example usage and test for IIndexProvider
+ */
+public class IndexProviderManagerTest extends IndexTestBase {
+	final static DummyProviderTraces DPT= DummyProviderTraces.getInstance();
+	final static Class DP1= Providers.Dummy1.class;
+	final static Class DP2= Providers.Dummy2.class;
+	final static Class DP3= Providers.Dummy3.class;
+	final static Class DP4= Providers.Dummy4.class;
+	final static Class DP5= Providers.Dummy5.class;
+	final static Class[] DPS= new Class[] {DP4, DP2, DP1, DP3, DP5};
+	
+	/*
+	 * Fictional compatibility ranges for testing
+	 */
+	final static VersionRange VERSION_400= new VersionRange("36");
+	final static VersionRange VERSION_401= new VersionRange("[36,37]");
+	final static VersionRange VERSION_405= new VersionRange("[37,39]");
+	final static VersionRange VERSION_502= new VersionRange("[89,91]");
+	
+	final CCorePlugin core= CCorePlugin.getDefault();
+	
+	public IndexProviderManagerTest() {
+		super("IndexProviderManagerTest");
+	}
+
+	public static TestSuite suite() {
+		return suite(IndexProviderManagerTest.class);
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		IndexProviderManager ipm= ((PDOMManager)CCorePlugin.getIndexManager()).getIndexProviderManager();
+		ipm.reset(); ipm.startup();
+	}
+	
+	public void testProvider_SimpleLifeCycle_200958() throws Exception {
+		for(int i=0; i<DPS.length; i++)
+			DPT.reset(DPS[i]);
+		
+		List cprojects = new ArrayList(), expectedTrace = new ArrayList();
+		try {
+			for(int i=0; i<3; i++) {
+				ICProject cproject = CProjectHelper.createCProject("P"+System.currentTimeMillis(), "bin", IPDOMManager.ID_NO_INDEXER);
+				IIndex index = CCorePlugin.getIndexManager().getIndex(cproject);
+				cprojects.add(cproject);
+				expectedTrace.add(cproject);
+			}
+			for(int i=0; i<DPS.length; i++)
+				assertEquals(expectedTrace, DPT.getProjectsTrace(DPS[i]));
+			for(int i=0; i<expectedTrace.size(); i++) {
+				ICProject cproject = (ICProject) expectedTrace.get(i);
+				IIndex index = CCorePlugin.getIndexManager().getIndex(cproject);
+			}
+			for(int i=0; i<DPS.length; i++)
+				assertEquals(expectedTrace, DPT.getProjectsTrace(DPS[i]));
+		} finally {
+			for(int i=0; i<cprojects.size(); i++) {
+				ICProject cproject = (ICProject) expectedTrace.get(i);
+				cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+			}
+		}
+	}
+
+	public void testProvider_OverDeleteAndAdd() throws Exception {
+		DPT.reset(DP1);
+		
+		List expectedTrace = new ArrayList();
+		ICProject cproject = null;
+		try {
+			String name = "P"+System.currentTimeMillis();
+			cproject = CProjectHelper.createCProject(name, "bin", IPDOMManager.ID_NO_INDEXER);
+			IIndex index = CCorePlugin.getIndexManager().getIndex(cproject);
+			expectedTrace.add(cproject);
+			assertEquals(expectedTrace, DPT.getProjectsTrace(DP1));
+
+			cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+			cproject = CProjectHelper.createCProject(name, "bin", IPDOMManager.ID_NO_INDEXER);
+			index = CCorePlugin.getIndexManager().getIndex(cproject);
+			expectedTrace.add(cproject);
+			assertEquals(expectedTrace, DPT.getProjectsTrace(DP1));
+		} finally {
+			if(cproject!=null) {
+				cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+			}
+		}
+	}
+
+	public void testProvider_OverMove() throws Exception {
+		DPT.reset(DP1);
+		List cprojects = new ArrayList();
+		List expectedTrace = new ArrayList();
+
+		/* n.b. here we test for the current implementation expected behaviour,
+		 * not the contract of IIndexProvider.providesFor
+		 */
+
+		ICProject cproject = null;
+		try {
+			String name = "P"+System.currentTimeMillis();
+			cproject = CProjectHelper.createCProject(name, "bin", IPDOMManager.ID_NO_INDEXER);
+			IIndex index = CCorePlugin.getIndexManager().getIndex(cproject);
+			expectedTrace.add(cproject);
+			assertEquals(expectedTrace, DPT.getProjectsTrace(DP1));
+
+			// move the project to a random new location
+			File newLocation = CProjectHelper.freshDir();
+			IProjectDescription description = cproject.getProject().getDescription();
+			description.setLocationURI(newLocation.toURI());
+			cproject.getProject().move(description, IResource.FORCE | IResource.SHALLOW, new NullProgressMonitor());	
+
+			index = CCorePlugin.getIndexManager().getIndex(cproject);
+			assertEquals(expectedTrace, DPT.getProjectsTrace(DP1));
+		} finally {
+			if(cproject!=null) {
+				cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+			}
+		}
+	}
+	
+	public void testVersioning_IncompatibleIgnored() throws Exception {
+		IndexProviderManager ipm= ((PDOMManager)CCorePlugin.getIndexManager()).getIndexProviderManager();
+		
+		ICProject cproject = null;
+		try {
+			cproject= CProjectHelper.createCCProject("IndexFactoryConfigurationUsageTest", IPDOMManager.ID_NO_INDEXER);
+			IProject project= cproject.getProject();
+			
+			
+			MockState mockState = new MockState(cproject);
+			mockState.setConfig(MockState.REL_V1_ID);
+			
+			IIndexProvider provider1= new IIndexFragmentProvider() {
+				IIndexFragment[] fragments= new IIndexFragment[] {
+					new MockPDOM("contentID.contentA", "36"),
+					new MockPDOM("contentID.contentA", "37"),
+					new MockPDOM("contentID.foo", "90"),
+					new MockPDOM("contentID.bar", "91"),
+					new MockPDOM("contentID.baz", "89")
+				};
+				public IIndexFragment[] getIndexFragments(ICConfigurationDescription config) {
+					return fragments;
+				}
+				public boolean providesFor(ICProject project) throws CoreException {
+					return true;
+				}
+			};
+			IIndexProvider provider2= new IIndexFragmentProvider() {
+				IIndexFragment[] fragments= new IIndexFragment[] {
+						new MockPDOM("contentID.baz", "90"),
+						new MockPDOM("contentID.contentA", "38"),
+				};
+				public IIndexFragment[] getIndexFragments(ICConfigurationDescription config) {
+					return fragments;
+				}
+				public boolean providesFor(ICProject project) throws CoreException {
+					return true;
+				}
+			};
+			
+			CCorePlugin.getIndexManager().joinIndexer(8000, NPM); // ensure IPM is called only once under test conditions
+			setExpectedNumberOfLoggedNonOKStatusObjects(3); // foo, bar and baz have no compatible fragments available
+			
+			ipm.reset(VERSION_405); ipm.startup();
+			ipm.addIndexProvider(provider1);  ipm.addIndexProvider(provider2);
+			
+			IIndexFragment[] actual = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(1, actual.length);
+			assertFragmentPresent("contentID.contentA", "38", actual);
+		} finally {
+			if(cproject!=null) {
+				cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+			}
+		}
+	}
+	
+	public void testVersioning_NoCompatibleVersionsFound() throws Exception {
+		IndexProviderManager ipm= ((PDOMManager)CCorePlugin.getIndexManager()).getIndexProviderManager();
+		
+		ICProject cproject = null;
+		try {
+			cproject= CProjectHelper.createCCProject("IndexFactoryConfigurationUsageTest", IPDOMManager.ID_NO_INDEXER);
+			IProject project= cproject.getProject();
+			
+			
+			MockState mockState = new MockState(cproject);
+			mockState.setConfig(MockState.REL_V1_ID);
+			
+			IIndexProvider provider1= new IIndexFragmentProvider() {
+				IIndexFragment[] fragments= new IIndexFragment[] {
+					new MockPDOM("contentID.contentA", "36"),
+					new MockPDOM("contentID.contentA", "37"),
+					new MockPDOM("contentID.foo", "90"),
+					new MockPDOM("contentID.bar", "91"),
+					new MockPDOM("contentID.baz", "89")
+				};
+				public IIndexFragment[] getIndexFragments(ICConfigurationDescription config) {
+					return fragments;
+				}
+				public boolean providesFor(ICProject project) throws CoreException {
+					return true;
+				}
+			};
+			IIndexProvider provider2= new IIndexFragmentProvider() {
+				IIndexFragment[] fragments= new IIndexFragment[] {
+					new MockPDOM("contentID.contentA", "41"),
+				};
+				public IIndexFragment[] getIndexFragments(ICConfigurationDescription config) {
+					return fragments;
+				}
+				public boolean providesFor(ICProject project) throws CoreException {
+					return true;
+				}
+			};
+			
+			CCorePlugin.getIndexManager().joinIndexer(8000, NPM); // ensure IPM is called only once under test conditions
+			setExpectedNumberOfLoggedNonOKStatusObjects(1); // contentA has no compatible fragments available
+			
+			ipm.reset(VERSION_502); ipm.startup();
+			ipm.addIndexProvider(provider1);  ipm.addIndexProvider(provider2);
+			
+			IIndexFragment[] actual = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(3, actual.length);
+			assertFragmentPresent("contentID.foo", "90", actual);
+			assertFragmentPresent("contentID.bar", "91", actual);
+			assertFragmentPresent("contentID.baz", "89", actual);
+		} finally {
+			if(cproject!=null) {
+				cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+			}
+		}
+	}
+	
+	private void assertFragmentPresent(String id, String version, IIndexFragment[] fragments) throws Exception {
+		for(int i=0; i<fragments.length; i++) {
+			IIndexFragment candidate= fragments[i];
+			String cid= null, csver= null;
+			try {
+				candidate.acquireReadLock();
+				cid= candidate.getProperty(IIndexFragment.PROPERTY_FRAGMENT_ID);
+				csver= candidate.getProperty(IIndexFragment.PROPERTY_FRAGMENT_FORMAT_VERSION);
+			} finally {
+				candidate.releaseReadLock();
+			}
+			if(id.equals(cid) && version.equals(csver))
+				return;
+		}
+		fail("Fragment matching (id="+id+",version="+version+") was not present");
+	}
+	
+	public void testIndexFactoryConfigurationUsage() throws Exception {
+		IIndex index;
+		
+		ICProject cproject = null;
+		try {
+			cproject = CProjectHelper.createCCProject("IndexFactoryConfigurationUsageTest", IPDOMManager.ID_NO_INDEXER);
+			IProject project= cproject.getProject();
+			
+			ICProjectDescription pd= core.getProjectDescription(project);
+			ICConfigurationDescription cfg1= newCfg(pd, "project", "config1");
+			ICConfigurationDescription cfg2= newCfg(pd, "project", "config2");
+			core.setProjectDescription(project, pd);
+			
+			index= CCorePlugin.getIndexManager().getIndex(cproject);
+			CCorePlugin.getIndexManager().joinIndexer(8000, NPM);
+		
+			DPT.reset(DP1);
+			changeConfigRelations(project, ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE);
+			assertEquals(0, DPT.getProjectsTrace(DP1).size());
+			assertEquals(0, DPT.getCfgsTrace(DP1).size());
+			
+			changeActiveConfiguration(project, cfg1);
+			DPT.reset(DP1);
+			index= CCorePlugin.getIndexManager().getIndex(cproject);
+			assertEquals(0, DPT.getProjectsTrace(DP1).size());
+			assertEquals(1, DPT.getCfgsTrace(DP1).size());
+			assertEquals("project.config1", ((ICConfigurationDescription)DPT.getCfgsTrace(DP1).get(0)).getId());
+			
+			changeActiveConfiguration(project, cfg2);
+			DPT.reset(DP1);
+			index= CCorePlugin.getIndexManager().getIndex(cproject);
+			assertEquals(0, DPT.getProjectsTrace(DP1).size());
+			assertEquals(1, DPT.getCfgsTrace(DP1).size());
+			assertEquals("project.config2", ((ICConfigurationDescription)DPT.getCfgsTrace(DP1).get(0)).getId());
+			
+			DPT.reset(DP1);
+			changeConfigRelations(project, ICProjectDescriptionPreferences.CONFIGS_INDEPENDENT);
+			assertEquals(0, DPT.getProjectsTrace(DP1).size());
+			assertEquals(0, DPT.getCfgsTrace(DP1).size());
+			
+			changeActiveConfiguration(project, cfg1);
+			DPT.reset(DP1);
+			index= CCorePlugin.getIndexManager().getIndex(cproject);
+			assertEquals(0, DPT.getProjectsTrace(DP1).size());
+			assertEquals(1, DPT.getCfgsTrace(DP1).size());
+			// should still be config2, as the change in active configuration does not matter
+			assertEquals("project.config2", ((ICConfigurationDescription)DPT.getCfgsTrace(DP1).get(0)).getId());
+			
+			changeActiveConfiguration(project, cfg2);
+			DPT.reset(DP1);
+			index= CCorePlugin.getIndexManager().getIndex(cproject);
+			assertEquals(0, DPT.getProjectsTrace(DP1).size());
+			assertEquals(1, DPT.getCfgsTrace(DP1).size());
+			// there should be no change from the previous state (also config2)
+			assertEquals("project.config2", ((ICConfigurationDescription)DPT.getCfgsTrace(DP1).get(0)).getId());
+		} finally {
+			if (cproject != null) {
+				cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+			}
+		}
+	}
+	
+	public void testGetProvidedFragments() throws Exception {
+		ICProject cproject= CProjectHelper.createCProject("IndexProviderManagerTest", "bin", IPDOMManager.ID_NO_INDEXER);
+
+		try {
+			MockState mockState = new MockState(cproject);
+			MockStateIndexFragmentProvider provider1 = new MockStateIndexFragmentProvider(cproject);
+			MockStateIndexFragmentProvider provider2 = new MockStateIndexFragmentProvider(cproject);
+
+			IndexProviderManager ipm = ((PDOMManager)CCorePlugin.getIndexManager()).getIndexProviderManager();
+			ipm.addIndexProvider(provider1);
+			ipm.addIndexProvider(provider2);
+
+			IIndexFragment[] fragments;
+			mockState.setConfig(MockState.REL_V1_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(2, fragments.length);
+			assertTrue(ArrayUtil.contains(fragments, provider1.fragments[0]));
+			assertTrue(ArrayUtil.contains(fragments, provider2.fragments[0]));
+
+			mockState.setConfig(MockState.DBG_V2_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(2, fragments.length);
+			assertTrue(ArrayUtil.contains(fragments, provider1.fragments[3]));
+			assertTrue(ArrayUtil.contains(fragments, provider2.fragments[3]));
+
+			mockState.setConfig(MockState.DBG_V1_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(0, fragments.length);
+
+			mockState.setConfig(MockState.REL_V2_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(2, fragments.length);
+			assertTrue(ArrayUtil.contains(fragments, provider1.fragments[1]));
+			assertTrue(ArrayUtil.contains(fragments, provider2.fragments[1]));
+
+			mockState.setConfig(MockState.REL_V1_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(2, fragments.length);
+			assertTrue(ArrayUtil.contains(fragments, provider1.fragments[0]));
+			assertTrue(ArrayUtil.contains(fragments, provider2.fragments[0]));
+
+			provider1.invert();
+
+			mockState.setConfig(MockState.REL_V1_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(2, fragments.length);
+			assertTrue(ArrayUtil.contains(fragments, provider1.fragments[3]));
+			assertTrue(ArrayUtil.contains(fragments, provider2.fragments[0]));
+
+			mockState.setConfig(MockState.DBG_V2_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(2, fragments.length);
+			assertTrue(ArrayUtil.contains(fragments, provider1.fragments[0]));
+			assertTrue(ArrayUtil.contains(fragments, provider2.fragments[3]));
+
+			mockState.setConfig(MockState.DBG_V1_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(1, fragments.length);
+			assertTrue(ArrayUtil.contains(fragments, provider1.fragments[1]));
+
+			mockState.setConfig(MockState.REL_V2_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(1, fragments.length);
+			assertTrue(ArrayUtil.contains(fragments, provider2.fragments[1]));
+
+			mockState.setConfig(MockState.REL_V1_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(2, fragments.length);
+			assertTrue(ArrayUtil.contains(fragments, provider1.fragments[3]));
+			assertTrue(ArrayUtil.contains(fragments, provider2.fragments[0]));
+
+			provider2.invert();
+
+			mockState.setConfig(MockState.REL_V1_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(2, fragments.length);
+			assertTrue(ArrayUtil.contains(fragments, provider1.fragments[3]));
+			assertTrue(ArrayUtil.contains(fragments, provider2.fragments[3]));
+
+			mockState.setConfig(MockState.DBG_V2_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(2, fragments.length);
+			assertTrue(ArrayUtil.contains(fragments, provider1.fragments[0]));
+			assertTrue(ArrayUtil.contains(fragments, provider2.fragments[0]));
+
+			mockState.setConfig(MockState.DBG_V1_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(2, fragments.length);
+			assertTrue(ArrayUtil.contains(fragments, provider1.fragments[1]));
+			assertTrue(ArrayUtil.contains(fragments, provider2.fragments[1]));
+
+			mockState.setConfig(MockState.REL_V2_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(0, fragments.length);
+
+			mockState.setConfig(MockState.REL_V1_ID);
+			fragments = ipm.getProvidedIndexFragments(mockState.getCurrentConfig());
+			assertEquals(2, fragments.length);
+			assertTrue(ArrayUtil.contains(fragments, provider1.fragments[3]));
+			assertTrue(ArrayUtil.contains(fragments, provider2.fragments[3]));
+		} finally {
+			if (cproject != null) {
+				cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+			}
+		}
+	}
+	
+	private ICConfigurationDescription newCfg(ICProjectDescription des, String project, String config) throws CoreException {
+		CDefaultConfigurationData data= new CDefaultConfigurationData(project+"."+config, project+" "+config+" name", null);
+		data.initEmptyData();
+		return des.createConfiguration(CCorePlugin.DEFAULT_PROVIDER_ID, data);		
+	}
+	
+	private void changeActiveConfiguration(IProject project, ICConfigurationDescription cfg) throws CoreException {
+		ICProjectDescription pd= core.getProjectDescription(project);
+		pd.setActiveConfiguration(pd.getConfigurationById(cfg.getId()));
+		core.setProjectDescription(project, pd);
+		CCorePlugin.getIndexManager().joinIndexer(8000, NPM);
+	}
+	
+	private void changeConfigRelations(IProject project, int option) throws CoreException {
+		ICProjectDescription pd= core.getProjectDescription(project);
+		pd.setConfigurationRelations(option);
+		core.setProjectDescription(project, pd);
+		CCorePlugin.getIndexManager().joinIndexer(8000, NPM);
+	}
+}
+
+class MockStateIndexProvider implements IIndexProvider {
+	protected ICProject targetProject;
+
+	public MockStateIndexProvider(ICProject cproject) {
+		this.targetProject = cproject;
+	}
+
+	public boolean providesFor(ICProject cproject) throws CoreException {
+		return this.targetProject.equals(cproject);
+	}
+}
+
+class MockStateIndexFragmentProvider extends MockStateIndexProvider implements IIndexFragmentProvider {
+	private boolean invert;
+	final IIndexFragment[] fragments;
+	
+	public void invert() {
+		invert = !invert;
+	}
+
+	public MockStateIndexFragmentProvider(ICProject cproject) {
+		super(cproject);
+
+		fragments = new IIndexFragment[MockState.states.size()];
+		for(int i=0; i<MockState.states.size(); i++) {
+			fragments[i] = new MockPDOM("mock.test.index."+System.identityHashCode(this)+"."+i, PDOM.versionString(PDOM.getDefaultVersion()));
+		}
+	}
+
+	public IIndexFragment[] getIndexFragments(ICConfigurationDescription config) throws CoreException {
+		int index = MockState.states.indexOf(config.getId());
+		index = invert ? (fragments.length-1)-index : index;
+
+		// nb. we're checking this after inverting on purpose
+		if(index == MockState.states.indexOf(MockState.DBG_V1_ID)) {
+			return new IIndexFragment[0];
+		} else {
+			return new IIndexFragment[] {fragments[index]};
+		}
+	}
+}
+
+class MockConfig implements ICConfigurationDescription {
+	String id;
+	IProject project;
+
+	MockConfig(String id, IProject project) {
+		this.id= id;
+		this.project= project;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public ICConfigExtensionReference create(String extensionPoint,
+			String extension) throws CoreException {
+		return null;
+	}
+
+	public ICExternalSetting createExternalSetting(String[] languageIDs,
+			String[] contentTypeIds, String[] extensions,
+			ICSettingEntry[] entries) throws WriteAccessException {
+		return null;
+	}
+
+	public ICFileDescription createFileDescription(IPath path,
+			ICResourceDescription base) throws CoreException,
+			WriteAccessException {
+		return null;
+	}
+
+	public ICFolderDescription createFolderDescription(IPath path,
+			ICFolderDescription base) throws CoreException,
+			WriteAccessException {
+		return null;
+	}
+
+	public ICConfigExtensionReference[] get(String extensionPointID) {
+		return null;
+	}
+
+	public ICBuildSetting getBuildSetting() {
+		return null;
+	}
+
+	public String getBuildSystemId() {
+		return null;
+	}
+
+	public ICdtVariablesContributor getBuildVariablesContributor() {
+		return null;
+	}
+
+	public CConfigurationData getConfigurationData() {
+		return null;
+	}
+
+	public String getDescription() {
+		return null;
+	}
+
+	public ICExternalSetting[] getExternalSettings() {
+		return null;
+	}
+
+	public ICFileDescription[] getFileDescriptions() {
+		return null;
+	}
+
+	public ICFolderDescription[] getFolderDescriptions() {
+		return null;
+	}
+
+	public ICProjectDescription getProjectDescription() {
+		return CoreModel.getDefault().getProjectDescription(project);
+	}
+
+	public Map getReferenceInfo() {
+		return null;
+	}
+
+	public ICResourceDescription getResourceDescription(IPath path,
+			boolean exactPath) {
+		return null;
+	}
+
+	public ICResourceDescription[] getResourceDescriptions() {
+		return null;
+	}
+
+	public ICFolderDescription getRootFolderDescription() {return null;}
+	public Object getSessionProperty(QualifiedName name) {return null;}
+	public ICSourceEntry[] getSourceEntries() {return null;}
+	public ICTargetPlatformSetting getTargetPlatformSetting() {return null;}
+	public boolean isActive() {return false;}
+	public boolean isModified() {return false;}
+	public boolean isPreferenceConfiguration() {return false;}
+	public void remove(ICConfigExtensionReference ext) throws CoreException {}
+	public void remove(String extensionPoint) throws CoreException {}
+	public void removeExternalSetting(ICExternalSetting setting) throws WriteAccessException {}
+	public void removeExternalSettings() throws WriteAccessException {}
+	public void removeResourceDescription(ICResourceDescription des)
+	throws CoreException, WriteAccessException {}
+	public void setActive() throws WriteAccessException {}
+	public void setConfigurationData(String buildSystemId,
+			CConfigurationData data) throws WriteAccessException {}
+	public void setDescription(String des) throws WriteAccessException {}
+	public void setName(String name) throws WriteAccessException {}
+	public void setReferenceInfo(Map<String, String> refs) throws WriteAccessException {}
+	public void setSessionProperty(QualifiedName name, Object value) {}
+	public void setSourceEntries(ICSourceEntry[] entries) throws CoreException,
+	WriteAccessException {}
+	public ICSettingObject[] getChildSettings() {return null;}
+	public ICConfigurationDescription getConfiguration() {return null;}
+	public String getName() {return null;}
+	public ICSettingContainer getParent() {return null;}
+	public int getType() {return 0;}
+	public boolean isReadOnly() {return false;}
+	public boolean isValid() {return false;}
+	public ICStorageElement getStorage(String id, boolean create) throws CoreException {
+		return null;
+	}
+	public ICStorageElement importStorage(String id, ICStorageElement storage) {
+		return null;
+	}
+
+	public void removeStorage(String id) throws CoreException {
+	}
+
+	public ICLanguageSetting getLanguageSettingForFile(IPath path, boolean ignoreExludeStatus) {
+		return null;
+	}
+
+	public String[] getExternalSettingsProviderIds() {
+		return null;
+	}
+
+	public void setExternalSettingsProviderIds(String[] ids) {}
+
+	public void updateExternalSettingsProviders(String[] ids) {}
+
+	public ICSourceEntry[] getResolvedSourceEntries() {
+		return null;
+	}
+
+	public CConfigurationStatus getConfigurationStatus() {
+		return CConfigurationStatus.CFG_STATUS_OK;
+	}
+
+	public void setReadOnly(boolean readOnly, boolean keepModify) {}
+}
+
+/*
+ * This represents a project state, here we use configuration IDs as the only state variable
+ */
+class MockState {
+	public static final String REL_V1_ID = "rel_v1";
+	public static final String REL_V2_ID = "rel_v2";
+	public static final String DBG_V1_ID = "dbg_v1";
+	public static final String DBG_V2_ID = "dbg_v2";
+	public static final List states = new ArrayList(Arrays.asList(new String[]{REL_V1_ID, REL_V2_ID, DBG_V1_ID, DBG_V2_ID}));
+
+	private IProject project;
+	private String currentConfig;
+
+	public MockState(ICProject cproject) {
+		this.currentConfig = REL_V1_ID;
+		this.project= cproject.getProject();
+	}
+
+	public ICConfigurationDescription getCurrentConfig() {
+		return new MockConfig(currentConfig, project);
+	}
+
+	public void setConfig(String newConfig) throws CoreException {
+		currentConfig = newConfig;
+	}
+}
+
+class MockPDOM extends EmptyIndexFragment {
+	String id;
+	String version;
+	
+	MockPDOM(String id, String version) {
+		this.id= id;
+		this.version= version;
+	}
+	
+	@Override
+	public String getProperty(String propertyName) throws CoreException {
+		if(IIndexFragment.PROPERTY_FRAGMENT_ID.equals(propertyName)) {
+			return id;
+		}
+		if(IIndexFragment.PROPERTY_FRAGMENT_FORMAT_ID.equals(propertyName)) {
+			return PDOM.FRAGMENT_PROPERTY_VALUE_FORMAT_ID;
+		}
+		if(IIndexFragment.PROPERTY_FRAGMENT_FORMAT_VERSION.equals(propertyName)) {
+			return version;
+		}
+		return null;
+	}
+	
+	@Override
+	public String toString() {
+		return "[Mock index fragment "+id+"."+System.identityHashCode(this)+"]";
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexSearchTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexSearchTest.java
new file mode 100644
index 0000000..ef72bed
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexSearchTest.java
@@ -0,0 +1,310 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.internal.index.tests;
+
+import java.util.LinkedList;
+import java.util.regex.Pattern;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMNode;
+import org.eclipse.cdt.core.dom.IPDOMVisitor;
+import org.eclipse.cdt.core.dom.ast.IEnumeration;
+import org.eclipse.cdt.core.dom.ast.IEnumerator;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexBinding;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.internal.core.index.CIndex;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
+import org.eclipse.core.runtime.CoreException;
+
+public class IndexSearchTest extends IndexTestBase {
+
+	private static final IndexFilter INDEX_FILTER = IndexFilter.ALL_DECLARED;
+
+	public static TestSuite suite() {
+		TestSuite suite= suite(IndexSearchTest.class, "_");
+		suite.addTest(new IndexSearchTest("deleteProject"));
+		return suite;
+	}
+
+	private ICProject fProject= null;
+	private IIndex fIndex= null;
+	
+	public IndexSearchTest(String name) {
+		super(name);
+	}
+
+	@Override
+	public void setUp() throws Exception {
+		super.setUp();
+		if (fProject == null) {
+			fProject= createProject(true, "resources/indexTests/search");
+		}
+		fIndex= CCorePlugin.getIndexManager().getIndex(fProject);
+		fIndex.acquireReadLock();
+	}
+	
+	@Override
+	public void tearDown() throws Exception {
+		fIndex.releaseReadLock();
+		super.tearDown();
+	}
+		
+	public void deleteProject() {
+		if (fProject != null) {
+			CProjectHelper.delete(fProject);
+		}
+	}
+
+	private void checkIsClass(IIndexBinding binding) {
+		assertTrue(binding instanceof ICPPClassType);
+	}
+
+	private void checkIsNamespace(IIndexBinding binding) {
+		assertTrue(binding instanceof ICPPNamespace);
+	}
+
+	private void checkIsEnumerator(IIndexBinding binding) {
+		assertTrue(binding instanceof IEnumerator);
+	}
+
+	private void checkIsEnumeration(IIndexBinding binding) {
+		assertTrue(binding instanceof IEnumeration);
+	}
+
+	private void checkIsFunction(IIndexBinding binding) {
+		assertTrue(binding instanceof IFunction);
+		assertTrue(!(binding instanceof ICPPMethod));
+	}
+
+	private void checkIsVariable(IIndexBinding binding) {
+		assertTrue(binding instanceof IVariable);
+		assertTrue(!(binding instanceof ICPPField));
+	}
+
+	public void testFindClassInNamespace() throws CoreException {
+		String scl = "C160913";
+		Pattern pcl= Pattern.compile(scl);
+		String sns = "ns160913";
+		Pattern pns= Pattern.compile(sns);
+		
+		IIndexBinding[] bindings;
+		
+		bindings= fIndex.findBindings(pcl, true, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsClass(bindings[0]);
+
+		bindings= fIndex.findBindings(scl.toCharArray(), INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsClass(bindings[0]);
+
+		bindings= fIndex.findBindings(pcl, false, INDEX_FILTER, NPM);
+		assertEquals(3, bindings.length);
+		checkIsClass(bindings[0]);
+		checkIsClass(bindings[1]);
+		checkIsClass(bindings[2]);
+
+		bindings= fIndex.findBindings(new Pattern[]{pns, pcl}, true, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsClass(bindings[0]);
+
+		bindings= fIndex.findBindings(new char[][]{sns.toCharArray(), scl.toCharArray()}, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsClass(bindings[0]);
+
+		bindings= fIndex.findBindings(new Pattern[]{pns, pcl}, false, INDEX_FILTER, NPM);
+		assertEquals(2, bindings.length);
+		checkIsClass(bindings[0]);
+		checkIsClass(bindings[1]);
+
+		bindings= fIndex.findBindings(new Pattern[]{pns, pns, pcl}, true, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsClass(bindings[0]);
+
+		bindings= fIndex.findBindings(new char[][]{sns.toCharArray(), sns.toCharArray(), scl.toCharArray()}, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsClass(bindings[0]);
+
+		bindings= fIndex.findBindings(new Pattern[]{pns, pns, pcl}, false, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsClass(bindings[0]);
+	}
+	
+	public void testFindNamespaceInNamespace() throws CoreException {
+		Pattern pcl= Pattern.compile("C160913");
+		Pattern pns= Pattern.compile("ns160913");
+		char[] scl= pcl.pattern().toCharArray();
+		char[] sns= pns.pattern().toCharArray();
+		
+		IIndexBinding[] bindings;
+
+		bindings= fIndex.findBindings(pns, true, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsNamespace(bindings[0]);
+
+		bindings= fIndex.findBindings(sns, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsNamespace(bindings[0]);
+
+		bindings= fIndex.findBindings(pns, false, INDEX_FILTER, NPM);
+		assertEquals(2, bindings.length);
+		checkIsNamespace(bindings[0]);
+		checkIsNamespace(bindings[1]);
+
+		bindings= fIndex.findBindings(new Pattern[]{pns, pns}, true, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsNamespace(bindings[0]);
+
+		bindings= fIndex.findBindings(new char[][]{sns, sns}, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsNamespace(bindings[0]);
+
+		bindings= fIndex.findBindings(new Pattern[]{pns, pns}, false, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsNamespace(bindings[0]);
+	}
+
+	public void testClassInUnnamedNamespace() throws CoreException {
+		Pattern pcl= Pattern.compile("CInUnnamed160913");
+		
+		IIndexBinding[] bindings;
+
+		// the binding in the unnamed namespace is not visible in global scope.
+		bindings= fIndex.findBindings(pcl, true, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		assertTrue(bindings[0].isFileLocal());
+
+		bindings= fIndex.findBindings(pcl.pattern().toCharArray(), INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		assertTrue(bindings[0].isFileLocal());
+}
+
+	public void testFindEnumerator() throws CoreException {
+		Pattern pEnumeration= Pattern.compile("E20061017");
+		Pattern pEnumerator= Pattern.compile("e20061017");
+		char[] sEnumeration= pEnumeration.pattern().toCharArray();
+		char[] sEnumerator= pEnumerator.pattern().toCharArray();
+
+		IIndexBinding[] bindings;
+		
+		// enumerators are found in global scope
+		bindings= fIndex.findBindings(pEnumerator, true, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsEnumerator(bindings[0]);
+
+		bindings= fIndex.findBindings(pEnumerator, false, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsEnumerator(bindings[0]);
+
+		bindings= fIndex.findBindings(new Pattern[]{pEnumeration, pEnumerator}, true, INDEX_FILTER, NPM);
+		assertEquals(0, bindings.length);
+
+		bindings= fIndex.findBindings(new char[][]{sEnumeration, sEnumerator}, INDEX_FILTER, NPM);
+		assertEquals(0, bindings.length);
+
+		bindings= fIndex.findBindings(new Pattern[]{pEnumeration, pEnumerator}, false, INDEX_FILTER, NPM);
+		assertEquals(0, bindings.length);
+		
+		bindings= fIndex.findBindings(pEnumeration, true, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsEnumeration(bindings[0]);
+
+		bindings= fIndex.findBindings(sEnumeration, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsEnumeration(bindings[0]);
+
+		bindings= fIndex.findBindings(pEnumeration, false, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		checkIsEnumeration(bindings[0]);
+	}
+
+	public void testCaseInsensitivePatternSearch_239669() throws CoreException {
+		IIndexBinding[] bindings;
+
+		Pattern pEnumAndEnumeration= Pattern.compile("E20061017", Pattern.CASE_INSENSITIVE);
+		Pattern pEnumeration= Pattern.compile("E20061017");
+		bindings= fIndex.findBindings(pEnumAndEnumeration, true, INDEX_FILTER, NPM);
+		assertEquals(2, bindings.length);
+		bindings= fIndex.findBindings(pEnumeration, true, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+
+		pEnumAndEnumeration= Pattern.compile("E2006101.*", Pattern.CASE_INSENSITIVE);
+		pEnumeration= Pattern.compile("E2006101.*");
+		bindings= fIndex.findBindings(pEnumAndEnumeration, true, INDEX_FILTER, NPM);
+		assertEquals(2, bindings.length);
+		bindings= fIndex.findBindings(pEnumeration, true, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+		
+		Pattern macro1= Pattern.compile("Foo", Pattern.CASE_INSENSITIVE);
+		Pattern macro2= Pattern.compile("Foo");
+		bindings= fIndex.findMacroContainers(macro1, INDEX_FILTER, NPM);
+		assertEquals(2, bindings.length);
+		bindings= fIndex.findMacroContainers(macro2, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+
+		macro1= Pattern.compile("Foo.*", Pattern.CASE_INSENSITIVE);
+		macro2= Pattern.compile("Foo.*");
+		bindings= fIndex.findMacroContainers(macro1, INDEX_FILTER, NPM);
+		assertEquals(2, bindings.length);
+		bindings= fIndex.findMacroContainers(macro2, INDEX_FILTER, NPM);
+		assertEquals(1, bindings.length);
+	}
+
+	
+	public void testFindStatic_161216() throws CoreException {
+		Pattern pFunc= Pattern.compile("staticFunc20061017");
+		Pattern pVar= Pattern.compile("staticVar20061017");
+		
+		IIndexBinding[] bindings;
+		
+		bindings= fIndex.findBindings(pFunc, false, INDEX_FILTER, NPM);
+		assertEquals(2, bindings.length);
+		checkIsFunction(bindings[0]);
+		checkIsFunction(bindings[1]);
+
+		bindings= fIndex.findBindings(pVar, false, INDEX_FILTER, NPM);
+		assertEquals(2, bindings.length);
+		checkIsVariable(bindings[0]);
+		checkIsVariable(bindings[1]);
+	}
+	
+	public void testSanityOfMayHaveChildren() throws CoreException {
+		PDOM pdom= (PDOM) ((CIndex) fIndex).getPrimaryFragments()[0];
+		pdom.accept(new IPDOMVisitor() {
+			LinkedList stack= new LinkedList();
+			public boolean visit(IPDOMNode node) throws CoreException {
+				if (!stack.isEmpty()) {
+					Object last= stack.getLast();
+					if (last instanceof PDOMBinding) {
+						assertTrue(((PDOMBinding) last).mayHaveChildren());
+					}
+				}
+				stack.add(node);
+				return true;
+			}
+			public void leave(IPDOMNode node) throws CoreException {
+				assertEquals(stack.removeLast(), node);
+			}
+		});
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexTestBase.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexTestBase.java
new file mode 100644
index 0000000..c328f9b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexTestBase.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.internal.index.tests;
+
+import java.io.IOException;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+public class IndexTestBase extends BaseTestCase {
+	protected static int INDEXER_WAIT_TIME= 8000;
+	
+	public IndexTestBase(String name) {
+		super(name);
+	}
+
+	protected ICProject createProject(final boolean useCpp, final String importSource) throws CoreException {
+		// Create the project
+		final ICProject[] result= new ICProject[] {null};
+		final IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		workspace.run(new IWorkspaceRunnable() {
+			public void run(IProgressMonitor monitor) throws CoreException {
+				String name= "IndexTest_" + System.currentTimeMillis();
+				if (useCpp) {
+					result[0]= CProjectHelper.createCCProject(name, null, IPDOMManager.ID_NO_INDEXER);
+				}
+				else {
+					result[0]= CProjectHelper.createCProject(name, null, IPDOMManager.ID_NO_INDEXER);
+				}					
+				CProjectHelper.importSourcesFromPlugin(result[0], CTestPlugin.getDefault().getBundle(), importSource);
+			}
+		}, null);
+		CCorePlugin.getIndexManager().setIndexerId(result[0], IPDOMManager.ID_FAST_INDEXER);		
+		// wait until the indexer is done
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(10000, new NullProgressMonitor()));
+		return result[0];
+	}
+	
+	protected String readTaggedComment(String tag) throws Exception {
+		return TestSourceReader.readTaggedComment(CTestPlugin.getDefault().getBundle(), "parser", getClass(), tag);
+	}
+	
+    protected StringBuffer[] getContentsForTest(int blocks) throws IOException {
+    	return TestSourceReader.getContentsForTest(
+    			CTestPlugin.getDefault().getBundle(), "parser", getClass(), getName(), blocks);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexTests.java
new file mode 100644
index 0000000..6b3d23b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexTests.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.internal.index.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Test suite for the indexer tests
+ */
+public class IndexTests extends TestSuite {
+	public static Test suite() {
+		TestSuite suite = new IndexTests();
+		
+		suite.addTest(IndexCompositeTests.suite());
+		suite.addTest(IndexListenerTest.suite());
+		suite.addTest(IndexLocationTest.suite());
+		suite.addTest(IndexSearchTest.suite());
+		suite.addTest(IndexIncludeTest.suite());
+		suite.addTest(IndexUpdateTests.suite());
+		suite.addTest(IndexBugsTests.suite());
+		suite.addTest(IndexNamesTests.suite());
+		suite.addTest(TeamSharedIndexTest.suite());
+		suite.addTest(IndexProviderManagerTest.suite());
+		
+		IndexCPPBindingResolutionBugs.addTests(suite);
+		IndexCPPBindingResolutionTest.addTests(suite);
+		IndexCPPTemplateResolutionTest.addTests(suite);
+		IndexCBindingResolutionBugs.addTests(suite);
+		IndexCBindingResolutionTest.addTests(suite);
+		
+		return suite;
+	}	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java
new file mode 100644
index 0000000..f914709
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java
@@ -0,0 +1,1173 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.internal.index.tests;
+
+import java.util.Arrays;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IEnumeration;
+import org.eclipse.cdt.core.dom.ast.IEnumerator;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.IValue;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceAlias;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPReferenceType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateNonTypeParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTemplateParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTypeParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexBinding;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+
+public class IndexUpdateTests extends IndexTestBase {
+
+	private static final String EXPLICIT = "explicit";
+	private static final String VIRTUAL = "virtual";
+	private static final String PURE_VIRTUAL= "pure-virtual";
+	private static final String PROTECTED = "protected";
+	private static final String PUBLIC = "public";
+	private static final String PRIVATE = "private";
+	private static final String CHAR = "char";
+	private static final String INLINE = "inline";
+	private static final String MUTABLE = "mutable";
+	private static final String STATIC = "static";
+	private static final String REGISTER = "register";
+	private static final String AUTO = "auto";
+	private static final String SHORT = "short int";
+	private static final String INT = "int";
+	private static final String IMPLICIT= "implicit";
+
+	public static TestSuite suite() {
+		TestSuite suite= suite(IndexUpdateTests.class, "_");
+		suite.addTest(new IndexUpdateTests("deleteProject"));
+		return suite;
+	}
+
+	private ICProject fCppProject= null;
+	private ICProject fCProject= null;
+	private IIndex fIndex= null;
+	private StringBuffer[] fContents;
+	private IFile fFile;
+	private IFile fHeader;
+	private int fContentUsed;
+	
+	public IndexUpdateTests(String name) {
+		super(name);
+	}
+
+	@Override
+	public void setUp() throws Exception {
+		super.setUp();
+		if (fCppProject == null) {
+			fCppProject= CProjectHelper.createCCProject("indexUpdateTestsCpp", null, IPDOMManager.ID_FAST_INDEXER);
+		}
+		if (fCProject == null) {
+			fCProject= CProjectHelper.createCProject("indexUpdateTestsC", null, IPDOMManager.ID_FAST_INDEXER);
+		}
+		CCorePlugin.getIndexManager().joinIndexer(INDEXER_WAIT_TIME, NPM);
+		fIndex= CCorePlugin.getIndexManager().getIndex(new ICProject[] {fCProject, fCppProject});
+	}
+
+	private void setupHeader(int totalFileVersions, boolean cpp) throws Exception {
+		if (fContents == null) {
+			fContents= getContentsForTest(totalFileVersions);
+			fContentUsed= -1;
+		}
+		IProject project= cpp ? fCppProject.getProject() : fCProject.getProject();
+		fHeader= TestSourceReader.createFile(project, "header.h", fContents[++fContentUsed].toString());
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(INDEXER_WAIT_TIME, NPM));
+	}
+
+	private void setupFile(int totalFileVersions, boolean cpp) throws Exception {
+		if (fContents == null) {
+			fContents= getContentsForTest(totalFileVersions);
+			fContentUsed= -1;
+		}
+		IProject project= cpp ? fCppProject.getProject() : fCProject.getProject();
+		fFile= TestSourceReader.createFile(project, "file" + (cpp ? ".cpp" : ".c"), fContents[++fContentUsed].toString());
+		fContentUsed= 0;
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, fFile, INDEXER_WAIT_TIME);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(INDEXER_WAIT_TIME, NPM));
+	}
+	
+	private void updateFile() throws Exception {
+		fFile= TestSourceReader.createFile(fFile.getParent(), fFile.getName(), fContents[++fContentUsed].toString());
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, fFile, INDEXER_WAIT_TIME);
+	}
+	
+	@Override
+	public void tearDown() throws Exception {
+		fIndex= null;
+		if (fFile != null) {
+			fFile.delete(true, NPM);
+		}
+		if (fHeader != null) {
+			fHeader.delete(true, NPM);
+		}
+		CCorePlugin.getIndexManager().joinIndexer(INDEXER_WAIT_TIME, NPM);
+		super.tearDown();
+	}
+		
+	public void deleteProject() {
+		if (fCProject != null) {
+			CProjectHelper.delete(fCProject);
+			fCProject= null;
+		}
+		if (fCppProject != null) {
+			CProjectHelper.delete(fCppProject);
+			fCppProject= null;
+		}
+	}
+	
+	// int globalVar;
+	
+	// short globalVar;
+	
+	// auto int globalVar;
+	
+	// register int globalVar;
+	public void testGlobalCVariable() throws Exception {
+		setupFile(4, false);
+		checkVariable("globalVar", INT, new String[] {});
+		updateFile();
+		checkVariable("globalVar", SHORT, new String[] {});
+		updateFile();
+		checkVariable("globalVar", INT, new String[] {AUTO});
+		updateFile();
+		checkVariable("globalVar", INT, new String[] {REGISTER});
+	}
+
+	private void checkVariable(String name, String type, String[] modifiers) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			IVariable var = (IVariable) findBinding(name);
+			checkVariable(var, type, modifiers);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	private void checkValue(String name, Long value) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			IBinding b = findBinding(name);
+			IValue v= null;
+			if (b instanceof IVariable) 
+				v= ((IVariable) b).getInitialValue();
+			else if (b instanceof IEnumerator) 
+				v= ((IEnumerator) b).getValue();
+			else 
+				fail();
+			
+			if (value == null)
+				assertNull(v);
+			else 
+				assertEquals(value, v.numericalValue());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	private void checkVariable(IVariable var, String type, String[] modifiers) throws DOMException {
+		assertEquals(msg(), type, ASTTypeUtil.getType(var.getType()));
+		checkModifier(modifiers, AUTO, var.isAuto());
+		checkModifier(modifiers, REGISTER, var.isRegister());
+		checkModifier(modifiers, STATIC, var.isStatic());
+	}
+
+	private void checkModifier(String[] modifiers, String modifier, boolean actual) throws DOMException {
+		assertEquals(msg(modifier), hasMod(modifiers, modifier), actual);
+	}
+
+	private boolean hasMod(String[] modifiers, String mod) {
+		return Arrays.asList(modifiers).contains(mod);
+	}
+
+	private IIndexBinding findBinding(String name) throws CoreException {
+		String[] names= name.split("::");
+		char[][] nchars= new char[names.length][];
+		for (int i = 0; i < nchars.length; i++) {
+			nchars[i]= names[i].toCharArray();
+		}
+		return fIndex.findBindings(nchars, IndexFilter.ALL_DECLARED, NPM)[0];
+	}
+
+	private String msg() {
+		return "Update #" + fContentUsed;
+	}
+
+	private String msg(String modifier) {
+		return msg() + "; " + modifier + ":";
+	}
+
+	// int globalVar;
+	
+	// short globalVar;
+	
+	// auto int globalVar;
+	
+	// register int globalVar;
+	
+	public void testGlobalCppVariable() throws Exception {
+		setupFile(4, true);
+		checkCppVariable("globalVar", INT, new String[]{});
+		updateFile();
+		checkCppVariable("globalVar", SHORT, new String[]{});
+		updateFile();
+		checkCppVariable("globalVar", INT, new String[]{AUTO});
+		updateFile();
+		checkCppVariable("globalVar", INT, new String[]{REGISTER});
+	}
+
+	private void checkCppVariable(String name, String type, String[] modifiers) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			ICPPVariable var = (ICPPVariable) findBinding(name);
+			checkCppVariable(var, type, modifiers);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	private void checkCppVariable(ICPPVariable var, String type, String[] modifiers) throws Exception {
+		checkVariable(var, type, modifiers);
+		checkModifier(modifiers, MUTABLE, var.isMutable());
+	}
+
+	// int globalFunction(int a, int b){};
+	
+	// short globalFunction(int a, int b){};
+
+	// int globalFunction(char a){};
+
+	// inline int globalFunction(char a){};
+	public void testCFunction() throws Exception {
+		setupFile(4, false);
+		checkFunction("globalFunction", new String[] {INT, INT, INT}, new String[]{});
+		updateFile();
+		checkFunction("globalFunction", new String[] {SHORT, INT, INT}, new String[]{});
+		updateFile();
+		checkFunction("globalFunction", new String[] {INT, CHAR}, new String[]{});
+		updateFile();
+		checkFunction("globalFunction", new String[] {INT, CHAR}, new String[]{INLINE});
+	}
+
+	private void checkFunction(String name, String[] types, String[] modifiers) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			IFunction func = (IFunction) findBinding(name);
+			checkFunction(func, types, modifiers);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	private void checkFunction(IFunction func, String[] types, String[] modifiers)
+			throws DOMException {
+		assertEquals(msg(), types[0], ASTTypeUtil.getType(func.getType().getReturnType()));
+		IParameter[] params= func.getParameters();
+		assertEquals(msg(), types.length-1, params.length);
+		for (int i = 0; i < params.length; i++) {
+			IParameter parameter = params[i];
+			assertEquals(msg(), types[i+1], ASTTypeUtil.getType(parameter.getType()));
+		}
+		checkModifier(modifiers, INLINE, func.isInline());
+		checkModifier(modifiers, STATIC, func.isStatic());
+	}
+
+	
+	// int globalFunction(int a, int b){};
+	
+	// short globalFunction(int a, int b){};
+
+	// int globalFunction(char a){};
+
+	// inline int globalFunction(char a){};
+	public void testCppFunction() throws Exception {
+		setupFile(4, true);
+		checkFunction("globalFunction", new String[] {INT, INT, INT}, new String[]{});
+		updateFile();
+		checkFunction("globalFunction", new String[] {SHORT, INT, INT}, new String[]{});
+		updateFile();
+		checkFunction("globalFunction", new String[] {INT, CHAR}, new String[]{});
+		updateFile();
+		checkFunction("globalFunction", new String[] {INT, CHAR}, new String[]{INLINE});
+	}
+	
+	
+	// struct my_struct {int fField;};
+	
+	// struct my_struct {short fField;};
+	
+	public void testCField() throws Exception {
+		setupFile(2, false);
+		checkVariable("my_struct::fField", INT, new String[]{});
+		updateFile();
+		checkVariable("my_struct::fField", SHORT, new String[]{});
+	}
+
+	
+	// class MyClass {int fField;};
+	
+	// class MyClass {short fField;};
+	
+	// class MyClass {mutable int fField;};
+
+	// class MyClass {public: int fField;};
+
+	// class MyClass {protected: int fField;};
+
+	// class MyClass {private: int fField;};
+
+	// class MyClass {private: static int fField;};
+	public void testCppField() throws Exception {
+		setupFile(7, true);
+		checkCppField("MyClass::fField", INT, new String[]{PRIVATE});
+		updateFile();
+		checkCppField("MyClass::fField", SHORT, new String[]{PRIVATE});
+		updateFile();
+		checkCppField("MyClass::fField", INT, new String[]{PRIVATE, MUTABLE});
+		updateFile();
+		checkCppField("MyClass::fField", INT, new String[]{PUBLIC});
+		updateFile();
+		checkCppField("MyClass::fField", INT, new String[]{PROTECTED});
+		updateFile();
+		checkCppField("MyClass::fField", INT, new String[]{PRIVATE});
+		updateFile();
+		checkCppField("MyClass::fField", INT, new String[]{PRIVATE, STATIC});
+	}
+
+	private void checkCppField(String name, String type, String[] modifiers) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			ICPPField field = (ICPPField) findBinding(name);
+			checkCppVariable(field, type, modifiers);
+			checkCppMember(field, modifiers);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	private void checkCppMember(ICPPMember member, String[] modifiers) throws Exception {
+		int visibility= member.getVisibility();
+		checkModifier(modifiers, PUBLIC, visibility == ICPPMember.v_public);
+		checkModifier(modifiers, PROTECTED, visibility == ICPPMember.v_protected);
+		checkModifier(modifiers, PRIVATE, visibility == ICPPMember.v_private);
+	}
+
+
+	// class MyClass {int method(int a, int b);};
+	
+	// class MyClass {short method(int a, int b);};
+	
+	// class MyClass {int method(char a);};
+	
+	// class MyClass {inline int method(char a);};
+
+	// class MyClass {virtual int method(char a);};
+
+	// class MyClass {public: int method(char a);};
+
+	// class MyClass {protected: int method(char a);};
+
+	// class MyClass {private: int method(char a);};
+
+	// class MyClass {int method(char a){};};
+	
+	// class MyClass {virtual int method(char a) = 0;};
+
+	public void testCppMethod() throws Exception {
+		setupFile(10, true);
+		checkCppMethod("MyClass::method", new String[] {INT, INT, INT}, new String[]{PRIVATE});
+		updateFile();
+		checkCppMethod("MyClass::method", new String[] {SHORT, INT, INT}, new String[]{PRIVATE});
+		updateFile();
+		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PRIVATE});
+		updateFile();
+		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PRIVATE, INLINE});
+		updateFile();
+		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PRIVATE, VIRTUAL});
+		updateFile();
+		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PUBLIC});
+		updateFile();
+		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PROTECTED});
+		updateFile();
+		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PRIVATE});
+		updateFile();
+		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PRIVATE, INLINE});
+		updateFile();
+		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PRIVATE, VIRTUAL, PURE_VIRTUAL});
+	}
+
+	// class MyClass {protected: int method(int a, int b);};
+	
+	// #include "header.h"
+	// int MyClass::method(int a, int b);
+	
+	// #include "header.h"
+	// char MyClass::method(int a, int b);
+	
+	public void testFixedCppMethod() throws Exception {
+		setupHeader(3, true);
+		checkCppMethod("MyClass::method", new String[] {INT, INT, INT}, new String[]{PROTECTED});
+		setupFile(0, true);
+		checkCppMethod("MyClass::method", new String[] {INT, INT, INT}, new String[]{PROTECTED});
+		updateFile();
+		checkCppMethod("MyClass::method", new String[] {INT, INT, INT}, new String[]{PROTECTED});
+	}
+
+	private void checkCppMethod(String name, String[] types, String[] modifiers) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			ICPPMethod method = (ICPPMethod) findBinding(name);
+			checkCppMethod(method, types, modifiers);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	private void checkCppMethod(ICPPMethod method, String[] types, String[] modifiers)
+			throws DOMException, Exception {
+		checkFunction(method, types, modifiers);
+		checkCppMember(method, modifiers);
+		checkModifier(modifiers, VIRTUAL, method.isVirtual());
+		checkModifier(modifiers, PURE_VIRTUAL, method.isPureVirtual());
+		checkModifier(modifiers, IMPLICIT, method.isImplicit());
+	}
+	
+	// class MyClass {MyClass(int a, int b);};
+	
+	// class MyClass {MyClass(char a, int b);};
+	
+	// class MyClass {explicit MyClass(char a, int b);};
+	
+	// class MyClass {public: MyClass(char a, int b);};
+
+	// class MyClass {protected: MyClass(char a, int b);};
+
+	// class MyClass {private: MyClass(char a, int b);};
+
+	public void testCppConstructor() throws Exception {
+		setupFile(6, true);
+		checkCppConstructor("MyClass::MyClass", new String[] {"", INT, INT}, new String[]{PRIVATE});
+		updateFile();
+		checkCppConstructor("MyClass::MyClass", new String[] {"", CHAR, INT}, new String[]{PRIVATE});
+		updateFile();
+		checkCppConstructor("MyClass::MyClass", new String[] {"", CHAR, INT}, new String[]{PRIVATE,EXPLICIT});
+		updateFile();
+		checkCppConstructor("MyClass::MyClass", new String[] {"", CHAR, INT}, new String[]{PUBLIC});
+		updateFile();
+		checkCppConstructor("MyClass::MyClass", new String[] {"", CHAR, INT}, new String[]{PROTECTED});
+		updateFile();
+		checkCppConstructor("MyClass::MyClass", new String[] {"", CHAR, INT}, new String[]{PRIVATE});
+	}
+
+	private void checkCppConstructor(String name, String[] types, String[] modifiers) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			ICPPConstructor ctor = (ICPPConstructor) findBinding(name);
+			checkCppConstructor(ctor, types, modifiers);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	private void checkCppConstructor(ICPPConstructor ctor, String[] types, String[] modifiers) throws Exception {
+		checkFunction(ctor, types, modifiers);
+		checkCppMember(ctor, modifiers);
+		checkModifier(modifiers, EXPLICIT, ctor.isExplicit());
+	}
+
+	// class MyClass {};
+	
+	// class MyClass {protected: MyClass(void);};
+	
+	// class MyClass {explicit MyClass(const MyClass& rhs);};
+	
+	// class MyClass {public: MyClass& operator=(const MyClass& rhs) {}};
+
+	// class MyClass {};
+	public void testImplicitMethods() throws Exception {
+		setupFile(5, true);
+		checkImplicitMethods("MyClass", 
+				new String[] {IMPLICIT, PUBLIC}, 
+				new String[] {IMPLICIT, PUBLIC},
+				new String[] {IMPLICIT, PUBLIC});
+		updateFile();
+		checkImplicitMethods("MyClass", 
+				new String[] {PROTECTED}, 
+				new String[] {IMPLICIT, PUBLIC},
+				new String[] {IMPLICIT, PUBLIC});
+		updateFile();
+		checkImplicitMethods("MyClass", 
+				null, // no default constructor, because we declared the copy constr.
+				new String[] {EXPLICIT, PRIVATE},
+				new String[] {IMPLICIT, PUBLIC});
+		updateFile();
+		checkImplicitMethods("MyClass", 
+				new String[] {IMPLICIT, PUBLIC}, 
+				new String[] {IMPLICIT, PUBLIC},
+				new String[] {INLINE, PUBLIC});
+		updateFile();
+		checkImplicitMethods("MyClass", 
+				new String[] {IMPLICIT, PUBLIC}, 
+				new String[] {IMPLICIT, PUBLIC},
+				new String[] {IMPLICIT, PUBLIC});
+	}
+
+	private void checkImplicitMethods(String name, String[] m1, String[] m2, String[] m3) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			final char[] nchars = name.toCharArray();
+			final String refType = name + " &";
+			final String constRefType = "const " + refType;
+			IIndexBinding[] ctors= fIndex.findBindings(new char[][]{nchars, nchars}, IndexFilter.ALL_DECLARED_OR_IMPLICIT, NPM);
+
+			int count= 0;
+			for (int i = 0; i < ctors.length; i++) {
+				IIndexBinding ctor= ctors[i];
+				if (ctor.isFileLocal()) {
+					ctors[count++]= ctor;
+				}
+			}
+			assertEquals(m1 == null ? 1 : 2, count);
+			final IType[] parameterTypes = ((ICPPConstructor) ctors[0]).getType().getParameterTypes();
+			if (parameterTypes.length!=1 || !(parameterTypes[0] instanceof ICPPReferenceType)) {
+				IIndexBinding h= ctors[0]; ctors[0]= ctors[1]; ctors[1]= h;
+			}
+			if (m1 != null) {
+				checkCppConstructor((ICPPConstructor) ctors[1], new String[]{"", "void"}, m1);
+			}
+			checkCppConstructor((ICPPConstructor) ctors[0], new String[]{"", constRefType}, m2);
+
+			IIndexBinding[] assignmentOps= fIndex.findBindings(new char[][]{nchars, "operator =".toCharArray()}, IndexFilter.ALL_DECLARED_OR_IMPLICIT, NPM);
+			count= 0;
+			for (int i = 0; i < assignmentOps.length; i++) {
+				IIndexBinding assignmentOp= assignmentOps[i];
+				if (assignmentOp.isFileLocal()) {
+					assignmentOps[count++]= assignmentOp;
+				}
+			}
+			assertEquals(1, count);
+			checkCppMethod((ICPPMethod) assignmentOps[0], new String[]{refType, constRefType}, m3);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	// typedef int myType;
+	
+	// typedef short myType;
+	public void testCTypedef() throws Exception {
+		setupFile(2, false);
+		checkTypedef("myType", INT);
+		updateFile();
+		checkTypedef("myType", SHORT);
+	}
+
+	private void checkTypedef(String name, String type) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			ITypedef var = (ITypedef) findBinding(name);
+			checkTypedef(var, type);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	private void checkTypedef(ITypedef var, String type) throws DOMException {
+		assertEquals(msg(), type, ASTTypeUtil.getType(var.getType()));
+	}
+	
+	// typedef int myType;
+	
+	// typedef short myType;
+	public void testCppTypedef() throws Exception {
+		setupFile(2, true);
+		checkTypedef("myType", INT);
+		updateFile();
+		checkTypedef("myType", SHORT);
+	}
+
+	// namespace aNs {
+	// } 
+	// namespace nsAlias= aNs;
+	
+	// namespace bNs {
+	// }
+	// namespace nsAlias= bNs;
+	public void testNamespaceAlias() throws Exception {
+		setupFile(2, true);
+		checkNamespaceAlias("nsAlias", "aNs");
+		updateFile();
+		checkNamespaceAlias("nsAlias", "bNs");
+	}
+
+	private void checkNamespaceAlias(String name, String target) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			ICPPNamespaceAlias nsalias = (ICPPNamespaceAlias) findBinding(name);
+			assertEquals(msg(), target, nsalias.getBinding().getName());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}	
+	
+	// struct myType {
+	//    int a;
+	// };
+	
+	// union myType {
+	//    int a;
+	// };
+
+	// typedef int myType;
+
+	// enum myType {};
+	public void testChangingTypePlainC() throws Exception {
+		setupFile(4, false);
+		IBinding binding;
+		ICompositeType ct;
+		fIndex.acquireReadLock();
+		try {
+			binding = findBinding("myType");
+			assertTrue(binding instanceof ICompositeType);
+			ct = (ICompositeType) binding;
+			assertTrue(ct.getKey() == ICompositeType.k_struct);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+		
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			binding = findBinding("myType");
+			assertTrue(binding instanceof ICompositeType);
+			ct = (ICompositeType) binding;
+			assertTrue(ct.getKey() == ICompositeType.k_union);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+		
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			binding = findBinding("myType");
+			assertTrue(binding instanceof ITypedef);
+			ITypedef td = (ITypedef) binding;
+			assertEquals(INT, ASTTypeUtil.getType(td.getType()));
+		} finally {
+			fIndex.releaseReadLock();
+		}
+		
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			binding = findBinding("myType");
+			assertTrue(binding instanceof IEnumeration);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	
+	// class myType {
+	//    int a;
+	// };
+	
+	// struct myType {
+	//    int a;
+	// };
+	
+	// union myType {
+	//    int a;
+	// };
+
+	// typedef int myType;
+
+	// enum myType {};
+	public void testChangingTypeCPP() throws Exception {
+		setupFile(4, true);
+		IBinding binding;
+		ICompositeType ct;
+		fIndex.acquireReadLock();
+		try {
+			binding = findBinding("myType");
+			assertTrue(binding instanceof ICompositeType);
+			ct = (ICompositeType) binding;
+			assertTrue(ct.getKey() == ICompositeType.k_struct);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+		
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			binding = findBinding("myType");
+			assertTrue(binding instanceof ICompositeType);
+			ct = (ICompositeType) binding;
+			assertTrue(ct.getKey() == ICompositeType.k_union);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+		
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			binding = findBinding("myType");
+			assertTrue(binding instanceof ITypedef);
+			ITypedef td = (ITypedef) binding;
+			assertEquals(INT, ASTTypeUtil.getType(td.getType()));
+		} finally {
+			fIndex.releaseReadLock();
+		}
+		
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			binding = findBinding("myType");
+			assertTrue(binding instanceof IEnumeration);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	// template<typename T> class CT {};
+
+	// template<typename T=int> class CT {};
+
+	// template<typename T=char> class CT {};
+
+	// template<int U, typename T> struct CT {};
+	
+	// template<template<typename T> class V> class CT {};
+
+	// template<template<template<typename I> class T> class V> class CT {};
+
+	// template<typename U> class CT {};
+	public void testClassTemplates() throws Exception {
+		setupFile(7, true);
+		ICPPClassTemplate binding;
+		ICompositeType ct;
+		fIndex.acquireReadLock();
+		long pdomid;
+		try {
+			binding = (ICPPClassTemplate) findBinding("CT");
+			assertEquals(ICPPClassType.k_class , binding.getKey());
+			ICPPTemplateParameter[] tpars = binding.getTemplateParameters();
+			assertEquals(1, tpars.length);
+			assertTrue(tpars[0] instanceof ICPPTemplateTypeParameter);
+			assertEquals(0, tpars[0].getParameterID());
+			assertEquals("T", tpars[0].getName());
+			assertNull(tpars[0].getDefaultValue());
+			pdomid= ((PDOMNode)((IAdaptable) tpars[0]).getAdapter(PDOMNode.class)).getRecord();
+		} finally {
+			fIndex.releaseReadLock();
+		}
+
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			binding = (ICPPClassTemplate) findBinding("CT");
+			assertEquals(ICPPClassType.k_class , binding.getKey());
+			ICPPTemplateParameter[] tpars = binding.getTemplateParameters();
+			assertEquals(1, tpars.length);
+			assertTrue(tpars[0] instanceof ICPPTemplateTypeParameter);
+			assertEquals(0, tpars[0].getParameterID());
+			assertEquals("T", tpars[0].getName());
+			assertEquals("int", ASTTypeUtil.getType(tpars[0].getDefaultValue().getTypeValue()));
+		} finally {
+			fIndex.releaseReadLock();
+		}
+
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			binding = (ICPPClassTemplate) findBinding("CT");
+			assertEquals(ICPPClassType.k_class , binding.getKey());
+			ICPPTemplateParameter[] tpars = binding.getTemplateParameters();
+			assertEquals(1, tpars.length);
+			assertTrue(tpars[0] instanceof ICPPTemplateTypeParameter);
+			assertEquals(0, tpars[0].getParameterID());
+			assertEquals("T", tpars[0].getName());
+			assertEquals("char", ASTTypeUtil.getType(tpars[0].getDefaultValue().getTypeValue()));
+		} finally {
+			fIndex.releaseReadLock();
+		}
+
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			binding = (ICPPClassTemplate) findBinding("CT");
+			assertEquals(ICompositeType.k_struct , binding.getKey());
+			ICPPTemplateParameter[] tpars = binding.getTemplateParameters();
+			assertEquals(2, tpars.length);
+			assertTrue(tpars[0] instanceof ICPPTemplateNonTypeParameter);
+			assertEquals("U", tpars[0].getName());
+			assertEquals(0, tpars[0].getParameterID());
+			assertTrue(tpars[1] instanceof ICPPTemplateTypeParameter);
+			assertEquals("T", tpars[1].getName());
+			assertEquals(1, tpars[1].getParameterID());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+		
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			binding = (ICPPClassTemplate) findBinding("CT");
+			assertEquals(ICPPClassType.k_class , binding.getKey());
+			ICPPTemplateParameter[] tpars = binding.getTemplateParameters();
+			assertEquals(1, tpars.length);
+			assertTrue(tpars[0] instanceof ICPPTemplateTemplateParameter);
+			assertEquals("V", tpars[0].getName());
+			assertEquals(0, tpars[0].getParameterID());
+			tpars= ((ICPPTemplateTemplateParameter) tpars[0]).getTemplateParameters();
+			assertEquals(1, tpars.length);
+			assertTrue(tpars[0] instanceof ICPPTemplateTypeParameter);
+			assertEquals(0x10000, tpars[0].getParameterID());
+			assertEquals("T", tpars[0].getName());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			binding = (ICPPClassTemplate) findBinding("CT");
+			assertEquals(ICPPClassType.k_class , binding.getKey());
+			ICPPTemplateParameter[] tpars = binding.getTemplateParameters();
+			assertEquals(1, tpars.length);
+			assertTrue(tpars[0] instanceof ICPPTemplateTemplateParameter);
+			assertEquals("V", tpars[0].getName());
+			assertEquals(0, tpars[0].getParameterID());
+			tpars= ((ICPPTemplateTemplateParameter) tpars[0]).getTemplateParameters();
+			assertEquals(1, tpars.length);
+			assertTrue(tpars[0] instanceof ICPPTemplateTemplateParameter);
+			assertEquals(0x10000, tpars[0].getParameterID());
+			assertEquals("T", tpars[0].getName());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			binding = (ICPPClassTemplate) findBinding("CT");
+			assertEquals(ICPPClassType.k_class , binding.getKey());
+			ICPPTemplateParameter[] tpars = binding.getTemplateParameters();
+			assertEquals(1, tpars.length);
+			assertTrue(tpars[0] instanceof ICPPTemplateTypeParameter);
+			assertEquals(0, tpars[0].getParameterID());
+			assertEquals("U", tpars[0].getName());
+			assertEquals(pdomid, ((PDOMNode)((IAdaptable) tpars[0]).getAdapter(PDOMNode.class)).getBindingID());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	// int globalVar;
+	
+	// #include "header.h"
+	// void test() {
+	//    globalVar= 1;
+	// }
+	public void testChangingSourceBeforeHeader_Bug171834() throws Exception {
+		setupHeader(2, true);
+		setupFile(0, true);
+		IBinding binding;
+		ICompositeType ct;
+		fIndex.acquireReadLock();
+		try {
+			binding = findBinding("globalVar");
+			assertTrue(binding instanceof IVariable);
+			assertEquals(2, fIndex.findNames(binding, IIndex.FIND_ALL_OCCURRENCES).length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+
+		fFile= TestSourceReader.createFile(fFile.getParent(), fFile.getName(), fContents[1].toString().replaceAll("globalVar", "newVar"));
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, fFile, INDEXER_WAIT_TIME);
+		
+		fIndex.acquireReadLock();
+		try {
+			binding = findBinding("globalVar");
+			assertTrue(binding instanceof IVariable);
+			assertEquals(1, fIndex.findNames(binding, IIndex.FIND_ALL_OCCURRENCES).length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+
+		fHeader= TestSourceReader.createFile(fHeader.getParent(), fHeader.getName(), fContents[0].toString().replaceAll("globalVar", "newVar"));
+		TestSourceReader.waitUntilFileIsIndexed(fIndex, fHeader, INDEXER_WAIT_TIME);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(INDEXER_WAIT_TIME, NPM));
+
+		fIndex.acquireReadLock();
+		try {
+			binding = findBinding("newVar");
+			assertTrue(binding instanceof IVariable);
+			assertEquals(2, fIndex.findNames(binding, IIndex.FIND_ALL_OCCURRENCES).length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	
+	// int globalVar;
+	// void func();
+	
+	// extern "C" {
+	//    int globalVar;
+	//    void func();
+	// }
+	
+	// int globalVar;
+	// void func();
+	
+	// extern "C" int globalVar;
+	// extern "C" void func();
+
+	// int globalVar;
+	// void func();
+	public void testExternC() throws Exception {
+		setupFile(5, true);
+		checkExternC(false);
+		updateFile();
+		checkExternC(true);
+		updateFile();
+		checkExternC(false);
+		updateFile();
+		checkExternC(true);
+		updateFile();
+		checkExternC(false);
+	}
+
+	private void checkExternC(boolean value) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			ICPPVariable var = (ICPPVariable) findBinding("globalVar");
+			assertEquals(value, var.isExternC());
+			ICPPFunction func = (ICPPFunction) findBinding("func");
+			assertEquals(value, func.isExternC());
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+	
+	// int global;
+	// struct C {int mem;};
+	// enum E {e0};
+	
+	// int global=1;
+	// struct C {int mem=1;};
+	// enum E {e0=1};
+	
+	// int global;
+	// struct C {int mem;};
+	// enum E {e0};
+	public void testValuesC() throws Exception {
+		setupFile(3, false);
+		checkValue("global", null);
+		checkValue("C::mem", null);
+		checkValue("e0", 0L);
+		updateFile();
+		checkValue("global", 1L);
+		checkValue("C::mem", 1L);
+		checkValue("e0", 1L);
+		updateFile();
+		checkValue("global", null);
+		checkValue("C::mem", null);
+		checkValue("e0", 0L);
+	}
+	
+	// class A {
+	//    public: void foo();
+	// };
+
+	// class A {
+	//    public: void foo() throw();
+	// };
+
+	// class A {
+	//    public: void foo() throw(int, double);
+	// };
+
+	// class A {
+	//    public: void foo() throw();
+	// };
+
+	// class A {
+	//    public: void foo();
+	// };
+	public void testExceptionSpecification() throws Exception {
+		ICPPMethod method;
+		IType[] exceptionSpec;
+		setupFile(5, true);
+		fIndex.acquireReadLock();
+		try {
+			method = (ICPPMethod) findBinding("A::foo");
+			exceptionSpec = method.getExceptionSpecification();
+			assertNull(exceptionSpec);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+		
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			method = (ICPPMethod) findBinding("A::foo");
+			exceptionSpec = method.getExceptionSpecification();
+			assertEquals(0, exceptionSpec.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			method = (ICPPMethod) findBinding("A::foo");
+			exceptionSpec = method.getExceptionSpecification();
+			assertNotNull(exceptionSpec);
+			assertEquals(2, exceptionSpec.length);
+			assertEquals("int", ASTTypeUtil.getType(exceptionSpec[0]));
+			assertEquals("double", ASTTypeUtil.getType(exceptionSpec[1]));
+		} finally {
+			fIndex.releaseReadLock();
+		}
+
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			method = (ICPPMethod) findBinding("A::foo");
+			exceptionSpec = method.getExceptionSpecification();
+			assertEquals(0, exceptionSpec.length);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+
+		updateFile();
+		fIndex.acquireReadLock();
+		try {
+			method = (ICPPMethod) findBinding("A::foo");
+			exceptionSpec = method.getExceptionSpecification();
+			assertNull(exceptionSpec);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+
+	// int global;
+	// struct C {int mem;};
+	// enum E {e0};
+	
+	// int global=1;
+	// struct C {int mem=1;};
+	// enum E {e0=1};
+	
+	// int global;
+	// struct C {int mem;};
+	// enum E {e0};
+	public void testValuesCPP() throws Exception {
+		setupFile(3, true);
+		checkValue("global", null);
+		checkValue("C::mem", null);
+		checkValue("e0", 0L);
+		updateFile();
+		checkValue("global", 1L);
+		checkValue("C::mem", 1L);
+		checkValue("e0", 1L);
+		updateFile();
+		checkValue("global", null);
+		checkValue("C::mem", null);
+		checkValue("e0", 0L);
+	}
+	
+	//class A {};
+	//class B {friend class A;};
+
+	//class B {};
+	public void testFriendClass() throws Exception {
+		setupFile(2, true);
+		assertFriendRemoval("B", "A");
+	}
+	
+	// class X {public: char* foo(int);};
+	// class Y {friend char* X::foo(int);};
+
+	// class Y {};
+	public void testFriendMethod() throws Exception {
+		setupFile(2, true);
+		assertFriendRemoval("Y", "X::foo");
+	}
+	
+	// class X {friend void friend_set(X*, int);};
+	// void friend_set(X* p, int i) {}
+
+	// class X {};
+	public void testFriendFunction() throws Exception {
+		setupFile(2, true);
+		assertFriendRemoval("X", "friend_set");
+	}
+	
+	private void assertFriendRemoval(String clientClassBinding, String supplierBinding) throws Exception {
+		fIndex.acquireReadLock();
+		try {
+			IBinding client = findBinding(clientClassBinding);
+			IBinding supplier = findBinding(supplierBinding);
+			assertNotNull("Unable to find binding with name \""+clientClassBinding+"\"", client);
+			assertTrue("Unable to find binding with name \""+clientClassBinding+"\"", client instanceof ICPPClassType);
+			assertNotNull("Unable to find binding with name \""+supplierBinding+"\"", supplier);
+			assertTrue(((ICPPClassType)client).getFriends().length == 1);
+			assertTrue(((ICPPClassType)client).getFriends()[0].equals(supplier));
+		} finally {
+			fIndex.releaseReadLock();
+		}
+		
+		updateFile();
+
+		fIndex.acquireReadLock();
+		try {
+			IBinding client = findBinding(clientClassBinding);
+			assertNotNull("Unable to find binding with name \""+clientClassBinding+"\"", client);
+			assertTrue("Unable to find binding with name \""+clientClassBinding+"\"", client instanceof ICPPClassType);
+			assertTrue(((ICPPClassType)client).getFriends().length == 0);
+		} finally {
+			fIndex.releaseReadLock();
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/TeamSharedIndexTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/TeamSharedIndexTest.java
new file mode 100644
index 0000000..a388ccb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/TeamSharedIndexTest.java
@@ -0,0 +1,374 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.internal.index.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexManager;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ProjectScope;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+
+public class TeamSharedIndexTest extends IndexTestBase {
+
+	public static TestSuite suite() {
+		return suite(TeamSharedIndexTest.class);
+	}
+
+	private Collection fProjects= new LinkedList();
+	private static final IIndexManager fPDOMManager = CCorePlugin.getIndexManager();
+
+	public TeamSharedIndexTest(String name) {
+		super(name);
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+		fProjects.clear();
+	}
+	
+	protected void tearDown() throws Exception {
+		for (Iterator iterator = fProjects.iterator(); iterator.hasNext();) {
+			ICProject project = (ICProject) iterator.next();
+			CProjectHelper.delete(project);
+		}
+		super.tearDown();
+	}
+			
+	private void registerProject(ICProject prj) {
+		fProjects.add(prj);
+	}
+	private void unregisterProject(ICProject prj) {
+		fProjects.remove(prj);
+	}
+	
+	private ICProject createProject(String name) throws CoreException {
+		ModelJoiner mj= new ModelJoiner();
+		try {
+			ICProject project= CProjectHelper.createCCProject(name, null, IPDOMManager.ID_NO_INDEXER);
+			registerProject(project);
+			TestSourceReader.createFile(project.getProject(), "a.cpp", "int a;");
+			TestSourceReader.createFile(project.getProject(), "b.cpp", "int b;");
+			TestSourceReader.createFile(project.getProject(), "c.cpp", "int c;");
+			mj.join(); // in order we are sure the indexer task has been scheduled before joining the indexer
+
+			fPDOMManager.setIndexerId(project, IPDOMManager.ID_FAST_INDEXER);
+			assertTrue(fPDOMManager.joinIndexer(INDEXER_WAIT_TIME, NPM));
+			return project;
+		} finally {
+			mj.dispose();
+		}
+	}
+	
+	private ICProject recreateProject(final String prjName) throws Exception {
+		final IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		ModelJoiner pj= new ModelJoiner();
+		try {
+			final IProject prjHandle= workspace.getRoot().getProject(prjName);
+			workspace.run(new IWorkspaceRunnable() {
+				public void run(IProgressMonitor monitor) throws CoreException {
+					IProjectDescription desc= IDEWorkbenchPlugin.getPluginWorkspace().newProjectDescription(prjName);
+					prjHandle.create(desc, NPM);
+					prjHandle.open(0, NPM);
+				}
+			}, null);
+			pj.join();  // in order we are sure the indexer task has been scheduled before joining the indexer
+		} finally {
+			pj.dispose();
+		}
+		fPDOMManager.joinIndexer(INDEXER_WAIT_TIME, NPM);
+		return CoreModel.getDefault().create(workspace.getRoot().getProject(prjName));
+	}
+
+	private void checkVariable(ICProject prj, String var, int expectedCount)
+			throws CoreException, InterruptedException {
+		IIndex index= fPDOMManager.getIndex(prj);
+		index.acquireReadLock();
+		try {
+			IBinding[] binding= index.findBindings(var.toCharArray(), IndexFilter.ALL, NPM);
+			int count= 0;
+			assertTrue(binding.length < 2);
+			if (binding.length == 1) {
+				assertTrue(binding[0] instanceof IVariable);
+				count= index.findNames(binding[0], IIndex.FIND_ALL_OCCURRENCES).length;
+			}
+			assertEquals(var, expectedCount, count);
+		}
+		finally {
+			index.releaseReadLock();
+		}
+	} 
+
+	public void testDefaultExport() throws Exception {
+		String prjName= "__testDefaultExport__";
+		ICProject prj= createProject(prjName);
+		String loc= IndexerPreferences.getIndexImportLocation(prj.getProject());
+		checkVariable(prj, "a", 1);
+		checkVariable(prj, "b", 1);
+		checkVariable(prj, "c", 1);
+
+		// export the project.
+		fPDOMManager.export(prj, loc, 0, NPM);
+		
+		// set indexer to the fake one.
+		fPDOMManager.setIndexerId(prj, FakeIndexer.ID);		
+		IndexerPreferences.setScope(prj.getProject(), IndexerPreferences.SCOPE_PROJECT_SHARED);
+		new ProjectScope(prj.getProject()).getNode(CCorePlugin.PLUGIN_ID).flush();
+		fPDOMManager.joinIndexer(INDEXER_WAIT_TIME, NPM);
+		checkVariable(prj, "a", 0);
+		checkVariable(prj, "b", 0);
+		checkVariable(prj, "c", 0);
+		
+		// delete project
+		deleteAndWait(prj);
+		unregisterProject(prj);
+		
+		// import project
+		prj = recreateProject(prjName);
+		assertEquals(FakeIndexer.ID, fPDOMManager.getIndexerId(prj));
+
+		registerProject(prj);
+		checkVariable(prj, "a", 1);
+		checkVariable(prj, "b", 1);
+		checkVariable(prj, "c", 1);
+	}
+	
+	public void testExportWithFileChange() throws Exception {
+		String prjName= "__testExportWithChange__";
+		ICProject prj= createProject(prjName);
+		String loc= IndexerPreferences.getIndexImportLocation(prj.getProject());
+		checkVariable(prj, "a", 1);
+		checkVariable(prj, "b", 1);
+		checkVariable(prj, "c", 1);
+		
+		// export the project.
+		IndexerPreferences.setScope(prj.getProject(), IndexerPreferences.SCOPE_PROJECT_SHARED);
+		new ProjectScope(prj.getProject()).getNode(CCorePlugin.PLUGIN_ID).flush();
+		fPDOMManager.export(prj, loc, 0, NPM);
+		fPDOMManager.joinIndexer(INDEXER_WAIT_TIME, NPM);
+		
+		// change file
+		changeFile(prj);
+		deleteAndWait(prj);
+		unregisterProject(prj);
+		
+		// import project
+		prj = recreateProject(prjName);
+		registerProject(prj);
+		checkVariable(prj, "a", 0);
+		checkVariable(prj, "b", 1);
+		checkVariable(prj, "c", 1);
+		checkVariable(prj, "d", 1);
+	}
+
+	private void changeFile(ICProject prj) throws CoreException {
+		final IFile file = prj.getProject().getFile("a.cpp");
+		final File location = file.getLocation().toFile();
+		final long lm= location.lastModified();
+		file.setContents(new ByteArrayInputStream("int d;".getBytes()), true, false, NPM);
+		if (location.lastModified() == lm) {
+			location.setLastModified(lm+1000);
+		}
+	}
+	
+	private void deleteAndWait(ICProject prj) throws CoreException {
+		ModelJoiner dj= new ModelJoiner();
+		try {
+			prj.getProject().delete(false, true, NPM);
+			dj.join();
+		} finally {
+			dj.dispose();
+		}
+	}
+
+	public void testExportWithFileChangeFake() throws Exception {
+		String prjName= "__testExportWithChangeFake__";
+		ICProject prj= createProject(prjName);
+		String loc= IndexerPreferences.getIndexImportLocation(prj.getProject());
+		checkVariable(prj, "a", 1);
+		checkVariable(prj, "b", 1);
+		checkVariable(prj, "c", 1);
+		
+		// export the project.
+		fPDOMManager.export(prj, loc, 0, NPM);
+		fPDOMManager.joinIndexer(INDEXER_WAIT_TIME, NPM);
+		
+		// set indexer to the fake one.
+		fPDOMManager.setIndexerId(prj, FakeIndexer.ID);		
+		IndexerPreferences.setScope(prj.getProject(), IndexerPreferences.SCOPE_PROJECT_SHARED);
+		new ProjectScope(prj.getProject()).getNode(CCorePlugin.PLUGIN_ID).flush();
+		fPDOMManager.joinIndexer(INDEXER_WAIT_TIME, NPM);
+		checkVariable(prj, "a", 0);
+		checkVariable(prj, "b", 0);
+		checkVariable(prj, "c", 0);
+		
+		changeFile(prj);
+		deleteAndWait(prj);
+		unregisterProject(prj);
+		
+		// import project
+		prj = recreateProject(prjName);
+		registerProject(prj);
+		checkVariable(prj, "a", 1);
+		checkVariable(prj, "b", 1);
+		checkVariable(prj, "c", 1);
+		checkVariable(prj, "d", 0);
+	}
+
+	public void testExportWithAddition() throws Exception {
+		String prjName= "__testExportWithAddition__";
+		ICProject prj= createProject(prjName);
+		String loc= IndexerPreferences.getIndexImportLocation(prj.getProject());
+		checkVariable(prj, "a", 1);
+		checkVariable(prj, "b", 1);
+		checkVariable(prj, "c", 1);
+		
+		// export the project.
+		IndexerPreferences.setScope(prj.getProject(), IndexerPreferences.SCOPE_PROJECT_SHARED);
+		new ProjectScope(prj.getProject()).getNode(CCorePlugin.PLUGIN_ID).flush();
+		fPDOMManager.export(prj, loc, 0, NPM);
+		fPDOMManager.joinIndexer(INDEXER_WAIT_TIME, NPM);
+		
+		// add file
+		TestSourceReader.createFile(prj.getProject(), "d.cpp", "int d;");
+		deleteAndWait(prj);
+		unregisterProject(prj);
+		
+		// import project
+		prj = recreateProject(prjName);
+		registerProject(prj);
+		checkVariable(prj, "a", 1);
+		checkVariable(prj, "b", 1);
+		checkVariable(prj, "c", 1);
+		checkVariable(prj, "d", 1);
+	}
+
+	public void testExportWithAdditionFake() throws Exception {
+		String prjName= "__testExportWithAdditionFake__";
+		ICProject prj= createProject(prjName);
+		String loc= IndexerPreferences.getIndexImportLocation(prj.getProject());
+		checkVariable(prj, "a", 1);
+		checkVariable(prj, "b", 1);
+		checkVariable(prj, "c", 1);
+		
+		// export the project.
+		fPDOMManager.export(prj, loc, 0, NPM);
+		fPDOMManager.joinIndexer(INDEXER_WAIT_TIME, NPM);
+		
+		// set indexer to the fake one.
+		fPDOMManager.setIndexerId(prj, FakeIndexer.ID);		
+		IndexerPreferences.setScope(prj.getProject(), IndexerPreferences.SCOPE_PROJECT_SHARED);
+		new ProjectScope(prj.getProject()).getNode(CCorePlugin.PLUGIN_ID).flush();
+		fPDOMManager.joinIndexer(INDEXER_WAIT_TIME, NPM);
+		checkVariable(prj, "a", 0);
+		checkVariable(prj, "b", 0);
+		checkVariable(prj, "c", 0);
+
+		// add file
+		TestSourceReader.createFile(prj.getProject(), "d.cpp", "int d;");
+		deleteAndWait(prj);
+		unregisterProject(prj);
+		
+		// import project
+		prj = recreateProject(prjName);
+		registerProject(prj);
+		checkVariable(prj, "a", 1);
+		checkVariable(prj, "b", 1);
+		checkVariable(prj, "c", 1);
+		checkVariable(prj, "d", 0);
+	}
+
+	public void testExportWithRemoval() throws Exception {
+		String prjName= "__testExportWithRemoval__";
+		ICProject prj= createProject(prjName);
+		String loc= IndexerPreferences.getIndexImportLocation(prj.getProject());
+		checkVariable(prj, "a", 1);
+		checkVariable(prj, "b", 1);
+		checkVariable(prj, "c", 1);
+		
+		// export the project.
+		IndexerPreferences.setScope(prj.getProject(), IndexerPreferences.SCOPE_PROJECT_SHARED);
+		new ProjectScope(prj.getProject()).getNode(CCorePlugin.PLUGIN_ID).flush();
+		fPDOMManager.export(prj, loc, 0, NPM);
+		fPDOMManager.joinIndexer(INDEXER_WAIT_TIME, NPM);
+		
+		// delete file
+		prj.getProject().getFile("a.cpp").delete(true, NPM);
+		deleteAndWait(prj);
+		unregisterProject(prj);
+		
+		// import project
+		prj = recreateProject(prjName);
+		registerProject(prj);
+		checkVariable(prj, "a", 0);
+		checkVariable(prj, "b", 1);
+		checkVariable(prj, "c", 1);
+	}
+
+	public void testExportWithRemovalFake() throws Exception {
+		String prjName= "__testExportWithRemovalFake__";
+		ICProject prj= createProject(prjName);
+		String loc= IndexerPreferences.getIndexImportLocation(prj.getProject());
+		checkVariable(prj, "a", 1);
+		checkVariable(prj, "b", 1);
+		checkVariable(prj, "c", 1);
+		
+		// export the project.
+		fPDOMManager.export(prj, loc, 0, NPM);
+		fPDOMManager.joinIndexer(INDEXER_WAIT_TIME, NPM);
+		
+		// set indexer to the fake one.
+		fPDOMManager.setIndexerId(prj, FakeIndexer.ID);		
+		IndexerPreferences.setScope(prj.getProject(), IndexerPreferences.SCOPE_PROJECT_SHARED);
+		new ProjectScope(prj.getProject()).getNode(CCorePlugin.PLUGIN_ID).flush();
+		fPDOMManager.joinIndexer(INDEXER_WAIT_TIME, NPM);
+		checkVariable(prj, "a", 0);
+		checkVariable(prj, "b", 0);
+		checkVariable(prj, "c", 0);
+
+		// delete file
+		prj.getProject().getFile("a.cpp").delete(true, NPM);
+		deleteAndWait(prj);
+		unregisterProject(prj);
+		
+		// import project
+		prj = recreateProject(prjName);
+		registerProject(prj);
+		checkVariable(prj, "a", 0);
+		checkVariable(prj, "b", 1);
+		checkVariable(prj, "c", 1);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/TrilogyPerformanceTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/TrilogyPerformanceTest.java
new file mode 100644
index 0000000..8ddcced
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/TrilogyPerformanceTest.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     Andrew Ferguson (Symbian) - Initial implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.index.tests;
+
+import java.util.regex.Pattern;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.TestScannerProvider;
+import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;
+import org.eclipse.cdt.utils.spawner.EnvironmentReader;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Bundle;
+
+/**
+ * aftodo - it would be nice to have this as a real performance test
+ * 
+ * n.b. this is intentionally not added to any test suite at the moment
+ */
+public class TrilogyPerformanceTest extends IndexTestBase {
+	ICProject cproject;
+
+	public TrilogyPerformanceTest() {
+		super("TrilogyPerformance");
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		Bundle b = CTestPlugin.getDefault().getBundle();
+		if (cproject == null) {
+			cproject= createProject(true, "resources/indexTests/trilogy");
+		}
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		cproject.getProject().delete(true, new NullProgressMonitor());
+		super.tearDown();
+	}
+
+	// you must have the Windows SDK installed and the INETSDK env var setup
+	public void testIndexTrilogyPerformanceTimes() throws CoreException {
+		if(Platform.getOS().equals(Platform.OS_WIN32)) { 
+			assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+			TestScannerProvider.sIncludes = new String[]{EnvironmentReader.getEnvVar("INETSDK")+"\\Include"};
+			IndexerPreferences.set(cproject.getProject(), IndexerPreferences.KEY_INDEX_UNUSED_HEADERS_WITH_DEFAULT_LANG, "true");
+			long start = System.currentTimeMillis();
+			CCorePlugin.getIndexManager().reindex(cproject);
+			assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+			System.out.println("Took: "+(System.currentTimeMillis() - start));
+			IIndex index= CCorePlugin.getIndexManager().getIndex(cproject);
+			IBinding[] binding = index.findBindings(Pattern.compile("IXMLElementCollection"), false, IndexFilter.ALL, new NullProgressMonitor());
+			assertEquals(1, binding.length);
+		}
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/BTreeExpensiveTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/BTreeExpensiveTests.java
new file mode 100644
index 0000000..0ddb813
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/BTreeExpensiveTests.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Symbian - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import junit.framework.Test;
+
+/**
+ * Tests which are too expensive to run as part of normal testing, but
+ * should be run after B-tree related development.
+ * <p>
+ * The 'Full Checking' tests perform a full validation of the B-tree
+ * invariants after each B-tree operation, and so are especially
+ * expensive and cpu hungry.
+ */
+public class BTreeExpensiveTests extends BTreeTests {
+	
+	public static Test suite() {
+		return suite(BTreeExpensiveTests.class);
+	}
+	
+	public void testBySortedSetMirror() throws Exception {
+		sortedMirrorTest(100);
+	}
+	
+	// @Override
+	public void testInsertion() throws Exception {
+		super.testInsertion();
+	}
+	
+	/*
+	 * N.B. Each of the following tests are quite expensive (i.e. > 10mins each on a 2Ghz machine)
+	 */
+	
+	public void testBySortedSetMirror1682762087() throws Exception {
+		System.out.println("1682762087 Full Checking");
+		trial(1682762087, true); // exposed bugs in 2a,b
+	}
+
+	public void testBySortedSetMirror322922974() throws Exception {
+		System.out.println("322922974 Full Checking");
+		trial(322922974, true); // exposed bugs in 3b(ii)
+	}
+
+	public void testBySortedSetMirror_588448152() throws Exception {
+		System.out.println("-588448152 Full Checking");
+		trial(-588448152, true); // exposed root-delete-on-merge problems
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/BTreeTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/BTreeTests.java
new file mode 100644
index 0000000..4df0468
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/BTreeTests.java
@@ -0,0 +1,234 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Symbian - Initial implementation
+ * Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.internal.core.pdom.db.BTree;
+import org.eclipse.cdt.internal.core.pdom.db.ChunkCache;
+import org.eclipse.cdt.internal.core.pdom.db.Database;
+import org.eclipse.cdt.internal.core.pdom.db.IBTreeComparator;
+import org.eclipse.cdt.internal.core.pdom.db.IBTreeVisitor;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Test insertion/deletion of records of a mock record type in a B-tree
+ * 
+ * @author aferguso
+ *
+ */
+public class BTreeTests extends BaseTestCase {
+	protected File dbFile;
+	protected Database db;
+	protected BTree btree;
+	protected int rootRecord;
+	protected IBTreeComparator comparator;
+
+	protected boolean debugMode = false;
+
+	public static Test suite() {
+		return suite(BTreeTests.class);
+	}
+
+	// setUp is not used since we need to parameterize this method,
+	// and invoke it multiple times per Junit test
+	protected void init(int degree) throws Exception {
+		dbFile = File.createTempFile("pdomtest", "db");
+		db = new Database(dbFile, new ChunkCache(), 0, false);
+		db.setExclusiveLock();
+		rootRecord = Database.DATA_AREA;
+		comparator = new BTMockRecordComparator();
+		btree = new BTree(db, rootRecord, degree, comparator);
+	}
+
+	// tearDown is not used for the same reason as above
+	protected void finish() throws Exception {
+		db.close();
+		dbFile.deleteOnExit();
+	}
+
+	
+	public void testBySortedSetMirrorLite() throws Exception {
+		sortedMirrorTest(8);
+	}
+	
+	/**
+	 * Test random (but reproducible via known seed) sequences of insertions/deletions
+	 * and use TreeSet as a reference implementation to check behaviour against.
+	 * @throws Exception
+	 */
+	protected void sortedMirrorTest(int noTrials) throws Exception {
+		Random seeder = new Random(90210);
+
+		for(int i=0; i<noTrials; i++) {
+			int seed = seeder.nextInt();
+			System.out.println("Iteration #"+i);
+			trial(seed, false);
+		}
+	}
+
+	/**
+	 * Test random (but reproducible via known seed) sequence of insertions
+	 * and use TreeSet as a reference implementation to check behaviour against.
+	 * @throws Exception
+	 */
+	public void testInsertion() throws Exception {
+		Random seeder = new Random();
+
+		for(int i=0; i<6; i++) {
+			int seed = seeder.nextInt();
+			System.out.println("Iteration #"+i);
+			trialImp(seed, false, new Random(seed*2), 1);
+		}
+	}
+
+	/**
+	 * Insert/Delete a random number of records into/from the B-tree 
+	 * @param seed the seed for obtaining the deterministic random testing
+	 * @param checkCorrectnessEachIteration if true, then on every single insertion/deletion check that the B-tree invariants
+	 * still hold
+	 * @throws Exception
+	 */
+	protected void trial(int seed, final boolean checkCorrectnessEachIteration) throws Exception {		
+		Random random = new Random(seed);
+
+		// the probabilty that a particular iterations action will be an insertion
+		double pInsert = Math.min(0.5 + random.nextDouble(), 1);
+
+		trialImp(seed, checkCorrectnessEachIteration, random, pInsert);
+	}
+
+	private void trialImp(int seed, final boolean checkCorrectnessEachIteration, Random random, double pInsert) throws Exception {
+		final int degree = 2 + random.nextInt(11);
+		final int nIterations = random.nextInt(100000);
+		final SortedSet expected = new TreeSet();
+		final List history = new ArrayList();
+		
+		init(degree);
+		
+		System.out.print("\t "+seed+" "+(nIterations/1000)+"K: ");
+		for(int i=0; i<nIterations; i++) {
+			if(random.nextDouble()<pInsert) {
+				Integer value = new Integer(random.nextInt(Integer.MAX_VALUE));
+				boolean newEntry = expected.add(value);
+				if(newEntry) {
+					BTMockRecord btValue = new BTMockRecord(db, value.intValue());
+					history.add(btValue);
+					if(debugMode)
+						System.out.println("Add: "+value+" @ "+btValue.record);
+					btree.insert(btValue.getRecord());
+				}
+			} else {
+				if(!history.isEmpty()) {
+					int index = random.nextInt(history.size());
+					BTMockRecord btValue = (BTMockRecord) history.get(index);
+					history.remove(index);
+					expected.remove(new Integer(btValue.intValue()));
+					if(debugMode)
+						System.out.println("Remove: "+btValue.intValue()+" @ "+btValue.record);
+					btree.delete(btValue.getRecord());
+				}
+			}
+			if(i % 1000 == 0) {
+				System.out.print(".");
+			}
+			if(checkCorrectnessEachIteration) {
+				assertBTreeMatchesSortedSet("[iteration "+i+"] ", btree, expected);
+				assertBTreeInvariantsHold("[iteration "+i+"] ");
+			}
+		}
+		System.out.println();
+
+		assertBTreeMatchesSortedSet("[Trial end] ", btree, expected);
+		assertBTreeInvariantsHold("[Trial end]");
+		
+		finish();
+	}
+
+	public void assertBTreeInvariantsHold(String msg) throws CoreException {
+		String errorReport = btree.getInvariantsErrorReport();
+		if(!errorReport.equals("")) {
+			fail("Invariants do not hold: "+errorReport);
+		}
+	}
+
+	public void assertBTreeMatchesSortedSet(final String msg, BTree actual, SortedSet expected) throws CoreException {
+		final Iterator i = expected.iterator();
+		btree.accept(new IBTreeVisitor(){
+			int k;
+			public int compare(long record) throws CoreException {
+				return 0;
+			}
+			public boolean visit(long record) throws CoreException {
+				if(record!=0) {
+					BTMockRecord btValue = new BTMockRecord(record, db);
+					if(i.hasNext()) {
+						Integer exp = ((Integer)i.next());
+						assertEquals(msg+" Differ at index: "+k, btValue.intValue(), exp.intValue());
+						k++;
+					} else {
+						fail("Sizes different");
+						return false;
+					}
+				}
+				return true;
+			}
+		});
+	}
+
+	private static class BTMockRecord {
+		public static final int VALUE_PTR = 0; 
+		public static final int RECORD_SIZE = Database.INT_SIZE;
+		long record;
+		Database db;
+
+		/**
+		 * Make a new record
+		 */
+		public BTMockRecord(Database db, int value) throws CoreException {
+			this.db = db;
+			record = db.malloc(BTMockRecord.RECORD_SIZE);
+			db.putInt(record + VALUE_PTR, value);
+		}   
+
+		/**
+		 * Get an existing record
+		 */
+		public BTMockRecord(long record, Database db) {
+			this.db = db;
+			this.record = record;
+		}
+
+		public int intValue() throws CoreException {
+			return db.getInt(record);
+		}
+
+		public long getRecord() {
+			return record;
+		}
+	}
+
+	private class BTMockRecordComparator implements IBTreeComparator {
+		public int compare(long record1, long record2) throws CoreException {
+			return db.getInt(record1) - db.getInt(record2); 
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CCompositeTypeTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CCompositeTypeTests.java
new file mode 100644
index 0000000..d6e88bb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CCompositeTypeTests.java
@@ -0,0 +1,272 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.index.IIndexBinding;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * Tests for verifying whether the PDOM correctly stores information about
+ * C structs and unions.
+ */
+public class CCompositeTypeTests extends PDOMTestBase {
+
+	private ICProject project;
+	private PDOM pdom;
+
+	public static Test suite() {
+		return new TestSuite(CCompositeTypeTests.class);
+	}
+
+	protected void setUp() throws Exception {
+		CCompositeTypeTests foo = null;
+		
+		project = createProject("compositeTypeTests");
+		pdom = (PDOM) CCoreInternals.getPDOMManager().getPDOM(project);
+		pdom.acquireReadLock();
+	}
+	
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+		if (project != null) {
+			project.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+		}
+	}
+	
+	//TODO PDOM does not distinguish between a struct or union in C
+	public void _testSimpleCStructureDistinction() throws Exception {
+		assertType(pdom, "SimpleCStructure", ICompositeType.class);
+		IIndexBinding[] bindings = pdom.findBindings(Pattern.compile("SimpleCStructure"), false, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(1, bindings.length);
+		assertEquals(ICompositeType.k_struct, ((ICompositeType)bindings[0]).getKey());
+	}
+	
+	// test struct definitions and struct member declarations in C
+	public void testSimpleCStructureDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "SimpleCStructure", 1);
+		assertDeclarationCount(pdom, "SimpleCStructure::scsa", 1);
+	}
+	
+	// test struct definitions and struct member definitions in C
+	public void testSimpleCStructureDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "SimpleCStructure", 1);
+		assertDefinitionCount(pdom, "SimpleCStructure::scsa", 1);
+	}
+	
+	// test struct definitions and struct member references in C
+	public void testSimpleCStructureReferences() throws Exception {
+		assertReferenceCount(pdom, "SimpleCStructure", 2);
+		assertReferenceCount(pdom, "SimpleCStructure::scsa", 2);
+	}
+
+	// test nesting of structs in C, they should not nest
+	public void testDeepCStructure() throws Exception {
+		assertType(pdom, "CStructure1", ICompositeType.class);
+		assertType(pdom, "CStructure2", ICompositeType.class);
+		assertType(pdom, "CStructure3", ICompositeType.class);
+	}
+	
+	// test "nested" struct declarations in C, they should not nest
+	public void testDeepCStructureDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "CStructure1", 1);
+		assertDeclarationCount(pdom, "CStructure1::CStructure2", 0);
+		assertDeclarationCount(pdom, "CStructure2", 1);
+		assertDeclarationCount(pdom, "CStructure1::CStructure2::CStructure3", 0);
+		assertDeclarationCount(pdom, "CStructure3", 1);
+	}
+	
+	// test "nested" struct member declarations in C, they should not nest
+	public void testDeepCStructureMemberDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "CStructure1::cs1a", 1);
+		assertDeclarationCount(pdom, "CStructure1::cs1b", 1);
+		assertDeclarationCount(pdom, "CStructure1::cs1c", 1);
+		assertDeclarationCount(pdom, "CStructure1::CStructure2::cs2b", 0);
+		assertDeclarationCount(pdom, "CStructure2::cs2b", 1);
+		assertDeclarationCount(pdom, "CStructure1::CStructure2::CStructure3::cs3a", 0);
+		assertDeclarationCount(pdom, "CStructure3::cs3a", 1);
+	}
+	
+	// test "nested" struct definitions in C, they should not nest
+	public void testDeepCStructureDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "CStructure1", 1);
+		assertDefinitionCount(pdom, "CStructure1::CStructure2", 0);
+		assertDefinitionCount(pdom, "CStructure2", 1);
+		assertDefinitionCount(pdom, "CStructure1::CStructure2::CStructure3", 0);
+		assertDefinitionCount(pdom, "CStructure3", 1);
+	}
+
+	// test "nested" struct member definitions in C, they should not nest
+	public void testDeepCStructureMemberDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "CStructure1::cs1a", 1);
+		assertDefinitionCount(pdom, "CStructure1::cs1b", 1);
+		assertDefinitionCount(pdom, "CStructure1::cs1c", 1);
+		assertDefinitionCount(pdom, "CStructure1::CStructure2::cs2b", 0);
+		assertDefinitionCount(pdom, "CStructure2::cs2b", 1);
+		assertDefinitionCount(pdom, "CStructure1::CStructure2::CStructure3::cs3a", 0);
+		assertDefinitionCount(pdom, "CStructure3::cs3a", 1);
+	}
+
+	// test "nested" struct references in C, they should not nest
+	public void testDeepCStructureReferences() throws Exception {
+		assertReferenceCount(pdom, "CStructure1", 2);
+		assertReferenceCount(pdom, "CStructure1::CStructure2", 0);
+		assertReferenceCount(pdom, "CStructure2", 2);
+		assertReferenceCount(pdom, "CStructure1::CStructure2::CStructure3", 0);
+		assertReferenceCount(pdom, "CStructure3", 2);
+	}
+	
+	// test "nested" struct member references in C, they should not nest
+	public void testDeepCStructureMemberReferences() throws Exception {
+		assertReferenceCount(pdom, "CStructure1::cs1a", 2);
+		assertReferenceCount(pdom, "CStructure1::cs1b", 3);
+		assertReferenceCount(pdom, "CStructure1::cs1c", 14);
+		assertReferenceCount(pdom, "CStructure1::CStructure2::cs2b", 0);
+		assertReferenceCount(pdom, "CStructure2::cs2b", 12);
+		assertReferenceCount(pdom, "CStructure1::CStructure2::CStructure3::cs3a", 0);
+		assertReferenceCount(pdom, "CStructure3::cs3a", 8);
+	}
+	
+//	TODO PDOM does not distinguish between a struct or union in C
+	public void _testCUnionDistinction() throws Exception {
+		IIndexBinding[] bindings = pdom.findBindings(Pattern.compile("CUnion1"), false, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(1, bindings.length);
+		assertEquals(ICompositeType.k_union, ((ICompositeType)bindings[0]).getKey());
+	}
+	
+	//test union and "nested" union declarations in C, but there is no nesting in C
+	public void testCUnionDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "CUnion1", 1);
+		assertDeclarationCount(pdom, "CUnion1::CUnion2", 0);
+		assertDeclarationCount(pdom, "CUnion2", 1);
+	}
+	
+	//test union and "nested" union definitons in C, but there is no nesting in C
+	public void testCUnionDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "CUnion1", 1);
+		assertDefinitionCount(pdom, "CUnion1::CUnion2", 0);
+		assertDefinitionCount(pdom, "CUnion2", 1);
+	}
+	
+	//test union and "nested" union references in C, but there is no nesting in C
+	public void testCUnionReferences() throws Exception {
+		assertReferenceCount(pdom, "CUnion1", 2);
+		assertReferenceCount(pdom, "CUnion1::CUnion2", 0);
+		assertReferenceCount(pdom, "CUnion2", 2);
+	}
+	
+	//test union member declarations in C
+	public void testCUnionMemberDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "CUnion1::cu1a", 1);
+		assertDeclarationCount(pdom, "CUnion1::cu1d", 1);
+	}
+	
+	//test union member defintions in C
+	public void testCUnionMemberDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "CUnion1::cu1a", 1);
+		assertDefinitionCount(pdom, "CUnion1::cu1d", 1);
+	}
+	
+	//test union member references in C
+	public void testCUnionMemberReferences() throws Exception {
+		assertReferenceCount(pdom, "CUnion1::cu1a", 2);
+		assertReferenceCount(pdom, "CUnion1::cu1d", 1);
+	}
+	
+	// test "nested" unions and structs declarations in C, they should not nest
+	public void testCMixedDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "CMixedS1::CMixedU1", 0);
+		assertDeclarationCount(pdom, "CMixedS1::CMixedU1::CMixedS2", 0);
+		assertDeclarationCount(pdom, "CMixedS1::CMixedU1::CMixedU2", 0);
+		assertDeclarationCount(pdom, "CMixedS1::CMixedS3", 0);
+		
+		assertDeclarationCount(pdom, "CMixedU1", 1);
+		assertDeclarationCount(pdom, "CMixedS2", 1);
+		assertDeclarationCount(pdom, "CMixedU2", 1);
+		assertDeclarationCount(pdom, "CMixedS3", 1);
+	}
+	
+	// test "nested" unions and structs definitions in C, they should not nest
+	public void testCMixedDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "CMixedS1::CMixedU1", 0);
+		assertDefinitionCount(pdom, "CMixedS1::CMixedU1::CMixedS2", 0);
+		assertDefinitionCount(pdom, "CMixedS1::CMixedU1::CMixedU2", 0);
+		assertDefinitionCount(pdom, "CMixedS1::CMixedS3", 0);
+		
+		assertDefinitionCount(pdom, "CMixedU1", 1);
+		assertDefinitionCount(pdom, "CMixedS2", 1);
+		assertDefinitionCount(pdom, "CMixedU2", 1);
+		assertDefinitionCount(pdom, "CMixedS3", 1);
+	}
+	
+	// test "nested" unions and structs references in C, they should not nest
+	public void testCMixedReferences() throws Exception {
+		assertReferenceCount(pdom, "CMixedS1::CMixedU1", 0);
+		assertReferenceCount(pdom, "CMixedS1::CMixedU1::CMixedS2", 0);
+		assertReferenceCount(pdom, "CMixedS1::CMixedU1::CMixedU2", 0);
+		assertReferenceCount(pdom, "CMixedS1::CMixedS3", 0);
+		
+		assertReferenceCount(pdom, "CMixedU1", 2);
+		assertReferenceCount(pdom, "CMixedS2", 2);
+		assertReferenceCount(pdom, "CMixedU2", 2);
+		assertReferenceCount(pdom, "CMixedS3", 2);
+	}
+	
+	// test "nested" union members and struct members declarations in C, they should not nest
+	public void testCMixedMemberDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "CMixedS1::CMixedU1::cmu1a", 0);
+		assertDeclarationCount(pdom, "CMixedS1::CMixedU1::CMixedS2::cms2a", 0);
+		assertDeclarationCount(pdom, "CMixedS1::CMixedU1::CMixedU2::cmu2a", 0);
+		assertDeclarationCount(pdom, "CMixedS1::CMixedS3::cms3a", 0);
+		
+		assertDeclarationCount(pdom, "CMixedU1::cmu1a", 1);
+		assertDeclarationCount(pdom, "CMixedS2::cms2a", 1);
+		assertDeclarationCount(pdom, "CMixedU2::cmu2a", 1);
+		assertDeclarationCount(pdom, "CMixedS3::cms3a", 1);
+	}
+	
+	// test "nested" union members and struct members definitions in C, they should not nest
+	public void testCMixedMemberDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "CMixedS1::CMixedU1::cmu1a", 0);
+		assertDefinitionCount(pdom, "CMixedS1::CMixedU1::CMixedS2::cms2a", 0);
+		assertDefinitionCount(pdom, "CMixedS1::CMixedU1::CMixedU2::cmu2a", 0);
+		assertDefinitionCount(pdom, "CMixedS1::CMixedS3::cms3a", 0);
+		
+		assertDefinitionCount(pdom, "CMixedU1::cmu1a", 1);
+		assertDefinitionCount(pdom, "CMixedS2::cms2a", 1);
+		assertDefinitionCount(pdom, "CMixedU2::cmu2a", 1);
+		assertDefinitionCount(pdom, "CMixedS3::cms3a", 1);
+	}
+	
+	// test "nested" union members and struct members references in C, they should not nest
+	public void testCMixedMemberReferences() throws Exception {
+		assertReferenceCount(pdom, "CMixedS1::CMixedU1::cmu1a", 0);
+		assertReferenceCount(pdom, "CMixedS1::CMixedU1::CMixedS2::cms2a", 0);
+		assertReferenceCount(pdom, "CMixedS1::CMixedU1::CMixedU2::cmu2a", 0);
+		assertReferenceCount(pdom, "CMixedS1::CMixedS3::cms3a", 0);
+		
+		assertReferenceCount(pdom, "CMixedU1::cmu1a", 2);
+		assertReferenceCount(pdom, "CMixedS2::cms2a", 2);
+		assertReferenceCount(pdom, "CMixedU2::cmu2a", 2);
+		assertReferenceCount(pdom, "CMixedS3::cms3a", 2);
+	}	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CFunctionTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CFunctionTests.java
new file mode 100644
index 0000000..0e194ad
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CFunctionTests.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 IBM Corporation.
+ * 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
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.c.ICBasicType;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * Tests for verifying whether the PDOM correctly stores information about
+ * C functions.
+ */
+public class CFunctionTests extends PDOMTestBase {
+
+	protected ICProject project;
+	protected PDOM pdom;
+
+	public static Test suite() {
+		return suite(CFunctionTests.class);
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		project = createProject("functionTests");
+		pdom = (PDOM) CCoreInternals.getPDOMManager().getPDOM(project);
+		pdom.acquireReadLock();
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+		if (project != null) {
+			project.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+		}
+	}
+
+	public void testExternCFunction() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "externCFunction");
+		assertEquals(1, bindings.length);
+		assertTrue(((IFunction) bindings[0]).isExtern());
+	}
+
+	public void testStaticCFunction() throws Exception {
+		// static elements cannot be found on global scope, see bug 161216
+		IBinding[] bindings = findUnqualifiedName(pdom, "staticCFunction");
+		assertEquals(1, bindings.length);
+		assertTrue(((IFunction) bindings[0]).isStatic());
+	}
+
+	public void testInlineCFunction() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "inlineCFunction");
+		assertEquals(1, bindings.length);
+		assertTrue(((IFunction) bindings[0]).isInline());
+	}
+
+	public void testVarArgsCFunction() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "varArgsCFunction");
+		assertEquals(1, bindings.length);
+		assertTrue(((IFunction) bindings[0]).takesVarArgs());
+	}
+
+	public void testKnRStyleFunctionWithProblemParameters() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "KnRfunctionWithProblemParameters");
+		assertEquals(1, bindings.length);
+		IFunction f= (IFunction) bindings[0];
+		IParameter[] params= f.getParameters();
+		assertEquals(3, params.length);
+		assertNull(params[0].getType()); // its a problem binding in the DOM 
+		assertTrue(params[1].getType() instanceof ICBasicType);
+		assertTrue(params[2].getType() instanceof ICBasicType); 
+	}
+	
+	public void testFunctionWithRegisterParam() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "storageClassCFunction");
+		assertEquals(1, bindings.length);
+		IFunction f= (IFunction) bindings[0];
+		IParameter[] params= f.getParameters();
+		assertEquals(2, params.length);
+		assertEquals(true, params[0].isRegister());
+		assertEquals(false, params[1].isRegister());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPClassTemplateTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPClassTemplateTests.java
new file mode 100644
index 0000000..d950037
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPClassTemplateTests.java
@@ -0,0 +1,347 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     Andrew Ferguson (Symbian) - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.util.Arrays;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IFunctionType;
+import org.eclipse.cdt.core.dom.ast.IPointerType;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTypeParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.parser.util.ObjectMap;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * Tests PDOM class template related bindings
+ */
+public class CPPClassTemplateTests extends PDOMTestBase {
+	protected PDOM pdom;
+	protected ICProject cproject;
+	
+	public static Test suite() {
+		return suite(CPPClassTemplateTests.class);
+	}
+	
+	@Override
+	public void setUp() throws Exception {
+		cproject= CProjectHelper.createCCProject("classTemplateTests"+System.currentTimeMillis(), "bin", IPDOMManager.ID_NO_INDEXER);
+		setUpSections(1);
+	}
+	
+	protected void setUpSections(int sections) throws Exception {
+		StringBuffer[] contents= TestSourceReader.getContentsForTest(
+				CTestPlugin.getDefault().getBundle(), "parser", getClass(), getName(), sections);
+		for(int i=0; i<contents.length; i++) {
+			IFile file= TestSourceReader.createFile(cproject.getProject(), new Path("refs.cpp"), contents[i].toString());
+		}
+		IndexerPreferences.set(cproject.getProject(), IndexerPreferences.KEY_INDEXER_ID, IPDOMManager.ID_FAST_INDEXER);
+		for(int i=0; i<5 && !CCoreInternals.getPDOMManager().isProjectRegistered(cproject); i++) {
+			Thread.sleep(200);
+		}
+		assertTrue(CCoreInternals.getPDOMManager().isProjectRegistered(cproject));
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+		pdom= (PDOM) CCoreInternals.getPDOMManager().getPDOM(cproject);
+		pdom.acquireReadLock();
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		if(pdom!=null) {
+			pdom.releaseReadLock();
+		}
+		pdom= null;
+		cproject.getProject().delete(true, NPM);
+	}
+	
+	/*************************************************************************/
+	
+	//	template<typename T>
+	//	class Foo {};
+	//
+	//	class A{}; class B{};
+	//
+	//	template<>
+	//	class Foo<A> {};
+	//
+	//	Foo<A> a;
+	//	Foo<B> b;
+	public void testSpecializations() throws Exception {
+		IBinding[] as= pdom.findBindings(new char[][]{{'a'}}, IndexFilter.ALL, NPM);
+		IBinding[] bs= pdom.findBindings(new char[][]{{'b'}}, IndexFilter.ALL, NPM);
+		
+		assertEquals(1, as.length);
+		assertEquals(1, bs.length);
+		assertInstance(as[0], ICPPVariable.class);
+		assertInstance(bs[0], ICPPVariable.class);
+		
+		ICPPVariable a= (ICPPVariable) as[0];
+		ICPPVariable b= (ICPPVariable) bs[0];
+		
+		assertInstance(a.getType(), ICPPSpecialization.class);
+		assertInstance(b.getType(), ICPPSpecialization.class);
+		
+		ICPPSpecialization asp= (ICPPSpecialization) a.getType();
+		ICPPSpecialization bsp= (ICPPSpecialization) b.getType();
+		
+		assertEquals(1, asp.getArgumentMap().size());
+		assertEquals(1, bsp.getArgumentMap().size());
+		
+		assertInstance(asp.getArgumentMap().keyAt(0), ICPPTemplateParameter.class);
+		assertInstance(bsp.getArgumentMap().keyAt(0), ICPPTemplateParameter.class);
+		
+		assertInstance(asp.getArgumentMap().getAt(0), ICPPClassType.class);
+		assertInstance(bsp.getArgumentMap().getAt(0), ICPPClassType.class);
+		
+		assertEquals("A", ((ICPPClassType) asp.getArgumentMap().getAt(0)).getName());
+		assertEquals("B", ((ICPPClassType) bsp.getArgumentMap().getAt(0)).getName());
+		
+		assertDeclarationCount(pdom, "a", 1);
+		assertDeclarationCount(pdom, "b", 1);
+	}
+	
+	// template<typename C>
+	// class D {
+	// public:
+	// int foo(C c) {return 1};
+	// };
+	public void testSimpleDefinition() throws Exception {
+		assertDeclarationCount(pdom, "D", 1);
+		IIndexFragmentBinding[] b= pdom.findBindings(new char[][] {{'D'}}, IndexFilter.ALL_DECLARED, NPM);
+		assertEquals(1, b.length);
+		assertTrue(b[0] instanceof ICPPClassTemplate);
+		ICPPClassTemplate ct= (ICPPClassTemplate) b[0];
+		ICPPTemplateParameter[] tp= ct.getTemplateParameters();
+		assertEquals(1, tp.length);
+		assertTrue(tp[0] instanceof ICPPTemplateTypeParameter);
+		ICPPTemplateTypeParameter ctp= (ICPPTemplateTypeParameter) tp[0];
+		assertNull(ctp.getDefault());
+		assertEquals(0, ct.getPartialSpecializations().length);
+	}
+	
+	// template<class C=char> /* typename and class are equivalent in template parameter context */
+	// class D {
+	// public:
+	// int foo(C c) {return 1};
+	// };
+	public void testDefinition() throws Exception {
+		assertDeclarationCount(pdom, "D", 1);
+		IIndexFragmentBinding[] b= pdom.findBindings(new char[][] {{'D'}}, IndexFilter.ALL_DECLARED, NPM);
+		assertEquals(1, b.length);
+		assertTrue(b[0] instanceof ICPPClassTemplate);
+		ICPPClassTemplate ct= (ICPPClassTemplate) b[0];
+		ICPPTemplateParameter[] tp= ct.getTemplateParameters();
+		assertEquals(1, tp.length);
+		assertTrue(tp[0] instanceof ICPPTemplateTypeParameter);
+		assertEquals("C", tp[0].getName());
+		assertEquals(new String[] {"D","C"}, tp[0].getQualifiedName());
+		assertEquals(new char[][] {{'D'},{'C'}}, tp[0].getQualifiedNameCharArray());
+		ICPPTemplateTypeParameter ctp= (ICPPTemplateTypeParameter) tp[0];
+		IType def= ctp.getDefault();
+		assertTrue(def instanceof IBasicType);
+		assertEquals(0, ct.getPartialSpecializations().length);
+	}
+	
+	// class TA {};
+	// class TC {};
+	//
+	// template<typename A= TA, typename B, typename C=TC>
+	// class E {
+	// public:
+	// int foo(C c, B b, A a) {return 1};
+	// };
+	public void testDefinition2() throws Exception {
+		assertDeclarationCount(pdom, "E", 1);
+		IIndexFragmentBinding[] b= pdom.findBindings(new char[][] {{'E'}}, IndexFilter.ALL_DECLARED, NPM);
+		assertEquals(1, b.length);
+		assertTrue(b[0] instanceof ICPPClassTemplate);
+		ICPPClassTemplate ct= (ICPPClassTemplate) b[0];
+		ICPPTemplateParameter[] tp= ct.getTemplateParameters();
+		assertEquals(3, tp.length);
+		
+		assertTrue(tp[0] instanceof ICPPTemplateTypeParameter);
+		assertEquals("A", tp[0].getName());
+		assertEquals(new String[] {"E","A"}, tp[0].getQualifiedName());
+		assertEquals(new char[][] {{'E'},{'A'}}, tp[0].getQualifiedNameCharArray());
+		ICPPTemplateTypeParameter ctpa= (ICPPTemplateTypeParameter) tp[0];
+		IType defa= ctpa.getDefault();
+		assertTrue(defa instanceof ICPPClassType);
+		ICPPClassType ctdefa= (ICPPClassType) defa;
+		assertEquals(new char[][] {{'T','A'}}, ctdefa.getQualifiedNameCharArray());
+		
+		assertTrue(tp[1] instanceof ICPPTemplateTypeParameter);
+		assertEquals("B", tp[1].getName());
+		assertEquals(new String[] {"E","B"}, tp[1].getQualifiedName());
+		assertEquals(new char[][] {{'E'},{'B'}}, tp[1].getQualifiedNameCharArray());
+		ICPPTemplateTypeParameter ctpb= (ICPPTemplateTypeParameter) tp[1];
+		IType defb= ctpb.getDefault();
+		assertNull(defb);
+		
+		assertTrue(tp[2] instanceof ICPPTemplateTypeParameter);
+		assertEquals("C", tp[2].getName());
+		assertEquals(new String[] {"E","C"}, tp[2].getQualifiedName());
+		assertEquals(new char[][] {{'E'},{'C'}}, tp[2].getQualifiedNameCharArray());
+		ICPPTemplateTypeParameter ctpc= (ICPPTemplateTypeParameter) tp[2];
+		IType defc= ctpc.getDefault();
+		assertTrue(defc instanceof ICPPClassType);
+		ICPPClassType ctdefc= (ICPPClassType) defc;
+		assertEquals(new char[][] {{'T','C'}}, ctdefc.getQualifiedNameCharArray());
+		
+		assertEquals(0, ct.getPartialSpecializations().length);
+	}
+	
+	// template<typename T>
+	// class Foo {
+	//    public:
+	//    T (*f)(T);
+	// };
+	//
+	// class A {};
+	// Foo<A> foo = *new Foo<A>();
+	// void bar() {
+	//    foo->f(*new A());
+	// }
+	public void testFunctionPointer() throws Exception {
+		IIndexFragmentBinding[] bs= pdom.findBindings(new char[][] {"foo".toCharArray()}, IndexFilter.ALL, NPM);
+		assertEquals(1, bs.length);
+		assertInstance(bs[0], ICPPVariable.class);
+		ICPPVariable var= (ICPPVariable) bs[0];
+		assertInstance(var.getType(), ICPPClassType.class);
+		ICPPClassType ct= (ICPPClassType) var.getType();
+		assertEquals(1, ct.getFields().length);
+		assertInstance(ct.getFields()[0].getType(), IPointerType.class);
+		IPointerType pt= (IPointerType) ct.getFields()[0].getType();
+		assertInstance(pt.getType(), IFunctionType.class);
+		IFunctionType ft= (IFunctionType) pt.getType();
+		assertInstance(ft.getReturnType(), ICPPClassType.class);
+		assertEquals(1, ft.getParameterTypes().length);
+		assertInstance(ft.getParameterTypes()[0], ICPPClassType.class);
+	}
+	
+	// template<typename C>
+	// class D {
+	// public:
+	// int foo(C c) {return 1};
+	// };
+	//
+	// class N {};
+	//
+	// template<>
+	// class D<N> {
+	// public:
+	// int foo(N n) {return 2;}
+	// };
+	//
+	// D<N> dn;
+	// D<int> dint;
+	public void testExplicitInstantiation() throws Exception {
+		
+		{
+			// template
+			IIndexFragmentBinding[] b= pdom.findBindings(new char[][] {{'D'}}, IndexFilter.ALL_DECLARED, NPM);
+			assertEquals(2, b.length);
+			assertTrue(!(b[0] instanceof ICPPClassTemplate) || !(b[1] instanceof ICPPClassTemplate));
+			int i= b[0] instanceof ICPPClassTemplate ? 0 : 1;
+			
+			assertInstance(b[i], ICPPClassTemplate.class);
+			ICPPClassTemplate ct= (ICPPClassTemplate) b[i];
+			ICPPTemplateParameter[] tp= ct.getTemplateParameters();
+			assertEquals(1, tp.length);
+			assertInstance(tp[i], ICPPTemplateTypeParameter.class);
+			ICPPTemplateTypeParameter ctp= (ICPPTemplateTypeParameter) tp[i];
+			assertNull(ctp.getDefault());
+		}
+
+		{
+			assertDeclarationCount(pdom, "dn", 1);
+			IIndexFragmentBinding[] b= pdom.findBindings(new char[][] {"dn".toCharArray()}, IndexFilter.ALL, NPM);
+			assertEquals(1, b.length);
+			assertInstance(b[0], ICPPVariable.class);
+			ICPPVariable var= (ICPPVariable) b[0];
+			assertInstance(var.getType(), ICPPClassType.class);
+			assertInstance(var.getType(), ICPPSpecialization.class);
+			ICPPSpecialization cp= (ICPPSpecialization) var.getType();
+			ObjectMap m= cp.getArgumentMap();
+			assertEquals(1, m.size());
+			Object key= m.keyAt(0), val= m.get(key);
+			assertInstance(key, ICPPTemplateTypeParameter.class);
+			assertInstance(val, ICPPClassType.class);
+			assertEquals(new String[] {"D","C"}, ((ICPPTemplateTypeParameter)key).getQualifiedName());
+			assertEquals(new String[] {"N"}, ((ICPPClassType)val).getQualifiedName());
+		}
+		
+		{
+			assertDeclarationCount(pdom, "dint", 1);
+			IIndexFragmentBinding[] b= pdom.findBindings(new char[][] {"dint".toCharArray()}, IndexFilter.ALL, NPM);
+			assertEquals(1, b.length);
+			assertTrue(b[0] instanceof ICPPVariable);
+			ICPPVariable var= (ICPPVariable) b[0];
+			assertInstance(var.getType(), ICPPClassType.class);
+			assertInstance(var.getType(), ICPPSpecialization.class);
+			ICPPSpecialization cp= (ICPPSpecialization) var.getType();
+			ObjectMap m= cp.getArgumentMap();
+			assertEquals(1, m.size());
+			Object key= m.keyAt(0), val= m.get(key);
+			assertInstance(key, ICPPTemplateTypeParameter.class);
+			assertInstance(val, IBasicType.class);
+			assertEquals(new String[] {"D","C"}, ((ICPPTemplateTypeParameter)key).getQualifiedName());
+			assertEquals(IBasicType.t_int, ((IBasicType)val).getType());
+
+		}
+	}
+	
+	@Override
+	protected void assertInstance(Object o, Class c) {
+		assertNotNull(o);
+		assertTrue("Expected "+c.getName()+" but got "+o.getClass().getName(), c.isInstance(o));
+	}
+	
+	protected void assertEquals(char[] c1, char[] c2) {
+		assertTrue(Arrays.equals(c1, c2));
+	}
+	
+	protected void assertEquals(String[] s1, String[] s2) {
+		assertTrue(Arrays.equals(s1, s2));
+	}
+	
+	protected void assertEquals(char[][] c1, char[][] c2) {
+		if(c1==null || c2==null) {
+			assertTrue(c1==c2);
+			return;
+		}
+		
+		assertEquals(c1.length, c2.length);
+		for(int i=0; i<c1.length; i++) {
+			assertEquals(c1[i], c2[i]);
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPCompositeTypeTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPCompositeTypeTests.java
new file mode 100644
index 0000000..b4e5fa5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPCompositeTypeTests.java
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.internal.pdom.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+
+/**
+ * Tests for verifying whether the PDOM correctly stores information about
+ * C++ structs and unions.
+ */
+public class CPPCompositeTypeTests extends PDOMTestBase {
+
+	private ICProject project;
+	private PDOM pdom;
+
+	public static Test suite() {
+		return new TestSuite(CPPCompositeTypeTests.class);
+	}
+
+	protected void setUp() throws Exception {
+		CPPCompositeTypeTests foo = null;
+		
+		project = createProject("compositeTypeTests");
+		pdom = (PDOM) CCoreInternals.getPDOMManager().getPDOM(project);
+		pdom.acquireReadLock();
+	}
+	
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+	}
+	
+	public void testSimpleStructure() throws Exception {
+		assertType(pdom, "SimpleStructure", ICompositeType.class);
+	}
+	
+	public void testSimpleStructureDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "SimpleStructure", 1);
+		assertDeclarationCount(pdom, "SimpleStructure::ssa", 1);
+	}
+
+	public void testSimpleStructureDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "SimpleStructure", 1);
+		assertDefinitionCount(pdom, "SimpleStructure::ssa", 1);
+	}
+	
+	public void testSimpleStructureReferences() throws Exception {
+		assertReferenceCount(pdom, "SimpleStructure", 2);
+		assertReferenceCount(pdom, "SimpleStructure::ssa", 2);
+	}
+
+	public void testDeepStructure() throws Exception {
+		assertType(pdom, "Structure1", ICompositeType.class);
+		assertType(pdom, "Structure1::Structure2", ICompositeType.class);
+		assertType(pdom, "Structure1::Structure2::Structure3", ICompositeType.class);
+	}
+	
+	public void testDeepStructureDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "Structure1", 1);
+		assertDeclarationCount(pdom, "Structure1::Structure2", 1);
+		assertDeclarationCount(pdom, "Structure1::Structure2::Structure3", 1);
+	}
+	
+	public void testDeepStructureMemberDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "Structure1::s1a", 1);
+		assertDeclarationCount(pdom, "Structure1::s1b", 1);
+		assertDeclarationCount(pdom, "Structure1::s1c", 1);
+		assertDeclarationCount(pdom, "Structure1::Structure2::s2b", 1);
+		assertDeclarationCount(pdom, "Structure1::Structure2::Structure3::s3a", 1);
+	}
+	
+	public void testDeepStructureDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "Structure1", 1);
+		assertDefinitionCount(pdom, "Structure1::Structure2", 1);
+		assertDefinitionCount(pdom, "Structure1::Structure2::Structure3", 1);
+	}
+
+	public void testDeepStructureMemberDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "Structure1::s1a", 1);
+		assertDefinitionCount(pdom, "Structure1::s1b", 1);
+		assertDefinitionCount(pdom, "Structure1::s1c", 1);
+		assertDefinitionCount(pdom, "Structure1::Structure2::s2b", 1);
+		assertDefinitionCount(pdom, "Structure1::Structure2::Structure3::s3a", 1);
+	}
+
+	public void testDeepStructureReferences() throws Exception {
+		assertReferenceCount(pdom, "Structure1", 6);
+		assertReferenceCount(pdom, "Structure1::Structure2", 4);
+		assertReferenceCount(pdom, "Structure1::Structure2::Structure3", 2);
+	}
+	
+	public void testDeepStructureMemberReferences() throws Exception {
+		assertReferenceCount(pdom, "Structure1::s1a", 2);
+		assertReferenceCount(pdom, "Structure1::s1b", 3);
+		assertReferenceCount(pdom, "Structure1::s1c", 14);
+		assertReferenceCount(pdom, "Structure1::Structure2::s2b", 12);
+		assertReferenceCount(pdom, "Structure1::Structure2::Structure3::s3a", 8);
+	}
+
+	public void testUnionDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "Union1", 1);
+		assertDeclarationCount(pdom, "Union1::Union2", 1);
+	}
+	
+	public void testUnionDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "Union1", 1);
+		assertDefinitionCount(pdom, "Union1::Union2", 1);
+	}
+	
+	public void testUnionReferences() throws Exception {
+		assertReferenceCount(pdom, "Union1", 4);
+		assertReferenceCount(pdom, "Union1::Union2", 2);
+	}
+	
+	public void testUnionMemberDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "Union1::u1a", 1);
+		assertDeclarationCount(pdom, "Union1::u1d", 1);
+	}
+	
+	public void testUnionMemberDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "Union1::u1a", 1);
+		assertDefinitionCount(pdom, "Union1::u1d", 1);
+	}
+	
+	public void testUnionMemberReferences() throws Exception {
+		assertReferenceCount(pdom, "Union1::u1a", 2);
+		assertReferenceCount(pdom, "Union1::u1d", 1);
+	}
+	
+	public void testMixedDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "MixedS1::MixedU1", 1);
+		assertDeclarationCount(pdom, "MixedS1::MixedU1::MixedS2", 1);
+		assertDeclarationCount(pdom, "MixedS1::MixedU1::MixedU2", 1);
+		assertDeclarationCount(pdom, "MixedS1::MixedS3", 1);
+	}
+	
+	public void testMixedDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "MixedS1::MixedU1", 1);
+		assertDefinitionCount(pdom, "MixedS1::MixedU1::MixedS2", 1);
+		assertDefinitionCount(pdom, "MixedS1::MixedU1::MixedU2", 1);
+		assertDefinitionCount(pdom, "MixedS1::MixedS3", 1);
+	}
+	
+	public void testMixedReferences() throws Exception {
+		assertReferenceCount(pdom, "MixedS1::MixedU1", 6);
+		assertReferenceCount(pdom, "MixedS1::MixedU1::MixedS2", 2);
+		assertReferenceCount(pdom, "MixedS1::MixedU1::MixedU2", 2);
+		assertReferenceCount(pdom, "MixedS1::MixedS3", 2);
+	}
+	
+	public void testMixedMemberDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "MixedS1::MixedU1::mu1a", 1);
+		assertDeclarationCount(pdom, "MixedS1::MixedU1::MixedS2::ms2a", 1);
+		assertDeclarationCount(pdom, "MixedS1::MixedU1::MixedU2::mu2a", 1);
+		assertDeclarationCount(pdom, "MixedS1::MixedS3::ms3a", 1);
+	}
+	
+	public void testMixedMemberDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "MixedS1::MixedU1::mu1a", 1);
+		assertDefinitionCount(pdom, "MixedS1::MixedU1::MixedS2::ms2a", 1);
+		assertDefinitionCount(pdom, "MixedS1::MixedU1::MixedU2::mu2a", 1);
+		assertDefinitionCount(pdom, "MixedS1::MixedS3::ms3a", 1);
+	}
+	
+	public void testMixedMemberReferences() throws Exception {
+		assertReferenceCount(pdom, "MixedS1::MixedU1::mu1a", 2);
+		assertReferenceCount(pdom, "MixedS1::MixedU1::MixedS2::ms2a", 2);
+		assertReferenceCount(pdom, "MixedS1::MixedU1::MixedU2::mu2a", 2);
+		assertReferenceCount(pdom, "MixedS1::MixedS3::ms3a", 2);
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPFieldTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPFieldTests.java
new file mode 100644
index 0000000..097d16b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPFieldTests.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.internal.pdom.tests;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IField;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * Tests for verifying whether the PDOM correctly stores information about
+ * C++ class data members.
+ */
+public class CPPFieldTests extends PDOMTestBase {
+
+	protected PDOM pdom;
+	protected ICProject project;
+
+	public static Test suite() {
+		return suite(CPPFieldTests.class);
+	}
+	
+	protected void setUp() throws Exception {
+		project = createProject("fieldTests");
+		pdom = (PDOM) CCoreInternals.getPDOMManager().getPDOM(project);
+		pdom.acquireReadLock();
+	}
+
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+		if (project != null) {
+			project.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+		}
+	}
+
+	public void testFieldDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "Class1::c1a", 1);
+	}
+	
+	public void testFieldDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "Class1::c1a", 1);
+	}
+	
+	public void testFieldReferences() throws Exception {
+		assertReferenceCount(pdom, "Class1::c1a", 4);
+	}
+	
+	public void testInheritedFieldDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "Class2::c1a", 0);
+	}
+	
+	public void testInheritedFieldDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "Class2::c1a", 0);
+	}
+	
+	public void testInheritedFieldReferences() throws Exception {
+		assertReferenceCount(pdom, "Class2::c1a", 0);
+	}
+	
+	public void testDefaultPrivateField() throws Exception {
+		assertVisibility(pdom, "Class1::defaultField", ICPPMember.v_private);
+	}
+	
+	public void testPrivateField() throws Exception {
+		assertVisibility(pdom, "Class1::privateField", ICPPMember.v_private);
+	}
+	
+	public void testProtectedField() throws Exception {
+		assertVisibility(pdom, "Class1::protectedField", ICPPMember.v_protected);
+	}
+	
+	public void testPublicField() throws Exception {
+		assertVisibility(pdom, "Class1::publicField", ICPPMember.v_public);
+	}
+	
+	public void testMutableField() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::mutableField");
+		assertEquals(1, bindings.length);
+		ICPPField field = (ICPPField) bindings[0];
+		assertTrue(field.isMutable());
+	}
+	
+	public void testStaticField() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::staticField");
+		assertEquals(1, bindings.length);
+		ICPPField field = (ICPPField) bindings[0];
+		assertTrue(field.isStatic());
+	}
+	
+	public void testIntField() throws Exception {
+		assertFieldType(pdom, "Class1::c1a", IBasicType.t_int);
+	}
+
+	public void testDoubleField() throws Exception {
+		assertFieldType(pdom, "Class1::c1b", IBasicType.t_double);
+	}
+
+	public void testCharField() throws Exception {
+		assertFieldType(pdom, "Class2::c2a", IBasicType.t_char);
+	}
+
+	public void testFloatField() throws Exception {
+		assertFieldType(pdom, "Class2::c2b", IBasicType.t_float);
+	}
+
+	private void assertFieldType(PDOM pdom, String name, int type) throws CoreException, DOMException {
+		IBinding[] bindings = findQualifiedName(pdom, name);
+		assertEquals(1, bindings.length);
+		IField field = (IField) bindings[0];
+		assertEquals(type, ((IBasicType) field.getType()).getType());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPFunctionTemplateTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPFunctionTemplateTests.java
new file mode 100644
index 0000000..b22b63d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPFunctionTemplateTests.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *    QNX - Initial implementation
+ *    Andrew Ferguson (Symbian)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionTemplate;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.index.IIndexFragment;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class CPPFunctionTemplateTests extends PDOMTestBase {
+	protected PDOM pdom;
+	protected ICProject cproject;
+	
+	public static Test suite() {
+		return suite(CPPFunctionTemplateTests.class);
+	}
+	
+	@Override
+	public void setUp() throws Exception {
+		cproject= CProjectHelper.createCCProject("functionTemplateTests"+System.currentTimeMillis(), "bin", IPDOMManager.ID_NO_INDEXER);		
+	}
+	
+	protected void setUpSections(int sections) throws Exception {
+		StringBuffer[] contents= TestSourceReader.getContentsForTest(
+				CTestPlugin.getDefault().getBundle(), "parser", getClass(), getName(), sections);
+		for(int i=0; i<contents.length; i++) {
+			IFile file= TestSourceReader.createFile(cproject.getProject(), new Path("refs.cpp"), contents[i].toString());
+		}
+		IndexerPreferences.set(cproject.getProject(), IndexerPreferences.KEY_INDEXER_ID, IPDOMManager.ID_FAST_INDEXER);
+		CCorePlugin.getIndexManager().reindex(cproject);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+		pdom= (PDOM) CCoreInternals.getPDOMManager().getPDOM(cproject);
+		pdom.acquireReadLock();
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		if(pdom!=null) {
+			pdom.releaseReadLock();
+		}
+		pdom= null;
+		cproject.getProject().delete(true, NPM);
+	}
+	
+	/*************************************************************************/
+
+	//	template<typename X>
+	//	void foo(X x) {}
+	//
+	//	template<typename A, typename B>
+	//	void foo(A a, B b) {}
+	//
+	//	class C1 {}; class C2 {}; class C3 {};
+	//
+	//	void bar() {
+	//		foo<C1>(*new C1());
+	//		foo<C2>(*new C2());
+	//		foo<C3>(*new C3());
+	//      foo<C1,C2>(*new C1(), *new C2());
+	//      foo<C2,C3>(*new C2(), *new C3());
+	//      foo<C3,C1>(*new C3(), *new C1());
+	//      foo<C2,C1>(*new C2(), *new C1());
+	//      foo<C3,C2>(*new C3(), *new C2());
+	//      foo<C1,C3>(*new C1(), *new C3());
+	//	}
+	public void testSimpleInstantiation() throws Exception {
+		setUpSections(1);
+		IBinding[] bs= pdom.findBindings(new char[][]{"foo".toCharArray()}, IndexFilter.ALL_DECLARED, NPM);
+		assertEquals(2, bs.length);
+		assertInstance(bs[0], ICPPFunctionTemplate.class);
+		assertInstance(bs[1], ICPPFunctionTemplate.class);
+		
+		boolean b= ((ICPPFunctionTemplate)bs[0]).getTemplateParameters().length==1;
+		ICPPFunctionTemplate fooX= (ICPPFunctionTemplate) bs[b ? 0 : 1];
+		ICPPFunctionTemplate fooAB= (ICPPFunctionTemplate) bs[b ? 1 : 0];
+		
+		assertNameCount(pdom, fooX, IIndexFragment.FIND_REFERENCES, 3);
+		assertNameCount(pdom, fooAB, IIndexFragment.FIND_REFERENCES, 6);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPFunctionTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPFunctionTests.java
new file mode 100644
index 0000000..d93def1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPFunctionTests.java
@@ -0,0 +1,218 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 IBM Corporation.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IFunctionType;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.IPointerType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBasicType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * Tests for verifying whether the PDOM correctly stores information about
+ * C++ non-member functions.
+ */
+public class CPPFunctionTests extends PDOMTestBase {
+
+	protected ICProject project;
+
+	protected PDOM pdom;
+
+	public static Test suite() {
+		return suite(CPPFunctionTests.class);
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		project = createProject("functionTests");
+		pdom = (PDOM) CCoreInternals.getPDOMManager().getPDOM(project);
+		pdom.acquireReadLock();
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+		if (project != null) {
+			project.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+		}
+	}
+	
+	public void testPointerToFunctionType() throws Exception {
+		assertDeclarationCount(pdom, "int2intPtr", 1);
+		IIndexFragmentBinding[] b= pdom.findBindings(new char[][] {"int2intPtr".toCharArray()}, IndexFilter.ALL, NPM);
+		assertEquals(1, b.length);
+		assertInstance(b[0], ICPPVariable.class);
+		ICPPVariable v= (ICPPVariable) b[0];
+		assertInstance(v.getType(), IPointerType.class);
+		IPointerType pt= (IPointerType) v.getType();
+		assertInstance(pt.getType(), IFunctionType.class);
+		IFunctionType ft= (IFunctionType) pt.getType();
+		assertInstance(ft.getReturnType(), ICPPBasicType.class);
+		assertEquals(1, ft.getParameterTypes().length);
+		assertInstance(ft.getParameterTypes()[0], ICPPBasicType.class);
+	}
+	
+	public void testFunctionType() throws Exception {
+		assertType(pdom, "normalDeclaration1", ICPPFunction.class);		
+		assertType(pdom, "normalDeclaration2", ICPPFunction.class);		
+	}
+	
+	public void testFunctionDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "normalDeclaration1", 1);
+		assertDeclarationCount(pdom, "normalDeclaration2", 1);
+	}
+
+	public void testFunctionDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "normalDeclaration1", 1);
+		assertDefinitionCount(pdom, "normalDeclaration2", 1);
+	}
+
+	public void testFunctionReferences() throws Exception {
+		assertReferenceCount(pdom, "normalDeclaration1", 2);
+		assertReferenceCount(pdom, "normalDeclaration2", 3);
+		assertReferenceCount(pdom, "forwardDeclaration", 2);
+	}
+
+	public void testParameters() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "normalCPPFunction");
+		assertEquals(1, bindings.length);
+		ICPPFunction function = (ICPPFunction) bindings[0];
+		IParameter[] parameters = function.getParameters();
+		assertEquals(IBasicType.t_int, ((ICPPBasicType) parameters[0].getType()).getType());
+		assertEquals("p1", parameters[0].getName());
+		assertEquals(IBasicType.t_char, ((ICPPBasicType) parameters[1].getType()).getType());
+		assertEquals("p2", parameters[1].getName());
+		assertEquals(IBasicType.t_float, ((ICPPBasicType) parameters[2].getType()).getType());
+		assertEquals("p3", parameters[2].getName());
+	}
+	
+	public void testStorageClassSpecParameters() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "storageClassCPPFunction");
+		assertEquals(1, bindings.length);
+		ICPPFunction function = (ICPPFunction) bindings[0];
+		IParameter[] parameters = function.getParameters();
+		assertEquals(2, parameters.length);
+		assertEquals(true, parameters[0].isRegister());
+		assertEquals(true, parameters[1].isAuto());
+	}
+	
+	public void testExternCPPFunction() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "externCPPFunction");
+		assertEquals(1, bindings.length);
+		assertTrue(((ICPPFunction) bindings[0]).isExtern());
+	}
+	
+	public void testStaticCPPFunction() throws Exception {
+		// static elements cannot be found on global scope, see bug 161216
+		IBinding[] bindings = findUnqualifiedName(pdom, "staticCPPFunction");
+		assertEquals(1, bindings.length);
+		assertTrue(((ICPPFunction) bindings[0]).isStatic());
+	}
+	
+	public void testInlineCPPFunction() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "inlineCPPFunction");
+		assertEquals(1, bindings.length);
+		assertTrue(((ICPPFunction) bindings[0]).isInline());
+	}
+	
+	public void testVarArgsCPPFunction() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "varArgsCPPFunction");
+		assertEquals(1, bindings.length);
+		assertTrue(((ICPPFunction) bindings[0]).takesVarArgs());
+	}
+	
+	public void testForwardDeclarationType() throws Exception {
+		assertType(pdom, "forwardDeclaration", ICPPFunction.class);		
+	}
+	
+	public void testForwardDeclaration() throws Exception {
+		assertDeclarationCount(pdom, "forwardDeclaration", 2);
+		assertDefinitionCount(pdom, "forwardDeclaration", 1);
+	}
+	
+	public void testVoidFunction() throws Exception {
+		assertReturnType(pdom, "voidCPPFunction", IBasicType.t_void);
+	}
+
+	public void testIntFunction() throws Exception {
+		assertReturnType(pdom, "intCPPFunction", IBasicType.t_int);
+	}
+
+	public void testDoubleFunction() throws Exception {
+		assertReturnType(pdom, "doubleCPPFunction", IBasicType.t_double);
+	}
+
+	public void testCharFunction() throws Exception {
+		assertReturnType(pdom, "charCPPFunction", IBasicType.t_char);
+	}
+
+	public void testFloatFunction() throws Exception {
+		assertReturnType(pdom, "floatCPPFunction", IBasicType.t_float);
+	}
+
+	public void testOverloadedFunction() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "overloadedFunction");
+		assertEquals(2, bindings.length);
+		boolean[] seen = new boolean[2];
+
+		for (int i = 0; i < 2; i++) {
+			ICPPFunction function = (ICPPFunction) bindings[i];
+			assertEquals(1, pdom.findNames(function, IIndex.FIND_DECLARATIONS_DEFINITIONS).length);
+			assertEquals(1, pdom.findNames(function, IIndex.FIND_DEFINITIONS).length);
+			IParameter[] parameters = function.getParameters();
+			switch (parameters.length) {
+			case 0:
+				assertFalse(seen[0]);
+				assertEquals(1, pdom.findNames(function, IIndex.FIND_REFERENCES).length);
+				seen[0] = true;
+				break;
+			case 1:
+				assertFalse(seen[1]);
+				assertEquals(2, pdom.findNames(function, IIndex.FIND_REFERENCES).length);
+				assertEquals("p1", parameters[0].getName());
+				assertEquals(IBasicType.t_int, ((ICPPBasicType) parameters[0].getType()).getType());
+				seen[1] = true;
+				break;
+			default:
+				fail();
+			}
+		}
+
+		for (int i = 0; i < seen.length; i++) {
+			assertTrue(seen[i]);
+		}
+	}
+
+	private void assertReturnType(PDOM pdom, String name, int type) throws CoreException, DOMException {
+		IBinding[] bindings = findQualifiedName(pdom, name);
+		assertEquals(1, bindings.length);
+		IFunction function = (IFunction) bindings[0];
+		IFunctionType functionType = function.getType();
+		assertEquals(type, ((ICPPBasicType) functionType.getReturnType()).getType());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPVariableTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPVariableTests.java
new file mode 100644
index 0000000..c55d894
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CPPVariableTests.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+
+package org.eclipse.cdt.internal.pdom.tests;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * Tests for verifying whether the PDOM correctly stores information about
+ * C++ variable declarations.
+ */
+public class CPPVariableTests extends PDOMTestBase {
+
+	protected ICProject project;
+	protected PDOM pdom;
+
+	public static Test suite() {
+		return suite(CPPVariableTests.class);
+	}
+
+	protected void setUp() throws Exception {
+		project = createProject("variableTests");
+		pdom = (PDOM) CCoreInternals.getPDOMManager().getPDOM(project);
+		pdom.acquireReadLock();
+	}
+
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+		if (project != null) {
+			project.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+		}
+	}
+	
+	public void testCPPAutoVariable() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "autoCPPVariable");
+		assertEquals(1, bindings.length);
+		ICPPVariable variable = (ICPPVariable) bindings[0];
+		assertTrue(variable.isAuto());
+	}
+
+	public void testCPPExternVariable() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "externCPPVariable");
+		assertEquals(1, bindings.length);
+		ICPPVariable variable = (ICPPVariable) bindings[0];
+		assertTrue(variable.isExtern());
+	}
+
+	public void testCPPRegisterVariable() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "registerCPPVariable");
+		assertEquals(1, bindings.length);
+		ICPPVariable variable = (ICPPVariable) bindings[0];
+		assertTrue(variable.isRegister());
+	}
+
+	public void testCPPStaticVariable() throws Exception {
+		// static elements cannot be found on global scope, see bug 161216
+		IBinding[] bindings = findUnqualifiedName(pdom, "staticCPPVariable");
+		assertEquals(1, bindings.length);
+		ICPPVariable variable = (ICPPVariable) bindings[0];
+		assertTrue(variable.isStatic());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CVariableTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CVariableTests.java
new file mode 100644
index 0000000..eec3085
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/CVariableTests.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+
+package org.eclipse.cdt.internal.pdom.tests;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * Tests for verifying whether the PDOM correctly stores information about
+ * C variable declarations.
+ */
+public class CVariableTests extends PDOMTestBase {
+
+	protected ICProject project;
+	protected PDOM pdom;
+
+	public static Test suite() {
+		return suite(CVariableTests.class);
+	}
+
+	protected void setUp() throws Exception {
+		project = createProject("variableTests");
+		pdom = (PDOM) CCoreInternals.getPDOMManager().getPDOM(project);
+		pdom.acquireReadLock();
+	}
+
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+		if (project != null) {
+			project.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+		}
+	}
+	
+	public void testCAutoVariable() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "autoCVariable");
+		assertEquals(1, bindings.length);
+		IVariable variable = (IVariable) bindings[0];
+		assertTrue(variable.isAuto());
+	}
+
+	public void testCExternVariable() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "externCVariable");
+		assertEquals(1, bindings.length);
+		IVariable variable = (IVariable) bindings[0];
+		assertTrue(variable.isExtern());
+	}
+
+	public void testCRegisterVariable() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "registerCVariable");
+		assertEquals(1, bindings.length);
+		IVariable variable = (IVariable) bindings[0];
+		assertTrue(variable.isRegister());
+	}
+
+	public void testCStaticVariable() throws Exception {
+		// static elements cannot be found on global scope, see bug 161216		
+		IBinding[] bindings = findUnqualifiedName(pdom, "staticCVariable");
+		assertEquals(1, bindings.length);
+		IVariable variable = (IVariable) bindings[0];
+		assertTrue(variable.isStatic());
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/ClassTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/ClassTests.java
new file mode 100644
index 0000000..4e30864
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/ClassTests.java
@@ -0,0 +1,236 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * QNX - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
+ * IBM Corporation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.IName;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IField;
+import org.eclipse.cdt.core.dom.ast.IScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceScope;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.cdt.internal.core.pdom.dom.PDOMName;
+
+/**
+ * @author Doug Schaefer
+ *
+ */
+public class ClassTests extends PDOMTestBase {
+
+	protected PDOM pdom;
+
+	public static Test suite() {
+		return suite(ClassTests.class, "_");
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		if (pdom == null) {
+			ICProject project = createProject("classTests");
+			pdom = (PDOM)CCoreInternals.getPDOMManager().getPDOM(project);
+		}
+		pdom.acquireReadLock();
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+	}
+	
+	public void test1() throws Exception {
+		IBinding[] Bs = pdom.findBindings(Pattern.compile("B"), true, IndexFilter.ALL, NPM);
+		assertEquals(1, Bs.length);
+		ICPPClassType B = (ICPPClassType)Bs[0];
+		ICPPMethod[] Bmethods = B.getAllDeclaredMethods();
+		assertEquals(4, Bmethods.length);
+		assertNotNull(findMethod(Bmethods, "B"));
+		assertNotNull(findMethod(Bmethods, "A"));
+		assertNotNull(findMethod(Bmethods, "bf"));
+		ICPPMethod Bf = findMethod(Bmethods, "f");
+		assertNotNull(Bf);
+		IName [] Bf_refs = pdom.findNames(Bf, IIndex.FIND_REFERENCES);
+		assertEquals(1, Bf_refs.length);
+		IASTFileLocation loc = Bf_refs[0].getFileLocation();
+		assertEquals(offset("class.cpp", "b.f()") + 2, loc.getNodeOffset());
+	}
+	
+	private ICPPMethod findMethod(ICPPMethod[] bmethods, String name) {
+		for (int i = 0; i < bmethods.length; i++) {
+			ICPPMethod method = bmethods[i];
+			if (method.getName().equals(name)) {
+				return method;
+			}
+		}
+		return null;
+	}
+
+	public void testNested() throws Exception {
+		IBinding[] bindings = pdom.findBindings(Pattern.compile("NestedA"), false, IndexFilter.ALL_DECLARED, NPM);
+		assertEquals(1, bindings.length);
+		ICPPClassType NestedA = (ICPPClassType)bindings[0];
+		ICPPClassType[] nested = NestedA.getNestedClasses();
+		assertEquals(1, nested.length);
+		ICPPClassType NestedB = nested[0];
+		assertEquals("NestedB", NestedB.getName());
+		IField[] fields = NestedB.getFields();
+		assertEquals(1, fields.length);
+		IField NestedB_x = fields[0];
+		
+		IName[] refs = pdom.findNames(NestedB, IIndex.FIND_REFERENCES);
+		assertEquals(1, refs.length);
+		IASTFileLocation loc = refs[0].getFileLocation();
+		assertEquals(offset("nested.cpp", "::NestedB") + 2, loc.getNodeOffset());
+		
+		refs = pdom.findNames(NestedB_x, IIndex.FIND_REFERENCES);
+		assertEquals(1, refs.length);
+		loc = refs[0].getFileLocation();
+		assertEquals(offset("nested.cpp", "x.x") + 2, loc.getNodeOffset());
+	}
+	
+	public void test147903() throws Exception {
+		IBinding[] bindings = pdom.findBindings(Pattern.compile("pr147903"), false, IndexFilter.ALL, NPM);
+		assertEquals(1, bindings.length);
+		ICPPNamespaceScope ns = ((ICPPNamespace)bindings[0]).getNamespaceScope();
+		bindings = ns.find("testRef");
+		assertEquals(1, bindings.length);
+		IName[] refs = pdom.findNames(bindings[0], IIndex.FIND_REFERENCES);
+		for (int i = 0; i < refs.length; ++i)
+			System.out.println(refs[i].getFileLocation().getNodeOffset());
+		assertEquals(5, refs.length);
+	}
+	
+	/* Test friend relationships between classes */
+	public void testFriend() throws Exception {
+		IBinding[] bindings = pdom.findBindings(Pattern.compile("ClassA"), true, IndexFilter.ALL_DECLARED, NPM);
+		assertEquals(1, bindings.length);
+		ICPPClassType classA = (ICPPClassType) bindings[0];
+
+		bindings = pdom.findBindings(Pattern.compile("ClassC"), true, IndexFilter.ALL_DECLARED, NPM);
+		assertEquals(1, bindings.length);
+		ICPPClassType classC = (ICPPClassType) bindings[0];
+
+		bindings = pdom.findBindings(Pattern.compile("functionB"), false, IndexFilter.ALL_DECLARED, NPM);
+		assertEquals(1, bindings.length);
+		ICPPFunction funcB = (ICPPFunction) bindings[0];
+
+		IBinding[] friends = classA.getFriends();
+		assertEquals(1, friends.length);
+		assertEquals(classC, friends[0]); //ClassC is a friend class of ClassA
+		
+		friends = classC.getFriends();
+		assertEquals(1, friends.length);
+		assertEquals(funcB, friends[0]); //functionB is a friend of ClassC
+	}
+	
+	public void noTest_testConstructor() throws Exception {
+		// the source does not define Class1, so it is no surprise that the test is failing.
+		//TODO PDOM doesn't have information on constructor
+		IBinding[] bindings = pdom.findBindings(Pattern.compile("Class1"), false, IndexFilter.ALL, NPM);
+		assertEquals(2, bindings.length);
+		assertTrue(bindings[0] instanceof ICPPClassType);
+		assertTrue(bindings[1] instanceof ICPPMethod);
+		
+		IName[] decls = pdom.findNames(bindings[1], IIndex.FIND_DECLARATIONS_DEFINITIONS);
+		assertEquals(2, decls.length);
+		IASTFileLocation loc = decls[0].getFileLocation();
+		assertEquals(offset("constructor.cpp","Class1(int num);"), loc.getNodeOffset()); //character offset	
+		
+		loc = decls[1].getFileLocation();
+		assertEquals(offset("constructor.cpp","Class1::Class1") + 8, loc.getNodeOffset()); //character offset
+		
+		/* Member initialization */
+		bindings = pdom.findBindings(Pattern.compile("number"), false, IndexFilter.ALL, NPM);
+		assertEquals(1, bindings.length);
+		
+		IName[] refs = pdom.findNames(bindings[0], IIndex.FIND_REFERENCES);
+		assertEquals(1, refs.length);
+		loc = refs[0].getFileLocation();
+		assertEquals(offset("constructor.cpp","number(num)"), loc.getNodeOffset()); //character offset	
+		
+		assertEquals(bindings[0], ((PDOMName)refs[0]).getBinding());
+	}
+	
+	public void testAbsenceOfDefaultConstructorWhenExplicitNonDefaultPresentA() throws Exception {
+		IndexFilter JUST_CONSTRUCTORS= new IndexFilter() {
+			@Override
+			public boolean acceptBinding(IBinding binding) {
+				return binding instanceof ICPPConstructor;
+			}
+		};
+		IBinding[] bindings = pdom.findBindings(Pattern.compile("C"), false, JUST_CONSTRUCTORS, NPM);
+		// expecting C(int) and C(const C &)
+		assertEquals(2, bindings.length);
+	}
+	
+	public void testAbsenceOfDefaultConstructorWhenExplicitNonDefaultPresentB() throws Exception {
+		IndexFilter JUST_CONSTRUCTORS= new IndexFilter() {
+			@Override
+			public boolean acceptBinding(IBinding binding) {
+				return binding instanceof ICPPConstructor;
+			}
+		};
+		IBinding[] bindings = pdom.findBindings(Pattern.compile("D"), false, JUST_CONSTRUCTORS, NPM);
+		// expecting just D(D &)
+		assertEquals(1, bindings.length);
+	}
+	
+	public void testClassScope_bug185408() throws Exception {
+		char[][] name= {"B".toCharArray(), "bf".toCharArray()};
+		IBinding[] bindings= pdom.findBindings(name, IndexFilter.ALL, NPM);
+		assertEquals(1, bindings.length);
+		IScope classScope= bindings[0].getScope();
+		
+		assertTrue(classScope instanceof ICPPClassScope);
+		bindings= classScope.find("bf");
+		ICPPMethod method= extractSingleMethod(bindings);
+		assertEquals(method.getQualifiedName()[0], "B");
+
+		bindings= classScope.find("f");
+		method= extractSingleMethod(bindings);
+		assertEquals(method.getQualifiedName()[0], "A");
+
+		bindings= classScope.find("B");
+		ICPPClassType classType= extractSingleClass(bindings);
+		assertEquals(classType.getQualifiedName()[0], "B");
+
+		bindings= classScope.find("A");
+		classType= extractSingleClass(bindings);
+		assertEquals(classType.getQualifiedName()[0], "A");
+	}
+
+	private ICPPMethod extractSingleMethod(IBinding[] bindings) {
+		assertEquals(1, bindings.length);
+		assertTrue(bindings[0] instanceof ICPPMethod);
+		return (ICPPMethod) bindings[0];
+	}
+	
+	private ICPPClassType extractSingleClass(IBinding[] bindings) {
+		assertEquals(1, bindings.length);
+		assertTrue(bindings[0] instanceof ICPPClassType);
+		return (ICPPClassType) bindings[0];
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/DBPropertiesTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/DBPropertiesTests.java
new file mode 100644
index 0000000..0b8bee5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/DBPropertiesTests.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial implementation
+ * Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.Properties;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.internal.core.pdom.db.ChunkCache;
+import org.eclipse.cdt.internal.core.pdom.db.DBProperties;
+import org.eclipse.cdt.internal.core.pdom.db.Database;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Sanity check the DBProperties class
+ */
+public class DBPropertiesTests extends BaseTestCase {
+	File dbLoc;
+	Database db;
+	
+	public static Test suite() {
+		return suite(DBPropertiesTests.class);
+	}
+	
+	protected void setUp() throws Exception {
+		dbLoc = File.createTempFile("test", "db");
+		dbLoc.deleteOnExit();
+		db = new Database(dbLoc, new ChunkCache(), 0, false);
+		db.setExclusiveLock();
+	}
+	
+	protected void tearDown() throws Exception {
+		db.close();
+	}
+	
+	public void testBasic() throws CoreException {
+		DBProperties properties = new DBProperties(db);
+		Properties expected = System.getProperties();
+		for(Iterator i = expected.keySet().iterator(); i.hasNext(); ) {
+			String key = (String) i.next();
+			String value = expected.getProperty(key);
+			if(value!=null) {
+				properties.setProperty(key, value);
+			}
+		}
+		for(Iterator i = expected.keySet().iterator(); i.hasNext(); ) {
+			String key = (String) i.next();
+			String aValue = properties.getProperty(key);
+			assertEquals(expected.getProperty(key), aValue);
+		}
+		for(Iterator i = expected.keySet().iterator(); i.hasNext(); ) {
+			String key = (String) i.next();
+			properties.removeProperty(key);
+		}
+		assertEquals(0, properties.getKeySet().size());
+		
+		properties.delete();
+	}
+	
+	
+	public void testLong() throws Exception {
+		DBProperties ps = new DBProperties(db);
+		
+		StringBuffer largeValue = new StringBuffer();
+		for(int i=0; i<Database.CHUNK_SIZE*2; i+=64) {
+			largeValue.append("********");
+			ps.setProperty("key", largeValue.toString());
+			ps.setProperty(largeValue.toString(), "value");
+		}
+		
+		assertEquals(largeValue.toString(), ps.getProperty("key"));
+		assertEquals("value", ps.getProperty(largeValue.toString()));
+		
+		ps.delete();
+	}
+	
+	public void testNulls() throws Exception {
+		DBProperties ps= new DBProperties(db);
+		try {
+			ps.setProperty(null, "val1");
+			fail("NullPointerException expected");
+		} catch(NullPointerException e) {
+		} catch(AssertionError e) {
+		}
+		
+		try {
+			ps.setProperty("key", null);
+			fail("NullPointerException expected");
+		} catch(NullPointerException e) {
+		} catch(AssertionError e) {
+		}
+
+		try {
+			ps.setProperty(null, null);
+			fail("NullPointerException expected");
+		} catch(NullPointerException e) {
+		} catch(AssertionError e) {
+		}
+		
+		assertFalse(ps.removeProperty(null));
+		
+		assertNull(ps.getProperty(null));
+		
+		String s= ""+System.currentTimeMillis();
+		assertEquals(s, ps.getProperty(null,s));
+	}
+	
+	public void testSeq() throws Exception {
+		DBProperties ps = new DBProperties(db);
+		
+		ps.setProperty("a", "b");
+		assertEquals("b", ps.getProperty("a"));
+		assertEquals(1, ps.getKeySet().size());
+		
+		ps.setProperty("b", "c");
+		assertEquals("c", ps.getProperty("b"));
+		assertEquals(2, ps.getKeySet().size());
+		
+		ps.setProperty("a", "c");
+		assertEquals("c", ps.getProperty("a"));
+		assertEquals(2, ps.getKeySet().size());
+		
+		boolean deleted = ps.removeProperty("c");
+		assertEquals(false, deleted);
+		assertEquals(2, ps.getKeySet().size());
+		
+		deleted = ps.removeProperty("a");
+		assertEquals(true, deleted);
+		assertEquals(1, ps.getKeySet().size());
+		
+		ps.delete();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/DBTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/DBTest.java
new file mode 100644
index 0000000..ef5d111
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/DBTest.java
@@ -0,0 +1,318 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 QNX Software Systems
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - initial API and implementation
+ *     Andrew Ferguson (Symbian)
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Random;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.internal.core.pdom.db.BTree;
+import org.eclipse.cdt.internal.core.pdom.db.ChunkCache;
+import org.eclipse.cdt.internal.core.pdom.db.Database;
+import org.eclipse.cdt.internal.core.pdom.db.IBTreeComparator;
+import org.eclipse.cdt.internal.core.pdom.db.IBTreeVisitor;
+import org.eclipse.cdt.internal.core.pdom.db.IString;
+import org.eclipse.cdt.internal.core.pdom.db.ShortString;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+
+public class DBTest extends BaseTestCase {
+	protected Database db;
+	
+	protected void setUp() throws Exception {
+		super.setUp();
+		db = new Database(getTestDir().append(getName()+System.currentTimeMillis()+".dat").toFile(),
+				new ChunkCache(), 0, false);
+		db.setExclusiveLock();
+	}
+		
+	public static Test suite() {
+		return suite(DBTest.class);
+	}
+	
+	protected IPath getTestDir() {
+		IPath path = CTestPlugin.getDefault().getStateLocation().append("tests/");
+		File file = path.toFile();
+		if (!file.exists())
+			file.mkdir();
+		return path;
+	}
+	
+	protected void tearDown() throws Exception {
+		db.close();
+		if(!db.getLocation().delete()) {
+			db.getLocation().deleteOnExit();
+		}
+		db= null;
+	}
+	
+	public void testBlockSizeAndFirstBlock() throws Exception {
+		assertEquals(0, db.getVersion());
+
+		final int realsize = 42;
+		final int deltas = (realsize+Database.BLOCK_HEADER_SIZE + Database.BLOCK_SIZE_DELTA - 1) / Database.BLOCK_SIZE_DELTA;
+		final int blocksize = deltas * Database.BLOCK_SIZE_DELTA;
+		final int freeDeltas= Database.CHUNK_SIZE/Database.BLOCK_SIZE_DELTA-deltas;
+		
+		long mem = db.malloc(realsize);
+		assertEquals(-blocksize, db.getShort(mem - Database.BLOCK_HEADER_SIZE));
+		db.free(mem);
+		assertEquals(blocksize, db.getShort(mem - Database.BLOCK_HEADER_SIZE));
+		assertEquals(mem - Database.BLOCK_HEADER_SIZE, db.getRecPtr((deltas-Database.MIN_BLOCK_DELTAS+1) * Database.INT_SIZE));
+		assertEquals(mem - Database.BLOCK_HEADER_SIZE + blocksize, db.getRecPtr((freeDeltas-Database.MIN_BLOCK_DELTAS+1) * Database.INT_SIZE));
+	}
+
+	public void testBug192437() throws IOException {
+		File tmp= File.createTempFile("readOnlyEmpty", ".db");
+		try {
+			tmp.setReadOnly();
+			
+			/* check opening a readonly file for rw access fails */
+			try {
+				new Database(tmp, ChunkCache.getSharedInstance(), 0, false);
+				fail("A readonly file should not be openable with write-access");
+			} catch(CoreException ioe) {
+				// we expect to get a failure here
+			}
+			
+			/* check opening a readonly file for read access does not fail */
+			try {
+				new Database(tmp, ChunkCache.getSharedInstance(), 0, true);
+			} catch(CoreException ce) {
+				fail("A readonly file should be readable by a permanently readonly database "+ce);
+			}
+		} finally {
+			tmp.delete(); // this may be pointless on some platforms
+		}
+	}
+	
+	public void testFreeBlockLinking() throws Exception {
+		final int realsize = 42;
+		final int deltas = (realsize+Database.BLOCK_HEADER_SIZE + Database.BLOCK_SIZE_DELTA - 1) / Database.BLOCK_SIZE_DELTA;
+		final int blocksize = deltas * Database.BLOCK_SIZE_DELTA;
+		final int freeDeltas= Database.MIN_BLOCK_DELTAS-deltas;
+
+		long mem1 = db.malloc(realsize);
+		long mem2 = db.malloc(realsize);
+		db.free(mem1);
+		db.free(mem2);
+		assertEquals(mem2 - Database.BLOCK_HEADER_SIZE, db.getRecPtr((deltas-Database.MIN_BLOCK_DELTAS+1) * Database.INT_SIZE));
+		assertEquals(0, db.getRecPtr(mem2));
+		assertEquals(mem1 - Database.BLOCK_HEADER_SIZE, db.getRecPtr(mem2 + Database.INT_SIZE));
+		assertEquals(mem2 - Database.BLOCK_HEADER_SIZE, db.getRecPtr(mem1));
+		assertEquals(0, db.getRecPtr(mem1 + Database.INT_SIZE));
+	}
+	
+	public void testSimpleAllocationLifecycle() throws Exception {	
+		long mem1 = db.malloc(42);
+		db.free(mem1);
+		long mem2 = db.malloc(42);
+		assertEquals(mem2, mem1);
+	}
+	
+	private static class FindVisitor implements IBTreeVisitor {
+		private Database db;
+		private String key;
+		private long record;
+		
+		public FindVisitor(Database db, String key) {
+			this.db = db;
+			this.key = key;
+		}
+
+		public int compare(long record) throws CoreException {
+			return db.getString(db.getRecPtr(record + 4)).compare(key, true);
+		}
+		
+		public boolean visit(long record) throws CoreException {
+			this.record = record;
+			return false;
+		}
+		
+		public long getRecord() {
+			return record;
+		}
+		
+	}
+	
+	public void testStringsInBTree() throws Exception {
+		// Tests inserting and retrieving strings
+		File f = getTestDir().append("testStrings.dat").toFile();
+		f.delete();
+		final Database db = new Database(f, new ChunkCache(), 0, false);
+		db.setExclusiveLock();
+
+		String[] names = {
+				"ARLENE",
+				"BRET",
+				"CINDY",
+				"DENNIS",
+				"EMILY",
+				"FRANKLIN",
+				"GERT",
+				"HARVEY",
+				"IRENE",
+				"JOSE",
+				"KATRINA",
+				"LEE",
+				"MARIA",
+				"NATE",
+				"OPHELIA",
+				"PHILIPPE",
+				"RITA",
+				"STAN",
+				"TAMMY",
+				"VINCE",
+				"WILMA",
+				"ALPHA",
+				"BETA"
+		};
+		
+		IBTreeComparator comparator = new IBTreeComparator() {
+			public int compare(long record1, long record2) throws CoreException {
+				IString string1 = db.getString(db.getRecPtr(record1 + 4));
+				IString string2 = db.getString(db.getRecPtr(record2 + 4));
+				return string1.compare(string2, true);
+			}
+		};
+		BTree btree = new BTree(db, Database.DATA_AREA, comparator);
+		for (int i = 0; i < names.length; ++i) {
+			String name = names[i];
+			long record = db.malloc(8);
+			db.putInt(record + 0, i);
+			IString string = db.newString(name);
+			db.putRecPtr(record + 4, string.getRecord());
+			btree.insert(record);
+		}
+		
+		for (int i = 0; i < names.length; ++i) {
+			String name = names[i];
+			FindVisitor finder = new FindVisitor(db, name);
+			btree.accept(finder);
+			long record = finder.getRecord();
+			assertTrue(record != 0);
+			assertEquals(i, db.getInt(record));
+			IString rname = db.getString(db.getRecPtr(record + 4));
+			assertTrue(rname.equals(name));
+		}
+	}
+	
+	private final int GT = 1, LT = -1, EQ = 0;
+	
+	public void testShortStringComparison() throws CoreException {
+		Random r= new Random(90210);
+		
+		assertCMP("",  EQ, "", true);
+		assertCMP("",  EQ, "", false);
+		
+		doTrials(1000, 1, ShortString.MAX_LENGTH, r, true);
+		
+		doTrials(1000, 1, ShortString.MAX_LENGTH, r, false);
+		
+		assertCMP("a",  LT, "b", true);
+		assertCMP("aa", LT, "ab", true);
+		assertCMP("a",  EQ, "a", true);
+		
+		assertCMP("a",  GT, "A", true);
+		assertCMP("aa", GT, "aA", true);
+		assertCMP("a",  GT, "B", true);
+		
+		assertCMP("a",  EQ, "a", false);
+		assertCMP("a",  EQ, "A", false);
+	}
+	
+	public void testLongStringComparison() throws CoreException {
+		Random r= new Random(314159265);
+		doTrials(100, ShortString.MAX_LENGTH+1, ShortString.MAX_LENGTH*2, r, true);
+		doTrials(100, ShortString.MAX_LENGTH+1, ShortString.MAX_LENGTH*2, r, false);
+	}
+		
+	private void doTrials(int n, int min, int max, Random r, boolean caseSensitive) throws CoreException {
+		long start = System.currentTimeMillis();
+		for(int i=0; i<n; i++) {
+			String a = randomString(min, max, r);
+			String b = randomString(min, max, r);
+			int expected = caseSensitive ? a.compareTo(b) : a.compareToIgnoreCase(b);
+			assertCMP(a, expected, b, caseSensitive);
+		}
+		System.out.print("Trials: "+n+" Max length: "+max+" ignoreCase: "+!caseSensitive);
+		System.out.println(" Time: "+(System.currentTimeMillis()-start));
+	}
+	
+	private String randomString(int min, int max, Random r) {
+		StringBuffer result = new StringBuffer();
+		int len = min + r.nextInt(max-min);
+		for(int i=0; i<len; i++) {
+			result.append(randomChar(r));
+		}
+		return result.toString();
+	}
+	
+	private char randomChar(Random r) {
+		// we only match String.compareToIgnoreCase behaviour within this limited range
+		return (char) (32 + r.nextInt(40)); 
+	}
+	
+	private void assertCMP(String a, int expected, String b, boolean caseSensitive) 
+		throws CoreException
+	{
+		char[] acs = a.toCharArray();
+		char[] bcs = b.toCharArray();
+		IString aiss = db.newString(a);
+		IString biss = db.newString(b);
+		IString aisc = db.newString(acs);
+		IString bisc = db.newString(bcs);
+		
+		assertEquals(a.hashCode(), aiss.hashCode());
+		assertEquals(a.hashCode(), aisc.hashCode());
+		assertEquals(b.hashCode(), biss.hashCode());
+		assertEquals(b.hashCode(), bisc.hashCode());
+		
+		assertEquals(aiss, a);
+		assertEquals(aisc, a);
+		assertEquals(biss, b);
+		assertEquals(bisc, b);
+		
+		assertSignEquals(expected, aiss.compare(bcs, caseSensitive));
+		assertSignEquals(expected, aiss.compare(biss, caseSensitive));
+		assertSignEquals(expected, aiss.compare(bisc, caseSensitive));
+		assertSignEquals(expected, aiss.compare(b, caseSensitive));
+		assertSignEquals(expected, aiss.comparePrefix(bcs, caseSensitive));
+		
+		assertSignEquals(expected, -biss.compare(acs, caseSensitive));
+		assertSignEquals(expected, -biss.compare(aiss, caseSensitive));
+		assertSignEquals(expected, -biss.compare(aisc, caseSensitive));
+		assertSignEquals(expected, -biss.compare(a, caseSensitive));
+		assertSignEquals(expected, -biss.comparePrefix(acs, caseSensitive));
+		
+		if (!caseSensitive && expected != 0) {
+			assertSignEquals(expected, aiss.compareCompatibleWithIgnoreCase(bcs));
+			assertSignEquals(expected, aiss.compareCompatibleWithIgnoreCase(biss));
+			assertSignEquals(expected, aiss.compareCompatibleWithIgnoreCase(bisc));
+
+			assertSignEquals(expected, -biss.compareCompatibleWithIgnoreCase(acs));
+			assertSignEquals(expected, -biss.compareCompatibleWithIgnoreCase(aiss));
+			assertSignEquals(expected, -biss.compareCompatibleWithIgnoreCase(aisc));
+		}
+	}
+	
+	private void assertSignEquals(int a, int b) {
+		a= a<0 ? -1 : (a>0 ? 1 : 0);
+		b= b<0 ? -1 : (b>0 ? 1 : 0);
+		assertEquals(a, b);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/DefDeclTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/DefDeclTests.java
new file mode 100644
index 0000000..1a6929d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/DefDeclTests.java
@@ -0,0 +1,321 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * QNX - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.io.File;
+import java.util.regex.Pattern;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ILinkage;
+import org.eclipse.cdt.core.dom.IName;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexBinding;
+import org.eclipse.cdt.core.index.IIndexFile;
+import org.eclipse.cdt.core.index.IIndexFileLocation;
+import org.eclipse.cdt.core.index.IIndexName;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.index.IndexLocationFactory;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.index.IIndexFragmentName;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.text.BadLocationException;
+
+/**
+ * Test that PDOM correctly track declarations, definitions and references of
+ * objects
+ * 
+ * @author ELaskavaia at qnx.com
+ * 
+ */
+public class DefDeclTests extends PDOMTestBase {
+	private String projectName = null;
+
+	protected PDOM pdom;
+	protected ICProject cproject;
+	
+	public static Test suite() {
+		return suite(DefDeclTests.class);
+	}
+
+	protected void setUp() throws Exception {
+		String requiredName = "defDeclTests";
+		cproject = createProject(requiredName);
+		this.projectName = cproject.getElementName();
+		pdom = (PDOM) CCoreInternals.getPDOMManager().getPDOM(cproject);
+		pdom.acquireReadLock();
+	}
+
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+		if (cproject != null) {
+			cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+		}
+	}
+
+	private IBinding findSingleBinding(String elName) throws CoreException {
+		IBinding[] binds = pdom.findBindings(Pattern.compile(elName), true,
+				IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(1, binds.length);
+		assertEquals(elName, binds[0].getName());
+		IBinding element = binds[0];
+		return element;
+	}
+
+	private void checkReference(IBinding element, String mark, int checkCount)
+			throws Exception {
+		checkUsage(element, mark, checkCount, IIndex.FIND_REFERENCES);
+	}
+
+	private void checkDeclaration(IBinding element, String mark, int num)
+			throws Exception {
+		checkUsage(element, mark, num, IIndex.FIND_DECLARATIONS);
+	}
+
+	private void checkDefinition(IBinding element, String mark, int countNum)
+			throws Exception {
+		checkUsage(element, mark, countNum, IIndex.FIND_DEFINITIONS);
+	}
+
+	private void checkUsage(IBinding element, String mark, int countNum,
+			int flags) throws Exception {
+		if (mark == null || countNum == 0) {
+			getFirstUsage(element, 0, flags);
+		} else {
+			IName[] usage = pdom.findNames(element, flags);
+			if (countNum >= 0)
+				assertEquals(countNum, usage.length);
+			String fail = null;
+			boolean found = false;
+			for (int i = 0; i < usage.length; i++) {
+				IName name = usage[i];
+				IASTFileLocation loc = name.getFileLocation();
+				String fileName = new File(loc.getFileName()).getName();
+				int markLine;
+				try {
+					markLine = getMarkLine(mark, fileName);
+				} catch (AssertionFailedError e) {
+					fail = e.getMessage();
+					continue;
+				}
+				int nodeLine = getLineNumber(loc.getNodeOffset(), fileName);
+				if (markLine != nodeLine) {
+					fail = "Marker at line " + markLine + ", actual at line "
+							+ nodeLine;
+				} else {
+					found = true;
+				}
+			}
+			if (found == false)
+				fail(fail);
+		}
+	}
+
+	/**
+	 * Get references defined by flags. If k>0 check that there are k of them.
+	 * 
+	 * @param binding
+	 * @param k -
+	 *            number of references, if k==-1 no check
+	 * @return first references or null of non
+	 * @throws CoreException
+	 */
+	private IName getFirstUsage(IBinding binding, int k, int flags)
+			throws CoreException {
+		IName[] decls = pdom.findNames(binding, flags);
+		if (k >= 0)
+			assertEquals(k, decls.length);
+		if (decls.length > 0) {
+			IName ref = decls[0];
+			return ref;
+		} else {
+			return null;
+		}
+	}
+
+	protected void assertAtMark(IASTFileLocation loc, String mark)
+			throws Exception {
+		String fileName = new File(loc.getFileName()).getName();
+		int markLine = getMarkLine(mark, fileName);
+		int nodeLine = getLineNumber(loc.getNodeOffset(), fileName);
+		assertEquals(markLine, nodeLine);
+	}
+
+	private int getMarkLine(String mark, String fileName) throws Exception,
+			BadLocationException {
+		int markLine = getLineNumber(offset(fileName, mark), fileName);
+		return markLine;
+	}
+
+	protected int getLineNumber(int position, String projectRelativePath)
+			throws Exception {
+		Path fullPath = new Path(projectName + "/" + projectRelativePath);
+		return TestSourceReader.getLineNumber(position, fullPath);
+	}
+
+	public void assertDefDeclRef(String name, String testNum, int def,
+			int decl, int ref) throws Exception {
+		String elName = name + testNum;
+		IBinding binding = findSingleBinding(elName);
+		checkDefinition(binding, "def" + testNum, def);
+		checkDeclaration(binding, "decl" + testNum, decl);
+		checkReference(binding, "ref" + testNum, ref);
+	}
+
+	/* ------------------ Tests Started Here ------------------------ */
+	public void testInit() {
+		// will fail if setUp fails, maybe timelimit is too small for warm-up
+	}
+
+	public void testSimpleDeclUsage_f01() throws Exception {
+		assertDefDeclRef("foo", "01", 0, 1, 1);
+	}
+
+	public void testKRDeclUsage_f02() throws Exception {
+		assertDefDeclRef("foo", "02", 0, 1, 1);
+	}
+
+	public void testImplicitDeclPostDecl_f03() throws Exception {
+		assertDefDeclRef("foo", "03", 0, 1, 1);
+	}
+
+	public void testImplicitDeclPostDef_f04() throws Exception {
+		assertDefDeclRef("foo", "04", 1, 0, 1);
+	}
+
+	public void testImplicitDeclNone_f05() throws Exception {
+		assertDefDeclRef("foo", "05", 0, 0, 1);
+	}
+
+	public void testNonLocalDefintion_f06() throws Exception {
+		assertDefDeclRef("foo", "06", 1, 1, 1);
+	}
+
+	public void testWrongMatchedStaticDefinition() throws Exception {
+		String elName = "foo" + "07";
+		IIndexBinding[] binds = pdom.findBindings(Pattern.compile(elName), true,	IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(2, binds.length);
+		assertTrue(binds[0].isFileLocal() != binds[1].isFileLocal());
+		if (binds[0].isFileLocal()) {
+			IIndexBinding b= binds[0]; binds[0]= binds[1]; binds[1]= b;
+		}
+			
+		assertEquals(elName, binds[0].getName());
+		checkDefinition(binds[0], "def" + "07", 0);
+		checkDeclaration(binds[0], "decl" + "07", 1);
+		checkReference(binds[0], "ref" + "07", 1);
+
+		assertEquals(elName, binds[1].getName());
+		assertTrue(binds[1].getLocalToFile().getLocation().getFullPath().endsWith("second.c"));
+		checkDefinition(binds[1], "def" + "07", 1);
+		checkDeclaration(binds[1], "decl" + "07", 0);
+		checkReference(binds[1], "ref" + "07", 0);
+	}
+
+	public void testStaticBindings_f08() throws Exception {
+		String elName = "foo" + "08";
+
+		IIndexFileLocation ifl= IndexLocationFactory.getIFL((ITranslationUnit) cproject.findElement(new Path("func.c")));
+		IIndexFile file= pdom.getFile(ILinkage.C_LINKAGE_ID, ifl);
+		int offset= TestSourceReader.indexOfInFile("foo08();", new Path(ifl.getFullPath()));
+		IIndexName[] names= file.findNames(offset, 5);
+		assertEquals(1, names.length);
+		
+		IBinding element = pdom.findBinding((IIndexFragmentName)names[0]);
+		assertEquals(elName, element.getName());
+		checkDefinition(element, "def" + "08", 1);
+		checkReference(element, "ref" + "08", 1);
+
+		// check the other file
+		ifl= IndexLocationFactory.getIFL((ITranslationUnit) cproject.findElement(new Path("second.c")));
+		file= pdom.getFile(ILinkage.C_LINKAGE_ID, ifl);
+		offset= TestSourceReader.indexOfInFile("foo08();", new Path(ifl.getFullPath()));
+		names= file.findNames(offset, 5);
+		assertEquals(1, names.length);
+		
+		element = pdom.findBinding((IIndexFragmentName)names[0]);
+		assertEquals(elName, element.getName());
+		checkDefinition(element, "defS" + "08", 1);
+		checkReference(element, "refS" + "08", 1);
+	}
+
+	public void testSimpleGlobalWrite_v09() throws Exception {
+		assertDefDeclRef("var", "_v09", 1, 0, 1);
+	}
+
+	public void testGlobalInitRead_v10() throws Exception {
+		assertDefDeclRef("var", "_v10", 1, 0, 1);
+	}
+
+	public void testGlobalInitRead2_v11() throws Exception {
+		assertDefDeclRef("var", "_v11", 1, 0, 1);
+	}
+
+	public void testDeclUseDef_v12() throws Exception {
+		assertDefDeclRef("var", "_v12", 1, 1, 1);
+	}
+
+	public void testDeclDefUse_v13() throws Exception {
+		assertDefDeclRef("var", "_v13", 1, 1, 1);
+	}
+
+	public void testDefDeclUse_v14() throws Exception {
+		// Hmm. This test seems to work, but Find Declaration in the UI does not
+		// work
+		assertDefDeclRef("var", "_v14", 1, 1, 1);
+	}
+
+	public void testNamedStruct_t01() throws Exception {
+		assertDefDeclRef("type", "_t01", 1, 0, 1);
+	}
+
+	public void testStructPreDefintion_t02() throws Exception {
+		assertDefDeclRef("type", "_t02", 0, 1, 1);
+	}
+
+	public void testStructRecursive_t03() throws Exception {
+		assertDefDeclRef("type", "_t03", 1, 1, 1);
+	}
+
+	public void testStructAndTypedef_t04() throws Exception {
+		String num = "_t04";
+		String elName = "type" + num;
+		
+		IBinding[] bindings = pdom.findBindings(Pattern.compile(elName), false, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(2,bindings.length);
+		
+		IBinding typedef = bindings[0] instanceof ITypedef ? bindings[0] : bindings[1];
+		IBinding struct = bindings[0] instanceof ICompositeType ? bindings[0] : bindings[1];
+		
+		checkReference(typedef, "ref" + num, 1);
+		checkDefinition(typedef, "def" + num, 1);
+		
+		checkReference(struct, "refS" + num, 1);
+		checkDefinition(struct, "defS" + num, 1);
+	}
+
+	public void testTypedefAndAnonymousStruct_t05() throws Exception {
+		assertDefDeclRef("type", "_t05", 1, 0, 1);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/EnumerationTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/EnumerationTests.java
new file mode 100644
index 0000000..8af8e13
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/EnumerationTests.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * QNX - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.IName;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IEnumeration;
+import org.eclipse.cdt.core.dom.ast.IEnumerator;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * @author Doug Schaefer
+ *
+ */
+public class EnumerationTests extends PDOMTestBase {
+
+	protected PDOM pdom;
+
+	public static Test suite() {
+		return suite(EnumerationTests.class);
+	}
+
+	protected void setUp() throws Exception {
+		if (pdom == null) {
+			ICProject project = createProject("enumerationTests");
+			pdom = (PDOM)CCoreInternals.getPDOMManager().getPDOM(project);
+		}
+		pdom.acquireReadLock();
+	}
+
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+	}
+	
+	public void testC() throws Exception {
+		// Check bindings
+		Pattern pattern = Pattern.compile("TestCEnum");
+		IBinding[] bindings = pdom.findBindings(pattern, false, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(1, bindings.length);
+		IEnumeration enumeration = (IEnumeration)bindings[0];
+		assertEquals("TestCEnum", enumeration.getName());
+		IEnumerator[] enumerators = enumeration.getEnumerators();
+		assertEquals(3, enumerators.length);
+		assertEquals("ca", enumerators[0].getName());
+		assertEquals("cb", enumerators[1].getName());
+		assertEquals("cc", enumerators[2].getName());
+		
+		// Declaration of TestEnum 
+		IName[] enumDecls = pdom.findNames(enumeration, IIndex.FIND_DECLARATIONS_DEFINITIONS);
+		assertEquals(1, enumDecls.length);
+		IASTFileLocation loc = enumDecls[0].getFileLocation();
+		assertEquals(5, loc.getNodeOffset());
+		
+		// Reference to TestEnum
+		IName[] enumRefs = pdom.findNames(enumeration, IIndex.FIND_REFERENCES);
+		assertEquals(1, enumRefs.length);
+		loc = enumRefs[0].getFileLocation();
+		assertEquals(offset("enumTest.c", "TestCEnum test"), loc.getNodeOffset());
+		
+		// Reference to a
+		IName[] aRefs = pdom.findNames(enumerators[0], IIndex.FIND_REFERENCES);
+		assertEquals(1, aRefs.length);
+		loc = aRefs[0].getFileLocation();
+		assertEquals(offset("enumTest.c", "ca;"), loc.getNodeOffset());
+	}
+
+	public void testCPP() throws Exception {
+		// Check bindings
+		Pattern pattern = Pattern.compile("TestCPPEnum");
+		IBinding[] bindings = pdom.findBindings(pattern, false, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(1, bindings.length);
+		IEnumeration enumeration = (IEnumeration)bindings[0];
+		assertEquals("TestCPPEnum", enumeration.getName());
+		IEnumerator[] enumerators = enumeration.getEnumerators();
+		assertEquals(3, enumerators.length);
+		assertEquals("cppa", enumerators[0].getName());
+		assertEquals("cppb", enumerators[1].getName());
+		assertEquals("cppc", enumerators[2].getName());
+		
+		// Declaration of TestEnum 
+		IName[] enumDecls = pdom.findNames(enumeration, IIndex.FIND_DECLARATIONS_DEFINITIONS);
+		assertEquals(1, enumDecls.length);
+		IASTFileLocation loc = enumDecls[0].getFileLocation();
+		assertEquals(5, loc.getNodeOffset());
+		
+		// Reference to TestEnum
+		IName[] enumRefs = pdom.findNames(enumeration, IIndex.FIND_REFERENCES);
+		assertEquals(1, enumRefs.length);
+		loc = enumRefs[0].getFileLocation();
+		assertEquals(offset("enumTest.cpp", "TestCPPEnum test"), loc.getNodeOffset());
+		
+		// Reference to a
+		IName[] aRefs = pdom.findNames(enumerators[0], IIndex.FIND_REFERENCES);
+		assertEquals(1, aRefs.length);
+		loc = aRefs[0].getFileLocation();
+		assertEquals(offset("enumTest.cpp", "cppa;"), loc.getNodeOffset());
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/FilesOnReindexTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/FilesOnReindexTests.java
new file mode 100644
index 0000000..7cf506a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/FilesOnReindexTests.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Symbian - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ILinkage;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexBinding;
+import org.eclipse.cdt.core.index.IIndexFile;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.index.IndexLocationFactory;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * See bugzilla
+ */
+public class FilesOnReindexTests extends PDOMTestBase {
+
+	protected ICProject project;
+	protected IIndex pdom;
+
+	public static Test suite() {
+		return suite(FilesOnReindexTests.class);
+	}
+
+	protected void setUp() throws Exception {
+		if (pdom == null) {
+			project = createProject("filesOnReindex");
+			pdom = CCorePlugin.getIndexManager().getIndex(project);
+		}
+		pdom.acquireReadLock();
+	}
+
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+		if (project != null) {
+			project.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+		}
+	}
+	
+	public void testFilesOnReindex() throws CoreException, InterruptedException {
+		IFile file = project.getProject().getFile("simple.cpp");
+		performAssertions(file);
+		pdom.releaseReadLock();
+		CCoreInternals.getPDOMManager().reindex(project);
+		
+		// wait until the indexer is done
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+		pdom.acquireReadLock();
+		performAssertions(file);
+	}
+	
+	void performAssertions(IFile file) throws CoreException {
+		IIndex index = CCorePlugin.getIndexManager().getIndex(project);
+		assertNotNull(index.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file)));
+		
+		IBinding[] bs = index.findBindings(Pattern.compile("C"), true, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(1, bs.length);
+		
+		IIndexBinding binding = (IIndexBinding) bs[0];
+		IIndexFile file2 = index.findDefinitions(binding)[0].getFile();
+		assertEquals(file.getLocationURI(), file2.getLocation().getURI());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/GeneratePDOMApplicationTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/GeneratePDOMApplicationTest.java
new file mode 100644
index 0000000..ec4c43e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/GeneratePDOMApplicationTest.java
@@ -0,0 +1,392 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     Andrew Ferguson (Symbian) - Initial implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.io.File;
+import java.net.URI;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ILinkage;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.index.IIndexLocationConverter;
+import org.eclipse.cdt.core.index.IIndexerStateEvent;
+import org.eclipse.cdt.core.index.IIndexerStateListener;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.index.ResourceContainerRelativeLocationConverter;
+import org.eclipse.cdt.core.index.URIRelativeLocationConverter;
+import org.eclipse.cdt.core.index.export.ExternalExportProjectProvider;
+import org.eclipse.cdt.core.index.export.IExportProjectProvider;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.LanguageManager;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.internal.core.index.IIndexFragment;
+import org.eclipse.cdt.internal.core.pdom.WritablePDOM;
+import org.eclipse.cdt.internal.core.pdom.export.GeneratePDOMApplication;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.equinox.app.IApplicationContext;
+import org.osgi.framework.Bundle;
+
+/**
+ * Tests the GeneratePDOMApplication
+ */
+public class GeneratePDOMApplicationTest extends PDOMTestBase {
+	private static final URI    BASEURI= URI.create("file:///base/"); // unimportant what the value is
+	private static final String SDK_VERSION = "com.acme.sdk.version";
+	private static final String ACME_SDK_ID= "com.acme.sdk.4.0.1";
+	private static final String LOC_TSTPRJ1= "resources/pdomtests/generatePDOMTests/project1";
+	private static final String LOC_TSTPRJ2= "resources/pdomtests/generatePDOMTests/project2";
+	private static final String LOC_TSTPRJ3= "resources/pdomtests/generatePDOMTests/project3";
+	private static final String LOC_CYCINC1= "resources/pdomtests/generatePDOMTests/cyclicIncludes1";
+	private static final String LOC_CYCINC2= "resources/pdomtests/generatePDOMTests/cyclicIncludes2";
+	
+	private static List toDeleteOnTearDown= new ArrayList();
+	
+	public static Test suite() {
+		return suite(GeneratePDOMApplicationTest.class);
+	}
+	
+	protected File target; // the location of the generated PDOM
+
+	protected void setUp() throws Exception {
+		toDeleteOnTearDown.clear();
+		target= File.createTempFile("test", "pdom");
+		target.delete();
+	}
+
+	protected void tearDown() throws Exception {
+		for(Iterator i= toDeleteOnTearDown.iterator(); i.hasNext(); ) {
+			ICProject cproject= (ICProject) i.next();
+			cproject.getProject().delete(true, new NullProgressMonitor());
+		}
+	}	
+
+	public void testBrokenExportProjectProvider1() throws Exception {
+		setExpectedNumberOfLoggedNonOKStatusObjects(1); // IExportProjectProvider implementation returns null for createProject 
+		doGenerate(new String[] {
+			GeneratePDOMApplication.OPT_TARGET, target.getAbsolutePath(), 
+			GeneratePDOMApplication.OPT_PROJECTPROVIDER, TestProjectProvider1.class.getName()
+		});
+	}
+
+	public void testBrokenExportProjectProvider2() throws Exception {
+		setExpectedNumberOfLoggedNonOKStatusObjects(1); // IExportProjectProvider implementation returns null for getLocationConverter 
+		doGenerate(new String[] {
+			GeneratePDOMApplication.OPT_TARGET, target.getAbsolutePath(), 
+			GeneratePDOMApplication.OPT_PROJECTPROVIDER, TestProjectProvider2.class.getName()
+		});
+	}
+
+	public void testSimpleExportProjectProvider1() throws Exception {
+		doGenerate(new String[] {
+				GeneratePDOMApplication.OPT_TARGET, target.getAbsolutePath(), 
+				GeneratePDOMApplication.OPT_PROJECTPROVIDER, TestProjectProvider3.class.getName()
+		});
+		assertTrue(target.exists());
+		WritablePDOM wpdom= new WritablePDOM(target, new URIRelativeLocationConverter(BASEURI), LanguageManager.getInstance().getPDOMLinkageFactoryMappings());
+		verifyProject1Content(wpdom);
+
+		String fid;
+		wpdom.acquireReadLock();
+		try {
+			fid = wpdom.getProperty(IIndexFragment.PROPERTY_FRAGMENT_ID);
+		} finally {
+			wpdom.releaseReadLock();
+		}
+		assertNotNull(fid);
+		assertTrue(fid.startsWith("export")); // check for default export id
+	}
+
+	public void testSimpleExportProjectProvider2() throws Exception {
+		doGenerate(new String[] {
+				GeneratePDOMApplication.OPT_TARGET, target.getAbsolutePath(), 
+				GeneratePDOMApplication.OPT_PROJECTPROVIDER, TestProjectProvider4.class.getName()
+		});
+		assertTrue(target.exists());
+		WritablePDOM wpdom= new WritablePDOM(target, new URIRelativeLocationConverter(BASEURI), LanguageManager.getInstance().getPDOMLinkageFactoryMappings());
+		verifyProject1Content(wpdom);
+
+		wpdom.acquireReadLock();
+		try {
+			String fid = wpdom.getProperty(IIndexFragment.PROPERTY_FRAGMENT_ID);
+			assertNotNull(fid);
+			assertEquals(ACME_SDK_ID, fid); // check for custom export id
+			String sdkVer = wpdom.getProperty(SDK_VERSION);
+			assertNotNull(sdkVer);
+			assertEquals("4.0.1", sdkVer); // check for custom property value
+		} finally {
+			wpdom.releaseReadLock();
+		}
+	}
+
+	public void testExternalExportProjectProvider_BadCmdLine1() throws Exception {
+		setExpectedNumberOfLoggedNonOKStatusObjects(1); // Expected failure: -source must be specified
+		
+		doGenerate(new String[] {
+			GeneratePDOMApplication.OPT_TARGET, target.getAbsolutePath(), 
+			GeneratePDOMApplication.OPT_PROJECTPROVIDER, ExternalExportProjectProvider.class.getName()
+		});
+		assertFalse(target.exists());
+	}
+
+	public void testExternalExportProjectProvider_BadCmdLine2() throws Exception {
+		TestProjectProvider4 tpp4= new TestProjectProvider4();
+		ICProject cproject= tpp4.createProject();
+		
+		setExpectedNumberOfLoggedNonOKStatusObjects(1); // Expected failure: -id must be specified
+		
+		doGenerate(new String[] {
+			GeneratePDOMApplication.OPT_TARGET, target.getAbsolutePath(), 
+			GeneratePDOMApplication.OPT_PROJECTPROVIDER, ExternalExportProjectProvider.class.getName(),
+			ExternalExportProjectProvider.OPT_SOURCE, cproject.getProject().getLocation().toFile().getAbsolutePath()
+		});
+		assertFalse(target.exists());
+	}
+	
+	public void testExternalExportProjectProvider_BadCmdLine3() throws Exception {
+		TestProjectProvider4 tpp4= new TestProjectProvider4();
+		ICProject cproject= tpp4.createProject();
+		
+		setExpectedNumberOfLoggedNonOKStatusObjects(1); // Expected failure: -target must be specified
+		doGenerate(new String[] {
+			GeneratePDOMApplication.OPT_PROJECTPROVIDER, ExternalExportProjectProvider.class.getName(),
+			ExternalExportProjectProvider.OPT_SOURCE, cproject.getProject().getLocation().toFile().getAbsolutePath()
+		});
+		assertFalse(target.exists());
+	}
+
+	public void testExternalExportProjectProvider() throws Exception {
+		final int[] stateCount= new int[1];
+		WritablePDOM wpdom= generatePDOM(LOC_TSTPRJ1, ExternalExportProjectProvider.class, stateCount);
+		verifyProject1Content(wpdom);
+
+		wpdom.acquireReadLock();
+		try {
+			String fid = wpdom.getProperty(IIndexFragment.PROPERTY_FRAGMENT_ID);
+			assertNotNull(fid);
+			assertEquals("generate.pdom.tests.id."+getName(), fid); // check for id passed on command-line
+		} finally {
+			wpdom.releaseReadLock();
+		}
+		// depending on the timing the index of the temporary project is changed once or twice. 
+		assertTrue("state is "+ stateCount[0], stateCount[0] == 2 || stateCount[0] == 4);
+	}
+
+	public void testExternalExportProjectProvider_SysIncludes() throws Exception {
+		WritablePDOM wpdom= generatePDOM(LOC_TSTPRJ2, ExternalExportProjectProvider.class, null);
+		verifyProject2Content(wpdom);
+	}
+	
+	public void testGenerateOnCyclicIncludes1() throws Exception {
+		// testing for zero NON-OK status objects (see BaseTestCase.setExpectedNumberOfLoggedNonOKStatusObjects)
+		WritablePDOM wpdom= generatePDOM(LOC_CYCINC1, ExternalExportProjectProvider.class, null);
+	}
+	
+	public void testGenerateOnCyclicIncludes2() throws Exception {
+		// testing for zero NON-OK status objects (see BaseTestCase.setExpectedNumberOfLoggedNonOKStatusObjects)
+		WritablePDOM wpdom= generatePDOM(LOC_CYCINC2, ExternalExportProjectProvider.class, null);
+	}
+	
+	public void testExternalExportProjectProvider_CLinkage() throws Exception {
+		WritablePDOM wpdom= generatePDOM(LOC_TSTPRJ3, TestProjectProvider5.class, null);
+		
+		IndexFilter CLinkage= new IndexFilter() {
+			public boolean acceptLinkage(ILinkage linkage) {
+				return linkage.getLinkageID() == ILinkage.C_LINKAGE_ID;
+			}
+		};
+
+		IndexFilter CPPLinkage= new IndexFilter() {
+			public boolean acceptLinkage(ILinkage linkage) {
+				return linkage.getLinkageID() == ILinkage.CPP_LINKAGE_ID;
+			}
+		};
+		
+		wpdom.acquireReadLock();
+		try {
+			assertEquals(1, wpdom.findBindings(new char[][] { "foo"
+					.toCharArray() }, CLinkage, NPM).length);
+			assertEquals(0, wpdom.findBindings(new char[][] { "foo"
+					.toCharArray() }, CPPLinkage, NPM).length);
+		} finally {
+			wpdom.releaseReadLock();
+		}
+	}
+
+	public void verifyProject1Content(WritablePDOM wpdom) throws Exception {
+		wpdom.acquireReadLock();
+		try {
+			IBinding[] bindings= wpdom.findBindings(Pattern.compile(".*foo.*"), false, IndexFilter.ALL, PROGRESS);
+			assertEquals(1, bindings.length);
+
+			bindings= wpdom.findBindings(Pattern.compile(".*bar.*"), false, IndexFilter.ALL, PROGRESS);
+			assertEquals(1, bindings.length);
+		} finally {
+			wpdom.releaseReadLock();
+		}
+	}
+
+	public void verifyProject2Content(WritablePDOM wpdom) throws Exception {
+		wpdom.acquireReadLock();
+		try {
+			IBinding[] bindings= wpdom.findBindings(Pattern.compile(".*"), true, IndexFilter.ALL, NPM);
+			assertEquals(2, bindings.length);
+
+			int b= bindings[0].getName().equals("A") ? 1 : 0;
+			assertTrue(bindings[0] instanceof ICPPClassType);
+			assertTrue(bindings[1] instanceof ICPPClassType);
+			assertTrue(((ICPPClassType)bindings[1-b]).getBases().length==0);
+			assertTrue(((ICPPClassType)bindings[b]).getBases().length==1);
+		} finally {
+			wpdom.releaseReadLock();
+		}
+	}
+
+	private WritablePDOM generatePDOM(String testProject, Class<?> provider, final int[] stateCount) throws Exception {
+		IIndexerStateListener listener= null;
+		if(stateCount != null) {
+			listener= new IIndexerStateListener() {
+				public void indexChanged(IIndexerStateEvent event) {
+					stateCount[0]++;
+				}
+			};
+			CCorePlugin.getIndexManager().joinIndexer(8000, new NullProgressMonitor());
+			CCorePlugin.getIndexManager().addIndexerStateListener(listener);
+		}
+		
+		URL url= FileLocator.find(CTestPlugin.getDefault().getBundle(), new Path(testProject), null);
+		String baseDir= FileLocator.toFileURL(url).getFile();
+
+		doGenerate(new String[] {
+				GeneratePDOMApplication.OPT_TARGET, target.getAbsolutePath(), 
+				GeneratePDOMApplication.OPT_PROJECTPROVIDER, provider.getName(),
+				ExternalExportProjectProvider.OPT_SOURCE, baseDir,
+				ExternalExportProjectProvider.OPT_FRAGMENT_ID, "generate.pdom.tests.id."+getName()
+		});
+		assertTrue(target.exists());
+		if(listener!=null) {
+			CCorePlugin.getIndexManager().removeIndexerStateListener(listener);
+		}
+		return new WritablePDOM(target, new URIRelativeLocationConverter(BASEURI), LanguageManager.getInstance().getPDOMLinkageFactoryMappings());
+	}
+	
+	private void doGenerate(String[] args) throws CoreException {
+		GeneratePDOMApplication app = new GeneratePDOMApplication();
+		IApplicationContext ac= new MockApplicationContext(args);
+		app.start(ac);
+	}
+
+	/*
+	 * IExportProjectProvider test implementations
+	 */
+	
+	public static class TestProjectProvider1 implements IExportProjectProvider {
+		public ICProject createProject() throws CoreException {return null;}
+		public Map getExportProperties() {return null;}
+		public IIndexLocationConverter getLocationConverter(ICProject cproject) {return null;}
+		public void setApplicationArguments(String[] arguments) {}
+	}
+
+	public static class TestProjectProvider2 implements IExportProjectProvider {
+		public ICProject createProject() throws CoreException {
+			ICProject cproject= CProjectHelper.createCCProject("test"+System.currentTimeMillis(), null, IPDOMManager.ID_NO_INDEXER);
+			toDeleteOnTearDown.add(cproject);
+			CProjectHelper.importSourcesFromPlugin(cproject, CTestPlugin.getDefault().getBundle(), LOC_TSTPRJ1);
+			return cproject;
+		}
+		public Map getExportProperties() {return null;}
+		public IIndexLocationConverter getLocationConverter(ICProject cproject) {return null;}
+		public void setApplicationArguments(String[] arguments) {}
+	}
+
+	public static class TestProjectProvider3 implements IExportProjectProvider {
+		public ICProject createProject() throws CoreException {
+			ICProject cproject= CProjectHelper.createCCProject("test"+System.currentTimeMillis(), null, IPDOMManager.ID_NO_INDEXER);
+			toDeleteOnTearDown.add(cproject);
+			CProjectHelper.importSourcesFromPlugin(cproject, CTestPlugin.getDefault().getBundle(), LOC_TSTPRJ1);
+			return cproject;
+		}
+		public Map getExportProperties() {return null;}
+		public IIndexLocationConverter getLocationConverter(ICProject cproject) {
+			return new ResourceContainerRelativeLocationConverter(cproject.getProject());
+		}
+		public void setApplicationArguments(String[] arguments) {}
+	}
+
+	public static class TestProjectProvider4 implements IExportProjectProvider {		
+		public ICProject createProject() throws CoreException {
+			ICProject cproject= CProjectHelper.createCCProject("test"+System.currentTimeMillis(), null, IPDOMManager.ID_NO_INDEXER);
+			toDeleteOnTearDown.add(cproject);
+			CProjectHelper.importSourcesFromPlugin(cproject, CTestPlugin.getDefault().getBundle(), LOC_TSTPRJ1);
+			return cproject;
+		}
+		public Map getExportProperties() {
+			Map map= new HashMap();
+			map.put(SDK_VERSION, "4.0.1");
+			map.put(IIndexFragment.PROPERTY_FRAGMENT_ID, ACME_SDK_ID);
+			return map;
+		}
+		public IIndexLocationConverter getLocationConverter(ICProject cproject) {
+			return new ResourceContainerRelativeLocationConverter(cproject.getProject());
+		}
+		public void setApplicationArguments(String[] arguments) {}
+	}
+	
+	public static class TestProjectProvider5 implements IExportProjectProvider {		
+		public ICProject createProject() throws CoreException {
+			ICProject cproject= CProjectHelper.createCProject("test"+System.currentTimeMillis(), null, IPDOMManager.ID_NO_INDEXER);
+			toDeleteOnTearDown.add(cproject);
+			CProjectHelper.importSourcesFromPlugin(cproject, CTestPlugin.getDefault().getBundle(), LOC_TSTPRJ3);
+			return cproject;
+		}
+		public Map getExportProperties() {
+			Map map= new HashMap();
+			map.put(SDK_VERSION, "4.0.1");
+			map.put(IIndexFragment.PROPERTY_FRAGMENT_ID, ACME_SDK_ID);
+			return map;
+		}
+		public IIndexLocationConverter getLocationConverter(ICProject cproject) {
+			return new ResourceContainerRelativeLocationConverter(cproject.getProject());
+		}
+		public void setApplicationArguments(String[] arguments) {}
+	}
+}
+
+class MockApplicationContext implements IApplicationContext {
+	Map arguments;
+	MockApplicationContext(String[] appArgs) {
+		arguments= new HashMap();
+		arguments.put(APPLICATION_ARGS, appArgs);
+	}
+	public void applicationRunning() {}
+	public Map getArguments() {return arguments;}
+	public String getBrandingApplication() {return null;}
+	public Bundle getBrandingBundle() {return null;}
+	public String getBrandingDescription() {return null;}
+	public String getBrandingId() {return null;}
+	public String getBrandingName() {return null;}
+	public String getBrandingProperty(String key) {return null;}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/IncludesTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/IncludesTests.java
new file mode 100644
index 0000000..6360bfe
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/IncludesTests.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2006 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX - Initial API and implementation
+ *     Sergey Prigogin (Google)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ILinkage;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexFile;
+import org.eclipse.cdt.core.index.IIndexInclude;
+import org.eclipse.cdt.core.index.IndexLocationFactory;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * @author Doug Schaefer
+ */
+public class IncludesTests extends PDOMTestBase {
+	protected ICProject project;
+	protected IIndex index;
+
+	public static Test suite() {
+		return suite(IncludesTests.class);
+	}
+
+	protected void setUp() throws Exception {
+		if (index == null) {
+			project = createProject("includesTests");
+			index = CCorePlugin.getIndexManager().getIndex(project);
+		}
+		index.acquireReadLock();
+	}
+
+	protected void tearDown() throws Exception {
+		index.releaseReadLock();
+	}
+	
+	public void testIncludedBy() throws Exception {
+		IResource loc = project.getProject().findMember("I2.h");
+		IIndexFile file = index.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL((IFile) loc));
+		assertNotNull(file);
+		IIndexInclude[] allIncludedBy = index.findIncludedBy(file, -1);
+		assertEquals(9, allIncludedBy.length); // i.e. all of them
+	}
+	
+	public void testIncludes() throws Exception {
+		IResource loc = project.getProject().findMember("I1.cpp");
+		IIndexFile file = index.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL((IFile) loc));
+		assertNotNull(file);
+		IIndexInclude[] allIncludesTo= index.findIncludes(file, -1);
+		assertEquals(2, allIncludesTo.length); // i.e. I1.h, I2.h
+	}
+	
+	public void testIncludeName() throws Exception {
+		IResource loc = project.getProject().findMember("a/b/I6.h");
+		IIndexFile file = index.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL((IFile) loc));
+		assertNotNull(file);
+		IIndexInclude[] allIncludedBy = index.findIncludedBy(file, -1);
+		assertEquals(2, allIncludedBy.length);
+		for (IIndexInclude include : allIncludedBy) {
+			assertTrue(include.isResolved());
+			assertFalse(include.isSystemInclude());
+			IIndexFile includer = include.getIncludedBy();
+			String includerName = new Path(includer.getLocation().getFullPath()).lastSegment();
+			if ("I6.cpp".equals(includerName)) {
+				assertEquals("I6.h", include.getName());
+				assertEquals("a/b/I6.h", include.getFullName());
+			} else {
+				assertEquals("I7.cpp", includerName);
+				assertEquals("I6.h", include.getName());
+				assertEquals("b/I6.h", include.getFullName());
+				IIndexInclude[] includes = includer.getIncludes();
+				for (IIndexInclude include2 : includes) {
+					if ("I7.h".equals(include2.getName())) {
+						assertFalse(include2.isResolved());
+						assertFalse(include2.isSystemInclude());
+						assertEquals("b/I7.h", include2.getFullName());
+					} else {
+						assertEquals("I6.h", include2.getName());
+					}
+				}
+			}
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/MethodTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/MethodTests.java
new file mode 100644
index 0000000..088fc7b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/MethodTests.java
@@ -0,0 +1,305 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 IBM Corporation.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IParameter;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBasicType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+
+/**
+ * Tests for verifying whether the PDOM correctly stores information about
+ * C++ class member functions.
+ */
+public class MethodTests extends PDOMTestBase {
+	protected ICProject project;
+	protected PDOM pdom;
+
+	public static Test suite() {
+		return suite(MethodTests.class);
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		project = createProject("methodTests");
+		pdom = (PDOM) CCoreInternals.getPDOMManager().getPDOM(project);
+		pdom.acquireReadLock();
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+		if (project != null) {
+			CProjectHelper.delete(project);
+			project= null;
+		}
+	}
+
+	public void testMethodParameters() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::normalMethod");
+		assertEquals(1, bindings.length);
+		ICPPFunction function = (ICPPFunction) bindings[0];
+		IParameter[] parameters = function.getParameters();
+		assertEquals(IBasicType.t_int, ((ICPPBasicType) parameters[0].getType()).getType());
+		assertEquals("p1", parameters[0].getName());
+		assertEquals(IBasicType.t_char, ((ICPPBasicType) parameters[1].getType()).getType());
+		assertEquals("p2", parameters[1].getName());
+		assertEquals(IBasicType.t_float, ((ICPPBasicType) parameters[2].getType()).getType());
+		assertEquals("p3", parameters[2].getName());
+	}
+	
+	public void testVirtualMethod() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::inheritedMethod");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		assertTrue(method.isVirtual());
+	}
+	
+	public void testVirtualMethodType() throws Exception {
+		assertType(pdom, "Class1::inheritedMethod", ICPPFunction.class);
+	}
+
+	public void testVirtualMethodDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "Class1::inheritedMethod", 2);
+	}
+
+	public void testVirtualMethodDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "Class1::inheritedMethod", 1);
+	}
+
+	public void testVirtualMethodReferences() throws Exception {
+		assertReferenceCount(pdom, "Class1::inheritedMethod", 3);
+	}
+
+	public void testInheritedMethodType() throws Exception {
+		assertEquals(0, findQualifiedName(pdom, "Class2::inheritedMethod").length);
+	}
+
+	public void testInheritedMethodDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "Class2::inheritedMethod", 0);
+	}
+
+	public void testInheritedMethodDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "Class2::inheritedMethod", 0);
+	}
+
+	public void testInheritedMethodReferences() throws Exception {
+		assertReferenceCount(pdom, "Class2::inheritedMethod", 0);
+	}
+
+	public void testPureVirtualMethod() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::pureVirtualMethod");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		assertTrue(method.isVirtual());
+		assertTrue(method.isPureVirtual());
+	}
+	
+	public void testPureVirtualMethodType() throws Exception {
+		assertType(pdom, "Class1::pureVirtualMethod", ICPPFunction.class);
+		assertType(pdom, "Class2::pureVirtualMethod", ICPPFunction.class);
+	}
+
+	public void testPureVirtualMethodDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "Class1::pureVirtualMethod", 1);
+		assertDeclarationCount(pdom, "Class2::pureVirtualMethod", 2);
+	}
+
+	public void testPureVirtualMethodDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "Class1::pureVirtualMethod", 0);
+		assertDefinitionCount(pdom, "Class2::pureVirtualMethod", 1);
+	}
+
+	public void testPureVirtualMethodReferences() throws Exception {
+		assertReferenceCount(pdom, "Class1::pureVirtualMethod", 2);
+		assertReferenceCount(pdom, "Class2::pureVirtualMethod", 3);
+	}
+
+	public void testOverriddenMethodType() throws Exception {
+		assertType(pdom, "Class1::overriddenMethod", ICPPFunction.class);
+		assertType(pdom, "Class2::overriddenMethod", ICPPFunction.class);
+	}
+
+	public void testOverriddenMethodDeclarations() throws Exception {
+		assertDeclarationCount(pdom, "Class1::overriddenMethod", 2);
+		assertDeclarationCount(pdom, "Class2::overriddenMethod", 2);
+	}
+
+	public void testOverriddenMethodDefinitions() throws Exception {
+		assertDefinitionCount(pdom, "Class1::overriddenMethod", 1);
+		assertDefinitionCount(pdom, "Class2::overriddenMethod", 1);
+	}
+
+	public void testOverriddenMethodReferences() throws Exception {
+		assertReferenceCount(pdom, "Class1::overriddenMethod", 3);
+		assertReferenceCount(pdom, "Class2::overriddenMethod", 4);
+	}
+
+	public void testDestructor() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::~Class1");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		assertTrue(method.isDestructor());
+	}
+	
+	public void testDefaultPrivateMethod() throws Exception {
+		assertVisibility(pdom, "Class3::defaultMethod", ICPPMember.v_private);
+	}
+	
+	public void testPrivateMethod() throws Exception {
+		assertVisibility(pdom, "Class3::privateMethod", ICPPMember.v_private);
+	}
+	
+	public void testProtectedMethod() throws Exception {
+		assertVisibility(pdom, "Class3::protectedMethod", ICPPMember.v_protected);
+	}
+	
+	public void testPublicMethod() throws Exception {
+		assertVisibility(pdom, "Class3::publicMethod", ICPPMember.v_public);
+	}
+	
+	public void testInlineMethod() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::inlineMethod");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		assertTrue(method.isInline());
+	}
+	
+	public void testStaticMethod() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::staticMethod");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		assertTrue(method.isStatic());
+	}
+	
+	public void testVarArgsMethod() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::varArgsMethod");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		assertTrue(method.takesVarArgs());
+	}
+	
+	public void testConstMethod() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::constMethod");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		ICPPFunctionType type = method.getType();
+		assertTrue(type.isConst());
+	}
+	
+	public void testVolatileMethod() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::volatileMethod");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		ICPPFunctionType type = method.getType();
+		assertTrue(type.isVolatile());
+	}
+		
+	public void testConstVolatileMethod() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::constVolatileMethod");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		ICPPFunctionType type = method.getType();
+		assertTrue(type.isConst());
+		assertTrue(type.isVolatile());
+	}
+	
+	public void testNotConstMethod() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::notConstMethod");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		ICPPFunctionType type = method.getType();
+		assertFalse(type.isConst());
+	}
+	
+	public void testNotVolatileMethod() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::notVolatileMethod");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		ICPPFunctionType type = method.getType();
+		assertFalse(type.isVolatile());
+	}
+		
+	public void testNotConstVolatileMethod() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::notConstVolatileMethod");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		ICPPFunctionType type = method.getType();
+		assertFalse(type.isConst());
+		assertFalse(type.isVolatile());
+	}
+	
+	public void testNoExceptionSpecification() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::noExceptionSpecMethod");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		IType[] exceptionSpec = method.getExceptionSpecification();
+		assertNull(exceptionSpec);
+	}
+	
+	public void testEmptyExceptionSpecification() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::emptyExceptionSpecMethod");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		IType[] exceptionSpec = method.getExceptionSpecification();
+		assertEquals(0, exceptionSpec.length);
+	}
+	
+	public void testNonEmptyExceptionSpecification() throws Exception {
+		IBinding[] bindings = findQualifiedName(pdom, "Class1::nonEmptyExceptionSpecMethod");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		IType[] exceptionSpec = method.getExceptionSpecification();
+		assertEquals(1, exceptionSpec.length);
+		assertEquals(IBasicType.t_int, ((ICPPBasicType) exceptionSpec[0]).getType());
+	}
+
+	public void testImplicitCtorExceptionSpec() throws Exception {
+		IBinding[] bindings = findQualifiedPossiblyImplicit(pdom, "D::D");
+		// get both default ctor + copy ctor
+		assertEquals(2, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		IType[] exceptionSpec = method.getExceptionSpecification();
+		assertNull(exceptionSpec);
+	}
+
+	public void testImplicitCopyCtorExceptionSpec() throws Exception {
+		IBinding[] bindings = findQualifiedPossiblyImplicit(pdom, "D::D");
+		// get both default ctor + copy ctor
+		assertEquals(2, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[1];
+		IType[] exceptionSpec = method.getExceptionSpecification();
+		assertEquals(0, exceptionSpec.length);
+	}
+
+	public void testImplicitDtorExceptionSpec() throws Exception {
+		IBinding[] bindings = findQualifiedPossiblyImplicit(pdom, "D::~D");
+		assertEquals(1, bindings.length);
+		ICPPMethod method = (ICPPMethod) bindings[0];
+		IType[] exceptionSpec = method.getExceptionSpecification();
+		assertEquals(2, exceptionSpec.length);
+		int t1= ((ICPPBasicType) exceptionSpec[0]).getType();
+		int t2= ((ICPPBasicType) exceptionSpec[1]).getType();
+		assertEquals(IBasicType.t_int, Math.min(t1, t2));
+		assertEquals(IBasicType.t_double, Math.max(t1, t2));
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/NamespaceTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/NamespaceTests.java
new file mode 100644
index 0000000..77318d7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/NamespaceTests.java
@@ -0,0 +1,225 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 IBM Corporation.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.IName;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceAlias;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * Tests for verifying whether the PDOM correctly stores information about
+ * C++ namespaces.
+ *
+ * @author Vivian Kong
+ */
+public class NamespaceTests extends PDOMTestBase {
+	protected ICProject project;	
+	protected PDOM pdom;
+	protected IProgressMonitor NULL_MONITOR = new NullProgressMonitor();
+	protected IndexFilter INDEX_FILTER = IndexFilter.ALL;
+	
+	public static Test suite() {
+		return suite(NamespaceTests.class);
+	}
+	
+	protected void setUp() throws Exception {
+		if (pdom == null) {
+			project = createProject("namespaceTests", true);
+			pdom = (PDOM)CCoreInternals.getPDOMManager().getPDOM(project);
+		}
+		pdom.acquireReadLock();
+	}
+	
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+		if (project != null) {
+			project.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+		}
+	}
+	
+	public void testAlias() throws Exception {
+		/* Find all the namespace */
+		IBinding[] namespaces = pdom.findBindings(Pattern.compile("namespace1"), false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, namespaces.length);
+		assertTrue(namespaces[0] instanceof ICPPNamespace);
+		ICPPNamespace namespace1 = (ICPPNamespace) namespaces[0];
+		IBinding[] members = namespace1.getMemberBindings();
+		assertEquals(1, members.length);
+		assertTrue(members[0] instanceof ICPPNamespace);
+		assertEquals("namespace2", ((ICPPNamespace) members[0]).getName()); //nested namespace
+		ICPPNamespace namespace2 = (ICPPNamespace) members[0];
+
+		namespaces = pdom.findBindings(Pattern.compile("namespaceNew"), false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, namespaces.length);
+		assertTrue(namespaces[0] instanceof ICPPNamespace);
+		assertTrue(namespaces[0] instanceof ICPPNamespaceAlias);
+		ICPPNamespaceAlias namespaceAlias = (ICPPNamespaceAlias) namespaces[0];
+		
+		//TODO PDOM has no alias information
+		// namespace2 and namespaceAlias should be referencing the same namespace
+		assertEquals(namespace2, namespaceAlias.getBinding());
+	}
+	
+	public void testNested() throws Exception {
+
+		/* Find deeply nested namespace */
+		Pattern[] patterns = {Pattern.compile("namespace1"), Pattern.compile("namespace2"), Pattern.compile("namespace3")};
+		IBinding[] namespaces = pdom.findBindings(patterns, false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, namespaces.length);
+		assertTrue(namespaces[0] instanceof ICPPNamespace);
+
+	}
+	
+	public void testMemberDefinition() throws Exception {
+
+		/* Find the definition of a member declared in a namespace */
+		Pattern[] patterns = {Pattern.compile("namespace1"), Pattern.compile("namespace2"), Pattern.compile("foo")};
+		IBinding[] members = pdom.findBindings(patterns, false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, members.length);
+		assertTrue(members[0] instanceof ICPPFunction);
+		
+		IName[] decls = pdom.findNames(members[0], IIndex.FIND_DECLARATIONS);
+		assertEquals(1, decls.length);
+		IASTFileLocation loc = decls[0].getFileLocation();
+		assertEquals(offset("namespace.cpp", "void foo()") + 5, loc.getNodeOffset()); //character offset	
+
+		IName[] defs = pdom.findNames(members[0], IIndex.FIND_DEFINITIONS);
+		assertEquals(1, defs.length);
+		loc = defs[0].getFileLocation();
+		assertEquals(offset("namespace.cpp", "::foo()") + 2, loc.getNodeOffset()); //character offset	
+
+	}
+	
+	public void testExtend() throws Exception {
+
+		/* Extending a namespace */		
+		IBinding[] namespaces = pdom.findBindings(Pattern.compile("ns1"), false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, namespaces.length);
+		assertTrue(namespaces[0] instanceof ICPPNamespace);
+		ICPPNamespace namespace1 = (ICPPNamespace) namespaces[0];
+		Pattern[] patterns = {Pattern.compile("ns1"), Pattern.compile("c")};
+		IBinding[] members = pdom.findBindings(patterns, false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, members.length); //c was added by extending the namespace
+	}
+	
+	public void testOverload() throws Exception {
+		
+		//Function overloading in namespace
+		Pattern[] patterns = {Pattern.compile("ns3"), Pattern.compile("blah")};
+		IBinding[] functions = pdom.findBindings(patterns, false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, functions.length);
+		assertTrue(functions[0] instanceof ICPPFunction);
+		ICPPFunction function = (ICPPFunction) functions[0];
+		
+		IName[] defs = pdom.findNames(function, IIndex.FIND_DEFINITIONS);
+		assertEquals(1, defs.length);
+		IASTFileLocation loc = defs[0].getFileLocation();
+		assertEquals(offset("overload.cpp","void blah(char)") + 5, loc.getNodeOffset()); //character offset	
+		
+		IName[] decls = pdom.findNames(function, IIndex.FIND_DECLARATIONS_DEFINITIONS);
+		assertEquals(1, decls.length);
+		loc = decls[0].getFileLocation();
+		assertEquals(offset("overload.cpp","void blah(char)") + 5, loc.getNodeOffset()); //character offset	
+		
+		IName[] refs = pdom.findNames(function, IIndex.FIND_REFERENCES);
+		assertEquals(1, refs.length);
+		loc = refs[0].getFileLocation();
+		assertEquals(offset("overload.cpp","blah('a')"), loc.getNodeOffset()); //character offset	
+
+	}
+	
+	public void testUnnamed() throws Exception {
+		// test case for Bugzilla 162226
+		/* Unnamed Namespace */
+		IBinding[] functions = pdom.findBindings(Pattern.compile("function1"), true, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, functions.length);
+		assertTrue(functions[0] instanceof ICPPFunction);
+		ICPPFunction function = (ICPPFunction) functions[0];
+		
+		IName[] defs = pdom.findNames(function, IIndex.FIND_DEFINITIONS);
+		assertEquals(1, defs.length);
+		IASTFileLocation loc = defs[0].getFileLocation();
+		assertEquals(offset("unnamed.cpp","void function1()") + 5, loc.getNodeOffset()); //character offset	
+		
+		IName[] decls = pdom.findNames(function, IIndex.FIND_DECLARATIONS_DEFINITIONS);
+		assertEquals(1, decls.length);
+		loc = decls[0].getFileLocation();
+		assertEquals(offset("unnamed.cpp","void function1()") + 5, loc.getNodeOffset()); //character offset	
+		
+		IName[] refs = pdom.findNames(function, IIndex.FIND_REFERENCES);
+		assertEquals(1, refs.length);
+		loc = refs[0].getFileLocation();
+		assertEquals(offset("unnamed.cpp","function1();"), loc.getNodeOffset()); //character offset	
+
+	}
+	
+	public void testFriend() throws Exception {
+		/* Friend in namespace - function2 is not in Class1*/
+		// Bugzilla 162011
+		IBinding[] functions = pdom.findBindings(Pattern.compile("function2"), false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, functions.length);
+		assertTrue(functions[0] instanceof ICPPFunction);
+		ICPPFunction function = (ICPPFunction) functions[0];
+		
+		IName[] defs = pdom.findNames(function, IIndex.FIND_DEFINITIONS);
+		assertEquals(1, defs.length);
+		IASTFileLocation loc = defs[0].getFileLocation();
+		assertEquals(offset("friend.cpp","void function2(Class1){};") + 5, loc.getNodeOffset()); //character offset	
+		
+		IName[] decls = pdom.findNames(function, IIndex.FIND_DECLARATIONS);
+		assertEquals(1, decls.length);
+		loc = decls[0].getFileLocation();
+		assertEquals(offset("friend.cpp","friend void function2(Class1);") + 12, loc.getNodeOffset()); //character offset	
+
+		IName[] refs = pdom.findNames(function, IIndex.FIND_REFERENCES);
+		assertEquals(1, refs.length);
+		loc = refs[0].getFileLocation();
+		assertEquals(offset("friend.cpp","ns4::function2(element)") + 5, loc.getNodeOffset()); //character offset	
+		
+	}
+	
+	public void testUsingDirective() throws Exception {
+		//TODO need to test for PDOM?  or is it more for compiler?
+		Pattern[] patterns = {Pattern.compile("ns4"), Pattern.compile("element")};
+		IBinding[] variables = pdom.findBindings(patterns, false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, variables.length);
+		assertTrue(variables[0] instanceof ICPPVariable);
+		ICPPVariable variable1 = (ICPPVariable) variables[0];
+		
+		IName[] defs = pdom.findNames(variable1, IIndex.FIND_DEFINITIONS);
+		assertEquals(1, defs.length);
+		IASTFileLocation loc = defs[0].getFileLocation();
+		assertEquals(offset("friend.cpp","Class1 element;") + 7, loc.getNodeOffset()); //character offset	
+
+		IName[] decls = pdom.findNames(variable1, IIndex.FIND_DECLARATIONS);
+		assertEquals(0, decls.length);
+		
+		IName[] refs = pdom.findNames(variable1, IIndex.FIND_REFERENCES);
+		assertEquals(2, refs.length);	
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/OverloadsWithinCommonHeaderTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/OverloadsWithinCommonHeaderTests.java
new file mode 100644
index 0000000..4544da0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/OverloadsWithinCommonHeaderTests.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Symbian Software and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.util.regex.Pattern;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ILinkage;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IPointerType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * Test overloaded symbols are correctly resolved when in a common header. This
+ * is of interested with the Fast Indexer, as binding resolution occurs purely on
+ * AST information (as opposed to adapting a non-PDOM binding to a PDOM binding)
+ */
+public class OverloadsWithinCommonHeaderTests extends PDOMTestBase {
+	protected PDOM pdom;
+
+	public static TestSuite suite() {
+		return suite(OverloadsWithinCommonHeaderTests.class);
+	}
+	
+	protected void setUp() throws Exception {
+		if (pdom == null) {
+			ICProject project = createProject("overloadsWithinCommonHeader", true);
+			pdom = (PDOM)CCoreInternals.getPDOMManager().getPDOM(project);
+		}
+		pdom.acquireReadLock();
+	}
+
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+	}
+	
+	public void testOverloadedInCommonHeader_ClassScope() throws CoreException {
+		Pattern[] ManyOverloadedQuxPath = makePatternArray(new String[] {"ManyOverloaded","qux"});
+		IBinding[] ManyOverloadedQux = pdom.findBindings(ManyOverloadedQuxPath, true, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(5,ManyOverloadedQux.length);
+		
+		// ManyOverloaded.qux()
+		assertFunctionRefCount(new Class[0], ManyOverloadedQux, 2);
+		
+		// ManyOverloaded.qux(int)
+		assertFunctionRefCount(new Class[]{IBasicType.class}, ManyOverloadedQux, 4);
+		
+		// ManyOverloaded.qux(int,char)
+		assertFunctionRefCount(new Class[]{IBasicType.class,IBasicType.class}, ManyOverloadedQux, 6);
+		
+		// ManyOverloaded.qux(ManyOverloaded*)
+		assertFunctionRefCount(new Class[]{IPointerType.class}, ManyOverloadedQux, 8);
+				
+		// ManyOverloaded.qux(ManyOverloaded)
+		assertFunctionRefCount(new Class[]{ICPPClassType.class}, ManyOverloadedQux, 10);
+	}
+	
+	public void testOverloadedInCommonHeader_FileScope() throws CoreException {
+		Pattern[] QuuxPath = makePatternArray(new String[] {"quux"});		
+		IBinding[] Quux = pdom.findBindings(QuuxPath, true, IndexFilter.getFilter(ILinkage.CPP_LINKAGE_ID), new NullProgressMonitor());
+		
+		assertEquals(5,Quux.length);
+		
+		// (file scope) quux()
+		assertFunctionRefCount(new Class[0], Quux, 4);
+		
+		// (file scope) quux(int,char)
+		assertFunctionRefCount(new Class[] {IBasicType.class}, Quux, 6);
+		
+		// (file scope) quux(int,char)
+		assertFunctionRefCount(new Class[] {IBasicType.class, IBasicType.class}, Quux, 8);
+		
+		// (file scope) quux(ManyOverloaded*)
+		assertFunctionRefCount(new Class[] {IPointerType.class}, Quux, 10);
+		
+		// (file scope) quux(ManyOverloaded)
+		assertFunctionRefCount(new Class[] {ICPPClassType.class}, Quux, 12);
+	}
+	
+	public void testOverloadedInCommonHeader_NamespaceScope() throws CoreException {
+		Pattern[] GraultPath = makePatternArray(new String[] {"corge","grault"});
+		IBinding[] Grault = pdom.findBindings(GraultPath, true, IndexFilter.getFilter(ILinkage.CPP_LINKAGE_ID), new NullProgressMonitor());
+		assertEquals(5,Grault.length);
+		 
+		// corge::grault()
+		assertFunctionRefCount(new Class[0], Grault, 6);
+		
+		// corge::grault(int,char)
+		assertFunctionRefCount(new Class[] {IBasicType.class}, Grault, 8);
+		
+		// corge::grault(int,char)
+		assertFunctionRefCount(new Class[] {IBasicType.class, IBasicType.class}, Grault, 10);
+		
+		// corge::grault(ManyOverloaded*)
+		assertFunctionRefCount(new Class[] {IPointerType.class}, Grault, 12);
+		
+		// corge::grault(ManyOverloaded)
+		assertFunctionRefCount(new Class[] {ICPPClassType.class}, Grault, 14);
+	}
+	
+	public void testOverloadedInCommonHeader_NamespaceScope_Collides_With_Filescope() throws CoreException {
+		Pattern[] ns2Path = makePatternArray(new String[] {"ns2","quux"});
+		IBinding[] ns2 = pdom.findBindings(ns2Path, true, IndexFilter.getFilter(ILinkage.CPP_LINKAGE_ID), new NullProgressMonitor());
+		assertEquals(5,ns2.length);
+		 
+		// ns2::quux()
+		assertFunctionRefCount(new Class[0], ns2, 16);
+		
+		// ns2::quux(int,char)
+		assertFunctionRefCount(new Class[] {IBasicType.class}, ns2, 20);
+		
+		// ns2::quux(int,char)
+		assertFunctionRefCount(new Class[] {IBasicType.class, IBasicType.class}, ns2, 24);
+		
+		// ns2::quux(ManyOverloaded*)
+		assertFunctionRefCount(new Class[] {IPointerType.class}, ns2, 28);
+		
+		// ns2::quux(ManyOverloaded)
+		assertFunctionRefCount(new Class[] {ICPPClassType.class}, ns2, 32);
+	}
+	
+	protected void assertFunctionRefCount(Class[] args, IBinding[] bindingPool, int refCount) throws CoreException {
+		assertFunctionRefCount(pdom, args, bindingPool, refCount);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/OverloadsWithinSingleTUTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/OverloadsWithinSingleTUTests.java
new file mode 100644
index 0000000..caf9cf9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/OverloadsWithinSingleTUTests.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Symbian Software and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.util.regex.Pattern;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+ 
+/**
+ * Test overloaded symbols are correctly resolved when within a single translation
+ * unit. This covers the case of adapting non-PDOM bindings to PDOM bindings by
+ * searching for the equivalent binding within the PDOM.
+ */
+public class OverloadsWithinSingleTUTests extends PDOMTestBase {
+	protected PDOM pdom;
+
+	public static TestSuite suite() {
+		return suite(OverloadsWithinSingleTUTests.class);
+	}
+	
+	protected void setUp() throws Exception {
+		if (pdom == null) {
+			ICProject project = createProject("overloadsWithinSingleTU");
+			pdom = (PDOM)CCoreInternals.getPDOMManager().getPDOM(project);
+		}
+		pdom.acquireReadLock();
+	}
+
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+	}
+	
+	public void testDistinctBindingsPresent() throws Exception {
+		IBinding[] fooBs = pdom.findBindings(Pattern.compile("foo"), false, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(3, fooBs.length);
+
+		IBinding[] barBs = pdom.findBindings(Pattern.compile("bar"), false, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(8, barBs.length);
+
+		IBinding[] FooBs = pdom.findBindings(Pattern.compile("Foo"), false, IndexFilter.ALL_DECLARED, new NullProgressMonitor());
+		assertEquals(4, FooBs.length);
+
+		Pattern[] XBarAbsPath = makePatternArray(new String[] {"X","bar"});
+		IBinding[] XBarBs = pdom.findBindings(XBarAbsPath, true, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(4, XBarBs.length);
+
+		Pattern[] XFooPath = makePatternArray(new String[] {"X","Foo"});
+		IBinding[] XFooPathBs = pdom.findBindings(XFooPath, true, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(1, XFooPathBs.length);
+	}
+
+	public void testReferencesToGlobalBindings() throws Exception {
+		IBinding[] BarBs = pdom.findBindings(Pattern.compile("bar"), true, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(4, BarBs.length);
+
+		// bar()
+		assertFunctionRefCount(new Class[] {}, BarBs, 4);
+		
+		// bar(int)
+		assertFunctionRefCount(new Class[] {IBasicType.class}, BarBs, 3);
+
+		// bar(int,int)
+		assertFunctionRefCount(new Class[] {IBasicType.class, IBasicType.class}, BarBs, 2);
+
+		// bar(Foo,int)
+		assertFunctionRefCount(new Class[] {ICPPClassType.class, IBasicType.class}, BarBs, 1);
+	}
+
+	public void testReferencesToNamespacedBindings() throws Exception {
+		Pattern[] XBarAbsPath = makePatternArray(new String[] {"X","bar"});
+		IBinding[] XBarBs = pdom.findBindings(XBarAbsPath, false, IndexFilter.ALL, new NullProgressMonitor());
+
+		// X::bar()
+		assertFunctionRefCount(new Class[] {}, XBarBs, 2);
+
+		// X::bar(int)
+		assertFunctionRefCount(new Class[] {IBasicType.class}, XBarBs, 3);
+
+		// X::bar(int,int)
+		assertFunctionRefCount(new Class[] {IBasicType.class,IBasicType.class}, XBarBs, 4);
+
+		// X::bar(X::Foo,int)
+		assertFunctionRefCount(new Class[] {ICPPClassType.class,IBasicType.class}, XBarBs, 5);
+	}
+	
+	public void assertFunctionRefCount(Class[] args, IBinding[] bindingPool, int refCount) throws CoreException {
+		assertFunctionRefCount(pdom, args, bindingPool, refCount);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMCBugsTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMCBugsTest.java
new file mode 100644
index 0000000..74688b1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMCBugsTest.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *    Andrew Ferguson (Symbian) - Initial implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IFunctionType;
+import org.eclipse.cdt.core.dom.ast.IPointerType;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.osgi.framework.Bundle;
+
+public class PDOMCBugsTest extends BaseTestCase {
+	ICProject cproject;
+	PDOM pdom;
+	
+	public static Test suite() {
+		return suite(PDOMCBugsTest.class);
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		cproject= CProjectHelper.createCProject("PDOMCBugsTest"+System.currentTimeMillis(), "bin", IPDOMManager.ID_NO_INDEXER);
+		Bundle b = CTestPlugin.getDefault().getBundle();
+		StringBuffer[] testData = TestSourceReader.getContentsForTest(b, "parser", PDOMCBugsTest.this.getClass(), getName(), 1);
+
+		IFile file = TestSourceReader.createFile(cproject.getProject(), new Path("header.h"), testData[0].toString());
+		CCorePlugin.getIndexManager().setIndexerId(cproject, IPDOMManager.ID_FAST_INDEXER);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+
+		pdom= (PDOM) CCoreInternals.getPDOMManager().getPDOM(cproject);
+		super.setUp();
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		if (cproject != null) {
+			cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+		}
+		super.tearDown();
+	}
+	
+	// // check we get the right IProblemBinding objects
+	// typedef A B;
+	// typedef C D;
+	// typedef E E;
+	// typedef typeof(G) G;
+	// typedef H *H;
+	// typedef I *************I;
+	// typedef int (*J)(J);
+	public void test192165() throws Exception {
+		pdom.acquireReadLock();
+		IBinding[] bindings= pdom.findBindings(Pattern.compile(".*"), false, IndexFilter.ALL, NPM);
+		assertEquals(7, bindings.length);
+		Set bnames= new HashSet();
+		for (IBinding binding : bindings) {
+			assertTrue("expected typedef, got "+binding, binding instanceof ITypedef);
+			bnames.add(binding.getName());
+			IType type= SemanticUtil.getUltimateType((IType)binding, false);
+			
+			if(binding.getName().equals("J")) {
+				// for plain C the second J has to be interpreted as a (useless) parameter name.
+				assertTrue(type instanceof IFunctionType);
+				IFunctionType ft= (IFunctionType) type;
+				assertEquals("int (int)", ASTTypeUtil.getType(ft));
+			} else {
+				assertTrue("expected ITypedef, got "+type, type == null || type instanceof ITypedef || type instanceof IPointerType);
+			}
+		}
+		
+		Set expected= new HashSet(Arrays.asList(new String[]{"B","D","E","G","H","I","J"}));
+		assertEquals(expected, bnames);
+		
+		pdom.releaseReadLock();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMCPPBugsTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMCPPBugsTest.java
new file mode 100644
index 0000000..566f1f9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMCPPBugsTest.java
@@ -0,0 +1,252 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *    Andrew Ferguson (Symbian) - Initial implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.io.File;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IName;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding;
+import org.eclipse.cdt.core.index.IIndexBinding;
+import org.eclipse.cdt.core.index.IIndexLocationConverter;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.index.ResourceContainerRelativeLocationConverter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.LanguageManager;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.index.IIndexFragment;
+import org.eclipse.cdt.internal.core.index.IWritableIndexFragment;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.cdt.internal.core.pdom.PDOMManager;
+import org.eclipse.cdt.internal.core.pdom.WritablePDOM;
+import org.eclipse.cdt.internal.core.pdom.db.ChunkCache;
+import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * Tests bugs found in the PDOM
+ */
+public class PDOMCPPBugsTest extends BaseTestCase {
+	ICProject cproject;
+	
+	public static Test suite() {
+		return suite(PDOMCPPBugsTest.class);
+	}
+	
+	protected void setUp() throws Exception {
+		super.setUp();
+		cproject= CProjectHelper.createCCProject("PDOMBugsTest"+System.currentTimeMillis(), "bin", IPDOMManager.ID_FAST_INDEXER);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(8000, NPM));
+	}
+
+	protected void tearDown() throws Exception {
+		if (cproject != null) {
+			cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+		}
+		super.tearDown();
+	}
+
+	public void testPDOMProperties() throws Exception {
+		PDOM pdom = (PDOM) CCoreInternals.getPDOMManager().getPDOM(cproject);
+		pdom.acquireWriteLock(0);
+		try {
+			WritablePDOM wpdom = (WritablePDOM) pdom;
+			wpdom.setProperty("a", "b");
+			assertEquals("b", wpdom.getProperty("a"));
+			wpdom.setProperty("c", "d");
+			assertEquals("d", wpdom.getProperty("c"));
+			wpdom.setProperty("c", "e");
+			assertEquals("e", wpdom.getProperty("c"));
+		} finally {
+			pdom.releaseWriteLock(0, true);
+		}
+	}
+	
+	public void testProjectPDOMProperties() throws Exception {
+		PDOM pdom = (PDOM) CCoreInternals.getPDOMManager().getPDOM(cproject);
+		pdom.acquireReadLock();
+		try {
+			String id= pdom.getProperty(IIndexFragment.PROPERTY_FRAGMENT_ID);
+			assertNotNull(id);
+			
+			CCoreInternals.getPDOMManager().reindex(cproject);
+			
+			String id2= pdom.getProperty(IIndexFragment.PROPERTY_FRAGMENT_ID);
+			assertNotNull(id2);
+			assertEquals(id, id2);
+		} finally {
+			pdom.releaseReadLock();
+		}
+	}
+	
+	public void testProjectPDOMPropertiesOnExport() throws Exception {
+		// this test is currently failing on the cdt test build machine, but
+		// not on my local linux or windows boxes.
+		
+		File tmp= new File(System.getProperty("java.io.tmpdir")+"/temp"+System.currentTimeMillis()+".pdom");
+		IIndexLocationConverter cvr= new ResourceContainerRelativeLocationConverter(cproject.getProject());
+		final PDOMManager pdomManager = CCoreInternals.getPDOMManager();
+		pdomManager.exportProjectPDOM(cproject, tmp, cvr);
+		
+		IWritableIndexFragment pdom = new WritablePDOM(tmp, cvr, new ChunkCache(), LanguageManager.getInstance().getPDOMLinkageFactoryMappings());
+		pdom.acquireReadLock();
+		try {
+			String id= pdom.getProperty(IIndexFragment.PROPERTY_FRAGMENT_ID);
+			assertNotNull("Exported pdom ID is null", id);
+			
+			String id2 = getFragmentID(cproject);
+			assertNotNull("Project pdom ID is null", id2);
+			assertFalse("Project pdom ID equals export PDOM id", id2.equals(id));
+			
+			pdomManager.reindex(cproject);
+			assertTrue(pdomManager.joinIndexer(4000, new NullProgressMonitor()));
+			
+			String id3= pdom.getProperty(IIndexFragment.PROPERTY_FRAGMENT_ID);
+			assertNotNull("Exported pdom ID is null after project reindex", id3);
+			assertEquals("Exported pdom ID hasChanged during reindex", id, id3);
+			
+			String id4= getFragmentID(cproject);
+			assertNotNull("Reindexed project pdom ID is null", id4);
+			assertFalse("Reindexex project pdom ID equals exported pdom ID", id4.equals(id));
+		} finally {
+			pdom.releaseReadLock();
+		}
+	}
+
+	private String getFragmentID(final ICProject cproject) throws CoreException, InterruptedException {
+		PDOMManager pdomManager= CCoreInternals.getPDOMManager();
+		final PDOM projectPDOM = (PDOM)pdomManager.getPDOM(cproject);
+		String id2;
+		projectPDOM.acquireReadLock();
+		try {
+			id2= (projectPDOM).getProperty(IIndexFragment.PROPERTY_FRAGMENT_ID);
+		}
+		finally {
+			projectPDOM.releaseReadLock();
+		}
+		return id2;
+	}
+	
+	public void testInterruptingAcquireReadLock() throws Exception {
+		final PDOM pdom= (PDOM) CCoreInternals.getPDOMManager().getPDOM(cproject);
+		final boolean[] ok= {false};
+		pdom.acquireWriteLock();
+		try {
+			Thread other= new Thread() {
+				public void run() {
+					try {
+						pdom.acquireReadLock();
+					} catch (InterruptedException e) {
+						ok[0]= true;
+					} 
+				}
+			};
+			other.start();
+			other.interrupt();
+			other.join();
+			assertTrue("thread was not interrupted", ok[0]);
+		}
+		finally {
+			pdom.releaseWriteLock();
+		}
+		pdom.acquireWriteLock();
+		pdom.releaseWriteLock();
+	}
+	
+	public void testInterruptingAcquireWriteLock() throws Exception {
+		final WritablePDOM pdom= (WritablePDOM) CCoreInternals.getPDOMManager().getPDOM(cproject);
+		final boolean[] ok= {false};
+		pdom.acquireReadLock();
+		try {
+			Thread other= new Thread() {
+				public void run() {
+					try {
+						pdom.acquireReadLock();
+						pdom.acquireWriteLock(1);
+					} catch (InterruptedException e) {
+						ok[0]= true;
+						pdom.releaseReadLock();
+					} 
+				}
+			};
+			other.start();
+			other.interrupt();
+			other.join();
+			assertTrue("thread was not interrupted", ok[0]);
+		}
+		finally {
+			pdom.releaseReadLock();
+		}
+		pdom.acquireWriteLock();
+		pdom.releaseWriteLock();
+	}
+	
+	public void test191679() throws Exception {
+		IProject project= cproject.getProject();
+		IFolder cHeaders= cproject.getProject().getFolder("cHeaders");
+		cHeaders.create(true, true, NPM);
+		LanguageManager lm= LanguageManager.getInstance();
+		
+		IFile cHeader= TestSourceReader.createFile(cHeaders, "cSource.c", "void foo(int i){}");		
+		IFile cppSource= TestSourceReader.createFile(cHeaders, "cppSource.cpp", "extern \"C\" void foo(int i); void ref() {foo(1);}");
+		
+		IndexerPreferences.set(project, IndexerPreferences.KEY_INDEXER_ID, IPDOMManager.ID_FAST_INDEXER);
+		CCorePlugin.getIndexManager().reindex(cproject);
+		CCorePlugin.getIndexManager().joinIndexer(10000, NPM);
+		
+		final PDOM pdom= (PDOM) CCoreInternals.getPDOMManager().getPDOM(cproject);
+		pdom.acquireReadLock();
+		try {
+			{ // test reference to 'foo' was resolved correctly
+				IIndexBinding[] ib= pdom.findBindings(new char[][]{"foo".toCharArray()}, IndexFilter.ALL, NPM);
+				assertEquals(2, ib.length);
+				if (ib[0] instanceof ICPPBinding) {
+					IIndexBinding h= ib[0]; ib[0]= ib[1]; ib[1]= h;
+				}
+				assertTrue(ib[0] instanceof IFunction);
+				assertFalse(ib[0] instanceof ICPPBinding);
+				
+				assertTrue(ib[1] instanceof IFunction);
+				assertTrue(ib[1] instanceof ICPPBinding);
+				
+				IName[] nms= pdom.findNames(ib[0], IIndexFragment.FIND_REFERENCES | IIndexFragment.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
+				assertEquals(1, nms.length);
+				assertTrue(nms[0].getFileLocation().getFileName().endsWith(".cpp"));
+
+				nms= pdom.findNames(ib[0], IIndexFragment.FIND_REFERENCES);
+				assertEquals(0, nms.length);
+				
+				nms= pdom.findNames(ib[1], IIndexFragment.FIND_DEFINITIONS | IIndexFragment.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
+				assertEquals(1, nms.length);
+				assertTrue(nms[0].getFileLocation().getFileName().endsWith(".c"));
+
+				nms= pdom.findNames(ib[1], IIndexFragment.FIND_DEFINITIONS);
+				assertEquals(0, nms.length);
+			}
+		} finally {
+			pdom.releaseReadLock();
+		}
+	}
+}
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMLocationTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMLocationTests.java
new file mode 100644
index 0000000..a3fe4b3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMLocationTests.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.index.IIndexFileLocation;
+import org.eclipse.cdt.core.index.IndexLocationFactory;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.pdom.dom.PDOMProjectIndexLocationConverter;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Bundle;
+
+/**
+ * Tests behavior related to location representation in the PDOM
+ */
+public class PDOMLocationTests extends BaseTestCase {
+	ICProject cproject;
+	
+	public static Test suite() {
+		return suite(PDOMLocationTests.class);
+	}
+	
+	protected void setUp() throws Exception {
+		cproject= CProjectHelper.createCCProject("PDOMLocationTests"+System.currentTimeMillis(), "bin", IPDOMManager.ID_NO_INDEXER);
+		
+		Bundle b = CTestPlugin.getDefault().getBundle();
+		StringBuffer[] testData = TestSourceReader.getContentsForTest(b, "parser", getClass(), getName(), 3);
+		
+		super.setUp();
+	}
+
+	protected void tearDown() throws Exception {
+		if (cproject != null) {
+			cproject.getProject().delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+		}
+		super.tearDown();
+	}
+
+	public void testLocationConverter() {
+		PDOMProjectIndexLocationConverter converter = new PDOMProjectIndexLocationConverter(cproject.getProject());
+		String[] winExternals= new String[] {
+				"c:/a/b/c/d.foo",
+				"c:\\a\\b\\c\\d\\e.foo",
+				"d:/foo.bar",
+				"d:\\Documents and Settings\\JDoe\\Eclipse Workspaces\\ProjectX\\foo.bar"
+		};
+		String[] linuxExternals = new String[] {
+				"/home/jdoe/workspaces/projectx/foo",
+				"/home/jdoe/eclipse workspaces/projectx/foo.bar"
+		};
+		
+		Set<String> externals= new HashSet();
+		externals.addAll(Arrays.asList(linuxExternals));
+		if(Platform.getOS().equals("win32")) {
+			externals.addAll(Arrays.asList(winExternals));
+		}
+		
+		for(String ext : externals) {
+			IIndexFileLocation loc = IndexLocationFactory.getExternalIFL(ext);
+			String raw = converter.toInternalFormat(loc);
+			IIndexFileLocation roundtrip = converter.fromInternalFormat(raw);
+			assertTrue(roundtrip!=null);
+			assertEquals(roundtrip.getFullPath(), loc.getFullPath());
+			assertEquals(roundtrip.getURI(), loc.getURI());
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMPrettyPrinter.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMPrettyPrinter.java
new file mode 100644
index 0000000..1269487
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMPrettyPrinter.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Symbian - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMNode;
+import org.eclipse.cdt.core.dom.IPDOMVisitor;
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPBasicType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil;
+import org.eclipse.cdt.internal.core.index.CIndex;
+import org.eclipse.cdt.internal.core.index.IIndexFragment;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.cdt.internal.core.pdom.db.IBTreeVisitor;
+import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
+import org.eclipse.cdt.internal.core.pdom.dom.PDOMLinkage;
+import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Dump the contents of the PDOM index to stdout (for when you need
+ * a lo-fidelity debugging tool)
+ */
+public class PDOMPrettyPrinter implements IPDOMVisitor {
+	StringBuffer indent = new StringBuffer();
+	final String step = "   "; //$NON-NLS-1$
+
+	public void leave(IPDOMNode node) throws CoreException {
+//		if (node instanceof PDOMCPPClassTemplate) {
+//			((PDOMCPPClassTemplate) node).specializationsAccept(this);
+//		}
+		if(indent.length()>=step.length())
+			indent.setLength(indent.length()-step.length());
+	}
+
+	public boolean visit(IPDOMNode node) throws CoreException {
+		indent.append(step);
+		StringBuilder sb= new StringBuilder();
+		sb.append(indent);
+		sb.append(node);
+		if(node instanceof PDOMBinding) {
+			sb.append("  ");
+			PDOMBinding binding= (PDOMBinding) node;
+			sb.append(" "+binding.getRecord());
+		}
+		if(node instanceof ICPPVariable) {
+			try {
+				IType type= SemanticUtil.getUltimateTypeUptoPointers(((ICPPVariable)node).getType());
+				if(type instanceof ICPPBasicType) {
+					IASTExpression e1= ((IBasicType)type).getValue();
+					sb.append(" value="+(e1==null?"null":e1.toString()));
+				}
+			} catch(DOMException de) {
+				sb.append(" "+de.getMessage());
+			}
+		}
+		System.out.println(sb);
+		return true;
+	}
+
+	/**
+	 * Dumps the contents of the specified linkage for all primary fragments of the specified index
+	 * to standard out, including file local scopes.
+	 * @param index
+	 * @param linkageID
+	 */
+	public static void dumpLinkage(IIndex index, final int linkageID) {
+		final IPDOMVisitor v= new PDOMPrettyPrinter();
+		IIndexFragment[] frg= ((CIndex)index).getPrimaryFragments();
+		for (IIndexFragment element : frg) {
+			final PDOM pdom = (PDOM) element;
+			dumpLinkage(pdom, linkageID, v);
+		}
+	}
+
+	public static void dumpLinkage(PDOM pdom, final int linkageID) {
+		final IPDOMVisitor v= new PDOMPrettyPrinter();
+		dumpLinkage(pdom, linkageID, v);
+	}
+
+	private static void dumpLinkage(final PDOM pdom, final int linkageID, final IPDOMVisitor v) {
+		try {
+			final PDOMLinkage linkage = pdom.getLinkage(linkageID);
+			if (linkage != null) {
+				linkage.getIndex().accept(new IBTreeVisitor() {
+					public int compare(long record) throws CoreException {
+						return 0;
+					}
+
+					public boolean visit(long record) throws CoreException {
+						if (record == 0)
+							return false;
+						PDOMNode node = linkage.getNode(record);
+						if (v.visit(node))
+							node.accept(v);
+						v.leave(node);
+						return true;
+					}
+				});
+			}
+		} catch(CoreException ce) {
+			CCorePlugin.log(ce);
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMProviderTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMProviderTests.java
new file mode 100644
index 0000000..a10a122
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMProviderTests.java
@@ -0,0 +1,308 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.io.File;
+import java.net.URI;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexLocationConverter;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.index.ResourceContainerRelativeLocationConverter;
+import org.eclipse.cdt.core.index.URIRelativeLocationConverter;
+import org.eclipse.cdt.core.index.provider.IPDOMDescriptor;
+import org.eclipse.cdt.core.index.provider.IReadOnlyPDOMProvider;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.LanguageManager;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.index.provider.IndexProviderManager;
+import org.eclipse.cdt.internal.core.index.provider.ReadOnlyPDOMProviderBridge;
+import org.eclipse.cdt.internal.core.pdom.WritablePDOM;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * Tests addition of external pdom's into the logical index
+ */
+public class PDOMProviderTests extends PDOMTestBase {
+
+	public static Test suite() {
+		return suite(PDOMProviderTests.class);
+	}
+
+	public void testLifeCycle() throws Exception {
+		final File tempPDOM= File.createTempFile("foo", "bar");
+
+		{
+			ICProject cproject= CProjectHelper.createCCProject("foo"+System.currentTimeMillis(), null, IPDOMManager.ID_FAST_INDEXER);
+			TestSourceReader.createFile(cproject.getProject(), new Path("/this.h"), "class A {};\n\n");
+			CCorePlugin.getIndexManager().joinIndexer(3000, NPM);
+
+			IIndex index= CCorePlugin.getIndexManager().getIndex(cproject);
+			index.acquireReadLock();
+			try {
+				IBinding[] bindings= index.findBindings("A".toCharArray(), IndexFilter.ALL, NPM);
+				assertEquals(1, bindings.length);
+			} finally {
+				index.releaseReadLock();
+			}
+
+			ResourceContainerRelativeLocationConverter cvr= new ResourceContainerRelativeLocationConverter(cproject.getProject());
+			CCoreInternals.getPDOMManager().exportProjectPDOM(cproject, tempPDOM, cvr);
+			assertTrue(tempPDOM.exists());
+
+			CProjectHelper.delete(cproject);
+		}
+
+		final URI baseURI= new File("c:/ExternalSDK/").toURI();
+		final ICProject cproject2= CProjectHelper.createCCProject("bar"+System.currentTimeMillis(), null, IPDOMManager.ID_FAST_INDEXER);
+		TestSourceReader.createFile(cproject2.getProject(), new Path("/source.cpp"), "namespace X { class A {}; }\n\n");
+		CCorePlugin.getIndexManager().joinIndexer(3000, NPM);
+
+
+		IndexProviderManager ipm= CCoreInternals.getPDOMManager().getIndexProviderManager();
+		ipm.addIndexProvider(new ReadOnlyPDOMProviderBridge(
+				new IReadOnlyPDOMProvider() {
+					public IPDOMDescriptor[] getDescriptors(
+							ICConfigurationDescription config) {
+						return new IPDOMDescriptor[] {
+								new IPDOMDescriptor() {
+									public IIndexLocationConverter getIndexLocationConverter() {
+										return new URIRelativeLocationConverter(baseURI);
+									}
+
+									public IPath getLocation() {
+										return new Path(tempPDOM.getAbsolutePath());
+									}
+
+								}
+						};
+					}
+					public boolean providesFor(ICProject project)
+					throws CoreException {
+						return cproject2.equals(project);
+					}
+
+				}
+		));
+		IIndex index= CCorePlugin.getIndexManager().getIndex(cproject2);
+		index.acquireReadLock();
+		try {
+			IBinding[] bindings= index.findBindings("A".toCharArray(), IndexFilter.ALL, NPM);
+			assertEquals(1, bindings.length);
+			bindings= index.findBindingsForPrefix("A".toCharArray(), false, new IndexFilter() {
+				public boolean acceptBinding(IBinding binding) {
+					return binding instanceof ICPPClassType;
+				}
+			}, null);
+			assertEquals(2, bindings.length);
+		}
+		finally {
+			index.releaseReadLock();
+		}
+	}
+
+
+	public void testCommonSDK() throws Exception {
+		final File tempPDOM= File.createTempFile("foo", "bar");
+
+		{
+			ICProject cproject= CProjectHelper.createCCProject("foo"+System.currentTimeMillis(), null, IPDOMManager.ID_FAST_INDEXER);
+			TestSourceReader.createFile(cproject.getProject(), new Path("/this.h"), "class A {};\n\n");
+			CCorePlugin.getIndexManager().joinIndexer(3000, NPM);
+
+			IIndex index= CCorePlugin.getIndexManager().getIndex(cproject);
+			index.acquireReadLock();
+			try {
+				IBinding[] bindings= index.findBindings("A".toCharArray(), IndexFilter.ALL, NPM);
+				assertEquals(1, bindings.length);
+			} finally {
+				index.releaseReadLock();
+			}
+
+			ResourceContainerRelativeLocationConverter cvr= new ResourceContainerRelativeLocationConverter(cproject.getProject());
+			CCoreInternals.getPDOMManager().exportProjectPDOM(cproject, tempPDOM, cvr);
+			assertTrue(tempPDOM.exists());
+
+			CProjectHelper.delete(cproject);
+		}
+
+		final ICProject cproject3= CProjectHelper.createCCProject("bar"+System.currentTimeMillis(), null, IPDOMManager.ID_FAST_INDEXER);
+		TestSourceReader.createFile(cproject3.getProject(), new Path("/source.cpp"), "namespace Y { class A {}; }\n\n");
+		CCorePlugin.getIndexManager().joinIndexer(3000, NPM);
+
+		final URI baseURI= new File("c:/ExternalSDK/").toURI();
+		final ICProject cproject2= CProjectHelper.createCCProject("baz"+System.currentTimeMillis(), null, IPDOMManager.ID_FAST_INDEXER);
+		TestSourceReader.createFile(cproject2.getProject(), new Path("/source.cpp"), "namespace X { class A {}; }\n\n");
+		CCorePlugin.getIndexManager().joinIndexer(3000, NPM);
+
+
+
+		IndexProviderManager ipm= CCoreInternals.getPDOMManager().getIndexProviderManager();
+		ipm.addIndexProvider(new ReadOnlyPDOMProviderBridge(
+				new IReadOnlyPDOMProvider() {
+					public IPDOMDescriptor[] getDescriptors(
+							ICConfigurationDescription config) {
+						return new IPDOMDescriptor[] {
+								new IPDOMDescriptor() {
+									public IIndexLocationConverter getIndexLocationConverter() {
+										return new URIRelativeLocationConverter(baseURI);
+									}
+
+									public IPath getLocation() {
+										return new Path(tempPDOM.getAbsolutePath());
+									}
+
+								}
+						};
+					}
+					public boolean providesFor(ICProject project)
+					throws CoreException {
+						return cproject2.equals(project) || cproject3.equals(project);
+					}
+				}
+		));
+
+		{
+			IIndex index= CCorePlugin.getIndexManager().getIndex(cproject2);
+			index.acquireReadLock();
+			try {
+				IBinding[] bindings= index.findBindings("A".toCharArray(), IndexFilter.ALL, NPM);
+				assertEquals(1, bindings.length);
+				assertEquals(1, index.findDefinitions(bindings[0]).length);
+				bindings= index.findBindingsForPrefix("A".toCharArray(), false, new IndexFilter() {
+					public boolean acceptBinding(IBinding binding) {
+						return binding instanceof ICPPClassType;
+					}
+				}, null);
+				assertEquals(2, bindings.length);
+			}
+			finally {
+				index.releaseReadLock();
+			}
+		}
+
+		{
+			IIndex index= CCorePlugin.getIndexManager().getIndex(cproject3);
+			index.acquireReadLock();
+			try {
+				IBinding[] bindings= index.findBindings("A".toCharArray(), IndexFilter.ALL, NPM);
+				assertEquals(1, bindings.length);
+				assertEquals(1, index.findDefinitions(bindings[0]).length);
+				bindings= index.findBindingsForPrefix("A".toCharArray(), false, new IndexFilter() {
+					public boolean acceptBinding(IBinding binding) {
+						return binding instanceof ICPPClassType;
+					}
+				}, null);
+				assertEquals(2, bindings.length);
+			}
+			finally {
+				index.releaseReadLock();
+			}
+		}
+		
+		{
+			IIndex index= CCorePlugin.getIndexManager().getIndex(new ICProject[]{cproject2, cproject3});
+			index.acquireReadLock();
+			try {
+				IBinding[] bindings= index.findBindings("A".toCharArray(), IndexFilter.ALL, NPM);
+				assertEquals(1, bindings.length);
+				assertEquals(1, index.findDefinitions(bindings[0]).length);
+				bindings= index.findBindingsForPrefix("A".toCharArray(), false, new IndexFilter() {
+					public boolean acceptBinding(IBinding binding) {
+						return binding instanceof ICPPClassType;
+					}
+				}, null);
+				assertEquals(3, bindings.length);
+
+			} finally {
+				index.releaseReadLock();
+			}		
+		}
+	}
+	
+	/*
+	 * see bugzilla 178998
+	 */
+	public void testVersionMismatchOfExternalPDOM() throws Exception {
+		final File tempPDOM= File.createTempFile("foo", "bar");
+		
+		
+		{
+			ICProject cproject= CProjectHelper.createCCProject("foo"+System.currentTimeMillis(), null, IPDOMManager.ID_FAST_INDEXER);
+			TestSourceReader.createFile(cproject.getProject(), new Path("/this.h"), "class A {};\n\n");
+			CCorePlugin.getIndexManager().joinIndexer(3000, NPM);
+			ResourceContainerRelativeLocationConverter cvr= new ResourceContainerRelativeLocationConverter(cproject.getProject());
+			CCoreInternals.getPDOMManager().exportProjectPDOM(cproject, tempPDOM, cvr);
+			CProjectHelper.delete(cproject);
+			
+			// mimic a pdom with superceded version
+			WritablePDOM wpdom= new WritablePDOM(tempPDOM, cvr, LanguageManager.getInstance().getPDOMLinkageFactoryMappings());
+			wpdom.acquireWriteLock();
+			try {
+				wpdom.getDB().setVersion(1);	
+				wpdom.close();
+			} finally {
+				wpdom.releaseWriteLock();
+			}
+		}
+
+		final URI baseURI= new File("c:/ExternalSDK/").toURI();
+		final ICProject cproject2= CProjectHelper.createCCProject("baz"+System.currentTimeMillis(), null, IPDOMManager.ID_FAST_INDEXER);
+		TestSourceReader.createFile(cproject2.getProject(), new Path("/source.cpp"), "namespace X { class A {}; }\n\n");
+		CCorePlugin.getIndexManager().joinIndexer(3000, NPM);
+
+		IndexProviderManager ipm= CCoreInternals.getPDOMManager().getIndexProviderManager();
+		ipm.addIndexProvider(new ReadOnlyPDOMProviderBridge(
+				new IReadOnlyPDOMProvider() {
+					public IPDOMDescriptor[] getDescriptors(
+							ICConfigurationDescription config) {
+						return new IPDOMDescriptor[] {
+								new IPDOMDescriptor() {
+									public IIndexLocationConverter getIndexLocationConverter() {
+										return new URIRelativeLocationConverter(baseURI);
+									}
+
+									public IPath getLocation() {
+										return new Path(tempPDOM.getAbsolutePath());
+									}
+
+								}
+						};
+					}
+					public boolean providesFor(ICProject project)
+					throws CoreException {
+						return cproject2.equals(project);
+					}
+				}
+		));
+		
+		setExpectedNumberOfLoggedNonOKStatusObjects(1); // (this applies to the entire test duration)
+		
+		for(int i=0; i<3; i++) {
+			// try several times in order to test the status is logged only once
+			ICProjectDescription pd= CCorePlugin.getDefault().getProjectDescription(cproject2.getProject(), false);
+			assertEquals(0, ipm.getProvidedIndexFragments(pd.getActiveConfiguration()).length);
+		}
+
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMSearchTest.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMSearchTest.java
new file mode 100644
index 0000000..36e223c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMSearchTest.java
@@ -0,0 +1,306 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.IName;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
+import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * Test the correctness of C/C++ searches
+ * 
+ * @author Vivian Kong
+ * 
+ */
+public class PDOMSearchTest extends PDOMTestBase {
+	final Comparator<IBinding> BINDING_COMPARATOR = new Comparator<IBinding>() {
+		public int compare(IBinding o1, IBinding o2) {
+			return o1.getName().compareTo(o2.getName());
+		}};
+
+	protected ICProject project;	
+	protected PDOM pdom;
+	protected IProgressMonitor NULL_MONITOR = new NullProgressMonitor();
+	protected IndexFilter INDEX_FILTER = IndexFilter.ALL_DECLARED;
+
+	public static Test suite() {
+		return suite(PDOMSearchTest.class);
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		if (pdom == null) {
+			ICProject project = createProject("searchTests", true);
+			pdom = (PDOM)CCoreInternals.getPDOMManager().getPDOM(project);
+		}
+		pdom.acquireReadLock();
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+	}
+	/**
+	 * Test the members inside namespaces
+	 */
+	public void testNamespaces() throws Exception {
+
+		/* Members in the namespace */
+		IBinding[] namespaces = pdom.findBindings(Pattern.compile("namespace1"), false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, namespaces.length);
+		assertTrue(namespaces[0] instanceof ICPPNamespace);
+		ICPPNamespace namespace1 = (ICPPNamespace) namespaces[0];
+
+		/* Consistent search results */
+
+		// Searching for "namespace1::namespace2"
+		Pattern[] patterns = { Pattern.compile("namespace1"), Pattern.compile("namespace2") };
+		namespaces = pdom.findBindings(patterns, true, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, namespaces.length);
+		assertTrue(namespaces[0] instanceof ICPPNamespace);
+		ICPPNamespace namespace2 = (ICPPNamespace) namespaces[0];
+
+		// Searching for "namespace2"
+		namespaces = pdom.findBindings(Pattern.compile("namespace2"), false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, namespaces.length);
+		assertTrue(namespaces[0] instanceof ICPPNamespace);
+		assertEquals(namespace2, namespaces[0]);
+			
+		/* Namespace references */
+		IName[] refs = pdom.findNames(namespace1,IIndex.FIND_REFERENCES);
+		assertEquals(3, refs.length);
+		IASTFileLocation loc = refs[0].getFileLocation();
+		assertEquals(offset("main.cpp","namespace1::Class1"), loc.getNodeOffset()); //character offset	
+		loc = refs[1].getFileLocation();
+		assertEquals(offset("Class1.cpp","namespace1::Class1::~Class1()"), loc.getNodeOffset()); //character offset	
+		loc = refs[2].getFileLocation();
+		assertEquals(offset("Class1.cpp","namespace1::Class1::Class1()"), loc.getNodeOffset()); //character offset	
+		
+		/* Namespace declaration */
+		IName[] decls = pdom.findNames(namespace1, IIndex.FIND_DECLARATIONS);
+		assertEquals(0, decls.length);
+
+		/* Namespace definition */
+		IName[] defs = pdom.findNames(namespace1, IIndex.FIND_DEFINITIONS);
+		assertEquals(1, defs.length);
+		loc = defs[0].getFileLocation();
+		assertEquals(offset("Class1.h","namespace namespace1") + 10, loc.getNodeOffset()); //character offset	
+
+	}
+
+	public void testClasses() throws Exception {
+		// Bugzilla 160913
+		// classes and nested classes
+
+		/* Search for "Class1" */
+		IBinding[] class1s = pdom.findBindings(Pattern.compile("Class1"), false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(4, class1s.length);
+		assertTrue(class1s[0] instanceof ICPPClassType);
+		assertTrue(class1s[1] instanceof ICPPClassType);
+		assertTrue(class1s[2] instanceof ICPPClassType);
+		assertTrue(class1s[3] instanceof ICPPMethod);
+
+		/** result #1 * */
+		ICPPClassType class1 = (ICPPClassType) class1s[0];
+		assertEquals("Class1", getBindingQualifiedName(pdom.getLinkageImpls()[0].adaptBinding(class1)));
+		IBinding[] methods = class1.getDeclaredMethods();
+		assertEquals(0, methods.length);
+
+		/** result #2 * */
+		ICPPClassType class2 = (ICPPClassType) class1s[1];
+		assertEquals("namespace1::Class1", getBindingQualifiedName(pdom.getLinkageImpls()[0].adaptBinding(class2)));
+
+		/* Members in this class */
+
+		// methods
+		methods = class2.getDeclaredMethods();
+		assertEquals(2, methods.length);
+		if (methods[0].getName().equals("~Class1")) {
+			IBinding h= methods[1]; methods[1]= methods[0]; methods[0]=h;
+		}
+		assertEquals("Class1", methods[0].getName());
+		assertEquals("~Class1", methods[1].getName());
+
+		// nested class
+		IBinding[] nested = class2.getNestedClasses();
+		assertEquals(1, nested.length);
+		assertEquals("Class2", nested[0].getName());
+
+		// fields
+		IBinding[] fields = class2.getFields();
+		assertEquals(2, fields.length);
+		Arrays.sort(fields, BINDING_COMPARATOR);
+		assertEquals("class1x", fields[0].getName());
+		assertEquals("class1y", fields[1].getName());
+
+		/** result #3 * */
+		ICPPMethod method3 = (ICPPMethod) class1s[3];
+		assertEquals("namespace1::Class1::Class1", getBindingQualifiedName(pdom.getLinkageImpls()[0].adaptBinding(method3)));
+		assertEquals(method3, methods[0]);
+
+		/** result #4 * */
+		ICPPClassType class4 = (ICPPClassType) class1s[2];
+		assertEquals("namespace1::namespace2::Class1", getBindingQualifiedName(pdom.getLinkageImpls()[0].adaptBinding(class4)));
+		methods = class4.getDeclaredMethods();
+		assertEquals(0, methods.length);
+
+		/* Search for "Class2" */
+		IBinding[] class2s = pdom.findBindings(Pattern.compile("Class2"), false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(4, class2s.length);
+		assertTrue(class2s[0] instanceof ICPPClassType);
+		assertTrue(class2s[1] instanceof ICPPClassType);
+		assertTrue(class2s[2] instanceof ICPPClassType);
+		assertTrue(class2s[3] instanceof ICPPMethod);
+
+		/** result #1 * */
+		ICPPClassType cls1 = (ICPPClassType) class2s[0];
+		assertEquals("Class2", getBindingQualifiedName(pdom.getLinkageImpls()[0].adaptBinding(cls1)));
+		methods = cls1.getDeclaredMethods();
+		assertEquals(3, methods.length);
+		Arrays.sort(methods, BINDING_COMPARATOR);
+		assertEquals("Class2", methods[0].getName());
+		assertEquals("~Class2", methods[2].getName());
+		assertEquals("foo", methods[1].getName());
+
+		/** result #2 * */
+		ICPPMethod meth2 = (ICPPMethod) class2s[3];
+		assertEquals("Class2::Class2", getBindingQualifiedName(pdom.getLinkageImpls()[0].adaptBinding(meth2)));
+		assertEquals(meth2, methods[0]);
+
+		/** result #3 * */
+		ICPPClassType cls3 = (ICPPClassType) class2s[1];
+		assertEquals("namespace1::Class1::Class2", getBindingQualifiedName(pdom.getLinkageImpls()[0].adaptBinding(cls3)));
+
+		/** result #3 * */
+		ICPPClassType cls4 = (ICPPClassType) class2s[2];
+		assertEquals("namespace1::Class2", getBindingQualifiedName(pdom.getLinkageImpls()[0].adaptBinding(cls4)));
+		
+		/* Nested class references - namespace1::Class1::Class2 */
+		IName[] refs = pdom.findNames(cls3, IIndex.FIND_REFERENCES);
+		assertEquals(0, refs.length);
+		
+		/* Nested class declaration */
+		IName[] decls = pdom.findNames(cls3, IIndex.FIND_DECLARATIONS);
+		assertEquals(0, decls.length);
+
+		/* Nested class definition */
+		IName[] defs = pdom.findNames(cls3, IIndex.FIND_DEFINITIONS);
+		assertEquals(1, defs.length);
+		IASTFileLocation loc = defs[0].getFileLocation();
+		assertEquals(offset("Class1.h","class Class2 { //namespace1::Class1::Class2") + 6, loc.getNodeOffset()); //character offset	
+	}
+
+	public void testFunction() throws Exception {
+
+		IBinding[] functions = pdom.findBindings(Pattern.compile("foo2"), false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, functions.length);
+		assertTrue(functions[0] instanceof ICPPFunction);
+		assertEquals("foo2", getBindingQualifiedName(pdom.getLinkageImpls()[0].adaptBinding(functions[0])));
+		
+		functions = pdom.findBindings(Pattern.compile("main"), false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, functions.length);
+		assertTrue(functions[0] instanceof ICPPFunction);
+		assertEquals("main", getBindingQualifiedName(pdom.getLinkageImpls()[0].adaptBinding(functions[0])));
+
+	}
+
+	public void testMethods() throws Exception {
+
+		IBinding[] methods = pdom.findBindings(Pattern.compile("~Class2"), false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, methods.length);
+		assertTrue(methods[0] instanceof ICPPMethod);
+		assertEquals("Class2::~Class2", getBindingQualifiedName(pdom.getLinkageImpls()[0].adaptBinding(methods[0])));
+
+	}
+
+	public void testFields() throws Exception {
+
+		IBinding[] fields = pdom.findBindings(Pattern.compile("class1x"), false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, fields.length);
+		assertTrue(fields[0] instanceof ICPPField);
+		assertEquals("namespace1::Class1::class1x", getBindingQualifiedName(pdom.getLinkageImpls()[0].adaptBinding(fields[0])));
+
+		fields = pdom.findBindings(Pattern.compile("class1y"), false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, fields.length);
+		assertTrue(fields[0] instanceof ICPPField);
+		assertEquals("namespace1::Class1::class1y", getBindingQualifiedName(pdom.getLinkageImpls()[0].adaptBinding(fields[0])));
+
+	}
+
+	public void testVariables() throws Exception {
+
+		IBinding[] variables = pdom.findBindings(Pattern.compile("var"), false, INDEX_FILTER, NULL_MONITOR);
+		assertEquals(1, variables.length);
+		assertTrue(variables[0] instanceof ICPPVariable);
+		assertEquals("var", getBindingQualifiedName(pdom.getLinkageImpls()[0].adaptBinding(variables[0])));
+		
+		/* Variable references */
+		IName[] refs = pdom.findNames(variables[0], IIndex.FIND_REFERENCES);
+		assertEquals(1, refs.length);
+		IASTFileLocation loc = refs[0].getFileLocation();
+		assertEquals(offset("main.cpp","var = 0;"), loc.getNodeOffset()); //character offset	
+		
+		/* Variable declaration */
+		IName[] decls = pdom.findNames(variables[0], IIndex.FIND_DECLARATIONS_DEFINITIONS);
+		assertEquals(1, decls.length);
+		loc = decls[0].getFileLocation();
+		assertEquals(offset("main.cpp","int var;") + 4, loc.getNodeOffset()); //character offset	
+
+		/* Variable definition */
+		IName[] defs = pdom.findNames(variables[0], IIndex.FIND_DEFINITIONS);
+		assertEquals(1, defs.length);
+		loc = defs[0].getFileLocation();
+		assertEquals(offset("main.cpp","int var;") + 4, loc.getNodeOffset()); //character offset	
+
+	}
+
+	/**
+	 * Get the fully qualified name for a given PDOMBinding
+	 * 
+	 * @param pdomBinding
+	 * @return binding's fully qualified name
+	 * @throws CoreException
+	 */
+	private String getBindingQualifiedName(PDOMBinding pdomBinding) throws CoreException {
+		StringBuffer buf = new StringBuffer(pdomBinding.getName());
+		PDOMNode parent = pdomBinding.getParentNode();
+		while (parent != null) {
+			if (parent instanceof PDOMBinding) {
+				buf.insert(0, ((PDOMBinding) parent).getName() + "::");
+			}
+			parent = parent.getParentNode();
+		}
+		return buf.toString();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMTestBase.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMTestBase.java
new file mode 100644
index 0000000..95380db
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMTestBase.java
@@ -0,0 +1,255 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *    QNX - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *    IBM Corporation
+ *    Symbian - Fix a race condition (157992)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IName;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.internal.core.Util;
+import org.eclipse.cdt.internal.core.index.IIndexFragment;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider;
+import org.eclipse.ui.wizards.datatransfer.ImportOperation;
+
+/** 
+ * @author Doug Schaefer
+ */
+public class PDOMTestBase extends BaseTestCase {
+
+	protected static final IProgressMonitor PROGRESS = new NullProgressMonitor();
+	static IPath rootPath = new Path("resources/pdomtests");
+	private String projectName= null;
+
+	protected ICProject createProject(String folderName) throws CoreException {
+		return createProject(folderName, false);
+	}
+	
+	protected ICProject createProject(String folderName, final boolean cpp) throws CoreException {
+		final ICProject cprojects[] = new ICProject[1];
+		ModelJoiner mj= new ModelJoiner();
+		try {
+			// Create the project
+			projectName = "ProjTest_" + System.currentTimeMillis();
+			final File rootDir = CTestPlugin.getDefault().getFileInPlugin(rootPath.append(folderName));
+			final IWorkspace workspace = ResourcesPlugin.getWorkspace();
+			workspace.run(new IWorkspaceRunnable() {
+				public void run(IProgressMonitor monitor) throws CoreException {
+					// Create the project
+					ICProject cproject= cpp ? CProjectHelper.createCCProject(projectName, null, IPDOMManager.ID_NO_INDEXER)
+							: CProjectHelper.createCProject(projectName, null, IPDOMManager.ID_NO_INDEXER);
+
+					// Import the files at the root
+					ImportOperation importOp = new ImportOperation(cproject.getProject().getFullPath(),
+							rootDir, FileSystemStructureProvider.INSTANCE, new IOverwriteQuery() {
+						public String queryOverwrite(String pathString) {
+							return IOverwriteQuery.ALL;
+						}
+					});
+					importOp.setCreateContainerStructure(false);
+					try {
+						importOp.run(monitor);
+					} catch (Exception e) {
+						throw new CoreException(new Status(IStatus.ERROR, CTestPlugin.PLUGIN_ID, 0, "Import Interrupted", e));
+					}
+
+					cprojects[0] = cproject;
+				}
+			}, null);
+			mj.join();
+			// Index the project
+			CCorePlugin.getIndexManager().setIndexerId(cprojects[0], IPDOMManager.ID_FAST_INDEXER);
+			// wait until the indexer is done
+			assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+		} finally {
+			mj.dispose();
+		}
+		return cprojects[0];
+	}
+
+	protected int offset(String projectRelativePath, String lookfor) throws Exception, CoreException {
+		Path path= new Path(projectName + "/" + projectRelativePath);
+		return TestSourceReader.indexOfInFile(lookfor, path);
+	}
+
+	protected IBinding[] findQualifiedName(PDOM pdom, String name) throws CoreException {
+		String[] segments = name.split("::");
+		Pattern[] pattern = new Pattern[segments.length];
+		for (int i = 0; i < segments.length; i++) {
+			pattern[i] = Pattern.compile(segments[i]);
+		}
+		return pdom.findBindings(pattern, true, IndexFilter.ALL_DECLARED, PROGRESS);
+	}
+	
+	protected IBinding[] findQualifiedPossiblyImplicit(PDOM pdom, String name) throws CoreException {
+		String[] segments = name.split("::");
+		Pattern[] pattern = new Pattern[segments.length];
+		for (int i = 0; i < segments.length; i++) {
+			pattern[i] = Pattern.compile(segments[i]);
+		}
+		return pdom.findBindings(pattern, true, IndexFilter.ALL, PROGRESS);
+	}
+
+	protected IBinding[] findUnqualifiedName(PDOM pdom, String name) throws CoreException {
+		String[] segments = name.split("::");
+		Pattern[] pattern = new Pattern[segments.length];
+		for (int i = 0; i < segments.length; i++) {
+			pattern[i] = Pattern.compile(segments[i]);
+		}
+		return pdom.findBindings(pattern, false, IndexFilter.ALL, PROGRESS);
+	}
+
+	/**
+	 * Convenience method for checking the number of PDOM references for a
+	 * particular name.
+	 */
+	protected void assertReferenceCount(PDOM pdom, String name, int count) throws CoreException {
+		assertNameCount(pdom, name, count, IIndexFragment.FIND_REFERENCES);
+	}
+
+	/**
+	 * Convenience method for checking the number of PDOM declarations for a
+	 * particular name.
+	 */
+	protected void assertDeclarationCount(PDOM pdom, String name, int count) throws CoreException {
+		assertNameCount(pdom, name, count, IIndexFragment.FIND_DECLARATIONS_DEFINITIONS);
+	}
+
+	/**
+	 * Convenience method for checking the number of PDOM definitions for a
+	 * particular name.
+	 */
+	protected void assertDefinitionCount(PDOM pdom, String name, int count) throws CoreException {
+		assertNameCount(pdom, name, count, IIndexFragment.FIND_DEFINITIONS);
+	}
+
+	private void assertNameCount(PDOM pdom, String name, int count, int options) throws CoreException {
+		IBinding[] bindings = findQualifiedName(pdom, name);
+		if (count > 0) {
+			assertEquals(1, bindings.length);
+		}
+		if (bindings.length > 0) {
+			IName[] names = pdom.findNames(bindings[0], options);
+			assertUniqueNameCount(names, count);
+		} else {
+			assertEquals(0, count);
+		}
+	}
+	
+	protected void assertNameCount(PDOM pdom, IBinding binding, int options, int count) throws CoreException {
+		IName[] names = pdom.findNames(binding, options);
+		assertUniqueNameCount(names, count);
+	}
+
+	/**
+	 * Convenience method for checking how many unique instances (i.e. same
+	 * offset within the same file) there are within an array of INames.
+	 */
+	private void assertUniqueNameCount(IName[] names, int count) {
+		Set offsets = new HashSet();
+		for (int i = 0; i < names.length; i++) {
+			offsets.add(names[i].getFileLocation());
+		}
+		assertEquals(count, offsets.size());
+	}
+
+	protected void assertType(PDOM pdom, String name, Class c) throws CoreException {
+		IBinding[] bindings = findQualifiedName(pdom, name);
+		assertEquals(1, bindings.length);
+		assertTrue(c.isAssignableFrom(bindings[0].getClass()));
+	}
+
+	protected void assertVisibility(PDOM pdom, String name, int visibility) throws CoreException, DOMException {
+		IBinding[] bindings = findQualifiedName(pdom, name);
+		assertEquals(1, bindings.length);
+		ICPPMember member = (ICPPMember) bindings[0];
+		assertEquals(visibility, member.getVisibility());
+	}
+
+
+
+	public static final void assertFunctionRefCount(PDOM pdom, Class[] args, IBinding[] bindingPool, int refCount) throws CoreException {
+		IBinding[] bindings = findIFunctions(args, bindingPool);
+		assertEquals(1, bindings.length);
+		IName[] refs = pdom.findNames(bindings[0], IIndex.FIND_REFERENCES);
+		assertEquals(refCount, refs.length);
+	}
+
+	// this is only approximate - composite types are not supported
+	public static IBinding[] findIFunctions(Class[] paramTypes, IBinding[] bindings) throws CoreException {
+		try {
+			List preresult = new ArrayList();
+			for(int i=0; i<bindings.length; i++) {
+				if(bindings[i] instanceof IFunction) {
+					IFunction function = (IFunction) bindings[i];
+					IType[] candidate = function.getType().getParameterTypes();
+					boolean areEqual = candidate.length == paramTypes.length;
+					for(int j=0; areEqual && j<paramTypes.length; j++) {
+						if(!paramTypes[j].isAssignableFrom(candidate[j].getClass())) {
+							areEqual = false;
+						}
+					}
+					if(areEqual) {
+						preresult.add(bindings[i]);
+					}
+				}
+			}
+			return (IBinding[]) preresult.toArray(new IBinding[preresult.size()]);
+		} catch(DOMException e) {
+			throw new CoreException(Util.createStatus(e));
+		}
+	}
+
+	protected void assertInstance(Object o, Class c) {
+		assertNotNull(o);
+		assertTrue("Expected "+c.getName()+" but got "+o.getClass().getName(), c.isInstance(o));
+	}
+	
+	public static Pattern[] makePatternArray(String[] args) {
+		List preresult = new ArrayList();
+		for(int i=0; i<args.length; i++) {
+			preresult.add(Pattern.compile(args[i]));
+		}
+		return (Pattern[]) preresult.toArray(new Pattern[preresult.size()]);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMTests.java
new file mode 100644
index 0000000..ec57bfb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMTests.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * QNX - Initial API and implementation
+ * IBM Corporation
+ * Andrew Ferguson (Symbian)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Doug Schaefer
+ *
+ */
+public class PDOMTests extends TestSuite {
+
+	public static Test suite() {
+		TestSuite suite = new PDOMTests();
+		
+		
+		suite.addTest(DBTest.suite());
+		suite.addTest(DBPropertiesTests.suite());
+		suite.addTest(PDOMCBugsTest.suite());
+		suite.addTest(PDOMCPPBugsTest.suite());
+		suite.addTest(PDOMSearchTest.suite());
+		suite.addTest(PDOMLocationTests.suite());
+		suite.addTest(PDOMProviderTests.suite());
+		suite.addTest(EnumerationTests.suite());
+		suite.addTest(ClassTests.suite());
+		suite.addTest(TypesTests.suite());
+		suite.addTest(IncludesTests.suite());
+		suite.addTest(OverloadsWithinSingleTUTests.suite());
+		suite.addTest(OverloadsWithinCommonHeaderTests.suite());
+		suite.addTest(BTreeTests.suite());
+		suite.addTest(FilesOnReindexTests.suite());		
+		suite.addTest(GeneratePDOMApplicationTest.suite());
+		
+		suite.addTest(CPPFieldTests.suite());
+		suite.addTest(CPPFunctionTests.suite());
+		suite.addTest(CPPVariableTests.suite());
+		suite.addTest(CPPClassTemplateTests.suite());
+		suite.addTest(CPPFunctionTemplateTests.suite());
+		suite.addTest(MethodTests.suite());
+		suite.addTest(NamespaceTests.suite());
+		
+		suite.addTest(CFunctionTests.suite());
+		suite.addTest(CVariableTests.suite());
+		suite.addTest(CCompositeTypeTests.suite());
+    
+		suite.addTest(DefDeclTests.suite());
+		
+		return suite;
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/RaceCondition157992Test.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/RaceCondition157992Test.java
new file mode 100644
index 0000000..37e1f7e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/RaceCondition157992Test.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * QNX - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
+ * Symbian - Repeatedly index classTests test project to detect a particular race condition
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.util.regex.Pattern;
+
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+
+/**
+ * Test case for a race condition from Bugzilla#157992
+ */
+public class RaceCondition157992Test extends PDOMTestBase {
+	public void testRepeatedly() throws Exception {
+		int successes = 0, noTrials = 100;
+		
+		for(int i=0; i<noTrials; i++) {
+			ICProject project = createProject("classTests");
+			PDOM pdom = (PDOM)CCoreInternals.getPDOMManager().getPDOM(project);
+			pdom.acquireReadLock();	
+
+			IBinding[] Bs = pdom.findBindings(Pattern.compile("B"), true, IndexFilter.ALL, new NullProgressMonitor());
+			if(Bs.length==1)
+				successes++;
+
+			pdom.releaseReadLock();
+		}
+		
+		String msg = "Same indexer on same project produces different results."
+			+ "Failure rate of "+(noTrials-successes)+" failures in "+noTrials+" tests";
+		assertTrue("Non-race-condition failure", successes!=0);
+		assertTrue(msg, successes == noTrials);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/TypesTests.java b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/TypesTests.java
new file mode 100644
index 0000000..621e7a4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/TypesTests.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * QNX - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.pdom.tests;
+
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.IName;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.ICompositeType;
+import org.eclipse.cdt.core.dom.ast.IField;
+import org.eclipse.cdt.core.dom.ast.ITypedef;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.pdom.PDOM;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * @author Doug Schaefer
+ *
+ */
+public class TypesTests extends PDOMTestBase {
+
+	protected PDOM pdom;
+
+	public static Test suite() {
+		return suite(TypesTests.class);
+	}
+
+	protected void setUp() throws Exception {
+		if (pdom == null) {
+			ICProject project = createProject("types");
+			pdom = (PDOM)CCoreInternals.getPDOMManager().getPDOM(project);
+		}
+		pdom.acquireReadLock();
+	}
+
+	protected void tearDown() throws Exception {
+		pdom.releaseReadLock();
+	}
+	
+	public void testC() throws Exception {
+		// Get the binding for A::f
+		IBinding [] CAs = pdom.findBindings(Pattern.compile("CA"), false, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(1, CAs.length);
+		ICompositeType CA = (ICompositeType)CAs[0];
+		IField [] CAfields = CA.getFields();
+		assertEquals(1, CAfields.length);
+		IField x = CAfields[0];
+		assertEquals("x", x.getName());
+		
+		// Make sure that there is a reference in g();
+		IName[] xRefs = pdom.findNames(x, IIndex.FIND_REFERENCES);
+		assertEquals(1, xRefs.length);
+		IASTFileLocation loc = xRefs[0].getFileLocation();
+		assertEquals(offset("typedef.c", "x->x") + 3, loc.getNodeOffset());
+	}
+
+	public void testCPP() throws Exception {
+		// Get the binding for A::f
+		IBinding [] As = pdom.findBindings(Pattern.compile("A"), true, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(1, As.length);
+		ICPPClassType A = (ICPPClassType)As[0];
+		ICPPMethod[] Amethods = A.getDeclaredMethods();
+		assertEquals(1, Amethods.length);
+		ICPPMethod f = Amethods[0];
+		assertEquals("f", f.getName());
+		
+		// Make sure that there is a reference in g();
+		IName[] fRefs = pdom.findNames(f, IIndex.FIND_REFERENCES);
+		assertEquals(1, fRefs.length);
+		IASTFileLocation loc = fRefs[0].getFileLocation();
+		assertEquals(offset("typedef.cpp", "x->f") + 3, loc.getNodeOffset());
+	}
+	
+	public void test145351() throws Exception {
+		IBinding [] bindings = pdom.findBindings(Pattern.compile("spinlock_t"), false, IndexFilter.ALL, new NullProgressMonitor());
+		assertEquals(1, bindings.length);
+		ITypedef spinlock_t = (ITypedef)bindings[0];
+		IName [] refs = pdom.findNames(spinlock_t, IIndex.FIND_REFERENCES);
+		assertEquals(1, refs.length);
+		IASTFileLocation loc = refs[0].getFileLocation();
+		assertEquals(offset("bug145351.c", "spinlock_t global_bh_lock"), loc.getNodeOffset());
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/plugin.xml b/results/plugins/org.eclipse.cdt.core.tests/plugin.xml
new file mode 100644
index 0000000..2ea4018
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/plugin.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+   <extension
+         id="TestProject"
+         name="C/C++ Test Project"
+         point="org.eclipse.cdt.core.CProject">
+      <cproject
+            class="org.eclipse.cdt.core.testplugin.TestProject">
+      </cproject>
+   </extension>
+   <extension
+         id="TestScanner"
+         name="C/C++ Test Scanner"
+         point="org.eclipse.cdt.core.ScannerInfoProvider">
+      <cextension>
+         <run
+               class="org.eclipse.cdt.core.testplugin.TestScannerProvider">
+         </run>
+      </cextension>
+   </extension>
+   <extension
+         id="FakeIndexer"
+         name="FakeIndexer"
+         point="org.eclipse.cdt.core.CIndexer">
+      <run
+            class="org.eclipse.cdt.internal.index.tests.FakeIndexer">
+      </run>
+   </extension>
+   <extension
+         point="org.eclipse.cdt.core.CIndex">
+      <ReadOnlyPDOMProvider
+            class="org.eclipse.cdt.core.internal.index.provider.test.Providers$Dummy1">
+      </ReadOnlyPDOMProvider>
+      <ExportProjectProvider
+            class="org.eclipse.cdt.internal.pdom.tests.GeneratePDOMApplicationTest$TestProjectProvider1">
+      </ExportProjectProvider>
+      <ExportProjectProvider
+            class="org.eclipse.cdt.internal.pdom.tests.GeneratePDOMApplicationTest$TestProjectProvider2">
+      </ExportProjectProvider>
+      <ExportProjectProvider
+            class="org.eclipse.cdt.internal.pdom.tests.GeneratePDOMApplicationTest$TestProjectProvider3">
+      </ExportProjectProvider>
+      <ExportProjectProvider
+            class="org.eclipse.cdt.internal.pdom.tests.GeneratePDOMApplicationTest$TestProjectProvider4">
+      </ExportProjectProvider>
+      <ExportProjectProvider
+            class="org.eclipse.cdt.internal.pdom.tests.GeneratePDOMApplicationTest$TestProjectProvider5">
+      </ExportProjectProvider>
+   </extension>
+   
+   <extension
+         point="org.eclipse.cdt.core.CConfigurationDataProvider"
+         id="testCfgDataProvider">
+      <provider
+            class="org.eclipse.cdt.core.settings.model.TestCfgDataProvider">
+      </provider>
+   </extension>
+   
+   <extension
+         point="org.eclipse.cdt.core.CConfigurationDataProvider"
+         id="testUserAndDiscoveredCfgDataProvider">
+      <provider
+            class="org.eclipse.cdt.core.settings.model.TestUserAndDiscoveredEntriesCfgDataProvider">
+      </provider>
+   </extension>
+   
+   <extension
+         id="testExtSettingsProvider"
+         name="name"
+         point="org.eclipse.cdt.core.externalSettingsProvider">
+         <provider
+         	class="org.eclipse.cdt.core.settings.model.TestExtSettingsProvider">
+         </provider>
+   </extension>
+   
+   <extension
+         point="org.eclipse.cdt.core.templates">
+      <template
+            id="org.eclipse.cdt.core.tests.templates.AddFile"
+            filterPattern=".*AddFile"
+            isCategory="true"
+            location="resources/templateengine/AddFile.xml"
+            projectType="org.eclipse.cdt.core.tests.projectType">
+      </template>
+      <template
+            id="org.eclipse.cdt.core.tests.templates.AddFiles"
+            filterPattern=".*AddFiles"
+            location="resources/templateengine/AddFiles.xml"
+            projectType="org.eclipse.cdt.core.tests.projectType">
+         <toolChain id="org.eclipse.cdt.core.tests.toolChain1"/>
+         <toolChain id="org.eclipse.cdt.core.tests.toolChain2"/>
+      </template>
+      <template
+            id="org.eclipse.cdt.core.tests.templates.AddLink"
+            filterPattern=".*AddLink"
+            location="resources/templateengine/AddLink.xml"
+            projectType="org.eclipse.cdt.core.tests.projectType">
+      </template>
+      <template
+            id="org.eclipse.cdt.core.tests.templates.Append"
+            filterPattern=".*Append"
+            location="resources/templateengine/Append.xml"
+            projectType="org.eclipse.cdt.core.tests.projectType"/>
+      <template
+            id="org.eclipse.cdt.core.tests.templates.AppendCreate"
+            filterPattern=".*AppendCreate"
+            location="resources/templateengine/AppendCreate.xml"
+            projectType="org.eclipse.cdt.core.tests.projectType"/>
+      <template
+            id="org.eclipse.cdt.core.tests.templates.Copy"
+            filterPattern=".*Copy"
+            location="resources/templateengine/Copy.xml"
+            projectType="org.eclipse.cdt.core.tests.projectType"/>
+      <template
+            id="org.eclipse.cdt.core.tests.templates.CreateResourceIdentifier"
+            filterPattern=".*CreateResourceIdentifier"
+            location="resources/templateengine/CreateResourceIdentifier.xml"
+            projectType="org.eclipse.cdt.core.tests.projectType"/>
+      <template
+            id="org.eclipse.cdt.core.tests.templates.CreateSourceFolder"
+            filterPattern=".*CreateSourceFolder"
+            location="resources/templateengine/CreateSourceFolder.xml"
+            projectType="org.eclipse.cdt.core.tests.projectType"/>
+   </extension>
+   <extension
+         point="org.eclipse.cdt.core.templateAssociations">
+      <template
+            id="org.eclipse.cdt.core.tests.templates.AddFile">
+         <toolChain id="org.eclipse.cdt.core.tests.toolChain3"/>
+         <toolChain id="org.eclipse.cdt.core.tests.toolChain4"/>
+      </template>
+      <template
+            id="org.eclipse.cdt.core.tests.templates.AddFiles">
+         <toolChain id="org.eclipse.cdt.core.tests.toolChain5"/>
+         <toolChain id="org.eclipse.cdt.core.tests.toolChain6"/>
+      </template>
+   </extension>
+   <extension point="org.eclipse.cdt.core.CIndex">
+      <ReadOnlyPDOMProvider
+            class="org.eclipse.cdt.core.internal.index.provider.test.Providers$Dummy2">
+      </ReadOnlyPDOMProvider>
+      <ReadOnlyPDOMProvider
+            class="org.eclipse.cdt.core.internal.index.provider.test.Providers$Dummy3">
+      </ReadOnlyPDOMProvider>
+      <ReadOnlyPDOMProvider
+            class="org.eclipse.cdt.core.internal.index.provider.test.Providers$Dummy4">
+      </ReadOnlyPDOMProvider>
+      <ReadOnlyPDOMProvider
+            class="org.eclipse.cdt.core.internal.index.provider.test.Providers$Dummy5">
+      </ReadOnlyPDOMProvider>
+   </extension>
+   <extension
+         point="org.eclipse.core.filesystem.filesystems">
+      <filesystem
+            scheme="mem">
+         <run
+               class="org.eclipse.cdt.core.internal.tests.filesystem.ram.MemoryFileSystem">
+         </run>
+      </filesystem>
+   </extension>
+</plugin>
diff --git a/results/plugins/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/BaseTestFramework.java b/results/plugins/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/BaseTestFramework.java
new file mode 100644
index 0000000..ce9d176
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/BaseTestFramework.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+
+/*
+ * Created on Oct 4, 2004
+ */
+package org.eclipse.cdt.core.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.FileManager;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ * @author aniefer
+ */
+abstract public class BaseTestFramework extends TestCase {
+    static protected NullProgressMonitor	monitor;
+    static protected IWorkspace 			workspace;
+    static protected IProject 				project;
+    static protected ICProject				cproject;
+    static protected FileManager 			fileManager;
+	static protected boolean				indexDisabled=false;
+	
+	static void initProject() {
+		if (project != null) {
+			return;
+		}
+        if( CCorePlugin.getDefault() != null && CCorePlugin.getDefault().getCoreModel() != null){
+			//(CCorePlugin.getDefault().getCoreModel().getIndexManager()).reset();
+			monitor = new NullProgressMonitor();
+			
+			workspace = ResourcesPlugin.getWorkspace();
+			
+	        try {
+	            cproject = CProjectHelper.createCCProject("RegressionTestProject", "bin", IPDOMManager.ID_NO_INDEXER); //$NON-NLS-1$ //$NON-NLS-2$
+	        
+	            project = cproject.getProject();
+	            
+	            /*project.setSessionProperty(SourceIndexer.activationKey, Boolean.FALSE );
+	        	//Set the id of the source indexer extension point as a session property to allow
+	    		//index manager to instantiate it
+	    		project.setSessionProperty(IndexManager.indexerIDKey, sourceIndexerID);*/
+	    		
+	 
+	    		
+	        } catch ( CoreException e ) {
+	            /*boo*/
+	        }
+			if (project == null)
+				fail("Unable to create project"); //$NON-NLS-1$
+	
+			//Create file manager
+			fileManager = new FileManager();
+        }
+	}
+            
+    public BaseTestFramework()
+    {
+        super();
+    }
+    /**
+     * @param name
+     */
+    public BaseTestFramework(String name)
+    {
+        super(name);
+    }
+      
+    public void cleanupProject() throws Exception {
+        try{
+	        project.delete( true, false, monitor );
+	    } catch( Throwable e ){
+	        /*boo*/
+	    } finally {
+	    	project= null;
+	    }
+    }
+    
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		initProject();
+	}
+
+	protected void tearDown() throws Exception {
+        if( project == null || !project.exists() )
+            return;
+        
+        IResource [] members = project.members();
+        for( int i = 0; i < members.length; i++ ){
+            if( members[i].getName().equals( ".project" ) || members[i].getName().equals( ".cproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
+                continue;
+            if (members[i].getName().equals(".settings"))
+            	continue;
+            try{
+                members[i].delete( false, monitor );
+            } catch( Throwable e ){
+                /*boo*/
+            }
+        }
+	}
+    protected IFile importFile(String fileName, String contents ) throws Exception{
+		//Obtain file handle
+		IFile file = project.getProject().getFile(fileName);
+		
+		InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+		//Create file input stream
+		if( file.exists() )
+		    file.setContents( stream, false, false, monitor );
+		else
+			file.create( stream, false, monitor );
+		
+		fileManager.addFile(file);
+		
+		return file;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/FailingTest.java b/results/plugins/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/FailingTest.java
new file mode 100644
index 0000000..78f46d6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/regression/org/eclipse/cdt/core/tests/FailingTest.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+
+/*
+ * Created on Nov 1, 2004
+ */
+package org.eclipse.cdt.core.tests;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.TestCase;
+import junit.framework.TestFailure;
+import junit.framework.TestResult;
+
+
+/**
+ * Wraps a test case to check for its failure.
+ * @author aniefer
+ */
+public class FailingTest extends TestCase {
+    private TestCase test = null;
+    private int bugNum = -1;
+    
+    public FailingTest( TestCase test, int bugNumber ){
+        this.test = test;
+        this.bugNum = bugNumber;
+        String name= "Failing " + test.getName();
+        if (bugNum > 0) {
+        	name += " [bug " + bugNum + "]";
+        }
+        setName(name);
+    }
+    
+    public FailingTest( TestCase test ){
+        this(test, -1);
+    }
+    /* (non-Javadoc)
+     * @see junit.framework.Test#run(junit.framework.TestResult)
+     */
+    public void run( TestResult result ) {
+        result.startTest( this );
+        
+        TestResult r = new TestResult();
+        test.run( r );
+        if (r.failureCount() == 1) {
+        	TestFailure failure= (TestFailure) r.failures().nextElement();
+        	String msg= failure.exceptionMessage();
+        	if (msg != null && msg.startsWith("Method \"" + test.getName() + "\"")) {
+        		result.addFailure(this, new AssertionFailedError(msg));
+        	}
+        }
+        else if( r.errorCount() == 0 && r.failureCount() == 0 )
+        {
+            String err = "Unexpected success"; //$NON-NLS-1$
+            if( bugNum != -1 )
+                err += ", bug #" + bugNum; //$NON-NLS-1$
+            result.addFailure( this, new AssertionFailedError( err ) );
+        }
+        
+        result.endTest( this );
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/asmTests/AsmTest.S b/results/plugins/org.eclipse.cdt.core.tests/resources/asmTests/AsmTest.S
new file mode 100644
index 0000000..01b74f0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/asmTests/AsmTest.S
@@ -0,0 +1,65 @@
+/*
+ * AsmTest.S
+ */
+
+#include <include1.h>
+#include "include2.h"
+
+	.globl globalLabel1
+	.global globalLabel2, globalLabel3
+
+nonGlobalLabel:
+	nop
+	ret   @ arm style comment
+/* end */
+
+globalLabel1:
+	movl    %esp, %eax
+	movl    %eax, storage
+otherLabel1:
+	movb	$0x81, %ah  # end-of-line comment
+	jmp	globalLabel2
+
+; data	
+storage:
+	.long 0
+/* end */
+
+#define MACRO mmm
+
+	/*
+	 * block comment
+	 */	
+globalLabel2:
+	movl    %esp, %eax
+	movl    %eax, storage
+
+; line comment
+
+otherLabel2:
+	movb	$0x81, %ah  ; end-of-line comment
+	jmp	globalLabel3    # comment
+/* end */
+
+globalLabel3:
+	movl    %esp, %eax
+	movl    %eax, storage
+	
+otherLabel3:
+	movb	$0x81, %ah
+	jmp	globalLabel3
+	nop
+/* end */
+
+	.global alloca
+alloca:
+	popl %edx
+	popl %eax
+	addl $3,%eax
+	andl $0xfffffffc,%eax
+	subl %eax,%esp
+	movl %esp,%eax
+	pushl %eax
+	pushl %edx
+	ret
+/* end */
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/cfiles/CModelElementsTestStart.h b/results/plugins/org.eclipse.cdt.core.tests/resources/cfiles/CModelElementsTestStart.h
new file mode 100644
index 0000000..45bfd1f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/cfiles/CModelElementsTestStart.h
@@ -0,0 +1,141 @@
+// include
+#include "included.h"
+
+// macro
+#define PRINT(string,msg)  printf(string, msg)
+
+//namespace
+namespace MyPackage
+{
+	// check class
+	// class
+	class Hello
+	{
+	// protected visibility
+	protected:
+		// field
+		int x;
+		// method
+		inline void setX(int X)
+		{
+			x = X;
+		};
+		// check nested pachage
+		// nested namespace
+		namespace MyNestedPackage {
+			// check parent nested class
+			// nested class
+			class Y
+			{	// public visibility
+				public:
+				// constructor
+				Y();
+				//  virtual destructor
+				virtual ~Y();
+			};
+			// check derived nested class
+			// derived class
+			class X : public Y {
+					// private visibility
+					private:
+					// private field
+					B b;
+			        
+					public:
+					// constructor chain
+					X(int x) : Y(x) {
+							cout << "In consturctor\n";
+					}
+			        // method declaration 
+					int doNothing();
+			};
+		}
+	};
+
+	// check enums
+	// enum without name
+	enum { 
+		first = 1, 
+		second, 
+		third 
+	}
+	;
+	// enum with name
+	enum MyEnum { 
+		f, 
+		s, 
+		t };
+
+	// check variables
+	// variable 
+	int v;
+	// unsigned long variable
+	unsigned long vuLong;
+	// unsigned short variable
+	unsigned short vuShort;
+
+	// check variable declarations
+	// variable declaration 
+	extern int evar;
+	// function pointer
+	static void * (*orig_malloc_hook)(const char *file, int line, size_t size);
+
+	// check functions
+	// simple function declaration
+	void foo();
+	// function declaration with parameters
+	char* foo(int& x, 
+		char**y);
+	// simple function definition
+	void boo(){
+		int g = 0;
+	};
+	// check Structs
+	// struct 
+	struct MyStruct{
+		int sint;
+	};
+	// typedef and elaborated types
+	typedef struct MyStruct myStruct;
+	// typedef 
+	typedef struct{ 
+		int ss; 
+	} myTypedef;
+	// unions
+	union U{
+		int U1;
+	};
+
+
+	// check templates
+	// template function
+	template<class A, typename B=C> 
+	A aTemplatedFunction( B bInstance );
+	// template method
+	class enclosing {
+		// public visibility
+		public:
+		template<class A, typename B=C> 
+		A aTemplatedMethod( B bInstance );
+	};
+	// template class
+	template<class T, typename Tibor = junk> 
+	class myarray { /* */ };
+	// template struct
+	template<class T, typename Tibor = junk> 
+	struct mystruct { /* */ };
+	// template variable
+//	template <bool __threads, int __inst>
+//	char* default_alloc_template<__threads, __inst>::_S_start_free = 0;
+};
+	// check arrays
+	// arrays
+	int myArray [5][];
+	int main(int argc, char * argv[]) 
+	{ 
+	}
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=180815
+struct bug180815 {
+	int i,j;
+} bug180815_var0, bug180815_var1;
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/cfiles/TranslationUnits.c b/results/plugins/org.eclipse.cdt.core.tests/resources/cfiles/TranslationUnits.c
new file mode 100644
index 0000000..d5b78ac
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/cfiles/TranslationUnits.c
@@ -0,0 +1,70 @@
+/*
+ * (c) Copyright QNX Software Systems Ltd. 2002.
+ * All Rights Reserved.
+ */
+/********
+ * This is a sample C file that will be used in testing the TranslationUnit
+ * class.  It has a specific structure that will be looked for within the 
+ * test case.
+ * This file is only ment to contain various C elements, and may not compile
+ * into a running application (but should be valid C)
+ */
+ 
+#include <stdio.h>
+#include <unistd.h>
+
+/* A function prototype */
+int func2p(void); 
+
+/* A global variable */
+int globalvar;
+
+/* A enumeration */
+enum myenum {ENUM_A=1, ENUM_B=2, ENUM_C=3, ENUM_D=4};
+
+/* A structure. This also includes a typedef around the strcture def
+ * which at the time of writing was not picked up.
+ */
+typedef struct mystruct {
+	int a;
+	char b;
+	long c;
+} mystruct_t; 
+
+/* A union */
+union myunion {
+	int x;
+	char y;
+	long z;
+};
+
+/* A typedef */
+typedef struct mystruct mytype;
+
+
+/* A couple functions */
+ 
+void * func1(void)
+{
+	return(NULL);
+}
+
+
+int func2(void)
+{
+	return(0);
+}
+ 
+int main(int argc, char ** argv)
+{
+	int var1;
+	printf("Hello world\n");
+}
+
+
+void func3()
+{
+	printf("This is not really here\n");
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/cfiles/WorkingCopyTestStart.h b/results/plugins/org.eclipse.cdt.core.tests/resources/cfiles/WorkingCopyTestStart.h
new file mode 100644
index 0000000..10b222c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/cfiles/WorkingCopyTestStart.h
@@ -0,0 +1,2 @@
+#include <stdio.h>
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/cfiles/included.h b/results/plugins/org.eclipse.cdt.core.tests/resources/cfiles/included.h
new file mode 100644
index 0000000..b5b6d36
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/cfiles/included.h
@@ -0,0 +1,10 @@
+#define size_t int
+class A;
+
+class B;
+
+class C;
+
+class T;
+
+class junk;
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/CModelBuilderInactiveCodeTest.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/CModelBuilderInactiveCodeTest.cpp
new file mode 100644
index 0000000..a3f2692
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/CModelBuilderInactiveCodeTest.cpp
@@ -0,0 +1,5 @@
+#if 0
+#include "include"
+#define MACRO1 1
+#define MACRO2(x, y) x+y
+#endif
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/CModelBuilderTest.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/CModelBuilderTest.cpp
new file mode 100644
index 0000000..de588d4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/CModelBuilderTest.cpp
@@ -0,0 +1,19 @@
+class Test {
+   void Test::inlined() {};  // wrong label in outline: Test::inlined(): void
+   void Test::decl();        // label in outline (ok):  decl(): void
+};
+namespace nsTest {
+   void nsTest::inlined() {};  // wrong label in outline: nsTest::inlined(): void
+   void nsTest::decl();        // label in outline (ok):  decl(): void
+}
+namespace nsTest {
+   void nsTest::inlined2() {};  // wrong label in outline: nsTest::inlined(): void
+   void nsTest::decl2();        // label in outline (ok):  decl(): void
+}
+//http://bugs.eclipse.org/262785
+void Unknown1::method() {}      // no qualifier in outline
+void Unknown2::method() {}      // no qualifier in outline
+class Bug274490 {
+    virtual int m();
+    inline const char* m2() const;
+};
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/DeclaratorsTests.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/DeclaratorsTests.cpp
new file mode 100644
index 0000000..f0d2c7e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/DeclaratorsTests.cpp
@@ -0,0 +1,24 @@
+void decl_0001(char);
+void (decl_0002)(char);
+void ((decl_0003))(char);
+
+void *decl_0004(char);
+void (*decl_0005)(char);
+void (*(decl_0006))(char);
+void ((*decl_0007))(char);
+
+typedef void decl_0011(char);
+typedef void (decl_0012)(char);
+typedef void ((decl_0013))(char);
+
+typedef void *decl_0014(char);
+typedef void (*decl_0015)(char);
+typedef void (*(decl_0016))(char);
+typedef void ((*decl_0017))(char);
+
+typedef void decl_0021(char);
+void (*decl_0022)(char);
+void (*(*decl_0023(int a)))(char) { return &decl_0021; }
+void (*(*(*((decl_0024)))(int))(float))(char);
+
+int (*decl_0031)(char(*yyy)(bool));
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/IIncludeTest.h b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/IIncludeTest.h
new file mode 100644
index 0000000..04b6e41
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/IIncludeTest.h
@@ -0,0 +1,42 @@
+// include
+#include <stdio.h>
+#include "whatever.h"
+#include <src/slash.h>
+#include <src\backslash.h>
+#include "Program Files/space.h"
+#include "../up1dir.h"
+#include "./samedir.h"
+#include "different_extension1.hpp"
+#include "different_extension2.hh"
+#include "different_extension3.x"
+#include <no_extension>
+# include "whitespace_after_hash"
+	 #include "whitespace_before_hash"
+
+// failure cases:
+#include garbage
+#include "resync_after_bad_parse_1"
+#include
+#include "resync_after_bad_parse_2"
+#include "one" "two" "three"
+#include "resync_after_bad_parse_3"
+
+// from the Spec:
+
+// from [C, 6.10.p8]
+// should fail
+#define EMPTY
+EMPTY #include "invalid.h"
+
+// from [C, 6.10.2.p8]:
+// should equal #include "myInclude1.h"
+#define MYINCFILE "myInclude1.h"
+#include MYINCFILE
+
+// from [C, 6.10.3.5.p6]:
+// should equal #include "vers2.h"
+#define INCFILE(x) vers ## x
+#define xstr(x) str(x)
+#define str(x) #x
+#include xstr(INCFILE(2).h)
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/IMacroTest.h b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/IMacroTest.h
new file mode 100644
index 0000000..a5bf320
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/IMacroTest.h
@@ -0,0 +1,4 @@
+// macro
+#define SINGLETON
+#define NUMBER 1
+#define PRINT(string,msg)  printf(string, msg)
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/IStructure.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/IStructure.cpp
new file mode 100644
index 0000000..6b7e80e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/IStructure.cpp
@@ -0,0 +1,90 @@
+// IStructure
+struct testStruct1 {
+	char m_field1;
+	char* m_field2;
+	unsigned char m_field3;
+	int m_field4;
+	unsigned m_field5;
+	void* m_field6;
+	
+	void method1();
+	struct testStruct1 method2( char* in_field2, int in_field4 ) {}
+	// this is very C++:
+	testStruct1( char* in_field2, int in_field4 ) {}
+	~testStruct1() {}
+};
+
+struct testStruct2 {
+};
+
+struct testStruct3 {
+} aTestStruct3;
+
+// no semicolon, parser should recover
+struct testStruct4NoSemicolon {
+}
+
+// forward declaration
+struct testStruct5;
+
+// variable declaration using predefined struct.
+struct testStruct6 aTestStruct6;
+
+struct {
+	int x;
+} testAnonymousStructObject1;
+
+struct {
+	int x;
+} testAnonymousStructObject2= {1};
+
+// to resync the parser if necessary
+struct testStruct7 {
+};
+
+// an inner struct
+struct testStruct8 {
+	struct testStruct9Inner {
+		int x;
+	};
+	struct testStruct10Inner {
+		int y;
+		struct testStruct11Inner {
+			int z;
+		};
+	};
+};
+
+union testUnion1 {
+	char m_field1;
+	char* m_field2;
+	unsigned char m_field3;
+	int m_field4;
+	unsigned m_field5;
+	void* m_field6;	
+};
+
+class testClass1 {
+};
+
+class testClass2NoSemicolon {
+}
+
+class catchTheSyntaxError;
+
+class testClass3 {
+};
+
+class testClass4Abstract {
+	void aNonVirtual();
+	virtual void aVirtual();
+	virtual void aPureVirtual()=0;
+};
+
+class testClass5
+: public testClass1, protected testClass3, private testClass4Abstract {
+};
+
+// to resync the parser if necessary
+class testClass6 {
+};
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/ITemplate.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/ITemplate.cpp
new file mode 100644
index 0000000..9874a1f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/ITemplate.cpp
@@ -0,0 +1,72 @@
+class Key;
+class Value;
+class SortAlgorithm;
+class DefaultSort;
+class T;
+class X;
+class Y;
+class Bar;
+class Foo {
+	template<class Bar> void fum(int i);
+};
+
+// TEMPLATE_STRUCT
+template<class Key, class Value, class SortAlgorithm=DefaultSort>
+struct Map
+{
+	Key* keys;
+	Value* values;
+	SortAlgorithm* sortAlgorithm;
+	Map();
+};
+
+// TEMPLATE_CLASS
+template<class T> class nonVector {
+	private:
+	T* head;
+	
+	public:
+	nonVector() { head =new T(); }
+	int length() { return 1; }
+	const T& first();
+};
+
+// TEMPLATE_UNION
+template<class X, class Y, int size=16>
+union ArrayOverlay {
+	public:
+	X x[size];
+	Y y[size];
+	
+	static int<X,Y> numArrays;
+};
+
+
+// TEMPLATE_METHODS
+class TemplateContainer {
+	// these are in an enclosing class
+	template<class Bar> void fum(int i);
+	template<int> void scrum(void) {};
+};
+
+// TEMPLATE_FUNCTION
+template<class T> const T& nonVector<T>::first() const
+{
+	return *head;
+}
+
+template<class X> bool IsGreaterThan(X,X);
+
+template<class Bar> void Foo::fum(int i) {}
+
+// TEMPLATE_VARIABLES
+template <bool threads, int inst> char* default_alloc_template<threads, inst>::S_start_free = 0;
+
+// an instantiation, not a template:
+complex<float> cf(0,0);
+//template<class Language, class CharacterSet, class SortAlgorithm<CharacterSet> >
+//Dictionary* TheSpellCheckDictionary;
+
+int success;
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/MacroTests.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/MacroTests.cpp
new file mode 100644
index 0000000..0170aff
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/cmodel/MacroTests.cpp
@@ -0,0 +1,24 @@
+#define Z struct
+#define X Z
+#define Y SomeName
+
+X Y
+{
+    
+};
+
+
+X{
+};
+
+int A :: BCD = 1;
+
+#define DEFA B
+#define DB(  x  )    x
+
+int DEFA    ::   DB(Y) = 1;
+
+#define PINT const int *
+
+PINT myPINT; 
+PINT foobar( void );
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest.cpp
new file mode 100644
index 0000000..828a3ac
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest.cpp
@@ -0,0 +1,8 @@
+#include "DepTest.h"
+#include "d.h"
+
+DepTest::DepTest()
+{};
+DepTest::~DepTest()
+{};
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest.h b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest.h
new file mode 100644
index 0000000..c008086
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest.h
@@ -0,0 +1,8 @@
+#include "Inc1.h"
+#include "a.h"
+class DepTest{
+public:
+
+	DepTest();
+	~DepTest();
+};
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest2.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest2.cpp
new file mode 100644
index 0000000..6f3000e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest2.cpp
@@ -0,0 +1,8 @@
+#include "DepTest2.h"
+#include "d.h"
+
+DepTest2::DepTest2()
+{};
+DepTest2::~DepTest2()
+{};
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest2.h b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest2.h
new file mode 100644
index 0000000..6f084a6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest2.h
@@ -0,0 +1,8 @@
+#include "d.h"
+
+class DepTest2{
+public:
+
+	DepTest2();
+	~DepTest2();
+};
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest3.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest3.cpp
new file mode 100644
index 0000000..cc0d9ba
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest3.cpp
@@ -0,0 +1,7 @@
+#include "DepTest3.h"
+
+DepTest3::DepTest3()
+{};
+DepTest3::~DepTest3()
+{};
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest3.h b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest3.h
new file mode 100644
index 0000000..b4b47ce
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/DepTest3.h
@@ -0,0 +1,8 @@
+#include "a.h"
+
+class DepTest3{
+public:
+
+	DepTest3();
+	~DepTest3();
+};
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/Inc1.h b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/Inc1.h
new file mode 100644
index 0000000..7bfbe59
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/Inc1.h
@@ -0,0 +1,8 @@
+#include "c.h"
+
+class X
+{
+	public:
+		X(){};
+		~X(){};
+};
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/a.h b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/a.h
new file mode 100644
index 0000000..3c66f94
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/a.h
@@ -0,0 +1,8 @@
+#include "c.h"
+
+class Z
+{
+	public:
+		Z(){};
+	   ~Z(){};
+};
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/c.h b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/c.h
new file mode 100644
index 0000000..bc82542
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/c.h
@@ -0,0 +1,6 @@
+class Y
+{
+	public:
+		Y(){};
+		~Y(){};
+};
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/d.h b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/d.h
new file mode 100644
index 0000000..8dcf01a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/dependency/d.h
@@ -0,0 +1,6 @@
+class d
+{
+	public:
+		d(){};
+		~d(){};
+};
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/errortests/output-1 b/results/plugins/org.eclipse.cdt.core.tests/resources/errortests/output-1
new file mode 100644
index 0000000..e2a372a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/errortests/output-1
@@ -0,0 +1,443 @@
+make -k CPULIST=x86 DEBUG=-g 
+make -j 1 -C1 -fMakefile  
+make[1]: Entering directory `C:/testqde/workspace/lib/c/1'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/1/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/1/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/1/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/1/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/1/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/1/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/1'
+make -j 1 -C1a -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/1a'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/1a/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/1a/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/1a/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/1a/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/1a/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/1a/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/1a'
+make -j 1 -C1b -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/1b'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/1b/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/1b/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/1b/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/1b/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/1b/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/1b/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/1b'
+make -j 1 -C1c -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/1c'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/1c/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/1c/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/1c/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/1c/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/1c/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/1c/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/1c'
+make -j 1 -C1d -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/1d'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/1d/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/1d/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/1d/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/1d/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/1d/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/1d/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/1d'
+make -j 1 -C1g -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/1g'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/1g/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/1g/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/1g/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/1g/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/1g/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/1g/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/1g'
+make -j 1 -C1j -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/1j'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/1j/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/1j/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/1j/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/1j/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/1j/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/1j/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/1j'
+make -j 1 -Calloc -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/alloc'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/alloc/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/alloc/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/alloc/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/alloc/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/alloc/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/alloc/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/alloc'
+make -j 1 -Cansi -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/ansi'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/ansi/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/ansi/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/ansi/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/ansi/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/ansi/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/ansi/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/ansi'
+make -j 1 -Catomic -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/atomic'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/atomic/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/atomic/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/atomic/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/atomic/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/atomic/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/atomic/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/atomic'
+make -j 1 -Cdispatch -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/dispatch'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/dispatch/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/dispatch/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/dispatch/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/dispatch/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/dispatch/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/dispatch/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/dispatch'
+make -j 1 -Ciofunc -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/iofunc'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/iofunc/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/iofunc/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/iofunc/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/iofunc/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/iofunc/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/iofunc/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/iofunc'
+make -j 1 -Ckercalls -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/kercalls'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/kercalls/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/kercalls/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/kercalls/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/kercalls/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/kercalls/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/kercalls/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/kercalls'
+make -j 1 -Ckercover -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/kercover'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/kercover/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/kercover/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/kercover/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/kercover/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/kercover/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/kercover/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/kercover'
+make -j 1 -Cldd -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/ldd'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/ldd/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/ldd/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/ldd/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/ldd/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/ldd/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/ldd/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/ldd'
+make -j 1 -Cmisc -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/misc'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/misc/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/misc/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/misc/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/misc/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/misc/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/misc/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/misc'
+make -j 1 -Cprof -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/prof'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/prof/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/prof/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/prof/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/prof/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/prof/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/prof/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/prof'
+make -j 1 -Cqnx -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/qnx'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/qnx/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/qnx/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/qnx/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/qnx/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/qnx/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/qnx/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/qnx'
+make -j 1 -Cresmgr -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/resmgr'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/resmgr/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/resmgr/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/resmgr/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/resmgr/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/resmgr/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/resmgr/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/resmgr'
+make -j 1 -Cservices -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/services'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/services/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/services/x86/a'
+C:/QNX630/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -g -O  -O2        -D_LIBC_SO_VERSION=2 -D_LIBCPP_SO_VERSION=2 -D_LIBM_SO_VERSION=2   -I. -IC:/testqde/workspace/lib/c/services/x86/a -IC:/testqde/workspace/lib/c/services/x86 -IC:/testqde/workspace/lib/c/services -IC:/testqde/workspace/lib/c -IC:/testqde/workspace/lib/c/inc -IC:/testqde/workspace/lib/c/../../services/system/public -IC:/testqde/workspace/lib/c/../m/public -IC:/testqde/workspace/lib/c/../m/inc -IC:/testqde/workspace/lib/c/../pm/public -IC:/testqde/workspace/lib/c/../../services/registry/public -IC:/testqde/workspace/lib/c/public -IC:/QNX630/target/qnx6/usr/include -g          -DVARIANT_a -DVARIANT_services  C:/testqde/workspace/lib/c/services/registry.c 
+C:/testqde/workspace/lib/c/services/registry.c:25: sys/registry.h: No such file or directory
+cc: C:/QNX630/host/win32/x86/usr/lib/gcc-lib/ntox86/2.95.3/cpp0 caught signal 33
+make[3]: *** [registry.o] Error 1
+make[3]: Target `first' not remade because of errors.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/services/x86/a'
+make[2]: [all] Error 2 (ignored)
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/services/x86/so'
+C:/QNX630/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -g -O  -O2        -D_LIBC_SO_VERSION=2 -D_LIBCPP_SO_VERSION=2 -D_LIBM_SO_VERSION=2   -I. -IC:/testqde/workspace/lib/c/services/x86/so -IC:/testqde/workspace/lib/c/services/x86 -IC:/testqde/workspace/lib/c/services -IC:/testqde/workspace/lib/c -IC:/testqde/workspace/lib/c/inc -IC:/testqde/workspace/lib/c/../../services/system/public -IC:/testqde/workspace/lib/c/../m/public -IC:/testqde/workspace/lib/c/../m/inc -IC:/testqde/workspace/lib/c/../pm/public -IC:/testqde/workspace/lib/c/../../services/registry/public -IC:/testqde/workspace/lib/c/public -IC:/QNX630/target/qnx6/usr/include -g       -shared   -DVARIANT_so -DVARIANT_services  C:/testqde/workspace/lib/c/services/registry.c 
+C:/testqde/workspace/lib/c/services/registry.c:25: sys/registry.h: No such file or directory
+cc: C:/QNX630/host/win32/x86/usr/lib/gcc-lib/ntox86/2.95.3/cpp0 caught signal 33
+make[3]: *** [registry.o] Error 1
+make[3]: Target `first' not remade because of errors.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/services/x86/so'
+make[2]: [all] Error 2 (ignored)
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/services/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/services'
+make -j 1 -Cstartup -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/startup'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/startup/x86'
+make -j 1 -Ca -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/startup/x86/a'
+C:/QNX630/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -g -O  -O2  -Wc,-finhibit-size-directive    -shared  -D_LIBC_SO_VERSION=2 -D_LIBCPP_SO_VERSION=2 -D_LIBM_SO_VERSION=2   -I. -IC:/testqde/workspace/lib/c/startup/x86/a -IC:/testqde/workspace/lib/c/startup/x86 -IC:/testqde/workspace/lib/c/startup -IC:/testqde/workspace/lib/c -IC:/testqde/workspace/lib/c/inc -IC:/testqde/workspace/lib/c/../../services/system/public -IC:/testqde/workspace/lib/c/../m/public -IC:/testqde/workspace/lib/c/../m/inc -IC:/testqde/workspace/lib/c/../pm/public -IC:/testqde/workspace/lib/c/../../services/registry/public -IC:/testqde/workspace/lib/c/public -IC:/QNX630/target/qnx6/usr/include -g          -DVARIANT_a -DVARIANT_startup  C:/testqde/workspace/lib/c/startup/crtbegin.c 
+C:\DOCUME~1\DInglis\LOCALS~1\Temp\2_qcc_2872\crtbegin.s: Assembler messages:
+C:\DOCUME~1\DInglis\LOCALS~1\Temp\2_qcc_2872\crtbegin.s:115: Error: subtraction of two symbols in different sections `.fini' {.fini section} - `fini_dummy' {.text section} at file address 500
+C:\DOCUME~1\DInglis\LOCALS~1\Temp\2_qcc_2872\crtbegin.s:118: Error: subtraction of two symbols in different sections `.fini' {.fini section} - `fini_dummy' {.text section} at file address 512
+cc: C:/QNX630/host/win32/x86/usr/bin/ntox86-as caught signal 1
+make[3]: *** [crtbegin.o] Error 1
+C:/QNX630/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -g -O  -O2  -Wc,-finhibit-size-directive      -D_LIBC_SO_VERSION=2 -D_LIBCPP_SO_VERSION=2 -D_LIBM_SO_VERSION=2   -I. -IC:/testqde/workspace/lib/c/startup/x86/a -IC:/testqde/workspace/lib/c/startup/x86 -IC:/testqde/workspace/lib/c/startup -IC:/testqde/workspace/lib/c -IC:/testqde/workspace/lib/c/inc -IC:/testqde/workspace/lib/c/../../services/system/public -IC:/testqde/workspace/lib/c/../m/public -IC:/testqde/workspace/lib/c/../m/inc -IC:/testqde/workspace/lib/c/../pm/public -IC:/testqde/workspace/lib/c/../../services/registry/public -IC:/testqde/workspace/lib/c/public -IC:/QNX630/target/qnx6/usr/include -g          -DVARIANT_a -DVARIANT_startup  C:/testqde/workspace/lib/c/startup/crtbeginG.c 
+C:\DOCUME~1\DInglis\LOCALS~1\Temp\2_qcc_556\crtbeginG.s: Assembler messages:
+C:\DOCUME~1\DInglis\LOCALS~1\Temp\2_qcc_556\crtbeginG.s:104: Error: subtraction of two symbols in different sections `.fini' {.fini section} - `fini_dummy' {.text section} at file address 500
+C:\DOCUME~1\DInglis\LOCALS~1\Temp\2_qcc_556\crtbeginG.s:107: Error: subtraction of two symbols in different sections `.fini' {.fini section} - `fini_dummy' {.text section} at file address 512
+cc: C:/QNX630/host/win32/x86/usr/bin/ntox86-as caught signal 1
+make[3]: *** [crtbeginG.o] Error 1
+C:/QNX630/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -g -O  -O2  -Wc,-finhibit-size-directive    -shared  -D_LIBC_SO_VERSION=2 -D_LIBCPP_SO_VERSION=2 -D_LIBM_SO_VERSION=2   -I. -IC:/testqde/workspace/lib/c/startup/x86/a -IC:/testqde/workspace/lib/c/startup/x86 -IC:/testqde/workspace/lib/c/startup -IC:/testqde/workspace/lib/c -IC:/testqde/workspace/lib/c/inc -IC:/testqde/workspace/lib/c/../../services/system/public -IC:/testqde/workspace/lib/c/../m/public -IC:/testqde/workspace/lib/c/../m/inc -IC:/testqde/workspace/lib/c/../pm/public -IC:/testqde/workspace/lib/c/../../services/registry/public -IC:/testqde/workspace/lib/c/public -IC:/QNX630/target/qnx6/usr/include -g          -DVARIANT_a -DVARIANT_startup  C:/testqde/workspace/lib/c/startup/crtend.c 
+C:\DOCUME~1\DInglis\LOCALS~1\Temp\2_qcc_1540\crtend.s: Assembler messages:
+C:\DOCUME~1\DInglis\LOCALS~1\Temp\2_qcc_1540\crtend.s:100: Error: subtraction of two symbols in different sections `.init' {.init section} - `init_dummy' {.text section} at file address 464
+C:\DOCUME~1\DInglis\LOCALS~1\Temp\2_qcc_1540\crtend.s:103: Error: subtraction of two symbols in different sections `.init' {.init section} - `init_dummy' {.text section} at file address 476
+cc: C:/QNX630/host/win32/x86/usr/bin/ntox86-as caught signal 1
+make[3]: *** [crtend.o] Error 1
+C:/QNX630/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -g -O  -O2  -Wc,-finhibit-size-directive      -D_LIBC_SO_VERSION=2 -D_LIBCPP_SO_VERSION=2 -D_LIBM_SO_VERSION=2   -I. -IC:/testqde/workspace/lib/c/startup/x86/a -IC:/testqde/workspace/lib/c/startup/x86 -IC:/testqde/workspace/lib/c/startup -IC:/testqde/workspace/lib/c -IC:/testqde/workspace/lib/c/inc -IC:/testqde/workspace/lib/c/../../services/system/public -IC:/testqde/workspace/lib/c/../m/public -IC:/testqde/workspace/lib/c/../m/inc -IC:/testqde/workspace/lib/c/../pm/public -IC:/testqde/workspace/lib/c/../../services/registry/public -IC:/testqde/workspace/lib/c/public -IC:/QNX630/target/qnx6/usr/include -g          -DVARIANT_a -DVARIANT_startup  C:/testqde/workspace/lib/c/startup/crtendG.c 
+C:\DOCUME~1\DInglis\LOCALS~1\Temp\2_qcc_2480\crtendG.s: Assembler messages:
+C:\DOCUME~1\DInglis\LOCALS~1\Temp\2_qcc_2480\crtendG.s:89: Error: subtraction of two symbols in different sections `.init' {.init section} - `init_dummy' {.text section} at file address 464
+C:\DOCUME~1\DInglis\LOCALS~1\Temp\2_qcc_2480\crtendG.s:92: Error: subtraction of two symbols in different sections `.init' {.init section} - `init_dummy' {.text section} at file address 476
+cc: C:/QNX630/host/win32/x86/usr/bin/ntox86-as caught signal 1
+make[3]: *** [crtendG.o] Error 1
+make[3]: Target `first' not remade because of errors.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/startup/x86/a'
+make[2]: [all] Error 2 (ignored)
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/startup/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/startup'
+make -j 1 -Cstdio -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/stdio'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/stdio/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/stdio/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/stdio/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/stdio/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/stdio/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/stdio/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/stdio'
+make -j 1 -Cstring -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/string'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/string/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/string/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/string/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/string/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/string/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/string/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/string'
+make -j 1 -Csupport -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/support'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/support/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/support/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/support/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/support/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/support/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/support/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/support'
+make -j 1 -Ctime -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/time'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/time/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/time/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/time/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/time/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/time/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/time/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/time'
+make -j 1 -Cunix -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/unix'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/unix/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/unix/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/unix/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/unix/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/unix/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/unix/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/unix'
+make -j 1 -Cwatcom -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/watcom'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/watcom/x86'
+make[2]: `all' is up to date.
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/watcom/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/watcom'
+make -j 1 -Cxopen -fMakefile   
+make[1]: Entering directory `C:/testqde/workspace/lib/c/xopen'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/xopen/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/xopen/x86/a'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/xopen/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/xopen/x86/so'
+make[3]: Nothing to be done for `first'.
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/xopen/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/xopen/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/xopen'
+make -j 1 -Clib -fMakefile 
+make[1]: Entering directory `C:/testqde/workspace/lib/c/lib'
+make -j 1 -Cx86 -fMakefile 
+make[2]: Entering directory `C:/testqde/workspace/lib/c/lib/x86'
+make -j 1 -Ca -fMakefile  
+make[3]: Entering directory `C:/testqde/workspace/lib/c/lib/x86/a'
+C:/QNX630/host/win32/x86/usr/bin/rm -f  C:/testqde/workspace/lib/c/lib/x86/a/libc.a
+C:/QNX630/host/win32/x86/usr/bin/ntox86-ar -r  C:/testqde/workspace/lib/c/lib/x86/a/libc.a  ../../../1/x86/a/__stat_check.o ../../../1/x86/a/access.o ../../../1/x86/a/alarm.o ../../../1/x86/a/cfgetispeed.o ../../../1/x86/a/cfgetospeed.o ../../../1/x86/a/cfsetispeed.o ../../../1/x86/a/cfsetospeed.o ../../../1/x86/a/chdir.o ../../../1/x86/a/chmod.o ../../../1/x86/a/chown.o ../../../1/x86/a/close.o ../../../1/x86/a/creat.o ../../../1/x86/a/ctermid.o ../../../1/x86/a/dup.o ../../../1/x86/a/dup2.o ../../../1/x86/a/execl.o ../../../1/x86/a/execle.o ../../../1/x86/a/execlp.o ../../../1/x86/a/execlpe.o ../../../1/x86/a/execve.o ../../../1/x86/a/execvpe.o ../../../1/x86/a/fchmod.o ../../../1/x86/a/fchown.o ../../../1/x86/a/fcntl.o ../../../1/x86/a/fdatasync.o ../../../1/x86/a/fork.o ../../../1/x86/a/fpathconf.o ../../../1/x86/a/fstat.o ../../../1/x86/a/fsync.o ../../../1/x86/a/futime.o ../../../1/x86/a/getcwd.o ../../../1/x86/a/getegid.o ../../../1/x86/a/geteuid.o ../../../1/x86/a/getgid.o ../../../1/x86/a/getgroups.o ../../../1/x86/a/getlogin.o ../../../1/x86/a/getpgrp.o ../../../1/x86/a/getpid.o ../../../1/x86/a/getppid.o ../../../1/x86/a/getsid.o ../../../1/x86/a/getuid.o ../../../1/x86/a/iodir.o ../../../1/x86/a/isatty.o ../../../1/x86/a/kill.o ../../../1/x86/a/link.o ../../../1/x86/a/lseek.o ../../../1/x86/a/mkdir.o ../../../1/x86/a/mkfifo.o ../../../1/x86/a/mknod.o ../../../1/x86/a/open.o ../../../1/x86/a/passwd.o ../../../1/x86/a/pathconf.o ../../../1/x86/a/pause.o ../../../1/x86/a/pipe.o ../../../1/x86/a/read.o ../../../1/x86/a/rmdir.o ../../../1/x86/a/setgroups.o ../../../1/x86/a/setids.o ../../../1/x86/a/setpgid.o ../../../1/x86/a/setsid.o ../../../1/x86/a/sigaction.o ../../../1/x86/a/sigaddset.o ../../../1/x86/a/sigdelset.o ../../../1/x86/a/sigempset.o ../../../1/x86/a/sigfillset.o ../../../1/x86/a/sigismem.o ../../../1/x86/a/sigjmp.o ../../../1/x86/a/signal.o ../../../1/x86/a/sigpending.o ../../../1/x86/a/sigprocmask.o ../../../1/x86/a/sigsetjmp.o ../../../1/x86/a/sigstub.o ../../../1/x86/a/sigsuspend.o ../../../1/x86/a/sleep.o ../../../1/x86/a/stat.o ../../../1/x86/a/sysconf.o ../../../1/x86/a/tcdrain.o ../../../1/x86/a/tcdropline.o ../../../1/x86/a/tcflow.o ../../../1/x86/a/tcflush.o ../../../1/x86/a/tcgetattr.o ../../../1/x86/a/tcgetpgrp.o ../../../1/x86/a/tcsendbreak.o ../../../1/x86/a/tcsetattr.o ../../../1/x86/a/tcsetpgrp.o ../../../1/x86/a/ttyname.o ../../../1/x86/a/umask.o ../../../1/x86/a/uname.o ../../../1/x86/a/unlink.o ../../../1/x86/a/utime.o ../../../1/x86/a/wait.o ../../../1/x86/a/waitpid.o ../../../1/x86/a/write.o ../../../1a/x86/a/basename.o ../../../1a/x86/a/confstr.o ../../../1a/x86/a/dirname.o ../../../1a/x86/a/fnmatch.o ../../../1a/x86/a/getopt.o ../../../1a/x86/a/glob.o ../../../1a/x86/a/popen.o ../../../1a/x86/a/readlink.o ../../../1a/x86/a/regcomp.o ../../../1a/x86/a/regerror.o ../../../1a/x86/a/regexec.o ../../../1a/x86/a/regfree.o ../../../1a/x86/a/symlink.o ../../../1a/x86/a/system.o ../../../1a/x86/a/wordexp.o ../../../1b/x86/a/__mq_check.o ../../../1b/x86/a/_aio_init.o ../../../1b/x86/a/aio_cancel.o ../../../1b/x86/a/aio_error.o ../../../1b/x86/a/aio_fsync.o ../../../1b/x86/a/aio_read.o ../../../1b/x86/a/aio_return.o ../../../1b/x86/a/aio_suspend.o ../../../1b/x86/a/aio_write.o ../../../1b/x86/a/clock_getres.o ../../../1b/x86/a/clock_gettime.o ../../../1b/x86/a/clock_settime.o ../../../1b/x86/a/ftruncate.o ../../../1b/x86/a/lio_listio.o ../../../1b/x86/a/mlock.o ../../../1b/x86/a/mlockall.o ../../../1b/x86/a/mmap.o ../../../1b/x86/a/mphys.o ../../../1b/x86/a/mprotect.o ../../../1b/x86/a/mq_close.o ../../../1b/x86/a/mq_getattr.o ../../../1b/x86/a/mq_notify.o ../../../1b/x86/a/mq_open.o ../../../1b/x86/a/mq_receive.o ../../../1b/x86/a/mq_send.o ../../../1b/x86/a/mq_setattr.o ../../../1b/x86/a/mq_unlink.o ../../../1b/x86/a/msync.o ../../../1b/x86/a/munlock.o ../../../1b/x86/a/munlockall.o ../../../1b/x86/a/munmap.o ../../../1b/x86/a/nanosleep.o ../../../1b/x86/a/sched_get_priority_max.o ../../../1b/x86/a/sched_get_priority_min.o ../../../1b/x86/a/sched_getparam.o ../../../1b/x86/a/sched_getscheduler.o ../../../1b/x86/a/sched_rr_get_interval.o ../../../1b/x86/a/sched_setparam.o ../../../1b/x86/a/sched_setscheduler.o ../../../1b/x86/a/sched_yield.o ../../../1b/x86/a/sem_close.o ../../../1b/x86/a/sem_destroy.o ../../../1b/x86/a/sem_getvalue.o ../../../1b/x86/a/sem_init.o ../../../1b/x86/a/sem_open.o ../../../1b/x86/a/sem_post.o ../../../1b/x86/a/sem_trywait.o ../../../1b/x86/a/sem_unlink.o ../../../1b/x86/a/sem_wait.o ../../../1b/x86/a/shm_close.o ../../../1b/x86/a/shm_open.o ../../../1b/x86/a/shm_unlink.o ../../../1b/x86/a/sigqueue.o ../../../1b/x86/a/sigtimedwait.o ../../../1b/x86/a/sigwait.o ../../../1b/x86/a/sigwaitinfo.o ../../../1b/x86/a/timer_create.o ../../../1b/x86/a/timer_delete.o ../../../1b/x86/a/timer_getoverrun.o ../../../1b/x86/a/timer_gettime.o ../../../1b/x86/a/timer_settime.o ../../../1c/x86/a/__my_thread_exit.o ../../../1c/x86/a/pthread_atfork.o ../../../1c/x86/a/pthread_attr_default.o ../../../1c/x86/a/pthread_attr_destroy.o ../../../1c/x86/a/pthread_attr_getdetachstate.o ../../../1c/x86/a/pthread_attr_getinheritsched.o ../../../1c/x86/a/pthread_attr_getschedparam.o ../../../1c/x86/a/pthread_attr_getschedpolicy.o ../../../1c/x86/a/pthread_attr_getscope.o ../../../1c/x86/a/pthread_attr_getstack.o ../../../1c/x86/a/pthread_attr_getstackaddr.o ../../../1c/x86/a/pthread_attr_getstacklazy.o ../../../1c/x86/a/pthread_attr_getstackprealloc.o ../../../1c/x86/a/pthread_attr_getstacksize.o ../../../1c/x86/a/pthread_attr_init.o ../../../1c/x86/a/pthread_attr_setdetachstate.o ../../../1c/x86/a/pthread_attr_setinheritsched.o ../../../1c/x86/a/pthread_attr_setschedparam.o ../../../1c/x86/a/pthread_attr_setschedpolicy.o ../../../1c/x86/a/pthread_attr_setscope.o ../../../1c/x86/a/pthread_attr_setstack.o ../../../1c/x86/a/pthread_attr_setstackaddr.o ../../../1c/x86/a/pthread_attr_setstacklazy.o ../../../1c/x86/a/pthread_attr_setstackprealloc.o ../../../1c/x86/a/pthread_attr_setstacksize.o ../../../1c/x86/a/pthread_cancel.o ../../../1c/x86/a/pthread_cond_broadcast.o ../../../1c/x86/a/pthread_cond_destroy.o ../../../1c/x86/a/pthread_cond_init.o ../../../1c/x86/a/pthread_cond_signal.o ../../../1c/x86/a/pthread_cond_timedwait.o ../../../1c/x86/a/pthread_cond_wait.o ../../../1c/x86/a/pthread_condattr_destroy.o ../../../1c/x86/a/pthread_condattr_init.o ../../../1c/x86/a/pthread_condattr_shared.o ../../../1c/x86/a/pthread_create.o ../../../1c/x86/a/pthread_detach.o ../../../1c/x86/a/pthread_equal.o ../../../1c/x86/a/pthread_exit.o ../../../1c/x86/a/pthread_getschedparam.o ../../../1c/x86/a/pthread_getspecific.o ../../../1c/x86/a/pthread_join.o ../../../1c/x86/a/pthread_key_create.o ../../../1c/x86/a/pthread_key_data.o ../../../1c/x86/a/pthread_key_delete.o ../../../1c/x86/a/pthread_kill.o ../../../1c/x86/a/pthread_mutex_destroy.o ../../../1c/x86/a/pthread_mutex_init.o ../../../1c/x86/a/pthread_mutex_lock.o ../../../1c/x86/a/pthread_mutex_prioceiling.o ../../../1c/x86/a/pthread_mutex_trylock.o ../../../1c/x86/a/pthread_mutex_unlock.o ../../../1c/x86/a/pthread_mutexattr_destroy.o ../../../1c/x86/a/pthread_mutexattr_getprioceiling.o ../../../1c/x86/a/pthread_mutexattr_getprotocol.o ../../../1c/x86/a/pthread_mutexattr_getrecursive.o ../../../1c/x86/a/pthread_mutexattr_getshared.o ../../../1c/x86/a/pthread_mutexattr_gettype.o ../../../1c/x86/a/pthread_mutexattr_init.o ../../../1c/x86/a/pthread_mutexattr_setprioceiling.o ../../../1c/x86/a/pthread_mutexattr_setprotocol.o ../../../1c/x86/a/pthread_mutexattr_setrecursive.o ../../../1c/x86/a/pthread_mutexattr_setshared.o ../../../1c/x86/a/pthread_mutexattr_settype.o ../../../1c/x86/a/pthread_once.o ../../../1c/x86/a/pthread_rwlock_destroy.o ../../../1c/x86/a/pthread_rwlock_exclusive.o ../../../1c/x86/a/pthread_rwlock_init.o ../../../1c/x86/a/pthread_rwlock_shared.o ../../../1c/x86/a/pthread_rwlock_unlock.o ../../../1c/x86/a/pthread_rwlockattr_destroy.o ../../../1c/x86/a/pthread_rwlockattr_getpshared.o ../../../1c/x86/a/pthread_rwlockattr_init.o ../../../1c/x86/a/pthread_rwlockattr_setpshared.o ../../../1c/x86/a/pthread_self.o ../../../1c/x86/a/pthread_setcancelstate.o ../../../1c/x86/a/pthread_setcanceltype.o ../../../1c/x86/a/pthread_setschedparam.o ../../../1c/x86/a/pthread_setspecific.o ../../../1c/x86/a/pthread_sigmask.o ../../../1c/x86/a/pthread_testcancel.o ../../../1c/x86/a/ttyname_r.o ../../../1d/x86/a/clock_getcpuclockid.o ../../../1d/x86/a/mq_timedreceive.o ../../../1d/x86/a/mq_timedsend.o ../../../1d/x86/a/posix_fadvise.o ../../../1d/x86/a/posix_fallocate.o ../../../1d/x86/a/posix_madvise.o ../../../1d/x86/a/posix_memalign.o ../../../1d/x86/a/posix_spawn.o ../../../1d/x86/a/posix_spawnp.o ../../../1d/x86/a/pthread_getcpuclockid.o ../../../1d/x86/a/pthread_mutex_timedlock.o ../../../1d/x86/a/sem_timedwait.o ../../../1g/x86/a/inet_ntop.o ../../../1g/x86/a/inet_pton.o ../../../1g/x86/a/isfdtype.o ../../../1g/x86/a/tohn.o ../../../1j/x86/a/_pthread_spin_destroy.o ../../../1j/x86/a/_pthread_spin_init.o ../../../1j/x86/a/_pthread_spin_lock.o ../../../1j/x86/a/_pthread_spin_trylock.o ../../../1j/x86/a/_pthread_spin_unlock.o ../../../1j/x86/a/_spin_destroy.o ../../../1j/x86/a/_spin_destroy_v.o ../../../1j/x86/a/_spin_init.o ../../../1j/x86/a/_spin_init_v.o ../../../1j/x86/a/_spin_lock_v.o ../../../1j/x86/a/_spin_trylock_v.o ../../../1j/x86/a/_spin_unlock_v.o ../../../1j/x86/a/barrier_attr_destroy.o ../../../1j/x86/a/barrier_attr_getpshared.o ../../../1j/x86/a/barrier_attr_init.o ../../../1j/x86/a/barrier_attr_setpshared.o ../../../1j/x86/a/barrier_destroy.o ../../../1j/x86/a/barrier_init.o ../../../1j/x86/a/barrier_wait.o ../../../1j/x86/a/clock_nanosleep.o ../../../1j/x86/a/mem_access_clear.o ../../../1j/x86/a/mem_access_set.o ../../../1j/x86/a/mem_get_info.o ../../../1j/x86/a/mem_offset.o ../../../1j/x86/a/pthread_abort.o ../../../1j/x86/a/pthread_condattr_getclock.o ../../../1j/x86/a/pthread_condattr_setclock.o ../../../1j/x86/a/pthread_spin_destroy.o ../../../1j/x86/a/pthread_spin_init.o ../../../1j/x86/a/pthread_spin_lock.o ../../../1j/x86/a/pthread_spin_trylock.o ../../../1j/x86/a/pthread_spin_unlock.o ../../../1j/x86/a/spin_destroy.o ../../../1j/x86/a/spin_init.o ../../../1j/x86/a/spin_lock.o ../../../1j/x86/a/spin_trylock.o ../../../1j/x86/a/spin_unlock.o ../../../1j/x86/a/timer_getexpstatus.o ../../../1j/x86/a/typed_mem_open.o ../../../alloc/x86/a/_calloc.o ../../../alloc/x86/a/_free.o ../../../alloc/x86/a/_malloc.o ../../../alloc/x86/a/_malloc_pc.o ../../../alloc/x86/a/_memalign.o ../../../alloc/x86/a/_memalign_pc.o ../../../alloc/x86/a/_posix_memalign.o ../../../alloc/x86/a/_realloc.o ../../../alloc/x86/a/_salloc.o ../../../alloc/x86/a/_salloc_data.o ../../../alloc/x86/a/amblksiz.o ../../../alloc/x86/a/amhiwater.o ../../../alloc/x86/a/band.o ../../../alloc/x86/a/barena.o ../../../alloc/x86/a/compat.o ../../../alloc/x86/a/core.o ../../../alloc/x86/a/dlist.o ../../../alloc/x86/a/flist.o ../../../alloc/x86/a/malloc-config.o ../../../alloc/x86/a/malloc.o ../../../alloc/x86/a/mdump.o ../../../alloc/x86/a/util.o ../../../ansi/x86/a/__cxa_atexit.o ../../../ansi/x86/a/__cxa_finalize.o ../../../ansi/x86/a/__exit.o ../../../ansi/x86/a/_atexit.o ../../../ansi/x86/a/_cleanup.o ../../../ansi/x86/a/_exit.o ../../../ansi/x86/a/_findenv.o ../../../ansi/x86/a/_jmp.o ../../../ansi/x86/a/abort.o ../../../ansi/x86/a/abs.o ../../../ansi/x86/a/assert.o ../../../ansi/x86/a/atexit.o ../../../ansi/x86/a/bsearch.o ../../../ansi/x86/a/btowc.o ../../../ansi/x86/a/div.o ../../../ansi/x86/a/exit.o ../../../ansi/x86/a/getenv.o ../../../ansi/x86/a/isalnum.o ../../../ansi/x86/a/isalpha.o ../../../ansi/x86/a/isascii.o ../../../ansi/x86/a/isblank.o ../../../ansi/x86/a/iscntrl.o ../../../ansi/x86/a/isdigit.o ../../../ansi/x86/a/isgraph.o ../../../ansi/x86/a/islower.o ../../../ansi/x86/a/isprint.o ../../../ansi/x86/a/ispunct.o ../../../ansi/x86/a/isspace.o ../../../ansi/x86/a/isupper.o ../../../ansi/x86/a/iswalnum.o ../../../ansi/x86/a/iswalpha.o ../../../ansi/x86/a/iswblank.o ../../../ansi/x86/a/iswcntrl.o ../../../ansi/x86/a/iswctype.o ../../../ansi/x86/a/iswdigit.o ../../../ansi/x86/a/iswgraph.o ../../../ansi/x86/a/iswlower.o ../../../ansi/x86/a/iswprint.o ../../../ansi/x86/a/iswpunct.o ../../../ansi/x86/a/iswspace.o ../../../ansi/x86/a/iswupper.o ../../../ansi/x86/a/iswxdigi.o ../../../ansi/x86/a/isxdigit.o ../../../ansi/x86/a/labs.o ../../../ansi/x86/a/ldiv.o ../../../ansi/x86/a/lldiv.o ../../../ansi/x86/a/localeco.o ../../../ansi/x86/a/longjmp.o ../../../ansi/x86/a/mblen.o ../../../ansi/x86/a/mbrlen.o ../../../ansi/x86/a/mbrtowc.o ../../../ansi/x86/a/mbsinit.o ../../../ansi/x86/a/mbsrtowc.o ../../../ansi/x86/a/mbstowcs.o ../../../ansi/x86/a/mbtowc.o ../../../ansi/x86/a/qsort.o ../../../ansi/x86/a/raise.o ../../../ansi/x86/a/rand.o ../../../ansi/x86/a/remove.o ../../../ansi/x86/a/rename.o ../../../ansi/x86/a/setlocal.o ../../../ansi/x86/a/tolower.o ../../../ansi/x86/a/toupper.o ../../../ansi/x86/a/towctran.o ../../../ansi/x86/a/wcrtomb.o ../../../ansi/x86/a/wctob.o ../../../ansi/x86/a/wctomb.o ../../../ansi/x86/a/wctrans.o ../../../ansi/x86/a/wctype.o ../../../ansi/x86/a/xbtowc.o ../../../ansi/x86/a/xcostate.o ../../../ansi/x86/a/xctype.o ../../../ansi/x86/a/xdefloc.o ../../../ansi/x86/a/xdnorm.o ../../../ansi/x86/a/xdscale.o ../../../ansi/x86/a/xdtento.o ../../../ansi/x86/a/xdunscal.o ../../../ansi/x86/a/xfdnorm.o ../../../ansi/x86/a/xfdscale.o ../../../ansi/x86/a/xfdtento.o ../../../ansi/x86/a/xfdunsca.o ../../../ansi/x86/a/xferaise_compat.o ../../../ansi/x86/a/xfindloc.o ../../../ansi/x86/a/xfloat.o ../../../ansi/x86/a/xfreeloc.o ../../../ansi/x86/a/xfvalues.o ../../../ansi/x86/a/xgetloc.o ../../../ansi/x86/a/xldnorm.o ../../../ansi/x86/a/xldscale.o ../../../ansi/x86/a/xldtento.o ../../../ansi/x86/a/xldunsca.o ../../../ansi/x86/a/xloctab.o ../../../ansi/x86/a/xlocterm.o ../../../ansi/x86/a/xlvalues.o ../../../ansi/x86/a/xmakeloc.o ../../../ansi/x86/a/xmakesta.o ../../../ansi/x86/a/xmakewct.o ../../../ansi/x86/a/xmbtowc.o ../../../ansi/x86/a/xmtx.o ../../../ansi/x86/a/xreadloc.o ../../../ansi/x86/a/xsetloc.o ../../../ansi/x86/a/xstate.o ../../../ansi/x86/a/xstod.o ../../../ansi/x86/a/xstof.o ../../../ansi/x86/a/xstoflt.o ../../../ansi/x86/a/xstoint.o ../../../ansi/x86/a/xstold.o ../../../ansi/x86/a/xstopfx.o ../../../ansi/x86/a/xstoxflt.o ../../../ansi/x86/a/xtolotab.o ../../../ansi/x86/a/xtouptab.o ../../../ansi/x86/a/xtowctra.o ../../../ansi/x86/a/xvalues.o ../../../ansi/x86/a/xwcostate.o ../../../ansi/x86/a/xwcstate.o ../../../ansi/x86/a/xwctob.o ../../../ansi/x86/a/xwctomb.o ../../../ansi/x86/a/xwctrtab.o ../../../ansi/x86/a/xwctype.o ../../../ansi/x86/a/xwctytab.o ../../../atomic/x86/a/atomic_add.o ../../../atomic/x86/a/atomic_add_value.o ../../../atomic/x86/a/atomic_clr.o ../../../atomic/x86/a/atomic_clr_value.o ../../../atomic/x86/a/atomic_set.o ../../../atomic/x86/a/atomic_set_value.o ../../../atomic/x86/a/atomic_sub.o ../../../atomic/x86/a/atomic_sub_value.o ../../../atomic/x86/a/atomic_toggle.o ../../../atomic/x86/a/atomic_toggle_value.o ../../../dispatch/x86/a/_thread_pool_thread.o ../../../dispatch/x86/a/data.o ../../../dispatch/x86/a/dispatch.o ../../../dispatch/x86/a/dispatch_select.o ../../../dispatch/x86/a/dispatch_sigwait.o ../../../dispatch/x86/a/message.o ../../../dispatch/x86/a/name.o ../../../dispatch/x86/a/resmgr.o ../../../dispatch/x86/a/resmgr_detach.o ../../../dispatch/x86/a/thread_pool.o ../../../dispatch/x86/a/thread_pool_ctrl.o ../../../dispatch/x86/a/vec_util.o ../../../iofunc/x86/a/_iofunc_create.o ../../../iofunc/x86/a/_iofunc_lock.o ../../../iofunc/x86/a/_iofunc_misc.o ../../../iofunc/x86/a/_iofunc_open.o ../../../iofunc/x86/a/iofunc_attr_init.o ../../../iofunc/x86/a/iofunc_attr_lock.o ../../../iofunc/x86/a/iofunc_attr_trylock.o ../../../iofunc/x86/a/iofunc_attr_unlock.o ../../../iofunc/x86/a/iofunc_check_access.o ../../../iofunc/x86/a/iofunc_chmod.o ../../../iofunc/x86/a/iofunc_chmod_default.o ../../../iofunc/x86/a/iofunc_chown.o ../../../iofunc/x86/a/iofunc_chown_default.o ../../../iofunc/x86/a/iofunc_client_info.o ../../../iofunc/x86/a/iofunc_close_dup.o ../../../iofunc/x86/a/iofunc_close_dup_default.o ../../../iofunc/x86/a/iofunc_close_ocb.o ../../../iofunc/x86/a/iofunc_close_ocb_default.o ../../../iofunc/x86/a/iofunc_devctl.o ../../../iofunc/x86/a/iofunc_devctl_default.o ../../../iofunc/x86/a/iofunc_fdinfo.o ../../../iofunc/x86/a/iofunc_fdinfo_default.o ../../../iofunc/x86/a/iofunc_func_init.o ../../../iofunc/x86/a/iofunc_link.o ../../../iofunc/x86/a/iofunc_llist_lock.o ../../../iofunc/x86/a/iofunc_lock.o ../../../iofunc/x86/a/iofunc_lock_calloc.o ../../../iofunc/x86/a/iofunc_lock_default.o ../../../iofunc/x86/a/iofunc_lock_ocb_default.o ../../../iofunc/x86/a/iofunc_lseek.o ../../../iofunc/x86/a/iofunc_lseek_default.o ../../../iofunc/x86/a/iofunc_mknod.o ../../../iofunc/x86/a/iofunc_mmap.o ../../../iofunc/x86/a/iofunc_mmap_default.o ../../../iofunc/x86/a/iofunc_notify.o ../../../iofunc/x86/a/iofunc_notify_remove.o ../../../iofunc/x86/a/iofunc_notify_trigger.o ../../../iofunc/x86/a/iofunc_ocb_attach.o ../../../iofunc/x86/a/iofunc_ocb_calloc.o ../../../iofunc/x86/a/iofunc_ocb_detach.o ../../../iofunc/x86/a/iofunc_open.o ../../../iofunc/x86/a/iofunc_open_default.o ../../../iofunc/x86/a/iofunc_openfd.o ../../../iofunc/x86/a/iofunc_openfd_default.o ../../../iofunc/x86/a/iofunc_pathconf.o ../../../iofunc/x86/a/iofunc_pathconf_default.o ../../../iofunc/x86/a/iofunc_power.o ../../../iofunc/x86/a/iofunc_power_default.o ../../../iofunc/x86/a/iofunc_read_default.o ../../../iofunc/x86/a/iofunc_read_verify.o ../../../iofunc/x86/a/iofunc_readlink.o ../../../iofunc/x86/a/iofunc_rename.o ../../../iofunc/x86/a/iofunc_sleepon.o ../../../iofunc/x86/a/iofunc_space_verify.o ../../../iofunc/x86/a/iofunc_stat.o ../../../iofunc/x86/a/iofunc_stat_default.o ../../../iofunc/x86/a/iofunc_sync.o ../../../iofunc/x86/a/iofunc_sync_default.o ../../../iofunc/x86/a/iofunc_sync_verify.o ../../../iofunc/x86/a/iofunc_time_update.o ../../../iofunc/x86/a/iofunc_unblock.o ../../../iofunc/x86/a/iofunc_unblock_default.o ../../../iofunc/x86/a/iofunc_unlink.o ../../../iofunc/x86/a/iofunc_unlock_ocb_default.o ../../../iofunc/x86/a/iofunc_utime.o ../../../iofunc/x86/a/iofunc_utime_default.o ../../../iofunc/x86/a/iofunc_write_default.o ../../../iofunc/x86/a/iofunc_write_verify.o ../../../kercalls/x86/a/ChannelConnectAttr.o ../../../kercalls/x86/a/ChannelCreate.o ../../../kercalls/x86/a/ChannelCreateExt.o ../../../kercalls/x86/a/ChannelCreate_r.o ../../../kercalls/x86/a/ChannelDestroy.o ../../../kercalls/x86/a/ChannelDestroy_r.o ../../../kercalls/x86/a/ClockAdjust.o ../../../kercalls/x86/a/ClockAdjust_r.o ../../../kercalls/x86/a/ClockId.o ../../../kercalls/x86/a/ClockId_r.o ../../../kercalls/x86/a/ClockPeriod.o ../../../kercalls/x86/a/ClockPeriod_r.o ../../../kercalls/x86/a/ClockTime.o ../../../kercalls/x86/a/ClockTime_r.o ../../../kercalls/x86/a/ConnectAttach.o ../../../kercalls/x86/a/ConnectAttachExt.o ../../../kercalls/x86/a/ConnectAttach_r.o ../../../kercalls/x86/a/ConnectClientInfo.o ../../../kercalls/x86/a/ConnectClientInfo_r.o ../../../kercalls/x86/a/ConnectDetach.o ../../../kercalls/x86/a/ConnectDetach_r.o ../../../kercalls/x86/a/ConnectFlags.o ../../../kercalls/x86/a/ConnectFlags_r.o ../../../kercalls/x86/a/ConnectServerInfo.o ../../../kercalls/x86/a/ConnectServerInfo_r.o ../../../kercalls/x86/a/InterruptAttach.o ../../../kercalls/x86/a/InterruptAttach_r.o ../../../kercalls/x86/a/InterruptDetach.o ../../../kercalls/x86/a/InterruptDetachFunc.o ../../../kercalls/x86/a/InterruptDetachFunc_r.o ../../../kercalls/x86/a/InterruptDetach_r.o ../../../kercalls/x86/a/InterruptWait.o ../../../kercalls/x86/a/InterruptWait_r.o ../../../kercalls/x86/a/MsgCurrent.o ../../../kercalls/x86/a/MsgCurrent_r.o ../../../kercalls/x86/a/MsgDeliverEvent.o ../../../kercalls/x86/a/MsgDeliverEvent_r.o ../../../kercalls/x86/a/MsgError.o ../../../kercalls/x86/a/MsgError_r.o ../../../kercalls/x86/a/MsgInfo.o ../../../kercalls/x86/a/MsgInfo_r.o ../../../kercalls/x86/a/MsgKeyData.o ../../../kercalls/x86/a/MsgKeyData_r.o ../../../kercalls/x86/a/MsgRead.o ../../../kercalls/x86/a/MsgRead_r.o ../../../kercalls/x86/a/MsgReadiov.o ../../../kercalls/x86/a/MsgReadiov_r.o ../../../kercalls/x86/a/MsgReadv.o ../../../kercalls/x86/a/MsgReadv_r.o ../../../kercalls/x86/a/MsgReceive.o ../../../kercalls/x86/a/MsgReceiveAsyncGbl.o ../../../kercalls/x86/a/MsgReceiveAsyncGbl_r.o ../../../kercalls/x86/a/MsgReceivePulse.o ../../../kercalls/x86/a/MsgReceivePulse_r.o ../../../kercalls/x86/a/MsgReceivePulsev.o ../../../kercalls/x86/a/MsgReceivePulsev_r.o ../../../kercalls/x86/a/MsgReceive_r.o ../../../kercalls/x86/a/MsgReceivev.o ../../../kercalls/x86/a/MsgReceivev_r.o ../../../kercalls/x86/a/MsgReply.o ../../../kercalls/x86/a/MsgReply_r.o ../../../kercalls/x86/a/MsgReplyv.o ../../../kercalls/x86/a/MsgReplyv_r.o ../../../kercalls/x86/a/MsgSend.o ../../../kercalls/x86/a/MsgSendPulse.o ../../../kercalls/x86/a/MsgSendPulse_r.o ../../../kercalls/x86/a/MsgSend_r.o ../../../kercalls/x86/a/MsgSendnc.o ../../../kercalls/x86/a/MsgSendnc_r.o ../../../kercalls/x86/a/MsgSendsv.o ../../../kercalls/x86/a/MsgSendsv_r.o ../../../kercalls/x86/a/MsgSendsvnc.o ../../../kercalls/x86/a/MsgSendsvnc_r.o ../../../kercalls/x86/a/MsgSendv.o ../../../kercalls/x86/a/MsgSendv_r.o ../../../kercalls/x86/a/MsgSendvnc.o ../../../kercalls/x86/a/MsgSendvnc_r.o ../../../kercalls/x86/a/MsgSendvs.o ../../../kercalls/x86/a/MsgSendvs_r.o ../../../kercalls/x86/a/MsgSendvsnc.o ../../../kercalls/x86/a/MsgSendvsnc_r.o ../../../kercalls/x86/a/MsgVerifyEvent.o ../../../kercalls/x86/a/MsgVerifyEvent_r.o ../../../kercalls/x86/a/MsgWrite.o ../../../kercalls/x86/a/MsgWrite_r.o ../../../kercalls/x86/a/MsgWritev.o ../../../kercalls/x86/a/MsgWritev_r.o ../../../kercalls/x86/a/NetCred.o ../../../kercalls/x86/a/NetInfoscoid.o ../../../kercalls/x86/a/NetSignalKill.o ../../../kercalls/x86/a/NetUnblock.o ../../../kercalls/x86/a/NetVtid.o ../../../kercalls/x86/a/SchedCtl.o ../../../kercalls/x86/a/SchedCtl_r.o ../../../kercalls/x86/a/SchedGet.o ../../../kercalls/x86/a/SchedGet_r.o ../../../kercalls/x86/a/SchedInfo.o ../../../kercalls/x86/a/SchedInfo_r.o ../../../kercalls/x86/a/SchedSet.o ../../../kercalls/x86/a/SchedSet_r.o ../../../kercalls/x86/a/SchedYield.o ../../../kercalls/x86/a/SchedYield_r.o ../../../kercalls/x86/a/SignalAction.o ../../../kercalls/x86/a/SignalAction_r.o ../../../kercalls/x86/a/SignalFault.o ../../../kercalls/x86/a/SignalKill.o ../../../kercalls/x86/a/SignalKill_r.o ../../../kercalls/x86/a/SignalProcmask.o ../../../kercalls/x86/a/SignalProcmask_r.o ../../../kercalls/x86/a/SignalReturn.o ../../../kercalls/x86/a/SignalSuspend.o ../../../kercalls/x86/a/SignalSuspend_r.o ../../../kercalls/x86/a/SignalWaitinfo.o ../../../kercalls/x86/a/SignalWaitinfo_r.o ../../../kercalls/x86/a/SyncCondvarSignal.o ../../../kercalls/x86/a/SyncCondvarSignal_r.o ../../../kercalls/x86/a/SyncCondvarWait.o ../../../kercalls/x86/a/SyncCondvarWait_r.o ../../../kercalls/x86/a/SyncCtl.o ../../../kercalls/x86/a/SyncCtl_r.o ../../../kercalls/x86/a/SyncDestroy.o ../../../kercalls/x86/a/SyncDestroy_r.o ../../../kercalls/x86/a/SyncMutexLock.o ../../../kercalls/x86/a/SyncMutexLock_r.o ../../../kercalls/x86/a/SyncMutexRevive.o ../../../kercalls/x86/a/SyncMutexRevive_r.o ../../../kercalls/x86/a/SyncMutexUnlock.o ../../../kercalls/x86/a/SyncMutexUnlock_r.o ../../../kercalls/x86/a/SyncSemPost.o ../../../kercalls/x86/a/SyncSemPost_r.o ../../../kercalls/x86/a/SyncSemWait.o ../../../kercalls/x86/a/SyncSemWait_r.o ../../../kercalls/x86/a/SyncTypeCreate.o ../../../kercalls/x86/a/SyncTypeCreate_r.o ../../../kercalls/x86/a/ThreadCancel.o ../../../kercalls/x86/a/ThreadCancel_r.o ../../../kercalls/x86/a/ThreadCreate.o ../../../kercalls/x86/a/ThreadCreate_r.o ../../../kercalls/x86/a/ThreadCtl.o ../../../kercalls/x86/a/ThreadCtl_r.o ../../../kercalls/x86/a/ThreadDestroy.o ../../../kercalls/x86/a/ThreadDestroy_r.o ../../../kercalls/x86/a/ThreadDetach.o ../../../kercalls/x86/a/ThreadDetach_r.o ../../../kercalls/x86/a/ThreadJoin.o ../../../kercalls/x86/a/ThreadJoin_r.o ../../../kercalls/x86/a/TimerAlarm.o ../../../kercalls/x86/a/TimerAlarm_r.o ../../../kercalls/x86/a/TimerCreate.o ../../../kercalls/x86/a/TimerCreate_r.o ../../../kercalls/x86/a/TimerDestroy.o ../../../kercalls/x86/a/TimerDestroy_r.o ../../../kercalls/x86/a/TimerInfo.o ../../../kercalls/x86/a/TimerInfo_r.o ../../../kercalls/x86/a/TimerSettime.o ../../../kercalls/x86/a/TimerSettime_r.o ../../../kercalls/x86/a/TimerTimeout.o ../../../kercalls/x86/a/TimerTimeout_r.o ../../../kercalls/x86/a/__Ring0.o ../../../kercalls/x86/a/__Ring0_r.o ../../../kercalls/x86/a/__SysCpupageGet.o ../../../kercalls/x86/a/__SysCpupageSet.o ../../../kercalls/x86/a/__interruptmask.o ../../../kercalls/x86/a/__interruptunmask.o ../../../kercalls/x86/a/__ker_err.o ../../../kercalls/x86/a/__kerbad.o ../../../kercalls/x86/a/__kernop.o ../../../kercalls/x86/a/__traceevent.o ../../../kercover/x86/a/InterruptDetachId.o ../../../kercover/x86/a/debugbreak.o ../../../kercover/x86/a/debugkdbreak.o ../../../kercover/x86/a/debugkdoutput.o ../../../kercover/x86/a/interruptattachevent.o ../../../kercover/x86/a/interruptattachevent_r.o ../../../kercover/x86/a/interruptdisable.o ../../../kercover/x86/a/interruptenable.o ../../../kercover/x86/a/interrupthookidle.o ../../../kercover/x86/a/interrupthooktrace.o ../../../kercover/x86/a/interruptlock.o ../../../kercover/x86/a/interruptmask.o ../../../kercover/x86/a/interruptpending.o ../../../kercover/x86/a/interruptunlock.o ../../../kercover/x86/a/interruptunmask.o ../../../kercover/x86/a/msgreceiveasync.o ../../../kercover/x86/a/msgsendasync.o ../../../kercover/x86/a/synccreate.o ../../../kercover/x86/a/synccreate_r.o ../../../kercover/x86/a/syncmutexevent.o ../../../kercover/x86/a/syncmutexevent_r.o ../../../kercover/x86/a/timertimeout.o ../../../kercover/x86/a/timertimeout_r.o ../../../kercover/x86/a/traceevent.o ../../../ldd/x86/a/dladdr.o ../../../ldd/x86/a/ldd.o ../../../misc/x86/a/clearenv.o ../../../misc/x86/a/delay.o ../../../misc/x86/a/max.o ../../../misc/x86/a/min.o ../../../prof/x86/a/gmon.o ../../../prof/x86/a/mcount.o ../../../prof/x86/a/sample.o ../../../qnx/x86/a/__getset_thread_name.o ../../../qnx/x86/a/__hwi_base.o ../../../qnx/x86/a/__hwi_find_string.o ../../../qnx/x86/a/_cmdfd.o ../../../qnx/x86/a/_cmdname.o ../../../qnx/x86/a/_mknod_extra.o ../../../qnx/x86/a/devctl.o ../../../qnx/x86/a/devctlv.o ../../../qnx/x86/a/ftime.o ../../../qnx/x86/a/getprio.o ../../../qnx/x86/a/gettid.o ../../../qnx/x86/a/hwi_find_item.o ../../../qnx/x86/a/hwi_find_tag.o ../../../qnx/x86/a/hwi_next_item.o ../../../qnx/x86/a/hwi_next_tag.o ../../../qnx/x86/a/hwi_off2tag.o ../../../qnx/x86/a/hwi_tag2off.o ../../../qnx/x86/a/inpline.o ../../../qnx/x86/a/intr.o ../../../qnx/x86/a/iofdinfo.o ../../../qnx/x86/a/ionotify.o ../../../qnx/x86/a/ltrunc.o ../../../qnx/x86/a/mmap_device_io.o ../../../qnx/x86/a/mmap_device_memory.o ../../../qnx/x86/a/munmap_device_io.o ../../../qnx/x86/a/munmap_device_memory.o ../../../qnx/x86/a/name_open.o ../../../qnx/x86/a/nanosleep_abs.o ../../../qnx/x86/a/nanosleep_rel.o ../../../qnx/x86/a/nanospin.o ../../../qnx/x86/a/nanospin_count.o ../../../qnx/x86/a/nanospin_ns.o ../../../qnx/x86/a/nanospin_ns_to_count.o ../../../qnx/x86/a/nsec2timespec.o ../../../qnx/x86/a/openfd.o ../../../qnx/x86/a/pthread_getname_np.o ../../../qnx/x86/a/pthread_setname_np.o ../../../qnx/x86/a/pthread_timedjoin.o ../../../qnx/x86/a/qnx_crypt.o ../../../qnx/x86/a/readblock.o ../../../qnx/x86/a/readcond.o ../../../qnx/x86/a/sched_get_priority_adjust.o ../../../qnx/x86/a/searchenv.o ../../../qnx/x86/a/select_block.o ../../../qnx/x86/a/select_event.o ../../../qnx/x86/a/setprio.o ../../../qnx/x86/a/shm_ctl.o ../../../qnx/x86/a/sleepon.o ../../../qnx/x86/a/sopen.o ../../../qnx/x86/a/spawn.o ../../../qnx/x86/a/spawnl.o ../../../qnx/x86/a/spawnle.o ../../../qnx/x86/a/spawnlp.o ../../../qnx/x86/a/spawnlpe.o ../../../qnx/x86/a/spawnp.o ../../../qnx/x86/a/spawnve.o ../../../qnx/x86/a/spawnvpe.o ../../../qnx/x86/a/tcgetsize.o ../../../qnx/x86/a/tcinject.o ../../../qnx/x86/a/tcischars.o ../../../qnx/x86/a/tcsetsize.o 
+C:/QNX630/host/win32/x86/usr/bin/ntox86-ar -r  C:/testqde/workspace/lib/c/lib/x86/a/libc.a  ../../../qnx/x86/a/timespec2nsec.o ../../../qnx/x86/a/writeblock.o ../../../resmgr/x86/a/_resmgr_access.o ../../../resmgr/x86/a/_resmgr_close_handler.o ../../../resmgr/x86/a/_resmgr_connect_handler.o ../../../resmgr/x86/a/_resmgr_detach_id.o ../../../resmgr/x86/a/_resmgr_disconnect_handler.o ../../../resmgr/x86/a/_resmgr_dup_handler.o ../../../resmgr/x86/a/_resmgr_handle.o ../../../resmgr/x86/a/_resmgr_handle_grow.o ../../../resmgr/x86/a/_resmgr_handler.o ../../../resmgr/x86/a/_resmgr_io_func.o ../../../resmgr/x86/a/_resmgr_io_handler.o ../../../resmgr/x86/a/_resmgr_iofuncs.o ../../../resmgr/x86/a/_resmgr_link_alloc.o ../../../resmgr/x86/a/_resmgr_link_free.o ../../../resmgr/x86/a/_resmgr_link_handler.o ../../../resmgr/x86/a/_resmgr_link_query.o ../../../resmgr/x86/a/_resmgr_mmap_handler.o ../../../resmgr/x86/a/_resmgr_mount_handler.o ../../../resmgr/x86/a/_resmgr_notify_handler.o ../../../resmgr/x86/a/_resmgr_ocb.o ../../../resmgr/x86/a/_resmgr_openfd_handler.o ../../../resmgr/x86/a/_resmgr_thread.o ../../../resmgr/x86/a/_resmgr_unbind.o ../../../resmgr/x86/a/_resmgr_unblock_handler.o ../../../resmgr/x86/a/resmgr_again.o ../../../resmgr/x86/a/resmgr_data.o ../../../resmgr/x86/a/resmgr_devino.o ../../../resmgr/x86/a/resmgr_handle_tune.o ../../../resmgr/x86/a/resmgr_iofuncs.o ../../../resmgr/x86/a/resmgr_msgread.o ../../../resmgr/x86/a/resmgr_msgreadv.o ../../../resmgr/x86/a/resmgr_msgwrite.o ../../../resmgr/x86/a/resmgr_msgwritev.o ../../../resmgr/x86/a/resmgr_ocb.o ../../../resmgr/x86/a/resmgr_open_bind.o ../../../resmgr/x86/a/resmgr_pathname.o ../../../resmgr/x86/a/resmgr_pathname_attach.o ../../../resmgr/x86/a/resmgr_pathname_detach.o ../../../resmgr/x86/a/resmgr_pulse_attach.o ../../../resmgr/x86/a/resmgr_pulse_detach.o ../../../resmgr/x86/a/resmgr_start.o ../../../resmgr/x86/a/resmgr_unbind.o ../../../services/x86/a/__netmgr_send.o ../../../services/x86/a/_netmgr_connect.o ../../../services/x86/a/_rsrcdbmgr_pack.o ../../../services/x86/a/cfgopen.o ../../../services/x86/a/miniproc_start.o ../../../services/x86/a/modem_open.o ../../../services/x86/a/modem_read.o ../../../services/x86/a/modem_script.o ../../../services/x86/a/modem_write.o ../../../services/x86/a/netmgr_ctl.o ../../../services/x86/a/netmgr_ndtostr.o ../../../services/x86/a/netmgr_path.o ../../../services/x86/a/netmgr_remote_nd.o ../../../services/x86/a/netmgr_strtond.o ../../../services/x86/a/pathmgr_link.o ../../../services/x86/a/pathmgr_symlink.o ../../../services/x86/a/pathmgr_unlink.o ../../../services/x86/a/pci.o ../../../services/x86/a/pm_get_modes.o ../../../services/x86/a/pm_get_power.o ../../../services/x86/a/pm_set_power.o ../../../services/x86/a/pmd_power.o ../../../services/x86/a/procmgr_daemon.o ../../../services/x86/a/procmgr_event_notify.o ../../../services/x86/a/procmgr_event_trigger.o ../../../services/x86/a/procmgr_guardian.o ../../../services/x86/a/procmgr_session.o ../../../services/x86/a/rsrcdbmgr_attach.o ../../../services/x86/a/rsrcdbmgr_create.o ../../../services/x86/a/rsrcdbmgr_destroy.o ../../../services/x86/a/rsrcdbmgr_detach.o ../../../services/x86/a/rsrcdbmgr_minor_attach.o ../../../services/x86/a/rsrcdbmgr_minor_detach.o ../../../services/x86/a/rsrcdbmgr_query.o ../../../services/x86/a/slog.o ../../../services/x86/a/sysmgr_confstr_set.o ../../../services/x86/a/sysmgr_cpumode.o ../../../services/x86/a/sysmgr_reboot.o ../../../services/x86/a/sysmgr_sysconf_set.o ../../../stdio/x86/a/__fpbufinit.o ../../../stdio/x86/a/__fpinit.o ../../../stdio/x86/a/__parse_oflag.o ../../../stdio/x86/a/_freopen.o ../../../stdio/x86/a/_fsopen.o ../../../stdio/x86/a/_tmpfile.o ../../../stdio/x86/a/clearerr.o ../../../stdio/x86/a/fclose.o ../../../stdio/x86/a/fcloseall.o ../../../stdio/x86/a/fdopen.o ../../../stdio/x86/a/feof.o ../../../stdio/x86/a/ferror.o ../../../stdio/x86/a/fflush.o ../../../stdio/x86/a/fgetc.o ../../../stdio/x86/a/fgetchar.o ../../../stdio/x86/a/fgetpos.o ../../../stdio/x86/a/fgets.o ../../../stdio/x86/a/fgetwc.o ../../../stdio/x86/a/fgetws.o ../../../stdio/x86/a/fileno.o ../../../stdio/x86/a/flockfile.o ../../../stdio/x86/a/fopen.o ../../../stdio/x86/a/fopen64.o ../../../stdio/x86/a/fprintf.o ../../../stdio/x86/a/fputc.o ../../../stdio/x86/a/fputchar.o ../../../stdio/x86/a/fputs.o ../../../stdio/x86/a/fputwc.o ../../../stdio/x86/a/fputws.o ../../../stdio/x86/a/fread.o ../../../stdio/x86/a/freopen.o ../../../stdio/x86/a/freopen64.o ../../../stdio/x86/a/fscanf.o ../../../stdio/x86/a/fseek.o ../../../stdio/x86/a/fseeko.o ../../../stdio/x86/a/fseeko64.o ../../../stdio/x86/a/fsetpos.o ../../../stdio/x86/a/ftell.o ../../../stdio/x86/a/ftello.o ../../../stdio/x86/a/ftello64.o ../../../stdio/x86/a/ftrylockfile.o ../../../stdio/x86/a/funlockfile.o ../../../stdio/x86/a/fwide.o ../../../stdio/x86/a/fwprintf.o ../../../stdio/x86/a/fwrite.o ../../../stdio/x86/a/fwscanf.o ../../../stdio/x86/a/getc.o ../../../stdio/x86/a/getchar.o ../../../stdio/x86/a/gets.o ../../../stdio/x86/a/getwc.o ../../../stdio/x86/a/getwchar.o ../../../stdio/x86/a/perror.o ../../../stdio/x86/a/printf.o ../../../stdio/x86/a/putc.o ../../../stdio/x86/a/putchar.o ../../../stdio/x86/a/puts.o ../../../stdio/x86/a/putwc.o ../../../stdio/x86/a/putwchar.o ../../../stdio/x86/a/rewind.o ../../../stdio/x86/a/scanf.o ../../../stdio/x86/a/setbuf.o ../../../stdio/x86/a/setvbuf.o ../../../stdio/x86/a/snprintf.o ../../../stdio/x86/a/sprintf.o ../../../stdio/x86/a/sscanf.o ../../../stdio/x86/a/strerror.o ../../../stdio/x86/a/swprintf.o ../../../stdio/x86/a/swscanf.o ../../../stdio/x86/a/tmpfile.o ../../../stdio/x86/a/tmpfile64.o ../../../stdio/x86/a/ungetc.o ../../../stdio/x86/a/ungetwc.o ../../../stdio/x86/a/vfprintf.o ../../../stdio/x86/a/vfscanf.o ../../../stdio/x86/a/vfwprint.o ../../../stdio/x86/a/vfwscanf.o ../../../stdio/x86/a/vprintf.o ../../../stdio/x86/a/vscanf.o ../../../stdio/x86/a/vsnprint.o ../../../stdio/x86/a/vsprintf.o ../../../stdio/x86/a/vsscanf.o ../../../stdio/x86/a/vswprint.o ../../../stdio/x86/a/vswscanf.o ../../../stdio/x86/a/vwprintf.o ../../../stdio/x86/a/vwscanf.o ../../../stdio/x86/a/wprintf.o ../../../stdio/x86/a/wscanf.o ../../../stdio/x86/a/xfbuf.o ../../../stdio/x86/a/xfgpos.o ../../../stdio/x86/a/xfiles.o ../../../stdio/x86/a/xfprout.o ../../../stdio/x86/a/xfrprep.o ../../../stdio/x86/a/xfspos.o ../../../stdio/x86/a/xfwprep.o ../../../stdio/x86/a/xgenld.o ../../../stdio/x86/a/xgetfld.o ../../../stdio/x86/a/xgetfloa.o ../../../stdio/x86/a/xgetint.o ../../../stdio/x86/a/xgetstr.o ../../../stdio/x86/a/xldtob.o ../../../stdio/x86/a/xlitob.o ../../../stdio/x86/a/xprintf.o ../../../stdio/x86/a/xputfld.o ../../../stdio/x86/a/xputstr.o ../../../stdio/x86/a/xputtxt.o ../../../stdio/x86/a/xscanf.o ../../../stdio/x86/a/xsnprout.o ../../../stdio/x86/a/xsprout.o ../../../stdio/x86/a/xsyslock.o ../../../stdio/x86/a/xwfprout.o ../../../stdio/x86/a/xwfrprep.o ../../../stdio/x86/a/xwfwprep.o ../../../stdio/x86/a/xwgenld.o ../../../stdio/x86/a/xwgetfld.o ../../../stdio/x86/a/xwgetflo.o ../../../stdio/x86/a/xwgetint.o ../../../stdio/x86/a/xwgetstr.o ../../../stdio/x86/a/xwldtob.o ../../../stdio/x86/a/xwlitob.o ../../../stdio/x86/a/xwprintf.o ../../../stdio/x86/a/xwputfld.o ../../../stdio/x86/a/xwputstr.o ../../../stdio/x86/a/xwputtxt.o ../../../stdio/x86/a/xwscanf.o ../../../stdio/x86/a/xwsprout.o ../../../string/x86/a/atof.o ../../../string/x86/a/atoh.o ../../../string/x86/a/atoi.o ../../../string/x86/a/atol.o ../../../string/x86/a/atoll.o ../../../string/x86/a/bcmp.o ../../../string/x86/a/bcopy.o ../../../string/x86/a/bzero.o ../../../string/x86/a/ffs.o ../../../string/x86/a/index.o ../../../string/x86/a/itoa.o ../../../string/x86/a/lltoa.o ../../../string/x86/a/ltoa.o ../../../string/x86/a/memccpy.o ../../../string/x86/a/memchr.o ../../../string/x86/a/memcmp.o ../../../string/x86/a/memcpy.o ../../../string/x86/a/memcpyv.o ../../../string/x86/a/memicmp.o ../../../string/x86/a/memmove.o ../../../string/x86/a/memset.o ../../../string/x86/a/rindex.o ../../../string/x86/a/straddstr.o ../../../string/x86/a/strcasecmp.o ../../../string/x86/a/strcat.o ../../../string/x86/a/strchr.o ../../../string/x86/a/strcmp.o ../../../string/x86/a/strcoll.o ../../../string/x86/a/strcpy.o ../../../string/x86/a/strcspn.o ../../../string/x86/a/strdup.o ../../../string/x86/a/stricmp.o ../../../string/x86/a/strlen.o ../../../string/x86/a/strlwr.o ../../../string/x86/a/strncasecmp.o ../../../string/x86/a/strncat.o ../../../string/x86/a/strncmp.o ../../../string/x86/a/strncpy.o ../../../string/x86/a/strnicmp.o ../../../string/x86/a/strnset.o ../../../string/x86/a/strpbrk.o ../../../string/x86/a/strrchr.o ../../../string/x86/a/strrev.o ../../../string/x86/a/strset.o ../../../string/x86/a/strspn.o ../../../string/x86/a/strstr.o ../../../string/x86/a/strtod.o ../../../string/x86/a/strtof.o ../../../string/x86/a/strtoimax.o ../../../string/x86/a/strtok.o ../../../string/x86/a/strtok_r.o ../../../string/x86/a/strtol.o ../../../string/x86/a/strtold.o ../../../string/x86/a/strtoll.o ../../../string/x86/a/strtoul.o ../../../string/x86/a/strtoull.o ../../../string/x86/a/strtoumax.o ../../../string/x86/a/strupr.o ../../../string/x86/a/strxfrm.o ../../../string/x86/a/towlower.o ../../../string/x86/a/towupper.o ../../../string/x86/a/ulltoa.o ../../../string/x86/a/ultoa.o ../../../string/x86/a/utoa.o ../../../string/x86/a/wcscat.o ../../../string/x86/a/wcschr.o ../../../string/x86/a/wcscmp.o ../../../string/x86/a/wcscoll.o ../../../string/x86/a/wcscpy.o ../../../string/x86/a/wcscspn.o ../../../string/x86/a/wcslen.o ../../../string/x86/a/wcsncat.o ../../../string/x86/a/wcsncmp.o ../../../string/x86/a/wcsncpy.o ../../../string/x86/a/wcspbrk.o ../../../string/x86/a/wcsrchr.o ../../../string/x86/a/wcsrtomb.o ../../../string/x86/a/wcsspn.o ../../../string/x86/a/wcsstr.o ../../../string/x86/a/wcstod.o ../../../string/x86/a/wcstof.o ../../../string/x86/a/wcstoimax.o ../../../string/x86/a/wcstok.o ../../../string/x86/a/wcstol.o ../../../string/x86/a/wcstold.o ../../../string/x86/a/wcstoll.o ../../../string/x86/a/wcstombs.o ../../../string/x86/a/wcstoul.o ../../../string/x86/a/wcstoull.o ../../../string/x86/a/wcstoumax.o ../../../string/x86/a/wcsxfrm.o ../../../string/x86/a/wmemchr.o ../../../string/x86/a/wmemcmp.o ../../../string/x86/a/wmemcpy.o ../../../string/x86/a/wmemmove.o ../../../string/x86/a/wmemset.o ../../../string/x86/a/xstoll.o ../../../string/x86/a/xstoul.o ../../../string/x86/a/xstoull.o ../../../string/x86/a/xstrxfrm.o ../../../string/x86/a/xwcsxfrm.o ../../../string/x86/a/xwstod.o ../../../string/x86/a/xwstof.o ../../../string/x86/a/xwstoflt.o ../../../string/x86/a/xwstold.o ../../../string/x86/a/xwstoll.o ../../../string/x86/a/xwstopfx.o ../../../string/x86/a/xwstoul.o ../../../string/x86/a/xwstoull.o ../../../string/x86/a/xwstoxfl.o ../../../support/x86/a/_CMain.o ../../../support/x86/a/__cleanup.o ../../../support/x86/a/__get_errno_ptr.o ../../../support/x86/a/__main.o ../../../support/x86/a/__stackavail.o ../../../support/x86/a/__tls.o ../../../support/x86/a/_conf_destroy.o ../../../support/x86/a/_conf_get.o ../../../support/x86/a/_conf_set.o ../../../support/x86/a/_connect.o ../../../support/x86/a/_connect_combine.o ../../../support/x86/a/_connect_ctrl.o ../../../support/x86/a/_connect_entry.o ../../../support/x86/a/_connect_fd.o ../../../support/x86/a/_connect_object.o ../../../support/x86/a/_curbrk.o ../../../support/x86/a/_devctl.o ../../../support/x86/a/_flush_cache.o ../../../support/x86/a/_fullpath.o ../../../support/x86/a/_init_libc.o ../../../support/x86/a/_intr_v86.o ../../../support/x86/a/_math_emu_callout.o ../../../support/x86/a/_math_emu_load.o ../../../support/x86/a/_math_emu_stub.o ../../../support/x86/a/_notifyreadxv.o ../../../support/x86/a/_syspage_time.o ../../../support/x86/a/_unlink_object.o ../../../support/x86/a/_vopen.o ../../../support/x86/a/_writexv.o ../../../time/x86/a/asctime.o ../../../time/x86/a/clock.o ../../../time/x86/a/ctime.o ../../../time/x86/a/ctime_r.o ../../../time/x86/a/difftime.o ../../../time/x86/a/gmtime.o ../../../time/x86/a/gmtime_r.o ../../../time/x86/a/localtim.o ../../../time/x86/a/localtim_r.o ../../../time/x86/a/mktime.o ../../../time/x86/a/strftime.o ../../../time/x86/a/time.o ../../../time/x86/a/tzset.o ../../../time/x86/a/wcsftime.o ../../../time/x86/a/xgentime.o ../../../time/x86/a/xgetdst.o ../../../time/x86/a/xgetrules.o ../../../time/x86/a/xgettime.o ../../../time/x86/a/xgetzone.o ../../../time/x86/a/xisdst.o ../../../time/x86/a/xstrftim.o ../../../time/x86/a/xttotm.o ../../../time/x86/a/xtzset.o ../../../time/x86/a/xwcsftim.o ../../../unix/x86/a/alloca.o ../../../unix/x86/a/cfmakeraw.o ../../../unix/x86/a/cfree.o ../../../unix/x86/a/chroot.o ../../../unix/x86/a/chsize.o ../../../unix/x86/a/daemon.o ../../../unix/x86/a/eof.o ../../../unix/x86/a/err.o ../../../unix/x86/a/errx.o ../../../unix/x86/a/flock.o ../../../unix/x86/a/getdtablesize.o ../../../unix/x86/a/getgrouplist.o ../../../unix/x86/a/getpass.o ../../../unix/x86/a/getut.o ../../../unix/x86/a/getw.o ../../../unix/x86/a/getwd.o ../../../unix/x86/a/initgroups.o ../../../unix/x86/a/mktemp.o ../../../unix/x86/a/mount.o ../../../unix/x86/a/nap.o ../../../unix/x86/a/napms.o ../../../unix/x86/a/pathfind.o ../../../unix/x86/a/pty.o ../../../unix/x86/a/putw.o ../../../unix/x86/a/rdchk.o ../../../unix/x86/a/re_comp.o ../../../unix/x86/a/scandir.o ../../../unix/x86/a/setbuffer.o ../../../unix/x86/a/sethostname.o ../../../unix/x86/a/setlinebuf.o ../../../unix/x86/a/settimeofday.o ../../../unix/x86/a/sigblock.o ../../../unix/x86/a/sigmask.o ../../../unix/x86/a/strsep.o ../../../unix/x86/a/strsignal.o ../../../unix/x86/a/sys_err.o ../../../unix/x86/a/sys_sig.o ../../../unix/x86/a/tcsetsid.o ../../../unix/x86/a/verr.o ../../../unix/x86/a/verrx.o ../../../unix/x86/a/vfork.o ../../../unix/x86/a/vwarn.o ../../../unix/x86/a/vwarnx.o ../../../unix/x86/a/wait3.o ../../../unix/x86/a/wait4.o ../../../unix/x86/a/warn.o ../../../unix/x86/a/warnx.o ../../../xopen/x86/a/__statvfs_check.o ../../../xopen/x86/a/__waitid_net.o ../../../xopen/x86/a/_rand48.o ../../../xopen/x86/a/creat64.o ../../../xopen/x86/a/crypt.o ../../../xopen/x86/a/drand48.o ../../../xopen/x86/a/erand48.o ../../../xopen/x86/a/fchdir.o ../../../xopen/x86/a/fstat64.o ../../../xopen/x86/a/fstatvfs.o ../../../xopen/x86/a/fstatvfs64.o ../../../xopen/x86/a/ftok.o ../../../xopen/x86/a/ftruncate64.o ../../../xopen/x86/a/gethostname.o ../../../xopen/x86/a/getitimer.o ../../../xopen/x86/a/getpgid.o ../../../xopen/x86/a/getpriority.o ../../../xopen/x86/a/getrlimit.o ../../../xopen/x86/a/getrusage.o ../../../xopen/x86/a/getsubopt.o ../../../xopen/x86/a/gettimeofday.o ../../../xopen/x86/a/hsearch.o ../../../xopen/x86/a/ioctl.o ../../../xopen/x86/a/jrand48.o ../../../xopen/x86/a/killpg.o ../../../xopen/x86/a/lcong48.o ../../../xopen/x86/a/lockf.o ../../../xopen/x86/a/lockf64.o ../../../xopen/x86/a/lrand48.o ../../../xopen/x86/a/lsearch.o ../../../xopen/x86/a/mrand48.o ../../../xopen/x86/a/nftw.o ../../../xopen/x86/a/nice.o ../../../xopen/x86/a/nrand48.o ../../../xopen/x86/a/open64.o ../../../xopen/x86/a/poll.o ../../../xopen/x86/a/pread.o ../../../xopen/x86/a/pthread_attr_getguardsize.o ../../../xopen/x86/a/pthread_attr_setguardsize.o ../../../xopen/x86/a/pthread_concurrency.o ../../../xopen/x86/a/pty.o ../../../xopen/x86/a/putenv.o ../../../xopen/x86/a/pwrite.o ../../../xopen/x86/a/random.o ../../../xopen/x86/a/readv.o ../../../xopen/x86/a/realpath.o ../../../xopen/x86/a/seed48.o ../../../xopen/x86/a/setenv.o ../../../xopen/x86/a/setpgrp.o ../../../xopen/x86/a/setpriority.o ../../../xopen/x86/a/setrlimit.o ../../../xopen/x86/a/srand48.o ../../../xopen/x86/a/stat64.o ../../../xopen/x86/a/statvfs.o ../../../xopen/x86/a/statvfs64.o ../../../xopen/x86/a/swab.o ../../../xopen/x86/a/sync.o ../../../xopen/x86/a/syslog.o ../../../xopen/x86/a/tcgetsid.o ../../../xopen/x86/a/times.o ../../../xopen/x86/a/tmpnam.o ../../../xopen/x86/a/truncate.o ../../../xopen/x86/a/truncate64.o ../../../xopen/x86/a/ualarm.o ../../../xopen/x86/a/unsetenv.o ../../../xopen/x86/a/usleep.o ../../../xopen/x86/a/utimes.o ../../../xopen/x86/a/waitid.o ../../../xopen/x86/a/writev.o 
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/lib/x86/a'
+make -j 1 -Cso -fMakefile 
+make[3]: Entering directory `C:/testqde/workspace/lib/c/lib/x86/so'
+C:/QNX630/host/win32/x86/usr/bin/rm -f  libc_cut.a
+C:/QNX630/host/win32/x86/usr/bin/ntox86-ar -r  libc_cut.a  ../../../1/x86/so/__stat_check.o ../../../1/x86/so/access.o ../../../1/x86/so/alarm.o ../../../1/x86/so/cfgetispeed.o ../../../1/x86/so/cfgetospeed.o ../../../1/x86/so/cfsetispeed.o ../../../1/x86/so/cfsetospeed.o ../../../1/x86/so/chdir.o ../../../1/x86/so/chmod.o ../../../1/x86/so/chown.o ../../../1/x86/so/close.o ../../../1/x86/so/creat.o ../../../1/x86/so/ctermid.o ../../../1/x86/so/dup.o ../../../1/x86/so/dup2.o ../../../1/x86/so/execl.o ../../../1/x86/so/execle.o ../../../1/x86/so/execlp.o ../../../1/x86/so/execlpe.o ../../../1/x86/so/execve.o ../../../1/x86/so/execvpe.o ../../../1/x86/so/fchmod.o ../../../1/x86/so/fchown.o ../../../1/x86/so/fcntl.o ../../../1/x86/so/fdatasync.o ../../../1/x86/so/fork.o ../../../1/x86/so/fpathconf.o ../../../1/x86/so/fstat.o ../../../1/x86/so/fsync.o ../../../1/x86/so/futime.o ../../../1/x86/so/getcwd.o ../../../1/x86/so/getegid.o ../../../1/x86/so/geteuid.o ../../../1/x86/so/getgid.o ../../../1/x86/so/getgroups.o ../../../1/x86/so/getpgrp.o ../../../1/x86/so/getpid.o ../../../1/x86/so/getppid.o ../../../1/x86/so/getsid.o ../../../1/x86/so/getuid.o ../../../1/x86/so/iodir.o ../../../1/x86/so/isatty.o ../../../1/x86/so/kill.o ../../../1/x86/so/link.o ../../../1/x86/so/lseek.o ../../../1/x86/so/mkdir.o ../../../1/x86/so/mkfifo.o ../../../1/x86/so/mknod.o ../../../1/x86/so/open.o ../../../1/x86/so/passwd.o ../../../1/x86/so/pathconf.o ../../../1/x86/so/pause.o ../../../1/x86/so/pipe.o ../../../1/x86/so/read.o ../../../1/x86/so/rmdir.o ../../../1/x86/so/setgroups.o ../../../1/x86/so/setids.o ../../../1/x86/so/setpgid.o ../../../1/x86/so/setsid.o ../../../1/x86/so/sigaction.o ../../../1/x86/so/sigaddset.o ../../../1/x86/so/sigdelset.o ../../../1/x86/so/sigempset.o ../../../1/x86/so/sigfillset.o ../../../1/x86/so/sigismem.o ../../../1/x86/so/sigjmp.o ../../../1/x86/so/signal.o ../../../1/x86/so/sigpending.o ../../../1/x86/so/sigprocmask.o ../../../1/x86/so/sigsetjmp.o ../../../1/x86/so/sigstub.o ../../../1/x86/so/sigsuspend.o ../../../1/x86/so/sleep.o ../../../1/x86/so/stat.o ../../../1/x86/so/sysconf.o ../../../1/x86/so/tcdrain.o ../../../1/x86/so/tcdropline.o ../../../1/x86/so/tcflow.o ../../../1/x86/so/tcflush.o ../../../1/x86/so/tcgetattr.o ../../../1/x86/so/tcgetpgrp.o ../../../1/x86/so/tcsendbreak.o ../../../1/x86/so/tcsetattr.o ../../../1/x86/so/tcsetpgrp.o ../../../1/x86/so/ttyname.o ../../../1/x86/so/umask.o ../../../1/x86/so/uname.o ../../../1/x86/so/unlink.o ../../../1/x86/so/utime.o ../../../1/x86/so/wait.o ../../../1/x86/so/waitpid.o ../../../1/x86/so/write.o ../../../1a/x86/so/basename.o ../../../1a/x86/so/confstr.o ../../../1a/x86/so/dirname.o ../../../1a/x86/so/fnmatch.o ../../../1a/x86/so/getopt.o ../../../1a/x86/so/readlink.o ../../../1a/x86/so/symlink.o ../../../1a/x86/so/system.o ../../../1b/x86/so/__mq_check.o ../../../1b/x86/so/_aio_init.o ../../../1b/x86/so/aio_cancel.o ../../../1b/x86/so/aio_error.o ../../../1b/x86/so/aio_fsync.o ../../../1b/x86/so/aio_read.o ../../../1b/x86/so/aio_return.o ../../../1b/x86/so/aio_suspend.o ../../../1b/x86/so/aio_write.o ../../../1b/x86/so/clock_getres.o ../../../1b/x86/so/clock_gettime.o ../../../1b/x86/so/clock_settime.o ../../../1b/x86/so/ftruncate.o ../../../1b/x86/so/lio_listio.o ../../../1b/x86/so/mlock.o ../../../1b/x86/so/mlockall.o ../../../1b/x86/so/mmap.o ../../../1b/x86/so/mphys.o ../../../1b/x86/so/mprotect.o ../../../1b/x86/so/mq_close.o ../../../1b/x86/so/mq_getattr.o ../../../1b/x86/so/mq_notify.o ../../../1b/x86/so/mq_open.o ../../../1b/x86/so/mq_receive.o ../../../1b/x86/so/mq_send.o ../../../1b/x86/so/mq_setattr.o ../../../1b/x86/so/mq_unlink.o ../../../1b/x86/so/msync.o ../../../1b/x86/so/munlock.o ../../../1b/x86/so/munlockall.o ../../../1b/x86/so/munmap.o ../../../1b/x86/so/nanosleep.o ../../../1b/x86/so/sched_get_priority_max.o ../../../1b/x86/so/sched_get_priority_min.o ../../../1b/x86/so/sched_getparam.o ../../../1b/x86/so/sched_getscheduler.o ../../../1b/x86/so/sched_rr_get_interval.o ../../../1b/x86/so/sched_setparam.o ../../../1b/x86/so/sched_setscheduler.o ../../../1b/x86/so/sched_yield.o ../../../1b/x86/so/sem_close.o ../../../1b/x86/so/sem_destroy.o ../../../1b/x86/so/sem_getvalue.o ../../../1b/x86/so/sem_init.o ../../../1b/x86/so/sem_open.o ../../../1b/x86/so/sem_post.o ../../../1b/x86/so/sem_trywait.o ../../../1b/x86/so/sem_unlink.o ../../../1b/x86/so/sem_wait.o ../../../1b/x86/so/shm_close.o ../../../1b/x86/so/shm_open.o ../../../1b/x86/so/shm_unlink.o ../../../1b/x86/so/sigqueue.o ../../../1b/x86/so/sigtimedwait.o ../../../1b/x86/so/sigwait.o ../../../1b/x86/so/sigwaitinfo.o ../../../1b/x86/so/timer_create.o ../../../1b/x86/so/timer_delete.o ../../../1b/x86/so/timer_getoverrun.o ../../../1b/x86/so/timer_gettime.o ../../../1b/x86/so/timer_settime.o ../../../1c/x86/so/__my_thread_exit.o ../../../1c/x86/so/pthread_atfork.o ../../../1c/x86/so/pthread_attr_default.o ../../../1c/x86/so/pthread_attr_destroy.o ../../../1c/x86/so/pthread_attr_getdetachstate.o ../../../1c/x86/so/pthread_attr_getinheritsched.o ../../../1c/x86/so/pthread_attr_getschedparam.o ../../../1c/x86/so/pthread_attr_getschedpolicy.o ../../../1c/x86/so/pthread_attr_getscope.o ../../../1c/x86/so/pthread_attr_getstack.o ../../../1c/x86/so/pthread_attr_getstackaddr.o ../../../1c/x86/so/pthread_attr_getstacklazy.o ../../../1c/x86/so/pthread_attr_getstackprealloc.o ../../../1c/x86/so/pthread_attr_getstacksize.o ../../../1c/x86/so/pthread_attr_init.o ../../../1c/x86/so/pthread_attr_setdetachstate.o ../../../1c/x86/so/pthread_attr_setinheritsched.o ../../../1c/x86/so/pthread_attr_setschedparam.o ../../../1c/x86/so/pthread_attr_setschedpolicy.o ../../../1c/x86/so/pthread_attr_setscope.o ../../../1c/x86/so/pthread_attr_setstack.o ../../../1c/x86/so/pthread_attr_setstackaddr.o ../../../1c/x86/so/pthread_attr_setstacklazy.o ../../../1c/x86/so/pthread_attr_setstackprealloc.o ../../../1c/x86/so/pthread_attr_setstacksize.o ../../../1c/x86/so/pthread_cancel.o ../../../1c/x86/so/pthread_cond_broadcast.o ../../../1c/x86/so/pthread_cond_destroy.o ../../../1c/x86/so/pthread_cond_init.o ../../../1c/x86/so/pthread_cond_signal.o ../../../1c/x86/so/pthread_cond_timedwait.o ../../../1c/x86/so/pthread_cond_wait.o ../../../1c/x86/so/pthread_condattr_destroy.o ../../../1c/x86/so/pthread_condattr_init.o ../../../1c/x86/so/pthread_condattr_shared.o ../../../1c/x86/so/pthread_create.o ../../../1c/x86/so/pthread_detach.o ../../../1c/x86/so/pthread_equal.o ../../../1c/x86/so/pthread_exit.o ../../../1c/x86/so/pthread_getschedparam.o ../../../1c/x86/so/pthread_getspecific.o ../../../1c/x86/so/pthread_join.o ../../../1c/x86/so/pthread_key_create.o ../../../1c/x86/so/pthread_key_data.o ../../../1c/x86/so/pthread_key_delete.o ../../../1c/x86/so/pthread_kill.o ../../../1c/x86/so/pthread_mutex_destroy.o ../../../1c/x86/so/pthread_mutex_init.o ../../../1c/x86/so/pthread_mutex_lock.o ../../../1c/x86/so/pthread_mutex_prioceiling.o ../../../1c/x86/so/pthread_mutex_trylock.o ../../../1c/x86/so/pthread_mutex_unlock.o ../../../1c/x86/so/pthread_mutexattr_destroy.o ../../../1c/x86/so/pthread_mutexattr_getprioceiling.o ../../../1c/x86/so/pthread_mutexattr_getprotocol.o ../../../1c/x86/so/pthread_mutexattr_getrecursive.o ../../../1c/x86/so/pthread_mutexattr_getshared.o ../../../1c/x86/so/pthread_mutexattr_gettype.o ../../../1c/x86/so/pthread_mutexattr_init.o ../../../1c/x86/so/pthread_mutexattr_setprioceiling.o ../../../1c/x86/so/pthread_mutexattr_setprotocol.o ../../../1c/x86/so/pthread_mutexattr_setrecursive.o ../../../1c/x86/so/pthread_mutexattr_setshared.o ../../../1c/x86/so/pthread_mutexattr_settype.o ../../../1c/x86/so/pthread_once.o ../../../1c/x86/so/pthread_rwlock_destroy.o ../../../1c/x86/so/pthread_rwlock_exclusive.o ../../../1c/x86/so/pthread_rwlock_init.o ../../../1c/x86/so/pthread_rwlock_shared.o ../../../1c/x86/so/pthread_rwlock_unlock.o ../../../1c/x86/so/pthread_rwlockattr_destroy.o ../../../1c/x86/so/pthread_rwlockattr_getpshared.o ../../../1c/x86/so/pthread_rwlockattr_init.o ../../../1c/x86/so/pthread_rwlockattr_setpshared.o ../../../1c/x86/so/pthread_self.o ../../../1c/x86/so/pthread_setcancelstate.o ../../../1c/x86/so/pthread_setcanceltype.o ../../../1c/x86/so/pthread_setschedparam.o ../../../1c/x86/so/pthread_setspecific.o ../../../1c/x86/so/pthread_sigmask.o ../../../1c/x86/so/pthread_testcancel.o ../../../1c/x86/so/ttyname_r.o ../../../1d/x86/so/clock_getcpuclockid.o ../../../1d/x86/so/mq_timedreceive.o ../../../1d/x86/so/mq_timedsend.o ../../../1d/x86/so/posix_fadvise.o ../../../1d/x86/so/posix_fallocate.o ../../../1d/x86/so/posix_madvise.o ../../../1d/x86/so/posix_memalign.o ../../../1d/x86/so/posix_spawn.o ../../../1d/x86/so/posix_spawnp.o ../../../1d/x86/so/pthread_getcpuclockid.o ../../../1d/x86/so/pthread_mutex_timedlock.o ../../../1d/x86/so/sem_timedwait.o ../../../1g/x86/so/inet_ntop.o ../../../1g/x86/so/inet_pton.o ../../../1g/x86/so/isfdtype.o ../../../1g/x86/so/tohn.o ../../../1j/x86/so/_pthread_spin_destroy.o ../../../1j/x86/so/_pthread_spin_init.o ../../../1j/x86/so/_pthread_spin_lock.o ../../../1j/x86/so/_pthread_spin_trylock.o ../../../1j/x86/so/_pthread_spin_unlock.o ../../../1j/x86/so/_spin_destroy.o ../../../1j/x86/so/_spin_destroy_v.o ../../../1j/x86/so/_spin_init.o ../../../1j/x86/so/_spin_init_v.o ../../../1j/x86/so/_spin_lock_v.o ../../../1j/x86/so/_spin_trylock_v.o ../../../1j/x86/so/_spin_unlock_v.o ../../../1j/x86/so/barrier_attr_destroy.o ../../../1j/x86/so/barrier_attr_getpshared.o ../../../1j/x86/so/barrier_attr_init.o ../../../1j/x86/so/barrier_attr_setpshared.o ../../../1j/x86/so/barrier_destroy.o ../../../1j/x86/so/barrier_init.o ../../../1j/x86/so/barrier_wait.o ../../../1j/x86/so/clock_nanosleep.o ../../../1j/x86/so/mem_access_clear.o ../../../1j/x86/so/mem_access_set.o ../../../1j/x86/so/mem_get_info.o ../../../1j/x86/so/mem_offset.o ../../../1j/x86/so/pthread_abort.o ../../../1j/x86/so/pthread_condattr_getclock.o ../../../1j/x86/so/pthread_condattr_setclock.o ../../../1j/x86/so/pthread_spin_destroy.o ../../../1j/x86/so/pthread_spin_init.o ../../../1j/x86/so/pthread_spin_lock.o ../../../1j/x86/so/pthread_spin_trylock.o ../../../1j/x86/so/pthread_spin_unlock.o ../../../1j/x86/so/spin_destroy.o ../../../1j/x86/so/spin_init.o ../../../1j/x86/so/spin_lock.o ../../../1j/x86/so/spin_trylock.o ../../../1j/x86/so/spin_unlock.o ../../../1j/x86/so/timer_getexpstatus.o ../../../1j/x86/so/typed_mem_open.o ../../../alloc/x86/so/_calloc.o ../../../alloc/x86/so/_free.o ../../../alloc/x86/so/_malloc.o ../../../alloc/x86/so/_malloc_pc.o ../../../alloc/x86/so/_memalign.o ../../../alloc/x86/so/_memalign_pc.o ../../../alloc/x86/so/_posix_memalign.o ../../../alloc/x86/so/_realloc.o ../../../alloc/x86/so/_salloc_data.o ../../../alloc/x86/so/amblksiz.o ../../../alloc/x86/so/amhiwater.o ../../../alloc/x86/so/band.o ../../../alloc/x86/so/barena.o ../../../alloc/x86/so/compat.o ../../../alloc/x86/so/core.o ../../../alloc/x86/so/dlist.o ../../../alloc/x86/so/flist.o ../../../alloc/x86/so/malloc-config.o ../../../alloc/x86/so/malloc.o ../../../alloc/x86/so/mdump.o ../../../alloc/x86/so/util.o ../../../ansi/x86/so/__cxa_atexit.o ../../../ansi/x86/so/__cxa_finalize.o ../../../ansi/x86/so/__exit.o ../../../ansi/x86/so/_atexit.o ../../../ansi/x86/so/_cleanup.o ../../../ansi/x86/so/_exit.o ../../../ansi/x86/so/_findenv.o ../../../ansi/x86/so/_jmp.o ../../../ansi/x86/so/abort.o ../../../ansi/x86/so/abs.o ../../../ansi/x86/so/assert.o ../../../ansi/x86/so/atexit.o ../../../ansi/x86/so/bsearch.o ../../../ansi/x86/so/btowc.o ../../../ansi/x86/so/div.o ../../../ansi/x86/so/exit.o ../../../ansi/x86/so/getenv.o ../../../ansi/x86/so/isalnum.o ../../../ansi/x86/so/isalpha.o ../../../ansi/x86/so/isascii.o ../../../ansi/x86/so/isblank.o ../../../ansi/x86/so/iscntrl.o ../../../ansi/x86/so/isdigit.o ../../../ansi/x86/so/isgraph.o ../../../ansi/x86/so/islower.o ../../../ansi/x86/so/isprint.o ../../../ansi/x86/so/ispunct.o ../../../ansi/x86/so/isspace.o ../../../ansi/x86/so/isupper.o ../../../ansi/x86/so/iswalnum.o ../../../ansi/x86/so/iswalpha.o ../../../ansi/x86/so/iswblank.o ../../../ansi/x86/so/iswcntrl.o ../../../ansi/x86/so/iswctype.o ../../../ansi/x86/so/iswdigit.o ../../../ansi/x86/so/iswgraph.o ../../../ansi/x86/so/iswlower.o ../../../ansi/x86/so/iswprint.o ../../../ansi/x86/so/iswpunct.o ../../../ansi/x86/so/iswspace.o ../../../ansi/x86/so/iswupper.o ../../../ansi/x86/so/iswxdigi.o ../../../ansi/x86/so/isxdigit.o ../../../ansi/x86/so/labs.o ../../../ansi/x86/so/ldiv.o ../../../ansi/x86/so/lldiv.o ../../../ansi/x86/so/localeco.o ../../../ansi/x86/so/longjmp.o ../../../ansi/x86/so/mblen.o ../../../ansi/x86/so/mbrlen.o ../../../ansi/x86/so/mbrtowc.o ../../../ansi/x86/so/mbsinit.o ../../../ansi/x86/so/mbsrtowc.o ../../../ansi/x86/so/mbstowcs.o ../../../ansi/x86/so/mbtowc.o ../../../ansi/x86/so/qsort.o ../../../ansi/x86/so/raise.o ../../../ansi/x86/so/rand.o ../../../ansi/x86/so/remove.o ../../../ansi/x86/so/rename.o ../../../ansi/x86/so/setlocal.o ../../../ansi/x86/so/tolower.o ../../../ansi/x86/so/toupper.o ../../../ansi/x86/so/towctran.o ../../../ansi/x86/so/wcrtomb.o ../../../ansi/x86/so/wctob.o ../../../ansi/x86/so/wctomb.o ../../../ansi/x86/so/wctrans.o ../../../ansi/x86/so/wctype.o ../../../ansi/x86/so/xbtowc.o ../../../ansi/x86/so/xcostate.o ../../../ansi/x86/so/xctype.o ../../../ansi/x86/so/xdefloc.o ../../../ansi/x86/so/xdnorm.o ../../../ansi/x86/so/xdscale.o ../../../ansi/x86/so/xdtento.o ../../../ansi/x86/so/xdunscal.o ../../../ansi/x86/so/xfdnorm.o ../../../ansi/x86/so/xfdscale.o ../../../ansi/x86/so/xfdtento.o ../../../ansi/x86/so/xfdunsca.o ../../../ansi/x86/so/xferaise_compat.o ../../../ansi/x86/so/xfindloc.o ../../../ansi/x86/so/xfloat.o ../../../ansi/x86/so/xfreeloc.o ../../../ansi/x86/so/xfvalues.o ../../../ansi/x86/so/xgetloc.o ../../../ansi/x86/so/xldnorm.o ../../../ansi/x86/so/xldscale.o ../../../ansi/x86/so/xldtento.o ../../../ansi/x86/so/xldunsca.o ../../../ansi/x86/so/xloctab.o ../../../ansi/x86/so/xlocterm.o ../../../ansi/x86/so/xlvalues.o ../../../ansi/x86/so/xmakeloc.o ../../../ansi/x86/so/xmakesta.o ../../../ansi/x86/so/xmakewct.o ../../../ansi/x86/so/xmbtowc.o ../../../ansi/x86/so/xmtx.o ../../../ansi/x86/so/xreadloc.o ../../../ansi/x86/so/xsetloc.o ../../../ansi/x86/so/xstate.o ../../../ansi/x86/so/xstod.o ../../../ansi/x86/so/xstof.o ../../../ansi/x86/so/xstoflt.o ../../../ansi/x86/so/xstoint.o ../../../ansi/x86/so/xstold.o ../../../ansi/x86/so/xstopfx.o ../../../ansi/x86/so/xstoxflt.o ../../../ansi/x86/so/xtolotab.o ../../../ansi/x86/so/xtouptab.o ../../../ansi/x86/so/xtowctra.o ../../../ansi/x86/so/xvalues.o ../../../ansi/x86/so/xwcostate.o ../../../ansi/x86/so/xwcstate.o ../../../ansi/x86/so/xwctob.o ../../../ansi/x86/so/xwctomb.o ../../../ansi/x86/so/xwctrtab.o ../../../ansi/x86/so/xwctype.o ../../../ansi/x86/so/xwctytab.o ../../../atomic/x86/so/atomic_add.o ../../../atomic/x86/so/atomic_add_value.o ../../../atomic/x86/so/atomic_clr.o ../../../atomic/x86/so/atomic_clr_value.o ../../../atomic/x86/so/atomic_set.o ../../../atomic/x86/so/atomic_set_value.o ../../../atomic/x86/so/atomic_sub.o ../../../atomic/x86/so/atomic_sub_value.o ../../../atomic/x86/so/atomic_toggle.o ../../../atomic/x86/so/atomic_toggle_value.o ../../../dispatch/x86/so/_thread_pool_thread.o ../../../dispatch/x86/so/data.o ../../../dispatch/x86/so/dispatch.o ../../../dispatch/x86/so/dispatch_select.o ../../../dispatch/x86/so/dispatch_sigwait.o ../../../dispatch/x86/so/message.o ../../../dispatch/x86/so/name.o ../../../dispatch/x86/so/resmgr.o ../../../dispatch/x86/so/resmgr_detach.o ../../../dispatch/x86/so/thread_pool.o ../../../dispatch/x86/so/thread_pool_ctrl.o ../../../dispatch/x86/so/vec_util.o ../../../iofunc/x86/so/_iofunc_create.o ../../../iofunc/x86/so/_iofunc_lock.o ../../../iofunc/x86/so/_iofunc_misc.o ../../../iofunc/x86/so/_iofunc_open.o ../../../iofunc/x86/so/iofunc_attr_init.o ../../../iofunc/x86/so/iofunc_attr_lock.o ../../../iofunc/x86/so/iofunc_attr_trylock.o ../../../iofunc/x86/so/iofunc_attr_unlock.o ../../../iofunc/x86/so/iofunc_check_access.o ../../../iofunc/x86/so/iofunc_chmod.o ../../../iofunc/x86/so/iofunc_chmod_default.o ../../../iofunc/x86/so/iofunc_chown.o ../../../iofunc/x86/so/iofunc_chown_default.o ../../../iofunc/x86/so/iofunc_client_info.o ../../../iofunc/x86/so/iofunc_close_dup.o ../../../iofunc/x86/so/iofunc_close_dup_default.o ../../../iofunc/x86/so/iofunc_close_ocb.o ../../../iofunc/x86/so/iofunc_close_ocb_default.o ../../../iofunc/x86/so/iofunc_devctl.o ../../../iofunc/x86/so/iofunc_devctl_default.o ../../../iofunc/x86/so/iofunc_fdinfo.o ../../../iofunc/x86/so/iofunc_fdinfo_default.o ../../../iofunc/x86/so/iofunc_func_init.o ../../../iofunc/x86/so/iofunc_link.o ../../../iofunc/x86/so/iofunc_llist_lock.o ../../../iofunc/x86/so/iofunc_lock.o ../../../iofunc/x86/so/iofunc_lock_calloc.o ../../../iofunc/x86/so/iofunc_lock_default.o ../../../iofunc/x86/so/iofunc_lock_ocb_default.o ../../../iofunc/x86/so/iofunc_lseek.o ../../../iofunc/x86/so/iofunc_lseek_default.o ../../../iofunc/x86/so/iofunc_mknod.o ../../../iofunc/x86/so/iofunc_mmap.o ../../../iofunc/x86/so/iofunc_mmap_default.o ../../../iofunc/x86/so/iofunc_notify.o ../../../iofunc/x86/so/iofunc_notify_remove.o ../../../iofunc/x86/so/iofunc_notify_trigger.o ../../../iofunc/x86/so/iofunc_ocb_attach.o ../../../iofunc/x86/so/iofunc_ocb_calloc.o ../../../iofunc/x86/so/iofunc_ocb_detach.o ../../../iofunc/x86/so/iofunc_open.o ../../../iofunc/x86/so/iofunc_open_default.o ../../../iofunc/x86/so/iofunc_openfd.o ../../../iofunc/x86/so/iofunc_openfd_default.o ../../../iofunc/x86/so/iofunc_pathconf.o ../../../iofunc/x86/so/iofunc_pathconf_default.o ../../../iofunc/x86/so/iofunc_power.o ../../../iofunc/x86/so/iofunc_power_default.o ../../../iofunc/x86/so/iofunc_read_default.o ../../../iofunc/x86/so/iofunc_read_verify.o ../../../iofunc/x86/so/iofunc_readlink.o ../../../iofunc/x86/so/iofunc_rename.o ../../../iofunc/x86/so/iofunc_sleepon.o ../../../iofunc/x86/so/iofunc_space_verify.o ../../../iofunc/x86/so/iofunc_stat.o ../../../iofunc/x86/so/iofunc_stat_default.o ../../../iofunc/x86/so/iofunc_sync.o ../../../iofunc/x86/so/iofunc_sync_default.o ../../../iofunc/x86/so/iofunc_sync_verify.o ../../../iofunc/x86/so/iofunc_time_update.o ../../../iofunc/x86/so/iofunc_unblock.o ../../../iofunc/x86/so/iofunc_unblock_default.o ../../../iofunc/x86/so/iofunc_unlink.o ../../../iofunc/x86/so/iofunc_unlock_ocb_default.o ../../../iofunc/x86/so/iofunc_utime.o ../../../iofunc/x86/so/iofunc_utime_default.o ../../../iofunc/x86/so/iofunc_write_default.o ../../../iofunc/x86/so/iofunc_write_verify.o ../../../kercalls/x86/so/ChannelConnectAttr.o ../../../kercalls/x86/so/ChannelCreate.o ../../../kercalls/x86/so/ChannelCreateExt.o ../../../kercalls/x86/so/ChannelCreate_r.o ../../../kercalls/x86/so/ChannelDestroy.o ../../../kercalls/x86/so/ChannelDestroy_r.o ../../../kercalls/x86/so/ClockAdjust.o ../../../kercalls/x86/so/ClockAdjust_r.o ../../../kercalls/x86/so/ClockId.o ../../../kercalls/x86/so/ClockId_r.o ../../../kercalls/x86/so/ClockPeriod.o ../../../kercalls/x86/so/ClockPeriod_r.o ../../../kercalls/x86/so/ClockTime.o ../../../kercalls/x86/so/ClockTime_r.o ../../../kercalls/x86/so/ConnectAttach.o ../../../kercalls/x86/so/ConnectAttachExt.o ../../../kercalls/x86/so/ConnectAttach_r.o ../../../kercalls/x86/so/ConnectClientInfo.o ../../../kercalls/x86/so/ConnectClientInfo_r.o ../../../kercalls/x86/so/ConnectDetach.o ../../../kercalls/x86/so/ConnectDetach_r.o ../../../kercalls/x86/so/ConnectFlags.o ../../../kercalls/x86/so/ConnectFlags_r.o ../../../kercalls/x86/so/ConnectServerInfo.o ../../../kercalls/x86/so/ConnectServerInfo_r.o ../../../kercalls/x86/so/InterruptAttach.o ../../../kercalls/x86/so/InterruptAttach_r.o ../../../kercalls/x86/so/InterruptDetach.o ../../../kercalls/x86/so/InterruptDetachFunc.o ../../../kercalls/x86/so/InterruptDetachFunc_r.o ../../../kercalls/x86/so/InterruptDetach_r.o ../../../kercalls/x86/so/InterruptWait.o ../../../kercalls/x86/so/InterruptWait_r.o ../../../kercalls/x86/so/MsgCurrent.o ../../../kercalls/x86/so/MsgCurrent_r.o ../../../kercalls/x86/so/MsgDeliverEvent.o ../../../kercalls/x86/so/MsgDeliverEvent_r.o ../../../kercalls/x86/so/MsgError.o ../../../kercalls/x86/so/MsgError_r.o ../../../kercalls/x86/so/MsgInfo.o ../../../kercalls/x86/so/MsgInfo_r.o ../../../kercalls/x86/so/MsgKeyData.o ../../../kercalls/x86/so/MsgKeyData_r.o ../../../kercalls/x86/so/MsgRead.o ../../../kercalls/x86/so/MsgRead_r.o ../../../kercalls/x86/so/MsgReadiov.o ../../../kercalls/x86/so/MsgReadiov_r.o ../../../kercalls/x86/so/MsgReadv.o ../../../kercalls/x86/so/MsgReadv_r.o ../../../kercalls/x86/so/MsgReceive.o ../../../kercalls/x86/so/MsgReceiveAsyncGbl.o ../../../kercalls/x86/so/MsgReceiveAsyncGbl_r.o ../../../kercalls/x86/so/MsgReceivePulse.o ../../../kercalls/x86/so/MsgReceivePulse_r.o ../../../kercalls/x86/so/MsgReceivePulsev.o ../../../kercalls/x86/so/MsgReceivePulsev_r.o ../../../kercalls/x86/so/MsgReceive_r.o ../../../kercalls/x86/so/MsgReceivev.o ../../../kercalls/x86/so/MsgReceivev_r.o ../../../kercalls/x86/so/MsgReply.o ../../../kercalls/x86/so/MsgReply_r.o ../../../kercalls/x86/so/MsgReplyv.o ../../../kercalls/x86/so/MsgReplyv_r.o ../../../kercalls/x86/so/MsgSend.o ../../../kercalls/x86/so/MsgSendPulse.o ../../../kercalls/x86/so/MsgSendPulse_r.o ../../../kercalls/x86/so/MsgSend_r.o ../../../kercalls/x86/so/MsgSendnc.o ../../../kercalls/x86/so/MsgSendnc_r.o ../../../kercalls/x86/so/MsgSendsv.o ../../../kercalls/x86/so/MsgSendsv_r.o ../../../kercalls/x86/so/MsgSendsvnc.o ../../../kercalls/x86/so/MsgSendsvnc_r.o ../../../kercalls/x86/so/MsgSendv.o ../../../kercalls/x86/so/MsgSendv_r.o ../../../kercalls/x86/so/MsgSendvnc.o ../../../kercalls/x86/so/MsgSendvnc_r.o ../../../kercalls/x86/so/MsgSendvs.o ../../../kercalls/x86/so/MsgSendvs_r.o ../../../kercalls/x86/so/MsgSendvsnc.o ../../../kercalls/x86/so/MsgSendvsnc_r.o ../../../kercalls/x86/so/MsgVerifyEvent.o ../../../kercalls/x86/so/MsgVerifyEvent_r.o ../../../kercalls/x86/so/MsgWrite.o ../../../kercalls/x86/so/MsgWrite_r.o ../../../kercalls/x86/so/MsgWritev.o ../../../kercalls/x86/so/MsgWritev_r.o ../../../kercalls/x86/so/NetCred.o ../../../kercalls/x86/so/NetInfoscoid.o ../../../kercalls/x86/so/NetSignalKill.o ../../../kercalls/x86/so/NetUnblock.o ../../../kercalls/x86/so/NetVtid.o ../../../kercalls/x86/so/SchedCtl.o ../../../kercalls/x86/so/SchedCtl_r.o ../../../kercalls/x86/so/SchedGet.o ../../../kercalls/x86/so/SchedGet_r.o ../../../kercalls/x86/so/SchedInfo.o ../../../kercalls/x86/so/SchedInfo_r.o ../../../kercalls/x86/so/SchedSet.o ../../../kercalls/x86/so/SchedSet_r.o ../../../kercalls/x86/so/SchedYield.o ../../../kercalls/x86/so/SchedYield_r.o ../../../kercalls/x86/so/SignalAction.o ../../../kercalls/x86/so/SignalAction_r.o ../../../kercalls/x86/so/SignalFault.o ../../../kercalls/x86/so/SignalKill.o ../../../kercalls/x86/so/SignalKill_r.o ../../../kercalls/x86/so/SignalProcmask.o ../../../kercalls/x86/so/SignalProcmask_r.o ../../../kercalls/x86/so/SignalReturn.o ../../../kercalls/x86/so/SignalSuspend.o ../../../kercalls/x86/so/SignalSuspend_r.o ../../../kercalls/x86/so/SignalWaitinfo.o ../../../kercalls/x86/so/SignalWaitinfo_r.o ../../../kercalls/x86/so/SyncCondvarSignal.o ../../../kercalls/x86/so/SyncCondvarSignal_r.o ../../../kercalls/x86/so/SyncCondvarWait.o ../../../kercalls/x86/so/SyncCondvarWait_r.o ../../../kercalls/x86/so/SyncCtl.o ../../../kercalls/x86/so/SyncCtl_r.o ../../../kercalls/x86/so/SyncDestroy.o ../../../kercalls/x86/so/SyncDestroy_r.o ../../../kercalls/x86/so/SyncMutexLock.o ../../../kercalls/x86/so/SyncMutexLock_r.o ../../../kercalls/x86/so/SyncMutexRevive.o ../../../kercalls/x86/so/SyncMutexRevive_r.o ../../../kercalls/x86/so/SyncMutexUnlock.o ../../../kercalls/x86/so/SyncMutexUnlock_r.o ../../../kercalls/x86/so/SyncSemPost.o ../../../kercalls/x86/so/SyncSemPost_r.o ../../../kercalls/x86/so/SyncSemWait.o ../../../kercalls/x86/so/SyncSemWait_r.o ../../../kercalls/x86/so/SyncTypeCreate.o ../../../kercalls/x86/so/SyncTypeCreate_r.o ../../../kercalls/x86/so/ThreadCancel.o ../../../kercalls/x86/so/ThreadCancel_r.o ../../../kercalls/x86/so/ThreadCreate.o ../../../kercalls/x86/so/ThreadCreate_r.o ../../../kercalls/x86/so/ThreadCtl.o ../../../kercalls/x86/so/ThreadCtl_r.o ../../../kercalls/x86/so/ThreadDestroy.o ../../../kercalls/x86/so/ThreadDestroy_r.o ../../../kercalls/x86/so/ThreadDetach.o ../../../kercalls/x86/so/ThreadDetach_r.o ../../../kercalls/x86/so/ThreadJoin.o ../../../kercalls/x86/so/ThreadJoin_r.o ../../../kercalls/x86/so/TimerAlarm.o ../../../kercalls/x86/so/TimerAlarm_r.o ../../../kercalls/x86/so/TimerCreate.o ../../../kercalls/x86/so/TimerCreate_r.o ../../../kercalls/x86/so/TimerDestroy.o ../../../kercalls/x86/so/TimerDestroy_r.o ../../../kercalls/x86/so/TimerInfo.o ../../../kercalls/x86/so/TimerInfo_r.o ../../../kercalls/x86/so/TimerSettime.o ../../../kercalls/x86/so/TimerSettime_r.o ../../../kercalls/x86/so/TimerTimeout.o ../../../kercalls/x86/so/TimerTimeout_r.o ../../../kercalls/x86/so/__Ring0.o ../../../kercalls/x86/so/__Ring0_r.o ../../../kercalls/x86/so/__SysCpupageGet.o ../../../kercalls/x86/so/__SysCpupageSet.o ../../../kercalls/x86/so/__interruptmask.o ../../../kercalls/x86/so/__interruptunmask.o ../../../kercalls/x86/so/__ker_err.o ../../../kercalls/x86/so/__kerbad.o ../../../kercalls/x86/so/__kernop.o ../../../kercalls/x86/so/__traceevent.o ../../../kercover/x86/so/InterruptDetachId.o ../../../kercover/x86/so/debugbreak.o ../../../kercover/x86/so/debugkdbreak.o ../../../kercover/x86/so/debugkdoutput.o ../../../kercover/x86/so/interruptattachevent.o ../../../kercover/x86/so/interruptattachevent_r.o ../../../kercover/x86/so/interruptdisable.o ../../../kercover/x86/so/interruptenable.o ../../../kercover/x86/so/interrupthookidle.o ../../../kercover/x86/so/interrupthooktrace.o ../../../kercover/x86/so/interruptlock.o ../../../kercover/x86/so/interruptmask.o ../../../kercover/x86/so/interruptpending.o ../../../kercover/x86/so/interruptunlock.o ../../../kercover/x86/so/interruptunmask.o ../../../kercover/x86/so/msgreceiveasync.o ../../../kercover/x86/so/msgsendasync.o ../../../kercover/x86/so/synccreate.o ../../../kercover/x86/so/synccreate_r.o ../../../kercover/x86/so/syncmutexevent.o ../../../kercover/x86/so/syncmutexevent_r.o ../../../kercover/x86/so/timertimeout.o ../../../kercover/x86/so/timertimeout_r.o ../../../kercover/x86/so/traceevent.o ../../../ldd/x86/so/dladdr.o ../../../ldd/x86/so/ldd.o ../../../ldd/x86/so/main.o ../../../misc/x86/so/clearenv.o ../../../misc/x86/so/delay.o ../../../misc/x86/so/max.o ../../../misc/x86/so/min.o ../../../qnx/x86/so/__getset_thread_name.o ../../../qnx/x86/so/_cmdfd.o ../../../qnx/x86/so/_cmdname.o ../../../qnx/x86/so/_mknod_extra.o ../../../qnx/x86/so/devctl.o ../../../qnx/x86/so/devctlv.o ../../../qnx/x86/so/ftime.o ../../../qnx/x86/so/getprio.o ../../../qnx/x86/so/gettid.o ../../../qnx/x86/so/iofdinfo.o ../../../qnx/x86/so/ionotify.o ../../../qnx/x86/so/ltrunc.o ../../../qnx/x86/so/mmap_device_io.o ../../../qnx/x86/so/mmap_device_memory.o ../../../qnx/x86/so/munmap_device_io.o ../../../qnx/x86/so/munmap_device_memory.o ../../../qnx/x86/so/name_open.o ../../../qnx/x86/so/nanosleep_abs.o ../../../qnx/x86/so/nanosleep_rel.o ../../../qnx/x86/so/nanospin.o ../../../qnx/x86/so/nanospin_count.o ../../../qnx/x86/so/nanospin_ns.o ../../../qnx/x86/so/nanospin_ns_to_count.o ../../../qnx/x86/so/nsec2timespec.o ../../../qnx/x86/so/openfd.o ../../../qnx/x86/so/pthread_getname_np.o ../../../qnx/x86/so/pthread_setname_np.o ../../../qnx/x86/so/pthread_timedjoin.o ../../../qnx/x86/so/readblock.o ../../../qnx/x86/so/readcond.o ../../../qnx/x86/so/searchenv.o ../../../qnx/x86/so/select_block.o ../../../qnx/x86/so/select_event.o ../../../qnx/x86/so/setprio.o ../../../qnx/x86/so/shm_ctl.o ../../../qnx/x86/so/sleepon.o ../../../qnx/x86/so/sopen.o ../../../qnx/x86/so/spawn.o ../../../qnx/x86/so/spawnl.o ../../../qnx/x86/so/spawnle.o ../../../qnx/x86/so/spawnlp.o ../../../qnx/x86/so/spawnlpe.o ../../../qnx/x86/so/spawnp.o ../../../qnx/x86/so/spawnve.o ../../../qnx/x86/so/spawnvpe.o ../../../qnx/x86/so/tcgetsize.o ../../../qnx/x86/so/tcinject.o ../../../qnx/x86/so/tcischars.o ../../../qnx/x86/so/tcsetsize.o ../../../qnx/x86/so/timespec2nsec.o ../../../qnx/x86/so/writeblock.o ../../../resmgr/x86/so/_resmgr_access.o ../../../resmgr/x86/so/_resmgr_close_handler.o ../../../resmgr/x86/so/_resmgr_connect_handler.o ../../../resmgr/x86/so/_resmgr_detach_id.o ../../../resmgr/x86/so/_resmgr_disconnect_handler.o ../../../resmgr/x86/so/_resmgr_dup_handler.o ../../../resmgr/x86/so/_resmgr_handle.o ../../../resmgr/x86/so/_resmgr_handle_grow.o ../../../resmgr/x86/so/_resmgr_handler.o ../../../resmgr/x86/so/_resmgr_io_func.o ../../../resmgr/x86/so/_resmgr_io_handler.o ../../../resmgr/x86/so/_resmgr_iofuncs.o ../../../resmgr/x86/so/_resmgr_link_alloc.o ../../../resmgr/x86/so/_resmgr_link_free.o ../../../resmgr/x86/so/_resmgr_link_handler.o ../../../resmgr/x86/so/_resmgr_link_query.o ../../../resmgr/x86/so/_resmgr_mmap_handler.o ../../../resmgr/x86/so/_resmgr_mount_handler.o ../../../resmgr/x86/so/_resmgr_notify_handler.o ../../../resmgr/x86/so/_resmgr_ocb.o ../../../resmgr/x86/so/_resmgr_openfd_handler.o 
+C:/QNX630/host/win32/x86/usr/bin/ntox86-ar -r  libc_cut.a  ../../../resmgr/x86/so/_resmgr_thread.o ../../../resmgr/x86/so/_resmgr_unbind.o ../../../resmgr/x86/so/_resmgr_unblock_handler.o ../../../resmgr/x86/so/resmgr_again.o ../../../resmgr/x86/so/resmgr_data.o ../../../resmgr/x86/so/resmgr_devino.o ../../../resmgr/x86/so/resmgr_handle_tune.o ../../../resmgr/x86/so/resmgr_iofuncs.o ../../../resmgr/x86/so/resmgr_msgread.o ../../../resmgr/x86/so/resmgr_msgreadv.o ../../../resmgr/x86/so/resmgr_msgwrite.o ../../../resmgr/x86/so/resmgr_msgwritev.o ../../../resmgr/x86/so/resmgr_ocb.o ../../../resmgr/x86/so/resmgr_open_bind.o ../../../resmgr/x86/so/resmgr_pathname.o ../../../resmgr/x86/so/resmgr_pathname_attach.o ../../../resmgr/x86/so/resmgr_pathname_detach.o ../../../resmgr/x86/so/resmgr_pulse_attach.o ../../../resmgr/x86/so/resmgr_pulse_detach.o ../../../resmgr/x86/so/resmgr_start.o ../../../resmgr/x86/so/resmgr_unbind.o ../../../services/x86/so/__netmgr_send.o ../../../services/x86/so/_netmgr_connect.o ../../../services/x86/so/_rsrcdbmgr_pack.o ../../../services/x86/so/netmgr_ctl.o ../../../services/x86/so/netmgr_ndtostr.o ../../../services/x86/so/netmgr_path.o ../../../services/x86/so/netmgr_remote_nd.o ../../../services/x86/so/netmgr_strtond.o ../../../services/x86/so/pathmgr_link.o ../../../services/x86/so/pathmgr_symlink.o ../../../services/x86/so/pathmgr_unlink.o ../../../services/x86/so/pci.o ../../../services/x86/so/pm_get_modes.o ../../../services/x86/so/pm_get_power.o ../../../services/x86/so/pm_set_power.o ../../../services/x86/so/pmd_power.o ../../../services/x86/so/procmgr_daemon.o ../../../services/x86/so/procmgr_event_notify.o ../../../services/x86/so/procmgr_event_trigger.o ../../../services/x86/so/procmgr_guardian.o ../../../services/x86/so/procmgr_session.o ../../../services/x86/so/rsrcdbmgr_attach.o ../../../services/x86/so/rsrcdbmgr_create.o ../../../services/x86/so/rsrcdbmgr_destroy.o ../../../services/x86/so/rsrcdbmgr_detach.o ../../../services/x86/so/rsrcdbmgr_minor_attach.o ../../../services/x86/so/rsrcdbmgr_minor_detach.o ../../../services/x86/so/rsrcdbmgr_query.o ../../../services/x86/so/sysmgr_confstr_set.o ../../../services/x86/so/sysmgr_cpumode.o ../../../services/x86/so/sysmgr_reboot.o ../../../services/x86/so/sysmgr_sysconf_set.o ../../../stdio/x86/so/__fpbufinit.o ../../../stdio/x86/so/__fpinit.o ../../../stdio/x86/so/__parse_oflag.o ../../../stdio/x86/so/_freopen.o ../../../stdio/x86/so/_fsopen.o ../../../stdio/x86/so/_tmpfile.o ../../../stdio/x86/so/clearerr.o ../../../stdio/x86/so/fclose.o ../../../stdio/x86/so/fcloseall.o ../../../stdio/x86/so/fdopen.o ../../../stdio/x86/so/feof.o ../../../stdio/x86/so/ferror.o ../../../stdio/x86/so/fflush.o ../../../stdio/x86/so/fgetc.o ../../../stdio/x86/so/fgetchar.o ../../../stdio/x86/so/fgetpos.o ../../../stdio/x86/so/fgets.o ../../../stdio/x86/so/fgetwc.o ../../../stdio/x86/so/fgetws.o ../../../stdio/x86/so/fileno.o ../../../stdio/x86/so/flockfile.o ../../../stdio/x86/so/fopen.o ../../../stdio/x86/so/fopen64.o ../../../stdio/x86/so/fprintf.o ../../../stdio/x86/so/fputc.o ../../../stdio/x86/so/fputchar.o ../../../stdio/x86/so/fputs.o ../../../stdio/x86/so/fputwc.o ../../../stdio/x86/so/fputws.o ../../../stdio/x86/so/fread.o ../../../stdio/x86/so/freopen.o ../../../stdio/x86/so/freopen64.o ../../../stdio/x86/so/fscanf.o ../../../stdio/x86/so/fseek.o ../../../stdio/x86/so/fseeko.o ../../../stdio/x86/so/fseeko64.o ../../../stdio/x86/so/fsetpos.o ../../../stdio/x86/so/ftell.o ../../../stdio/x86/so/ftello.o ../../../stdio/x86/so/ftello64.o ../../../stdio/x86/so/ftrylockfile.o ../../../stdio/x86/so/funlockfile.o ../../../stdio/x86/so/fwide.o ../../../stdio/x86/so/fwprintf.o ../../../stdio/x86/so/fwrite.o ../../../stdio/x86/so/fwscanf.o ../../../stdio/x86/so/getc.o ../../../stdio/x86/so/getchar.o ../../../stdio/x86/so/gets.o ../../../stdio/x86/so/getwc.o ../../../stdio/x86/so/getwchar.o ../../../stdio/x86/so/perror.o ../../../stdio/x86/so/printf.o ../../../stdio/x86/so/putc.o ../../../stdio/x86/so/putchar.o ../../../stdio/x86/so/puts.o ../../../stdio/x86/so/putwc.o ../../../stdio/x86/so/putwchar.o ../../../stdio/x86/so/rewind.o ../../../stdio/x86/so/scanf.o ../../../stdio/x86/so/setbuf.o ../../../stdio/x86/so/setvbuf.o ../../../stdio/x86/so/snprintf.o ../../../stdio/x86/so/sprintf.o ../../../stdio/x86/so/sscanf.o ../../../stdio/x86/so/strerror.o ../../../stdio/x86/so/swprintf.o ../../../stdio/x86/so/swscanf.o ../../../stdio/x86/so/tmpfile.o ../../../stdio/x86/so/tmpfile64.o ../../../stdio/x86/so/ungetc.o ../../../stdio/x86/so/ungetwc.o ../../../stdio/x86/so/vfprintf.o ../../../stdio/x86/so/vfscanf.o ../../../stdio/x86/so/vfwprint.o ../../../stdio/x86/so/vfwscanf.o ../../../stdio/x86/so/vprintf.o ../../../stdio/x86/so/vscanf.o ../../../stdio/x86/so/vsnprint.o ../../../stdio/x86/so/vsprintf.o ../../../stdio/x86/so/vsscanf.o ../../../stdio/x86/so/vswprint.o ../../../stdio/x86/so/vswscanf.o ../../../stdio/x86/so/vwprintf.o ../../../stdio/x86/so/vwscanf.o ../../../stdio/x86/so/wprintf.o ../../../stdio/x86/so/wscanf.o ../../../stdio/x86/so/xfbuf.o ../../../stdio/x86/so/xfgpos.o ../../../stdio/x86/so/xfiles.o ../../../stdio/x86/so/xfprout.o ../../../stdio/x86/so/xfrprep.o ../../../stdio/x86/so/xfspos.o ../../../stdio/x86/so/xfwprep.o ../../../stdio/x86/so/xgenld.o ../../../stdio/x86/so/xgetfld.o ../../../stdio/x86/so/xgetfloa.o ../../../stdio/x86/so/xgetint.o ../../../stdio/x86/so/xgetstr.o ../../../stdio/x86/so/xldtob.o ../../../stdio/x86/so/xlitob.o ../../../stdio/x86/so/xprintf.o ../../../stdio/x86/so/xputfld.o ../../../stdio/x86/so/xputstr.o ../../../stdio/x86/so/xputtxt.o ../../../stdio/x86/so/xscanf.o ../../../stdio/x86/so/xsnprout.o ../../../stdio/x86/so/xsprout.o ../../../stdio/x86/so/xsyslock.o ../../../stdio/x86/so/xwfprout.o ../../../stdio/x86/so/xwfrprep.o ../../../stdio/x86/so/xwfwprep.o ../../../stdio/x86/so/xwgenld.o ../../../stdio/x86/so/xwgetfld.o ../../../stdio/x86/so/xwgetflo.o ../../../stdio/x86/so/xwgetint.o ../../../stdio/x86/so/xwgetstr.o ../../../stdio/x86/so/xwldtob.o ../../../stdio/x86/so/xwlitob.o ../../../stdio/x86/so/xwprintf.o ../../../stdio/x86/so/xwputfld.o ../../../stdio/x86/so/xwputstr.o ../../../stdio/x86/so/xwputtxt.o ../../../stdio/x86/so/xwscanf.o ../../../stdio/x86/so/xwsprout.o ../../../string/x86/so/atof.o ../../../string/x86/so/atoh.o ../../../string/x86/so/atoi.o ../../../string/x86/so/atol.o ../../../string/x86/so/atoll.o ../../../string/x86/so/bcmp.o ../../../string/x86/so/bcopy.o ../../../string/x86/so/bzero.o ../../../string/x86/so/ffs.o ../../../string/x86/so/index.o ../../../string/x86/so/itoa.o ../../../string/x86/so/lltoa.o ../../../string/x86/so/ltoa.o ../../../string/x86/so/memccpy.o ../../../string/x86/so/memchr.o ../../../string/x86/so/memcmp.o ../../../string/x86/so/memcpy.o ../../../string/x86/so/memcpyv.o ../../../string/x86/so/memicmp.o ../../../string/x86/so/memmove.o ../../../string/x86/so/memset.o ../../../string/x86/so/rindex.o ../../../string/x86/so/straddstr.o ../../../string/x86/so/strcasecmp.o ../../../string/x86/so/strcat.o ../../../string/x86/so/strchr.o ../../../string/x86/so/strcmp.o ../../../string/x86/so/strcoll.o ../../../string/x86/so/strcpy.o ../../../string/x86/so/strcspn.o ../../../string/x86/so/strdup.o ../../../string/x86/so/stricmp.o ../../../string/x86/so/strlen.o ../../../string/x86/so/strlwr.o ../../../string/x86/so/strncasecmp.o ../../../string/x86/so/strncat.o ../../../string/x86/so/strncmp.o ../../../string/x86/so/strncpy.o ../../../string/x86/so/strnicmp.o ../../../string/x86/so/strnset.o ../../../string/x86/so/strpbrk.o ../../../string/x86/so/strrchr.o ../../../string/x86/so/strrev.o ../../../string/x86/so/strset.o ../../../string/x86/so/strspn.o ../../../string/x86/so/strstr.o ../../../string/x86/so/strtod.o ../../../string/x86/so/strtof.o ../../../string/x86/so/strtoimax.o ../../../string/x86/so/strtok.o ../../../string/x86/so/strtok_r.o ../../../string/x86/so/strtol.o ../../../string/x86/so/strtold.o ../../../string/x86/so/strtoll.o ../../../string/x86/so/strtoul.o ../../../string/x86/so/strtoull.o ../../../string/x86/so/strtoumax.o ../../../string/x86/so/strupr.o ../../../string/x86/so/strxfrm.o ../../../string/x86/so/towlower.o ../../../string/x86/so/towupper.o ../../../string/x86/so/ulltoa.o ../../../string/x86/so/ultoa.o ../../../string/x86/so/utoa.o ../../../string/x86/so/wcscat.o ../../../string/x86/so/wcschr.o ../../../string/x86/so/wcscmp.o ../../../string/x86/so/wcscoll.o ../../../string/x86/so/wcscpy.o ../../../string/x86/so/wcscspn.o ../../../string/x86/so/wcslen.o ../../../string/x86/so/wcsncat.o ../../../string/x86/so/wcsncmp.o ../../../string/x86/so/wcsncpy.o ../../../string/x86/so/wcspbrk.o ../../../string/x86/so/wcsrchr.o ../../../string/x86/so/wcsrtomb.o ../../../string/x86/so/wcsspn.o ../../../string/x86/so/wcsstr.o ../../../string/x86/so/wcstod.o ../../../string/x86/so/wcstof.o ../../../string/x86/so/wcstoimax.o ../../../string/x86/so/wcstok.o ../../../string/x86/so/wcstol.o ../../../string/x86/so/wcstold.o ../../../string/x86/so/wcstoll.o ../../../string/x86/so/wcstombs.o ../../../string/x86/so/wcstoul.o ../../../string/x86/so/wcstoull.o ../../../string/x86/so/wcstoumax.o ../../../string/x86/so/wcsxfrm.o ../../../string/x86/so/wmemchr.o ../../../string/x86/so/wmemcmp.o ../../../string/x86/so/wmemcpy.o ../../../string/x86/so/wmemmove.o ../../../string/x86/so/wmemset.o ../../../string/x86/so/xstoll.o ../../../string/x86/so/xstoul.o ../../../string/x86/so/xstoull.o ../../../string/x86/so/xstrxfrm.o ../../../string/x86/so/xwcsxfrm.o ../../../string/x86/so/xwstod.o ../../../string/x86/so/xwstof.o ../../../string/x86/so/xwstoflt.o ../../../string/x86/so/xwstold.o ../../../string/x86/so/xwstoll.o ../../../string/x86/so/xwstopfx.o ../../../string/x86/so/xwstoul.o ../../../string/x86/so/xwstoull.o ../../../string/x86/so/xwstoxfl.o ../../../support/x86/so/_CMain.o ../../../support/x86/so/__cleanup.o ../../../support/x86/so/__get_errno_ptr.o ../../../support/x86/so/__main.o ../../../support/x86/so/__stackavail.o ../../../support/x86/so/__tls.o ../../../support/x86/so/_conf_destroy.o ../../../support/x86/so/_conf_get.o ../../../support/x86/so/_conf_set.o ../../../support/x86/so/_connect.o ../../../support/x86/so/_connect_combine.o ../../../support/x86/so/_connect_ctrl.o ../../../support/x86/so/_connect_entry.o ../../../support/x86/so/_connect_fd.o ../../../support/x86/so/_connect_object.o ../../../support/x86/so/_curbrk.o ../../../support/x86/so/_devctl.o ../../../support/x86/so/_flush_cache.o ../../../support/x86/so/_fullpath.o ../../../support/x86/so/_init_libc.o ../../../support/x86/so/_intr_v86.o ../../../support/x86/so/_math_emu_callout.o ../../../support/x86/so/_math_emu_load.o ../../../support/x86/so/_math_emu_stub.o ../../../support/x86/so/_notifyreadxv.o ../../../support/x86/so/_syspage_time.o ../../../support/x86/so/_unlink_object.o ../../../support/x86/so/_vopen.o ../../../support/x86/so/_writexv.o ../../../time/x86/so/asctime.o ../../../time/x86/so/clock.o ../../../time/x86/so/ctime.o ../../../time/x86/so/ctime_r.o ../../../time/x86/so/difftime.o ../../../time/x86/so/gmtime.o ../../../time/x86/so/gmtime_r.o ../../../time/x86/so/localtim.o ../../../time/x86/so/localtim_r.o ../../../time/x86/so/mktime.o ../../../time/x86/so/strftime.o ../../../time/x86/so/time.o ../../../time/x86/so/tzset.o ../../../time/x86/so/wcsftime.o ../../../time/x86/so/xgentime.o ../../../time/x86/so/xgetdst.o ../../../time/x86/so/xgetrules.o ../../../time/x86/so/xgettime.o ../../../time/x86/so/xgetzone.o ../../../time/x86/so/xisdst.o ../../../time/x86/so/xstrftim.o ../../../time/x86/so/xttotm.o ../../../time/x86/so/xtzset.o ../../../time/x86/so/xwcsftim.o ../../../unix/x86/so/alloca.o ../../../unix/x86/so/cfmakeraw.o ../../../unix/x86/so/cfree.o ../../../unix/x86/so/chroot.o ../../../unix/x86/so/chsize.o ../../../unix/x86/so/daemon.o ../../../unix/x86/so/eof.o ../../../unix/x86/so/err.o ../../../unix/x86/so/errx.o ../../../unix/x86/so/flock.o ../../../unix/x86/so/getdtablesize.o ../../../unix/x86/so/initgroups.o ../../../unix/x86/so/mktemp.o ../../../unix/x86/so/mount.o ../../../unix/x86/so/nap.o ../../../unix/x86/so/napms.o ../../../unix/x86/so/pathfind.o ../../../unix/x86/so/setbuffer.o ../../../unix/x86/so/sethostname.o ../../../unix/x86/so/setlinebuf.o ../../../unix/x86/so/settimeofday.o ../../../unix/x86/so/sigblock.o ../../../unix/x86/so/sigmask.o ../../../unix/x86/so/strsep.o ../../../unix/x86/so/strsignal.o ../../../unix/x86/so/sys_err.o ../../../unix/x86/so/sys_sig.o ../../../unix/x86/so/tcsetsid.o ../../../unix/x86/so/verr.o ../../../unix/x86/so/verrx.o ../../../unix/x86/so/vfork.o ../../../unix/x86/so/vwarn.o ../../../unix/x86/so/vwarnx.o ../../../unix/x86/so/wait3.o ../../../unix/x86/so/wait4.o ../../../unix/x86/so/warn.o ../../../unix/x86/so/warnx.o ../../../xopen/x86/so/__statvfs_check.o ../../../xopen/x86/so/_rand48.o ../../../xopen/x86/so/creat64.o ../../../xopen/x86/so/drand48.o ../../../xopen/x86/so/erand48.o ../../../xopen/x86/so/fchdir.o ../../../xopen/x86/so/fstat64.o ../../../xopen/x86/so/fstatvfs.o ../../../xopen/x86/so/fstatvfs64.o ../../../xopen/x86/so/ftok.o ../../../xopen/x86/so/ftruncate64.o ../../../xopen/x86/so/gethostname.o ../../../xopen/x86/so/getitimer.o ../../../xopen/x86/so/getpgid.o ../../../xopen/x86/so/getpriority.o ../../../xopen/x86/so/getrlimit.o ../../../xopen/x86/so/getrusage.o ../../../xopen/x86/so/getsubopt.o ../../../xopen/x86/so/gettimeofday.o ../../../xopen/x86/so/hsearch.o ../../../xopen/x86/so/ioctl.o ../../../xopen/x86/so/jrand48.o ../../../xopen/x86/so/killpg.o ../../../xopen/x86/so/lcong48.o ../../../xopen/x86/so/lockf.o ../../../xopen/x86/so/lockf64.o ../../../xopen/x86/so/lrand48.o ../../../xopen/x86/so/lsearch.o ../../../xopen/x86/so/mrand48.o ../../../xopen/x86/so/nftw.o ../../../xopen/x86/so/nice.o ../../../xopen/x86/so/nrand48.o ../../../xopen/x86/so/open64.o ../../../xopen/x86/so/poll.o ../../../xopen/x86/so/pread.o ../../../xopen/x86/so/pthread_attr_getguardsize.o ../../../xopen/x86/so/pthread_attr_setguardsize.o ../../../xopen/x86/so/pthread_concurrency.o ../../../xopen/x86/so/putenv.o ../../../xopen/x86/so/pwrite.o ../../../xopen/x86/so/readv.o ../../../xopen/x86/so/realpath.o ../../../xopen/x86/so/seed48.o ../../../xopen/x86/so/setenv.o ../../../xopen/x86/so/setpgrp.o ../../../xopen/x86/so/setpriority.o ../../../xopen/x86/so/setrlimit.o ../../../xopen/x86/so/srand48.o ../../../xopen/x86/so/stat64.o ../../../xopen/x86/so/statvfs.o ../../../xopen/x86/so/statvfs64.o ../../../xopen/x86/so/swab.o ../../../xopen/x86/so/sync.o ../../../xopen/x86/so/syslog.o ../../../xopen/x86/so/tcgetsid.o ../../../xopen/x86/so/times.o ../../../xopen/x86/so/tmpnam.o ../../../xopen/x86/so/truncate.o ../../../xopen/x86/so/truncate64.o ../../../xopen/x86/so/ualarm.o ../../../xopen/x86/so/unsetenv.o ../../../xopen/x86/so/usleep.o ../../../xopen/x86/so/utimes.o ../../../xopen/x86/so/waitid.o ../../../xopen/x86/so/writev.o 
+C:/QNX630/host/win32/x86/usr/bin/rm -f  C:/testqde/workspace/lib/c/lib/x86/so/libcS.a
+C:/QNX630/host/win32/x86/usr/bin/ntox86-ar -r  libc_cut.a  ../../../1/x86/so/__stat_check.o ../../../1/x86/so/access.o ../../../1/x86/so/alarm.o ../../../1/x86/so/cfgetispeed.o ../../../1/x86/so/cfgetospeed.o ../../../1/x86/so/cfsetispeed.o ../../../1/x86/so/cfsetospeed.o ../../../1/x86/so/chdir.o ../../../1/x86/so/chmod.o ../../../1/x86/so/chown.o ../../../1/x86/so/close.o ../../../1/x86/so/creat.o ../../../1/x86/so/ctermid.o ../../../1/x86/so/dup.o ../../../1/x86/so/dup2.o ../../../1/x86/so/execl.o ../../../1/x86/so/execle.o ../../../1/x86/so/execlp.o ../../../1/x86/so/execlpe.o ../../../1/x86/so/execve.o ../../../1/x86/so/execvpe.o ../../../1/x86/so/fchmod.o ../../../1/x86/so/fchown.o ../../../1/x86/so/fcntl.o ../../../1/x86/so/fdatasync.o ../../../1/x86/so/fork.o ../../../1/x86/so/fpathconf.o ../../../1/x86/so/fstat.o ../../../1/x86/so/fsync.o ../../../1/x86/so/futime.o ../../../1/x86/so/getcwd.o ../../../1/x86/so/getegid.o ../../../1/x86/so/geteuid.o ../../../1/x86/so/getgid.o ../../../1/x86/so/getgroups.o ../../../1/x86/so/getpgrp.o ../../../1/x86/so/getpid.o ../../../1/x86/so/getppid.o ../../../1/x86/so/getsid.o ../../../1/x86/so/getuid.o ../../../1/x86/so/iodir.o ../../../1/x86/so/isatty.o ../../../1/x86/so/kill.o ../../../1/x86/so/link.o ../../../1/x86/so/lseek.o ../../../1/x86/so/mkdir.o ../../../1/x86/so/mkfifo.o ../../../1/x86/so/mknod.o ../../../1/x86/so/open.o ../../../1/x86/so/passwd.o ../../../1/x86/so/pathconf.o ../../../1/x86/so/pause.o ../../../1/x86/so/pipe.o ../../../1/x86/so/read.o ../../../1/x86/so/rmdir.o ../../../1/x86/so/setgroups.o ../../../1/x86/so/setids.o ../../../1/x86/so/setpgid.o ../../../1/x86/so/setsid.o ../../../1/x86/so/sigaction.o ../../../1/x86/so/sigaddset.o ../../../1/x86/so/sigdelset.o ../../../1/x86/so/sigempset.o ../../../1/x86/so/sigfillset.o ../../../1/x86/so/sigismem.o ../../../1/x86/so/sigjmp.o ../../../1/x86/so/signal.o ../../../1/x86/so/sigpending.o ../../../1/x86/so/sigprocmask.o ../../../1/x86/so/sigsetjmp.o ../../../1/x86/so/sigstub.o ../../../1/x86/so/sigsuspend.o ../../../1/x86/so/sleep.o ../../../1/x86/so/stat.o ../../../1/x86/so/sysconf.o ../../../1/x86/so/tcdrain.o ../../../1/x86/so/tcdropline.o ../../../1/x86/so/tcflow.o ../../../1/x86/so/tcflush.o ../../../1/x86/so/tcgetattr.o ../../../1/x86/so/tcgetpgrp.o ../../../1/x86/so/tcsendbreak.o ../../../1/x86/so/tcsetattr.o ../../../1/x86/so/tcsetpgrp.o ../../../1/x86/so/ttyname.o ../../../1/x86/so/umask.o ../../../1/x86/so/uname.o ../../../1/x86/so/unlink.o ../../../1/x86/so/utime.o ../../../1/x86/so/wait.o ../../../1/x86/so/waitpid.o ../../../1/x86/so/write.o ../../../1a/x86/so/basename.o ../../../1a/x86/so/confstr.o ../../../1a/x86/so/dirname.o ../../../1a/x86/so/fnmatch.o ../../../1a/x86/so/getopt.o ../../../1a/x86/so/readlink.o ../../../1a/x86/so/symlink.o ../../../1a/x86/so/system.o ../../../1b/x86/so/__mq_check.o ../../../1b/x86/so/_aio_init.o ../../../1b/x86/so/aio_cancel.o ../../../1b/x86/so/aio_error.o ../../../1b/x86/so/aio_fsync.o ../../../1b/x86/so/aio_read.o ../../../1b/x86/so/aio_return.o ../../../1b/x86/so/aio_suspend.o ../../../1b/x86/so/aio_write.o ../../../1b/x86/so/clock_getres.o ../../../1b/x86/so/clock_gettime.o ../../../1b/x86/so/clock_settime.o ../../../1b/x86/so/ftruncate.o ../../../1b/x86/so/lio_listio.o ../../../1b/x86/so/mlock.o ../../../1b/x86/so/mlockall.o ../../../1b/x86/so/mmap.o ../../../1b/x86/so/mphys.o ../../../1b/x86/so/mprotect.o ../../../1b/x86/so/mq_close.o ../../../1b/x86/so/mq_getattr.o ../../../1b/x86/so/mq_notify.o ../../../1b/x86/so/mq_open.o ../../../1b/x86/so/mq_receive.o ../../../1b/x86/so/mq_send.o ../../../1b/x86/so/mq_setattr.o ../../../1b/x86/so/mq_unlink.o ../../../1b/x86/so/msync.o ../../../1b/x86/so/munlock.o ../../../1b/x86/so/munlockall.o ../../../1b/x86/so/munmap.o ../../../1b/x86/so/nanosleep.o ../../../1b/x86/so/sched_get_priority_max.o ../../../1b/x86/so/sched_get_priority_min.o ../../../1b/x86/so/sched_getparam.o ../../../1b/x86/so/sched_getscheduler.o ../../../1b/x86/so/sched_rr_get_interval.o ../../../1b/x86/so/sched_setparam.o ../../../1b/x86/so/sched_setscheduler.o ../../../1b/x86/so/sched_yield.o ../../../1b/x86/so/sem_close.o ../../../1b/x86/so/sem_destroy.o ../../../1b/x86/so/sem_getvalue.o ../../../1b/x86/so/sem_init.o ../../../1b/x86/so/sem_open.o ../../../1b/x86/so/sem_post.o ../../../1b/x86/so/sem_trywait.o ../../../1b/x86/so/sem_unlink.o ../../../1b/x86/so/sem_wait.o ../../../1b/x86/so/shm_close.o ../../../1b/x86/so/shm_open.o ../../../1b/x86/so/shm_unlink.o ../../../1b/x86/so/sigqueue.o ../../../1b/x86/so/sigtimedwait.o ../../../1b/x86/so/sigwait.o ../../../1b/x86/so/sigwaitinfo.o ../../../1b/x86/so/timer_create.o ../../../1b/x86/so/timer_delete.o ../../../1b/x86/so/timer_getoverrun.o ../../../1b/x86/so/timer_gettime.o ../../../1b/x86/so/timer_settime.o ../../../1c/x86/so/__my_thread_exit.o ../../../1c/x86/so/pthread_atfork.o ../../../1c/x86/so/pthread_attr_default.o ../../../1c/x86/so/pthread_attr_destroy.o ../../../1c/x86/so/pthread_attr_getdetachstate.o ../../../1c/x86/so/pthread_attr_getinheritsched.o ../../../1c/x86/so/pthread_attr_getschedparam.o ../../../1c/x86/so/pthread_attr_getschedpolicy.o ../../../1c/x86/so/pthread_attr_getscope.o ../../../1c/x86/so/pthread_attr_getstack.o ../../../1c/x86/so/pthread_attr_getstackaddr.o ../../../1c/x86/so/pthread_attr_getstacklazy.o ../../../1c/x86/so/pthread_attr_getstackprealloc.o ../../../1c/x86/so/pthread_attr_getstacksize.o ../../../1c/x86/so/pthread_attr_init.o ../../../1c/x86/so/pthread_attr_setdetachstate.o ../../../1c/x86/so/pthread_attr_setinheritsched.o ../../../1c/x86/so/pthread_attr_setschedparam.o ../../../1c/x86/so/pthread_attr_setschedpolicy.o ../../../1c/x86/so/pthread_attr_setscope.o ../../../1c/x86/so/pthread_attr_setstack.o ../../../1c/x86/so/pthread_attr_setstackaddr.o ../../../1c/x86/so/pthread_attr_setstacklazy.o ../../../1c/x86/so/pthread_attr_setstackprealloc.o ../../../1c/x86/so/pthread_attr_setstacksize.o ../../../1c/x86/so/pthread_cancel.o ../../../1c/x86/so/pthread_cond_broadcast.o ../../../1c/x86/so/pthread_cond_destroy.o ../../../1c/x86/so/pthread_cond_init.o ../../../1c/x86/so/pthread_cond_signal.o ../../../1c/x86/so/pthread_cond_timedwait.o ../../../1c/x86/so/pthread_cond_wait.o ../../../1c/x86/so/pthread_condattr_destroy.o ../../../1c/x86/so/pthread_condattr_init.o ../../../1c/x86/so/pthread_condattr_shared.o ../../../1c/x86/so/pthread_create.o ../../../1c/x86/so/pthread_detach.o ../../../1c/x86/so/pthread_equal.o ../../../1c/x86/so/pthread_exit.o ../../../1c/x86/so/pthread_getschedparam.o ../../../1c/x86/so/pthread_getspecific.o ../../../1c/x86/so/pthread_join.o ../../../1c/x86/so/pthread_key_create.o ../../../1c/x86/so/pthread_key_data.o ../../../1c/x86/so/pthread_key_delete.o ../../../1c/x86/so/pthread_kill.o ../../../1c/x86/so/pthread_mutex_destroy.o ../../../1c/x86/so/pthread_mutex_init.o ../../../1c/x86/so/pthread_mutex_lock.o ../../../1c/x86/so/pthread_mutex_prioceiling.o ../../../1c/x86/so/pthread_mutex_trylock.o ../../../1c/x86/so/pthread_mutex_unlock.o ../../../1c/x86/so/pthread_mutexattr_destroy.o ../../../1c/x86/so/pthread_mutexattr_getprioceiling.o ../../../1c/x86/so/pthread_mutexattr_getprotocol.o ../../../1c/x86/so/pthread_mutexattr_getrecursive.o ../../../1c/x86/so/pthread_mutexattr_getshared.o ../../../1c/x86/so/pthread_mutexattr_gettype.o ../../../1c/x86/so/pthread_mutexattr_init.o ../../../1c/x86/so/pthread_mutexattr_setprioceiling.o ../../../1c/x86/so/pthread_mutexattr_setprotocol.o ../../../1c/x86/so/pthread_mutexattr_setrecursive.o ../../../1c/x86/so/pthread_mutexattr_setshared.o ../../../1c/x86/so/pthread_mutexattr_settype.o ../../../1c/x86/so/pthread_once.o ../../../1c/x86/so/pthread_rwlock_destroy.o ../../../1c/x86/so/pthread_rwlock_exclusive.o ../../../1c/x86/so/pthread_rwlock_init.o ../../../1c/x86/so/pthread_rwlock_shared.o ../../../1c/x86/so/pthread_rwlock_unlock.o ../../../1c/x86/so/pthread_rwlockattr_destroy.o ../../../1c/x86/so/pthread_rwlockattr_getpshared.o ../../../1c/x86/so/pthread_rwlockattr_init.o ../../../1c/x86/so/pthread_rwlockattr_setpshared.o ../../../1c/x86/so/pthread_self.o ../../../1c/x86/so/pthread_setcancelstate.o ../../../1c/x86/so/pthread_setcanceltype.o ../../../1c/x86/so/pthread_setschedparam.o ../../../1c/x86/so/pthread_setspecific.o ../../../1c/x86/so/pthread_sigmask.o ../../../1c/x86/so/pthread_testcancel.o ../../../1c/x86/so/ttyname_r.o ../../../1d/x86/so/clock_getcpuclockid.o ../../../1d/x86/so/mq_timedreceive.o ../../../1d/x86/so/mq_timedsend.o ../../../1d/x86/so/posix_fadvise.o ../../../1d/x86/so/posix_fallocate.o ../../../1d/x86/so/posix_madvise.o ../../../1d/x86/so/posix_memalign.o ../../../1d/x86/so/posix_spawn.o ../../../1d/x86/so/posix_spawnp.o ../../../1d/x86/so/pthread_getcpuclockid.o ../../../1d/x86/so/pthread_mutex_timedlock.o ../../../1d/x86/so/sem_timedwait.o ../../../1g/x86/so/inet_ntop.o ../../../1g/x86/so/inet_pton.o ../../../1g/x86/so/isfdtype.o ../../../1g/x86/so/tohn.o ../../../1j/x86/so/_pthread_spin_destroy.o ../../../1j/x86/so/_pthread_spin_init.o ../../../1j/x86/so/_pthread_spin_lock.o ../../../1j/x86/so/_pthread_spin_trylock.o ../../../1j/x86/so/_pthread_spin_unlock.o ../../../1j/x86/so/_spin_destroy.o ../../../1j/x86/so/_spin_destroy_v.o ../../../1j/x86/so/_spin_init.o ../../../1j/x86/so/_spin_init_v.o ../../../1j/x86/so/_spin_lock_v.o ../../../1j/x86/so/_spin_trylock_v.o ../../../1j/x86/so/_spin_unlock_v.o ../../../1j/x86/so/barrier_attr_destroy.o ../../../1j/x86/so/barrier_attr_getpshared.o ../../../1j/x86/so/barrier_attr_init.o ../../../1j/x86/so/barrier_attr_setpshared.o ../../../1j/x86/so/barrier_destroy.o ../../../1j/x86/so/barrier_init.o ../../../1j/x86/so/barrier_wait.o ../../../1j/x86/so/clock_nanosleep.o ../../../1j/x86/so/mem_access_clear.o ../../../1j/x86/so/mem_access_set.o ../../../1j/x86/so/mem_get_info.o ../../../1j/x86/so/mem_offset.o ../../../1j/x86/so/pthread_abort.o ../../../1j/x86/so/pthread_condattr_getclock.o ../../../1j/x86/so/pthread_condattr_setclock.o ../../../1j/x86/so/pthread_spin_destroy.o ../../../1j/x86/so/pthread_spin_init.o ../../../1j/x86/so/pthread_spin_lock.o ../../../1j/x86/so/pthread_spin_trylock.o ../../../1j/x86/so/pthread_spin_unlock.o ../../../1j/x86/so/spin_destroy.o ../../../1j/x86/so/spin_init.o ../../../1j/x86/so/spin_lock.o ../../../1j/x86/so/spin_trylock.o ../../../1j/x86/so/spin_unlock.o ../../../1j/x86/so/timer_getexpstatus.o ../../../1j/x86/so/typed_mem_open.o ../../../alloc/x86/so/_calloc.o ../../../alloc/x86/so/_free.o ../../../alloc/x86/so/_malloc.o ../../../alloc/x86/so/_malloc_pc.o ../../../alloc/x86/so/_memalign.o ../../../alloc/x86/so/_memalign_pc.o ../../../alloc/x86/so/_posix_memalign.o ../../../alloc/x86/so/_realloc.o ../../../alloc/x86/so/_salloc_data.o ../../../alloc/x86/so/amblksiz.o ../../../alloc/x86/so/amhiwater.o ../../../alloc/x86/so/band.o ../../../alloc/x86/so/barena.o ../../../alloc/x86/so/compat.o ../../../alloc/x86/so/core.o ../../../alloc/x86/so/dlist.o ../../../alloc/x86/so/flist.o ../../../alloc/x86/so/malloc-config.o ../../../alloc/x86/so/malloc.o ../../../alloc/x86/so/mdump.o ../../../alloc/x86/so/util.o ../../../ansi/x86/so/__cxa_atexit.o ../../../ansi/x86/so/__cxa_finalize.o ../../../ansi/x86/so/__exit.o ../../../ansi/x86/so/_atexit.o ../../../ansi/x86/so/_cleanup.o ../../../ansi/x86/so/_exit.o ../../../ansi/x86/so/_findenv.o ../../../ansi/x86/so/_jmp.o ../../../ansi/x86/so/abort.o ../../../ansi/x86/so/abs.o ../../../ansi/x86/so/assert.o ../../../ansi/x86/so/atexit.o ../../../ansi/x86/so/bsearch.o ../../../ansi/x86/so/btowc.o ../../../ansi/x86/so/div.o ../../../ansi/x86/so/exit.o ../../../ansi/x86/so/getenv.o ../../../ansi/x86/so/isalnum.o ../../../ansi/x86/so/isalpha.o ../../../ansi/x86/so/isascii.o ../../../ansi/x86/so/isblank.o ../../../ansi/x86/so/iscntrl.o ../../../ansi/x86/so/isdigit.o ../../../ansi/x86/so/isgraph.o ../../../ansi/x86/so/islower.o ../../../ansi/x86/so/isprint.o ../../../ansi/x86/so/ispunct.o ../../../ansi/x86/so/isspace.o ../../../ansi/x86/so/isupper.o ../../../ansi/x86/so/iswalnum.o ../../../ansi/x86/so/iswalpha.o ../../../ansi/x86/so/iswblank.o ../../../ansi/x86/so/iswcntrl.o ../../../ansi/x86/so/iswctype.o ../../../ansi/x86/so/iswdigit.o ../../../ansi/x86/so/iswgraph.o ../../../ansi/x86/so/iswlower.o ../../../ansi/x86/so/iswprint.o ../../../ansi/x86/so/iswpunct.o ../../../ansi/x86/so/iswspace.o ../../../ansi/x86/so/iswupper.o ../../../ansi/x86/so/iswxdigi.o ../../../ansi/x86/so/isxdigit.o ../../../ansi/x86/so/labs.o ../../../ansi/x86/so/ldiv.o ../../../ansi/x86/so/lldiv.o ../../../ansi/x86/so/localeco.o ../../../ansi/x86/so/longjmp.o ../../../ansi/x86/so/mblen.o ../../../ansi/x86/so/mbrlen.o ../../../ansi/x86/so/mbrtowc.o ../../../ansi/x86/so/mbsinit.o ../../../ansi/x86/so/mbsrtowc.o ../../../ansi/x86/so/mbstowcs.o ../../../ansi/x86/so/mbtowc.o ../../../ansi/x86/so/qsort.o ../../../ansi/x86/so/raise.o ../../../ansi/x86/so/rand.o ../../../ansi/x86/so/remove.o ../../../ansi/x86/so/rename.o ../../../ansi/x86/so/setlocal.o ../../../ansi/x86/so/tolower.o ../../../ansi/x86/so/toupper.o ../../../ansi/x86/so/towctran.o ../../../ansi/x86/so/wcrtomb.o ../../../ansi/x86/so/wctob.o ../../../ansi/x86/so/wctomb.o ../../../ansi/x86/so/wctrans.o ../../../ansi/x86/so/wctype.o ../../../ansi/x86/so/xbtowc.o ../../../ansi/x86/so/xcostate.o ../../../ansi/x86/so/xctype.o ../../../ansi/x86/so/xdefloc.o ../../../ansi/x86/so/xdnorm.o ../../../ansi/x86/so/xdscale.o ../../../ansi/x86/so/xdtento.o ../../../ansi/x86/so/xdunscal.o ../../../ansi/x86/so/xfdnorm.o ../../../ansi/x86/so/xfdscale.o ../../../ansi/x86/so/xfdtento.o ../../../ansi/x86/so/xfdunsca.o ../../../ansi/x86/so/xferaise_compat.o ../../../ansi/x86/so/xfindloc.o ../../../ansi/x86/so/xfloat.o ../../../ansi/x86/so/xfreeloc.o ../../../ansi/x86/so/xfvalues.o ../../../ansi/x86/so/xgetloc.o ../../../ansi/x86/so/xldnorm.o ../../../ansi/x86/so/xldscale.o ../../../ansi/x86/so/xldtento.o ../../../ansi/x86/so/xldunsca.o ../../../ansi/x86/so/xloctab.o ../../../ansi/x86/so/xlocterm.o ../../../ansi/x86/so/xlvalues.o ../../../ansi/x86/so/xmakeloc.o ../../../ansi/x86/so/xmakesta.o ../../../ansi/x86/so/xmakewct.o ../../../ansi/x86/so/xmbtowc.o ../../../ansi/x86/so/xmtx.o ../../../ansi/x86/so/xreadloc.o ../../../ansi/x86/so/xsetloc.o ../../../ansi/x86/so/xstate.o ../../../ansi/x86/so/xstod.o ../../../ansi/x86/so/xstof.o ../../../ansi/x86/so/xstoflt.o ../../../ansi/x86/so/xstoint.o ../../../ansi/x86/so/xstold.o ../../../ansi/x86/so/xstopfx.o ../../../ansi/x86/so/xstoxflt.o ../../../ansi/x86/so/xtolotab.o ../../../ansi/x86/so/xtouptab.o ../../../ansi/x86/so/xtowctra.o ../../../ansi/x86/so/xvalues.o ../../../ansi/x86/so/xwcostate.o ../../../ansi/x86/so/xwcstate.o ../../../ansi/x86/so/xwctob.o ../../../ansi/x86/so/xwctomb.o ../../../ansi/x86/so/xwctrtab.o ../../../ansi/x86/so/xwctype.o ../../../ansi/x86/so/xwctytab.o ../../../atomic/x86/so/atomic_add.o ../../../atomic/x86/so/atomic_add_value.o ../../../atomic/x86/so/atomic_clr.o ../../../atomic/x86/so/atomic_clr_value.o ../../../atomic/x86/so/atomic_set.o ../../../atomic/x86/so/atomic_set_value.o ../../../atomic/x86/so/atomic_sub.o ../../../atomic/x86/so/atomic_sub_value.o ../../../atomic/x86/so/atomic_toggle.o ../../../atomic/x86/so/atomic_toggle_value.o ../../../dispatch/x86/so/_thread_pool_thread.o ../../../dispatch/x86/so/data.o ../../../dispatch/x86/so/dispatch.o ../../../dispatch/x86/so/dispatch_select.o ../../../dispatch/x86/so/dispatch_sigwait.o ../../../dispatch/x86/so/message.o ../../../dispatch/x86/so/name.o ../../../dispatch/x86/so/resmgr.o ../../../dispatch/x86/so/resmgr_detach.o ../../../dispatch/x86/so/thread_pool.o ../../../dispatch/x86/so/thread_pool_ctrl.o ../../../dispatch/x86/so/vec_util.o ../../../iofunc/x86/so/_iofunc_create.o ../../../iofunc/x86/so/_iofunc_lock.o ../../../iofunc/x86/so/_iofunc_misc.o ../../../iofunc/x86/so/_iofunc_open.o ../../../iofunc/x86/so/iofunc_attr_init.o ../../../iofunc/x86/so/iofunc_attr_lock.o ../../../iofunc/x86/so/iofunc_attr_trylock.o ../../../iofunc/x86/so/iofunc_attr_unlock.o ../../../iofunc/x86/so/iofunc_check_access.o ../../../iofunc/x86/so/iofunc_chmod.o ../../../iofunc/x86/so/iofunc_chmod_default.o ../../../iofunc/x86/so/iofunc_chown.o ../../../iofunc/x86/so/iofunc_chown_default.o ../../../iofunc/x86/so/iofunc_client_info.o ../../../iofunc/x86/so/iofunc_close_dup.o ../../../iofunc/x86/so/iofunc_close_dup_default.o ../../../iofunc/x86/so/iofunc_close_ocb.o ../../../iofunc/x86/so/iofunc_close_ocb_default.o ../../../iofunc/x86/so/iofunc_devctl.o ../../../iofunc/x86/so/iofunc_devctl_default.o ../../../iofunc/x86/so/iofunc_fdinfo.o ../../../iofunc/x86/so/iofunc_fdinfo_default.o ../../../iofunc/x86/so/iofunc_func_init.o ../../../iofunc/x86/so/iofunc_link.o ../../../iofunc/x86/so/iofunc_llist_lock.o ../../../iofunc/x86/so/iofunc_lock.o ../../../iofunc/x86/so/iofunc_lock_calloc.o ../../../iofunc/x86/so/iofunc_lock_default.o ../../../iofunc/x86/so/iofunc_lock_ocb_default.o ../../../iofunc/x86/so/iofunc_lseek.o ../../../iofunc/x86/so/iofunc_lseek_default.o ../../../iofunc/x86/so/iofunc_mknod.o ../../../iofunc/x86/so/iofunc_mmap.o ../../../iofunc/x86/so/iofunc_mmap_default.o ../../../iofunc/x86/so/iofunc_notify.o ../../../iofunc/x86/so/iofunc_notify_remove.o ../../../iofunc/x86/so/iofunc_notify_trigger.o ../../../iofunc/x86/so/iofunc_ocb_attach.o ../../../iofunc/x86/so/iofunc_ocb_calloc.o ../../../iofunc/x86/so/iofunc_ocb_detach.o ../../../iofunc/x86/so/iofunc_open.o ../../../iofunc/x86/so/iofunc_open_default.o ../../../iofunc/x86/so/iofunc_openfd.o ../../../iofunc/x86/so/iofunc_openfd_default.o ../../../iofunc/x86/so/iofunc_pathconf.o ../../../iofunc/x86/so/iofunc_pathconf_default.o ../../../iofunc/x86/so/iofunc_power.o ../../../iofunc/x86/so/iofunc_power_default.o ../../../iofunc/x86/so/iofunc_read_default.o ../../../iofunc/x86/so/iofunc_read_verify.o ../../../iofunc/x86/so/iofunc_readlink.o ../../../iofunc/x86/so/iofunc_rename.o ../../../iofunc/x86/so/iofunc_sleepon.o ../../../iofunc/x86/so/iofunc_space_verify.o ../../../iofunc/x86/so/iofunc_stat.o ../../../iofunc/x86/so/iofunc_stat_default.o ../../../iofunc/x86/so/iofunc_sync.o ../../../iofunc/x86/so/iofunc_sync_default.o ../../../iofunc/x86/so/iofunc_sync_verify.o ../../../iofunc/x86/so/iofunc_time_update.o ../../../iofunc/x86/so/iofunc_unblock.o ../../../iofunc/x86/so/iofunc_unblock_default.o ../../../iofunc/x86/so/iofunc_unlink.o ../../../iofunc/x86/so/iofunc_unlock_ocb_default.o ../../../iofunc/x86/so/iofunc_utime.o ../../../iofunc/x86/so/iofunc_utime_default.o ../../../iofunc/x86/so/iofunc_write_default.o ../../../iofunc/x86/so/iofunc_write_verify.o ../../../kercalls/x86/so/ChannelConnectAttr.o ../../../kercalls/x86/so/ChannelCreate.o ../../../kercalls/x86/so/ChannelCreateExt.o ../../../kercalls/x86/so/ChannelCreate_r.o ../../../kercalls/x86/so/ChannelDestroy.o ../../../kercalls/x86/so/ChannelDestroy_r.o ../../../kercalls/x86/so/ClockAdjust.o ../../../kercalls/x86/so/ClockAdjust_r.o ../../../kercalls/x86/so/ClockId.o ../../../kercalls/x86/so/ClockId_r.o ../../../kercalls/x86/so/ClockPeriod.o ../../../kercalls/x86/so/ClockPeriod_r.o ../../../kercalls/x86/so/ClockTime.o ../../../kercalls/x86/so/ClockTime_r.o ../../../kercalls/x86/so/ConnectAttach.o ../../../kercalls/x86/so/ConnectAttachExt.o ../../../kercalls/x86/so/ConnectAttach_r.o ../../../kercalls/x86/so/ConnectClientInfo.o ../../../kercalls/x86/so/ConnectClientInfo_r.o ../../../kercalls/x86/so/ConnectDetach.o ../../../kercalls/x86/so/ConnectDetach_r.o ../../../kercalls/x86/so/ConnectFlags.o ../../../kercalls/x86/so/ConnectFlags_r.o ../../../kercalls/x86/so/ConnectServerInfo.o ../../../kercalls/x86/so/ConnectServerInfo_r.o ../../../kercalls/x86/so/InterruptAttach.o ../../../kercalls/x86/so/InterruptAttach_r.o ../../../kercalls/x86/so/InterruptDetach.o ../../../kercalls/x86/so/InterruptDetachFunc.o ../../../kercalls/x86/so/InterruptDetachFunc_r.o ../../../kercalls/x86/so/InterruptDetach_r.o ../../../kercalls/x86/so/InterruptWait.o ../../../kercalls/x86/so/InterruptWait_r.o ../../../kercalls/x86/so/MsgCurrent.o ../../../kercalls/x86/so/MsgCurrent_r.o ../../../kercalls/x86/so/MsgDeliverEvent.o ../../../kercalls/x86/so/MsgDeliverEvent_r.o ../../../kercalls/x86/so/MsgError.o ../../../kercalls/x86/so/MsgError_r.o ../../../kercalls/x86/so/MsgInfo.o ../../../kercalls/x86/so/MsgInfo_r.o ../../../kercalls/x86/so/MsgKeyData.o ../../../kercalls/x86/so/MsgKeyData_r.o ../../../kercalls/x86/so/MsgRead.o ../../../kercalls/x86/so/MsgRead_r.o ../../../kercalls/x86/so/MsgReadiov.o ../../../kercalls/x86/so/MsgReadiov_r.o ../../../kercalls/x86/so/MsgReadv.o ../../../kercalls/x86/so/MsgReadv_r.o ../../../kercalls/x86/so/MsgReceive.o ../../../kercalls/x86/so/MsgReceiveAsyncGbl.o ../../../kercalls/x86/so/MsgReceiveAsyncGbl_r.o ../../../kercalls/x86/so/MsgReceivePulse.o ../../../kercalls/x86/so/MsgReceivePulse_r.o ../../../kercalls/x86/so/MsgReceivePulsev.o ../../../kercalls/x86/so/MsgReceivePulsev_r.o ../../../kercalls/x86/so/MsgReceive_r.o ../../../kercalls/x86/so/MsgReceivev.o ../../../kercalls/x86/so/MsgReceivev_r.o ../../../kercalls/x86/so/MsgReply.o ../../../kercalls/x86/so/MsgReply_r.o ../../../kercalls/x86/so/MsgReplyv.o ../../../kercalls/x86/so/MsgReplyv_r.o ../../../kercalls/x86/so/MsgSend.o ../../../kercalls/x86/so/MsgSendPulse.o ../../../kercalls/x86/so/MsgSendPulse_r.o ../../../kercalls/x86/so/MsgSend_r.o ../../../kercalls/x86/so/MsgSendnc.o ../../../kercalls/x86/so/MsgSendnc_r.o ../../../kercalls/x86/so/MsgSendsv.o ../../../kercalls/x86/so/MsgSendsv_r.o ../../../kercalls/x86/so/MsgSendsvnc.o ../../../kercalls/x86/so/MsgSendsvnc_r.o ../../../kercalls/x86/so/MsgSendv.o ../../../kercalls/x86/so/MsgSendv_r.o ../../../kercalls/x86/so/MsgSendvnc.o ../../../kercalls/x86/so/MsgSendvnc_r.o ../../../kercalls/x86/so/MsgSendvs.o ../../../kercalls/x86/so/MsgSendvs_r.o ../../../kercalls/x86/so/MsgSendvsnc.o ../../../kercalls/x86/so/MsgSendvsnc_r.o ../../../kercalls/x86/so/MsgVerifyEvent.o ../../../kercalls/x86/so/MsgVerifyEvent_r.o ../../../kercalls/x86/so/MsgWrite.o ../../../kercalls/x86/so/MsgWrite_r.o ../../../kercalls/x86/so/MsgWritev.o ../../../kercalls/x86/so/MsgWritev_r.o ../../../kercalls/x86/so/NetCred.o ../../../kercalls/x86/so/NetInfoscoid.o ../../../kercalls/x86/so/NetSignalKill.o ../../../kercalls/x86/so/NetUnblock.o ../../../kercalls/x86/so/NetVtid.o ../../../kercalls/x86/so/SchedCtl.o ../../../kercalls/x86/so/SchedCtl_r.o ../../../kercalls/x86/so/SchedGet.o ../../../kercalls/x86/so/SchedGet_r.o ../../../kercalls/x86/so/SchedInfo.o ../../../kercalls/x86/so/SchedInfo_r.o ../../../kercalls/x86/so/SchedSet.o ../../../kercalls/x86/so/SchedSet_r.o ../../../kercalls/x86/so/SchedYield.o ../../../kercalls/x86/so/SchedYield_r.o ../../../kercalls/x86/so/SignalAction.o ../../../kercalls/x86/so/SignalAction_r.o ../../../kercalls/x86/so/SignalFault.o ../../../kercalls/x86/so/SignalKill.o ../../../kercalls/x86/so/SignalKill_r.o ../../../kercalls/x86/so/SignalProcmask.o ../../../kercalls/x86/so/SignalProcmask_r.o ../../../kercalls/x86/so/SignalReturn.o ../../../kercalls/x86/so/SignalSuspend.o ../../../kercalls/x86/so/SignalSuspend_r.o ../../../kercalls/x86/so/SignalWaitinfo.o ../../../kercalls/x86/so/SignalWaitinfo_r.o ../../../kercalls/x86/so/SyncCondvarSignal.o ../../../kercalls/x86/so/SyncCondvarSignal_r.o ../../../kercalls/x86/so/SyncCondvarWait.o ../../../kercalls/x86/so/SyncCondvarWait_r.o ../../../kercalls/x86/so/SyncCtl.o ../../../kercalls/x86/so/SyncCtl_r.o ../../../kercalls/x86/so/SyncDestroy.o ../../../kercalls/x86/so/SyncDestroy_r.o ../../../kercalls/x86/so/SyncMutexLock.o ../../../kercalls/x86/so/SyncMutexLock_r.o ../../../kercalls/x86/so/SyncMutexRevive.o ../../../kercalls/x86/so/SyncMutexRevive_r.o ../../../kercalls/x86/so/SyncMutexUnlock.o ../../../kercalls/x86/so/SyncMutexUnlock_r.o ../../../kercalls/x86/so/SyncSemPost.o ../../../kercalls/x86/so/SyncSemPost_r.o ../../../kercalls/x86/so/SyncSemWait.o ../../../kercalls/x86/so/SyncSemWait_r.o ../../../kercalls/x86/so/SyncTypeCreate.o ../../../kercalls/x86/so/SyncTypeCreate_r.o ../../../kercalls/x86/so/ThreadCancel.o ../../../kercalls/x86/so/ThreadCancel_r.o ../../../kercalls/x86/so/ThreadCreate.o ../../../kercalls/x86/so/ThreadCreate_r.o ../../../kercalls/x86/so/ThreadCtl.o ../../../kercalls/x86/so/ThreadCtl_r.o ../../../kercalls/x86/so/ThreadDestroy.o ../../../kercalls/x86/so/ThreadDestroy_r.o ../../../kercalls/x86/so/ThreadDetach.o ../../../kercalls/x86/so/ThreadDetach_r.o ../../../kercalls/x86/so/ThreadJoin.o ../../../kercalls/x86/so/ThreadJoin_r.o ../../../kercalls/x86/so/TimerAlarm.o ../../../kercalls/x86/so/TimerAlarm_r.o ../../../kercalls/x86/so/TimerCreate.o ../../../kercalls/x86/so/TimerCreate_r.o ../../../kercalls/x86/so/TimerDestroy.o ../../../kercalls/x86/so/TimerDestroy_r.o ../../../kercalls/x86/so/TimerInfo.o ../../../kercalls/x86/so/TimerInfo_r.o ../../../kercalls/x86/so/TimerSettime.o ../../../kercalls/x86/so/TimerSettime_r.o ../../../kercalls/x86/so/TimerTimeout.o ../../../kercalls/x86/so/TimerTimeout_r.o ../../../kercalls/x86/so/__Ring0.o ../../../kercalls/x86/so/__Ring0_r.o ../../../kercalls/x86/so/__SysCpupageGet.o ../../../kercalls/x86/so/__SysCpupageSet.o ../../../kercalls/x86/so/__interruptmask.o ../../../kercalls/x86/so/__interruptunmask.o ../../../kercalls/x86/so/__ker_err.o ../../../kercalls/x86/so/__kerbad.o ../../../kercalls/x86/so/__kernop.o ../../../kercalls/x86/so/__traceevent.o ../../../kercover/x86/so/InterruptDetachId.o ../../../kercover/x86/so/debugbreak.o ../../../kercover/x86/so/debugkdbreak.o ../../../kercover/x86/so/debugkdoutput.o ../../../kercover/x86/so/interruptattachevent.o ../../../kercover/x86/so/interruptattachevent_r.o ../../../kercover/x86/so/interruptdisable.o ../../../kercover/x86/so/interruptenable.o ../../../kercover/x86/so/interrupthookidle.o ../../../kercover/x86/so/interrupthooktrace.o ../../../kercover/x86/so/interruptlock.o ../../../kercover/x86/so/interruptmask.o ../../../kercover/x86/so/interruptpending.o ../../../kercover/x86/so/interruptunlock.o ../../../kercover/x86/so/interruptunmask.o ../../../kercover/x86/so/msgreceiveasync.o ../../../kercover/x86/so/msgsendasync.o ../../../kercover/x86/so/synccreate.o ../../../kercover/x86/so/synccreate_r.o ../../../kercover/x86/so/syncmutexevent.o ../../../kercover/x86/so/syncmutexevent_r.o ../../../kercover/x86/so/timertimeout.o ../../../kercover/x86/so/timertimeout_r.o ../../../kercover/x86/so/traceevent.o ../../../ldd/x86/so/dladdr.o ../../../ldd/x86/so/ldd.o ../../../ldd/x86/so/main.o ../../../misc/x86/so/clearenv.o ../../../misc/x86/so/delay.o ../../../misc/x86/so/max.o ../../../misc/x86/so/min.o ../../../qnx/x86/so/__getset_thread_name.o ../../../qnx/x86/so/_cmdfd.o ../../../qnx/x86/so/_cmdname.o ../../../qnx/x86/so/_mknod_extra.o ../../../qnx/x86/so/devctl.o ../../../qnx/x86/so/devctlv.o ../../../qnx/x86/so/ftime.o ../../../qnx/x86/so/getprio.o ../../../qnx/x86/so/gettid.o ../../../qnx/x86/so/iofdinfo.o ../../../qnx/x86/so/ionotify.o ../../../qnx/x86/so/ltrunc.o ../../../qnx/x86/so/mmap_device_io.o ../../../qnx/x86/so/mmap_device_memory.o ../../../qnx/x86/so/munmap_device_io.o ../../../qnx/x86/so/munmap_device_memory.o ../../../qnx/x86/so/name_open.o ../../../qnx/x86/so/nanosleep_abs.o ../../../qnx/x86/so/nanosleep_rel.o ../../../qnx/x86/so/nanospin.o ../../../qnx/x86/so/nanospin_count.o ../../../qnx/x86/so/nanospin_ns.o ../../../qnx/x86/so/nanospin_ns_to_count.o ../../../qnx/x86/so/nsec2timespec.o ../../../qnx/x86/so/openfd.o ../../../qnx/x86/so/pthread_getname_np.o ../../../qnx/x86/so/pthread_setname_np.o ../../../qnx/x86/so/pthread_timedjoin.o ../../../qnx/x86/so/readblock.o ../../../qnx/x86/so/readcond.o ../../../qnx/x86/so/searchenv.o ../../../qnx/x86/so/select_block.o ../../../qnx/x86/so/select_event.o ../../../qnx/x86/so/setprio.o ../../../qnx/x86/so/shm_ctl.o ../../../qnx/x86/so/sleepon.o ../../../qnx/x86/so/sopen.o ../../../qnx/x86/so/spawn.o ../../../qnx/x86/so/spawnl.o ../../../qnx/x86/so/spawnle.o ../../../qnx/x86/so/spawnlp.o ../../../qnx/x86/so/spawnlpe.o ../../../qnx/x86/so/spawnp.o ../../../qnx/x86/so/spawnve.o ../../../qnx/x86/so/spawnvpe.o ../../../qnx/x86/so/tcgetsize.o ../../../qnx/x86/so/tcinject.o ../../../qnx/x86/so/tcischars.o ../../../qnx/x86/so/tcsetsize.o ../../../qnx/x86/so/timespec2nsec.o ../../../qnx/x86/so/writeblock.o ../../../resmgr/x86/so/_resmgr_access.o ../../../resmgr/x86/so/_resmgr_close_handler.o ../../../resmgr/x86/so/_resmgr_connect_handler.o ../../../resmgr/x86/so/_resmgr_detach_id.o ../../../resmgr/x86/so/_resmgr_disconnect_handler.o ../../../resmgr/x86/so/_resmgr_dup_handler.o ../../../resmgr/x86/so/_resmgr_handle.o ../../../resmgr/x86/so/_resmgr_handle_grow.o ../../../resmgr/x86/so/_resmgr_handler.o ../../../resmgr/x86/so/_resmgr_io_func.o ../../../resmgr/x86/so/_resmgr_io_handler.o ../../../resmgr/x86/so/_resmgr_iofuncs.o ../../../resmgr/x86/so/_resmgr_link_alloc.o ../../../resmgr/x86/so/_resmgr_link_free.o ../../../resmgr/x86/so/_resmgr_link_handler.o ../../../resmgr/x86/so/_resmgr_link_query.o ../../../resmgr/x86/so/_resmgr_mmap_handler.o ../../../resmgr/x86/so/_resmgr_mount_handler.o ../../../resmgr/x86/so/_resmgr_notify_handler.o ../../../resmgr/x86/so/_resmgr_ocb.o ../../../resmgr/x86/so/_resmgr_openfd_handler.o 
+C:/QNX630/host/win32/x86/usr/bin/ntox86-ar -r  C:/testqde/workspace/lib/c/lib/x86/so/libcS.a  ../../../resmgr/x86/so/_resmgr_thread.o ../../../resmgr/x86/so/_resmgr_unbind.o ../../../resmgr/x86/so/_resmgr_unblock_handler.o ../../../resmgr/x86/so/resmgr_again.o ../../../resmgr/x86/so/resmgr_data.o ../../../resmgr/x86/so/resmgr_devino.o ../../../resmgr/x86/so/resmgr_handle_tune.o ../../../resmgr/x86/so/resmgr_iofuncs.o ../../../resmgr/x86/so/resmgr_msgread.o ../../../resmgr/x86/so/resmgr_msgreadv.o ../../../resmgr/x86/so/resmgr_msgwrite.o ../../../resmgr/x86/so/resmgr_msgwritev.o ../../../resmgr/x86/so/resmgr_ocb.o ../../../resmgr/x86/so/resmgr_open_bind.o ../../../resmgr/x86/so/resmgr_pathname.o ../../../resmgr/x86/so/resmgr_pathname_attach.o ../../../resmgr/x86/so/resmgr_pathname_detach.o ../../../resmgr/x86/so/resmgr_pulse_attach.o ../../../resmgr/x86/so/resmgr_pulse_detach.o ../../../resmgr/x86/so/resmgr_start.o ../../../resmgr/x86/so/resmgr_unbind.o ../../../services/x86/so/__netmgr_send.o ../../../services/x86/so/_netmgr_connect.o ../../../services/x86/so/_rsrcdbmgr_pack.o ../../../services/x86/so/netmgr_ctl.o ../../../services/x86/so/netmgr_ndtostr.o ../../../services/x86/so/netmgr_path.o ../../../services/x86/so/netmgr_remote_nd.o ../../../services/x86/so/netmgr_strtond.o ../../../services/x86/so/pathmgr_link.o ../../../services/x86/so/pathmgr_symlink.o ../../../services/x86/so/pathmgr_unlink.o ../../../services/x86/so/pci.o ../../../services/x86/so/pm_get_modes.o ../../../services/x86/so/pm_get_power.o ../../../services/x86/so/pm_set_power.o ../../../services/x86/so/pmd_power.o ../../../services/x86/so/procmgr_daemon.o ../../../services/x86/so/procmgr_event_notify.o ../../../services/x86/so/procmgr_event_trigger.o ../../../services/x86/so/procmgr_guardian.o ../../../services/x86/so/procmgr_session.o ../../../services/x86/so/rsrcdbmgr_attach.o ../../../services/x86/so/rsrcdbmgr_create.o ../../../services/x86/so/rsrcdbmgr_destroy.o ../../../services/x86/so/rsrcdbmgr_detach.o ../../../services/x86/so/rsrcdbmgr_minor_attach.o ../../../services/x86/so/rsrcdbmgr_minor_detach.o ../../../services/x86/so/rsrcdbmgr_query.o ../../../services/x86/so/sysmgr_confstr_set.o ../../../services/x86/so/sysmgr_cpumode.o ../../../services/x86/so/sysmgr_reboot.o ../../../services/x86/so/sysmgr_sysconf_set.o ../../../stdio/x86/so/__fpbufinit.o ../../../stdio/x86/so/__fpinit.o ../../../stdio/x86/so/__parse_oflag.o ../../../stdio/x86/so/_freopen.o ../../../stdio/x86/so/_fsopen.o ../../../stdio/x86/so/_tmpfile.o ../../../stdio/x86/so/clearerr.o ../../../stdio/x86/so/fclose.o ../../../stdio/x86/so/fcloseall.o ../../../stdio/x86/so/fdopen.o ../../../stdio/x86/so/feof.o ../../../stdio/x86/so/ferror.o ../../../stdio/x86/so/fflush.o ../../../stdio/x86/so/fgetc.o ../../../stdio/x86/so/fgetchar.o ../../../stdio/x86/so/fgetpos.o ../../../stdio/x86/so/fgets.o ../../../stdio/x86/so/fgetwc.o ../../../stdio/x86/so/fgetws.o ../../../stdio/x86/so/fileno.o ../../../stdio/x86/so/flockfile.o ../../../stdio/x86/so/fopen.o ../../../stdio/x86/so/fopen64.o ../../../stdio/x86/so/fprintf.o ../../../stdio/x86/so/fputc.o ../../../stdio/x86/so/fputchar.o ../../../stdio/x86/so/fputs.o ../../../stdio/x86/so/fputwc.o ../../../stdio/x86/so/fputws.o ../../../stdio/x86/so/fread.o ../../../stdio/x86/so/freopen.o ../../../stdio/x86/so/freopen64.o ../../../stdio/x86/so/fscanf.o ../../../stdio/x86/so/fseek.o ../../../stdio/x86/so/fseeko.o ../../../stdio/x86/so/fseeko64.o ../../../stdio/x86/so/fsetpos.o ../../../stdio/x86/so/ftell.o ../../../stdio/x86/so/ftello.o ../../../stdio/x86/so/ftello64.o ../../../stdio/x86/so/ftrylockfile.o ../../../stdio/x86/so/funlockfile.o ../../../stdio/x86/so/fwide.o ../../../stdio/x86/so/fwprintf.o ../../../stdio/x86/so/fwrite.o ../../../stdio/x86/so/fwscanf.o ../../../stdio/x86/so/getc.o ../../../stdio/x86/so/getchar.o ../../../stdio/x86/so/gets.o ../../../stdio/x86/so/getwc.o ../../../stdio/x86/so/getwchar.o ../../../stdio/x86/so/perror.o ../../../stdio/x86/so/printf.o ../../../stdio/x86/so/putc.o ../../../stdio/x86/so/putchar.o ../../../stdio/x86/so/puts.o ../../../stdio/x86/so/putwc.o ../../../stdio/x86/so/putwchar.o ../../../stdio/x86/so/rewind.o ../../../stdio/x86/so/scanf.o ../../../stdio/x86/so/setbuf.o ../../../stdio/x86/so/setvbuf.o ../../../stdio/x86/so/snprintf.o ../../../stdio/x86/so/sprintf.o ../../../stdio/x86/so/sscanf.o ../../../stdio/x86/so/strerror.o ../../../stdio/x86/so/swprintf.o ../../../stdio/x86/so/swscanf.o ../../../stdio/x86/so/tmpfile.o ../../../stdio/x86/so/tmpfile64.o ../../../stdio/x86/so/ungetc.o ../../../stdio/x86/so/ungetwc.o ../../../stdio/x86/so/vfprintf.o ../../../stdio/x86/so/vfscanf.o ../../../stdio/x86/so/vfwprint.o ../../../stdio/x86/so/vfwscanf.o ../../../stdio/x86/so/vprintf.o ../../../stdio/x86/so/vscanf.o ../../../stdio/x86/so/vsnprint.o ../../../stdio/x86/so/vsprintf.o ../../../stdio/x86/so/vsscanf.o ../../../stdio/x86/so/vswprint.o ../../../stdio/x86/so/vswscanf.o ../../../stdio/x86/so/vwprintf.o ../../../stdio/x86/so/vwscanf.o ../../../stdio/x86/so/wprintf.o ../../../stdio/x86/so/wscanf.o ../../../stdio/x86/so/xfbuf.o ../../../stdio/x86/so/xfgpos.o ../../../stdio/x86/so/xfiles.o ../../../stdio/x86/so/xfprout.o ../../../stdio/x86/so/xfrprep.o ../../../stdio/x86/so/xfspos.o ../../../stdio/x86/so/xfwprep.o ../../../stdio/x86/so/xgenld.o ../../../stdio/x86/so/xgetfld.o ../../../stdio/x86/so/xgetfloa.o ../../../stdio/x86/so/xgetint.o ../../../stdio/x86/so/xgetstr.o ../../../stdio/x86/so/xldtob.o ../../../stdio/x86/so/xlitob.o ../../../stdio/x86/so/xprintf.o ../../../stdio/x86/so/xputfld.o ../../../stdio/x86/so/xputstr.o ../../../stdio/x86/so/xputtxt.o ../../../stdio/x86/so/xscanf.o ../../../stdio/x86/so/xsnprout.o ../../../stdio/x86/so/xsprout.o ../../../stdio/x86/so/xsyslock.o ../../../stdio/x86/so/xwfprout.o ../../../stdio/x86/so/xwfrprep.o ../../../stdio/x86/so/xwfwprep.o ../../../stdio/x86/so/xwgenld.o ../../../stdio/x86/so/xwgetfld.o ../../../stdio/x86/so/xwgetflo.o ../../../stdio/x86/so/xwgetint.o ../../../stdio/x86/so/xwgetstr.o ../../../stdio/x86/so/xwldtob.o ../../../stdio/x86/so/xwlitob.o ../../../stdio/x86/so/xwprintf.o ../../../stdio/x86/so/xwputfld.o ../../../stdio/x86/so/xwputstr.o ../../../stdio/x86/so/xwputtxt.o ../../../stdio/x86/so/xwscanf.o ../../../stdio/x86/so/xwsprout.o ../../../string/x86/so/atof.o ../../../string/x86/so/atoh.o ../../../string/x86/so/atoi.o ../../../string/x86/so/atol.o ../../../string/x86/so/atoll.o ../../../string/x86/so/bcmp.o ../../../string/x86/so/bcopy.o ../../../string/x86/so/bzero.o ../../../string/x86/so/ffs.o ../../../string/x86/so/index.o ../../../string/x86/so/itoa.o ../../../string/x86/so/lltoa.o ../../../string/x86/so/ltoa.o ../../../string/x86/so/memccpy.o ../../../string/x86/so/memchr.o ../../../string/x86/so/memcmp.o ../../../string/x86/so/memcpy.o ../../../string/x86/so/memcpyv.o ../../../string/x86/so/memicmp.o ../../../string/x86/so/memmove.o ../../../string/x86/so/memset.o ../../../string/x86/so/rindex.o ../../../string/x86/so/straddstr.o ../../../string/x86/so/strcasecmp.o ../../../string/x86/so/strcat.o ../../../string/x86/so/strchr.o ../../../string/x86/so/strcmp.o ../../../string/x86/so/strcoll.o ../../../string/x86/so/strcpy.o ../../../string/x86/so/strcspn.o ../../../string/x86/so/strdup.o ../../../string/x86/so/stricmp.o ../../../string/x86/so/strlen.o ../../../string/x86/so/strlwr.o ../../../string/x86/so/strncasecmp.o ../../../string/x86/so/strncat.o ../../../string/x86/so/strncmp.o ../../../string/x86/so/strncpy.o ../../../string/x86/so/strnicmp.o ../../../string/x86/so/strnset.o ../../../string/x86/so/strpbrk.o ../../../string/x86/so/strrchr.o ../../../string/x86/so/strrev.o ../../../string/x86/so/strset.o ../../../string/x86/so/strspn.o ../../../string/x86/so/strstr.o ../../../string/x86/so/strtod.o ../../../string/x86/so/strtof.o ../../../string/x86/so/strtoimax.o ../../../string/x86/so/strtok.o ../../../string/x86/so/strtok_r.o ../../../string/x86/so/strtol.o ../../../string/x86/so/strtold.o ../../../string/x86/so/strtoll.o ../../../string/x86/so/strtoul.o ../../../string/x86/so/strtoull.o ../../../string/x86/so/strtoumax.o ../../../string/x86/so/strupr.o ../../../string/x86/so/strxfrm.o ../../../string/x86/so/towlower.o ../../../string/x86/so/towupper.o ../../../string/x86/so/ulltoa.o ../../../string/x86/so/ultoa.o ../../../string/x86/so/utoa.o ../../../string/x86/so/wcscat.o ../../../string/x86/so/wcschr.o ../../../string/x86/so/wcscmp.o ../../../string/x86/so/wcscoll.o ../../../string/x86/so/wcscpy.o ../../../string/x86/so/wcscspn.o ../../../string/x86/so/wcslen.o ../../../string/x86/so/wcsncat.o ../../../string/x86/so/wcsncmp.o ../../../string/x86/so/wcsncpy.o ../../../string/x86/so/wcspbrk.o ../../../string/x86/so/wcsrchr.o ../../../string/x86/so/wcsrtomb.o ../../../string/x86/so/wcsspn.o ../../../string/x86/so/wcsstr.o ../../../string/x86/so/wcstod.o ../../../string/x86/so/wcstof.o ../../../string/x86/so/wcstoimax.o ../../../string/x86/so/wcstok.o ../../../string/x86/so/wcstol.o ../../../string/x86/so/wcstold.o ../../../string/x86/so/wcstoll.o ../../../string/x86/so/wcstombs.o ../../../string/x86/so/wcstoul.o ../../../string/x86/so/wcstoull.o ../../../string/x86/so/wcstoumax.o ../../../string/x86/so/wcsxfrm.o ../../../string/x86/so/wmemchr.o ../../../string/x86/so/wmemcmp.o ../../../string/x86/so/wmemcpy.o ../../../string/x86/so/wmemmove.o ../../../string/x86/so/wmemset.o ../../../string/x86/so/xstoll.o ../../../string/x86/so/xstoul.o ../../../string/x86/so/xstoull.o ../../../string/x86/so/xstrxfrm.o ../../../string/x86/so/xwcsxfrm.o ../../../string/x86/so/xwstod.o ../../../string/x86/so/xwstof.o ../../../string/x86/so/xwstoflt.o ../../../string/x86/so/xwstold.o ../../../string/x86/so/xwstoll.o ../../../string/x86/so/xwstopfx.o ../../../string/x86/so/xwstoul.o ../../../string/x86/so/xwstoull.o ../../../string/x86/so/xwstoxfl.o ../../../support/x86/so/_CMain.o ../../../support/x86/so/__cleanup.o ../../../support/x86/so/__get_errno_ptr.o ../../../support/x86/so/__main.o ../../../support/x86/so/__stackavail.o ../../../support/x86/so/__tls.o ../../../support/x86/so/_conf_destroy.o ../../../support/x86/so/_conf_get.o ../../../support/x86/so/_conf_set.o ../../../support/x86/so/_connect.o ../../../support/x86/so/_connect_combine.o ../../../support/x86/so/_connect_ctrl.o ../../../support/x86/so/_connect_entry.o ../../../support/x86/so/_connect_fd.o ../../../support/x86/so/_connect_object.o ../../../support/x86/so/_curbrk.o ../../../support/x86/so/_devctl.o ../../../support/x86/so/_flush_cache.o ../../../support/x86/so/_fullpath.o ../../../support/x86/so/_init_libc.o ../../../support/x86/so/_intr_v86.o ../../../support/x86/so/_math_emu_callout.o ../../../support/x86/so/_math_emu_load.o ../../../support/x86/so/_math_emu_stub.o ../../../support/x86/so/_notifyreadxv.o ../../../support/x86/so/_syspage_time.o ../../../support/x86/so/_unlink_object.o ../../../support/x86/so/_vopen.o ../../../support/x86/so/_writexv.o ../../../time/x86/so/asctime.o ../../../time/x86/so/clock.o ../../../time/x86/so/ctime.o ../../../time/x86/so/ctime_r.o ../../../time/x86/so/difftime.o ../../../time/x86/so/gmtime.o ../../../time/x86/so/gmtime_r.o ../../../time/x86/so/localtim.o ../../../time/x86/so/localtim_r.o ../../../time/x86/so/mktime.o ../../../time/x86/so/strftime.o ../../../time/x86/so/time.o ../../../time/x86/so/tzset.o ../../../time/x86/so/wcsftime.o ../../../time/x86/so/xgentime.o ../../../time/x86/so/xgetdst.o ../../../time/x86/so/xgetrules.o ../../../time/x86/so/xgettime.o ../../../time/x86/so/xgetzone.o ../../../time/x86/so/xisdst.o ../../../time/x86/so/xstrftim.o ../../../time/x86/so/xttotm.o ../../../time/x86/so/xtzset.o ../../../time/x86/so/xwcsftim.o ../../../unix/x86/so/alloca.o ../../../unix/x86/so/cfmakeraw.o ../../../unix/x86/so/cfree.o ../../../unix/x86/so/chroot.o ../../../unix/x86/so/chsize.o ../../../unix/x86/so/daemon.o ../../../unix/x86/so/eof.o ../../../unix/x86/so/err.o ../../../unix/x86/so/errx.o ../../../unix/x86/so/flock.o ../../../unix/x86/so/getdtablesize.o ../../../unix/x86/so/initgroups.o ../../../unix/x86/so/mktemp.o ../../../unix/x86/so/mount.o ../../../unix/x86/so/nap.o ../../../unix/x86/so/napms.o ../../../unix/x86/so/pathfind.o ../../../unix/x86/so/setbuffer.o ../../../unix/x86/so/sethostname.o ../../../unix/x86/so/setlinebuf.o ../../../unix/x86/so/settimeofday.o ../../../unix/x86/so/sigblock.o ../../../unix/x86/so/sigmask.o ../../../unix/x86/so/strsep.o ../../../unix/x86/so/strsignal.o ../../../unix/x86/so/sys_err.o ../../../unix/x86/so/sys_sig.o ../../../unix/x86/so/tcsetsid.o ../../../unix/x86/so/verr.o ../../../unix/x86/so/verrx.o ../../../unix/x86/so/vfork.o ../../../unix/x86/so/vwarn.o ../../../unix/x86/so/vwarnx.o ../../../unix/x86/so/wait3.o ../../../unix/x86/so/wait4.o ../../../unix/x86/so/warn.o ../../../unix/x86/so/warnx.o ../../../xopen/x86/so/__statvfs_check.o ../../../xopen/x86/so/_rand48.o ../../../xopen/x86/so/creat64.o ../../../xopen/x86/so/drand48.o ../../../xopen/x86/so/erand48.o ../../../xopen/x86/so/fchdir.o ../../../xopen/x86/so/fstat64.o ../../../xopen/x86/so/fstatvfs.o ../../../xopen/x86/so/fstatvfs64.o ../../../xopen/x86/so/ftok.o ../../../xopen/x86/so/ftruncate64.o ../../../xopen/x86/so/gethostname.o ../../../xopen/x86/so/getitimer.o ../../../xopen/x86/so/getpgid.o ../../../xopen/x86/so/getpriority.o ../../../xopen/x86/so/getrlimit.o ../../../xopen/x86/so/getrusage.o ../../../xopen/x86/so/getsubopt.o ../../../xopen/x86/so/gettimeofday.o ../../../xopen/x86/so/hsearch.o ../../../xopen/x86/so/ioctl.o ../../../xopen/x86/so/jrand48.o ../../../xopen/x86/so/killpg.o ../../../xopen/x86/so/lcong48.o ../../../xopen/x86/so/lockf.o ../../../xopen/x86/so/lockf64.o ../../../xopen/x86/so/lrand48.o ../../../xopen/x86/so/lsearch.o ../../../xopen/x86/so/mrand48.o ../../../xopen/x86/so/nftw.o ../../../xopen/x86/so/nice.o ../../../xopen/x86/so/nrand48.o ../../../xopen/x86/so/open64.o ../../../xopen/x86/so/poll.o ../../../xopen/x86/so/pread.o ../../../xopen/x86/so/pthread_attr_getguardsize.o ../../../xopen/x86/so/pthread_attr_setguardsize.o ../../../xopen/x86/so/pthread_concurrency.o ../../../xopen/x86/so/putenv.o ../../../xopen/x86/so/pwrite.o ../../../xopen/x86/so/readv.o ../../../xopen/x86/so/realpath.o ../../../xopen/x86/so/seed48.o ../../../xopen/x86/so/setenv.o ../../../xopen/x86/so/setpgrp.o ../../../xopen/x86/so/setpriority.o ../../../xopen/x86/so/setrlimit.o ../../../xopen/x86/so/srand48.o ../../../xopen/x86/so/stat64.o ../../../xopen/x86/so/statvfs.o ../../../xopen/x86/so/statvfs64.o ../../../xopen/x86/so/swab.o ../../../xopen/x86/so/sync.o ../../../xopen/x86/so/syslog.o ../../../xopen/x86/so/tcgetsid.o ../../../xopen/x86/so/times.o ../../../xopen/x86/so/tmpnam.o ../../../xopen/x86/so/truncate.o ../../../xopen/x86/so/truncate64.o ../../../xopen/x86/so/ualarm.o ../../../xopen/x86/so/unsetenv.o ../../../xopen/x86/so/usleep.o ../../../xopen/x86/so/utimes.o ../../../xopen/x86/so/waitid.o ../../../xopen/x86/so/writev.o ../../../1/x86/so/__stat_check.o ../../../1/x86/so/access.o ../../../1/x86/so/alarm.o ../../../1/x86/so/cfgetispeed.o ../../../1/x86/so/cfgetospeed.o ../../../1/x86/so/cfsetispeed.o ../../../1/x86/so/cfsetospeed.o ../../../1/x86/so/chdir.o ../../../1/x86/so/chmod.o ../../../1/x86/so/chown.o ../../../1/x86/so/close.o ../../../1/x86/so/creat.o ../../../1/x86/so/ctermid.o ../../../1/x86/so/dup.o ../../../1/x86/so/dup2.o ../../../1/x86/so/execl.o ../../../1/x86/so/execle.o ../../../1/x86/so/execlp.o ../../../1/x86/so/execlpe.o ../../../1/x86/so/execve.o ../../../1/x86/so/execvpe.o ../../../1/x86/so/fchmod.o ../../../1/x86/so/fchown.o ../../../1/x86/so/fcntl.o ../../../1/x86/so/fdatasync.o ../../../1/x86/so/fork.o ../../../1/x86/so/fpathconf.o ../../../1/x86/so/fstat.o ../../../1/x86/so/fsync.o ../../../1/x86/so/futime.o ../../../1/x86/so/getcwd.o ../../../1/x86/so/getegid.o ../../../1/x86/so/geteuid.o ../../../1/x86/so/getgid.o ../../../1/x86/so/getgroups.o ../../../1/x86/so/getlogin.o ../../../1/x86/so/getpgrp.o ../../../1/x86/so/getpid.o ../../../1/x86/so/getppid.o ../../../1/x86/so/getsid.o ../../../1/x86/so/getuid.o ../../../1/x86/so/iodir.o ../../../1/x86/so/isatty.o ../../../1/x86/so/kill.o ../../../1/x86/so/link.o ../../../1/x86/so/lseek.o ../../../1/x86/so/mkdir.o ../../../1/x86/so/mkfifo.o ../../../1/x86/so/mknod.o ../../../1/x86/so/open.o ../../../1/x86/so/passwd.o ../../../1/x86/so/pathconf.o ../../../1/x86/so/pause.o ../../../1/x86/so/pipe.o ../../../1/x86/so/read.o ../../../1/x86/so/rmdir.o ../../../1/x86/so/setgroups.o ../../../1/x86/so/setids.o ../../../1/x86/so/setpgid.o ../../../1/x86/so/setsid.o ../../../1/x86/so/sigaction.o ../../../1/x86/so/sigaddset.o ../../../1/x86/so/sigdelset.o ../../../1/x86/so/sigempset.o ../../../1/x86/so/sigfillset.o ../../../1/x86/so/sigismem.o ../../../1/x86/so/sigjmp.o ../../../1/x86/so/signal.o ../../../1/x86/so/sigpending.o ../../../1/x86/so/sigprocmask.o ../../../1/x86/so/sigsetjmp.o ../../../1/x86/so/sigstub.o ../../../1/x86/so/sigsuspend.o ../../../1/x86/so/sleep.o ../../../1/x86/so/stat.o ../../../1/x86/so/sysconf.o ../../../1/x86/so/tcdrain.o ../../../1/x86/so/tcdropline.o ../../../1/x86/so/tcflow.o ../../../1/x86/so/tcflush.o ../../../1/x86/so/tcgetattr.o ../../../1/x86/so/tcgetpgrp.o ../../../1/x86/so/tcsendbreak.o ../../../1/x86/so/tcsetattr.o ../../../1/x86/so/tcsetpgrp.o ../../../1/x86/so/ttyname.o ../../../1/x86/so/umask.o ../../../1/x86/so/uname.o ../../../1/x86/so/unlink.o ../../../1/x86/so/utime.o ../../../1/x86/so/wait.o ../../../1/x86/so/waitpid.o ../../../1/x86/so/write.o ../../../1a/x86/so/basename.o ../../../1a/x86/so/confstr.o ../../../1a/x86/so/dirname.o ../../../1a/x86/so/fnmatch.o ../../../1a/x86/so/getopt.o ../../../1a/x86/so/glob.o ../../../1a/x86/so/popen.o ../../../1a/x86/so/readlink.o ../../../1a/x86/so/regcomp.o ../../../1a/x86/so/regerror.o ../../../1a/x86/so/regexec.o ../../../1a/x86/so/regfree.o ../../../1a/x86/so/symlink.o ../../../1a/x86/so/system.o ../../../1a/x86/so/wordexp.o ../../../1b/x86/so/__mq_check.o ../../../1b/x86/so/_aio_init.o ../../../1b/x86/so/aio_cancel.o ../../../1b/x86/so/aio_error.o ../../../1b/x86/so/aio_fsync.o ../../../1b/x86/so/aio_read.o ../../../1b/x86/so/aio_return.o ../../../1b/x86/so/aio_suspend.o ../../../1b/x86/so/aio_write.o ../../../1b/x86/so/clock_getres.o ../../../1b/x86/so/clock_gettime.o ../../../1b/x86/so/clock_settime.o ../../../1b/x86/so/ftruncate.o ../../../1b/x86/so/lio_listio.o ../../../1b/x86/so/mlock.o ../../../1b/x86/so/mlockall.o ../../../1b/x86/so/mmap.o ../../../1b/x86/so/mphys.o ../../../1b/x86/so/mprotect.o ../../../1b/x86/so/mq_close.o ../../../1b/x86/so/mq_getattr.o ../../../1b/x86/so/mq_notify.o ../../../1b/x86/so/mq_open.o ../../../1b/x86/so/mq_receive.o ../../../1b/x86/so/mq_send.o ../../../1b/x86/so/mq_setattr.o ../../../1b/x86/so/mq_unlink.o ../../../1b/x86/so/msync.o ../../../1b/x86/so/munlock.o ../../../1b/x86/so/munlockall.o ../../../1b/x86/so/munmap.o ../../../1b/x86/so/nanosleep.o ../../../1b/x86/so/sched_get_priority_max.o ../../../1b/x86/so/sched_get_priority_min.o ../../../1b/x86/so/sched_getparam.o ../../../1b/x86/so/sched_getscheduler.o ../../../1b/x86/so/sched_rr_get_interval.o ../../../1b/x86/so/sched_setparam.o ../../../1b/x86/so/sched_setscheduler.o ../../../1b/x86/so/sched_yield.o ../../../1b/x86/so/sem_close.o ../../../1b/x86/so/sem_destroy.o ../../../1b/x86/so/sem_getvalue.o ../../../1b/x86/so/sem_init.o ../../../1b/x86/so/sem_open.o ../../../1b/x86/so/sem_post.o ../../../1b/x86/so/sem_trywait.o ../../../1b/x86/so/sem_unlink.o ../../../1b/x86/so/sem_wait.o ../../../1b/x86/so/shm_close.o ../../../1b/x86/so/shm_open.o ../../../1b/x86/so/shm_unlink.o ../../../1b/x86/so/sigqueue.o ../../../1b/x86/so/sigtimedwait.o ../../../1b/x86/so/sigwait.o ../../../1b/x86/so/sigwaitinfo.o ../../../1b/x86/so/timer_create.o ../../../1b/x86/so/timer_delete.o ../../../1b/x86/so/timer_getoverrun.o ../../../1b/x86/so/timer_gettime.o ../../../1b/x86/so/timer_settime.o ../../../1c/x86/so/__my_thread_exit.o ../../../1c/x86/so/pthread_atfork.o ../../../1c/x86/so/pthread_attr_default.o ../../../1c/x86/so/pthread_attr_destroy.o ../../../1c/x86/so/pthread_attr_getdetachstate.o ../../../1c/x86/so/pthread_attr_getinheritsched.o ../../../1c/x86/so/pthread_attr_getschedparam.o ../../../1c/x86/so/pthread_attr_getschedpolicy.o ../../../1c/x86/so/pthread_attr_getscope.o ../../../1c/x86/so/pthread_attr_getstack.o ../../../1c/x86/so/pthread_attr_getstackaddr.o ../../../1c/x86/so/pthread_attr_getstacklazy.o ../../../1c/x86/so/pthread_attr_getstackprealloc.o ../../../1c/x86/so/pthread_attr_getstacksize.o ../../../1c/x86/so/pthread_attr_init.o ../../../1c/x86/so/pthread_attr_setdetachstate.o ../../../1c/x86/so/pthread_attr_setinheritsched.o ../../../1c/x86/so/pthread_attr_setschedparam.o ../../../1c/x86/so/pthread_attr_setschedpolicy.o ../../../1c/x86/so/pthread_attr_setscope.o ../../../1c/x86/so/pthread_attr_setstack.o ../../../1c/x86/so/pthread_attr_setstackaddr.o ../../../1c/x86/so/pthread_attr_setstacklazy.o ../../../1c/x86/so/pthread_attr_setstackprealloc.o ../../../1c/x86/so/pthread_attr_setstacksize.o ../../../1c/x86/so/pthread_cancel.o ../../../1c/x86/so/pthread_cond_broadcast.o ../../../1c/x86/so/pthread_cond_destroy.o ../../../1c/x86/so/pthread_cond_init.o ../../../1c/x86/so/pthread_cond_signal.o ../../../1c/x86/so/pthread_cond_timedwait.o ../../../1c/x86/so/pthread_cond_wait.o ../../../1c/x86/so/pthread_condattr_destroy.o ../../../1c/x86/so/pthread_condattr_init.o ../../../1c/x86/so/pthread_condattr_shared.o ../../../1c/x86/so/pthread_create.o ../../../1c/x86/so/pthread_detach.o ../../../1c/x86/so/pthread_equal.o ../../../1c/x86/so/pthread_exit.o ../../../1c/x86/so/pthread_getschedparam.o ../../../1c/x86/so/pthread_getspecific.o ../../../1c/x86/so/pthread_join.o ../../../1c/x86/so/pthread_key_create.o ../../../1c/x86/so/pthread_key_data.o ../../../1c/x86/so/pthread_key_delete.o ../../../1c/x86/so/pthread_kill.o ../../../1c/x86/so/pthread_mutex_destroy.o ../../../1c/x86/so/pthread_mutex_init.o ../../../1c/x86/so/pthread_mutex_lock.o ../../../1c/x86/so/pthread_mutex_prioceiling.o ../../../1c/x86/so/pthread_mutex_trylock.o ../../../1c/x86/so/pthread_mutex_unlock.o ../../../1c/x86/so/pthread_mutexattr_destroy.o ../../../1c/x86/so/pthread_mutexattr_getprioceiling.o ../../../1c/x86/so/pthread_mutexattr_getprotocol.o ../../../1c/x86/so/pthread_mutexattr_getrecursive.o ../../../1c/x86/so/pthread_mutexattr_getshared.o ../../../1c/x86/so/pthread_mutexattr_gettype.o ../../../1c/x86/so/pthread_mutexattr_init.o ../../../1c/x86/so/pthread_mutexattr_setprioceiling.o ../../../1c/x86/so/pthread_mutexattr_setprotocol.o ../../../1c/x86/so/pthread_mutexattr_setrecursive.o ../../../1c/x86/so/pthread_mutexattr_setshared.o ../../../1c/x86/so/pthread_mutexattr_settype.o ../../../1c/x86/so/pthread_once.o ../../../1c/x86/so/pthread_rwlock_destroy.o ../../../1c/x86/so/pthread_rwlock_exclusive.o ../../../1c/x86/so/pthread_rwlock_init.o ../../../1c/x86/so/pthread_rwlock_shared.o ../../../1c/x86/so/pthread_rwlock_unlock.o ../../../1c/x86/so/pthread_rwlockattr_destroy.o ../../../1c/x86/so/pthread_rwlockattr_getpshared.o ../../../1c/x86/so/pthread_rwlockattr_init.o ../../../1c/x86/so/pthread_rwlockattr_setpshared.o ../../../1c/x86/so/pthread_self.o ../../../1c/x86/so/pthread_setcancelstate.o ../../../1c/x86/so/pthread_setcanceltype.o ../../../1c/x86/so/pthread_setschedparam.o ../../../1c/x86/so/pthread_setspecific.o ../../../1c/x86/so/pthread_sigmask.o ../../../1c/x86/so/pthread_testcancel.o ../../../1c/x86/so/ttyname_r.o ../../../1d/x86/so/clock_getcpuclockid.o ../../../1d/x86/so/mq_timedreceive.o ../../../1d/x86/so/mq_timedsend.o ../../../1d/x86/so/posix_fadvise.o ../../../1d/x86/so/posix_fallocate.o ../../../1d/x86/so/posix_madvise.o ../../../1d/x86/so/posix_memalign.o ../../../1d/x86/so/posix_spawn.o ../../../1d/x86/so/posix_spawnp.o ../../../1d/x86/so/pthread_getcpuclockid.o ../../../1d/x86/so/pthread_mutex_timedlock.o ../../../1d/x86/so/sem_timedwait.o ../../../1g/x86/so/inet_ntop.o ../../../1g/x86/so/inet_pton.o ../../../1g/x86/so/isfdtype.o ../../../1g/x86/so/tohn.o ../../../1j/x86/so/_pthread_spin_destroy.o ../../../1j/x86/so/_pthread_spin_init.o ../../../1j/x86/so/_pthread_spin_lock.o ../../../1j/x86/so/_pthread_spin_trylock.o ../../../1j/x86/so/_pthread_spin_unlock.o ../../../1j/x86/so/_spin_destroy.o ../../../1j/x86/so/_spin_destroy_v.o ../../../1j/x86/so/_spin_init.o ../../../1j/x86/so/_spin_init_v.o ../../../1j/x86/so/_spin_lock_v.o ../../../1j/x86/so/_spin_trylock_v.o ../../../1j/x86/so/_spin_unlock_v.o ../../../1j/x86/so/barrier_attr_destroy.o ../../../1j/x86/so/barrier_attr_getpshared.o ../../../1j/x86/so/barrier_attr_init.o ../../../1j/x86/so/barrier_attr_setpshared.o ../../../1j/x86/so/barrier_destroy.o ../../../1j/x86/so/barrier_init.o ../../../1j/x86/so/barrier_wait.o ../../../1j/x86/so/clock_nanosleep.o ../../../1j/x86/so/mem_access_clear.o ../../../1j/x86/so/mem_access_set.o ../../../1j/x86/so/mem_get_info.o ../../../1j/x86/so/mem_offset.o ../../../1j/x86/so/pthread_abort.o ../../../1j/x86/so/pthread_condattr_getclock.o ../../../1j/x86/so/pthread_condattr_setclock.o ../../../1j/x86/so/pthread_spin_destroy.o ../../../1j/x86/so/pthread_spin_init.o ../../../1j/x86/so/pthread_spin_lock.o ../../../1j/x86/so/pthread_spin_trylock.o ../../../1j/x86/so/pthread_spin_unlock.o ../../../1j/x86/so/spin_destroy.o ../../../1j/x86/so/spin_init.o ../../../1j/x86/so/spin_lock.o ../../../1j/x86/so/spin_trylock.o ../../../1j/x86/so/spin_unlock.o ../../../1j/x86/so/timer_getexpstatus.o ../../../1j/x86/so/typed_mem_open.o ../../../alloc/x86/so/_calloc.o ../../../alloc/x86/so/_free.o ../../../alloc/x86/so/_malloc.o ../../../alloc/x86/so/_malloc_pc.o ../../../alloc/x86/so/_memalign.o ../../../alloc/x86/so/_memalign_pc.o ../../../alloc/x86/so/_posix_memalign.o ../../../alloc/x86/so/_realloc.o ../../../alloc/x86/so/_salloc.o ../../../alloc/x86/so/_salloc_data.o ../../../alloc/x86/so/amblksiz.o ../../../alloc/x86/so/amhiwater.o ../../../alloc/x86/so/band.o ../../../alloc/x86/so/barena.o ../../../alloc/x86/so/compat.o ../../../alloc/x86/so/core.o ../../../alloc/x86/so/dlist.o ../../../alloc/x86/so/flist.o ../../../alloc/x86/so/malloc-config.o ../../../alloc/x86/so/malloc.o ../../../alloc/x86/so/mdump.o ../../../alloc/x86/so/util.o ../../../ansi/x86/so/__cxa_atexit.o ../../../ansi/x86/so/__cxa_finalize.o ../../../ansi/x86/so/__exit.o ../../../ansi/x86/so/_atexit.o ../../../ansi/x86/so/_cleanup.o ../../../ansi/x86/so/_exit.o ../../../ansi/x86/so/_findenv.o ../../../ansi/x86/so/_jmp.o ../../../ansi/x86/so/abort.o ../../../ansi/x86/so/abs.o ../../../ansi/x86/so/assert.o ../../../ansi/x86/so/atexit.o ../../../ansi/x86/so/bsearch.o ../../../ansi/x86/so/btowc.o ../../../ansi/x86/so/div.o ../../../ansi/x86/so/exit.o ../../../ansi/x86/so/getenv.o ../../../ansi/x86/so/isalnum.o ../../../ansi/x86/so/isalpha.o ../../../ansi/x86/so/isascii.o ../../../ansi/x86/so/isblank.o ../../../ansi/x86/so/iscntrl.o ../../../ansi/x86/so/isdigit.o ../../../ansi/x86/so/isgraph.o ../../../ansi/x86/so/islower.o ../../../ansi/x86/so/isprint.o ../../../ansi/x86/so/ispunct.o ../../../ansi/x86/so/isspace.o ../../../ansi/x86/so/isupper.o 
+C:/QNX630/host/win32/x86/usr/bin/ntox86-ar -r  C:/testqde/workspace/lib/c/lib/x86/so/libcS.a  ../../../ansi/x86/so/iswalnum.o ../../../ansi/x86/so/iswalpha.o ../../../ansi/x86/so/iswblank.o ../../../ansi/x86/so/iswcntrl.o ../../../ansi/x86/so/iswctype.o ../../../ansi/x86/so/iswdigit.o ../../../ansi/x86/so/iswgraph.o ../../../ansi/x86/so/iswlower.o ../../../ansi/x86/so/iswprint.o ../../../ansi/x86/so/iswpunct.o ../../../ansi/x86/so/iswspace.o ../../../ansi/x86/so/iswupper.o ../../../ansi/x86/so/iswxdigi.o ../../../ansi/x86/so/isxdigit.o ../../../ansi/x86/so/labs.o ../../../ansi/x86/so/ldiv.o ../../../ansi/x86/so/lldiv.o ../../../ansi/x86/so/localeco.o ../../../ansi/x86/so/longjmp.o ../../../ansi/x86/so/mblen.o ../../../ansi/x86/so/mbrlen.o ../../../ansi/x86/so/mbrtowc.o ../../../ansi/x86/so/mbsinit.o ../../../ansi/x86/so/mbsrtowc.o ../../../ansi/x86/so/mbstowcs.o ../../../ansi/x86/so/mbtowc.o ../../../ansi/x86/so/qsort.o ../../../ansi/x86/so/raise.o ../../../ansi/x86/so/rand.o ../../../ansi/x86/so/remove.o ../../../ansi/x86/so/rename.o ../../../ansi/x86/so/setlocal.o ../../../ansi/x86/so/tolower.o ../../../ansi/x86/so/toupper.o ../../../ansi/x86/so/towctran.o ../../../ansi/x86/so/wcrtomb.o ../../../ansi/x86/so/wctob.o ../../../ansi/x86/so/wctomb.o ../../../ansi/x86/so/wctrans.o ../../../ansi/x86/so/wctype.o ../../../ansi/x86/so/xbtowc.o ../../../ansi/x86/so/xcostate.o ../../../ansi/x86/so/xctype.o ../../../ansi/x86/so/xdefloc.o ../../../ansi/x86/so/xdnorm.o ../../../ansi/x86/so/xdscale.o ../../../ansi/x86/so/xdtento.o ../../../ansi/x86/so/xdunscal.o ../../../ansi/x86/so/xfdnorm.o ../../../ansi/x86/so/xfdscale.o ../../../ansi/x86/so/xfdtento.o ../../../ansi/x86/so/xfdunsca.o ../../../ansi/x86/so/xferaise_compat.o ../../../ansi/x86/so/xfindloc.o ../../../ansi/x86/so/xfloat.o ../../../ansi/x86/so/xfreeloc.o ../../../ansi/x86/so/xfvalues.o ../../../ansi/x86/so/xgetloc.o ../../../ansi/x86/so/xldnorm.o ../../../ansi/x86/so/xldscale.o ../../../ansi/x86/so/xldtento.o ../../../ansi/x86/so/xldunsca.o ../../../ansi/x86/so/xloctab.o ../../../ansi/x86/so/xlocterm.o ../../../ansi/x86/so/xlvalues.o ../../../ansi/x86/so/xmakeloc.o ../../../ansi/x86/so/xmakesta.o ../../../ansi/x86/so/xmakewct.o ../../../ansi/x86/so/xmbtowc.o ../../../ansi/x86/so/xmtx.o ../../../ansi/x86/so/xreadloc.o ../../../ansi/x86/so/xsetloc.o ../../../ansi/x86/so/xstate.o ../../../ansi/x86/so/xstod.o ../../../ansi/x86/so/xstof.o ../../../ansi/x86/so/xstoflt.o ../../../ansi/x86/so/xstoint.o ../../../ansi/x86/so/xstold.o ../../../ansi/x86/so/xstopfx.o ../../../ansi/x86/so/xstoxflt.o ../../../ansi/x86/so/xtolotab.o ../../../ansi/x86/so/xtouptab.o ../../../ansi/x86/so/xtowctra.o ../../../ansi/x86/so/xvalues.o ../../../ansi/x86/so/xwcostate.o ../../../ansi/x86/so/xwcstate.o ../../../ansi/x86/so/xwctob.o ../../../ansi/x86/so/xwctomb.o ../../../ansi/x86/so/xwctrtab.o ../../../ansi/x86/so/xwctype.o ../../../ansi/x86/so/xwctytab.o ../../../atomic/x86/so/atomic_add.o ../../../atomic/x86/so/atomic_add_value.o ../../../atomic/x86/so/atomic_clr.o ../../../atomic/x86/so/atomic_clr_value.o ../../../atomic/x86/so/atomic_set.o ../../../atomic/x86/so/atomic_set_value.o ../../../atomic/x86/so/atomic_sub.o ../../../atomic/x86/so/atomic_sub_value.o ../../../atomic/x86/so/atomic_toggle.o ../../../atomic/x86/so/atomic_toggle_value.o ../../../dispatch/x86/so/_thread_pool_thread.o ../../../dispatch/x86/so/data.o ../../../dispatch/x86/so/dispatch.o ../../../dispatch/x86/so/dispatch_select.o ../../../dispatch/x86/so/dispatch_sigwait.o ../../../dispatch/x86/so/message.o ../../../dispatch/x86/so/name.o ../../../dispatch/x86/so/resmgr.o ../../../dispatch/x86/so/resmgr_detach.o ../../../dispatch/x86/so/thread_pool.o ../../../dispatch/x86/so/thread_pool_ctrl.o ../../../dispatch/x86/so/vec_util.o ../../../iofunc/x86/so/_iofunc_create.o ../../../iofunc/x86/so/_iofunc_lock.o ../../../iofunc/x86/so/_iofunc_misc.o ../../../iofunc/x86/so/_iofunc_open.o ../../../iofunc/x86/so/iofunc_attr_init.o ../../../iofunc/x86/so/iofunc_attr_lock.o ../../../iofunc/x86/so/iofunc_attr_trylock.o ../../../iofunc/x86/so/iofunc_attr_unlock.o ../../../iofunc/x86/so/iofunc_check_access.o ../../../iofunc/x86/so/iofunc_chmod.o ../../../iofunc/x86/so/iofunc_chmod_default.o ../../../iofunc/x86/so/iofunc_chown.o ../../../iofunc/x86/so/iofunc_chown_default.o ../../../iofunc/x86/so/iofunc_client_info.o ../../../iofunc/x86/so/iofunc_close_dup.o ../../../iofunc/x86/so/iofunc_close_dup_default.o ../../../iofunc/x86/so/iofunc_close_ocb.o ../../../iofunc/x86/so/iofunc_close_ocb_default.o ../../../iofunc/x86/so/iofunc_devctl.o ../../../iofunc/x86/so/iofunc_devctl_default.o ../../../iofunc/x86/so/iofunc_fdinfo.o ../../../iofunc/x86/so/iofunc_fdinfo_default.o ../../../iofunc/x86/so/iofunc_func_init.o ../../../iofunc/x86/so/iofunc_link.o ../../../iofunc/x86/so/iofunc_llist_lock.o ../../../iofunc/x86/so/iofunc_lock.o ../../../iofunc/x86/so/iofunc_lock_calloc.o ../../../iofunc/x86/so/iofunc_lock_default.o ../../../iofunc/x86/so/iofunc_lock_ocb_default.o ../../../iofunc/x86/so/iofunc_lseek.o ../../../iofunc/x86/so/iofunc_lseek_default.o ../../../iofunc/x86/so/iofunc_mknod.o ../../../iofunc/x86/so/iofunc_mmap.o ../../../iofunc/x86/so/iofunc_mmap_default.o ../../../iofunc/x86/so/iofunc_notify.o ../../../iofunc/x86/so/iofunc_notify_remove.o ../../../iofunc/x86/so/iofunc_notify_trigger.o ../../../iofunc/x86/so/iofunc_ocb_attach.o ../../../iofunc/x86/so/iofunc_ocb_calloc.o ../../../iofunc/x86/so/iofunc_ocb_detach.o ../../../iofunc/x86/so/iofunc_open.o ../../../iofunc/x86/so/iofunc_open_default.o ../../../iofunc/x86/so/iofunc_openfd.o ../../../iofunc/x86/so/iofunc_openfd_default.o ../../../iofunc/x86/so/iofunc_pathconf.o ../../../iofunc/x86/so/iofunc_pathconf_default.o ../../../iofunc/x86/so/iofunc_power.o ../../../iofunc/x86/so/iofunc_power_default.o ../../../iofunc/x86/so/iofunc_read_default.o ../../../iofunc/x86/so/iofunc_read_verify.o ../../../iofunc/x86/so/iofunc_readlink.o ../../../iofunc/x86/so/iofunc_rename.o ../../../iofunc/x86/so/iofunc_sleepon.o ../../../iofunc/x86/so/iofunc_space_verify.o ../../../iofunc/x86/so/iofunc_stat.o ../../../iofunc/x86/so/iofunc_stat_default.o ../../../iofunc/x86/so/iofunc_sync.o ../../../iofunc/x86/so/iofunc_sync_default.o ../../../iofunc/x86/so/iofunc_sync_verify.o ../../../iofunc/x86/so/iofunc_time_update.o ../../../iofunc/x86/so/iofunc_unblock.o ../../../iofunc/x86/so/iofunc_unblock_default.o ../../../iofunc/x86/so/iofunc_unlink.o ../../../iofunc/x86/so/iofunc_unlock_ocb_default.o ../../../iofunc/x86/so/iofunc_utime.o ../../../iofunc/x86/so/iofunc_utime_default.o ../../../iofunc/x86/so/iofunc_write_default.o ../../../iofunc/x86/so/iofunc_write_verify.o ../../../kercalls/x86/so/ChannelConnectAttr.o ../../../kercalls/x86/so/ChannelCreate.o ../../../kercalls/x86/so/ChannelCreateExt.o ../../../kercalls/x86/so/ChannelCreate_r.o ../../../kercalls/x86/so/ChannelDestroy.o ../../../kercalls/x86/so/ChannelDestroy_r.o ../../../kercalls/x86/so/ClockAdjust.o ../../../kercalls/x86/so/ClockAdjust_r.o ../../../kercalls/x86/so/ClockId.o ../../../kercalls/x86/so/ClockId_r.o ../../../kercalls/x86/so/ClockPeriod.o ../../../kercalls/x86/so/ClockPeriod_r.o ../../../kercalls/x86/so/ClockTime.o ../../../kercalls/x86/so/ClockTime_r.o ../../../kercalls/x86/so/ConnectAttach.o ../../../kercalls/x86/so/ConnectAttachExt.o ../../../kercalls/x86/so/ConnectAttach_r.o ../../../kercalls/x86/so/ConnectClientInfo.o ../../../kercalls/x86/so/ConnectClientInfo_r.o ../../../kercalls/x86/so/ConnectDetach.o ../../../kercalls/x86/so/ConnectDetach_r.o ../../../kercalls/x86/so/ConnectFlags.o ../../../kercalls/x86/so/ConnectFlags_r.o ../../../kercalls/x86/so/ConnectServerInfo.o ../../../kercalls/x86/so/ConnectServerInfo_r.o ../../../kercalls/x86/so/InterruptAttach.o ../../../kercalls/x86/so/InterruptAttach_r.o ../../../kercalls/x86/so/InterruptDetach.o ../../../kercalls/x86/so/InterruptDetachFunc.o ../../../kercalls/x86/so/InterruptDetachFunc_r.o ../../../kercalls/x86/so/InterruptDetach_r.o ../../../kercalls/x86/so/InterruptWait.o ../../../kercalls/x86/so/InterruptWait_r.o ../../../kercalls/x86/so/MsgCurrent.o ../../../kercalls/x86/so/MsgCurrent_r.o ../../../kercalls/x86/so/MsgDeliverEvent.o ../../../kercalls/x86/so/MsgDeliverEvent_r.o ../../../kercalls/x86/so/MsgError.o ../../../kercalls/x86/so/MsgError_r.o ../../../kercalls/x86/so/MsgInfo.o ../../../kercalls/x86/so/MsgInfo_r.o ../../../kercalls/x86/so/MsgKeyData.o ../../../kercalls/x86/so/MsgKeyData_r.o ../../../kercalls/x86/so/MsgRead.o ../../../kercalls/x86/so/MsgRead_r.o ../../../kercalls/x86/so/MsgReadiov.o ../../../kercalls/x86/so/MsgReadiov_r.o ../../../kercalls/x86/so/MsgReadv.o ../../../kercalls/x86/so/MsgReadv_r.o ../../../kercalls/x86/so/MsgReceive.o ../../../kercalls/x86/so/MsgReceiveAsyncGbl.o ../../../kercalls/x86/so/MsgReceiveAsyncGbl_r.o ../../../kercalls/x86/so/MsgReceivePulse.o ../../../kercalls/x86/so/MsgReceivePulse_r.o ../../../kercalls/x86/so/MsgReceivePulsev.o ../../../kercalls/x86/so/MsgReceivePulsev_r.o ../../../kercalls/x86/so/MsgReceive_r.o ../../../kercalls/x86/so/MsgReceivev.o ../../../kercalls/x86/so/MsgReceivev_r.o ../../../kercalls/x86/so/MsgReply.o ../../../kercalls/x86/so/MsgReply_r.o ../../../kercalls/x86/so/MsgReplyv.o ../../../kercalls/x86/so/MsgReplyv_r.o ../../../kercalls/x86/so/MsgSend.o ../../../kercalls/x86/so/MsgSendPulse.o ../../../kercalls/x86/so/MsgSendPulse_r.o ../../../kercalls/x86/so/MsgSend_r.o ../../../kercalls/x86/so/MsgSendnc.o ../../../kercalls/x86/so/MsgSendnc_r.o ../../../kercalls/x86/so/MsgSendsv.o ../../../kercalls/x86/so/MsgSendsv_r.o ../../../kercalls/x86/so/MsgSendsvnc.o ../../../kercalls/x86/so/MsgSendsvnc_r.o ../../../kercalls/x86/so/MsgSendv.o ../../../kercalls/x86/so/MsgSendv_r.o ../../../kercalls/x86/so/MsgSendvnc.o ../../../kercalls/x86/so/MsgSendvnc_r.o ../../../kercalls/x86/so/MsgSendvs.o ../../../kercalls/x86/so/MsgSendvs_r.o ../../../kercalls/x86/so/MsgSendvsnc.o ../../../kercalls/x86/so/MsgSendvsnc_r.o ../../../kercalls/x86/so/MsgVerifyEvent.o ../../../kercalls/x86/so/MsgVerifyEvent_r.o ../../../kercalls/x86/so/MsgWrite.o ../../../kercalls/x86/so/MsgWrite_r.o ../../../kercalls/x86/so/MsgWritev.o ../../../kercalls/x86/so/MsgWritev_r.o ../../../kercalls/x86/so/NetCred.o ../../../kercalls/x86/so/NetInfoscoid.o ../../../kercalls/x86/so/NetSignalKill.o ../../../kercalls/x86/so/NetUnblock.o ../../../kercalls/x86/so/NetVtid.o ../../../kercalls/x86/so/SchedCtl.o ../../../kercalls/x86/so/SchedCtl_r.o ../../../kercalls/x86/so/SchedGet.o ../../../kercalls/x86/so/SchedGet_r.o ../../../kercalls/x86/so/SchedInfo.o ../../../kercalls/x86/so/SchedInfo_r.o ../../../kercalls/x86/so/SchedSet.o ../../../kercalls/x86/so/SchedSet_r.o ../../../kercalls/x86/so/SchedYield.o ../../../kercalls/x86/so/SchedYield_r.o ../../../kercalls/x86/so/SignalAction.o ../../../kercalls/x86/so/SignalAction_r.o ../../../kercalls/x86/so/SignalFault.o ../../../kercalls/x86/so/SignalKill.o ../../../kercalls/x86/so/SignalKill_r.o ../../../kercalls/x86/so/SignalProcmask.o ../../../kercalls/x86/so/SignalProcmask_r.o ../../../kercalls/x86/so/SignalReturn.o ../../../kercalls/x86/so/SignalSuspend.o ../../../kercalls/x86/so/SignalSuspend_r.o ../../../kercalls/x86/so/SignalWaitinfo.o ../../../kercalls/x86/so/SignalWaitinfo_r.o ../../../kercalls/x86/so/SyncCondvarSignal.o ../../../kercalls/x86/so/SyncCondvarSignal_r.o ../../../kercalls/x86/so/SyncCondvarWait.o ../../../kercalls/x86/so/SyncCondvarWait_r.o ../../../kercalls/x86/so/SyncCtl.o ../../../kercalls/x86/so/SyncCtl_r.o ../../../kercalls/x86/so/SyncDestroy.o ../../../kercalls/x86/so/SyncDestroy_r.o ../../../kercalls/x86/so/SyncMutexLock.o ../../../kercalls/x86/so/SyncMutexLock_r.o ../../../kercalls/x86/so/SyncMutexRevive.o ../../../kercalls/x86/so/SyncMutexRevive_r.o ../../../kercalls/x86/so/SyncMutexUnlock.o ../../../kercalls/x86/so/SyncMutexUnlock_r.o ../../../kercalls/x86/so/SyncSemPost.o ../../../kercalls/x86/so/SyncSemPost_r.o ../../../kercalls/x86/so/SyncSemWait.o ../../../kercalls/x86/so/SyncSemWait_r.o ../../../kercalls/x86/so/SyncTypeCreate.o ../../../kercalls/x86/so/SyncTypeCreate_r.o ../../../kercalls/x86/so/ThreadCancel.o ../../../kercalls/x86/so/ThreadCancel_r.o ../../../kercalls/x86/so/ThreadCreate.o ../../../kercalls/x86/so/ThreadCreate_r.o ../../../kercalls/x86/so/ThreadCtl.o ../../../kercalls/x86/so/ThreadCtl_r.o ../../../kercalls/x86/so/ThreadDestroy.o ../../../kercalls/x86/so/ThreadDestroy_r.o ../../../kercalls/x86/so/ThreadDetach.o ../../../kercalls/x86/so/ThreadDetach_r.o ../../../kercalls/x86/so/ThreadJoin.o ../../../kercalls/x86/so/ThreadJoin_r.o ../../../kercalls/x86/so/TimerAlarm.o ../../../kercalls/x86/so/TimerAlarm_r.o ../../../kercalls/x86/so/TimerCreate.o ../../../kercalls/x86/so/TimerCreate_r.o ../../../kercalls/x86/so/TimerDestroy.o ../../../kercalls/x86/so/TimerDestroy_r.o ../../../kercalls/x86/so/TimerInfo.o ../../../kercalls/x86/so/TimerInfo_r.o ../../../kercalls/x86/so/TimerSettime.o ../../../kercalls/x86/so/TimerSettime_r.o ../../../kercalls/x86/so/TimerTimeout.o ../../../kercalls/x86/so/TimerTimeout_r.o ../../../kercalls/x86/so/__Ring0.o ../../../kercalls/x86/so/__Ring0_r.o ../../../kercalls/x86/so/__SysCpupageGet.o ../../../kercalls/x86/so/__SysCpupageSet.o ../../../kercalls/x86/so/__interruptmask.o ../../../kercalls/x86/so/__interruptunmask.o ../../../kercalls/x86/so/__ker_err.o ../../../kercalls/x86/so/__kerbad.o ../../../kercalls/x86/so/__kernop.o ../../../kercalls/x86/so/__traceevent.o ../../../kercover/x86/so/InterruptDetachId.o ../../../kercover/x86/so/debugbreak.o ../../../kercover/x86/so/debugkdbreak.o ../../../kercover/x86/so/debugkdoutput.o ../../../kercover/x86/so/interruptattachevent.o ../../../kercover/x86/so/interruptattachevent_r.o ../../../kercover/x86/so/interruptdisable.o ../../../kercover/x86/so/interruptenable.o ../../../kercover/x86/so/interrupthookidle.o ../../../kercover/x86/so/interrupthooktrace.o ../../../kercover/x86/so/interruptlock.o ../../../kercover/x86/so/interruptmask.o ../../../kercover/x86/so/interruptpending.o ../../../kercover/x86/so/interruptunlock.o ../../../kercover/x86/so/interruptunmask.o ../../../kercover/x86/so/msgreceiveasync.o ../../../kercover/x86/so/msgsendasync.o ../../../kercover/x86/so/synccreate.o ../../../kercover/x86/so/synccreate_r.o ../../../kercover/x86/so/syncmutexevent.o ../../../kercover/x86/so/syncmutexevent_r.o ../../../kercover/x86/so/timertimeout.o ../../../kercover/x86/so/timertimeout_r.o ../../../kercover/x86/so/traceevent.o ../../../ldd/x86/so/dladdr.o ../../../ldd/x86/so/ldd.o ../../../ldd/x86/so/main.o ../../../misc/x86/so/clearenv.o ../../../misc/x86/so/delay.o ../../../misc/x86/so/max.o ../../../misc/x86/so/min.o ../../../prof/x86/so/gmon.o ../../../prof/x86/so/mcount.o ../../../prof/x86/so/sample.o ../../../qnx/x86/so/__getset_thread_name.o ../../../qnx/x86/so/__hwi_base.o ../../../qnx/x86/so/__hwi_find_string.o ../../../qnx/x86/so/_cmdfd.o ../../../qnx/x86/so/_cmdname.o ../../../qnx/x86/so/_mknod_extra.o ../../../qnx/x86/so/devctl.o ../../../qnx/x86/so/devctlv.o ../../../qnx/x86/so/ftime.o ../../../qnx/x86/so/getprio.o ../../../qnx/x86/so/gettid.o ../../../qnx/x86/so/hwi_find_item.o ../../../qnx/x86/so/hwi_find_tag.o ../../../qnx/x86/so/hwi_next_item.o ../../../qnx/x86/so/hwi_next_tag.o ../../../qnx/x86/so/hwi_off2tag.o ../../../qnx/x86/so/hwi_tag2off.o ../../../qnx/x86/so/inpline.o ../../../qnx/x86/so/intr.o ../../../qnx/x86/so/iofdinfo.o ../../../qnx/x86/so/ionotify.o ../../../qnx/x86/so/ltrunc.o ../../../qnx/x86/so/mmap_device_io.o ../../../qnx/x86/so/mmap_device_memory.o ../../../qnx/x86/so/munmap_device_io.o ../../../qnx/x86/so/munmap_device_memory.o ../../../qnx/x86/so/name_open.o ../../../qnx/x86/so/nanosleep_abs.o ../../../qnx/x86/so/nanosleep_rel.o ../../../qnx/x86/so/nanospin.o ../../../qnx/x86/so/nanospin_count.o ../../../qnx/x86/so/nanospin_ns.o ../../../qnx/x86/so/nanospin_ns_to_count.o ../../../qnx/x86/so/nsec2timespec.o ../../../qnx/x86/so/openfd.o ../../../qnx/x86/so/pthread_getname_np.o ../../../qnx/x86/so/pthread_setname_np.o ../../../qnx/x86/so/pthread_timedjoin.o ../../../qnx/x86/so/qnx_crypt.o ../../../qnx/x86/so/readblock.o ../../../qnx/x86/so/readcond.o ../../../qnx/x86/so/sched_get_priority_adjust.o ../../../qnx/x86/so/searchenv.o ../../../qnx/x86/so/select_block.o ../../../qnx/x86/so/select_event.o ../../../qnx/x86/so/setprio.o ../../../qnx/x86/so/shm_ctl.o ../../../qnx/x86/so/sleepon.o ../../../qnx/x86/so/sopen.o ../../../qnx/x86/so/spawn.o ../../../qnx/x86/so/spawnl.o ../../../qnx/x86/so/spawnle.o ../../../qnx/x86/so/spawnlp.o ../../../qnx/x86/so/spawnlpe.o ../../../qnx/x86/so/spawnp.o ../../../qnx/x86/so/spawnve.o ../../../qnx/x86/so/spawnvpe.o ../../../qnx/x86/so/tcgetsize.o ../../../qnx/x86/so/tcinject.o ../../../qnx/x86/so/tcischars.o ../../../qnx/x86/so/tcsetsize.o ../../../qnx/x86/so/timespec2nsec.o ../../../qnx/x86/so/writeblock.o ../../../resmgr/x86/so/_resmgr_access.o ../../../resmgr/x86/so/_resmgr_close_handler.o ../../../resmgr/x86/so/_resmgr_connect_handler.o ../../../resmgr/x86/so/_resmgr_detach_id.o ../../../resmgr/x86/so/_resmgr_disconnect_handler.o ../../../resmgr/x86/so/_resmgr_dup_handler.o ../../../resmgr/x86/so/_resmgr_handle.o ../../../resmgr/x86/so/_resmgr_handle_grow.o ../../../resmgr/x86/so/_resmgr_handler.o ../../../resmgr/x86/so/_resmgr_io_func.o ../../../resmgr/x86/so/_resmgr_io_handler.o ../../../resmgr/x86/so/_resmgr_iofuncs.o ../../../resmgr/x86/so/_resmgr_link_alloc.o ../../../resmgr/x86/so/_resmgr_link_free.o ../../../resmgr/x86/so/_resmgr_link_handler.o ../../../resmgr/x86/so/_resmgr_link_query.o ../../../resmgr/x86/so/_resmgr_mmap_handler.o ../../../resmgr/x86/so/_resmgr_mount_handler.o ../../../resmgr/x86/so/_resmgr_notify_handler.o ../../../resmgr/x86/so/_resmgr_ocb.o ../../../resmgr/x86/so/_resmgr_openfd_handler.o ../../../resmgr/x86/so/_resmgr_thread.o ../../../resmgr/x86/so/_resmgr_unbind.o ../../../resmgr/x86/so/_resmgr_unblock_handler.o ../../../resmgr/x86/so/resmgr_again.o ../../../resmgr/x86/so/resmgr_data.o ../../../resmgr/x86/so/resmgr_devino.o ../../../resmgr/x86/so/resmgr_handle_tune.o ../../../resmgr/x86/so/resmgr_iofuncs.o ../../../resmgr/x86/so/resmgr_msgread.o ../../../resmgr/x86/so/resmgr_msgreadv.o ../../../resmgr/x86/so/resmgr_msgwrite.o ../../../resmgr/x86/so/resmgr_msgwritev.o ../../../resmgr/x86/so/resmgr_ocb.o ../../../resmgr/x86/so/resmgr_open_bind.o ../../../resmgr/x86/so/resmgr_pathname.o ../../../resmgr/x86/so/resmgr_pathname_attach.o ../../../resmgr/x86/so/resmgr_pathname_detach.o ../../../resmgr/x86/so/resmgr_pulse_attach.o ../../../resmgr/x86/so/resmgr_pulse_detach.o ../../../resmgr/x86/so/resmgr_start.o ../../../resmgr/x86/so/resmgr_unbind.o ../../../services/x86/so/__netmgr_send.o ../../../services/x86/so/_netmgr_connect.o ../../../services/x86/so/_rsrcdbmgr_pack.o ../../../services/x86/so/cfgopen.o ../../../services/x86/so/miniproc_start.o ../../../services/x86/so/modem_open.o ../../../services/x86/so/modem_read.o ../../../services/x86/so/modem_script.o ../../../services/x86/so/modem_write.o ../../../services/x86/so/netmgr_ctl.o ../../../services/x86/so/netmgr_ndtostr.o ../../../services/x86/so/netmgr_path.o ../../../services/x86/so/netmgr_remote_nd.o ../../../services/x86/so/netmgr_strtond.o ../../../services/x86/so/pathmgr_link.o ../../../services/x86/so/pathmgr_symlink.o ../../../services/x86/so/pathmgr_unlink.o ../../../services/x86/so/pci.o ../../../services/x86/so/pm_get_modes.o ../../../services/x86/so/pm_get_power.o ../../../services/x86/so/pm_set_power.o ../../../services/x86/so/pmd_power.o ../../../services/x86/so/procmgr_daemon.o ../../../services/x86/so/procmgr_event_notify.o ../../../services/x86/so/procmgr_event_trigger.o ../../../services/x86/so/procmgr_guardian.o ../../../services/x86/so/procmgr_session.o ../../../services/x86/so/rsrcdbmgr_attach.o ../../../services/x86/so/rsrcdbmgr_create.o ../../../services/x86/so/rsrcdbmgr_destroy.o ../../../services/x86/so/rsrcdbmgr_detach.o ../../../services/x86/so/rsrcdbmgr_minor_attach.o ../../../services/x86/so/rsrcdbmgr_minor_detach.o ../../../services/x86/so/rsrcdbmgr_query.o ../../../services/x86/so/slog.o ../../../services/x86/so/sysmgr_confstr_set.o ../../../services/x86/so/sysmgr_cpumode.o ../../../services/x86/so/sysmgr_reboot.o ../../../services/x86/so/sysmgr_sysconf_set.o ../../../stdio/x86/so/__fpbufinit.o ../../../stdio/x86/so/__fpinit.o ../../../stdio/x86/so/__parse_oflag.o ../../../stdio/x86/so/_freopen.o ../../../stdio/x86/so/_fsopen.o ../../../stdio/x86/so/_tmpfile.o ../../../stdio/x86/so/clearerr.o ../../../stdio/x86/so/fclose.o ../../../stdio/x86/so/fcloseall.o ../../../stdio/x86/so/fdopen.o ../../../stdio/x86/so/feof.o ../../../stdio/x86/so/ferror.o ../../../stdio/x86/so/fflush.o ../../../stdio/x86/so/fgetc.o ../../../stdio/x86/so/fgetchar.o ../../../stdio/x86/so/fgetpos.o ../../../stdio/x86/so/fgets.o ../../../stdio/x86/so/fgetwc.o ../../../stdio/x86/so/fgetws.o ../../../stdio/x86/so/fileno.o ../../../stdio/x86/so/flockfile.o ../../../stdio/x86/so/fopen.o ../../../stdio/x86/so/fopen64.o ../../../stdio/x86/so/fprintf.o ../../../stdio/x86/so/fputc.o ../../../stdio/x86/so/fputchar.o ../../../stdio/x86/so/fputs.o ../../../stdio/x86/so/fputwc.o ../../../stdio/x86/so/fputws.o ../../../stdio/x86/so/fread.o ../../../stdio/x86/so/freopen.o ../../../stdio/x86/so/freopen64.o ../../../stdio/x86/so/fscanf.o ../../../stdio/x86/so/fseek.o ../../../stdio/x86/so/fseeko.o ../../../stdio/x86/so/fseeko64.o ../../../stdio/x86/so/fsetpos.o ../../../stdio/x86/so/ftell.o ../../../stdio/x86/so/ftello.o ../../../stdio/x86/so/ftello64.o ../../../stdio/x86/so/ftrylockfile.o ../../../stdio/x86/so/funlockfile.o ../../../stdio/x86/so/fwide.o ../../../stdio/x86/so/fwprintf.o ../../../stdio/x86/so/fwrite.o ../../../stdio/x86/so/fwscanf.o ../../../stdio/x86/so/getc.o ../../../stdio/x86/so/getchar.o ../../../stdio/x86/so/gets.o ../../../stdio/x86/so/getwc.o ../../../stdio/x86/so/getwchar.o ../../../stdio/x86/so/perror.o ../../../stdio/x86/so/printf.o ../../../stdio/x86/so/putc.o ../../../stdio/x86/so/putchar.o ../../../stdio/x86/so/puts.o ../../../stdio/x86/so/putwc.o ../../../stdio/x86/so/putwchar.o ../../../stdio/x86/so/rewind.o ../../../stdio/x86/so/scanf.o ../../../stdio/x86/so/setbuf.o ../../../stdio/x86/so/setvbuf.o ../../../stdio/x86/so/snprintf.o ../../../stdio/x86/so/sprintf.o ../../../stdio/x86/so/sscanf.o ../../../stdio/x86/so/strerror.o ../../../stdio/x86/so/swprintf.o ../../../stdio/x86/so/swscanf.o ../../../stdio/x86/so/tmpfile.o ../../../stdio/x86/so/tmpfile64.o ../../../stdio/x86/so/ungetc.o ../../../stdio/x86/so/ungetwc.o ../../../stdio/x86/so/vfprintf.o ../../../stdio/x86/so/vfscanf.o ../../../stdio/x86/so/vfwprint.o ../../../stdio/x86/so/vfwscanf.o ../../../stdio/x86/so/vprintf.o ../../../stdio/x86/so/vscanf.o ../../../stdio/x86/so/vsnprint.o ../../../stdio/x86/so/vsprintf.o ../../../stdio/x86/so/vsscanf.o ../../../stdio/x86/so/vswprint.o ../../../stdio/x86/so/vswscanf.o ../../../stdio/x86/so/vwprintf.o ../../../stdio/x86/so/vwscanf.o ../../../stdio/x86/so/wprintf.o ../../../stdio/x86/so/wscanf.o ../../../stdio/x86/so/xfbuf.o ../../../stdio/x86/so/xfgpos.o ../../../stdio/x86/so/xfiles.o ../../../stdio/x86/so/xfprout.o ../../../stdio/x86/so/xfrprep.o ../../../stdio/x86/so/xfspos.o ../../../stdio/x86/so/xfwprep.o ../../../stdio/x86/so/xgenld.o ../../../stdio/x86/so/xgetfld.o ../../../stdio/x86/so/xgetfloa.o ../../../stdio/x86/so/xgetint.o ../../../stdio/x86/so/xgetstr.o ../../../stdio/x86/so/xldtob.o ../../../stdio/x86/so/xlitob.o ../../../stdio/x86/so/xprintf.o ../../../stdio/x86/so/xputfld.o ../../../stdio/x86/so/xputstr.o ../../../stdio/x86/so/xputtxt.o ../../../stdio/x86/so/xscanf.o ../../../stdio/x86/so/xsnprout.o ../../../stdio/x86/so/xsprout.o ../../../stdio/x86/so/xsyslock.o ../../../stdio/x86/so/xwfprout.o ../../../stdio/x86/so/xwfrprep.o ../../../stdio/x86/so/xwfwprep.o ../../../stdio/x86/so/xwgenld.o ../../../stdio/x86/so/xwgetfld.o ../../../stdio/x86/so/xwgetflo.o ../../../stdio/x86/so/xwgetint.o ../../../stdio/x86/so/xwgetstr.o ../../../stdio/x86/so/xwldtob.o ../../../stdio/x86/so/xwlitob.o ../../../stdio/x86/so/xwprintf.o ../../../stdio/x86/so/xwputfld.o ../../../stdio/x86/so/xwputstr.o ../../../stdio/x86/so/xwputtxt.o ../../../stdio/x86/so/xwscanf.o ../../../stdio/x86/so/xwsprout.o ../../../string/x86/so/atof.o ../../../string/x86/so/atoh.o ../../../string/x86/so/atoi.o ../../../string/x86/so/atol.o ../../../string/x86/so/atoll.o ../../../string/x86/so/bcmp.o ../../../string/x86/so/bcopy.o ../../../string/x86/so/bzero.o ../../../string/x86/so/ffs.o ../../../string/x86/so/index.o ../../../string/x86/so/itoa.o ../../../string/x86/so/lltoa.o ../../../string/x86/so/ltoa.o ../../../string/x86/so/memccpy.o ../../../string/x86/so/memchr.o ../../../string/x86/so/memcmp.o ../../../string/x86/so/memcpy.o ../../../string/x86/so/memcpyv.o ../../../string/x86/so/memicmp.o ../../../string/x86/so/memmove.o ../../../string/x86/so/memset.o ../../../string/x86/so/rindex.o ../../../string/x86/so/straddstr.o ../../../string/x86/so/strcasecmp.o ../../../string/x86/so/strcat.o ../../../string/x86/so/strchr.o ../../../string/x86/so/strcmp.o ../../../string/x86/so/strcoll.o ../../../string/x86/so/strcpy.o ../../../string/x86/so/strcspn.o ../../../string/x86/so/strdup.o ../../../string/x86/so/stricmp.o ../../../string/x86/so/strlen.o ../../../string/x86/so/strlwr.o ../../../string/x86/so/strncasecmp.o ../../../string/x86/so/strncat.o ../../../string/x86/so/strncmp.o ../../../string/x86/so/strncpy.o ../../../string/x86/so/strnicmp.o ../../../string/x86/so/strnset.o ../../../string/x86/so/strpbrk.o ../../../string/x86/so/strrchr.o ../../../string/x86/so/strrev.o ../../../string/x86/so/strset.o ../../../string/x86/so/strspn.o ../../../string/x86/so/strstr.o ../../../string/x86/so/strtod.o ../../../string/x86/so/strtof.o ../../../string/x86/so/strtoimax.o ../../../string/x86/so/strtok.o ../../../string/x86/so/strtok_r.o ../../../string/x86/so/strtol.o ../../../string/x86/so/strtold.o ../../../string/x86/so/strtoll.o ../../../string/x86/so/strtoul.o ../../../string/x86/so/strtoull.o ../../../string/x86/so/strtoumax.o ../../../string/x86/so/strupr.o ../../../string/x86/so/strxfrm.o ../../../string/x86/so/towlower.o ../../../string/x86/so/towupper.o ../../../string/x86/so/ulltoa.o ../../../string/x86/so/ultoa.o ../../../string/x86/so/utoa.o ../../../string/x86/so/wcscat.o ../../../string/x86/so/wcschr.o ../../../string/x86/so/wcscmp.o ../../../string/x86/so/wcscoll.o ../../../string/x86/so/wcscpy.o ../../../string/x86/so/wcscspn.o ../../../string/x86/so/wcslen.o ../../../string/x86/so/wcsncat.o ../../../string/x86/so/wcsncmp.o ../../../string/x86/so/wcsncpy.o ../../../string/x86/so/wcspbrk.o ../../../string/x86/so/wcsrchr.o ../../../string/x86/so/wcsrtomb.o ../../../string/x86/so/wcsspn.o ../../../string/x86/so/wcsstr.o ../../../string/x86/so/wcstod.o ../../../string/x86/so/wcstof.o ../../../string/x86/so/wcstoimax.o ../../../string/x86/so/wcstok.o ../../../string/x86/so/wcstol.o ../../../string/x86/so/wcstold.o ../../../string/x86/so/wcstoll.o ../../../string/x86/so/wcstombs.o ../../../string/x86/so/wcstoul.o ../../../string/x86/so/wcstoull.o ../../../string/x86/so/wcstoumax.o ../../../string/x86/so/wcsxfrm.o ../../../string/x86/so/wmemchr.o ../../../string/x86/so/wmemcmp.o ../../../string/x86/so/wmemcpy.o ../../../string/x86/so/wmemmove.o ../../../string/x86/so/wmemset.o ../../../string/x86/so/xstoll.o ../../../string/x86/so/xstoul.o ../../../string/x86/so/xstoull.o ../../../string/x86/so/xstrxfrm.o ../../../string/x86/so/xwcsxfrm.o ../../../string/x86/so/xwstod.o ../../../string/x86/so/xwstof.o ../../../string/x86/so/xwstoflt.o ../../../string/x86/so/xwstold.o ../../../string/x86/so/xwstoll.o ../../../string/x86/so/xwstopfx.o ../../../string/x86/so/xwstoul.o ../../../string/x86/so/xwstoull.o ../../../string/x86/so/xwstoxfl.o ../../../support/x86/so/_CMain.o ../../../support/x86/so/__cleanup.o ../../../support/x86/so/__get_errno_ptr.o ../../../support/x86/so/__main.o ../../../support/x86/so/__stackavail.o ../../../support/x86/so/__tls.o ../../../support/x86/so/_conf_destroy.o ../../../support/x86/so/_conf_get.o ../../../support/x86/so/_conf_set.o ../../../support/x86/so/_connect.o ../../../support/x86/so/_connect_combine.o ../../../support/x86/so/_connect_ctrl.o ../../../support/x86/so/_connect_entry.o ../../../support/x86/so/_connect_fd.o ../../../support/x86/so/_connect_object.o ../../../support/x86/so/_curbrk.o ../../../support/x86/so/_devctl.o ../../../support/x86/so/_flush_cache.o ../../../support/x86/so/_fullpath.o ../../../support/x86/so/_init_libc.o ../../../support/x86/so/_intr_v86.o ../../../support/x86/so/_math_emu_callout.o ../../../support/x86/so/_math_emu_load.o ../../../support/x86/so/_math_emu_stub.o ../../../support/x86/so/_notifyreadxv.o ../../../support/x86/so/_syspage_time.o ../../../support/x86/so/_unlink_object.o ../../../support/x86/so/_vopen.o ../../../support/x86/so/_writexv.o ../../../time/x86/so/asctime.o ../../../time/x86/so/clock.o ../../../time/x86/so/ctime.o ../../../time/x86/so/ctime_r.o ../../../time/x86/so/difftime.o ../../../time/x86/so/gmtime.o ../../../time/x86/so/gmtime_r.o ../../../time/x86/so/localtim.o ../../../time/x86/so/localtim_r.o 
+C:/QNX630/host/win32/x86/usr/bin/ntox86-ar -r  C:/testqde/workspace/lib/c/lib/x86/so/libcS.a  ../../../time/x86/so/mktime.o ../../../time/x86/so/strftime.o ../../../time/x86/so/time.o ../../../time/x86/so/tzset.o ../../../time/x86/so/wcsftime.o ../../../time/x86/so/xgentime.o ../../../time/x86/so/xgetdst.o ../../../time/x86/so/xgetrules.o ../../../time/x86/so/xgettime.o ../../../time/x86/so/xgetzone.o ../../../time/x86/so/xisdst.o ../../../time/x86/so/xstrftim.o ../../../time/x86/so/xttotm.o ../../../time/x86/so/xtzset.o ../../../time/x86/so/xwcsftim.o ../../../unix/x86/so/alloca.o ../../../unix/x86/so/cfmakeraw.o ../../../unix/x86/so/cfree.o ../../../unix/x86/so/chroot.o ../../../unix/x86/so/chsize.o ../../../unix/x86/so/daemon.o ../../../unix/x86/so/eof.o ../../../unix/x86/so/err.o ../../../unix/x86/so/errx.o ../../../unix/x86/so/flock.o ../../../unix/x86/so/getdtablesize.o ../../../unix/x86/so/getgrouplist.o ../../../unix/x86/so/getpass.o ../../../unix/x86/so/getut.o ../../../unix/x86/so/getw.o ../../../unix/x86/so/getwd.o ../../../unix/x86/so/initgroups.o ../../../unix/x86/so/mktemp.o ../../../unix/x86/so/mount.o ../../../unix/x86/so/nap.o ../../../unix/x86/so/napms.o ../../../unix/x86/so/pathfind.o ../../../unix/x86/so/pty.o ../../../unix/x86/so/putw.o ../../../unix/x86/so/rdchk.o ../../../unix/x86/so/re_comp.o ../../../unix/x86/so/scandir.o ../../../unix/x86/so/setbuffer.o ../../../unix/x86/so/sethostname.o ../../../unix/x86/so/setlinebuf.o ../../../unix/x86/so/settimeofday.o ../../../unix/x86/so/sigblock.o ../../../unix/x86/so/sigmask.o ../../../unix/x86/so/strsep.o ../../../unix/x86/so/strsignal.o ../../../unix/x86/so/sys_err.o ../../../unix/x86/so/sys_sig.o ../../../unix/x86/so/tcsetsid.o ../../../unix/x86/so/verr.o ../../../unix/x86/so/verrx.o ../../../unix/x86/so/vfork.o ../../../unix/x86/so/vwarn.o ../../../unix/x86/so/vwarnx.o ../../../unix/x86/so/wait3.o ../../../unix/x86/so/wait4.o ../../../unix/x86/so/warn.o ../../../unix/x86/so/warnx.o ../../../xopen/x86/so/__statvfs_check.o ../../../xopen/x86/so/__waitid_net.o ../../../xopen/x86/so/_rand48.o ../../../xopen/x86/so/creat64.o ../../../xopen/x86/so/crypt.o ../../../xopen/x86/so/drand48.o ../../../xopen/x86/so/erand48.o ../../../xopen/x86/so/fchdir.o ../../../xopen/x86/so/fstat64.o ../../../xopen/x86/so/fstatvfs.o ../../../xopen/x86/so/fstatvfs64.o ../../../xopen/x86/so/ftok.o ../../../xopen/x86/so/ftruncate64.o ../../../xopen/x86/so/gethostname.o ../../../xopen/x86/so/getitimer.o ../../../xopen/x86/so/getpgid.o ../../../xopen/x86/so/getpriority.o ../../../xopen/x86/so/getrlimit.o ../../../xopen/x86/so/getrusage.o ../../../xopen/x86/so/getsubopt.o ../../../xopen/x86/so/gettimeofday.o ../../../xopen/x86/so/hsearch.o ../../../xopen/x86/so/ioctl.o ../../../xopen/x86/so/jrand48.o ../../../xopen/x86/so/killpg.o ../../../xopen/x86/so/lcong48.o ../../../xopen/x86/so/lockf.o ../../../xopen/x86/so/lockf64.o ../../../xopen/x86/so/lrand48.o ../../../xopen/x86/so/lsearch.o ../../../xopen/x86/so/mrand48.o ../../../xopen/x86/so/nftw.o ../../../xopen/x86/so/nice.o ../../../xopen/x86/so/nrand48.o ../../../xopen/x86/so/open64.o ../../../xopen/x86/so/poll.o ../../../xopen/x86/so/pread.o ../../../xopen/x86/so/pthread_attr_getguardsize.o ../../../xopen/x86/so/pthread_attr_setguardsize.o ../../../xopen/x86/so/pthread_concurrency.o ../../../xopen/x86/so/pty.o ../../../xopen/x86/so/putenv.o ../../../xopen/x86/so/pwrite.o ../../../xopen/x86/so/random.o ../../../xopen/x86/so/readv.o ../../../xopen/x86/so/realpath.o ../../../xopen/x86/so/seed48.o ../../../xopen/x86/so/setenv.o ../../../xopen/x86/so/setpgrp.o ../../../xopen/x86/so/setpriority.o ../../../xopen/x86/so/setrlimit.o ../../../xopen/x86/so/srand48.o ../../../xopen/x86/so/stat64.o ../../../xopen/x86/so/statvfs.o ../../../xopen/x86/so/statvfs64.o ../../../xopen/x86/so/swab.o ../../../xopen/x86/so/sync.o ../../../xopen/x86/so/syslog.o ../../../xopen/x86/so/tcgetsid.o ../../../xopen/x86/so/times.o ../../../xopen/x86/so/tmpnam.o ../../../xopen/x86/so/truncate.o ../../../xopen/x86/so/truncate64.o ../../../xopen/x86/so/ualarm.o ../../../xopen/x86/so/unsetenv.o ../../../xopen/x86/so/usleep.o ../../../xopen/x86/so/utimes.o ../../../xopen/x86/so/waitid.o ../../../xopen/x86/so/writev.o 
+C:/QNX630/host/win32/x86/usr/bin/rm -f  C:/testqde/workspace/lib/c/lib/x86/so/libc.so
+C:/QNX630/host/win32/x86/usr/bin/qcc -Vgcc_ntox86  -shared -Wl,-hlibc.so.2 -Wl,-Bstatic -nostartup -Wl,-e_start_ -oC:/testqde/workspace/lib/c/lib/x86/so/libc.so -g  -Wl,--whole-archive libc_cut.a -Wl,--no-whole-archive -L. -LC:/QNX630/target/qnx6/x86/lib -LC:/QNX630/target/qnx6/x86/usr/lib       
+C:/QNX630/host/win32/x86/usr/bin/usemsg -s __USAGENTO -s __USAGE -iVERSION -iTAGID -iDESCRIPTION -f libc.so.pinfo C:/testqde/workspace/lib/c/lib/x86/so/libc.so  
+make[3]: Leaving directory `C:/testqde/workspace/lib/c/lib/x86/so'
+make[2]: Leaving directory `C:/testqde/workspace/lib/c/lib/x86'
+make[1]: Leaving directory `C:/testqde/workspace/lib/c/lib'
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/Makefile b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/Makefile
new file mode 100644
index 0000000..0e22650
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/Makefile
@@ -0,0 +1,8 @@
+LIST=VARIANT
+ifndef QRECURSE
+QRECURSE=recurse.mk
+ifdef QCONFIG
+QRDIR=$(dir $(QCONFIG))
+endif
+endif
+include $(QRDIR)$(QRECURSE)
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/common.mk b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/common.mk
new file mode 100644
index 0000000..6e21c52
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/common.mk
@@ -0,0 +1,7 @@
+ifndef QCONFIG
+QCONFIG=qconfig.mk
+endif
+include $(QCONFIG)
+USEFILE=
+LIBS+=socket
+include $(MKFILES_ROOT)/qtargets.mk
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/main.c b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/main.c
new file mode 100644
index 0000000..6295263
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/main.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main()
+{
+	printf("Hello there\n");
+	return(0);
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/Makefile b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/Makefile
new file mode 100644
index 0000000..0e22650
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/Makefile
@@ -0,0 +1,8 @@
+LIST=VARIANT
+ifndef QRECURSE
+QRECURSE=recurse.mk
+ifdef QCONFIG
+QRDIR=$(dir $(QCONFIG))
+endif
+endif
+include $(QRDIR)$(QRECURSE)
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/Makefile b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/Makefile
new file mode 100644
index 0000000..2c76089
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/Makefile
@@ -0,0 +1 @@
+include ../../common.mk
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/exe_g b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/exe_g
new file mode 100644
index 0000000..1c54db1
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/exe_g differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/main.o b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/main.o
new file mode 100644
index 0000000..41e9e97
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/main.o differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/test.o b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/test.o
new file mode 100644
index 0000000..9a35dfb
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/test.o differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/test2.o b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/test2.o
new file mode 100644
index 0000000..bae3191
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/ppc/be.g/test2.o differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/test.c b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/test.c
new file mode 100644
index 0000000..23baffa
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/test.c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+
+
+int func1 (void)
+{
+	printf("This is func1\n");
+	return(1);
+}
+
+char * func2(void)
+{
+	printf("This is func2\n");
+	return(0);
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/test2.c b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/test2.c
new file mode 100644
index 0000000..7b26241
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/test2.c
@@ -0,0 +1,13 @@
+#include <stdio.h>
+
+int test2func1(void)
+{
+	printf("This is a function in the second object\n");
+	return(1);
+}
+
+int test2func2(void)
+{
+	printf("This is another function in the second object\n");
+	return(2);
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/Makefile b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/Makefile
new file mode 100644
index 0000000..0e22650
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/Makefile
@@ -0,0 +1,8 @@
+LIST=VARIANT
+ifndef QRECURSE
+QRECURSE=recurse.mk
+ifdef QCONFIG
+QRDIR=$(dir $(QCONFIG))
+endif
+endif
+include $(QRDIR)$(QRECURSE)
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/Makefile b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/Makefile
new file mode 100644
index 0000000..2c76089
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/Makefile
@@ -0,0 +1 @@
+include ../../common.mk
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/exe_g b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/exe_g
new file mode 100644
index 0000000..465e16d
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/exe_g differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/main.o b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/main.o
new file mode 100644
index 0000000..8c61c21
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/main.o differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/test.o b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/test.o
new file mode 100644
index 0000000..5f95688
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/test.o differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/test2.o b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/test2.o
new file mode 100644
index 0000000..aa8de34
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o.g/test2.o differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/Makefile b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/Makefile
new file mode 100644
index 0000000..2c76089
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/Makefile
@@ -0,0 +1 @@
+include ../../common.mk
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/exe b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/exe
new file mode 100644
index 0000000..d136311
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/exe differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/main.o b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/main.o
new file mode 100644
index 0000000..a5c78c1
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/main.o differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/test.o b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/test.o
new file mode 100644
index 0000000..357c398
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/test.o differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/test2.o b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/test2.o
new file mode 100644
index 0000000..52e88a7
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/exe/x86/o/test2.o differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/Makefile b/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/Makefile
new file mode 100644
index 0000000..0e22650
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/Makefile
@@ -0,0 +1,8 @@
+LIST=VARIANT
+ifndef QRECURSE
+QRECURSE=recurse.mk
+ifdef QCONFIG
+QRDIR=$(dir $(QCONFIG))
+endif
+endif
+include $(QRDIR)$(QRECURSE)
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/common.mk b/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/common.mk
new file mode 100644
index 0000000..80c1e67
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/common.mk
@@ -0,0 +1,7 @@
+ifndef QCONFIG
+QCONFIG=qconfig.mk
+endif
+include $(QCONFIG)
+USEFILE=
+
+include $(MKFILES_ROOT)/qtargets.mk
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/main.c b/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/main.c
new file mode 100644
index 0000000..ce93b89
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/main.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+int bigArray[100];
+int x[10]={1,2,3,4,5,6,7,8,9,0};
+int main()
+{
+	printf("Hello there\n");
+	return(0);
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/x86/Makefile b/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/x86/Makefile
new file mode 100644
index 0000000..0e22650
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/x86/Makefile
@@ -0,0 +1,8 @@
+LIST=VARIANT
+ifndef QRECURSE
+QRECURSE=recurse.mk
+ifdef QCONFIG
+QRDIR=$(dir $(QCONFIG))
+endif
+endif
+include $(QRDIR)$(QRECURSE)
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/x86/o.g/Makefile b/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/x86/o.g/Makefile
new file mode 100644
index 0000000..2c76089
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/x86/o.g/Makefile
@@ -0,0 +1 @@
+include ../../common.mk
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/x86/o.g/exebig_g b/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/x86/o.g/exebig_g
new file mode 100644
index 0000000..3aacf62
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/x86/o.g/exebig_g differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/x86/o.g/main.o b/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/x86/o.g/main.o
new file mode 100644
index 0000000..e7d818d
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/exebig/x86/o.g/main.o differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/bug246129/include/ext/dummy.h b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/bug246129/include/ext/dummy.h
new file mode 100644
index 0000000..a910268
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/bug246129/include/ext/dummy.h
@@ -0,0 +1,3 @@
+#ifndef DUMMY_H_
+#define DUMMY_H_
+#endif
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/bug246129/include/type.h b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/bug246129/include/type.h
new file mode 100644
index 0000000..ed2633a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/bug246129/include/type.h
@@ -0,0 +1,5 @@
+#ifndef TYPE_H_
+#define TYPE_H_
+class Type {
+};
+#endif
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/bug246129/source.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/bug246129/source.cpp
new file mode 100644
index 0000000..0a80efe
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/bug246129/source.cpp
@@ -0,0 +1,9 @@
+#include <type.h>
+#include <external_type.h>
+void check()
+{
+  Type t;
+  Wrapper w;
+  ExternalType et;
+  ExternalWrapper ew;
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/bug246129/wrapper_include/type.h b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/bug246129/wrapper_include/type.h
new file mode 100644
index 0000000..b7cbee3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/bug246129/wrapper_include/type.h
@@ -0,0 +1,6 @@
+#ifndef WRAPPER_TYPE_H_
+#define WRAPPER_TYPE_H_
+#include <ext/../type.h>
+class Wrapper {
+};
+#endif
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/includes/included.h b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/includes/included.h
new file mode 100644
index 0000000..4282aae
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/includes/included.h
@@ -0,0 +1,2 @@
+int included;
+int CONTEXT;
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/includes/notIncluded.h b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/includes/notIncluded.h
new file mode 100644
index 0000000..aacf85e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/includes/notIncluded.h
@@ -0,0 +1 @@
+int not_included;
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/includes/testInclude.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/includes/testInclude.cpp
new file mode 100644
index 0000000..e1ee8ed
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/includes/testInclude.cpp
@@ -0,0 +1,3 @@
+#define CONTEXT testInclude_cpp
+
+#include "included.h"
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/enumerator.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/enumerator.cpp
new file mode 100644
index 0000000..711e162
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/enumerator.cpp
@@ -0,0 +1,3 @@
+enum E20061017 {
+	e20061017
+};
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/macro.c b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/macro.c
new file mode 100644
index 0000000..027463a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/macro.c
@@ -0,0 +1,2 @@
+#define FOO 1
+#define Foo(x) 2
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/nested.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/nested.cpp
new file mode 100644
index 0000000..74e8cce
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/nested.cpp
@@ -0,0 +1,13 @@
+class C160913{};
+
+namespace ns160913 {
+    class C160913{};
+    
+    namespace ns160913 {
+	    class C160913{};
+    } 
+};
+
+namespace {
+	class CInUnnamed160913{};
+};
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/staticFunc1.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/staticFunc1.cpp
new file mode 100644
index 0000000..0a9b76b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/staticFunc1.cpp
@@ -0,0 +1,2 @@
+static int staticFunc20061017();
+static int staticVar20061017;
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/staticFunc2.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/staticFunc2.cpp
new file mode 100644
index 0000000..0a9b76b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/search/staticFunc2.cpp
@@ -0,0 +1,2 @@
+static int staticFunc20061017();
+static int staticVar20061017;
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/trilogy/trilogy.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/trilogy/trilogy.cpp
new file mode 100644
index 0000000..33acf94
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexTests/trilogy/trilogy.cpp
@@ -0,0 +1,5 @@
+#include <stdio.h>
+#include <windows.h>
+#include <iostream>
+
+int main() {  return 0; }
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/DocumentManager.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/DocumentManager.cpp
new file mode 100644
index 0000000..5fb91b9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/DocumentManager.cpp
@@ -0,0 +1,25 @@
+//#include "StdAfx.h"
+#include "DocumentManager.h"
+
+CDocumentManager::CDocumentManager(void)
+{
+}
+
+CDocumentManager::~CDocumentManager(void)
+{
+}
+
+void CDocumentManager::addToControlMap(UINT threadID, IUnknown * theControl)
+{
+	_controlMap.insert(MUL2IUnk_Pair(threadID,theControl));
+}
+
+void CDocumentManager::getControl(ULONG threadID, IUnknown ** theControl)
+{
+	if (_controlMap.find(threadID) != _controlMap.end())
+	{
+		theControl = &_controlMap[threadID];
+	}
+
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/DocumentManager.h b/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/DocumentManager.h
new file mode 100644
index 0000000..868c228
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/DocumentManager.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <map>
+
+typedef  map<ULONG, IUnknown *> MUL2IUnk;
+typedef pair <ULONG, IUnknown *> MUL2IUnk_Pair;
+
+class CDocumentManager
+{
+public:
+	CDocumentManager(void);
+	~CDocumentManager(void);
+
+private:
+	MUL2IUnk _controlMap;
+
+public:
+	void addToControlMap(UINT threadID, IUnknown * theControl);
+	void getControl(ULONG threadID, IUnknown ** theControl);
+};
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/extramail.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/extramail.cpp
new file mode 100644
index 0000000..da47fd6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/extramail.cpp
@@ -0,0 +1,112 @@
+#include <iostream.h>
+#include <stdlib.h>
+#include <alloc.h>
+#include <iomanip.h>
+
+#define PRINT(a,b) cout<<(a)<<(b)
+#define CASE break;case
+#define MAX(a,b) (((a)>(b))?(a):(b))
+
+typedef int int32;
+
+static void doSomething();
+
+namespace Z{
+	int x;
+	namespace X{
+		namespace Y{
+			enum test{cool,hi,bye,why};
+			class Mail
+			{
+			public:
+			Mail(){}
+			virtual void print()=0; //Pure Virtual Function, forces redefinition
+			protected:
+			float postage;
+			char *type;
+			friend ostream& operator << (ostream& os, Mail *m);
+			};
+			
+			class postcard : public Mail
+			{
+			public:
+			postcard(): Mail(){postage = 0.20; type = "Postcard";}
+			void print(){cout << type << ": $" << setiosflags(ios::fixed)
+			 <<setprecision(2) << postage <<endl;}
+			 };
+			
+			class first_class : public Mail
+			{
+			public:
+			first_class() : Mail(){postage = 0.32; type = "First Class";}
+			void print(){cout << type << ": $" <<setiosflags(ios::fixed)
+			             << setprecision(2) << postage <<endl;}
+			 
+			};
+			
+			class Unknown : public postcard, first_class // ??? Multiple Inheritance
+			{
+			public:
+			Unknown(): postcard(), first_class()
+			{
+			postcard::postage = 1.50; // MUST disambiguate
+			postcard::type = "Unknown";
+			}
+			void print(){cout << postcard::type << ": $" <<setiosflags(ios::fixed)
+			             <<setprecision(2)<<postcard::postage <<endl;}
+			 };
+			
+			class container
+			{
+			private:
+			Mail **array;
+			int index;
+			int sz;
+			public:
+			container(){array = 0;}
+			~container(){
+			for(int x = 0; x <sz; x++)
+			 delete array[x];
+			free(array);
+			}
+			int size() {return sz;}
+			Mail* operator[](int index);
+			Mail* operator = (Mail* mail);
+			};
+			
+			main()
+			{
+			container PO_Box;
+			PO_Box = new postcard;
+			PO_Box = new first_class;
+			PO_Box = new parcel_Post;
+			//PO_Box = new Unknown;
+			//one way of printing information
+			for(int x =0; x <3; x++){
+			 PO_Box[x]->print();
+			}
+			//Overloaded  <<
+			 for(int x =0; x <PO_Box.size(); x++){
+			 cout << PO_Box[x];
+			 }
+			}
+			
+			ostream& operator << (ostream &os, Mail *m)
+			{
+			os <<setiosflags(ios::fixed) << setprecision(2)<< m->type
+			<< ": $" << m->postage <<endl;
+			
+			return os;
+			}
+			Mail* container::operator[](int index) {return array[index];}
+			Mail* container::operator = (Mail* mail)
+			{ 
+			int size = sizeof(Mail*) * (++sz); 
+			int temp = sz -1; 
+			array = (Mail**)realloc(array, size); 
+			array[temp] = mail; 
+			return 0; 
+			}
+		}
+	}	
+}	
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/mail.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/mail.cpp
new file mode 100644
index 0000000..63cb455
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/mail.cpp
@@ -0,0 +1,98 @@
+#include <iostream.h>
+#include <stdlib.h>
+#include <alloc.h>
+#include <iomanip.h>
+
+class Mail
+{
+public:
+Mail(){}
+virtual void print()=0; //Pure Virtual Function, forces redefinition
+protected:
+float postage;
+char *type;
+friend ostream& operator << (ostream& os, Mail *m);
+};
+
+class postcard : public Mail
+{
+public:
+postcard(): Mail(){postage = 0.20; type = "Postcard";}
+void print(){cout << type << ": $" << setiosflags(ios::fixed)
+ <<setprecision(2) << postage <<endl;}
+ };
+
+class first_class : public Mail
+{
+public:
+first_class() : Mail(){postage = 0.32; type = "First Class";}
+void print(){cout << type << ": $" <<setiosflags(ios::fixed)
+             << setprecision(2) << postage <<endl;}
+ 
+};
+
+class Unknown : public postcard, first_class // ??? Multiple Inheritance
+{
+public:
+Unknown(): postcard(), first_class()
+{
+postcard::postage = 1.50; // MUST disambiguate
+postcard::type = "Unknown";
+}
+void print(){cout << postcard::type << ": $" <<setiosflags(ios::fixed)
+             <<setprecision(2)<<postcard::postage <<endl;}
+ };
+
+class container
+{
+private:
+Mail **array;
+int index;
+int sz;
+public:
+container(){array = 0;}
+~container(){
+for(int x = 0; x <sz; x++)
+ delete array[x];
+free(array);
+}
+int size() {return sz;}
+Mail* operator[](int index);
+Mail* operator = (Mail* mail);
+};
+
+main()
+{
+container PO_Box;
+PO_Box = new postcard;
+PO_Box = new first_class;
+PO_Box = new parcel_Post;
+//PO_Box = new Unknown;
+//one way of printing information
+for(int x =0; x <3; x++){
+ PO_Box[x]->print();
+}
+//Overloaded  <<
+ for(int x =0; x <PO_Box.size(); x++){
+ cout << PO_Box[x];
+ }
+}
+
+ostream& operator << (ostream &os, Mail *m)
+{
+os <<setiosflags(ios::fixed) << setprecision(2)<< m->type
+<< ": $" << m->postage <<endl;
+
+return os;
+}
+Mail* container::operator[](int index) {return array[index];}
+Mail* container::operator = (Mail* mail)
+{ 
+int size = sizeof(Mail*) * (++sz); 
+int temp = sz -1; 
+array = (Mail**)realloc(array, size); 
+array[temp] = mail; 
+return 0; 
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/reftest.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/reftest.cpp
new file mode 100644
index 0000000..8f65972
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/indexer/reftest.cpp
@@ -0,0 +1,22 @@
+namespace A 
+{ 
+	class ForwardA;
+	ForwardA * tmp;
+	int something(void);
+	namespace B 
+	{ 
+		enum e1{dude1,dude2};
+		int x;  
+		class C 
+		{	static int y = 5; 
+			static int bar(void);
+		}; 
+	} 
+} 
+using namespace A::B;
+using A::B::x;
+using A::B::C;
+using A::B::C::y;
+using A::B::C::bar;
+using A::something;
+using A::B::e1;
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/AutomatedTest.properties b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/AutomatedTest.properties
new file mode 100644
index 0000000..3105d7c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/AutomatedTest.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2005 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# Format of this property file is:
+#   outputFile = <path for report>
+#   source = <path to top of project>, <c or cpp>
+# Multiple source properties may be concatenated.
+# By default, no outputFile is produced.
+# By default, the test will use:
+#   source = ./defaultC, c
+#   source = ./defaultCpp, cpp
+
+#outputFile = Z:\\CDT\\reportRTS.txt
+#source = Z:/V651/Release/C++/TargetRTS, cpp
+   
+#source = D:/temp/test, cpp
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/FractionalAutomatedTest.properties b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/FractionalAutomatedTest.properties
new file mode 100644
index 0000000..cdc39b0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/FractionalAutomatedTest.properties
@@ -0,0 +1,27 @@
+###############################################################################
+# Copyright (c) 2005 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# Format of this property file is:
+#   outputFile = <path for report>
+#   source = <path to top of project>, <c or cpp>
+# Multiple source properties may be concatenated.
+# By default, no outputFile is produced.
+# By default, the test will use:
+#   source = ./defaultC, c
+#   source = ./defaultCpp, cpp
+#
+# outputFile = Z:\\CDT\\reportFrac.txt
+#source = Z:/V651/Release/C++/TargetRTS, cpp
+#source = D:/temp/test, cpp
+#source = Z:/CDT/test/include, cpp \
+#   Z:/CDT/test/src, cpp
+#source = D:\\ACE+TAO\\ACE_wrappers, cpp
+# source = D:\\ACE+TAO\\ACE_wrappers\\ace\\config-psos-diab-mips.h, cpp
+# outDir = Z:\\CDT\\temp
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultC/Simple.c b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultC/Simple.c
new file mode 100644
index 0000000..e7d2a2e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultC/Simple.c
@@ -0,0 +1,43 @@
+#include <Simple.h>
+
+const SimpleStruct simpleStruct =
+{
+	1
+  , "mySimple"
+  , 0.1232
+};
+
+#define SIZEOF( A, B ) sizeof( A.B )
+
+const OtherStruct array[] =
+{
+	{
+#if FOO
+		"foo"
+#else
+		"bar"
+#endif
+	  ,	SIZEOF( simpleStruct, num )
+	  , &t_int
+	  , 0
+	}
+  , {
+		"name"
+	  , SIZEOF( simpleStruct, floatnum )
+	  , &t_float
+	  , 1
+	}
+};
+
+
+void SimpleStruct_construct( struct SimpleStruct * const this )
+{
+	this->num = 1;
+	this->name = "boo";
+	this->floatNum = 1.5;
+}
+
+int ConnectParams_doSomething( const struct SimpleStruct * const this )
+{
+	return 1;
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultC/Simple.h b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultC/Simple.h
new file mode 100644
index 0000000..96e8ef0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultC/Simple.h
@@ -0,0 +1,17 @@
+#ifndef SIMPLE_H
+#define SIMPLE_H
+
+struct SimpleStruct
+{
+	int   num;
+	char  name[ ];
+	float floatNum;
+};
+
+
+void SimpleStruct_construct( struct SimpleStruct * const this );
+
+int SimpleStruct_doSomething( const struct SimpleStruct * const this );
+
+#endif /* SIMPLE_H */
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultCpp/Simple.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultCpp/Simple.cpp
new file mode 100644
index 0000000..4b4055a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultCpp/Simple.cpp
@@ -0,0 +1,37 @@
+#include <Simple.h>
+
+#include <iostream>
+
+#define NULL (void *)0
+
+SimpleClass::SimpleClass( void )
+{
+	init( NULL );
+}
+
+SimpleClass::~SimpleClass( void )
+{
+}
+
+SimpleClass::SimpleClass( const SimpleClass & arg )
+{
+	//TODO: copy constructor
+}
+
+SimpleClass & SimpleClass::operator=( const SimpleClass & arg )
+{
+	if( this != &arg )
+	{
+	}
+	return *this;
+}
+
+
+void SimpleClass::init( void * foo)
+{
+}
+
+InnerStruct & SimpleClass::getInner( void )
+{
+	return inner;
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultCpp/Simple.h b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultCpp/Simple.h
new file mode 100644
index 0000000..e22c5ee
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/AutomatedTest/defaultCpp/Simple.h
@@ -0,0 +1,32 @@
+#ifndef SIMPLE_H
+#define SIMPLE_H
+
+class OtherClass;
+
+class SimpleClass
+{
+public:
+	SimpleClass( void );
+	SimpleClass( const SimpleClass & arg );
+	
+	virtual ~SimpleClass( void );
+	
+	SimpleClass & operator=( const SimpleClass & arg );
+	
+private:
+	struct InnerStruct
+	{
+		inline InnerStruct( int a ){ _a = a; }
+		inline ~InnerStruct( void ){}
+		unsigned int _a;
+	};
+
+	InnerStruct inner;
+
+	void init( void * );
+
+public:
+	InnerStruct & getInner( void );
+};
+
+#endif /* SIMPLE_H */
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/parser/LineNumberTest.h b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/LineNumberTest.h
new file mode 100644
index 0000000..16b5063
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/LineNumberTest.h
@@ -0,0 +1,43 @@
+// inclusion begins and ends on line 2
+#include <stdio.h>				
+
+// simple macro begins and ends on line 5; ANOTHER on line 6
+#define SIMPLE_MACRO simple
+#define ANOTHER
+// namespace begins on line 7, ends on line 22
+namespace MyPackage{
+	// class specification begins on line 10, ends on line 21
+	class Hello{
+	protected:
+		// simple declaration begins and ends on line 13
+		int x;
+		// simple declaration begins and ends on line 15
+		void setX(int X);
+	public:
+		// simple declaration begins on line 18 and ends on line 20
+		Hello( void ) : x 
+			( 5 ) {
+		}
+	};
+}
+  
+// simple declaration begins on line 25 and ends on line 27
+int *
+	y =
+	0; 
+
+// complex macro begins on line 30 and ends on line 31
+#define COMPLEX_MACRO 33 \
+	+ 44
+
+// template declaration begins on line 34 and ends on line 35
+template <class A > 
+	A createA( void ); 
+
+// enumeration begins on line 38 and ends on line 43
+enum {
+	one,  // enumerator begins and ends on line 39
+	two,  // enumerator begins and ends on line 40
+	three // enumerator begins on line 41, ends on line 42
+		= 4
+};
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/parser/TortureTest/.cvsignore b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/TortureTest/.cvsignore
new file mode 100644
index 0000000..8131139
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/TortureTest/.cvsignore
@@ -0,0 +1 @@
+TortureTest.properties
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/parser/TortureTest/ReadMe-TortureText.txt b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/TortureTest/ReadMe-TortureText.txt
new file mode 100644
index 0000000..87c1c08
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/parser/TortureTest/ReadMe-TortureText.txt
@@ -0,0 +1,31 @@
+Usage: 
+By default, torture testing is disabled. To enable it, create a 'TortureTest.properties' in 'org.eclipse.cdt.ui.tests\parser\org\eclipse\cdt\core\parser\resources'. 
+
+If you don't have GCC testsuites, it does nothing. Then go and grab your latest version of GCC testsuites 
+(for instance, ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-3.3/gcc-testsuite-3.3.tar.gz). 
+Unpack testsuites under 
+ 
+    org.eclipse.cdt.core.tests/resources/parser/TortureTest/default
+ 
+or elsewhere, but then you'll need to create a 'TortureTest.properties'. 
+That's it, you can run TortureTest in JUnit Plugin mode. Don't run all ui.tests with torture-test enabled, as apparently it is included several times (anyone knows why?)
+, and it's A LOT of test cases.
+
+You can copy the rest of the file to create a TortureTest.properties and uncomment out/edit the default values as specified here.  
+
+# By default, torture testing is disabled
+# Uncomment to enable
+#enabled=true
+
+# Default location is org.eclipse.cdt.core.tests/resources/parser/TortureTest/default
+#source=/your/gcc/testsuite/installation/directory
+
+# Chunks for reading files
+#stepSize=25000
+
+# Timeout for individual cases, ms
+# Need a large enough value, as some files are non-trivial
+#timeOut=60000
+
+# Quick parse, or not
+#quickParse=true
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/classTests/class.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/classTests/class.cpp
new file mode 100644
index 0000000..401a5a2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/classTests/class.cpp
@@ -0,0 +1,34 @@
+class A {
+public:
+    A() {}
+	void f() {
+	}
+};
+
+class B : public A {
+public:
+   B() {}
+   void bf() {}
+};
+
+int main() {
+	B b;
+	b.f();
+}
+
+class Z {
+  public:
+  Z (*f)(Z);
+};
+
+Z zzz= *new Z();
+
+class C {
+  public:
+     C(int a) {}
+};
+
+class D {
+  public:
+     D(D &) {}
+};
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/classTests/friend.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/classTests/friend.cpp
new file mode 100644
index 0000000..53056fe
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/classTests/friend.cpp
@@ -0,0 +1,9 @@
+class ClassA {
+public:
+friend class ClassC;
+};
+
+class ClassC {
+public:
+friend void functionB();
+};
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/classTests/nested.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/classTests/nested.cpp
new file mode 100644
index 0000000..456d2f1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/classTests/nested.cpp
@@ -0,0 +1,12 @@
+class NestedA {
+public:
+	class NestedB {
+	public:
+		int x;
+	};
+};
+
+int f() {
+	NestedA::NestedB x;
+	return x.x;
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/classTests/pr147903.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/classTests/pr147903.cpp
new file mode 100644
index 0000000..9181763
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/classTests/pr147903.cpp
@@ -0,0 +1,21 @@
+namespace pr147903 {
+	
+	class testRef
+	{
+	};
+
+	class test3 {
+	public:
+		void foo(testRef[]);
+		void bar(testRef*);
+	};
+
+	void (* aFPtr)(testRef[]);
+
+	void (* aFPtr1)(testRef*);
+
+	namespace n {
+		extern void (* aFPtr1)(testRef[]);
+	};
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/compositeTypeTests/compositeType.c b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/compositeTypeTests/compositeType.c
new file mode 100644
index 0000000..5704481
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/compositeTypeTests/compositeType.c
@@ -0,0 +1,129 @@
+struct blah {
+	int lala;
+};
+
+struct blahblah{
+	struct blah first;
+};
+
+
+struct SimpleCStructure {
+	char scsa; 
+};
+
+struct CStructure1 {
+	int cs1a;
+	double cs1b;
+	struct CStructure2 {
+		float cs2a;
+		struct CStructure3 {
+			char cs3a;
+		} cs2b;
+	} cs1c;
+};
+
+union CUnion1 {
+	int cu1a;
+	double cu1b;
+	char cu1c;
+	union CUnion2 {
+		int cu2a;		
+	} cu1d;
+};
+
+struct CMixedS1 {
+	union CMixedU1 {
+		struct CMixedS2 {
+			double cms2a;
+		} cmu1a;
+		union CMixedU2 {
+			int cmu2a;
+		} cmu1b;
+		float cmu1c;
+	} cms1a;
+	struct CMixedS3 {
+		char cms3a;
+	} cms1b;
+};
+
+int main() {
+	struct SimpleCStructure css;
+	struct SimpleCStructure *cpss;
+	
+	css.scsa = 0;
+	cpss->scsa = 1;
+	
+	struct CStructure1 cs1;
+	struct CStructure1 *cps1 = &cs1;
+	
+	cs1.cs1a = 0;
+	cps1->cs1a = 1;
+	
+	cs1.cs1b = 2;
+	cs1.cs1b = 3;
+	cps1->cs1b = 4;
+	
+	struct CStructure2 cs2;
+	struct CStructure2 *cps2 = &cs2;
+	
+	cs1.cs1c = cs2;
+	cs1.cs1c = cs2;
+	cs1.cs1c = cs2;
+	cps1->cs1c = cs2;
+
+	struct CStructure3 cs3;
+	struct CStructure3 *cps3 = &cs3;
+		
+	cs1.cs1c.cs2b = 9;
+	cs1.cs1c.cs2b = 10;
+	cs1.cs1c.cs2b = 11;
+	cps1->cs1c.cs2b = 12;
+	cps2->cs2b = 13;
+	
+	cs1.cs1c.cs2b.cs3a = 13; 
+	cs1.cs1c.cs2b.cs3a = 14; 
+	cs1.cs1c.cs2b.cs3a = 15; 
+	cs1.cs1c.cs2b.cs3a = 16; 
+	cs1.cs1c.cs2b.cs3a = 17; 
+	cps1->cs1c.cs2b.cs3a = 18;
+	cps2->cs2b.cs3a = 19;
+	cps3->cs3a = 19; 
+
+	union CUnion1 cu1;
+	union CUnion1 *cpu1 = &cu1;
+	
+	cu1.cu1a = 0;
+	cpu1->cu1a = 1;
+	
+	union CUnion2 cu2;
+	union CUnion2 *cpu2 = &cu1.cu1d;
+	
+	cu2.cu2a = 2;
+	cpu2->cu2a = 3;
+	
+	union CMixedU1 cmu1;
+	union CMixedU1 *cpmu1 = &cmu1;
+	
+	cmu1.cmu1a;
+	cpmu1->cmu1a;
+	
+	union CMixedU2 cmu2;
+	union CMixedU2 *cpmu2 = &cmu2;
+	
+	cmu2.cmu2a;
+	cpmu2->cmu2a;
+	
+	struct CMixedS2 cms2;
+	struct CMixedS2 *cpms2 = &cms2;
+	
+	cms2.cms2a;
+	cpms2->cms2a;
+	
+	struct CMixedS3 cms3;
+	struct CMixedS3 *cpms3 = &cms3;
+	
+	cms3.cms3a;
+	cpms3->cms3a;
+	
+	return 0;
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/compositeTypeTests/compositeType.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/compositeTypeTests/compositeType.cpp
new file mode 100644
index 0000000..ce2a71c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/compositeTypeTests/compositeType.cpp
@@ -0,0 +1,120 @@
+struct SimpleStructure {
+	char ssa; 
+};
+
+struct Structure1 {
+	int s1a;
+	double s1b;
+	struct Structure2 {
+		float s2a;
+		struct Structure3 {
+			char s3a;
+		} s2b;
+	} s1c;
+};
+
+union Union1 {
+	int u1a;
+	double u1b;
+	char u1c;
+	union Union2 {
+		int u2a;		
+	} u1d;
+};
+
+struct MixedS1 {
+	union MixedU1 {
+		struct MixedS2 {
+			double ms2a;
+		} mu1a;
+		union MixedU2 {
+			int mu2a;
+		} mu1b;
+		float mu1c;
+	} ms1a;
+	struct MixedS3 {
+		char ms3a;
+	} ms1b;
+}
+
+int main() {
+	struct SimpleStructure ss;
+	struct SimpleStructure *pss;
+	
+	ss.ssa = 0;
+	pss->ssa = 1;
+	
+	struct Structure1 s1;
+	struct Structure1 *ps1 = &s1;
+	
+	s1.s1a = 0;
+	ps1->s1a = 1;
+	
+	s1.s1b = 2;
+	s1.s1b = 3;
+	ps1->s1b = 4;
+	
+	struct Structure1::Structure2 s2;
+	struct Structure1::Structure2 *ps2 = &s2;
+	
+	s1.s1c = s2;
+	s1.s1c = s2;
+	s1.s1c = s2;
+	ps1->s1c = s2;
+
+	struct Structure1::Structure2::Structure3 s3;
+	struct Structure1::Structure2::Structure3 *ps3 = &s3;
+		
+	s1.s1c.s2b = 9;
+	s1.s1c.s2b = 10;
+	s1.s1c.s2b = 11;
+	ps1->s1c.s2b = 12;
+	ps2->s2b = 13;
+	
+	s1.s1c.s2b.s3a = 13; 
+	s1.s1c.s2b.s3a = 14; 
+	s1.s1c.s2b.s3a = 15; 
+	s1.s1c.s2b.s3a = 16; 
+	s1.s1c.s2b.s3a = 17; 
+	ps1->s1c.s2b.s3a = 18;
+	ps2->s2b.s3a = 19;
+	ps3->s3a = 19; 
+
+	Union1 u1;
+	Union1 *pu1 = &u1;
+	
+	u1.u1a = 0;
+	pu1->u1a = 1;
+	
+	Union1::Union2 u2;
+	Union1::Union2 *pu2 = &u1.u1d;
+	
+	u2.u2a = 2;
+	pu2->u2a = 3;
+	
+	MixedS1::MixedU1 mu1;
+	MixedS1::MixedU1 *pmu1 = &mu1;
+	
+	mu1.mu1a;
+	pmu1->mu1a;
+	
+	MixedS1::MixedU1::MixedU2 mu2;
+	MixedS1::MixedU1::MixedU2 *pmu2 = &mu2;
+	
+	mu2.mu2a;
+	pmu2->mu2a;
+	
+	MixedS1::MixedU1::MixedS2 ms2;
+	MixedS1::MixedU1::MixedS2 *pms2 = &ms2;
+	
+	ms2.ms2a;
+	pms2->ms2a;
+	
+	MixedS1::MixedS3 ms3;
+	MixedS1::MixedS3 *pms3 = &ms3;
+	
+	ms3.ms3a;
+	pms3->ms3a;
+	
+	return 0;
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/defDeclTests/func.c b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/defDeclTests/func.c
new file mode 100644
index 0000000..e82d457
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/defDeclTests/func.c
@@ -0,0 +1,65 @@
+
+/* ---------- Test 1 ---------- 
+ * simple 
+ */
+void foo01(); // decl01
+void bar01(){
+	foo01(); // ref01
+}
+
+/* ---------- Test 2 ---------- 
+ * K&R declrations
+ */
+void foo02(); // decl02
+void bar02(){
+	foo02('a'); // ref02
+}
+
+/* ---------- Test 3 ---------- 
+ * post-declaration
+ */
+
+void bar03(){
+	foo03(); // ref03
+}
+void foo03(); // decl03
+
+/* ---------- Test 4 ---------- 
+ * post-definition
+ */
+
+void bar04(){
+	foo04(); // ref04
+}
+void foo04() { // def04
+}
+/* ---------- Test 5 ---------- 
+ * no decl/def
+ */
+
+void bar05(){
+	foo05(); // ref05
+}
+/* ---------- Test 6 ---------- 
+ * function foo06 defined in second.c
+ */
+void foo06(); // decl06
+void bar06(){
+	foo06(); // ref06
+}
+/* ---------- Test 7 ---------- 
+ * static function foo07 defintined in second.c
+ */
+void foo07(); // decl07
+void bar07(){
+	foo07(); // ref07
+}
+
+/* ---------- Test 8 ---------- 
+ * static function foo08 defintined in second.c
+ */
+static void bar08(){
+	foo08(); // ref08
+}
+static void foo08() { // def08
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/defDeclTests/second.c b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/defDeclTests/second.c
new file mode 100644
index 0000000..7c905e2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/defDeclTests/second.c
@@ -0,0 +1,19 @@
+/* ---------- Test 6 ---------- 
+ * function foo06 used in func.c
+ */
+void foo06() { // def06
+}
+/* ---------- Test 7 ---------- 
+ * function foo06 fake usage in func.c
+ */
+static void foo07() { // def07
+}
+
+/* ---------- Test 8 ---------- 
+ * static function foo08 defintined in second.c
+ */
+static void foo08() { // defS08
+}
+static void bar08(){
+	foo08(); // refS08
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/defDeclTests/types.c b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/defDeclTests/types.c
new file mode 100644
index 0000000..a84b282
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/defDeclTests/types.c
@@ -0,0 +1,48 @@
+/* ---------- Test t02 ---------- 
+ * tag struct
+ */
+
+struct type_t01 {int a;}; // def_t01
+static void bar_t01(){
+	struct type_t01 var; //ref_t01
+} 
+
+/* ---------- Test t02 ---------- 
+ * struct pre-declaration
+ */
+
+struct type_t02; // decl_t02
+static void bar_t02(){
+	struct type_t02 * var; //ref_t02
+} 
+
+/* ---------- Test t03 ---------- 
+ * struct pre-declaration and definiton
+ */
+
+struct type_t03; // decl_t03
+static void bar_t03(){
+	struct type_t03 * var; //ref_t03
+} 
+struct type_t03 {int a;}; // def_t03
+
+/* ---------- Test t04 ---------- 
+ * typedef with structs
+ */
+
+typedef struct type_t04 { // defS_t04
+	struct type_t04 * next; // refS_t04
+} type_t04; // def_t04
+static void bar_t04(){
+	type_t04 st; // ref_t04
+} 
+/* ---------- Test t05 ---------- 
+ * typedef with anonimous struct
+ */
+
+typedef struct { 
+	int a; 
+} type_t05; // def_t05
+static void bar_t05(){
+	type_t05 st; // ref_t05
+} 
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/defDeclTests/vars.c b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/defDeclTests/vars.c
new file mode 100644
index 0000000..7e355cb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/defDeclTests/vars.c
@@ -0,0 +1,53 @@
+/* ---------- Test 9 ---------- 
+ * write global
+ */
+int var_v09; // def_v09
+static void bar_v09(){
+	var_v09=1; // ref_v09
+}
+
+/* ---------- Test 10 ---------- 
+ * read global
+ */
+int var_v10 = 1; // def_v10
+static void bar_v0(){
+	int a = var_v10; // ref_v10
+}
+/* ---------- Test 11 ---------- 
+ * read global in expr
+ */
+int var_v11 = 1; // def_v11
+static void bar_v11(){
+	int a = 1 + 
+	        var_v11; // ref_v11
+}
+/* ---------- Test _v12 ---------- 
+ * def and decl
+ */
+extern int var_v12; // decl_v12
+static void bar_v12(){
+	int a = var_v12; // ref_v12
+}
+int var_v12 = 1; // def_v12
+
+/* ---------- Test _v13 ---------- 
+ * def and decl
+ */
+
+extern int var_v13; // decl_v13
+int var_v13 = 1; // def_v13
+
+static void bar_v13(){
+	int a = var_v13; // ref_v13
+}
+/* ---------- Test _v14 ---------- 
+ * def and decl
+ */
+
+
+int var_v14 = 1; // def_v14
+extern int var_v14; // decl_v14
+
+static void bar_v14(){
+	int a = var_v14; // ref_v14
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/enumerationTests/enumTest.c b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/enumerationTests/enumTest.c
new file mode 100644
index 0000000..4f27a52
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/enumerationTests/enumTest.c
@@ -0,0 +1,9 @@
+enum TestCEnum {
+	ca,
+	cb,
+	cc
+};
+
+enum TestCEnum test() {
+	return ca;
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/enumerationTests/enumTest.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/enumerationTests/enumTest.cpp
new file mode 100644
index 0000000..83d528f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/enumerationTests/enumTest.cpp
@@ -0,0 +1,9 @@
+enum TestCPPEnum {
+	cppa,
+	cppb,
+	cppc
+};
+
+TestCPPEnum test() {
+	return cppa;
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/fieldTests/fields.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/fieldTests/fields.cpp
new file mode 100644
index 0000000..e54fccf
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/fieldTests/fields.cpp
@@ -0,0 +1,60 @@
+class Class1 {
+	int defaultField = 0;
+	
+	mutable int mutableField;
+	static int staticField;
+	
+private:
+	double privateField = 4.5;
+protected:
+	char protectedField = 'A';
+public:
+	long publicField = 20;
+
+	int c1a;
+	double c1b;
+	
+	Class1();
+	~Class1();
+};
+
+class Class2 : public Class1 {
+public:
+	char c2a;
+	float c2b;
+	
+	Class2();
+	~Class2();
+};
+
+Class1::Class1() {
+}
+
+Class1::~Class1() {
+}
+
+Class2::Class2() {
+}
+
+Class2::~Class2() {
+}
+
+int main() {
+	Class1 c1;
+	Class1 *pc1 = &c1;
+	
+	Class2 c2;
+	Class2 *pc2 = &c2;
+	
+	c1.c1a = 0;
+	pc1->c1a = 1;
+	
+	c2.c1a = 2;
+	pc2->c1a = 3;
+	
+	c2.c2a = 4;
+	c2.c2a = 5;
+	pc2->c2a = 6;
+
+	return 0;
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/filesOnReindex/simple.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/filesOnReindex/simple.cpp
new file mode 100644
index 0000000..07868b4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/filesOnReindex/simple.cpp
@@ -0,0 +1 @@
+class C {};
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/declarations.c b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/declarations.c
new file mode 100644
index 0000000..0875ffa
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/declarations.c
@@ -0,0 +1,30 @@
+void forwardCDeclaration();
+
+void normalCDeclaration1() {
+	forwardCDeclaration();
+}
+
+void normalCDeclaration2() {
+	normalCDeclaration1();
+}
+
+void forwardCDeclaration() {
+	normalCDeclaration2();
+}
+
+void spin() {
+	normalCDeclaration1();
+	normalCDeclaration2();
+	normalCDeclaration2();
+	forwardCDeclaration();
+}
+
+// p1 is a particular type of problem binding as it
+// has no corresponding declarator
+void KnRfunctionWithProblemParameters(p1,p2,c)
+   long p2;
+   int c;
+{
+
+}
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/declarations.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/declarations.cpp
new file mode 100644
index 0000000..730379d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/declarations.cpp
@@ -0,0 +1,24 @@
+void forwardDeclaration();
+
+void normalDeclaration1() {
+	forwardDeclaration();
+}
+
+void normalDeclaration2() {
+	normalDeclaration1();
+}
+
+void forwardDeclaration() {
+	normalDeclaration2();
+}
+
+void spin() {
+	normalDeclaration1();
+	normalDeclaration2();
+	normalDeclaration2();
+	forwardDeclaration();
+}
+
+int (*int2intPtr)(int);
+
+	
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/modifiers.c b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/modifiers.c
new file mode 100644
index 0000000..8ee7877
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/modifiers.c
@@ -0,0 +1,21 @@
+double normalCFunction(int p1, char p2, float p3);
+static int staticCFunction(double p1);
+extern float externCFunction(int p1);
+inline void inlineCFunction(long p1);
+void varArgsCFunction(int p1, ...);
+const void constCFunction();
+volatile void volatileCFunction();
+void storageClassCFunction(register int p1, int p2);
+
+void voidCFunction();
+int intCFunction();
+double doubleCFunction();
+char charCFunction();
+float floatCFunction();
+
+
+struct S {
+	struct D {
+		int a;
+	};
+};
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/modifiers.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/modifiers.cpp
new file mode 100644
index 0000000..bd5ef3c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/modifiers.cpp
@@ -0,0 +1,12 @@
+double normalCPPFunction(int p1, char p2, float p3);
+void storageClassCPPFunction(register int p1, auto int p2);
+static int staticCPPFunction(double p1);
+extern float externCPPFunction(int p1);
+inline void inlineCPPFunction(long p1);
+void varArgsCPPFunction(int p1, ...);
+
+void voidCPPFunction();
+int intCPPFunction();
+double doubleCPPFunction();
+char charCPPFunction();
+float floatCPPFunction();
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/overloaded.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/overloaded.cpp
new file mode 100644
index 0000000..2968b2f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/functionTests/overloaded.cpp
@@ -0,0 +1,13 @@
+void overloadedFunction() {
+}
+
+void overloadedFunction(int p1) {
+}
+
+int main() {
+	overloadedFunction();
+	overloadedFunction(1);
+	overloadedFunction(1);
+	
+	return 0;
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes1/a.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes1/a.cpp
new file mode 100644
index 0000000..ad792ac
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes1/a.cpp
@@ -0,0 +1 @@
+#include "b.h"
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes1/b.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes1/b.h
new file mode 100644
index 0000000..4c26867
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes1/b.h
@@ -0,0 +1,5 @@
+#ifndef __B_H__
+#define __B_H__
+#include "c.h"
+#endif
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes1/c.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes1/c.h
new file mode 100644
index 0000000..d319c6b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes1/c.h
@@ -0,0 +1,5 @@
+#ifndef __C_H__
+#define __C_H__
+#include "b.h"
+#endif
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes2/a.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes2/a.cpp
new file mode 100644
index 0000000..ad792ac
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes2/a.cpp
@@ -0,0 +1 @@
+#include "b.h"
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes2/b.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes2/b.h
new file mode 100644
index 0000000..0e0f2e3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/cyclicIncludes2/b.h
@@ -0,0 +1,5 @@
+#ifndef __B_H__
+#define __B_H__
+#include "b.h"
+#endif
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project1/a/b/c/d e/this.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project1/a/b/c/d e/this.h
new file mode 100644
index 0000000..703f161
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project1/a/b/c/d e/this.h	
@@ -0,0 +1,7 @@
+class A {
+  public:
+  class B {};
+  int c;
+  A* foo(B b) {};
+};
+  
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project1/this.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project1/this.cpp
new file mode 100644
index 0000000..8447f0c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project1/this.cpp
@@ -0,0 +1,7 @@
+#include "a/b/c/d e/this.h"
+
+void bar() {
+  A a;
+  a.foo(*new A::B());
+}
+  
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project2/aaa.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project2/aaa.h
new file mode 100644
index 0000000..b66064b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project2/aaa.h
@@ -0,0 +1,3 @@
+#include <base.h>
+
+class B : public A {};
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project2/base.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project2/base.h
new file mode 100644
index 0000000..a650fd6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project2/base.h
@@ -0,0 +1 @@
+class A {};
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project3/aaa.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project3/aaa.h
new file mode 100644
index 0000000..ba6aaf2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/generatePDOMTests/project3/aaa.h
@@ -0,0 +1,12 @@
+// this is a C content type header
+
+void foo() {}
+
+int a;
+
+struct S {
+   int c;
+   int d;
+};
+
+   
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I1.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I1.cpp
new file mode 100644
index 0000000..1d006fd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I1.cpp
@@ -0,0 +1,6 @@
+#include "I1.h"
+
+I1::I1()
+{}
+I1::~I1()
+{}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I1.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I1.h
new file mode 100644
index 0000000..9720b7b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I1.h
@@ -0,0 +1,13 @@
+#ifndef I1_H
+#define I1_H
+
+#include "I2.h"
+
+class I1{
+public:
+
+	I1();
+	~I1();
+};
+
+#endif // I1_H
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I2.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I2.cpp
new file mode 100644
index 0000000..28bdd9c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I2.cpp
@@ -0,0 +1,6 @@
+#include "I2.h"
+
+I2::I2()
+{}
+I2::~I2()
+{}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I2.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I2.h
new file mode 100644
index 0000000..c1ae30a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I2.h
@@ -0,0 +1,14 @@
+#ifndef I2_H
+#define I2_H
+
+//#include "I3.h"
+
+class I2{
+public:
+
+	I2();
+	~I2();
+};
+
+
+#endif // I2_H
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I3.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I3.cpp
new file mode 100644
index 0000000..091c17e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I3.cpp
@@ -0,0 +1,6 @@
+#include "I3.h"
+
+I3::I3()
+{}
+I3::~I3()
+{}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I3.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I3.h
new file mode 100644
index 0000000..10b0667
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I3.h
@@ -0,0 +1,13 @@
+#ifndef I3_H
+#define I3_H
+
+#include "I4.h"
+
+class I3{
+public:
+
+	I3();
+	~I3();
+};
+
+#endif // I3_H
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I4.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I4.cpp
new file mode 100644
index 0000000..693cccb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I4.cpp
@@ -0,0 +1,6 @@
+#include "I4.h"
+
+I4::I4()
+{}
+I4::~I4()
+{}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I4.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I4.h
new file mode 100644
index 0000000..129839e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I4.h
@@ -0,0 +1,13 @@
+#ifndef I4_H
+#define I4_H
+
+#include "I5.h"
+
+class I4{
+public:
+
+	I4();
+	~I4();
+};
+
+#endif // I4_H
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I5.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I5.cpp
new file mode 100644
index 0000000..b003103
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I5.cpp
@@ -0,0 +1,6 @@
+#include "I5.h"
+
+I5::I5()
+{}
+I5::~I5()
+{}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I5.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I5.h
new file mode 100644
index 0000000..800e8e1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I5.h
@@ -0,0 +1,13 @@
+#ifndef I5_H
+#define I5_H
+
+#include "I1.h"
+
+class I5{
+public:
+
+	I5();
+	~I5();
+};
+
+#endif // I5_H
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I6.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I6.cpp
new file mode 100644
index 0000000..b3cca55
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/I6.cpp
@@ -0,0 +1 @@
+#include "a/b/I6.h"
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/a/I7.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/a/I7.cpp
new file mode 100644
index 0000000..6a4cc77
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/a/I7.cpp
@@ -0,0 +1,2 @@
+#include "b/I6.h"
+#include "b/I7.h"
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/messages.properties b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/a/b/I6.h
similarity index 100%
copy from results/plugins/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/messages.properties
copy to results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/includesTests/a/b/I6.h
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/methodTests/inheritance.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/methodTests/inheritance.cpp
new file mode 100644
index 0000000..9c218bf
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/methodTests/inheritance.cpp
@@ -0,0 +1,131 @@
+class Class1 {
+public:
+	double normalMethod(int p1, char p2, float p3);
+	virtual void inheritedMethod();
+	virtual void pureVirtualMethod() = 0;
+	virtual void overriddenMethod();
+
+	void noExceptionSpecMethod();
+	void emptyExceptionSpecMethod() throw();
+	void nonEmptyExceptionSpecMethod() throw(int);
+
+	inline int inlineMethod();
+	static int staticMethod();
+	int varArgsMethod(...);
+	int constMethod() const;
+	int volatileMethod() volatile;
+	int constVolatileMethod() const volatile;
+
+	// Here, const/volatile applies to the return value, not the method
+	const int *notConstMethod();
+	volatile int *notVolatileMethod();
+	const volatile int *notConstVolatileMethod();
+
+	Class1();
+	virtual ~Class1() = 0;
+};
+
+struct A {
+	A();
+	A(const A&) throw();
+	~A() throw(int);
+};
+
+struct B {
+	B() throw();
+	B(const B&) throw();
+	~B() throw(double);
+};
+
+struct D : public A, public B {};
+
+class Class2 : public Class1 {
+public:
+	void pureVirtualMethod();
+	void overriddenMethod();
+	void overloadedMethod();
+	void overloadedMethod(int p1);
+
+	Class2();
+	~Class2();
+};
+
+double Class1::normalMethod(int p1, char p2, float p3) {
+}
+
+void Class1::inheritedMethod() {
+}
+
+void Class1::overriddenMethod() {
+}
+
+void Class2::pureVirtualMethod() {
+}
+
+void Class2::overriddenMethod() {
+}
+
+void Class2::overloadedMethod() {
+}
+
+void Class2::overloadedMethod(int p1) {
+}
+
+Class1::Class1() {
+}
+
+Class1::~Class1() {
+}
+
+Class2::Class2() {
+}
+
+Class2::~Class2() {
+}
+
+class Class3 {
+	int defaultMethod();
+private:
+	void privateMethod();
+protected:
+	char protectedMethod();
+public:
+	double publicMethod();
+};
+
+int main() {
+	Class2 c2;
+
+	Class1 *pc1 = &c2;
+	Class2 *pc2 = &c2;
+
+	pc1->inheritedMethod();
+
+	pc1->pureVirtualMethod();
+	pc1->pureVirtualMethod();
+
+	pc1->overriddenMethod();
+	pc1->overriddenMethod();
+	pc1->overriddenMethod();
+
+	c2.inheritedMethod();
+	pc2->inheritedMethod();
+
+	c2.pureVirtualMethod();
+	c2.pureVirtualMethod();
+	pc2->pureVirtualMethod();
+
+	c2.overriddenMethod();
+	c2.overriddenMethod();
+	c2.overriddenMethod();
+	pc2->overriddenMethod();
+
+	c2.overloadedMethod();
+	pc2->overloadedMethod();
+
+	c2.overloadedMethod(1);
+	c2.overloadedMethod(1);
+	pc2->overloadedMethod(1);
+
+	return 0;
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/extend.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/extend.cpp
new file mode 100644
index 0000000..d6badf3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/extend.cpp
@@ -0,0 +1,9 @@
+namespace ns1 {
+	int a;
+	int b;
+}
+
+namespace ns1 {
+	int c;
+	int d;
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/friend.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/friend.cpp
new file mode 100644
index 0000000..5f5b304
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/friend.cpp
@@ -0,0 +1,15 @@
+namespace ns4 {
+	
+	class Class1 {
+		friend void function2(Class1);
+	};
+	Class1 element;
+	void function2(Class1){};
+}
+using ns4::element;
+
+void Z()
+{
+	ns4::function2(element);
+	ns4::Class1::function2(element);  //error!
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/namespace.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/namespace.cpp
new file mode 100644
index 0000000..409560c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/namespace.cpp
@@ -0,0 +1,15 @@
+namespace namespace1 {
+   
+    namespace namespace2 {
+    	void foo();
+    	
+    	namespace namespace3 {
+    	}
+    }
+}
+
+namespace namespaceNew = namespace1::namespace2;
+
+void namespace1::namespace2::foo() {
+	/* definition */
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/overload.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/overload.cpp
new file mode 100644
index 0000000..d3fecf7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/overload.cpp
@@ -0,0 +1,15 @@
+namespace ns2 {
+	void blah(int){};
+}
+
+namespace ns3 {
+	void blah(char){};
+}
+
+using namespace ns2;
+using namespace ns3;
+
+void foo2()
+{
+	blah('a'); //ns3::blah(char)
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/unnamed.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/unnamed.cpp
new file mode 100644
index 0000000..136e512
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/namespaceTests/unnamed.cpp
@@ -0,0 +1,8 @@
+namespace {
+	void function1() {};
+}
+
+int main()
+{
+	function1();
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/overloadsWithinCommonHeader/common.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/overloadsWithinCommonHeader/common.h
new file mode 100644
index 0000000..c348876
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/overloadsWithinCommonHeader/common.h
@@ -0,0 +1,30 @@
+class ManyOverloaded {
+public:
+	void qux();
+	void qux(int i);
+	void qux(int i, char c);
+	void qux(ManyOverloaded* ptr);
+	void qux(ManyOverloaded nptr);
+};
+
+void quux();
+void quux(int i);
+void quux(int i, char c);
+void quux(ManyOverloaded* ptr);
+void quux(ManyOverloaded nptr);
+
+namespace corge {	
+	void grault();
+	void grault(int i);
+	void grault(int i, char c);
+	void grault(ManyOverloaded* ptr);
+	void grault(ManyOverloaded nptr);
+}
+
+namespace ns2 {
+	void quux();
+	void quux(int i);
+	void quux(int i, char c);
+	void quux(ManyOverloaded* ptr);
+	void quux(ManyOverloaded nptr);
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/overloadsWithinCommonHeader/manyOverloadedClientA.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/overloadsWithinCommonHeader/manyOverloadedClientA.cpp
new file mode 100644
index 0000000..05a0aee
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/overloadsWithinCommonHeader/manyOverloadedClientA.cpp
@@ -0,0 +1,68 @@
+#include "common.h"
+
+namespace corge {
+   void referencesA_inNS() {
+	  ManyOverloaded m;
+      ns2::quux(); ns2::quux(); ns2::quux(); ns2::quux(); 
+      ns2::quux(5); ns2::quux(5); ns2::quux(5); ns2::quux(5); ns2::quux(5);
+      ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f');
+      ns2::quux(new ManyOverloaded()); ns2::quux(new ManyOverloaded());
+      ns2::quux(new ManyOverloaded()); ns2::quux(new ManyOverloaded());
+      ns2::quux(new ManyOverloaded()); ns2::quux(new ManyOverloaded());
+      ns2::quux(new ManyOverloaded()); 
+      ns2::quux(m); ns2::quux(m); ns2::quux(m); ns2::quux(m); ns2::quux(m);
+      ns2::quux(m); ns2::quux(m); ns2::quux(m);
+   }
+}
+
+void referencesA() {
+  ManyOverloaded m;
+  m.qux();
+  m.qux(4); m.qux(4);
+  m.qux(6,'f'); m.qux(6,'f'); m.qux(6,'f');
+  m.qux(new ManyOverloaded()); m.qux(new ManyOverloaded());
+  m.qux(new ManyOverloaded()); m.qux(new ManyOverloaded());
+  m.qux(m); m.qux(m); m.qux(m); m.qux(m); m.qux(m);
+  
+  quux(); quux();
+  quux(4); quux(4); quux(4);
+  quux(6,'f'); quux(6,'f'); quux(6,'f'); quux(6,'f');
+  quux(new ManyOverloaded()); quux(new ManyOverloaded());
+  quux(new ManyOverloaded()); quux(new ManyOverloaded()); quux(new ManyOverloaded());
+  quux(m); quux(m); quux(m); quux(m); quux(m); quux(m);
+    
+  corge::grault(); corge::grault(); corge::grault();
+  corge::grault(4); corge::grault(4); corge::grault(4); corge::grault(4);
+  corge::grault(6,'f'); corge::grault(6,'f'); corge::grault(6,'f'); corge::grault(6,'f'); corge::grault(6,'f');
+  corge::grault(new ManyOverloaded()); corge::grault(new ManyOverloaded());
+  corge::grault(new ManyOverloaded()); corge::grault(new ManyOverloaded());
+  corge::grault(new ManyOverloaded()); corge::grault(new ManyOverloaded());
+  corge::grault(m); corge::grault(m); corge::grault(m); corge::grault(m); corge::grault(m);
+  corge::grault(m); corge::grault(m);
+  
+  ns2::quux(); ns2::quux(); ns2::quux(); ns2::quux(); 
+  ns2::quux(5); ns2::quux(5); ns2::quux(5); ns2::quux(5); ns2::quux(5);
+  ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f');
+  ns2::quux(new ManyOverloaded()); ns2::quux(new ManyOverloaded());
+  ns2::quux(new ManyOverloaded()); ns2::quux(new ManyOverloaded());
+  ns2::quux(new ManyOverloaded()); ns2::quux(new ManyOverloaded());
+  ns2::quux(new ManyOverloaded()); 
+  ns2::quux(m); ns2::quux(m); ns2::quux(m); ns2::quux(m); ns2::quux(m);
+  ns2::quux(m); ns2::quux(m); ns2::quux(m);
+  
+  m.qux(UNRESOLVED_SYMBOL); // indexer should skip without error
+  m.qux(4, UNRESOLVED_SYMBOL); // indexer should skip without error
+  quux(UNRESOLVED_SYMBOL); // indexer should skip without error
+  quux(6, UNRESOLVED_SYMBOL); // indexer should skip without error
+  corge::grault(UNRESOLVED_SYMBOL); // indexer should skip without error
+  corge::grault(6, UNRESOLVED_SYMBOL); // indexer should skip without error
+  ns2::quux(UNRESOLVED_SYMBOL); // indexer should skip without error
+  ns2::quux(4, UNRESOLVED_SYMBOL); // indexer should skip without error
+}
+
+namespace corge {
+   void problemRefsA() {
+      ns2::quux(UNRESOLVED_SYMBOL); // indexer should skip without error
+	  ns2::quux(4, UNRESOLVED_SYMBOL); // indexer should skip without error
+   }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/overloadsWithinCommonHeader/manyOverloadedClientB.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/overloadsWithinCommonHeader/manyOverloadedClientB.cpp
new file mode 100644
index 0000000..dbe9851
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/overloadsWithinCommonHeader/manyOverloadedClientB.cpp
@@ -0,0 +1,68 @@
+#include "common.h"
+
+namespace corge {
+   void referencesB_inNS() {
+      ManyOverloaded m;
+      ns2::quux(); ns2::quux(); ns2::quux(); ns2::quux(); 
+      ns2::quux(5); ns2::quux(5); ns2::quux(5); ns2::quux(5); ns2::quux(5);
+      ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f');
+      ns2::quux(new ManyOverloaded()); ns2::quux(new ManyOverloaded());
+      ns2::quux(new ManyOverloaded()); ns2::quux(new ManyOverloaded());
+      ns2::quux(new ManyOverloaded()); ns2::quux(new ManyOverloaded());
+      ns2::quux(new ManyOverloaded()); 
+      ns2::quux(m); ns2::quux(m); ns2::quux(m); ns2::quux(m); ns2::quux(m);
+      ns2::quux(m); ns2::quux(m); ns2::quux(m);
+   }
+}
+
+void referencesB() {
+  ManyOverloaded m;
+  m.qux();
+  m.qux(4); m.qux(4);
+  m.qux(6,'f'); m.qux(6,'f'); m.qux(6,'f');
+  m.qux(new ManyOverloaded()); m.qux(new ManyOverloaded());
+  m.qux(new ManyOverloaded()); m.qux(new ManyOverloaded());
+  m.qux(m); m.qux(m); m.qux(m); m.qux(m); m.qux(m);
+  
+  quux(); quux();
+  quux(4); quux(4); quux(4);
+  quux(6,'f'); quux(6,'f'); quux(6,'f'); quux(6,'f');
+  quux(new ManyOverloaded()); quux(new ManyOverloaded());
+  quux(new ManyOverloaded()); quux(new ManyOverloaded()); quux(new ManyOverloaded());
+  quux(m); quux(m); quux(m); quux(m); quux(m); quux(m);
+    
+  corge::grault(); corge::grault(); corge::grault();
+  corge::grault(4); corge::grault(4); corge::grault(4); corge::grault(4);
+  corge::grault(6,'f'); corge::grault(6,'f'); corge::grault(6,'f'); corge::grault(6,'f'); corge::grault(6,'f');
+  corge::grault(new ManyOverloaded()); corge::grault(new ManyOverloaded());
+  corge::grault(new ManyOverloaded()); corge::grault(new ManyOverloaded());
+  corge::grault(new ManyOverloaded()); corge::grault(new ManyOverloaded());
+  corge::grault(m); corge::grault(m); corge::grault(m); corge::grault(m); corge::grault(m);
+  corge::grault(m); corge::grault(m);
+  
+  ns2::quux(); ns2::quux(); ns2::quux(); ns2::quux(); 
+  ns2::quux(5); ns2::quux(5); ns2::quux(5); ns2::quux(5); ns2::quux(5);
+  ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f'); ns2::quux(6,'f');
+  ns2::quux(new ManyOverloaded()); ns2::quux(new ManyOverloaded());
+  ns2::quux(new ManyOverloaded()); ns2::quux(new ManyOverloaded());
+  ns2::quux(new ManyOverloaded()); ns2::quux(new ManyOverloaded());
+  ns2::quux(new ManyOverloaded());
+  ns2::quux(m); ns2::quux(m); ns2::quux(m); ns2::quux(m); ns2::quux(m);
+  ns2::quux(m); ns2::quux(m); ns2::quux(m); 
+  
+  m.qux(UNRESOLVED_SYMBOL); // indexer should skip without error
+  m.qux(4, UNRESOLVED_SYMBOL); // indexer should skip without error
+  quux(UNRESOLVED_SYMBOL); // indexer should skip without error
+  quux(6, UNRESOLVED_SYMBOL); // indexer should skip without error
+  corge::grault(UNRESOLVED_SYMBOL); // indexer should skip without error
+  corge::grault(6, UNRESOLVED_SYMBOL); // indexer should skip without error
+  ns2::quux(UNRESOLVED_SYMBOL); // indexer should skip without error
+  ns2::quux(4, UNRESOLVED_SYMBOL); // indexer should skip without error
+}
+
+namespace corge {
+   void problemRefsB() {
+      ns2::quux(UNRESOLVED_SYMBOL); // indexer should skip without error
+	  ns2::quux(4, UNRESOLVED_SYMBOL); // indexer should skip without error
+   }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/overloadsWithinSingleTU/withinSingleTranslationUnit.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/overloadsWithinSingleTU/withinSingleTranslationUnit.cpp
new file mode 100644
index 0000000..9e7d99a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/overloadsWithinSingleTU/withinSingleTranslationUnit.cpp
@@ -0,0 +1,52 @@
+class Foo {
+public:
+	Foo() {}
+	void foo() {}
+	void foo(int a) {}
+	void foo(Foo f) {}
+};
+
+void bar() {printf("bar()\n");}
+void bar(int a) {printf("bar(int)\n");}
+void bar(int a, int b) {printf("bar(int,int)\n");}
+void bar(Foo f, int z) {
+	Foo a,b,c;
+	printf("bar(Foo,int)\n");
+}
+
+void baz() {}
+
+namespace X {
+	class Foo {
+	public:
+		Foo(void) {}
+		void m() {}
+	};
+
+	void bar() {printf("X::bar()\n");}
+	void bar(int a) {printf("X::bar(int)\n");}
+	void bar(int a, int b) {printf("X::bar(int,int)\n");}
+	void bar(Foo f, int z) {
+		Foo a,b,c;
+		printf("X::bar(X::Foo,int)\n");
+	}
+
+	namespace Y {
+		void qux() {}
+	}
+}
+
+void references(Foo f, X::Foo h) {
+    X::bar(); X::bar();
+	X::bar(3); X::bar(3); X::bar(3);
+	X::bar(4,4); X::bar(4,4); X::bar(4,4); X::bar(4,4);
+	X::bar(h, 5); X::bar(h, 5); X::bar(h, 5); X::bar(h, 5); X::bar(h, 5);
+
+    bar(); bar(); bar(); bar();
+    bar(3); bar(3); bar(3);
+    bar(2,2); bar(2,2);
+    bar(f, 1);
+    
+    Foo y = new Foo();
+    X::Foo z = new X::Foo();
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/Class1.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/Class1.cpp
new file mode 100644
index 0000000..5a57b91
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/Class1.cpp
@@ -0,0 +1,11 @@
+#include "Class1.h"
+
+namespace1::Class1::Class1()
+{
+	class1x = 1;
+	class1y = 2;
+}
+
+namespace1::Class1::~Class1()
+{
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/Class1.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/Class1.h
new file mode 100644
index 0000000..b544ff9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/Class1.h
@@ -0,0 +1,29 @@
+#ifndef CLASS1_H_
+#define CLASS1_H_
+
+class Class1 {
+};
+
+namespace namespace1 {
+    class Class1 {
+    public:
+    	Class1();
+    	~Class1();
+    	
+    	int class1x;
+    	int class1y;
+        class Class2 { //namespace1::Class1::Class2
+        };
+    };
+    
+    namespace namespace2 {
+    	class Class1 {
+    	};
+    };
+
+    class Class2 {
+
+    };
+};
+
+#endif /*CLASS1_H_*/
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/Class2.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/Class2.cpp
new file mode 100644
index 0000000..aa98d57
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/Class2.cpp
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#include "Class2.h"
+
+Class2::Class2()
+{
+}
+
+Class2::~Class2()
+{
+}
+
+void Class2::foo()
+{
+	printf("foo - Class2\n");
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/Class2.h b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/Class2.h
new file mode 100644
index 0000000..618b62a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/Class2.h
@@ -0,0 +1,12 @@
+#ifndef CLASS2_H_
+#define CLASS2_H_
+
+class Class2
+{
+public:
+	Class2();
+	virtual ~Class2();	
+	void foo();
+};
+
+#endif /*CLASS2_H_*/
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/main.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/main.cpp
new file mode 100644
index 0000000..821e3bf
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/searchTests/main.cpp
@@ -0,0 +1,22 @@
+#include <stdio.h>
+#include "Class1.h"
+#include "Class2.h"
+
+int var;
+
+//function
+void foo2()
+{
+	printf("foo2\n");
+}
+
+int main()
+{	
+	namespace1::Class1 element;
+	printf("%d\n", element.class1x);
+	foo2();
+	Class2 class2;
+	class2.foo();
+	var = 0;
+	return 0;
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/types/bug145351.c b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/types/bug145351.c
new file mode 100644
index 0000000..2425e01
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/types/bug145351.c
@@ -0,0 +1,5 @@
+typedef struct {
+	int x;
+} spinlock_t;
+
+spinlock_t global_bh_lock;
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/types/typedef.c b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/types/typedef.c
new file mode 100644
index 0000000..e207925
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/types/typedef.c
@@ -0,0 +1,10 @@
+struct CA {
+	int x;
+};
+
+typedef struct CA * CX;
+
+int g() {
+	CX x;
+	return x->x;
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/types/typedef.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/types/typedef.cpp
new file mode 100644
index 0000000..b7bddef
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/types/typedef.cpp
@@ -0,0 +1,12 @@
+class A {
+public:
+	void f() {
+	}
+};
+
+typedef A * X;
+
+void g() {
+	X x;
+	x->f();
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/variableTests/variables.c b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/variableTests/variables.c
new file mode 100644
index 0000000..2b1e886
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/variableTests/variables.c
@@ -0,0 +1,4 @@
+auto int autoCVariable;
+extern int externCVariable;
+register int registerCVariable;
+static int staticCVariable;
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/variableTests/variables.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/variableTests/variables.cpp
new file mode 100644
index 0000000..0611def
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/pdomtests/variableTests/variables.cpp
@@ -0,0 +1,4 @@
+auto int autoCPPVariable;
+extern int externCPPVariable;
+register int registerCPPVariable;
+static int staticCPPVariable;
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedDeclSpecTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedDeclSpecTestSource.awts
new file mode 100644
index 0000000..9acaeb8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedDeclSpecTestSource.awts
@@ -0,0 +1,222 @@
+//!Commented DeclSpecifierTest
+//%CPP
+//Test1
+inline int foo()
+{
+    return 1;
+}
+
+//Test2
+const int a = 1;
+//Test3
+volatile int b = 3;
+//Test4
+typedef int *intp;
+//Test5
+extern int b;
+//Test6
+static int c;
+//Test7
+int foo()
+{
+    auto int i = 1;
+    return i;
+}
+
+//Test8
+int bar()
+{
+    register int i = c;
+    return i;
+}
+
+
+//!Commented CompositeTypeSpecifier
+//%CPP
+//Test1
+struct B //Test1
+{
+    int c; //Test3
+    char b; //Test4
+    //Test5
+};
+//Test6
+union D //Test7
+{
+    int i; //Test8
+    int y; //Test9
+    //Test10
+};
+//Test11
+class E //Test12
+{
+    //Test13
+public:
+    int c; //Test14
+    //Test15
+};
+
+//!Commented ElaboratedTypeSpecifier 1
+//%CPP
+//Test1
+class A *A; //Test2
+//Test3
+enum Status{ good, bad}; //Test4
+//Test5
+enum Status stat; //Test6
+//Test7
+union D //Test8
+{
+    int i; //Test9
+    int y; //Test10
+    //Test11
+};
+//Test12
+union D d; //Test13
+
+//!Commented ElaboratedTypeSpecifier 2
+//%CPP
+enum Status{ good, bad};
+enum /*Test*/
+Status stat;
+
+//!Commented EnumeratioSpecifier
+//%CPP
+enum /*Test*/
+Status{ good, bad};
+
+//!NamedTypeSpecifier
+//%CPP
+typedef int INT;
+typedef INT (FOO)(INT);
+
+//!SimpleDeclSpecifier
+//%CPP
+signed short int i;
+unsigned long int y;
+float f;
+void x();
+char c;
+double d;
+
+//!Commented CPPCompositeTypeSpecifier 1
+//%CPP
+//TEST 1
+class TestClass //TEST 2
+{
+    //TEST 3
+}; //TEST 4
+
+//!Commented CPPCompositeTypeSpecifier 2
+//%CPP
+/*TEST 1*/
+class TestClass /*TEST 2*/
+{
+    /*TEST 3*/
+}; /*TEST 4*/
+
+//!Commented CPPCompositeTypeSpecifier 3
+//%CPP
+//TEST 1
+class TestClass2 //TEST 2
+ : public TestClass //TEST 3
+{
+    //TEST 4
+}; //TEST 5
+
+//!Commented CPPCompositeTypeSpecifier 4
+//%CPP
+/*TEST 1*/
+class TestClass2 /*TEST 2*/
+ : public TestClass
+{
+    /*TEST 3*/
+}; /*TEST 4*/
+
+//!Commented CPPCompositeTypeSpecifier 5
+//%CPP
+class TestClass2 /*TEST 1*/
+ : public TestClass
+{
+};
+
+//!Commented CPPCompositeTypeSpecifier 6
+//%CPP
+
+class TestClass2
+ : public TestClass /*TEST 1*/
+{
+};
+
+//=
+class TestClass2 : public TestClass /*TEST 1*/
+{
+};
+
+//!Commented CPPCompositeTypeSpecifier 7
+//%CPP
+class TestClass2 : public TestClass
+{ //TEST 1
+};
+
+//=
+class TestClass2 : public TestClass
+{
+    //TEST 1
+};
+
+//!Commented CPPCompositeTypeSpecifier 8
+//%CPP
+class TestClass2
+ : public TestClass
+{ /*TEST 1*/
+};
+
+//=
+class TestClass2 : public TestClass
+{
+    /*TEST 1*/
+};
+
+//!Commented CPPNamedTypeSpecifier 1
+//%CPP
+template<class T> class A
+{
+    //TEST 1
+    typedef char C; //TEST 2
+};
+
+//!Commented CPPNamedTypeSpecifier 2
+//%CPP
+template<class T> class A
+{
+    /*TEST 1*/
+    typedef char C; /*TEST 2*/
+};
+
+//!Commented SimpleDeclSpecifier 1
+//%CPP
+//TEST 1
+bool b; //TEST 2
+
+//!Commented SimpleDeclSpecifier 2
+//%CPP
+/*TEST 1*/
+wchar_t wc; /*TEST 2*/
+
+//!Commented DeclSpecifier in Definition
+//%CPP
+//comment a
+void tree(int a){ //comment b
+	a = 1; //comment c
+} //comment d
+
+//=
+//comment a
+void tree(int a)
+{
+    //comment b
+    a = 1; //comment c
+} //comment d
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedDeclarationTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedDeclarationTestSource.awts
new file mode 100644
index 0000000..8a28473
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedDeclarationTestSource.awts
@@ -0,0 +1,243 @@
+//!Commented ASMDeclarationTest 1
+//%CPP
+//TEST 1
+asm("movl %1, %%eax;"); //TEST 2
+
+//!Commented ASMDeclarationTest 2
+//%CPP
+/*TEST 1*/
+asm("movl %1, %%eax;"); /*TEST 2*/
+
+//!Commented FunctionDefinitionTest 1
+//%CPP
+//TEST 1
+int foo()
+{
+    //inner comment
+    return 1;
+} //TEST 2
+
+
+//!Commented FunctionDefinitionTest 2
+//%CPP
+/*TEST 1*/
+int foo()
+{
+    //inner comment
+    return 1;
+} /*TEST 1*/
+
+
+//!Commented SimpleDeclarationTest 1
+//%CPP
+//TEST 1
+int i = 2, y = 3; //TEST 2
+//TEST 3
+int b = 0; //TEST 4
+
+//!Commented SimpleDeclarationTest 2
+//%CPP
+/*TEST 1*/
+int i = 2, y = 3; /*TEST 2*/
+/*TEST 3*/
+int b = 0; /*TEST 4*/
+
+//!Commented ExplicitTemplateInstantion 1
+//%CPP
+//TEST 1
+template class vector<int>; //TEST 2
+
+//!Commented ExplicitTemplateInstantion 2
+//%CPP
+/*TEST 1*/
+template class vector<int>; /*TEST 2*/
+
+//!Commented GPPExplicitTemplateInstantion 1
+//%CPP GNU
+//TEST 1
+static template class vector<int>; //TEST 2
+//TEST 3
+inline template class vector<int>; //TEST 4
+//TEST 5
+inline template class vector<int>; //TEST 6
+
+//!Commented LinkageSpecification 1
+//%CPP
+//TEST 1
+extern "C" typedef void FUNC(); //TEST 2
+
+
+//!Commented LinkageSpecification 2
+//%CPP
+/*TEST 1*/
+extern "C" typedef void FUNC(); /*TEST 2*/
+
+
+//!Commented NamespaceAlias 1
+//%CPP
+//TEST 1
+namespace kurz = ziemlichlangernamespace; //TEST 2
+
+//!Commented NamespaceAlias 2
+//%CPP
+/*TEST 1*/
+namespace kurz = ziemlichlangernamespace; /*TEST 2*/
+
+//!Commented NamespaceDefinition 1
+//%CPP
+//TEST 1
+namespace ziemlichlangernamespace
+{
+    //TEST 2
+} //TEST 3
+
+//!Commented NamespaceDefinition 2
+//%CPP
+/*TEST 1*/
+namespace ziemlichlangernamespace
+{
+    /*TEST 2*/
+} /*TEST 3*/
+
+//!Commented NamespaceDefinition 3
+//%CPP
+namespace ziemlichlangernamespace
+{
+    //TEST
+}
+
+//!Commented NamespaceDefinition 4
+//%CPP
+namespace ziemlichlangernamespace
+{
+    //TEST
+}
+void doIt()
+{
+    int i = 0;
+}
+
+
+//!Commented TemplateDeclaration 1
+//%CPP
+//TEST 1
+template<class T> class vector //TEST 2
+{
+    //TEST 3
+}; //TEST 4
+
+//!Commented TemplateDeclaration 2
+//%CPP
+/*TEST 1*/
+template<class T> class vector /*TEST 2*/
+{
+    /*TEST 3*/
+}; /*TEST 4*/
+
+//!Commented NestedTemplateDeclaration 1
+//%CPP
+//TEST 1
+template<template <class T> class K> class vector //TEST 2
+{
+    //TEST 3
+}; //TEST 4
+
+//!Commented NestedTemplateDeclaration 2
+//%CPP
+/*TEST 1*/
+template<template <class T> class K> class vector /*TEST 2*/
+{
+    /*TEST 3*/
+}; /*TEST 4*/
+
+//!Commented TemplateSpecialization 1
+//%CPP
+//TEST 1
+template<typename T> class MyQueue;
+template<> class MyQueue<double> //TEST 2
+{
+    //TEST 3
+    std::vector<double> data;
+public:
+    void Add(const double& );
+    void Remove();
+    void Print();
+    //TEST 4
+}; //TEST 5
+
+//!Commented TemplateSpecialization 2
+//%CPP
+/*TEST 1*/
+template<typename T> class MyQueue;
+template<> class MyQueue<double> /*TEST 2*/
+{
+    /*TEST 3*/
+    std::vector<double> data;
+public:
+    void Add(const double& );
+    void Remove();
+    void Print();
+    /*TEST 4*/
+}; /*TEST 5*/
+
+//!Commented UsingDeclaration 1
+//%CPP
+struct A
+{
+    void f();
+    enum E{ e};
+    union 
+    {
+        int u;
+    };
+};
+struct B : A
+{
+    //TEST 1
+    using A::f; //TEST 2
+    /*TEST 3*/
+    using typename A::e; /*TEST 4*/
+    using A::u;
+    /*TEST 5*/
+};
+
+//!Commented UsingDirective 1
+//%CPP
+//TEST
+using namespace B; //TEST
+
+
+//!Commented VisibilityLabel 1
+//%CPP
+class A
+{
+    //TEST 1
+public: //TEST 2
+    int hallo();
+    /*TEST 3*/
+protected: /*TEST 4*/
+    int b, c;
+private:
+    int p;
+};
+
+//!Comment BeforeSimpleDeclaration 1
+//%CPP
+//TEST 1
+int i = 2; //TEST 2
+
+//!Comment BeforeSimpleDeclaration 2
+//%CPP
+/*TEST 1*/
+int i = 2; /*TEST 2*/
+
+//!Commented typename qualfier 1
+//%CPP
+//TEST 1
+typename T::A *a6; //TEST 2
+
+//!Commented typename qualfier 2
+//%CPP
+/*TEST 1*/
+typename T::A *a6; /*TEST 2*/
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedDeclaratorTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedDeclaratorTestSource.awts
new file mode 100644
index 0000000..564bcd0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedDeclaratorTestSource.awts
@@ -0,0 +1,252 @@
+//!Commented DeclaratorTest 1
+//%CPP
+//TEST 1
+void foo()
+{
+    //TEST 2
+    struct B
+    {
+        int f();
+    };
+    int (B::* pb)() = &B::f;
+}
+
+
+//!Commented DeclaratorTest 2
+//%CPP
+/*TEST 1*/
+void foo()
+{
+    /*TEST 2*/
+    struct B
+    {
+        int f();
+    };
+    int (B::* pb)() = &B::f;
+}
+
+
+//!Commented CPPFunctionDeclaratorTest 1
+//%CPP
+char & operator [](unsigned int);
+//TEST 1
+TestClass::TestClass(int a) //TEST 2
+{
+    //TEST 3
+} //TEST 4
+
+
+//!Commented CPPFunctionDeclaratorTest 2
+//%CPP
+char & operator [](unsigned int);
+/*TEST 1*/
+TestClass::TestClass(int a) /*TEST 2*/
+{
+    /*TEST 3*/
+} /*TEST 4*/
+
+
+//!Commented CPPFunctionDeclaratorTest 3
+//%CPP
+char & operator [](unsigned int);
+//TEST 1
+TestClass::TestClass(int a)
+:alpha(a) //TEST 2
+{
+    //TEST 3
+} //TEST 4
+
+
+//!Commented CPPFunctionDeclaratorTest 4
+//%CPP
+char & operator [](unsigned int);
+/*TEST 1*/
+TestClass::TestClass(int a)
+:alpha(a) /*TEST 3*/
+{
+    /*TEST 4*/
+} /*TEST 5*/
+
+
+//!Commented ICPPASTFunctionTryBlockDeclarator1
+//%CPP
+void foo()
+{
+    int i = 1;
+    try {
+        i++;
+    }
+    catch(...){
+    }
+}
+
+
+//!Commented ICPPASTFunctionTryBlockDeclarator2
+//%CPP
+void foo()
+{
+    int i = 1;
+    //Test
+    try {
+        i++;
+    }
+    catch(...){
+    }
+}
+
+
+//!Commented ICPPASTFunctionTryBlockDeclarator3
+//%CPP
+void foo()
+{
+    int i = 1;
+    try {
+        //Test
+        i++;
+    }
+    catch(...){
+    }
+}
+
+
+//!Commented ICPPASTFunctionTryBlockDeclarator3b
+//%CPP
+void foo()
+{
+    int i = 1;
+    try //Test
+    {
+        i++;
+    }
+    catch(...){
+    }
+}
+
+
+//!Commented ICPPASTFunctionTryBlockDeclarator4
+//%CPP
+void foo()
+{
+    int i = 1;
+    try {
+        //Test
+        i++;
+    }
+    catch(...){
+    }
+}
+
+
+//!Commented ICPPASTFunctionTryBlockDeclarator5
+//%CPP
+void foo()
+{
+    int i = 1;
+    try {
+        i++; //Test
+    }
+    catch(...){
+    }
+}
+
+
+//!Commented ICPPASTFunctionTryBlockDeclarator6
+//%CPP
+void foo()
+{
+    int i = 1;
+    try {
+        i++;
+        //Test
+    }
+    catch(...){
+    }
+}
+
+
+//!Commented ICPPASTFunctionTryBlockDeclarator7
+//%CPP
+void foo()
+{
+    int i = 1;
+    try {
+        i++;
+    } //Test
+    catch(...){
+    }
+}
+
+
+//!Commented ICPPASTFunctionTryBlockDeclarator8
+//%CPP
+void foo()
+{
+    int i = 1;
+    try {
+        i++;
+    }
+    catch(...){
+        //Test
+    }
+}
+
+
+//!Commented ICPPASTFunctionTryBlockDeclarator9
+//%CPP
+void foo()
+{
+    int i = 1;
+    try {
+        i++;
+    }
+    catch(...){
+        //Test
+    }
+}
+
+
+//!Commented ICPPASTFunctionTryBlockDeclarator11
+//%CPP
+void foo()
+{
+    int i = 1;
+    try {
+        i++;
+    }
+    catch(...){
+    }
+    //Test
+}
+
+
+//!Commented ICPPASTFunctionTryBlockDeclarator12
+//%CPP
+void foo()
+{
+    int i = 1;
+    try {
+        i++;
+    }
+    catch(Overflow oo){
+    }
+    catch(Matherr mm){
+    }
+}
+
+
+//!Commented ICPPASTFunctionTryBlockDeclarator13
+//%CPP
+void foo()
+{
+    int i = 1;
+    try {
+        i++;
+    }
+    catch(Overflow oo){
+    }
+    catch(Matherr mm){
+        //Test
+    }
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedNameTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedNameTestSource.awts
new file mode 100644
index 0000000..b6009c3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedNameTestSource.awts
@@ -0,0 +1,86 @@
+//!Commented NameTest1
+//%CPP
+//Test
+int Hallo;
+
+//!Commented NameTest2
+//%CPP
+int Hallo; //Test
+
+//!Commented NameTest2
+//%CPP
+int Hallo /*Test*/;
+
+//!Commented QualifiedName1
+//%CPP
+//TEST
+int TestClass::Hallo;
+
+//!Commented QualifiedName1
+//%CPP
+int TestClass::Hallo; //TEST
+
+//!Commented QualifiedName1
+//%CPP
+int TestClass::Hallo /*Test*/;
+
+//!Commented OperatorName1
+//%CPP
+class Foo
+{
+public:
+    //Test
+    char & operator [](unsigned int);
+};
+
+//!Commented OperatorName2
+//%CPP
+class Foo
+{
+public:
+    char & operator [](unsigned int); //Test
+};
+
+//!Commented ConversionName1
+//%CPP
+class Foo
+{
+public:
+    //Test
+    operator int();
+};
+
+//!Commented ConversionName2
+//%CPP
+class Foo
+{
+public:
+    operator int(); //Test
+};
+
+//!Commented ConversionName3
+//%CPP
+class Foo
+{
+public:
+    operator int() /*Test*/;
+};
+
+//!Commented TemplateID1
+//%CPP
+//Test
+A::B<T> b;
+
+//!Commented TemplateID2
+//%CPP
+A::B<T> b; //Test
+
+//!Commented NestedTemplates1
+//%CPP
+//Test
+vector<vector<int> > vvi;
+
+//!Commented NestedTemplates2
+//%CPP
+vector<vector<int> > vvi; //Test
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedStatementTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedStatementTestSource.awts
new file mode 100644
index 0000000..9a790cd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedStatementTestSource.awts
@@ -0,0 +1,660 @@
+//!Commented BreakStatementTest 1
+//%CPP
+void foo()
+{
+    while(true){
+        //TEST  1
+        break; //TEST 2
+    }
+}
+
+
+//!Commented BreakStatementTest 2
+//%CPP
+void foo()
+{
+    while(true){
+        /*TEST 1*/
+        break; /*TEST 2*/
+    }
+}
+
+
+//!Commented CompoundStatementTest 1
+//%CPP
+void foo()
+{
+    int i = 2;
+    //TEST 1
+    {
+        //TEST 2
+        int a = i;
+        {
+            //TEST 3
+            a++;
+            //TEST 4
+        } //TEST 5
+        //TEST 6
+    } //TEST 7
+}
+
+
+//!Commented CompoundStatementTest 2
+//%CPP
+void foo()
+{
+    int i = 2;
+    /*TEST 1*/
+    {
+        /*TEST 2*/
+        int a = i;
+        {
+            /*TEST 3*/
+            a++;
+            /*TEST 4*/
+        } /*TEST 5*/
+        /*TEST 6*/
+    } /*TEST 7*/
+}
+
+
+//!Commented ContinueStatementTest 1
+//%CPP
+void foo()
+{
+    while(true){
+        //TEST 1
+        continue; //TEST 2
+    }
+}
+
+
+//!Commented ContinueStatementTest 2
+//%CPP
+void foo()
+{
+    while(true){
+        /*TEST 1*/
+        continue; /*TEST 2*/
+    }
+}
+
+
+//!Commented DeclarationStatementTest 1
+//%CPP
+void foo()
+{
+    //TEST 1
+    int i = 2; //TEST 2
+    //TEST 3
+    int a; //TEST 4
+    //TEST 5
+}
+
+
+//!Commented DeclarationStatementTest 2
+//%CPP
+void foo()
+{
+    /*TEST 1*/
+    int i = 2; /*TEST 2*/
+    /*TEST 3*/
+    int a; /*TEST 4*/
+    /*TEST 5*/
+}
+
+
+//!Commented DoStatementTest 1
+//%CPP
+void foo()
+{
+    //TEST 1
+    do{ //TEST 2
+        continue; //TEST 3
+        //TEST 4
+    } while(true); //TEST 5
+}
+
+
+//=
+void foo()
+{
+    //TEST 1
+    do{
+        //TEST 2
+        continue; //TEST 3
+        //TEST 4
+    } while(true); //TEST 5
+}
+
+
+//!Commented DoStatementTest 2
+//%CPP
+void foo()
+{
+    /*TEST 1*/
+    do{ /*TEST 2*/
+        continue; /*TEST 3*/
+        /*TEST 4*/
+    } while(true); /*TEST 5*/
+}
+
+
+//=
+void foo()
+{
+    /*TEST 1*/
+    do{
+        /*TEST 2*/
+        continue; /*TEST 3*/
+        /*TEST 4*/
+    } while(true); /*TEST 5*/
+}
+
+
+//!Commented DoStatementTest 3
+//%CPP
+void foo()
+{
+    do{
+        continue;
+    } while(true); /*TEST 1*/
+}
+
+
+//!Commented ExpressionsStatement1
+//%CPP
+void foo()
+{
+    bar1();
+    //TEST
+    bar2();
+}
+
+
+//!Commented ExpressionsStatement2
+//%CPP
+void foo()
+{
+    //TEST
+    bar1();
+    bar2();
+}
+
+
+//!Commented ExpressionsStatement3
+//%CPP
+void foo()
+{
+    bar1();
+    bar2();
+    //TEST
+}
+
+
+//!Commented ForStatementTest 1
+//%CPP
+void foo()
+{
+    //TEST 1
+    for(int i = 0;i < 1;++i){ //TEST 2
+        break; //TEST 3
+    } //TEST 4
+}
+
+
+//=
+void foo()
+{
+    //TEST 1
+    for(int i = 0;i < 1;++i){
+        //TEST 2
+        break; //TEST 3
+    } //TEST 4
+}
+
+
+//!Commented ForStatementTest 2
+//%CPP
+void foo()
+{
+    /*TEST 1*/
+    for(int i = 0;i < 1;++i){ /*TEST 2*/
+        break; /*TEST 3*/
+    } /*TEST 4*/
+}
+
+
+//=
+void foo()
+{
+    /*TEST 1*/
+    for(int i = 0;i < 1;++i){
+        /*TEST 2*/
+        break; /*TEST 3*/
+    } /*TEST 4*/
+}
+
+
+//!Commented ForStatementTest 3
+//%CPP
+void foo()
+{
+    for(int i = 0;i < 1;++i){
+        break;
+    } /*TEST 4*/
+}
+
+
+//!Commented GotoStatement1
+//%CPP
+void foo()
+{
+    start:
+    bar();
+    //TEST
+    goto start;
+}
+
+
+//!Commented GotoStatement2
+//%CPP
+void foo()
+{
+    start:
+    bar();
+    goto start; //TEST
+}
+
+
+//!Commented GotoStatement3
+//%CPP
+void foo()
+{
+    start:
+    bar();
+    goto /*TEST*/ start;
+}
+
+
+//=
+void foo()
+{
+    start:
+    bar();
+    goto /*TEST*/
+    start;
+}
+
+
+//!Commented GotoStatement4
+//%CPP
+void foo()
+{
+    start:
+    bar();
+    goto //TEST
+    start;
+}
+
+
+//!Commented GotoStatement5
+//%CPP
+void foo()
+{
+    start:
+    bar();
+    goto /*TEST*/
+    start;
+}
+
+
+//!Commented LabelStatement1
+//%CPP
+void foo()
+{
+    //Test
+    start:
+    bar();
+    goto start;
+}
+
+
+//!Commented LabelStatement2
+//%CPP
+void foo()
+{
+    start: //Test
+    bar();
+    goto start;
+}
+
+
+//=
+void foo()
+{
+    start:
+    //Test
+    bar();
+    goto start;
+}
+
+
+//!Commented LabelStatement3
+//%CPP
+void foo()
+{
+    start: /*Test*/
+    bar();
+    goto start;
+}
+
+
+//=
+void foo()
+{
+    start:
+    /*Test*/
+    bar();
+    goto start;
+}
+
+
+//!Commented LabelStatement4
+//%CPP
+void foo()
+{
+    start:
+    //Test
+    bar();
+    goto start;
+}
+
+
+//!Commented LabelStatement5
+//%CPP
+void foo()
+{
+    start:
+    bar(); //Test
+    goto start;
+}
+
+
+//!Commented IfStatementTest 1
+//%CPP
+int f()
+{
+    if(int c = f()){
+        c++;
+    } //TEST 1
+    return i;
+}
+
+
+//!Commented IfStatementTest 2
+//%CPP
+int f()
+{
+    int i = 0;
+    //TEST 1
+    if(i < 1){
+        //TEST 3
+        ++i;
+        //TEST 4
+    }else{
+        //TEST 5
+        --i;
+        //TEST 6
+    } //TEST 7
+    if(int c = f()){
+        c++;
+    } //TEST 8
+    return i;
+}
+
+
+//!Commented IfStatementTest 3
+//%CPP
+int f()
+{
+    int i = 0;
+    /*TEST 1*/
+    if(i < 1){
+        /*TEST 1*/
+        ++i;
+        /*TEST 1*/
+    }else{
+        /*TEST 1*/
+        --i;
+        /*TEST 1*/
+    } /*TEST 1*/
+    if(int c = f()){
+        c++;
+    } /*TEST 1*/
+    return i;
+}
+
+
+//!Commented IfStatementTest 4
+//%CPP
+int g()
+{
+    if(10 > 5) //TEST 1
+        return 1; //TEST 2
+
+    return 0;
+}
+
+//=
+int g()
+{
+    if(10 > 5)
+        //TEST 1
+        return 1; //TEST 2
+
+    return 0;
+}
+
+//!Commented IfStatementTest 5
+//%CPP
+int g()
+{
+    if(10 > 5) /*TEST 1*/
+        return 1; /*TEST 2*/
+
+    return 0;
+}
+
+//=
+int g()
+{
+    if(10 > 5)
+        /*TEST 1*/
+        return 1; /*TEST 2*/
+
+    return 0;
+}
+
+//!NullStatementTest
+//%CPP
+void f()
+{
+    ;
+}
+
+
+//!Commented ReturnStatement1
+//%CPP
+void foo()
+{
+    return; //Test
+}
+
+
+//!Commented ReturnStatement2
+//%CPP
+void foo()
+{
+    return 5; //Test
+}
+
+
+//!Commented ReturnStatement3
+//%CPP
+void foo()
+{
+    //Test
+    return 1 + 1;
+}
+
+
+//!Commented SwitchStatementTest 1
+//%CPP
+void foo()
+{
+    //TEST 1
+    switch (1){
+        //TEST 2
+        case 1: //TEST 3
+            return 1; //TEST 4
+        case 2:
+            return 2;
+        default: //TEST 5
+            return 3;
+            //TEST 6
+    } //TEST 7
+}
+
+
+//!Commented SwitchStatementTest 2
+//%CPP
+void foo()
+{
+    /*TEST 1*/
+    switch (1){ /*TEST 2*/
+        /*TEST 3*/
+        case 1: /*TEST 4*/
+            return 1; /*TEST 5*/
+        case 2:
+            return 2;
+        default: /*TEST 6*/
+            return 3;
+            /*TEST 7*/
+    } /*TEST 8*/
+}
+
+
+//=
+void foo()
+{
+    /*TEST 1*/
+    switch (1){
+        /*TEST 2*/
+        /*TEST 3*/
+        case 1: /*TEST 4*/
+            return 1; /*TEST 5*/
+        case 2:
+            return 2;
+        default: /*TEST 6*/
+            return 3;
+            /*TEST 7*/
+    } /*TEST 8*/
+}
+
+
+//!Commented SwitchStatementTest 3
+//%CPP
+void foo()
+{
+    switch (1){
+        case 1:
+            return 1;
+        case 2:
+            return 2;
+        default:
+            return 3;
+    } /*TEST 8*/
+}
+
+
+//!Commented WhileStatementTest 1
+//%CPP
+void foo()
+{
+    //TEST 1
+    while(true){ //TEST 2
+        //TEST 3
+        break; //TEST 4
+        //TEST 5
+    } //TEST 6
+}
+
+
+//=
+void foo()
+{
+    //TEST 1
+    while(true){
+        //TEST 2
+        //TEST 3
+        break; //TEST 4
+        //TEST 5
+    } //TEST 6
+}
+
+
+//!Commented WhileStatementTest 2
+//%CPP
+void foo()
+{
+    /*TEST 1*/
+    while(true){ /*TEST 2*/
+        /*TEST 3*/
+        break; /*TEST 4*/
+        /*TEST 5*/
+    } /*TEST 6*/
+}
+
+
+//=
+void foo()
+{
+    /*TEST 1*/
+    while(true){
+        /*TEST 2*/
+        /*TEST 3*/
+        break; /*TEST 4*/
+        /*TEST 5*/
+    } /*TEST 6*/
+}
+
+
+//!Commented WhileStatementTest 3
+//%CPP
+void foo()
+{
+    while(true){
+        break;
+    } /*TEST 6*/
+}
+
+
+//!TryBlockStatement
+//%CPP
+int foo()
+{
+    try {
+        int i = 1;
+        try {
+            ++i;
+            return i;
+        }
+        catch(...){
+        }
+    }
+    catch(...){
+    }
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedTestSource.awts
new file mode 100644
index 0000000..87a1133
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedTestSource.awts
@@ -0,0 +1,1491 @@
+//!CommentRecognition000
+//%CPP
+class Klasse0
+{
+public:
+    Klasse0();   /*
+    			  * Comment
+    			  */
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+class Klasse0
+{
+public:
+    Klasse0(); /*
+    			  * Comment
+    			  */
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition00
+//%CPP
+class Klasse0
+{
+public:
+    Klasse0();   //Comment
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+class Klasse0
+{
+public:
+    Klasse0(); //Comment
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition0
+//%CPP
+//Comment1
+class Klasse0
+{
+    //Comment2
+public:
+    Klasse0();
+    std::string toString();
+private:
+    int i;
+};
+
+//!DeclarationWithTraillingDoubleComments
+//%CPP
+int foo = bar; //Comment
+//Zweiteilig
+
+//!DeclarationWithLeadingDoubleComments
+//%CPP
+//Comment
+//Zweiteilig
+int foo;
+
+//!DeclarationWithTraillingAndLeadingComments
+//%CPP
+//Comment1
+int foo = bar; //Comment2
+
+//!DeclarationWithTraillingAndLeadingComments
+//%CPP
+//Comment1
+int foo = bar; //Comment2
+
+//!DeclarationWithTraillingComments
+//%CPP
+int foo = bar; //Comment
+
+//!DeclarationWithTraillingComments
+//%CPP
+int foo; //Comment
+
+//!Method witch Trailercomment
+//%CPP
+int foo()
+{
+    return 42;
+    //return the Answer
+}
+
+
+//!Method witch Trailercomment2
+//%CPP
+int foo()
+{
+    return 42; //return the Answer
+}
+
+
+//!Method witch Trailercomment3
+//%CPP
+int foo()
+{
+    //return the Answer
+    return 42;
+}
+
+
+//!ClassCommentTest
+//%CPP
+class comment
+{
+    //hallo
+};
+
+//!Comment1 - von CERP
+//%CPP
+class test
+{
+public:
+    test();
+    /*
+     * Hallo
+     */
+    void lala();
+    //test
+    virtual ~test();
+protected:
+    class test2
+    {
+    public:
+        test2();
+    }; //Komment 1
+    //Komment 2
+    //Komment 3
+};
+
+//!Comment2 - von CERP
+//%CPP
+class test
+{
+public:
+    test();
+    /*
+     * Hallo
+     */
+    void lala();
+    //test
+    virtual ~test();
+protected:
+    class test2
+    {
+    public:
+        test2();
+    }; //Komment 1
+};
+//LALA
+
+//!Comment3 - von CERP
+//%CPP
+//Anfang
+class test
+{
+public:
+    test();
+    /*
+     * Hallo
+     */
+    void lala();
+    //test
+    virtual ~test();
+protected:
+    class test2
+    {
+    public:
+        test2();
+    }; //Komment 1
+};
+
+//!Comment4 - von CERP
+//%CPP
+class test
+{
+    //Klasse...
+public:
+    test();
+    /*
+     * Hallo
+     */
+    void lala();
+    //test
+    virtual ~test();
+protected:
+    class test2
+    {
+    public:
+        test2();
+    }; //Komment 1
+};
+
+//!CommentRecognition1 - von CERP
+//%CPP
+class Klasse1
+{
+    //TEST
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition2 - von CERP
+//%CPP
+class Klasse1
+{
+public: //TEST
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition3 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    //TEST
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition4 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition5 - von CERP
+//%CPP
+class Klasse1
+{   //TEST
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+class Klasse1
+{
+    //TEST
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition6 - von CERP
+//%CPP
+class Klasse1{    //TEST
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+class Klasse1
+{
+    //TEST
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition7 - von CERP
+//%CPP
+class Klasse1
+{//TEST
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+class Klasse1
+{
+    //TEST
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition8 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+    int i = 5; //lala
+};
+
+//!CommentRecognition9 - von CERP
+//%CPP
+class Klasse1
+{
+    /*TEST*/
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition10 - von CERP
+//%CPP
+class Klasse1{    /*TEST*/
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+class Klasse1
+{
+    /*TEST*/
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition11 - von CERP
+//%CPP
+class Klasse1
+{
+public: /*TEST*/
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition11b - von CERP
+//%CPP
+class Klasse1
+{
+public: /*TEST*/ Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+class Klasse1
+{
+public: /*TEST*/
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition12 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+    int i = 5; /*TEST*/
+};
+
+//!CommentRecognition13 - von CERP
+//%CPP
+class Klasse1
+{
+    /*
+     * TEST
+     */
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition14 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+    int i = 5; /*
+                * TEST
+                */
+};
+
+//!CommentRecognition15 - von CERP
+//%CPP
+class Klasse1
+{
+public: /*
+         * TEST
+         */
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition16 - von CERP
+//%CPP
+class Klasse1{  //Test mit
+                //2 Zeilen
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+class Klasse1
+{
+    //Test mit
+    //2 Zeilen
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition17 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+    int i = 5; //Test mit
+    //2 Zeilen
+};
+
+//!CommentRecognition18 - von CERP
+//%CPP
+class Klasse1{
+    //Test mit
+    //2 Zeilen
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+class Klasse1
+{
+    //Test mit
+    //2 Zeilen
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition19 - von CERP
+//%CPP
+class Klasse1
+{
+    //Test mit
+    //2 Zeilen
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition20 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//!CommentRecognition21 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0; //TEST
+        i++;
+    }
+
+    int i;
+};
+
+//!CommentRecognition22 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    } //TEST
+
+private:
+    int i;
+};
+
+//!CommentRecognition23 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    //KommentarDavor
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    } //TEST
+
+private:
+    int i;
+};
+
+//!CommentRecognition24 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; //SCHLUSS
+
+//!CommentRecognition25 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; //SCHLUSS
+//2. teil
+
+//!CommentRecognition26 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+//SCHLUSS
+//2. teil
+
+//!CommentRecognition27 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; /*SCHLUSS*/
+
+//!CommentRecognition28 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+/*SCHLUSS*/
+
+//!CommentRecognition29 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; /*
+    * SCHLUSS
+    */
+
+//!CommentRecognition30 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    //TEST
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//!CommentRecognition31 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    /*TEST*/
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//!CommentRecognition32 - von CERP
+//%CPP
+//Vorher
+class Klasse1 //Nachher
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//!CommentRecognition33 - von CERP
+//%CPP
+//Vorher
+class Klasse1 /*Nachher*/
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//!CommentRecognition34 - von CERP
+//%CPP
+/*Vorher*/
+class Klasse1
+{
+    /*Nachher*/
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//!CommentRecognition35 - von CERP
+//%CPP
+/*Vorher*/
+class Klasse1
+{
+    //Nachher
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//!CommentRecognition36 - von CERP
+//%CPP
+/*
+ * Vorher
+ */
+class Klasse1
+{
+    //Nachher
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//!CommentRecognition37 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i; //Test
+};
+
+//!CommentRecognition38 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i; /*Test*/
+};
+
+//!CommentRecognition39 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i; /*
+            * Test
+            */
+};
+
+//!CommentRecognition40 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+    /*
+     * Test
+     */
+};
+
+//!CommentRecognition41 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    //TEST
+    int i;
+};
+
+//!CommentRecognition42 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    /*TEST*/
+    int i;
+};
+
+//!CommentRecognition43 - von CERP
+//%CPP
+class Klasse1
+{
+private:
+    int i;
+};
+
+//!CommentRecognition44 - von CERP
+//%CPP
+class Klasse1
+{
+private:
+    int i;
+    //TEST
+};
+
+//!CommentRecognition44b - von CERP
+//%CPP
+class Klasse1
+{
+private:
+    int i; //TEST
+};
+
+//!CommentRecognition44c - von CERP
+//%CPP
+class Klasse1
+{
+private:
+    int i;
+    //TEST
+}; //Add
+
+//!CommentRecognition44d - von CERP
+//%CPP
+class Klasse1
+{
+private:
+    int i;
+    //TEST
+} //Add
+;
+
+//!CommentRecognition45 - von CERP
+//%CPP
+class Klasse1
+{
+private:
+    //TEST
+    int i;
+};
+
+//!CommentRecognition46 - von CERP
+//%CPP
+class Klasse1
+{
+    //TEST
+private:
+    int i;
+};
+
+//!CommentRecognition47 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private: //TEST
+    int i;
+};
+
+//!CommentRecognition48 - von CERP
+//%CPP
+class Klasse1
+{
+    //TEST
+public: /*TEST*/
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition48b - von CERP
+//%CPP
+class Klasse1
+{
+    //TEST
+public: /*TEST*/
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition49 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1(); //TEST1
+    //TEST2
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition50 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1(); /*TEST1*/
+    /*TEST2*/
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition51 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1(); //TEST1
+    /*TEST2*/
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition52 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1(); /*TEST1*/
+    //TEST2
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition53 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1(); /*TEST1*/
+    //TEST3
+    //TEST2
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition54 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1(); /*TEST1*/
+    /*TEST3*/
+    //TEST2
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition55 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1(); //TEST1
+    /*
+     * TEST3
+     */
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition56 - von CERP
+//%CPP
+class Klasse1
+{
+public:
+    Klasse1(); /*
+                * TEST1
+                */
+    //TEST2
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition57 - von CERP
+//%CPP
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//!CommentRecognition58 - von CERP
+//%CPP
+//Kommentar
+namespace testNamespace
+{
+
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+}
+
+//=
+//Kommentar
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//!CommentRecognition59 - von CERP
+//%CPP
+namespace testNamespace //Kommentar
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//!CommentRecognition60 - von CERP
+//%CPP
+/*Kommentar*/
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//!CommentRecognition61 - von CERP
+//%CPP
+namespace testNamespace /*Kommentar*/
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//!CommentRecognition62 - von CERP
+//%CPP
+/*
+ * Kommentar
+ */
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//!CommentRecognition63 - von CERP
+//%CPP
+namespace testNamespace /*
+                         * Kommentar
+                         */
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//!CommentRecognition64 - von CERP
+//%CPP
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+} //Kommentar
+
+//!CommentRecognition65 - von CERP
+//%CPP
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+} /*Kommentar*/
+
+//!CommentRecognition66 - von CERP
+//%CPP
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+} /*
+   * Kommentar
+   */
+
+//!CommentRecognition67 - von CERP
+//%CPP
+namespace testNamespace
+{
+    class Klasse1 //TEST
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//!CommentRecognition68 - von CERP
+//%CPP
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i; //TEST
+    };
+}
+
+//!CommentRecognition69 - von CERP
+//%CPP
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    }; //TEST
+}
+
+//!CommentRecognition100 - von CERP
+//%CPP
+struct Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition101 - von CERP
+//%CPP
+//Kommentar
+struct Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition102 - von CERP
+//%CPP
+struct Klasse1
+{
+    //Kommentar
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//!CommentRecognition103 - von CERP
+//%CPP
+struct Klasse1
+{
+    //Kommentar
+private:
+    Klasse1();
+    std::string toString();
+protected:
+    int i;
+};
+
+//!CommentRecognition104 - von CERP
+//%CPP
+/*Davor*/
+struct Klasse1 //Kommentar
+{
+private:
+    Klasse1();
+    std::string toString();
+protected:
+    int i;
+};
+
+//!ImplementationFileCommentRecognition1 - von CERP
+//%CPP
+void Demo::methode1()
+{
+}
+
+void Demo::methode2()
+{
+}
+
+void Demo::methode3()
+{
+}
+
+
+//!ImplementationFileCommentRecognition2 - von CERP
+//%CPP
+//Zuvorderst
+
+
+void Demo::methode1()
+{
+    //Test
+}
+
+void Demo::methode2()
+{
+}
+//Davor
+
+void Demo::methode3()
+{    
+} //Danach
+
+//Am Schluss
+//=
+//Zuvorderst
+void Demo::methode1()
+{
+    //Test
+}
+
+void Demo::methode2()
+{
+}
+
+//Davor
+void Demo::methode3()
+{
+} //Danach
+
+//Am Schluss
+
+//!ImplementationFileCommentRecognition3 - von CERP
+//%CPP
+/*Zuvorderst*/
+void Demo::methode1()
+{
+    /*Test*/
+}
+
+void Demo::methode2()
+{
+}
+
+/*Davor*/
+void Demo::methode3()
+{    
+} /*Danach*/
+
+
+/*Am Schluss*/
+
+//=
+/*Zuvorderst*/
+void Demo::methode1()
+{
+    /*Test*/
+}
+
+void Demo::methode2()
+{
+}
+
+/*Davor*/
+void Demo::methode3()
+{
+} /*Danach*/
+
+/*Am Schluss*/
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedTestSource2.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedTestSource2.awts
new file mode 100644
index 0000000..42b2275
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterCommentedTestSource2.awts
@@ -0,0 +1,67 @@
+//!Commented TemplateFunction1
+//%CPP
+template<typename T> int tempFunct(T p)
+{
+    ++p;
+    //Kommentar
+    p + 4;
+    return 0;
+}
+
+
+//!Commented TemplateFunction2
+//%CPP
+//Kommentar
+template<typename T> int tempFunct(T p)
+{
+    ++p;
+    p + 4;
+    return 0;
+}
+
+
+//!Commented TemplateFunction3
+//%CPP
+template<typename T> int tempFunct(T p)
+{
+    ++p;
+    p + 4;
+    return 0;
+} //Kommentar
+
+
+//!Commented ExpressionList1
+//%CPP
+void foo()
+{
+    int i, j, k;
+    //Test
+    i = 1, j = 2, k = 3;
+}
+
+
+//!Commented ExpressionList2
+//%CPP
+void foo()
+{
+    int i, j, k;
+    i = 1, j = 2, k = 3; //Test
+}
+
+
+//!Commented ExpressionList3
+//%CPP
+void foo(){
+    int i, j, k;
+    i = 1, j = 2, k = 3; //Test
+}
+
+
+//=
+void foo()
+{
+    int i, j, k;
+    i = 1, j = 2, k = 3; //Test
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterDeclSpecTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterDeclSpecTestSource.awts
new file mode 100644
index 0000000..a2592ae
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterDeclSpecTestSource.awts
@@ -0,0 +1,164 @@
+//!DeclSpecifierTest
+//%CPP
+inline int foo()
+{
+    return 1;
+}
+
+const int a = 1;
+volatile int b = 3;
+typedef int *intp;
+extern int b;
+static int c;
+int foo()
+{
+    auto int i = 1;
+    return i;
+}
+
+int bar()
+{
+    register int i = c;
+    return i;
+}
+
+
+//!CompositeTypeSpecifier
+//%CPP
+struct B
+{
+    int c;
+    char b;
+};
+union D
+{
+    int i;
+    int y;
+};
+class E
+{
+public:
+    int c;
+};
+
+//!ElaboratedTypeSpecifier
+//%CPP
+class A *A;
+enum Status{ good, bad};
+enum Status stat;
+union D
+{
+    int i;
+    int y;
+};
+union D d;
+struct S *S;
+
+//!EnumeratioSpecifier
+//%CPP
+enum Status{ good = 0, bad};
+
+//!NamedTypeSpecifier
+//%CPP
+typedef int INT;
+typedef INT (FOO)(INT);
+
+//!SimpleDeclSpecifier
+//%CPP
+signed short int i;
+unsigned long int y;
+float f;
+void x();
+char c;
+double d;
+
+//!CDeclSpecifer
+//%C
+restrict int i = 1;
+
+//!CCompositeTypeSpecifier
+//%C
+restrict struct B
+{
+    int c;
+    char b;
+};
+restrict union D
+{
+    int i;
+    int y;
+};
+
+//!CElaboratedTypeSpecifier
+//%C
+enum Status{ good, bad};
+restrict enum Status stat;
+union D
+{
+    int i;
+    int y;
+};
+restrict union D d;
+
+//!CEnumeratioSpecifier
+//%C
+restrict enum Status{ good, bad};
+
+//!CSimpleDeclSpecifier
+//%C
+long long int lli;
+_Complex float cf;
+_Bool b;
+
+//!CPPCompositeTypeSpecifier
+//%CPP
+class TestClass
+{
+    explicit TestClass(int);
+    friend int AddToFriend(int x);
+};
+class A
+{
+};
+class TestClass2 : public TestClass, A
+{
+};
+
+//!protected Base Specifiers
+//%CPP
+class TestClass
+{
+    explicit TestClass(int);
+    friend int AddToFriend(int x);
+};
+class TestClass2 : protected TestClass
+{
+};
+
+//!private Base Specifiers
+//%CPP
+class TestClass
+{
+    explicit TestClass(int);
+    friend int AddToFriend(int x);
+};
+class TestClass2 : private TestClass
+{
+};
+
+//!CPPNamedTypeSpecifier
+//%CPP
+template<class T> class A
+{
+    typedef char C;
+};
+
+//!SimpleDeclSpecifier
+//%CPP
+bool b;
+wchar_t wc;
+
+//!ICPPSimpleDeclSpecifier mutable Bug 40
+//%CPP
+mutable int n;
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterDeclarationTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterDeclarationTestSource.awts
new file mode 100644
index 0000000..4280ae8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterDeclarationTestSource.awts
@@ -0,0 +1,110 @@
+//!ASMDeclarationTest
+//%CPP
+asm("movl %1, %%eax;");
+
+//!FunctionDefinitionTest
+//%CPP
+int foo()
+{
+    return 1;
+}
+
+
+//!SimpleDeclarationTest
+//%CPP
+int i = 2, y = 3;
+int b = 0;
+
+//!ExplicitTemplateInstantion
+//%CPP
+template class vector<int>;
+
+//!GPPExplicitTemplateInstantion
+//%CPP GNU
+static template class vector<int>;
+inline template class vector<int>;
+inline template class vector<int>;
+
+//!LinkageSpecification
+//%CPP
+extern "C" typedef void FUNC();
+
+
+//!NamespaceAlias
+//%CPP
+namespace kurz = ziemlichlangernamespace;
+
+//!NamespaceDefinition
+//%CPP
+namespace ziemlichlangernamespace
+{
+}
+
+//!TemplateDeclaration
+//%CPP
+template<class T> class vector
+{
+};
+
+//!NestedTemplateDeclaration
+//%CPP
+template<template <class T> class K> class vector
+{
+};
+
+//!TemplateSpecialization
+//%CPP
+template<typename T> class MyQueue;
+template<> class MyQueue<double>
+{
+    std::vector<double> data;
+public:
+    void Add(const double& );
+    void Remove();
+    void Print();
+};
+
+//!UsingDeclaration
+//%CPP
+struct A
+{
+    void f();
+    enum E{ e};
+    union 
+    {
+        int u;
+    };
+};
+struct B : A
+{
+    using A::f;
+    using typename A::e;
+    using A::u;
+};
+
+//!UsingDirective
+//%CPP
+using namespace B;
+
+
+//!VisibilityLabel
+//%CPP
+class A
+{
+public:
+    int hallo();
+protected:
+    int b, c;
+private:
+    int p;
+};
+
+//!CommentBeforeSimpleDeclaration
+//%CPP
+//Comment
+int i = 2;
+
+//!typename qualfier
+//%CPP
+typename T::A *a6;
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterDeclaratorTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterDeclaratorTestSource.awts
new file mode 100644
index 0000000..a1e74cd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterDeclaratorTestSource.awts
@@ -0,0 +1,89 @@
+//!DeclaratorTest
+//%CPP
+int sd;
+int *ip;
+int hs = 1;
+char & c;
+void foo()
+{
+    struct B
+    {
+        int f();
+    };
+    int (B::* pb)() = &B::f;
+}
+
+
+//!ArrayDeclaratorTest
+//%CPP
+int *pi[3];
+int (*p3i)[3];
+
+//!FieldDeclaratorTest
+//%CPP
+struct Bit
+{
+    int bit : 3;
+};
+
+//!CStandardFunctionDeclaratorTest
+//%C
+int foo();
+int bar(int a, int b);
+int fun(const char *a, ...);
+int fun3(int i, const char *a, ...);
+
+//!CPPStandardFunctionDeclaratorTest
+//%CPP
+int foo();
+int bar(int a, int b);
+int fun(const char *a, ...);
+int fun2(const char *a ...);
+int fun3(int i, const char *a, ...);
+//= ,... is synonymous with ...
+int foo();
+int bar(int a, int b);
+int fun(const char *a, ...);
+int fun2(const char *a, ...);
+int fun3(int i, const char *a, ...);
+
+//!CPPFunctionDeclaratorTest
+//%CPP
+char & operator [](unsigned int);
+TestClass::TestClass(int a)
+:alpha(a)
+{
+}
+
+void undefPar(const char *c) throw (int);
+virtual void pure() = 0;
+int getV() const;
+int vol() volatile;
+
+//!ICPPASTFunctionTryBlockDeclarator
+//%CPP
+int f(int);
+class C
+{
+    int i;
+    double d;
+public:
+    C(int, double);
+};
+C::C(int ii, double id)
+try
+:i(f(ii)), d(id)
+{
+}
+catch(...){
+}
+
+
+//!CKnRFunctionDeclarator
+//%C GNU
+int foo(a, b)
+int b, a;
+{
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterExpressionTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterExpressionTestSource.awts
new file mode 100644
index 0000000..594bebb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterExpressionTestSource.awts
@@ -0,0 +1,185 @@
+//!CCastExpression
+//%C
+int i = (int)'A';
+
+//!CPPCastExpression
+//%CPP
+TestClass *i = dynamic_cast<TestClass*>(tc);
+TestClass *i = static_cast<TestClass*>(tc);
+TestClass *i = reinterpret_cast<TestClass*>(tc);
+TestClass *i = const_cast<TestClass*>(tc);
+
+//!ArraySubscrition
+//%C GNU
+int i = arr[0];
+int i = arr[y];
+
+//!CPPBinaryExpression
+//%CPP
+int i = 1 * x;
+int i = 1 / x;
+int i = 1 % x;
+int i = 1 + x;
+int i = 1 - x;
+int i = 1 << x;
+int i = 1 >> x;
+bool b = 1 < x;
+bool b = 1 > x;
+bool b = 1 <= x;
+bool b = 1 >= x;
+int i = 1 & x;
+int i = 1 ^ x;
+int i = 1 | x;
+bool b = 1 && x;
+bool b = 1 || x;
+int i = x;
+void foo()
+{
+    i *= x;
+}
+
+void foo()
+{
+    i /= x;
+}
+
+void foo()
+{
+    1 %= x;
+}
+
+void foo()
+{
+    1 += x;
+}
+
+void foo()
+{
+    1 -= x;
+}
+
+void foo()
+{
+    1 <<= x;
+}
+
+void foo()
+{
+    1 >>= x;
+}
+
+void foo()
+{
+    1 &= x;
+}
+
+void foo()
+{
+    1 |= x;
+}
+
+bool b = 1 == x;
+bool b = 1 != x;
+int i = a.x;
+int i = a->x;
+
+//!BinaryExpression with MacroExpansions
+//%CPP
+#define ZWO 2
+int i = ZWO + 2;
+int i = 2 + ZWO;
+//= Preprocessor-Direkrive wird nur bei VP-Translationunits geschrieben
+int i = ZWO + 2;
+int i = 2 + ZWO;
+
+//!GPPBinaryExpression
+//%CPP GNU
+int i = 1 <? x;
+int i = 1 >? x;
+
+//!ConditionalExpression
+//%CPP
+int a = 1 < 2 ? 2 : 3;
+
+//!ExpressionList
+//%CPP
+int a = 1, b = 2, c = 3;
+
+//!FieldReference
+//%CPP
+int i = tc->a;
+int y = tc.getI();
+
+//!CPPFieldReference
+//%CPP
+int i = tc->template get_new<int>();
+int y = tc.template get_new<int>();
+
+//!FunctionCall
+//%CPP
+int a = tc.getI();
+
+//!IdExpression
+//%CPP
+int i = a;
+
+//!LiteralExpression
+//%CPP
+int i = 1;
+int i = 'a';
+string s = "abc";
+
+//!CPPLiteralExpression
+//%CPP
+TestClass *tc = this;
+bool b = true;
+bool b = false;
+
+//!UnaryExpression
+//%CPP
+int i = ++a;
+int i = --a;
+int i = +a;
+int i = -a;
+int *b = &a;
+int i = *b;
+int i = ~b;
+bool b = !false;
+int i = sizeof a;
+int i = a--;
+int i = a++;
+int i = (b);
+
+//!CPPUnaryExpression
+//%CPP
+void f()
+{
+    throw "Fehler";
+}
+
+type_info c = typeid (a);
+
+//!TypeIdExpression
+//%CPP
+int d = sizeof (int);
+
+//!CPPTypeIdExpression
+//%CPP
+type_info c = typeid (int);
+
+//!CPPDeleteExpression
+//%CPP
+void f()
+{
+    delete tc;
+}
+
+
+//!CPPNewExpression
+//%CPP
+TestClass *tc = new TestClass();
+
+//!CPPSimpleTypeConstructorExpression
+//%CPP
+int i = int(1);
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterInitializerTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterInitializerTestSource.awts
new file mode 100644
index 0000000..b2e7641
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterInitializerTestSource.awts
@@ -0,0 +1,37 @@
+//!InitializerExpressionTest
+//%CPP
+int i = 0;
+
+//!InitializerListTest
+//%CPP
+struct A
+{
+    int x;
+    struct B
+    {
+        int i;
+        int j;
+    } b;
+} abs = {1, {2, 3}};
+
+//!DesignatedInitializer
+//%C
+typedef struct 
+{
+    int x;
+    int y;
+} Coord;
+Coord xy = {.y = 10, .x = 11};
+
+//!CPPConstructorInitializer
+//%CPP
+int i(3);
+
+//!CArrayDesignator
+//%C
+struct ABC
+{
+    int def[10];
+};
+struct ABC instance = {.def[0] = 9};
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterNameTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterNameTestSource.awts
new file mode 100644
index 0000000..11081af
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterNameTestSource.awts
@@ -0,0 +1,32 @@
+//!NameTest
+//%CPP
+int Hallo;
+
+//!QualifiedName
+//%CPP
+int TestClass::Hallo;
+
+//!OperatorName
+//%CPP
+class Foo
+{
+public:
+    char & operator [](unsigned int);
+};
+
+//!ConversionName
+//%CPP
+class Foo
+{
+public:
+    operator int();
+};
+
+//!TemplateID
+//%CPP
+A::B<T> b;
+
+//!NestedTemplates
+//%CPP
+vector<vector<int> > vvi;
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterPreprocessorTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterPreprocessorTestSource.awts
new file mode 100644
index 0000000..db0cc21
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterPreprocessorTestSource.awts
@@ -0,0 +1,94 @@
+//!DefineObjectStyleMacroWithoutExpansion
+//%CPP
+#define LIFE_THE_UNIVERSE_AND_EVERYTHING
+
+//!DefineObjectStyleMacroWithExpansion
+//%CPP
+#define FOO int i = 1;
+
+//!DefineFunctionStyleMacro
+//%CPP
+#define BAR(a, b) a + b
+
+//!IfElfElseEndif
+//%CPP
+#if 1
+int a;
+#elif 0
+int b;
+#else
+int c;
+#endif
+
+
+//!Ifdef
+//%CPP
+#ifdef LIFE_THE_UNIVERS_AND_EVERYTHING
+#endif
+
+
+//!Ifndef
+//%CPP
+#ifndef LIFE_THE_UNIVERS_AND_EVERYTHING
+#define LIFE_THE_UNIVERS_AND_EVERYTHING
+#endif
+
+
+//!Undef
+//%CPP
+#define FOO
+#undef FOO
+
+//!Pragma
+//%CPP
+#pragma GCC poison printf sprintf fprintf
+
+//!Error
+//%CPP
+#error fehler
+
+//!ObjectMacroExpansion
+//%CPP
+#define FOO 3
+int main()
+{
+    int i = FOO;
+    return i;
+}
+
+
+//!DefineFunctionStyleMacro
+//%CPP
+#define BAR(a, b) a + b
+int i = BAR(1, 2);
+
+//!MacroExpansio2ExpansionsBug
+//%CPP
+#define HALLO(a, b) a + b
+int main()
+{
+    int i = HALLO(45, 2) + HALLO(1, 2);
+    return HALLO(i, i);
+}
+
+
+//!MacroExpansio3ExpansionsBug
+//%CPP
+#define HALLO(a, b) a + b
+int main()
+{
+    int i = HALLO(45, 2) + HALLO(1, 2) + HALLO(1, 2);
+    return HALLO(i, i);
+}
+
+
+//!MacroExpansio4ExpansionsBug
+//%CPP
+#define HALLO(a, b) a + b
+int main()
+{
+    int i = HALLO(45, 2) + HALLO(1, 2) + HALLO(1, 2) + HALLO(1, 2);
+    return HALLO(i, i);
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterStatementTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterStatementTestSource.awts
new file mode 100644
index 0000000..0d1dfe1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterStatementTestSource.awts
@@ -0,0 +1,313 @@
+//!BreakStatementTest
+//%CPP
+void foo()
+{
+    while(true){
+        break;
+    }
+}
+
+
+//!CaseDefaultStatementTest
+//%CPP
+void foo()
+{
+    switch (1){
+        case 1:
+            return 1;
+        case 2:
+            return 2;
+        default:
+            return 3;
+    }
+}
+
+
+//!CompoundStatementTest
+//%CPP
+void foo()
+{
+    int i = 2;
+    {
+        int a = i;
+        {
+            a++;
+        }
+    }
+}
+
+
+//!ContinueStatementTest
+//%CPP
+void foo()
+{
+    while(true){
+        continue;
+    }
+}
+
+
+//!DeclarationStatementTest
+//%CPP
+void foo()
+{
+    int i = 2;
+    int a;
+}
+
+
+//!DoStatementTest
+//%CPP
+void foo()
+{
+    do{
+        continue;
+    } while(true);
+}
+
+
+//!ExpressionStatementTest
+//%CPP
+void foo()
+{
+    int i;
+    ++i;
+}
+
+
+//!ForStatementTest
+//%CPP
+void foo()
+{
+    for(int i = 0;i < 1;++i){
+        break;
+    }
+    for(;;){
+        break;
+    }
+    for(;int c = f();){
+        c++;
+    }
+}
+
+
+//!C ForStatement
+//%C
+void foo()
+{
+    int i;
+    for(i = 0;i < 1;++i){
+    }
+}
+
+
+//!Goto&LabelStatementTest
+//%CPP
+int f()
+{
+    badStyle:
+    goto badStyle;
+}
+
+
+//!IfStatementTest
+//%CPP
+int f()
+{
+    int i = 0;
+    if(i < 1){
+        ++i;
+    }else{
+        --i;
+    }
+    if(int c = f()){
+        c++;
+    }
+    return i;
+}
+
+
+//!IfStatementTest
+//%CPP
+int g()
+{
+    if(10 > 5)
+        return 1;
+
+    return 0;
+}
+
+//!C IfStatementTest
+//%C
+int g()
+{
+    if(10 > 5)
+        return 1;
+
+    return 0;
+}
+
+//!NullStatementTest
+//%CPP
+void f()
+{
+    ;
+}
+
+
+//!ReturnStatementTest
+//%CPP
+int f()
+{
+    return 1;
+}
+
+
+//!SwitchStatementTest
+//%CPP
+void foo()
+{
+    switch (1){
+        case 1:
+            return 1;
+        case 2:
+            return 2;
+        default:
+            return 3;
+    }
+}
+
+int foo()
+{
+    switch (int i = f()){
+        case 1:
+            ++i;
+            return 1;
+        case 2:
+            return 2;
+        default:
+            return 3;
+    }
+}
+
+
+//!SwitchStatementTest
+//%C
+void foo()
+{
+    switch (1){
+        case 1:
+            return 1;
+        case 2:
+            return 2;
+        default:
+            return 3;
+    }
+}
+
+
+//!GNUSwitchStatementTest
+//%CPP
+int foo(int a)
+{
+    switch (a){
+        case 1:
+            return 1;
+        case 2 ... 4:
+            return 0;
+        default:
+            return -1;
+    }
+}
+
+
+//!GNUSwitchStatementTest
+//%C
+int foo(int a)
+{
+    switch (a){
+        case 1:
+            return 1;
+        case 2 ... 4:
+            return 0;
+        default:
+            return -1;
+    }
+}
+
+
+//!WhileStatementTest
+//%CPP
+void foo()
+{
+    while(true){
+        break;
+    }
+}
+
+void fa()
+{
+    while(int i = f()){
+        ++i;
+        break;
+    }
+}
+
+void fb()
+{
+    while(true);
+
+}
+
+//!C WhileStatementTest
+//%C
+void foo()
+{
+    while(true){
+        break;
+    }
+}
+
+
+//!TryBlockStatement
+//%CPP
+int foo()
+{
+    try {
+        int i = 1;
+        try {
+            ++i;
+            return i;
+        }
+        catch(...){
+        }
+    }
+    catch(...){
+    }
+}
+
+
+//!MixedStatement
+//%CPP
+#define ZWO 2
+int foo()
+{
+    int i = 1;
+    if( i == ZWO)
+    {
+    }
+}
+//=
+int foo()
+{
+    int i = 1;
+    if( i == ZWO)
+    {
+    }
+}
+
+
+//!ArrayDeclarationStatementTest
+//%CPP
+string *newElements = new string[m_capacity];
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterTemplateTestSource.awts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterTemplateTestSource.awts
new file mode 100644
index 0000000..c11a70f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/ASTWriterTemplateTestSource.awts
@@ -0,0 +1,12 @@
+//![temp.names] examples abschnitt 4/1
+//%CPP
+T *p1 = p->template alloc<100>();
+
+//![temp.names] examples abschnitt 4/2, didn't work cause of Bug# 164482
+//%CPP
+template<class T> void f(T *p)
+{
+    T::template adjust<100>();
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/CommentHandlingTestSource.rts b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/CommentHandlingTestSource.rts
new file mode 100644
index 0000000..07dac17
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/rewrite/CommentHandlingTestSource.rts
@@ -0,0 +1,3145 @@
+//!CommentHandlingTest 1 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@test.h
+class test
+{
+public:
+    test();
+    /*
+     * Hallo
+     */
+    void lala();
+    //test
+    virtual ~test();
+protected:
+    class test2
+    {
+    public:
+        test2();
+    }; //Komment 1
+    //Komment 2
+    //Komment 3
+};
+
+//=
+=>leading
+void lala(); = /*
+     * Hallo
+     */
+virtual ~test(); = //test
+
+=>trailing
+class test2
+    {
+    public:
+        test2();
+    }; = //Komment 1
+
+=>freestanding
+test = //Komment 2 , //Komment 3
+
+//!CommentHandlingTest 2 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@test.h
+class test
+{
+public:
+    virtual ~test();
+    test();
+    void lala();
+protected:
+    class test2
+    {
+    public:
+        test2();
+    };
+};
+//LALA
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+class test
+{
+public:
+    virtual ~test();
+    test();
+    void lala();
+protected:
+    class test2
+    {
+    public:
+        test2();
+    };
+}; = //LALA
+
+//!CommentHandlingTest 3 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@test.h
+//Anfang
+class test
+{
+public:
+    test();
+    void lala();
+    virtual ~test();
+protected:
+    class test2
+    {
+    public:
+        test2();
+    };
+};
+
+//=
+=>leading
+class test
+{
+public:
+    test();
+    void lala();
+    virtual ~test();
+protected:
+    class test2
+    {
+    public:
+        test2();
+    };
+}; = //Anfang
+
+=>trailing
+
+=>freestanding
+
+//!CommentHandlingTest 4 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@test.h
+class test
+{
+    //Klasse...
+public:
+    test();
+    void lala();
+    virtual ~test();
+protected:
+    class test2
+    {
+    public:
+        test2();
+    };
+};
+
+//=
+=>leading
+public: = //Klasse...
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition00
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse0.h
+class Klasse0
+{
+public:
+    Klasse0();   //Comment
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+
+=>trailing
+Klasse0(); = //Comment
+
+=>freestanding
+
+//!CommentRecognition0
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse0.h
+//Comment1
+class Klasse0
+{
+    //Comment2
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+class Klasse0
+{
+    //Comment2
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+}; = //Comment1
+public: = //Comment2
+
+=>trailing
+
+=>freestanding
+
+//!DeclarationWithTraillingDoubleComments
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse0.h
+int foo = bar; //Comment
+ //Zweiteilig
+
+//=
+=>leading
+
+=>trailing
+int foo = bar; = //Comment
+
+=>freestanding
+int foo = bar; = //Zweiteilig
+
+//!DeclarationWithLeadingDoubleComments
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse0.h
+//Comment
+//Zweiteilig
+int foo;
+
+//=
+=>leading
+int foo; = //Comment , //Zweiteilig
+
+=>trailing
+
+=>freestanding
+
+//!DeclarationWithTraillingAndLeadingComments
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse0.h
+//Comment1
+int foo = bar; //Comment2
+
+//=
+=>leading
+int foo = bar; = //Comment1
+
+=>trailing
+int foo = bar; = //Comment2
+
+=>freestanding
+
+//!DeclarationWithTraillingComments
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse0.h
+int foo = bar; //Comment
+
+//=
+=>leading
+
+=>trailing
+int foo = bar; = //Comment
+
+=>freestanding
+
+//!DeclarationWithTraillingComments
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse0.h
+int foo; //Comment
+
+//=
+=>leading
+
+=>trailing
+int foo; = //Comment
+
+=>freestanding
+
+//!Method with Trailercomment
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse0.h
+int foo ()
+{
+    return 42;
+    //return the Answer
+}
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+{
+    return 42;
+    //return the Answer
+} = //return the Answer
+
+//!Method with Trailercomment2
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse0.h
+int foo()
+{
+    return 42; //return the Answer
+}
+
+//=
+=>leading
+
+=>trailing
+return 42; = //return the Answer
+
+=>freestanding
+
+//!Method with Trailercomment3
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse0.h
+int foo()
+{
+    //return the Answer
+    return 42;
+}
+
+//=
+=>leading
+return 42; = //return the Answer
+
+=>trailing
+
+=>freestanding
+
+//!ClassCommentTest
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse0.h
+class comment
+{
+    //hallo
+};
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+comment = //hallo
+
+//!CommentRecognition1 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+    //TEST
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+public: = //TEST
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition2 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public: //TEST
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+
+=>trailing
+public: = //TEST
+
+=>freestanding
+
+//!CommentRecognition3 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    //TEST
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+Klasse1(); = //TEST
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition4 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition5 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{   //TEST
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+public: = //TEST
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition6 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1{    //TEST
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+public: = //TEST
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition7 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{//TEST
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+public: = //TEST
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition8 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+    int i = 5; //lala
+};
+
+//=
+=>leading
+
+=>trailing
+int i = 5; = //lala
+
+=>freestanding
+
+//!CommentRecognition9 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+    /*TEST*/
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+public: = /*TEST*/
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition10 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1{    /*TEST*/
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+public: = /*TEST*/
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition11 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public: /*TEST*/
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+
+=>trailing
+public: = /*TEST*/
+
+=>freestanding
+
+//!CommentRecognition11b - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public: /*TEST*/ Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+
+=>trailing
+public: = /*TEST*/
+
+=>freestanding
+
+//!CommentRecognition12 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+    int i = 5; /*TEST*/
+};
+
+//=
+=>leading
+
+=>trailing
+int i = 5; = /*TEST*/
+
+=>freestanding
+
+//!CommentRecognition13 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+    /*
+     * TEST
+     */
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+public: = /*
+     * TEST
+     */
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition14 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+    int i = 5; /*
+                * TEST
+                */
+};
+
+//=
+=>leading
+
+=>trailing
+int i = 5; = /*
+                * TEST
+                */
+
+=>freestanding
+
+//!CommentRecognition15 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public: /*
+         * TEST
+         */
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+
+=>trailing
+public: = /*
+         * TEST
+         */
+
+=>freestanding
+
+//!CommentRecognition16 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1{  //Test mit
+                //2 Zeilen
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+public: = //Test mit , //2 Zeilen
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition17 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+    int i = 5; //Test mit
+    //2 Zeilen
+};
+
+//=
+=>leading
+
+=>trailing
+int i = 5; = //Test mit
+
+=>freestanding
+Klasse1 = //2 Zeilen
+
+//!CommentRecognition18 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1{
+    //Test mit
+    //2 Zeilen
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+public: = //Test mit , //2 Zeilen
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition19 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+    //Test mit
+    //2 Zeilen
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+public: = //Test mit , //2 Zeilen
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition20 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition21 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0; //TEST
+        i++;
+    }
+
+    int i;
+};
+
+//=
+=>leading
+
+=>trailing
+int i = 0; = //TEST
+
+=>freestanding
+
+//!CommentRecognition22 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    } //TEST
+
+private:
+    int i;
+};
+
+//=
+=>leading
+
+=>trailing
+{
+        int i = 0;
+        i++;
+    } = //TEST
+
+=>freestanding
+
+//!CommentRecognition23 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    //KommentarDavor
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    } //TEST
+
+private:
+    int i;
+};
+
+//=
+=>leading
+void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    } = //KommentarDavor
+
+=>trailing
+{
+        int i = 0;
+        i++;
+    } = //TEST
+
+=>freestanding
+
+//!CommentRecognition24 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; //SCHLUSS
+
+//=
+=>leading
+
+=>trailing
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; = //SCHLUSS
+
+=>freestanding
+
+//!CommentRecognition25 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; //SCHLUSS
+ //2. teil
+
+//=
+=>leading
+
+=>trailing
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; = //SCHLUSS
+
+=>freestanding
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; = //2. teil
+
+//!CommentRecognition26 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+    //SCHLUSS
+    //2. teil
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; = //SCHLUSS , //2. teil
+
+//!CommentRecognition27 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; /*SCHLUSS*/
+
+//=
+=>leading
+
+=>trailing
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; = /*SCHLUSS*/
+
+=>freestanding
+
+//!CommentRecognition28 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};    
+/*SCHLUSS*/
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; = /*SCHLUSS*/
+
+//!CommentRecognition29 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; /*
+    * SCHLUSS
+    */
+
+//=
+=>leading
+
+=>trailing
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; = /*
+    * SCHLUSS
+    */
+
+=>freestanding
+
+//!CommentRecognition30 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    //TEST
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//=
+=>leading
+void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    } = //TEST
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition31 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    /*TEST*/
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//=
+=>leading
+void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    } = /*TEST*/
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition32 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+//Vorher
+class Klasse1 //Nachher
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//=
+=>leading
+class Klasse1 //Nachher
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; = //Vorher
+
+=>trailing
+Klasse1 = //Nachher
+
+=>freestanding
+
+//!CommentRecognition33 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+//Vorher
+class Klasse1 /*Nachher*/
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//=
+=>leading
+class Klasse1 /*Nachher*/
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; = //Vorher
+
+=>trailing
+Klasse1 = /*Nachher*/
+
+=>freestanding
+
+//!CommentRecognition34 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+/*Vorher*/
+class Klasse1
+{
+    /*Nachher*/
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//=
+=>leading
+class Klasse1
+{
+    /*Nachher*/
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; = /*Vorher*/
+public: = /*Nachher*/
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition35 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+/*Vorher*/
+class Klasse1
+{
+    //Nachher
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//=
+=>leading
+class Klasse1
+{
+    //Nachher
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; = /*Vorher*/
+public: = //Nachher
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition36 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+/*
+ * Vorher
+ */
+class Klasse1
+{
+    //Nachher
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+};
+
+//=
+=>leading
+class Klasse1
+{
+    //Nachher
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+}; = /*
+ * Vorher
+ */
+public: = //Nachher
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition37 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i; //Test
+};
+
+//=
+=>leading
+
+=>trailing
+int i; = //Test
+
+=>freestanding
+
+//!CommentRecognition38 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i; /*Test*/
+};
+
+//=
+=>leading
+
+=>trailing
+int i; = /*Test*/
+
+=>freestanding
+
+//!CommentRecognition39 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i; /*
+            * Test
+            */
+};
+
+//=
+=>leading
+
+=>trailing
+int i; = /*
+            * Test
+            */
+
+=>freestanding
+
+//!CommentRecognition40 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    int i;
+    /*
+     * Test
+     */
+};
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+Klasse1 = /*
+     * Test
+     */
+
+//!CommentRecognition41 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    //TEST
+    int i;
+};
+
+//=
+=>leading
+int i; = //TEST
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition42 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+    void inlineMethode()
+    {
+        int i = 0;
+        i++;
+    }
+
+private:
+    /*TEST*/
+    int i;
+};
+
+//=
+=>leading
+int i; = /*TEST*/
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition43 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+private:
+    int i;
+};
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition44 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+private:
+    int i;
+    //TEST
+};
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+Klasse1 = //TEST
+
+//!CommentRecognition44b - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+private:
+    int i; //TEST
+};
+
+//=
+=>leading
+
+=>trailing
+int i; = //TEST
+
+=>freestanding
+
+//!CommentRecognition44c - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+private:
+    int i;
+    //TEST
+}; //Add
+
+//=
+=>leading
+
+=>trailing
+class Klasse1
+{
+private:
+    int i;
+    //TEST
+}; = //Add
+
+=>freestanding
+Klasse1 = //TEST
+
+//!CommentRecognition45 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+private:
+    //TEST
+    int i;
+};
+
+//=
+=>leading
+int i; = //TEST
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition46 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+    //TEST
+private:
+    int i;
+};
+
+//=
+=>leading
+private: = //TEST
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition47 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private: //TEST
+    int i;
+};
+
+//=
+=>leading
+
+=>trailing
+private: = //TEST
+
+=>freestanding
+
+//!CommentRecognition48 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+    //TEST
+public: /*TEST*/
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+public: = //TEST
+
+=>trailing
+public: = /*TEST*/
+
+=>freestanding
+
+//!CommentRecognition48b - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+    //TEST
+public: /*TEST*/
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+public: = //TEST
+
+=>trailing
+public: = /*TEST*/
+
+=>freestanding
+
+//!CommentRecognition49 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1(); //TEST1
+    //TEST2
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+std::string toString(); = //TEST2
+
+=>trailing
+Klasse1(); = //TEST1
+
+=>freestanding
+
+//!CommentRecognition50 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1(); /*TEST1*/
+    /*TEST2*/
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+std::string toString(); = /*TEST2*/
+
+=>trailing
+Klasse1(); = /*TEST1*/
+
+=>freestanding
+
+//!CommentRecognition51 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1(); //TEST1
+    /*TEST2*/
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+std::string toString(); = /*TEST2*/
+
+=>trailing
+Klasse1(); = //TEST1
+
+=>freestanding
+
+//!CommentRecognition52 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1(); /*TEST1*/
+    //TEST2
+    std::string toString();
+private:
+    int i;
+};
+//=
+=>leading
+std::string toString(); = //TEST2
+
+=>trailing
+Klasse1(); = /*TEST1*/
+
+=>freestanding
+
+//!CommentRecognition53 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1(); /*TEST1*/
+    //TEST3
+    //TEST2
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+std::string toString(); = //TEST3 , //TEST2
+
+=>trailing
+Klasse1(); = /*TEST1*/
+
+=>freestanding
+
+//!CommentRecognition54 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1(); /*TEST1*/
+    /*TEST3*/
+    //TEST2
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+std::string toString(); = /*TEST3*/ , //TEST2
+
+=>trailing
+Klasse1(); = /*TEST1*/
+
+=>freestanding
+
+//!CommentRecognition55 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1(); //TEST1
+    /*
+     * TEST3
+     */
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+std::string toString(); = /*
+     * TEST3
+     */
+
+=>trailing
+Klasse1(); = //TEST1
+
+=>freestanding
+
+//!CommentRecognition56 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+class Klasse1
+{
+public:
+    Klasse1(); /*
+                * TEST1
+                */
+    //TEST2
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+std::string toString(); = //TEST2
+
+=>trailing
+Klasse1(); = /*
+                * TEST1
+                */
+
+=>freestanding
+
+//!CommentRecognition57 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition58 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+//Kommentar
+namespace testNamespace
+{
+
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+}
+
+//=
+=>leading
+namespace testNamespace
+{
+
+class Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+} = //Kommentar
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition59 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+namespace testNamespace //Kommentar
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//=
+=>leading
+
+=>trailing
+testNamespace = //Kommentar
+
+=>freestanding
+
+//!CommentRecognition60 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+/*Kommentar*/
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//=
+=>leading
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+} = /*Kommentar*/
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition61 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+namespace testNamespace /*Kommentar*/
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//=
+=>leading
+
+=>trailing
+testNamespace = /*Kommentar*/
+
+=>freestanding
+
+//!CommentRecognition62 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+/*
+ * Kommentar
+ */
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//=
+=>leading
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+} = /*
+ * Kommentar
+ */
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition63 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+namespace testNamespace /*
+                         * Kommentar
+                         */
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//=
+=>leading
+
+=>trailing
+testNamespace = /*
+                         * Kommentar
+                         */
+
+=>freestanding
+
+//!CommentRecognition64 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+} //Kommentar
+
+//=
+=>leading
+
+=>trailing
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+} = //Kommentar
+
+=>freestanding
+
+//!CommentRecognition65 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+} /*Kommentar*/
+
+//=
+=>leading
+
+=>trailing
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+} = /*Kommentar*/
+
+=>freestanding
+
+//!CommentRecognition66 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+} /*
+   * Kommentar
+   */
+
+//=
+=>leading
+
+=>trailing
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+} = /*
+   * Kommentar
+   */
+
+=>freestanding
+
+//!CommentRecognition67 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+namespace testNamespace
+{
+    class Klasse1 //TEST
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+}
+
+//=
+=>leading
+
+=>trailing
+Klasse1 = //TEST
+
+=>freestanding
+
+//!CommentRecognition68 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i; //TEST
+    };
+}
+
+//=
+=>leading
+
+=>trailing
+int i; = //TEST
+
+=>freestanding
+
+//!CommentRecognition69 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    }; //TEST
+}
+
+//=
+=>leading
+
+=>trailing
+class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    }; = //TEST
+
+=>freestanding
+
+//!CommentRecognition70 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+    //TEST
+}
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+namespace testNamespace
+{
+    class Klasse1
+    {
+    public:
+        Klasse1();
+        std::string toString();
+    private:
+        int i;
+    };
+    //TEST
+} = //TEST
+
+//!CommentRecognition100
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+struct Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition101
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+//Kommentar
+struct Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+struct Klasse1
+{
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+}; = //Kommentar
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition102
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+struct Klasse1
+{
+    //Kommentar
+public:
+    Klasse1();
+    std::string toString();
+private:
+    int i;
+};
+
+//=
+=>leading
+public: = //Kommentar
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition103
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+struct Klasse1
+{
+    //Kommentar
+private:
+    Klasse1();
+    std::string toString();
+protected:
+    int i;
+};
+
+//=
+=>leading
+private: = //Kommentar
+
+=>trailing
+
+=>freestanding
+
+//!CommentRecognition104
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+/*Davor*/
+struct Klasse1 //Kommentar
+{
+private:
+    Klasse1();
+    std::string toString();
+protected:
+    int i;
+};
+
+//=
+=>leading
+struct Klasse1 //Kommentar
+{
+private:
+    Klasse1();
+    std::string toString();
+protected:
+    int i;
+}; = /*Davor*/
+
+=>trailing
+Klasse1 = //Kommentar
+
+=>freestanding
+
+//!CommentRecognition200 - von ASTWriter
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+//comment a
+void tree(int a)
+{
+    //comment b
+    a = 1; //comment c
+} //comment d
+
+//=
+=>leading
+void tree(int a)
+{
+    //comment b
+    a = 1; //comment c
+} = //comment a
+a = 1; = //comment b
+
+=>trailing
+{
+    //comment b
+    a = 1; //comment c
+} = //comment d
+a = 1; = //comment c
+
+=>freestanding
+
+//!CommentRecognition201 - von ASTWriter
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+void tree(int a)
+{
+    a = 1;
+} //comment d
+
+//=
+=>leading
+
+=>trailing
+{
+    a = 1;
+} = //comment d
+
+=>freestanding
+
+//!CommentRecognition202 - von ASTWriter DeclarationStatement
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+void foo()
+{
+    //TEST 1
+    int i = 2; //TEST 2
+    //TEST 3
+    int a; //TEST 4
+    //TEST 5
+}
+
+//=
+=>leading
+int i = 2; = //TEST 1
+int a; = //TEST 3
+
+=>trailing
+int i = 2; = //TEST 2
+int a; = //TEST 4
+
+=>freestanding
+{
+    //TEST 1
+    int i = 2; //TEST 2
+    //TEST 3
+    int a; //TEST 4
+    //TEST 5
+} = //TEST 5
+
+//!CommentRecognition203 - von ASTWriter ForStatement
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+void foo()
+{
+    //TEST 1
+    for(int i = 0;i < 1;++i){
+        //TEST 2
+        break; //TEST 3
+    } //TEST 4
+}
+
+//=
+=>leading
+for(int i = 0;i < 1;++i){
+        //TEST 2
+        break; //TEST 3
+    } = //TEST 1
+break; = //TEST 2
+
+=>trailing
+{
+        //TEST 2
+        break; //TEST 3
+    } = //TEST 4
+break; = //TEST 3
+
+=>freestanding
+
+//!CommentRecognition204 - von ASTWriter LabelStatement
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+void foo()
+{
+    start:
+    bar(); //Test
+    goto start;
+}
+
+
+//=
+=>leading
+
+=>trailing
+bar(); = //Test
+
+=>freestanding
+
+//!CommentRecognition205 - von ASTWriter IfStatement
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+int f()
+{
+    if(int c = f()){
+        c++;
+    } //TEST 1
+    return i;
+}
+
+//=
+=>leading
+
+=>trailing
+{
+        c++;
+    } = //TEST 1
+
+=>freestanding
+
+//!CommentRecognition206 - von ASTWriter SwitchStatement
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+void foo()
+{
+    //TEST 1
+    switch (1){
+        //TEST 2
+        case 1: //TEST 3
+            return 1; //TEST 4
+        case 2:
+            return 2;
+        default: //TEST 5
+            return 3;
+            //TEST 6
+    } //TEST 7
+}
+//=
+=>leading
+switch (1){
+        //TEST 2
+        case 1: //TEST 3
+            return 1; //TEST 4
+        case 2:
+            return 2;
+        default: //TEST 5
+            return 3;
+            //TEST 6
+    } = //TEST 1
+case 1: = //TEST 2
+
+=>trailing
+{
+        //TEST 2
+        case 1: //TEST 3
+            return 1; //TEST 4
+        case 2:
+            return 2;
+        default: //TEST 5
+            return 3;
+            //TEST 6
+    } = //TEST 7
+case 1: = //TEST 3
+return 1; = //TEST 4
+default: = //TEST 5
+
+=>freestanding
+{
+        //TEST 2
+        case 1: //TEST 3
+            return 1; //TEST 4
+        case 2:
+            return 2;
+        default: //TEST 5
+            return 3;
+            //TEST 6
+    } = //TEST 6
+
+//!CommentRecognition207 - von ASTWriter WhileStatement
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+void foo()
+{
+    while(true){
+        break;
+    } /*TEST 6*/
+}
+
+//=
+=>leading
+
+=>trailing
+{
+        break;
+    } = /*TEST 6*/
+
+=>freestanding
+
+//!CommentRecognition208 - von ASTWriter ExplicitTemplateInstantiationStatement
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+//TEST 1
+template class vector<int>; //TEST 2
+
+//=
+=>leading
+template class vector<int>; = //TEST 1
+
+=>trailing
+class vector<int>; = //TEST 2
+
+=>freestanding
+
+//!CommentRecognition209 - von ASTWriter GPPExplicitTemplateInstantitation
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+//TEST 1
+static template class vector<int>; //TEST 2
+//TEST 3
+inline template class vector<int>; //TEST 4
+//TEST 5
+inline template class vector<int>; //TEST 6
+
+//=
+=>leading
+static template class vector<int>; = //TEST 1
+inline template class vector<int>; = //TEST 3
+inline template class vector<int>; = //TEST 5
+
+=>trailing
+class vector<int>; = //TEST 2
+class vector<int>; = //TEST 4
+class vector<int>; = //TEST 6
+
+=>freestanding
+
+//!CommentRecognition210 - von ASTWriter LinkageSpecification
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+//TEST 1
+extern "C" typedef void FUNC(); //TEST 2
+
+//=
+=>leading
+extern "C" typedef void FUNC(); = //TEST 1
+
+=>trailing
+typedef void FUNC(); = //TEST 2
+
+=>freestanding
+
+//!CommentRecognition212 - von ASTWriter TemplateFunction
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+template<typename T> int tempFunct(T p)
+{
+    ++p;
+    p + 4;
+    return 0;
+} //Kommentar
+
+//=
+=>leading
+
+=>trailing
+{
+    ++p;
+    p + 4;
+    return 0;
+} = //Kommentar
+
+=>freestanding
+
+//!CommentRecognition213 - von ASTWriter DeclarationWithTraillingDoubleComments
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+int foo = bar; //Comment
+ //Zweiteilig
+//=
+=>leading
+
+=>trailing
+int foo = bar; = //Comment
+
+=>freestanding
+int foo = bar; = //Zweiteilig
+
+//!CommentRecognition214 - von ASTWriter NamesapceDefinition
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+//TEST 1
+namespace ziemlichlangernamespace
+{
+    //TEST 2
+} //TEST 3
+
+//=
+=>leading
+namespace ziemlichlangernamespace
+{
+    //TEST 2
+} = //TEST 1
+
+=>trailing
+namespace ziemlichlangernamespace
+{
+    //TEST 2
+} = //TEST 3
+
+=>freestanding
+namespace ziemlichlangernamespace
+{
+    //TEST 2
+} = //TEST 2
+
+
+//!CommentRecognition215 - von ASTWriter NamesapceDefinition
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+namespace ziemlichlangernamespace
+{
+    //TEST
+}
+
+void doIt(){
+	int i = 0;
+}
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+namespace ziemlichlangernamespace
+{
+    //TEST
+} = //TEST
+
+//!CommentRecognition216 - von ASTWriter NamesapceDefinition
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+namespace ziemlichlangernamespace
+{
+    int i = 0;
+    //TEST
+}
+
+void doIt(){
+	int i = 0;
+}
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+namespace ziemlichlangernamespace
+{
+    int i = 0;
+    //TEST
+} = //TEST
+
+//!ImplementationFileCommentRecognition1 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+void Demo::methode1()
+{
+}
+
+void Demo::methode2()
+{
+}
+
+void Demo::methode3()
+{
+}
+
+//=
+=>leading
+
+=>trailing
+
+=>freestanding
+
+//!ImplementationFileCommentRecognition2 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+//Zuvorderst
+
+
+void Demo::methode1()
+{
+    //Test
+}
+
+void Demo::methode2()
+{
+}
+//Davor
+
+void Demo::methode3()
+{
+} //Danach
+
+//Am Schluss
+//=
+=>leading
+void Demo::methode1()
+{
+    //Test
+} = //Zuvorderst
+void Demo::methode3()
+{
+} = //Davor
+
+=>trailing
+{
+} = //Danach
+
+=>freestanding
+{
+    //Test
+} = //Test
+void Demo::methode3()
+{
+} = //Am Schluss
+
+//!ImplementationFileCommentRecognition3 - von CERP
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@Klasse1.h
+/*Zuvorderst*/
+void Demo::methode1()
+{
+    /*Test*/
+}
+
+void Demo::methode2()
+{
+}
+
+/*Davor*/
+void Demo::methode3()
+{
+} /*Danach*/
+
+
+/*Am Schluss*/
+
+//=
+=>leading
+void Demo::methode1()
+{
+    /*Test*/
+} = /*Zuvorderst*/
+void Demo::methode3()
+{
+} = /*Davor*/
+
+=>trailing
+{
+} = /*Danach*/
+
+=>freestanding
+{
+    /*Test*/
+} = /*Test*/
+void Demo::methode3()
+{
+} = /*Am Schluss*/
+
+//!CommentRecognitionAtTheBeginningBeforePreprocessorStatement 1
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@test.h
+//TEST
+#ifndef TEST_H_
+#define TEST_H_
+
+class test
+{
+};
+
+#endif
+
+//=
+=>leading
+=>trailing
+=>freestanding
+
+//!CommentRecognitionAtTheBeginningBeforePreprocessorStatement 2
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@test.h
+/*
+ * Licence information...
+ */
+
+#ifndef TEST_H_
+#define TEST_H_
+
+class test
+{
+};
+
+#endif
+
+//=
+=>leading
+=>trailing
+=>freestanding
+
+//!CommentRecognitionAtTheBeginningBeforePreprocessorStatement 3
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@test.h
+/*
+ * Licence information...
+ */
+
+#ifndef TEST_H_
+#define TEST_H_
+
+//test
+class test
+{
+};
+
+#endif
+
+//=
+=>leading
+class test
+{
+}; = //test
+=>trailing
+=>freestanding
+
+//!CommentRecognitionAtTheBeginningBeforePreprocessorStatement 4
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@test.h
+/*
+ * HideMethod.h
+ */
+
+#ifndef HIDEMETHOD_H_
+#define HIDEMETHOD_H_
+
+
+class HideMethod {
+public:
+    HideMethod();
+    virtual ~HideMethod();
+    void methode2();
+    void methode3();
+
+private:
+	int i;
+	bool isOk;
+};
+
+#endif /* HIDEMETHOD_H_ */
+
+//=
+=>leading
+=>trailing
+=>freestanding
+
+//!CommentRecognition Bug 233438
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@test.h
+#ifndef HIDEMETHOD_H_
+#define HIDEMETHOD_H_
+
+class HideMethod {
+public:
+    HideMethod();
+    virtual ~HideMethod();
+    int methode2();
+private:
+	int i;
+};
+
+#endif /* HIDEMETHOD_H_ */
+
+//=
+=>leading
+=>trailing
+=>freestanding
+
+//@test.cpp
+#include "test.h"
+
+HideMethod::HideMethod()
+{
+}
+
+HideMethod::~HideMethod()
+{
+}
+
+int HideMethod::methode2(){
+	i++;
+	//comment
+	return i;
+}
+
+//=
+=>leading
+return i; = //comment
+=>trailing
+=>freestanding
+
+//!CommentRecognition Bug 234786
+//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
+//@test.h
+#ifndef HIDEMETHOD_H_
+#define HIDEMETHOD_H_
+
+class HideMethod {
+public:
+    HideMethod();
+    virtual ~HideMethod();
+    int methode2();
+private:
+	int i;
+};
+
+#endif /* HIDEMETHOD_H_ */
+
+//=
+=>leading
+=>trailing
+=>freestanding
+
+//@test.cpp
+#include "test.h"
+
+HideMethod::HideMethod()
+{
+}
+
+HideMethod::~HideMethod()
+{
+}
+
+int HideMethod::methode2(){
+	i++;     //comment
+	return i;
+}
+
+//=
+=>leading
+=>trailing
+i++; = //comment
+=>freestanding
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/search/classDecl.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/search/classDecl.cpp
new file mode 100644
index 0000000..f2fa14f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/search/classDecl.cpp
@@ -0,0 +1,102 @@
+#include "include.h"
+
+#define FOO bar
+
+class Heal{};
+
+class A {
+	A() {}
+	~A(){}
+	class B {
+		void f( A );
+		void f( A & );
+		void f( A* );
+		void f( int &, const char [], A ** );
+	};
+};
+
+namespace NS {
+	namespace NS2{
+		struct a{};
+	}
+	class B: public A {
+	public:
+		struct AA {};
+		enum e {
+			One,
+			Two,
+			Three
+		};
+		
+		void f(){
+			using namespace NS2;
+			a aStruct;
+		}
+		
+		
+
+		AA anotherStruct;
+	};
+	union u{ } ;
+}
+
+namespace NS3{
+	class C : public NS::B {
+		e eE = One;
+	};
+}
+
+A::B b1;
+
+typedef NS::B NS_B;
+NS_B b2;
+
+union u{
+};
+
+class AClassForFoo {};
+
+AClassForFoo foo( AClassForFoo ){
+	AClassForFoo b;
+	return b;
+}
+
+Head * Head::operator *= ( int index ){
+	return array[ index ];
+}
+
+Head * Head::operator += ( int index ){
+	return array[ index ];
+}
+
+extern int externalInt;
+extern int externalIntWithInitializer = 2;
+extern "C" int externCInt;
+extern "C" int externCIntWithInitializer = 3;
+
+void forwardFunction() { }
+void normalFunction()  { }
+
+void DeclsAndDefns::forwardMethod(){ }
+
+int DeclsAndDefns::staticField = 5;
+
+
+namespace bug68235{
+	struct xTag {	
+		int x;
+	};
+	typedef xTag xType;
+	
+	typedef struct yTag {
+		int x;
+	} yType;			
+			
+	class C1{
+	public:
+		xType x;		
+		yType y;		
+		C1();
+		~C1();
+	};
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/search/include.h b/results/plugins/org.eclipse.cdt.core.tests/resources/search/include.h
new file mode 100644
index 0000000..f9c3d75
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/search/include.h
@@ -0,0 +1,36 @@
+#ifndef INCLUDE_H
+#define INCLUDE_H
+
+class Head {
+	Head ** array;
+
+	Head * operator *= ( int index );
+	Head * operator *  ( int index ){ return array[ index ]; }
+	Head * operator += ( int index );
+	
+	operator const short & ();
+	operator short         ();
+	operator short int     ();	
+
+};
+
+class DeclsAndDefns{
+	static int staticField;
+	int nonStaticField;
+	
+	void forwardMethod();
+	void inlineMethod() {}
+};
+
+void forwardFunction();
+
+
+class Direction{
+   void turn();
+   void turn(int);
+   void turnAgain(void);
+};
+class Right : public Direction  {
+   void turn() { }
+};
+#endif
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/AddFile.xml b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/AddFile.xml
new file mode 100644
index 0000000..eab25ef
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/AddFile.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="Add File test" description="Testing Template Engines AddFile Process"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.core.AddFile">
+		<simple name="projectName" value="$(projectName)"/>
+        <complex name="file">
+				<simple name="source" value="Basename.cpp"/>
+				<simple name="target" value="$(baseName).cpp"/>
+				<simple name="replaceable" value="true"/>
+        </complex>
+	</process>
+
+	<process type="org.eclipse.cdt.core.AddFile">
+		<simple name="projectName" value="$(projectName)"/>
+        <complex name="file">
+				<simple name="source" value="Basename.h"/>
+				<simple name="target" value="$(baseName).h"/>
+				<simple name="replaceable" value="true"/>
+        </complex>
+	</process>
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/AddFiles.xml b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/AddFiles.xml
new file mode 100644
index 0000000..977c27b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/AddFiles.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="Add Files test" description="Testing Template Engines AddFiles Process"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.core.AddFiles">
+		<simple name="projectName" value="$(projectName)"/>
+		<complex-array name="files">
+			<element>
+				<simple name="source" value="Basename.h"/>
+				<simple name="target" value="$(baseName).h"/>
+				<simple name="replaceable" value="true"/>
+			</element>
+			<element>
+				<simple name="source" value="Basename.cpp"/>
+				<simple name="target" value="$(baseName).cpp"/>
+				<simple name="replaceable" value="true"/>
+			</element>
+		</complex-array>
+	</process>
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/AddLink.xml b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/AddLink.xml
new file mode 100644
index 0000000..5612a96
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/AddLink.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="Add File test" description="Testing Template Engines AddFile Process"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.core.AddFile">
+		<simple name="projectName" value="$(projectName)"/>
+        <complex name="file">
+				<simple name="source" value="Basename.cpp"/>
+				<simple name="target" value="$(baseName).cpp"/>
+				<simple name="replaceable" value="true"/>
+        </complex>
+	</process>
+
+	<process type="org.eclipse.cdt.core.AddLink">
+		<simple name="projectName" value="$(projectName)"/>
+        <simple name="filePath" value="$(baseName).cpp"/>
+        <simple name="targetPath" value="$(baseName)Link.cpp"/>
+	</process>
+
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/Append.xml b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/Append.xml
new file mode 100644
index 0000000..4bdb482
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/Append.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="Append test" description="Testing Template Engines Append Process"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.core.Copy">
+        <complex-array name="files">
+        	<element>
+				<simple name="source" value="Basename.cpp"/>
+				<simple name="target" value="$(targetSourceName)"/>
+				<simple name="replaceable" value="true"/>
+        	</element>
+        	<element>
+				<simple name="source" value="Basename.h"/>
+				<simple name="target" value="$(targetHeaderName)"/>
+				<simple name="replaceable" value="true"/>
+        	</element>
+        </complex-array>
+	</process>
+
+	<process type="org.eclipse.cdt.core.Append">
+        <complex-array name="files">
+        	<element>
+				<simple name="source" value="Basename.cpp"/>
+				<simple name="target" value="$(targetSourceName)"/>
+				<simple name="replaceable" value="true"/>
+        	</element>
+        	<element>
+				<simple name="source" value="Basename.h"/>
+				<simple name="target" value="$(targetHeaderName)"/>
+				<simple name="replaceable" value="true"/>
+        	</element>
+        </complex-array>
+	</process>
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/AppendCreate.xml b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/AppendCreate.xml
new file mode 100644
index 0000000..6f2bbb7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/AppendCreate.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="AppendCreate test" description="Testing Template Engines AppendCreate Process"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.core.AppendCreate">
+        <simple name="projectName" value="$(projectName)"/>
+        <complex-array name="files">
+        	<element>
+				<simple name="source" value="Basename.cpp"/>
+				<simple name="target" value="$(targetSourceName)"/>
+				<simple name="replaceable" value="true"/>
+        	</element>
+        	<element>
+				<simple name="source" value="Basename.h"/>
+				<simple name="target" value="$(targetHeaderName)"/>
+				<simple name="replaceable" value="true"/>
+        	</element>
+        </complex-array>
+	</process>
+
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/Basename.cpp b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/Basename.cpp
new file mode 100644
index 0000000..f3e3376
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/Basename.cpp
@@ -0,0 +1,37 @@
+/*
+============================================================================
+ Name        : $(baseName).cpp
+ Author      : $(author)
+ Version     :
+ Copyright   : $(copyright)
+ Description : Exe source file
+============================================================================
+*/
+
+//  Include Files  
+
+#include "$(baseName).h"
+
+//  Defined Constants
+
+#define Constant "CONSTANT"
+
+
+//  Global Variables
+
+static int globalValue;
+
+//  Local Functions
+
+void printMessage(char* message) {
+    printf(message);
+}
+
+// Main Function
+
+int main(int nArgs, char **args) {
+    printMessage("Hello, world!\n");
+    printMessage("$(baseName)");
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/Basename.h b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/Basename.h
new file mode 100644
index 0000000..3c5300a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/Basename.h
@@ -0,0 +1,27 @@
+/*
+============================================================================
+ Name        : $(baseName).h
+ Author      : $(author)
+ Version     :
+ Copyright   : $(copyright)
+ Description : Exe header file
+============================================================================
+*/
+
+#ifndef __$(baseName)_H__
+#define __$(baseName)_H__
+
+
+//  Include Files
+
+#include <stdio.h>
+
+
+//  Function Prototypes
+
+void printMessage(char*);
+
+
+#endif  // __$(baseName)_H__
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/Copy.xml b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/Copy.xml
new file mode 100644
index 0000000..8fa2c96
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/Copy.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="Copy test" description="Testing Template Engines Copy Process"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.core.Copy">
+        <complex-array name="files">
+        	<element>
+				<simple name="source" value="Basename.cpp"/>
+				<simple name="target" value="$(targetSourceName)"/>
+				<simple name="replaceable" value="true"/>
+        	</element>
+        	<element>
+				<simple name="source" value="Basename.h"/>
+				<simple name="target" value="$(targetHeaderName)"/>
+				<simple name="replaceable" value="true"/>
+        	</element>
+        </complex-array>
+	</process>
+
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/CreateResourceIdentifier.xml b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/CreateResourceIdentifier.xml
new file mode 100644
index 0000000..fd5a438
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/CreateResourceIdentifier.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="Create Resource Identifier test" description="CreateResourceIdentifier test"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.core.CreateResourceIdentifier">
+        <simple name="valueName"  value="$(valueName1)"/>
+        <simple name="appName"  value="$(appName1)"/>
+	</process>
+	
+	<process type="org.eclipse.cdt.core.CreateResourceIdentifier">
+        <simple name="valueName"  value="$(valueName2)"/>
+        <simple name="appName"  value="$(appName2)"/>
+	</process>
+	
+	<process type="org.eclipse.cdt.core.AddFile">
+		<simple name="projectName" value="$(projectName)"/>
+        <complex name="file">
+				<simple name="source" value="Basename.cpp"/>
+				<simple name="target" value="$(baseName1).cpp"/>
+				<simple name="replaceable" value="true"/>
+        </complex>
+	</process>
+
+	<process type="org.eclipse.cdt.core.AddFile">
+		<simple name="projectName" value="$(projectName)"/>
+        <complex name="file">
+				<simple name="source" value="Basename.cpp"/>
+				<simple name="target" value="$(baseName2).cpp"/>
+				<simple name="replaceable" value="true"/>
+        </complex>
+	</process>
+
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/CreateSourceFolder.xml b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/CreateSourceFolder.xml
new file mode 100644
index 0000000..6faa321
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/templateengine/CreateSourceFolder.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="Create Source Folder test" description="Create Source Folder test"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.core.CreateSourceFolder">
+		<simple name="projectName" value="$(projectName)"/>
+		<simple name="path" value="$(sourceDir1)"/>
+	</process>
+
+	<process type="org.eclipse.cdt.core.CreateSourceFolder">
+		<simple name="projectName" value="$(projectName)"/>
+		<simple name="path" value="$(sourceDir2)"/>
+	</process>
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/Makefile b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/Makefile
new file mode 100644
index 0000000..0e22650
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/Makefile
@@ -0,0 +1,8 @@
+LIST=VARIANT
+ifndef QRECURSE
+QRECURSE=recurse.mk
+ifdef QCONFIG
+QRDIR=$(dir $(QCONFIG))
+endif
+endif
+include $(QRDIR)$(QRECURSE)
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/common.mk b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/common.mk
new file mode 100644
index 0000000..dd99ed5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/common.mk
@@ -0,0 +1,6 @@
+ifndef QCONFIG
+QCONFIG=qconfig.mk
+endif
+include $(QCONFIG)
+
+include $(MKFILES_ROOT)/qtargets.mk
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/test.c b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/test.c
new file mode 100644
index 0000000..23baffa
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/test.c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+
+
+int func1 (void)
+{
+	printf("This is func1\n");
+	return(1);
+}
+
+char * func2(void)
+{
+	printf("This is func2\n");
+	return(0);
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/test2.c b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/test2.c
new file mode 100644
index 0000000..7b26241
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/test2.c
@@ -0,0 +1,13 @@
+#include <stdio.h>
+
+int test2func1(void)
+{
+	printf("This is a function in the second object\n");
+	return(1);
+}
+
+int test2func2(void)
+{
+	printf("This is another function in the second object\n");
+	return(2);
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/Makefile b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/Makefile
new file mode 100644
index 0000000..0e22650
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/Makefile
@@ -0,0 +1,8 @@
+LIST=VARIANT
+ifndef QRECURSE
+QRECURSE=recurse.mk
+ifdef QCONFIG
+QRDIR=$(dir $(QCONFIG))
+endif
+endif
+include $(QRDIR)$(QRECURSE)
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/a.g/Makefile b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/a.g/Makefile
new file mode 100644
index 0000000..2c76089
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/a.g/Makefile
@@ -0,0 +1 @@
+include ../../common.mk
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/a.g/libtestlib_g.a b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/a.g/libtestlib_g.a
new file mode 100644
index 0000000..06377b5
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/a.g/libtestlib_g.a differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/a.g/test.o b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/a.g/test.o
new file mode 100644
index 0000000..a12942b
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/a.g/test.o differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/a.g/test2.o b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/a.g/test2.o
new file mode 100644
index 0000000..87e730c
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/a.g/test2.o differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/Makefile b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/Makefile
new file mode 100644
index 0000000..2c76089
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/Makefile
@@ -0,0 +1 @@
+include ../../common.mk
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/libtestlib_g.so b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/libtestlib_g.so
new file mode 100644
index 0000000..c0e76f7
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/libtestlib_g.so differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/libtestlib_gS.a b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/libtestlib_gS.a
new file mode 100644
index 0000000..b03c33b
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/libtestlib_gS.a differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/test.o b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/test.o
new file mode 100644
index 0000000..c9009cb
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/test.o differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/test2.o b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/test2.o
new file mode 100644
index 0000000..a13bcd8
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/test2.o differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/zips/CManaged.zip b/results/plugins/org.eclipse.cdt.core.tests/resources/zips/CManaged.zip
new file mode 100644
index 0000000..9d90704
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/zips/CManaged.zip differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/zips/CPPManaged.zip b/results/plugins/org.eclipse.cdt.core.tests/resources/zips/CPPManaged.zip
new file mode 100644
index 0000000..0cdfb6b
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/zips/CPPManaged.zip differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/zips/CPPStandard.zip b/results/plugins/org.eclipse.cdt.core.tests/resources/zips/CPPStandard.zip
new file mode 100644
index 0000000..ac47634
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/zips/CPPStandard.zip differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/resources/zips/CStandard.zip b/results/plugins/org.eclipse.cdt.core.tests/resources/zips/CStandard.zip
new file mode 100644
index 0000000..3a38b3c
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.core.tests/resources/zips/CStandard.zip differ
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/suite/AISResultPrinter.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/suite/AISResultPrinter.java
new file mode 100644
index 0000000..3aab92c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/suite/AISResultPrinter.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+/*
+ * Created on Jun 5, 2003
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package org.eclipse.cdt.core.suite;
+
+import java.io.PrintStream;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+import junit.textui.ResultPrinter;
+
+/**
+ * @author vhirsl
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class AISResultPrinter extends ResultPrinter {
+
+	/**
+	 * @param writer
+	 */
+	public AISResultPrinter(PrintStream writer) {
+		super(writer);
+	}
+
+	/* (non-Javadoc)
+	 * @see junit.framework.TestListener#addFailure(junit.framework.Test, junit.framework.AssertionFailedError)
+	 */
+	public void addFailure(Test test, AssertionFailedError t) {
+		super.addFailure(test, t);
+		getWriter().print("---> ");
+	}
+
+	/* (non-Javadoc)
+	 * @see junit.framework.TestListener#addError(junit.framework.Test, java.lang.Throwable)
+	 */
+	public void addError(Test test, Throwable t) {
+		super.addError(test, t);
+		getWriter().print("---> ");
+	}
+
+	/* (non-Javadoc)
+	 * @see junit.framework.TestListener#startTest(junit.framework.Test)
+	 */
+	public void startTest(Test test) {
+		getWriter().print(".");
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/suite/AutomatedIntegrationSuite.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/suite/AutomatedIntegrationSuite.java
new file mode 100644
index 0000000..91266f4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/suite/AutomatedIntegrationSuite.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *     Norbert Ploett (Siemens AG)
+ *******************************************************************************/
+package org.eclipse.cdt.core.suite;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.cdescriptor.tests.CDescriptorOldTests;
+import org.eclipse.cdt.core.cdescriptor.tests.CDescriptorTests;
+import org.eclipse.cdt.core.internal.errorparsers.tests.ErrorParserTests;
+import org.eclipse.cdt.core.internal.tests.PositionTrackerTests;
+import org.eclipse.cdt.core.internal.tests.ResourceLookupTests;
+import org.eclipse.cdt.core.internal.tests.StringBuilderTest;
+import org.eclipse.cdt.core.language.AllLanguageTests;
+import org.eclipse.cdt.core.model.tests.AllCoreTests;
+import org.eclipse.cdt.core.model.tests.BinaryTests;
+import org.eclipse.cdt.core.model.tests.ElementDeltaTests;
+import org.eclipse.cdt.core.model.tests.WorkingCopyTests;
+import org.eclipse.cdt.core.parser.tests.ParserTestSuite;
+import org.eclipse.cdt.core.parser.tests.rewrite.RewriteTests;
+import org.eclipse.cdt.core.tests.templateengine.AllTemplateEngineTests;
+import org.eclipse.cdt.internal.index.tests.IndexTests;
+import org.eclipse.cdt.internal.pdom.tests.PDOMTests;
+import org.eclipse.cdt.utils.CommandLineUtilTest;
+
+/**
+ * @author vhirsl
+ */
+public class AutomatedIntegrationSuite extends TestSuite {
+
+	public AutomatedIntegrationSuite() {}
+	
+	public AutomatedIntegrationSuite(Class theClass, String name) {
+		super(theClass, name);
+	}
+	
+	public AutomatedIntegrationSuite(Class theClass) {
+		super(theClass);
+	}
+	
+	public AutomatedIntegrationSuite(String name) {
+		super(name);
+	}
+	
+	public static Test suite() throws Exception {
+		final AutomatedIntegrationSuite suite = new AutomatedIntegrationSuite();
+		
+		// Add all success tests
+		suite.addTest(CDescriptorTests.suite());
+		suite.addTest(CDescriptorOldTests.suite());
+		suite.addTest(ErrorParserTests.suite());
+		suite.addTest(ParserTestSuite.suite());
+		suite.addTest(AllCoreTests.suite());
+		suite.addTest(BinaryTests.suite());
+		suite.addTest(ElementDeltaTests.suite());
+		suite.addTest(WorkingCopyTests.suite());
+        suite.addTest(PositionTrackerTests.suite());
+        suite.addTest(ResourceLookupTests.suite());
+        suite.addTest(StringBuilderTest.suite());
+        suite.addTest(AllLanguageTests.suite());
+        suite.addTest(RewriteTests.suite());
+		suite.addTest(CommandLineUtilTest.suite());
+				
+		// Add in PDOM tests
+		suite.addTest(PDOMTests.suite());
+		suite.addTest(IndexTests.suite());
+	
+        suite.addTest(AllTemplateEngineTests.suite());
+
+		return suite;
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/suite/ProjectCreator.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/suite/ProjectCreator.java
new file mode 100644
index 0000000..47d9009
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/suite/ProjectCreator.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.suite;
+
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Enumeration;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * This is a utility class that properly creates a project for testing
+ * core features. Projects are created from a template stored in a zip file
+ * These templates are created using the CDT and have the proper natures
+ * and build settings set up.
+ * 
+ * @author Doug Schaefer
+ */
+public class ProjectCreator extends TestCase {
+
+	private static final byte[] buffer = new byte[512];
+	private static final IProgressMonitor monitor = new NullProgressMonitor();
+
+	public static IProject createProject(IPath zipPath,	String projectName) throws Exception {
+		ZipFile zipFile = new ZipFile(CTestPlugin.getDefault().getFileInPlugin(zipPath));
+		
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IWorkspaceRoot root = workspace.getRoot();
+		IPath rootPath = root.getLocation();
+		String zipProjectName = null;
+
+		Enumeration entries = zipFile.entries();
+		while (entries.hasMoreElements()) {
+			ZipEntry entry = (ZipEntry)entries.nextElement();
+			if (!entry.isDirectory()) {
+				IPath entryPath = rootPath.append(entry.getName());
+				IPath entryDir = entryPath.removeLastSegments(1);
+				entryDir.toFile().mkdirs();
+				InputStream in = zipFile.getInputStream(entry);
+				OutputStream out = new FileOutputStream(entryPath.toFile());
+				for (int n = in.read(buffer); n >= 0; n = in.read(buffer))
+					out.write(buffer, 0, n);
+				in.close();
+				out.close();
+				
+				// Is this the .project file?
+				if (".project".equals(entryPath.lastSegment())) {
+					IProjectDescription desc = workspace.loadProjectDescription(entryPath);
+					zipProjectName = desc.getName();
+				}
+			}
+		}
+		
+		IProject project = root.getProject(zipProjectName);
+		project.create(monitor);
+		project.open(monitor);
+		project.move(new Path(projectName), true, monitor);
+
+		return project;
+	}
+
+	public static IProject createCManagedProject(String projectName) throws Exception {
+		return createProject(new Path("resources/zips/CManaged.zip"), projectName);
+	}
+	
+	public static IProject createCPPManagedProject(String projectName) throws Exception {
+		return createProject(new Path("resources/zips/CPPManaged.zip"), projectName);
+	}
+	
+	public static IProject createCStandardProject(String projectName) throws Exception {
+		return createProject(new Path("resources/zips/CStandard.zip"), projectName);
+	}
+	
+	public static IProject createCPPStandardProject(String projectName) throws Exception {
+		return createProject(new Path("resources/zips/CPPStandard.zip"), projectName);
+	}
+	
+	public void test() throws Exception {
+		IProject project = createCPPManagedProject("TestProject");
+		assertNotNull(project);
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CElementDecorator.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CElementDecorator.java
new file mode 100644
index 0000000..62381c5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CElementDecorator.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin;
+
+import org.eclipse.swt.graphics.Image;
+
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.LabelProvider;
+
+/**
+ * Allows to test decorators for Java elements
+ */
+public class CElementDecorator extends LabelProvider implements ILabelDecorator {
+
+	/*
+	 * @see ILabelDecorator#decorateImage(Image, Object)
+	 */
+	public Image decorateImage(Image image, Object element) {
+		return null;
+	}
+
+	/*
+	 * @see ILabelDecorator#decorateText(String, Object)
+	 */
+	public String decorateText(String text, Object element) {
+		return text + "*";
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CProjectHelper.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CProjectHelper.java
new file mode 100644
index 0000000..7da40b0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CProjectHelper.java
@@ -0,0 +1,445 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Andrew Ferguson (Symbian)
+ *     Markus Schorn (Wind River Systems)
+ *     Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin;
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.zip.ZipFile;
+
+import junit.framework.Assert;
+
+import org.eclipse.cdt.core.CCProjectNature;
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.CProjectNature;
+import org.eclipse.cdt.core.ICExtensionReference;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.IArchive;
+import org.eclipse.cdt.core.model.IArchiveContainer;
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.cdt.core.model.IBinaryContainer;
+import org.eclipse.cdt.core.model.ICContainer;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ISourceRoot;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
+import org.eclipse.cdt.core.settings.model.TestCfgDataProvider;
+import org.eclipse.cdt.core.settings.model.util.CDataUtil;
+import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider;
+import org.eclipse.ui.wizards.datatransfer.ImportOperation;
+import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;
+import org.osgi.framework.Bundle;
+/**
+ * Helper methods to set up a ICProject.
+ */
+public class CProjectHelper {
+
+	private final static IOverwriteQuery OVERWRITE_QUERY= new IOverwriteQuery() {
+		public String queryOverwrite(String file) {
+			return ALL;
+		}
+	};
+
+	public static ICProject createCProject(final String projectName, String binFolderName) throws CoreException {
+		return createCCProject(projectName, binFolderName, null);
+	}
+	
+	/**
+	 * Creates a ICProject.
+	 */
+	public static ICProject createCProject(final String projectName, String binFolderName, final String indexerID) throws CoreException {
+		final IWorkspace ws = ResourcesPlugin.getWorkspace();
+		final ICProject newProject[] = new ICProject[1];
+		ws.run(new IWorkspaceRunnable() {
+
+			public void run(IProgressMonitor monitor) throws CoreException {
+				IWorkspaceRoot root = ws.getRoot();
+				IProject project = root.getProject(projectName);
+				if (indexerID != null) {
+					IndexerPreferences.set(project, IndexerPreferences.KEY_INDEX_UNUSED_HEADERS_WITH_DEFAULT_LANG, "true");
+					IndexerPreferences.set(project, IndexerPreferences.KEY_INDEXER_ID, indexerID);
+				}
+				if (!project.exists()) {
+					project.create(null);
+				} else {
+					project.refreshLocal(IResource.DEPTH_INFINITE, null);
+				}
+				if (!project.isOpen()) {
+					project.open(null);
+				}
+				if (!project.hasNature(CProjectNature.C_NATURE_ID)) {
+					String projectId = CTestPlugin.PLUGIN_ID + ".TestProject";
+					addNatureToProject(project, CProjectNature.C_NATURE_ID, null);
+					CCorePlugin.getDefault().mapCProjectOwner(project, projectId, false);
+				}
+				addDefaultBinaryParser(project);
+				newProject[0] = CCorePlugin.getDefault().getCoreModel().create(project);
+			}
+		}, null);
+
+		return newProject[0];
+	}
+
+	/**
+	 * Add the default binary parser if no binary parser configured.
+	 * 
+	 * @param project
+	 * @throws CoreException 
+	 */
+	public static boolean addDefaultBinaryParser(IProject project) throws CoreException {
+		ICExtensionReference[] binaryParsers= CCorePlugin.getDefault().getBinaryParserExtensions(project);
+		if (binaryParsers == null || binaryParsers.length == 0) {
+			ICProjectDescription desc= CCorePlugin.getDefault().getProjectDescription(project);
+			if (desc == null) {
+				return false;
+			}
+			
+			desc.getDefaultSettingConfiguration().create(CCorePlugin.BINARY_PARSER_UNIQ_ID, CCorePlugin.DEFAULT_BINARY_PARSER_UNIQ_ID);
+			CCorePlugin.getDefault().setProjectDescription(project, desc);
+		}
+		return true;
+	}
+
+	/**
+	 * Creates a ICProject.
+	 */
+	public static ICProject createNewStileCProject(final String projectName, final String indexerID) throws CoreException {
+		return createNewStileCProject(projectName, indexerID, false);
+	}
+
+	/**
+	 * Creates a ICProject.
+	 */
+	public static ICProject createNewStileCProject(final String projectName, String providerId, final String indexerID) throws CoreException {
+		return createNewStileCProject(projectName, providerId, indexerID, false);
+	}
+
+	/**
+	 * Creates a ICProject.
+	 */
+	public static ICProject createNewStileCProject(final String projectName, final String indexerID, boolean markCreating) throws CoreException {
+		return createNewStileCProject(projectName, null, indexerID, markCreating);
+	}
+
+	/**
+	 * Creates a ICProject.
+	 */
+	public static ICProject createNewStileCProject(final String projectName, String cfgProviderId, final String indexerID, final boolean markCreating) throws CoreException {
+		final IWorkspace ws = ResourcesPlugin.getWorkspace();
+		final ICProject newProject[] = new ICProject[1];
+		if(cfgProviderId == null)
+			cfgProviderId = TestCfgDataProvider.PROVIDER_ID;
+		
+		final String finalCfgProviderId = cfgProviderId;
+		ws.run(new IWorkspaceRunnable() {
+
+			public void run(IProgressMonitor monitor) throws CoreException {
+				IWorkspaceRoot root = ws.getRoot();
+				IProject project = root.getProject(projectName);
+				if (indexerID != null) {
+					IndexerPreferences.set(project, IndexerPreferences.KEY_INDEXER_ID, indexerID);
+				}
+				if (!project.exists()) {
+					project.create(null);
+				} else {
+					project.refreshLocal(IResource.DEPTH_INFINITE, null);
+				}
+				if (!project.isOpen()) {
+					project.open(null);
+				}
+				if (!project.hasNature(CProjectNature.C_NATURE_ID)) {
+					addNatureToProject(project, CProjectNature.C_NATURE_ID, null);
+					ICConfigurationDescription prefCfg = CCorePlugin.getDefault().getPreferenceConfiguration(finalCfgProviderId);
+					ICProjectDescriptionManager mngr = CCorePlugin.getDefault().getProjectDescriptionManager();
+					ICProjectDescription projDes = mngr.createProjectDescription(project, false, markCreating);
+					projDes.createConfiguration(CDataUtil.genId(null), CDataUtil.genId("test"), prefCfg);
+					mngr.setProjectDescription(project, projDes);
+//					CCorePlugin.getDefault().mapCProjectOwner(project, projectId, false);
+				}
+				addDefaultBinaryParser(project);
+				newProject[0] = CCorePlugin.getDefault().getCoreModel().create(project);
+			}
+		}, null);
+
+		return newProject[0];
+	}
+
+	
+	private static String getMessage(IStatus status) {
+		StringBuffer message = new StringBuffer("[");
+		message.append(status.getMessage());
+		if (status.isMultiStatus()) {
+			IStatus children[] = status.getChildren();
+			for( int i = 0; i < children.length; i++) {
+				message.append(getMessage(children[i]));
+			}
+		}
+		message.append("]");
+		return message.toString();
+	}
+
+	public static ICProject createCCProject(final String projectName, final String binFolderName) throws CoreException {
+		return createCCProject(projectName, binFolderName, null);
+	}
+
+	public static ICProject createCCProject(final String projectName, final String binFolderName, final String indexerID) throws CoreException {
+		final IWorkspace ws = ResourcesPlugin.getWorkspace();
+		final ICProject newProject[] = new ICProject[1];
+		ws.run(new IWorkspaceRunnable() {
+
+			public void run(IProgressMonitor monitor) throws CoreException {
+				ICProject cproject = createCProject(projectName, binFolderName, indexerID);
+				if (!cproject.getProject().hasNature(CCProjectNature.CC_NATURE_ID)) {
+					addNatureToProject(cproject.getProject(), CCProjectNature.CC_NATURE_ID, null);
+				}
+				newProject[0] = cproject;
+			}
+		}, null);
+		return newProject[0];
+	}
+
+	/**
+	 * Removes a ICProject.
+	 */
+	public static void delete(ICProject cproject) {
+		try {
+			cproject.getProject().delete(true, true, null);
+		} catch (CoreException e) {
+			try {
+				Thread.sleep(1000);
+			} catch (InterruptedException e1) {
+			} finally {
+				try {
+					System.gc();
+					System.runFinalization();
+					cproject.getProject().delete(true, true, null);
+				} catch (CoreException e2) {
+					Assert.fail(getMessage(e2.getStatus()));
+				}
+			}
+		}
+	}
+
+	/**
+	 * Adds a folder container to a ICProject.
+	 */
+	public static ICContainer addCContainer(ICProject cproject, String containerName) throws CoreException {
+		IProject project = cproject.getProject();
+		ICContainer container = null;
+		if (containerName == null || containerName.length() == 0) {
+			ICContainer[] conts = cproject.getSourceRoots();
+			if (conts.length > 0) {
+				container = conts[0];
+			}
+		} else {
+			IFolder folder = project.getFolder(containerName);
+			if (!folder.exists()) {
+				folder.create(false, true, null);
+			}
+			container = CoreModel.getDefault().create(folder);
+		}
+		return container;
+	}
+
+	/**
+	 * Adds a folder container to a ICProject and imports all files contained in the given Zip file.
+	 */
+	public static ICContainer addCContainerWithImport(ICProject cproject, String containerName, ZipFile zipFile)
+			throws InvocationTargetException, CoreException {
+		ICContainer root = addCContainer(cproject, containerName);
+		importFilesFromZip(zipFile, root.getPath(), null);
+		return root;
+	}
+
+	/**
+	 * Removes a folder from a ICProject.
+	 */
+	public static void removeCContainer(ICProject cproject, String containerName) throws CoreException {
+		IFolder folder = cproject.getProject().getFolder(containerName);
+		folder.delete(true, null);
+	}
+
+	/**
+	 * Attempts to find an archive with the given name in the workspace
+	 */
+	public static IArchive findArchive(ICProject testProject, String name) throws CModelException {
+		int x;
+		IArchive[] myArchives;
+		IArchiveContainer archCont;
+		/***************************************************************************************************************************
+		 * Since ArchiveContainer.getArchives does not wait until all the archives in the project have been parsed before returning
+		 * the list, we have to do a sync ArchiveContainer.getChildren first to make sure we find all the archives.
+		 */
+		archCont = testProject.getArchiveContainer();
+		myArchives = archCont.getArchives();
+		if (myArchives.length < 1)
+			return (null);
+		for (x = 0; x < myArchives.length; x++) {
+			if (myArchives[x].getElementName().equals(name))
+				return (myArchives[x]);
+		}
+		return (null);
+	}
+
+	/**
+	 * Attempts to find a binary with the given name in the workspace
+	 */
+	public static IBinary findBinary(ICProject testProject, String name) throws CModelException {
+		IBinaryContainer binCont;
+		int x;
+		IBinary[] myBinaries;
+		binCont = testProject.getBinaryContainer();
+		myBinaries = binCont.getBinaries();
+		if (myBinaries.length < 1)
+			return (null);
+		for (x = 0; x < myBinaries.length; x++) {
+			if (myBinaries[x].getElementName().equals(name))
+				return (myBinaries[x]);
+		}
+		return (null);
+	}
+
+	/**
+	 * Attempts to find an object with the given name in the workspace
+	 */
+	public static IBinary findObject(ICProject testProject, String name) throws CModelException {
+		ICElement[] sourceRoots = testProject.getChildren();
+		for (int i = 0; i < sourceRoots.length; i++) {
+			ISourceRoot root = (ISourceRoot) sourceRoots[i];
+			ICElement[] myElements = root.getChildren();
+			for (int x = 0; x < myElements.length; x++) {
+				if (myElements[x].getElementName().equals(name)) {
+					if (myElements[x] instanceof IBinary) {
+						return ((IBinary) myElements[x]);
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Attempts to find a TranslationUnit with the given name in the workspace
+	 * @throws InterruptedException 
+	 */
+	public static ITranslationUnit findTranslationUnit(ICProject testProject, String name) throws CModelException, InterruptedException {
+		for (int j=0; j<20; j++) {
+			ICElement[] sourceRoots = testProject.getChildren();
+			for (int i = 0; i < sourceRoots.length; i++) {
+				ISourceRoot root = (ISourceRoot) sourceRoots[i];
+				ICElement[] myElements = root.getChildren();
+				for (int x = 0; x < myElements.length; x++) {
+					if (myElements[x].getElementName().equals(name)) {
+						if (myElements[x] instanceof ITranslationUnit) {
+							return ((ITranslationUnit) myElements[x]);
+						}
+					}
+				}
+			}
+			Thread.sleep(100);
+		}
+		return null;
+	}
+
+	/**
+	 * Attempts to find an element with the given name in the workspace
+	 */
+	public static ICElement findElement(ICProject testProject, String name) throws CModelException {
+		ICElement[] sourceRoots = testProject.getChildren();
+		for (int i = 0; i < sourceRoots.length; i++) {
+			ISourceRoot root = (ISourceRoot) sourceRoots[i];
+			ICElement[] myElements = root.getChildren();
+			for (int x = 0; x < myElements.length; x++) {
+				if (myElements[x].getElementName().equals(name)) {
+					return myElements[x];
+				}
+			}
+		}
+		return null;
+	}
+
+	public static void addNatureToProject(IProject proj, String natureId, IProgressMonitor monitor) throws CoreException {
+		IProjectDescription description = proj.getDescription();
+		String[] prevNatures = description.getNatureIds();
+		String[] newNatures = new String[prevNatures.length + 1];
+		System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
+		newNatures[prevNatures.length] = natureId;
+		description.setNatureIds(newNatures);
+		proj.setDescription(description, monitor);
+	}
+
+	private static void importFilesFromZip(ZipFile srcZipFile, IPath destPath, IProgressMonitor monitor)
+			throws InvocationTargetException {
+		ZipFileStructureProvider structureProvider = new ZipFileStructureProvider(srcZipFile);
+		try {
+			ImportOperation op = new ImportOperation(destPath, structureProvider.getRoot(), structureProvider,
+					OVERWRITE_QUERY);
+			op.run(monitor);
+		} catch (InterruptedException e) {
+			// should not happen
+		}
+	}
+
+	
+	public static void importSourcesFromPlugin(ICProject project, Bundle bundle, String sources) throws CoreException {
+		try {
+			String baseDir= FileLocator.toFileURL(FileLocator.find(bundle, new Path(sources), null)).getFile();
+			ImportOperation importOp = new ImportOperation(project.getProject().getFullPath(),
+					new File(baseDir), FileSystemStructureProvider.INSTANCE, OVERWRITE_QUERY);
+			importOp.setCreateContainerStructure(false);
+			importOp.run(new NullProgressMonitor());
+		}
+		catch (Exception e) {
+			throw new CoreException(new Status(IStatus.ERROR, CTestPlugin.PLUGIN_ID, 0, "Import Interrupted", e));
+		}
+	}
+
+	/**
+	 * Returns the location of a newly created directory in the systems temp. area.
+	 * @return the location of a newly created directory in the systems temp. area
+	 * @throws IOException
+	 */
+	public static File freshDir() throws IOException {
+		File tempDir = new File(System.getProperty("java.io.tmpdir")).getCanonicalFile();		
+		for(int i=0; i<Integer.MAX_VALUE; i++) {
+			File candidate = new File(tempDir, "__testData/"+i);
+			if(!candidate.exists()) {
+				candidate.mkdirs();
+				return candidate;
+			}
+		}
+		return null;
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CTestPlugin.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CTestPlugin.java
new file mode 100644
index 0000000..4a89ca2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CTestPlugin.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+
+
+public class CTestPlugin extends Plugin {
+	
+	public static final String PLUGIN_ID = "org.eclipse.cdt.core.tests";
+	private static CTestPlugin fgDefault;
+	
+	public CTestPlugin() {
+		super();
+		fgDefault= this;
+	}
+	
+	public static CTestPlugin getDefault() {
+		return fgDefault;
+	}
+	
+	public static IWorkspace getWorkspace() {
+		return ResourcesPlugin.getWorkspace();
+	}
+	
+	public static void enableAutobuild(boolean enable) throws CoreException {
+		// disable auto build
+		IWorkspace workspace= CTestPlugin.getWorkspace();
+		IWorkspaceDescription desc= workspace.getDescription();
+		desc.setAutoBuilding(enable);
+		workspace.setDescription(desc);
+	}
+	
+	public File getFileInPlugin(IPath path) {
+		try {
+			return new File(Platform.asLocalURL(find(path)).getFile());
+		} catch (IOException e) {
+			return null;
+		}
+	}
+	
+		
+
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CTestSetup.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CTestSetup.java
new file mode 100644
index 0000000..c26b93f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CTestSetup.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+
+
+
+public class CTestSetup extends TestSetup {
+	
+	/**
+	 * @deprecated
+	 * Not needed anymore. No added value
+	 */
+	public CTestSetup(Test test) {
+		super(test);
+	}	
+	
+	protected void setUp() throws Exception {
+	}
+
+	protected void tearDown() throws Exception {
+	}
+	
+
+	
+	
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/FileManager.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/FileManager.java
new file mode 100644
index 0000000..3f5cb71
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/FileManager.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+/*
+ * Created on Sep 8, 2003
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package org.eclipse.cdt.core.testplugin;
+
+import java.util.HashSet;
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * @author bgheorgh
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class FileManager {
+	HashSet<IFile> fileHandles;
+	
+	public FileManager(){
+		fileHandles = new HashSet<IFile>();
+	}
+	
+	public void addFile(IFile file){
+		fileHandles.add(file);
+	}
+	
+	public void closeAllFiles() throws CoreException, InterruptedException{
+		int wait= 1;
+		for (int i = 0; i < 11; i++) {
+			for (Iterator iter= fileHandles.iterator(); iter.hasNext();) {
+				IFile tempFile = (IFile) iter.next();
+				try {
+					if (i==1) {
+						tempFile.refreshLocal(IResource.DEPTH_INFINITE,null);
+					}
+					tempFile.delete(true,null);
+					iter.remove();
+				} catch (CoreException e) {
+					if (wait > 2000)
+						throw e;
+				}
+			}
+
+			if (fileHandles.isEmpty())
+				return;
+			Thread.sleep(wait);
+			wait*=2;
+		}
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java
new file mode 100644
index 0000000..8bee563
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java
@@ -0,0 +1,540 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.testplugin;
+
+// copied from startup.jar. planned to be removed soon
+
+
+import java.io.File;
+import java.io.FileFilter;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.StringTokenizer;
+import java.util.Vector;
+/**
+ * Startup class for Eclipse. Creates a class loader using
+ * supplied URL of platform installation, loads and calls
+ * the Eclipse Boot Loader.  The startup arguments are as follows:
+ * <dl>
+ * <dd>
+ *    -application &lt;id&gt;: the identifier of the application to run
+ * </dd>
+ * <dd>
+ *    -boot &lt;location&gt;: the location, expressed as a URL, of the platform's boot.jar
+ * </dd>
+ * <dd>
+ *    -consolelog : enables log to the console. Handy when combined with -debug
+ * </dd>
+ * <dd>
+ *    -data &lt;location&gt;: sets the workspace location and the default location for projects
+ * </dd>
+ * <dd>
+ *    -debug [options file]: turns on debug mode for the platform and optionally specifies a location
+ * for the .options file. This file indicates what debug points are available for a
+ * plug-in and whether or not they are enabled. If a location is not specified, the platform searches
+ * for the .options file under the install directory
+ * </dd>
+ * <dd>
+ *    -dev [entries]: turns on dev mode and optionally specifies comma-separated class path entries
+ * which are added to the class path of each plug-in
+ * </dd>
+ * <dd>
+ *    -keyring &lt;location&gt;: the location of the authorization database on disk. This argument
+ * has to be used together with the -password argument
+ * </dd>
+ * <dd>
+ *    -password &lt;passwd&gt;: the password for the authorization database
+ * </dd>
+ * <dd>
+ *    -plugins &lt;location&gt;: The arg is a URL pointing to a file which specs the plugin 
+ * path for the platform.  The file is in property file format where the keys are user-defined 
+ * names and the values are comma separated lists of either explicit paths to plugin.xml 
+ * files or directories containing plugins. (e.g., .../eclipse/plugins).
+ * </dd>
+ * <dd>
+ *    -ws &lt;window system&gt;: sets the window system value
+ * </dd>
+ * </dl>
+ */
+public class Main {
+	/**
+	 * Indicates whether this instance is running in debug mode.
+	 */
+	protected boolean debug = false;
+	
+	/**
+	 * The location of the launcher to run.
+	 */
+	protected String bootLocation = null;
+	
+	/**
+	 * The identifier of the application to run.
+	 */
+	protected String application;
+	
+	/**
+	 * The path for finding find plugins.
+	 */
+	protected URL pluginPathLocation;
+	
+	/**
+	 * The boot path location.
+	 */
+	protected String location;
+	
+	/**
+	 * Indicates whether items for UNinstallation should be looked for.
+	 */
+	protected boolean uninstall = false;
+	
+	/**
+	 * The item to be uninstalled.
+	 */
+	protected String uninstallCookie;
+	
+	/**
+	 * The class path entries.
+	 */
+	protected String devClassPath = null;
+	
+	/**
+	 * Indicates whether this instance is running in development mode.
+	 */
+	protected boolean inDevelopmentMode = false;
+
+	// static token describing how to take down the splash screen
+	private static String endSplash = null;
+	
+	// constants
+	private static final String APPLICATION = "-application";
+	private static final String BOOT = "-boot";
+	private static final String DEBUG = "-debug";
+	private static final String DEV = "-dev";
+	private static final String ENDSPLASH = "-endsplash";
+	private static final String UNINSTALL = "-uninstall";
+	private static final String PI_BOOT = "org.eclipse.core.boot";
+	private static final String BOOTLOADER = "org.eclipse.core.boot.BootLoader";
+	private static final String UPDATELOADER = "org.eclipse.core.internal.boot.LaunchInfo";
+
+	// The project containing the boot loader code.  This is used to construct
+	// the correct class path for running in VAJ and VAME.
+	private static final String PROJECT_NAME = "Eclipse Core Boot";
+
+	private static boolean inVAJ;
+	static {
+		try {
+			Class.forName("com.ibm.uvm.lang.ProjectClassLoader");
+			inVAJ = true;
+		} catch (Exception e) {
+			inVAJ = false;
+		}
+	}
+	private static boolean inVAME;
+	static {
+		try {
+			Class.forName("com.ibm.eclipse.core.VAME");
+			inVAME = true;
+		} catch (Exception e) {
+			inVAME = false;
+		}
+	}
+
+/**
+ * Executes the launch.
+ * 
+ * @return the result of performing the launch
+ * @param args command-line arguments
+ * @exception Exception thrown if a problem occurs during the launch
+ */
+protected Object basicRun(String[] args) throws Exception {
+	Class clazz = getBootLoader(bootLocation);
+	Method method = clazz.getDeclaredMethod("run", new Class[] { String.class, URL.class, String.class, String[].class });
+	try {
+		return method.invoke(clazz, new Object[] { application, pluginPathLocation, location, args });
+	} catch (InvocationTargetException e) {
+		if (e.getTargetException() instanceof Error)
+			throw (Error) e.getTargetException();
+		else
+			throw e;
+	}
+}
+
+/**
+ * Returns the result of converting a list of comma-separated tokens into an array
+ * 
+ * @return the array of string tokens
+ * @param prop the initial comma-separated string
+ */
+private String[] getArrayFromList(String prop) {
+	if (prop == null || prop.trim().equals(""))
+		return new String[0];
+	Vector list = new Vector();
+	StringTokenizer tokens = new StringTokenizer(prop, ",");
+	while (tokens.hasMoreTokens()) {
+		String token = tokens.nextToken().trim();
+		if (!token.equals(""))
+			list.addElement(token);
+	}
+	return list.isEmpty() ? new String[0] : (String[]) list.toArray(new String[0]);
+}
+/**
+ * Creates and returns a platform <code>BootLoader</code> which can be used to start
+ * up and run the platform.  The given base, if not <code>null</code>,
+ * is the location of the boot loader code.  If the value is <code>null</code>
+ * then the boot loader is located relative to this class.
+ * 
+ * @return the new boot loader
+ * @param base the location of the boot loader
+ */
+public Class getBootLoader(String base) throws Exception {
+	URLClassLoader loader = new URLClassLoader(getBootPath(base), null);
+	return loader.loadClass(BOOTLOADER);
+}
+/**
+ * Returns the <code>URL</code>-based class path describing where the boot classes
+ * are located when running in development mode.
+ * 
+ * @return the url-based class path
+ * @param base the base location
+ * @exception MalformedURLException if a problem occurs computing the class path
+ */
+protected URL[] getDevPath(URL base) throws MalformedURLException {
+	URL url;
+	String devBase = base.toExternalForm();
+	if (!inDevelopmentMode) {
+		url = new URL(devBase + "boot.jar");
+		return new URL[] {url};
+	}
+	String[] locations = getArrayFromList(devClassPath);
+	ArrayList result = new ArrayList(locations.length);
+	for (int i = 0; i < locations.length; i++) {
+		String spec = devBase + locations[i];
+		char lastChar = spec.charAt(spec.length() - 1);
+		if ((spec.endsWith(".jar") || (lastChar == '/' || lastChar == '\\')))
+			url = new URL (spec);
+		else
+			url = new URL(spec + "/");
+		//make sure URL exists before adding to path
+		if (new java.io.File(url.getFile()).exists())
+			result.add(url);
+	}
+	url = new URL(devBase + "boot.jar");
+	if (new java.io.File(url.getFile()).exists())
+		result.add(url);
+	return (URL[])result.toArray(new URL[result.size()]);
+}
+
+/**
+ * Returns the <code>URL</code>-based class path describing where the boot classes are located.
+ * 
+ * @return the url-based class path
+ * @param base the base location
+ * @exception MalformedURLException if a problem occurs computing the class path
+ */
+protected URL[] getBootPath(String base) throws MalformedURLException {
+	URL url = null;
+	// if the given location is not null, assume it is correct and use it. 
+	if (base != null) {
+		url = new URL(base);
+		if (debug)
+			System.out.println("Boot URL: " + url.toExternalForm());
+		return new URL[] {url};	
+	}
+	// Create a URL based on the location of this class' code.
+	// strip off jar file and/or last directory to get 
+	// to the directory containing projects.
+	URL[] result = null;
+	url = getClass().getProtectionDomain().getCodeSource().getLocation();
+	String path = url.getFile();
+	if (path.endsWith(".jar"))
+		path = path.substring(0, path.lastIndexOf("/"));
+	else 
+		if (path.endsWith("/"))
+			path = path.substring(0, path.length() - 1);
+	if (inVAJ || inVAME) {
+		int ix = path.lastIndexOf("/");
+		path = path.substring(0, ix + 1);
+		path = path + PROJECT_NAME + "/";
+		url = new URL(url.getProtocol(), url.getHost(), url.getPort(), path);
+		result = new URL[] {url};
+	} else {
+		path = searchForPlugins(path);
+		path = searchForBoot(path);
+		// add on any dev path elements
+		url = new URL(url.getProtocol(), url.getHost(), url.getPort(), path);
+		result = getDevPath(url);
+	}
+	if (debug) {
+		System.out.println("Boot URL:");
+		for (int i = 0; i < result.length; i++)
+			System.out.println("    " + result[i].toExternalForm());	
+	}
+	return result;
+}
+
+/**
+ * Searches for a plugins root starting at a given location.  If one is
+ * found then this location is returned; otherwise an empty string is
+ * returned.
+ * 
+ * @return the location where plugins were found, or an empty string
+ * @param start the location to begin searching at
+ */
+protected String searchForPlugins(String start) {
+	File path = new File(start);
+	while (path != null) {
+		File test = new File(path, "plugins");
+		if (test.exists())
+			return test.toString();
+		path = path.getParentFile();
+		path = (path == null || path.length() == 1)  ? null : path;
+	}
+	return "";
+}
+/**
+ * Searches for a boot directory starting at a given location.  If one
+ * is found then this location is returned; otherwise an empty string
+ * is returned.
+ * 
+ * @return the location where plugins were found, or an empty string
+ * @param start the location to begin searching at
+ */
+protected String searchForBoot(String start) {
+	FileFilter filter = new FileFilter() {
+		public boolean accept(File candidate) {
+			return candidate.getName().startsWith(PI_BOOT);
+		}
+	};
+	File[] boots = new File(start).listFiles(filter);
+	String result = null;
+	String maxVersion = null;
+	for (int i = 0; i < boots.length; i++) {
+		String name = boots[i].getName();
+		int index = name.lastIndexOf('_');
+		if (index == -1) {
+			result = boots[i].getAbsolutePath();
+			i = boots.length;
+		} else {
+			if (index > 0) {
+				String version = name.substring(index + 1);
+				if (maxVersion == null) {
+					result = boots[i].getAbsolutePath();
+					maxVersion = version;
+				} else
+					if (maxVersion.compareTo(version) == -1) {
+						result = boots[i].getAbsolutePath();
+						maxVersion = version;
+					}						
+			}
+		}
+	}
+	if (result == null)
+		throw new RuntimeException("Could not find bootstrap code. Check location of boot plug-in or specify -boot.");
+	return result.replace(File.separatorChar, '/') + "/";
+}
+/**
+ * Returns the update loader for the given boot path.
+ * 
+ * @return the update loader
+ * @param base the boot path base
+ * @exception Exception thrown is a problem occurs determining this loader
+ */
+public Class getUpdateLoader(String base) throws Exception {
+	URLClassLoader loader = new URLClassLoader(getBootPath(base), null);
+	return loader.loadClass(UPDATELOADER);
+}
+/**
+ * Runs the platform with the given arguments.  The arguments must identify
+ * an application to run (e.g., <code>-application com.example.application</code>).
+ * After running the application <code>System.exit(N)</code> is executed.
+ * The value of N is derived from the value returned from running the application.
+ * If the application's return value is an <code>Integer</code>, N is this value.
+ * In all other cases, N = 0.
+ * <p>
+ * Clients wishing to run the platform without a following <code>System.exit</code>
+ * call should use <code>run()</code>.
+ *
+ * @see #run
+ * 
+ * @param args the command line arguments
+ */
+public static void main(String[] args) {
+	Object result = null;
+	try {
+		result = new Main().run(args);
+	} catch (Throwable e) {
+		// try and take down the splash screen.
+		endSplash();
+		System.out.println("Exception launching the Eclipse Platform:");
+		e.printStackTrace();
+	}
+	int exitCode = result instanceof Integer ? ((Integer) result).intValue() : 0;
+	System.exit(exitCode);
+}
+/**
+ * Tears down the currently-displayed splash screen.
+ */
+public static void endSplash() {
+	if (endSplash == null)
+		return;
+	try {
+		Runtime.getRuntime().exec(endSplash);
+	} catch (Exception e) {
+	}
+}
+
+/**
+ * Runs this launcher with the arguments specified in the given string.
+ * 
+ * @param argString the arguments string
+ * @exception Exception thrown if a problem occurs during launching
+ */
+public static void main(String argString) throws Exception {
+	Vector list = new Vector(5);
+	for (StringTokenizer tokens = new StringTokenizer(argString, " "); tokens.hasMoreElements();)
+		list.addElement(tokens.nextElement());
+	main((String[]) list.toArray(new String[list.size()]));
+}
+
+/**
+ * Processes the command line arguments
+ * 
+ * @return the arguments to pass through to the launched application
+ * @param args the command line arguments
+ */
+protected String[] processCommandLine(String[] args) throws Exception {
+	int[] configArgs = new int[100];
+	configArgs[0] = -1; // need to initialize the first element to something that could not be an index.
+	int configArgIndex = 0;
+	for (int i = 0; i < args.length; i++) {
+		boolean found = false;
+		// check for args without parameters (i.e., a flag arg)
+		// check if debug should be enabled for the entire platform
+		if (args[i].equalsIgnoreCase(DEBUG)) {
+			debug = true;
+			// passed thru this arg (i.e., do not set found = true
+			continue;
+		}
+		
+		// check if development mode should be enabled for the entire platform
+		// If this is the last arg or there is a following arg (i.e., arg+1 has a leading -), 
+		// simply enable development mode.  Otherwise, assume that that the following arg is
+		// actually some additional development time class path entries.  This will be processed below.
+		if (args[i].equalsIgnoreCase(DEV) && ((i + 1 == args.length) || ((i + 1 < args.length) && (args[i + 1].startsWith("-"))))) {
+			inDevelopmentMode = true;
+			// do not mark the arg as found so it will be passed through
+			continue;
+		}
+
+		// done checking for args.  Remember where an arg was found 
+		if (found) {
+			configArgs[configArgIndex++] = i;
+			continue;
+		}
+		// check for args with parameters. If we are at the last argument or if the next one
+		// has a '-' as the first character, then we can't have an arg with a parm so continue.
+		if (i == args.length - 1 || args[i + 1].startsWith("-")) 
+			continue;
+		String arg = args[++i];
+
+		// look for the laucher to run
+		if (args[i - 1].equalsIgnoreCase(BOOT)) {
+			bootLocation = arg;
+			found = true;
+		}
+
+		// look for the development mode and class path entries.  
+		if (args[i - 1].equalsIgnoreCase(DEV)) {
+			inDevelopmentMode = true;
+			devClassPath = arg;
+			continue;
+		}
+
+		// look for the application to run
+		if (args[i - 1].equalsIgnoreCase(APPLICATION)) {
+			application = arg;
+			found = true;
+		}
+
+		// look for token to use to end the splash screen
+		if (args[i - 1].equalsIgnoreCase(ENDSPLASH)) {
+			endSplash = arg;
+			continue;
+		}
+
+		// look for items to uninstall
+		if (args[i - 1].equalsIgnoreCase(UNINSTALL)) {
+			uninstall = true;
+			uninstallCookie = arg;
+			found = true;
+		}
+
+		// done checking for args.  Remember where an arg was found 
+		if (found) {
+			configArgs[configArgIndex++] = i - 1;
+			configArgs[configArgIndex++] = i;
+		}
+	}
+	// remove all the arguments consumed by this argument parsing
+	if (configArgIndex == 0)
+		return args;
+	String[] passThruArgs = new String[args.length - configArgIndex];
+	configArgIndex = 0;
+	int j = 0;
+	for (int i = 0; i < args.length; i++) {
+		if (i == configArgs[configArgIndex])
+			configArgIndex++;
+		else
+			passThruArgs[j++] = args[i];
+	}
+	return passThruArgs;
+}
+/**
+ * Runs the application to be launched.
+ * 
+ * @return the return value from the launched application
+ * @param args the arguments to pass to the application
+ * @exception thrown if a problem occurs during launching
+ */
+public Object run(String[] args) throws Exception {
+	String[] passThruArgs = processCommandLine(args);
+	if (uninstall)
+		return updateRun(UNINSTALL, uninstallCookie, passThruArgs);
+	else
+		return basicRun(passThruArgs);
+}
+/**
+ * Performs an update run.
+ * 
+ * @return the return value from the update loader
+ * @param flag flag to give to the update loader
+ * @param value value to give to the update loader
+ * @param args arguments to give to the update loader.
+ * @exception Exception thrown if a problem occurs during execution
+ */
+protected Object updateRun(String flag, String value, String[] args) throws Exception {
+	Class clazz = getUpdateLoader(bootLocation);
+	Method method = clazz.getDeclaredMethod("run", new Class[] { String.class, String.class, String.class, String[].class });
+	try {
+		return method.invoke(clazz, new Object[] { flag, value, location, args });
+	} catch (InvocationTargetException e) {
+		if (e.getTargetException() instanceof Error)
+			throw (Error) e.getTargetException();
+		else
+			throw e;
+	}
+}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/NewMain.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/NewMain.java
new file mode 100644
index 0000000..f570c06
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/NewMain.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Properties;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+/** 
+ * Application is responsible for calling core launch api
+ */
+
+public class NewMain extends Main {
+	private static final String DEFAULT_APPLICATION= "org.eclipse.ui.workbench";
+	
+	
+	public NewMain(String application, String location, URL pluginPathLocation, String bootLocation, boolean debug) throws IOException {
+		this.application= application;
+		this.location= location;
+		this.pluginPathLocation= pluginPathLocation;
+		this.bootLocation= bootLocation;
+	}
+	
+	public static void main(String[] args) {
+		try {
+			String location= getLocationFromProperties("platform");
+			new NewMain(DEFAULT_APPLICATION, location, null, null, true).run(args);
+		} catch (Throwable e) {
+			System.out.println("Exception launching the Eclipse Platform UI:");
+			e.printStackTrace();
+		}
+		System.exit(0);
+	}
+	
+
+	/**
+	 * Run this launcher with the arguments specified in the given string.
+	 * This is a short cut method for people running the launcher from
+	 * a scrapbook (i.e., swip-and-doit facility).
+	 */
+	public static void main(String argString) throws Exception {
+		Vector list= new Vector(5);
+		for (StringTokenizer tokens= new StringTokenizer(argString, " "); tokens.hasMoreElements();)
+			list.addElement(tokens.nextElement());
+		main((String[]) list.toArray(new String[list.size()]));
+	}
+	
+	public static String getLocationFromProperties(String key) {
+		Properties properties= new Properties();
+		try {
+			FileInputStream fis= new FileInputStream(getSettingsFile());
+			properties.load(fis);
+			return properties.getProperty(key);
+		} catch (IOException e) {
+		}
+		return null;
+	}	
+	
+	private static File getSettingsFile() {
+		String home= System.getProperty("user.home");
+		if (home == null) {
+			System.out.println("Home dir not defined");
+			return null;
+		}
+		return new File(home, "eclipse-workspaces.properties");	
+	}	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/TestPluginLauncher.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/TestPluginLauncher.java
new file mode 100644
index 0000000..739772e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/TestPluginLauncher.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin;
+
+import java.net.URL;
+
+/**
+ * Helper class to launch a test
+ */
+public class TestPluginLauncher {
+	
+	public static final String APP_NAME= "org.eclipse.jdt.ui.tests.app";
+	
+	public static void run(String location, Class testCase, String[] args) {
+		run(APP_NAME, location, testCase, args);
+	}
+	
+	public static void run(String application, String location, Class testCase, String[] args) {
+		try {
+			String bootLocation= getBootLocation();
+			int nArgs= args.length;
+			String[] newArgs= new String[4 + nArgs];
+			newArgs[0]= testCase.getName();
+			for (int i= 0; i < nArgs; i++) {
+				newArgs[1 + i]= args[i];
+			}
+			newArgs[1 + nArgs]= "-dev";
+			newArgs[1 + nArgs + 1]= "bin";
+			newArgs[1 + nArgs + 2]= "-debug";
+			NewMain newMain= new NewMain(application, location, null, bootLocation, false);
+			newMain.run(newArgs);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public static String getLocationFromProperties(String key) {
+		return NewMain.getLocationFromProperties(key);
+	}
+	
+	public static String getLocationFromProperties() {
+		return NewMain.getLocationFromProperties("tests");
+	}
+	
+	public static String getBootLocation() {
+		URL url= TestPluginLauncher.class.getResource("TestPluginLauncher.class");
+		String s= url.toString();
+		int index= s.indexOf("/org.eclipse.jdt.ui.tests");
+		if (index == -1)
+			throw new IllegalArgumentException();
+		s= s.substring(0, index);
+		s= s + "/org.eclipse.core.boot/boot.jar";
+		return s;
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/TestProject.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/TestProject.java
new file mode 100644
index 0000000..cc26d38
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/TestProject.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.core.ICOwner;
+import org.eclipse.core.runtime.CoreException;
+
+public class TestProject implements ICOwner {
+
+	public void configure(ICDescriptor cDescriptor) throws CoreException {
+		cDescriptor.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, TestScannerProvider.SCANNER_ID);
+	}
+
+	public void update(ICDescriptor cDescriptor, String extensionID) throws CoreException {
+		if ( extensionID.equals(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID)) {
+			cDescriptor.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, TestScannerProvider.SCANNER_ID);
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/TestScannerInfo.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/TestScannerInfo.java
new file mode 100644
index 0000000..371eff2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/TestScannerInfo.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.cdt.core.parser.IExtendedScannerInfo;
+
+public class TestScannerInfo implements IExtendedScannerInfo {
+	private static final String[] EMPTY = new String[0];
+	private static final Map EMPTY_MAP = new HashMap(0);
+	private String[] fIncludes;
+	private String[] fIncludeFiles;
+	private String[] fMacroFiles;
+
+	public TestScannerInfo(String[] includes, String[] includeFiles, String[] macroFiles) {
+		fIncludes= includes;
+		fIncludeFiles= includeFiles;
+		fMacroFiles= macroFiles;
+	}
+	public Map getDefinedSymbols() {
+		return EMPTY_MAP;
+	}
+
+	public String[] getIncludePaths() {
+		return fIncludes == null ? EMPTY : fIncludes;
+	}
+	public String[] getIncludeFiles() {
+		return fIncludeFiles == null ? EMPTY: fIncludeFiles;
+	}
+	public String[] getLocalIncludePath() {
+		return null;
+	}
+	public String[] getMacroFiles() {
+		return fMacroFiles == null ? EMPTY: fMacroFiles;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/TestScannerProvider.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/TestScannerProvider.java
new file mode 100644
index 0000000..24c3d64
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/TestScannerProvider.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin;
+
+import org.eclipse.cdt.core.AbstractCExtension;
+import org.eclipse.cdt.core.parser.IScannerInfo;
+import org.eclipse.cdt.core.parser.IScannerInfoChangeListener;
+import org.eclipse.cdt.core.parser.IScannerInfoProvider;
+import org.eclipse.core.resources.IResource;
+
+public class TestScannerProvider extends AbstractCExtension implements IScannerInfoProvider {
+
+	public static String[] sIncludes= null;
+	public static String[] sIncludeFiles= null;
+	public static String[] sMacroFiles= null;
+	public final static String SCANNER_ID = CTestPlugin.PLUGIN_ID + ".TestScanner";
+	
+	public static void clear() {
+		sIncludes= sIncludeFiles= sMacroFiles= null;
+	}
+	
+	public IScannerInfo getScannerInformation(IResource resource) {
+		return new TestScannerInfo(sIncludes, sIncludeFiles, sMacroFiles);
+	}
+
+	public void subscribe(IResource resource, IScannerInfoChangeListener listener) {
+	}
+
+	public void unsubscribe(IResource resource, IScannerInfoChangeListener listener) {
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/AccessibilityTestPass.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/AccessibilityTestPass.java
new file mode 100644
index 0000000..3f11e0c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/AccessibilityTestPass.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin.util;
+
+
+import java.util.ArrayList;
+
+
+public class AccessibilityTestPass implements IDialogTestPass {
+	private static final int CHECKLIST_SIZE = 5;
+	
+	/**
+	 * @see IDialogTestPass#title()
+	 */
+	public String title() {
+		return "Test Pass: Accessibility";
+	}
+	/**
+	 * @see IDialogTestPass#description()
+	 */
+	public String description() {
+		return "Verify the accessibility of the dialogs.";
+	}
+	/**
+	 * @see IDialogTestPass#label()
+	 */
+	public String label() {
+		return "&Accessibility";
+	}	
+	/**
+	 * @see IDialogTestPass#checkListTexts()
+	 */
+	public ArrayList checkListTexts() {
+		ArrayList list = new ArrayList(CHECKLIST_SIZE);
+		list.add("&1) all widgets are accessible by tabbing.");
+		list.add("&2) forwards and backwards tabbing is in a logical order");
+		list.add("&3) all the widgets with labels have an appropriate mnemonic.");
+		list.add("&4) there are no duplicate mnemonics.");
+		list.add("&5) selectable widgets can be selected using the spacebar.");
+		return list;
+	}
+	/**
+	 * @see IDialogTestPass#failureTexts()
+	 * Size of the return array must be the same size as the checkListTexts'
+	 * ArrayList.
+	 */
+	public String[] failureTexts() {
+		String[] failureText = new String[CHECKLIST_SIZE];
+		failureText[0] = "Some widgets aren't accessible by tabbing.";
+		failureText[1] = "Tabbing order is illogical.";
+		failureText[2] = "Missing or inappropriate mnemonics.";
+		failureText[3] = "Duplicate mnemonics.";
+		failureText[4] = "Some widgets cannot be selected using the spacebar.";
+		return failureText;
+	}
+	/**
+	 * @see IDialogTestPass#queryText()
+	 */
+	public String queryText() {
+		return "Is the accessibility of the dialog acceptable?";
+	}
+	/**
+	 * @see IDialogTestPass#getID()
+	 */
+	public int getID() {
+		return VerifyDialog.TEST_ACCESS;
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/BaseTestCase.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/BaseTestCase.java
new file mode 100644
index 0000000..7574717
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/BaseTestCase.java
@@ -0,0 +1,280 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *    Andrew Ferguson (Symbian)
+ *******************************************************************************/ 
+package org.eclipse.cdt.core.testplugin.util;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestFailure;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ElementChangedEvent;
+import org.eclipse.cdt.core.model.IElementChangedListener;
+import org.eclipse.cdt.core.testplugin.TestScannerProvider;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase;
+import org.eclipse.core.resources.IResourceStatus;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.ILogListener;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+public class BaseTestCase extends TestCase {
+	protected static final IProgressMonitor NPM= new NullProgressMonitor();
+
+	private boolean fExpectFailure= false;
+	private int fBugnumber= 0;
+	private int fExpectedLoggedNonOK= 0;
+	
+	public BaseTestCase() {
+		super();
+	}
+	
+	public BaseTestCase(String name) {
+		super(name);
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		CPPASTNameBase.sAllowRecursionBindings= false;
+		CPPASTNameBase.sAllowNameComputation= false;
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		TestScannerProvider.clear();
+	}
+
+	protected static TestSuite suite(Class clazz) {
+		return suite(clazz, null);
+	}
+	
+	protected static TestSuite suite(Class clazz, String failingTestPrefix) {
+		TestSuite suite= new TestSuite(clazz);
+		Test failing= getFailingTests(clazz, failingTestPrefix);
+		if (failing != null) {
+			suite.addTest(failing);
+		}
+		return suite;
+	}
+
+	private static Test getFailingTests(Class clazz, String prefix) {
+		TestSuite suite= new TestSuite("Failing Tests");
+		HashSet names= new HashSet();
+		Class superClass= clazz;
+		while (Test.class.isAssignableFrom(superClass) && !TestCase.class.equals(superClass)) {
+			Method[] methods= superClass.getDeclaredMethods();
+			for (int i= 0; i < methods.length; i++) {
+				addFailingMethod(suite, methods[i], names, clazz, prefix);
+			}
+			superClass= superClass.getSuperclass();
+		}
+		if (suite.countTestCases() == 0) {
+			return null;
+		}
+		return suite;
+	}
+
+	private static void addFailingMethod(TestSuite suite, Method m, Set names, Class clazz, String prefix) {
+		String name= m.getName();
+		if (!names.add(name)) {
+			return;
+		}
+		if (name.startsWith("test") || (prefix != null && !name.startsWith(prefix))) {
+			return;
+		}
+		if (name.equals("tearDown") || name.equals("setUp") || name.equals("runBare")) {
+			return;
+		}
+		if (Modifier.isPublic(m.getModifiers())) {
+			Class[] parameters= m.getParameterTypes();
+			Class returnType= m.getReturnType();
+			if (parameters.length == 0 && returnType.equals(Void.TYPE)) {
+				Test test= TestSuite.createTest(clazz, name);
+				((BaseTestCase) test).setExpectFailure(0);
+				suite.addTest(test);
+			}
+		}
+	}
+
+	@Override
+	public void runBare() throws Throwable {
+		final List<IStatus> statusLog= Collections.synchronizedList(new ArrayList());
+		ILogListener logListener= new ILogListener() {
+			public void logging(IStatus status, String plugin) {
+				if(!status.isOK() && status.getSeverity() != IStatus.INFO) {
+					switch (status.getCode()) {
+					case IResourceStatus.NOT_FOUND_LOCAL:
+					case IResourceStatus.NO_LOCATION_LOCAL:
+					case IResourceStatus.FAILED_READ_LOCAL:
+					case IResourceStatus.RESOURCE_NOT_LOCAL:
+						// logged by the resources plugin.
+						return;
+					}
+					statusLog.add(status);
+				}
+			}
+		};
+		final CCorePlugin corePlugin = CCorePlugin.getDefault();
+		if (corePlugin != null) { // if we don't run a JUnit Plugin Test
+			corePlugin.getLog().addLogListener(logListener);
+		}
+		
+		Throwable testThrowable= null;
+		try {
+			try {
+				super.runBare();
+			} catch(Throwable e) {
+				testThrowable=e;
+			}
+			
+			if(statusLog.size()!=fExpectedLoggedNonOK) {
+				StringBuffer msg= new StringBuffer("Expected number ("+fExpectedLoggedNonOK+") of ");
+				msg.append("non-OK status objects differs from actual ("+statusLog.size()+").\n");
+				Throwable cause= null;
+				if(!statusLog.isEmpty()) {
+					for(IStatus status : statusLog) {
+						IStatus[] ss= {status};
+						ss= status instanceof MultiStatus ? ((MultiStatus)status).getChildren() : ss; 
+						for(IStatus s : ss) {
+							msg.append("\t"+s.getMessage()+" ");
+							
+							Throwable t= s.getException();
+							cause= (cause==null) ? t : cause;
+							if(t != null) {
+								msg.append(t.getMessage()!=null ? t.getMessage() : t.getClass().getCanonicalName());
+							}
+							
+							msg.append("\n");
+						}
+					}
+				}
+				cause= (cause==null) ? testThrowable : cause;
+				AssertionFailedError afe= new AssertionFailedError(msg.toString());
+				afe.initCause(cause);
+				throw afe;
+			}
+		} finally {
+			if (corePlugin != null) {
+				corePlugin.getLog().removeLogListener(logListener);
+			}
+		}
+		
+		if(testThrowable!=null)
+			throw testThrowable;
+	}
+
+    @Override
+	public void run( TestResult result ) {
+    	if (!fExpectFailure || "true".equals(System.getProperty("SHOW_EXPECTED_FAILURES"))) {
+    		super.run(result);
+    		return;
+    	}
+    	
+        result.startTest( this );
+        
+        TestResult r = new TestResult();
+        super.run( r );
+        if (r.failureCount() == 1) {
+        	TestFailure failure= (TestFailure) r.failures().nextElement();
+        	String msg= failure.exceptionMessage();
+        	if (msg != null && msg.startsWith("Method \"" + getName() + "\"")) {
+        		result.addFailure(this, new AssertionFailedError(msg));
+        	}
+        }
+        else if( r.errorCount() == 0 && r.failureCount() == 0 )
+        {
+            String err = "Unexpected success of " + getName();
+            if( fBugnumber > 0 ) {
+                err += ", bug #" + fBugnumber; 
+            }
+            result.addFailure( this, new AssertionFailedError( err ) );
+        }
+        
+        result.endTest( this );
+    }
+    
+    public void setExpectFailure(int bugnumber) {
+    	fExpectFailure= true;
+    	fBugnumber= bugnumber;
+    }
+    
+    /**
+     * The last value passed to this method in the body of a testXXX method
+     * will be used to determine whether or not the presence of non-OK status objects
+     * in the log should fail the test. If the logged number of non-OK status objects
+     * differs from the last value passed, the test is failed. If this method is not called
+     * at all, the expected number defaults to zero.
+     * @param value
+     */
+    public void setExpectedNumberOfLoggedNonOKStatusObjects(int count) {
+    	fExpectedLoggedNonOK= count;
+    }
+    
+    /**
+     * Some test steps need synchronizing against a CModel event. This class
+     * is a very basic means of doing that.
+     */
+    static protected class ModelJoiner implements IElementChangedListener {
+		private boolean[] changed= new boolean[1];
+		
+		public ModelJoiner() {
+			CoreModel.getDefault().addElementChangedListener(this);
+		}
+		
+		public void clear() {
+			synchronized (changed) {
+				changed[0]= false;
+				changed.notifyAll();
+			}
+		}
+		
+		public void join() throws CoreException {
+			try {
+				synchronized(changed) {
+					while(!changed[0]) {
+						changed.wait();
+					}
+				}
+			} catch(InterruptedException ie) {
+				throw new CoreException(CCorePlugin.createStatus("Interrupted", ie));
+			}
+		}
+		
+		public void dispose() {
+			CoreModel.getDefault().removeElementChangedListener(this);
+		}
+		
+		public void elementChanged(ElementChangedEvent event) {
+			// Only respond to post change events
+			if (event.getType() != ElementChangedEvent.POST_CHANGE)
+				return;
+			
+			synchronized (changed) {
+				changed[0]= true;
+				changed.notifyAll();
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/ExpectedStrings.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/ExpectedStrings.java
new file mode 100644
index 0000000..381c389
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/ExpectedStrings.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin.util;
+
+
+import java.util.Stack;
+/**
+ * @author Peter Graves
+ *
+ * This utility class maintains a list of strings, and as a tests finds strings
+ * in a structure/list, it will maintain a list of unfound/extra strings.
+ */
+public class ExpectedStrings {
+
+	public String [] expStrings;
+	private boolean[] foundStrings; 
+	private Stack extraStrings; 	/* A stack of the unecpected strings we 
+									 * recieved
+									 */
+	private boolean extra;
+
+	/**
+	 * Constructor for ExpectedStrings.
+	 */
+	public ExpectedStrings() {
+	}
+	/**
+	 * Constructor for ExpectedStrings that accepts a list of strings that
+	 * we expect to get.
+	 */
+	public ExpectedStrings(String[] values) {
+		int x;
+		expStrings=new String[values.length];
+		for (x=0;x<values.length;x++) {
+			expStrings[x]=new String(values[x]);
+		}
+		foundStrings=new boolean[values.length];
+		for (x=0;x<values.length;x++) {
+			foundStrings[x]=false;
+		}
+		extraStrings=new Stack();
+		extra=false;
+	}
+	
+	public int foundString(String current) {
+		int x;
+		for (x=0;x<expStrings.length;x++) {
+			if (current.equals(expStrings[x])) {
+				foundStrings[x]=true;
+				return(0);
+			}
+		}
+		/* If we arrive here, the strings was not found, so this is
+		 * and extra string
+		 */
+
+		 extraStrings.push(new String(current));
+		 extra=true;
+		 return(1);
+	}
+	public int getNum(String name) {
+		int x;
+		for (x=0;x<expStrings.length;x++) {
+			if (name.equals(expStrings[x]))
+				return(x);
+		}
+		return(-1);
+	}
+	public boolean gotAll() {
+		int x;
+		for (x=0;x<expStrings.length;x++) {
+			if (foundStrings[x]==false)
+				return(false);
+		}
+		return(true);
+	}
+	public boolean gotExtra() {
+		return(extra);
+	}
+	public String getMissingString() {
+		int x;
+		String missing = new String("Missing elements: ");
+		for (x=0;x<expStrings.length;x++) {
+			if (foundStrings[x]==false)
+				missing+=expStrings[x];
+				missing+=" ";
+		}
+		return(missing);
+	}
+	public String getExtraString() {
+		String extra= new String("Extra elements: ");
+		while (!extraStrings.empty()) {
+			extra+=extraStrings.pop();
+			extra+=" ";
+		}
+		return(extra);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/ExpectedStringsTests.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/ExpectedStringsTests.java
new file mode 100644
index 0000000..2f00f26
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/ExpectedStringsTests.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin.util;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * @author Peter Graves
+ *
+ *Some simple tests to make sure our ExtraStrings class seems to work.
+ */
+public class ExpectedStringsTests extends TestCase {
+
+	/**
+	 * Constructor for ExpectedStringsTests.
+	 * @param name
+	 */
+	public ExpectedStringsTests(String name) {
+		super(name);
+	}
+	    /**
+     * Sets up the test fixture.
+     *
+     * Called before every test case method.
+     * 
+     * Example code test the packages in the project 
+     *  "com.qnx.tools.ide.cdt.core"
+     */
+    protected void setUp() {
+
+
+    }
+    
+     /**
+     * Tears down the test fixture.
+     *
+     * Called after every test case method.
+     */
+    protected void tearDown() {
+       // release resources here and clean-up
+    }
+    
+    public static TestSuite suite() {
+        return new TestSuite(ExpectedStringsTests.class);
+    }
+    
+    public static void main (String[] args){
+        junit.textui.TestRunner.run(suite());
+    }
+
+	public void testGotAll() {
+		ExpectedStrings myExp;
+		String[] strings= {"stringOne", "stringTwo", "stringThree" };
+		
+		myExp=new ExpectedStrings(strings);
+		assertTrue("No found strings", !myExp.gotAll());
+		myExp.foundString("stringOne");
+		assertTrue("1 found strings", !myExp.gotAll());
+		myExp.foundString("stringTwo");
+		assertTrue("2 found strings", !myExp.gotAll());
+		myExp.foundString("stringThree");
+		assertTrue("All found strings", myExp.gotAll());
+		
+		
+	}
+	public void testGotExtra () {
+		ExpectedStrings myExp;
+		String[] strings= {"stringOne", "stringTwo", "stringThree" };
+		
+		myExp=new ExpectedStrings(strings);
+		assertTrue("No found strings", !myExp.gotExtra());
+		myExp.foundString("stringOne");
+		assertTrue("1 found strings", !myExp.gotExtra());
+		myExp.foundString("stringTwo");
+		assertTrue("2 found strings", !myExp.gotExtra());
+		myExp.foundString("stringThree");
+		assertTrue("All found strings", !myExp.gotExtra());
+		myExp.foundString("Somerandomestring");
+		assertTrue("Extra String", myExp.gotExtra());
+		
+	}
+	
+	public void testGetMissingString()
+	{
+		ExpectedStrings myExp;
+		String[] strings= {"stringOne", "stringTwo", "stringThree" };
+		
+		myExp=new ExpectedStrings(strings);
+		assertNotNull(myExp.getMissingString());
+		myExp.foundString("stringOne");
+		assertNotNull(myExp.getMissingString());
+		myExp.foundString("stringTwo");
+		assertNotNull(myExp.getMissingString());
+		myExp.foundString("stringThree");
+		assertNotNull(myExp.getMissingString());
+
+	}
+	
+	public void testGetExtraString()
+	{
+		ExpectedStrings myExp;
+		String[] strings= {"stringOne", "stringTwo", "stringThree" };
+		
+		myExp=new ExpectedStrings(strings);
+		assertNotNull(myExp.getExtraString());
+		myExp.foundString("stringOnenot");
+		assertNotNull(myExp.getMissingString());
+		myExp.foundString("stringTwonot");
+		assertNotNull(myExp.getMissingString());
+
+	}
+
+
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/FailureDialog.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/FailureDialog.java
new file mode 100644
index 0000000..637c620
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/FailureDialog.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin.util;
+ 
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.resource.JFaceResources;
+
+/*
+ * A dialog for collecting notes from the tester regarding
+ * the failure of a test.
+ */
+public class FailureDialog extends Dialog {
+	private Text _text;
+	private String _log;
+	private int SIZING_TEXT_WIDTH = 400;
+	private int SIZING_TEXT_HEIGHT = 200;
+	
+	/**
+	 * Constructor for FailureDialog
+	 */
+	public FailureDialog(Shell parentShell) {
+		super(parentShell);
+	}
+	/* (non-Javadoc)
+	 * Method declared on Window.
+	 */
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Dialog Test Failed");
+	}
+	/* (non-Javadoc)
+	 * Method declared on Dialog.
+	 */
+	protected void createButtonsForButtonBar(Composite parent) {
+		createButton(parent, IDialogConstants.OK_ID, "&OK", true);
+		createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
+	}
+	/* (non-Javadoc)
+	 * Method declared on Dialog.
+	 */
+	protected Control createDialogArea(Composite parent) {
+		// page group
+		Composite composite = (Composite)super.createDialogArea(parent);
+		composite.setSize( composite.computeSize(SWT.DEFAULT, SWT.DEFAULT) );
+		
+		Label label = new Label(composite, SWT.WRAP);
+		label.setText("&Enter a note regarding the failure:");
+		
+		_text = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+		_text.setFont( JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT) );
+		GridData data = new GridData(GridData.FILL_BOTH);
+		data.widthHint = SIZING_TEXT_WIDTH;
+		data.heightHint = SIZING_TEXT_HEIGHT;
+		_text.setLayoutData(data);
+		
+		return composite;
+	}
+	/* (non-Javadoc)
+	 * Method declared on Dialog.
+	 */
+	protected void okPressed() {		
+		_log = _text.getText();
+		super.okPressed();
+	}
+	/*
+	 * @return String the text contained in the input area of
+	 * the dialog.
+	 */
+	String getText() {
+		if (_log == null) {
+			return "Empty entry.";
+		} else {
+			return _log;
+		}
+	}
+	/*
+	 * Sets the text of the input area.  This should only be
+	 * called to set the initial text so only call before invoking
+	 * open().
+	 */
+	void setText(String text) {
+		_text.setText(text);
+	}
+	/*
+	 * Returns a string representation of this class which
+	 * the text contained in the input area of the dialog.
+	 */
+	public String toString() {
+		return getText();
+	}
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/FocusTestPass.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/FocusTestPass.java
new file mode 100644
index 0000000..1e074ae
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/FocusTestPass.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin.util;
+
+import java.util.ArrayList;
+
+/*
+ * This test pass verifies the initial focus of a dialog
+ * when it is given focus.
+ */
+public class FocusTestPass implements IDialogTestPass {
+	private static final int CHECKLIST_SIZE = 1;
+
+	/**
+	 * @see IDialogTestPass#title()
+	 */
+	public String title() {
+		return "Test Pass: Initial Focus";
+	}
+	/**
+	 * @see IDialogTestPass#description()
+	 */
+	public String description() {
+		return "Verify the initial focus of the dialogs.";
+	}
+	/**
+	 * @see IDialogTestPass#label()
+	 */
+	public String label() {
+		return "&Initial Focus";
+	}	
+	/**
+	 * @see IDialogTestPass#checkListTexts()
+	 */
+	public ArrayList checkListTexts() {
+		ArrayList list = new ArrayList(CHECKLIST_SIZE);
+		list.add("&1) the initial focus is appropriate.");
+		return list;
+	}
+	/**
+	 * @see IDialogTestPass#failureTexts()
+	 * Size of the return array must be the same size as the checkListTexts'
+	 * ArrayList.
+	 */
+	public String[] failureTexts() {
+		String[] failureText = new String[CHECKLIST_SIZE];
+		failureText[0] = "The initial focus is inappropriate.";
+		return failureText;
+	}
+	/**
+	 * @see IDialogTestPass#queryText()
+	 */
+	public String queryText() {
+		return "Is the initial focus of the dialog correct?";
+	}
+	/**
+	 * @see IDialogTestPass#getID()
+	 */
+	public int getID() {
+		return VerifyDialog.TEST_FOCUS;
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/IDialogTestPass.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/IDialogTestPass.java
new file mode 100644
index 0000000..2ef312f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/IDialogTestPass.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin.util;
+
+
+import java.util.ArrayList;
+
+
+/*
+ * Interface to describe a visual test pass for a dialog test.
+ */
+public interface IDialogTestPass {
+	/*
+	 * @return String The title of the test pass.
+	 */
+	public String title();
+	/*
+	 * @return String The description of the test pass.
+	 */
+	public String description();
+	/*
+	 * @return String The label of the test pass to be used
+	 * in a selection list.  The return includes an '&'
+	 * if a mnemonic is desired.
+	 */
+	public String label();
+	/*
+	 * @return ArrayList A list of items to appear in a checklist.
+	 * The items in the list must be Strings and should include an
+	 * '&' if a mnemonic is desired.
+	 */
+	public ArrayList checkListTexts();
+	/*
+	 * @return String[] Associated failure messages that correspond
+	 * to the checklist items.  The size of this array should be the
+	 * same size as the checklist.
+	 */
+	public String[] failureTexts();
+	/*
+	 * @return String The test that corresponds to the test pass to
+	 * which the tester will respond with a 'yes' or 'no'.
+	 */
+	public String queryText();
+	/*
+	 * @return int A unique number that identifies the test pass.
+	 */
+	public int getID();
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/SizingTestPass.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/SizingTestPass.java
new file mode 100644
index 0000000..fdf4c5a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/SizingTestPass.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin.util;
+
+import java.util.ArrayList;
+
+/*
+ * This test pass verifies visually the sizing of the dialog and its
+ * widgets.
+ */
+class SizingTestPass implements IDialogTestPass {
+	private static final int CHECKLIST_SIZE = 5;
+
+	/**
+	 * @see IDialogTestPass#title()
+	 */
+	public String title() {
+		return "Test Pass: Sizing and Display";
+	}
+	/**
+	 * @see IDialogTestPass#description()
+	 */
+	public String description() {
+		return "Verify the sizing and display of the dialogs and widgets.";
+	}
+	/**
+	 * @see IDialogTestPass#label()
+	 */
+	public String label() {
+		return "&Sizing and Display";
+	}	
+	/**
+	 * @see IDialogTestPass#checkListTexts()
+	 */
+	public ArrayList checkListTexts() {
+		ArrayList list = new ArrayList(CHECKLIST_SIZE);
+		list.add("&1) the correct dialog displays.");
+		list.add("&2) the dialog is an appropriate size for the required resolution (1024x768).");
+		list.add("&3) the texts are correct and not cut off.");
+		list.add("&4) all strings have been externalized properly.");
+		list.add("&5) all the widgets are viewable and not cut off.");
+		return list;
+	}
+	/**
+	 * @see IDialogTestPass#failureTexts()
+	 * Size of the return array must be the same size as the checkListTexts'
+	 * ArrayList.
+	 */
+	public String[] failureTexts() {
+		String[] failureText = new String[CHECKLIST_SIZE];
+		failureText[0] = "The wrong dialog displayed.";
+		failureText[1] = "The dialog is too large for the required resolution.";
+		failureText[2] = "Text labels are wrong or cut off.";
+		failureText[3] = "Some strings have not been externalized properly.";
+		failureText[4] = "Some widgets are cut off.";
+		return failureText;
+	}
+	/**
+	 * @see IDialogTestPass#queryText()
+	 */
+	public String queryText() {
+		return "Is the sizing and display of the dialog correct?";
+	}
+	/**
+	 * @see IDialogTestPass#getID()
+	 */
+	public int getID() {
+		return VerifyDialog.TEST_SIZING;
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java
new file mode 100644
index 0000000..2ec104a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java
@@ -0,0 +1,314 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *    Andrew Ferguson (Symbian)
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.core.testplugin.util;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ILinkage;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexFile;
+import org.eclipse.cdt.core.index.IndexLocationFactory;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.osgi.framework.Bundle;
+
+/**
+ * Utilities for reading test source code from plug-in .java sources
+ */
+public class TestSourceReader {
+
+	/**
+	 * Returns an array of StringBuffer objects for each comment section found preceding the named
+	 * test in the source code. 
+	 * @param bundle the bundle containing the source
+	 * @param srcRoot the directory inside the bundle containing the packages
+	 * @param clazz the name of the class containing the test
+	 * @param testName the name of the test
+	 * @param sections the number of comment sections preceding the named test to return
+	 * @return an array of StringBuffer objects for each comment section found preceding the named
+	 * test in the source code. 
+	 * @throws IOException
+	 */
+	public static StringBuffer[] getContentsForTest(Bundle bundle, String srcRoot, Class clazz, final String testName, int sections) throws IOException {
+		String fqn = clazz.getName().replace('.', '/');
+		fqn = fqn.indexOf("$")==-1 ? fqn : fqn.substring(0,fqn.indexOf("$"));
+		IPath filePath= new Path(srcRoot + '/' + fqn + ".java");
+	    
+		InputStream in;
+		try {
+			in = FileLocator.openStream(bundle, filePath, false);
+		} catch(IOException e) {
+			if(clazz.getSuperclass()!=null && !clazz.equals(TestCase.class)) {
+		    	return getContentsForTest(bundle, srcRoot, clazz.getSuperclass(), testName, sections);
+		    }
+			throw e;
+		}
+	    
+	    BufferedReader br = new BufferedReader(new InputStreamReader(in));
+	    
+	    List contents = new ArrayList();
+	    StringBuffer content = new StringBuffer();
+	    for(String line = br.readLine(); line!=null; line = br.readLine()) {
+	    	line = line.replaceFirst("^\\s*", ""); // replace leading whitespace, preserve trailing
+	    	if(line.startsWith("//")) {
+	    		content.append(line.substring(2)+"\n");
+	    	} else {
+	    		if(content.length()>0) {
+	    			contents.add(content);
+	    			if(contents.size()==sections+1)
+	    				contents.remove(0);
+	    			content = new StringBuffer();
+	    		}
+	    		int idx= line.indexOf(testName);
+	    		if( idx != -1 && !Character.isJavaIdentifierPart(line.charAt(idx+testName.length()))) {
+	    			return (StringBuffer[]) contents.toArray(new StringBuffer[contents.size()]);
+	    		}
+	    	}
+	    }
+	    
+	    if(clazz.getSuperclass()!=null && !clazz.equals(TestCase.class)) {
+	    	return getContentsForTest(bundle, srcRoot, clazz.getSuperclass(), testName, sections);
+	    }
+	    throw new IOException("Test data not found for "+clazz+" "+testName);	
+	}
+	
+	/**
+	 * Searches for the offset of the first occurrence of a string in a workspace file.
+	 * @param lookfor string to be searched for
+	 * @param fullPath full path of the workspace file
+	 * @return the offset or -1
+	 * @throws Exception 
+	 * @throws UnsupportedEncodingException 
+	 * @since 4.0
+	 */
+	public static int indexOfInFile(String lookfor, Path fullPath) throws Exception {
+		IFile file= ResourcesPlugin.getWorkspace().getRoot().getFile(fullPath);
+		Reader reader= new BufferedReader(new InputStreamReader(file.getContents(), file.getCharset()));
+		Assert.assertTrue(lookfor.indexOf('\n') == -1);
+		try {
+			int c= 0;
+			int offset= 0;
+			StringBuffer buf= new StringBuffer();
+			while ((c = reader.read()) >= 0) {
+				buf.append((char) c);
+				if (c == '\n') {
+					int idx= buf.indexOf(lookfor);
+					if (idx >= 0) {
+						return idx+offset;
+					}
+					offset+=buf.length();
+					buf.setLength(0);
+				}
+			}
+			int idx= buf.indexOf(lookfor);
+			if (idx >= 0) {
+				return idx+offset;
+			}
+			return -1;
+		} finally {
+			reader.close();
+		}
+	}
+	
+	public static int getLineNumber(int offset, Path fullPath) throws Exception {
+		IFile file= ResourcesPlugin.getWorkspace().getRoot().getFile(fullPath);
+		Reader reader= new BufferedReader(new InputStreamReader(file.getContents(), file.getCharset()));
+		try {
+			int line = 1;
+			for (int i = 0; i < offset; i++) {
+				int c= reader.read();
+				Assert.assertTrue(c >= 0);
+				if (c == '\n')
+					line++;
+			}
+			return line;
+		} finally {
+			reader.close();
+		}
+	}
+
+	/**
+	 * Reads a section in comments form the source of the given class. The section
+	 * is started with '// {tag}' and ends with the first line not started by '//' 
+	 * @since 4.0
+	 */
+	public static String readTaggedComment(Bundle bundle, String srcRoot, Class clazz, final String tag) throws IOException {
+	    IPath filePath= new Path(srcRoot + '/' + clazz.getName().replace('.', '/') + ".java");
+	    
+	    InputStream in= FileLocator.openStream(bundle, filePath, false);
+	    LineNumberReader reader= new LineNumberReader(new InputStreamReader(in));
+	    boolean found= false;
+	    final StringBuffer content= new StringBuffer();
+	    try {
+	        String line= reader.readLine();
+	        while (line != null) {
+	        	line= line.trim();
+	            if (line.startsWith("//")) {
+	                line= line.substring(2);
+	                if (found) {
+	                    content.append(line);
+	                    content.append('\n');
+	                } else {
+	                    line= line.trim();
+	                    if (line.startsWith("{" + tag)) {
+	                        if (line.length() == tag.length()+1 ||
+	                                !Character.isJavaIdentifierPart(line.charAt(tag.length()+1))) {
+	                            found= true;
+	                        }
+	                    }
+	                }
+	            } else if (found) {
+	                break;
+	            }
+	            line= reader.readLine();
+	        }
+	    }
+	    finally {
+	        reader.close();
+	    }
+	    Assert.assertTrue("Tag '" + tag + "' is not defined inside of '" + filePath + "'.", found);
+	    return content.toString();
+	}
+
+	/**
+	 * Creates a file with content at the given path inside the given container. 
+	 * If the file exists its content is replaced.
+	 * @param container a container to create the file in
+	 * @param filePath the path relative to the container to create the file at
+	 * @param contents the content for the file
+	 * @return a file object.
+	 * @throws CoreException 
+	 * @throws Exception
+	 * @since 4.0
+	 */    
+	public static IFile createFile(final IContainer container, final IPath filePath, final String contents) throws CoreException {
+		final IWorkspace ws = ResourcesPlugin.getWorkspace();
+		final IFile result[] = new IFile[1];
+		ws.run(new IWorkspaceRunnable() {
+			public void run(IProgressMonitor monitor) throws CoreException {
+				//Obtain file handle
+				IFile file = container.getFile(filePath);
+
+				InputStream stream = new ByteArrayInputStream(contents.getBytes());
+				//Create file input stream
+				if (file.exists()) {
+					long timestamp= file.getLocalTimeStamp();
+					file.setContents(stream, false, false, new NullProgressMonitor());
+					if (file.getLocalTimeStamp() == timestamp) {
+						file.setLocalTimeStamp(timestamp+1000);
+					}
+				} else {
+					createFolders(file);
+					file.create(stream, true, new NullProgressMonitor());
+				}
+				result[0]= file;
+			}
+			private void createFolders(IResource res) throws CoreException {
+				IContainer container= res.getParent();
+				if (!container.exists() && container instanceof IFolder) {
+					createFolders(container);
+					((IFolder) container).create(true, true, new NullProgressMonitor());
+				}
+			}
+		}, null);
+		return result[0];
+	}
+
+	/**
+	 * Creates a file with content at the given path inside the given container. 
+	 * If the file exists its content is replaced.
+	 * @param container a container to create the file in
+	 * @param filePath the path relative to the container to create the file at
+	 * @param contents the content for the file
+	 * @return 
+	 * @return a file object.
+	 * @throws Exception 
+	 * @throws Exception
+	 * @since 4.0
+	 */    
+	public static IFile createFile(IContainer container, String filePath, String contents) throws CoreException {
+		return createFile(container, new Path(filePath), contents);
+	}
+	
+	/**
+	 * Waits until the given file is indexed. Fails if this does not happen within the
+	 * given time. 
+	 * @param file
+	 * @param maxmillis
+	 * @throws Exception
+	 * @since 4.0
+	 */
+	public static void waitUntilFileIsIndexed(IIndex index, IFile file, int maxmillis) throws Exception {
+		long endTime= System.currentTimeMillis() + maxmillis;
+		int timeLeft= maxmillis;
+		while (timeLeft >= 0) {
+			Assert.assertTrue(CCorePlugin.getIndexManager().joinIndexer(timeLeft, new NullProgressMonitor()));
+			index.acquireReadLock();
+			try {
+				IIndexFile pfile= index.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+				if (pfile != null && pfile.getTimestamp() >= file.getLocalTimeStamp()) {
+					return;
+				}
+				pfile= index.getFile(ILinkage.C_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+				if (pfile != null && pfile.getTimestamp() >= file.getLocalTimeStamp()) {
+					return;
+				}
+			} finally {
+				index.releaseReadLock();
+			}
+			
+			Thread.sleep(50);
+			timeLeft= (int) (endTime - System.currentTimeMillis());
+		}
+		Assert.fail("Indexing " + file.getFullPath() + " did not complete in time!");
+	}
+
+    public static IASTTranslationUnit createIndexBasedAST(IIndex index, ICProject project, IFile file) throws CModelException, CoreException {
+    	ICElement elem= project.findElement(file.getFullPath());
+    	if (elem instanceof ITranslationUnit) {
+    		ITranslationUnit tu= (ITranslationUnit) elem;
+   			return tu.getAST(index, ITranslationUnit.AST_SKIP_INDEXED_HEADERS);
+    	}
+    	Assert.fail("Could not create ast for " + file.getFullPath());
+    	return null;
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/VerifyDialog.java b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/VerifyDialog.java
new file mode 100644
index 0000000..e3281f5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/VerifyDialog.java
@@ -0,0 +1,314 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.testplugin.util;
+
+
+import java.util.Iterator;
+
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.ShellAdapter;
+import org.eclipse.swt.events.ShellEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+
+/*
+ * This dialog is intended to verify a dialogs in a testing
+ * environment.  The tester can test for sizing, initial focus,
+ * or accessibility.
+ */
+public class VerifyDialog extends TitleAreaDialog {
+	private int SIZING_WIDTH = 400;
+	
+	static int      TEST_TYPE;
+	public static final int TEST_SIZING = 0;
+	public static final int TEST_FOCUS  = 1;
+	public static final int TEST_ACCESS = 2;
+	private IDialogTestPass _dialogTests[] = new IDialogTestPass[3];
+
+
+	private Dialog _testDialog; //the dialog to test
+	private Point  _testDialogSize;
+	
+	private Label  _queryLabel;
+	Button _yesButton;
+	private Button _checkList[];
+	private String _failureText;
+	
+	/*
+	 * Create an instance of the verification dialog.
+	 */
+	public VerifyDialog(Shell parent) {
+		super(parent);
+		if ( !(TEST_TYPE <= 2) && !(TEST_TYPE >= 0) ) {
+			TEST_TYPE = TEST_SIZING;
+		}
+		_failureText = "";
+		_dialogTests[0] = new SizingTestPass();
+		_dialogTests[1] = new FocusTestPass();
+		_dialogTests[2] = new AccessibilityTestPass();
+	}
+	
+	/* (non-Javadoc)
+	 * Method declared on Window.
+	 */
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Dialog Verification");
+		setShellStyle(SWT.NONE);
+	}
+	/* (non-Javadoc)
+	 * Method declared on Dialog.
+	 */
+	protected void createButtonsForButtonBar(Composite parent) {
+		_yesButton = createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL, true);
+		createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL, false);
+	}
+	/* (non-Javadoc)
+	 * Method declared on Dialog.
+	 */
+	protected void buttonPressed(int buttonId) {
+		if (IDialogConstants.YES_ID == buttonId) {
+			setReturnCode(IDialogConstants.YES_ID);
+			if (_testDialog.getShell() != null) {
+				_testDialog.close();
+			}
+			close();
+		} else if (IDialogConstants.NO_ID == buttonId) {
+			handleFailure();
+		}
+	}
+	/* (non-Javadoc)
+	 * Method declared on Dialog.
+	 */
+	protected Control createDialogArea(Composite parent) {
+		// top level composite
+		Composite parentComposite = (Composite)super.createDialogArea(parent);
+
+
+		// create a composite with standard margins and spacing
+		Composite composite = new Composite(parentComposite, SWT.NONE);
+		composite.setSize(SIZING_WIDTH, SWT.DEFAULT);
+		GridLayout layout = new GridLayout();
+		layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+		layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+		layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+		composite.setLayout(layout);
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+
+		createTestSelectionGroup(composite);
+		createCheckListGroup(composite);
+
+
+		_queryLabel = new Label(composite, SWT.NONE);
+		_queryLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		
+		initializeTest();
+		return composite;
+	}
+	/*
+	 * Group for selecting type of test.
+	 */
+	private void createTestSelectionGroup(Composite parent) {
+		Group group = new Group(parent, SWT.SHADOW_NONE);
+		group.setText("Testing:");
+		group.setLayout( new GridLayout() );
+		GridData data = new GridData(GridData.FILL_HORIZONTAL);
+		group.setLayoutData(data);
+		
+		for (int i = 0; i < _dialogTests.length; i++) {
+			Button radio = new Button(group, SWT.RADIO);
+			radio.setText( _dialogTests[i].label() );
+			final int testID = _dialogTests[i].getID();
+			radio.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					TEST_TYPE = testID;
+					initializeTest();
+					_yesButton.setEnabled(true);
+				}
+			});
+			if ( TEST_TYPE == _dialogTests[i].getID() ) {
+				radio.setSelection(true);
+			}
+		}
+	}
+	/*
+	 * Initializes the checklist with empty checks.
+	 */
+	private void createCheckListGroup(Composite parent) {
+		Group group = new Group(parent, SWT.SHADOW_NONE);
+		group.setText("Verify that:");
+		group.setLayout( new GridLayout() );
+		GridData data = new GridData(GridData.FILL_HORIZONTAL);
+		group.setLayoutData(data);
+		
+		int checkListSize = 0;
+		for (int i = 0; i < _dialogTests.length; i++) {
+			int size = _dialogTests[i].checkListTexts().size();
+			if (size > checkListSize) {
+				checkListSize = size;
+			}
+		}
+		_checkList = new Button[checkListSize];
+		SelectionAdapter selectionAdapter = new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				checkYesEnable();
+			}
+		};
+		for (int i = 0; i < checkListSize; i++) {
+			_checkList[i] = new Button(group, SWT.CHECK);
+			_checkList[i].addSelectionListener(selectionAdapter);
+			data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+			data.grabExcessHorizontalSpace = true;
+			_checkList[i].setLayoutData(data);
+		}		
+	}
+	/*
+	 * Disables the yes button if any of the items in the checklist
+	 * are unchecked.  Enables the yes button otherwise.
+	 */
+	void checkYesEnable() {
+		boolean enable = true;
+		for (int i = 0; i < _checkList.length; i++) {
+			if ( !_checkList[i].getSelection() ) {
+				enable = false;
+			}			
+		}
+		_yesButton.setEnabled(enable);
+	}
+	/*
+	 * Initializes the checklist, banner texts, and query label
+	 */
+	void initializeTest() {
+		IDialogTestPass test = _dialogTests[TEST_TYPE];
+		setTitle( test.title() );
+		setMessage( test.description() );
+		Iterator iterator = test.checkListTexts().iterator();
+		for (int i = 0; i < _checkList.length; i++) {
+			if ( iterator.hasNext() ) {
+				_checkList[i].setText( iterator.next().toString() );
+				_checkList[i].setVisible(true);
+				_checkList[i].update();
+			} else {
+				_checkList[i].setVisible(false);
+				_checkList[i].update();
+			}
+			_checkList[i].setSelection(true);
+		}
+		_queryLabel.setText( test.queryText() );
+	}
+	public String getFailureText() {
+		return _failureText;
+	}
+	/*
+	 * Can't open the verification dialog without a specified
+	 * test dialog, this simply returns a failure and prevents
+	 * opening.  Should use open(Dialog) instead.
+	 * 
+	 */
+	public int open() {
+		_failureText = "Testing dialog is required, use VerifyDialog::open(Dialog)";
+		return IDialogConstants.NO_ID;
+	}
+	/*
+	 * Opens the verification dialog to test the specified dialog.
+	 */
+	public int open(Dialog testDialog) {
+		if (getShell() == null) {
+			create();
+		}
+		getShell().setLocation(0, 0);
+		getShell().setSize(Math.max(SIZING_WIDTH, getShell().getSize().x), getShell().getSize().y);
+		_testDialog = testDialog;
+		if (_testDialog.getShell() == null) {
+			_testDialog.create();
+		}
+		_testDialogSize = _testDialog.getShell().getSize();
+		openNewTestDialog();
+		
+		return super.open();
+	}
+	/*
+	 * Opens the dialog to be verified.
+	 */
+	private void openNewTestDialog() {
+		if (_testDialog.getShell() == null) {
+			_testDialog.create();
+		}
+		_testDialog.setBlockOnOpen(false);
+		_testDialog.getShell().setLocation(getShell().getSize().x + 1, 0);
+		_testDialog.getShell().setSize(_testDialogSize);
+		_testDialog.getShell().addShellListener(new ShellAdapter() {
+			public void shellClosed(ShellEvent e) {				
+				e.doit = false;
+			}
+		
+		});		
+		_testDialog.open();
+	}
+	/*
+	 * The test dialog failed, open the failure dialog.
+	 */
+	private void handleFailure() {
+		IDialogTestPass test = _dialogTests[TEST_TYPE];
+		StringBuffer text = new StringBuffer();
+		String label = test.label();
+		label = label.substring(0, label.indexOf("&")) +
+		        label.substring(label.indexOf("&") + 1);
+		text.append(label).
+		     append(" failed on the ").
+		     append(SWT.getPlatform()).
+		     append(" platform:\n");
+		
+		String failureMessages[] = test.failureTexts();
+		for (int i = 0; i < test.checkListTexts().size(); i++) {
+			if ( !_checkList[i].getSelection() ) {
+				text.append("- ").append(failureMessages[i]).append("\n");
+			}
+		}
+		FailureDialog dialog = new FailureDialog( getShell() );
+		dialog.create();
+		//String temp = text.toString();
+		dialog.setText( text.toString() );
+		if (dialog.open() == IDialogConstants.OK_ID) {
+			_failureText = dialog.toString();
+			setReturnCode(IDialogConstants.NO_ID);
+			if (_testDialog.getShell() != null) {
+				_testDialog.close();
+			}
+			close();
+		}
+	}
+	/*
+	 * In case the shell was closed by a means other than
+	 * the NO button.
+	 */
+	protected void handleShellCloseEvent() {
+		handleFailure();
+	}
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/AllTemplateEngineTests.java b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/AllTemplateEngineTests.java
new file mode 100644
index 0000000..0b8bf4b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/AllTemplateEngineTests.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Symbian Software Limited and others.
+ * 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
+ *
+ * Contributors:
+ * Bala Torati (Symbian) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.tests.templateengine;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * This is a TestSuite, the TestCases created to test Template engine are
+ * added to testsuite.
+ * The test suite will execute all the Testcases added to the Suite.
+ * 
+ * @since 4.0
+ */
+
+public class AllTemplateEngineTests extends TestSuite {
+
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(AllTemplateEngineTests.suite());
+	}
+	
+	/**
+	 * Since the TemplateEngine consists of UI(Wizard).
+	 * A TestWizard is created to which the dynamically generated
+	 * UIPages are added.  The Wizard is launched from here.
+	 * The TestCases created to test the TemplateEngine is initialised here.
+	 * @return
+     * 
+     * @since 4.0
+	 */
+	public static Test suite() {
+		TestSuite suite = new TestSuite("Template engine tests"); //$NON-NLS-1$
+		//$JUnit-BEGIN$
+          
+		suite.addTestSuite(TestTemplateEngine.class);
+		suite.addTestSuite(TestTemplateCore.class);
+		suite.addTestSuite(TestValueStore.class);
+		suite.addTestSuite(TestSharedDefaults.class);
+		suite.addTestSuite(TestProcesses.class);
+		suite.addTestSuite(TestTemplateEngineBugs.class);
+        
+		//$JUnit-END$
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TemplateEngineTestsHelper.java b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TemplateEngineTestsHelper.java
new file mode 100644
index 0000000..41fd7ca
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TemplateEngineTestsHelper.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Limited and others.
+ * 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
+ *
+ * Contributors:
+ * Bala Torati (Symbian) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.tests.templateengine;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Assert;
+
+import org.eclipse.cdt.core.templateengine.TemplateCore;
+import org.eclipse.cdt.core.templateengine.TemplateDescriptor;
+import org.eclipse.cdt.core.templateengine.TemplateEngine;
+import org.eclipse.cdt.core.testplugin.CTestPlugin;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Bundle;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * 
+ * All supporting functions which are not part of Testing class.
+ * 
+ * @since 4.0
+*/
+
+public class TemplateEngineTestsHelper {
+	
+	public static final String LOGGER_FILE_NAME="TemplateEngineTests";	//$NON-NLS-1$
+	
+	/**
+	 * get the url of a xml template, by passing the xml file name.
+	 * @param templateName
+	 * @return URL
+	 */
+	public static URL getTemplateURL(String templateName){
+		Bundle bundle = Platform.getBundle(CTestPlugin.PLUGIN_ID);
+		URL url = FileLocator.find(bundle, new Path("resources/templateengine/"+templateName), null); //$NON-NLS-1$
+		if ( url != null )
+		{ 
+			try {
+				url = FileLocator.toFileURL(url);
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+		}
+		return url;
+	}
+	
+	public static TemplateCore[] getTestTemplates() {
+		TemplateCore[] templates = TemplateEngine.getDefault().getTemplates();
+	    List testTemplates = new ArrayList();
+		for (int i =0; i < templates.length; i++) {
+			if (templates[i].getTemplateType().equals("TestTemplate")) {
+				testTemplates.add(templates[i]);
+			}
+		}
+		return (TemplateCore[]) testTemplates.toArray(new TemplateCore[testTemplates.size()]); 
+	}
+	
+	public static int getChildCount(TemplateDescriptor templateDescriptor, String propertyGroupID){
+		List list = templateDescriptor.getPropertyGroupList();
+		for (int i = 0, l = list.size(); i < l; i++) {
+			Element element = (Element) list.get(i);
+			NamedNodeMap attributes = element.getAttributes();
+			for (int j = 0, l1 = attributes.getLength(); j < l1; j++) {
+				String value = attributes.item(j).getNodeValue();
+				if (value.equals(propertyGroupID)) {
+					return TemplateEngine.getChildrenOfElement(element).size();
+				}
+			}
+		}
+		return 0;
+	}
+	
+	public static boolean failIfErrorStatus(IStatus[] statuses) {
+		for(int i=0; i<statuses.length; i++) {
+			IStatus status = statuses[i];
+			if (status.getCode() == IStatus.ERROR) {
+				Assert.fail(status.getMessage());
+				return true;
+			}
+			IStatus[] children = status.getChildren();
+			if (children != null) {
+				if (failIfErrorStatus(children)) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+	
+	public static void turnOffAutoBuild() throws CoreException {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IWorkspaceDescription workspaceDesc = workspace.getDescription();
+		workspaceDesc.setAutoBuilding(false);
+		workspace.setDescription(workspaceDesc);
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestProcesses.java b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestProcesses.java
new file mode 100644
index 0000000..2bb9af5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestProcesses.java
@@ -0,0 +1,260 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Limited and others.
+ * 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
+ *
+ * Contributors:
+ * Bala Torati (Symbian) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.tests.templateengine;
+
+import java.io.File;
+import java.util.Map;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.templateengine.TemplateCore;
+import org.eclipse.cdt.core.templateengine.TemplateEngine;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+
+public class TestProcesses extends BaseTestCase {
+	
+	private static final String workspaceLocation = ResourcesPlugin.getWorkspace().getRoot().getRawLocation().toOSString();
+	private static final String PROJECT_NAME = "TemplateEngineTestsProject"; //$NON-NLS-1$
+	private static final String SOURCE_FOLDER = "Source"; //$NON-NLS-1$
+	private static final String FILE_NAME = "File"; //$NON-NLS-1$
+	private static final String LINK = "Link"; //$NON-NLS-1$
+	private static final String CPP_EXT = ".cpp"; //$NON-NLS-1$
+	private static final String H_EXT = ".h"; //$NON-NLS-1$
+
+	private static final String PROJECT_TYPE = "org.eclipse.cdt.core.tests.projectType"; //$NON-NLS-1$
+
+	protected void setUp() throws Exception {
+		TemplateEngineTestsHelper.turnOffAutoBuild();
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+		IPath projectLocation = project.getRawLocation();
+		
+		if (project.exists()) {
+			project.delete(true, true, null);
+		}
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IProjectDescription description = workspace.newProjectDescription(project.getName());
+
+		if ((projectLocation != null) && (!projectLocation.equals(Platform.getLocation()))) {
+			description.setLocation(projectLocation);
+		}
+
+		CCorePlugin.getDefault().createCDTProject(description, project, null);
+		if (!project.isOpen()) {
+			project.open(null);
+		}
+		
+	}
+	
+	public void testAddFile() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*AddFile"); //$NON-NLS-1$
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("baseName", FILE_NAME); //$NON-NLS-1$
+		
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+		
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+		assertTrue(project.exists());
+		IFile file = project.getFile(FILE_NAME + CPP_EXT);
+		assertTrue(file.exists());
+		file = project.getFile(FILE_NAME + H_EXT);
+		assertTrue(file.exists());
+	}
+
+	public void testAddFiles() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*AddFiles"); //$NON-NLS-1$
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("baseName", FILE_NAME); //$NON-NLS-1$
+		
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+		
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+		assertTrue(project.exists());
+		IFile file = project.getFile(FILE_NAME + CPP_EXT);
+		assertTrue(file.exists());
+		file = project.getFile(FILE_NAME + H_EXT);
+		assertTrue(file.exists());
+	}
+
+	public void testAddLink() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*AddLink"); //$NON-NLS-1$
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("baseName", FILE_NAME); //$NON-NLS-1$
+
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+		
+		try {
+			IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+			assertTrue(project.exists());
+			project.refreshLocal(1, null);
+			IFile file = project.getFile(FILE_NAME + CPP_EXT);
+			assertTrue(file.exists());
+			file = project.getFile(FILE_NAME + LINK + CPP_EXT);
+			assertTrue(file.exists());
+		} catch (CoreException e) {
+			fail(e.getMessage());
+		}
+	}
+
+	public void testAppend() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*Append"); //$NON-NLS-1$
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("baseName", FILE_NAME); //$NON-NLS-1$
+		
+		valueStore.put("targetSourceName", workspaceLocation + File.separator + PROJECT_NAME + File.separator + FILE_NAME + CPP_EXT); //$NON-NLS-1$
+		valueStore.put("targetHeaderName", workspaceLocation + File.separator + PROJECT_NAME + File.separator + FILE_NAME + H_EXT); //$NON-NLS-1$
+		
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+		
+		try {
+			IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+			assertTrue(project.exists());
+			project.refreshLocal(1, null);
+			IFile file = project.getFile(FILE_NAME + CPP_EXT);
+			assertTrue(file.exists());
+			file = project.getFile(FILE_NAME + H_EXT);
+			assertTrue(file.exists());
+		} catch (CoreException e) {
+			fail(e.getMessage());
+		}
+	}
+
+	public void testAppendCreate() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*AppendCreate"); //$NON-NLS-1$
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("baseName", FILE_NAME); //$NON-NLS-1$
+		
+		valueStore.put("targetSourceName", FILE_NAME + CPP_EXT); //$NON-NLS-1$
+		valueStore.put("targetHeaderName", FILE_NAME + H_EXT); //$NON-NLS-1$
+		
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+		
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+		assertTrue(project.exists());
+		IFile file = project.getFile(FILE_NAME + CPP_EXT);
+		assertTrue(file.exists());
+		file = project.getFile(FILE_NAME + H_EXT);
+		assertTrue(file.exists());
+	}
+
+	public void testCopy() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*Copy"); //$NON-NLS-1$
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("baseName", FILE_NAME); //$NON-NLS-1$
+		
+		valueStore.put("targetSourceName", workspaceLocation + File.separator + PROJECT_NAME + File.separator + FILE_NAME + CPP_EXT); //$NON-NLS-1$
+		valueStore.put("targetHeaderName", workspaceLocation + File.separator + PROJECT_NAME + File.separator + FILE_NAME + H_EXT); //$NON-NLS-1$
+		
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+		
+		try {
+			IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+			assertTrue(project.exists());
+			project.refreshLocal(1, null);
+			IFile file = project.getFile(FILE_NAME + CPP_EXT);
+			assertTrue(file.exists());
+			file = project.getFile(FILE_NAME + H_EXT);
+			assertTrue(file.exists());
+		} catch (CoreException e) {
+			fail(e.getMessage());
+		}
+	}
+
+	public void testCreateResourceIdentifier() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*CreateResourceIdentifier"); //$NON-NLS-1$
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("valueName1", "baseName1"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("appName1", "Hello"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("valueName2", "baseName2"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("appName2", "He"); //$NON-NLS-1$ //$NON-NLS-2$
+
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+		
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+		assertTrue(project.exists());
+		IFile file = project.getFile("HELL" + CPP_EXT); //$NON-NLS-1$
+		assertTrue(file.exists());
+		file = project.getFile("HEXX" + CPP_EXT); //$NON-NLS-1$
+		assertTrue(file.exists());
+	}
+
+	public void testCreateSourceFolder() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*CreateSourceFolder"); //$NON-NLS-1$
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", PROJECT_NAME); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("sourceDir1", SOURCE_FOLDER + 1); //$NON-NLS-1$
+		valueStore.put("sourceDir2", SOURCE_FOLDER + 2); //$NON-NLS-1$
+		
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+		
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+		assertTrue(project.exists());
+		IFolder folder = project.getFolder(SOURCE_FOLDER + 1);
+		assertTrue(folder.exists());
+		folder = project.getFolder(SOURCE_FOLDER + 2);
+		assertTrue(folder.exists());
+	}
+		
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestSharedDefaults.java b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestSharedDefaults.java
new file mode 100644
index 0000000..f388212
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestSharedDefaults.java
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Limited and others.
+ * 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
+ *
+ * Contributors:
+ * Bala Torati (Symbian) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.tests.templateengine;
+
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.cdt.core.templateengine.SharedDefaults;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+
+
+/**
+* Executes all the test cases of SharedDefaults backend functionality
+*/
+
+public class TestSharedDefaults extends BaseTestCase {
+	private SharedDefaults sharedDefaults;
+	
+	/*
+	 * @see TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		sharedDefaults = SharedDefaults.getInstance();
+	}
+	
+	/*
+	 * @see TestCase#tearDown()
+	 */
+	
+	protected void tearDown(){
+		sharedDefaults = null;
+	}
+	
+	/**
+	 * This test checks if data gets added to the back end
+	 * New data gets persisted in SharedDefault XML file 
+	 */
+	
+	public void testAddToBackEndStorage() {
+		Map actualSharedDefaults=sharedDefaults.getSharedDefaultsMap();
+		
+		actualSharedDefaults.put("provider.name","eclipse"); //$NON-NLS-1$ //$NON-NLS-2$
+		actualSharedDefaults.put("copyright","Symbian Software Ltd."); //$NON-NLS-1$ //$NON-NLS-2$
+		actualSharedDefaults.put("author","Bala Torati"); //$NON-NLS-1$ //$NON-NLS-2$
+
+		Map expectedSharedDefaults=sharedDefaults.getSharedDefaultsMap();
+		
+		assertEquals("Contents are different  :", //$NON-NLS-1$
+				expectedSharedDefaults,
+				actualSharedDefaults);
+
+	}
+	
+	
+	/**
+	 * This tests the updateToBackEndStorage of SharedDefaults
+	 * to verify whether the key-value pair gets updated with new value
+	 * New data gets persisted in SharedDefault XML file 
+	 */
+	
+	public void testUpdateToBackEndStorage() {
+		Map actualSharedDefaults = sharedDefaults.getSharedDefaultsMap();
+		Set keySet = actualSharedDefaults.keySet();
+	 	Iterator iterator = keySet.iterator();
+	 	
+	 	while (iterator.hasNext()) {
+	 		Object key = iterator.next();
+	 		Object value = actualSharedDefaults.get(key);
+	 		String keyName = (String)key;
+	 		String valueName = (String)value;
+	 		if (keyName.equals("org.eclipse.cdt.templateengine.project.HelloWorld.basename")){ //$NON-NLS-1$
+	 			valueName = "Astala Vista"; //$NON-NLS-1$
+	 			actualSharedDefaults.put(keyName, valueName);
+		 		sharedDefaults.updateToBackEndStorage("org.eclipse.cdt.templateengine.project.HelloWorld.basename", valueName); //$NON-NLS-1$
+	 		}
+	 	}
+		
+		Map expectedSharedDefaults=sharedDefaults.getSharedDefaultsMap();
+		
+		assertEquals("Contents are different  :", //$NON-NLS-1$
+				expectedSharedDefaults,
+				actualSharedDefaults);
+	}
+	
+	/**
+	 * This tests the deleteBackEndStorage of SharedDefaults
+	 * to verify whether the key-value pair gets deleted at the backend
+	 */
+	
+	public void testDeleteBackEndStorage() {
+		Map actualSharedDefaults=sharedDefaults.getSharedDefaultsMap();		
+		Set keySet = actualSharedDefaults.keySet();
+	 	Iterator iterator = keySet.iterator();
+	 	String keyName = null;
+	 	
+	 	while (iterator.hasNext()) {
+	 		
+	 		Object key = iterator.next();
+	 		keyName = (String)key;
+	  		if (keyName.equals("org.eclipse.cdt.templateengine.project.HelloWorld.basename")) { //$NON-NLS-1$
+	 			actualSharedDefaults.remove(keyName);
+	 			break;
+	 		}	 			
+	 	}
+	 	
+	 	sharedDefaults.deleteBackEndStorage(new String[]{keyName});
+		Map expectedSharedDefaults=sharedDefaults.getSharedDefaultsMap();
+				
+		assertEquals("Contents are different  :", //$NON-NLS-1$
+				expectedSharedDefaults,
+				actualSharedDefaults);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestTemplateCore.java b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestTemplateCore.java
new file mode 100644
index 0000000..6073e8a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestTemplateCore.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Limited and others.
+ * 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
+ *
+ * Contributors:
+ * Bala Torati (Symbian) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.tests.templateengine;
+
+import org.eclipse.cdt.core.templateengine.TemplateCore;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+
+/**
+ * Test the functionality of Tempalte Class.
+ */
+public class TestTemplateCore extends BaseTestCase {
+
+    public TemplateCore[] templates = null;
+    
+    protected void setUp() throws Exception {
+		super.setUp();
+		templates = TemplateEngineTestsHelper.getTestTemplates();
+	}
+
+	/*
+	 * @see TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	/**
+	 * Constructor for Template.
+	 * @param name
+	 */
+	public TestTemplateCore(String name) {
+		super(name);
+	}
+	
+	/**
+	 * check that the Template contains a Non Null ValueStore
+	 */
+	public void testValueStoreNotNull(){
+		for (int i=0; i < templates.length; i++) {
+			assertNotNull(templates[i].getValueStore());
+		}
+	}
+	
+	/**
+	 * Check the IDs to be persisited in SharedDefaults.
+	 */
+	public void testPersistTrueIDs(){
+		for (int i=0; i < templates.length; i++) {
+			assertNotNull(templates[i].getPersistTrueIDs());
+		}
+	}
+	
+	public void testGetAllMissingMacrosInProcesses(){
+		for (int i=0; i < templates.length; i++) {
+			assertNotNull(templates[i].getAllMissingMacrosInProcesses());
+			assertTrue(templates[i].getAllMissingMacrosInProcesses().size() > 0);
+		}
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestTemplateEngine.java b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestTemplateEngine.java
new file mode 100644
index 0000000..2753c8e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestTemplateEngine.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Limited and others.
+ * 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
+ *
+ * Contributors:
+ * Bala Torati (Symbian) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.tests.templateengine;
+
+import org.eclipse.cdt.core.templateengine.TemplateEngine;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Test the functionality of TemplateEngine.
+ */
+public class TestTemplateEngine extends BaseTestCase {
+
+    
+    TemplateEngine templateEngine = null;
+    
+	/*
+	 * @see TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+		
+		templateEngine = TemplateEngine.getDefault();
+	}
+
+	/*
+	 * @see TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	/**
+	 * Constructor for TestTemplateEngine.
+	 * @param name
+	 */
+	public TestTemplateEngine(String name) {
+		super(name);
+	}
+	
+	/**
+	 * check for non null SharedDefaults
+	 *
+	 */
+	public void testSharedDefaults(){
+		// when running the testcase in head-less mode, the  TestExtraPagesProvider class cannot be loaded,
+		// which is logged.
+		if (!PlatformUI.isWorkbenchRunning()) {
+			setExpectedNumberOfLoggedNonOKStatusObjects(1);
+		}
+	    assertNotNull(TemplateEngine.getSharedDefaults());
+	}
+	
+	/**
+	 * check that the instace is created once(Singleton).
+	 */
+	public void testSingleton(){    
+	    assertSame(templateEngine, TemplateEngine.getDefault());
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestTemplateEngineBugs.java b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestTemplateEngineBugs.java
new file mode 100644
index 0000000..e01a0e2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestTemplateEngineBugs.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Limited and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial Implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.tests.templateengine;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.cdt.core.templateengine.process.ProcessHelper;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+
+public class TestTemplateEngineBugs extends BaseTestCase {
+
+	public void testBug215283() {
+		assertEquals(set("a"),     ProcessHelper.getReplaceKeys("$(a)"));
+		assertEquals(set("a","b"), ProcessHelper.getReplaceKeys("$(a)$(b)"));
+		assertEquals(set("a","b","cc","ddd"), ProcessHelper.getReplaceKeys("$(a)$(b)$(cc)$(ddd)"));
+		assertEquals(set("aaa","b","c","dd"), ProcessHelper.getReplaceKeys("$(aaa)$(b)$(c)$(dd)"));
+		assertEquals(set("a"),     ProcessHelper.getReplaceKeys("($(a))"));
+		assertEquals(set("a","b"), ProcessHelper.getReplaceKeys("$(b)$(a)"));
+		assertEquals(set("a"),     ProcessHelper.getReplaceKeys("        \n$(a)"));
+		assertEquals(set("a"),     ProcessHelper.getReplaceKeys("$(a)          "));
+	}
+	
+	private Set<String> set(String ... s) {
+		HashSet<String> result= new HashSet<String>();
+		result.addAll(Arrays.asList(s));
+		return result;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestValueStore.java b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestValueStore.java
new file mode 100644
index 0000000..42f0e45
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/templateengine/org/eclipse/cdt/core/tests/templateengine/TestValueStore.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Limited and others.
+ * 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
+ *
+ * Contributors:
+ * Bala Torati (Symbian) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.tests.templateengine;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.cdt.core.templateengine.TemplateCore;
+import org.eclipse.cdt.core.templateengine.TemplateDescriptor;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+
+
+/**
+ * Test the functionality of the ValueStore class.
+ */
+public class TestValueStore extends BaseTestCase {
+
+
+	/**
+	 * setUp is called before execution of test method.
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+	}
+
+	/**
+	 * release resources held.
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	public TestValueStore(String name) {
+		super(name);
+    }
+
+	/**
+	 * Test ValueStore for Not Null condition.
+	 *
+	 */
+	public void testValueStoreNotNull(){
+		TemplateCore[] templates = TemplateEngineTestsHelper.getTestTemplates();
+		for (int i=0; i <templates.length; i++) {
+			Map valueStore = templates[i].getValueStore();
+			assertNotNull(valueStore);
+		}
+	}
+	
+	/**
+	 * ValueStore is expected to consist all the IDs from 
+	 * FactoryDefaults. Test the same.
+	 */
+	public void testCompareValueStoreWithTemplateDefaluts(){
+		TemplateCore[] templates = TemplateEngineTestsHelper.getTestTemplates();
+		for (int i=0; i <templates.length; i++) {
+			Map valueStore = templates[i].getValueStore();
+			TemplateDescriptor templateDescriptor = templates[i].getTemplateDescriptor();
+	        Map templateDefaults = templateDescriptor.getTemplateDefaults(templateDescriptor.getRootElement());
+
+	        Iterator defaultsIterator = templateDefaults.keySet().iterator();
+			while(defaultsIterator.hasNext()){
+			  String key = (String)defaultsIterator.next();
+			  assertNotNull(valueStore.get(key));
+			}
+		}
+	}
+	 
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.core.tests/test.xml b/results/plugins/org.eclipse.cdt.core.tests/test.xml
new file mode 100644
index 0000000..baaed83
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.core.tests/test.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+
+<project name="testsuite" default="run" basedir=".">
+  <!-- The property ${eclipse-home} should be passed into this script -->
+  <!-- Set a meaningful default value for when it is not. -->
+  <property name="eclipse-home" value="${basedir}"/>
+  
+  <!-- This is the default name of the org.eclipse.test plugin. -->
+  <!-- We need to be able to override this for the case where the -->
+  <!-- org.eclipse.test plugin was build as part of a feature and -->
+  <!-- will have a name similar to org.eclipse.test_2.1.0  -->
+  <property name="org.eclipse.test" value="org.eclipse.test"/>
+  <!-- sets the properties eclipse-home, and library-file -->
+  <property name="plugin-name" value="org.eclipse.cdt.core.tests"/>
+  <property name="library-file"
+            value="${eclipse-home}/plugins/${org.eclipse.test}/library.xml"/>
+
+  <!-- This target holds all initialization code that needs to be done for -->
+  <!-- all tests that are to be run. Initialization for individual tests -->
+  <!-- should be done within the body of the suite target. -->
+  <target name="init">
+    <tstamp/>
+    <delete>
+      <fileset dir="${eclipse-home}" includes="org*.xml"/>
+    </delete>
+  </target>
+
+  <!-- This target defines the tests that need to be run. -->
+  <target name="suite">
+    <property name="cdt-folder" 
+              value="${eclipse-home}/cdt_folder"/>
+    <delete dir="${cdt-folder}" quiet="true"/>
+    <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+      <property name="data-dir" value="${cdt-folder}"/>
+      <property name="plugin-name" value="${plugin-name}"/>
+      <property name="classname" 
+                value="org.eclipse.cdt.core.suite.AutomatedIntegrationSuite"/>
+    </ant>
+  </target>
+
+  <!-- This target holds code to cleanup the testing environment after -->
+  <!-- after all of the tests have been run. You can use this target to -->
+  <!-- delete temporary files that have been created. -->
+  <target name="cleanup">
+  </target>
+
+  <!-- This target runs the test suite. Any actions that need to happen -->
+  <!-- after all the tests have been run should go here. -->
+  <target name="run" depends="init,suite,cleanup">
+    <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+      <property name="includes" value="org*.xml"/>
+      <property name="output-file" value="${plugin-name}.xml"/>
+    </ant>
+  </target>
+
+</project>
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/.classpath b/results/plugins/org.eclipse.cdt.debug.ui.tests/.classpath
new file mode 100644
index 0000000..feadaca
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="core"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/results/plugins/org.eclipse.cdt.core.aix/.cvsignore b/results/plugins/org.eclipse.cdt.debug.ui.tests/.cvsignore
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.aix/.cvsignore
copy to results/plugins/org.eclipse.cdt.debug.ui.tests/.cvsignore
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/.project b/results/plugins/org.eclipse.cdt.debug.ui.tests/.project
new file mode 100644
index 0000000..05c3409
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.debug.ui.tests</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/.settings/org.eclipse.jdt.core.prefs b/results/plugins/org.eclipse.cdt.debug.ui.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..62fe882
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,57 @@
+#Mon Jan 28 09:57:10 CST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/Changelog b/results/plugins/org.eclipse.cdt.debug.ui.tests/Changelog
new file mode 100644
index 0000000..89f305a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/Changelog
@@ -0,0 +1,69 @@
+2005-07-22 Alain Magloire
+	Fix to Copyright.
+
+2004-10-17 Alain Magloire
+	Remove deprecated method in CDI adjust the implementation.
+	* core/org/eclipse/cdt/debug/core/tests/BreakpointTests.java
+	* core/org/eclipse/cdt/debug/core/tests/DebugTests.java
+	* core/org/eclipse/cdt/debug/core/tests/LocationTests.java
+
+2004-10-15 Alain Magloire
+	Adjust to the change in the CDI
+	* core/org/eclipse/cdt/debug/core/tests/BreakpointTests.java
+	* core/org/eclipse/cdt/debug/core/tests/DebugTests.java
+	* core/org/eclipse/cdt/debug/core/tests/LocationTests.java
+
+2004-09-07 Mikhail Khodjaiants
+	Moved to the new breakpoint management API.
+	* core/org/eclipse/cdt/debug/core/tests/BreakpointTests.java
+	* core/org/eclipse/cdt/debug/core/tests/DebugTests.java
+	* core/org/eclipse/cdt/debug/core/tests/LocationTests.java
+
+2003-07-03 Peter Graves
+
+	Major cleanup. Pulled all resouces out of the source tree, and fixed the  
+	tests to get them from the new location.  
+	Made sure the debug sessions were all terminated before we try to delete the 
+	the projects (if the tests failed, the session would not be terminated, and 
+	then we would not be able to remove the projects.)	
+	Also updated the breakpoint	tests to only create and build the test project 
+	once per run, not once per test method.
+	
+2003-04-04 Alain Magloire
+
+	* src/org/eclipse/cdt/debug/testplugin/util/VeryfyDialog.java:
+	Get rig of some warnings.
+
+2003-03-27 Alain Magloire
+
+	Adjust the code because of refactoring.
+	ICFolder and ICResource are removed.
+
+2003-01-29 Peter Graves
+ 
+   Fixed warnings when accessing static methods
+   * src/org/eclipse/cdt/debug/testplugin/util/DialogCheck.java:
+   * src/org/eclipse/cdt/debug/testplugin/CTestPlugin.java:
+   * src/org/eclipse/cdt/debug/testplugin/TestWorkbench.java:
+   * ChangeLog: Make all the entries have the same formatting
+
+2003-01-22 Judy N. Green
+
+   * /home/tools/org.eclipse.cdt.debug.ui.tests/.project
+   * /home/tools/org.eclipse.cdt.debug.ui.tests/.classpath
+   updated classpath and .project to reflect classpath changes.
+
+2003-01-21 Peter Graves
+
+	* src/org/eclipse/cdt/debug/testplugin/CDebugHelper.java: Updated to use new parameters to 
+	ICDISession.createCSession
+
+2002-12-17 Peter Graves
+
+	* plugin.xml,test.xml:  Some simple cleanups to remove refrences to the jdt and
+	to move closer to automated running.
+	
+2002-10-30 Alain Magloire
+
+	* core/org/eclipse/cdt/debug/core/tests/TargetTests.java: Test number
+	24183 is no longer valid, the method was remove from the CDI API.
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.cdt.debug.ui.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..7dfa333
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.cdt.debug.ui.tests
+Bundle-SymbolicName: org.eclipse.cdt.debug.ui.tests;singleton:=true
+Bundle-Version: 6.0.0.qualifier
+Bundle-Activator: org.eclipse.core.internal.compatibility.PluginActivator
+Bundle-Localization: plugin
+Export-Package: org.eclipse.cdt.debug.core.tests,
+ org.eclipse.cdt.debug.testplugin,
+ org.eclipse.cdt.debug.testplugin.util
+Require-Bundle: org.eclipse.ui.ide,
+ org.eclipse.core.resources,
+ org.junit,
+ org.eclipse.cdt.debug.core,
+ org.eclipse.cdt.debug.mi.core,
+ org.eclipse.cdt.core,
+ org.eclipse.ui,
+ org.eclipse.core.runtime.compatibility
+Bundle-ActivationPolicy: lazy
+Plugin-Class: org.eclipse.cdt.debug.testplugin.CTestPlugin
+Bundle-Vendor: Eclipse CDT
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/about.html b/results/plugins/org.eclipse.cdt.debug.ui.tests/about.html
new file mode 100644
index 0000000..9c7ba0a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/about.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head>
+
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>May 2, 2006</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/build.properties b/results/plugins/org.eclipse.cdt.debug.ui.tests/build.properties
new file mode 100644
index 0000000..643f886
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/build.properties
@@ -0,0 +1,18 @@
+###############################################################################
+#  Copyright (c) 2005, 2008 IBM Corporation and others.
+#  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
+# 
+#  Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+source.. = src/,\
+           core/
+bin.includes = about.html,\
+               plugin.xml,\
+               resources/,\
+               .,\
+               test.xml,\
+               META-INF/
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/messages.properties b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/.cvsignore
similarity index 100%
copy from results/plugins/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/messages.properties
copy to results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/.cvsignore
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/AbstractDebugTest.java b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/AbstractDebugTest.java
new file mode 100644
index 0000000..5fc693a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/AbstractDebugTest.java
@@ -0,0 +1,238 @@
+/*******************************************************************************
+ * Copyright (c) 2008 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.core.tests;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+
+import junit.extensions.TestSetup;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.debug.core.cdi.CDIException;
+import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
+import org.eclipse.cdt.debug.core.cdi.ICDILocation;
+import org.eclipse.cdt.debug.core.cdi.ICDILocator;
+import org.eclipse.cdt.debug.core.cdi.ICDISession;
+import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
+import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
+import org.eclipse.cdt.debug.core.model.ICBreakpointType;
+import org.eclipse.cdt.debug.mi.core.MIException;
+import org.eclipse.cdt.debug.testplugin.CDebugHelper;
+import org.eclipse.cdt.debug.testplugin.CProjectHelper;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+public abstract class AbstractDebugTest extends TestCase {
+	IWorkspace workspace;
+	IWorkspaceRoot root;
+	NullProgressMonitor monitor;
+	static ICProject testProject = null;
+	static ICDISession session = null;
+	static ICDITarget targets[] = null;
+	ICDITarget currentTarget;
+	static boolean oneTimeSetupDone = false;
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		if (oneTimeSetupDone == false) {
+			oneTimeSetUp(); // this can happened when run junit failed test from UI, without invoking suite()
+			oneTimeSetupDone = false; // re-set it back so tarDownOnes will run
+		}
+		/***********************************************************************
+		 * The tests assume that they have a working workspace and workspace
+		 * root object to use to create projects/files in, so we need to get
+		 * them setup first.
+		 */
+		workspace = ResourcesPlugin.getWorkspace();
+		root = workspace.getRoot();
+		monitor = new NullProgressMonitor();
+		if (workspace == null)
+			fail("Workspace was not setup"); //$NON-NLS-1$
+		if (root == null)
+			fail("Workspace root was not setup"); //$NON-NLS-1$
+	}
+
+	void createDebugSession() throws IOException, MIException, CModelException {
+		session = CDebugHelper.createSession(getProjectBinary(), testProject);
+		assertNotNull(session);
+		targets = session.getTargets();
+		assertNotNull(targets);
+		assertTrue(targets.length > 0);
+		currentTarget = targets[0];
+	}
+
+	/**
+	 * Sets up the test fixture.
+	 * 
+	 * Called before every test case method.
+	 * 
+	 * Example code test the packages in the project
+	 * "com.qnx.tools.ide.cdt.core"
+	 */
+	protected void oneTimeSetUp() throws CoreException, InvocationTargetException, IOException {
+		ResourcesPlugin.getWorkspace().getDescription().setAutoBuilding(false);
+		/***********************************************************************
+		 * Create a new project and import the test source.
+		 */
+		Path imputFile = new Path(getProjectZip()); //$NON-NLS-1$
+		testProject = CProjectHelper.createCProjectWithImport(getProjectName(), imputFile); //$NON-NLS-1$
+		if (testProject == null)
+			fail("Unable to create project"); //$NON-NLS-1$
+		/* Build the test project.. */
+
+		testProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+		oneTimeSetupDone = true;
+	}
+
+	protected String getProjectName() {
+		return "filetest";
+	}
+
+	protected String getProjectZip() {
+		return "resources/debugTest.zip";
+	}
+
+	protected String getProjectBinary() {
+		return "main";
+	}
+
+
+	public static Display getDisplay() {
+		return PlatformUI.getWorkbench().getDisplay();
+	}
+	/**
+	 * Dispatch ui events for at least msec - milliseconds
+	 * 
+	 * @param msec -
+	 *            milliseconds delay
+	 */
+	public static void uimsleep(int msec) {
+		long cur = System.currentTimeMillis();
+		long pass = 0;
+		Display display = getDisplay();
+		while (pass < msec) {
+			if (!display.readAndDispatch())
+				display.sleep();
+			pass = System.currentTimeMillis() - cur;
+		}
+	}
+	/**
+	 * Tears down the test fixture.
+	 * 
+	 * Called after every test case method.
+	 */
+	protected void oneTimeTearDown() throws CoreException {
+		if (targets != null) {
+			try {
+				targets[0].terminate();
+			} catch (CDIException e) {
+			}
+		}
+		if (session != null) {
+			try {
+				session.terminate();
+			} catch (CDIException e) {
+			}
+		}
+		CProjectHelper.delete(testProject);
+		if (oneTimeSetupDone == false) {
+			oneTimeTearDown(); // this can happened when run junit failed test from UI, without invoking suite()
+		}
+
+	}
+
+	static class DebugTestWrapper extends TestSetup {
+		private AbstractDebugTest newInstance;
+
+		public DebugTestWrapper(Class clazz) {
+			super(new TestSuite(clazz));
+			/***********************************************************************
+			 * Create a wrapper suite around the test suite we created above to
+			 * allow us to only do the general setup once for all the tests. This is
+			 * needed because the creation of the source and target projects takes a
+			 * long time and we really only need to do it once. We could do the
+			 * setup in the constructor, but we need to be able to remove everything
+			 * when we are done.
+			 */
+			try {
+				newInstance = (AbstractDebugTest) clazz.newInstance();
+			} catch (Exception e) {
+				throw new IllegalArgumentException(e);
+			}
+		}
+
+		protected void setUp() throws FileNotFoundException, IOException, InterruptedException,
+				InvocationTargetException, CoreException {
+			newInstance.oneTimeSetUp();
+		}
+
+		protected void tearDown() throws FileNotFoundException, IOException, CoreException {
+			newInstance.oneTimeTearDown();
+		}
+	}
+
+	void pause() {
+		uimsleep(200);
+	}
+
+	public ICDILocator getCurrentLocator() throws CDIException {
+		return getCurrentFrame().getLocator();
+	}
+
+	public ICDIStackFrame getCurrentFrame() throws CDIException {
+		return currentTarget.getCurrentThread().getStackFrames()[0];
+	}
+	
+	void waitSuspend(ICDITarget currentTarget) {
+		int loop;
+		loop = 0;
+		while ((currentTarget.isSuspended() == false) && (currentTarget.isTerminated() == false) && (loop < 20)) {
+			uimsleep(500);
+			loop++;
+		}
+		assertFalse("Target should be suspended, but it is terminated " + currentTarget.isTerminated(), currentTarget
+				.isTerminated());
+		assertTrue("Target should be suspended but it is not", currentTarget.isSuspended());
+
+	}
+	
+	public void resumeCurrentTarget() throws CDIException{
+		currentTarget.resume(false);
+	}
+
+	void setBreakOnMain() throws CDIException {
+		ICDILocation location = null;
+		location = currentTarget.createFunctionLocation("", "main"); //$NON-NLS-1$	
+		currentTarget.setFunctionBreakpoint(ICBreakpointType.TEMPORARY, (ICDIFunctionLocation) location, null, false);
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		/* clean up the session */
+		if (session == null) {
+			session.terminate();
+			session = null;
+		}
+		super.tearDown();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/AllDebugTests.java b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/AllDebugTests.java
new file mode 100644
index 0000000..f7f051b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/AllDebugTests.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.core.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ *
+ * AllDedbugTests.java
+ * This is the main entry point for running this suite of JUnit tests
+ * for all tests within the package "org.eclipse.cdt.debug.core"
+ * 
+ * @author Judy N. Green
+ * @since Jul 19, 2002
+ */
+public class AllDebugTests {
+	
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(suite());
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite();
+
+        // Just add more test cases here as you create them for 
+        // each class being tested
+        
+        suite.addTest(DebugTests.suite());
+        suite.addTest(BreakpointTests.suite());
+        suite.addTest(LocationTests.suite());
+        suite.addTest(EventBreakpointTests.suite());
+        return suite;
+        
+        
+    }
+} // End of AllDebugTests.java
+
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/BreakpointTests.java b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/BreakpointTests.java
new file mode 100644
index 0000000..85cb615
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/BreakpointTests.java
@@ -0,0 +1,604 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.core.tests;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.math.BigInteger;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.debug.core.cdi.CDIException;
+import org.eclipse.cdt.debug.core.cdi.ICDIAddressLocation;
+import org.eclipse.cdt.debug.core.cdi.ICDICondition;
+import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
+import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
+import org.eclipse.cdt.debug.core.cdi.ICDILocator;
+import org.eclipse.cdt.debug.core.cdi.ICDISession;
+import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
+import org.eclipse.cdt.debug.core.cdi.model.ICDILocationBreakpoint;
+import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
+import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
+import org.eclipse.cdt.debug.mi.core.MIException;
+import org.eclipse.cdt.debug.testplugin.CDebugHelper;
+import org.eclipse.cdt.debug.testplugin.CProjectHelper;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.viewers.deferred.SetModel;
+
+/**
+ * @author Peter Graves
+ * 
+ * This file contains a set of generic tests for the CDI break point interfaces.
+ * It will currenly use the mi implementation.
+ *  
+ */
+public class BreakpointTests extends AbstractDebugTest {
+
+
+	public static Test suite() {
+		return new DebugTestWrapper(BreakpointTests.class) {};
+	}
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		createDebugSession();
+		assertNotNull(currentTarget);
+		currentTarget.deleteAllBreakpoints();
+		pause();
+	}
+	@Override
+	protected void tearDown() throws Exception {
+		/* clean up the session */
+		targets[0].terminate();
+		int x = 0;
+		while ((!targets[0].isTerminated()) && (x < 30)) {
+			Thread.sleep(100);
+		}
+		if (!targets[0].isTerminated())
+			targets[0].terminate();
+		super.tearDown();
+	}
+
+
+	/***************************************************************************
+	 * A couple tests to make sure setting breakpoints on functions works as
+	 * expected.
+	 */
+	public void testFunctionBreak() throws CoreException, MIException, IOException, CDIException, InterruptedException {
+		
+		ICDITarget cdiTarget = currentTarget;
+		ICDIFunctionLocation location;
+		boolean caught = false;
+
+
+		/***********************************************************************
+		 * Create a break point on a generic function
+		 **********************************************************************/
+
+		location = cdiTarget.createFunctionLocation(null, "func1"); //$NON-NLS-1$
+		assertNotNull(location);
+		cdiTarget.setFunctionBreakpoint(0, location, null, false);
+
+		/***********************************************************************
+		 * Create a break point on main
+		 **********************************************************************/
+
+		location = cdiTarget.createFunctionLocation(null, "main"); //$NON-NLS-1$
+		assertNotNull(location);
+		cdiTarget.setFunctionBreakpoint(0, location, null, false);
+
+		/***********************************************************************
+		 * Try to create a break point on a function name that does not exist We
+		 * expect that this will cause the setLocationBreakpoint to throw a
+		 * CDIException
+		 **********************************************************************/
+
+		location = cdiTarget.createFunctionLocation(null, "badname"); //$NON-NLS-1$
+		assertNotNull(location);
+		try {
+			cdiTarget.setFunctionBreakpoint(0, location, null, false);
+		} catch (CDIException e) {
+			caught = true;
+		}
+		assertTrue(caught);
+
+		cdiTarget.deleteAllBreakpoints();
+
+		/***********************************************************************
+		 * Create a break point on a generic function and see if it will get hit
+		 * and stop program execution.
+		 **********************************************************************/
+
+		location = cdiTarget.createFunctionLocation(null, "func1"); //$NON-NLS-1$
+		assertNotNull(location);
+		cdiTarget.setFunctionBreakpoint(0, location, null, false);
+		targets = session.getTargets();
+		/*
+		 * We better only have one target connected to this session or something
+		 * is not right...
+		 */
+		assertTrue(targets.length == 1);
+		/*
+		 * Resume the target, this should cause it to run till it hits the
+		 * breakpoint
+		 */
+		resumeCurrentTarget();
+		/**
+		 * Give the process up to 10 seconds to become either terminated or
+		 * suspended. It sould hit the breakponint almost immediatly so we
+		 * should only sleep for max 100 ms
+		 */
+		waitSuspend(cdiTarget);
+		ICDILocator locator = getCurrentLocator();
+		assertTrue(locator.getLineNumber() == 6);
+		assertTrue(locator.getFunction().equals("func1")); //$NON-NLS-1$
+		assertTrue(locator.getFile().endsWith("main.c")); //$NON-NLS-1$
+	}
+
+	/***************************************************************************
+	 * A couple tests to make sure setting breakpoints on line numbers works as
+	 * expected.
+	 */
+	public void testLineBreak() throws CoreException, MIException, IOException, CDIException, InterruptedException {
+		ICDITarget cdiTarget = currentTarget;
+		ICDILineLocation location;
+		boolean caught = false;
+
+
+		/***********************************************************************
+		 * Create a break point in a generic function
+		 **********************************************************************/
+		location = cdiTarget.createLineLocation("main.c", 7);
+		assertNotNull(location);
+		cdiTarget.setLineBreakpoint(0, location, null, false);
+
+		/***********************************************************************
+		 * Create a break point in main
+		 **********************************************************************/
+		location = cdiTarget.createLineLocation("main.c", 18);
+		assertNotNull(location);
+		cdiTarget.setLineBreakpoint(0, location, null, false);
+
+		/***********************************************************************
+		 * Try to create a break point on a line that does not exist We expect
+		 * that this will cause the setLocationBreakpoint to throw a
+		 * CDIException
+		 **********************************************************************/
+
+		location = cdiTarget.createLineLocation("main.c", 30);
+		assertNotNull(location);
+		try {
+			cdiTarget.setLineBreakpoint(0, location, null, false);
+		} catch (CDIException e) {
+			caught = true;
+		}
+		assertTrue(caught);
+
+		caught = false;
+		/***********************************************************************
+		 * Try to create a break point on a line that does not have code on it
+		 **********************************************************************/
+
+		location = cdiTarget.createLineLocation("main.c", 11);
+		assertNotNull(location);
+		cdiTarget.setLineBreakpoint(0, location, null, false);
+
+		/***********************************************************************
+		 * Create a break point in a generic function without passing the source
+		 * file name. At the time of writing this would just silently fail, so
+		 * to make sure it works, we will do it once with a valid line number
+		 * and once with an invalid line number, and the first should always
+		 * succeed and the second should always throw an exception.
+		 **********************************************************************/
+		location = cdiTarget.createLineLocation(null, 7);
+		assertNotNull(location);
+		cdiTarget.setLineBreakpoint(0, location, null, false);
+		caught = false;
+		location = cdiTarget.createLineLocation(null, 30);
+		assertNotNull(location);
+		try {
+			cdiTarget.setLineBreakpoint(0, location, null, false);
+		} catch (CDIException e) {
+			caught = true;
+		}
+		assertTrue("Ignoring line numbers with no file specified?", caught);
+
+		cdiTarget.deleteAllBreakpoints();
+
+		/***********************************************************************
+		 * Create a break point on a line number and see if it will get hit and
+		 * stop program execution.
+		 **********************************************************************/
+
+		location = cdiTarget.createLineLocation(null, 7);
+		assertNotNull(location);
+		cdiTarget.setLineBreakpoint(0, location, null, false);
+		targets = session.getTargets();
+		/*
+		 * We better only have one target connected to this session or something
+		 * is not right...
+		 */
+		assertTrue(targets.length == 1);
+		/*
+		 * Resume the target, this should cause it to run till it hits the
+		 * breakpoint
+		 */
+		targets[0].resume();
+		/**
+		 * Give the process up to 10 seconds to become either terminated or
+		 * suspended. It sould hit the breakponint almost immediatly so we
+		 * should only sleep for max 100 ms
+		 */
+		for (int x = 0; x < 100; x++) {
+			if (targets[0].isSuspended() || targets[0].isTerminated())
+				break;
+			Thread.sleep(100);
+		}
+		assertTrue("Suspended: " + targets[0].isSuspended() + " Termiunated: " + targets[0].isTerminated(), targets[0]
+				.isSuspended());
+		ICDILocator locator = getCurrentLocator();
+		assertTrue(locator.getLineNumber() == 7);
+		assertTrue(locator.getFunction().equals("func1"));
+		assertTrue(locator.getFile().endsWith("main.c"));
+
+	}
+
+	/***************************************************************************
+	 * A couple tests to make sure getting breakpoints works as expected
+	 */
+	public void testGetBreak() throws CoreException, MIException, IOException, CDIException {
+		ICDITarget cdiTarget = currentTarget;
+		ICDIFunctionLocation location;
+		ICDIBreakpoint[] breakpoints;
+		ICDILocationBreakpoint curbreak;
+
+
+		/***********************************************************************
+		 * Make sure initially we don't have any breakpoints
+		 **********************************************************************/
+		breakpoints = cdiTarget.getBreakpoints();
+		assertNotNull(breakpoints);
+		assertTrue(breakpoints.length == 0);
+
+		/***********************************************************************
+		 * Make sure if we create a simple breakpoint, that we can get it back
+		 * from the system
+		 **********************************************************************/
+		/* Create a break point on a generic function */
+		location = cdiTarget.createFunctionLocation("main.c", "func1");
+		assertNotNull(location);
+		cdiTarget.setFunctionBreakpoint(0, location, null, false);
+
+		breakpoints = cdiTarget.getBreakpoints();
+		assertNotNull(breakpoints);
+		assertTrue(breakpoints.length == 1);
+		if (breakpoints[0] instanceof ICDILocationBreakpoint) {
+			curbreak = (ICDILocationBreakpoint) breakpoints[0];
+		} else
+			curbreak = null;
+		assertNotNull(curbreak);
+
+		//assertTrue(curbreak.getLocator().equals(location));
+		{
+			ICDILocator locator = curbreak.getLocator();
+			String file = locator.getFile();
+			String function = locator.getFunction();
+			assertTrue("main.c".equals(file));
+			assertTrue("func1".equals(function));
+		}
+
+		/***********************************************************************
+		 * Make sure if we create multiple break points that we can still get
+		 * them all back from the system,
+		 **********************************************************************/
+		/* Create another break point on main */
+		location = cdiTarget.createFunctionLocation("main.c", "main");
+		assertNotNull(location);
+		cdiTarget.setFunctionBreakpoint(0, location, null, false);
+
+		breakpoints = cdiTarget.getBreakpoints();
+		assertNotNull(breakpoints);
+		assertTrue(breakpoints.length == 2);
+		if (breakpoints[1] instanceof ICDILocationBreakpoint) {
+			curbreak = (ICDILocationBreakpoint) breakpoints[1];
+		} else
+			curbreak = null;
+		assertNotNull(curbreak);
+		/*
+		 * Make sure the location still looks like we expect it to.. .
+		 */
+		//assertTrue(curbreak.getLocation().equals(location));
+		{
+			ICDILocator locator = curbreak.getLocator();
+			String file = locator.getFile();
+			String function = locator.getFunction();
+			assertTrue("main.c".equals(file));
+			assertTrue("main".equals(function));
+		}
+
+		cdiTarget.deleteAllBreakpoints();
+
+
+	}
+
+	/***************************************************************************
+	 * A couple tests to make sure deleting breakpoints works as expected
+	 */
+	public void testDelBreak() throws CoreException, MIException, IOException, CDIException {
+		ICDITarget cdiTarget = currentTarget;
+		ICDIFunctionLocation location;
+		ICDILocator savedLocation;
+		ICDIBreakpoint[] breakpoints, savedbreakpoints;
+		ICDILocationBreakpoint curbreak;
+
+		/* Make sure initially we don't have any breakpoints */
+		breakpoints = cdiTarget.getBreakpoints();
+		assertNotNull(breakpoints);
+		assertTrue(breakpoints.length == 0);
+
+		/***********************************************************************
+		 * 
+		 * Test to make sure if we create a new breakpoint, we can delete it by
+		 * passing a refrence to it to deleteBreakpoint()
+		 *  
+		 **********************************************************************/
+
+		/* Create a break point on a generic function */
+		location = cdiTarget.createFunctionLocation("main.c", "func1");
+		assertNotNull(location);
+		curbreak = cdiTarget.setFunctionBreakpoint(0, location, null, false);
+		cdiTarget.deleteBreakpoints( new ICDIBreakpoint[] { curbreak } );
+		pause();
+		/**
+		 * we should not have any breakpoints left.
+		 */
+		breakpoints = cdiTarget.getBreakpoints();
+		assertTrue(breakpoints.length == 0);
+
+		/***********************************************************************
+		 * 
+		 * Test to make sure if we create multiple new breakpoint, we can delete
+		 * one of them by passing a refrence to it to deleteBreakpoint()
+		 *  
+		 **********************************************************************/
+
+		/* Create a break point on a generic function */
+		location = cdiTarget.createFunctionLocation("main.c", "func1");
+		assertNotNull(location);
+		curbreak = cdiTarget.setFunctionBreakpoint(0, location, null, false);
+		savedLocation = curbreak.getLocator();
+
+		location = cdiTarget.createFunctionLocation("main.c", "main");
+		assertNotNull(location);
+		curbreak = cdiTarget.setFunctionBreakpoint(0, location, null, false);
+		cdiTarget.deleteBreakpoints( new ICDIBreakpoint[] { curbreak } );
+		pause();
+		breakpoints = cdiTarget.getBreakpoints();
+		/***********************************************************************
+		 * Make sure there is only 1 breakpoint left, and it's the one we expect
+		 */
+		assertTrue(breakpoints.length == 1);
+		curbreak = (ICDILocationBreakpoint) breakpoints[0];
+		assertNotNull(curbreak);
+		assertTrue(curbreak.getLocator().equals(savedLocation));
+		/***********************************************************************
+		 * Then delete the other breakpoint.
+		 */
+		cdiTarget.deleteBreakpoints( new ICDIBreakpoint[] { curbreak } );
+		pause();
+		breakpoints = cdiTarget.getBreakpoints();
+		assertTrue(breakpoints.length == 0);
+
+		/***********************************************************************
+		 * Make sure deleteBreakpoints works when given 1 breakpoint to delete
+		 **********************************************************************/
+		savedbreakpoints = new ICDIBreakpoint[1];
+		for (int x = 0; x < 10; x++) {
+			ICDILineLocation lineLocation = cdiTarget.createLineLocation("main.c", x + 1);
+			savedbreakpoints[0] = cdiTarget.setLineBreakpoint(0, lineLocation, null, false);
+			assertNotNull(savedbreakpoints[0]);
+		}
+		cdiTarget.deleteBreakpoints(savedbreakpoints);
+		pause();
+		/* We should now have 9 breakpoints left. */
+		breakpoints = cdiTarget.getBreakpoints();
+		assertTrue(breakpoints.length == 9);
+		/* Make sure we have the correct 9 breakpoints left */
+		for (int x = 0; x < breakpoints.length; x++) {
+			curbreak = (ICDILocationBreakpoint) breakpoints[x];
+			assertTrue(curbreak.getLocator().getLineNumber() == x + 1);
+		}
+		cdiTarget.deleteAllBreakpoints();
+		pause();
+		assertTrue(cdiTarget.getBreakpoints().length == 0);
+
+		/***********************************************************************
+		 * Make sure deleteBreakpoints works when given more then 1 but less
+		 * then all breakpoints to delete
+		 **********************************************************************/
+		savedbreakpoints = new ICDIBreakpoint[4];
+		for (int x = 0; x < 10; x++) {
+			ICDILineLocation lineLocation = cdiTarget.createLineLocation("main.c", x + 1);
+			savedbreakpoints[x % 4] = cdiTarget.setLineBreakpoint(0, lineLocation, null, false);
+			assertNotNull(savedbreakpoints[x % 4]);
+		}
+		cdiTarget.deleteBreakpoints(savedbreakpoints);
+		pause();
+
+		/* We should now have 6 breakpoints left. */
+		breakpoints = cdiTarget.getBreakpoints();
+		assertTrue(breakpoints.length == 6);
+		/* Make sure we have the correct 6 breakpoints left */
+		for (int x = 0; x < breakpoints.length; x++) {
+			curbreak = (ICDILocationBreakpoint) breakpoints[x];
+			assertTrue(curbreak.getLocator().getLineNumber() == x + 1);
+		}
+		cdiTarget.deleteAllBreakpoints();
+		pause();
+		assertTrue(cdiTarget.getBreakpoints().length == 0);
+
+		/***********************************************************************
+		 * Make sure deleteBreakpoints works when given all the breakpoints
+		 **********************************************************************/
+		savedbreakpoints = new ICDIBreakpoint[10];
+		for (int x = 0; x < 10; x++) {
+			ICDILineLocation lineLocation = cdiTarget.createLineLocation("main.c", x + 1);
+			savedbreakpoints[x] = cdiTarget.setLineBreakpoint(0, lineLocation, null, false);
+			assertNotNull(savedbreakpoints[x]);
+		}
+		cdiTarget.deleteBreakpoints(savedbreakpoints);
+		pause();
+		/* We should now have 0 breakpoints left. */
+		breakpoints = cdiTarget.getBreakpoints();
+		assertTrue(breakpoints.length == 0);
+
+		/***********************************************************************
+		 * Make sure deleteAllBreakpoints works
+		 **********************************************************************/
+
+		for (int x = 0; x < 10; x++) {
+			ICDILineLocation lineLocation = cdiTarget.createLineLocation("main.c", x + 1);
+			curbreak = cdiTarget.setLineBreakpoint(0, lineLocation, null, false);
+			assertNotNull(curbreak);
+		}
+		cdiTarget.deleteAllBreakpoints();
+		pause();
+		/* We should now have 0 breakpoints left. */
+		breakpoints = cdiTarget.getBreakpoints();
+		assertTrue(breakpoints.length == 0);
+
+	}
+
+	/***************************************************************************
+	 * A couple tests to make sure setting breakpoints with conditions seems to
+	 * work as expected.
+	 */
+	public void testCondBreak() throws CoreException, MIException, IOException, CDIException, InterruptedException {
+		boolean caught = false;
+		ICDITarget cdiTarget = currentTarget;
+		ICDICondition cond;
+
+		/***********************************************************************
+		 * Create a break point on a line number with a condition and make sure
+		 * it does not suspend execution of the application until the condition
+		 * is true
+		 **********************************************************************/
+		cdiTarget.deleteAllBreakpoints();
+		pause();
+		ICDILineLocation lineLocation = cdiTarget.createLineLocation(null, 23);
+		assertNotNull(lineLocation);
+		cond = cdiTarget.createCondition(0, "a>10");
+		cdiTarget.setLineBreakpoint(0, lineLocation, cond, false);
+		pause();
+		resumeCurrentTarget();
+		/**
+		 * Give the process up to 10 seconds to become either terminated or
+		 * suspended. It sould hit the breakponint almost immediatly so we
+		 * should only sleep for max 100 ms
+		 */
+		waitSuspend(cdiTarget);
+		ICDIStackFrame frame = getCurrentFrame(); 
+		ICDILocator locator = getCurrentLocator();
+		assertTrue(locator.getLineNumber() == 23);
+		assertTrue(locator.getFunction().equals("main"));
+		assertTrue(locator.getFile().endsWith("main.c"));
+		/* Get the value of a and and make sure it is 11 */
+		assertTrue(targets[0].evaluateExpressionToString(frame, "a"), targets[0].evaluateExpressionToString(frame, "a").equals("11"));
+
+	}
+	public void testCondBreak2() throws CoreException, MIException, IOException, CDIException, InterruptedException {
+		boolean caught = false;
+		ICDITarget cdiTarget = currentTarget;
+
+		/***********************************************************************
+		 * Create a break point on a generic function with an empty condition
+		 **********************************************************************/
+		ICDICondition cond = cdiTarget.createCondition(0, "");
+		ICDIFunctionLocation location = cdiTarget.createFunctionLocation(null, "func1");
+		assertNotNull(location);
+		cdiTarget.setFunctionBreakpoint(0, location, cond, false);
+
+		/***********************************************************************
+		 * Create a break point on a generic function with an valid condition
+		 **********************************************************************/
+		cond = cdiTarget.createCondition(0, "x<10");
+		location = cdiTarget.createFunctionLocation(null, "func1");
+		assertNotNull(location);
+		cdiTarget.setFunctionBreakpoint(0, location, cond, false);
+
+		/***********************************************************************
+		 * Create a break point on a generic function with an invalid condition
+		 * We expect to get a CDIException when we try to set the breakpoint.
+		 **********************************************************************/
+		cond = cdiTarget.createCondition(0, "nonexist<10");
+		location = cdiTarget.createFunctionLocation(null, "func1");
+		assertNotNull(location);
+		try {
+			cdiTarget.setFunctionBreakpoint(0, location, cond, false);
+		} catch (CDIException e) {
+			caught = true;
+		}
+		assertTrue("Setting wrong condition should fail",caught);
+	}
+	
+	public void testHitCond() throws CoreException, MIException, IOException, CDIException, InterruptedException {
+		// this currently fails sometimes - after set bad breakpoint it does not hit any
+		setBreakOnMain();
+		testCondBreak2();
+		resumeCurrentTarget();
+		waitSuspend(currentTarget);
+	}
+	/***************************************************************************
+	 * A test to make sure setting address breakpoints works as
+	 * expected.
+	 */
+	public void testAddressBreak() throws CoreException, MIException, IOException, CDIException, InterruptedException {
+		
+		
+		ICDIAddressLocation location;
+		boolean caught = false;
+
+		setBreakOnMain();
+		currentTarget.resume(false);
+		waitSuspend(currentTarget);
+		currentTarget.stepOver(1);
+		pause();
+		BigInteger address = getCurrentLocator().getAddress();
+		/***********************************************************************
+		 * Create a break point on first instruction
+		 **********************************************************************/
+
+		location = currentTarget.createAddressLocation(address); //$NON-NLS-1$
+		assertNotNull(location);
+		currentTarget.setAddressBreakpoint(0, location, null, false);
+		
+		// restart
+		currentTarget.restart();
+		pause();
+		waitSuspend(currentTarget);
+		
+		ICDILocator locator = getCurrentLocator();
+		assertTrue(locator.getLineNumber() == 18);
+		assertTrue(locator.getFunction().equals("main")); //$NON-NLS-1$
+		assertTrue(locator.getFile().endsWith("main.c")); //$NON-NLS-1$
+	}
+
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/DebugTests.java b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/DebugTests.java
new file mode 100644
index 0000000..9a629a3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/DebugTests.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.core.tests;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.debug.core.cdi.CDIException;
+import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
+import org.eclipse.cdt.debug.core.cdi.ICDISession;
+import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
+import org.eclipse.cdt.debug.mi.core.MIException;
+import org.eclipse.cdt.debug.testplugin.CDebugHelper;
+import org.eclipse.cdt.debug.testplugin.CProjectHelper;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * @author Peter Graves
+ *
+ * This file contains a set of generic tests for the debug stuff. It currenly 
+ * uses the mi debugger.
+ *
+ */
+public class DebugTests extends TestCase {
+    IWorkspace workspace;
+    IWorkspaceRoot root;
+    ICProject testProject;
+    NullProgressMonitor monitor;
+	ICDISession session;
+    
+
+    /**
+     * Constructor for DebugTests
+     * @param name
+     */
+    public DebugTests(String name) {
+        super(name);
+     /***
+     * The assume that they have a working workspace
+     * and workspace root object to use to create projects/files in, 
+     * so we need to get them setup first.
+     */
+        workspace= ResourcesPlugin.getWorkspace();
+        root= workspace.getRoot();
+        monitor = new NullProgressMonitor();
+        if (workspace==null) 
+            fail("Workspace was not setup");
+        if (root==null)
+            fail("Workspace root was not setup");
+
+    }
+    
+    /**
+     * Sets up the test fixture.
+     *
+     * Called before every test case method.
+     * 
+     * Example code test the packages in the project 
+     *  "com.qnx.tools.ide.cdt.core"
+     */
+    protected void setUp() throws CoreException, InvocationTargetException, IOException {
+		ResourcesPlugin.getWorkspace().getDescription().setAutoBuilding(false);
+		/***
+		 * Create a new project and import the test source.
+		 */
+		IPath importFile = new Path("resources/debugTest.zip");
+		testProject=CProjectHelper.createCProjectWithImport("filetest", importFile);
+		if (testProject==null)
+			fail("Unable to create project");
+		/* Build the test project.. */
+
+		testProject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+            
+    }
+    
+     /**
+     * Tears down the test fixture.
+     *
+     * Called after every test case method.
+     */
+    protected void tearDown() throws CoreException, CDIException {
+    	if (session!=null) {
+    		session.terminate();
+    		session=null;
+    	}
+        CProjectHelper.delete(testProject);
+    }
+    
+    public static TestSuite suite() {
+    return new TestSuite(DebugTests.class);
+    }
+    
+    public static void main (String[] args){
+    junit.textui.TestRunner.run(suite());
+    }
+
+
+    /***
+     * Can we setup a debug?
+     * This is sort of a catch all sanity tests to make sure we can create a debug
+     * session with a break point and start it without having any exceptions thrown.
+     * It's not ment to be a real proper test.
+     */
+    public void testDebug() throws CoreException, MIException, IOException, CDIException {
+        ICDITarget cdiTarget;
+        ICDIFunctionLocation location;
+	
+		session=CDebugHelper.createSession("main",testProject);
+        assertNotNull(session);
+		ICDITarget[] targets = session.getTargets();
+		assertNotNull(targets);
+		assertTrue(targets.length > 0);
+		cdiTarget = targets[0];
+		assertNotNull(cdiTarget);
+		location=cdiTarget.createFunctionLocation(null, "func1");
+		assertNotNull(location);
+		cdiTarget.setFunctionBreakpoint(0, location, null, false);
+		cdiTarget.resume();
+		session.terminate();
+		session=null;
+
+   }
+       
+
+}
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/EventBreakpointTests.java b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/EventBreakpointTests.java
new file mode 100644
index 0000000..7f58310
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/EventBreakpointTests.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2008 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.core.tests;
+
+import java.io.IOException;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.debug.core.cdi.CDIException;
+import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
+import org.eclipse.cdt.debug.core.cdi.ICDILocation;
+import org.eclipse.cdt.debug.core.cdi.ICDILocator;
+import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
+import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpointManagement3;
+import org.eclipse.cdt.debug.core.cdi.model.ICDIEventBreakpoint;
+import org.eclipse.cdt.debug.core.model.ICBreakpointType;
+import org.eclipse.cdt.debug.mi.core.MIException;
+import org.eclipse.cdt.debug.mi.core.cdi.model.EventBreakpoint;
+
+public class EventBreakpointTests extends AbstractDebugTest {
+	public static Test suite() {
+		return new DebugTestWrapper(EventBreakpointTests.class){};
+	}
+
+	protected String getProjectName() {
+		return "catchpoints";
+	}
+
+	protected String getProjectZip() {
+		return "resources/debugCxxTest.zip";
+	}
+
+	protected String getProjectBinary() {
+		return "catchpoints.exe";
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		createDebugSession();
+		assertNotNull(currentTarget);
+		currentTarget.deleteAllBreakpoints();
+		pause();
+	}
+
+
+	public void testCatch() throws CModelException, IOException, MIException, CDIException {
+		eventbreakpoints(EventBreakpoint.CATCH, "");
+	}
+
+	public void testThrow() throws CModelException, IOException, MIException, CDIException {
+		eventbreakpoints(EventBreakpoint.THROW, "");
+	}
+	
+	private void eventbreakpoints(String type, String arg) throws CModelException, IOException, MIException, CDIException {
+		ICDIBreakpoint[] breakpoints;
+		ICDIEventBreakpoint curbreak;
+
+		setBreakOnMain();
+		currentTarget.restart();
+		waitSuspend(currentTarget);
+		ICDILocator locator = getCurrentLocator();
+		assertEquals("Debug should be stopped in function 'main' but it is stopped in: " + locator.getFunction(),
+				"main", locator.getFunction());
+
+		currentTarget.deleteAllBreakpoints();
+		pause();
+		assertTrue(currentTarget instanceof ICDIBreakpointManagement3);
+		((ICDIBreakpointManagement3) currentTarget).setEventBreakpoint(type, arg, ICBreakpointType.REGULAR, null, false, true);
+		pause();
+		breakpoints = currentTarget.getBreakpoints();
+		assertNotNull(breakpoints);
+		assertEquals(1, breakpoints.length);
+		if (breakpoints[0] instanceof ICDIEventBreakpoint) {
+			curbreak = (ICDIEventBreakpoint) breakpoints[0];
+		} else
+			curbreak = null;
+		assertNotNull("Found breakpoint is not an event breakpoint",curbreak);
+		currentTarget.resume(false);
+		waitSuspend(currentTarget);
+		// it is stopped we are fine, it did hit breakpoint
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/LocationTests.java b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/LocationTests.java
new file mode 100644
index 0000000..015f692
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/LocationTests.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.core.tests;
+
+import java.io.IOException;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.debug.core.cdi.CDIException;
+import org.eclipse.cdt.debug.core.cdi.ICDIFunctionLocation;
+import org.eclipse.cdt.debug.core.cdi.ICDILineLocation;
+import org.eclipse.cdt.debug.core.cdi.model.ICDIBreakpoint;
+import org.eclipse.cdt.debug.core.cdi.model.ICDILocationBreakpoint;
+import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
+import org.eclipse.cdt.debug.mi.core.MIException;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * @author Peter Graves
+ *
+ * This file contains a set of generic tests for the CDI Location interfaces.
+ * It will currenly use the mi implementation.
+ *
+ */
+public class LocationTests extends AbstractDebugTest {
+    public static Test suite() {
+		return new DebugTestWrapper(LocationTests.class){};
+	}
+    
+    public static void main(String[] args) {
+		junit.textui.TestRunner.run(suite());
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		createDebugSession();
+		assertNotNull(currentTarget);
+		currentTarget.deleteAllBreakpoints();
+		pause();
+	}
+
+    /***
+     * A couple tests to make sure comparing Locations works as expected.
+     */
+    public void testIsEquals() throws CoreException, MIException, IOException, CDIException {
+    	ICDITarget cdiTarget = currentTarget;
+        ICDILineLocation lineLocation, lineLocation2;
+		ICDIFunctionLocation functionLocation, functionLocation2;
+        ICDIBreakpoint[] breakpoints;
+        ICDILocationBreakpoint curbreak;
+       
+        
+        /**********************************************************************
+         *  Simple test.. this should work.
+         **********************************************************************/
+        functionLocation=cdiTarget.createFunctionLocation("main.c", "func1");
+        functionLocation2=cdiTarget.createFunctionLocation("main.c", "func1");
+        assertTrue(functionLocation.equals(functionLocation2));
+        /**********************************************************************
+         *  Simple test.. this should work.
+         **********************************************************************/
+        lineLocation=cdiTarget.createLineLocation("main.c", 10);
+        lineLocation2=cdiTarget.createLineLocation("main.c", 10);
+        assertTrue(lineLocation.equals(lineLocation2));
+
+        /**********************************************************************
+         * make sure that the location returned from getLocation on the 
+         * ICDILocationBreakpoint.getLocation that is returned from 
+         * setLocationBreakpoint is the same as the breakpoint returned from
+         * BreakpointManager.getBreakpoints.getLocation()
+         **********************************************************************/
+        functionLocation=cdiTarget.createFunctionLocation("main.c", "func1");
+        assertNotNull(functionLocation);
+        functionLocation2=cdiTarget.setFunctionBreakpoint(0, functionLocation, null, false).getLocator();
+        
+        breakpoints=cdiTarget.getBreakpoints();
+        assertNotNull(breakpoints);
+        assertTrue(breakpoints.length==1);
+        if (breakpoints[0] instanceof ICDILocationBreakpoint) {
+            curbreak=(ICDILocationBreakpoint) breakpoints[0];
+        } else
+            curbreak=null;
+        assertNotNull(curbreak);
+        
+        assertTrue(curbreak.getLocator().equals(functionLocation2));
+        cdiTarget.deleteAllBreakpoints();
+        pause();
+        /* Create a break point on a generic function with a file name that 
+         * gdb will change to the relitive path of the source file.  This
+         * should work, but at the time of writing (Sept 25, 2002) does not.
+         */
+        functionLocation=cdiTarget.createFunctionLocation("main.c", "func1");
+        assertNotNull(functionLocation);
+        cdiTarget.setFunctionBreakpoint(0, functionLocation, null, false);
+        
+        breakpoints=cdiTarget.getBreakpoints();
+        assertNotNull(breakpoints);
+        assertTrue(breakpoints.length==1);
+        if (breakpoints[0] instanceof ICDILocationBreakpoint) {
+            curbreak=(ICDILocationBreakpoint) breakpoints[0];
+        } else
+            curbreak=null;
+        assertNotNull(curbreak);
+        
+        assertTrue("PR:23879",curbreak.getLocator().equals(functionLocation));
+   
+   }
+       
+
+}
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/TargetTests.java b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/TargetTests.java
new file mode 100644
index 0000000..8403951
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/core/org/eclipse/cdt/debug/core/tests/TargetTests.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.core.tests;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.eclipse.cdt.debug.testplugin.*;
+import org.eclipse.cdt.core.model.*;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.cdt.debug.mi.core.*;
+import org.eclipse.cdt.debug.core.cdi.*;
+
+/**
+ * @author Peter Graves
+ *
+ * This file contains a set of generic tests for the CDI Target interfaces.
+ * It will currenly use the mi implementation.
+ *
+ */
+public class TargetTests extends TestCase {
+    IWorkspace workspace;
+    IWorkspaceRoot root;
+    ICProject testProject;
+    NullProgressMonitor monitor;
+    
+
+    /**
+     * Constructor for TargetTests
+     * @param name
+     */
+    public TargetTests(String name) {
+        super(name);
+     /***
+     * The assume that they have a working workspace
+     * and workspace root object to use to create projects/files in, 
+     * so we need to get them setup first.
+     */
+        workspace= ResourcesPlugin.getWorkspace();
+        root= workspace.getRoot();
+        monitor = new NullProgressMonitor();
+        if (workspace==null) 
+            fail("Workspace was not setup");
+        if (root==null)
+            fail("Workspace root was not setup");
+
+    }
+    
+    /**
+     * Sets up the test fixture.
+     *
+     * Called before every test case method.
+     * 
+     * Example code test the packages in the project 
+     *  "com.qnx.tools.ide.cdt.core"
+     */
+    protected void setUp() throws CoreException,FileNotFoundException {
+            
+        /***
+         * Setup the various files, paths and projects that are needed by the
+         * tests
+         */
+        testProject=CProjectHelper.createCProject("filetest");
+        if (testProject==null)
+            fail("Unable to create project");
+    }
+    
+     /**
+     * Tears down the test fixture.
+     *
+     * Called after every test case method.
+     */
+    protected void tearDown() throws CoreException {
+        CProjectHelper.delete(testProject);
+    }
+    
+    public static TestSuite suite() {
+    return new TestSuite(TargetTests.class);
+    }
+    
+    public static void main (String[] args){
+    junit.textui.TestRunner.run(suite());
+    }
+
+
+    /***
+     * A couple tests to make sure various evaluations work as expected
+     */
+    public void testEvaluate() throws CoreException, MIException, IOException, CDIException, InterruptedException {
+    
+        /***
+         * Tests to come
+         */        
+    
+   }
+
+
+}
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/resources/debugCxxTest.zip b/results/plugins/org.eclipse.cdt.debug.ui.tests/resources/debugCxxTest.zip
new file mode 100644
index 0000000..d292561
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.debug.ui.tests/resources/debugCxxTest.zip differ
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/resources/debugTest.zip b/results/plugins/org.eclipse.cdt.debug.ui.tests/resources/debugTest.zip
new file mode 100644
index 0000000..9d1bdf0
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.debug.ui.tests/resources/debugTest.zip differ
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CDebugHelper.java b/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CDebugHelper.java
new file mode 100644
index 0000000..1c5fc5e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CDebugHelper.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2005 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.testplugin;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.debug.core.cdi.ICDISession;
+import org.eclipse.cdt.debug.mi.core.MIException;
+import org.eclipse.cdt.debug.mi.core.MIPlugin;
+import org.eclipse.cdt.debug.mi.core.command.MIVersion;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.swt.widgets.Display;
+
+
+/**
+ * Helper methods to set up a Debug session.
+ */
+public class CDebugHelper {
+	
+	
+
+	/**
+	 * Creates a ICDISession.
+	 */	
+	public static ICDISession createSession(String exe) throws IOException, MIException  {
+		MIPlugin mi;
+        ICDISession session;
+        String os = System.getProperty("os.name");
+        String exename;
+        mi=MIPlugin.getDefault();
+        
+        exename=org.eclipse.core.runtime.Platform.getPlugin("org.eclipse.cdt.debug.ui.tests").find(new Path("/")).getFile();
+        exename+="core/org/eclipse/cdt/debug/core/tests/resources/";
+        os=os.toLowerCase();
+        /* We need to get the correct executable to execute
+         */
+        if (os.indexOf("windows")!=-1)
+            exename+="win/"+ exe +".exe";
+        else if (os.indexOf("qnx")!=-1) 
+            exename+="qnx/" + exe;
+        else if (os.indexOf("linux")!=-1)
+            exename+="linux/"+exe;
+        else if (os.indexOf("sol")!=-1) 
+            exename+="sol/" + exe;
+        else
+           return(null);
+        session=mi.createCSession(null, MIVersion.MI1, new File(exename), new File("."), null, null);
+		return(session);
+	}
+	/**
+	 * Creates a ICDISession.
+	 */	
+	public static ICDISession createSession(String exe, ICProject project) throws IOException, MIException, CModelException  {
+		MIPlugin mi;
+		String  workspacePath= Platform.getLocation().toOSString();
+		ICDISession session;
+		mi=MIPlugin.getDefault();
+		
+		try {
+			project.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+		} catch (Exception exc) {}
+		IBinary bins[] = project.getBinaryContainer().getBinaries();
+		if (bins.length!=1) {
+			//SHOULD NOT HAPPEN
+			return(null);        
+		}
+		
+		session=mi.createCSession(null, MIVersion.MI1, new File(workspacePath +bins[0].getPath().toOSString()), new File("."), null, null);
+		return(session);
+	}
+	
+
+}
+
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CProjectHelper.java b/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CProjectHelper.java
new file mode 100644
index 0000000..355ac12
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CProjectHelper.java
@@ -0,0 +1,236 @@
+/*******************************************************************************
+ * Copyright (c) 2005 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.testplugin;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.zip.ZipFile;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.CProjectNature;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.core.ICDescriptorOperation;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.IArchive;
+import org.eclipse.cdt.core.model.IArchiveContainer;
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.cdt.core.model.IBinaryContainer;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.wizards.datatransfer.ImportOperation;
+import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;
+
+/**
+ * Helper methods to set up a ICProject.
+ */
+public class CProjectHelper {
+	/**
+	 * Creates a ICProject.
+	 */	
+	public static ICProject createCProjectWithImport(String projectName, IPath zipFile) throws CoreException, InvocationTargetException, IOException {
+		IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
+		IProject project= root.getProject(projectName);
+		if (!project.exists()) {
+			project.create(null);
+		} else {
+			project.refreshLocal(IResource.DEPTH_INFINITE, null);
+		}
+		
+		if (!project.isOpen()) {
+			project.open(null);
+		}
+		File zip = CTestPlugin.getDefault().getFileInPlugin(zipFile);
+		importFilesFromZip(new ZipFile(zip),project.getFullPath(),null);
+		
+		if (!project.hasNature(CProjectNature.C_NATURE_ID)) {
+			addNatureToProject(project, CProjectNature.C_NATURE_ID, null);
+		}
+		
+		ICProject cproject = CCorePlugin.getDefault().getCoreModel().create(project);
+		/* Try to guess at the correct binary parser.. elf or pe at this point.. */
+		ICDescriptorOperation op = new ICDescriptorOperation() {
+			
+			public void execute(ICDescriptor descriptor, IProgressMonitor monitor) throws CoreException {
+				descriptor.remove(CCorePlugin.BINARY_PARSER_UNIQ_ID);
+				String os = System.getProperty("os.name");
+				boolean pe=(os.toLowerCase().indexOf("windows")!=-1);
+				descriptor.create(CCorePlugin.BINARY_PARSER_UNIQ_ID, pe?"org.eclipse.cdt.core.PE":"org.eclipse.cdt.core.ELF");
+			}
+		};
+		CCorePlugin.getDefault().getCDescriptorManager().runDescriptorOperation(project, op, null);
+		return cproject;	
+	}
+	
+
+	/**
+	 * Creates a ICProject.
+	 */	
+	public static ICProject createCProject(String projectName) throws CoreException {
+		IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
+		IProject project= root.getProject(projectName);
+		if (!project.exists()) {
+			project.create(null);
+		} else {
+			project.refreshLocal(IResource.DEPTH_INFINITE, null);
+		}
+		
+		if (!project.isOpen()) {
+			project.open(null);
+		}
+		
+		if (!project.hasNature(CProjectNature.C_NATURE_ID)) {
+			addNatureToProject(project, CProjectNature.C_NATURE_ID, null);
+		}
+		
+		ICProject cproject = CCorePlugin.getDefault().getCoreModel().create(project);
+		
+		return cproject;	
+	}
+	
+	/**
+	 * Removes a ICProject.
+	 */		
+	public static void delete(ICProject cproject) throws CoreException {
+		cproject.getProject().delete(true, true, null);
+	}
+
+
+
+	/**
+	 * Attempts to find an archive with the given name in the workspace
+	 */
+	public static IArchive findArchive(ICProject testProject,String name) throws CModelException {
+		int x;
+		IArchive[] myArchives;
+		IArchiveContainer archCont;
+		archCont=testProject.getArchiveContainer();
+		myArchives=archCont.getArchives();
+		if (myArchives.length<1) 
+			return(null);
+		for (x=0;x<myArchives.length;x++) {
+			if (myArchives[x].getElementName().equals(name))
+					return(myArchives[x]);
+		}
+		return(null);
+	}	
+	/**
+	 * Attempts to find a binary with the given name in the workspace
+	 */
+	public static IBinary findBinary(ICProject testProject,String name) throws CModelException {
+		IBinaryContainer binCont;
+		int x;
+		IBinary[] myBinaries;
+		binCont=testProject.getBinaryContainer();
+		myBinaries=binCont.getBinaries();
+		if (myBinaries.length<1) 
+			return(null);
+		for (x=0;x<myBinaries.length;x++) {
+			if (myBinaries[x].getElementName().equals(name))
+					return(myBinaries[x]);
+				
+		}
+		return(null);
+	}	
+
+	/**
+	 * Attempts to find an object with the given name in the workspace
+	 */
+	public static IBinary findObject(ICProject testProject,String name) throws CModelException {
+		int x;
+		ICElement[] myElements;
+		myElements=testProject.getChildren();
+		if (myElements.length<1) 
+			return(null);
+		for (x=0;x<myElements.length;x++) {
+			if (myElements[x].getElementName().equals(name))
+				if (myElements[x] instanceof IBinary) {
+					 return((IBinary) myElements[x]);
+				}
+		}
+		return(null);
+	}	
+	/**
+	 * Attempts to find a TranslationUnit with the given name in the workspace
+	 */
+	public static ITranslationUnit findTranslationUnit(ICProject testProject,String name) throws CModelException {
+		int x;
+		ICElement[] myElements;
+		myElements=testProject.getChildren();
+		if (myElements.length<1) 
+			return(null);
+		for (x=0;x<myElements.length;x++) {
+			if (myElements[x].getElementName().equals(name))
+				if (myElements[x] instanceof ITranslationUnit) {
+					return((ITranslationUnit) myElements[x]);
+				}
+		}
+		return(null);
+	}	
+
+
+
+	/**
+	 * Attempts to find an element with the given name in the workspace
+	 */
+	public static ICElement findElement(ICProject testProject,String name) throws CModelException {
+		int x;
+		ICElement[] myElements;
+		myElements=testProject.getChildren();
+		if (myElements.length<1) 
+			return(null);
+		for (x=0;x<myElements.length;x++) {
+			if (myElements[x].getElementName().equals(name))
+				return myElements[x];
+		}
+		return(null);
+	}	
+		
+
+	private static void addNatureToProject(IProject proj, String natureId, IProgressMonitor monitor) throws CoreException {
+		IProjectDescription description = proj.getDescription();
+		String[] prevNatures= description.getNatureIds();
+		String[] newNatures= new String[prevNatures.length + 1];
+		System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
+		newNatures[prevNatures.length]= natureId;
+		description.setNatureIds(newNatures);
+		proj.setDescription(description, monitor);
+	}
+	
+	private static void importFilesFromZip(ZipFile srcZipFile, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException {		
+		ZipFileStructureProvider structureProvider=	new ZipFileStructureProvider(srcZipFile);
+		try {
+			ImportOperation op= new ImportOperation(destPath, structureProvider.getRoot(), structureProvider, new ImportOverwriteQuery());
+			op.run(monitor);
+		} catch (InterruptedException e) {
+			// should not happen
+		}
+	}
+	
+	private static class ImportOverwriteQuery implements IOverwriteQuery {
+		public String queryOverwrite(String file) {
+			return ALL;
+		}	
+	}		
+	
+	
+}
+
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CTestPlugin.java b/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CTestPlugin.java
new file mode 100644
index 0000000..cf05108
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/CTestPlugin.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.testplugin;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IPluginDescriptor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+
+
+public class CTestPlugin extends Plugin {
+	
+	private static CTestPlugin fgDefault;
+	
+	public CTestPlugin(IPluginDescriptor descriptor) {
+		super(descriptor);
+		fgDefault= this;
+	}
+	
+	public static CTestPlugin getDefault() {
+		return fgDefault;
+	}
+	
+	public static IWorkspace getWorkspace() {
+		return ResourcesPlugin.getWorkspace();
+	}
+	
+	public static void enableAutobuild(boolean enable) throws CoreException {
+		// disable auto build
+		IWorkspace workspace= CTestPlugin.getWorkspace();
+		IWorkspaceDescription desc= workspace.getDescription();
+		desc.setAutoBuilding(enable);
+		workspace.setDescription(desc);
+	}
+	
+	public File getFileInPlugin(IPath path) {
+		try {
+			URL installURL= new URL(getDescriptor().getInstallURL(), path.toString());
+			URL localURL= Platform.asLocalURL(installURL);
+			return new File(localURL.getFile());
+		} catch (IOException e) {
+			return null;
+		}
+	}
+	
+		
+
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/util/ExpectedStrings.java b/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/util/ExpectedStrings.java
new file mode 100644
index 0000000..4388c5d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/util/ExpectedStrings.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2005 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.testplugin.util;
+
+
+import java.util.Stack;
+/**
+ * @author Peter Graves
+ *
+ * This utility class maintains a list of strings, and as a tests finds strings
+ * in a structure/list, it will maintain a list of unfound/extra strings.
+ */
+public class ExpectedStrings {
+
+	public String [] expStrings;
+	private boolean[] foundStrings; 
+	private Stack extraStrings; 	/* A stack of the unecpected strings we 
+									 * recieved
+									 */
+	private boolean extra;
+
+	/**
+	 * Constructor for ExpectedStrings.
+	 */
+	public ExpectedStrings() {
+	}
+	/**
+	 * Constructor for ExpectedStrings that accepts a list of strings that
+	 * we expect to get.
+	 */
+	public ExpectedStrings(String[] values) {
+		int x;
+		expStrings=new String[values.length];
+		for (x=0;x<values.length;x++) {
+			expStrings[x]=new String(values[x]);
+		}
+		foundStrings=new boolean[values.length];
+		for (x=0;x<values.length;x++) {
+			foundStrings[x]=false;
+		}
+		extraStrings=new Stack();
+		extra=false;
+	}
+	
+	public int foundString(String current) {
+		int x;
+		for (x=0;x<expStrings.length;x++) {
+			if (current.equals(expStrings[x])) {
+				foundStrings[x]=true;
+				return(0);
+			}
+		}
+		/* If we arrive here, the strings was not found, so this is
+		 * and extra string
+		 */
+
+		 extraStrings.push(new String(current));
+		 extra=true;
+		 return(1);
+	}
+	public int getNum(String name) {
+		int x;
+		for (x=0;x<expStrings.length;x++) {
+			if (name.equals(expStrings[x]))
+				return(x);
+		}
+		return(-1);
+	}
+	public boolean gotAll() {
+		int x;
+		for (x=0;x<expStrings.length;x++) {
+			if (foundStrings[x]==false)
+				return(false);
+		}
+		return(true);
+	}
+	public boolean gotExtra() {
+		return(extra);
+	}
+	public String getMissingString() {
+		int x;
+		String missing = new String("Missing elements: ");
+		for (x=0;x<expStrings.length;x++) {
+			if (foundStrings[x]==false)
+				missing+=expStrings[x];
+				missing+=" ";
+		}
+		return(missing);
+	}
+	public String getExtraString() {
+		String extra= new String("Extra elements: ");
+		while (!extraStrings.empty()) {
+			extra+=extraStrings.pop();
+			extra+=" ";
+		}
+		return(extra);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/util/ExpectedStringsTests.java b/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/util/ExpectedStringsTests.java
new file mode 100644
index 0000000..844e20a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/src/org/eclipse/cdt/debug/testplugin/util/ExpectedStringsTests.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2005 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.testplugin.util;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * @author Peter Graves
+ *
+ *Some simple tests to make sure our ExtraStrings class seems to work.
+ */
+public class ExpectedStringsTests extends TestCase {
+
+	/**
+	 * Constructor for ExpectedStringsTests.
+	 * @param name
+	 */
+	public ExpectedStringsTests(String name) {
+		super(name);
+	}
+	    /**
+     * Sets up the test fixture.
+     *
+     * Called before every test case method.
+     * 
+     * Example code test the packages in the project 
+     *  "com.qnx.tools.ide.cdt.core"
+     */
+    protected void setUp() {
+
+
+    }
+    
+     /**
+     * Tears down the test fixture.
+     *
+     * Called after every test case method.
+     */
+    protected void tearDown() {
+       // release resources here and clean-up
+    }
+    
+    public static TestSuite suite() {
+        return new TestSuite(ExpectedStringsTests.class);
+    }
+    
+    public static void main (String[] args){
+        junit.textui.TestRunner.run(suite());
+    }
+
+	public void testGotAll() {
+		ExpectedStrings myExp;
+		String[] strings= {"stringOne", "stringTwo", "stringThree" };
+		
+		myExp=new ExpectedStrings(strings);
+		assertTrue("No found strings", !myExp.gotAll());
+		myExp.foundString("stringOne");
+		assertTrue("1 found strings", !myExp.gotAll());
+		myExp.foundString("stringTwo");
+		assertTrue("2 found strings", !myExp.gotAll());
+		myExp.foundString("stringThree");
+		assertTrue("All found strings", myExp.gotAll());
+		
+		
+	}
+	public void testGotExtra () {
+		ExpectedStrings myExp;
+		String[] strings= {"stringOne", "stringTwo", "stringThree" };
+		
+		myExp=new ExpectedStrings(strings);
+		assertTrue("No found strings", !myExp.gotExtra());
+		myExp.foundString("stringOne");
+		assertTrue("1 found strings", !myExp.gotExtra());
+		myExp.foundString("stringTwo");
+		assertTrue("2 found strings", !myExp.gotExtra());
+		myExp.foundString("stringThree");
+		assertTrue("All found strings", !myExp.gotExtra());
+		myExp.foundString("Somerandomestring");
+		assertTrue("Extra String", myExp.gotExtra());
+		
+	}
+	
+	public void testGetMissingString()
+	{
+		ExpectedStrings myExp;
+		String[] strings= {"stringOne", "stringTwo", "stringThree" };
+		
+		myExp=new ExpectedStrings(strings);
+		assertNotNull(myExp.getMissingString());
+		myExp.foundString("stringOne");
+		assertNotNull(myExp.getMissingString());
+		myExp.foundString("stringTwo");
+		assertNotNull(myExp.getMissingString());
+		myExp.foundString("stringThree");
+		assertNotNull(myExp.getMissingString());
+
+	}
+	
+	public void testGetExtraString()
+	{
+		ExpectedStrings myExp;
+		String[] strings= {"stringOne", "stringTwo", "stringThree" };
+		
+		myExp=new ExpectedStrings(strings);
+		assertNotNull(myExp.getExtraString());
+		myExp.foundString("stringOnenot");
+		assertNotNull(myExp.getMissingString());
+		myExp.foundString("stringTwonot");
+		assertNotNull(myExp.getMissingString());
+
+	}
+
+
+
+}
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.tests/test.xml b/results/plugins/org.eclipse.cdt.debug.ui.tests/test.xml
new file mode 100644
index 0000000..41075b0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.debug.ui.tests/test.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+
+<project name="testsuite" default="run" basedir=".">
+  <!-- The property ${eclipse-home} should be passed into this script -->
+  <!-- Set a meaningful default value for when it is not. -->
+  <property name="eclipse-home" value="${basedir}"/>
+
+  <!-- sets the properties eclipse-home, and library-file -->
+  <property name="plugin-name" value="org.eclipse.cdt.debug.ui.tests"/>
+  <property name="library-file"
+            value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
+
+  <!-- This target holds all initialization code that needs to be done for -->
+  <!-- all tests that are to be run. Initialization for individual tests -->
+  <!-- should be done within the body of the suite target. -->
+  <target name="init">
+    <tstamp/>
+    <delete>
+      <fileset dir="${eclipse-home}" includes="org*.xml"/>
+    </delete>
+  </target>
+
+  <!-- This target defines the tests that need to be run. -->
+  <target name="suite">
+    <property name="cdt-folder" 
+              value="${eclipse-home}/cdt_folder"/>
+    <delete dir="${cdt-folder}" quiet="true"/>
+    <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+      <property name="data-dir" value="${cdt-folder}"/>
+      <property name="plugin-name" value="${plugin-name}"/>
+      <property name="classname" 
+                value="org.eclipse.cdt.debug.core.tests.AllDebugTests"/>
+    </ant>
+  </target>
+
+  <!-- This target holds code to cleanup the testing environment after -->
+  <!-- after all of the tests have been run. You can use this target to -->
+  <!-- delete temporary files that have been created. -->
+  <target name="cleanup">
+  </target>
+
+  <!-- This target runs the test suite. Any actions that need to happen -->
+  <!-- after all the tests have been run should go here. -->
+  <target name="run" depends="init,suite,cleanup">
+    <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+      <property name="includes" value="org*.xml"/>
+      <property name="output-file" value="${plugin-name}.xml"/>
+    </ant>
+  </target>
+
+</project>
diff --git a/results/plugins/org.eclipse.cdt.debug.ui/.classpath b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/.classpath
similarity index 100%
copy from results/plugins/org.eclipse.cdt.debug.ui/.classpath
copy to results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/.classpath
diff --git a/results/plugins/org.eclipse.cdt.core.aix/.cvsignore b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/.cvsignore
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.aix/.cvsignore
copy to results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/.cvsignore
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/.project b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/.project
new file mode 100644
index 0000000..2d08832
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.examples.dsf.pda.ui</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/.settings/org.eclipse.jdt.core.prefs b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..d777d69
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,65 @@
+#Tue Jun 24 11:03:46 PDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..03687de
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.cdt.examples.dsf.pda.ui;singleton:=true
+Bundle-Version: 2.0.0.qualifier
+Bundle-Activator: org.eclipse.cdt.examples.dsf.pda.ui.PDAUIPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.debug.core,
+ org.eclipse.ui,
+ org.eclipse.debug.ui,
+ org.eclipse.jface.text,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.ui.ide,
+ org.eclipse.cdt.examples.dsf.pda,
+ org.eclipse.cdt.dsf,
+ org.eclipse.cdt.dsf.ui
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.cdt.examples.dsf.pda.ui,
+ org.eclipse.cdt.examples.dsf.pda.ui.breakpoints,
+ org.eclipse.cdt.examples.dsf.pda.ui.editor,
+ org.eclipse.cdt.examples.dsf.pda.ui.launcher
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %providerName
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/about.html b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/about.html
new file mode 100644
index 0000000..c1cb2e1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>May 14, 2008</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/build.properties b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/build.properties
new file mode 100644
index 0000000..5ebe940
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/build.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2006, 2008 Wind River Systems and others.
+# 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
+# 
+# Contributors:
+#     Wind River Systems - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+               about.html,\
+               META-INF/,\
+               .,\
+               icons/,\
+               plugin.properties
+src.includes = about.html
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/icons/full/obj16/pda.gif b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/icons/full/obj16/pda.gif
new file mode 100644
index 0000000..9a6adbf
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/icons/full/obj16/pda.gif differ
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/plugin.properties b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/plugin.properties
new file mode 100644
index 0000000..f3964ae
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/plugin.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2006, 2009 Wind River Systems and others.
+# 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
+#
+# Contributors:
+#   Wind River Systems - initial API and implementation
+#   IBM Corporation
+###############################################################################
+pluginName=PDA Example Device Debugging UI Plug-in
+providerName=Eclipse CDT
+
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/plugin.xml b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/plugin.xml
new file mode 100644
index 0000000..da6e4f6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/plugin.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+   <extension
+         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+      <launchConfigurationTabGroup
+            class="org.eclipse.cdt.examples.dsf.pda.ui.launcher.PDATabGroup"
+            description="Specify and launch a PDA(DSF) program"
+            id="org.eclipse.cdt.examples.dsf.pda.tabGroup"
+            type="org.eclipse.cdt.examples.dsf.pda.launchType"/>
+   </extension>
+   <extension
+         point="org.eclipse.debug.ui.launchConfigurationTypeImages">
+      <launchConfigurationTypeImage
+            icon="icons/full/obj16/pda.gif"
+            configTypeID="org.eclipse.cdt.examples.dsf.pda.launchType"
+            id="org.eclipse.cdt.examples.dsf.pda.typeImage"/>
+   </extension>
+
+   <extension
+         point="org.eclipse.core.runtime.adapters">
+      <factory
+            class="org.eclipse.cdt.examples.dsf.pda.ui.PDAAdapterFactory"
+            adaptableType="org.eclipse.cdt.examples.dsf.pda.launch.PDALaunch">
+         <adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider"/>
+         <adapter type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory"/>
+      </factory>
+   </extension>
+
+   <extension
+         point="org.eclipse.ui.editors">
+      <editor
+            filenames="*.pda"
+            class="org.eclipse.cdt.examples.dsf.pda.ui.editor.PDAEditor"
+            icon="icons/full/obj16/pda.gif"
+            default="true"
+            name="PDA(DSF) Editor"
+            id="org.eclipse.cdt.examples.dsf.pda.editor"
+            extensions="pda"/>
+   </extension>
+   <extension
+         point="org.eclipse.ui.editorActions">
+      <editorContribution
+            targetID="org.eclipse.cdt.examples.dsf.pda.editor"
+            id="org.eclipse.cdt.examples.dsf.pda.rulerActions">
+         <action
+               label="Not Used"
+               class="org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
+               style="push"
+               actionID="RulerDoubleClick"
+               id="org.eclipse.cdt.examples.dsf.pda.doubleClickBreakpointAction"/>
+      </editorContribution>
+   </extension>
+   <extension
+           point="org.eclipse.ui.contexts">
+        <context
+              parentId="org.eclipse.debug.ui.debugging"
+              description="Debugging PDA(DSF) Programs"
+              name="Debugging PDA(DSF) Programs"
+              id="org.eclipse.cdt.examples.dsf.pda.debugging"/>
+     </extension>
+	  <extension
+	        point="org.eclipse.debug.ui.debugModelContextBindings">
+	     <modelContextBinding
+	           contextId="org.eclipse.cdt.examples.dsf.pda.debugging"
+	           debugModelId="org.eclipse.cdt.examples.dsf.pda.debugModel"/>
+	  </extension>
+	   <extension
+	         point="org.eclipse.debug.ui.contextViewBindings">
+	      <contextViewBinding
+	            contextId="org.eclipse.cdt.examples.dsf.pda.debugging"
+	            viewId="org.eclipse.cdt.examples.dsf.pda.dataStackView"/>
+	   </extension>
+
+	<extension
+         point="org.eclipse.ui.popupMenus">           
+      <viewerContribution
+            targetID="org.eclipse.cdt.examples.dsf.pda.editor.rulerMenu"
+            id="org.eclipse.cdt.examples.dsf.pda.editor.rulerActions">
+         <action
+               label="Toggle Breakpoint"
+               class="org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
+               menubarPath="debug"
+               id="org.eclipse.cdt.examples.dsf.pda.editor.ruler.toggleBreakpointAction"/>
+      </viewerContribution>
+      <viewerContribution
+            targetID="org.eclipse.cdt.examples.dsf.pda.editor.contextMenu"
+            id="org.eclipse.cdt.examples.dsf.pda.editor.menuActions">
+         <action
+               label="Run to Line"
+               definitionId="org.eclipse.debug.ui.commands.RunToLine"
+               class="org.eclipse.debug.ui.actions.RunToLineActionDelegate"
+               menubarPath="additions"
+               id="org.eclipse.cdt.examples.dsf.pda.editor.context.runToLineAction"/>
+      </viewerContribution>
+   </extension>
+   
+   <extension
+         point="org.eclipse.core.runtime.adapters">
+      <factory
+            class="org.eclipse.cdt.examples.dsf.pda.ui.breakpoints.PDAEditorAdapterFactory"
+            adaptableType="org.eclipse.cdt.examples.dsf.pda.ui.editor.PDAEditor">
+			<adapter type="org.eclipse.debug.ui.actions.IToggleBreakpointsTarget"/>
+      </factory>
+   </extension> -->
+</plugin>
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/PDAAdapterFactory.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/PDAAdapterFactory.java
new file mode 100644
index 0000000..ce756d6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/PDAAdapterFactory.java
@@ -0,0 +1,266 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.WeakHashMap;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+import org.eclipse.cdt.dsf.debug.ui.actions.DsfResumeCommand;
+import org.eclipse.cdt.dsf.debug.ui.actions.DsfStepIntoCommand;
+import org.eclipse.cdt.dsf.debug.ui.actions.DsfStepOverCommand;
+import org.eclipse.cdt.dsf.debug.ui.actions.DsfStepReturnCommand;
+import org.eclipse.cdt.dsf.debug.ui.actions.DsfSuspendCommand;
+import org.eclipse.cdt.dsf.debug.ui.sourcelookup.DsfSourceDisplayAdapter;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.DefaultDsfModelSelectionPolicyFactory;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.cdt.examples.dsf.pda.launch.PDALaunch;
+import org.eclipse.cdt.examples.dsf.pda.ui.actions.PDATerminateCommand;
+import org.eclipse.cdt.examples.dsf.pda.ui.viewmodel.PDAVMAdapter;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchesListener2;
+import org.eclipse.debug.core.commands.IResumeHandler;
+import org.eclipse.debug.core.commands.IStepIntoHandler;
+import org.eclipse.debug.core.commands.IStepOverHandler;
+import org.eclipse.debug.core.commands.IStepReturnHandler;
+import org.eclipse.debug.core.commands.ISuspendHandler;
+import org.eclipse.debug.core.commands.ITerminateHandler;
+import org.eclipse.debug.core.model.IDebugModelProvider;
+import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicyFactory;
+import org.eclipse.debug.ui.sourcelookup.ISourceDisplay;
+
+/**
+ * The adapter factory is the central point of control of view model and other
+ * UI adapters of a DSF-based debugger.  As new launches are created and
+ * old ones removed, this factory manages the life cycle of the associated
+ * UI adapters.
+ * <p>
+ * As a platform adapter factory, this factory only  provides adapters for
+ * the launch object.  Adapters for all other objects in the DSF model hierarchy
+ * are registered with the DSF session.
+ * </p>
+ */
+ at ThreadSafe
+ at SuppressWarnings({"restriction"})
+public class PDAAdapterFactory implements IAdapterFactory, ILaunchesListener2
+{
+    /**
+     * Contains the set of adapters that are created for each launch instance.
+     */
+    @Immutable
+    private static class LaunchAdapterSet {
+        // View Model adapter
+        final PDAVMAdapter fViewModelAdapter;
+        
+        // Source lookup and positioning adapter
+        final DsfSourceDisplayAdapter fSourceDisplayAdapter;
+        
+        // Command adapters
+        final DsfStepIntoCommand fStepIntoCommand;
+        final DsfStepOverCommand fStepOverCommand;
+        final DsfStepReturnCommand fStepReturnCommand;
+        final DsfSuspendCommand fSuspendCommand;
+        final DsfResumeCommand fResumeCommand;
+        final PDATerminateCommand fTerminateCommand;
+        
+        // Adapters for integration with other UI actions
+        final IDebugModelProvider fDebugModelProvider;
+        final PDALaunch fLaunch;
+
+		final SteppingController fSteppingController;
+
+		private IModelSelectionPolicyFactory fModelSelectionPolicyFactory;
+
+        LaunchAdapterSet(PDALaunch launch) {
+            // Initialize launch and session.
+            fLaunch = launch;
+            DsfSession session = launch.getSession();
+            
+            // register stepping controller
+            fSteppingController = new SteppingController(session);
+            session.registerModelAdapter(SteppingController.class, fSteppingController);
+
+            // Initialize VM
+            fViewModelAdapter = new PDAVMAdapter(session, fSteppingController);
+
+            // Initialize source lookup
+            fSourceDisplayAdapter = new DsfSourceDisplayAdapter(session, (ISourceLookupDirector)launch.getSourceLocator(), fSteppingController);
+            session.registerModelAdapter(ISourceDisplay.class, fSourceDisplayAdapter);
+
+            // Default selection policy
+            fModelSelectionPolicyFactory = new DefaultDsfModelSelectionPolicyFactory();
+            session.registerModelAdapter(IModelSelectionPolicyFactory.class, fModelSelectionPolicyFactory);
+            
+            // Initialize retargetable command handler.
+            fStepIntoCommand = new DsfStepIntoCommand(session, null);
+            fStepOverCommand = new DsfStepOverCommand(session, null);
+            fStepReturnCommand = new DsfStepReturnCommand(session);
+            fSuspendCommand = new DsfSuspendCommand(session);
+            fResumeCommand = new DsfResumeCommand(session);
+            fTerminateCommand = new PDATerminateCommand(session);
+            session.registerModelAdapter(IStepIntoHandler.class, fStepIntoCommand);
+            session.registerModelAdapter(IStepOverHandler.class, fStepOverCommand);
+            session.registerModelAdapter(IStepReturnHandler.class, fStepReturnCommand);
+            session.registerModelAdapter(ISuspendHandler.class, fSuspendCommand);
+            session.registerModelAdapter(IResumeHandler.class, fResumeCommand);
+            session.registerModelAdapter(ITerminateHandler.class, fTerminateCommand);
+
+            // Initialize debug model provider
+            fDebugModelProvider = new IDebugModelProvider() {
+                public String[] getModelIdentifiers() {
+                    return new String[] { PDAPlugin.ID_PDA_DEBUG_MODEL };
+                }
+            };
+            session.registerModelAdapter(IDebugModelProvider.class, fDebugModelProvider);
+            
+            // Register the launch as an adapter This ensures that the launch,
+            // and debug model ID will be associated with all DMContexts from this
+            // session.
+            session.registerModelAdapter(ILaunch.class, fLaunch);
+        }
+        
+        void dispose() {
+            DsfSession session = fLaunch.getSession();
+
+            fViewModelAdapter.dispose();
+
+            session.unregisterModelAdapter(ISourceDisplay.class);
+            if (fSourceDisplayAdapter != null) fSourceDisplayAdapter.dispose();
+            
+            session.unregisterModelAdapter(SteppingController.class);
+            fSteppingController.dispose();
+
+            session.unregisterModelAdapter(IModelSelectionPolicyFactory.class);
+
+            session.unregisterModelAdapter(IStepIntoHandler.class);
+            session.unregisterModelAdapter(IStepOverHandler.class);
+            session.unregisterModelAdapter(IStepReturnHandler.class);
+            session.unregisterModelAdapter(ISuspendHandler.class);
+            session.unregisterModelAdapter(IResumeHandler.class);
+            session.unregisterModelAdapter(ITerminateHandler.class);
+            fStepIntoCommand.dispose();
+            fStepOverCommand.dispose();
+            fStepReturnCommand.dispose();
+            fSuspendCommand.dispose();
+            fResumeCommand.dispose();
+            fTerminateCommand.dispose();
+        }
+    }
+
+    /**
+     * Active adapter sets.  They are accessed using the launch instance 
+     * which owns the debug services session. 
+     */
+    private static Map<PDALaunch, LaunchAdapterSet> fgLaunchAdapterSets =
+        Collections.synchronizedMap(new HashMap<PDALaunch, LaunchAdapterSet>());
+ 
+    /**
+     * Map of launches for which adapter sets have already been disposed.
+     * This map (used as a set) is maintained in order to avoid re-creating an 
+     * adapter set after the launch was removed from the launch manager, but 
+     * while the launch is still being held by other classes which may 
+     * request its adapters.  A weak map is used to avoid leaking 
+     * memory once the launches are no longer referenced.
+     * <p>
+     * Access to this map is synchronized using the fgLaunchAdapterSets 
+     * instance.
+     * </p>
+     */
+    private static Map<ILaunch, Object> fgDisposedLaunchAdapterSets =
+        new WeakHashMap<ILaunch, Object>();
+
+	static void disposeAdapterSet(ILaunch launch) {
+		synchronized(fgLaunchAdapterSets) {
+            if ( fgLaunchAdapterSets.containsKey(launch) ) {
+                fgLaunchAdapterSets.remove(launch).dispose();
+                fgDisposedLaunchAdapterSets.put(launch, null);
+            }
+		}
+	}
+
+    public PDAAdapterFactory() {
+        DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
+    }
+
+    // This IAdapterFactory method returns adapters for the PDA launch object only.
+    @SuppressWarnings("unchecked") // IAdapterFactory is Java 1.3
+    public Object getAdapter(Object adaptableObject, Class adapterType) {
+        if (!(adaptableObject instanceof PDALaunch)) return null;
+
+        PDALaunch launch = (PDALaunch)adaptableObject;
+
+        // Check for valid session.  
+        // Note: even if the session is no longer active, the adapter set 
+        // should still be returned.  This is because the view model may still
+        // need to show elements representing a terminated process/thread/etc.
+        DsfSession session = launch.getSession();
+        if (session == null) return null;
+
+        // Find the correct set of adapters based on the launch.  If not found
+        // it means that we have a new launch, and we have to create a
+        // new set of adapters.
+        LaunchAdapterSet adapterSet;
+        synchronized(fgLaunchAdapterSets) {
+            // The adapter set for the given launch was already disposed.  
+            // Return a null adapter.
+            if (fgDisposedLaunchAdapterSets.containsKey(launch)) {
+                return null;
+            }
+            adapterSet = fgLaunchAdapterSets.get(launch);
+            if (adapterSet == null) {
+                adapterSet = new LaunchAdapterSet(launch);
+                fgLaunchAdapterSets.put(launch, adapterSet);
+            }
+        }
+        
+        // Returns the adapter type for the launch object.
+        if (adapterType.equals(IElementContentProvider.class)) return adapterSet.fViewModelAdapter;
+        else if (adapterType.equals(IModelProxyFactory.class)) return adapterSet.fViewModelAdapter;
+        else return null;
+    }
+
+    @SuppressWarnings("unchecked") // IAdapterFactory is Java 1.3
+    public Class[] getAdapterList() {
+        return new Class[] { IElementContentProvider.class, IModelProxyFactory.class, IColumnPresentationFactory.class };
+    }
+
+    public void launchesRemoved(ILaunch[] launches) {
+        // Dispose the set of adapters for a launch only after the launch is
+        // removed from the view.  If the launch is terminated, the adapters
+        // are still needed to populate the contents of the view.
+        for (ILaunch launch : launches) {
+            if (launch instanceof PDALaunch) {
+            	disposeAdapterSet(launch);
+            }
+        }
+    }
+
+    public void launchesTerminated(ILaunch[] launches) {
+    }
+
+    public void launchesAdded(ILaunch[] launches) {
+    }
+    
+    public void launchesChanged(ILaunch[] launches) {
+    }
+    
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/PDAUIPlugin.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/PDAUIPlugin.java
new file mode 100644
index 0000000..79d2dbd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/PDAUIPlugin.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.cdt.examples.dsf.pda.launch.PDALaunch;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.internal.util.BundleUtility;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class PDAUIPlugin extends AbstractUIPlugin {
+    
+    public static String PLUGIN_ID = "org.eclipse.cdt.examples.dsf.pda.ui "; 
+    
+	//The shared instance.
+	private static PDAUIPlugin plugin;
+	
+	private static BundleContext fContext;
+
+	private final static String ICONS_PATH = "icons/full/";//$NON-NLS-1$
+	private final static String PATH_OBJECT = ICONS_PATH + "obj16/"; //Model object icons //$NON-NLS-1$
+    
+    /**
+     * PDA program image
+     */
+    public final static String IMG_OBJ_PDA = "IMB_OBJ_PDA";
+    
+    /**
+     * Keyword color
+     */
+    public final static RGB KEYWORD = new RGB(0,0,255);
+    public final static RGB LABEL = new RGB(128, 128, 0);
+    
+    /**
+     * Managed colors
+     */
+    private Map<RGB, Color> fColors = new HashMap<RGB, Color>();
+    	
+	/**
+	 * The constructor.
+	 */
+	public PDAUIPlugin() {
+		super();
+		plugin = this;
+	}
+
+	/**
+	 * This method is called upon plug-in activation
+	 */
+	@Override
+	public void start(BundleContext context) throws Exception {
+        fContext = context;
+		super.start(context);
+//		Toggles single threaded adapter example
+//		IAdapterManager adapterManager = Platform.getAdapterManager();
+//		IAdapterFactory factory = new AdapterFactory();
+//		adapterManager.registerAdapters(factory, PDADebugTarget.class);
+	}
+
+	/**
+	 * This method is called when the plug-in is stopped
+	 */
+	@Override
+	public void stop(BundleContext context) throws Exception {
+		disposeAdapterSets();
+		super.stop(context);
+		plugin = null;
+		fContext = null;
+        for (Map.Entry<RGB, Color> entry : fColors.entrySet()) {
+            entry.getValue().dispose();
+        }
+	}
+
+	/**
+	 * Returns the shared instance.
+	 */
+	public static PDAUIPlugin getDefault() {
+		return plugin;
+	}
+
+	public static BundleContext getBundleContext() {
+	    return fContext;
+	}
+	    
+	@Override
+	protected void initializeImageRegistry(ImageRegistry reg) {
+		declareImage(IMG_OBJ_PDA, PATH_OBJECT + "pda.gif");
+	}
+	
+    /**
+     * Declares a workbench image given the path of the image file (relative to
+     * the workbench plug-in). This is a helper method that creates the image
+     * descriptor and passes it to the main <code>declareImage</code> method.
+     * 
+     * @param symbolicName the symbolic name of the image
+     * @param path the path of the image file relative to the base of the workbench
+     * plug-ins install directory
+     * <code>false</code> if this is not a shared image
+     */
+    private void declareImage(String key, String path) {
+        URL url = BundleUtility.find("org.eclipse.cdt.examples.dsf.pda.ui", path);
+        ImageDescriptor desc = ImageDescriptor.createFromURL(url);
+        getImageRegistry().put(key, desc);
+    }
+    
+    /**
+     * Returns the color described by the given RGB.
+     * 
+     * @param rgb
+     * @return color
+     */
+    public Color getColor(RGB rgb) {
+        Color color = fColors.get(rgb);
+        if (color == null) {
+            color= new Color(Display.getCurrent(), rgb);
+            fColors.put(rgb, color);
+        }
+        return color;
+    }
+    
+	/**
+	 * Dispose adapter sets for all launches.
+	 */
+	private void disposeAdapterSets() {
+        for (ILaunch launch : DebugPlugin.getDefault().getLaunchManager().getLaunches()) {
+            if (launch instanceof PDALaunch) {
+                PDAAdapterFactory.disposeAdapterSet(launch);
+            }
+        }
+	}
+
+ }
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/actions/PDATerminateCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/actions/PDATerminateCommand.java
new file mode 100644
index 0000000..923be68
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/actions/PDATerminateCommand.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.actions;
+
+import java.util.concurrent.RejectedExecutionException;
+
+import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
+import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.datamodel.DMContexts;
+import org.eclipse.cdt.dsf.service.DsfServicesTracker;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.IDMVMContext;
+import org.eclipse.cdt.examples.dsf.pda.service.PDACommandControl;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAVirtualMachineDMContext;
+import org.eclipse.cdt.examples.dsf.pda.ui.PDAUIPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
+import org.eclipse.debug.core.commands.IEnabledStateRequest;
+import org.eclipse.debug.core.commands.ITerminateHandler;
+
+/**
+ * The terminate command is specialized for the PDA debugger.  Currently there
+ * is no standard interface for terminating a debug session in DSF, because the 
+ * details of initiating and shutting down a debug session vary greatly in 
+ * different debuggers.
+ */
+public class PDATerminateCommand implements ITerminateHandler {
+    // The executor and the services tracker, both initialized from a DSF session.
+    private final DsfSession fSession;
+    private final DsfServicesTracker fTracker;
+    
+    public PDATerminateCommand(DsfSession session) {
+        fSession = session;
+        fTracker = new DsfServicesTracker(PDAUIPlugin.getBundleContext(), session.getId());
+    }    
+
+    public void dispose() {
+        // DSF services tracker always has to be disposed, because the OSGi services
+        // use reference counting.
+        fTracker.dispose();
+    }
+
+    // Run control may not be available after a connection is terminated and shut down.
+    public void canExecute(final IEnabledStateRequest request) {
+        // Terminate can only operate on a single element.
+        if (request.getElements().length != 1 || 
+            !(request.getElements()[0] instanceof IDMVMContext) ) 
+        {
+            request.setEnabled(false);
+            request.done();
+            return;
+        }
+
+        // Find the PDA program context in the selected element.  If one is not found, 
+        // the action should be disabled.
+        IDMVMContext vmc = (IDMVMContext)request.getElements()[0];
+        final PDAVirtualMachineDMContext pdaProgramCtx = DMContexts.getAncestorOfType(vmc.getDMContext(), PDAVirtualMachineDMContext.class);
+        if (pdaProgramCtx == null) {
+            request.setEnabled(false);
+            request.done();
+            return;
+        }            
+        
+        try {
+            fSession.getExecutor().execute(
+                new DsfRunnable() { 
+                    public void run() {
+                        // Get the processes service and the exec context.
+                        PDACommandControl commandControl = fTracker.getService(PDACommandControl.class);
+                        if (commandControl == null || pdaProgramCtx == null) {
+                            // Context or service already invalid.
+                            request.setEnabled(false);
+                            request.done();
+                        } else {
+                            // Check whether the control is terminated.
+                            request.setEnabled(!commandControl.isTerminated());
+                            request.done();
+                        }
+                    }
+                });
+        } catch (RejectedExecutionException e) {
+            // The DSF session for this context is no longer active.  It's possible to check 
+            // for this condition before calling fSession.getExecutor().execute(), but 
+            // since this method is executing in a different thread than the session control, 
+            // there would still be a chance for a race condition leading to this exception. 
+            request.setEnabled(false);
+            request.done();
+        }
+    }
+
+    public boolean execute(final IDebugCommandRequest request) {
+        // Skip the checks and assume that this method is called only if the action
+        // was enabled.
+
+        try {
+            fSession.getExecutor().submit(new DsfRunnable() { 
+                public void run() {
+                    // If the command control service is available, attempt to terminate the program.
+                    PDACommandControl commandControl = fTracker.getService(PDACommandControl.class);
+                    if (commandControl != null) {
+                        
+                        commandControl.terminate(
+                            new RequestMonitor(ImmediateExecutor.getInstance(), null) {
+                                @Override
+                                protected void handleCompleted() {
+                                    request.setStatus(getStatus());
+                                    request.done();
+                                }
+                            });
+                    }
+                 }
+            });
+        } catch (RejectedExecutionException e) {
+            request.setStatus(new Status(IStatus.ERROR, PDAUIPlugin.PLUGIN_ID, "PDA debug session is shut down."));
+            request.done();
+        }
+        return false;
+    }
+    
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDABreakpointAdapter.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDABreakpointAdapter.java
new file mode 100644
index 0000000..356cf1a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDABreakpointAdapter.java
@@ -0,0 +1,225 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.breakpoints;
+
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.cdt.examples.dsf.pda.breakpoints.PDALineBreakpoint;
+import org.eclipse.cdt.examples.dsf.pda.breakpoints.PDAWatchpoint;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.ILineBreakpoint;
+import org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+
+/**
+ * Adapter to create breakpoints in PDA files.
+ * <p>
+ * This class is identical to the corresponding in PDA debugger implemented in 
+ * org.eclipse.debug.examples.ui.
+ * </p>
+ */
+public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleLineBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+	 */
+	public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
+		ITextEditor textEditor = getEditor(part);
+		if (textEditor != null) {
+			IResource resource = (IResource) textEditor.getEditorInput().getAdapter(IResource.class);
+			ITextSelection textSelection = (ITextSelection) selection;
+			int lineNumber = textSelection.getStartLine();
+			IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(PDAPlugin.ID_PDA_DEBUG_MODEL);
+			for (int i = 0; i < breakpoints.length; i++) {
+				IBreakpoint breakpoint = breakpoints[i];
+				if (breakpoint instanceof ILineBreakpoint && resource.equals(breakpoint.getMarker().getResource())) {
+					if (((ILineBreakpoint)breakpoint).getLineNumber() == (lineNumber + 1)) {
+						// remove
+						breakpoint.delete();
+						return;
+					}
+				}
+			}
+			// create line breakpoint (doc line numbers start at 0)
+			PDALineBreakpoint lineBreakpoint = new PDALineBreakpoint(resource, lineNumber + 1);
+			DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(lineBreakpoint);
+		}
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleLineBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+	 */
+	public boolean canToggleLineBreakpoints(IWorkbenchPart part, ISelection selection) {
+		return getEditor(part) != null;
+	}
+	
+	/**
+	 * Returns the editor being used to edit a PDA file, associated with the
+	 * given part, or <code>null</code> if none.
+	 *  
+	 * @param part workbench part
+	 * @return the editor being used to edit a PDA file, associated with the
+	 * given part, or <code>null</code> if none
+	 */
+	private ITextEditor getEditor(IWorkbenchPart part) {
+		if (part instanceof ITextEditor) {
+			ITextEditor editorPart = (ITextEditor) part;
+			IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
+			if (resource != null) {
+				String extension = resource.getFileExtension();
+				if (extension != null && extension.equals("pda")) {
+					return editorPart;
+				}
+			}
+		}
+		return null;		
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleMethodBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+	 */
+	public void toggleMethodBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleMethodBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+	 */
+	public boolean canToggleMethodBreakpoints(IWorkbenchPart part, ISelection selection) {
+		return false;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleWatchpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+	 */
+	public void toggleWatchpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
+	    String[] variableAndFunctionName = getVariableAndFunctionName(part, selection);
+	    if (variableAndFunctionName != null && part instanceof ITextEditor && selection instanceof ITextSelection) {
+	        ITextEditor editorPart = (ITextEditor)part;
+	        int lineNumber = ((ITextSelection)selection).getStartLine();
+	        IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
+	        String var = variableAndFunctionName[0];
+	        String fcn = variableAndFunctionName[1];
+	        // look for existing watchpoint to delete
+			IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(PDAPlugin.ID_PDA_DEBUG_MODEL);
+			for (int i = 0; i < breakpoints.length; i++) {
+				IBreakpoint breakpoint = breakpoints[i];
+				if (breakpoint instanceof PDAWatchpoint && resource.equals(breakpoint.getMarker().getResource())) {
+				    PDAWatchpoint watchpoint = (PDAWatchpoint)breakpoint;
+				    String otherVar = watchpoint.getVariableName();
+				    String otherFcn = watchpoint.getFunctionName();
+					if (otherVar.equals(var) && otherFcn.equals(fcn)) {
+						breakpoint.delete();
+						return;
+					}
+				}
+			}
+			// create watchpoint
+			PDAWatchpoint watchpoint = new PDAWatchpoint(resource, lineNumber + 1, fcn, var, true, true);
+			DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(watchpoint);	        
+	    }
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleWatchpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+	 */
+	public boolean canToggleWatchpoints(IWorkbenchPart part, ISelection selection) {
+		return getVariableAndFunctionName(part, selection) != null;
+	}
+	
+	/**
+	 * Returns the variable and function names at the current line, or <code>null</code> if none.
+	 * 
+	 * @param part text editor
+	 * @param selection text selection
+	 * @return the variable and function names at the current line, or <code>null</code> if none.
+	 *  The array has two elements, the first is the variable name, the second is the function name.
+	 */
+	private String[] getVariableAndFunctionName(IWorkbenchPart part, ISelection selection) {
+	    ITextEditor editor = getEditor(part);
+	    if (editor != null && selection instanceof ITextSelection) {
+	        ITextSelection textSelection = (ITextSelection) selection;
+	        IDocumentProvider documentProvider = editor.getDocumentProvider();
+	        try {
+	            documentProvider.connect(this);
+	            IDocument document = documentProvider.getDocument(editor.getEditorInput());
+	            IRegion region = document.getLineInformationOfOffset(textSelection.getOffset());
+	            String string = document.get(region.getOffset(), region.getLength()).trim();
+	            if (string.startsWith("var ")) {
+	                String varName = string.substring(4).trim(); 
+	                String fcnName = getFunctionName(document, varName, document.getLineOfOffset(textSelection.getOffset()));
+	                return new String[] {varName, fcnName};
+	            }
+	        } catch (CoreException e) {
+	        } catch (BadLocationException e) {
+	        } finally {
+	            documentProvider.disconnect(this);
+	        }
+	    }	    
+	    return null;
+	}
+	
+	/**
+	 * Returns the name of the function containing the given variable defined at the given
+	 * line number in the specified document.
+	 * 
+	 * @param document PDA source file
+	 * @param varName variable name
+	 * @param line line numbner at which the variable is defined
+	 * @return name of function defining the variable
+	 */
+	private String getFunctionName(IDocument document, String varName, int line) {
+	    // This is a simple guess at the function name - look for the labels preceeding
+	    // the variable definition, and then see if there are any 'calls' to that
+	    // label. If none, assumet the variable is in the "_main_" function
+	    String source = document.get();
+	    int lineIndex = line - 1;
+	    while (lineIndex >= 0) {
+            try {
+                IRegion information = document.getLineInformation(lineIndex);
+                String lineText = document.get(information.getOffset(), information.getLength());
+                if (lineText.startsWith(":")) {
+                    String label = lineText.substring(1);
+                    if (source.indexOf("call " + label) >= 0) {
+                        return label;
+                    }
+                }
+                lineIndex--;
+            } catch (BadLocationException e) {
+            }
+	    }
+	    return "_main_";
+	}
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#toggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+     */
+    public void toggleBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
+        if (canToggleWatchpoints(part, selection)) {
+            toggleWatchpoints(part, selection);
+        } else {
+            toggleLineBreakpoints(part, selection);
+        }    
+    }
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#canToggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+     */
+    public boolean canToggleBreakpoints(IWorkbenchPart part, ISelection selection) {
+        return canToggleLineBreakpoints(part, selection) || canToggleWatchpoints(part, selection);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDAEditorAdapterFactory.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDAEditorAdapterFactory.java
new file mode 100644
index 0000000..a274955
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDAEditorAdapterFactory.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.breakpoints;
+import org.eclipse.cdt.examples.dsf.pda.ui.editor.PDAEditor;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+
+
+/**
+ * Creates a toggle breakpoint adapter
+ * <p>
+ * This class is identical to the corresponding in PDA debugger implemented in 
+ * org.eclipse.debug.examples.ui.
+ * </p>
+ */
+public class PDAEditorAdapterFactory implements IAdapterFactory {
+
+    @SuppressWarnings("unchecked") // IAdapterFactory is Java 1.3
+    public Object getAdapter(Object adaptableObject, Class adapterType) {
+		if (adaptableObject instanceof PDAEditor) {
+			ITextEditor editorPart = (ITextEditor) adaptableObject;
+			IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
+			if (resource != null) {
+				String extension = resource.getFileExtension();
+				if (extension != null && extension.equals("pda")) {
+				    if (adapterType.equals(IToggleBreakpointsTarget.class)) {
+				        return new PDABreakpointAdapter();
+				    }
+				}
+			}			
+		}
+		return null;
+	}
+
+    @SuppressWarnings("unchecked") // IAdapterFactory is Java 1.3
+    public Class[] getAdapterList() {
+		return new Class[]{IToggleBreakpointsTarget.class};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/AnnotationHover.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/AnnotationHover.java
new file mode 100644
index 0000000..ed2087c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/AnnotationHover.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.editor;
+
+import java.util.Iterator;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationHover;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.ISourceViewer;
+
+/**
+ * Returns hover for breakpoints.
+ * <p>
+ * This class is identical to the corresponding in PDA debugger implemented in 
+ * org.eclipse.debug.examples.ui.
+ * </p>
+ */
+public class AnnotationHover implements IAnnotationHover {
+
+	public String getHoverInfo(ISourceViewer sourceViewer, int lineNumber) {
+		IAnnotationModel annotationModel = sourceViewer.getAnnotationModel();
+		Iterator<?> iterator = annotationModel.getAnnotationIterator();
+		while (iterator.hasNext()) {
+			Annotation annotation = (Annotation) iterator.next();
+			Position position = annotationModel.getPosition(annotation);
+			try {
+				int lineOfAnnotation = sourceViewer.getDocument().getLineOfOffset(position.getOffset());
+				if (lineNumber == lineOfAnnotation) {
+					return annotation.getText();
+				}
+			} catch (BadLocationException e) {
+			}
+		}
+		return null;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAContentAssistProcessor.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAContentAssistProcessor.java
new file mode 100644
index 0000000..ae3cbea
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAContentAssistProcessor.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.editor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.CompletionProposal;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+
+public class PDAContentAssistProcessor implements IContentAssistProcessor {
+
+    public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+        int index = offset - 1;
+        StringBuffer prefix = new StringBuffer();
+        IDocument document = viewer.getDocument();
+        while (index > 0) {
+            try {
+                char prev = document.getChar(index);
+                if (Character.isWhitespace(prev)) {
+                    break;
+                }
+                prefix.insert(0, prev);
+                index--;
+            } catch (BadLocationException e) {
+            }
+        }
+        
+        List<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
+        String[] keywords = PDAScanner.fgKeywords;
+        if (prefix.length() > 0) {
+            String word = prefix.toString();
+            for (int i = 0; i < keywords.length; i++) {
+                String keyword = keywords[i];
+                if (keyword.startsWith(word) && word.length() < keyword.length()) {
+                    proposals.add(new CompletionProposal(keyword + " ", index + 1, offset - (index + 1), keyword.length() + 1));
+                }
+            }
+        } else {
+            // propose all keywords
+            for (int i = 0; i < keywords.length; i++) {
+                String keyword = keywords[i];
+                proposals.add(new CompletionProposal(keyword + " ", offset, 0, keyword.length() + 1));
+            }
+        }
+        if (!proposals.isEmpty()) {
+            return proposals.toArray(new ICompletionProposal[proposals.size()]);
+        }
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
+     */
+    public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
+     */
+    public char[] getCompletionProposalAutoActivationCharacters() {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
+     */
+    public char[] getContextInformationAutoActivationCharacters() {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
+     */
+    public String getErrorMessage() {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
+     */
+    public IContextInformationValidator getContextInformationValidator() {
+        return null;
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAContentAssistant.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAContentAssistant.java
new file mode 100644
index 0000000..3ca8217
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAContentAssistant.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.editor;
+
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.swt.widgets.Shell;
+
+public class PDAContentAssistant extends ContentAssistant {
+    
+    public PDAContentAssistant() {
+        super();
+        
+        PDAContentAssistProcessor processor= new PDAContentAssistProcessor(); 
+        setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
+    
+        enableAutoActivation(false);
+        enableAutoInsert(false);
+        
+        setInformationControlCreator(getInformationControlCreator());   
+    }
+
+    private IInformationControlCreator getInformationControlCreator() {
+        return new IInformationControlCreator() {
+            public IInformationControl createInformationControl(Shell parent) {
+                return new DefaultInformationControl(parent);
+            }
+        };
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAEditor.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAEditor.java
new file mode 100644
index 0000000..56ebed7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAEditor.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.editor;
+
+import java.util.ResourceBundle;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.ui.texteditor.AbstractDecoratedTextEditor;
+import org.eclipse.ui.texteditor.ContentAssistAction;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+
+/**
+ * PDA editor
+ */
+public class PDAEditor extends AbstractDecoratedTextEditor {
+    
+    /**
+     * Creates a PDE editor
+     */
+    public PDAEditor() {
+        super();
+        setSourceViewerConfiguration(new PDASourceViewerConfiguration());
+        setRulerContextMenuId("pda.editor.rulerMenu");
+        setEditorContextMenuId("pda.editor.editorMenu");
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.texteditor.AbstractTextEditor#createActions()
+     */
+    protected void createActions() {
+        super.createActions();
+        ResourceBundle bundle = ResourceBundle.getBundle("org.eclipse.cdt.examples.dsf.pda.ui.editor.PDAEditorMessages"); //$NON-NLS-1$
+        IAction action = new ContentAssistAction(bundle, "ContentAssistProposal.", this); //$NON-NLS-1$
+        action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
+        setAction("ContentAssistProposal", action); //$NON-NLS-1$
+    }
+    
+    
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAEditorMessages.properties b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAEditorMessages.properties
new file mode 100644
index 0000000..43bb2da
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAEditorMessages.properties
@@ -0,0 +1,15 @@
+###############################################################################
+#  Copyright (c) 2000, 2009 IBM Corporation and others.
+#  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
+# 
+#  Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+ContentAssistProposal.label=Content &Assist
+ContentAssistProposal.tooltip=Content Assist
+ContentAssistProposal.image=
+ContentAssistProposal.description=Content Assist
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAScanner.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAScanner.java
new file mode 100644
index 0000000..bde5793
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDAScanner.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.editor;
+
+import org.eclipse.cdt.examples.dsf.pda.ui.PDAUIPlugin;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IWordDetector;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.rules.WordRule;
+
+
+/**
+ * PDA editor keyword scanner.
+ */
+public class PDAScanner extends BufferedRuleBasedScanner {
+    
+    /**
+     * PDA keywods
+     */
+    public static final String[] fgKeywords = new String[] {
+        "add", "branch_not_zero", "call", "dec", "dup",
+        "halt", "output", "pop", "push", "return", "var"
+    };
+    
+    /**
+     * Detects potential keywords
+     */
+    class PDAWordDetector implements IWordDetector {
+
+        /* (non-Javadoc)
+         * @see org.eclipse.jface.text.rules.IWordDetector#isWordStart(char)
+         */
+        public boolean isWordStart(char c) {
+            return Character.isLetter(c);
+        }
+
+        /* (non-Javadoc)
+         * @see org.eclipse.jface.text.rules.IWordDetector#isWordPart(char)
+         */
+        public boolean isWordPart(char c) {
+            return Character.isLetter(c) || c == '_';
+        }
+    }
+    
+    /**
+     * Detects PDA branch labels
+     */
+    class PDALabelDetector extends PDAWordDetector {
+        
+        /* (non-Javadoc)
+         * @see org.eclipse.jface.text.rules.IWordDetector#isWordStart(char)
+         */
+        public boolean isWordStart(char c) {
+            return c == ':';
+        }
+        
+        /* (non-Javadoc)
+         * @see org.eclipse.jface.text.rules.IWordDetector#isWordPart(char)
+         */
+        public boolean isWordPart(char c) {
+            return super.isWordPart(c) || Character.isDigit(c);
+        }
+    }
+
+    /**
+     * Constructs a scanner that identifies PDA keywords.
+     */
+    public PDAScanner() {
+        // keywords
+        Token token = new Token(new TextAttribute(PDAUIPlugin.getDefault().getColor(PDAUIPlugin.KEYWORD)));
+        WordRule keywords = new WordRule(new PDAWordDetector());
+        for (int i = 0; i < fgKeywords.length; i++) {
+            String keyword = fgKeywords[i];
+            keywords.addWord(keyword, token);
+        }
+        // labels
+        token = new Token(new TextAttribute(PDAUIPlugin.getDefault().getColor(PDAUIPlugin.LABEL)));
+        WordRule labels = new WordRule(new PDALabelDetector(), token); 
+        setRules(new IRule[]{keywords, labels});
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDASourceViewerConfiguration.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDASourceViewerConfiguration.java
new file mode 100644
index 0000000..44e7bc5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PDASourceViewerConfiguration.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.editor;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.presentation.IPresentationReconciler;
+import org.eclipse.jface.text.presentation.PresentationReconciler;
+import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
+import org.eclipse.jface.text.source.IAnnotationHover;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
+
+/**
+ * Source view configuration for the PDA editor
+ */
+public class PDASourceViewerConfiguration extends TextSourceViewerConfiguration {
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getTextHover(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
+     */
+    public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
+        return new TextHover();
+    }
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getAnnotationHover(org.eclipse.jface.text.source.ISourceViewer)
+	 */
+	public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
+		return new AnnotationHover();
+	}
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer)
+     */
+    public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
+        PresentationReconciler reconciler = new PresentationReconciler();
+        reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
+        DefaultDamagerRepairer dr = new DefaultDamagerRepairer(new PDAScanner());
+        reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
+        reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
+        return reconciler;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentAssistant(org.eclipse.jface.text.source.ISourceViewer)
+     */
+    public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
+        return new PDAContentAssistant();
+    }
+    
+    
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PopFrameActionDelegate.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PopFrameActionDelegate.java
new file mode 100644
index 0000000..7b75877
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/PopFrameActionDelegate.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.editor;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IActionDelegate2;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+
+
+public class PopFrameActionDelegate implements IObjectActionDelegate, IActionDelegate2 {
+	
+	//private PDAThread fThread = null;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
+	 */
+	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+	 */
+	public void run(IAction action) {
+	    /*
+		try {
+		fThread.pop();
+		} catch (DebugException e) {
+		}*/
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+	 */
+	public void selectionChanged(IAction action, ISelection selection) {
+	/*	if (selection instanceof IStructuredSelection) {
+			IStructuredSelection ss = (IStructuredSelection) selection;
+			Object element = ss.getFirstElement();
+			if (element instanceof PDAStackFrame) {
+				PDAStackFrame frame = (PDAStackFrame) element;
+				//#ifdef ex5
+//#				// TODO: Exercise 5 - enable the action if the frame's thread supports it				
+				//#else
+				fThread = (PDAThread) frame.getThread();
+				try {
+					action.setEnabled(fThread.canPop() && fThread.getTopStackFrame().equals(frame));
+				} catch (DebugException e) {
+				}
+				return;
+				//#endif
+			}
+			
+		}
+		action.setEnabled(false);
+		*/
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
+	 */
+	public void init(IAction action) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IActionDelegate2#dispose()
+	 */
+	public void dispose() {
+		//fThread = null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
+	 */
+	public void runWithEvent(IAction action, Event event) {
+		run(action);
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/TextHover.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/TextHover.java
new file mode 100644
index 0000000..f764387
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/TextHover.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.editor;
+
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.ITextViewer;
+
+
+/**
+ * Produces debug hover for the PDA debugger.
+ */
+public class TextHover implements ITextHover {
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.text.ITextHover#getHoverInfo(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
+     */
+    public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
+        /*String varName = null;
+        try {
+            varName = textViewer.getDocument().get(hoverRegion.getOffset(), hoverRegion.getLength());
+        } catch (BadLocationException e) {
+           return null;
+        }
+        if (varName.startsWith("$") && varName.length() > 1) {
+            varName = varName.substring(1);
+        }
+   
+        PDAStackFrame frame = null;
+        IAdaptable debugContext = DebugUITools.getDebugContext();
+        if (debugContext instanceof PDAStackFrame) {
+           frame = (PDAStackFrame) debugContext;
+        } else if (debugContext instanceof PDAThread) {
+            PDAThread thread = (PDAThread) debugContext;
+            try {
+                frame = (PDAStackFrame) thread.getTopStackFrame();
+            } catch (DebugException e) {
+                return null;
+            }
+        } else if (debugContext instanceof PDADebugTarget) {
+            PDADebugTarget target = (PDADebugTarget) debugContext;
+            try {
+                IThread[] threads = target.getThreads();
+                if (threads.length > 0) {
+                    frame = (PDAStackFrame) threads[0].getTopStackFrame();
+                }
+            } catch (DebugException e) {
+                return null;
+            }
+        }
+        if (frame != null) {
+            try {
+                IVariable[] variables = frame.getVariables();
+                for (int i = 0; i < variables.length; i++) {
+                    IVariable variable = variables[i];
+                    if (variable.getName().equals(varName)) {
+                        return varName + " = " + variable.getValue().getValueString(); 
+                    }
+                }
+            } catch (DebugException e) {
+            }
+        }*/
+        return null;
+    }
+    	
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.text.ITextViewer, int)
+     */
+    public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
+        return WordFinder.findWord(textViewer.getDocument(), offset);
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/WordFinder.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/WordFinder.java
new file mode 100644
index 0000000..5f42477
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/editor/WordFinder.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.editor;
+
+ 
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+
+/**
+ * Looks for an identifier in a source file
+ */
+public class WordFinder {
+	
+    /**
+     * Returns the region in the given document that contains an identifier, or
+     * <code>null</code> if none.
+     * 
+     * @param document document to search
+     * @param offset offset at which to look for an identifier
+     * @return region containing an identifier, or <code>null</code>
+     */
+	public static IRegion findWord(IDocument document, int offset) {
+		
+		int start= -1;
+		int end= -1;
+		
+		
+		try {
+			
+			int pos= offset;
+			char c;
+			
+			while (pos >= 0) {
+				c= document.getChar(pos);
+				if (!Character.isJavaIdentifierPart(c))
+					break;
+				--pos;
+			}
+			
+			start= pos;
+			
+			pos= offset;
+			int length= document.getLength();
+			
+			while (pos < length) {
+				c= document.getChar(pos);
+				if (!Character.isJavaIdentifierPart(c))
+					break;
+				++pos;
+			}
+			
+			end= pos;
+			
+		} catch (BadLocationException x) {
+		}
+		
+		if (start > -1 && end > -1) {
+			if (start == offset && end == offset)
+				return new Region(offset, 0);
+			else if (start == offset)
+				return new Region(start, end - start);
+			else
+				return new Region(start + 1, end - start - 1);
+		}
+		
+		return null;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/launcher/PDAMainTab.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/launcher/PDAMainTab.java
new file mode 100644
index 0000000..17a3228
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/launcher/PDAMainTab.java
@@ -0,0 +1,190 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.launcher;
+
+
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.cdt.examples.dsf.pda.ui.PDAUIPlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.ResourceListSelectionDialog;
+
+
+/**
+ * Tab to specify the PDA program to run/debug.
+ * <p>
+ * This class is identical to the corresponding in PDA debugger implemented in 
+ * org.eclipse.debug.examples.ui.
+ * </p>
+ */
+public class PDAMainTab extends AbstractLaunchConfigurationTab {
+	
+	private Text fProgramText;
+	private Button fProgramButton;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		Font font = parent.getFont();
+		
+		Composite comp = new Composite(parent, SWT.NONE);
+		setControl(comp);
+		GridLayout topLayout = new GridLayout();
+		topLayout.verticalSpacing = 0;
+		topLayout.numColumns = 3;
+		comp.setLayout(topLayout);
+		comp.setFont(font);
+		
+		createVerticalSpacer(comp, 3);
+		
+		Label programLabel = new Label(comp, SWT.NONE);
+		programLabel.setText("&Program:");
+		GridData gd = new GridData(GridData.BEGINNING);
+		programLabel.setLayoutData(gd);
+		programLabel.setFont(font);
+		
+		fProgramText = new Text(comp, SWT.SINGLE | SWT.BORDER);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		fProgramText.setLayoutData(gd);
+		fProgramText.setFont(font);
+		fProgramText.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				updateLaunchConfigurationDialog();
+			}
+		});
+		
+		fProgramButton = createPushButton(comp, "&Browse...", null); //$NON-NLS-1$
+		fProgramButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				browsePDAFiles();
+			}
+		});
+	}
+	
+	/**
+	 * Open a resource chooser to select a PDA program 
+	 */
+	protected void browsePDAFiles() {
+		ResourceListSelectionDialog dialog = new ResourceListSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), IResource.FILE);
+		dialog.setTitle("PDA Program");
+		dialog.setMessage("Select PDA Program");
+		if (dialog.open() == Window.OK) {
+			Object[] files = dialog.getResult();
+			IFile file = (IFile) files[0];
+			fProgramText.setText(file.getFullPath().toString());
+		}
+		
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+	 */
+	public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public void initializeFrom(ILaunchConfiguration configuration) {
+		//#ifdef ex1
+//#		// TODO: Exercise 1 - retrieve the program path attribute from the launch configuration		
+//#		String program = null;
+//#		if (program != null) {
+//#			fProgramText.setText(program);
+//#		}
+		//#else
+		try {
+			String program = null;
+			program = configuration.getAttribute(PDAPlugin.ATTR_PDA_PROGRAM, (String)null);
+			if (program != null) {
+				fProgramText.setText(program);
+			}
+		} catch (CoreException e) {
+			setErrorMessage(e.getMessage());
+		}
+		//#endif
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+	 */
+	public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+		String program = fProgramText.getText().trim();
+		if (program.length() == 0) {
+			program = null;
+		}
+		//#ifdef ex1
+//#		// TODO: Exercise 1 - update the launch configuration with the path to
+//#		//   currently specified program		
+		//#else
+		configuration.setAttribute(PDAPlugin.ATTR_PDA_PROGRAM, program);
+		//#endif
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
+	 */
+	public String getName() {
+		return "Main";
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public boolean isValid(ILaunchConfiguration launchConfig) {
+		setErrorMessage(null);
+		setMessage(null);
+		String text = fProgramText.getText();
+		//#ifdef ex1
+//#		// TODO: Exercise 1 - validate the currently specified program exists and is not
+//#		//	empty, providing the user with feedback.		
+		//#else
+		if (text.length() > 0) {
+			IPath path = new Path(text);
+			if (ResourcesPlugin.getWorkspace().getRoot().findMember(path) == null) {
+				setErrorMessage("Specified program does not exist");
+				return false;
+			}
+		} else {
+			setMessage("Specify a program");
+		}
+		//#endif
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
+	 */
+	public Image getImage() {
+		return PDAUIPlugin.getDefault().getImageRegistry().get(PDAUIPlugin.IMG_OBJ_PDA);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/launcher/PDATabGroup.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/launcher/PDATabGroup.java
new file mode 100644
index 0000000..7758317
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/launcher/PDATabGroup.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.launcher;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
+
+/**
+ * Tab group for a PDA application
+ * <p>
+ * This class is identical to the corresponding in PDA debugger implemented in 
+ * org.eclipse.debug.examples.ui.
+ * </p>
+ */
+public class PDATabGroup extends AbstractLaunchConfigurationTabGroup {
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
+	 */
+	public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+		//#ifdef ex1
+//#		// TODO: Exercise 1 - add the PDA main tab, source lookup tab and common
+//#		//  tab to the tab group		
+		//#else
+		setTabs(new ILaunchConfigurationTab[] {
+				new PDAMainTab(),
+				new SourceLookupTab(),
+				new CommonTab()
+		});
+		//#endif
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/PDAVMAdapter.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/PDAVMAdapter.java
new file mode 100644
index 0000000..2e1761f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/PDAVMAdapter.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.viewmodel;
+
+import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.AbstractDebugVMAdapter;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.expression.ExpressionVMProvider;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.register.RegisterVMProvider;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.variable.VariableVMProvider;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider;
+import org.eclipse.cdt.examples.dsf.pda.ui.viewmodel.launch.PDALaunchVMProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.ui.IDebugUIConstants;
+
+ at ThreadSafe
+ at SuppressWarnings("restriction")
+public class PDAVMAdapter extends AbstractDebugVMAdapter
+{
+    public PDAVMAdapter(DsfSession session, SteppingController controller) {
+        super(session, controller);
+        getSession().registerModelAdapter(IColumnPresentationFactory.class, this);
+    }    
+
+    @Override
+    public void dispose() {
+        getSession().unregisterModelAdapter(IColumnPresentationFactory.class);
+        super.dispose();
+    }
+    
+    @Override
+    protected AbstractDMVMProvider createViewModelProvider(IPresentationContext context) {
+        if ( IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId()) ) {
+            return new PDALaunchVMProvider(this, context, getSession()); 
+        } else if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) ) {
+            return new VariableVMProvider(this, context, getSession());
+        } else if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(context.getId()) ) {
+            return new ExpressionVMProvider(this, context, getSession());
+        } else if (IDebugUIConstants.ID_REGISTER_VIEW.equals(context.getId()) ) {
+        	return new RegisterVMProvider(this, context, getSession());
+        }
+        return null;
+    }    
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDALaunchVMProvider.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDALaunchVMProvider.java
new file mode 100644
index 0000000..b00b63e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDALaunchVMProvider.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *     Ericsson			  - Modified for new functionality	
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.viewmodel.launch;
+
+import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.AbstractLaunchVMProvider;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.LaunchRootVMNode;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.StackFramesVMNode;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.StandardProcessVMNode;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMAdapter;
+import org.eclipse.cdt.dsf.ui.viewmodel.IRootVMNode;
+import org.eclipse.cdt.dsf.ui.viewmodel.IVMNode;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IDebugEventSetListener;
+import org.eclipse.debug.core.ILaunchesListener2;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+
+
+/**
+ * View Model provider for the Launch (AKA Debug) view. The launch VM 
+ * provider is configured with three nodes:
+ * <ul>
+ * <li> LaunchRootVMNode - This is the root of the PDA view model.</li>  
+ * <li> PDAVirtualMachineVMNode - Supplies the element representing PDA VM</li>
+ * <li> PDAThreadsVMNode - Supplies the PDA thread elements</li>
+ * <li> StackFramesVMNode - Supplies the stack frame elements.</li>  
+ * <li> StandardProcessVMNode - Supplies elements representing the PDA 
+ * debugger process.</li>
+ * </ul> 
+ */
+ at SuppressWarnings("restriction")
+public class PDALaunchVMProvider extends AbstractLaunchVMProvider 
+    implements IDebugEventSetListener, ILaunchesListener2
+{
+    @ThreadSafe
+    public PDALaunchVMProvider(AbstractVMAdapter adapter, IPresentationContext presentationContext, DsfSession session) 
+    {
+        super(adapter, presentationContext, session);
+        
+        IRootVMNode launchNode = new LaunchRootVMNode(this);
+        setRootNode(launchNode);
+
+        // Launch node is a parent to the processes and program nodes.
+        IVMNode pdaVirtualMachineNode = new PDAVirtualMachineVMNode(this, getSession());
+        IVMNode processesNode = new StandardProcessVMNode(this);
+        addChildNodes(launchNode, new IVMNode[] { pdaVirtualMachineNode, processesNode});
+        
+        // Virtual machine node is under the PDA threads node.
+        IVMNode threadsNode = new PDAThreadsVMNode(this, getSession());
+        addChildNodes(pdaVirtualMachineNode, new IVMNode[] { threadsNode });
+        
+        // Stack frames node is under the PDA threads node.
+        IVMNode stackFramesNode = new StackFramesVMNode(this, getSession());
+        addChildNodes(threadsNode, new IVMNode[] { stackFramesNode });
+
+        // Register the LaunchVM provider as a listener to debug and launch 
+        // events.  These events are used by the launch and processes nodes.
+        DebugPlugin.getDefault().addDebugEventListener(this);
+        DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDAThreadsVMNode.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDAThreadsVMNode.java
new file mode 100644
index 0000000..7b4ba3c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDAThreadsVMNode.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *     Ericsson 		  - Modified for multi threaded functionality	
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.ui.viewmodel.launch;
+
+import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.AbstractThreadVMNode;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.ILaunchVMConstants;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.IDMVMContext;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.IPropertiesUpdate;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+import org.eclipse.cdt.examples.dsf.pda.ui.PDAUIPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest;
+import org.eclipse.ui.IMemento;
+
+
+/**
+ * View model node supplying the PDA thread elements.  It extends 
+ * the base threads node and adds label and memento generation.
+ */
+ at SuppressWarnings("restriction")
+public class PDAThreadsVMNode extends AbstractThreadVMNode 
+    implements IElementLabelProvider, IElementMementoProvider
+{
+    public PDAThreadsVMNode(AbstractDMVMProvider provider, DsfSession session) {
+        super(provider, session);
+    }
+
+    @Override
+    public String toString() {
+        return "PDAThreadVMNode(" + getSession().getId() + ")"; 
+    }
+    
+    @Override
+    protected void updatePropertiesInSessionThread(IPropertiesUpdate[] updates) {
+        for (int i = 0; i < updates.length; i++) {
+            final PDAThreadDMContext dmc = findDmcInPath(updates[i].getViewerInput(), updates[i].getElementPath(), PDAThreadDMContext.class);
+            if (dmc != null) {
+                updates[i].setProperty(ILaunchVMConstants.PROP_ID, Integer.toString(dmc.getID()));
+            } else {
+                updates[i].setStatus(new Status(IStatus.ERROR, PDAUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "Invalid context", null)); //$NON-NLS-1$
+            }
+        }
+        super.updatePropertiesInSessionThread(updates);
+    }
+
+	private String produceThreadElementName(String viewName, PDAThreadDMContext execCtx) {
+		return "Thread." + execCtx.getID(); 
+    }
+
+    private static final String MEMENTO_NAME = "THREAD_MEMENTO_NAME"; 
+    
+    /*
+     * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider#compareElements(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest[])
+     */
+    public void compareElements(IElementCompareRequest[] requests) {
+        for ( IElementCompareRequest request : requests ) {
+            Object element = request.getElement();
+            IMemento memento = request.getMemento();
+            String mementoName = memento.getString(MEMENTO_NAME);
+            if (mementoName != null) {
+                if (element instanceof IDMVMContext) {
+                    IDMContext dmc = ((IDMVMContext)element).getDMContext();
+                    if ( dmc instanceof PDAThreadDMContext) {
+                    	String elementName = produceThreadElementName( 
+                    	    request.getPresentationContext().getId(), (PDAThreadDMContext) dmc );
+                    	request.setEqual( elementName.equals( mementoName ) );
+                    }
+                }
+            }
+            request.done();
+        }
+    }
+    
+    /*
+     * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider#encodeElements(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest[])
+     */
+    public void encodeElements(IElementMementoRequest[] requests) {
+    	for ( IElementMementoRequest request : requests ) {
+            Object element = request.getElement();
+            IMemento memento = request.getMemento();
+            if (element instanceof IDMVMContext) {
+            	IDMContext dmc = ((IDMVMContext)element).getDMContext();
+            	if ( dmc instanceof PDAThreadDMContext) {
+            		String elementName = produceThreadElementName( request.getPresentationContext().getId(), (PDAThreadDMContext) dmc );
+                	memento.putString(MEMENTO_NAME, elementName);
+                }
+            }
+            request.done();
+        }
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDAVirtualMachineVMNode.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDAVirtualMachineVMNode.java
new file mode 100644
index 0000000..00d4a8f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/launch/PDAVirtualMachineVMNode.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Ericsson and others.
+ * 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
+ * 
+ * Contributors:
+ *     Ericsson			  - Initial API and implementation
+ *     Wind River Systems - Factored out AbstractContainerVMNode
+ *******************************************************************************/
+
+package org.eclipse.cdt.examples.dsf.pda.ui.viewmodel.launch;
+
+
+import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.AbstractContainerVMNode;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.ILaunchVMConstants;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.IDMVMContext;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.IPropertiesUpdate;
+import org.eclipse.cdt.examples.dsf.pda.service.PDACommandControl;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAVirtualMachineDMContext;
+import org.eclipse.cdt.examples.dsf.pda.ui.PDAUIPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest;
+import org.eclipse.ui.IMemento;
+
+
+/**
+ * View Model node representing a PDA virtual machine.  It extends
+ * the base container node and adds label and memento generation. 
+ */
+ at SuppressWarnings("restriction")
+public class PDAVirtualMachineVMNode extends AbstractContainerVMNode
+    implements IElementMementoProvider
+{
+	public PDAVirtualMachineVMNode(AbstractDMVMProvider provider, DsfSession session) {
+        super(provider, session);
+	}
+
+	@Override
+    public String toString() {
+        return "PDAContainerVMNode(" + getSession().getId() + ")"; 
+    }
+
+
+	@Override
+	protected void updateElementsInSessionThread(IChildrenUpdate update) {
+        // Get the instance of the service.  Note that there is no race condition
+        // in getting the service since this method is called only in the 
+        // service executor thread.
+        final PDACommandControl commandControl = getServicesTracker().getService(PDACommandControl.class);
+
+        // Check if the service is available.  If it is not, no elements are 
+        // updated.
+        if (commandControl == null) {
+            handleFailedUpdate(update);
+            return;
+        }
+        
+        update.setChild(createVMContext(commandControl.getContext()), 0);
+        update.done();
+	}
+
+    @Override
+    protected void updatePropertiesInSessionThread(IPropertiesUpdate[] updates) {
+        for (int i = 0; i < updates.length; i++) {
+            // Find the PDA program context.
+            final PDAVirtualMachineDMContext dmc = 
+                findDmcInPath(updates[i].getViewerInput(), updates[i].getElementPath(), PDAVirtualMachineDMContext.class);
+            if (dmc != null) {
+                updates[i].setProperty(PROP_NAME, "PDA");
+                updates[i].setProperty(ILaunchVMConstants.PROP_ID, dmc.getProgram());
+            } else {
+                updates[i].setStatus(new Status(IStatus.ERROR, PDAUIPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, "Invalid context", null)); //$NON-NLS-1$
+            }
+        }
+        super.updatePropertiesInSessionThread(updates);
+    }
+	
+    private String produceProgramElementName( String viewName , PDAVirtualMachineDMContext execCtx ) {
+        return "PDA." + execCtx.getProgram(); //$NON-NLS-1$
+    }
+    
+    private final String MEMENTO_NAME = "PDAPROGRAM_MEMENTO_NAME"; //$NON-NLS-1$
+    
+    public void compareElements(IElementCompareRequest[] requests) {
+        
+        for ( IElementCompareRequest request : requests ) {
+            
+            Object element = request.getElement();
+            IMemento memento = request.getMemento();
+            String mementoName = memento.getString(MEMENTO_NAME);
+            
+            if (mementoName != null) {
+                if (element instanceof IDMVMContext) {
+                    
+                    IDMContext dmc = ((IDMVMContext)element).getDMContext();
+                    
+                    if ( dmc instanceof PDAVirtualMachineDMContext) {
+                        
+                        String elementName = produceProgramElementName( request.getPresentationContext().getId(), (PDAVirtualMachineDMContext) dmc );
+                        request.setEqual( elementName.equals( mementoName ) );
+                    } 
+                }
+            }
+            request.done();
+        }
+    }
+    
+    public void encodeElements(IElementMementoRequest[] requests) {
+        
+        for ( IElementMementoRequest request : requests ) {
+            
+            Object element = request.getElement();
+            IMemento memento = request.getMemento();
+            
+            if (element instanceof IDMVMContext) {
+
+                IDMContext dmc = ((IDMVMContext)element).getDMContext();
+
+                if ( dmc instanceof PDAVirtualMachineDMContext) {
+
+                    String elementName = produceProgramElementName( request.getPresentationContext().getId(), (PDAVirtualMachineDMContext) dmc );
+                    memento.putString(MEMENTO_NAME, elementName);
+                } 
+            }
+            request.done();
+        }
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/.classpath b/results/plugins/org.eclipse.cdt.examples.dsf.pda/.classpath
new file mode 100644
index 0000000..8fe3727
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="pdavm/src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/results/plugins/org.eclipse.cdt.core.aix/.cvsignore b/results/plugins/org.eclipse.cdt.examples.dsf.pda/.cvsignore
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.aix/.cvsignore
copy to results/plugins/org.eclipse.cdt.examples.dsf.pda/.cvsignore
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/.options b/results/plugins/org.eclipse.cdt.examples.dsf.pda/.options
new file mode 100755
index 0000000..f796395
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/.options
@@ -0,0 +1 @@
+org.eclipse.cdt.examples.dsf.pda/debug = false
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/.project b/results/plugins/org.eclipse.cdt.examples.dsf.pda/.project
new file mode 100644
index 0000000..4546d07
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.examples.dsf.pda</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/.settings/org.eclipse.jdt.core.prefs b/results/plugins/org.eclipse.cdt.examples.dsf.pda/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..cfb0bdd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,70 @@
+#Tue Jun 24 11:03:29 PDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.cdt.examples.dsf.pda/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..ce6f8be
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.cdt.examples.dsf.pda;singleton:=true
+Bundle-Version: 2.0.0.qualifier
+Bundle-Activator: org.eclipse.cdt.examples.dsf.pda.PDAPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.core.variables,
+ org.eclipse.debug.core,
+ org.eclipse.cdt.dsf,
+ org.eclipse.cdt.core;bundle-version="5.0.0"
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.cdt.examples.dsf.pda,
+ org.eclipse.cdt.examples.dsf.pda.breakpoints,
+ org.eclipse.cdt.examples.dsf.pda.launch,
+ org.eclipse.cdt.examples.dsf.pda.service,
+ org.eclipse.cdt.examples.dsf.pda.service.commands,
+ org.eclipse.cdt.examples.dsf.pda.sourcelookup
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %providerName
+Import-Package: com.ibm.icu.text
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/about.html b/results/plugins/org.eclipse.cdt.examples.dsf.pda/about.html
new file mode 100644
index 0000000..c1cb2e1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>May 14, 2008</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/build.properties b/results/plugins/org.eclipse.cdt.examples.dsf.pda/build.properties
new file mode 100644
index 0000000..688d489
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/build.properties
@@ -0,0 +1,24 @@
+###############################################################################
+#  Copyright (c) 2005, 2009 IBM Corporation and others.
+#  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
+# 
+#  Contributors:
+#     IBM Corporation - initial API and implementation
+#     Wind River Systems - adapted to use with DSF
+###############################################################################
+source.. = src/,\
+           pdavm/src/
+output.. = bin/
+bin.includes = plugin.xml,\
+               pdavm/,\
+               META-INF/,\
+               about.html,\
+               .,\
+               readme.html,\
+               samples/,\
+               .options,\
+               plugin.properties
+src.includes = about.html
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/docs/protocol.html b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/docs/protocol.html
new file mode 100644
index 0000000..1d79f31
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/docs/protocol.html
@@ -0,0 +1,308 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+  <title>PDA Debugger Protocol Reference</title>
+</head>
+<body>
+
+<h2>PDA Debugger Protocol Reference</h2>
+
+<h3>clear</h3>
+Clears any breakpoint set on given line
+<pre>
+   C: clear {line}
+   R: ok
+</pre>
+
+
+<h3>data</h3>
+Retrieves data stack information 
+<pre>
+   C: data {thread_id}
+   R: {value 1}|{value 2}|{value 3}|...|
+    
+Errors:
+   error: invalid thread
+</pre>
+
+
+<h3>drop</h3>
+Returns from the current frame without executing the rest of instructions.  
+
+<pre>
+If VM running:
+   C: drop {thread_id}
+   R: ok
+   E: resumed {thread_id} drop
+   E: suspended {thread_id} drop
+   
+If VM suspended:
+   C: drop {thread_id}
+   R: ok
+   E: vmresumed drop
+   E: vmsuspended {thread_id} drop
+
+Errors:
+   error: invalid thread
+</pre>
+
+
+<h3>eval</h3>
+Sets what events cause the execution to stop.
+
+<pre>
+   C: eval {thread_id} {instruction}%20{parameter}|{instruction}%20{parameter}|...
+   R: ok
+   E: resumed {thread_id} client
+   E: evalresult result
+   E: suspended {thread_id} eval
+   
+Errors:
+   error: invalid thread
+   error: cannot evaluate while vm is suspended
+   error: thread running        
+</pre>
+
+
+<h3>eventstop</h3>
+Sets what events cause the execution to stop.
+
+<pre>
+   C: eventstop {event_name} {0|1}
+   R: ok
+   ...
+   E: suspended event {event_name}
+</pre>
+
+
+<h3>exit</h3>
+Instructs the debugger to exit.
+
+<pre>
+   C: exit
+   R: ok
+</pre>
+
+
+<h3>popdata</h3>
+Pops the top value from the data stack  
+
+<pre>
+   C: popdata {thread_id}
+   R: ok
+   
+Errors:
+   error: invalid thread
+</pre>
+
+
+<h3>pushdata</h3>
+Pushes the given value on top of the data stack.
+
+<pre>
+   C: pushdata {thread_id} {value}
+   R: ok
+   
+Errors:
+   error: invalid thread
+</pre>
+
+
+<h3>resume</h3>
+Resumes the execution of a single thread.  Can be issued only if the virtual 
+machine is running.
+
+<pre>
+   C: resume {thread_id}
+   R: ok
+   E: resumed {thread_id} client
+   
+Errors:
+   error: invalid thread
+   error: cannot resume thread when vm is suspended
+   error: thread already running
+</pre>
+
+
+<h3>set</h3>
+Sets a breakpoint at given line
+
+<pre>
+Suspend a single thread:
+   C: set {line_number} 0
+   R: ok
+   C: resume {thread_id}
+   E: resumed {thread_id} client
+   E: suspended {thread_id} breakpoint line_number
+   
+Suspend the VM:
+   C: set {line_number} 1
+   R: ok
+   C: vmresume
+   E: vmresumed client
+   E: vmsuspended {thread_id} breakpoint line_number
+</pre>
+
+
+<h3>setdata</h3>
+Sets a data value in the data stack at the given location
+
+<pre>
+   C: setdata {thread_id} {index} {value}
+   R: ok
+   
+Errors:
+   error: invalid thread
+</pre>
+
+
+<h3>setvar</h3>
+Sets a variable value 
+
+<pre>
+   C: setvar {thread_id} {frame_number} {variable} {value}
+   R: ok
+   
+Errors:
+   error: invalid thread
+</pre>
+
+
+<h3>stack</h3>
+Retrieves command stack information 
+
+<pre>
+   C: stack {thread_id}
+   R: {file}|{line}|{function}|{var_1}|{var_2}|...#{file}|{line}|{function}|{var_1}|{var_2}|...#...
+   
+Errors:
+   error: invalid thread
+</pre>
+
+
+<h3>step</h3>
+Executes next instruction 
+
+<pre>
+If VM running:
+   C: step {thread_id}
+   R: ok
+   E: resumed {thread_id} client
+   E: suspended {thread_id} step
+   
+If VM suspended:
+   C: step {thread_id}
+   R: ok
+   E: vmresumed client
+   E: vmsuspended {thread_id} step
+   
+Errors:
+   error: invalid thread
+</pre>
+
+
+<h3>stepreturn</h3>
+Executes instructions until the current subroutine is finished 
+
+<pre>
+If VM running:
+   C: stepreturn {thread_id}
+   R: ok
+   E: resumed {thread_id} client
+   E: suspended {thread_id} step
+   
+If VM suspended:
+   C: stepreturn {thread_id}
+   R: ok
+   E: vmresumed client
+   E: vmsuspended {thread_id} step
+   
+Errors:
+   error: invalid thread
+</pre>
+
+
+<h3>suspend</h3>
+Suspends execution of a single thread.  Can be issued only if the virtual 
+machine is running.
+
+<pre>
+   C: suspend {thread_id}
+   R: ok
+   E: suspended {thread_id} client
+   
+Errors:
+   error: invalid thread
+      error: vm already suspended
+   error: thread already suspended
+</pre>
+
+<h3>threads</h3>
+Retrieves the list of active threads 
+
+<pre>
+   C: threads
+   R: {thread id} {thread id} ...
+</pre>
+
+<h3>var</h3>
+Retrieves variable value 
+
+<pre>
+   C: var  {thread_id} {frame_number} {variable_name}
+   R: {variable_value}
+   
+Errors:
+   error: invalid thread
+   error: variable undefined
+</pre>
+
+
+<h3>watch</h3>
+Sets a watchpoint on a given variable
+
+<pre>
+   C: watch {function}::{variable_name} {watch_operation}
+   R: ok
+   C: resume
+   R: resumed client
+   E: suspended watch {watch_operation} {function}::{variable_name}
+</pre>
+
+The <code>watch_operation<code> value can be:
+<ul>
+  <li>0 - no watch</li>
+  <li>1 - read watch</li>
+  <li>2 - write watch</li>
+  <li>3 - both, etc.</li>
+</ul>
+
+
+<h3>vmresume</h3>
+Resumes the execution of the whole virtual machine  
+ 
+<pre>
+   C: vmresume
+   R: ok
+   E: vmresumed client
+   
+Errors:
+   error: vm already running
+</pre>
+
+<h3>vmsuspend</h3>
+Suspends the execution of the whole virtual machine 
+
+<pre>
+   C: vmsuspend
+   R: ok
+   E: vmsuspended client
+   
+Errors:
+   error: thread already suspended
+</pre>
+</body>
+
+</html>
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/src/org/eclipse/cdt/examples/pdavm/PDAVirtualMachine.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/src/org/eclipse/cdt/examples/pdavm/PDAVirtualMachine.java
new file mode 100644
index 0000000..5b40a1d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/src/org/eclipse/cdt/examples/pdavm/PDAVirtualMachine.java
@@ -0,0 +1,1378 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.pdavm;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.io.StringWriter;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+import java.util.TreeSet;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * 
+ */
+ at SuppressWarnings("serial")
+public class PDAVirtualMachine {
+
+    static class Stack extends LinkedList<Object> {
+        public Object pop() {
+            return isEmpty() ? 0 : remove(size() - 1);
+        }
+
+        public void push(Object value) {
+            add(value);
+        }
+    }
+    
+    static class Register {
+        Register(String name) { 
+            fName = name; 
+        }
+        String fName;
+        String fGroup = "<no_group>";
+        boolean fIsWriteable = true;
+        Map<String, BitField> fBitFields = new LinkedHashMap<String, BitField>(0);
+        int fValue;
+    }
+
+    static class BitField {
+        BitField(String name) { 
+            fName = name; 
+        }
+        String fName;
+        int fBitOffset;
+        int fBitCount;
+        Map<String, Integer> fMnemonics = new LinkedHashMap<String, Integer>(0);
+    }
+
+    Map<String,Register> fRegisters = new LinkedHashMap<String,Register>(0);
+    
+    class Args {
+        final String[] fArgs;
+
+        int next = 0;
+
+        Args(String[] args) {
+            fArgs = args;
+        }
+
+        String getNextStringArg() {
+            if (fArgs.length > next) {
+                return fArgs[next++];
+            }
+            return "";
+        }
+
+        int getNextIntArg() {
+            String arg = getNextStringArg();
+            try {
+                return Integer.parseInt(arg);
+            } catch (NumberFormatException e) {
+            }
+            return 0;
+        }
+
+        boolean getNextBooleanArg() {
+            String arg = getNextStringArg();
+            try {
+                return Boolean.parseBoolean(arg);
+            } catch (NumberFormatException e) {
+            }
+            return false;
+        }
+
+        Object getNextIntOrStringArg() {
+            String arg = getNextStringArg();
+            try {
+                return Integer.parseInt(arg);
+            } catch (NumberFormatException e) {
+            }
+            return arg;
+        }
+
+        PDAThread getThreadArg() {
+            int id = getNextIntArg();
+            return fThreads.get(id);
+        }
+    }
+
+    class PDAThread {
+        final int fID;
+
+        /** The push down automata data stack (the data stack). */
+        final Stack fStack = new Stack();
+
+        /**
+         * PDAThread copy of the code. It can differ from the program if
+         * performing an evaluation.
+         */
+        String[] fThreadCode;
+
+        /** PDAThread copy of the labels. */
+        Map<String, Integer> fThreadLabels;
+
+        /** The stack of stack frames (the control stack) */
+        final List<Frame> fFrames = new LinkedList<Frame>();
+
+        /** Current stack frame (not includced in fFrames) */
+        Frame fCurrentFrame;
+
+        /**
+         * The run flag is true if the thread is running. If the run flag is
+         * false, the thread exits the next time the main instruction loop runs.
+         */
+        boolean fRun = true;
+
+        String fSuspend = null;
+
+        boolean fStep = false;
+
+        boolean fStepReturn = false;
+        
+        int fSavedPC;
+
+        boolean fPerformingEval = false;
+        
+        PDAThread(int id, String function, int pc) {
+            fID = id;
+            fCurrentFrame = new Frame(function, pc);
+            fThreadCode = fCode;
+            fThreadLabels = fLabels;
+        }
+    }
+
+    final Map<Integer, PDAThread> fThreads = new LinkedHashMap<Integer, PDAThread>();
+
+    int fNextThreadId = 1;
+
+    boolean fStarted = true;
+    /**
+     * The code is stored as an array of strings, each line of the source file
+     * being one entry in the array.
+     */
+    final String[] fCode;
+
+    /** A mapping of labels to indicies in the code array */
+    final Map<String, Integer> fLabels;
+
+    /** Each stack frame is a mapping of variable names to values. */
+    class Frame {
+        final Map<String, Object> fLocalVariables = new LinkedHashMap<String, Object>();
+        
+        /**
+         * The name of the function in this frame
+         */
+        final String fFunction;
+
+        /**
+         * The current program counter in the frame the pc points to the next
+         * instruction to be executed
+         */
+        int fPC;
+
+        Frame(String function, int pc) {
+            fFunction = function;
+            fPC = pc;
+        }
+        
+        void set(String name, Object value) {
+            if (name.startsWith("$")) {
+                setRegisterValue(name, value);
+            } else {
+                fLocalVariables.put(name, value);
+            }
+        }
+        
+        Object get(String name) {
+            if (name.startsWith("$")) {
+                return getRegisterValue(name);
+            } else { 
+                return fLocalVariables.get(name);
+            }
+        }
+    }
+
+    void setRegisterValue(String name, Object value) {
+        Register reg = fRegisters.get(getRegisterPartOfName(name));
+        if (reg == null) return;
+        String bitFieldName = getBitFieldPartOfName(name);
+        if (bitFieldName != null) {
+            BitField bitField = reg.fBitFields.get(bitFieldName);
+            if (bitField == null) return;
+            Integer intValue = null;
+            if (value instanceof Integer) {
+                intValue = (Integer)value;
+            } else if (value instanceof String) {
+                intValue = bitField.fMnemonics.get(value);
+            }
+            if (intValue != null) {
+                int bitFieldMask = 2^(bitField.fBitCount - 1);           
+                int registerMask = ~(bitFieldMask << bitField.fBitOffset);
+                int bitFieldValue = intValue & bitFieldMask;
+                reg.fValue = (reg.fValue & registerMask) | (bitFieldValue << bitField.fBitOffset);
+            }
+        } else if (value instanceof Integer) {
+            reg.fValue = ((Integer)value).intValue();
+        }
+    }
+
+    Object getRegisterValue(String name) {
+        Register reg = fRegisters.get(getRegisterPartOfName(name));
+        if (reg == null) return null;
+        String bitFieldName = getBitFieldPartOfName(name);
+        if (bitFieldName != null) {
+            BitField bitField = reg.fBitFields.get(bitFieldName);
+            if (bitField == null) return null;
+            int bitFieldMask = 2^(bitField.fBitCount - 1);           
+            int registerMask = bitFieldMask << bitField.fBitOffset;
+            return (reg.fValue & registerMask) >> bitField.fBitOffset;
+        } else {
+            return reg.fValue;
+        }
+    }
+    
+    /**
+     * Breakpoints are stored per each each line of code.  The boolean indicates
+     * whether the whole VM should suspend or just the triggering thread.
+     */
+    final Map<Integer, Boolean> fBreakpoints = new HashMap<Integer, Boolean>();
+
+    /**
+     * The suspend flag is true if the VM should suspend running the program and
+     * just listen for debug commands.
+     */
+    String fSuspendVM;
+
+    /** Flag indicating whether the debugger is performing a step. */
+    boolean fStepVM = false;
+
+    /** Flag indicating whether the debugger is performing a step return */
+    boolean fStepReturnVM = false;
+    
+    int fSteppingThread = 0;
+
+    /** Name of the pda program being debugged */
+    final String fFilename;
+
+    /** The command line argument to start a debug session. */
+    final boolean fDebug;
+
+    /** The port to listen for debug commands on */
+    final int fCommandPort;
+
+    /**
+     * Command socket for receiving debug commands and sending command responses
+     */
+    Socket fCommandSocket;
+
+    /** Command socket reader */
+    BufferedReader fCommandReceiveStream;
+
+    /** Command socket write stream. */
+    OutputStream fCommandResponseStream;
+
+    /** The port to send debug events to */
+    final int fEventPort;
+
+    /** Event socket */
+    Socket fEventSocket;
+
+    /** Event socket and write stream. */
+    OutputStream fEventStream;
+
+    /** The eventstops table holds which events cause suspends and which do not. */
+    final Map<String, Boolean> fEventStops = new HashMap<String, Boolean>();
+    {
+        fEventStops.put("unimpinstr", false);
+        fEventStops.put("nosuchlabel", false);
+    }
+
+    /**
+     * The watchpoints table holds watchpoint information.
+     * <p/>
+     * variablename_stackframedepth => N
+     * <ul> 
+     * <li>N = 0 is no watch</li> 
+     * <li>N = 1 is read watch</li>
+     * <li>N = 2 is write watch</li>
+     * <li>N = 3 is both, etc.</li>
+     */
+    final Map<String, Integer> fWatchpoints = new HashMap<String, Integer>();
+
+    public static void main(String[] args) {
+        String programFile = args.length >= 1 ? args[0] : null;
+        if (programFile == null) {
+            System.err.println("Error: No program specified");
+            return;
+        }
+
+        String debugFlag = args.length >= 2 ? args[1] : "";
+        boolean debug = "-debug".equals(debugFlag);
+        int commandPort = 0;
+        int eventPort = 0;
+
+        if (debug) {
+            String commandPortStr = args.length >= 3 ? args[2] : "";
+            try {
+                commandPort = Integer.parseInt(commandPortStr);
+            } catch (NumberFormatException e) {
+                System.err.println("Error: Invalid command port");
+                return;
+            }
+
+            String eventPortStr = args.length >= 4 ? args[3] : "";
+            try {
+                eventPort = Integer.parseInt(eventPortStr);
+            } catch (NumberFormatException e) {
+                System.err.println("Error: Invalid event port");
+                return;
+            }
+        }
+
+        PDAVirtualMachine pdaVM = null;
+        try {
+            pdaVM = new PDAVirtualMachine(programFile, debug, commandPort, eventPort);
+            pdaVM.startDebugger();
+        } catch (IOException e) {
+            System.err.println("Error: " + e.toString());
+            return;
+        }
+        pdaVM.run();
+    }
+
+    PDAVirtualMachine(String inputFile, boolean debug, int commandPort, int eventPort) throws IOException {
+        fFilename = inputFile;
+
+        // Load all the code into memory
+        FileReader fileReader = new FileReader(inputFile);
+        StringWriter stringWriter = new StringWriter();
+        List<String> code = new LinkedList<String>();
+        int c = fileReader.read();
+        while (c != -1) {
+            if (c == '\n') {
+                code.add(stringWriter.toString().trim());
+                stringWriter = new StringWriter();
+            } else {
+                stringWriter.write(c);
+            }
+            c = fileReader.read();
+        }
+        code.add(stringWriter.toString().trim());
+        fCode = code.toArray(new String[code.size()]);
+
+        fLabels = mapLabels(fCode);
+
+        fDebug = debug;
+        fCommandPort = commandPort;
+        fEventPort = eventPort;
+    }
+
+    /**
+     * Initializes the labels map
+     */
+    Map<String, Integer> mapLabels(String[] code) {
+        Map<String, Integer> labels = new HashMap<String, Integer>();
+        for (int i = 0; i < code.length; i++) {
+            if (code[i].length() != 0 && code[i].charAt(0) == ':') {
+                labels.put(code[i].substring(1), i);
+            }
+        }
+        return labels;
+    }
+
+    void sendCommandResponse(String response) {
+        try {
+            fCommandResponseStream.write(response.getBytes());
+            fCommandResponseStream.flush();
+        } catch (IOException e) {
+        }
+    }
+
+    void sendDebugEvent(String event, boolean error) {
+        if (fDebug) {
+            try {
+                fEventStream.write(event.getBytes());
+                fEventStream.write('\n');
+                fEventStream.flush();
+            } catch (IOException e) {
+                System.err.println("Error: " + e);
+                System.exit(1);
+            }
+        } else if (error) {
+            System.err.println("Error: " + event);
+        }
+    }
+
+    void startDebugger() throws IOException {
+        if (fDebug) {
+            System.out.println("-debug " + fCommandPort + " " + fEventPort);
+        }
+
+        ServerSocket commandServerSocket = new ServerSocket(fCommandPort);
+        fCommandSocket = commandServerSocket.accept();
+        fCommandReceiveStream = new BufferedReader(new InputStreamReader(fCommandSocket.getInputStream()));
+        fCommandResponseStream = new PrintStream(fCommandSocket.getOutputStream());
+        commandServerSocket.close();
+
+        ServerSocket eventServerSocket = new ServerSocket(fEventPort);
+        fEventSocket = eventServerSocket.accept();
+        fEventStream = new PrintStream(fEventSocket.getOutputStream());
+        eventServerSocket.close();
+
+        System.out.println("debug connection accepted");
+
+        fSuspendVM = "client";
+    }
+
+    void run() {
+        int id = fNextThreadId++;
+        fThreads.put(id, new PDAThread(id, "main", 0));
+        if (fDebug) {
+            sendDebugEvent("started " + id, false);
+        }
+
+        boolean allThreadsSuspended = false;
+        while (!fThreads.isEmpty()) {
+            checkForBreakpoint();
+            
+            if (fSuspendVM != null) {
+                debugUI();
+            } else {
+                yieldToDebug(allThreadsSuspended);
+                if (fSuspendVM != null) {
+                    // Received a command to suspend VM, skip executing threads.
+                    continue;
+                }
+            }
+
+            PDAThread[] threadsCopy = fThreads.values().toArray(new PDAThread[fThreads.size()]);
+            allThreadsSuspended = true;
+            for (PDAThread thread : threadsCopy) {
+                if (thread.fSuspend == null) {
+                    allThreadsSuspended = false;
+                    
+                    String instruction = thread.fThreadCode[thread.fCurrentFrame.fPC];
+                    thread.fCurrentFrame.fPC++;
+                    doOneInstruction(thread, instruction);
+                    if (thread.fCurrentFrame.fPC >= thread.fThreadCode.length) {
+                        // Thread reached end of code, exit from the thread.
+                        thread.fRun = false;
+                    } else if (thread.fStepReturn) {
+                        // If this thread is in a step-return operation, check
+                        // if we've returned from a call.  
+                        instruction = thread.fThreadCode[thread.fCurrentFrame.fPC];
+                        if ("return".equals(instruction)) {
+                            // Note: this will only be triggered if the current 
+                            // thread also has the fStepReturn flag set.
+                            if (fStepReturnVM) {
+                                fSuspendVM = thread.fID + " step";
+                            } else {
+                                thread.fSuspend = "step";
+                            }
+                        }
+                    }
+                    if (!thread.fRun) {
+                        sendDebugEvent("exited " + thread.fID, false);
+                        fThreads.remove(thread.fID);
+                    } else if (thread.fSuspend != null) {
+                        sendDebugEvent("suspended " + thread.fID + " " + thread.fSuspend, false);
+                        thread.fStep = thread.fStepReturn = thread.fPerformingEval = false;
+                    }
+                } 
+            }
+            
+            // Force thread context switch to avoid starving out other
+            // processes in the system.
+            Thread.yield();
+        }
+        
+        sendDebugEvent("terminated", false);
+        if (fDebug) {
+            try {
+                fCommandReceiveStream.close();
+                fCommandResponseStream.close();
+                fCommandSocket.close();
+                fEventStream.close();
+                fEventSocket.close();
+            } catch (IOException e) {
+                System.out.println("Error: " + e);
+            }
+        }
+
+    }
+
+    void doOneInstruction(PDAThread thread, String instr) {
+        StringTokenizer tokenizer = new StringTokenizer(instr);
+        String op = tokenizer.nextToken();
+        List<String> tokens = new LinkedList<String>();
+        while (tokenizer.hasMoreTokens()) {
+            tokens.add(tokenizer.nextToken());
+        }
+        Args args = new Args(tokens.toArray(new String[tokens.size()]));
+
+        boolean opValid = true;
+        if (op.equals("add")) iAdd(thread, args);
+        else if (op.equals("branch_not_zero")) iBranchNotZero(thread, args);
+        else if (op.equals("call")) iCall(thread, args);
+        else if (op.equals("dec")) iDec(thread, args);
+        else if (op.equals("def")) iDef(thread, args);
+        else if (op.equals("dup")) iDup(thread, args);
+        else if (op.equals("exec")) iExec(thread, args);            
+        else if (op.equals("halt")) iHalt(thread, args);
+        else if (op.equals("output")) iOutput(thread, args);
+        else if (op.equals("pop")) iPop(thread, args);
+        else if (op.equals("push")) iPush(thread, args);
+        else if (op.equals("return")) iReturn(thread, args);
+        else if (op.equals("var")) iVar(thread, args);
+        else if (op.equals("xyzzy")) iInternalEndEval(thread, args);
+        else if (op.startsWith(":")) {} // label
+        else if (op.startsWith("#")) {} // comment
+        else {
+            opValid = false;
+        }
+
+        if (!opValid) {
+            sendDebugEvent("unimplemented instruction " + op, true);
+            if (fEventStops.get("unimpinstr")) {
+                fSuspendVM = thread.fID + " event unimpinstr";
+                thread.fCurrentFrame.fPC--;
+            }
+        } else if (thread.fStep) {
+            if (fStepVM) {
+                fSuspendVM = thread.fID + " step";
+                fStepVM = false;
+            } else {
+                thread.fSuspend = "step";
+            }
+            thread.fStep = false;
+        }
+    }
+
+    void checkForBreakpoint() {
+        if (fDebug) {
+            for (PDAThread thread : fThreads.values()) {
+                int pc = thread.fCurrentFrame.fPC;
+                // Suspend for breakpoint if:
+                // - the VM is not yet set to suspend, for e.g. as a result of step end,
+                // - the thread is not yet suspended and is not performing an evaluation
+                // - the breakpoints table contains a breakpoint for the given line.
+                if (fSuspendVM == null && 
+                    thread.fSuspend == null && !thread.fPerformingEval && 
+                    fBreakpoints.containsKey(pc)) 
+                {
+                    if (fBreakpoints.get(pc)) {
+                        fSuspendVM = thread.fID + " breakpoint " + pc;
+                    } else {
+                        thread.fSuspend = "breakpoint " + pc;
+                        thread.fStep = thread.fStepReturn = false;
+                        sendDebugEvent("suspended " + thread.fID + " " + thread.fSuspend, false);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * After each instruction, we check the debug command channel for control input. If
+     * there are commands, process them.
+     */
+    void yieldToDebug(boolean allThreadsSuspended) {
+        if (fDebug) {
+            String line = "";
+            try {
+                if (allThreadsSuspended || fCommandReceiveStream.ready()) {
+                    line = fCommandReceiveStream.readLine();
+                    processDebugCommand(line);
+                }
+            } catch (IOException e) {
+                System.err.println("Error: " + e);
+                System.exit(1);
+            }
+        }
+    }
+
+    /**
+     *  Service the debugger commands while the VM is suspended
+     */
+    void debugUI() {
+        if (!fStarted) {
+            sendDebugEvent("vmsuspended " + fSuspendVM, false);
+        } else {
+            fStarted = false;
+        }
+
+        // Clear all stepping flags.  In case the VM suspended while
+        // a step operation was being performed for the VM or some thread.
+        fStepVM = fStepReturnVM = false;
+        for (PDAThread thread : fThreads.values()) {
+            thread.fSuspend = null;
+            thread.fStep = thread.fStepReturn = thread.fPerformingEval = false;
+        }
+        
+        while (fSuspendVM != null) {
+            String line = "";
+            try {
+                line = fCommandReceiveStream.readLine();
+            } catch (IOException e) {
+                System.err.println("Error: " + e);
+                System.exit(1);
+                return;
+            }
+            processDebugCommand(line);
+        }
+
+        if (fStepVM || fStepReturnVM) {
+            sendDebugEvent("vmresumed step", false);
+        } else {
+            sendDebugEvent("vmresumed client", false);
+        }
+    }
+
+    void processDebugCommand(String line) {
+        StringTokenizer tokenizer = new StringTokenizer(line.trim());
+        if (line.length() == 0) {
+            return;
+        }
+
+        String command = tokenizer.nextToken();
+        List<String> tokens = new LinkedList<String>();
+        while (tokenizer.hasMoreTokens()) {
+            tokens.add(tokenizer.nextToken());
+        }
+        Args args = new Args(tokens.toArray(new String[tokens.size()]));
+
+        if ("children".equals(command)) debugChildren(args);
+        else if ("clear".equals(command)) debugClearBreakpoint(args);
+        else if ("data".equals(command)) debugData(args);
+        else if ("drop".equals(command)) debugDropFrame(args);
+        else if ("eval".equals(command)) debugEval(args);
+        else if ("eventstop".equals(command)) debugEventStop(args);
+        else if ("exit".equals(command)) debugExit();
+        else if ("frame".equals(command)) debugFrame(args);
+        else if ("groups".equals(command)) debugGroups(args);
+        else if ("popdata".equals(command)) debugPop(args);
+        else if ("pushdata".equals(command)) debugPush(args);
+        else if ("registers".equals(command)) debugRegisters(args);
+        else if ("resume".equals(command)) debugResume(args);
+        else if ("set".equals(command)) debugSetBreakpoint(args);
+        else if ("setdata".equals(command)) debugSetData(args);
+        else if ("setvar".equals(command)) debugSetVariable(args);
+        else if ("stack".equals(command)) debugStack(args);
+        else if ("stackdepth".equals(command)) debugStackDepth(args);
+        else if ("state".equals(command)) debugState(args);
+        else if ("step".equals(command)) debugStep(args);
+        else if ("stepreturn".equals(command)) debugStepReturn(args);
+        else if ("suspend".equals(command)) debugSuspend(args);
+        else if ("threads".equals(command)) debugThreads();
+        else if ("var".equals(command)) debugVar(args);
+        else if ("vmresume".equals(command)) debugVMResume();
+        else if ("vmsuspend".equals(command)) debugVMSuspend();
+        else if ("watch".equals(command)) debugWatch(args);
+        else {
+            sendCommandResponse("error: invalid command\n");
+        }
+    }
+
+    void debugChildren(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        }
+
+        int sfnumber = args.getNextIntArg();
+        String var = args.getNextStringArg();
+        
+        Frame frame = sfnumber >= thread.fFrames.size()    
+            ? thread.fCurrentFrame : thread.fFrames.get(sfnumber);
+
+        String varDot = var + ".";
+        List<String> children = new ArrayList<String>();
+        for (String localVar : frame.fLocalVariables.keySet()) {
+            if (localVar.startsWith(varDot) && localVar.indexOf('.', varDot.length() + 1) == -1) {
+                children.add(localVar);
+            }
+        }
+
+        StringBuffer result = new StringBuffer();
+        for (String child : children) {
+            result.append(child);
+            result.append('|');
+        }
+        result.append('\n');
+
+        sendCommandResponse(result.toString());
+    }
+    
+    void debugClearBreakpoint(Args args) {
+        int line = args.getNextIntArg();
+
+        fBreakpoints.remove(line);
+        sendCommandResponse("ok\n");
+    }
+
+    private static Pattern fPackPattern = Pattern.compile("%([a-fA-F0-9][a-fA-F0-9])");
+
+    void debugData(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        }
+
+        StringBuffer result = new StringBuffer();
+        for (Object val : thread.fStack) {
+            result.append(val);
+            result.append('|');
+        }
+        result.append('\n');
+        sendCommandResponse(result.toString());
+    }
+
+    void debugDropFrame(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        }
+
+        if (!thread.fFrames.isEmpty()) {
+            thread.fCurrentFrame = thread.fFrames.remove(thread.fFrames.size() - 1);
+        }
+        thread.fCurrentFrame.fPC--;
+        sendCommandResponse("ok\n");
+        if (fSuspendVM != null) {
+            sendDebugEvent("vmresumed drop", false);
+            sendDebugEvent("vmsuspended " + thread.fID + " drop", false);
+        } else {
+            sendDebugEvent("resumed " + thread.fID + " drop", false);
+            sendDebugEvent("suspended " + thread.fID + " drop", false);
+        }
+    }
+
+    void debugEval(Args args) {
+        if (fSuspendVM != null) {
+            sendCommandResponse("error: cannot evaluate while vm is suspended\n");        
+            return;
+        }
+        
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        }
+        
+        if (thread.fSuspend == null) {
+            sendCommandResponse("error: thread running\n");
+            return;
+        }
+        
+        StringTokenizer tokenizer = new StringTokenizer(args.getNextStringArg(), "|");
+        tokenizer.countTokens();
+
+        int numEvalLines = tokenizer.countTokens();
+        thread.fThreadCode = new String[fCode.length + numEvalLines + 1];
+        System.arraycopy(fCode, 0, thread.fThreadCode, 0, fCode.length);
+        for (int i = 0; i < numEvalLines; i++) {
+            String line = tokenizer.nextToken();
+            StringBuffer lineBuf = new StringBuffer(line.length());
+            Matcher matcher = fPackPattern.matcher(line);
+            int lastMatchEnd = 0;
+            while (matcher.find()) {
+                lineBuf.append(line.substring(lastMatchEnd, matcher.start()));
+                String charCode = line.substring(matcher.start() + 1, matcher.start() + 3);
+                try {
+                    lineBuf.append((char) Integer.parseInt(charCode, 16));
+                } catch (NumberFormatException e) {
+                }
+                lastMatchEnd = matcher.end();
+            }
+            if (lastMatchEnd < line.length()) {
+                lineBuf.append(line.substring(lastMatchEnd));
+            }
+            thread.fThreadCode[fCode.length + i] = lineBuf.toString();
+        }
+        thread.fThreadCode[fCode.length + numEvalLines] = "xyzzy";
+        thread.fThreadLabels = mapLabels(fCode);
+
+        thread.fSavedPC = thread.fCurrentFrame.fPC;
+        thread.fCurrentFrame.fPC = fCode.length;
+        thread.fPerformingEval = true;
+        
+        thread.fSuspend = null;
+        
+        sendCommandResponse("ok\n");
+
+        sendDebugEvent("resumed " + thread.fID + " eval", false);
+    }
+
+    void debugEventStop(Args args) {
+        String event = args.getNextStringArg();
+        int stop = args.getNextIntArg();
+        fEventStops.put(event, stop > 0);
+        sendCommandResponse("ok\n");
+    }
+
+    void debugExit() {
+        sendCommandResponse("ok\n");
+        sendDebugEvent("terminated", false);
+        System.exit(0);
+    }
+
+    void debugFrame(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        }
+
+        int sfnumber = args.getNextIntArg();
+        Frame frame = null;
+        if (sfnumber >= thread.fFrames.size()) {
+            frame = thread.fCurrentFrame;
+        } else {
+            frame = thread.fFrames.get(sfnumber);
+        }
+        sendCommandResponse(printFrame(frame) + "\n");
+    }
+
+    void debugGroups(Args args) {
+        TreeSet<String> groups = new TreeSet<String>();
+        for (Register reg : fRegisters.values()) {
+            groups.add(reg.fGroup);
+        }
+        StringBuffer response = new StringBuffer();
+        for (String group : groups) {
+            response.append(group);
+            response.append('|');
+        }
+        response.append('\n');
+        sendCommandResponse(response.toString());
+    }
+
+    void debugPop(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        }
+
+        thread.fStack.pop();
+        sendCommandResponse("ok\n");
+    }
+
+    void debugPush(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        }
+        
+        Object val = args.getNextIntOrStringArg();
+        thread.fStack.push(val);
+        sendCommandResponse("ok\n");
+    }
+
+    void debugRegisters(Args args) {
+        String group = args.getNextStringArg();
+        
+        StringBuffer response = new StringBuffer();
+        for (Register reg : fRegisters.values()) {
+            if (group.equals(reg.fGroup)) {
+                response.append(reg.fName);
+                response.append(' ');
+                response.append(reg.fIsWriteable);
+                for (BitField bitField : reg.fBitFields.values()) {
+                    response.append('|');
+                    response.append(bitField.fName);
+                    response.append(' ');
+                    response.append(bitField.fBitOffset);
+                    response.append(' ');
+                    response.append(bitField.fBitCount);
+                    response.append(' ');
+                    for (Map.Entry<String, Integer> mnemonicEntry : bitField.fMnemonics.entrySet()) {
+                        response.append(mnemonicEntry.getKey());
+                        response.append(' ');
+                        response.append(mnemonicEntry.getValue());
+                        response.append(' ');
+                    }
+                }
+                
+                response.append('#');
+            }
+        }
+        response.append('\n');
+        sendCommandResponse(response.toString());
+    }
+    
+    void debugResume(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        } 
+        if (fSuspendVM != null) {
+            sendCommandResponse("error: cannot resume thread when vm is suspended\n");
+            return;
+        } 
+        if (thread.fSuspend == null) {
+            sendCommandResponse("error: thread already running\n");
+            return;
+        } 
+        
+        thread.fSuspend = null;
+        sendDebugEvent("resumed " + thread.fID + " client", false);
+        
+        sendCommandResponse("ok\n");
+    }
+
+    void debugSetBreakpoint(Args args) {
+        int line = args.getNextIntArg();
+        int stopVM = args.getNextIntArg();
+        
+        fBreakpoints.put(line, stopVM != 0);
+        sendCommandResponse("ok\n");
+    }
+
+    void debugSetData(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        }
+        
+        int offset = args.getNextIntArg();
+        Object val = args.getNextIntOrStringArg();
+
+        if (offset < thread.fStack.size()) {
+            thread.fStack.set(offset, val);
+        } else {
+            thread.fStack.add(0, val);
+        }
+        sendCommandResponse("ok\n");
+    }
+
+    void debugSetVariable(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        }
+
+        int sfnumber = args.getNextIntArg();
+        String var = args.getNextStringArg();
+        Object val = args.getNextIntOrStringArg();
+
+        if (sfnumber >= thread.fFrames.size()) {
+            thread.fCurrentFrame.set(var, val);
+        } else {
+            thread.fFrames.get(sfnumber).set(var, val);
+        }
+        sendCommandResponse("ok\n");
+    }
+
+    void debugStack(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        }
+
+        StringBuffer result = new StringBuffer();
+        for (Frame frame : thread.fFrames) {
+            result.append(printFrame(frame));
+            result.append('#');
+        }
+        result.append(printFrame(thread.fCurrentFrame));
+        result.append('\n');
+        sendCommandResponse(result.toString());
+    }
+
+    void debugStackDepth(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        }
+        sendCommandResponse( Integer.toString(thread.fFrames.size() + 1) + "\n" );
+    }
+
+
+    /**
+     * The stack frame output is: frame # frame # frame ... where each frame is:
+     * filename | line number | function name | var | var | var | var ...
+     */
+    private String printFrame(Frame frame) {
+        StringBuffer buf = new StringBuffer();
+        buf.append(fFilename);
+        buf.append('|');
+        buf.append(frame.fPC);
+        buf.append('|');
+        buf.append(frame.fFunction);
+        for (String var : frame.fLocalVariables.keySet()) {
+            if (var.indexOf('.') == -1) {
+                buf.append('|');
+                buf.append(var);
+            }
+        }
+        return buf.toString();
+    }
+
+    void debugState(Args args) {
+        PDAThread thread = args.getThreadArg();
+        String response = null;
+        if (thread == null) {
+            response = fSuspendVM == null ? "running" : fSuspendVM;
+        } else if (fSuspendVM != null) {
+            response = "vm";
+        } else {
+            response = thread.fSuspend == null ? "running" : thread.fSuspend;
+        }
+        sendCommandResponse(response + "\n");
+    }
+    
+    void debugStep(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        } 
+
+        // Set suspend to null to allow the debug loop to exit back to the 
+        // instruction loop and thus run an instruction. However, we want to 
+        // come back to the debug loop right away, so the step flag is set to 
+        // true which will cause the suspend flag to get set to true when we 
+        // get to the next instruction.
+        if (fSuspendVM != null) {
+            // All threads are suspended, so suspend all threads again when 
+            // step completes.
+            fSuspendVM = null;
+            fStepVM = true;
+            // Also mark the thread that initiated the step to mark it as
+            // the triggering thread when suspending.
+            thread.fStep = true;
+        } else {
+            if (thread.fSuspend == null) {
+                sendCommandResponse("error: thread already running\n");
+                return;
+            }
+            thread.fSuspend = null;
+            thread.fStep = true;
+            sendDebugEvent("resumed " + thread.fID + " step", false);
+        }
+        sendCommandResponse("ok\n");
+    }
+
+    void debugStepReturn(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        } 
+        
+        if (fSuspendVM != null) {
+            fSuspendVM = null;
+            fStepReturnVM = true;
+            thread.fStepReturn = true;
+        } else {
+            if (thread.fSuspend == null) {
+                sendCommandResponse("error: thread running\n");
+                return;
+            }
+            thread.fSuspend = null;
+            thread.fStepReturn = true;
+            sendDebugEvent("resumed " + thread.fID + " step", false);
+        }
+        sendCommandResponse("ok\n");
+    }
+
+    void debugSuspend(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        } 
+        if (fSuspendVM != null) {
+            sendCommandResponse("error: vm already suspended\n");
+            return;
+        }
+        if (thread.fSuspend != null) {
+            sendCommandResponse("error: thread already suspended\n");
+            return;
+        } 
+        
+        thread.fSuspend = "client";
+        sendDebugEvent("suspended " + thread.fID + " client", false);
+        sendCommandResponse("ok\n");
+    }
+
+    void debugThreads() {
+        StringBuffer response = new StringBuffer();
+        for (int threadId : fThreads.keySet()) {
+            response.append(threadId);
+            response.append(' ');
+        }
+        sendCommandResponse(response.toString().trim() + "\n");
+    }
+
+    void debugVar(Args args) {
+        PDAThread thread = args.getThreadArg();
+        if (thread == null) {
+            sendCommandResponse("error: invalid thread\n");
+            return;
+        }
+
+        int sfnumber = args.getNextIntArg();
+        String var = args.getNextStringArg();
+
+        Frame frame = sfnumber >= thread.fFrames.size()    
+            ? thread.fCurrentFrame : thread.fFrames.get(sfnumber);
+        
+        Object val = frame.get(var);
+        if (val == null) {
+            sendCommandResponse("error: variable undefined\n");
+        } else {
+            sendCommandResponse(val.toString() + "\n");
+        }
+    }
+
+    void debugVMResume() {
+        if (fSuspendVM == null) {
+            sendCommandResponse("error: vm already running\n");
+            return;
+        } 
+
+        fSuspendVM = null;
+        sendCommandResponse("ok\n");
+    }
+
+    void debugVMSuspend() {
+        if (fSuspendVM != null) {
+            sendCommandResponse("error: vm already suspended\n");
+            return;
+        }
+
+        fSuspendVM = "client";
+        sendCommandResponse("ok\n");
+    }
+
+    void debugWatch(Args args) {
+        String funcAndVar = args.getNextStringArg();
+        int flags = args.getNextIntArg();
+        fWatchpoints.put(funcAndVar, flags);
+        sendCommandResponse("ok\n");
+    }
+
+    void iAdd(PDAThread thread, Args args) {
+        Object val1 = thread.fStack.pop();
+        Object val2 = thread.fStack.pop();
+        if (val1 instanceof Integer && val2 instanceof Integer) {
+            int intVal1 = ((Integer) val1).intValue();
+            int intVal2 = ((Integer) val2).intValue();
+            thread.fStack.push(intVal1 + intVal2);
+        } else {
+            thread.fStack.push(-1);
+        }
+    }
+
+    void iBranchNotZero(PDAThread thread, Args args) {
+        Object val = thread.fStack.pop();
+        if (val instanceof Integer && ((Integer) val).intValue() != 0) {
+            String label = args.getNextStringArg();
+            if (thread.fThreadLabels.containsKey(label)) {
+                thread.fCurrentFrame.fPC = thread.fThreadLabels.get(label);
+            } else {
+                sendDebugEvent("no such label " + label, true);
+                if (fEventStops.get("nosuchlabel")) {
+                    fSuspendVM = thread.fID + " event nosuchlabel";
+                    thread.fStack.push(val);
+                    thread.fCurrentFrame.fPC--;
+                }
+            }
+        }
+    }
+
+    void iCall(PDAThread thread, Args args) {
+        String label = args.getNextStringArg();
+        if (thread.fThreadLabels.containsKey(label)) {
+            thread.fFrames.add(thread.fCurrentFrame);
+            thread.fCurrentFrame = new Frame(label, thread.fThreadLabels.get(label));
+        } else {
+            sendDebugEvent("no such label " + label, true);
+            if (fEventStops.get("nosuchlabel")) {
+                fSuspendVM = thread.fID + " event nosuchlabel";
+                thread.fCurrentFrame.fPC--;
+            }
+        }
+    }
+
+    void iDec(PDAThread thread, Args args) {
+        Object val = thread.fStack.pop();
+        if (val instanceof Integer) {
+            val = new Integer(((Integer) val).intValue() - 1);
+        }
+        thread.fStack.push(val);
+    }
+
+    void iDef(PDAThread thread, Args args) {
+        String type = args.getNextStringArg();
+
+        String name = args.getNextStringArg();
+        String regName = getRegisterPartOfName(name);
+        String bitFieldName = getBitFieldPartOfName(name);
+
+        if ("register".equals(type)) {
+            Register reg = new Register(regName); 
+            reg.fGroup = args.getNextStringArg();
+            fRegisters.put(regName, reg);
+            reg.fIsWriteable = args.getNextBooleanArg();
+        } else if ("bitfield".equals(type)) {
+            Register reg = fRegisters.get(regName);
+            if (reg == null) return;
+            BitField bitField = new BitField(bitFieldName);
+            bitField.fBitOffset = args.getNextIntArg();
+            bitField.fBitCount = args.getNextIntArg();
+            reg.fBitFields.put(bitFieldName, bitField);
+        } else if ("mnemonic".equals(type)) {
+            Register reg = fRegisters.get(regName);
+            if (reg == null) return;
+            BitField bitField = reg.fBitFields.get(bitFieldName);
+            if (bitField == null) return;
+            bitField.fMnemonics.put(args.getNextStringArg(), args.getNextIntArg());
+        }
+        sendDebugEvent("registers", false);
+    }
+
+    private String getRegisterPartOfName(String name) {
+        if (name.startsWith("$")) {
+            int end = name.indexOf('.');
+            end = end != -1 ? end : name.length();
+            return name.substring(1, end);
+        }
+        return null;
+    }
+
+    private String getBitFieldPartOfName(String name) {
+        int start = name.indexOf('.');
+        if (name.startsWith("$") && start != -1) {
+            return name.substring(start + 1, name.length());
+        }
+        return null;        
+    }
+
+    void iDup(PDAThread thread, Args args) {
+        Object val = thread.fStack.pop();
+        thread.fStack.push(val);
+        thread.fStack.push(val);
+    }
+    
+    void iExec(PDAThread thread, Args args) {
+        String label = args.getNextStringArg();
+        if (fLabels.containsKey(label)) {
+            int id = fNextThreadId++;
+            fThreads.put(id, new PDAThread(id, label, fLabels.get(label)));
+            sendDebugEvent("started " + id, false);
+        } else {
+            sendDebugEvent("no such label " + label, true);
+            if (fEventStops.get("nosuchlabel")) {
+                thread.fSuspend = "event nosuchlabel";
+                thread.fCurrentFrame.fPC--;
+            }
+        }
+    }
+
+    void iHalt(PDAThread thread, Args args) {
+        thread.fRun = false;
+    }
+
+    void iOutput(PDAThread thread, Args args) {
+        System.out.println(thread.fStack.pop());
+    }
+
+    void iPop(PDAThread thread, Args args) {
+        String arg = args.getNextStringArg();
+        if (arg.startsWith("$")) {
+            String var = arg.substring(1);
+            thread.fCurrentFrame.set(var, thread.fStack.pop());
+            String key = thread.fCurrentFrame.fFunction + "::" + var;
+            if (fWatchpoints.containsKey(key) && (fWatchpoints.get(key) & 2) != 0) {
+                fSuspendVM = thread.fID + " watch write " + key;
+            }
+        } else {
+            thread.fStack.pop();
+        }
+    }
+
+    void iPush(PDAThread thread, Args args) {
+        String arg = args.getNextStringArg();
+        while (arg.length() != 0) {
+            if (arg.startsWith("$")) {
+                String var = arg.substring(1);
+                Object val = thread.fCurrentFrame.get(var);
+                if (val == null) val = "<undefined>";
+                thread.fStack.push(val);
+                String key = thread.fCurrentFrame.fFunction + "::" + var;
+                if (fWatchpoints.containsKey(key) && (fWatchpoints.get(key) & 1) != 0) {
+                    fSuspendVM = thread.fID + " watch read " + key;
+                }
+            } else {
+                Object val = arg;
+                try {
+                    val = Integer.parseInt(arg);
+                } catch (NumberFormatException e) {
+                }
+                thread.fStack.push(val);
+            }
+            
+            arg = args.getNextStringArg();
+        }
+    }
+
+    void iReturn(PDAThread thread, Args args) {
+        if (!thread.fFrames.isEmpty()) {
+            thread.fCurrentFrame = thread.fFrames.remove(thread.fFrames.size() - 1);
+        } else {
+            // Execution returned from the top frame, which means this thread
+            // should exit.
+            thread.fRun = false;
+        }
+    }
+
+    void iVar(PDAThread thread, Args args) {
+        String var = args.getNextStringArg();
+        thread.fCurrentFrame.set(var, 0);
+    }
+
+    void iInternalEndEval(PDAThread thread, Args args) {
+        Object result = thread.fStack.pop();
+        thread.fThreadCode = fCode;
+        thread.fThreadLabels = fLabels;
+        thread.fCurrentFrame.fPC = thread.fSavedPC;
+        sendDebugEvent("evalresult " + result, false);
+        thread.fSuspend = "eval";
+        thread.fPerformingEval = false;
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest10.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest10.pda
new file mode 100644
index 0000000..837277f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest10.pda
@@ -0,0 +1,38 @@
+def register $reg1 group1 true
+def register $reg2 group1 false
+def register $reg3 group2 true
+def bitfield $reg1.field1 0 2
+def bitfield $reg1.field2 2 2
+def mnemonic $reg1.field2 zero 0
+def mnemonic $reg1.field2 one 1
+def mnemonic $reg1.field2 two 2
+def mnemonic $reg1.field2 three 3
+push 1
+pop $$reg1
+push $$reg1
+output
+push 2
+pop $$reg1.field1
+push $$reg1.field1
+output
+push 4
+pop $$reg1.field1
+push $$reg1.field1
+output
+push 1
+pop $$reg1.field2
+push $$reg1
+output
+push zero 
+pop $$reg1.field2
+push $$reg1.field2
+output
+push $$reg1
+output
+push 2 
+pop $$reg1.field2
+push $$reg1.field2
+output
+push $$reg1
+output
+halt
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest2.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest2.pda
new file mode 100644
index 0000000..95a35f0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest2.pda
@@ -0,0 +1,48 @@
+push 6
+push 7
+push 8
+push 9
+push 10
+call sub1
+output
+call sub3
+call sub5
+push 3
+halt
+:sub2
+push 27
+return
+:sub1
+var m
+var n
+call sub2
+pop $n
+pop $m
+push $n
+push $m
+return
+# zero-based line 23
+:sub3
+push 1
+call sub4
+push 2
+call sub4
+push 3
+return
+:sub4
+push 4
+return
+# zero-based line 34
+:sub5
+var a
+var b
+var c
+pop $c
+pop $b
+call sub6
+push $a
+return
+:sub6
+var b
+pop $b
+return
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest3.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest3.pda
new file mode 100644
index 0000000..5aecdc5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest3.pda
@@ -0,0 +1,13 @@
+push 1
+push 2
+push 3
+foobar swish
+push 4
+add
+add
+call zippy
+add
+output
+push 1
+branch_not_zero swishy
+halt
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest6.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest6.pda
new file mode 100644
index 0000000..d90a960
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest6.pda
@@ -0,0 +1,31 @@
+var a
+var b
+push 1
+pop $a
+push 2
+pop $b
+push 3
+push 4
+#
+call inner
+#
+push $a
+push 2
+add
+pop $b
+output
+#
+halt
+#
+:inner
+var a
+var c
+pop $a
+pop $c
+push $a
+push $a
+add
+return
+:other
+push 15
+return
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest8.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest8.pda
new file mode 100644
index 0000000..7729409
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest8.pda
@@ -0,0 +1,14 @@
+var a
+call inner
+push 1
+output
+halt
+:inner
+var b
+call inner2
+push 2
+return
+:inner2
+var c
+push 3
+return
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest9.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest9.pda
new file mode 100644
index 0000000..336a251
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest9.pda
@@ -0,0 +1,23 @@
+push 5
+:thread_create
+exec foo
+dec 
+dup
+branch_not_zero thread_create
+push finished
+output 
+halt
+:foo
+push thread_created
+output
+call inner
+halt
+:inner
+var b
+call inner2
+push 2
+return
+:inner2
+var c
+push 3
+return
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest_children.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest_children.pda
new file mode 100644
index 0000000..b0bbd16
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/pdavm/tests/vmtest_children.pda
@@ -0,0 +1,8 @@
+var a
+var a.b
+var a.c
+push 1
+pop $a.b
+push $a.b
+output
+halt
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/plugin.properties b/results/plugins/org.eclipse.cdt.examples.dsf.pda/plugin.properties
new file mode 100644
index 0000000..f4b6e93
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/plugin.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2006, 2009 Wind River Systems and others.
+# 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
+#
+# Contributors:
+#   Wind River Systems - initial API and implementation
+#   IBM Corporation
+###############################################################################
+pluginName=PDA Example Device Debugging Core Plug-in
+providerName=Eclipse CDT
+
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/plugin.xml b/results/plugins/org.eclipse.cdt.examples.dsf.pda/plugin.xml
new file mode 100644
index 0000000..0fe004d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/plugin.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+   <extension
+         point="org.eclipse.core.variables.valueVariables">
+      <variable
+            description="Path to Perl executable in the local file system"
+            name="dsfPerlExecutable"
+            initialValue="/usr/bin/perl"/>
+   </extension>
+   <extension
+         point="org.eclipse.debug.core.launchConfigurationTypes">
+      <launchConfigurationType
+            sourceLocatorId="org.eclipse.cdt.examples.dsf.pda.sourceLocator"
+            delegate="org.eclipse.cdt.examples.dsf.pda.launch.PDALaunchDelegate"
+            sourcePathComputerId="org.eclipse.cdt.examples.dsf.pda.sourcePathComputer"
+            name="DSF PDA Application"
+            id="org.eclipse.cdt.examples.dsf.pda.launchType"
+            modes="run, debug"/>
+   </extension>
+   <extension
+         point="org.eclipse.debug.core.sourceLocators">
+      <sourceLocator
+            class="org.eclipse.cdt.examples.dsf.pda.sourcelookup.PDASourceLookupDirector"
+            name="DSF PDA Source Locator"
+            id="org.eclipse.cdt.examples.dsf.pda.sourceLocator"/>
+   </extension>
+   <extension
+         point="org.eclipse.debug.core.sourcePathComputers">
+      <sourcePathComputer
+            class="org.eclipse.cdt.examples.dsf.pda.sourcelookup.PDASourcePathComputerDelegate"
+            id="org.eclipse.cdt.examples.dsf.pda.sourcePathComputer"/>
+   </extension>
+   <extension
+         point="org.eclipse.debug.core.breakpoints">
+      <breakpoint
+            class="org.eclipse.cdt.examples.dsf.pda.breakpoints.PDALineBreakpoint"
+            name="DSF PDA Line Breakpoints"
+            markerType="org.eclipse.cdt.examples.dsf.pda.markerType.lineBreakpoint"
+            id="org.eclipse.cdt.examples.dsf.pda.lineBreakpoint"/>
+      <breakpoint
+            class="org.eclipse.cdt.examples.dsf.pda.breakpoints.PDAWatchpoint"
+            name="DSF PDA Watchpoints"
+            markerType="org.eclipse.cdt.examples.dsf.pda.markerType.watchpoint"
+            id="org.eclipse.cdt.examples.dsf.pda.watchpoint"/>
+   </extension>
+   <extension
+         id="markerType.lineBreakpoint"
+         name="PDA Line Breakpoint Marker"
+         point="org.eclipse.core.resources.markers">
+      <super type="org.eclipse.debug.core.lineBreakpointMarker"/>
+      <persistent value="true"/>
+   </extension>
+   <extension
+         id="org.eclipse.cdt.examples.dsf.pda.markerType.watchpoint"
+         name="DD PDA Watchpoint Marker"
+         point="org.eclipse.core.resources.markers">
+      <super type="org.eclipse.cdt.examples.dsf.pda.markerType.lineBreakpoint"/>
+      <persistent value="true"/>
+   </extension>
+
+
+   <extension
+         point="org.eclipse.debug.core.logicalStructureTypes">
+      <logicalStructureType
+            class="org.eclipse.debug.examples.core.pda.model.WordStructureDelegate"
+            description="Words"
+            id="pda.wordStructure"
+            modelIdentifier="org.eclipse.cdt.examples.dsf.pda.debugModel"/>
+   </extension>
+</plugin>
+
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/readme.html b/results/plugins/org.eclipse.cdt.examples.dsf.pda/readme.html
new file mode 100644
index 0000000..c8858de
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/readme.html
@@ -0,0 +1,11 @@
+<h1>Debug Examples ReadMe Notes</h1>
+<h2>PDA Debugger Example</h2>
+<p>In order to actually run the PDA debugger example, you will need a Perl interpreter. 
+  Linux&reg;&#8482; comes with Perl. For Microsoft&reg; Windows&reg;, we use either 
+  ActivePerl (<a href="http://www.activeperl.com/">http://www.activeperl.com/</a>) or Indigo Perl 
+  (<a href="http://www.indigostar.com/">http://www.indigostar.com/</a>). You also 
+  have to set the string substitution variable named &#8220;dsfPerlExecutable&#8221; 
+  to the complete path to your Perl interpreter. (For example, ours was C:\perl\bin\perl.exe) 
+  To set a string substitution variable, use the Windows &gt; Preferences &gt; 
+  Run/Debug &gt; String Substitution preferences page.<br>
+</p>
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/counter.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/counter.pda
new file mode 100644
index 0000000..9b2b731
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/counter.pda
@@ -0,0 +1,11 @@
+push 0
+:main
+var n
+pop $n
+push $n
+push 1
+add
+dup
+push $n
+output
+branch_not_zero main
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/drop.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/drop.pda
new file mode 100644
index 0000000..84f60fe
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/drop.pda
@@ -0,0 +1,12 @@
+call one
+:one
+call two
+:two
+call three
+:three
+call four
+:four
+push DONE
+output
+
+
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/example.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/example.pda
new file mode 100644
index 0000000..a958863
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/example.pda
@@ -0,0 +1,35 @@
+push "hello"
+output
+call foobar
+push 3
+:label
+dup
+push 4
+push 5
+add
+add
+output
+dec
+dup
+branch_not_zero label
+call foobar
+push "end"
+output
+halt
+:foobar
+var a
+var b
+call barfoo
+push "first"
+push "second"
+pop $a
+pop $b
+push $a
+push $b
+output
+output
+return
+:barfoo
+push "barfoo"
+output
+return
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/fibonacci.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/fibonacci.pda
new file mode 100644
index 0000000..e39595a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/fibonacci.pda
@@ -0,0 +1,32 @@
+push 6
+call fibonacci
+output
+halt
+#
+# f(n) = f(n-1) + f(n-2)
+# f(0) = 1
+# f(1) = 1
+#
+:fibonacci
+var n
+pop $n
+push $n
+branch_not_zero gt0
+push 1
+return
+:gt0
+push $n
+dec
+branch_not_zero gt1
+push 1
+return
+:gt1
+push $n
+dec
+call fibonacci
+push $n
+dec
+dec
+call fibonacci
+add
+return
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/registers.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/registers.pda
new file mode 100644
index 0000000..97fd8d4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/registers.pda
@@ -0,0 +1,72 @@
+def register $pc General true
+def register $sp General true
+def register $status General true
+def bitfield $status.BITS_00_07 0 8
+def bitfield $status.BITS_08_15 8 8
+def bitfield $status.BITS_16_23 16 8
+def bitfield $status.BITS_24_31 24 8
+def mnemonic $status.BITS_24_31 three 3 
+def mnemonic $status.BITS_24_31 twelve 12 
+def mnemonic $status.BITS_24_31 fourty_eight 48 
+def mnemonic $status.BITS_24_31 one_nighty_two 192 
+def register $stackdepth General true
+def register $stack[0] General true
+def register $stack[1] General true
+def register $stack[2] General true
+def register $stack[3] General true
+def register $stack[4] General true
+push 103
+pop $$pc
+push 306
+push 2
+pop $$sp
+push 400
+pop $$status
+push 5
+pop $$stackdepth
+push 12
+pop $$stack[0]
+push 45
+pop $$stack[1]
+push 146
+pop $$stack[2]
+push 215
+pop $$stack[3]
+push 251
+pop $$stack[4]
+push 306
+pop $$stack[5]
+def register $total-instructions Analysis false
+def register $add-instructions Analysis false
+def register $call-instructions Analysis false
+def register $dec-instructions Analysis false
+def register $dup-instructions Analysis false
+def register $halt-instructions Analysis false
+def register $output-instructions Analysis false
+def register $pop-instructions Analysis false
+def register $push-instructions Analysis false
+def register $return-instructions Analysis false
+def register $var-instructions Analysis false
+push 1046
+pop $$total-instructions
+push 12
+pop $$add-instructions
+push 24
+pop $$call-instructions
+push 36
+pop $$dec-instructions
+push 50
+pop $$dup-instructions
+push 62
+pop $$halt-instructions
+push 74
+pop $$output-instructions
+push 106
+pop $$pop-instructions
+push 120
+pop $$push-instructions
+push 132
+pop $$return-instructions
+push 144
+pop $$var-instructions
+halt
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/stack.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/stack.pda
new file mode 100644
index 0000000..c7fa162
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/stack.pda
@@ -0,0 +1,21 @@
+push 5
+:thread_create
+exec stack
+dec 
+dup
+branch_not_zero thread_create
+push finished
+output 
+halt
+:stack
+push 100
+:inner
+dup
+output
+dup
+branch_not_zero descend
+return
+:descend
+dec
+call inner 
+return
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/structures.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/structures.pda
new file mode 100644
index 0000000..b6f7cbf
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/structures.pda
@@ -0,0 +1,23 @@
+push one two three
+push 1 2 3
+push I II III
+var x
+var x.a
+var x.b
+var y
+var y.c
+var y.d
+var y.d.1
+var y.d.2
+var y.d.3
+pop $x
+pop $x.a
+pop $x.b
+pop $y
+pop $y.c
+pop $y.d
+pop $y.d.1
+pop $y.d.2
+pop $y.d.3
+push Done
+output
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/threads.pda b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/threads.pda
new file mode 100644
index 0000000..336a251
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/samples/threads.pda
@@ -0,0 +1,23 @@
+push 5
+:thread_create
+exec foo
+dec 
+dup
+branch_not_zero thread_create
+push finished
+output 
+halt
+:foo
+push thread_created
+output
+call inner
+halt
+:inner
+var b
+call inner2
+push 2
+return
+:inner2
+var c
+push 3
+return
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/PDAPlugin.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/PDAPlugin.java
new file mode 100644
index 0000000..39e0565
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/PDAPlugin.java
@@ -0,0 +1,212 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.RejectedExecutionException;
+
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.Query;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.examples.dsf.pda.launch.PDALaunch;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class PDAPlugin extends Plugin {
+    
+    public static String PLUGIN_ID = "org.eclipse.cdt.examples.dsf.pda"; 
+    
+    // Debugging flag
+    public static boolean DEBUG = false;
+
+	//The shared instance.
+	private static PDAPlugin plugin;
+	
+	//Resource bundle.
+	private ResourceBundle resourceBundle;
+
+	// Bundle context used in registering and retrieving DSF (OSGi) services.
+	private static BundleContext fContext;
+	
+	/**
+	 * Unique identifier for the PDA debug model (value 
+	 * <code>pda.debugModel</code>).
+	 */
+	public static final String ID_PDA_DEBUG_MODEL = "org.eclipse.cdt.examples.dsf.pda.debugModel";
+	
+	/**
+	 * Name of the string substitution variable that resolves to the
+	 * location of a local Perl executable (value <code>perlExecutable</code>).
+	 */
+	public static final String VARIALBE_PERL_EXECUTABLE = "dsfPerlExecutable";
+
+	/**
+	 * Launch configuration attribute key. Value is a path to a perl
+	 * program. The path is a string representing a full path
+	 * to a perl program in the workspace. 
+	 */
+	public static final String ATTR_PDA_PROGRAM = ID_PDA_DEBUG_MODEL + ".ATTR_PDA_PROGRAM";
+	
+	/**
+	 * Identifier for the PDA launch configuration type
+	 * (value <code>pda.launchType</code>)
+	 */
+	public static final String ID_PDA_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.cdt.examples.dsf.pda.launchType";	
+	
+	/**
+	 * The constructor.
+	 */
+	public PDAPlugin() {
+		super();
+		plugin = this;
+	}
+
+	/**
+	 * This method is called upon plug-in activation
+	 */
+	@Override
+    public void start(BundleContext context) throws Exception {
+        fContext = context;
+        DEBUG = "true".equals(Platform.getDebugOption(PLUGIN_ID + "/debug"));  //$NON-NLS-1$//$NON-NLS-2$
+		super.start(context);
+	}
+
+	/**
+	 * This method is called when the plug-in is stopped
+	 */
+    @Override
+	public void stop(BundleContext context) throws Exception {
+        shutdownActiveLaunches();
+		super.stop(context);
+		plugin = null;
+		resourceBundle = null;
+		fContext = context;
+	}
+
+	/**
+	 * Returns the shared instance.
+	 */
+	public static PDAPlugin getDefault() {
+		return plugin;
+	}
+
+	/**
+	 * Returns the string from the plugin's resource bundle,
+	 * or 'key' if not found.
+	 */
+	public static String getResourceString(String key) {
+		ResourceBundle bundle = PDAPlugin.getDefault().getResourceBundle();
+		try {
+			return (bundle != null) ? bundle.getString(key) : key;
+		} catch (MissingResourceException e) {
+			return key;
+		}
+	}
+
+	/**
+	 * Returns the plugin's resource bundle,
+	 */
+	public ResourceBundle getResourceBundle() {
+		try {
+			if (resourceBundle == null)
+				resourceBundle = ResourceBundle.getBundle("org.eclipse.debug.examples.core.pda.DebugCorePluginResources");
+		} catch (MissingResourceException x) {
+			resourceBundle = null;
+		}
+		return resourceBundle;
+	}
+	
+	public static BundleContext getBundleContext() {
+	    return fContext;
+	}
+	
+	/**
+	 * Return a <code>java.io.File</code> object that corresponds to the specified
+	 * <code>IPath</code> in the plugin directory, or <code>null</code> if none.
+	 */
+	public static File getFileInPlugin(IPath path) {
+		try {
+			URL installURL =
+				new URL(getDefault().getDescriptor().getInstallURL(), path.toString());
+			URL localURL = Platform.asLocalURL(installURL);
+			return new File(localURL.getFile());
+		} catch (IOException ioe) {
+			return null;
+		}
+	}	
+	
+	/** 
+	 * Shuts down any active launches.  We must shutdown any active sessions 
+	 * and services associated with this plugin before this plugin is stopped.
+	 * Any attempts to use the plugins {@link BundleContext} after the plugin
+	 * is shut down will result in exceptions. 
+	 */
+	private void shutdownActiveLaunches() {
+	    for (ILaunch launch : DebugPlugin.getDefault().getLaunchManager().getLaunches()) {
+	        if (launch instanceof PDALaunch && !((PDALaunch)launch).isShutDown()) {
+	            final PDALaunch pdaLaunch = (PDALaunch)launch;
+	            
+	            Query<Object> launchShutdownQuery = new Query<Object>() {
+	                @Override
+	                protected void execute(DataRequestMonitor<Object> rm) {
+	                    pdaLaunch.shutdownServices(rm);
+	                }
+	            };
+	            
+	            try {
+	                pdaLaunch.getSession().getExecutor().execute(launchShutdownQuery);
+	            } catch (RejectedExecutionException e) {
+	                // We can get this exception if the session is shutdown concurrently
+	                // to this method running.
+	                break;
+	            }
+
+	            // The Query.get() method is a synchronous call which blocks until the 
+	            // query completes.  
+	            try {
+                    launchShutdownQuery.get();
+                } catch (InterruptedException e) { 
+                    getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, "InterruptedException while shutting down PDA debugger launch " + pdaLaunch, e.getCause()));
+                } catch (ExecutionException e) {
+                    getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, "Exception while shutting down PDA debugger launch " + pdaLaunch, e.getCause()));
+                }
+	        }
+	    }
+	}
+	
+    
+    public static void failRequest(RequestMonitor rm, int code, String message) {
+        rm.setStatus(new Status(IStatus.ERROR, PLUGIN_ID, code, message, null));
+        rm.done();
+    }
+    
+    public static void debug(String debugString) {
+        if (DEBUG) {
+            System.out.println(debugString);
+        }
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/breakpoints/PDALineBreakpoint.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/breakpoints/PDALineBreakpoint.java
new file mode 100644
index 0000000..9f8742f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/breakpoints/PDALineBreakpoint.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.breakpoints;
+
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.LineBreakpoint;
+
+
+/**
+ * PDA line breakpoint
+ * <p>
+ * This class is identical to the corresponding in PDA debugger implemented in 
+ * org.eclipse.debug.examples.
+ * </p>
+ */
+public class PDALineBreakpoint extends LineBreakpoint {
+	
+	/**
+	 * Default constructor is required for the breakpoint manager
+	 * to re-create persisted breakpoints. After instantiating a breakpoint,
+	 * the <code>setMarker(...)</code> method is called to restore
+	 * this breakpoint's attributes.
+	 */
+	public PDALineBreakpoint() {
+	}
+	
+	/**
+	 * Constructs a line breakpoint on the given resource at the given
+	 * line number. The line number is 1-based (i.e. the first line of a
+	 * file is line number 1). The PDA VM uses 0-based line numbers,
+	 * so this line number translation is done at breakpoint install time.
+	 * 
+	 * @param resource file on which to set the breakpoint
+	 * @param lineNumber 1-based line number of the breakpoint
+	 * @throws CoreException if unable to create the breakpoint
+	 */
+	public PDALineBreakpoint(final IResource resource, final int lineNumber) throws CoreException {
+		IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+			public void run(IProgressMonitor monitor) throws CoreException {
+				IMarker marker = resource.createMarker("org.eclipse.cdt.examples.dsf.pda.markerType.lineBreakpoint");
+				setMarker(marker);
+				marker.setAttribute(IBreakpoint.ENABLED, Boolean.TRUE);
+				marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
+				marker.setAttribute(IBreakpoint.ID, getModelIdentifier());
+				marker.setAttribute(IMarker.MESSAGE, "Line Breakpoint: " + resource.getName() + " [line: " + lineNumber + "]");
+			}
+		};
+		run(getMarkerRule(resource), runnable);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IBreakpoint#getModelIdentifier()
+	 */
+	public String getModelIdentifier() {
+		return PDAPlugin.ID_PDA_DEBUG_MODEL;
+	}
+	
+	/**
+	 * Returns whether this breakpoint is a run-to-line breakpoint
+	 * 
+	 * @return whether this breakpoint is a run-to-line breakpoint
+	 */
+	public boolean isRunToLineBreakpoint() {
+		return false;
+	}
+    
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/breakpoints/PDAWatchpoint.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/breakpoints/PDAWatchpoint.java
new file mode 100644
index 0000000..8752066
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/breakpoints/PDAWatchpoint.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.breakpoints;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.IWatchpoint;
+
+
+/**
+ * A watchpoint.
+ * <p>
+ * This class is identical to the corresponding in PDA debugger implemented in 
+ * org.eclipse.debug.examples.
+ * </p>
+ */
+public class PDAWatchpoint extends PDALineBreakpoint implements IWatchpoint {
+    
+    // 'read' or 'write' depending on what caused the last suspend for this watchpoint
+    private String fLastSuspendType;
+    
+    // marker attributes
+    public static final String ACCESS = "ACCESS";
+    public static final String MODIFICATION = "MODIFICATION";
+    public static final String FUNCTION_NAME = "FUNCTION_NAME";
+    public static final String VAR_NAME = "VAR_NAME";
+
+	/**
+	 * Default constructor is required for the breakpoint manager
+	 * to re-create persisted breakpoints. After instantiating a breakpoint,
+	 * the <code>setMarker(...)</code> method is called to restore
+	 * this breakpoint's attributes.
+	 */
+    public PDAWatchpoint() {
+	}
+	/**
+	 * Constructs a line breakpoint on the given resource at the given
+	 * line number. The line number is 1-based (i.e. the first line of a
+	 * file is line number 1). The PDA VM uses 0-based line numbers,
+	 * so this line number translation is done at breakpoint install time.
+	 * 
+	 * @param resource file on which to set the breakpoint
+	 * @param lineNumber 1-based line number of the breakpoint
+	 * @param functionName function name the variable is defined in
+	 * @param varName variable name that watchpoint is set on
+	 * @param access whether this is an access watchpoint
+	 * @param modification whether this in a modification watchpoint
+	 * @throws CoreException if unable to create the watchpoint
+	 */
+	public PDAWatchpoint(final IResource resource, final int lineNumber, final String functionName, final String varName, final boolean access, final boolean modification) throws CoreException {
+		IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+			public void run(IProgressMonitor monitor) throws CoreException {
+				IMarker marker = resource.createMarker("org.eclipse.cdt.examples.dsf.pda.markerType.watchpoint");
+				setMarker(marker);
+				setEnabled(true);
+				ensureMarker().setAttribute(IMarker.LINE_NUMBER, lineNumber);
+				ensureMarker().setAttribute(IBreakpoint.ID, getModelIdentifier());
+				setAccess(access);
+				setModification(modification);
+				setVariable(functionName, varName);
+				marker.setAttribute(IMarker.MESSAGE, "Watchpoint: " + resource.getName() + " [line: " + lineNumber + "]");
+			}
+		};
+		run(getMarkerRule(resource), runnable);
+	}    
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.core.model.IWatchpoint#isAccess()
+     */
+    public boolean isAccess() throws CoreException {
+        return getMarker().getAttribute(ACCESS, true);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.core.model.IWatchpoint#setAccess(boolean)
+     */
+    public void setAccess(boolean access) throws CoreException {
+        setAttribute(ACCESS, access);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.core.model.IWatchpoint#isModification()
+     */
+    public boolean isModification() throws CoreException {
+        return getMarker().getAttribute(MODIFICATION, true);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.core.model.IWatchpoint#setModification(boolean)
+     */
+    public void setModification(boolean modification) throws CoreException {
+        setAttribute(MODIFICATION, modification); 
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.core.model.IWatchpoint#supportsAccess()
+     */
+    public boolean supportsAccess() {
+        return true;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.core.model.IWatchpoint#supportsModification()
+     */
+    public boolean supportsModification() {
+        return true;
+    }
+    
+    /**
+     * Sets the variable and function names the watchpoint is set on.
+     * 
+     * @param functionName function name
+     * @param variableName variable name
+     * @throws CoreException if an exception occurrs setting marker attribtues
+     */
+    protected void setVariable(String functionName, String variableName) throws CoreException {
+        setAttribute(VAR_NAME, variableName);
+        setAttribute(FUNCTION_NAME, functionName);
+    }
+    
+    /**
+     * Returns the name of the variable this watchpoint is set on.
+     * 
+     * @return the name of the variable this watchpoint is set on
+     * @throws CoreException if unable to access the attribute
+     */
+    public String getVariableName() throws CoreException {
+        return getMarker().getAttribute(VAR_NAME, (String)null);
+    }
+
+    /**
+     * Returns the name of the function the variable associted with this watchpoint is defined in.
+     * 
+     * @return the name of the function the variable associted with this watchpoint is defined in
+     * @throws CoreException if unable to access the attribute
+     */
+    public String getFunctionName() throws CoreException {
+        return getMarker().getAttribute(FUNCTION_NAME, (String)null);
+    }    
+    
+    /**
+     * Sets the type of event that causes the last suspend event.
+     * 
+     * @param description one of 'read' or 'write'
+     */
+    public void setSuspendType(String description) {
+        fLastSuspendType = description;
+    }
+    
+    /**
+     * Returns the type of event that caused the last suspend.
+     * 
+     * @return 'read', 'write', or <code>null</code> if undefined
+     */
+    public String getSuspendType() {
+        return fLastSuspendType;
+    }
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDALaunch.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDALaunch.java
new file mode 100644
index 0000000..87ff4b8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDALaunch.java
@@ -0,0 +1,258 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.launch;
+
+import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.Sequence;
+import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.cdt.examples.dsf.pda.service.PDATerminatedEvent;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.Launch;
+import org.eclipse.debug.core.model.ISourceLocator;
+import org.eclipse.debug.core.model.ITerminate;
+
+/**
+ * The PDA launch object. In general, a DSF-based debugger has to override 
+ * the base launch class in order to supply its own content providers for the 
+ * debug view.  Additionally, the PDA launch is used to monitor the state of the
+ * PDA debugger and to shutdown the DSF services and session belonging to the 
+ * launch.
+ * <p>
+ * The PDA launch class mostly contains methods and fields that can be accessed
+ * on any thread.  However, some fields and methods used for managing the DSF
+ * session need to be synchronized using the DSF executor.
+ * </p>
+ */
+ at ThreadSafe
+public class PDALaunch extends Launch
+implements ITerminate
+{   
+    // DSF executor and session.  Both are created and shutdown by the launch. 
+    private final DefaultDsfExecutor fExecutor;
+    private final DsfSession fSession;
+
+    // Objects used to track the status of the DSF session.
+    private boolean fInitialized = false;
+    private boolean fShutDown = false;
+    
+    @ConfinedToDsfExecutor("getSession().getExecutor()")
+    private Sequence fInitializationSequence = null;
+
+    /**
+     * Launch constructor creates the launch for given parameters.  The
+     * constructor also creates a DSF session and an executor, so that 
+     * {@link #getSession()} returns a valid value, however no services 
+     * are initialized yet. 
+     * 
+     * @see Launch
+     */
+    public PDALaunch(ILaunchConfiguration launchConfiguration, String mode, ISourceLocator locator) {
+        super(launchConfiguration, mode, locator);
+
+        // Create the dispatch queue to be used by debugger control and services 
+        // that belong to this launch
+        final DefaultDsfExecutor dsfExecutor = new DefaultDsfExecutor(PDAPlugin.ID_PDA_DEBUG_MODEL);
+        dsfExecutor.prestartCoreThread();
+        fExecutor = dsfExecutor;
+        fSession = DsfSession.startSession(fExecutor, PDAPlugin.ID_PDA_DEBUG_MODEL);
+    }
+
+    /**
+     * Returns the DSF services session that belongs to this launch.  This 
+     * method will always return a DsfSession object, however if the debugger 
+     * is shut down, the session will no longer active.
+     */
+    public DsfSession getSession() { return fSession; }
+
+    /**
+     * Initializes the DSF services using the specified parameters.  This 
+     * method has to be called on the executor thread in order to avoid 
+     * synchronization issues.  
+     */
+    @ConfinedToDsfExecutor("getSession().getExecutor()")
+    public void initializeServices(String program, final RequestMonitor rm)
+    {
+        // Double-check that we're being called in the correct thread.
+        assert fExecutor.isInExecutorThread();
+
+        // Check if shutdownServices() was called already, which would be 
+        // highly unusual, but if so we don't need to do anything except set 
+        // the initialized flag.
+        synchronized(this) {
+            if (fShutDown) {
+                fInitialized = true;
+                return;
+            }
+        }
+
+        // Register the launch as listener for services events.
+        fSession.addServiceEventListener(PDALaunch.this, null);
+
+        // The initialization sequence is stored in a field to allow it to be 
+        // canceled if shutdownServices() is called before the sequence 
+        // completes.
+        fInitializationSequence = new PDAServicesInitSequence(
+            getSession(), this, program, 
+            new RequestMonitor(ImmediateExecutor.getInstance(), rm) {
+                @Override
+                protected void handleCompleted() {
+                    // Set the initialized flag and check whether the 
+                    // shutdown flag is set.  Access the flags in a 
+                    // synchronized section as these flags can be accessed
+                    // on any thread.
+                    boolean doShutdown = false;
+                    synchronized (this) { 
+                        fInitialized = true;
+                        fInitializationSequence = null;
+                        if (fShutDown) {
+                            doShutdown = true;
+                        }
+                    }
+
+                    if (doShutdown) {
+                        // If shutdownServices() was already called, start the 
+                        // shutdown sequence now.
+                        doShutdown(rm);
+                    } else {
+                        // If there was an error in the startup sequence, 
+                        // report the error to the client.
+                        if (getStatus().getSeverity() == IStatus.ERROR) {
+                            rm.setStatus(getStatus());
+                        }
+                        rm.done();
+                    }
+                    fireChanged();
+                }
+            });
+
+        // Finally, execute the sequence. 
+        getSession().getExecutor().execute(fInitializationSequence);
+    }
+
+    /**
+     * Event handler for a debugger terminated event.    
+     */
+    @DsfServiceEventHandler 
+    public void eventDispatched(PDATerminatedEvent event) {
+        shutdownServices(new RequestMonitor(ImmediateExecutor.getInstance(), null));
+    }
+
+    /**
+     * Returns whether the DSF service initialization sequence has completed yet.
+     */
+    public synchronized boolean isInitialized() {
+        return fInitialized;
+    }
+
+    /**
+     * Returns whether the DSF services have been set to shut down.
+     * @return
+     */
+    public synchronized boolean isShutDown() {
+        return fShutDown;
+    }
+
+    @Override
+    public boolean canTerminate() {
+        return super.canTerminate() && isInitialized() && !isShutDown();
+    }
+
+    @Override
+    public boolean isTerminated() {
+        return super.isTerminated() || isShutDown();
+    }
+
+
+    @Override
+    public void terminate() throws DebugException {
+        if (isShutDown()) return;
+        super.terminate();
+    }
+
+    /**
+     * Shuts down the services, the session and the executor associated with 
+     * this launch.  
+     * <p>
+     * Note: The argument request monitor to this method should NOT use the
+     * executor that belongs to this launch.  By the time the shutdown is 
+     * complete, this executor will not be dispatching anymore and the 
+     * request monitor will never be invoked.  Instead callers should use
+     * the {@link ImmediateExecutor}.
+     * </p>
+     * @param rm The request monitor invoked when the shutdown is complete.    
+     */
+    @ConfinedToDsfExecutor("getSession().getExecutor()")
+    public void shutdownServices(final RequestMonitor rm) {
+        // Check initialize and shutdown flags to determine if the shutdown
+        // sequence can be called yet.
+        boolean doShutdown = false;
+        synchronized (this) {
+            if (!fInitialized && fInitializationSequence != null) {
+                // Launch has not yet initialized, try to cancel the 
+                // shutdown sequence.
+                fInitializationSequence.cancel(false);
+            } else {
+                doShutdown = !fShutDown && fInitialized;
+            }
+            fShutDown = true;
+        }
+
+        if (doShutdown) {
+            doShutdown(rm);
+        } else {
+            rm.done();
+        }
+    }
+
+    @ConfinedToDsfExecutor("getSession().getExecutor()")
+    private void doShutdown(final RequestMonitor rm) {
+        fExecutor.execute( new PDAServicesShutdownSequence(
+            fExecutor, fSession.getId(),
+            new RequestMonitor(fSession.getExecutor(), rm) { 
+                @Override
+                public void handleCompleted() {
+                    fSession.removeServiceEventListener(PDALaunch.this);
+                    if (!isSuccess()) {
+                        PDAPlugin.getDefault().getLog().log(new MultiStatus(
+                            PDAPlugin.PLUGIN_ID, -1, new IStatus[]{getStatus()}, "Session shutdown failed", null)); //$NON-NLS-1$
+                    }
+                    // Last order of business, shutdown the dispatch queue.
+                    DsfSession.endSession(fSession);
+                    // endSession takes a full dispatch to distribute the 
+                    // session-ended event, finish step only after the dispatch.
+                    fExecutor.shutdown();
+                    fireTerminate();
+
+                    rm.setStatus(getStatus());
+                    rm.done();
+                }
+            }) );
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public Object getAdapter(Class adapter) {
+        // Force adapters to be loaded.  Otherwise the adapter manager may not find
+        // the model proxy adapter for DSF-based debug elements.
+        Platform.getAdapterManager().loadAdapter(this, adapter.getName());
+        return super.getAdapter(adapter);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDALaunchDelegate.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDALaunchDelegate.java
new file mode 100644
index 0000000..709cc57
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDALaunchDelegate.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.launch;
+
+import java.util.concurrent.ExecutionException;
+
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
+import org.eclipse.cdt.dsf.concurrent.Query;
+import org.eclipse.cdt.dsf.service.DsfServicesTracker;
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.cdt.examples.dsf.pda.service.PDABackend;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.model.IPersistableSourceLocator;
+import org.eclipse.debug.core.model.ISourceLocator;
+import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
+import org.eclipse.debug.core.sourcelookup.IPersistableSourceLocator2;
+
+
+/**
+ * Launches PDA program on a PDA interpretter written in Perl 
+ */
+public class PDALaunchDelegate extends LaunchConfigurationDelegate {
+
+    @Override
+    public ILaunch getLaunch(ILaunchConfiguration configuration, String mode) throws CoreException {
+        // Need to configure the source locator before creating the launch
+        // because once the launch is created and added to launch manager, 
+        // the adapters will be created for the whole session, including 
+        // the source lookup adapter.
+        ISourceLocator locator = getSourceLocator(configuration);
+
+        return new PDALaunch(configuration, mode, locator);
+    }
+
+    @Override
+    public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
+        // PDA programs do not require building.
+        return false;
+    }
+
+    /**
+     * Returns a source locator created based on the attributes in the launch configuration.
+     */
+    private ISourceLocator getSourceLocator(ILaunchConfiguration configuration) throws CoreException {
+        String type = configuration.getAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, (String)null);
+        if (type == null) {
+            type = configuration.getType().getSourceLocatorId();
+        }
+        if (type != null) {
+            IPersistableSourceLocator locator = DebugPlugin.getDefault().getLaunchManager().newSourceLocator(type);
+            String memento = configuration.getAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, (String)null);
+            if (memento == null) {
+                locator.initializeDefaults(configuration);
+            } else {
+                if(locator instanceof IPersistableSourceLocator2)
+                    ((IPersistableSourceLocator2)locator).initializeFromMemento(memento, configuration);
+                else
+                    locator.initializeFromMemento(memento);
+            }
+            return locator;
+        }
+        return null;
+    }
+
+    public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
+        String program = configuration.getAttribute(PDAPlugin.ATTR_PDA_PROGRAM, (String)null);
+        if (program == null) {
+            abort("Perl program unspecified.", null);
+        }
+
+        PDALaunch pdaLaunch = (PDALaunch)launch; 
+        initServices(pdaLaunch, program);
+        createProcess(pdaLaunch);
+    }
+    
+    /**
+     * Calls the launch to initialize DSF services for this launch.
+     */
+    private void initServices(final PDALaunch pdaLaunch, final String program) 
+    throws CoreException 
+    {
+        // Synchronization object to use when waiting for the services initialization.
+        Query<Object> initQuery = new Query<Object>() {
+            @Override
+            protected void execute(DataRequestMonitor<Object> rm) {
+                pdaLaunch.initializeServices(program, rm);
+            }
+        };
+
+        // Submit the query to the executor.
+        pdaLaunch.getSession().getExecutor().execute(initQuery);
+        try {
+            // Block waiting for query results.
+            initQuery.get();
+        } catch (InterruptedException e1) {
+            throw new DebugException(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, DebugException.INTERNAL_ERROR, "Interrupted Exception in dispatch thread", e1)); //$NON-NLS-1$
+        } catch (ExecutionException e1) {
+            throw new DebugException(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, DebugException.REQUEST_FAILED, "Error in launch sequence", e1.getCause())); //$NON-NLS-1$
+        }
+    }
+
+    private void createProcess(final PDALaunch pdaLaunch) throws CoreException {
+        // Synchronization object to use when waiting for the services initialization.
+        Query<Object[]> initQuery = new Query<Object[]>() {
+            @Override
+            protected void execute(DataRequestMonitor<Object[]> rm) {
+                DsfServicesTracker tracker = new DsfServicesTracker(PDAPlugin.getBundleContext(), pdaLaunch.getSession().getId());
+                PDABackend backend = tracker.getService(PDABackend.class);
+                if (backend == null) {
+                    PDAPlugin.failRequest(rm, IDsfStatusConstants.INVALID_STATE, "PDA Backend service not available");
+                    return;
+                }
+                Object[] retVal = new Object[] { backend.getProcess(), backend.getProcessName() };
+                rm.setData(retVal);
+                rm.done();
+            }
+        };
+
+        // Submit the query to the executor.
+        pdaLaunch.getSession().getExecutor().execute(initQuery);
+        try {
+            // Block waiting for query results.
+            Object[] processData = initQuery.get();
+            DebugPlugin.newProcess(pdaLaunch, (Process)processData[0], (String)processData[1]);
+        } catch (InterruptedException e1) {
+            throw new DebugException(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, DebugException.INTERNAL_ERROR, "Interrupted Exception in dispatch thread", e1)); //$NON-NLS-1$
+        } catch (ExecutionException e1) {
+            throw new DebugException(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, DebugException.REQUEST_FAILED, "Error in launch sequence", e1.getCause())); //$NON-NLS-1$
+        }
+    }
+    
+    /**
+     * Throws an exception with a new status containing the given
+     * message and optional exception.
+     * 
+     * @param message error message
+     * @param e underlying exception
+     * @throws CoreException
+     */
+    private void abort(String message, Throwable e) throws CoreException {
+        throw new CoreException(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, 0, message, e));
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesInitSequence.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesInitSequence.java
new file mode 100644
index 0000000..d993cf5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesInitSequence.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.launch;
+
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.Sequence;
+import org.eclipse.cdt.dsf.debug.service.BreakpointsMediator;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.examples.dsf.pda.service.PDABackend;
+import org.eclipse.cdt.examples.dsf.pda.service.PDABreakpointAttributeTranslator;
+import org.eclipse.cdt.examples.dsf.pda.service.PDABreakpoints;
+import org.eclipse.cdt.examples.dsf.pda.service.PDACommandControl;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAExpressions;
+import org.eclipse.cdt.examples.dsf.pda.service.PDARegisters;
+import org.eclipse.cdt.examples.dsf.pda.service.PDARunControl;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAStack;
+
+/**
+ * The initialization sequence for PDA debugger services.  This sequence contains
+ * the series of steps that are executed to properly initialize the PDA-DSF debug
+ * session.  If any of the individual steps fail, the initialization will abort.   
+ * <p>
+ * The order in which services are initialized is important.  Some services depend
+ * on other services and they assume that they will be initialized only if those
+ * services are active.  Also the service events are prioritized and their priority
+ * depends on the order in which the services were initialized.
+ * </p>
+ */
+public class PDAServicesInitSequence extends Sequence {
+
+    Step[] fSteps = new Step[] {
+        new Step() 
+        { 
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                // Start PDA back end debugger service.
+                new PDABackend(fSession, fLaunch, fProgram).initialize(requestMonitor);
+            }
+        },
+        new Step() 
+        { 
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                // Start PDA command control service.
+                fCommandControl = new PDACommandControl(fSession);
+                fCommandControl.initialize(requestMonitor);
+            }
+        },
+        new Step() { 
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                // Start the run control service.
+                fRunControl = new PDARunControl(fSession);
+                fRunControl.initialize(requestMonitor);
+            }
+        },
+        new Step() { 
+            @Override
+            public void execute(final RequestMonitor requestMonitor) {
+                // Start the low-level breakpoint service 
+                new PDABreakpoints(fSession).initialize(new RequestMonitor(getExecutor(), requestMonitor));
+            }
+        },
+        new Step() { 
+            @Override
+            public void execute(final RequestMonitor requestMonitor) {
+                // Create the breakpoint mediator and start tracking PDA breakpoints.
+
+                final BreakpointsMediator bpmService = new BreakpointsMediator(
+                    fSession, new PDABreakpointAttributeTranslator());
+                bpmService.initialize(new RequestMonitor(getExecutor(), requestMonitor) {
+                    @Override
+                    protected void handleSuccess() {
+                        bpmService.startTrackingBreakpoints(fCommandControl.getContext(), requestMonitor);
+                    }
+                }); 
+            }
+        },
+        new Step() { 
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                // Start the stack service.
+                new PDAStack(fSession).initialize(requestMonitor);
+            }
+        },
+        new Step() { 
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                // Start the service to track expressions.
+                new PDAExpressions(fSession).initialize(requestMonitor);
+            }
+        },
+        new Step() { 
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                // Start the service to track expressions.
+                new PDARegisters(fSession).initialize(requestMonitor);
+            }
+        },
+        new Step() { 
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                fRunControl.resume(fCommandControl.getContext(), requestMonitor);
+            }
+        },
+    };
+
+    // Sequence input parameters, used in initializing services.
+    private PDALaunch  fLaunch;
+    private DsfSession fSession;
+    private String fProgram;
+
+    // Service references, initialized when created and used in initializing other services.
+    private PDACommandControl fCommandControl;
+    private PDARunControl fRunControl;
+
+    public PDAServicesInitSequence(DsfSession session, PDALaunch launch, String program, RequestMonitor rm) 
+    {
+        super(session.getExecutor(), rm);
+        fLaunch = launch;
+        fSession = session;
+        fProgram = program;
+    }
+
+    @Override
+    public Step[] getSteps() {
+        return fSteps;
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesShutdownSequence.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesShutdownSequence.java
new file mode 100644
index 0000000..aadd229
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesShutdownSequence.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.launch;
+
+import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.Sequence;
+import org.eclipse.cdt.dsf.debug.service.BreakpointsMediator;
+import org.eclipse.cdt.dsf.service.DsfServicesTracker;
+import org.eclipse.cdt.dsf.service.IDsfService;
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.cdt.examples.dsf.pda.service.PDABreakpoints;
+import org.eclipse.cdt.examples.dsf.pda.service.PDACommandControl;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAExpressions;
+import org.eclipse.cdt.examples.dsf.pda.service.PDARegisters;
+import org.eclipse.cdt.examples.dsf.pda.service.PDARunControl;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAStack;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * The shutdown sequence for PDA debugger services.  This sequence contains
+ * the series of steps that are executed to properly shutdown the PDA-DSF debug
+ * session.  If any of the individual steps fail, the shutdown will abort.
+ * <p>
+ * Services are shut down in the reverse order of initialization.
+ * </p>   
+ */
+public class PDAServicesShutdownSequence extends Sequence {
+    
+    private final Step[] fSteps = new Step[] { 
+        new Step() {
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                // Initialize services tracker.
+                assert PDAPlugin.getBundleContext() != null;
+                fTracker = new DsfServicesTracker(PDAPlugin.getBundleContext(), fSessionId);
+                requestMonitor.done();
+            }
+    
+            @Override
+            public void rollBack(RequestMonitor requestMonitor) {
+                // In case the shutdown sequence aborts, ensure that the 
+                // tracker is properly disposed.
+                fTracker.dispose();
+                fTracker = null;
+                requestMonitor.done();
+            }
+        }, 
+        new Step() {
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                shutdownService(PDAExpressions.class, requestMonitor);
+            }
+        },
+        new Step() {
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                shutdownService(PDARegisters.class, requestMonitor);
+            }
+        },
+        new Step() {
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                shutdownService(PDAStack.class, requestMonitor);
+            }
+        },
+        new Step() {
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                shutdownService(BreakpointsMediator.class, requestMonitor);
+            }
+        }, new Step() {
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                shutdownService(PDABreakpoints.class, requestMonitor);
+            }
+        },
+        new Step() {
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                shutdownService(PDARunControl.class, requestMonitor);
+            }
+        },
+        new Step() {
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                shutdownService(PDACommandControl.class, requestMonitor);
+            }
+        }, 
+        new Step() {
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                fTracker.dispose();
+                fTracker = null;
+                requestMonitor.done();
+            }
+        } 
+    };
+
+    private String fSessionId;
+    private DsfServicesTracker fTracker;
+    
+    public PDAServicesShutdownSequence(DsfExecutor executor, String sessionId, RequestMonitor requestMonitor) {
+        super(executor, requestMonitor);
+        fSessionId = sessionId;
+    }
+
+    @Override
+    public Step[] getSteps() {
+        return fSteps;
+    }
+
+    @SuppressWarnings("unchecked")
+    private void shutdownService(Class clazz, final RequestMonitor requestMonitor) {
+        IDsfService service = (IDsfService)fTracker.getService(clazz);
+        if (service != null) {
+            service.shutdown(new RequestMonitor(getExecutor(), requestMonitor) {
+                @Override
+                protected void handleCompleted() {
+                    if (!isSuccess()) {
+                        PDAPlugin.getDefault().getLog().log(getStatus());
+                    }
+                    requestMonitor.done();
+                }
+            });
+        } else {
+            requestMonitor.setStatus(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, IDsfStatusConstants.INTERNAL_ERROR,
+                "Service '" + clazz.getName() + "' not found.", null)); //$NON-NLS-1$//$NON-NLS-2$
+            requestMonitor.done();
+        }
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABackend.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABackend.java
new file mode 100644
index 0000000..87122a4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABackend.java
@@ -0,0 +1,326 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This fProgram 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
+ *
+ * Contributors:
+ *    Nokia - initial version. Sep 28, 2008
+ *******************************************************************************/
+
+package org.eclipse.cdt.examples.dsf.pda.service;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.UnknownHostException;
+import com.ibm.icu.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.Sequence;
+import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+import org.eclipse.cdt.dsf.concurrent.Sequence.Step;
+import org.eclipse.cdt.dsf.service.AbstractDsfService;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.Launch;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Service that manages the backend process: starting the process
+ * and monitoring for its shutdown.
+ */
+public class PDABackend extends AbstractDsfService {
+
+	private int fRequestPort;
+	private int fEventPort;
+
+	@ThreadSafe
+    private OutputStream fRequestOutputStream;
+    @ThreadSafe
+    private InputStream fRequestInputStream;
+    @ThreadSafe
+    private InputStream fEventInputStream;
+	
+	private String fProgram;
+	private Process fBackendProcess;
+	private String fBackendProcessName;
+	
+	/**
+	 * 
+	 * @param session
+	 * @param launch - can be null, e.g. for JUnit test.
+	 * @param program - can be a full path or a workspace resource path, must denote an existing file.
+	 */
+	public PDABackend(DsfSession session, Launch launch, String program) {
+		super(session);
+		
+		fProgram = program;
+	}
+
+	@Override
+	protected BundleContext getBundleContext() {
+        return PDAPlugin.getBundleContext();
+	}
+	
+	public Process getProcess() {
+		return fBackendProcess;
+	}
+	
+	public String getProcessName() {
+	    return fBackendProcessName;
+	}
+
+	public String getPorgramName() {
+	    return fProgram;
+	}
+	
+    @Override
+    public void initialize(final RequestMonitor rm) {
+        super.initialize(new RequestMonitor(getExecutor(), rm) {
+            @Override
+            protected void handleSuccess() {
+                doInitialize(rm);
+            }
+        });
+    }
+
+    private void doInitialize(final RequestMonitor requestMonitor) {
+
+        final Sequence.Step[] initializeSteps = new Sequence.Step[] {
+            new Step() {
+            	// Launch the back end debugger process.
+
+				@Override
+				public void execute(final RequestMonitor rm) {
+					
+					new Job("Start PDA Virtual Machine") {
+
+						@Override
+						protected IStatus run(IProgressMonitor monitor) {
+							try {
+								fBackendProcess = launchPDABackendDebugger();
+							} catch (CoreException e) {
+								rm.setStatus(e.getStatus());
+							}
+							rm.done();
+
+							return Status.OK_STATUS;
+						}
+					}.schedule();
+				}
+
+				@Override
+				public void rollBack(RequestMonitor rm) {
+					if (fBackendProcess != null)
+						fBackendProcess.destroy();
+					
+					rm.done();
+				}
+            	
+            },
+            new Step() {
+				@Override
+				public void execute(final RequestMonitor rm) {
+		            
+			        // To avoid blocking the DSF dispatch thread use a job to initialize communication sockets.  
+			        new Job("PDA Socket Initialize") {
+			            @Override
+			            protected IStatus run(IProgressMonitor monitor) {
+			                try {
+			                    // give interpreter a chance to start
+			                    try {
+			                        Thread.sleep(1000);
+			                    } catch (InterruptedException e) {
+			                    }
+			                    Socket socket = new Socket("localhost", fRequestPort);
+			                    fRequestOutputStream = socket.getOutputStream();
+			                    fRequestInputStream = socket.getInputStream();
+			                    // give interpreter a chance to open next socket
+			                    try {
+			                        Thread.sleep(1000);
+			                    } catch (InterruptedException e) {
+			                    }
+
+			                    socket = new Socket("localhost", fEventPort);
+			                    fEventInputStream = socket.getInputStream();
+
+			                } catch (UnknownHostException e) {
+			                	rm.setStatus(new Status(
+			                        IStatus.ERROR, PDAPlugin.PLUGIN_ID, REQUEST_FAILED, "Unable to connect to PDA VM", e));
+			                } catch (IOException e) {
+			                	rm.setStatus(new Status(
+			                        IStatus.ERROR, PDAPlugin.PLUGIN_ID, REQUEST_FAILED, "Unable to connect to PDA VM", e));
+			                }
+		                	rm.done();
+
+		                	return Status.OK_STATUS;
+			            }
+			        }.schedule();
+				}
+            },
+
+            new Step() {	// register the service
+				@Override
+				public void execute(RequestMonitor rm) {
+			        // Register this service
+			        register(new String[] { PDABackend.class.getName() },
+			        		 new Hashtable<String, String>());
+
+			        rm.done();
+				}
+            },
+        };
+
+        Sequence startupSequence = new Sequence(getExecutor(), requestMonitor) {
+            @Override public Step[] getSteps() { return initializeSteps; }
+        };
+        getExecutor().execute(startupSequence);
+    }
+
+    /**
+     * Returns a free port number on localhost, or -1 if unable to find a free port.
+     */
+    public static int findFreePort() {
+        ServerSocket socket= null;
+        try {
+            socket= new ServerSocket(0);
+            return socket.getLocalPort();
+        } catch (IOException e) { 
+        } finally {
+            if (socket != null) {
+                try {
+                    socket.close();
+                } catch (IOException e) {
+                }
+            }
+        }
+        return -1;		
+    }		
+
+    private void abort(String message, Throwable e) throws CoreException {
+        throw new CoreException(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, 0, message, e));
+    }
+
+    private Process launchPDABackendDebugger() throws CoreException {
+        
+    	List<String> commandList = new ArrayList<String>();
+
+        // Get Java VM path
+        String javaVMHome = System.getProperty("java.home");
+        String javaVMExec = javaVMHome + File.separatorChar + "bin" + File.separatorChar + "java";
+        if (File.separatorChar == '\\') {
+            javaVMExec += ".exe";
+        }   
+        File exe = new File(javaVMExec);
+        if (!exe.exists()) {
+            abort(MessageFormat.format("Specified java VM executable {0} does not exist.", new Object[]{javaVMExec}), null);
+        }
+        
+        fBackendProcessName = javaVMExec;
+        
+        commandList.add(javaVMExec);
+        
+        commandList.add("-cp");
+        try {
+        commandList.add(
+            File.pathSeparator + PDAPlugin.getFileInPlugin(new Path("bin")) + 
+            File.pathSeparator + new File(Platform.asLocalURL(PDAPlugin.getDefault().getDescriptor().getInstallURL()).getFile()));
+        } catch (IOException e) {
+        }
+        
+        commandList.add("org.eclipse.cdt.examples.pdavm.PDAVirtualMachine");
+
+        String absolutePath = fProgram;
+        
+        // check if fProgram is already a full path of an existing file
+        // Note if "fProgram" is workspace resource path like /ProjectName/file.pda, we should not 
+        // change it to absolute path, otherwise the breakpoints in the PDA file won't work.
+        // See PDABreakpoints.doInsertBreakpoint() for more.
+        File f = new File(fProgram);
+        if (! f.exists()) {
+        	// Try to locate it in workspace
+        	IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fProgram));
+        	if (file.exists())
+        		absolutePath = file.getLocation().toPortableString();
+        	else
+        		abort(MessageFormat.format("PDA program {0} does not exist.", new Object[] {file.getFullPath().toPortableString()}), null);
+        }
+
+        commandList.add(absolutePath);
+        
+        fRequestPort = findFreePort();
+        fEventPort = findFreePort();
+      
+        if (fRequestPort == -1 || fEventPort == -1) {
+            abort("Unable to find free port", null);
+        }
+        
+        // Add debug arguments - i.e. '-debug fRequestPort fEventPort'
+        commandList.add("-debug");
+        commandList.add("" + fRequestPort);
+        commandList.add("" + fEventPort);
+
+        // Launch the perl process.
+        String[] commandLine = commandList.toArray(new String[commandList.size()]);
+        
+        PDAPlugin.debug("Start PDA Virtual Machine:\n" + commandList);
+        
+        Process process = DebugPlugin.exec(commandLine, null);
+
+        return process;
+	}
+
+	@Override
+    public void shutdown(final RequestMonitor rm) {
+		fBackendProcess.destroy();
+
+		try {
+			if (fRequestInputStream != null)
+				fRequestInputStream.close();
+			if (fRequestOutputStream != null)
+				fRequestOutputStream.close();
+			if (fEventInputStream != null)
+				fEventInputStream.close();
+		} catch (IOException e) {
+			// ignore
+		}
+		
+        unregister();
+        rm.done();
+    }
+
+	/*
+	 * =========== Following are PDA debugger specific ====================
+	 * 
+	 *  Caller should make sure these are called after the PDABackend is initialized.
+	 */
+	public OutputStream getRequestOutputStream() {
+		return fRequestOutputStream;
+	}
+
+	public InputStream getRequestInputStream() {
+		return fRequestInputStream;
+	}
+
+	public InputStream getEventInputStream() {
+		return fEventInputStream;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABreakpointAttributeTranslator.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABreakpointAttributeTranslator.java
new file mode 100644
index 0000000..7bdb29b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABreakpointAttributeTranslator.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.cdt.dsf.debug.service.BreakpointsMediator;
+import org.eclipse.cdt.dsf.debug.service.IBreakpointAttributeTranslator;
+import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointDMContext;
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.cdt.examples.dsf.pda.breakpoints.PDALineBreakpoint;
+import org.eclipse.cdt.examples.dsf.pda.breakpoints.PDAWatchpoint;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IBreakpoint;
+
+/**
+ * Translator between {@link PDALineBreakpoint} object attributes and 
+ * attributes used by the {@link PDABreakpoints} service.  
+ * <p>
+ * The attribute translator is used by the standard {@link BreakpointsMediator} 
+ * service to map between platform breakpoint attributes and target-side DSF
+ * breakpoint attributes.  Thus, this object encapsulates the model-specific
+ * functionality of synchronizing target side and IDE-side breakpoint objects.  
+ * </p>
+ */
+public class PDABreakpointAttributeTranslator implements IBreakpointAttributeTranslator {
+
+    // Arrays of common attributes between the two breakpoint types.  These 
+    // attributes can be copied directly without translation.
+    private static final String[] fgPDALineBreakpointAttributes = {
+        IBreakpoint.ENABLED,
+        IMarker.LINE_NUMBER,
+    };
+    private static final String[] fgPDAWatchpointAttributes = {
+        IBreakpoint.ENABLED,
+        PDAWatchpoint.FUNCTION_NAME,
+        PDAWatchpoint.VAR_NAME,
+        PDAWatchpoint.ACCESS,
+        PDAWatchpoint.MODIFICATION
+    };
+
+    // PDA breakpoints translator doesn't keep any state and it doesn't 
+    // need to initialize or clean up.
+    public void initialize(BreakpointsMediator mediator) {
+    }
+
+    public void dispose() {
+    }
+
+    public List<Map<String, Object>> getBreakpointAttributes(IBreakpoint bp, boolean bpManagerEnabled) 
+    throws CoreException 
+    {
+        Map<String, Object> attrs = new HashMap<String, Object>(); 
+
+        // Check that the marker exists and retrieve its attributes.  
+        // Due to accepted race conditions, the breakpiont marker may become null 
+        // while this method is being invoked.  In this case throw an exception
+        // and let the caller handle it.
+        IMarker marker = bp.getMarker();
+        if (marker == null || !marker.exists()) {
+            throw new DebugException(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, DebugException.REQUEST_FAILED, "Breakpoint marker does not exist", null)); 
+        }
+        // Suppress cast warning: platform is still on Java 1.3
+        @SuppressWarnings("unchecked")
+        Map<String, Object> platformBpAttrs = marker.getAttributes();
+
+        // Copy breakpoint attributes.
+        if (bp instanceof PDAWatchpoint) {
+            attrs.put(PDABreakpoints.ATTR_BREAKPOINT_TYPE, PDABreakpoints.PDA_WATCHPOINT);
+
+            copyAttributes(platformBpAttrs, attrs, fgPDAWatchpointAttributes);
+        } else if (bp instanceof PDALineBreakpoint) {
+            attrs.put(PDABreakpoints.ATTR_BREAKPOINT_TYPE, PDABreakpoints.PDA_LINE_BREAKPOINT);
+            attrs.put(PDABreakpoints.ATTR_PROGRAM_PATH, marker.getResource().getFullPath().toString()); 
+
+            copyAttributes(platformBpAttrs, attrs, fgPDALineBreakpointAttributes);
+        }
+
+        // If the breakpoint manager is disabled, override the enabled attribute.
+        if (!bpManagerEnabled) {
+            attrs.put(IBreakpoint.ENABLED, false);
+        }
+
+        // The breakpoint mediator allows for multiple target-side breakpoints 
+        // to be created for each IDE breakpoint.  Although in case of PDA this 
+        // feature is never used, we still have to return a list of attributes.
+        List<Map<String, Object>> retVal = new ArrayList<Map<String, Object>>(1);
+        retVal.add(attrs);
+        return retVal;
+    }
+
+    private void copyAttributes(Map<String, Object> srcMap, Map<String, Object> destMap, String[] attrs) {
+        for (String attr : attrs) {
+            if (srcMap.containsKey(attr)) {
+                destMap.put(attr, srcMap.get(attr));
+            }
+        }
+    }
+
+    public boolean canUpdateAttributes(IBreakpointDMContext bp, Map<String, Object> delta) {
+        // PDA debugger only allows updating of the action property of the watchpoint.
+        // All other breakpoint updates will require a re-installation.
+        if (bp instanceof PDAWatchpoint) {
+            Map<String, Object> deltaCopy = new HashMap<String, Object>(delta);
+            deltaCopy.remove(PDAWatchpoint.ACCESS);
+            deltaCopy.remove(PDAWatchpoint.MODIFICATION);
+            return !deltaCopy.isEmpty();
+        }
+        return false;
+    }
+
+    public boolean supportsBreakpoint(IBreakpoint bp) {
+        return bp.getModelIdentifier().equals(PDAPlugin.ID_PDA_DEBUG_MODEL);
+    }
+
+    public void updateBreakpointStatus(IBreakpoint bp) {
+        // PDA breakpoints do not support status reporting
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABreakpoints.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABreakpoints.java
new file mode 100644
index 0000000..0b219c9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABreakpoints.java
@@ -0,0 +1,403 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Ericsson and others.
+ * 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
+ *
+ * Contributors:
+ *     Ericsson - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.examples.dsf.pda.service;
+
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.datamodel.AbstractDMContext;
+import org.eclipse.cdt.dsf.datamodel.DMContexts;
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.debug.service.IBreakpoints;
+import org.eclipse.cdt.dsf.service.AbstractDsfService;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.cdt.examples.dsf.pda.breakpoints.PDAWatchpoint;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAClearBreakpointCommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDACommandResult;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDASetBreakpointCommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAWatchCommand;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Initial breakpoint service implementation.
+ * Implements the IBreakpoints interface.
+ */
+public class PDABreakpoints extends AbstractDsfService implements IBreakpoints
+{
+    /**
+     * Context representing a PDA line breakpoint.  In PDA debugger, since there is only 
+     * one file being debugged at a time, a breakpoint is uniquely identified using the 
+     * line number only.
+     */
+    @Immutable
+    private static class BreakpointDMContext extends AbstractDMContext implements IBreakpointDMContext {
+
+        final Integer fLine;
+
+        public BreakpointDMContext(String sessionId, PDAVirtualMachineDMContext commandControlCtx, Integer line) {
+            super(sessionId, new IDMContext[] { commandControlCtx });
+            fLine = line;
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            return baseEquals(obj) && (fLine.equals(((BreakpointDMContext) obj).fLine));
+        }
+
+        @Override
+        public int hashCode() {
+            return baseHashCode() + fLine.hashCode();
+        }
+
+        @Override
+        public String toString() {
+            return baseToString() + ".breakpoint(" + fLine + ")";  //$NON-NLS-1$//$NON-NLS-2$*/
+        }
+    }
+
+    /**
+     * Context representing a watch point.  In PDA debugger, a watchpoint is 
+     * uniquely identified using the function and variable.
+     */
+    @Immutable
+    private static class WatchpointDMContext extends AbstractDMContext implements IBreakpointDMContext {
+        final String fFunction;
+        final String fVariable; 
+
+        public WatchpointDMContext(String sessionId, PDAVirtualMachineDMContext commandControlCtx, String function, 
+            String variable) 
+        {
+            super(sessionId, new IDMContext[] { commandControlCtx });
+            fFunction = function;
+            fVariable = variable;
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (baseEquals(obj)) {
+                WatchpointDMContext watchpointCtx = (WatchpointDMContext)obj;
+                return fFunction.equals(watchpointCtx.fFunction) && fVariable.equals(watchpointCtx.fVariable);
+            }
+            return false;
+        }
+
+        @Override
+        public int hashCode() {
+            return baseHashCode() + fFunction.hashCode() + fVariable.hashCode();
+        }
+
+        @Override
+        public String toString() {
+            return baseToString() + ".watchpoint(" + fFunction + "::" + fVariable + ")";
+        }
+    }
+
+    // Attribute names
+    public static final String ATTR_BREAKPOINT_TYPE = PDAPlugin.PLUGIN_ID + ".pdaBreakpointType";      //$NON-NLS-1$
+    public static final String PDA_LINE_BREAKPOINT = "breakpoint";                 //$NON-NLS-1$
+    public static final String PDA_WATCHPOINT = "watchpoint";                 //$NON-NLS-1$
+    public static final String ATTR_PROGRAM_PATH = PDAPlugin.PLUGIN_ID + ".pdaProgramPath";      //$NON-NLS-1$
+
+    // Services
+    private PDACommandControl fCommandControl;
+
+    // Breakpoints currently installed
+    private Set<IBreakpointDMContext> fBreakpoints = new HashSet<IBreakpointDMContext>();
+
+    /**
+     * The service constructor
+     * 
+     * @param session The debugging session this service belongs to.
+     */
+    public PDABreakpoints(DsfSession session) {
+        super(session);
+    }
+
+    @Override
+    public void initialize(final RequestMonitor rm) {
+        super.initialize(new RequestMonitor(getExecutor(), rm) {
+            @Override
+            protected void handleSuccess() {
+                doInitialize(rm);
+            }
+        });
+    }
+
+    private void doInitialize(final RequestMonitor rm) {
+        // Get the services references
+        fCommandControl = getServicesTracker().getService(PDACommandControl.class);
+
+        // Register this service
+        register(new String[] { IBreakpoints.class.getName(), PDABreakpoints.class.getName() },
+            new Hashtable<String, String>());
+
+        rm.done();
+    }
+
+    @Override
+    public void shutdown(final RequestMonitor rm) {
+        unregister();
+        rm.done();
+    }
+
+    @Override
+    protected BundleContext getBundleContext() {
+        return PDAPlugin.getBundleContext();
+    }
+
+    public void getBreakpoints(final IBreakpointsTargetDMContext context, final DataRequestMonitor<IBreakpointDMContext[]> rm) {
+        // Validate the context
+        if (!fCommandControl.getContext().equals(context)) {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid breakpoints target context");
+            return;
+        }
+
+        rm.setData(fBreakpoints.toArray(new IBreakpointDMContext[fBreakpoints.size()]));
+        rm.done();
+    }
+
+    public void getBreakpointDMData(IBreakpointDMContext dmc, DataRequestMonitor<IBreakpointDMData> rm) {
+        PDAPlugin.failRequest(rm, NOT_SUPPORTED, "Retrieving breakpoint data is not supported");
+    }
+
+    public void insertBreakpoint(IBreakpointsTargetDMContext context, Map<String, Object> attributes, 
+        DataRequestMonitor<IBreakpointDMContext> rm) 
+    {
+        Boolean enabled = (Boolean)attributes.get(IBreakpoint.ENABLED);
+        if (enabled != null && !enabled.booleanValue()) {
+            // If the breakpoint is disabled, just fail the request. 
+            PDAPlugin.failRequest(rm, REQUEST_FAILED, "Breakpoint is disabled");
+        } else {
+            String type = (String) attributes.get(ATTR_BREAKPOINT_TYPE);
+
+            if (PDA_LINE_BREAKPOINT.equals(type)) {
+                // Retrieve the PDA program context from the context given in the 
+                // argument.  This service is typically only called by the 
+                // breakpoints mediator, which was called with the program context
+                // in the services initialization sequence.  So checking if 
+                // programCtx != null is mostly a formality.
+                PDAVirtualMachineDMContext programCtx = DMContexts.getAncestorOfType(context, PDAVirtualMachineDMContext.class);
+                if (programCtx != null) {
+                    doInsertBreakpoint(programCtx, attributes, rm);
+                } else {
+                    PDAPlugin.failRequest(rm, INVALID_HANDLE, "Unknown breakpoint type");
+                }
+            }
+            else if (PDA_WATCHPOINT.equals(type)) {
+                doInsertWatchpoint(attributes, rm);
+            }
+            else {
+                PDAPlugin.failRequest(rm, REQUEST_FAILED, "Unknown breakpoint type");
+            }
+        }
+    }
+
+    private void doInsertBreakpoint(PDAVirtualMachineDMContext programCtx, final Map<String, Object> attributes, final DataRequestMonitor<IBreakpointDMContext> rm) 
+    {
+        // Compare the program path in the breakpoint with the path in the PDA 
+        // program context. Only insert the breakpoint if the program matches. 
+        String program = (String)attributes.get(ATTR_PROGRAM_PATH);
+        if (!programCtx.getProgram().equals(program)) {
+            PDAPlugin.failRequest(rm, REQUEST_FAILED, "Invalid file name");
+            return;
+        }
+
+        // Retrieve the line.
+        Integer line = (Integer)attributes.get(IMarker.LINE_NUMBER);
+        if (line == null) {
+            PDAPlugin.failRequest(rm, REQUEST_FAILED, "No breakpoint line specified");
+            return;
+        }
+
+        // Create a new breakpoint context object and check that it's not 
+        // installed already. PDA can only track a single breakpoint at a 
+        // given line, attempting to set the second breakpoint should fail.
+        final BreakpointDMContext breakpointCtx = 
+            new BreakpointDMContext(getSession().getId(), fCommandControl.getContext(), line);
+        if (fBreakpoints.contains(breakpointCtx)) {
+            PDAPlugin.failRequest(rm, REQUEST_FAILED, "Breakpoint already set");
+            return;
+        }
+
+        // Add the new breakpoint context to the list of known breakpoints.  
+        // Adding it here, before the set command is completed will prevent 
+        // a possibility of a second breakpoint being installed in the same 
+        // location while this breakpoint is being processed.  It will also
+        // allow the breakpoint to be removed or updated even while it is 
+        // still being processed here.
+        fBreakpoints.add(breakpointCtx);
+        fCommandControl.queueCommand(
+            new PDASetBreakpointCommand(fCommandControl.getContext(), line, false), 
+            new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
+                @Override
+                protected void handleSuccess() {
+                    rm.setData(breakpointCtx);
+                    rm.done();
+                }
+
+                @Override
+                protected void handleFailure() {
+                    // If inserting of the breakpoint failed, remove it from
+                    // the set of installed breakpoints.
+                    fBreakpoints.remove(breakpointCtx);
+                    super.handleFailure();
+                }
+            });
+    }
+
+    private void doInsertWatchpoint(final Map<String, Object> attributes, final DataRequestMonitor<IBreakpointDMContext> rm) 
+    {
+        String function = (String)attributes.get(PDAWatchpoint.FUNCTION_NAME);
+        if (function == null) {
+            PDAPlugin.failRequest(rm, REQUEST_FAILED, "No function specified");
+            return;
+        }
+
+        String variable = (String)attributes.get(PDAWatchpoint.VAR_NAME);
+        if (variable == null) {
+            PDAPlugin.failRequest(rm, REQUEST_FAILED, "No variable specified");
+            return;
+        }
+
+        Boolean isAccess = (Boolean)attributes.get(PDAWatchpoint.ACCESS);
+        isAccess = isAccess != null ? isAccess : Boolean.FALSE; 
+
+        Boolean isModification = (Boolean)attributes.get(PDAWatchpoint.MODIFICATION);
+        isModification = isModification != null ? isModification : Boolean.FALSE; 
+
+        // Create a new watchpoint context object and check that it's not 
+        // installed already. PDA can only track a single watchpoint for a given
+        // function::variable, attempting to set the second breakpoint should fail.
+        final WatchpointDMContext watchpointCtx = 
+            new WatchpointDMContext(getSession().getId(), fCommandControl.getContext(), function, variable);
+        if (fBreakpoints.contains(watchpointCtx)) {
+            PDAPlugin.failRequest(rm, REQUEST_FAILED, "Watchpoint already set");
+            return;
+        }
+
+        // Determine the watch operation to perform.
+        PDAWatchCommand.WatchOperation watchOperation = PDAWatchCommand.WatchOperation.NONE;
+        if (isAccess && isModification) {
+            watchOperation = PDAWatchCommand.WatchOperation.BOTH;
+        } else if (isAccess) {
+            watchOperation = PDAWatchCommand.WatchOperation.READ;
+        } else if (isModification) {
+            watchOperation = PDAWatchCommand.WatchOperation.WRITE;
+        }
+
+        // Add the new breakpoint context to the list of known breakpoints.  
+        // Adding it here, before the set command is completed will prevent 
+        // a possibility of a second breakpoint being installed in the same 
+        // location while this breakpoint is being processed.  It will also
+        // allow the breakpoint to be removed or updated even while it is 
+        // still being processed here.
+        fBreakpoints.add(watchpointCtx);
+        fCommandControl.queueCommand(
+            new PDAWatchCommand(fCommandControl.getContext(), function, variable, watchOperation), 
+            new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
+                @Override
+                protected void handleSuccess() {
+                    rm.setData(watchpointCtx);
+                    rm.done();
+                }
+
+                @Override
+                protected void handleFailure() {
+                    // Since the command failed, we need to remove the breakpoint from 
+                    // the existing breakpoint set.
+                    fBreakpoints.remove(watchpointCtx);
+                    super.handleFailure();
+                }
+            });
+    }
+
+    public void removeBreakpoint(IBreakpointDMContext bpCtx, RequestMonitor rm) {
+        if (!fBreakpoints.contains(bpCtx)) {
+            PDAPlugin.failRequest(rm, REQUEST_FAILED, "Breakpoint already removed");
+            return;
+        }
+
+        if (bpCtx instanceof BreakpointDMContext) {
+            doRemoveBreakpoint((BreakpointDMContext)bpCtx, rm);
+        } else if (bpCtx instanceof WatchpointDMContext) {
+            doRemoveWatchpoint((WatchpointDMContext)bpCtx, rm);
+        } else {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid breakpoint");
+        }
+    }
+
+    private void doRemoveBreakpoint(BreakpointDMContext bpCtx, RequestMonitor rm) {
+        // Remove the breakpoint from the table right away, so that even when 
+        // the remove is being processed, a new breakpoint can be created at the same 
+        // location.
+        fBreakpoints.remove(bpCtx);
+
+        fCommandControl.queueCommand(
+            new PDAClearBreakpointCommand(fCommandControl.getContext(), bpCtx.fLine), 
+            new DataRequestMonitor<PDACommandResult>(getExecutor(), rm));        
+    }
+
+    private void doRemoveWatchpoint(WatchpointDMContext bpCtx, RequestMonitor rm) {
+        fBreakpoints.remove(bpCtx);
+
+        // Watchpoints are cleared using the same command, but with a "no watch" operation
+        fCommandControl.queueCommand(
+            new PDAWatchCommand(
+                fCommandControl.getContext(), bpCtx.fFunction, bpCtx.fVariable, PDAWatchCommand.WatchOperation.NONE), 
+                new DataRequestMonitor<PDACommandResult>(getExecutor(), rm));        
+    }
+
+    public void updateBreakpoint(final IBreakpointDMContext bpCtx, Map<String, Object> attributes, final RequestMonitor rm) {
+        if (!fBreakpoints.contains(bpCtx)) {
+            PDAPlugin.failRequest(rm, REQUEST_FAILED, "Breakpoint not installed");
+            return;
+        }
+
+        if (bpCtx instanceof BreakpointDMContext) {
+            PDAPlugin.failRequest(rm, NOT_SUPPORTED, "Modifying PDA breakpoints is not supported");
+        } else if (bpCtx instanceof WatchpointDMContext) {
+            WatchpointDMContext wpCtx = (WatchpointDMContext)bpCtx;
+            if (!wpCtx.fFunction.equals(attributes.get(PDAWatchpoint.FUNCTION_NAME)) || 
+                !wpCtx.fVariable.equals(attributes.get(PDAWatchpoint.VAR_NAME)) )
+            {
+                PDAPlugin.failRequest(rm, REQUEST_FAILED, "Cannot modify watchpoint function or variable");
+                return;
+            }
+            
+            // PDA debugger can only track one watchpoint in the same location, 
+            // so we can simply remove the existing context from the set and 
+            // call insert again.  
+            fBreakpoints.remove(bpCtx);
+            doInsertWatchpoint(
+                attributes, 
+                new DataRequestMonitor<IBreakpointDMContext>(getExecutor(), rm) {
+                    @Override
+                    protected void handleSuccess() {
+                        // The inserted watchpoint context will equal the 
+                        // current context.
+                        assert bpCtx.equals(getData());
+                        rm.done();
+                    }
+                });
+        } else {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid breakpoint");
+        }
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDACommandControl.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDACommandControl.java
new file mode 100644
index 0000000..bfa653b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDACommandControl.java
@@ -0,0 +1,520 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.RejectedExecutionException;
+
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
+import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+import org.eclipse.cdt.dsf.debug.service.command.ICommand;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandControl;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandListener;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandResult;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandToken;
+import org.eclipse.cdt.dsf.debug.service.command.IEventListener;
+import org.eclipse.cdt.dsf.service.AbstractDsfService;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.AbstractPDACommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDACommandResult;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAExitCommand;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * Service that handles communication with a PDA debugger back end.  
+ */
+public class PDACommandControl extends AbstractDsfService implements ICommandControlService {
+
+    // Structure used to store command information in services internal queues.
+    private static class CommandHandle {
+        final private ICommandToken fToken;
+        final private AbstractPDACommand<PDACommandResult> fCommand;
+        final private DataRequestMonitor<PDACommandResult> fRequestMonitor;
+        
+        CommandHandle(ICommandToken token, AbstractPDACommand<PDACommandResult> c, DataRequestMonitor<PDACommandResult> rm) {
+            fToken = token;
+            fCommand = c; 
+            fRequestMonitor = rm;
+        }
+    }
+
+    private PDABackend fBackend;
+    
+    // Queue of commands waiting to be sent to the debugger.  As long as commands
+    // are in this queue, they can still be removed by clients. 
+    private final List<CommandHandle> fCommandQueue = new LinkedList<CommandHandle>();
+    
+    // Queue of commands that are being sent to the debugger.  This queue is read
+    // by the send job, so as soon as commands are inserted into this queue, they can
+    // be considered as sent.
+    @ThreadSafe
+    private final BlockingQueue<CommandHandle> fTxCommands = new LinkedBlockingQueue<CommandHandle>();
+    
+    // Flag indicating that the PDA debugger started
+    private boolean fStarted = false;
+    
+    // Flag indicating that the PDA debugger has been disconnected 
+    @ThreadSafe
+    private boolean fTerminated = false;
+    
+    //  Data Model context of this command control. 
+    private PDAVirtualMachineDMContext fDMContext;
+
+    // Synchronous listeners for commands and events.
+    private final List<ICommandListener> fCommandListeners = new ArrayList<ICommandListener>();
+    private final List<IEventListener>   fEventListeners = new ArrayList<IEventListener>();
+    
+    // Sockets for communicating with PDA debugger 
+    @ThreadSafe
+    private PrintWriter fRequestWriter;
+    @ThreadSafe
+    private BufferedReader fRequestReader;
+    @ThreadSafe
+    private BufferedReader fEventReader;
+
+    // Jobs servicing the sockets.
+    private EventDispatchJob fEventDispatchJob;
+    private CommandSendJob fCommandSendJob;
+    
+    /**
+     * Command control constructor. 
+     * @param session The DSF session that this service is a part of. 
+     */
+    public PDACommandControl(DsfSession session) {
+        super(session);
+    }
+    
+    @Override
+    public void initialize(final RequestMonitor rm) {
+        // Call the super-class to perform initialization first.
+        super.initialize( new RequestMonitor(getExecutor(), rm) {
+            @Override
+            protected void handleSuccess() {
+                doInitialize(rm);
+            }
+        });
+    }
+
+    private void doInitialize(final RequestMonitor rm) {
+        fBackend = getServicesTracker().getService(PDABackend.class);
+
+        // Create the control's data model context.
+        fDMContext = new PDAVirtualMachineDMContext(getSession().getId(), fBackend.getPorgramName());
+
+        // Add a listener for PDA events to track the started/terminated state.
+        addEventListener(new IEventListener() {
+            public void eventReceived(Object output) {
+                if ("started 1".equals(output)) {
+                    setStarted();
+                } else if ("terminated".equals(output)) {
+                    setTerminated();
+                }
+            }
+        });
+        
+        // Get intput/output streams from the backend service.
+        //
+        fRequestWriter = new PrintWriter(fBackend.getRequestOutputStream());
+        fRequestReader = new BufferedReader(new InputStreamReader(fBackend.getRequestInputStream()));
+        fEventReader = new BufferedReader(new InputStreamReader(fBackend.getEventInputStream()));
+
+        fEventDispatchJob = new EventDispatchJob();
+        fEventDispatchJob.schedule();
+        
+        fCommandSendJob = new CommandSendJob();
+        fCommandSendJob.schedule();
+
+        // Register the service with OSGi as the last step in initialization of 
+        // the service.
+        register(
+            new String[]{ ICommandControl.class.getName(), PDACommandControl.class.getName() }, 
+            new Hashtable<String,String>());
+
+        rm.done();
+    }
+
+    @Override
+    public void shutdown(final RequestMonitor requestMonitor) {
+        // Unregister the service first, so that clients may no longer gain access to it.
+        unregister();
+        
+        if (!isTerminated()) {
+            // If the debugger is still connected, send it the exit command.
+            terminate(new RequestMonitor(getExecutor(), requestMonitor) {
+                @Override
+                protected void handleCompleted() {
+                    // Mark the command control as terminated.
+                    setTerminated();
+
+                    // Ignore any error resulting from the exit command.  
+                    // Errors will most likely result if the PDA process is 
+                    // already terminated.
+                    requestMonitor.done();
+                }
+            });
+        } else {
+            requestMonitor.done();
+        }
+    }        
+
+    @Override
+    protected BundleContext getBundleContext() {
+        return PDAPlugin.getBundleContext();
+    }
+    
+    /**
+     *  Job that services the send command queue. 
+     */
+    private class CommandSendJob extends Job {
+        CommandSendJob() {
+            super("PDA Command Send");
+            setSystem(true);
+        }
+        
+        @Override
+        protected IStatus run(IProgressMonitor monitor) {
+            while (!isTerminated()) {
+                synchronized (fTxCommands) {
+                    try {
+                        // Remove command from send queue.
+                        final CommandHandle commandHandle = fTxCommands.take();
+                        
+                        // Send the request to PDA
+                        fRequestWriter.println(commandHandle.fCommand.getRequest());
+                        fRequestWriter.flush();
+                        
+                        try {
+                            // wait for reply
+                            final String response = fRequestReader.readLine();
+                            
+                            // Process the reply in the executor thread.
+                            try {
+                                getExecutor().execute(new DsfRunnable() {
+                                    public void run() {
+                                        processCommandDone(commandHandle, response);
+                                    }
+                                });
+                            } catch (RejectedExecutionException e) {
+                                // Acceptable race condition may see the session shut down
+                                // while we're waiting for command response.  Still complete
+                                // the request monitor.
+                                assert isTerminated();
+                                assert isTerminated();
+                                PDAPlugin.failRequest(commandHandle.fRequestMonitor, REQUEST_FAILED, "Command control shut down.");
+                            }
+                        } catch (final IOException e) {
+                            // Process error it in the executor thread
+                            try {
+                                getExecutor().execute(new DsfRunnable() {
+                                    public void run() {
+                                        processCommandException(commandHandle, e);
+                                    }
+                                });
+                            } catch (RejectedExecutionException re) {
+                                // Acceptable race condition... see above
+                                assert isTerminated();
+                                PDAPlugin.failRequest(commandHandle.fRequestMonitor, REQUEST_FAILED, "Command control shut down.");
+                            }
+                        }
+                    } catch (InterruptedException e) {
+                        break;  // Shutting down.
+                    }
+                }
+            }
+            return Status.OK_STATUS;
+        }        
+        
+    }
+    
+    /**
+     * Job that services the PDA event socket.
+     */
+    class EventDispatchJob extends Job {
+        
+        public EventDispatchJob() {
+            super("PDA Event Listner");
+            setSystem(true);
+        }
+
+        @Override
+        protected IStatus run(IProgressMonitor monitor) {
+            while (!isTerminated()) {
+                try {
+                    // Wait for an event.
+                    final String event = fEventReader.readLine();
+                    if (event != null) {
+                        try {
+                            // Process the event in executor thread.
+                            getExecutor().execute(new DsfRunnable() {
+                                public void run() {
+                                    processEventReceived(event);
+                                }
+                            });
+                        } catch (RejectedExecutionException e) {}                
+                    } else {
+                        break;
+                    }
+                } catch (IOException e) {
+                    break;
+                }
+            }
+            if (!isTerminated()) {
+                // Exception from the event socket is an indicator that the PDA debugger
+                // has exited.  Call setTerminated() in executor thread.
+                try {
+                    getExecutor().execute(new DsfRunnable() {
+                        public void run() {
+                            setTerminated();
+                        }
+                    });
+                } catch (RejectedExecutionException e) {}                
+            }
+            return Status.OK_STATUS;
+        }
+        
+    }
+    
+    public <V extends ICommandResult> ICommandToken queueCommand(final ICommand<V> command, DataRequestMonitor<V> rm) {
+        ICommandToken token = new ICommandToken() {
+            public ICommand<?> getCommand() {
+                return command;
+            }
+        };
+
+        if (command instanceof AbstractPDACommand<?>) {
+            // Cast from command with "<V extends ICommandResult>" to a more concrete
+            // type to use internally in the command control.
+            @SuppressWarnings("unchecked")
+            AbstractPDACommand<PDACommandResult> pdaCommand = (AbstractPDACommand<PDACommandResult>)command;
+            
+            // Similarly, cast the request monitor to a more concrete type.
+            @SuppressWarnings("unchecked")
+            DataRequestMonitor<PDACommandResult> pdaRM = (DataRequestMonitor<PDACommandResult>)rm;
+
+            // Add the command to the queue and notify command listeners.
+            fCommandQueue.add( new CommandHandle(token, pdaCommand, pdaRM) );
+            for (ICommandListener listener : fCommandListeners) {
+                listener.commandQueued(token);
+            }
+            
+            // In a separate dispatch cycle.  This allows command listeners to respond to the 
+            // command queued event.  
+            getExecutor().execute(new DsfRunnable() {
+                public void run() {
+                    processQueues();
+                }
+            });
+        } else {
+            PDAPlugin.failRequest(rm, INTERNAL_ERROR, "Unrecognized command: " + command);
+        }
+        return token;
+    }
+
+    public void removeCommand(ICommandToken token) {
+        // Removes given command from the queue and notify the listeners
+        for (Iterator<CommandHandle> itr = fCommandQueue.iterator(); itr.hasNext();) {
+            CommandHandle handle = itr.next();
+            if (token.equals(handle.fToken)) {
+                itr.remove();
+                for (ICommandListener listener : fCommandListeners) {
+                    listener.commandRemoved(token);
+                }                
+            }
+        }
+    }
+    
+    public void addCommandListener(ICommandListener processor) { 
+        fCommandListeners.add(processor); 
+    }
+    
+    public void removeCommandListener(ICommandListener processor) { 
+        fCommandListeners.remove(processor); 
+    }
+    
+    public void addEventListener(IEventListener processor) { 
+        fEventListeners.add(processor); 
+    }
+    
+    public void removeEventListener(IEventListener processor) { 
+        fEventListeners.remove(processor); 
+    }
+
+    private void processCommandDone(CommandHandle handle, String response) {
+        // Trace to debug output.
+        PDAPlugin.debug("R: " + response);
+        
+        PDACommandResult result = null;
+        
+        if (response.startsWith("error:")) {
+            // Create a generic result with the error response
+            result = new PDACommandResult(response);
+            
+            // Set the error status to the request monitor.
+            handle.fRequestMonitor.setStatus(new Status(
+                IStatus.ERROR, PDAPlugin.PLUGIN_ID, 
+                IDsfStatusConstants.REQUEST_FAILED, response, null));
+        } else {
+            // Given the PDA response string, create the result using the command
+            // that was sent.
+            result = handle.fCommand.createResult(response);
+            
+            // Set the result to the request monitor and return to sender.
+            // Note: as long as PDA sends some response, a PDA command will never
+            // return an error.
+            handle.fRequestMonitor.setData(result);
+        }
+        handle.fRequestMonitor.done();
+
+        // Notify listeners of the response
+        for (ICommandListener listener : fCommandListeners) {
+            listener.commandDone(handle.fToken, result);
+        }
+        
+        // Process next command in queue.
+        processQueues();
+    }
+
+    
+    private void processCommandException(CommandHandle handle, Throwable exception) {
+        
+        // If sending a command resulted in an exception, notify the client.
+        handle.fRequestMonitor.setStatus(new Status(
+            IStatus.ERROR, PDAPlugin.PLUGIN_ID, REQUEST_FAILED, "Exception reading request response", exception));
+        handle.fRequestMonitor.done();                            
+
+        // Notify listeners also.
+        for (ICommandListener listener : fCommandListeners) {
+            listener.commandDone(handle.fToken, null);
+        }
+    }
+
+    private void processEventReceived(String event) {
+        // Notify the listeners only.
+        PDAPlugin.debug("E: " + event);
+        for (IEventListener listener : fEventListeners) {
+            listener.eventReceived(event);
+        }
+    }
+    
+    private synchronized void processQueues() {
+        if (isTerminated()) {
+            // If the PDA debugger is terminated.  Return all submitted commands 
+            // with an error.
+            for (CommandHandle handle : fCommandQueue) {
+                handle.fRequestMonitor.setStatus(new Status(
+                    IStatus.ERROR, PDAPlugin.PLUGIN_ID, INVALID_STATE, "Command control is terminated", null));
+                handle.fRequestMonitor.done();
+            }
+            fCommandQueue.clear();
+        } else if (fStarted && fTxCommands.isEmpty() && !fCommandQueue.isEmpty()) {
+            // Process the queues if:
+            // - the PDA debugger has started,
+            // - there are no pending commands in the send queue,
+            // - and there are commands waiting to be sent.
+            CommandHandle handle = fCommandQueue.remove(0); 
+            fTxCommands.add(handle);
+            PDAPlugin.debug("C: " + handle.fCommand.getRequest());
+            for (ICommandListener listener : fCommandListeners) {
+                listener.commandSent(handle.fToken);
+            }            
+        }
+    }
+    
+    /**
+     * Return the PDA Debugger top-level Data Model context. 
+     * @see PDAVirtualMachineDMContext
+     */
+    @ThreadSafe
+    public PDAVirtualMachineDMContext getContext() {
+        return fDMContext;
+    }
+
+    public String getId() {
+        return fBackend.getPorgramName();
+    }
+    
+    private void setStarted() {
+        // Mark the command control as started and ready to process commands.
+        fStarted = true;
+        
+        // Process any commands which may have been queued before the 
+        processQueues();
+
+        // Issue a data model event.
+        getSession().dispatchEvent(new PDAStartedEvent(getContext()), getProperties());
+    }
+    
+    /**
+     * Returns whether the PDA debugger has started and is processing commands.
+     */
+    public boolean isActive() {
+        return fStarted && !isTerminated();
+    }
+    
+    
+    @ThreadSafe
+    private synchronized void setTerminated() {
+        // Set terminated may be called more than once: by event listener thread, 
+        // by the terminate command, etc, so protect against sending events multiple
+        // times.
+        if (!fTerminated) {
+            fTerminated = true;
+            
+            // Process any waiting commands, they all should return with an error.
+            processQueues();
+            
+            // Issue a data model event.
+            getSession().dispatchEvent(new PDATerminatedEvent(getContext()), getProperties());
+        }
+    }
+
+    /**
+     * Returns whether the PDA debugger has been terminated.
+     */
+    @ThreadSafe
+    public synchronized boolean isTerminated() {
+        return fTerminated;
+    }
+
+    /**
+     * Sends a command to PDA debugger to terminate.
+     */
+    public void terminate(RequestMonitor rm) {
+        if (!isTerminated()) {
+            queueCommand(
+                new PDAExitCommand(fDMContext),
+                new DataRequestMonitor<PDACommandResult>(getExecutor(), rm));
+        } else {
+            // If already terminated, indicate success.
+            rm.done();
+        }
+    }    
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAExpressions.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAExpressions.java
new file mode 100644
index 0000000..c4dc844
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAExpressions.java
@@ -0,0 +1,542 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service;
+
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.datamodel.AbstractDMContext;
+import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent;
+import org.eclipse.cdt.dsf.datamodel.DMContexts;
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.debug.service.ICachingService;
+import org.eclipse.cdt.dsf.debug.service.IExpressions;
+import org.eclipse.cdt.dsf.debug.service.IRegisters.IRegisterDMContext;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IResumedDMEvent;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.ISuspendedDMEvent;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.StateChangeReason;
+import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext;
+import org.eclipse.cdt.dsf.debug.service.command.CommandCache;
+import org.eclipse.cdt.dsf.service.AbstractDsfService;
+import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAChildrenCommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDACommandResult;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAListResult;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDASetVarCommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAVarCommand;
+import org.osgi.framework.BundleContext;
+
+/**
+ * 
+ */
+public class PDAExpressions extends AbstractDsfService implements ICachingService, IExpressions {
+
+    @Immutable
+    private static class ExpressionDMContext extends AbstractDMContext implements IExpressionDMContext {
+
+        final private String fExpression;
+        
+        ExpressionDMContext(String sessionId, IFrameDMContext frameDmc, String expressin) {
+            super(sessionId, new IDMContext[] { frameDmc });
+            fExpression = expressin;
+        }
+
+        public String getExpression() { 
+            return fExpression;
+        }
+        
+        @Override
+        public boolean equals(Object other) {
+            return super.baseEquals(other) && ((ExpressionDMContext)other).fExpression.equals(fExpression);
+        }
+        
+        @Override
+        public int hashCode() {
+            return super.baseHashCode() + fExpression.hashCode();
+        }
+        
+        @Override
+        public String toString() { 
+            return baseToString() + ".expression(" + fExpression + ")";  
+        }
+    }
+
+    /**
+     * PDA expressions are simply variables.  Only the variable name 
+     * is relevant for its data.
+     */
+    @Immutable
+    private static class ExpressionDMData implements IExpressionDMData {
+
+        final private String fExpression;
+        
+        public ExpressionDMData(String expression) {
+            fExpression = expression;
+        }
+        
+        public BasicType getBasicType() {
+            return BasicType.basic;
+        }
+
+        public String getEncoding() {
+            return null;
+        }
+
+        public Map<String, Integer> getEnumerations() {
+            return null;
+        }
+
+        public String getName() {
+            return fExpression;
+        }
+
+        public IRegisterDMContext getRegister() {
+            return null;
+        }
+
+        public String getStringValue() {
+            return null;
+        }
+
+        public String getTypeId() {
+            return null;
+        }
+
+        public String getTypeName() {
+            return null;
+        }
+
+    }
+
+    // @see #createExpression()
+    @Immutable
+    private static class InvalidExpressionDMContext extends AbstractDMContext implements IExpressionDMContext {
+        final private String fExpression;
+    
+        public InvalidExpressionDMContext(String sessionId, IDMContext parent, String expr) {
+            super(sessionId, new IDMContext[] { parent });
+            fExpression = expr;
+        }
+    
+        @Override
+        public boolean equals(Object other) {
+            return super.baseEquals(other) && 
+                fExpression == null 
+                    ? ((InvalidExpressionDMContext) other).getExpression() == null 
+                    : fExpression.equals(((InvalidExpressionDMContext) other).getExpression());
+        }
+    
+        @Override
+        public int hashCode() {
+            return fExpression == null ? super.baseHashCode() : super.baseHashCode() ^ fExpression.hashCode();
+        }
+    
+        @Override
+        public String toString() {
+            return baseToString() + ".invalid_expr[" + fExpression + "]"; 
+        }
+    
+        public String getExpression() {
+            return fExpression;
+        }
+    }
+    
+    @Immutable
+    private static class ExpressionChangedDMEvent extends AbstractDMEvent<IExpressionDMContext> 
+        implements IExpressionChangedDMEvent 
+    {
+        ExpressionChangedDMEvent(IExpressionDMContext expression) {
+            super(expression);
+        }
+    }
+
+    
+    private PDACommandControl fCommandControl;
+    private PDAStack fStack;
+
+    private CommandCache fCommandCache;
+
+    public PDAExpressions(DsfSession session) {
+        super(session);
+    }
+
+    @Override
+    protected BundleContext getBundleContext() {
+        return PDAPlugin.getBundleContext();
+    }
+
+    @Override
+    public void initialize(final RequestMonitor rm) {
+        super.initialize(
+            new RequestMonitor(getExecutor(), rm) { 
+                @Override
+                protected void handleSuccess() {
+                    doInitialize(rm);
+                }});
+    }
+
+    private void doInitialize(final RequestMonitor rm) {
+        fCommandControl = getServicesTracker().getService(PDACommandControl.class);
+        fStack = getServicesTracker().getService(PDAStack.class);
+        fCommandCache = new CommandCache(getSession(), fCommandControl);
+
+        getSession().addServiceEventListener(this, null);
+        
+        register(new String[]{IExpressions.class.getName(), PDAExpressions.class.getName()}, new Hashtable<String,String>());
+        
+        rm.done();
+    }
+
+    @Override
+    public void shutdown(final RequestMonitor rm) {
+        getSession().removeServiceEventListener(this);
+        fCommandCache.reset();
+        super.shutdown(rm);
+    }
+
+    public void canWriteExpression(IExpressionDMContext expressionContext, DataRequestMonitor<Boolean> rm) {
+        rm.setData(true);
+        rm.done();
+    }
+
+    public IExpressionDMContext createExpression(IDMContext ctx, String expression) {
+        // Create an expression based on the given context and string expression.  
+        PDAThreadDMContext threadCtx = DMContexts.getAncestorOfType(ctx, PDAThreadDMContext.class);
+        if (threadCtx != null) {
+            // The PDA debugger can only evaluate variables as expressions and only
+            // in context of a frame, so if a frame is not given, create a top-level frame.
+            IFrameDMContext frameCtx = DMContexts.getAncestorOfType(ctx, IFrameDMContext.class);
+            if (frameCtx == null) {
+                frameCtx = fStack.getFrameDMContext(threadCtx, 0);
+            }
+            
+            return new ExpressionDMContext(getSession().getId(), frameCtx, expression);
+        } 
+            
+        // If the thread cannot be found in context, return an "invalid" 
+        // expression context, because a null return value is not allowed.
+        // Evaluating an invalid expression context will always yield an 
+        // error.
+        return new InvalidExpressionDMContext(getSession().getId(), ctx, expression);
+    }
+
+    public void getBaseExpressions(IExpressionDMContext exprContext, DataRequestMonitor<IExpressionDMContext[]> rm) {
+        PDAPlugin.failRequest(rm, NOT_SUPPORTED, "Not supported");
+    }
+
+    public void getExpressionAddressData(IExpressionDMContext dmc, DataRequestMonitor<IExpressionDMAddress> rm) {
+        PDAPlugin.failRequest(rm, NOT_SUPPORTED, "Not supported");
+    }
+
+    public void getExpressionData(final IExpressionDMContext exprCtx, final DataRequestMonitor<IExpressionDMData> rm) {
+        // Since expression data doesn't contain any more information than the 
+        // context, it doesn't require any debugger commmands.
+        if (exprCtx instanceof ExpressionDMContext) {
+            rm.setData(new ExpressionDMData(exprCtx.getExpression()));
+            rm.done();
+        } else {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid expression context " + exprCtx);
+        }
+    }
+
+    public void getSubExpressionCount(final IExpressionDMContext exprCtx, final DataRequestMonitor<Integer> rm) {
+        if (exprCtx instanceof ExpressionDMContext) {
+            final PDAThreadDMContext threadCtx = DMContexts.getAncestorOfType(exprCtx, PDAThreadDMContext.class);
+            final IFrameDMContext frameCtx = DMContexts.getAncestorOfType(exprCtx, IFrameDMContext.class);
+            
+            // First retrieve the stack depth, needed to properly calculate
+            // the frame index that is used by the PDAVarCommand. 
+            fStack.getStackDepth(
+                frameCtx, 0,
+                new DataRequestMonitor<Integer>(getExecutor(), rm) {
+                    @Override
+                    protected void handleSuccess() {
+                        // Calculate the frame index.
+                        int frameId = getData() - frameCtx.getLevel() - 1;
+                        
+                        // Send the command to evaluate the variable.
+                        fCommandCache.execute(
+                            new PDAChildrenCommand(threadCtx, frameId, exprCtx.getExpression()), 
+                            new DataRequestMonitor<PDAListResult>(getExecutor(), rm) {
+                                @Override
+                                protected void handleSuccess() {
+                                    rm.setData(getData().fValues.length);
+                                    rm.done();
+                                }
+                            });        
+                    }
+                });
+        } else {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid context");
+        }
+    }
+
+    public void getSubExpressions(IExpressionDMContext exprCtx, DataRequestMonitor<IExpressionDMContext[]> rm) {
+        getSubExpressions(exprCtx, -1, -1, rm);
+    }
+
+    public void getSubExpressions(final IExpressionDMContext exprCtx, final int startIndexArg, final int lengthArg,
+        final DataRequestMonitor<IExpressionDMContext[]> rm) 
+    {
+        if (exprCtx instanceof ExpressionDMContext) {
+            final PDAThreadDMContext threadCtx = DMContexts.getAncestorOfType(exprCtx, PDAThreadDMContext.class);
+            final IFrameDMContext frameCtx = DMContexts.getAncestorOfType(exprCtx, IFrameDMContext.class);
+            
+            // First retrieve the stack depth, needed to properly calculate
+            // the frame index that is used by the PDAVarCommand. 
+            fStack.getStackDepth(
+                frameCtx, 0,
+                new DataRequestMonitor<Integer>(getExecutor(), rm) {
+                    @Override
+                    protected void handleSuccess() {
+                        // Calculate the frame index.
+                        int frameId = getData() - frameCtx.getLevel() - 1;
+                        
+                        // Send the command to evaluate the variable.
+                        fCommandCache.execute(
+                            new PDAChildrenCommand(threadCtx, frameId, exprCtx.getExpression()), 
+                            new DataRequestMonitor<PDAListResult>(getExecutor(), rm) {
+                                @Override
+                                protected void handleSuccess() {
+                                    int start = startIndexArg > 0 ? startIndexArg : 0;
+                                    int end = lengthArg > 0 ? (start + lengthArg) : getData().fValues.length;
+                                    IExpressionDMContext[] contexts = new IExpressionDMContext[end - start];                                     
+                                    for (int i = start; i < end && i < getData().fValues.length; i++) {
+                                        contexts[i] = new ExpressionDMContext(
+                                            getSession().getId(), frameCtx, getData().fValues[i]);
+                                    }
+                                    rm.setData(contexts);
+                                    rm.done();
+                                }
+                            });        
+                    }
+                });
+        } else {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid context");
+        }
+    }
+
+    public void getAvailableFormats(IFormattedDataDMContext dmc, final DataRequestMonitor<String[]> rm) {
+        getFormattedExpressionValue(
+            new FormattedValueDMContext(this, dmc, NATURAL_FORMAT),
+            new DataRequestMonitor<FormattedValueDMData>(getExecutor(), rm) {
+                @Override
+                protected void handleSuccess() {
+                    try {
+                        Integer.parseInt(getData().getFormattedValue());
+                        rm.setData(new String[] { DECIMAL_FORMAT, HEX_FORMAT, DECIMAL_FORMAT, OCTAL_FORMAT, BINARY_FORMAT });                        
+                        rm.done();
+                    } catch (NumberFormatException e) {
+                        rm.setData(new String[] { STRING_FORMAT });
+                        rm.done();
+                    }
+                }
+                
+                @Override
+                protected void handleErrorOrWarning() {
+                    rm.setData(new String[] { STRING_FORMAT });
+                    rm.done();
+                }
+            });
+    }
+
+    public FormattedValueDMContext getFormattedValueContext(IFormattedDataDMContext exprCtx, String formatId) {
+        // Creates a context that can be used to retrieve a formatted value.
+        return new FormattedValueDMContext(this, exprCtx, formatId);
+    }
+
+    public void getFormattedExpressionValue(FormattedValueDMContext formattedCtx, 
+        final DataRequestMonitor<FormattedValueDMData> rm) 
+    {
+        final String formatId = formattedCtx.getFormatID();
+        final ExpressionDMContext exprCtx = DMContexts.getAncestorOfType(formattedCtx, ExpressionDMContext.class);
+        if (exprCtx != null) {
+            final PDAThreadDMContext threadCtx = DMContexts.getAncestorOfType(exprCtx, PDAThreadDMContext.class);
+            final IFrameDMContext frameCtx = DMContexts.getAncestorOfType(exprCtx, IFrameDMContext.class);
+            
+            // First retrieve the stack depth, needed to properly calculate
+            // the frame index that is used by the PDAVarCommand. 
+            fStack.getStackDepth(
+                frameCtx, 0,
+                new DataRequestMonitor<Integer>(getExecutor(), rm) {
+                    @Override
+                    protected void handleSuccess() {
+                        // Calculate the frame index.
+                        int frameId = getData() - frameCtx.getLevel() - 1;
+                        
+                        // Send the command to evaluate the variable.
+                        fCommandCache.execute(
+                            new PDAVarCommand(threadCtx, frameId, exprCtx.getExpression()), 
+                            new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
+                                @Override
+                                protected void handleSuccess() {
+                                    if (NATURAL_FORMAT.equals(formatId) || STRING_FORMAT.equals(formatId)) {
+                                        rm.setData(new FormattedValueDMData(getData().fResponseText));
+                                        rm.done();
+                                    } else {                                        
+                                        int result;
+                                        try {
+                                            int intResult = Integer.parseInt(getData().fResponseText);
+                                            String formattedResult = "";
+                                            if (HEX_FORMAT.equals(formatId)) {
+                                                formattedResult = Integer.toHexString(intResult);
+                                                StringBuffer prefix = new StringBuffer("0x");
+                                                for (int i = 0; i < 8 - formattedResult.length(); i++) {
+                                                    prefix.append('0');
+                                                }
+                                                prefix.append(formattedResult);
+                                                formattedResult = prefix.toString();
+                                            } else if (OCTAL_FORMAT.equals(formatId)) {
+                                                formattedResult = Integer.toOctalString(intResult);
+                                                StringBuffer prefix = new StringBuffer("0c");
+                                                for (int i = 0; i < 16 - formattedResult.length(); i++) {
+                                                    prefix.append('0');
+                                                }
+                                                prefix.append(formattedResult);
+                                                formattedResult = prefix.toString();
+                                            } else if (BINARY_FORMAT.equals(formatId)) {
+                                                formattedResult = Integer.toBinaryString(intResult);
+                                                StringBuffer prefix = new StringBuffer("0b");
+                                                for (int i = 0; i < 32 - formattedResult.length(); i++) {
+                                                    prefix.append('0');
+                                                }
+                                                prefix.append(formattedResult);
+                                                formattedResult = prefix.toString();
+                                            } else if (DECIMAL_FORMAT.equals(formatId)) {
+                                                formattedResult = Integer.toString(intResult);                                                
+                                            } else {
+                                                PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid format");
+                                            }
+                                            rm.setData(new FormattedValueDMData(formattedResult));
+                                            rm.done();
+                                        } catch (NumberFormatException e) {
+                                            PDAPlugin.failRequest(rm, REQUEST_FAILED, "Cannot format value");
+                                        }
+                                    }
+                                }
+                            }); 
+                    }
+                });
+        } else {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid expression context " + formattedCtx);
+        }
+    }
+
+    
+    public void writeExpression(final IExpressionDMContext exprCtx, final String exprValue, String formatId, 
+        final RequestMonitor rm) 
+    {
+        writeExpression(exprCtx, exprValue, formatId, true, rm);
+    }
+    
+    /**
+     * Method to write an expression, with an additional parameter to suppress
+     * issuing of the expression changed event. 
+     * @see IExpressions#writeExpression(org.eclipse.cdt.dsf.debug.service.IExpressions.IExpressionDMContext, String, String, RequestMonitor)
+     */
+    public void writeExpression(final IExpressionDMContext exprCtx, String formattedExprValue, String formatId, 
+        final boolean sendEvent, final RequestMonitor rm) 
+    {
+        String value = null;
+        try {
+            int intValue = 0;
+            if (HEX_FORMAT.equals(formatId)) {
+                if (formattedExprValue.startsWith("0x")) formattedExprValue = formattedExprValue.substring(2); 
+                value = Integer.toString( Integer.parseInt(formattedExprValue, 16) );
+            } else if (DECIMAL_FORMAT.equals(formatId)) {
+                value = Integer.toString( Integer.parseInt(formattedExprValue, 10) );
+            } else if (OCTAL_FORMAT.equals(formatId)) {
+                if (formattedExprValue.startsWith("0c")) formattedExprValue = formattedExprValue.substring(2); 
+                value = Integer.toString( Integer.parseInt(formattedExprValue, 8) );
+            } else if (BINARY_FORMAT.equals(formatId)) {
+                if (formattedExprValue.startsWith("0b")) formattedExprValue = formattedExprValue.substring(2); 
+                value = Integer.toString( Integer.parseInt(formattedExprValue, 2) ); 
+            }
+        } catch (NumberFormatException e) {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Value not formatted properly");
+            return;
+        }
+        
+        final String exprValue = value != null ? value : formattedExprValue;
+        
+        
+        if (exprCtx instanceof ExpressionDMContext) {
+            final PDAThreadDMContext threadCtx = DMContexts.getAncestorOfType(exprCtx, PDAThreadDMContext.class);
+            final IFrameDMContext frameCtx = DMContexts.getAncestorOfType(exprCtx, IFrameDMContext.class);
+            
+            // Similarly to retrieving the variable, retrieve the 
+            // stack depth first.
+            fStack.getStackDepth(
+                frameCtx, 0,
+                new DataRequestMonitor<Integer>(getExecutor(), rm) {
+                    @Override
+                    protected void handleSuccess() {
+                        // Calculate the frame index.
+                        int frameId = getData() - frameCtx.getLevel() - 1;
+                        
+                        // Send the "write" command to PDA debugger
+                        fCommandCache.execute(
+                            new PDASetVarCommand( threadCtx, frameId, exprCtx.getExpression(), exprValue), 
+                            new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
+                                @Override
+                                protected void handleSuccess() {
+                                    if (sendEvent) {
+                                        getSession().dispatchEvent(new ExpressionChangedDMEvent(exprCtx), getProperties());
+                                    }
+                                    // An expression changed, clear the cache corresponding to 
+                                    // this event.  Since the var evaluate commands, use the thread
+                                    // context, we have to clear all the cache entries for that thread.
+                                    fCommandCache.reset(DMContexts.getAncestorOfType(exprCtx, PDAThreadDMContext.class));
+                                    rm.done();
+                                }
+                            });
+                    }
+                });
+        } else {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid expression context " + exprCtx);
+        }
+    }
+
+    @DsfServiceEventHandler 
+    public void eventDispatched(IResumedDMEvent e) {
+        // Mark the cache as not available, so that data retrieval commands 
+        // will fail.  Also reset the cache unless it was a step command.
+        fCommandCache.setContextAvailable(e.getDMContext(), false);
+        if (!e.getReason().equals(StateChangeReason.STEP)) {
+            fCommandCache.reset(e.getDMContext());
+        }
+    }    
+
+
+    @DsfServiceEventHandler 
+    public void eventDispatched(ISuspendedDMEvent e) {
+        // Enable sending commands to target and clear the cache.
+        fCommandCache.setContextAvailable(e.getDMContext(), true);
+        fCommandCache.reset(e.getDMContext());
+    }
+    
+    @DsfServiceEventHandler 
+    public void eventDispatched(ExpressionChangedDMEvent e) {
+        // An expression changed, clear the cache corresponding to 
+        // this event.  Since the var evaluate commands, use the thread
+        // context, we have to clear all the cache entries for that thread.
+        fCommandCache.reset(DMContexts.getAncestorOfType(e.getDMContext(), PDAThreadDMContext.class));
+    }    
+
+    public void flushCache(IDMContext context) {
+        fCommandCache.reset(context);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDARegisters.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDARegisters.java
new file mode 100644
index 0000000..6a1132a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDARegisters.java
@@ -0,0 +1,556 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service;
+
+import java.math.BigInteger;
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.datamodel.AbstractDMContext;
+import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent;
+import org.eclipse.cdt.dsf.datamodel.DMContexts;
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.debug.service.ICachingService;
+import org.eclipse.cdt.dsf.debug.service.IRegisters;
+import org.eclipse.cdt.dsf.debug.service.IRunControl;
+import org.eclipse.cdt.dsf.debug.service.IExpressions.IExpressionDMContext;
+import org.eclipse.cdt.dsf.debug.service.command.CommandCache;
+import org.eclipse.cdt.dsf.debug.service.command.IEventListener;
+import org.eclipse.cdt.dsf.service.AbstractDsfService;
+import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDABitField;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAGroupsCommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAListResult;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDARegister;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDARegistersCommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDARegistersCommandResult;
+import org.osgi.framework.BundleContext;
+
+/**
+ * 
+ */
+public class PDARegisters extends AbstractDsfService 
+    implements IRegisters, IEventListener, ICachingService
+{
+
+    private static class RegisterGroupDMContext extends AbstractDMContext implements IRegisterGroupDMContext {
+        final private String fName;
+
+        public RegisterGroupDMContext(String sessionId, PDAVirtualMachineDMContext dmc, String groupName) {
+            super(sessionId, new IDMContext[] { dmc });
+            fName = groupName;
+        }
+
+        @Override
+        public boolean equals(Object other) {
+            return ((super.baseEquals(other)) &&  
+                    (((RegisterGroupDMContext) other).fName.equals(fName)));
+        }
+        
+        @Override
+        public int hashCode() { return super.baseHashCode() + fName.hashCode(); }
+        
+        @Override
+        public String toString() { return baseToString() + ".group[" + fName + "]"; } //$NON-NLS-1$ //$NON-NLS-2$
+    }
+       
+    private static class RegisterDMContext extends AbstractDMContext implements IRegisterDMContext {
+        final private PDARegister fRegister;
+
+        public RegisterDMContext(String sessionId, PDAThreadDMContext thread, RegisterGroupDMContext group, PDARegister reg) {
+            super(sessionId, new IDMContext[] { thread, group });
+            fRegister = reg;
+        }
+
+        @Override
+        public boolean equals(Object other) {
+            return ((super.baseEquals(other)) && 
+                    (((RegisterDMContext) other).fRegister.fName.equals(fRegister.fName)));
+        }
+
+        @Override
+        public int hashCode() { return super.baseHashCode() + fRegister.fName.hashCode(); }
+        @Override
+        public String toString() { return baseToString() + ".register[" + fRegister.fName + "]"; } //$NON-NLS-1$ //$NON-NLS-2$
+    }
+    
+    /*
+     * Support class used to construct BitField DMCs.
+     */
+    private static class BitFieldDMContext extends AbstractDMContext implements IBitFieldDMContext {
+        
+        final private PDABitField fBitField;
+
+        public BitFieldDMContext(String sessionId, RegisterDMContext reg, PDABitField bitField) {
+            super(sessionId, new IDMContext[] { reg });
+
+            fBitField = bitField;
+        }
+
+        /*
+         *  Required common manipulation routines.
+         */
+        @Override
+        public boolean equals(Object other) {
+            if (other instanceof BitFieldDMContext) {
+                BitFieldDMContext  dmc = (BitFieldDMContext) other;
+                return( (super.baseEquals(other)) &&
+                        (dmc.fBitField.fName.equals(fBitField.fName)));
+            } else {
+                return false;
+            }
+        }
+
+        @Override
+        public int hashCode() { return super.baseHashCode() + fBitField.fName.hashCode(); }
+        
+        @Override
+        public String toString() { return baseToString() + ".bitfield[" + fBitField.fName + "]"; } //$NON-NLS-1$ //$NON-NLS-2$
+    }
+       
+    private static class RegisterGroupDMData implements IRegisterGroupDMData {
+        
+        final private String fName;
+        
+        public RegisterGroupDMData(String name) {
+            fName = name;
+        }
+        public String getName() { return fName; }
+        public String getDescription() { return "Description of the " + fName + " register group"; }
+    }
+    
+    private static class RegisterDMData implements IRegisterDMData {
+        
+        final private PDARegister fRegister;
+        
+        public RegisterDMData(PDARegister reg) {
+            fRegister = reg;
+        }
+        
+        public boolean isReadable() { return true; }
+        public boolean isReadOnce() { return false; }
+        public boolean isWriteable() { return fRegister.fWritable; }
+        public boolean isWriteOnce() { return false; }
+        public boolean hasSideEffects() { return false; }
+        public boolean isVolatile() { return true; }
+
+        public boolean isFloat() { return false; }
+        public String getName() { return fRegister.fName; }
+        public String getDescription() { return "Description of the " + fRegister.fName + " register"; }
+    }
+    
+    private static class Mnemonic implements IMnemonic {
+        Mnemonic(String name, String value, int numBits) {
+            fName = name;
+            fValue = new BigInteger(value);
+            fNumBits = numBits;
+        }
+        final private String fName;
+        final private BigInteger fValue;
+        final private int fNumBits;
+        
+        public String getShortName() { return fName; }
+        public String getLongName()  { return fName; }
+        
+        public BigInteger getValue() { return fValue; }
+        public int getBitCount() { return fNumBits; }
+
+        @Override
+        public boolean equals( Object element ) {
+            if ( element instanceof Mnemonic ) {
+                Mnemonic mnem = (Mnemonic) element;
+                return ( mnem.fName.equals( fName ) ) &&
+                       ( mnem.fValue.equals( fValue ) ) &&
+                       ( mnem.fNumBits == fNumBits );
+            }
+            return false ;
+        }
+    }
+    
+    private class BitFieldDMData implements IBitFieldDMData {
+
+        final private PDABitField fBitField;
+        final private IBitGroup[] fBitGroups;
+        final private Mnemonic[] fMnemonics;
+        final private BigInteger fValue;
+        final private Mnemonic fMnemonicValue;
+        
+        public BitFieldDMData(PDABitField bitField, String value) {
+            fBitField = bitField;
+            fValue = new BigInteger(value);
+            
+            fBitGroups = new IBitGroup[] { 
+                new IBitGroup() {
+                    public int startBit() { return fBitField.fOffset; }
+                    public int bitCount() { return fBitField.fCount; }
+                }
+            };
+
+            fMnemonics = new Mnemonic[fBitField.fMnemonics.size()];
+            Mnemonic mnemonicValue = null;
+            int i = 0;
+            for (Map.Entry<String, String> mnemonicEntry : fBitField.fMnemonics.entrySet()) {
+                fMnemonics[i] = new Mnemonic(mnemonicEntry.getKey(), mnemonicEntry.getValue(), fBitField.fCount);
+                if (fValue.equals(fMnemonics[i].fValue)) {
+                    mnemonicValue = fMnemonics[i];
+                }
+                i++;
+            }
+            fMnemonicValue = mnemonicValue;
+        }
+        
+        
+        public IBitGroup[] getBitGroup()      { return fBitGroups;  }
+        public IMnemonic[] getMnemonics()     { return fMnemonics;  }
+        
+        public boolean isZeroBasedNumbering() { return true; }
+        public boolean isZeroBitLeftMost()    { return true; }
+        public boolean isReadable()           { return true; }
+        public boolean isReadOnce()           { return false; }
+        public boolean isWriteable()          { return true; }
+        public boolean isWriteOnce()          { return false; }
+        public boolean hasSideEffects()       { return false; }
+        public boolean isFloat()              { return false; }
+        
+        public String  getName()         { return fBitField.fName; }
+        public String  getDescription()  { return "Description of the " + fBitField.fName + " bit field"; }
+
+        public IMnemonic getCurrentMnemonicValue() { return fMnemonicValue; }
+    }
+    
+    private static class RegisterChangedDMEvent extends AbstractDMEvent<IRegisterDMContext> implements IRegisterChangedDMEvent {
+        RegisterChangedDMEvent(IRegisterDMContext registerDmc) { 
+            super(registerDmc);
+        }
+    }
+    
+    private PDACommandControl fCommandControl;
+    private PDAExpressions fExpressions;
+    private CommandCache fNamesCache;
+    
+    public PDARegisters(DsfSession session) 
+    {
+        super(session);
+    }
+
+    @Override
+    protected BundleContext getBundleContext() 
+    {
+        return PDAPlugin.getBundleContext();
+    }
+    
+    @Override
+    public void initialize(final RequestMonitor requestMonitor) {
+        super.initialize(
+            new RequestMonitor(getExecutor(), requestMonitor) { 
+                @Override
+                protected void handleSuccess() {
+                    doInitialize(requestMonitor);
+                }});
+    }
+    
+    private void doInitialize(RequestMonitor requestMonitor) {
+
+        fCommandControl = getServicesTracker().getService(PDACommandControl.class);
+        fExpressions = getServicesTracker().getService(PDAExpressions.class);
+        
+        // Create the cache to store the register definitions.  This cache 
+        // only needs to be reset upon the "registers" event and is available
+        // all the time.
+        fNamesCache = new CommandCache(getSession(), fCommandControl);
+        fNamesCache.setContextAvailable(fCommandControl.getContext(), true);
+        
+        // Add the register service as a listener to PDA events, to catch 
+        // the "registers" events from the command control.
+        fCommandControl.addEventListener(this);
+        
+        // Sign up so we see events. We use these events to decide how to manage
+        // any local caches we are providing as well as the lower level register
+        // cache we create to get/set registers on the target.
+        getSession().addServiceEventListener(this, null);
+
+        // Make ourselves known so clients can use us.
+        register(new String[]{IRegisters.class.getName(), PDARegisters.class.getName()}, new Hashtable<String,String>());
+
+        requestMonitor.done();
+    }
+
+    @Override
+    public void shutdown(RequestMonitor requestMonitor) 
+    {
+        unregister();
+        fCommandControl.removeEventListener(this);
+        getSession().removeServiceEventListener(this);        
+        super.shutdown(requestMonitor);
+    }
+    
+    public void getRegisterGroups(IDMContext ctx, final DataRequestMonitor<IRegisterGroupDMContext[]> rm ) {
+    	final PDAVirtualMachineDMContext dmc = DMContexts.getAncestorOfType(ctx, PDAVirtualMachineDMContext.class);
+        if (dmc == null) {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Container context not found");   //$NON-NLS-1$
+            return;
+        }
+        
+        fNamesCache.execute(
+            new PDAGroupsCommand(dmc), 
+            new DataRequestMonitor<PDAListResult>(getExecutor(), rm) {
+                @Override
+                protected void handleSuccess() {
+                    IRegisterGroupDMContext[] groups = new IRegisterGroupDMContext[getData().fValues.length];
+                    for (int i = 0; i < getData().fValues.length; i++) {
+                        groups[i] = new RegisterGroupDMContext(getSession().getId(), dmc, getData().fValues[i]);
+                    }
+                    rm.setData(groups);
+                    rm.done();
+                };
+            }); 
+    }
+    
+    public void getRegisters(final IDMContext ctx, final DataRequestMonitor<IRegisterDMContext[]> rm) {
+        final PDAThreadDMContext execDmc = DMContexts.getAncestorOfType(ctx, PDAThreadDMContext.class);
+        if ( execDmc == null ) { 
+            PDAPlugin.failRequest(rm, INVALID_HANDLE , "Thread context not found");   //$NON-NLS-1$
+            return;
+        }
+
+        final RegisterGroupDMContext groupDmc = DMContexts.getAncestorOfType(ctx, RegisterGroupDMContext.class);
+        if ( groupDmc == null ) { 
+            PDAPlugin.failRequest(rm, INVALID_HANDLE , "Group context not found");   //$NON-NLS-1$
+            return;
+        }
+
+        fNamesCache.execute(
+            new PDARegistersCommand(execDmc, groupDmc != null ? groupDmc.fName : null), 
+            new DataRequestMonitor<PDARegistersCommandResult>(getExecutor(), rm) {
+                @Override
+                protected void handleSuccess() {
+                    IRegisterDMContext[] groups = new IRegisterDMContext[getData().fRegisters.length];
+                    for (int i = 0; i < getData().fRegisters.length; i++) {
+                        groups[i] = new RegisterDMContext(getSession().getId(), execDmc, groupDmc, getData().fRegisters[i]);
+                    }
+                    rm.setData(groups);
+                    rm.done();
+                };
+            }); 
+        
+    }
+    
+    public void getBitFields( IDMContext dmc , DataRequestMonitor<IBitFieldDMContext[]> rm ) {
+    	
+    	RegisterDMContext registerDmc = DMContexts.getAncestorOfType(dmc, RegisterDMContext.class);
+        
+        if ( registerDmc == null ) { 
+            PDAPlugin.failRequest(rm,INVALID_HANDLE, "No register in context: " + dmc) ;   //$NON-NLS-1$
+            return;
+        }
+        
+        PDABitField[] bitFields = registerDmc.fRegister.fBitFields;
+        BitFieldDMContext[] bitFieldDMCs = new BitFieldDMContext[bitFields.length];
+        
+        for (int i = 0; i < bitFields.length; i++) {
+            bitFieldDMCs[i] = new BitFieldDMContext(getSession().getId(), registerDmc, bitFields[i]);
+        }
+        
+        rm.setData(bitFieldDMCs) ;
+        rm.done();
+    }
+
+    public void writeRegister(final IRegisterDMContext regCtx, String regValue, String formatId, final RequestMonitor rm) {
+        if (regCtx instanceof RegisterDMContext) {
+            IExpressionDMContext exprCtx = createRegisterExpressionDmc( (RegisterDMContext)regCtx );
+            fExpressions.writeExpression(
+                exprCtx, regValue, formatId, false,  
+                new RequestMonitor(getExecutor(), rm) {
+                    @Override
+                    protected void handleSuccess() {
+                        generateRegisterChangedEvent( (RegisterDMContext)regCtx );
+                        rm.done();
+                    }
+                });
+
+        } else {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid context");   //$NON-NLS-1$
+    	}
+        
+    }
+
+    public void writeBitField(final IBitFieldDMContext bitFieldCtx, String bitFieldValue, String formatId, final RequestMonitor rm) {
+        if (bitFieldCtx instanceof BitFieldDMContext) {
+            IExpressionDMContext exprCtx = createBitFieldExpressionDmc( (BitFieldDMContext)bitFieldCtx );
+            fExpressions.writeExpression(
+                exprCtx, bitFieldValue, formatId, false, 
+                new RequestMonitor(getExecutor(), rm) {
+                    @Override
+                    protected void handleSuccess() {
+                        generateRegisterChangedEvent( 
+                            DMContexts.getAncestorOfType(bitFieldCtx, RegisterDMContext.class) );
+                        rm.done();
+                    }
+                });
+        } else {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid context");   //$NON-NLS-1$
+        }
+    }
+    
+    public void writeBitField(IBitFieldDMContext bitFieldCtx, IMnemonic mnemonic, RequestMonitor rm) {
+        if (mnemonic instanceof Mnemonic) {
+            writeBitField(bitFieldCtx, ((Mnemonic)mnemonic).fValue.toString(), NATURAL_FORMAT, rm);
+        } else {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid mnemonic");   //$NON-NLS-1$
+        }
+    }
+
+    public void getAvailableFormats(IFormattedDataDMContext dmc, DataRequestMonitor<String[]> rm) {
+        IExpressionDMContext exprCtx = null;
+        if ( dmc instanceof RegisterDMContext ) {
+            exprCtx = createRegisterExpressionDmc((RegisterDMContext)dmc);
+        } else if ( dmc instanceof BitFieldDMContext ) {
+            exprCtx = createBitFieldExpressionDmc((BitFieldDMContext)dmc);
+        }
+        if (exprCtx != null) {
+            fExpressions.getAvailableFormats(exprCtx, rm);
+        } else {
+            throw new IllegalArgumentException("Invalid register/bit field context " + dmc);
+        }
+    }
+
+    public FormattedValueDMContext getFormattedValueContext(IFormattedDataDMContext dmc, String formatId) {
+        IExpressionDMContext exprCtx = null;
+        if ( dmc instanceof RegisterDMContext ) {
+            exprCtx = createRegisterExpressionDmc((RegisterDMContext)dmc);
+        } else if ( dmc instanceof BitFieldDMContext ) {
+            exprCtx = createBitFieldExpressionDmc((BitFieldDMContext)dmc);
+        }
+        if (exprCtx != null) {
+            return fExpressions.getFormattedValueContext(exprCtx, formatId);
+        } else {
+            throw new IllegalArgumentException("Invalid register/bit field context " + dmc);
+        }
+    }
+
+    public void findRegisterGroup(IDMContext ctx, String name, DataRequestMonitor<IRegisterGroupDMContext> rm) {
+        PDAPlugin.failRequest(rm, NOT_SUPPORTED, "Finding context not supported"); //$NON-NLS-1$
+    }
+    
+    public void findRegister(IDMContext ctx, String name, DataRequestMonitor<IRegisterDMContext> rm) {
+        PDAPlugin.failRequest(rm, NOT_SUPPORTED, "Finding context not supported"); //$NON-NLS-1$
+    }
+
+    public void findBitField(IDMContext ctx, String name, DataRequestMonitor<IBitFieldDMContext> rm) {
+        PDAPlugin.failRequest(rm, NOT_SUPPORTED, "Finding context not supported"); //$NON-NLS-1$
+    }
+    
+    @SuppressWarnings("unchecked")
+    public void getModelData(IDMContext dmc, DataRequestMonitor<?> rm) {
+        /*
+         * This is the method which is called when actual results need to be returned.  We
+         * can be called either with a service DMC for which we return ourselves or we can
+         * be called with the DMC's we have handed out. If the latter is the case then  we
+         * data mine by talking to the Debug Engine.
+         */
+        
+        if (dmc instanceof RegisterGroupDMContext) {
+            getRegisterGroupData((RegisterGroupDMContext)dmc, (DataRequestMonitor<IRegisterGroupDMData>)rm);
+        } else if (dmc instanceof RegisterDMContext) {
+            getRegisterData((RegisterDMContext)dmc, (DataRequestMonitor<IRegisterDMData>)rm);
+        } else if (dmc instanceof BitFieldDMContext) {
+            getBitFieldData((BitFieldDMContext) dmc, (DataRequestMonitor<IBitFieldDMData>)rm);
+        } else if (dmc instanceof FormattedValueDMContext) {
+            getFormattedExpressionValue((FormattedValueDMContext)dmc, (DataRequestMonitor<FormattedValueDMData>)rm);
+        } else {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Unknown DMC type");  //$NON-NLS-1$
+        }
+    }
+
+    public void getFormattedExpressionValue(FormattedValueDMContext dmc, DataRequestMonitor<FormattedValueDMData> rm) {
+        fExpressions.getFormattedExpressionValue(dmc, rm);
+    }
+    
+    public void getRegisterGroupData(IRegisterGroupDMContext regGroupDmc, DataRequestMonitor<IRegisterGroupDMData> rm) {
+        if (regGroupDmc instanceof RegisterGroupDMContext) {
+            rm.setData(new RegisterGroupDMData( ((RegisterGroupDMContext)regGroupDmc).fName ));
+            rm.done();
+        } else {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid context");  //$NON-NLS-1$
+        }
+    }
+
+    public void getRegisterData(IRegisterDMContext regDmc , DataRequestMonitor<IRegisterDMData> rm) {
+        if (regDmc instanceof RegisterDMContext) {
+            rm.setData(new RegisterDMData( ((RegisterDMContext)regDmc).fRegister ));
+            rm.done();
+        } else {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid context");  //$NON-NLS-1$
+        }
+    }
+    
+    public void getBitFieldData(IBitFieldDMContext dmc, final DataRequestMonitor<IBitFieldDMData> rm) {
+        if ( !(dmc instanceof BitFieldDMContext) ) {
+            PDAPlugin.failRequest(rm, INVALID_HANDLE, "Invalid context");  //$NON-NLS-1$
+        }
+    	final BitFieldDMContext bitFieldDmc = (BitFieldDMContext) dmc;
+    	
+    	IExpressionDMContext bitFieldExprDmc = createBitFieldExpressionDmc(bitFieldDmc);
+    	FormattedValueDMContext formattedBitFieldDmc = 
+    	    fExpressions.getFormattedValueContext(bitFieldExprDmc, NATURAL_FORMAT);
+    	fExpressions.getFormattedExpressionValue(
+    	    formattedBitFieldDmc, 
+    	    new DataRequestMonitor<FormattedValueDMData>(getExecutor(), rm) {
+    	        @Override
+    	        protected void handleSuccess() {
+    	            rm.setData(new BitFieldDMData(bitFieldDmc.fBitField, getData().getFormattedValue()));
+    	            rm.done();
+    	        }
+    	    });
+    }
+    
+    private IExpressionDMContext createRegisterExpressionDmc(RegisterDMContext dmc) {
+        return fExpressions.createExpression(dmc, "$" + dmc.fRegister.fName);
+    }
+
+    private IExpressionDMContext createBitFieldExpressionDmc(BitFieldDMContext dmc) {
+        RegisterDMContext regDmc = DMContexts.getAncestorOfType(dmc, RegisterDMContext.class);
+        return fExpressions.createExpression(dmc, "$" + regDmc.fRegister.fName + "." + dmc.fBitField.fName);
+    }
+       
+    
+    @DsfServiceEventHandler 
+    public void eventDispatched(IRunControl.IResumedDMEvent e) {
+    }
+    
+    @DsfServiceEventHandler 
+    public void eventDispatched(
+    IRunControl.ISuspendedDMEvent e) {
+    }
+
+    @DsfServiceEventHandler 
+    public void eventDispatched(final IRegisters.IRegisterChangedDMEvent e) {
+    }
+    
+	private void generateRegisterChangedEvent(RegisterDMContext dmc ) {
+        getSession().dispatchEvent(new RegisterChangedDMEvent(dmc), getProperties());
+    }
+
+    public void eventReceived(Object output) {
+        if (!(output instanceof String)) return;
+        if ("registers".equals(output)) {
+            fNamesCache.reset();
+        }
+    }
+    
+    public void flushCache(IDMContext context) {
+        fExpressions.flushCache(context);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDARunControl.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDARunControl.java
new file mode 100644
index 0000000..4ead140
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDARunControl.java
@@ -0,0 +1,658 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *     Ericsson	AB		  - Modified for handling of multiple threads
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service;
+
+import java.util.Arrays;
+import java.util.Hashtable;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent;
+import org.eclipse.cdt.dsf.datamodel.IDMEvent;
+import org.eclipse.cdt.dsf.debug.service.IRunControl;
+import org.eclipse.cdt.dsf.debug.service.command.IEventListener;
+import org.eclipse.cdt.dsf.service.AbstractDsfService;
+import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.AbstractPDACommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDACommandResult;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAResumeCommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAStepCommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAStepReturnCommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAVMResumeCommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAVMSuspendCommand;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * Service for monitoring and controlling execution state of the DPA 
+ * program.
+ * <p>
+ * This service depends on the {@link PDACommandControl} service.
+ * It must be initialized before this service is initialized.
+ * </p>
+ */
+public class PDARunControl extends AbstractDsfService 
+    implements IRunControl, IEventListener
+{
+    // Implementation note about tracking execution state:
+    // This class implements event handlers for the events that are generated by 
+    // this service itself.  When the event is dispatched, these handlers will
+    // be called first, before any of the clients.  These handlers update the 
+    // service's internal state information to make them consistent with the 
+    // events being issued.  Doing this in the handlers as opposed to when 
+    // the events are generated, guarantees that the state of the service will
+    // always be consistent with the events.
+    // The purpose of this pattern is to allow clients that listen to service 
+    // events and track service state, to be perfectly in sync with the service
+    // state.
+
+    static final private IExecutionDMContext[] EMPTY_TRIGGERING_CONTEXTS_ARRAY = new IExecutionDMContext[0];  
+
+    @Immutable 
+    private static class ThreadResumedEvent extends AbstractDMEvent<IExecutionDMContext> 
+        implements IResumedDMEvent
+    {
+        private final StateChangeReason fReason;
+
+        ThreadResumedEvent(PDAThreadDMContext ctx, StateChangeReason reason) { 
+            super(ctx);
+            fReason = reason;
+        }
+        
+        public StateChangeReason getReason() {
+            return fReason;
+        }
+        
+        @Override
+        public String toString() {
+            return "THREAD RESUMED: " + getDMContext() + " (" + fReason + ")"; 
+        }
+    }
+    
+    @Immutable 
+    private static class VMResumedEvent extends AbstractDMEvent<IExecutionDMContext> 
+        implements IContainerResumedDMEvent
+    {
+        private final StateChangeReason fReason;
+        
+        VMResumedEvent(PDAVirtualMachineDMContext ctx, StateChangeReason reason) { 
+            super(ctx);
+            fReason = reason;
+        }
+
+        public StateChangeReason getReason() {
+            return fReason;
+        }
+
+        public IExecutionDMContext[] getTriggeringContexts() {
+            return EMPTY_TRIGGERING_CONTEXTS_ARRAY;
+        }
+        
+        @Override
+        public String toString() {
+            return "VM RESUMED: (" + fReason + ")"; 
+        }
+    }
+    
+    @Immutable
+    private static class ThreadSuspendedEvent extends AbstractDMEvent<IExecutionDMContext> 
+        implements ISuspendedDMEvent
+    {
+        private final StateChangeReason fReason;
+
+        ThreadSuspendedEvent(PDAThreadDMContext ctx, StateChangeReason reason) { 
+            super(ctx);
+            fReason = reason;
+        }
+        
+        public StateChangeReason getReason() {
+            return fReason;
+        }
+
+        @Override
+        public String toString() {
+            return "THREAD SUSPENDED: " + getDMContext() + " (" + fReason + ")"; 
+        }
+    }
+    
+    @Immutable 
+    private static class VMSuspendedEvent extends AbstractDMEvent<IExecutionDMContext> 
+        implements IContainerSuspendedDMEvent
+    {
+        private final StateChangeReason fReason;
+
+        final private IExecutionDMContext[] fTriggeringThreads;  
+        
+        VMSuspendedEvent(PDAVirtualMachineDMContext ctx, PDAThreadDMContext threadCtx, StateChangeReason reason) { 
+            super(ctx);
+            fReason = reason;
+            if (threadCtx != null) {
+                fTriggeringThreads = new IExecutionDMContext[] { threadCtx };
+            } else {
+                fTriggeringThreads = EMPTY_TRIGGERING_CONTEXTS_ARRAY;
+            }
+        }
+    
+        public StateChangeReason getReason() {
+            return fReason;
+        }
+
+        public IExecutionDMContext[] getTriggeringContexts() {
+            return fTriggeringThreads;
+        }
+
+
+        @Override
+        public String toString() {
+            return "THREAD SUSPENDED: " + getDMContext() + 
+                " (" + fReason + 
+                ", trigger = " + Arrays.asList(fTriggeringThreads) +
+                ")"; 
+        }
+    }
+
+    @Immutable 
+    private static class ExecutionDMData implements IExecutionDMData {
+        private final StateChangeReason fReason;
+        ExecutionDMData(StateChangeReason reason) {
+            fReason = reason;
+        }
+        public StateChangeReason getStateChangeReason() { return fReason; }
+    }
+    
+    private static class ThreadStartedEvent extends AbstractDMEvent<IExecutionDMContext> 
+        implements IStartedDMEvent 
+    {
+        ThreadStartedEvent(PDAThreadDMContext threadCtx) {
+            super(threadCtx);
+        }
+    }
+    
+    private static class ThreadExitedEvent extends AbstractDMEvent<IExecutionDMContext> 
+        implements IExitedDMEvent 
+    {
+        ThreadExitedEvent(PDAThreadDMContext threadCtx) {
+            super(threadCtx);
+        }
+    }
+    
+    // Services 
+    private PDACommandControl fCommandControl;
+
+    // Reference to the virtual machine data model context
+    private PDAVirtualMachineDMContext fDMContext;
+
+    // VM state flags
+	private boolean fVMSuspended = true;
+    private boolean fVMResumePending = false;
+    private boolean fVMSuspendPending = false;
+	private boolean fVMStepping = false;
+	private StateChangeReason fVMStateChangeReason = StateChangeReason.UNKNOWN;
+	
+	// Threads' state data 
+    private static class ThreadInfo {
+        final PDAThreadDMContext fContext;
+        boolean fSuspended = false;
+        boolean fResumePending = false;
+        boolean fSuspendPending = false;
+        boolean fStepping = false;
+        StateChangeReason fStateChangeReason = StateChangeReason.UNKNOWN;        
+
+        ThreadInfo(PDAThreadDMContext context) {
+            fContext = context;
+        }
+        
+        @Override
+        public String toString() {
+            return fContext.toString() + " (" +
+                (fSuspended ? "SUSPENDED, " : "SUSPENDED, ") +
+                fStateChangeReason + 
+                (fResumePending ? ", RESUME_PENDING, " : "") +
+                (fSuspendPending ? ", SUSPEND_PENDING, " : "") +
+                (fStepping ? ", SUSPEND_PENDING, " : "") +
+                ")";
+            		
+        }
+    }
+
+	private Map<Integer,  ThreadInfo> fThreads = new LinkedHashMap<Integer,  ThreadInfo>();
+	
+	
+    public PDARunControl(DsfSession session) {
+        super(session);
+    }
+    
+    @Override
+    protected BundleContext getBundleContext() {
+        return PDAPlugin.getBundleContext();
+    }
+    
+    @Override
+    public void initialize(final RequestMonitor rm) {
+        super.initialize(
+            new RequestMonitor(getExecutor(), rm) { 
+                @Override
+                protected void handleSuccess() {
+                    doInitialize(rm);
+                }});
+    }
+
+    private void doInitialize(final RequestMonitor rm) {
+        // Cache a reference to the command control and the virtual machine context
+        fCommandControl = getServicesTracker().getService(PDACommandControl.class);
+        fDMContext = fCommandControl.getContext();
+
+        // Create the main thread context.
+        fThreads.put(
+            1,
+            new ThreadInfo(new PDAThreadDMContext(getSession().getId(), fDMContext, 1)));
+
+        // Add the run control service as a listener to PDA events, to catch 
+        // suspended/resumed/started/exited events from the command control.
+        fCommandControl.addEventListener(this);
+        
+        // Add the run control service as a listener to service events as well, 
+        // in order to process our own suspended/resumed/started/exited events.
+        getSession().addServiceEventListener(this, null);
+        
+        // Register the service with OSGi
+        register(new String[]{IRunControl.class.getName(), PDARunControl.class.getName()}, new Hashtable<String,String>());
+        
+        rm.done();
+    }
+
+    @Override
+    public void shutdown(final RequestMonitor rm) {
+        fCommandControl.removeEventListener(this);
+        getSession().removeServiceEventListener(this);
+        super.shutdown(rm);
+    }
+    
+    public void eventReceived(Object output) {
+        if (!(output instanceof String)) return;
+        String event = (String)output;
+        
+        int nameEnd = event.indexOf(' ');
+        nameEnd = nameEnd == -1 ? event.length() : nameEnd;
+        String eventName = event.substring(0, nameEnd);
+        
+        PDAThreadDMContext thread = null;
+        StateChangeReason reason = StateChangeReason.UNKNOWN;
+        if (event.length() > nameEnd + 1) {
+            if ( Character.isDigit(event.charAt(nameEnd + 1)) ) {
+                int threadIdEnd = event.indexOf(' ', nameEnd + 1);
+                threadIdEnd = threadIdEnd == -1 ? event.length() : threadIdEnd;
+                try {
+                    int threadId = Integer.parseInt(event.substring(nameEnd + 1, threadIdEnd));
+                    if (fThreads.containsKey(threadId)) {
+                        thread = fThreads.get(threadId).fContext;
+                    } else {
+                        // In case where a suspended event follows directly a 
+                        // started event, a thread may not be in the list of 
+                        // known threads yet.  In this case create the
+                        // thread context based on the ID.
+                        thread = new PDAThreadDMContext(getSession().getId(), fDMContext, threadId);
+                    }
+                } catch (NumberFormatException e) {}
+                if (threadIdEnd + 1 < event.length()) {
+                    reason = parseStateChangeReason(event.substring(threadIdEnd + 1));
+                }
+            } else {
+                reason = parseStateChangeReason(event.substring(nameEnd + 1));
+            }
+        }
+        
+        // Handle PDA debugger suspended/resumed events and issue the 
+        // corresponding Data Model events.  Do not update the state
+        // information until we start dispatching the service events.
+        IDMEvent<?> dmEvent = null;
+        if (eventName.equals("suspended") && thread != null) {
+            dmEvent = new ThreadSuspendedEvent(thread, reason);
+        } else if (eventName.equals("resumed") && thread != null) {
+            dmEvent = new ThreadResumedEvent(thread, reason);
+        } else if (event.startsWith("vmsuspended")) {
+            dmEvent = new VMSuspendedEvent(fDMContext, thread, reason);
+        } else if (event.startsWith("vmresumed")) {
+            dmEvent = new VMResumedEvent(fDMContext, reason);
+        } else if (event.startsWith("started") && thread != null) {
+            dmEvent = new ThreadStartedEvent(thread);
+        } else if (event.startsWith("exited") && thread != null) {
+            dmEvent = new ThreadExitedEvent(thread);
+        }
+        
+        if (dmEvent != null) {
+            getSession().dispatchEvent(dmEvent, getProperties());
+        }
+    }
+    
+    private StateChangeReason parseStateChangeReason(String reasonString) {
+        if (reasonString.startsWith("breakpoint") || reasonString.startsWith("watch")) {
+            return StateChangeReason.BREAKPOINT;
+        } else if (reasonString.equals("step") || reasonString.equals("drop")) {
+            return StateChangeReason.STEP;
+        } else if (reasonString.equals("client")) {
+            return StateChangeReason.USER_REQUEST;
+        } else if (reasonString.startsWith("event")) {
+            return StateChangeReason.SIGNAL;
+        } else {
+            return StateChangeReason.UNKNOWN;
+        } 
+
+    }
+    
+    @DsfServiceEventHandler 
+    public void eventDispatched(ThreadResumedEvent e) {
+        ThreadInfo info = fThreads.get(((PDAThreadDMContext)e.getDMContext()).getID());
+        if (info != null) {
+            info.fSuspended = false;
+            info.fResumePending = false;
+            info.fStateChangeReason = e.getReason();
+            info.fStepping = e.getReason().equals(StateChangeReason.STEP);
+        }
+    }    
+
+
+    @DsfServiceEventHandler 
+    public void eventDispatched(VMResumedEvent e) {
+        fVMSuspended = false;
+        fVMResumePending = false;
+        fVMStateChangeReason = e.getReason();
+        fVMStepping = e.getReason().equals(StateChangeReason.STEP);
+        for (ThreadInfo info : fThreads.values()) {
+            info.fSuspended = false;
+            info.fStateChangeReason = StateChangeReason.CONTAINER;
+            info.fStepping = false;
+        }
+    }    
+
+    @DsfServiceEventHandler 
+    public void eventDispatched(ThreadSuspendedEvent e) {
+        ThreadInfo info = fThreads.get(((PDAThreadDMContext)e.getDMContext()).getID());
+        if (info != null) {
+            info.fSuspended = true;
+            info.fSuspendPending = false;
+            info.fStateChangeReason = e.getReason();
+            info.fStepping = e.getReason().equals(StateChangeReason.STEP);
+        }
+    }
+    
+
+    @DsfServiceEventHandler 
+    public void eventDispatched(VMSuspendedEvent e) {
+        fVMStateChangeReason = e.getReason();
+        fVMSuspendPending = false;
+        fVMSuspended = true;
+        fVMStepping = false;
+        List<IExecutionDMContext> triggeringContexts = Arrays.asList(e.getTriggeringContexts());
+        for (ThreadInfo info : fThreads.values()) {
+            info.fSuspended = true;
+            info.fStateChangeReason = triggeringContexts.contains(info.fContext) 
+                ? StateChangeReason.STEP : StateChangeReason.CONTAINER;
+            info.fStepping = false;
+        }        
+    }
+    
+    @DsfServiceEventHandler 
+    public void eventDispatched(ThreadStartedEvent e) {
+        PDAThreadDMContext threadCtx = (PDAThreadDMContext)e.getDMContext();
+        fThreads.put(threadCtx.getID(), new ThreadInfo(threadCtx));
+    }    
+    
+    @DsfServiceEventHandler 
+    public void eventDispatched(ThreadExitedEvent e) {
+        PDAThreadDMContext threadCtx = (PDAThreadDMContext)e.getDMContext();
+        fThreads.remove(threadCtx.getID());
+    }    
+    
+    public void canResume(IExecutionDMContext context, DataRequestMonitor<Boolean> rm) {
+        rm.setData(doCanResume(context));
+        rm.done();
+    }
+    
+    private boolean doCanResume(IExecutionDMContext context) {
+        if (context instanceof PDAThreadDMContext) {
+            PDAThreadDMContext threadContext = (PDAThreadDMContext)context; 
+            // Threads can be resumed only if the VM is not suspended.
+            if (!fVMSuspended) { 
+                ThreadInfo state = fThreads.get(threadContext.getID());
+                if (state != null) {
+                    return state.fSuspended && !state.fResumePending;
+                }
+            }
+        } else {
+            return fVMSuspended && !fVMResumePending;
+        }
+        return false;
+    }
+    
+    private boolean doCanStep(IExecutionDMContext context, StepType stepType) {
+        if (stepType == StepType.STEP_OVER || stepType == StepType.STEP_RETURN) {
+            if (context instanceof PDAThreadDMContext) {
+                PDAThreadDMContext threadContext = (PDAThreadDMContext)context; 
+                // Only threads can be stepped.  But they can be stepped
+                // while the VM is suspended or when just the thread is suspended.
+                ThreadInfo state = fThreads.get(threadContext.getID());
+                if (state != null) {
+                    return state.fSuspended && !state.fResumePending;
+                }
+            }
+        }
+        return false;        
+    }
+
+    public void canSuspend(IExecutionDMContext context, DataRequestMonitor<Boolean> rm) {
+        rm.setData(doCanSuspend(context));
+        rm.done();
+    }
+    
+    private boolean doCanSuspend(IExecutionDMContext context) {
+        if (context instanceof PDAThreadDMContext) {
+            PDAThreadDMContext threadContext = (PDAThreadDMContext)context; 
+            // Threads can be resumed only if the VM is not suspended.
+            if (!fVMSuspended) { 
+                ThreadInfo state = fThreads.get(threadContext.getID());
+                if (state != null) {
+                    return !state.fSuspended && !state.fSuspendPending;
+                }
+            }
+        } else {
+            return !fVMSuspended && !fVMSuspendPending;
+        }
+        return false;
+    }
+
+	public boolean isSuspended(IExecutionDMContext context) {
+        if (context instanceof PDAThreadDMContext) {
+            PDAThreadDMContext threadContext = (PDAThreadDMContext)context; 
+            // Threads can be resumed only if the VM is not suspended.
+            if (!fVMSuspended) { 
+                ThreadInfo state = fThreads.get(threadContext.getID());
+                if (state != null) {
+                    return state.fSuspended;
+                }
+            }
+        } 
+		return fVMSuspended;
+	}
+
+	public boolean isStepping(IExecutionDMContext context) {
+	    if (!isSuspended(context)) {
+            if (context instanceof PDAThreadDMContext) {
+                PDAThreadDMContext threadContext = (PDAThreadDMContext)context; 
+                // Threads can be resumed only if the VM is not suspended.
+                if (!fVMStepping) { 
+                    ThreadInfo state = fThreads.get(threadContext.getID());
+                    if (state != null) {
+                        return state.fStepping;
+                    }
+                } 
+            } 
+            return fVMStepping;
+	    }
+	    return false;
+    }
+
+	public void resume(IExecutionDMContext context, final RequestMonitor rm) {
+		assert context != null;
+
+		if (doCanResume(context)) { 
+            if (context instanceof PDAThreadDMContext) {
+                final PDAThreadDMContext threadCtx = (PDAThreadDMContext)context;
+                fThreads.get(threadCtx.getID()).fResumePending = true;
+                fCommandControl.queueCommand(
+                    new PDAResumeCommand(threadCtx),
+                    new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) { 
+                        @Override
+                        protected void handleFailure() {
+                            ThreadInfo threadState = fThreads.get(threadCtx.getID());
+                            if (threadState != null) {
+                                threadState.fResumePending = false;
+                            }
+                            super.handleFailure();
+                        }
+                    }
+                );                
+            } else {
+                fVMResumePending = true;
+                fCommandControl.queueCommand(
+                	new PDAVMResumeCommand(fDMContext),
+                	new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) { 
+                        @Override
+                        protected void handleFailure() {
+                            fVMResumePending = false;
+                            super.handleFailure();
+                        }
+                	}
+                );
+            }
+        } else {
+            PDAPlugin.failRequest(rm, INVALID_STATE, "Given context: " + context + ", is already running.");
+        }
+	}
+	
+	public void suspend(IExecutionDMContext context, final RequestMonitor rm){
+		assert context != null;
+
+		if (doCanSuspend(context)) {
+            if (context instanceof PDAThreadDMContext) {
+                final PDAThreadDMContext threadCtx = (PDAThreadDMContext)context;
+                fThreads.get(threadCtx.getID()).fSuspendPending = true;
+                fCommandControl.queueCommand(
+                    new PDAVMSuspendCommand(fDMContext),
+                    new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) { 
+                        @Override
+                        protected void handleFailure() {
+                            ThreadInfo threadState = fThreads.get(threadCtx.getID());
+                            if (threadState != null) {
+                                threadState.fSuspendPending = false;
+                            }
+                            super.handleFailure();
+                        }
+                    }
+                );
+            } else {
+                fVMSuspendPending = true; 
+                fCommandControl.queueCommand(
+                    new PDAVMSuspendCommand(fDMContext),
+                    new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) { 
+                        @Override
+                        protected void handleFailure() {
+                            fVMSuspendPending = false;
+                            super.handleFailure();
+                        }
+                    }
+                );
+            }
+        } else {
+            PDAPlugin.failRequest(rm, IDsfStatusConstants.INVALID_STATE, "Given context: " + context + ", is already suspended."); 
+        }
+    }
+    
+    public void canStep(IExecutionDMContext context, StepType stepType, DataRequestMonitor<Boolean> rm) {
+        rm.setData(doCanStep(context, stepType));
+        rm.done();
+    }
+    
+    public void step(IExecutionDMContext context, StepType stepType, final RequestMonitor rm) {
+    	assert context != null;
+    	
+    	if (doCanStep(context, stepType)) {
+    	    final PDAThreadDMContext threadCtx = (PDAThreadDMContext)context;
+            final boolean vmWasSuspneded = fVMSuspended;
+    	    
+    	    if (vmWasSuspneded) {
+                fVMResumePending = true;
+    	    } else {
+    	        fThreads.get(threadCtx.getID()).fResumePending = true;
+    	    }
+
+    	    AbstractPDACommand<PDACommandResult> stepCommand = 
+    	        stepType == StepType.STEP_RETURN 
+    	            ? new PDAStepReturnCommand(threadCtx)
+    	            : new PDAStepCommand(threadCtx);
+    	           
+    	    
+            fCommandControl.queueCommand(
+                stepCommand, 
+                new DataRequestMonitor<PDACommandResult>(getExecutor(), rm) {
+                    @Override
+                    protected void handleFailure() {
+                        // If the step command failed, we no longer
+                        // expect to receive a resumed event.
+                        if (vmWasSuspneded) {
+                            fVMResumePending = false;
+                        } else {
+                            ThreadInfo threadState = fThreads.get(threadCtx.getID());
+                            if (threadState != null) {
+                                threadState.fResumePending = false;
+                            }
+                        }
+                    }
+                });
+
+    	} else {
+            PDAPlugin.failRequest(rm, INVALID_STATE, "Cannot resume context"); 
+            return;
+        }
+    }
+
+    public void getExecutionContexts(final IContainerDMContext containerDmc, final DataRequestMonitor<IExecutionDMContext[]> rm) {
+        IExecutionDMContext[] threads = new IExecutionDMContext[fThreads.size()];
+        int i = 0;
+        for (ThreadInfo info : fThreads.values()) {
+            threads[i++] = info.fContext;
+        }
+        rm.setData(threads);
+        rm.done();
+    }
+    
+	public void getExecutionData(IExecutionDMContext dmc, DataRequestMonitor<IExecutionDMData> rm) {
+	    if (dmc instanceof PDAThreadDMContext) {
+	        ThreadInfo info = fThreads.get(((PDAThreadDMContext)dmc).getID());
+	        if (info == null) {
+                PDAPlugin.failRequest(rm, INVALID_HANDLE, "Unknown DMC type");
+	            return;
+	        } 
+            rm.setData( new ExecutionDMData(info.fStateChangeReason) );
+	    } else {
+	        rm.setData( new ExecutionDMData(fVMStateChangeReason) );
+	    }
+        rm.done();
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAStack.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAStack.java
new file mode 100644
index 0000000..5e86e56
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAStack.java
@@ -0,0 +1,466 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service;
+
+import java.util.Hashtable;
+
+import org.eclipse.cdt.core.IAddress;
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.datamodel.AbstractDMContext;
+import org.eclipse.cdt.dsf.datamodel.DMContexts;
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.debug.service.ICachingService;
+import org.eclipse.cdt.dsf.debug.service.IRunControl;
+import org.eclipse.cdt.dsf.debug.service.IStack;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IResumedDMEvent;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.ISuspendedDMEvent;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.StateChangeReason;
+import org.eclipse.cdt.dsf.debug.service.command.CommandCache;
+import org.eclipse.cdt.dsf.service.AbstractDsfService;
+import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAFrame;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAFrameCommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAFrameCommandResult;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAStackCommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAStackCommandResult;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAStackDepthCommand;
+import org.eclipse.cdt.examples.dsf.pda.service.commands.PDAStackDepthCommandResult;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Service for retrieving PDA debugger stack data. 
+ * <p>
+ * This service depends on the {@link PDACommandControl} service and the 
+ * {@link IRunControl} service.  These services must be initialized before 
+ * this service is initialized.
+ * </p>
+ */
+public class PDAStack extends AbstractDsfService implements IStack, ICachingService {
+
+    /**
+     * PDA stack frame contains only the stack frame level.  It is only 
+     * used as an index into the frame data returned by the PDA debugger.
+     */
+    @Immutable
+    private static class FrameDMContext extends AbstractDMContext implements IFrameDMContext {
+
+        final private int fLevel;
+
+        FrameDMContext(String sessionId, PDAThreadDMContext execDmc, int level) {
+            super(sessionId, new IDMContext[] { execDmc });
+            fLevel = level;
+        }
+
+        public int getLevel() { return fLevel; }
+
+        @Override
+        public boolean equals(Object other) {
+            return super.baseEquals(other) && ((FrameDMContext)other).fLevel == fLevel;
+        }
+
+        @Override
+        public int hashCode() {
+            return super.baseHashCode() ^ fLevel;
+        }
+
+        @Override
+        public String toString() { 
+            return baseToString() + ".frame[" + fLevel + "]";  //$NON-NLS-1$ //$NON-NLS-2$
+        }
+    }
+
+    /**
+     * Frame data based on the PDAFrame object returned by the PDA debugger.
+     */
+    @Immutable
+    private static class FrameDMData implements IFrameDMData {
+
+        final private PDAFrame fFrame;
+
+        FrameDMData(PDAFrame frame) {
+            fFrame = frame;
+        }
+
+        public String getFile() {
+            return fFrame.fFilePath.lastSegment();
+        }
+
+        public String getFunction() {
+            return fFrame.fFunction;
+        }
+
+        public int getLine() {
+            return fFrame.fLine + 1;
+        }
+
+        public int getColumn() {
+            return 0;
+        }
+
+        public IAddress getAddress() {
+            return null;
+        }
+
+		public String getModule() {
+			return "";//$NON-NLS-1$
+		}
+    }
+
+    /**
+     * Context representing a variable in a given stack frame.
+     */
+    @Immutable
+    private static class VariableDMContext extends AbstractDMContext implements IVariableDMContext {
+
+        final private String fVariable;
+
+        VariableDMContext(String sessionId, FrameDMContext frameCtx, String variable) {
+            super(sessionId, new IDMContext[] { frameCtx });
+            fVariable = variable;
+        }
+
+        String getVariable() { return fVariable; }
+
+        @Override
+        public boolean equals(Object other) {
+            return super.baseEquals(other) && ((VariableDMContext)other).fVariable.equals(fVariable);
+        }
+
+        @Override
+        public int hashCode() {
+            return super.baseHashCode() + fVariable.hashCode();
+        }
+
+        @Override
+        public String toString() { 
+            return baseToString() + ".variable(" + fVariable + ")";  //$NON-NLS-1$ //$NON-NLS-2$
+        }
+    }
+
+    /**
+     * PDA variable data, only supports returning the variable name.
+     */
+    @Immutable
+    private static class VariableDMData implements IVariableDMData {
+
+        final private String fVariable;
+
+        VariableDMData(String variable) {
+            fVariable = variable;
+        }
+
+        public String getName() {
+            return fVariable;
+        }
+
+        public String getValue() {
+            return null;
+        }
+    }
+
+    // Services that this service depends on.
+    private PDACommandControl fCommandControl;
+    private IRunControl fRunControl;
+
+    // Command cache 
+    private CommandCache fCommandCache;
+
+    public PDAStack(DsfSession session) {
+        super(session);
+    }
+
+    @Override
+    protected BundleContext getBundleContext() {
+        return PDAPlugin.getBundleContext();
+    }
+
+    @Override
+    public void initialize(final RequestMonitor rm) {
+        super.initialize(
+            new RequestMonitor(getExecutor(), rm) { 
+                @Override
+                protected void handleSuccess() {
+                    doInitialize(rm);
+                }});
+    }
+
+    private void doInitialize(final RequestMonitor rm) {
+        // Initialize service references that stack service depends on
+        fCommandControl = getServicesTracker().getService(PDACommandControl.class);
+        fRunControl = getServicesTracker().getService(IRunControl.class);
+
+        // Create the commands cache
+        fCommandCache = new CommandCache(getSession(), fCommandControl);
+
+        // Register to listen for run control events, to clear cache accordingly.
+        getSession().addServiceEventListener(this, null);
+
+        // Register stack service with OSGi
+        register(new String[]{IStack.class.getName(), PDAStack.class.getName()}, new Hashtable<String,String>());
+
+        rm.done();
+    }
+
+    @Override
+    public void shutdown(final RequestMonitor rm) {
+        getSession().removeServiceEventListener(this);
+        fCommandCache.reset();
+        super.shutdown(rm);
+    }
+
+
+    public void getArguments(IFrameDMContext frameCtx, DataRequestMonitor<IVariableDMContext[]> rm) {
+        PDAPlugin.failRequest(rm, IDsfStatusConstants.NOT_SUPPORTED, "PDA debugger does not support function arguments.");
+    }
+
+    public void getFrameData(final IFrameDMContext frameCtx, final DataRequestMonitor<IFrameDMData> rm) {
+        final PDAThreadDMContext threadCtx = 
+            DMContexts.getAncestorOfType(frameCtx, PDAThreadDMContext.class);
+        
+        if (threadCtx == null) {
+            rm.setStatus(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context" + frameCtx, null));
+            rm.done();
+            return;            
+        }
+        
+        getStackDepth(
+            threadCtx, -1, 
+            new DataRequestMonitor<Integer>(getExecutor(), rm) {
+                @Override
+                protected void handleSuccess() {
+                    // PDAFrame array is ordered highest to lowest.  We need to 
+                    // calculate the index based on frame level.
+                    int frameNum = getData() - frameCtx.getLevel() - 1;
+                    if (frameNum < 0) {
+                        PDAPlugin.failRequest(rm, IDsfStatusConstants.INVALID_HANDLE, "Invalid frame level " + frameCtx);
+                        return;
+                    }
+
+                    // Execute the PDA stack command, or retrieve the result from cache if already available.
+                    fCommandCache.execute(
+                        new PDAFrameCommand(threadCtx, frameNum),
+                        new DataRequestMonitor<PDAFrameCommandResult>(getExecutor(), rm) {
+                            @Override
+                            protected void handleSuccess() {
+                                // Create the frame data object based on the corresponding PDAFrame
+                                rm.setData(new FrameDMData(getData().fFrame));
+                                rm.done();
+                            }
+                        });
+                }
+            });
+    }
+
+
+    public void getFrames(IDMContext context, final DataRequestMonitor<IFrameDMContext[]> rm) {
+        // Can only create stack frames for an execution context as a parent, 
+        // however the argument context is a generic context type, so it could 
+        // be an execution context, a frame, a variable, etc. Search the 
+        // hierarchy of the argument context to find the execution one.
+        final PDAThreadDMContext threadCtx = 
+            DMContexts.getAncestorOfType(context, PDAThreadDMContext.class);
+        
+        if (threadCtx == null) {
+            rm.setStatus(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context" + context, null));
+            rm.done();
+            return;            
+        }
+
+        // Execute the stack command and create the corresponding frame contexts.
+        getStackDepth(
+            context, -1, 
+            new DataRequestMonitor<Integer>(getExecutor(), rm) {
+                @Override
+                protected void handleSuccess() {
+                    IFrameDMContext[] frameCtxs = new IFrameDMContext[getData()];
+                    for (int i = 0; i < getData(); i++) {
+                        frameCtxs[i] = new FrameDMContext(getSession().getId(), threadCtx, i);
+                    }
+                    rm.setData(frameCtxs);
+                    rm.done();
+                }
+            });
+    }
+
+    public void getFrames(IDMContext context, final int startIndex, final int endIndex, final DataRequestMonitor<IFrameDMContext[]> rm) {
+        // Validate index range.
+        assert startIndex >=0 && (endIndex < 0 || startIndex <= endIndex);
+        
+        final PDAThreadDMContext threadCtx = 
+            DMContexts.getAncestorOfType(context, PDAThreadDMContext.class);
+        
+        if (threadCtx == null) {
+            rm.setStatus(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context" + context, null));
+            rm.done();
+            return;            
+        }
+
+        // Execute the stack command and create the corresponding frame contexts.
+        getStackDepth(
+            context, -1, 
+            new DataRequestMonitor<Integer>(getExecutor(), rm) {
+                @Override
+                protected void handleSuccess() {
+                    int numFrames = endIndex < 0 
+                        ? (getData() - startIndex) 
+                        : Math.min(endIndex + 1, getData()) - startIndex;
+                    IFrameDMContext[] frameCtxs = new IFrameDMContext[numFrames];
+                    for (int i = 0; i < numFrames; i++) {
+                        frameCtxs[i] = new FrameDMContext(getSession().getId(), threadCtx, startIndex + i);
+                    }
+                    rm.setData(frameCtxs);
+                    rm.done();
+                }
+            });
+    }
+    
+    public void getLocals(IFrameDMContext context, final DataRequestMonitor<IVariableDMContext[]> rm) {
+        if (!(context instanceof FrameDMContext)) {
+            rm.setStatus(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context" + context, null));
+            rm.done();
+            return;            
+        }
+        final FrameDMContext frameCtx = (FrameDMContext)context;
+        
+        final PDAThreadDMContext threadCtx = 
+            DMContexts.getAncestorOfType(frameCtx, PDAThreadDMContext.class);
+        
+        if (threadCtx == null) {
+            rm.setStatus(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context" + frameCtx, null));
+            rm.done();
+            return;            
+        }
+
+        fCommandCache.execute(
+            new PDAStackCommand(threadCtx),
+            new DataRequestMonitor<PDAStackCommandResult>(getExecutor(), rm) {
+                @Override
+                protected void handleSuccess() {
+                    // Find the correct PDAFrame
+                    int frameId = getData().fFrames.length - frameCtx.getLevel() - 1;
+                    if (frameId < 0) {
+                        PDAPlugin.failRequest(rm, IDsfStatusConstants.INVALID_HANDLE, "Invalid frame level " + frameCtx);
+                        return;
+                    }
+                    PDAFrame pdaFrame = getData().fFrames[frameId];
+
+                    // Create variable contexts for all variables in frame.
+                    IVariableDMContext[] variableCtxs = new IVariableDMContext[pdaFrame.fVariables.length];
+                    for (int i = 0; i < pdaFrame.fVariables.length; i++) {
+                        variableCtxs[i] = new VariableDMContext(getSession().getId(), frameCtx, pdaFrame.fVariables[i]);
+                    }
+                    rm.setData(variableCtxs);
+                    rm.done();
+                }
+            });
+
+    }
+
+    public void getStackDepth(IDMContext context, final int maxDepth, final DataRequestMonitor<Integer> rm) {
+        final PDAThreadDMContext threadCtx = 
+            DMContexts.getAncestorOfType(context, PDAThreadDMContext.class);
+        
+        if (threadCtx == null) {
+            rm.setStatus(new Status(IStatus.ERROR, PDAPlugin.PLUGIN_ID, INVALID_HANDLE, "Invalid context" + context, null));
+            rm.done();
+            return;            
+        }
+
+        // Execute stack command and return the data's size.
+        fCommandCache.execute(
+            new PDAStackDepthCommand(threadCtx),
+            new DataRequestMonitor<PDAStackDepthCommandResult>(getExecutor(), rm) {
+                @Override
+                protected void handleSuccess() {
+                    int depth= getData().fDepth;
+                    if (maxDepth > 0 && maxDepth < depth) {
+                    	depth = maxDepth;
+                    }
+					rm.setData(depth);
+                    rm.done();
+                }
+            });
+    }
+
+    public void getTopFrame(IDMContext context, final DataRequestMonitor<IFrameDMContext> rm) {
+        // Can only create stack frames for an execution context as a parent, 
+        // however the argument context is a generic context type, so it could 
+        // be an execution context, a frame, a variable, etc. Search the 
+        // hierarchy of the argument context to find the execution one.
+        final PDAThreadDMContext execCtx = DMContexts.getAncestorOfType(context, PDAThreadDMContext.class);
+        if (execCtx == null) {
+            PDAPlugin.failRequest(rm, IDsfStatusConstants.INVALID_HANDLE, "Invalid context " + context);
+            return;
+        }
+
+        // Since the frame context only contain the level, there's no need to 
+        // call the PDA debugger.  Simply create a context for level 0. 
+        rm.setData(new FrameDMContext(getSession().getId(), execCtx, 0));
+        rm.done();
+    }
+
+    public void getVariableData(IVariableDMContext variableCtx, DataRequestMonitor<IVariableDMData> rm) {
+        if ( !(variableCtx instanceof VariableDMContext) ) {
+            PDAPlugin.failRequest(rm, IDsfStatusConstants.INVALID_HANDLE, "Invalid context " + variableCtx);
+            return;
+        }
+
+        // The variable data doen't contain a value.  So there's no need to 
+        // go to the back end to retrieve it.
+        String variable = ((VariableDMContext)variableCtx).getVariable();
+
+        rm.setData(new VariableDMData(variable));
+        rm.done();
+    }
+
+    public boolean isStackAvailable(IDMContext context) {
+        // Stack is available if the program is suspended or stepping.
+        IExecutionDMContext execCtx = DMContexts.getAncestorOfType(context, IExecutionDMContext.class);
+        return execCtx != null && (fRunControl.isSuspended(execCtx) || (fRunControl.isStepping(execCtx)));
+    }
+    
+    /**
+     * Returns a frame context for the given thread and level;
+     */
+    public IFrameDMContext getFrameDMContext(PDAThreadDMContext thread, int level) {
+        return new FrameDMContext(getSession().getId(), thread, level);
+    }
+
+    @DsfServiceEventHandler 
+    public void eventDispatched(IResumedDMEvent e) {
+        // Mark the cache as not available, so that stack commands will
+        // fail.  Also reset the cache unless it was a step command.
+        fCommandCache.setContextAvailable(e.getDMContext(), false);
+        if (!e.getReason().equals(StateChangeReason.STEP)) {
+            fCommandCache.reset(e.getDMContext());
+        }
+    }    
+
+
+    @DsfServiceEventHandler 
+    public void eventDispatched(ISuspendedDMEvent e) {
+        // Enable sending commands to target and clear the cache.
+        fCommandCache.setContextAvailable(e.getDMContext(), true);
+        fCommandCache.reset(e.getDMContext());
+    }
+
+	public void flushCache(IDMContext context) {
+        fCommandCache.reset(context);	
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAStartedEvent.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAStartedEvent.java
new file mode 100644
index 0000000..36af8dc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAStartedEvent.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service;
+
+import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IStartedDMEvent;
+
+/**
+ * Event issued when the PDA debugger is started.
+ */
+public class PDAStartedEvent extends AbstractDMEvent<IExecutionDMContext> 
+    implements IStartedDMEvent
+{
+    PDAStartedEvent(PDAVirtualMachineDMContext context) {
+        super(context);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDATerminatedEvent.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDATerminatedEvent.java
new file mode 100644
index 0000000..cd17e2c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDATerminatedEvent.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service;
+
+import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IExitedDMEvent;
+
+/**
+ * Event issued when the PDA debugger exits.
+ */
+public class PDATerminatedEvent extends AbstractDMEvent<IExecutionDMContext> 
+    implements IExitedDMEvent
+{
+    PDATerminatedEvent(PDAVirtualMachineDMContext context) {
+        super(context);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAThreadDMContext.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAThreadDMContext.java
new file mode 100644
index 0000000..c7fde0b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAThreadDMContext.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service;
+
+import org.eclipse.cdt.dsf.datamodel.AbstractDMContext;
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
+
+/**
+ * Context representing a PDA thread.
+ */
+public class PDAThreadDMContext extends AbstractDMContext
+    implements IExecutionDMContext 
+{
+    final private Integer fID;
+    
+    public PDAThreadDMContext(String sessionId, PDAVirtualMachineDMContext vmCtx, int id) {
+        super(sessionId, new IDMContext[] { vmCtx });
+        fID = id;
+    }
+
+    public int getID() {
+        return fID;
+    }
+    
+    @Override
+    public String toString() {
+        return super.baseToString() + ".thread[" + fID + "]";
+    }
+    
+    @Override
+    public int hashCode() {
+        return baseHashCode() + fID.hashCode();
+    }
+    
+    @Override
+    public boolean equals(Object obj) {
+        return baseEquals(obj) && ((PDAThreadDMContext)obj).fID.equals(fID);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAVirtualMachineDMContext.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAVirtualMachineDMContext.java
new file mode 100644
index 0000000..f42b286
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAVirtualMachineDMContext.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service;
+
+import org.eclipse.cdt.dsf.datamodel.AbstractDMContext;
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.core.runtime.PlatformObject;
+
+/**
+ * Top-level Data Model context for the PDA debugger representing the while PDA 
+ * virtual machine.  
+ * <p>
+ * The PDA debugger is a single-threaded application.  Therefore this
+ * top level context implements IExecutionDMContext directly, hence this
+ * context can be used to call the IRunControl service to perform run
+ * control opreations.
+ * </p>
+ * <p>
+ * Also, the PDA debugger allows setting breakpoints in scope of the 
+ * whole program only, so this context can be used with the breakpoints 
+ * service to install/remove breakpoints.
+ * </p>
+ * <p>
+ * Note: There should only be one instance of PDAVirtualMachineDMContext 
+ * created by each PDA command control, so its equals method defaults to using 
+ * instance comparison. 
+ * </p>
+ */
+public class PDAVirtualMachineDMContext extends PlatformObject
+    implements ICommandControlDMContext, IContainerDMContext, IBreakpointsTargetDMContext 
+{
+    final static IDMContext[] EMPTY_PARENTS_ARRAY = new IDMContext[0];
+    
+    final private String fSessionId;
+    final private String fProgram;
+    
+    public PDAVirtualMachineDMContext(String sessionId, String program) {
+        fSessionId = sessionId;
+        fProgram = program;
+    }
+
+    public String getSessionId() {
+        return fSessionId;
+    }
+    
+    public String getProgram() {
+        return fProgram;
+    }
+    
+    public IDMContext[] getParents() {
+        return EMPTY_PARENTS_ARRAY;
+    }
+    
+    @Override
+    public String toString() {
+        return "pda[" + getSessionId() + "]";
+    }
+
+    public String getCommandControlId() {
+        return getProgram();
+    }
+    
+    /**
+     * @see AbstractDMContext#getAdapter(Class)
+     */
+    @Override
+    @SuppressWarnings("unchecked")
+    public Object getAdapter(Class adapterType) {
+        Object retVal = null;
+        DsfSession session = DsfSession.getSession(fSessionId);
+        if (session != null) {
+            retVal = session.getModelAdapter(adapterType);
+        }
+        if (retVal == null) {
+            retVal = super.getAdapter(adapterType);
+        }
+        return retVal;
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/AbstractPDACommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/AbstractPDACommand.java
new file mode 100644
index 0000000..cd63bd8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/AbstractPDACommand.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.debug.service.command.ICommand;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandResult;
+
+/**
+ * Base class for PDA commands.  The PDA commands consist of a text request and 
+ * a context.  Since the PDA debugger protocol is stateless, the context is only 
+ * needed to satisfy the ICommand interface.   
+ */
+ at Immutable
+abstract public class AbstractPDACommand<V extends PDACommandResult> implements ICommand<V> {
+
+    final private IDMContext fContext;
+    final private String fRequest;
+    
+    public AbstractPDACommand(IDMContext context, String request) {
+        fContext = context;
+        fRequest = request;
+    }
+    
+    public IDMContext getContext() {
+        return fContext;
+    }
+    
+    public ICommand<? extends ICommandResult> coalesceWith(ICommand<? extends ICommandResult> command) {
+        return null;
+    }
+
+    /**
+     * Returns the request to be sent to PDA. 
+     */
+    public String getRequest() {
+        return fRequest;
+    }
+
+    /**
+     * Returns the command result based on the given PDA response.  This command 
+     * uses the class type parameter as the return type to allow the compiler to 
+     * enforce the correct command result.  This class must be implemented by 
+     * each command to create the concrete result type. 
+     */
+    abstract public V createResult(String resultText);
+    
+    @Override
+    public boolean equals(Object obj) {
+        if (obj instanceof AbstractPDACommand) {
+            AbstractPDACommand<?> cmd = (AbstractPDACommand<?>)obj;
+            return fContext.equals(cmd.fContext) && fRequest.equals(cmd.fRequest);
+        }
+        return false;
+    }
+    
+    @Override
+    public int hashCode() {
+        return fContext.hashCode() + fRequest.hashCode();
+    }
+    
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDABitField.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDABitField.java
new file mode 100644
index 0000000..6daee81
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDABitField.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+
+/**
+ * Object representing a bit field in the stack command results.
+ * 
+ * @see PDARegistersCommand 
+ */
+ at Immutable
+public class PDABitField {
+
+    final public String fName;
+    final public int fOffset;
+    final public int fCount;
+    final public Map<String, String> fMnemonics;
+    
+    PDABitField(String bitFieldString) {
+        StringTokenizer st = new StringTokenizer(bitFieldString, "   ");
+        
+        fName = st.nextToken();
+        fOffset = Integer.parseInt(st.nextToken());
+        fCount = Integer.parseInt(st.nextToken());
+        
+        fMnemonics = new LinkedHashMap<String, String>(0);
+        while (st.hasMoreTokens()) {
+            fMnemonics.put(st.nextToken(), st.nextToken());
+        }
+    }
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAChildrenCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAChildrenCommand.java
new file mode 100644
index 0000000..fabfc7d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAChildrenCommand.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Retrieves data stack information 
+ * 
+ * <pre>
+ *    C: children {thread_id} {frame_id} {variable_name}
+ *    R: {child variable 1}|{child variable 2}|{child variable 3}|...|
+ *    
+ * Errors:
+ *    error: invalid thread
+ * </pre>
+ */
+ at Immutable
+public class PDAChildrenCommand extends AbstractPDACommand<PDAListResult> {
+
+    public PDAChildrenCommand(PDAThreadDMContext thread, int frameId, String name  ) {
+        super(thread, "children " + thread.getID() + " " + frameId + " " + name);
+    }
+    
+    @Override
+    public PDAListResult createResult(String resultText) {
+        return new PDAListResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAClearBreakpointCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAClearBreakpointCommand.java
new file mode 100644
index 0000000..2550af7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAClearBreakpointCommand.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAVirtualMachineDMContext;
+
+/**
+ * Clears any breakpoint set on given line
+ * 
+ * <pre>
+ *    C: clear {line}
+ *    R: ok
+ * </pre>
+
+ */
+ at Immutable
+public class PDAClearBreakpointCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDAClearBreakpointCommand(PDAVirtualMachineDMContext context, int line) {
+        super(context, "clear " + (line - 1));
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDACommandResult.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDACommandResult.java
new file mode 100644
index 0000000..47fefea
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDACommandResult.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.dsf.debug.service.command.ICommand;
+import org.eclipse.cdt.dsf.debug.service.command.ICommandResult;
+
+
+/**
+ * Basic command result object.  This command result simply allows access to the 
+ * PDA response.  Sub-classes may override to optionally parse the response text
+ * and return higher-level objects.
+ */
+ at Immutable
+public class PDACommandResult implements ICommandResult {
+
+    final public String fResponseText;
+    
+    public PDACommandResult(String response) {
+        fResponseText = response;
+    }
+    
+    public <V extends ICommandResult> V getSubsetResult(ICommand<V> command) {
+        return null;
+    }
+    
+    @Override
+    public boolean equals(Object obj) {
+        if (obj instanceof PDACommandResult) {
+            PDACommandResult result = (PDACommandResult)obj;
+            return fResponseText.equals(result.fResponseText);
+        }
+        return false;
+    }
+    
+    @Override
+    public int hashCode() {
+        return fResponseText.hashCode();
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDADataCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDADataCommand.java
new file mode 100644
index 0000000..bc9adc3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDADataCommand.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Retrieves data stack information 
+ * 
+ * <pre>
+ *    C: data {thread_id}
+ *    R: {value 1}|{value 2}|{value 3}|...|
+ *    
+ * Errors:
+ *    error: invalid thread
+ * </pre>
+ */
+ at Immutable
+public class PDADataCommand extends AbstractPDACommand<PDAListResult> {
+
+    public PDADataCommand(PDAThreadDMContext thread) {
+        super(thread, "data " + thread.getID());
+    }
+    
+    @Override
+    public PDAListResult createResult(String resultText) {
+        return new PDAListResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDADropFrameCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDADropFrameCommand.java
new file mode 100644
index 0000000..43566d1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDADropFrameCommand.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Returns from the current frame without executing the rest of instructions.  
+ * 
+ * <pre>
+ * If VM running:
+ *    C: drop {thread_id}
+ *    R: ok
+ *    E: resumed {thread_id} drop
+ *    E: suspended {thread_id} drop
+ *    
+ * If VM suspended:
+ *    C: drop {thread_id}
+ *    R: ok
+ *    E: vmresumed drop
+ *    E: vmsuspended {thread_id} drop
+ *    
+ * Errors:
+ *    error: invalid thread
+ * </pre>
+ */
+ at Immutable
+public class PDADropFrameCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDADropFrameCommand(PDAThreadDMContext thread) {
+        super(thread, "drop " + thread.getID());
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAEvalCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAEvalCommand.java
new file mode 100644
index 0000000..9a7fea6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAEvalCommand.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Sets what events cause the execution to stop.
+ * 
+ * <pre>
+ *    C: eval {thread_id} {instruction}%20{parameter}|{instruction}%20{parameter}|...
+ *    R: ok
+ *    E: resumed {thread_id} client
+ *    E: evalresult result
+ *    E: suspended {thread_id} eval
+ *    
+ * Errors:
+ *    error: invalid thread
+ *    error: cannot evaluate while vm is suspended
+ *    error: thread running        
+ * </pre>
+ * 
+ * Where event_name could be <code>unimpinstr</code> or <code>nosuchlabel</code>.  
+ */
+ at Immutable
+public class PDAEvalCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDAEvalCommand(PDAThreadDMContext thread, String operation) {
+        super(thread, "eval " + thread.getID() + " " + operation);
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAEventStopCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAEventStopCommand.java
new file mode 100644
index 0000000..3ca751f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAEventStopCommand.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAVirtualMachineDMContext;
+
+/**
+ * Sets what events cause the execution to stop.
+ * 
+ * <pre>
+ *    C: eventstop {event_name} {0|1}
+ *    R: ok
+ *    ...
+ *    E: suspended event {event_name}
+ * </pre>
+ * 
+ * Where event_name could be <code>unimpinstr</code> or <code>nosuchlabel</code>.  
+ */
+ at Immutable
+public class PDAEventStopCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public enum Event { UNIMPINSTR, NOSUCHLABEL };
+    
+    public PDAEventStopCommand(PDAVirtualMachineDMContext context, Event event, boolean enable) {
+        super(context, 
+              "eventstop " + 
+              (event == Event.UNIMPINSTR ? "unimpinstr " : "nosuchlabel ") + 
+              (enable ? "1" : "0"));
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAExitCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAExitCommand.java
new file mode 100644
index 0000000..7bc192f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAExitCommand.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAVirtualMachineDMContext;
+
+/**
+ * Instructs the debugger to exit.
+ * 
+ * <pre>
+ *    C: exit
+ *    R: ok
+ * </pre>
+ */
+ at Immutable
+public class PDAExitCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDAExitCommand(PDAVirtualMachineDMContext context) {
+        super(context, "exit");
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAFrame.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAFrame.java
new file mode 100644
index 0000000..9b6b0e2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAFrame.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * Object representing a frame in the stack command results.
+ * 
+ * @see PDAStackCommand 
+ */
+ at Immutable
+public class PDAFrame {
+
+    final public IPath fFilePath;
+    final public int fLine;
+    final public String fFunction;
+    final public String[] fVariables;
+    
+    PDAFrame(String frameString) {
+        StringTokenizer st = new StringTokenizer(frameString, "|");
+        
+        fFilePath = new Path(st.nextToken());
+        fLine = Integer.parseInt(st.nextToken());
+        fFunction = st.nextToken();
+        
+        List<String> variablesList = new ArrayList<String>();
+        while (st.hasMoreTokens()) {
+            variablesList.add(st.nextToken());
+        }
+        fVariables = variablesList.toArray(new String[variablesList.size()]);
+    }
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAFrameCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAFrameCommand.java
new file mode 100644
index 0000000..ee62c5c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAFrameCommand.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Retrieves command stack frame information 
+ * 
+ * <pre>
+ *    C: stack {thread_id} {frame_number}
+ *    R: {file}|{line}|{function}|{var_1}|{var_2}|...
+ *    
+ * Errors:
+ *    error: invalid thread
+ * </pre>
+ */
+ at Immutable
+public class PDAFrameCommand extends AbstractPDACommand<PDAFrameCommandResult> {
+
+    public PDAFrameCommand(PDAThreadDMContext thread, int frameNum) {
+        super(thread, "frame " + thread.getID() + " " + frameNum);
+    }
+    
+    @Override
+    public PDAFrameCommandResult createResult(String resultText) {
+        return new PDAFrameCommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAFrameCommandResult.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAFrameCommandResult.java
new file mode 100644
index 0000000..e430d20
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAFrameCommandResult.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+
+
+/**
+ * @see PDAFrameCommand
+ */
+ at Immutable
+public class PDAFrameCommandResult extends PDACommandResult {
+    
+    /**
+     * Frame data return by the frame command.
+     */
+    final public PDAFrame fFrame;
+    
+    PDAFrameCommandResult(String response) {
+        super(response);
+        fFrame = new PDAFrame(response);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAGroupsCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAGroupsCommand.java
new file mode 100644
index 0000000..1a70dd9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAGroupsCommand.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAVirtualMachineDMContext;
+
+/**
+ * Retrieves register groups information 
+ * 
+ * <pre>
+ *    C: groups
+ *    R: {group 1}|{group 2}|{group 3}|...|
+ * </pre>
+ */
+ at Immutable
+public class PDAGroupsCommand extends AbstractPDACommand<PDAListResult> {
+
+    public PDAGroupsCommand(PDAVirtualMachineDMContext context) {
+        super(context, "groups");
+    }
+    
+    @Override
+    public PDAListResult createResult(String resultText) {
+        return new PDAListResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAListResult.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAListResult.java
new file mode 100644
index 0000000..64519d7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAListResult.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+
+
+/**
+ * @see PDADataCommand
+ */
+ at Immutable
+public class PDAListResult extends PDACommandResult {
+    
+    final public String[] fValues;
+    
+    PDAListResult(String response) {
+        super(response);
+        StringTokenizer st = new StringTokenizer(response, "|");
+        List<String> valuesList = new ArrayList<String>();
+        
+        while (st.hasMoreTokens()) {
+            String token = st.nextToken();
+            if (token.length() != 0) {
+                valuesList.add(token);
+            }
+        }
+        
+        fValues = new String[valuesList.size()];
+        for (int i = 0; i < valuesList.size(); i++) {
+            fValues[i] = valuesList.get(i);
+        }
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAPopDataCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAPopDataCommand.java
new file mode 100644
index 0000000..d2a7cae
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAPopDataCommand.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Pops the top value from the data stack  
+ * 
+ * <pre>
+ *    C: popdata {thread_id}
+ *    R: ok
+ *    
+ * Errors:
+ *    error: invalid thread
+ * </pre>
+ */
+ at Immutable
+public class PDAPopDataCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDAPopDataCommand(PDAThreadDMContext thread) {
+        super(thread, "popdata " + thread.getID());
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAPushDataCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAPushDataCommand.java
new file mode 100644
index 0000000..4237b55
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAPushDataCommand.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Pushes the given value on top of the data stack.
+ * 
+ * <pre>
+ *    C: pushdata {thread_id} {value}
+ *    R: ok
+ *    
+ * Errors:
+ *    error: invalid thread
+ * </pre>
+ */
+ at Immutable
+public class PDAPushDataCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDAPushDataCommand(PDAThreadDMContext thread, int value) {
+        super(thread, "pushdata " + thread.getID() + " " + value);
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDARegister.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDARegister.java
new file mode 100644
index 0000000..a76d9ec
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDARegister.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+
+/**
+ * Object representing a register in the registers command results.
+ * 
+ * @see PDARCommand 
+ */
+ at Immutable
+public class PDARegister {
+
+    final public String fName;
+    final public boolean fWritable;
+    final public PDABitField[] fBitFields;
+    
+    PDARegister(String regString) {
+        StringTokenizer st = new StringTokenizer(regString, "|");
+        
+        String regInfo = st.nextToken();
+        StringTokenizer regSt = new StringTokenizer(regInfo, " ");
+        fName = regSt.nextToken();
+        fWritable = Boolean.parseBoolean(regSt.nextToken());
+        
+        List<PDABitField> bitFieldsList = new ArrayList<PDABitField>();
+        while (st.hasMoreTokens()) {
+            bitFieldsList.add(new PDABitField(st.nextToken()));
+        }
+        fBitFields = bitFieldsList.toArray(new PDABitField[bitFieldsList.size()]);
+    }
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDARegistersCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDARegistersCommand.java
new file mode 100644
index 0000000..ed72790
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDARegistersCommand.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Retrieves registers definition information 
+ * 
+ * <pre>
+ *    C: registers {group name}
+ *    R: {register name} {true|false}|{bit field name} {start bit} {bit count} {mnemonic 1} {mnemonic 2} ...#{register name} ...
+ * </pre>
+ */
+ at Immutable
+public class PDARegistersCommand extends AbstractPDACommand<PDARegistersCommandResult> {
+
+    public PDARegistersCommand(PDAThreadDMContext context, String group) {
+        super(context, "registers " + group);
+    }
+    
+    @Override
+    public PDARegistersCommandResult createResult(String resultText) {
+        return new PDARegistersCommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDARegistersCommandResult.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDARegistersCommandResult.java
new file mode 100644
index 0000000..7a25ae8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDARegistersCommandResult.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+
+
+/**
+ * @see PDARegistersCommand
+ */
+ at Immutable
+public class PDARegistersCommandResult extends PDACommandResult {
+    
+    /**
+     * Array of registers returned by the registers commands.  
+     */
+    final public PDARegister[] fRegisters;
+    
+    PDARegistersCommandResult(String response) {
+        super(response);
+        StringTokenizer st = new StringTokenizer(response, "#");
+        List<PDARegister> regList = new ArrayList<PDARegister>();
+        
+        while (st.hasMoreTokens()) {
+            regList.add(new PDARegister(st.nextToken()));
+        }
+        fRegisters = regList.toArray(new PDARegister[regList.size()]);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAResumeCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAResumeCommand.java
new file mode 100644
index 0000000..4dfc585
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAResumeCommand.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Resumes the execution of a single thread.  Can be issued only if the virtual 
+ * machine is running.
+ * 
+ * <pre>
+ *    C: resume {thread_id}
+ *    R: ok
+ *    E: resumed {thread_id} client
+ *    
+ * Errors:
+ *    error: invalid thread
+ *    error: cannot resume thread when vm is suspended
+ *    error: thread already running
+ * </pre>
+ */
+ at Immutable
+public class PDAResumeCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDAResumeCommand(PDAThreadDMContext thread) {
+        super(thread, "resume " + thread.getID());
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASetBreakpointCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASetBreakpointCommand.java
new file mode 100644
index 0000000..53d62a2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASetBreakpointCommand.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAVirtualMachineDMContext;
+
+/**
+ * Sets a breakpoint at given line
+ * 
+ * <pre>
+ * Suspend a single thread:
+ *    C: set {line_number} 0
+ *    R: ok
+ *    C: resume {thread_id}
+ *    E: resumed {thread_id} client
+ *    E: suspended {thread_id} breakpoint line_number
+ *    
+ * Suspend the VM:
+ *    C: set {line_number} 1
+ *    R: ok
+ *    C: vmresume
+ *    E: vmresumed client
+ *    E: vmsuspended {thread_id} breakpoint line_number
+ * </pre>
+ */
+ at Immutable
+public class PDASetBreakpointCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDASetBreakpointCommand(PDAVirtualMachineDMContext context, int line, boolean stopVM) {
+        super(context, 
+              "set " + 
+              (line - 1) + " " + 
+              (stopVM ? "1" : "0"));
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASetDataCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASetDataCommand.java
new file mode 100644
index 0000000..e6b54aa
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASetDataCommand.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Sets a data value in the data stack at the given location
+ * 
+ * <pre>
+ *    C: setdata {thread_id} {index} {value}
+ *    R: ok
+ *    
+ * Errors:
+ *    error: invalid thread
+ * </pre>
+ */
+ at Immutable
+public class PDASetDataCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDASetDataCommand(PDAThreadDMContext thread, int index, String value) {
+        super(thread, "setdata " + thread.getID() + " " + index + " " + value);
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASetVarCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASetVarCommand.java
new file mode 100644
index 0000000..2cab241
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASetVarCommand.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Sets a variable value 
+ * 
+ * <pre>
+ *    C: setvar {thread_id} {frame_number} {variable} {value}
+ *    R: ok
+ *    
+ * Errors:
+ *    error: invalid thread
+ * </pre>
+ */
+ at Immutable
+public class PDASetVarCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDASetVarCommand(PDAThreadDMContext thread, int frame, String variable, String value) {
+        super(thread, "setvar " + thread.getID() + " " + frame + " " + variable + " " + value);
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackCommand.java
new file mode 100644
index 0000000..57e90b8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackCommand.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Retrieves command stack information 
+ * 
+ * <pre>
+ *    C: stack {thread_id}
+ *    R: {file}|{line}|{function}|{var_1}|{var_2}|...#{file}|{line}|{function}|{var_1}|{var_2}|...#...
+ *    
+ * Errors:
+ *    error: invalid thread
+ * </pre>
+ */
+ at Immutable
+public class PDAStackCommand extends AbstractPDACommand<PDAStackCommandResult> {
+
+    public PDAStackCommand(PDAThreadDMContext thread) {
+        super(thread, "stack " + thread.getID());
+    }
+    
+    @Override
+    public PDAStackCommandResult createResult(String resultText) {
+        return new PDAStackCommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackCommandResult.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackCommandResult.java
new file mode 100644
index 0000000..d7e1a0c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackCommandResult.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+
+
+/**
+ * @see PDAStackCommand
+ */
+ at Immutable
+public class PDAStackCommandResult extends PDACommandResult {
+    
+    /**
+     * Array of frames return by the stack commands.  The frames are ordered 
+     * with the highest-level frame first.
+     */
+    final public PDAFrame[] fFrames;
+    
+    PDAStackCommandResult(String response) {
+        super(response);
+        StringTokenizer st = new StringTokenizer(response, "#");
+        List<PDAFrame> framesList = new ArrayList<PDAFrame>();
+        
+        while (st.hasMoreTokens()) {
+            framesList.add(new PDAFrame(st.nextToken()));
+        }
+        fFrames = framesList.toArray(new PDAFrame[framesList.size()]);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackDepthCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackDepthCommand.java
new file mode 100644
index 0000000..225f5c3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackDepthCommand.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Retrieves command stack depth 
+ * 
+ * <pre>
+ *    C: stackdepth {thread_id}
+ *    R: {depth}
+ *    
+ * Errors:
+ *    error: invalid thread
+ * </pre>
+ */
+ at Immutable
+public class PDAStackDepthCommand extends AbstractPDACommand<PDAStackDepthCommandResult> {
+
+    public PDAStackDepthCommand(PDAThreadDMContext thread) {
+        super(thread, "stackdepth " + thread.getID());
+    }
+    
+    @Override
+    public PDAStackDepthCommandResult createResult(String resultText) {
+        return new PDAStackDepthCommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackDepthCommandResult.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackDepthCommandResult.java
new file mode 100644
index 0000000..d2e1b45
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStackDepthCommandResult.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+
+
+/**
+ * @see PDADataCommand
+ */
+ at Immutable
+public class PDAStackDepthCommandResult extends PDACommandResult {
+    
+    final public int fDepth;
+    
+    PDAStackDepthCommandResult(String response) {
+        super(response);
+        int depth = 1; // default to something that won't cause NPEs
+        try {
+            depth = Integer.parseInt(response);
+        } catch (NumberFormatException e) {}
+        fDepth = depth;
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStepCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStepCommand.java
new file mode 100644
index 0000000..3fc8514
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStepCommand.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Executes next instruction 
+ * 
+ * <pre>
+ * If VM running:
+ *    C: step {thread_id}
+ *    R: ok
+ *    E: resumed {thread_id} client
+ *    E: suspended {thread_id} step
+ *    
+ * If VM suspended:
+ *    C: step {thread_id}
+ *    R: ok
+ *    E: vmresumed client
+ *    E: vmsuspended {thread_id} step
+ *    
+ * Errors:
+ *    error: invalid thread
+ * </pre>
+ */
+ at Immutable
+public class PDAStepCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDAStepCommand(PDAThreadDMContext thread) {
+        super(thread, "step " + thread.getID());
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStepReturnCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStepReturnCommand.java
new file mode 100644
index 0000000..9a45f87
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAStepReturnCommand.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Executes instructions until the current subroutine is finished 
+ * 
+ * <pre>
+ * If VM running:
+ *    C: stepreturn {thread_id}
+ *    R: ok
+ *    E: resumed {thread_id} client
+ *    E: suspended {thread_id} step
+ *    
+ * If VM suspended:
+ *    C: stepreturn {thread_id}
+ *    R: ok
+ *    E: vmresumed client
+ *    E: vmsuspended {thread_id} step
+ *    
+ * Errors:
+ *    error: invalid thread
+ * </pre>
+ */
+ at Immutable
+public class PDAStepReturnCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDAStepReturnCommand(PDAThreadDMContext thread) {
+        super(thread, "stepreturn " + thread.getID());
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASuspendCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASuspendCommand.java
new file mode 100644
index 0000000..cdc1259
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDASuspendCommand.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Suspends execution of a single thread.  Can be issued only if the virtual 
+ * machine is running.
+ * 
+ * <pre>
+ *    C: suspend {thread_id}
+ *    R: ok
+ *    E: suspended {thread_id} client
+ *    
+ * Errors:
+ *    error: invalid thread
+      error: vm already suspended
+ *    error: thread already suspended
+ * </pre>
+ */
+ at Immutable
+public class PDASuspendCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDASuspendCommand(PDAThreadDMContext thread) {
+        super(thread, "suspend " + thread.getID());
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAVMResumeCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAVMResumeCommand.java
new file mode 100644
index 0000000..48ff410
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAVMResumeCommand.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAVirtualMachineDMContext;
+
+/**
+ * Resumes the execution of the whole virtual machine  
+ * 
+ * <pre>
+ *    C: vmresume
+ *    R: ok
+ *    E: vmresumed client
+ *    
+ * Errors:
+ *    error: vm already running
+ * </pre>
+ */
+ at Immutable
+public class PDAVMResumeCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDAVMResumeCommand(PDAVirtualMachineDMContext context) {
+        super(context, "vmresume");
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAVMSuspendCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAVMSuspendCommand.java
new file mode 100644
index 0000000..11259a8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAVMSuspendCommand.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAVirtualMachineDMContext;
+
+/**
+ * Suspends the execution of the whole virtual machine 
+ * 
+ * <pre>
+ *    C: vmsuspend
+ *    R: ok
+ *    E: vmsuspended client
+ *    
+ * Errors:
+ *    error: thread already suspended
+ * </pre>
+ */
+ at Immutable
+public class PDAVMSuspendCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDAVMSuspendCommand(PDAVirtualMachineDMContext context) {
+        super(context, "vmsuspend");
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAVarCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAVarCommand.java
new file mode 100644
index 0000000..a6c15e1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAVarCommand.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAThreadDMContext;
+
+/**
+ * Retrieves variable value 
+ * 
+ * <pre>
+ *    C: var  {thread_id} {frame_number} {variable_name}
+ *    R: {variable_value}
+ *    
+ * Errors:
+ *    error: invalid thread
+ *    error: variable undefined
+ * </pre>
+ */
+ at Immutable
+public class PDAVarCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public PDAVarCommand(PDAThreadDMContext thread, int frameId, String name) {
+        super(thread, "var " + thread.getID() + " " + frameId + " " + name);
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAWatchCommand.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAWatchCommand.java
new file mode 100644
index 0000000..5bc90bc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAWatchCommand.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.service.commands;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.examples.dsf.pda.service.PDAVirtualMachineDMContext;
+
+/**
+ * Sets a watchpoint on a given variable
+ * 
+ * <pre>
+ *    C: watch {function}::{variable_name} {watch_operation}
+ *    R: ok
+ *    C: vmresume
+ *    R: vmresumed client
+ *    E: vmsuspended {thread_id} watch {watch_operation} {function}::{variable_name}
+ * </pre>
+ */
+ at Immutable
+public class PDAWatchCommand extends AbstractPDACommand<PDACommandResult> {
+
+    public enum WatchOperation { READ, WRITE, BOTH, NONE };
+    
+    private static int getWatchOperationCode(WatchOperation operation) {
+        switch (operation) {
+        case READ:
+            return 1;
+        case WRITE:
+            return 2;
+        case BOTH:
+            return 3;
+        default:
+            return 0;
+        }
+    }
+    
+    public PDAWatchCommand(PDAVirtualMachineDMContext context, String function, String variable, WatchOperation operation) {
+        super(context, "watch " + function+ "::" + variable + " " + getWatchOperationCode(operation));
+    }
+    
+    @Override
+    public PDACommandResult createResult(String resultText) {
+        return new PDACommandResult(resultText);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/sourcelookup/PDASourceLookupDirector.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/sourcelookup/PDASourceLookupDirector.java
new file mode 100644
index 0000000..e56392a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/sourcelookup/PDASourceLookupDirector.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.sourcelookup;
+
+import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector;
+
+/**
+ * PDA source lookup director.
+ */
+public class PDASourceLookupDirector extends AbstractSourceLookupDirector {
+	public void initializeParticipants() {
+	    // No need to add participants here, the source display adapter will
+	    // add the participant with the correct session ID.
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/sourcelookup/PDASourcePathComputerDelegate.java b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/sourcelookup/PDASourcePathComputerDelegate.java
new file mode 100644
index 0000000..c5dc4d0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/sourcelookup/PDASourcePathComputerDelegate.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *     Wind River Systems - adopted to use with DSF
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.pda.sourcelookup;
+
+import org.eclipse.cdt.examples.dsf.pda.PDAPlugin;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.sourcelookup.ISourceContainer;
+import org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate;
+import org.eclipse.debug.core.sourcelookup.containers.FolderSourceContainer;
+import org.eclipse.debug.core.sourcelookup.containers.ProjectSourceContainer;
+import org.eclipse.debug.core.sourcelookup.containers.WorkspaceSourceContainer;
+
+
+/**
+ * Computes the default source lookup path for a PDA launch configuration.
+ * The default source lookup path is the folder or project containing 
+ * the PDA program being launched. If the program is not specified, the workspace
+ * is searched by default.
+ * <p>
+ * This class is identical to the corresponding in PDA debugger implemented in 
+ * org.eclipse.debug.examples.
+ * </p>
+ */
+public class PDASourcePathComputerDelegate implements ISourcePathComputerDelegate {
+	
+	public ISourceContainer[] computeSourceContainers(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
+		String path = configuration.getAttribute(PDAPlugin.ATTR_PDA_PROGRAM, (String)null);
+		ISourceContainer sourceContainer = null;
+		if (path != null) {
+			IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(path));
+			if (resource != null) {
+				IContainer container = resource.getParent();
+				if (container.getType() == IResource.PROJECT) {
+					sourceContainer = new ProjectSourceContainer((IProject)container, false);
+				} else if (container.getType() == IResource.FOLDER) {
+					sourceContainer = new FolderSourceContainer(container, false);
+				}
+			}
+		}
+		if (sourceContainer == null) {
+			sourceContainer = new WorkspaceSourceContainer();
+		}
+		return new ISourceContainer[]{sourceContainer};
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/.classpath b/results/plugins/org.eclipse.cdt.examples.dsf/.classpath
new file mode 100644
index 0000000..5f6c006
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src_ant"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/.externalToolBuilders/PreProcessor.launch b/results/plugins/org.eclipse.cdt.examples.dsf/.externalToolBuilders/PreProcessor.launch
new file mode 100644
index 0000000..cc780d8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/.externalToolBuilders/PreProcessor.launch
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.cdt.examples.dsf/build_preprocess.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value=""/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; label=&quot;workingSet&quot; name=&quot;workingSet&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.dd.examples.dsf/src_preprocess&quot; type=&quot;2&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.cdt.examples.dsf/build_preprocess.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/.project b/results/plugins/org.eclipse.cdt.examples.dsf/.project
new file mode 100644
index 0000000..c3e6102
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/.project
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.examples.dsf</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+				<dictionary>
+					<key>LaunchConfigHandle</key>
+					<value>&lt;project&gt;/.externalToolBuilders/PreProcessor.launch</value>
+				</dictionary>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/.settings/org.eclipse.jdt.core.prefs b/results/plugins/org.eclipse.cdt.examples.dsf/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..2c5e26b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,71 @@
+#Tue Jun 24 11:03:17 PDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeUncheckedExceptions=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.cdt.examples.dsf/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..94ceea3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.cdt.examples.dsf;singleton:=true
+Bundle-Version: 2.0.0.qualifier
+Bundle-Activator: org.eclipse.cdt.examples.dsf.DsfExamplesPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.debug.core,
+ org.eclipse.debug.ui,
+ org.eclipse.cdt.dsf,
+ org.eclipse.ui,
+ org.eclipse.cdt.dsf.ui,
+ org.apache.ant;bundle-version="1.7.0";resolution:=optional
+Eclipse-LazyStart: true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.memory.memorybrowser/about.html b/results/plugins/org.eclipse.cdt.examples.dsf/about.html
similarity index 100%
copy from results/plugins/org.eclipse.cdt.debug.ui.memory.memorybrowser/about.html
copy to results/plugins/org.eclipse.cdt.examples.dsf/about.html
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/about.ini b/results/plugins/org.eclipse.cdt.examples.dsf/about.ini
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/about.ini
copy to results/plugins/org.eclipse.cdt.examples.dsf/about.ini
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/about.mappings b/results/plugins/org.eclipse.cdt.examples.dsf/about.mappings
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/about.mappings
copy to results/plugins/org.eclipse.cdt.examples.dsf/about.mappings
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/about.properties b/results/plugins/org.eclipse.cdt.examples.dsf/about.properties
new file mode 100644
index 0000000..1f8b0ed
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/about.properties
@@ -0,0 +1,24 @@
+###############################################################################
+#  Copyright (c) 2002, 2009 Wind River Systems and others.
+#  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
+# 
+#  Contributors:
+#     Wind River Systems - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+# NOTE TO TRANSLATOR: Please do not translate the featureVersion variable.
+
+blurb=CDT Debugger Services Framework (DSF) Examples\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright Eclipse contributors and others, 2000, 2009.  All rights reserved.\n\
+Visit http://www.eclipse.org/cdt
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/build.properties b/results/plugins/org.eclipse.cdt.examples.dsf/build.properties
new file mode 100644
index 0000000..a487449
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/build.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# Copyright (c) 2006, 2008 Wind River Systems and others.
+# 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
+# 
+# Contributors:
+#     Wind River Systems - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               plugin.properties,\
+               about.html,\
+               about.ini,\
+               about.mappings,\
+               about.properties,\
+               eclipse32.gif,\
+               icons/
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/build_preprocess.xml b/results/plugins/org.eclipse.cdt.examples.dsf/build_preprocess.xml
new file mode 100644
index 0000000..6183be5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/build_preprocess.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!-- ======================================================================
+ 	 Copyright (c) 2005, 2008 IBM Corporation and others.\
+ 	 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
+ 
+ 	 Contributors:
+    	 IBM Corporation - initial API and implementation
+         Wind River Systems - adopted to use with DSF
+
+     EclipseCon    
+     DSF Tutorial Exercises
+     ====================================================================== -->
+<project name="EclipseCon" default="generateAll">
+	<description>
+            DSF Tutorial Exercises
+    </description>
+
+	<taskdef name="preprocess" classname="org.eclipse.cdt.examples.ant.tasks.PreProcessor" classpath="bin" />
+	<property name="$workspace" location="c:\eclipse-dev\dev-3.4" />
+	<property name="srcBase" location="${workspace}/org.eclipse.cdt.examples.dsf/src_preprocess" />
+	<property name="destBase" location="${workspace}/org.eclipse.cdt.examples.dsf/src" />
+
+	<!-- ================================= 
+          target: generateAll              
+         ================================= -->
+	<target name="generateAll" description="--> DSF Tutorial Exercises">
+		
+    <!-- = = = = = = = = = = = = = = = = =
+          macrodef: process          
+         = = = = = = = = = = = = = = = = = -->
+    <macrodef name="process">
+        <attribute name="packagedir"/>
+        <sequential>
+            <delete dir="src/@{packagedir}"/>
+            <mkdir dir="src/@{packagedir}"/>
+            <mkdir dir="src/@{packagedir}/answers"/>
+        	<preprocess destdir="src/@{packagedir}" symbols="exercises">
+        		<fileset dir="src_preprocess/@{packagedir}"/>
+        	</preprocess>
+        	<preprocess destdir="src/@{packagedir}/answers" symbols="answers">
+        		<fileset dir="src_preprocess/@{packagedir}"/>
+        	</preprocess>
+        </sequential>
+    </macrodef>
+
+	<process packagedir="org/eclipse/cdt/examples/dsf/requestmonitor"/>
+    <process packagedir="org/eclipse/cdt/examples/dsf/dataviewer"/>
+	</target>
+
+</project>
+
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif b/results/plugins/org.eclipse.cdt.examples.dsf/eclipse32.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif
copy to results/plugins/org.eclipse.cdt.examples.dsf/eclipse32.gif
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/icons/alarm.gif b/results/plugins/org.eclipse.cdt.examples.dsf/icons/alarm.gif
new file mode 100644
index 0000000..33cc76e
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.examples.dsf/icons/alarm.gif differ
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/icons/alarm_triggered.gif b/results/plugins/org.eclipse.cdt.examples.dsf/icons/alarm_triggered.gif
new file mode 100644
index 0000000..609dbb7
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.examples.dsf/icons/alarm_triggered.gif differ
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/icons/layout.gif b/results/plugins/org.eclipse.cdt.examples.dsf/icons/layout.gif
new file mode 100644
index 0000000..4a07fff
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.examples.dsf/icons/layout.gif differ
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/remove_exc.gif b/results/plugins/org.eclipse.cdt.examples.dsf/icons/remove.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/remove_exc.gif
copy to results/plugins/org.eclipse.cdt.examples.dsf/icons/remove.gif
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/icons/sample.gif b/results/plugins/org.eclipse.cdt.examples.dsf/icons/sample.gif
new file mode 100644
index 0000000..34fb3c9
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.examples.dsf/icons/sample.gif differ
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/icons/timer.gif b/results/plugins/org.eclipse.cdt.examples.dsf/icons/timer.gif
new file mode 100644
index 0000000..6089d52
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.examples.dsf/icons/timer.gif differ
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/plugin.properties b/results/plugins/org.eclipse.cdt.examples.dsf/plugin.properties
new file mode 100644
index 0000000..4a98fee
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/plugin.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2006, 2009 Wind River Systems and others.
+# 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
+#
+# Contributors:
+#   Wind River Systems - initial API and implementation
+#   IBM Corporation
+###############################################################################
+pluginName=Debugger Services Framework Examples
+providerName=Eclipse CDT
+
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/plugin.xml b/results/plugins/org.eclipse.cdt.examples.dsf/plugin.xml
new file mode 100644
index 0000000..afe5a85
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/plugin.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+   <extension
+         point="org.eclipse.ui.views">
+      <category
+            name="DSF Examples"
+            id="org.eclipse.cdt.examples.dsf">
+      </category>
+      <view
+            name="Timers View"
+            icon="icons/timer.gif"
+            category="org.eclipse.cdt.examples.dsf"
+            class="org.eclipse.cdt.examples.dsf.timers.TimersView"
+            id="org.eclipse.cdt.examples.dsf.TimersView">
+      </view>
+   </extension>
+   <extension
+         point="org.eclipse.ui.actionSets">
+      <actionSet
+            id="org.eclipse.cdt.dsf.test.actionSet"
+            label="DSF Examples">
+         <menu
+               id="org.eclipse.cdt.examples.dsf"
+               label="DSF Examples"
+               path="additions">
+            <groupMarker name="concurrent"/>
+         </menu>
+         <action
+               class="org.eclipse.cdt.examples.dsf.filebrowser.FileBrowserAction"
+               id="org.eclipse.cdt.dsf.test.fileBrowser"
+               label="Open File Browser Dialog"
+               menubarPath="org.eclipse.cdt.examples.dsf/concurrent"
+               style="push"/>
+      </actionSet>
+   </extension>
+
+</plugin>
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/DsfExamplesPlugin.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/DsfExamplesPlugin.java
new file mode 100644
index 0000000..8799f74
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/DsfExamplesPlugin.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class DsfExamplesPlugin extends AbstractUIPlugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.eclipse.cdt.examples.dsf"; //$NON-NLS-1$
+
+    public static final String IMG_LAYOUT_TOGGLE = "icons/layout.gif"; //$NON-NLS-1$
+    public static final String IMG_ALARM = "icons/alarm.gif"; //$NON-NLS-1$
+    public static final String IMG_ALARM_TRIGGERED = "icons/alarm_triggered.gif"; //$NON-NLS-1$
+    public static final String IMG_TIMER = "icons/timer.gif"; //$NON-NLS-1$
+    public static final String IMG_REMOVE = "icons/remove.gif"; //$NON-NLS-1$
+
+	// The shared instance
+	private static DsfExamplesPlugin fgPlugin;
+	
+    private static BundleContext fgBundleContext; 
+    
+	/**
+	 * The constructor
+	 */
+	public DsfExamplesPlugin() {
+		fgPlugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	@Override
+    public void start(BundleContext context) throws Exception {
+        fgBundleContext = context;
+		super.start(context);
+        getImageRegistry().put(IMG_ALARM, imageDescriptorFromPlugin(PLUGIN_ID, IMG_ALARM));
+        getImageRegistry().put(IMG_ALARM_TRIGGERED, imageDescriptorFromPlugin(PLUGIN_ID, IMG_ALARM_TRIGGERED));
+        getImageRegistry().put(IMG_TIMER, imageDescriptorFromPlugin(PLUGIN_ID, IMG_TIMER));
+        getImageRegistry().put(IMG_REMOVE, imageDescriptorFromPlugin(PLUGIN_ID, IMG_REMOVE));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	@Override
+    public void stop(BundleContext context) throws Exception {
+		super.stop(context);
+        fgPlugin = null;
+        fgBundleContext = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static DsfExamplesPlugin getDefault() {
+		return fgPlugin;
+	}
+
+    public static BundleContext getBundleContext() {
+        return fgBundleContext;
+    }
+
+    /**
+     * Returns an image descriptor for the image file at the given
+     * plug-in relative path
+     *
+     * @param path the path
+     * @return the image descriptor
+     */
+    public static ImageDescriptor getImageDescriptor(String path) {
+        return imageDescriptorFromPlugin(PLUGIN_ID, path);
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserAction.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserAction.java
new file mode 100644
index 0000000..2e686f5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserAction.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.filebrowser;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.actions.ActionDelegate;
+
+/**
+ * Action that opens the File Browser example dialog.
+ */
+public class FileBrowserAction extends ActionDelegate 
+    implements IWorkbenchWindowActionDelegate 
+{
+    private IWorkbenchWindow fWindow;
+    
+    @Override
+    public void run(IAction action) {
+        if (fWindow != null) {
+            // Create the dialog and open it.
+            Dialog dialog = new FileBrowserDialog(fWindow.getShell());
+            dialog.open();
+        }
+    }
+
+    public void init(IWorkbenchWindow window) {
+        fWindow = window;
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserDialog.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserDialog.java
new file mode 100644
index 0000000..807913c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserDialog.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.filebrowser;
+
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * File Browser example dialog.  It hold a tree viewer that displays 
+ * file system contents and a text box for entering a file path to be
+ * shown in the tree. 
+ */
+ at SuppressWarnings("restriction")
+public class FileBrowserDialog extends Dialog {
+
+    /**
+     * Tree viewer for showing the filesystem contents.
+     */
+    private TreeModelViewer fViewer;
+
+    /**
+     * The model adapter for the tree viewer. 
+     */
+    private FileBrowserModelAdapter fModelAdapter;
+    
+    /**
+     * Flag used to disable text-box changed events, when the text
+     * box is updated due to selection change in tree.
+     */
+    private boolean fDisableTextChangeNotifications = false;
+    
+    public FileBrowserDialog(Shell parent) {
+        super(parent);
+        setShellStyle(getShellStyle() | SWT.RESIZE);        
+    }    
+
+    @Override
+    protected Control createDialogArea(Composite parent) {
+        Composite area = (Composite) super.createDialogArea(parent);
+        IPresentationContext presentationContext = new PresentationContext("org.eclipse.cdt.examples.dsf.filebrowser");  //$NON-NLS-1$
+        
+        fViewer = new TreeModelViewer(area, SWT.VIRTUAL, presentationContext);
+        fViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
+        
+        fModelAdapter = new FileBrowserModelAdapter(presentationContext);
+        fViewer.setInput(fModelAdapter.getVMProvider().getViewerInputObject());
+
+        final Text text = new Text(area, SWT.SINGLE | SWT.BORDER);
+        text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+        
+        fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+            public void selectionChanged(SelectionChangedEvent event) {
+                /*
+                 * Update the file name in the text control, to match the 
+                 * selection in the tree.  Do this only if the user is not
+                 * actively typing in the text field (test if text has focus).
+                 */
+                if (!text.isFocusControl() &&
+                    event.getSelection() instanceof IStructuredSelection &&
+                    ((IStructuredSelection)event.getSelection()).getFirstElement() instanceof FileVMContext)
+                {
+                    FileVMContext fileVmc = (FileVMContext)((IStructuredSelection)event.getSelection()).getFirstElement();
+                    
+                    fDisableTextChangeNotifications = true;
+                    text.setText(fileVmc.getFile().getAbsolutePath());
+                    fDisableTextChangeNotifications = false;
+                }
+            }
+        });
+        
+        text.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                if (!fDisableTextChangeNotifications) {
+                    fModelAdapter.getVMProvider().selectionTextChanged(text.getText());
+                }
+            }
+        });
+        
+        return area;
+    }
+    
+    @Override
+    public boolean close() {
+        if (super.close()) {
+            fModelAdapter.dispose();
+            fModelAdapter = null;
+            return true;
+        }
+        return false;
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserModelAdapter.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserModelAdapter.java
new file mode 100644
index 0000000..497b31f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserModelAdapter.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.filebrowser;
+
+import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMAdapter;
+import org.eclipse.cdt.dsf.ui.viewmodel.IVMProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+
+/**
+ * This is the adapter that implements the flexible hierarchy viewer interfaces
+ * for providing content, labels, and event proxy-ing for the viewer.  This 
+ * adapter is registered with the DSF Session object, and is returned by the
+ * IDMContext.getAdapter() and IVMContext.getAdapter() methods, 
+ * which both call {@link DsfSession#getModelAdapter(Class)}.
+ * <p>
+ * The adapter implementation for this exercise is hard-coded to provide 
+ * contents for only one view.  In turn the view contents are determined using 
+ * the configurable ViewModelProvider.  For demonstration purposes, this model
+ * adapter has two different layout configurations that can be used.  These 
+ * layout configurations can be set by calling the {@link #setViewLayout} method.
+ * <p>
+ * This class is primarily accessed by the flexible hierarchy viewer from a 
+ * non-executor thread.  So the class is thread-safe, except for a view methods
+ * which must be called on the executor thread.
+ * 
+ * @see AbstractDMVMProvider
+ */
+ at SuppressWarnings("restriction")
+ at ThreadSafe
+public class FileBrowserModelAdapter extends AbstractVMAdapter
+{
+    FileBrowserVMProvider fViewModelProvider; 
+
+    @Override
+    protected IVMProvider createViewModelProvider(IPresentationContext context) {
+        /*
+         * In this example there is only one viewer, so there is only one 
+         * VMProvider.
+         */
+        return fViewModelProvider;
+    }
+    
+    public FileBrowserModelAdapter(IPresentationContext presentationContext) {
+        super();
+        fViewModelProvider = new FileBrowserVMProvider(this, presentationContext);
+    }    
+
+    FileBrowserVMProvider getVMProvider() {
+        return fViewModelProvider;
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserVMProvider.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserVMProvider.java
new file mode 100644
index 0000000..ef3d098
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserVMProvider.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.filebrowser;
+
+import java.util.concurrent.RejectedExecutionException;
+
+import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMAdapter;
+import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.IRootVMNode;
+import org.eclipse.cdt.dsf.ui.viewmodel.IVMNode;
+import org.eclipse.cdt.dsf.ui.viewmodel.RootVMNode;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+
+/**
+ * 
+ */
+ at SuppressWarnings("restriction")
+public class FileBrowserVMProvider extends AbstractVMProvider 
+{
+    /**
+     * The object to be set to the viewer that shows contents supplied by this provider.
+     * @see org.eclipse.jface.viewers.TreeViewer#setInput(Object)  
+     */
+    private final IAdaptable fViewerInputObject = 
+        new IAdaptable() {
+            /**
+             * The input object provides the viewer access to the viewer model adapter.
+             */
+            @SuppressWarnings("unchecked")
+            public Object getAdapter(Class adapter) {
+                if ( adapter.isInstance(getVMAdapter()) ) {
+                    return getVMAdapter();
+                }
+                return null;
+            }
+            
+            @Override
+            public String toString() {
+                return "File Browser Viewer Input"; //$NON-NLS-1$
+            }
+        };
+
+    /**
+     * Constructor creates and configures the layout nodes to display file 
+     * system contents.  
+     * @param adapter The viewer model adapter that this provider is registered with.
+     * @param presentationContext The presentation context that this provider is 
+     * generating contents for.
+     */
+    public FileBrowserVMProvider(AbstractVMAdapter adapter, IPresentationContext presentationContext) {
+        super(adapter, presentationContext);
+
+        IRootVMNode root = new RootVMNode(this); 
+        IVMNode fileSystemRoots = new FilesystemRootsVMNode(this);
+        addChildNodes(root, new IVMNode[] { fileSystemRoots });
+        IVMNode files = new FileVMNode(this);
+        addChildNodes(fileSystemRoots, new IVMNode[] { files });
+        addChildNodes(files, new IVMNode[] { files });
+        setRootNode(root);
+    }
+    
+    /**
+     * Returns the input object to be set to the viewer that shows contents
+     * supplied by this provider.  
+     */
+    public Object getViewerInputObject() {
+        return fViewerInputObject;
+    }    
+
+    /**
+     * Event handler for file selection text changes in the dialog.
+     * @param text New text entered in file selection text box.
+     */
+    void selectionTextChanged(final String text) {
+        if (isDisposed()) return;
+        
+        // We're in the UI thread.  Re-dispach to VM Adapter executor thread 
+        // and then call root layout node.
+        try {
+            getExecutor().execute(new Runnable() {
+                public void run() {
+                    if (isDisposed()) return;
+                    handleEvent(text);
+                }});
+        } catch (RejectedExecutionException e) {
+            // Ignore.  This exception could be thrown if the provider is being 
+            // shut down.  
+        }
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileVMContext.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileVMContext.java
new file mode 100644
index 0000000..93b8da6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileVMContext.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.filebrowser;
+
+import java.io.File;
+
+import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMContext;
+import org.eclipse.cdt.dsf.ui.viewmodel.IVMNode;
+
+class FileVMContext extends AbstractVMContext {
+    private File fFile;
+    FileVMContext(IVMNode layoutNode, File file) {
+        super(layoutNode);
+        fFile = file;
+    }
+    
+    File getFile() { return fFile; }
+    
+    @Override
+    public boolean equals(Object obj) {
+        return obj instanceof FileVMContext && ((FileVMContext)obj).getFile().equals(fFile);
+    }
+    
+    @Override
+    public int hashCode() {
+        return fFile.hashCode();
+    }
+    
+    @Override
+    public String toString() {
+        return fFile.toString();
+    }
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileVMNode.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileVMNode.java
new file mode 100644
index 0000000..e137dad
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileVMNode.java
@@ -0,0 +1,314 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.filebrowser;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
+import org.eclipse.cdt.dsf.ui.viewmodel.IVMContext;
+import org.eclipse.cdt.dsf.ui.viewmodel.IVMNode;
+import org.eclipse.cdt.dsf.ui.viewmodel.IVMProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.VMDelta;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+
+
+/**
+ * File view model node which returns file elements that are found in the directory 
+ * specified by the parent element.  The child nodes of this node are fixed to 
+ * reference this element, and therefore this node will recursively populate 
+ * the contents of the tree reflecting the underlying filesystem directories.
+ * <br>
+ * Note: this node does NOT sub-class the {@link org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMNode}
+ */
+ at SuppressWarnings("restriction")
+class FileVMNode 
+    implements IElementLabelProvider, IVMNode
+{
+    /**
+     * Reference to the viewer model provider.  It's mainly used to access the
+     * viewer model adapter and its executor.
+     */
+    private final FileBrowserVMProvider fProvider;
+    
+    public FileVMNode(FileBrowserVMProvider provider) {
+        fProvider = provider;
+    }
+
+    @Override
+    public String toString() {
+        return "FileVMNode";  
+    }
+
+
+    public void dispose() {
+        // All resources garbage collected.
+    }
+    
+    public void setChildNodes(IVMNode[] childNodes) {
+        throw new UnsupportedOperationException("This node does not support children."); //$NON-NLS-1$
+    }
+
+    /** 
+     * List of child nodes containing only a reference to this.
+     */
+    private final IVMNode[] fChildNodes = { this };
+
+    public IVMNode[] getChildNodes() {
+        return fChildNodes;
+    }
+    
+    public void update(final IHasChildrenUpdate[] updates) {
+        new Job("") { //$NON-NLS-1$
+            {
+                setSystem(true);
+                setPriority(INTERACTIVE);
+            }
+                
+            @Override
+            protected IStatus run(IProgressMonitor monitor) {
+                for (IHasChildrenUpdate update : updates) {
+                    /*
+                     * Do not retrieve directory contents just to mark the plus
+                     * sign in the tree.  If it's a directory, just assume that
+                     * it has children.
+                     */
+                    FileVMContext vmc = (FileVMContext)update.getElement();
+                    update.setHasChilren(vmc.getFile().isDirectory());
+                    update.done();
+                }
+                
+                return Status.OK_STATUS;
+            }
+        }.schedule();
+    }
+    
+    public void update(final IChildrenCountUpdate[] updates) {
+        new Job("") { //$NON-NLS-1$
+            {
+                setSystem(true);
+                setPriority(INTERACTIVE);
+            }
+                
+            @Override
+            protected IStatus run(IProgressMonitor monitor) {
+                for (IChildrenCountUpdate update : updates) {
+                    update.setChildCount(getFiles(update).length);
+                    update.done();
+                }                
+                return Status.OK_STATUS;
+            }
+        }.schedule();
+    }
+    
+    public void update(final IChildrenUpdate[] updates) {
+        new Job("") { //$NON-NLS-1$
+            {
+                setSystem(true);
+                setPriority(INTERACTIVE);
+            }
+                
+            @Override
+            protected IStatus run(IProgressMonitor monitor) {
+                for (IChildrenUpdate update : updates) {
+                    File[] files = getFiles(update);
+                    int offset = update.getOffset() != -1 ? update.getOffset() : 0;
+                    int length = update.getLength() != -1 ? update.getLength() : files.length;
+                    for (int i = offset; (i < files.length) && (i < (offset + length)); i++) {
+                        update.setChild(new FileVMContext(FileVMNode.this, files[i]), i);
+                    }
+                    update.done();
+                }                
+                return Status.OK_STATUS;
+            }
+        }.schedule();
+    }
+    
+    public void update(final ILabelUpdate[] updates) {
+        new Job("") { //$NON-NLS-1$
+            {
+                setSystem(true);
+                setPriority(INTERACTIVE);
+            }
+                
+            @Override
+            protected IStatus run(IProgressMonitor monitor) {
+                for (ILabelUpdate update : updates) {
+                    update.setLabel(getLabel((FileVMContext)update.getElement()), 0);
+                    update.done();
+                }
+                
+                return Status.OK_STATUS;
+            }
+        }.schedule();
+    }
+
+    private static final File[] EMPTY_FILE_LIST = new File[0];
+
+    /**
+     * Retrieves the list of files for this node.  The list of files is based 
+     * on the parent element in the tree, which must be of type FileVMC. 
+     * 
+     * @param update Update object containing the path (and the parent element) 
+     * in the tree viewer.
+     * @return List of files contained in the directory specified in the 
+     * update object.  An empty list if the parent element is not a directory. 
+     * @throws ClassCastException If the parent element contained in the update 
+     * is NOT of type FileVMC. 
+     */
+    private File[] getFiles(IViewerUpdate update) {
+        FileVMContext vmc = (FileVMContext)update.getElement();
+        File[] files =  vmc.getFile().listFiles();
+        return files != null ? files : EMPTY_FILE_LIST;
+    }
+
+    /**
+     * Returs the text label to show in the tree for given element.
+     */
+    private  String getLabel(FileVMContext vmc) {
+        return vmc.getFile().getName();     
+    }
+
+    public void getContextsForEvent(VMDelta parentDelta, Object event, DataRequestMonitor<IVMContext[]> rm) {
+        rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.NOT_SUPPORTED, "", null)); //$NON-NLS-1$
+        rm.done();
+    }
+    
+    public int getDeltaFlags(Object e) {
+        /*
+         * @see buildDelta()
+         */
+        int retVal = IModelDelta.NO_CHANGE;
+        if (e instanceof String) {
+            retVal |= IModelDelta.SELECT | IModelDelta.EXPAND; 
+        }
+        
+        return retVal;
+    }
+
+    public void buildDelta(final Object event, final VMDelta parentDelta, final int nodeOffset, final RequestMonitor requestMonitor) {
+        /*
+         * The FileLayoutNode is recursive, with itself as the only child.  In this 
+         * method the delta is calculated for a full path VMContext elements, and the
+         * implementation of this method is not recursive.
+         */
+        if (event instanceof String) {
+            new Job("") { //$NON-NLS-1$
+                {
+                    setSystem(true);
+                    setPriority(INTERACTIVE);
+                }
+                    
+                @Override
+                protected IStatus run(IProgressMonitor monitor) {
+                    /*
+                     * Requirements for a selection event to be issued is that the file exist, and
+                     * that the parentDelta contain a FileVMC of a parent directory as its element.
+                     *  
+                     * The test for first the former requirement could be performed inside getDeltaFlags() 
+                     * but getDeltaFlags() is synchronous, so it is better to perform this test here using 
+                     * a background thread (job).
+                     * 
+                     *  The latter is requirement is needed because this node does not have the algorithm 
+                     *  calculate the complete list of root nodes.  That algorithm is implemented inside the
+                     *  {@link FileSystemRootsLayoutNode#updateElements} method.
+                     */
+                    
+                    final File eventFile = new File((String)event);
+                    File parentFile = null;
+                    if (parentDelta.getElement() instanceof FileVMContext) {
+                        parentFile = ((FileVMContext)parentDelta.getElement()).getFile();
+                    }
+
+                    // The file has to exist in order for us to be able to select 
+                    // it in the tree. 
+                    if (eventFile.exists() && parentFile != null) {
+                        // Create a list containing all files in path
+                        List<File> filePath = new LinkedList<File>();
+                        for (File file = eventFile; file != null && !file.equals(parentFile); file = file.getParentFile()) {
+                            filePath.add(0, file);
+                        }
+
+                        if (filePath.size() != 0) {
+                            // Build the delta for all files in path.
+                            ModelDelta delta = parentDelta;
+                            File[] allFilesInDirectory = parentFile.listFiles();
+                            for (File pathSegment : filePath) {
+                                // All files in path should be directories, and should therefore
+                                // have a valid list of elements.
+                                assert allFilesInDirectory != null;
+                                
+                                File[] pathSegmentDirectoryFiles = pathSegment.listFiles();
+                                delta = delta.addNode(
+                                    new FileVMContext(FileVMNode.this, pathSegment), 
+                                    nodeOffset + Arrays.asList(allFilesInDirectory).indexOf(pathSegment), 
+                                    IModelDelta.NO_CHANGE, 
+                                    pathSegmentDirectoryFiles != null ? pathSegmentDirectoryFiles.length : 0);
+                                allFilesInDirectory = pathSegmentDirectoryFiles;
+                            }
+                            
+                            // The last file in path gets the EXPAND | SELECT flags.
+                            delta.setFlags(delta.getFlags() | IModelDelta.SELECT | IModelDelta.EXPAND);
+                        }
+                    }
+                    
+                    // Invoke the request monitor.
+                    
+                    requestMonitor.done();
+
+                    return Status.OK_STATUS;
+                }
+            }.schedule();
+        } else {
+            requestMonitor.done();
+        }            
+    }
+    
+    /**
+     * Override the behavior which checks for delta flags of all the child nodes, 
+     * because we would get stuck in a recursive loop.  Instead call only the child 
+     * nodes which are not us.
+     */
+    protected Map<IVMNode, Integer> getChildNodesWithDeltas(Object e) {
+        Map<IVMNode, Integer> nodes = new HashMap<IVMNode, Integer>(); 
+        for (final IVMNode childNode : getChildNodes()) {
+            int delta = childNode.getDeltaFlags(e);
+            if (delta != IModelDelta.NO_CHANGE) {
+                nodes.put(childNode, delta);
+            }
+        }
+        return nodes;
+    }
+
+    public IVMProvider getVMProvider() {
+        return fProvider;
+    }
+
+    
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FilesystemRootsVMNode.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FilesystemRootsVMNode.java
new file mode 100644
index 0000000..a2eb938
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FilesystemRootsVMNode.java
@@ -0,0 +1,197 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.filebrowser;
+
+import java.io.File;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMNode;
+import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.VMDelta;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+
+
+/**
+ * Viewer model node that populates the filesystem root elements.  
+ */
+ at SuppressWarnings("restriction")
+class FilesystemRootsVMNode extends AbstractVMNode 
+    implements IElementLabelProvider
+{
+    public FilesystemRootsVMNode(AbstractVMProvider provider) {
+        super(provider);
+    }
+
+    @Override
+    public String toString() {
+        return "FilesystemRootsVMNode"; 
+    }
+    
+    public void update(final IChildrenUpdate[] updates) {
+        new Job("") { //$NON-NLS-1$
+            {
+                setSystem(true);
+                setPriority(INTERACTIVE);
+            }
+                
+            @Override
+            protected IStatus run(IProgressMonitor monitor) {
+                File[] files = File.listRoots();
+                for (IChildrenUpdate update : updates) {
+                    int offset = update.getOffset() != -1 ? update.getOffset() : 0;
+                    int length = update.getLength() != -1 ? update.getLength() : files.length;
+                    for (int i = offset; (i < files.length) && (i < (offset + length)); i++) {
+                        update.setChild(new FileVMContext(FilesystemRootsVMNode.this, files[i]), i);
+                    }
+                    update.done();
+                }
+                return Status.OK_STATUS;
+            }
+        }.schedule();
+    }
+    
+    public void update(final IHasChildrenUpdate[] updates) {
+        for (IHasChildrenUpdate update : updates) {
+            /*
+             * Assume that all filesystem roots have children.  If user attempts 
+             * to expand an empty directory, the plus sign will be removed
+             * from the element.
+             */
+            update.setHasChilren(true);
+            update.done();
+        }
+    }
+
+    public void update(final IChildrenCountUpdate[] updates) {
+        new Job("") { //$NON-NLS-1$
+            {
+                setSystem(true);
+                setPriority(INTERACTIVE);
+            }
+                
+            @Override
+            protected IStatus run(IProgressMonitor monitor) {
+                for (IChildrenCountUpdate update : updates) {
+                    if (!checkUpdate(update)) continue;
+                    update.setChildCount(File.listRoots().length);
+                    update.done();
+                }                
+                return Status.OK_STATUS;
+            }
+        }.schedule();
+    }
+
+    public void update(final ILabelUpdate[] updates) {
+        new Job("") { //$NON-NLS-1$
+            {
+                setSystem(true);
+                setPriority(INTERACTIVE);
+            }
+                
+            @Override
+            protected IStatus run(IProgressMonitor monitor) {
+                for (ILabelUpdate update : updates) {
+                    update.setLabel(getLabel((FileVMContext)update.getElement()), 0);
+                    update.done();
+                }
+                
+                return Status.OK_STATUS;
+            }
+        }.schedule();
+    }
+
+    
+    /**
+     * Returs the text label to show in the tree for given element.  Filesystem 
+     * roots return an empty string for call to File.getName(), use the abolute path 
+     * string instead.
+     */
+    private String getLabel(FileVMContext vmc) {
+        return vmc.getFile().getAbsolutePath();     
+    }
+
+    public int getDeltaFlags(Object e) {
+        /*
+         * @see buildDelta()
+         */
+        int retVal = IModelDelta.NO_CHANGE;
+        if (e instanceof String) {
+            retVal |= IModelDelta.SELECT | IModelDelta.EXPAND; 
+        }
+        
+        return retVal;
+    }
+    
+    public void buildDelta(final Object event, final VMDelta parentDelta, final int nodeOffset, final RequestMonitor requestMonitor) {
+        if (event instanceof String) {
+            new Job("") { //$NON-NLS-1$
+                {
+                    setSystem(true);
+                    setPriority(INTERACTIVE);
+                }
+                    
+                @Override
+                protected IStatus run(IProgressMonitor monitor) {
+                    final File eventFile = new File((String)event);
+
+                    if (eventFile.exists()) {
+                        // Create a list containing all files in path of the file from the event
+                        List<File> filePath = new LinkedList<File>();
+                        for (File file = eventFile; file != null; file = file.getParentFile()) {
+                            filePath.add(0, file);
+                        }
+                        File eventRoot = filePath.get(0);  
+                        
+                        // Get the index of the file in list of filesystem roots.
+                        File[] roots = File.listRoots();
+                        
+                        int index = 0;
+                        for (; index < roots.length; index++) {
+                            if (eventRoot.equals(roots[index])) break;
+                        }
+                        
+                        // Check if the specified file is not one of the roots.
+                        if (index < roots.length) {
+                            ModelDelta delta = parentDelta.addNode(
+                                new FileVMContext(FilesystemRootsVMNode.this, eventRoot), 
+                                index, IModelDelta.NO_CHANGE);
+
+                            if (eventFile.equals(eventRoot)) {
+                                // The event is for the root node.  Select it and extend parent node.
+                                delta.setFlags(delta.getFlags() | IModelDelta.SELECT | IModelDelta.EXPAND);
+                            }
+                        } 
+                    }
+                    
+                    // Invoke the request monitor.
+                    requestMonitor.done();
+
+                    return Status.OK_STATUS;
+                }
+            }.schedule();
+        } else {
+            requestMonitor.done();
+        }            
+    }
+    
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/package.html b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/package.html
new file mode 100644
index 0000000..865be83
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/package.html
@@ -0,0 +1,127 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+  <title>DSF Filesystem Browser Example</title>
+</head>
+<body>
+<h2>DSF Filesystem Browser Example</h2>
+<h3>Goals</h3>
+This example demonstrates an implementation of a viewer model with a
+layout node that has itself as a child.&nbsp; Such layout nodes are
+needed to represents elements which themselves have a natural tree
+structures.&nbsp; This example uses filesystem folders as the
+tree-structured data, which is retrieved directly from the java.io.File
+class.&nbsp; This example also demonstrates a viewer model
+implementation which does not retrieve data using DSF services and
+associated data model interfaces.&nbsp; <br>
+<h3><span style="font-weight: bold;">Design</span></h3>
+<span style="text-decoration: underline;">Model Adapter Hookup</span><br>
+A flexible-hierarchy tree viewer {@link
+org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer}
+is created within a model dialog.&nbsp; Corresponding {@link
+FileBrowserModelAdapter} and {@link FileBrowserVMProvider} classes are
+instanciated, and the root element object created by
+FileBrowserVMProvider is set as input to the tree viewer.&nbsp; From
+there FileBrowserModelAdapter is returned as the {@link
+IElementContentProvier} and {@link IModelProxyFactory} for all elements
+in the tree.<br>
+<br>
+<p><span style="text-decoration: underline;">Layout Nodes</span><br>
+There are three layout nodes:<br>
+</p>
+<ul>
+  <li>{@link FileBrowserVMProvider.VMRootLayoutNode} is just a root
+node, which generates the input element for the viewer.</li>
+  <li>{@link FilesystemRootsLayoutNode} retrieves the roots of the
+filesystem hierarchy ("C:\", "D:\", etc on Windows).&nbsp; <br>
+  </li>
+  <li>{@link FileLayoutNode} is a child of <span
+ style="font-family: monospace;">FilesystemRootsLayoutNode</span> and
+it recursively retrieves all folders and files under the given parent
+file element.&nbsp; This layout node does not allow any children nodes
+to be added to it, and it returns only itself as a child node (through
+a call to <span style="font-family: monospace;">IVMLayoutNode.getChildLayoutNodes</span>).<br>
+  </li>
+</ul>
+Both <span style="font-family: monospace;">FilesystemRootsLayoutNode</span>
+and <span style="font-family: monospace;">FileLayoutNode</span> create
+elements of the same type: {@link FileVMContext}.&nbsp; Additionally,
+when populating elements in the tree, the <span
+ style="font-family: monospace;">FileLayoutNode</span> requires that a <span
+ style="font-family: monospace;">FileVMContext</span> element be the
+parent element in order to be able to retrieve its children.&nbsp; <br>
+<span style="font-family: monospace;"></span>
+<p><span style="font-family: monospace;"></span></p>
+<span style="text-decoration: underline;">Event Handling/Generating
+Model Deltas</span><br>
+The view model responds to events generated by a text box in the
+dialog, where the user can type in a filesystem path.&nbsp; If the
+entered path resolves to a file on the filesystem, the view model
+generates a delta to select and reveal the given file in the
+tree.&nbsp; The two file layout nodes handle generating the delta in
+different ways:<br>
+<ul>
+  <li><span style="font-family: monospace;">FilesystemRootsLayoutNode</span>
+is a standard layout node.&nbsp; <br>
+  </li>
+  <ol>
+    <li>In the event handler implementation {@link
+org.eclipse.cdt.dsf.ui.viewermodel.IVMLayoutNode#buildDelta}, the user
+specified file-path is compared to the list of file-system roots.&nbsp;
+      <br>
+    </li>
+    <li>If the user file-path contains one of the filesystem roots, a
+new delta node is added for that root and the child layout node is
+called to continue the delta processing.&nbsp; <br>
+    </li>
+    <li>If the user file-path points to one of the filesystem roots,
+the <span style="font-family: monospace;">IModelDelta.SELECT</span>
+and <span style="font-family: monospace;">IModelDelta.EXPAND</span>
+flags are also added to the delta so that the root will be selected in
+the viewer.<br>
+    </li>
+  </ol>
+  <li><span style="font-family: monospace;">FileLayoutNode</span> is
+the special case, because it is a recusrive node.&nbsp; This node does
+not call any child nodes to process the delta, instead it calculates
+the delta for all file elements in user file-path, starting at the
+parent element. <br>
+  </li>
+  <ol>
+    <li>First the parent <span style="font-family: monospace;">FileVMContext</span>
+element is retrieved from the delta.&nbsp; <br>
+    </li>
+    <li>Then the user file-path is broken down into {@link
+java.io.File} objects representing each segment in the path, starting
+at the parent file element retrieved in step 1.</li>
+    <li>Then a delta node is added for each segment of the calculated
+path.&nbsp; <br>
+    </li>
+    <li><span style="font-family: monospace;">IModelDelta.SELECT</span>
+and <span style="font-family: monospace;">IModelDelta.EXPAND</span>
+flags are added to the last delta.<br>
+    </li>
+  </ol>
+</ul>
+<h3>How to use</h3>
+<ol>
+  <li>Make sure that the DSF examples menu is visible in the perspective</li>
+  <ul>
+    <li>Go to Windows -&gt; Customize Perspective...</li>
+    <li>Select Commands tab</li>
+    <li>Check the "DSF Examples" in the "Available command groups"
+table.</li>
+  </ul>
+  <li>Open the dialog by selecting DSF Examples-&gt;Open File Browser
+Dialog menu item.</li>
+  <li>Expand the items in the tree to see filesystem contents.</li>
+  <li>Select elements in the tree, to fill in text box with selected
+file's path.</li>
+  <li>Type in a file path in text box and have the tree expand to the
+specified element.<br>
+  </li>
+</ol>
+</body>
+</html>
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/AlarmService.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/AlarmService.java
new file mode 100644
index 0000000..3823930
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/AlarmService.java
@@ -0,0 +1,252 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.timers;
+
+import java.util.Hashtable;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.datamodel.AbstractDMContext;
+import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent;
+import org.eclipse.cdt.dsf.datamodel.DMContexts;
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.service.AbstractDsfService;
+import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.examples.dsf.DsfExamplesPlugin;
+import org.eclipse.cdt.examples.dsf.timers.TimerService.TimerDMContext;
+import org.eclipse.cdt.examples.dsf.timers.TimerService.TimerTickDMEvent;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The alarm service tracks triggers and alarms.  Triggers have a specified
+ * value and can be created and removed independently.  Alarms are created
+ * for a specific timer and a trigger, and can indicate whether an alarm is
+ * triggered. 
+ * <p>
+ * This service depends on the TimerService, so the TimerService has to be
+ * initialized before this service is initialized. 
+ * </p>
+ */
+public class AlarmService extends AbstractDsfService
+{
+    /** Event indicating that the list of triggers is changed. */
+    @Immutable
+    public static class TriggersChangedEvent {}
+
+    /** Context representing an alarm tracked by this service. */
+    @Immutable
+    public static class TriggerDMContext extends AbstractDMContext {
+        /** Alarm number, also index into alarm map */
+        final int fNumber;
+        
+        private TriggerDMContext(String sessionId, int number) {
+            super(sessionId, new IDMContext[0]);
+            fNumber = number;
+        }
+        
+        @Override
+        public boolean equals(Object other) {
+            return baseEquals(other) && 
+                ((TriggerDMContext)other).fNumber == fNumber;
+        }
+        
+        public int getTriggerNumber() {
+            return fNumber;
+        }
+        
+        @Override
+        public int hashCode() { 
+            return baseHashCode() + fNumber; 
+        }
+        
+        @Override
+        public String toString() { 
+            return baseToString() + ".trigger[" + fNumber + "]"; 
+        }
+    }            
+    
+    /**
+     * Context representing the "triggered" status of an alarm with respect to 
+     * a specific timer.   
+     */
+    @Immutable
+    public static class AlarmDMContext extends AbstractDMContext {
+        // An alarm requires both a timer and alarm context, both of which
+        // become parents of the alarm context.
+        // Note: beyond the parent contexts this context does not contain
+        // any other data, because no other data is needed.
+        private AlarmDMContext(String sessionId, 
+            TimerDMContext timerCtx, TriggerDMContext alarmCtx) 
+        {
+            super(sessionId, new IDMContext[] { timerCtx, alarmCtx });
+        }
+
+        @Override
+        public boolean equals(Object other) { return baseEquals(other); }
+        
+        @Override
+        public int hashCode() { return baseHashCode(); }
+        
+        @Override
+        public String toString() {
+            return baseToString() + ":alarm"; //$NON-NLS-1$
+        }        
+    }            
+    
+    /**
+     * Event indicating that an alarm has been triggered by a timer. 
+     */
+    public class AlarmTriggeredDMEvent extends AbstractDMEvent<AlarmDMContext> {
+        public AlarmTriggeredDMEvent(AlarmDMContext context) {
+            super(context);
+        }
+    }
+
+    private int fTriggerNumberCounter = 1;
+    private Map<TriggerDMContext, Integer> fTriggers = 
+        new LinkedHashMap<TriggerDMContext, Integer>();
+    
+    AlarmService(DsfSession session) {
+        super(session);
+    }
+    
+    @Override 
+    protected BundleContext getBundleContext() {
+        return DsfExamplesPlugin.getDefault().getBundle().getBundleContext();
+    }    
+
+    @Override 
+    public void initialize(final RequestMonitor requestMonitor) {
+        super.initialize(
+            new RequestMonitor(getExecutor(), requestMonitor) { 
+                @Override
+                protected void handleSuccess() {
+                    // After super-class is finished initializing
+                    // perform TimerService initialization.
+                    doInitialize(requestMonitor);
+                }});
+    }
+            
+    private void doInitialize(RequestMonitor requestMonitor) {
+        // Add this class as a listener for service events, in order to receive 
+        // TimerTickEvent events.
+        getSession().addServiceEventListener(this, null);
+        
+        // Register service
+        register(new String[]{AlarmService.class.getName()}, new Hashtable<String,String>());
+        
+        requestMonitor.done();
+    }
+
+    @Override 
+    public void shutdown(RequestMonitor requestMonitor) {
+        getSession().removeServiceEventListener(this);
+        unregister();
+        super.shutdown(requestMonitor);
+    }
+
+    public boolean isValid() { return true; }
+    
+    @DsfServiceEventHandler
+    public void eventDispatched(TimerTickDMEvent event) {
+        final TimerDMContext timerContext = event.getDMContext();
+        
+        int timerValue = getServicesTracker().getService(TimerService.class).
+            getTimerValue(event.getDMContext());
+        
+        //  If a timer triggers an alarm, this  service needs to issue an alarm 
+        // triggered event.
+        checkAlarmsForTimer(timerContext, timerValue);
+    }
+
+    private void checkAlarmsForTimer(TimerDMContext timerContext, int timerValue) {
+        // Check the existing alarms for whether they are triggered by given 
+        // timer.  
+        for (Map.Entry<TriggerDMContext, Integer> entry : fTriggers.entrySet()) {
+            if (timerValue == entry.getValue()) {
+                // Generate the AlarmTriggeredEvent
+                AlarmDMContext alarmCtx = new AlarmDMContext(
+                    getSession().getId(), timerContext, entry.getKey());
+                getSession().dispatchEvent( 
+                    new AlarmTriggeredDMEvent(alarmCtx), getProperties());
+            }
+        }
+    }
+
+    
+    /** Returns the list of triggers. */
+    public TriggerDMContext[] getTriggers() {
+        return fTriggers.keySet().toArray(new TriggerDMContext[fTriggers.size()]);
+    }
+
+    /** Returns the trigger value. */
+    public int getTriggerValue(TriggerDMContext alarmCtx) {
+        Integer value = fTriggers.get(alarmCtx);
+        if (value != null) {
+            return value;
+        } else {
+            return -1;
+        }
+    }
+
+    /** Returns the alarm context for given timer and trigger contexts. */
+    public AlarmDMContext getAlarm(TriggerDMContext alarmCtx, TimerDMContext timerCtx) {
+        return new AlarmDMContext(getSession().getId(), timerCtx, alarmCtx);
+    }
+
+    /** Returns true if the given alarm is triggered */
+    public boolean isAlarmTriggered(AlarmDMContext alarmCtx) {
+        // Extract the timer and trigger contexts.  They should always be part 
+        // of the alarm.
+        TimerService.TimerDMContext timerCtx = DMContexts.getAncestorOfType(
+            alarmCtx, TimerService.TimerDMContext.class);
+        TriggerDMContext triggerCtx = DMContexts.getAncestorOfType(
+            alarmCtx, TriggerDMContext.class);
+
+        assert triggerCtx != null && timerCtx != null;
+
+        // Find the trigger and check whether the timers value has surpassed it. 
+        if (fTriggers.containsKey(triggerCtx)) {
+            int timerValue = getServicesTracker().getService(TimerService.class).
+                getTimerValue(timerCtx);
+            
+            return timerValue >= fTriggers.get(triggerCtx);
+        }
+        
+        return false;
+    }
+    
+    /** Creates a new alarm object with given value. */
+    public TriggerDMContext createTrigger(int value) {
+        TriggerDMContext triggerCtx = 
+            new TriggerDMContext(getSession().getId(), fTriggerNumberCounter++);
+        fTriggers.put(triggerCtx, value);
+        getSession().dispatchEvent(new TriggersChangedEvent(), getProperties());
+        return triggerCtx;
+    }    
+    
+    /** Removes given alarm from service. */
+    public void deleteTrigger(TriggerDMContext alarmCtx) {
+        fTriggers.remove(alarmCtx);
+        getSession().dispatchEvent(new TriggersChangedEvent(), getProperties());
+    }
+    
+    /** Changes the value of the given trigger. */
+    public void setTriggerValue(TriggerDMContext ctx, int newValue) {
+        if (fTriggers.containsKey(ctx)) {
+            fTriggers.put(ctx, newValue);
+        }
+        getSession().dispatchEvent(new TriggersChangedEvent(), getProperties());
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/AlarmsVMNode.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/AlarmsVMNode.java
new file mode 100644
index 0000000..be7b22f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/AlarmsVMNode.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.timers;
+
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.VMDelta;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMNode;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider;
+import org.eclipse.cdt.examples.dsf.DsfExamplesPlugin;
+import org.eclipse.cdt.examples.dsf.timers.AlarmService.AlarmDMContext;
+import org.eclipse.cdt.examples.dsf.timers.AlarmService.TriggerDMContext;
+import org.eclipse.cdt.examples.dsf.timers.TimerService.TimerDMContext;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+
+/**
+ * View model node that determines whether an "alarm triggered" indicator is 
+ * shown in the tree.  This indicator is only shown if a given alarm is 
+ * triggered for a given timer.
+ * 
+ * @see AlarmDMContext
+ */
+ at SuppressWarnings("restriction")
+class AlarmsVMNode extends AbstractDMVMNode 
+    implements IElementLabelProvider
+{
+    public AlarmsVMNode(AbstractDMVMProvider provider, DsfSession session) {
+        super(provider, session, AlarmDMContext.class);
+    }
+    
+    @Override
+    public String toString() {
+        return "AlarmsVMNode(" + getSession().getId() + ")";
+    }
+    
+
+    @Override
+    protected void updateElementsInSessionThread(final IChildrenUpdate update) {
+        // Check that the service is available and find the trigger and timer contexts.  
+        // If not found, fail.
+        AlarmService alarmService = getServicesTracker().getService(AlarmService.class, null); 
+        TriggerDMContext alarmDmc = findDmcInPath(
+            update.getViewerInput(), update.getElementPath(), TriggerDMContext.class);
+        TimerDMContext timerDmc = findDmcInPath(
+            update.getViewerInput(), update.getElementPath(), TimerDMContext.class);
+        if (alarmService == null || alarmDmc == null || timerDmc == null) {
+            update.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, "Required elements not found in path"));
+            update.done();
+            return;
+        }
+        
+        // Get the alarm context then check the triggered value.  
+        final AlarmDMContext alarmStatusDmc = alarmService.getAlarm(alarmDmc, timerDmc);
+        boolean triggered = alarmService.isAlarmTriggered(alarmStatusDmc); 
+        
+        // Only return the alarm in list of elements if it is triggered.
+        if (triggered) {
+            update.setChild(createVMContext(alarmStatusDmc), 0);
+        }
+        update.done();
+    }
+
+    public void update(ILabelUpdate[] updates) {
+        for (ILabelUpdate update : updates) {
+            update.setLabel("ALARM TRIGGERED", 0);
+            update.setImageDescriptor(
+                DsfExamplesPlugin.getDefault().getImageRegistry().getDescriptor(
+                    DsfExamplesPlugin.IMG_ALARM_TRIGGERED), 
+                0);
+            update.done();
+        }
+    }
+    
+    
+    public int getDeltaFlags(Object e) {
+        if (e instanceof AlarmService.AlarmTriggeredDMEvent) {
+            return IModelDelta.ADDED | IModelDelta.SELECT | IModelDelta.EXPAND;
+        }
+        return IModelDelta.NO_CHANGE;
+    }
+
+    public void buildDelta(Object e, VMDelta parentDelta, int nodeOffset, RequestMonitor requestMonitor) {
+        // The alarm element is added when and selected upon a triggered event.  
+        // Parent element is also expanded allow the alarm to be selected.
+        if (e instanceof AlarmService.AlarmTriggeredDMEvent) {
+            parentDelta.setFlags(parentDelta.getFlags() | IModelDelta.EXPAND);
+            parentDelta.addNode(
+                createVMContext( ((AlarmService.AlarmTriggeredDMEvent)e).getDMContext() ),
+                0,
+                IModelDelta.ADDED | IModelDelta.SELECT);
+        }
+        requestMonitor.done();
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/ServicesShutdownSequence.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/ServicesShutdownSequence.java
new file mode 100644
index 0000000..cb8276c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/ServicesShutdownSequence.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.timers;
+
+import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.Sequence;
+import org.eclipse.cdt.dsf.service.DsfServicesTracker;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.service.IDsfService;
+import org.eclipse.cdt.examples.dsf.DsfExamplesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * Sequence that stops the services in the timers session.  
+ */
+public class ServicesShutdownSequence extends Sequence {
+
+    // Session to that the services are running in.
+    final private DsfSession fSession;
+    
+    // DSF Services is created as the first step of the sequence.  It 
+    // cannot be created by the constructor because it can only be called
+    // in the session thread.
+    DsfServicesTracker fTracker;
+
+    public ServicesShutdownSequence(DsfSession session) {
+        super(session.getExecutor());
+        fSession = session;
+    }
+    
+    Step[] fSteps = new Step[] {
+        new Step() { 
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                fTracker = new DsfServicesTracker(DsfExamplesPlugin.getBundleContext(), fSession.getId());
+                requestMonitor.done();
+            }
+            
+            @Override
+            public void rollBack(RequestMonitor requestMonitor) {
+                // Dispose the tracker in case shutdown sequence is aborted
+                // and is rolled back.
+                fTracker.dispose();
+                fTracker = null;
+                requestMonitor.done();
+            } 
+        },
+        new Step() { 
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                shutdownService(AlarmService.class, requestMonitor);
+            }
+        },
+        new Step() { 
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                shutdownService(TimerService.class, requestMonitor);
+            }
+        },
+        new Step() { 
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                // Dispose the tracker after the services are shut down.
+                fTracker.dispose();
+                fTracker = null;
+                requestMonitor.done();
+            }
+        }
+    };
+    
+    @Override
+    public Step[] getSteps() { return fSteps; }
+
+    // A convenience method that shuts down given service.  Only service class 
+    // is used to identify the service. 
+    private <V extends IDsfService> void shutdownService(Class<V> clazz, RequestMonitor requestMonitor) {
+        IDsfService service = fTracker.getService(clazz);
+        if (service != null) {
+            service.shutdown(requestMonitor);
+        }
+        else {
+            requestMonitor.setStatus(new Status(
+                IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, 
+                IDsfStatusConstants.INTERNAL_ERROR,  
+                "Service '" + clazz.getName() + "' not found.", null));             
+            requestMonitor.done();
+        }
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/ServicesStartupSequence.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/ServicesStartupSequence.java
new file mode 100644
index 0000000..c137bc3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/ServicesStartupSequence.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.timers;
+
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.Sequence;
+import org.eclipse.cdt.dsf.service.DsfSession;
+
+/**
+ * Startup sequence for the timers session.  With only two services, this is 
+ * a very simple sequence. 
+ */
+public class ServicesStartupSequence extends Sequence {
+
+    final private DsfSession fSession;
+    
+    // The reference to the services are saved to use in the last step.
+    private TimerService fTimerService = null;
+    private AlarmService fAlarmService = null;
+    
+
+    public ServicesStartupSequence(DsfSession session) {
+        super(session.getExecutor());
+        fSession = session;
+    }
+
+    Step[] fSteps = new Step[] {
+        new Step() { 
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                fTimerService = new TimerService(fSession);
+                fTimerService.initialize(requestMonitor);
+            }},
+        new Step() { 
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                fAlarmService = new AlarmService(fSession);
+                fAlarmService.initialize(requestMonitor);
+            }},
+        new Step() { 
+            @Override
+            public void execute(RequestMonitor requestMonitor) {
+                // Create the first timer and trigger.
+                fTimerService.startTimer();
+                fAlarmService.createTrigger(5);
+                requestMonitor.done();
+            }}
+    };
+    
+    @Override
+    public Step[] getSteps() { return fSteps; }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimerService.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimerService.java
new file mode 100644
index 0000000..6b05f0a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimerService.java
@@ -0,0 +1,184 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.timers;
+
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
+import org.eclipse.cdt.dsf.concurrent.Immutable;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.datamodel.AbstractDMContext;
+import org.eclipse.cdt.dsf.datamodel.AbstractDMEvent;
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.service.AbstractDsfService;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.examples.dsf.DsfExamplesPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Timer service tracks a set of timers, which are created per user request.
+ * The timers are represented using a Data Model context object, which 
+ * implements {@link IDMContext}.  Each timers value, which can be retrieved
+ * by calling {@link #getTimerValue(TimerDMContext)}, is incremented every 
+ * second.  When a timer value is incremented the TimerService issues a 
+ * {@link TimerTickDMEvent}.
+ */
+public class TimerService extends AbstractDsfService 
+{
+    /** Event indicating that the list of timers is changed. */
+    @Immutable
+    public static class TimersChangedEvent  {}
+    
+    /** Data Model context representing a timer. */
+    @Immutable
+    public static class TimerDMContext extends AbstractDMContext {
+        final int fNumber;
+        
+        public TimerDMContext(String sessionId, int timer) {
+            super(sessionId, new IDMContext[0]);
+            fNumber = timer;
+        }
+        
+        /** Returns the sequential creation number of this timer. */
+        public int getTimerNumber() {
+            return fNumber;
+        }
+        
+        // Timer context objects are created as needed and not cached, so the 
+        // equals method implementation is critical.
+        @Override
+        public boolean equals(Object other) {
+            return baseEquals(other) && 
+                ((TimerDMContext)other).fNumber == fNumber;
+        }
+        
+        @Override
+        public int hashCode() { return baseHashCode() + fNumber; } 
+        
+        @Override
+        public String toString() {
+            return baseToString() + ".timer[" + fNumber + "]";
+        }
+    }            
+    
+    /**
+     * Event indicating that a timer's value has incremented.  The context in 
+     * the event points to the timer that has changed.   
+     */
+    public class TimerTickDMEvent extends AbstractDMEvent<TimerDMContext> {
+        public TimerTickDMEvent(TimerDMContext context) {
+            super(context);
+        }
+    }
+
+    /** Counter for generating timer numbers */
+    private int fTimerNumberCounter = 1;
+    
+    // Use a linked hash in order to be able to return an ordered list of timers.
+    private Map<TimerDMContext, Integer> fTimers = 
+        new LinkedHashMap<TimerDMContext, Integer>();
+    
+    private Map<TimerDMContext, Future<?>> fTimerFutures = 
+        new HashMap<TimerDMContext, Future<?>>();
+    
+    
+    TimerService(DsfSession session) {
+        super(session);
+    }
+    
+    @Override 
+    protected BundleContext getBundleContext() {
+        return DsfExamplesPlugin.getDefault().getBundle().getBundleContext();
+    }    
+
+    @Override 
+    public void initialize(final RequestMonitor requestMonitor) {
+        super.initialize(
+            new RequestMonitor(getExecutor(), requestMonitor) { 
+                @Override
+                public void handleSuccess() {
+                    // After super-class is finished initializing
+                    // perform TimerService initialization.
+                    doInitialize(requestMonitor);
+                }});
+    }
+
+    private void doInitialize(RequestMonitor requestMonitor) {
+        // Register service
+        register( new String[]{ TimerService.class.getName() }, 
+            new Hashtable<String,String>() );
+        requestMonitor.done();
+    }
+
+    @Override 
+    public void shutdown(RequestMonitor requestMonitor) {
+        // Cancel timer futures to avoid firing more events.
+        for (Future<?> future : fTimerFutures.values()) {
+            future.cancel(false);
+        }
+        unregister();
+        super.shutdown(requestMonitor);
+    }
+    
+    /** Retrieves the list of timer contexts. */
+    public TimerDMContext[] getTimers() {
+        return fTimers.keySet().toArray(new TimerDMContext[fTimers.size()]);
+    }
+
+    /** Retrieves the timer value for the given context. */
+    public int getTimerValue(TimerDMContext context) {
+        Integer value = fTimers.get(context);
+        if (value != null) {
+            return value;
+        } 
+        return -1;
+    }
+    
+    /** Creates a new timer and returns its context. */
+    public TimerDMContext startTimer() {
+        // Create a new timer context and add it to the internal list.
+        final TimerDMContext newTimer = 
+            new TimerDMContext(getSession().getId(), fTimerNumberCounter++); 
+        fTimers.put(newTimer, 0);
+
+        // Create a new runnable that will execute every second and increment
+        // the timer value.  The returned future is the handle that allows 
+        // for canceling the scheduling of the runnable.
+        Future<?> timerFuture = getExecutor().scheduleAtFixedRate(
+            new Runnable() {
+                public void run() {
+                    fTimers.put(newTimer, fTimers.get(newTimer) + 1);
+                    getSession().dispatchEvent(new TimerTickDMEvent(newTimer), getProperties());
+                }
+                @Override
+                public String toString() { return "Scheduled timer runnable for timer " + newTimer; } //$NON-NLS-1$
+            }, 
+            1, 1, TimeUnit.SECONDS);
+        fTimerFutures.put(newTimer, timerFuture);
+        
+        // Issue an event to allow clients to update the list of timers.
+        getSession().dispatchEvent(new TimersChangedEvent(), getProperties());
+        return newTimer;
+    }
+    
+    /** Removes given timer from list of timers. */
+    public void killTimer(TimerDMContext timerContext) {
+        if (fTimers.containsKey(timerContext)) {
+            fTimers.remove(timerContext);
+            fTimerFutures.remove(timerContext).cancel(false);
+        }
+        getSession().dispatchEvent(new TimersChangedEvent(), getProperties());
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersRootVMNode.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersRootVMNode.java
new file mode 100644
index 0000000..c804f6d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersRootVMNode.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.timers;
+
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.VMDelta;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.RootDMVMNode;
+import org.eclipse.cdt.examples.dsf.timers.TimersVMProvider.TimersViewLayoutChanged;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+
+/**
+ * 
+ */
+ at SuppressWarnings("restriction")
+public class TimersRootVMNode extends RootDMVMNode {
+
+    public TimersRootVMNode(AbstractVMProvider provider) {
+        super(provider);
+    }
+
+    @Override
+    public boolean isDeltaEvent(Object rootObject, Object e) {
+        if (e instanceof TimersViewLayoutChanged) {
+            return true;
+        }
+        return super.isDeltaEvent(rootObject, e);
+    }
+    
+    @Override
+    public int getDeltaFlags(Object e) {
+        if (e instanceof TimersViewLayoutChanged) {
+            return IModelDelta.CONTENT;
+        }
+        
+        return IModelDelta.NO_CHANGE;
+    }
+
+    @Override
+    public void createRootDelta(Object rootObject, Object event, final DataRequestMonitor<VMDelta> rm) {
+        rm.setData(new VMDelta(rootObject, 0, IModelDelta.NO_CHANGE));
+        int flags = IModelDelta.NO_CHANGE;
+        if (event instanceof TimersViewLayoutChanged) {
+            flags |= IModelDelta.CONTENT;
+        }
+        rm.setData( new VMDelta(rootObject, 0, flags) );
+        rm.done();
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersVMAdapter.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersVMAdapter.java
new file mode 100644
index 0000000..5fae6c3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersVMAdapter.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.timers;
+
+import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.IVMProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMAdapter;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+
+/**
+ * This is the adapter that implements the flexible hierarchy viewer interfaces
+ * for providing content, labels, and event processing for the viewer.  This 
+ * adapter is registered with the DSF Session object, and is returned by the
+ * IDMContext.getAdapter() and IVMContext.getAdapter() methods, 
+ * which both call {@link DsfSession#getModelAdapter(Class)}.
+ */
+ at SuppressWarnings("restriction")
+ at ThreadSafe
+public class TimersVMAdapter extends AbstractDMVMAdapter
+{
+    @Override
+    protected IVMProvider createViewModelProvider(IPresentationContext context) {
+        if ( TimersView.ID_VIEW_TIMERS.equals(context.getId()) ) {
+            return new TimersVMProvider(this, context, getSession());
+        }
+        return null;
+    }
+    
+    public TimersVMAdapter(DsfSession session, IPresentationContext presentationContext) {
+        super(session);
+    }    
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersVMNode.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersVMNode.java
new file mode 100644
index 0000000..aa67b43
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersVMNode.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.timers;
+
+import java.util.concurrent.RejectedExecutionException;
+
+import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.VMDelta;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMNode;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.IElementPropertiesProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.IPropertiesUpdate;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelAttribute;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelColumnInfo;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelImage;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelText;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.PropertiesBasedLabelProvider;
+import org.eclipse.cdt.examples.dsf.DsfExamplesPlugin;
+import org.eclipse.cdt.examples.dsf.timers.TimerService.TimerDMContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
+
+
+/**
+ * View model node that defines how timer DMContexts are displayed in the view. Timers
+ * change with every tick of the timer, so the label has to be repained 
+ * upon timer tick events.
+ * @see TimerDMContext
+ */
+ at SuppressWarnings("restriction")
+class TimersVMNode extends AbstractDMVMNode 
+    implements IElementLabelProvider, IElementPropertiesProvider
+{
+    private static final String PROP_TIMER_NUMBER = "alarmNumber"; 
+    private static final String PROP_TIMER_VALUE = "alarmTriggerValue"; 
+    
+    // Create and configure the label provider.
+    private static final PropertiesBasedLabelProvider fgLabelProvider;
+    static {
+        fgLabelProvider = new PropertiesBasedLabelProvider();
+
+        LabelColumnInfo idCol = new LabelColumnInfo(
+            new LabelAttribute[] { 
+                new LabelText("Timer #{0}", new String[] { PROP_TIMER_NUMBER }), 
+                new LabelImage(DsfExamplesPlugin.getDefault().getImageRegistry().
+                    getDescriptor(DsfExamplesPlugin.IMG_ALARM))
+            });
+        fgLabelProvider.setColumnInfo(TimersViewColumnPresentation.COL_ID, idCol);
+        
+        LabelColumnInfo valueCol = new LabelColumnInfo(
+            new LabelAttribute[] { 
+                new LabelText("{0}", new String[] { PROP_TIMER_VALUE }) 
+            });
+        fgLabelProvider.setColumnInfo(TimersViewColumnPresentation.COL_VALUE, 
+            valueCol);            
+        
+    }
+
+    
+    public TimersVMNode(AbstractDMVMProvider provider, DsfSession session) {
+        super(provider, session, TimerDMContext.class);
+    }
+    
+    @Override
+    public String toString() {
+        return "TimersVMNode(" + getSession().getId() + ")";  //$NON-NLS-1$ //$NON-NLS-2$
+    }
+    
+    public void update(ILabelUpdate[] updates) {
+        fgLabelProvider.update(updates);
+    }
+    
+    @Override
+    protected void updateElementsInSessionThread(final IChildrenUpdate update) {
+        TimerService timerService = getServicesTracker().getService(TimerService.class, null);        
+    	if ( timerService == null ) {
+            handleFailedUpdate(update);
+            return;
+    	}
+
+        // Retrieve the timer DMContexts, create the corresponding VMCs array, and 
+        // set them as result.
+        TimerDMContext[] timers = timerService.getTimers();
+        fillUpdateWithVMCs(update, timers);
+        update.done();
+    }
+
+
+    public void update(final IPropertiesUpdate[] updates) {
+        // Switch to the session thread before processing the updates.
+        try {
+            getSession().getExecutor().execute(new DsfRunnable() {
+                public void run() {
+                    for (IPropertiesUpdate update : updates) {
+                        updatePropertiesInSessionThread(update);
+                    }
+                }});
+        } catch (RejectedExecutionException e) {
+            for (IViewerUpdate update : updates) {
+                handleFailedUpdate(update);
+            }
+        }
+    }
+
+    @ConfinedToDsfExecutor("getSession#getExecutor")
+    private void updatePropertiesInSessionThread(final IPropertiesUpdate update) {
+        // Find the timer context in the element being updated
+        TimerDMContext dmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), TimerDMContext.class);
+        TimerService timerService = getServicesTracker().getService(TimerService.class, null);
+
+        // If either update or service are not valid, fail the update and exit.
+        if ( dmc == null || timerService == null) {
+        	handleFailedUpdate(update);
+            return;
+        }
+        
+        int value = timerService.getTimerValue(dmc);
+        
+        if (value == -1) {
+            handleFailedUpdate(update);
+            return;
+        }
+
+        update.setProperty(PROP_TIMER_NUMBER, dmc.getTimerNumber());
+        update.setProperty(PROP_TIMER_VALUE, value);
+        update.done();
+    }
+
+    public int getDeltaFlags(Object e) {
+        // This node generates delta if the timers have changed, or if the 
+        // label has changed.
+        if (e instanceof TimerService.TimerTickDMEvent) {
+            return IModelDelta.STATE;
+        } else if (e instanceof TimerService.TimersChangedEvent) {
+            return IModelDelta.CONTENT;
+        }
+        return IModelDelta.NO_CHANGE;
+    }
+
+    public void buildDelta(Object e, VMDelta parentDelta, int nodeOffset, RequestMonitor requestMonitor) {
+        if (e instanceof TimerService.TimerTickDMEvent) {
+            // Add delta indicating that the given timer has changed.
+            parentDelta.addNode( createVMContext(((TimerService.TimerTickDMEvent)e).getDMContext()), IModelDelta.STATE );
+        } else if (e instanceof TimerService.TimersChangedEvent) {
+            // The list of timers has changed, which means that the parent 
+            // node needs to refresh its contents, which in turn will re-fetch the
+            // elements from this node.
+            parentDelta.setFlags(parentDelta.getFlags() | IModelDelta.CONTENT);
+        }
+        requestMonitor.done();
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersVMProvider.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersVMProvider.java
new file mode 100644
index 0000000..e44c122
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersVMProvider.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.timers;
+
+import java.util.concurrent.RejectedExecutionException;
+
+import org.eclipse.cdt.dsf.service.DsfServiceEventHandler;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMAdapter;
+import org.eclipse.cdt.dsf.ui.viewmodel.IRootVMNode;
+import org.eclipse.cdt.dsf.ui.viewmodel.IVMNode;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider;
+import org.eclipse.cdt.examples.dsf.timers.AlarmService.TriggersChangedEvent;
+import org.eclipse.cdt.examples.dsf.timers.TimerService.TimersChangedEvent;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+
+/**
+ * The View Model provider for the Timers view.  This provider allows for 
+ * switching between two different view layouts:
+ * <ol>
+ *  <li>Timers -> Triggers -> Alarms</li>
+ *  <li>Triggers -> Timers -> Alarms</li>
+ * </ol>  
+ * A special event is sent when the layout is changed in order to generate
+ * a proper delta to refresh the view. 
+ */
+ at SuppressWarnings("restriction")
+public class TimersVMProvider extends AbstractDMVMProvider {
+
+    /** Event indicating that the timers view layout has changed */
+    public static class TimersViewLayoutChanged {}
+    
+    /** Enumeration of possible layouts for the timers view model */
+    public enum ViewLayout { TRIGGERS_AT_TOP, TIMERS_AT_TOP }
+    
+    public TimersVMProvider(AbstractVMAdapter adapter, IPresentationContext presentationContext, DsfSession session) {
+        super(adapter, presentationContext, session);
+        // Set the initial view layout.
+        setViewLayout(ViewLayout.TIMERS_AT_TOP);   
+    }
+    
+    /** 
+     * Configures a new layout for the timers view model.
+     * @param layout New layout to use.
+     */
+    public void setViewLayout(ViewLayout layout) {
+        clearNodes();
+        if (layout == ViewLayout.TRIGGERS_AT_TOP) {
+            IRootVMNode root = new TimersRootVMNode(this); 
+            IVMNode triggersNode = new TriggersVMNode(this, getSession());
+            addChildNodes(root, new IVMNode[] { triggersNode });
+            IVMNode timersNode = new TimersVMNode(this, getSession());
+            addChildNodes(triggersNode, new IVMNode[] { timersNode });
+            IVMNode alarmNode = new AlarmsVMNode(this, getSession());
+            addChildNodes(timersNode, new IVMNode[] { alarmNode });
+            setRootNode(root);
+        } else if (layout == ViewLayout.TIMERS_AT_TOP) {
+            IRootVMNode root = new TimersRootVMNode(this); 
+            IVMNode timersNode = new TimersVMNode(this, getSession());
+            addChildNodes(root, new IVMNode[] { timersNode });
+            IVMNode triggersNode = new TriggersVMNode(this, getSession());
+            addChildNodes(timersNode, new IVMNode[] { triggersNode });
+            IVMNode alarmNode = new AlarmsVMNode(this, getSession());
+            addChildNodes(triggersNode, new IVMNode[] { alarmNode });
+            setRootNode(root);
+        }
+        
+        handleEvent(new TimersViewLayoutChanged());
+    }
+    
+    @Override
+    public IColumnPresentation createColumnPresentation(IPresentationContext context, Object element) {
+        return new TimersViewColumnPresentation();
+    }
+
+    @Override
+    public String getColumnPresentationId(IPresentationContext context, Object element) {
+        return TimersViewColumnPresentation.ID;
+    }
+
+    // Add a handler for the triggers and timers changed events.  The 
+    // AbstractDMVMProvider superclass automatically registers this provider
+    // for all IDMEvent events, however these two events do not implement
+    // IDMEvent
+    @DsfServiceEventHandler
+    public void eventDispatched(final TriggersChangedEvent event) {
+        if (isDisposed()) return;
+
+        try {
+            getExecutor().execute(new Runnable() {
+                public void run() {
+                    if (isDisposed()) return;
+                    handleEvent(event);
+                }
+            });
+        } catch (RejectedExecutionException e) {}
+    }
+
+    @DsfServiceEventHandler
+    public void eventDispatched(final TimersChangedEvent event) {
+        if (isDisposed()) return;
+
+        try {
+            getExecutor().execute(new Runnable() {
+                public void run() {
+                    if (isDisposed()) return;
+                    handleEvent(event);
+                }
+            });
+        } catch (RejectedExecutionException e) {}
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersView.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersView.java
new file mode 100644
index 0000000..d9c4a59
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersView.java
@@ -0,0 +1,325 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.timers;
+
+import java.util.concurrent.ExecutionException;
+
+import org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
+import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.service.DsfServicesTracker;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.IVMProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.IDMVMContext;
+import org.eclipse.cdt.examples.dsf.DsfExamplesPlugin;
+import org.eclipse.cdt.examples.dsf.timers.TimerService.TimerDMContext;
+import org.eclipse.cdt.examples.dsf.timers.TimersVMProvider.ViewLayout;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.part.ViewPart;
+
+
+/**
+ * Example view which displays data from timers and alarms services. It starts 
+ * a new DSF session and configures the services for it.  Then it configures 
+ * a data model provider to process the service data and display it in a 
+ * flexible-hierarchy asynchronous viewer.
+ */
+ at SuppressWarnings("restriction")
+public class TimersView extends ViewPart {
+    
+    /** Timers view ID */
+    public static final String ID_VIEW_TIMERS = "org.eclipse.cdt.examples.dsf.TimersView";
+    
+    /** Asynchronous tree viewer from the platform debug.ui plugin. */
+	private TreeModelViewer fViewer;
+    
+	/** Presentation context of the timers viewer */
+	private PresentationContext fPresentationContext;
+	
+    /** DSF executor to use for a new session with timers and alarms services */
+    private DsfExecutor fExecutor;
+    
+    /** DSF session */
+    private DsfSession fSession;
+    
+    /** DSF services tracker used by actions in the viewer. */
+    private DsfServicesTracker fServices;
+    
+    /** Adapter used to provide view model for flexible-hierarchy viewer */
+    private TimersVMAdapter fTimersVMAdapter;
+    
+    /** Action which toggles the layout in the viewer */
+    private Action fToggleLayoutAction;
+    
+    /** Action that adds a new timer */
+	private Action fAddTimerAction;
+    
+    /** Action that adds a new trigger */
+    private Action fAddTriggerAction;
+    
+    /** Action that removes the selected trigger or timer */
+	private Action fRemoveAction;
+
+	public TimersView() {}
+
+	/**
+	 * This is a call-back that will allow us to create the viewer and 
+     * initialize it.  For this view, it creates the DSF session, along
+     * with its services.  Then it creates the viewer model adapter and 
+     * registers it with the session.
+	 */
+	@Override
+    public void createPartControl(Composite parent) {
+        // Create the Flexible Hierarchy viewer.  Also create a presentation
+        // context which will be given to the content/label provider adapters 
+        // to distinguish this view from other flexible-hierarchy views. 
+        fPresentationContext = new PresentationContext(ID_VIEW_TIMERS); 
+		fViewer = new TreeModelViewer(
+		    parent, SWT.VIRTUAL | SWT.FULL_SELECTION, fPresentationContext);
+        
+        // Create the executor, which will be used exclusively with this view, 
+        // as well as a session and a services tracker for managing references 
+        // to services.
+        fExecutor = new DefaultDsfExecutor();
+        fSession = DsfSession.startSession(fExecutor, "Timers(DSF Example)"); 
+        fServices = new DsfServicesTracker(
+            DsfExamplesPlugin.getBundleContext(), fSession.getId());
+
+        // Start the services using a sequence.  The sequence runs in the 
+        // session executor thread, therefore the thread calling this method 
+        // has to block using Future.get() until the sequence it completes.  
+        // The Future.get() will throw an exception if the sequence fails.
+        ServicesStartupSequence startupSeq = new ServicesStartupSequence(fSession);
+        fSession.getExecutor().execute(startupSeq);
+        try {
+            startupSeq.get();
+        } catch (InterruptedException e) { assert false;
+        } catch (ExecutionException e) { assert false;
+        }
+        
+        // Create the flexible hierarchy content/label adapter. Then register 
+        // it with the session.
+        fTimersVMAdapter = new TimersVMAdapter(fSession, fPresentationContext);
+        fSession.registerModelAdapter(IElementContentProvider.class, fTimersVMAdapter);
+        fSession.registerModelAdapter(IModelProxyFactory.class, fTimersVMAdapter);
+        fSession.registerModelAdapter(IColumnPresentationFactory.class, fTimersVMAdapter);
+        
+        // Create the input object for the view.  This object needs to return
+        // the VM adapter through the IAdaptable interface when queried for the 
+        // flexible hierarchy adapters.
+        final IAdaptable viewerInputObject = 
+            new IAdaptable() {
+                /**
+                 * The input object provides the viewer access to the viewer model adapter.
+                 */
+                @SuppressWarnings("unchecked")
+                public Object getAdapter(Class adapter) {
+                    if ( adapter.isInstance(fTimersVMAdapter) ) {
+                        return fTimersVMAdapter;
+                    }
+                    return null;
+                }
+                
+                @Override
+                public String toString() {
+                    return "Timers View Root"; //$NON-NLS-1$
+                }
+            };
+        fViewer.setInput(viewerInputObject);
+        
+		makeActions();
+		contributeToActionBars();
+	}
+
+    @Override
+    public void dispose() {
+        try {
+            // First dispose the view model, which is the client of services.
+            // This operation needs to be performed in the session executor 
+            // thread.  Block using Future.get() until this call completes.
+            fSession.getExecutor().submit(new Runnable() { 
+                public void run() {
+                    fSession.unregisterModelAdapter(IElementContentProvider.class);
+                    fSession.unregisterModelAdapter(IModelProxyFactory.class);
+                    fSession.unregisterModelAdapter(IColumnPresentationFactory.class);
+                }}).get();
+
+            // Dispose the VM adapter.
+            fTimersVMAdapter.dispose();
+            fTimersVMAdapter = null;
+
+            // Next invoke the shutdown sequence for the services.  Sequence
+            // class also implements Future.get()...
+            ServicesShutdownSequence shutdownSeq = 
+                new ServicesShutdownSequence(fSession);
+            fSession.getExecutor().execute(shutdownSeq);
+            try {
+                shutdownSeq.get();
+            } catch (InterruptedException e) { assert false;
+            } catch (ExecutionException e) { assert false;
+            }
+            
+            // Finally end the session and the executor.
+            fSession.getExecutor().submit(new Runnable() { 
+                public void run() {
+                    DsfSession.endSession(fSession);
+                    fSession = null;
+                    fExecutor.shutdown();
+                    fExecutor = null;
+                }}).get();
+        } catch (InterruptedException e) {
+        } catch (ExecutionException e) {
+        }
+        super.dispose();
+    }
+
+	private void contributeToActionBars() {
+		IActionBars bars = getViewSite().getActionBars();
+		fillLocalToolBar(bars.getToolBarManager());
+	}
+	
+	private void fillLocalToolBar(IToolBarManager manager) {
+        manager.add(fToggleLayoutAction);
+		manager.add(fAddTimerAction);
+        manager.add(fAddTriggerAction);
+		manager.add(fRemoveAction);
+		manager.add(new Separator());
+	}
+
+	private void makeActions() {
+        fToggleLayoutAction = new Action("Toggle Layout", IAction.AS_CHECK_BOX) { //$NON-NLS-1$
+            @Override
+            public void run() {
+                // Get the toggle state of the action while on UI thread.
+                final ViewLayout layout = isChecked() ? ViewLayout.TRIGGERS_AT_TOP : ViewLayout.TIMERS_AT_TOP;
+                
+                IVMProvider provider = fTimersVMAdapter.getVMProvider(fPresentationContext); 
+                ((TimersVMProvider)provider).setViewLayout(layout);
+            }
+        };
+        fToggleLayoutAction.setToolTipText("Toggle Layout"); //$NON-NLS-1$
+        fToggleLayoutAction.setImageDescriptor(DsfExamplesPlugin.getDefault().getImageRegistry().getDescriptor(
+            DsfExamplesPlugin.IMG_LAYOUT_TOGGLE));
+        
+        fAddTimerAction = new Action("Add New Timer") { 
+			@Override
+            public void run() {
+                fExecutor.execute(new Runnable() { 
+                    public void run() {
+                        // Only need to create the new timer, the events will 
+                        // cause the view to refresh.
+                        fServices.getService(TimerService.class).startTimer();
+                    }
+                });
+			}
+		};
+		fAddTimerAction.setToolTipText("Add a new timer"); 
+		fAddTimerAction.setImageDescriptor(
+		    getImage(DsfExamplesPlugin.IMG_TIMER));
+
+        fAddTriggerAction = new Action("Add New Trigger") { 
+            @Override
+            public void run() {
+                // Ask user for the new trigger value.
+                InputDialog inputDialog = new InputDialog(
+                    getSite().getShell(), 
+                    "New Trigger",  
+                    "Please enter trigger value", 
+                    "", 
+                    new IInputValidator() {
+                        public String isValid(String input) {
+                            try {
+                                int i= Integer.parseInt(input);
+                                if (i <= 0)
+                                    return "Please enter a positive integer";  
+    
+                            } catch (NumberFormatException x) {
+                                return "Please enter a positive integer";  
+                            }
+                            return null;
+                        }                    
+                    }
+                );
+                if (inputDialog.open() != Window.OK) return;
+                int tmpTriggerValue = -1;
+                try {
+                    tmpTriggerValue = Integer.parseInt(inputDialog.getValue());
+                } catch (NumberFormatException x) { assert false; }
+                final int triggerValue = tmpTriggerValue;
+                fExecutor.execute(new Runnable() { 
+                    public void run() {
+                        // Create the new trigger
+                        fServices.getService(AlarmService.class).
+                            createTrigger(triggerValue);
+                    }
+                });
+            }
+        };
+        fAddTriggerAction.setToolTipText("Add a new trigger"); 
+        fAddTriggerAction.setImageDescriptor(
+            getImage(DsfExamplesPlugin.IMG_ALARM));
+
+		fRemoveAction = new Action("Remove") { 
+            @Override
+            public void run() {
+                final Object selectedElement = 
+                    ((IStructuredSelection)fViewer.getSelection()).getFirstElement();
+                if (!(selectedElement instanceof IDMVMContext)) return;
+                final IDMContext selectedCtx = 
+                    ((IDMVMContext)selectedElement).getDMContext();
+                // Based on the context from the selection, call the 
+                // appropriate service to remove the item.
+                if (selectedCtx instanceof TimerDMContext) {
+                    fExecutor.execute(new Runnable() { public void run() {
+                        fServices.getService(TimerService.class).killTimer(
+                            ((TimerDMContext)selectedCtx));
+                    }});
+                } else if (selectedCtx instanceof AlarmService.TriggerDMContext) {
+                    fExecutor.execute(new Runnable() { public void run() {
+                        fServices.getService(AlarmService.class).deleteTrigger(
+                            (AlarmService.TriggerDMContext)selectedCtx);
+                    }});
+                }
+			}
+		};
+		fRemoveAction.setToolTipText("Remove selected item"); 
+		fRemoveAction.setImageDescriptor( getImage(DsfExamplesPlugin.IMG_REMOVE) );
+	}
+
+	private ImageDescriptor getImage(String key) {
+        return DsfExamplesPlugin.getDefault().getImageRegistry().getDescriptor(key);
+	}
+	
+	/**
+	 * Passing the focus request to the viewer's control.
+	 */
+	@Override
+    public void setFocus() {
+		fViewer.getControl().setFocus();
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersViewColumnPresentation.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersViewColumnPresentation.java
new file mode 100644
index 0000000..a43778a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersViewColumnPresentation.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.timers;
+
+import org.eclipse.cdt.examples.dsf.DsfExamplesPlugin;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+/**
+ * 
+ */
+ at SuppressWarnings("restriction")
+public class TimersViewColumnPresentation implements IColumnPresentation {
+
+    public static final String ID = DsfExamplesPlugin.PLUGIN_ID + ".TIMER_COLUMN_PRESENTATION_ID"; //$NON-NLS-1$
+    public static final String COL_ID = ID + ".COL_ID"; //$NON-NLS-1$
+    public static final String COL_VALUE = ID + ".COL_VALUE"; //$NON-NLS-1$
+    
+    public void init(IPresentationContext context) {}
+
+    public void dispose() {}
+
+    public String[] getAvailableColumns() {
+        return new String[] { COL_ID, COL_VALUE };
+    }
+
+    public String getHeader(String id) {
+        if (COL_ID.equals(id)) {
+            return "ID"; //$NON-NLS-1$
+        } else if (COL_VALUE.equals(id)) {
+            return "Value"; //$NON-NLS-1$
+        }
+        return null;
+    }
+
+    public String getId() {
+        return ID;
+    }
+
+    public ImageDescriptor getImageDescriptor(String id) {
+        return null;
+    }
+
+    public String[] getInitialColumns() {
+        return getAvailableColumns();
+    }
+
+    public boolean isOptional() {
+        return true;
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggerCellModifier.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggerCellModifier.java
new file mode 100644
index 0000000..b7de00a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggerCellModifier.java
@@ -0,0 +1,258 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.timers;
+
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.RejectedExecutionException;
+
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
+import org.eclipse.cdt.dsf.concurrent.Query;
+import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+import org.eclipse.cdt.dsf.concurrent.ThreadSafeAndProhibitedFromDsfExecutor;
+import org.eclipse.cdt.dsf.service.DsfServices;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.examples.dsf.DsfExamplesPlugin;
+import org.eclipse.cdt.examples.dsf.timers.AlarmService.TriggerDMContext;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.swt.widgets.Shell;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * Cell modifier used to edit the trigger value.
+ */
+ at ThreadSafeAndProhibitedFromDsfExecutor("fSession.getExecutor()")
+public class TriggerCellModifier implements ICellModifier {
+
+    private final DsfSession fSession;
+    
+    // Need to use the OSGi service tracker (instead of DsfServiceTracker), 
+    // because it's being accessed on multiple threads.
+    @ThreadSafe
+    private ServiceTracker fServiceTracker;
+
+    /**
+     * Constructor for the modifier requires a valid session in order to 
+     * initialize the service tracker.  
+     * @param session DSF session this modifier will use.
+     */
+    public TriggerCellModifier(DsfSession session) {
+        fSession = session;
+    }
+
+    public boolean canModify(Object element, String property) {
+        return TimersViewColumnPresentation.COL_VALUE.equals(property) && 
+            getAlarmDMC(element) != null; 
+    }
+
+    public Object getValue(Object element, String property) {
+        if (!TimersViewColumnPresentation.COL_VALUE.equals(property)) return ""; 
+        
+        // Get the context and the session.  If element is not an trigger 
+        // context or if the session is stale then bail out. 
+        TriggerDMContext triggerCtx = getAlarmDMC(element);
+        if (triggerCtx == null) return ""; 
+        DsfSession session = DsfSession.getSession(triggerCtx.getSessionId());
+        if (session == null) return ""; 
+        
+        // Create the query to request the value from service.  
+        GetValueQuery query = new GetValueQuery(triggerCtx);
+        try {
+            session.getExecutor().execute(query);
+        } catch (RejectedExecutionException e) {
+            return "";
+        }
+        try {
+            return query.get().toString();
+        } catch (InterruptedException e) {
+            assert false;
+            return ""; 
+        } catch (ExecutionException e) {
+            return ""; 
+        }
+    }
+
+    
+    public void modify(Object element, String property, Object value) {
+        if (!TimersViewColumnPresentation.COL_VALUE.equals(property)) return;
+
+        TriggerDMContext dmc = getAlarmDMC(element);
+        if (dmc == null) return;
+        DsfSession session = DsfSession.getSession(dmc.getSessionId());
+        if (session == null) return;
+
+        // Shell is used in displaying error dialogs.
+        Shell shell = getShell();
+        if (shell == null) return;
+        
+        Integer intValue = null;
+        if (value instanceof String) {
+            try {
+                intValue = new Integer(((String)value).trim());
+            } catch (NumberFormatException e) {
+                MessageDialog.openError(shell, "Invalid Value", 
+                    "Please enter a positive integer");  
+                return;
+            }
+            if (intValue.intValue() <= 0) {
+                MessageDialog.openError(shell, "Invalid Value", 
+                    "Please enter a positive integer");  
+                return;
+            }
+        }
+
+        // Create the query to write the value to the service.
+        SetValueQuery query = new SetValueQuery(dmc, intValue);
+
+        try {
+            session.getExecutor().execute(query);
+        } catch (RejectedExecutionException e) {
+            // View must be shutting down, no need to show error dialog.
+        }
+        try {
+            // Return value is irrelevant, any error would come through with an exception.
+            query.get().toString();
+        } catch (InterruptedException e) {
+            assert false;
+        } catch (ExecutionException e) {
+            // View must be shutting down, no need to show error dialog.
+        }
+    }
+
+    /**
+     * Need to dispose the cell modifier property because of the service 
+     * tracker.
+     */
+    @ThreadSafe
+    public synchronized void dispose() {
+        if (fServiceTracker != null) {
+            fServiceTracker.close();
+        }
+    }
+    
+    private Shell getShell() {
+        if (DsfExamplesPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow() != null) {
+            return DsfExamplesPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
+        }
+        return null;
+    }
+
+    private TriggerDMContext getAlarmDMC(Object element) {
+        if (element instanceof IAdaptable) {
+            return (TriggerDMContext)((IAdaptable)element).getAdapter(TriggerDMContext.class);
+        }
+        return null;
+    }
+
+    @ThreadSafe
+    private synchronized AlarmService getService(TriggerDMContext dmc) {
+        // Create and initialize the service tracker if needed.
+    	String serviceId = DsfServices.createServiceFilter( AlarmService.class, fSession.getId() ); 
+        if (fServiceTracker == null) {
+            try {
+                fServiceTracker = new ServiceTracker(
+                    DsfExamplesPlugin.getBundleContext(), 
+                    DsfExamplesPlugin.getBundleContext().createFilter(serviceId), 
+                    null);
+                fServiceTracker.open();
+            } catch (InvalidSyntaxException e) {
+                return null;
+            }
+        }
+        // Get the service.
+        return (AlarmService)fServiceTracker.getService();
+    }
+
+    
+    private class GetValueQuery extends Query<Integer> {
+        final TriggerDMContext fDmc;
+        
+        private GetValueQuery(TriggerDMContext dmc) {
+            super();
+            fDmc = dmc; 
+        }
+        
+        @Override
+        protected void execute(final DataRequestMonitor<Integer> rm) {
+            // Guard against the session being disposed.  If session is disposed
+            // it could mean that the executor is shut-down, which in turn 
+            // could mean that we can't execute the "done" argument.
+            // In that case, cancel to notify waiting thread.
+            final DsfSession session = DsfSession.getSession(fDmc.getSessionId());
+            if (session == null) {
+                cancel(false);
+                return;
+            }
+                
+            AlarmService service = getService(fDmc);
+            if (service == null) {
+                rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, 
+                                          "Service not available", null)); 
+                rm.done();
+                return;
+            }
+            
+            int value = service.getTriggerValue(fDmc);
+            if (value == -1) {
+                rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_HANDLE, 
+                    "Invalid context", null)); 
+                rm.done();                
+                return;
+            }
+            
+            rm.setData(value);
+            rm.done();
+        }
+    }
+
+    private class SetValueQuery extends Query<Object> {
+        
+        TriggerDMContext fDmc;
+        int fValue;
+        
+        SetValueQuery(TriggerDMContext dmc, int value) {
+            super();
+            fDmc = dmc;
+            fValue = value;
+        }
+        
+        @Override
+        protected void execute(final DataRequestMonitor<Object> rm) {
+            // Guard against terminated session
+            final DsfSession session = DsfSession.getSession(fDmc.getSessionId());
+            if (session == null) {
+                cancel(false);
+                return;
+            }
+
+            // Guard against a disposed service
+            AlarmService service = getService(fDmc);
+            if (service == null) {
+                rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, IDsfStatusConstants.INVALID_STATE, 
+                                          "Service not available", null)); 
+                rm.done();
+                return;
+            }
+
+            // Finally set the value and return.
+            service.setTriggerValue(fDmc, fValue);
+            
+            // Return value is irrelevant.
+            rm.setData(new Object());
+            rm.done();
+        }
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggersVMNode.java b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggersVMNode.java
new file mode 100644
index 0000000..3078775
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggersVMNode.java
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.timers;
+
+import java.util.concurrent.RejectedExecutionException;
+
+import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.VMDelta;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMNode;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.AbstractDMVMProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.IElementPropertiesProvider;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.IPropertiesUpdate;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelAttribute;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelColumnInfo;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelImage;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.LabelText;
+import org.eclipse.cdt.dsf.ui.viewmodel.properties.PropertiesBasedLabelProvider;
+import org.eclipse.cdt.examples.dsf.DsfExamplesPlugin;
+import org.eclipse.cdt.examples.dsf.timers.AlarmService.TriggerDMContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.swt.widgets.Composite;
+
+
+/**
+ * View model node that defines how alarm DMContexts are displayed in the view.  Alarm
+ * nodes are fairly static, once they are created their label doesn't change.
+ * @see TriggerDMContext 
+ */
+ at SuppressWarnings("restriction")
+class TriggersVMNode extends AbstractDMVMNode 
+    implements IElementEditor, IElementPropertiesProvider, IElementLabelProvider
+{
+    private static final String PROP_TRIGGER_NUMBER = "alarmNumber"; 
+    private static final String PROP_TRIGGER_VALUE = "alarmTriggerValue"; 
+    
+    // Create and configure the label provider.
+    private static final PropertiesBasedLabelProvider fgLabelProvider;
+    static {
+        fgLabelProvider = new PropertiesBasedLabelProvider();
+
+        LabelColumnInfo idCol = new LabelColumnInfo(
+            new LabelAttribute[] { 
+                new LabelText("Trigger #{0}", new String[] { PROP_TRIGGER_NUMBER }), 
+                new LabelImage(DsfExamplesPlugin.getDefault().getImageRegistry().
+                    getDescriptor(DsfExamplesPlugin.IMG_ALARM))
+            });
+        fgLabelProvider.setColumnInfo(TimersViewColumnPresentation.COL_ID, idCol);
+        
+        LabelColumnInfo valueCol = new LabelColumnInfo(
+            new LabelAttribute[] {
+                new LabelText("{0}", new String[] { PROP_TRIGGER_VALUE }) 
+            });
+        fgLabelProvider.setColumnInfo(TimersViewColumnPresentation.COL_VALUE, 
+            valueCol);            
+    }
+
+    private TriggerCellModifier fAlarmCellModifier;
+    
+    public TriggersVMNode(AbstractDMVMProvider provider, DsfSession session) {
+        super(provider, session, TriggerDMContext.class);
+    }
+    
+    @Override
+    public String toString() {
+        return "TriggersVMNode(" + getSession().getId() + ")"; 
+    }
+    
+    @Override
+    protected void updateElementsInSessionThread(final IChildrenUpdate update) {
+        AlarmService alarmService = getServicesTracker().getService(AlarmService.class, null); 
+        if ( alarmService == null ) {
+            handleFailedUpdate(update);
+            return;
+    	}
+
+        TriggerDMContext[] triggers = alarmService.getTriggers();
+        fillUpdateWithVMCs(update, triggers);
+        update.done();
+    }
+
+    public void update(ILabelUpdate[] updates) {
+        fgLabelProvider.update(updates);
+    }
+    
+    public void update(final IPropertiesUpdate[] updates) {
+        // Switch to the session thread before processing the updates.
+        try {
+            getSession().getExecutor().execute(new DsfRunnable() {
+                public void run() {
+                    for (IPropertiesUpdate update : updates) {
+                        updatePropertiesInSessionThread(update);
+                    }
+                }});
+        } catch (RejectedExecutionException e) {
+            for (IViewerUpdate update : updates) {
+                handleFailedUpdate(update);
+            }
+        }
+    }
+
+    @ConfinedToDsfExecutor("getSession#getExecutor")
+    private void updatePropertiesInSessionThread(final IPropertiesUpdate update) {
+        // Find the trigger context in the element being updated
+        TriggerDMContext triggerCtx = findDmcInPath( 
+            update.getViewerInput(), update.getElementPath(), TriggerDMContext.class);
+        AlarmService alarmService = getServicesTracker().getService(AlarmService.class, null); 
+        
+        // If either update or service are not valid, fail the update and return.
+        if ( triggerCtx == null || alarmService == null) {
+        	handleFailedUpdate(update);
+            return;
+        }
+        
+        // Calculate and set the update properties.
+        int value = alarmService.getTriggerValue(triggerCtx);
+        
+        if (value == -1) {
+            handleFailedUpdate(update);
+            return;
+        } 
+
+        update.setProperty(PROP_TRIGGER_NUMBER, triggerCtx.getTriggerNumber());
+        update.setProperty(PROP_TRIGGER_VALUE, value);
+        update.done();
+    }
+    
+    public CellEditor getCellEditor(IPresentationContext context, String columnId, 
+        Object element, Composite parent) 
+    {
+        // Create a cell editor to modify the trigger value.
+        if (TimersViewColumnPresentation.COL_VALUE.equals(columnId)) { 
+            return new TextCellEditor(parent);
+        } 
+        return null;
+    }
+
+    // Note: this method is synchronized because IElementEditor.getCellModifier can be called
+    // on any thread, even though in practice it should be only called on the UI thread.
+    public ICellModifier getCellModifier(IPresentationContext context, 
+        Object element) 
+    {
+        // Create the cell modifier if needed.
+        if (fAlarmCellModifier == null) {
+            fAlarmCellModifier = new TriggerCellModifier(getSession());
+        }
+        return fAlarmCellModifier; 
+    }
+    
+    public int getDeltaFlags(Object e) {
+        // Since the label for triggers doesn't change, this node will generate 
+        // delta info only if the list of alarms is changed.
+        if (e instanceof AlarmService.TriggersChangedEvent) {
+            return IModelDelta.CONTENT;
+        }
+        return IModelDelta.NO_CHANGE;
+    }
+    
+    
+    public void buildDelta(Object event, VMDelta parentDelta, int nodeOffset, 
+        RequestMonitor requestMonitor) 
+    {
+        if (event instanceof AlarmService.TriggersChangedEvent) {
+            // The list of alarms has changed, which means that the parent 
+            // node needs to refresh its contents, which in turn will re-fetch the
+            // elements from this node.
+            parentDelta.setFlags(parentDelta.getFlags() | IModelDelta.CONTENT);
+        }
+        requestMonitor.done();
+    } 
+    
+    @Override
+    public void dispose() {
+        if (fAlarmCellModifier != null) {
+            fAlarmCellModifier.dispose();
+        }
+        super.dispose();
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/doc-files/package-1.png b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/doc-files/package-1.png
new file mode 100644
index 0000000..0e7c868
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/doc-files/package-1.png differ
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src_ant/org/eclipse/cdt/examples/ant/tasks/PreProcessor.java b/results/plugins/org.eclipse.cdt.examples.dsf/src_ant/org/eclipse/cdt/examples/ant/tasks/PreProcessor.java
new file mode 100644
index 0000000..07956b4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src_ant/org/eclipse/cdt/examples/ant/tasks/PreProcessor.java
@@ -0,0 +1,292 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bjorn Freeman-Benson - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.ant.tasks;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.util.FileUtils;
+
+/**
+ * Java preprocessor for code examples. Used to export source code for
+ * example plug-ins with parts of code missing/inserted etc., for 
+ * various exercises.
+ * <p>
+ * The preprocessor looks for #ifdef statements in java comments, and is
+ * run with a set of symbols. For example:
+ * <pre>
+ * //#ifdef ex1
+ * ... code to insert when 'ex1' symbol is on
+ * //#else
+ * ... code to insert when not 'ex1'
+ * //#endif
+ * </pre>
+ * </p>
+ */
+public class PreProcessor extends Task {
+	
+	private Vector fFileSets = new Vector();
+	private File fDestDir = null;
+	private Set fSymbols = new HashSet(); 
+	private FileUtils fUtils = FileUtils.getFileUtils();
+	
+	// possible states
+	private static final int STATE_OUTSIDE_CONDITION = 0;
+	private static final int STATE_TRUE_CONDITION = 1;
+	private static final int STATE_FALSE_CONDITION = 2;
+	private static final int STATE_POST_TRUE_CONDITION = 3;
+	
+	// matchers
+	private Matcher IF_DEF_MATCHER = Pattern.compile("#ifdef\\s+\\w+").matcher("");
+	private Matcher ELSE_IF_MATCHER = Pattern.compile("#elseif\\s+\\w+").matcher("");
+	private Matcher ELSE_MATCHER = Pattern.compile("#else$|#else\\W+").matcher("");
+	private Matcher END_MATCHER = Pattern.compile("#endif").matcher("");
+
+	
+	/**
+	 * Constructs a new preprocessor task
+	 */
+	public PreProcessor() {
+	}
+	
+    /**
+     * Adds a set of files to process.
+     * 
+     * @param set a set of files to process
+     */
+    public void addFileset(FileSet set) {
+        fFileSets.addElement(set);
+    }
+    
+    /**
+     * Sets the destination directory for processed files.
+     * 
+     * @param destDir destination directory for processed files
+     */
+    public void setDestdir(File destDir) {
+    	fDestDir = destDir;
+    }
+    
+    /**
+	 * Sets the symbols that are "on" for the preprocessing.
+	 * 
+	 * @param symbols symbols that are "on" for the preprocessing
+	 */
+	public void setSymbols(String symbols) {
+		String[] strings = symbols.split(",");
+		for (int i = 0; i < strings.length; i++) {
+			String string = strings[i].trim();
+			if (string.length() > 0) {
+				fSymbols.add(string);
+			}
+		}
+	}
+
+	public void execute() throws BuildException {
+		if (fSymbols.size() == 0) {
+			throw new BuildException("No symbols specified for preprocessor");
+		}
+		if (fFileSets.isEmpty()) {
+			throw new BuildException("No filesets specified for processing");
+		}
+		if (!fDestDir.exists()) {
+			throw new BuildException("destdir does not exist: " + fDestDir.getAbsolutePath());
+		}
+		StringBuffer buf = new StringBuffer("Symbols: ");
+		String[] symbols = (String[]) fSymbols.toArray(new String[fSymbols.size()]);
+		for (int i = 0; i < symbols.length; i++) {
+			String symbol = symbols[i];
+			buf.append(symbol);
+			if(i < (symbols.length -1)) {
+				buf.append(", ");
+			}
+		}
+		log(buf.toString());
+		
+		Iterator fileSets = fFileSets.iterator();
+		while (fileSets.hasNext()) {
+			FileSet fileSet = (FileSet) fileSets.next();
+			DirectoryScanner scanner = fileSet.getDirectoryScanner(getProject());
+			String[] includedFiles = scanner.getIncludedFiles();
+			File baseDir = fileSet.getDir(getProject());
+			for (int i = 0; i < includedFiles.length; i++) {
+				String fileName = includedFiles[i];
+				processFile(baseDir, fileName, fDestDir);
+			}
+		}
+		
+	}
+
+	/**
+	 * Process the file
+	 * @param baseDir base directory source file is relative to
+	 * @param fileName source file name
+	 * @param destDir root destination directory 
+	 */
+	private void processFile(File baseDir, String fileName, File destDir) throws BuildException {
+		File destFile = new File(destDir, fileName);
+		File srcFile = new File(baseDir, fileName);
+		File dir = destFile.getParentFile();
+		if (!dir.exists()) {
+			dir.mkdirs();
+		}
+		String contents = null;
+		if (fileName.endsWith(".java")) {
+			contents = preProcessFile(srcFile, "//#");
+		} else if (fileName.equals("plugin.xml")) {
+			contents = preProcessFile(srcFile, null);
+		}
+		if (contents == null) {
+			// no change, just copy file
+			try {
+				fUtils.copyFile(srcFile, destFile);
+			} catch (IOException e) {
+				throw new BuildException(e);
+			}
+		} else {
+			// write new file
+			FileWriter writer;
+			try {
+				writer = new FileWriter(destFile);
+				writer.write(contents);
+				writer.close();
+			} catch (IOException e) {
+				throw new BuildException(e);
+			}
+			
+		}
+	}
+
+	/**
+	 * Preprocesses a file
+	 * 
+	 * @param srcFile the file to process
+	 * @param strip chars to stip off lines in a true condition, or <code>null</code>
+	 * @return
+	 */
+	public String preProcessFile(File srcFile, String strip) {
+		try {
+			FileReader fileReader = new FileReader(srcFile);
+			BufferedReader reader = new BufferedReader(fileReader);
+			StringBuffer buffer = new StringBuffer();
+			String line = reader.readLine();
+			String activeSymbol = null;
+			int state = STATE_OUTSIDE_CONDITION;
+			boolean changed = false;
+			while (line != null) {
+				boolean ifdef = IF_DEF_MATCHER.reset(line).find();
+				boolean elseif = ELSE_IF_MATCHER.reset(line).find();
+				boolean elze = ELSE_MATCHER.reset(line).find();
+				boolean endif = END_MATCHER.reset(line).find();
+				boolean commandLine = ifdef || elseif || elze || endif;
+				boolean written = false;
+				switch (state) {
+					case STATE_OUTSIDE_CONDITION:
+						if (ifdef) {
+							String condition = line.substring(IF_DEF_MATCHER.start(), IF_DEF_MATCHER.end());
+							String[] strings = condition.split("\\s+");
+							activeSymbol = strings[1].trim();
+							if (fSymbols.contains(activeSymbol)) {
+								state = STATE_TRUE_CONDITION;
+							} else {
+								state = STATE_FALSE_CONDITION;
+							}							
+						} else if (elseif) {
+							throw new BuildException("#elseif encountered without corresponding #ifdef");
+						} else if (elze) {
+							throw new BuildException("#else encountered without corresponding #ifdef (" + srcFile.getPath() + ")");
+						} else if (endif) {
+							throw new BuildException("#endif encountered without corresponding #ifdef");
+						}
+						break;
+					case STATE_TRUE_CONDITION:
+						if (elze || elseif) {
+							state = STATE_POST_TRUE_CONDITION;
+							break;
+						} else if (endif) {
+							state = STATE_OUTSIDE_CONDITION;
+							break;
+						} else if (ifdef) {
+							throw new BuildException("illegal nested #ifdef");
+						}
+					case STATE_FALSE_CONDITION:
+						if (elseif) {
+							String condition = line.substring(ELSE_IF_MATCHER.start(), ELSE_IF_MATCHER.end());
+							String[] strings = condition.split("\\s+");
+							activeSymbol = strings[1].trim();
+							if (fSymbols.contains(activeSymbol)) {
+								state = STATE_TRUE_CONDITION;
+							} else {
+								state = STATE_FALSE_CONDITION;
+							}
+						} else if (elze) {
+							state = STATE_TRUE_CONDITION;
+							break;
+						} else if (endif) {
+							state = STATE_OUTSIDE_CONDITION;
+							break;
+						} else if (ifdef) {
+							throw new BuildException("illegal nested #ifdef");
+						}
+					case STATE_POST_TRUE_CONDITION:
+						if (endif) {
+							state = STATE_OUTSIDE_CONDITION;
+							break;
+						} else if (ifdef) {
+							throw new BuildException("illegal nested #ifdef");
+						}
+				}
+				if (!commandLine) {
+					if (state == STATE_OUTSIDE_CONDITION || state == STATE_TRUE_CONDITION) {
+						if (state == STATE_TRUE_CONDITION && strip != null) {
+							if (line.startsWith(strip)) {
+								line = line.substring(strip.length());
+							}
+						}
+						buffer.append(line);
+						buffer.append("\n");
+						written = true;
+					}
+				} 
+				changed = changed || !written;								
+				line = reader.readLine();
+			}
+			if (!changed) {
+				return null;
+			}
+			return buffer.toString();
+		} catch (IOException e) {
+			throw new BuildException(e);
+		}
+	}
+
+    public static void main(String[] args) {
+		PreProcessor processor = new PreProcessor();
+		processor.setSymbols("ex2");
+		String string = processor.preProcessFile(new File("c:\\eclipse3.1\\dev\\example.debug.core\\src\\example\\debug\\core\\launcher\\PDALaunchDelegate.java"), "//#");
+		//String string = processor.preProcessFile(new File("c:\\eclipse3.1\\dev\\example.debug.core\\plugin.xml"), null);
+		System.out.println(string);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/AsyncDataViewer.java b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/AsyncDataViewer.java
new file mode 100644
index 0000000..bbf9bb8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/AsyncDataViewer.java
@@ -0,0 +1,276 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+//#ifdef exercises
+package org.eclipse.cdt.examples.dsf.dataviewer;
+//#else
+//#package org.eclipse.cdt.examples.dsf.dataviewer.answers;
+//#endif
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
+import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor;
+import org.eclipse.cdt.dsf.concurrent.Query;
+import org.eclipse.cdt.dsf.ui.concurrent.DisplayDsfExecutor;
+import org.eclipse.jface.viewers.ILazyContentProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+
+/**
+ * Data viewer based on a table, which reads data using asynchronous methods.
+ * <p>
+ * This viewer implements the {@link ILazyContentProvider} interface 
+ * which is used by the JFace TableViewer class to populate a Table.  This 
+ * interface contains separate asynchronous methods for requesting the count 
+ * and values for individual indexes, which neatly correspond to the methods
+ * in {@link IDataGenerator}.  As an added optimization, this viewer 
+ * implementation checks for the range of visible items in the view upon each 
+ * request, and it cancels old requests which scroll out of view but have not
+ * been completed yet.  However, it is up to the data generator implementation 
+ * to check the canceled state of the requests and ignore them.
+ * </p>
+ */
+ at ConfinedToDsfExecutor("fDisplayExecutor")
+public class AsyncDataViewer 
+    implements ILazyContentProvider, IDataGenerator.Listener
+{
+    // Executor to use instead of Display.asyncExec().
+    @ThreadSafe
+    final private DsfExecutor fDisplayExecutor;
+    
+    // The viewer and generator that this content provider using.
+    final private TableViewer fViewer;
+    final private IDataGenerator fDataGenerator;
+
+    // Fields used in request cancellation logic.
+    private List<ValueDataRequestMonitor> fItemDataRequestMonitors = new LinkedList<ValueDataRequestMonitor>();
+    private Set<Integer> fIndexesToCancel = new HashSet<Integer>();
+    private int fCancelCallsPending = 0;
+    
+    public AsyncDataViewer(TableViewer viewer, IDataGenerator generator) {
+        fViewer = viewer;
+        fDisplayExecutor = DisplayDsfExecutor.getDisplayDsfExecutor(fViewer.getTable().getDisplay());
+        fDataGenerator = generator;
+        fDataGenerator.addListener(this);
+    }    
+    
+    public void dispose() {
+        fDataGenerator.removeListener(this);
+    }
+
+    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+        // Set the initial count to the viewer after the input is set.
+        queryItemCount();
+    }
+
+    public void updateElement(final int index) {
+        // Calculate the visible index range.
+        final int topIdx = fViewer.getTable().getTopIndex();
+        final int botIdx = topIdx + getVisibleItemCount(topIdx);
+
+        // Request the item for the given index.
+        queryValue(index);
+
+        // Invoke a cancel task with a delay.  The delay allows multiple cancel 
+        // calls to be combined together improving performance of the viewer.
+        fCancelCallsPending++;
+        fDisplayExecutor.schedule(
+            new Runnable() { public void run() {
+                cancelStaleRequests(topIdx, botIdx);
+            }}, 
+            1, TimeUnit.MILLISECONDS);
+    }
+        
+    private int getVisibleItemCount(int top) {
+        Table table = fViewer.getTable();
+        int itemCount = table.getItemCount();
+        return Math.min((table.getBounds().height / table.getItemHeight()) + 2, itemCount - top);
+    }   
+    
+    @ThreadSafe
+    public void countChanged() {
+        queryItemCount();
+    }
+    
+    @ThreadSafe
+    public void valuesChanged(final Set<Integer> indexes) {
+        // Mark the changed items in table viewer as dirty, this will 
+        // trigger update requests for these indexes if they are 
+        // visible in the viewer.
+        final TableViewer tableViewer = fViewer;
+        fDisplayExecutor.execute( new Runnable() { 
+            public void run() {
+                if (!fViewer.getTable().isDisposed()) {
+                    for (Integer index : indexes) {
+                        tableViewer.clear(index);
+                    }
+                }
+            }});
+    }
+    
+
+    private void queryItemCount() {
+        // Request count from data provider.  When the count is returned, we 
+        // have to re-dispatch into the display thread to avoid calling
+        // the table widget on the DSF dispatch thread.
+        fIndexesToCancel.clear();
+        fDataGenerator.getCount( 
+            // Use the display executor to construct the request monitor, this 
+            // will cause the handleCompleted() method to be automatically
+            // called on the display thread.
+            new DataRequestMonitor<Integer>(fDisplayExecutor, null) {
+                @Override
+                protected void handleCompleted() {
+                    if (!fViewer.getTable().isDisposed()) {
+                        fViewer.setItemCount(getData());
+                        fViewer.getTable().clearAll();
+                    }
+                }
+            }); 
+        
+    }
+
+    
+    // Dedicated class for data item requests.  This class holds the index
+    // argument so it can be examined when canceling stale requests.
+    private class ValueDataRequestMonitor extends DataRequestMonitor<String> {
+        
+        /** Index is used when canceling stale requests. */
+        int fIndex;
+        
+        ValueDataRequestMonitor(int index) {
+            super(fDisplayExecutor, null);
+            fIndex = index; 
+        }
+
+        @Override
+        protected void handleCompleted() {
+            fItemDataRequestMonitors.remove(this);
+
+            // Check if the request completed successfully, otherwise ignore it.
+            if (isSuccess()) {
+                if (!fViewer.getTable().isDisposed()) {
+                    fViewer.replace(getData(), fIndex);
+                }
+            }
+        }
+    }
+
+    private void queryValue(final int index) {
+        ValueDataRequestMonitor rm = new ValueDataRequestMonitor(index);
+        fItemDataRequestMonitors.add(rm);
+        fDataGenerator.getValue(index, rm); 
+    }
+    
+    private void cancelStaleRequests(int topIdx, int botIdx) {
+        // Decrement the count of outstanding cancel calls.
+        fCancelCallsPending--;
+
+        // Must check again, in case disposed while re-dispatching.
+        if (fDataGenerator == null || fViewer.getTable().isDisposed()) return;
+
+        // Go through the outstanding requests and cancel any that 
+        // are not visible anymore.
+        for (Iterator<ValueDataRequestMonitor> itr = fItemDataRequestMonitors.iterator(); itr.hasNext();) {
+            ValueDataRequestMonitor item = itr.next();
+            if (item.fIndex < topIdx || item.fIndex > botIdx) {
+                // Set the item to canceled status, so that the data provider 
+                // will ignore it.
+                item.cancel();
+                
+                // Add the item index to list of indexes that were canceled, 
+                // which will be sent to the table widget. 
+                fIndexesToCancel.add(item.fIndex);
+                
+                // Remove the item from the outstanding cancel requests.
+                itr.remove(); 
+            }
+        }
+        if (!fIndexesToCancel.isEmpty() && fCancelCallsPending == 0) {
+            Set<Integer> canceledIdxs = fIndexesToCancel;
+            fIndexesToCancel = new HashSet<Integer>();
+            
+            // Clear the indexes of the canceled request, so that the 
+            // viewer knows to request them again when needed.  
+            // Note: clearing using TableViewer.clear(int) seems very
+            // inefficient, it's better to use Table.clear(int[]).
+            int[] canceledIdxsArray = new int[canceledIdxs.size()];
+            int i = 0;
+            for (Integer index : canceledIdxs) {
+                canceledIdxsArray[i++] = index;
+            }
+            fViewer.getTable().clear(canceledIdxsArray);
+        }
+    }
+    
+    
+    public static void main(String[] args) {
+        // Create the shell to hold the viewer.
+        Display display = new Display();
+        Shell shell = new Shell(display, SWT.SHELL_TRIM);
+        shell.setLayout(new GridLayout());
+        GridData data = new GridData(GridData.FILL_BOTH);
+        shell.setLayoutData(data);
+        Font font = new Font(display, "Courier", 10, SWT.NORMAL);
+
+        // Create the table viewer.
+        TableViewer tableViewer = new TableViewer(shell, SWT.BORDER | SWT.VIRTUAL);
+        tableViewer.getControl().setLayoutData(data);
+
+        // Create the data generator.
+        final IDataGenerator generator = new DataGeneratorWithExecutor();
+        
+        // Create the content provider which will populate the viewer.
+        AsyncDataViewer contentProvider = new AsyncDataViewer(tableViewer, generator);
+        tableViewer.setContentProvider(contentProvider);
+        tableViewer.setInput(new Object());
+
+        // Open the shell and service the display dispatch loop until user
+        // closes the shell.
+        shell.open();
+        while (!shell.isDisposed()) {
+            if (!display.readAndDispatch())
+                display.sleep();
+        }
+        
+        // The IDataGenerator.shutdown() method is asynchronous, this requires
+        // using a query again in order to wait for its completion.
+        Query<Object> shutdownQuery = new Query<Object>() {
+            @Override
+            protected void execute(DataRequestMonitor<Object> rm) {
+                generator.shutdown(rm);
+            }
+        };
+        ImmediateExecutor.getInstance().execute(shutdownQuery);
+        try {
+            shutdownQuery.get();
+        } catch (Exception e) {} 
+        
+        // Shut down the display.
+        font.dispose();    
+        display.dispose();
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/DataGeneratorWithExecutor.java b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/DataGeneratorWithExecutor.java
new file mode 100644
index 0000000..1643017
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/DataGeneratorWithExecutor.java
@@ -0,0 +1,438 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+//#ifdef exercises
+package org.eclipse.cdt.examples.dsf.dataviewer;
+//#else
+//#package org.eclipse.cdt.examples.dsf.dataviewer.answers;
+//#endif
+
+import java.util.HashSet;
+//#ifdef answers
+//#import java.util.Iterator;
+//#endif
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Random;
+import java.util.Set;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.TimeUnit;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+//#ifdef answers
+//#import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor;
+//#import org.eclipse.cdt.dsf.concurrent.Immutable;
+//#import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+//#endif
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.DefaultDsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.examples.dsf.DsfExamplesPlugin;
+
+/**
+ * DSF Executor-based implementation of the data generator.
+ * <p>
+ * This generator uses a queue of client requests and processes these
+ * requests periodically using a DSF executor.  The main feature of this
+ * generator is that it uses the executor as its only synchronization object.
+ * This means that all the fields with the exception of the executor can only
+ * be accessed while running in the executor thread.
+ * </p>
+ */
+//#ifdef exercises
+//TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+//indicating allowed thread access to this class/method/member
+//#else
+//#@ThreadSafe
+//#endif
+public class DataGeneratorWithExecutor implements IDataGenerator {
+
+    // Request objects are used to serialize the interface calls into objects
+    // which can then be pushed into a queue.
+    //#ifdef exercises
+    // TODO Ecercise 4 - Add an annotationindicating allowed concurrency access
+    // Hint: Request and its subclasses have all their fields declared as final.
+    //#else
+//#    @Immutable
+    //#endif
+    abstract class Request {
+        final RequestMonitor fRequestMonitor;
+        
+        Request(RequestMonitor rm) {
+            fRequestMonitor = rm;
+        }
+    }
+    
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#else
+//#    @Immutable
+    //#endif
+    class CountRequest extends Request {
+        CountRequest(DataRequestMonitor<Integer> rm) { 
+            super(rm); 
+        }
+    } 
+
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#else
+//#    @Immutable
+    //#endif
+    class ItemRequest extends Request {
+        final int fIndex;
+        ItemRequest(int index, DataRequestMonitor<String> rm) { 
+            super(rm);
+            fIndex = index; 
+        }
+    } 
+
+    // The executor used to access all internal data of the generator.
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    // Hint: If a member does not have an annotation, the programmer can assume
+    // that the concurrency rule that applies to the class also applies to this
+    // member.
+    //#endif
+    private DsfExecutor fExecutor;
+    
+    // Main request queue of the data generator.  The getValue(), getCount(), 
+    // and shutdown() methods write into the queue, while the serviceQueue()
+    // method reads from it.
+    // The executor used to access all internal data of the generator.
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#else
+//#    @ConfinedToDsfExecutor("fExecutor")
+    //#endif
+    private List<Request> fQueue = new LinkedList<Request>();
+
+    // List of listeners is not synchronized, it also has to be accessed
+    // using the executor.
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#else
+//#    @ConfinedToDsfExecutor("fExecutor")
+    //#endif
+    private List<Listener> fListeners = new LinkedList<Listener>();
+
+    // Current number of elements in this generator.
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#else
+//#    @ConfinedToDsfExecutor("fExecutor")
+    //#endif
+    private int fCount = MIN_COUNT;
+    
+    // Counter used to determine when to reset the element count.
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#else
+//#    @ConfinedToDsfExecutor("fExecutor")
+    //#endif
+    private int fCountResetTrigger = 0;
+    
+    // Elements which were modified since the last reset.
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#else
+//#    @ConfinedToDsfExecutor("fExecutor")
+    //#endif
+    private Set<Integer> fChangedIndexes = new HashSet<Integer>();
+    
+    // Flag used to ensure that requests are processed sequentially.
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#else
+//#    @ConfinedToDsfExecutor("fExecutor")
+    //#endif
+    private boolean fServiceQueueInProgress = false;
+ 
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#endif
+    public DataGeneratorWithExecutor() {
+        // Create the executor
+        fExecutor = new DefaultDsfExecutor("Supplier Executor");
+        
+        // Schedule a runnable to make the random changes.
+        fExecutor.scheduleAtFixedRate(
+            new DsfRunnable() {
+                public void run() {
+                    randomChanges();
+                }
+            },
+            RANDOM_CHANGE_INTERVAL, 
+            RANDOM_CHANGE_INTERVAL, 
+            TimeUnit.MILLISECONDS);
+    }
+     
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#endif
+    public void shutdown(final RequestMonitor rm) {
+        try {
+            fExecutor.execute( new DsfRunnable() {
+                public void run() {
+                    // Empty the queue of requests and fail them.
+                    for (Request request : fQueue) {
+                        request.fRequestMonitor.setStatus(
+                            new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, "Supplier shut down"));
+                        request.fRequestMonitor.done();
+                    }
+                    fQueue.clear();
+                    
+                    // Kill executor.
+                    fExecutor.shutdown();
+                    rm.done();
+                }
+            });
+        } catch (RejectedExecutionException e) {
+            rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, "Supplier shut down"));
+            rm.done();
+        }
+    }
+
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#endif
+    public void getCount(final DataRequestMonitor<Integer> rm) {
+        try {
+            fExecutor.execute( new DsfRunnable() {
+                public void run() {
+                    fQueue.add(new CountRequest(rm));
+                    serviceQueue();
+                }
+            });
+        } catch (RejectedExecutionException e) {
+            rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, "Supplier shut down"));
+            rm.done();
+        }
+    }
+    
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#endif
+    public void getValue(final int index, final DataRequestMonitor<String> rm) { 
+        try {
+            fExecutor.execute( new DsfRunnable() {
+                public void run() {
+                    fQueue.add(new ItemRequest(index, rm));
+                    serviceQueue();
+                }
+            });
+        } catch (RejectedExecutionException e) {
+            rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, "Supplier shut down"));
+            rm.done();
+        }
+    } 
+
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#endif
+    public void addListener(final Listener listener) {
+        try {
+            fExecutor.execute( new DsfRunnable() {
+                public void run() {
+                    fListeners.add(listener);
+                }
+            });
+        } catch (RejectedExecutionException e) {}
+    }
+
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#endif
+    public void removeListener(final Listener listener) {
+        try {
+            fExecutor.execute( new DsfRunnable() {
+                public void run() {
+                    fListeners.remove(listener);
+                }
+            });
+        } catch (RejectedExecutionException e) {}
+    }
+
+    // Main processing function of this generator.
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#else
+//#    @ConfinedToDsfExecutor("fExecutor")
+    //#endif
+    private void serviceQueue() {
+        
+        //#ifdef exercises
+        // TODO Exercise 3 - Add logic to discard cancelled requests from queue.
+        // Hint: Since serviceQueue() is called using the executor, and the 
+        // fQueue list can only be modified when running in the executor 
+        // thread.  This method can safely iterate and modify fQueue without 
+        // risk of race conditions or concurrent modification exceptions.
+        //#else
+//#        for (Iterator<Request> requestItr = fQueue.iterator(); requestItr.hasNext();) {
+//#            Request request = requestItr.next();
+//#            if (request.fRequestMonitor.isCanceled()) {
+//#                request.fRequestMonitor.setStatus(
+//#                    new Status(IStatus.CANCEL, DsfExamplesPlugin.PLUGIN_ID, "Request canceled"));
+//#                request.fRequestMonitor.done();
+//#                requestItr.remove();
+//#            }
+//#        }
+        //#endif
+        
+        // If a queue servicing is already scheduled, do nothing.
+        if (fServiceQueueInProgress) {
+            return;
+        }
+        
+        if (fQueue.size() != 0) {
+            // If there are requests to service, remove one from the queue and 
+            // schedule a runnable to process the request after a processing
+            // delay.
+            fServiceQueueInProgress = true;
+            final Request request = fQueue.remove(0);
+            fExecutor.schedule(
+                new DsfRunnable() {
+                    public void run() {
+                        if (request instanceof CountRequest) {
+                            processCountRequest((CountRequest)request);
+                        } else if (request instanceof ItemRequest) {
+                            processItemRequest((ItemRequest)request);
+                        } 
+                        
+                        // Reset the processing flag and process next
+                        // request.
+                        fServiceQueueInProgress = false;
+                        serviceQueue();
+                    }
+                }, 
+                PROCESSING_DELAY, TimeUnit.MILLISECONDS);
+        }
+    }
+    
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#else
+//#    @ConfinedToDsfExecutor("fExecutor")
+    //#endif
+    private void processCountRequest(CountRequest request) {
+        @SuppressWarnings("unchecked") // Suppress warning about lost type info.
+        DataRequestMonitor<Integer> rm = (DataRequestMonitor<Integer>)request.fRequestMonitor;
+        
+        rm.setData(fCount);
+        rm.done();
+    }
+
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#else
+//#    @ConfinedToDsfExecutor("fExecutor")
+    //#endif
+    private void processItemRequest(ItemRequest request) {
+        @SuppressWarnings("unchecked") // Suppress warning about lost type info.
+        DataRequestMonitor<String> rm = (DataRequestMonitor<String>)request.fRequestMonitor; 
+
+        if (fChangedIndexes.contains(request.fIndex)) {
+            rm.setData("Changed: " + request.fIndex);
+        } else {
+            rm.setData(Integer.toString(request.fIndex)); 
+        }
+        rm.done();
+    } 
+ 
+    /**
+     * This method simulates changes in the supplier's data set.
+     */
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#else
+//#    @ConfinedToDsfExecutor("fExecutor")
+    //#endif
+    private void randomChanges() {
+        // Once every number of changes, reset the count, the rest of the 
+        // times just change certain values.
+        if (++fCountResetTrigger % RANDOM_COUNT_CHANGE_INTERVALS == 0){
+            randomCountReset();
+        } else {
+            randomDataChange();
+        }
+    }
+     
+    /**
+     * Calculates new size for provider's data set.
+     */
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#else
+//#    @ConfinedToDsfExecutor("fExecutor")
+    //#endif
+    private void randomCountReset() {
+        // Calculate the new count.
+        Random random = new java.util.Random();
+        fCount = MIN_COUNT + Math.abs(random.nextInt()) % (MAX_COUNT - MIN_COUNT);
+
+        // Reset the changed values.
+        fChangedIndexes.clear();
+        
+        // Notify listeners  
+        for (Listener listener : fListeners) {
+            listener.countChanged();
+        }
+    }
+     
+    /**
+     * Invalidates a random range of indexes.
+     */
+    //#ifdef exercises
+    // TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+    // indicating allowed thread access to this class/method/member
+    //#else
+//#    @ConfinedToDsfExecutor("fExecutor")
+    //#endif
+    private void randomDataChange() {
+        // Calculate the indexes to change.
+        Random random = new java.util.Random();
+        Set<Integer> set = new HashSet<Integer>();
+        for (int i = 0; i < fCount * RANDOM_CHANGE_SET_PERCENTAGE / 100; i++) {
+            set.add( new Integer(Math.abs(random.nextInt()) % fCount) );
+        }                    
+
+        // Add the indexes to an overall set of changed indexes.
+        fChangedIndexes.addAll(set);
+        
+        // Notify listeners  
+        for (Listener listener : fListeners) {
+            listener.valuesChanged(set);
+        }
+    }    
+}
+
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/DataGeneratorWithThread.java b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/DataGeneratorWithThread.java
new file mode 100644
index 0000000..f3647f5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/DataGeneratorWithThread.java
@@ -0,0 +1,242 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+//#ifdef exercises
+package org.eclipse.cdt.examples.dsf.dataviewer;
+//#else
+//#package org.eclipse.cdt.examples.dsf.dataviewer.answers;
+//#endif
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Random;
+import java.util.Set;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+import org.eclipse.cdt.examples.dsf.DsfExamplesPlugin;
+
+/**
+ * Thread-based implementation of the data generator.
+ * <p>
+ * This generator is based around a queue of client requests and a thread which 
+ * reads the requests from the queue and processes them. The distinguishing 
+ * feature of this generator is that it uses a a blocking queue as the main 
+ * synchronization object.  However, fListeners, fShutdown,  and fChangedIndexes 
+ * fields also need to be thread-safe and so they implement their own 
+ * synchronization.
+ * </p>
+ */
+public class DataGeneratorWithThread extends Thread implements IDataGenerator {
+
+    // Request objects are used to serialize the interface calls into objects
+    // which can then be pushed into a queue.
+    abstract class Request {
+        final RequestMonitor fRequestMonitor;
+        
+        Request(RequestMonitor rm) {
+            fRequestMonitor = rm;
+        }
+    }
+    
+    class CountRequest extends Request {
+        CountRequest(DataRequestMonitor<Integer> rm) { 
+            super(rm); 
+        }
+    } 
+
+    class ItemRequest extends Request {
+        final int fIndex;
+        ItemRequest(int index, DataRequestMonitor<String> rm) { 
+            super(rm);
+            fIndex = index; 
+        }
+    } 
+
+    class ShutdownRequest extends Request {
+        ShutdownRequest(RequestMonitor rm) { 
+            super(rm);
+        }
+    }
+
+    // Main request queue of the data generator.  The getValue(), getCount(), 
+    // and shutdown() methods write into the queue, while the run() method 
+    // reads from it.
+    private final BlockingQueue<Request> fQueue = new LinkedBlockingQueue<Request>();
+
+    // ListenerList class provides thread safety.
+    private ListenerList fListeners = new ListenerList();
+    
+    // Current number of elements in this generator.
+    private int fCount = MIN_COUNT;
+    
+    // Counter used to determine when to reset the element count.
+    private int fCountResetTrigger = 0;
+    
+    // Elements which were modified since the last reset.
+    private Set<Integer> fChangedIndexes = Collections.synchronizedSet(new HashSet<Integer>());
+    
+    // Used to determine when to make changes in data.
+    private long fLastChangeTime = System.currentTimeMillis();
+
+    // Flag indicating when the generator has been shut down.
+    private AtomicBoolean fShutdown = new AtomicBoolean(false);
+ 
+    public DataGeneratorWithThread() {
+        // Immediately kick off the request processing thread.
+        start();
+    }
+     
+    public void shutdown(RequestMonitor rm) {
+        // Mark the generator as shut down.  After the fShutdown flag is set,
+        // all new requests should be shut down.
+        if (!fShutdown.getAndSet(true)) {
+            fQueue.add(new ShutdownRequest(rm));
+        } else {
+            // 
+            rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, "Supplier shut down"));
+            rm.done();
+        }        
+    }
+
+    public void getCount(DataRequestMonitor<Integer> rm) {
+        if (!fShutdown.get()) {
+            fQueue.add(new CountRequest(rm));
+        } else {
+            rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, "Supplier shut down"));
+            rm.done();
+        }        
+    }
+    
+    public void getValue(int index, DataRequestMonitor<String> rm) { 
+        if (!fShutdown.get()) {
+            fQueue.add(new ItemRequest(index, rm));
+        } else {
+            rm.setStatus(new Status(IStatus.ERROR, DsfExamplesPlugin.PLUGIN_ID, "Supplier shut down"));
+            rm.done();
+        }        
+    } 
+
+    public void addListener(Listener listener) {
+        fListeners.add(listener);
+    }
+
+    public void removeListener(Listener listener) {
+        fListeners.remove(listener);
+    }
+    
+    @Override
+    public void run() {
+        try {
+            while(true) {
+                // Get the next request from the queue.  The time-out 
+                // ensures that that the random changes get processed. 
+                final Request request = fQueue.poll(100, TimeUnit.MILLISECONDS);
+                
+                // If a request was dequeued, process it.
+                if (request != null) {
+                    // Simulate a processing delay.
+                    Thread.sleep(PROCESSING_DELAY);
+                    
+                    if (request instanceof CountRequest) {
+                        processCountRequest((CountRequest)request);
+                    } else if (request instanceof ItemRequest) {
+                        processItemRequest((ItemRequest)request);
+                    } else if (request instanceof ShutdownRequest) {
+                        // If shutting down, just break out of the while(true) 
+                        // loop and thread will exit.
+                        request.fRequestMonitor.done();
+                        break;
+                    }
+                }
+                
+                // Simulate data changes.
+                randomChanges();
+            }
+        }
+        catch (InterruptedException x) {}
+    } 
+
+    private void processCountRequest(CountRequest request) {
+        @SuppressWarnings("unchecked") // Suppress warning about lost type info.
+        DataRequestMonitor<Integer> rm = (DataRequestMonitor<Integer>)request.fRequestMonitor;
+        
+        rm.setData(fCount);
+        rm.done();
+    }
+
+    private void processItemRequest(ItemRequest request) {
+        @SuppressWarnings("unchecked") // Suppress warning about lost type info.
+        DataRequestMonitor<String> rm = (DataRequestMonitor<String>)request.fRequestMonitor; 
+
+        if (fChangedIndexes.contains(request.fIndex)) {
+            rm.setData("Changed: " + request.fIndex);
+        } else {
+            rm.setData(Integer.toString(request.fIndex));
+        }
+        rm.done();
+    } 
+ 
+    
+    private void randomChanges() {
+        // Check if enough time is elapsed.
+        if (System.currentTimeMillis() > fLastChangeTime + RANDOM_CHANGE_INTERVAL) {
+            fLastChangeTime = System.currentTimeMillis();
+            
+            // Once every number of changes, reset the count, the rest of the 
+            // times just change certain values.
+            if (++fCountResetTrigger % RANDOM_COUNT_CHANGE_INTERVALS == 0){
+                randomCountReset();
+            } else {
+                randomDataChange();
+            }
+        }
+    }
+     
+    private void randomCountReset() {
+        // Calculate the new count.
+        Random random = new java.util.Random();
+        fCount = MIN_COUNT + Math.abs(random.nextInt()) % (MAX_COUNT - MIN_COUNT);
+
+        // Reset the changed values.
+        fChangedIndexes.clear();
+        
+        // Notify listeners  
+        for (Object listener : fListeners.getListeners()) {
+            ((Listener)listener).countChanged();
+        }
+    }
+     
+    private void randomDataChange() {
+        // Calculate the indexes to change.
+        Random random = new java.util.Random();
+        Set<Integer> set = new HashSet<Integer>();
+        for (int i = 0; i < fCount * RANDOM_CHANGE_SET_PERCENTAGE / 100; i++) {
+            set.add( new Integer(Math.abs(random.nextInt()) % fCount) );
+        }                
+
+        // Add the indexes to an overall set of changed indexes.
+        fChangedIndexes.addAll(set);
+        
+        // Notify listeners  
+        for (Object listener : fListeners.getListeners()) {
+            ((Listener)listener).valuesChanged(set);
+        }
+    }    
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/IDataGenerator.java b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/IDataGenerator.java
new file mode 100644
index 0000000..882b054
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/IDataGenerator.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+//#ifdef exercises
+package org.eclipse.cdt.examples.dsf.dataviewer;
+//#else
+//#package org.eclipse.cdt.examples.dsf.dataviewer.answers;
+//#endif
+
+import java.util.Set;
+
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+//#ifdef answers
+//#import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+//#endif
+
+/**
+ * Data generator is simple source of data used to populate the example table 
+ * view.  It contains two asynchronous methods for retrieving the data 
+ * parameters: the count and the value for a given index.  It also allows the 
+ * view to receive events indicating when the data supplied by the generator 
+ * is changed. 
+ */
+//#ifdef exercises
+// TODO Exercise 4 - Add an annotation (ThreadSafe/ConfinedToDsfExecutor) 
+// indicating allowed thread access to this class/method/member
+//#else
+//#@ThreadSafe
+//#endif
+public interface IDataGenerator {
+
+    // Constants which control the data generator behavior.
+    // Changing the count range can stress the scalability of the system, while
+    // changing of the process delay and random change interval can stress 
+    // its performance.
+    final static int MIN_COUNT = 100;
+    final static int MAX_COUNT = 200;
+    final static int PROCESSING_DELAY = 10;
+    final static int RANDOM_CHANGE_INTERVAL = 10000;
+    final static int RANDOM_COUNT_CHANGE_INTERVALS = 3;
+    final static int RANDOM_CHANGE_SET_PERCENTAGE = 10;
+
+    
+    // Listener interface that the view needs to implement to react
+    // to the changes in data.
+    public interface Listener {
+        void countChanged();
+        void valuesChanged(Set<Integer> indexes);
+    }
+
+    // Data access methods.
+    void getCount(DataRequestMonitor<Integer> rm);
+    void getValue(int index, DataRequestMonitor<String> rm); 
+    
+    // Method used to shutdown the data generator including any threads that 
+    // it may use.  
+    void shutdown(RequestMonitor rm);
+
+    // Methods for registering change listeners.
+    void addListener(Listener listener);
+    void removeListener(Listener listener);
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/SyncDataViewer.java b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/SyncDataViewer.java
new file mode 100644
index 0000000..6f4dec3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/dataviewer/SyncDataViewer.java
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+//#ifdef exercises
+package org.eclipse.cdt.examples.dsf.dataviewer;
+//#else
+//#package org.eclipse.cdt.examples.dsf.dataviewer.answers;
+//#endif
+
+import java.util.Set;
+
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor;
+import org.eclipse.cdt.dsf.concurrent.Query;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * Data viewer based on a table, which reads data using synchronous methods.
+ * <p>
+ * This viewer implements the {@link IStructuredContentProvider} interface 
+ * which is used by the JFace TableViewer class to populate a Table.  This 
+ * interface contains one principal methods for reading data {@link #getElements(Object)}, 
+ * which synchronously returns an array of elements.  In order to implement this 
+ * method using the asynchronous data generator, this provider uses the 
+ * {@link Query} object. 
+ * </p>
+ */
+public class SyncDataViewer 
+    implements IStructuredContentProvider, IDataGenerator.Listener 
+{
+    // The viewer and generator that this content provider using.
+    final private TableViewer fViewer;
+    final private IDataGenerator fDataGenerator;
+    
+    public SyncDataViewer(TableViewer viewer, IDataGenerator generator) {
+        fViewer = viewer;
+        fDataGenerator = generator;
+        fDataGenerator.addListener(this);
+    }
+    
+    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+        // Not used
+    }
+
+    
+    public Object[] getElements(Object inputElement) {
+        
+        // Create the query object for reading data count. 
+        Query<Integer> countQuery = new Query<Integer>() {
+            @Override
+            protected void execute(DataRequestMonitor<Integer> rm) {
+                fDataGenerator.getCount(rm);
+            }
+        };
+        
+        // Submit the query to be executed.  A query implements a runnable
+        // interface and it has to be executed in order to do its work.
+        ImmediateExecutor.getInstance().execute(countQuery);
+        int count = 0;
+        
+        // Block until the query completes, which will happen when the request
+        // monitor of the execute() method is marked done.
+        try {
+            count = countQuery.get();
+        } catch (Exception e) { 
+            // InterruptedException and ExecutionException can be thrown here.
+            // ExecutionException containing a CoreException will be thrown 
+            // if an error status is set to the Query's request monitor.
+            return new Object[0]; 
+        } 
+
+        // Create the array that will be filled with elements.
+        // For each index in the array execute a query to get the element at
+        // that index.
+        final Object[] elements = new Object[count];
+
+        for (int i = 0; i < count; i++) {
+            final int index = i;
+            Query<String> valueQuery = new Query<String>() {
+                @Override
+                protected void execute(DataRequestMonitor<String> rm) {
+                    fDataGenerator.getValue(index, rm);
+                }
+            };
+            ImmediateExecutor.getInstance().execute(valueQuery);
+            try {
+                elements[i] = valueQuery.get();
+            } catch (Exception e) { 
+                elements[i] = "error";
+            } 
+        }
+        return elements;
+    }
+
+    public void dispose() {
+        fDataGenerator.removeListener(this);
+    }
+
+    public void countChanged() {
+        // For any event from the generator, refresh the whole viewer.
+        refreshViewer();
+    }
+    
+    public void valuesChanged(Set<Integer> indexes) {
+        // For any event from the generator, refresh the whole viewer.
+        refreshViewer();
+    }
+    
+    private void refreshViewer() {
+        //#ifdef exercises
+        // TODO Exercise 5 - Add a call to getElements() to force a deadlock.
+        //#else
+//#        getElements(null);
+        //#endif
+        
+        // This method may be called on any thread, switch to the display 
+        // thread before calling the viewer.
+        Display display = fViewer.getControl().getDisplay(); 
+        display.asyncExec( new Runnable() {
+            public void run() {
+                if (!fViewer.getControl().isDisposed()) {
+                    fViewer.refresh();
+                }
+            }
+        });
+    }
+    
+    public static void main(String[] args) {
+        // Create the shell to hold the viewer.
+        Display display = new Display();
+        Shell shell = new Shell(display, SWT.SHELL_TRIM);
+        shell.setLayout(new GridLayout());
+        GridData data = new GridData(GridData.FILL_BOTH);
+        shell.setLayoutData(data);
+        Font font = new Font(display, "Courier", 10, SWT.NORMAL);
+
+        // Create the table viewer.
+        TableViewer tableViewer = new TableViewer(shell, SWT.BORDER);
+        tableViewer.getControl().setLayoutData(data);
+
+        // Create the data generator.
+        //#ifdef exercises
+        // TODO Exercise 5 - Use the DataGeneratorWithExecutor() instead.
+        final IDataGenerator generator = new DataGeneratorWithThread();
+        //#else
+//#        final IDataGenerator generator = new DataGeneratorWithExecutor();     
+        //#endif
+        
+        // Create the content provider which will populate the viewer.
+        SyncDataViewer contentProvider = new SyncDataViewer(tableViewer, generator);
+        tableViewer.setContentProvider(contentProvider);
+        tableViewer.setInput(new Object());
+
+        // Open the shell and service the display dispatch loop until user
+        // closes the shell.
+        shell.open();
+        while (!shell.isDisposed()) {
+            if (!display.readAndDispatch())
+                display.sleep();
+        }
+        
+        // The IDataGenerator.shutdown() method is asynchronous, this requires
+        // using a query again in order to wait for its completion.
+        Query<Object> shutdownQuery = new Query<Object>() {
+            @Override
+            protected void execute(DataRequestMonitor<Object> rm) {
+                generator.shutdown(rm);
+            }
+        };
+        ImmediateExecutor.getInstance().execute(shutdownQuery);
+        try {
+            shutdownQuery.get();
+        } catch (Exception e) {}
+        
+        // Shut down the display.
+        font.dispose();    
+        display.dispose();
+    }
+    
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/Async2Plus2.java b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/Async2Plus2.java
new file mode 100644
index 0000000..f258738
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/Async2Plus2.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+//#ifdef exercises
+package org.eclipse.cdt.examples.dsf.requestmonitor;
+//#else
+//#package org.eclipse.cdt.examples.dsf.requestmonitor.answers;
+//#endif
+
+import java.util.concurrent.Executor;
+
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor;
+
+/**
+ * Example of using a DataRequestMonitor to retrieve a result from an 
+ * asynchronous method.
+ */
+public class Async2Plus2 {
+    
+    public static void main(String[] args) {
+        Executor executor = ImmediateExecutor.getInstance();
+        DataRequestMonitor<Integer> rm = 
+            new DataRequestMonitor<Integer>(executor, null) {
+                @Override
+                protected void handleCompleted() {
+                    System.out.println("2 + 2 = " + getData());
+                }
+            };
+        asyncAdd(2, 2, rm);
+    }
+
+    static void asyncAdd(int value1, int value2, DataRequestMonitor<Integer> rm) {
+        rm.setData(value1 + value2);
+        rm.done();
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncHelloWorld.java b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncHelloWorld.java
new file mode 100644
index 0000000..81f23f6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncHelloWorld.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+//#ifdef exercises
+package org.eclipse.cdt.examples.dsf.requestmonitor;
+//#else
+//#package org.eclipse.cdt.examples.dsf.requestmonitor.answers;
+//#endif
+
+import java.util.concurrent.Executor;
+
+import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+
+/**
+ * "Hello world" example which uses an asynchronous method to print out
+ * the result.  
+ * <p>
+ * The main method uses an immediate executor, which executes runnables
+ * as soon as they are submitted, in creating its request monitor. 
+ * 
+ */
+public class AsyncHelloWorld {
+
+    public static void main(String[] args) {
+        Executor executor = ImmediateExecutor.getInstance();
+        RequestMonitor rm = new RequestMonitor(executor, null);
+        asyncHelloWorld(rm);
+    }
+
+    static void asyncHelloWorld(RequestMonitor rm) {
+        System.out.println("Hello world");
+        //#ifdef exercises
+        // TODO Exercise 1: - Call the second async. "Hello world 2" method.
+        // Hint: Calling an asynchronous method requires passing to it a 
+        // request monitor.  A new request monitor can be constructed with 
+        // a parent RequestMonitor as an argument argument.  The parent gets 
+        // completed automatically when the lower level request monitor is 
+        // completed.
+        rm.done();
+        //#else
+//#        RequestMonitor rm2 = new RequestMonitor(ImmediateExecutor.getInstance(), rm);
+//#        asyncHelloWorld2(rm2);
+        //#endif
+    }
+    
+    //#ifdef exercises
+    // TODO: Exercise 1 - Add a second async. "Hello world 2" method.   
+    //#else
+//#    static void asyncHelloWorld2(RequestMonitor rm) {
+//#        System.out.println("Hello world 2");
+//#        rm.done();
+//#    }
+    //#endif
+}
diff --git a/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncQuicksort.java b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncQuicksort.java
new file mode 100644
index 0000000..2adb1a0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.examples.dsf/src_preprocess/org/eclipse/cdt/examples/dsf/requestmonitor/AsyncQuicksort.java
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+//#ifdef exercises
+package org.eclipse.cdt.examples.dsf.requestmonitor;
+//#else
+//#package org.eclipse.cdt.examples.dsf.requestmonitor.answers;
+//#endif
+
+import java.util.Arrays;
+import java.util.concurrent.Executor;
+
+import org.eclipse.cdt.dsf.concurrent.CountingRequestMonitor;
+//#ifdef answers
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+//#endif
+import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor;
+import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
+
+/**
+ * Example of using a CountingRequestMonitor to wait for multiple 
+ * asynchronous calls to complete.  
+ */
+public class AsyncQuicksort {
+
+    static Executor fgExecutor = ImmediateExecutor.getInstance();
+
+    public static void main(String[] args) {
+        final int[] array = {5, 7, 8, 3, 2, 1, 9, 5, 4};
+
+        System.out.println("To sort: " + Arrays.toString(array));
+        asyncQuicksort(
+            array, 0, array.length - 1, 
+            new RequestMonitor(fgExecutor, null) {
+                @Override
+                protected void handleCompleted() {
+                    System.out.println("Sorted: " + Arrays.toString(array));
+                }
+            });
+    }
+
+    static void asyncQuicksort(final int[] array, final int left, 
+        final int right, final RequestMonitor rm) 
+    {
+        if (right > left) {
+            int pivot = left;
+            //#ifdef exercises
+            // TODO: Exercise 2 - Convert the call to partition into an
+            // asynchronous call to asyncPartition().
+            // Hint: The rest of the code below should be executed inside
+            // the DataRequestMonitor.handleCompleted() overriding method.
+            int newPivot = partition(array, left, right, pivot);
+            printArray(array, left, right, newPivot);
+
+            CountingRequestMonitor countingRm = new CountingRequestMonitor(fgExecutor, rm);
+            asyncQuicksort(array, left, newPivot - 1, countingRm);
+            asyncQuicksort(array, newPivot + 1, right, countingRm);
+            countingRm.setDoneCount(2);
+            //#else
+//#            asyncPartition(
+//#                array, left, right, pivot, 
+//#                new DataRequestMonitor<Integer>(fgExecutor, rm) {
+//#                    @Override
+//#                    protected void handleCompleted() {
+//#                        int newPivot = getData();
+//#                        printArray(array, left, right, newPivot);
+//#                       
+//#                        CountingRequestMonitor countingRm = new CountingRequestMonitor(fgExecutor, rm);
+//#                        asyncQuicksort(array, left, newPivot - 1, countingRm);
+//#                        asyncQuicksort(array, newPivot + 1, right, countingRm);
+//#                        countingRm.setDoneCount(2);
+//#                    }
+//#            });
+            //#endif
+        } else {
+            rm.done();
+        }
+    }
+
+    //#ifdef exercises
+    // TODO Exercise 2 - Convert partition to an asynchronous method.
+    // Hint: a DataRequestMonitor<Integer> should be used to carry the 
+    // return value to the caller.
+    static int partition(int[] array, int left, int right, int pivot)
+    //#else
+//#    static void asyncPartition(int[] array, int left, int right, int pivot, DataRequestMonitor<Integer> rm)
+    //#endif
+    {
+        int pivotValue = array[pivot];
+        array[pivot] = array[right]; 
+        array[right] = pivotValue; 
+        int store = left;
+        for (int i  = left; i < right; i++) {
+            if (array[i] <= pivotValue) {
+                int tmp = array[store];
+                array[store] = array[i];
+                array[i] = tmp;
+                store++;
+            }
+        }
+        array[right] = array[store];
+        array[store] = pivotValue;
+
+        //#ifdef exercises
+        // TODO: Request Monitors Exercise 2 - Return the data to caller using 
+        // a request monitor.
+        return store;
+        //#else
+//#        // Java 5 automatically converts the int type of the store variable
+//#        // to an Integer object.
+//#        rm.setData(store);
+//#        rm.done();
+        //#endif
+    }
+
+    static void printArray(int[] array, int left, int right, int pivot) {
+        StringBuffer buffer = new StringBuffer();
+        for (int i = 0; i < array.length; i++ ) {
+            if (i == left) {
+                buffer.append('>');
+            } else if (i == pivot) {
+                buffer.append('-');
+            } else {
+                buffer.append(' ');
+            }
+            buffer.append(array[i]);
+
+            if (i == right) {
+                buffer.append('<');
+            } else if (i == pivot) {
+                buffer.append('-');
+            } else {
+                buffer.append(' ');
+            }
+        }
+
+        System.out.println(buffer);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/.classpath b/results/plugins/org.eclipse.cdt.launch.remote/.classpath
new file mode 100644
index 0000000..7bdc3fd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+		<accessrules>
+			<accessrule kind="discouraged" pattern="**/internal/**"/>
+		</accessrules>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/results/plugins/org.eclipse.cdt.core.aix/.cvsignore b/results/plugins/org.eclipse.cdt.launch.remote/.cvsignore
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.aix/.cvsignore
copy to results/plugins/org.eclipse.cdt.launch.remote/.cvsignore
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/.project b/results/plugins/org.eclipse.cdt.launch.remote/.project
new file mode 100644
index 0000000..576ca25
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.launch.remote</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/.settings/org.eclipse.core.resources.prefs b/results/plugins/org.eclipse.cdt.launch.remote/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..187ed0c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Fri Apr 17 14:45:21 EDT 2009
+eclipse.preferences.version=1
+encoding//src/org/eclipse/cdt/internal/launch/remote/messages.properties=8859_1
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/.settings/org.eclipse.jdt.core.prefs b/results/plugins/org.eclipse.cdt.launch.remote/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..381fc6e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,71 @@
+#Fri Mar 28 14:14:24 CET 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/HelpContexts.xml b/results/plugins/org.eclipse.cdt.launch.remote/HelpContexts.xml
new file mode 100644
index 0000000..8401379
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/HelpContexts.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.contexts"?>
+<!--
+Copyright (c) 2006 Wind River Systems, Inc.
+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 
+
+Contributors: 
+Martin Oberhuber (Wind River) - initial API and implementation  
+-->
+<contexts>
+  <context id="launchgroup">
+  <description>The Remote CDT Launch Tab Group allows you to specify the connection, program and properties of a program to launch and debug on a remote system.
+  </description>
+  <topic href="remotecdt.html" label="Launching Remote C/C++ Applications"/>
+</context>
+	
+</contexts>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.cdt.launch.remote/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..66bfd8d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.cdt.launch.remote;singleton:=true
+Bundle-Version: 2.2.0.qualifier
+Bundle-Activator: org.eclipse.cdt.internal.launch.remote.Activator
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.rse.ui;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.rse.subsystems.shells.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.rse.subsystems.files.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.cdt.launch,
+ org.eclipse.cdt.debug.mi.core,
+ org.eclipse.cdt.debug.core,
+ org.eclipse.cdt.core,
+ org.eclipse.debug.ui,
+ org.eclipse.ui,
+ org.eclipse.debug.core,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.cdt.debug.mi.ui,
+ org.eclipse.cdt.debug.ui,
+ org.eclipse.rse.files.ui;bundle-version="[3.0.0,4.0.0)"
+Bundle-ActivationPolicy: lazy
+Eclipse-LazyStart: true
+Bundle-Vendor: %providerName
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Export-Package: org.eclipse.cdt.launch.remote;x-internal:=true
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/about.html b/results/plugins/org.eclipse.cdt.launch.remote/about.html
new file mode 100644
index 0000000..d4cc693
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>June 5, 2007</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/about.ini b/results/plugins/org.eclipse.cdt.launch.remote/about.ini
new file mode 100644
index 0000000..c14b38f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=eclipse32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/about.mappings b/results/plugins/org.eclipse.cdt.launch.remote/about.mappings
new file mode 100644
index 0000000..bddaab4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/about.properties b/results/plugins/org.eclipse.cdt.launch.remote/about.properties
new file mode 100644
index 0000000..02bfa7a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/about.properties
@@ -0,0 +1,25 @@
+###############################################################################
+# Copyright (c) 2006, 2009 PalmSource, Inc. and others.
+# 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
+#
+# Contributors:
+# PalmSource - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+#
+# Do not translate any values surrounded by {}
+
+blurb=C/C++ Remote Debug Launcher\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright PalmSource, Inc., Wind River Systems, Inc. and others 2006, 2009.  All rights reserved.\n\
+Visit http://www.eclipse.org/cdt
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/build.properties b/results/plugins/org.eclipse.cdt.launch.remote/build.properties
new file mode 100644
index 0000000..f98240b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/build.properties
@@ -0,0 +1,33 @@
+#####################################################################################
+# Copyright (c) 2006 PalmSource, Inc.
+# 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 
+# 
+# Contributors: 
+# Ewa Matejska (PalmSource)
+# Martin Oberhuber (Wind River) - fix 158529: Migrate docs to HTML / TOC format 
+# Martin Oberhuber (Wind River) - add help contexts 
+#####################################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               about.html,\
+               about.ini,\
+               about.mappings,\
+               about.properties,\
+               eclipse32.png,\
+               plugin.properties,\
+               plugin.xml,\
+               remotecdt.html,\
+               toc.xml,\
+               HelpContexts.xml,\
+               icons/,\
+               .,\
+               eclipse32.gif
+src.includes = META-INF/,\
+               about.html,\
+               icons/,\
+               plugin.xml
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif b/results/plugins/org.eclipse.cdt.launch.remote/eclipse32.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif
copy to results/plugins/org.eclipse.cdt.launch.remote/eclipse32.gif
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/eclipse32.png b/results/plugins/org.eclipse.cdt.launch.remote/eclipse32.png
new file mode 100644
index 0000000..568fac1
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.launch.remote/eclipse32.png differ
diff --git a/results/plugins/org.eclipse.cdt.debug.gdbjtag.ui/icons/obj16/c_app.gif b/results/plugins/org.eclipse.cdt.launch.remote/icons/full/obj16/c_app.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.debug.gdbjtag.ui/icons/obj16/c_app.gif
copy to results/plugins/org.eclipse.cdt.launch.remote/icons/full/obj16/c_app.gif
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/icons/full/obj16/systemlocal_obj.gif b/results/plugins/org.eclipse.cdt.launch.remote/icons/full/obj16/systemlocal_obj.gif
new file mode 100644
index 0000000..d60c188
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.launch.remote/icons/full/obj16/systemlocal_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/icons/full/obj16/systemlocallive_obj.gif b/results/plugins/org.eclipse.cdt.launch.remote/icons/full/obj16/systemlocallive_obj.gif
new file mode 100644
index 0000000..ba10dec
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.launch.remote/icons/full/obj16/systemlocallive_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/plugin.properties b/results/plugins/org.eclipse.cdt.launch.remote/plugin.properties
new file mode 100644
index 0000000..a2aac6f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/plugin.properties
@@ -0,0 +1,13 @@
+################################################################################
+# Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
+# 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 
+# 
+# Contributors: 
+# Martin Oberhuber - initial API and implementation 
+################################################################################
+
+pluginName=C/C++ Remote Debug Launcher
+providerName=Eclipse CDT
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/plugin.xml b/results/plugins/org.eclipse.cdt.launch.remote/plugin.xml
new file mode 100644
index 0000000..fa6d0b2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/plugin.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2006 PalmSource, Inc. and others
+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 
+
+Contributors: 
+Ewa Matejska (PalmSource) - initial API and implementation 
+Martin Oberhuber (Wind River) - fix 158529: Migrate docs to HTML / TOC format 
+-->
+<?eclipse version="3.0"?>
+<plugin>
+   <extension
+         point="org.eclipse.debug.core.launchConfigurationTypes">
+      <launchConfigurationType
+            sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
+            delegate="org.eclipse.cdt.launch.remote.RemoteRunLaunchDelegate"
+            public="true"
+            sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer"
+            name="C/C++ Remote Application"
+            id="org.eclipse.rse.remotecdt.RemoteApplicationLaunch"
+            modes="debug,run">
+      </launchConfigurationType>
+   </extension>
+   <extension
+         point="org.eclipse.debug.ui.launchConfigurationTypeImages">
+      <launchConfigurationTypeImage
+            icon="icons/full/obj16/c_app.gif"
+            configTypeID="org.eclipse.rse.remotecdt.RemoteApplicationLaunch"
+            id="org.eclipse.cdt.launch.localRunLaunchImagefff">
+      </launchConfigurationTypeImage>
+   </extension>    
+   <extension
+         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+      <launchConfigurationTabGroup
+            class="org.eclipse.cdt.launch.remote.RemoteLaunchConfigurationTabGroup"
+            helpContextId="org.eclipse.rse.remotecdt.launchgroup"
+            id="org.eclipse.rse.remotecdt.RemoteLaunchTabGroup"
+            type="org.eclipse.rse.remotecdt.RemoteApplicationLaunch">
+      </launchConfigurationTabGroup>
+   </extension>
+   <extension
+         point="org.eclipse.cdt.debug.core.CDebugger">
+      <debugger
+            class="org.eclipse.cdt.debug.mi.core.GDBServerCDIDebugger2"
+            cpu="*"
+            id="org.eclipse.rse.remotecdt.RemoteGDBDebugger"
+            modes="run"
+            name="remote gdb/mi"
+            platform="*">
+      </debugger>
+   </extension>
+   <extension
+         point="org.eclipse.cdt.debug.ui.CDebuggerPage">
+      <debuggerPage
+            class="org.eclipse.cdt.launch.remote.RemoteGDBDebuggerPage"
+            debuggerID="org.eclipse.rse.remotecdt.RemoteGDBDebugger"
+            id="org.eclipse.rse.remotecdt.RemoteGDBDebuggerPage">
+      </debuggerPage>
+   </extension>
+
+	<!-- ============================================ -->
+	<!-- Define Help Context                          -->
+	<!-- ============================================ -->
+	<extension point="org.eclipse.help.contexts">
+  		<contexts file="HelpContexts.xml"/>
+	</extension>
+	<extension point="org.eclipse.help.toc">
+		<toc file="toc.xml"/>
+	</extension>
+
+</plugin>
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/remotecdt.html b/results/plugins/org.eclipse.cdt.launch.remote/remotecdt.html
new file mode 100644
index 0000000..6ea42ea
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/remotecdt.html
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<meta name="copyright" content="Copyright (c) 2006, 2007 PalmSource, Inc. and others. This page is made available under license. For full details see the LEGAL notice in the documentation book that contains this page." />
+<link rel="stylesheet" type="text/css" href="../org.eclipse.rse.doc.user/book.css" />
+<title>Launching Remote C/C++ Applications</title>
+</head>
+<!--
+Copyright (c) 2006, 2007 PalmSource, Inc. and others
+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 
+
+Contributors: 
+Ewa Matejska (PalmSource) - initial API and implementation 
+Martin Oberhuber (Wind River) - fix 158529: Migrate docs to HTML / TOC format
+Dave Dykstal (IBM) - fix 174770: SAX Parse exceptions in Eclipse 3.3 
+-->
+
+<body id="tremotecdt"><a name="tremotecdt"><!-- --></a>
+<h1 class="topictitle1">Launching Remote C/C++ Applications</h1>
+<div class="p">
+<p>The RSE Remote CDT Plugin builds on top of CDT and integrates with RSE to introduce
+a "Remote C/C++ Application" launch configuration. This launch configuration relies 
+on the shell and file services of the RSE connections.</p>
+
+<p>The "Remote C/C++ Application" launch configuration enables the user to select from a list of RSE 
+connections which have the shell service available. For a debug launch, the binary is downloaded
+to the remote using the file service of the RSE connection, gdbserver is automatically started 
+on the remote using the shell service and a gdb debug connection is establised.  For a run launch,
+the binary is downloaded to the remote using the file service and then it is invoked using the shell
+service.</p>
+
+<p>In the future, an RSE file service should be used to select where the remote download
+should take place. Right now the remote path is entered manually in a text field.</p>
+</div>
+
+<h2>System Prerequisites</h2>
+<div class="p"><b>Local Host</b>
+<ul>
+  <li>It is necessary to create an RSE connection which has the file and shell services 
+     available.</li>
+</ul></div>
+
+<div class="p"><b>Remote Host</b>
+<ul>
+  <li>gdbserver is on the path.</li>
+  <li>port 2345 is available to use. gdbserver will use this port.</li>
+</ul></div>
+
+<h2>Using</h2>
+<div class="p">
+<p>A "Remote C++ Application" launch configuration will be available.  
+After building a binary which will run on your remote, try using this 
+configuration to run or debug it.</p>
+</div>
+
+<h2>Current Limitations</h2>
+<div class="p">
+<p>There is no way to tell when the command on the remote has finished 
+running.  As a result, the "Remote Shell" process will be left active
+after the debug session dies and needs to be terminated manually. The
+run process also needs to be terminated manually for the same reason.</p>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Activator.java b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Activator.java
new file mode 100644
index 0000000..96fb782
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Activator.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2006 PalmSource, Inc.
+ * 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 
+ * 
+ * Contributors: 
+ * Ewa Matejska (PalmSource)
+ *******************************************************************************/
+
+package org.eclipse.cdt.internal.launch.remote;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class Activator extends Plugin {
+
+	/* The shared instance */
+	private static Activator plugin;
+	
+	/**
+	 * The constructor.
+	 */
+	public Activator() {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		super.stop(context);
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance.
+	 *
+	 * @return the shared instance.
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Messages.java b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Messages.java
new file mode 100644
index 0000000..254f492
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/Messages.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ * Martin Oberhuber      (Wind River) - initial API and implementation
+ * Ewa Matejska          (PalmSource) - [158783] browse button for cdt remote path
+ * Johann Draschwandtner (Wind River) - [231827][remotecdt]Auto-compute default for Remote path
+ * Anna Dushistova       (MontaVista) - [244173][remotecdt][nls] Externalize Strings in RemoteRunLaunchDelegate
+ * Anna Dushistova       (MontaVista) - [181517][usability] Specify commands to be run before remote application launch
+ * Nikita Shulga      (EmbeddedAlley) - [265236][remotecdt] Wait for RSE to initialize before querying it for host list
+ *******************************************************************************/
+package org.eclipse.cdt.internal.launch.remote;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.launch.remote.messages"; //$NON-NLS-1$
+
+	public static String Gdbserver_name_textfield_label;
+
+	public static String Gdbserver_Settings_Tab_Name;
+
+	public static String Port_number_textfield_label;
+
+	public static String Remote_GDB_Debugger_Options;
+
+	public static String RemoteCMainTab_Prerun;
+
+	public static String RemoteCMainTab_Program;
+
+	public static String RemoteCMainTab_Remote_Path_Browse_Button;
+
+	public static String RemoteCMainTab_Remote_Path_Browse_Button_Title;
+	public static String RemoteCMainTab_SkipDownload;
+	public static String RemoteCMainTab_ErrorNoProgram;
+	public static String RemoteCMainTab_ErrorNoConnection;
+	public static String RemoteCMainTab_Connection;
+	public static String RemoteCMainTab_New;
+	public static String RemoteCMainTab_Properties;
+	public static String RemoteCMainTab_Properties_title;
+	public static String RemoteCMainTab_Properties_Location;
+	public static String RemoteCMainTab_Properties_Skip_default;
+
+	public static String RemoteRunLaunchDelegate_0;
+
+	public static String RemoteRunLaunchDelegate_RemoteShell;
+	public static String RemoteRunLaunchDelegate_1;
+
+	public static String RemoteRunLaunchDelegate_10;
+
+	public static String RemoteRunLaunchDelegate_12;
+
+	public static String RemoteRunLaunchDelegate_13;
+
+	public static String RemoteRunLaunchDelegate_2;
+	public static String RemoteRunLaunchDelegate_3;
+	public static String RemoteRunLaunchDelegate_4;
+	public static String RemoteRunLaunchDelegate_5;
+	public static String RemoteRunLaunchDelegate_6;
+	public static String RemoteRunLaunchDelegate_7;
+	public static String RemoteRunLaunchDelegate_8;
+
+	public static String RemoteRunLaunchDelegate_9;
+
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	private Messages() {
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/messages.properties b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/messages.properties
new file mode 100644
index 0000000..3265450
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/internal/launch/remote/messages.properties
@@ -0,0 +1,51 @@
+################################################################################
+# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
+# 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 
+# 
+# Contributors: 
+# Martin Oberhuber      (Wind River) - externalized strings
+# Ewa Matejska          (PalmSource) - [158783] browse button for cdt remote path
+# Johann Draschwandtner (Wind River) - [231827][remotecdt]Auto-compute default for Remote path
+# Anna Dushistova       (MontaVista) - [244173][remotecdt][nls] Externalize Strings in RemoteRunLaunchDelegate
+# Anna Dushistova       (MontaVista) - [181517][usability] Specify commands to be run before remote application launch
+# Nikita Shulga      (EmbeddedAlley) - [265236][remotecdt] Wait for RSE to initialize before querying it for host list
+################################################################################
+
+# NLS_MESSAGEFORMAT_VAR
+# NLS_ENCODING=UTF-8
+
+RemoteRunLaunchDelegate_0=Launching
+RemoteRunLaunchDelegate_RemoteShell=Remote Shell
+RemoteRunLaunchDelegate_1=Unidentified mode {0} passed to RemoteRunLaunchDelegate
+RemoteRunLaunchDelegate_10=Initializing RSE
+RemoteRunLaunchDelegate_12=Starting Debugger
+RemoteRunLaunchDelegate_13=Could not find the remote connection.
+RemoteRunLaunchDelegate_2=Downloading
+RemoteRunLaunchDelegate_3=Wrong service requested.
+RemoteRunLaunchDelegate_4=No subsystem found.\n
+RemoteRunLaunchDelegate_5=Could not connect to the remote system.
+RemoteRunLaunchDelegate_6=Error during file upload.
+RemoteRunLaunchDelegate_7=Could not create the hostShellProcess.\n
+RemoteRunLaunchDelegate_8=Executing {0} {1}
+RemoteRunLaunchDelegate_9=Starting Program
+
+RemoteCMainTab_Prerun=Commands to execute before application
+RemoteCMainTab_Program=Remote Absolute File Path for C/C++ Application:
+RemoteCMainTab_SkipDownload=Skip download to target path.
+Remote_GDB_Debugger_Options=Remote GDB Debugger Options
+RemoteCMainTab_ErrorNoProgram=Remote executable path is not specified.
+RemoteCMainTab_ErrorNoConnection=Remote Connection must be selected.
+RemoteCMainTab_Remote_Path_Browse_Button=Browse...
+RemoteCMainTab_Connection=Connection:
+RemoteCMainTab_New=New...
+Gdbserver_Settings_Tab_Name=Gdbserver Settings
+Gdbserver_name_textfield_label=Gdbserver name:
+Port_number_textfield_label=Port number:
+RemoteCMainTab_Remote_Path_Browse_Button_Title=Select Remote C/C++ Application File
+RemoteCMainTab_Properties=Properties...
+RemoteCMainTab_Properties_title=Properties
+RemoteCMainTab_Properties_Location=Remote workspace location:
+RemoteCMainTab_Properties_Skip_default=Skip download to target path by default
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/IRemoteConnectionConfigurationConstants.java b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/IRemoteConnectionConfigurationConstants.java
new file mode 100644
index 0000000..e86581f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/IRemoteConnectionConfigurationConstants.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 PalmSource, Inc. and others.
+ * 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 
+ * 
+ * Contributors: 
+ * Ewa Matejska    (PalmSource) - Adapted from IGDBServerMILaunchConfigurationConstants
+ * Anna Dushistova (MontaVista) - [181517][usability] Specify commands to be run before remote application launch
+ *******************************************************************************/
+
+
+package org.eclipse.cdt.launch.remote;
+
+import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants;
+import org.eclipse.debug.core.DebugPlugin;
+
+public interface IRemoteConnectionConfigurationConstants extends
+		IGDBServerMILaunchConfigurationConstants {
+	
+	public static final String ATTR_REMOTE_CONNECTION = 
+				DebugPlugin.getUniqueIdentifier() + ".REMOTE_TCP"; //$NON-NLS-1$
+
+ 
+	public static final String ATTR_GDBSERVER_PORT = 
+				DebugPlugin.getUniqueIdentifier() + ".ATTR_GDBSERVER_PORT"; //$NON-NLS-1$
+	public static final String ATTR_GDBSERVER_COMMAND = 
+				DebugPlugin.getUniqueIdentifier() + ".ATTR_GDBSERVER_COMMAND"; //$NON-NLS-1$
+	
+	public static final String ATTR_GDBSERVER_PORT_DEFAULT = "2345"; //$NON-NLS-1$
+	public static final String ATTR_GDBSERVER_COMMAND_DEFAULT = "gdbserver"; //$NON-NLS-1$
+	
+	/*
+	 * Generic Remote Path and Download options
+	 * ATTR_REMOTE_PATH: Path of the binary on the remote.
+	 * ATTR_SKIP_DOWNLOAD_TO_TARGET: true if download to remote is not desired.
+	 */
+	public static final String ATTR_REMOTE_PATH = 
+				DebugPlugin.getUniqueIdentifier() + ".ATTR_TARGET_PATH"; //$NON-NLS-1$
+	public static final String ATTR_SKIP_DOWNLOAD_TO_TARGET = 
+				DebugPlugin.getUniqueIdentifier() + ".ATTR_SKIP_DOWNLOAD_TO_TARGET"; //$NON-NLS-1$
+
+
+	public static final String ATTR_PRERUN_COMMANDS = DebugPlugin.getUniqueIdentifier() + ".ATTR_PRERUN_CMDS"; //$NON-NLS-1$
+
+}
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/IRemoteConnectionHostConstants.java b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/IRemoteConnectionHostConstants.java
new file mode 100644
index 0000000..1d7fdc6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/IRemoteConnectionHostConstants.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Wind River Systems, Inc.
+ * 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
+ *
+ * Contributors:
+ * Johann Draschwandtner (Wind River) - initial API and implementation
+ * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
+ *******************************************************************************/
+package org.eclipse.cdt.launch.remote;
+
+/**
+ * Constants used for Remote CDT connection properties.
+ *
+ * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
+ * of a work in progress. There is no guarantee that this API will work or that
+ * it will remain the same. Please do not use this API without consulting with
+ * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
+ * </p>
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since org.eclipse.rse.remotecdt 2.1
+ */
+public interface IRemoteConnectionHostConstants {
+
+	public static final String PI_REMOTE_CDT = "org.eclipse.rse.remotecdt"; //$NON-NLS-1$
+
+	public static final String REMOTE_WS_ROOT = "remoteWsRoot"; //$NON-NLS-1$
+	public static final String DEFAULT_SKIP_DOWNLOAD = "defaultSkipDownload"; //$NON-NLS-1$
+}
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java
new file mode 100644
index 0000000..6df4f34
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java
@@ -0,0 +1,154 @@
+/********************************************************************************
+ * Copyright (c) 2009 MontaVista Software, Inc.
+ * 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
+ *
+ * Contributors:
+ * Anna Dushistova (MontaVista) - initial API and implementation
+ ********************************************************************************/
+
+package org.eclipse.cdt.launch.remote;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+
+import org.eclipse.cdt.internal.launch.remote.Messages;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.services.IService;
+import org.eclipse.rse.services.shells.IShellService;
+import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
+
+public class RSEHelper {
+
+	public static IHost getRemoteConnectionByName(String remoteConnection) {
+		if (remoteConnection == null)
+			return null;
+		IHost[] connections = RSECorePlugin.getTheSystemRegistry().getHosts();
+		for (int i = 0; i < connections.length; i++)
+			if (connections[i].getAliasName().equals(remoteConnection))
+				return connections[i];
+		return null; // TODO Connection is not found in the list--need to react
+		// somehow, throw the exception?
+
+	}
+
+	public static IService getConnectedRemoteFileService(
+			IHost currentConnection, IProgressMonitor monitor) throws Exception {
+		final ISubSystem subsystem = getFileSubsystem(currentConnection);
+
+		if (subsystem == null)
+			throw new Exception(Messages.RemoteRunLaunchDelegate_4);
+
+		try {
+			subsystem.connect(monitor, false);
+		} catch (CoreException e) {
+			throw e;
+		} catch (OperationCanceledException e) {
+			throw new CoreException(Status.CANCEL_STATUS);
+		}
+
+		if (!subsystem.isConnected())
+			throw new Exception(Messages.RemoteRunLaunchDelegate_5);
+
+		return ((IFileServiceSubSystem) subsystem).getFileService();
+	}
+
+	public static IService getConnectedRemoteShellService(
+			IHost currentConnection, IProgressMonitor monitor) throws Exception {
+		ISubSystem subsystem = getSubSystemWithShellService(currentConnection);
+		if (subsystem != null) {
+			try {
+				subsystem.connect(monitor, false);
+			} catch (CoreException e) {
+				throw e;
+			} catch (OperationCanceledException e) {
+				throw new CoreException(Status.CANCEL_STATUS);
+			}
+			if (!subsystem.isConnected())
+				throw new Exception(Messages.RemoteRunLaunchDelegate_5);
+
+			return (IShellService) subsystem.getSubSystemConfiguration()
+					.getService(currentConnection).getAdapter(
+							IShellService.class);
+		} else {
+			throw new Exception(Messages.RemoteRunLaunchDelegate_4);
+		}
+	}
+
+	/**
+	 * Find the first shell service associated with the host.
+	 * 
+	 * @param host
+	 *            the connection
+	 * @return shell service object, or <code>null</code> if not found.
+	 */
+	public static IShellService getShellService(IHost host) {
+		ISubSystem ss = getSubSystemWithShellService(host);
+		if (ss != null) {
+			return (IShellService) ss.getSubSystemConfiguration().getService(
+					host).getAdapter(IShellService.class);
+		}
+		return null;
+	}
+
+	/**
+	 * Find the first IShellServiceSubSystem service associated with the host.
+	 * 
+	 * @param host
+	 *            the connection
+	 * @return shell service subsystem, or <code>null</code> if not found.
+	 */
+	public static ISubSystem getSubSystemWithShellService(IHost host) {
+		if (host == null)
+			return null;
+		ISubSystem[] subSystems = host.getSubSystems();
+		IShellService ssvc = null;
+		for (int i = 0; subSystems != null && i < subSystems.length; i++) {
+			IService svc = subSystems[i].getSubSystemConfiguration()
+					.getService(host);
+			if (svc != null) {
+				ssvc = (IShellService) svc.getAdapter(IShellService.class);
+				if (ssvc != null) {
+					return subSystems[i];
+				}
+			}
+		}
+		return null;
+	}
+
+	public static ISubSystem getFileSubsystem(IHost host) {
+		if (host == null)
+			return null;
+		ISubSystem[] subSystems = host.getSubSystems();
+		for (int i = 0; i < subSystems.length; i++) {
+			if (subSystems[i] instanceof IFileServiceSubSystem)
+				return subSystems[i];
+		}
+		return null;
+	}
+
+	public static IHost[] getSuitableConnections() {
+		ArrayList shellConnections = new ArrayList(Arrays.asList(RSECorePlugin.getTheSystemRegistry()
+				.getHostsBySubSystemConfigurationCategory("shells"))); //$NON-NLS-1$
+		ArrayList terminalConnections = new ArrayList(Arrays.asList(RSECorePlugin.getTheSystemRegistry()
+		.getHostsBySubSystemConfigurationCategory("terminals")));//$NON-NLS-1$
+
+		Iterator iter = terminalConnections.iterator();
+		while(iter.hasNext()){
+			Object terminalConnection = iter.next();
+			if(!shellConnections.contains(terminalConnection)){
+				shellConnections.add(terminalConnection);
+			}
+		}
+		
+		return (IHost[]) shellConnections.toArray(new IHost[shellConnections.size()]);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteCDebuggerTab.java b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteCDebuggerTab.java
new file mode 100644
index 0000000..acb9458
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteCDebuggerTab.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2006 PalmSource, Inc.
+ * 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 
+ * 
+ * Contributors: 
+ * Ewa Matejska (PalmSource)
+ *******************************************************************************/
+
+package org.eclipse.cdt.launch.remote;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
+import org.eclipse.cdt.debug.core.ICDebugConfiguration;
+import org.eclipse.cdt.launch.ui.CDebuggerTab;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PlatformUI;
+
+public class RemoteCDebuggerTab extends CDebuggerTab {
+	
+	public void createControl(Composite parent) {
+		super.createControl(parent);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
+			"org.eclipse.rse.internal.remotecdt.launchgroup"); //$NON-NLS-1$
+	}
+
+	static final private String REMOTE_GDB_DEBUGGER_NAME = "remote gdb/mi"; //$NON-NLS-1$
+	
+	public RemoteCDebuggerTab(boolean attachMode) {
+		super(attachMode);
+	}
+	
+	protected void loadDebuggerComboBox(ILaunchConfiguration config, String selection) {
+		ICDebugConfiguration[] debugConfigs = CDebugCorePlugin.getDefault().getDebugConfigurations();
+		String defaultSelection = selection;
+		List list = new ArrayList();
+		for(int i = 0; i < debugConfigs.length; i++) {
+			ICDebugConfiguration configuration = debugConfigs[i];
+			if(configuration.getName().equals(REMOTE_GDB_DEBUGGER_NAME))  {
+				list.add(configuration);
+				// Select as default selection
+				defaultSelection = configuration.getID();
+				break;
+			}
+		}
+		setInitializeDefault(defaultSelection.equals("") ? true : false); //$NON-NLS-1$
+		loadDebuggerCombo((ICDebugConfiguration[])list.toArray(
+				new ICDebugConfiguration[list.size()]), defaultSelection);
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteCMainTab.java b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteCMainTab.java
new file mode 100644
index 0000000..5ae1b63
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteCMainTab.java
@@ -0,0 +1,668 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 PalmSource, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ * Ewa Matejska          (PalmSource) - initial API and implementation
+ * Martin Oberhuber      (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
+ * Martin Oberhuber      (Wind River) - [196934] hide disabled system types in remotecdt combo
+ * Yu-Fen Kuo            (MontaVista) - [190613] Fix NPE in Remotecdt when RSEUIPlugin has not been loaded
+ * Martin Oberhuber      (Wind River) - [cleanup] Avoid using SystemStartHere in production code
+ * Johann Draschwandtner (Wind River) - [231827][remotecdt]Auto-compute default for Remote path
+ * Johann Draschwandtner (Wind River) - [233057][remotecdt]Fix button enablement
+ * Anna Dushistova       (MontaVista) - [181517][usability] Specify commands to be run before remote application launch
+ * Anna Dushistova       (MontaVista) - [223728] [remotecdt] connection combo is not populated until RSE is activated
+ * Anna Dushistova       (MontaVista) - [267951] [remotecdt] Support systemTypes without files subsystem
+ *******************************************************************************/
+
+package org.eclipse.cdt.launch.remote;
+
+import org.eclipse.cdt.internal.launch.remote.Messages;
+import org.eclipse.cdt.launch.ui.CMainTab;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.window.Window;
+import org.eclipse.rse.core.IRSESystemType;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.IPropertySet;
+import org.eclipse.rse.files.ui.dialogs.SystemRemoteFileDialog;
+import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
+import org.eclipse.rse.ui.actions.SystemNewConnectionAction;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+public class RemoteCMainTab extends CMainTab {
+
+	/* Labels and Error Messages */
+	private static final String REMOTE_PROG_LABEL_TEXT = Messages.RemoteCMainTab_Program;
+	private static final String SKIP_DOWNLOAD_BUTTON_TEXT = Messages.RemoteCMainTab_SkipDownload;
+	private static final String REMOTE_PROG_TEXT_ERROR = Messages.RemoteCMainTab_ErrorNoProgram;
+	private static final String CONNECTION_TEXT_ERROR = Messages.RemoteCMainTab_ErrorNoConnection;
+	private static final String PRE_RUN_LABEL_TEXT = Messages.RemoteCMainTab_Prerun;
+
+	/* Defaults */
+	private static final String REMOTE_PATH_DEFAULT = EMPTY_STRING;
+	private static final boolean SKIP_DOWNLOAD_TO_REMOTE_DEFAULT = false;
+
+	protected Button newRemoteConnectionButton;
+	protected Button remoteConnectionPropertiesButton;
+	protected Button remoteBrowseButton;
+	protected Label connectionLabel;
+	protected Combo connectionCombo;
+	protected Label remoteProgLabel;
+	protected Text remoteProgText;
+	protected Button skipDownloadButton;
+	protected Button useLocalPathButton;
+
+	SystemNewConnectionAction action = null;
+	private Text preRunText;
+	private Label preRunLabel;
+
+	public RemoteCMainTab(boolean terminalOption) {
+		super(terminalOption);
+	}
+
+	/*
+	 * createControl
+	 * 
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl
+	 */
+	public void createControl(Composite parent) {
+		Composite comp = new Composite(parent, SWT.NONE);
+		GridLayout topLayout = new GridLayout();
+		setControl(comp);
+		comp.setLayout(topLayout);
+
+		/* The RSE Connection dropdown with New button. */
+		createVerticalSpacer(comp, 1);
+		createRemoteConnectionGroup(comp, 4);
+
+		/* The Project and local binary location */
+		createVerticalSpacer(comp, 1);
+		createProjectGroup(comp, 1);
+		createBuildConfigCombo(comp, 1);
+		createExeFileGroup(comp, 1);
+
+		/* The remote binary location and skip download option */
+		createVerticalSpacer(comp, 1);
+		createTargetExePathGroup(comp);
+		createDownloadOption(comp);
+
+		/* If the local binary path changes, modify the remote binary location */
+		fProgText.addModifyListener(new ModifyListener() {
+
+			public void modifyText(ModifyEvent evt) {
+				setLocalPathForRemotePath();
+			}
+		});
+
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
+				"org.eclipse.rse.internal.remotecdt.launchgroup"); //$NON-NLS-1$
+
+		// //No more needed according to
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=178832
+		// LaunchUIPlugin.setDialogShell(parent.getShell());
+	}
+
+	/*
+	 * isValid
+	 * 
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid
+	 */
+	public boolean isValid(ILaunchConfiguration config) {
+		boolean retVal = super.isValid(config);
+		if (retVal == true) {
+			setErrorMessage(null);
+			int currentSelection = connectionCombo.getSelectionIndex();
+			String connection_name = currentSelection >= 0 ? connectionCombo
+					.getItem(currentSelection) : ""; //$NON-NLS-1$
+			if (connection_name.equals("")) { //$NON-NLS-1$
+				setErrorMessage(CONNECTION_TEXT_ERROR);
+				retVal = false;
+			}
+			if (retVal) {
+				String name = remoteProgText.getText().trim();
+				if (name.length() == 0) {
+					setErrorMessage(REMOTE_PROG_TEXT_ERROR);
+					retVal = false;
+				}
+			}
+		}
+		return retVal;
+	}
+
+	protected void createRemoteConnectionGroup(Composite parent, int colSpan) {
+		Composite projComp = new Composite(parent, SWT.NONE);
+		GridLayout projLayout = new GridLayout();
+		projLayout.numColumns = 4;
+		projLayout.marginHeight = 0;
+		projLayout.marginWidth = 0;
+		projComp.setLayout(projLayout);
+		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = colSpan;
+		projComp.setLayoutData(gd);
+
+		connectionLabel = new Label(projComp, SWT.NONE);
+		connectionLabel.setText(Messages.RemoteCMainTab_Connection);
+		gd = new GridData();
+		gd.horizontalSpan = 1;
+		connectionLabel.setLayoutData(gd);
+
+		connectionCombo = new Combo(projComp, SWT.DROP_DOWN | SWT.READ_ONLY);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 1;
+		connectionCombo.setLayoutData(gd);
+		connectionCombo.addModifyListener(new ModifyListener() {
+
+			public void modifyText(ModifyEvent e) {
+				setDirty(true);
+				updateLaunchConfigurationDialog();
+				useDefaultsFromConnection();
+				updatePropertiesButton();
+			}
+		});
+
+		newRemoteConnectionButton = createPushButton(projComp,
+				Messages.RemoteCMainTab_New, null);
+		newRemoteConnectionButton.addSelectionListener(new SelectionAdapter() {
+
+			public void widgetSelected(SelectionEvent evt) {
+				handleNewRemoteConnectionSelected();
+				updateLaunchConfigurationDialog();
+				updateConnectionPulldown();
+			}
+		});
+
+		remoteConnectionPropertiesButton = createPushButton(projComp,
+				Messages.RemoteCMainTab_Properties, null);
+		remoteConnectionPropertiesButton
+				.addSelectionListener(new SelectionAdapter() {
+
+					public void widgetSelected(SelectionEvent evt) {
+						handleRemoteConnectionPropertiesSelected();
+					}
+				});
+
+		updateConnectionPulldown();
+	}
+
+	/*
+	 * createTargetExePath This creates the remote path user-editable textfield
+	 * on the Main Tab.
+	 */
+	protected void createTargetExePathGroup(Composite parent) {
+		Composite mainComp = new Composite(parent, SWT.NONE);
+		GridLayout mainLayout = new GridLayout();
+		mainLayout.numColumns = 2;
+		mainLayout.marginHeight = 0;
+		mainLayout.marginWidth = 0;
+		mainComp.setLayout(mainLayout);
+		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+		mainComp.setLayoutData(gd);
+
+		remoteProgLabel = new Label(mainComp, SWT.NONE);
+		remoteProgLabel.setText(REMOTE_PROG_LABEL_TEXT);
+		gd = new GridData();
+		gd.horizontalSpan = 2;
+		remoteProgLabel.setLayoutData(gd);
+
+		remoteProgText = new Text(mainComp, SWT.SINGLE | SWT.BORDER);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 1;
+		remoteProgText.setLayoutData(gd);
+		remoteProgText.addModifyListener(new ModifyListener() {
+
+			public void modifyText(ModifyEvent evt) {
+				updateLaunchConfigurationDialog();
+			}
+		});
+
+		remoteBrowseButton = createPushButton(mainComp,
+				Messages.RemoteCMainTab_Remote_Path_Browse_Button, null);
+		remoteBrowseButton.addSelectionListener(new SelectionAdapter() {
+
+			public void widgetSelected(SelectionEvent evt) {
+				handleRemoteBrowseSelected();
+				updateLaunchConfigurationDialog();
+			}
+		});
+
+		// Commands to run before execution
+		preRunLabel = new Label(mainComp, SWT.NONE);
+		preRunLabel.setText(PRE_RUN_LABEL_TEXT);
+		gd = new GridData();
+		gd.horizontalSpan = 2;
+		preRunLabel.setLayoutData(gd);
+
+		preRunText = new Text(mainComp, SWT.MULTI | SWT.BORDER);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 2;
+		preRunText.setLayoutData(gd);
+		preRunText.addModifyListener(new ModifyListener() {
+
+			public void modifyText(ModifyEvent evt) {
+				updateLaunchConfigurationDialog();
+			}
+		});
+
+	}
+
+	/*
+	 * createDownloadOption This creates the skip download check button.
+	 */
+	protected void createDownloadOption(Composite parent) {
+		Composite mainComp = new Composite(parent, SWT.NONE);
+		GridLayout mainLayout = new GridLayout();
+		mainLayout.marginHeight = 0;
+		mainLayout.marginWidth = 0;
+		mainComp.setLayout(mainLayout);
+		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+		mainComp.setLayoutData(gd);
+
+		skipDownloadButton = createCheckButton(mainComp,
+				SKIP_DOWNLOAD_BUTTON_TEXT);
+		skipDownloadButton.addSelectionListener(new SelectionAdapter() {
+
+			public void widgetSelected(SelectionEvent evt) {
+				updateLaunchConfigurationDialog();
+			}
+		});
+		skipDownloadButton.setEnabled(true);
+	}
+
+	/*
+	 * performApply
+	 * 
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply
+	 */
+	public void performApply(ILaunchConfigurationWorkingCopy config) {
+
+		int currentSelection = connectionCombo.getSelectionIndex();
+		config.setAttribute(
+				IRemoteConnectionConfigurationConstants.ATTR_REMOTE_CONNECTION,
+				currentSelection >= 0 ? connectionCombo
+						.getItem(currentSelection) : null);
+		config.setAttribute(
+				IRemoteConnectionConfigurationConstants.ATTR_REMOTE_PATH,
+				remoteProgText.getText());
+		config
+				.setAttribute(
+						IRemoteConnectionConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET,
+						skipDownloadButton.getSelection());
+		config.setAttribute(
+				IRemoteConnectionConfigurationConstants.ATTR_PRERUN_COMMANDS,
+				preRunText.getText());
+		super.performApply(config);
+	}
+
+	/*
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom
+	 */
+	public void initializeFrom(ILaunchConfiguration config) {
+		String remoteConnection = null;
+		try {
+			remoteConnection = config
+					.getAttribute(
+							IRemoteConnectionConfigurationConstants.ATTR_REMOTE_CONNECTION,
+							""); //$NON-NLS-1$
+		} catch (CoreException ce) {
+			// Ignore
+		}
+
+		String[] items = connectionCombo.getItems();
+		int i = 0;
+		for (i = 0; i < items.length; i++)
+			if (items[i].equals(remoteConnection))
+				break;
+		/*
+		 * Select the last used connection in the connecion pulldown if it still
+		 * exists.
+		 */
+		if (i < items.length)
+			connectionCombo.select(i);
+		else if (items.length > 0)
+			connectionCombo.select(0);
+
+		super.initializeFrom(config);
+
+		updateTargetProgFromConfig(config);
+		updateSkipDownloadFromConfig(config);
+		updatePropertiesButton();
+	}
+
+	protected void handleNewRemoteConnectionSelected() {
+		if (action == null) {
+			action = new SystemNewConnectionAction(getControl().getShell(),
+					false, false, null);
+		}
+
+		try {
+			action.run();
+		} catch (Exception e) {
+			// Ignore
+		}
+	}
+
+	protected IHost getCurrentConnection() {
+		int currentSelection = connectionCombo.getSelectionIndex();
+		String remoteConnection = currentSelection >= 0 ? connectionCombo
+				.getItem(currentSelection) : null;
+        return RSEHelper.getRemoteConnectionByName(remoteConnection);
+    }
+
+	protected void handleRemoteBrowseSelected() {
+		IHost currentConnectionSelected = getCurrentConnection();
+		SystemRemoteFileDialog dlg = new SystemRemoteFileDialog(getControl()
+				.getShell(),
+				Messages.RemoteCMainTab_Remote_Path_Browse_Button_Title,
+				currentConnectionSelected);
+		dlg.setBlockOnOpen(true);
+		if (dlg.open() == Window.OK) {
+			Object retObj = dlg.getSelectedObject();
+			if (retObj instanceof IRemoteFile) {
+				IRemoteFile selectedFile = (IRemoteFile) retObj;
+				remoteProgText.setText(selectedFile.getAbsolutePath());
+			}
+
+		}
+	}
+
+	protected void handleRemoteConnectionPropertiesSelected() {
+		class RemoteConnectionPropertyDialog extends Dialog {
+			private IHost fHost;
+			boolean fbLocalHost;
+			private Button fSkipDownloadBtn;
+			private Text fWSRoot;
+
+			public RemoteConnectionPropertyDialog(Shell parentShell,
+					String dialogTitle, IHost host) {
+				super(parentShell);
+				parentShell.setText(dialogTitle);
+				fHost = host;
+				fbLocalHost = fHost.getSystemType().isLocal();
+			}
+
+			protected Control createDialogArea(Composite parent) {
+				// create composite
+				Composite composite = (Composite) super
+						.createDialogArea(parent);
+
+				Label label = new Label(composite, SWT.WRAP);
+				label.setText(Messages.RemoteCMainTab_Properties_Location);
+				GridData data = new GridData(GridData.GRAB_HORIZONTAL
+						| GridData.GRAB_VERTICAL
+						| GridData.HORIZONTAL_ALIGN_FILL
+						| GridData.VERTICAL_ALIGN_CENTER);
+				data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
+				label.setLayoutData(data);
+				label.setFont(parent.getFont());
+				fWSRoot = new Text(composite, SWT.SINGLE | SWT.BORDER);
+				fWSRoot.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
+						| GridData.HORIZONTAL_ALIGN_FILL));
+
+				fSkipDownloadBtn = new Button(composite, SWT.CHECK);
+				fSkipDownloadBtn
+						.setText(Messages.RemoteCMainTab_Properties_Skip_default);
+				if (!fbLocalHost) {
+					IPropertySet propertySet = fHost
+							.getPropertySet(IRemoteConnectionHostConstants.PI_REMOTE_CDT);
+					if (propertySet != null) {
+						String value = propertySet
+								.getPropertyValue(IRemoteConnectionHostConstants.REMOTE_WS_ROOT);
+						if (value != null) {
+							fWSRoot.setText(value);
+						}
+						fSkipDownloadBtn
+								.setSelection(Boolean
+										.valueOf(
+												propertySet
+														.getPropertyValue(IRemoteConnectionHostConstants.DEFAULT_SKIP_DOWNLOAD))
+										.booleanValue());
+					}
+				} else {
+					fSkipDownloadBtn.setEnabled(false);
+					fWSRoot.setEnabled(false);
+				}
+				applyDialogFont(composite);
+				return composite;
+			}
+
+			protected void buttonPressed(int buttonId) {
+				if (!fbLocalHost && (buttonId == IDialogConstants.OK_ID)) {
+					IPropertySet propertySet = fHost
+							.getPropertySet(IRemoteConnectionHostConstants.PI_REMOTE_CDT);
+					if (propertySet == null) {
+						propertySet = fHost
+								.createPropertySet(IRemoteConnectionHostConstants.PI_REMOTE_CDT);
+					}
+					propertySet.addProperty(
+							IRemoteConnectionHostConstants.REMOTE_WS_ROOT,
+							fWSRoot.getText());
+					propertySet
+							.addProperty(
+									IRemoteConnectionHostConstants.DEFAULT_SKIP_DOWNLOAD,
+									Boolean.toString(fSkipDownloadBtn
+											.getSelection()));
+					fHost.commit();
+				}
+				super.buttonPressed(buttonId);
+			}
+		}
+		IHost currentConnectionSelected = getCurrentConnection();
+		RemoteConnectionPropertyDialog dlg = new RemoteConnectionPropertyDialog(
+				getControl().getShell(),
+				Messages.RemoteCMainTab_Properties_title,
+				currentConnectionSelected);
+		dlg.setBlockOnOpen(true);
+		dlg.open();
+	}
+
+	protected void updateConnectionPulldown() {
+		if (!RSECorePlugin.isInitComplete(RSECorePlugin.INIT_MODEL))
+			try {
+				RSECorePlugin.waitForInitCompletion(RSECorePlugin.INIT_MODEL);
+			} catch (InterruptedException e) {
+				return;
+			}
+		// already initialized
+		connectionCombo.removeAll();
+		IHost[] connections = RSEHelper.getSuitableConnections();
+		for (int i = 0; i < connections.length; i++) {
+			IRSESystemType sysType = connections[i].getSystemType();
+			if (sysType != null && sysType.isEnabled()) {
+				connectionCombo.add(connections[i].getAliasName());
+			}
+		}
+
+		if (connections.length > 0) {
+			connectionCombo.select(connections.length - 1);
+		}
+		updatePropertiesButton();
+	}
+
+	private void updatePropertiesButton() {
+		if ((remoteConnectionPropertiesButton == null)
+				|| remoteConnectionPropertiesButton.isDisposed()) {
+			return;
+		}
+		boolean bEnableProperties = false;
+		IHost currentConnectionSelected = getCurrentConnection();
+		if (currentConnectionSelected != null) {
+			IRSESystemType sysType = currentConnectionSelected.getSystemType();
+			if (sysType != null && sysType.isEnabled() && !sysType.isLocal()) {
+				bEnableProperties = true;
+			}
+		}
+		remoteConnectionPropertiesButton.setEnabled(bEnableProperties);
+	}
+
+	protected void updateTargetProgFromConfig(ILaunchConfiguration config) {
+		String targetPath = null;
+		try {
+			targetPath = config.getAttribute(
+					IRemoteConnectionConfigurationConstants.ATTR_REMOTE_PATH,
+					REMOTE_PATH_DEFAULT);
+		} catch (CoreException e) {
+			// Ignore
+		}
+		remoteProgText.setText(targetPath);
+
+		String prelaunchCmd = null;
+		try {
+			prelaunchCmd = config
+					.getAttribute(
+							IRemoteConnectionConfigurationConstants.ATTR_PRERUN_COMMANDS,
+							""); //$NON-NLS-1$
+		} catch (CoreException e) {
+			// Ignore
+		}
+		preRunText.setText(prelaunchCmd);
+	}
+
+	protected void updateSkipDownloadFromConfig(ILaunchConfiguration config) {
+		boolean downloadToTarget = true;
+		try {
+			downloadToTarget = config
+					.getAttribute(
+							IRemoteConnectionConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET,
+							SKIP_DOWNLOAD_TO_REMOTE_DEFAULT);
+		} catch (CoreException e) {
+			// Ignore for now
+		}
+		skipDownloadButton.setSelection(downloadToTarget);
+	}
+
+	/*
+	 * setLocalPathForRemotePath This function sets the remote path text field
+	 * with the value of the local executable path.
+	 */
+	private void setLocalPathForRemotePath() {
+		String programName = fProgText.getText().trim();
+		boolean bUpdateRemote = false;
+
+		String remoteName = remoteProgText.getText().trim();
+		String remoteWsRoot = getRemoteWSRoot();
+		if (remoteName.length() == 0) {
+			bUpdateRemote = true;
+		} else if (remoteWsRoot.length() != 0) {
+			bUpdateRemote = remoteName.equals(remoteWsRoot);
+		}
+
+		if (programName.length() != 0 && bUpdateRemote) {
+			IProject project = getCProject().getProject();
+			IPath exePath = new Path(programName);
+			if (!exePath.isAbsolute()) {
+				exePath = project.getFile(programName).getLocation();
+
+				IPath wsRoot = project.getWorkspace().getRoot().getLocation();
+				exePath = makeRelativeToWSRootLocation(exePath, remoteWsRoot,
+						wsRoot);
+			}
+			String path = exePath.toString();
+			remoteProgText.setText(path);
+		}
+	}
+
+	private void useDefaultsFromConnection() {
+		if ((remoteProgText != null) && !remoteProgText.isDisposed()) {
+			String remoteName = remoteProgText.getText().trim();
+			String remoteWsRoot = getRemoteWSRoot();
+			if (remoteName.length() == 0) {
+				remoteProgText.setText(remoteWsRoot);
+			} else {
+				// try to use remote path
+				IPath wsRoot = getCProject().getProject().getWorkspace()
+						.getRoot().getLocation();
+				IPath remotePath = makeRelativeToWSRootLocation(new Path(
+						remoteName), remoteWsRoot, wsRoot);
+				remoteProgText.setText(remotePath.toString());
+			}
+		}
+		if ((skipDownloadButton != null) && !skipDownloadButton.isDisposed()) {
+			skipDownloadButton.setSelection(getDefaultSkipDownload());
+				if(RSEHelper.getFileSubsystem(getCurrentConnection()) == null){
+					skipDownloadButton.setEnabled(false);
+				} else {
+					skipDownloadButton.setEnabled(true);
+				}
+		}
+		if((remoteBrowseButton!=null) && !remoteBrowseButton.isDisposed()){
+			if(RSEHelper.getFileSubsystem(getCurrentConnection()) == null){
+				remoteBrowseButton.setEnabled(false);
+			} else {
+				remoteBrowseButton.setEnabled(true);
+			}
+		}
+	}
+
+	private IPath makeRelativeToWSRootLocation(IPath exePath,
+			String remoteWsRoot, IPath wsRoot) {
+		if (remoteWsRoot.length() != 0) {
+			// use remoteWSRoot instead of Workspace Root
+			if (wsRoot.isPrefixOf(exePath)) {
+				return new Path(remoteWsRoot).append(exePath
+						.removeFirstSegments(wsRoot.segmentCount()).setDevice(
+								null));
+			}
+		}
+		return exePath;
+	}
+
+	private String getRemoteWSRoot() {
+		IHost host = getCurrentConnection();
+		if (host != null) {
+			IPropertySet propertySet = host
+					.getPropertySet(IRemoteConnectionHostConstants.PI_REMOTE_CDT);
+			if (propertySet != null) {
+				String value = propertySet
+						.getPropertyValue(IRemoteConnectionHostConstants.REMOTE_WS_ROOT);
+				if (value != null) {
+					return value;
+				}
+			}
+		}
+		return ""; //$NON-NLS-1$
+	}
+
+	private boolean getDefaultSkipDownload() {
+		IHost host = getCurrentConnection();
+		if (host != null) {
+			if(RSEHelper.getFileSubsystem(host) == null){
+				return true;
+			}
+			IPropertySet propertySet = host
+					.getPropertySet(IRemoteConnectionHostConstants.PI_REMOTE_CDT);
+			if (propertySet != null) {
+				return Boolean
+						.valueOf(
+								propertySet
+										.getPropertyValue(IRemoteConnectionHostConstants.DEFAULT_SKIP_DOWNLOAD))
+						.booleanValue();
+			}
+		}
+		return SKIP_DOWNLOAD_TO_REMOTE_DEFAULT;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteGDBDebuggerPage.java b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteGDBDebuggerPage.java
new file mode 100644
index 0000000..c24b50c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteGDBDebuggerPage.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2006 PalmSource, Inc.
+ * 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 
+ * 
+ * Contributors: 
+ * Ewa Matejska (PalmSource)
+ * 
+ * Referenced GDBDebuggerPage code to write this.
+ *******************************************************************************/
+
+package org.eclipse.cdt.launch.remote;
+
+import org.eclipse.cdt.debug.mi.internal.ui.GDBDebuggerPage;
+import org.eclipse.cdt.internal.launch.remote.Messages;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * The dynamic debugger tab for remote launches using gdb server.
+ * The gdbserver settings are used to start a gdbserver session on the
+ * remote and then to connect to it from the host. The DSDP-TM project is
+ * used to accomplish this.
+ */
+public class RemoteGDBDebuggerPage extends GDBDebuggerPage {
+
+	protected Text fGDBServerCommandText;
+
+	protected Text fGDBServerPortNumberText;
+	
+	public String getName() {
+		return Messages.Remote_GDB_Debugger_Options;
+	}
+	
+	public void setDefaults( ILaunchConfigurationWorkingCopy configuration ) {
+		super.setDefaults(configuration);
+		configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND, 
+									IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT );
+		configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
+									IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT );
+	}
+	
+	public void initializeFrom( ILaunchConfiguration configuration ) {
+		super.initializeFrom(configuration);
+		String gdbserverCommand = null;
+		String gdbserverPortNumber = null;
+		try {
+			gdbserverCommand = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
+														   IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
+		}
+		catch( CoreException e ) {
+		}
+		try {
+			gdbserverPortNumber = configuration.getAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
+															  IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT );
+		}
+		catch( CoreException e ) {
+		}
+		fGDBServerCommandText.setText( gdbserverCommand );
+		fGDBServerPortNumberText.setText( gdbserverPortNumber );
+	}
+	
+	public void performApply( ILaunchConfigurationWorkingCopy configuration ) {
+		super.performApply(configuration);
+		String str = fGDBServerCommandText.getText();
+		str.trim();
+		configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND, str );
+		str = fGDBServerPortNumberText.getText();
+		str.trim();
+		configuration.setAttribute( IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT, str );
+	}
+	
+	protected void createGdbserverSettingsTab( TabFolder tabFolder ) {
+		TabItem tabItem = new TabItem( tabFolder, SWT.NONE );
+		tabItem.setText( Messages.Gdbserver_Settings_Tab_Name );
+		
+		Composite comp = new Composite(tabFolder, SWT.NULL);
+		comp.setLayout(new GridLayout(1, true));
+		comp.setLayoutData(new GridData(GridData.FILL_BOTH));
+		((GridLayout)comp.getLayout()).makeColumnsEqualWidth = false;
+		comp.setFont( tabFolder.getFont() );
+		tabItem.setControl( comp );
+		
+		Composite subComp = new Composite(comp, SWT.NULL);
+		subComp.setLayout(new GridLayout(2, true));
+		subComp.setLayoutData(new GridData(GridData.FILL_BOTH));
+		((GridLayout)subComp.getLayout()).makeColumnsEqualWidth = false;
+		subComp.setFont( tabFolder.getFont() );
+		
+		Label label = new Label(subComp, SWT.LEFT);		
+		label.setText(Messages.Gdbserver_name_textfield_label);
+		GridData gd = new GridData();
+		label.setLayoutData( gd );
+		
+		
+		fGDBServerCommandText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
+		GridData data = new GridData();
+		fGDBServerCommandText.setLayoutData(data);
+		fGDBServerCommandText.addModifyListener( new ModifyListener() {
+
+			public void modifyText( ModifyEvent evt ) {
+				updateLaunchConfigurationDialog();
+			}
+		} );
+		label = new Label(subComp, SWT.LEFT);
+		label.setText(Messages.Port_number_textfield_label);
+		gd = new GridData();
+		label.setLayoutData( gd );
+		
+		fGDBServerPortNumberText = new Text(subComp, SWT.SINGLE | SWT.BORDER);
+		data = new GridData();
+		fGDBServerPortNumberText.setLayoutData(data);
+		fGDBServerPortNumberText.addModifyListener( new ModifyListener() {
+
+			public void modifyText( ModifyEvent evt ) {
+				updateLaunchConfigurationDialog();
+			}
+		} );
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.debug.mi.internal.ui.GDBDebuggerPage#createTabs(org.eclipse.swt.widgets.TabFolder)
+	 */
+	public void createTabs( TabFolder tabFolder ) {
+		super.createTabs( tabFolder );
+		createGdbserverSettingsTab( tabFolder );
+	}
+}
+
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteLaunchConfigurationTabGroup.java b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteLaunchConfigurationTabGroup.java
new file mode 100644
index 0000000..8fe70b7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteLaunchConfigurationTabGroup.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2006 PalmSource, Inc.
+ * 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 
+ * 
+ * Contributors: 
+ * Ewa Matejska (PalmSource) - Adapted from LocalRunLaunchConfigurationTabGroup
+ *******************************************************************************/
+
+
+package org.eclipse.cdt.launch.remote;
+import org.eclipse.cdt.launch.ui.CArgumentsTab;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
+
+/**
+ * This class defines the tab group for the Remote C++ Launch
+ * Configuration.
+ */
+public class RemoteLaunchConfigurationTabGroup extends
+		AbstractLaunchConfigurationTabGroup {
+	 public void createTabs(ILaunchConfigurationDialog dialog, String mode)  {
+         ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
+                 new RemoteCMainTab(true),
+                 new CArgumentsTab(),
+     			 new RemoteCDebuggerTab(false),
+                 new SourceLookupTab(),
+                 new CommonTab()
+         };
+         setTabs(tabs);
+	 }
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteRunLaunchDelegate.java b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteRunLaunchDelegate.java
new file mode 100644
index 0000000..8f4cacc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RemoteRunLaunchDelegate.java
@@ -0,0 +1,366 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 PalmSource, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ * Ewa Matejska     (PalmSource) - Adapted from LocalRunLaunchDelegate
+ * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
+ * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
+ * Martin Oberhuber (Wind River) - [226301][api] IShellService should throw SystemMessageException on error
+ * Anna Dushistova  (MontaVista) - [234490][remotecdt] Launching with disconnected target fails
+ * Anna Dushistova  (MontaVista) - [235298][remotecdt] Further improve progress reporting and cancellation of Remote CDT Launch
+ * Anna Dushistova  (MontaVista) - [244173][remotecdt][nls] Externalize Strings in RemoteRunLaunchDelegate
+ * Anna Dushistova  (MontaVista) - [181517][usability] Specify commands to be run before remote application launch
+ * Nikita Shulga (EmbeddedAlley) - [265236][remotecdt] Wait for RSE to initialize before querying it for host list
+ * Anna Dushistova  (MontaVista) - [267951] [remotecdt] Support systemTypes without files subsystem
+ *******************************************************************************/
+
+package org.eclipse.cdt.launch.remote;
+
+import java.io.File;
+
+import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.debug.core.CDIDebugModel;
+import org.eclipse.cdt.debug.core.ICDIDebugger2;
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.cdt.debug.core.cdi.CDIException;
+import org.eclipse.cdt.debug.core.cdi.ICDISession;
+import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
+import org.eclipse.cdt.debug.mi.core.GDBServerCDIDebugger2;
+import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants;
+import org.eclipse.cdt.internal.launch.remote.Messages;
+import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
+import org.eclipse.rse.services.files.IFileService;
+import org.eclipse.rse.services.shells.HostShellProcessAdapter;
+import org.eclipse.rse.services.shells.IHostShell;
+import org.eclipse.rse.services.shells.IShellService;
+
+public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
+
+	private final static String EXIT_CMD = "exit"; //$NON-NLS-1$
+	private final static String CMD_DELIMITER = ";"; //$NON-NLS-1$
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch
+	 */
+	public void launch(ILaunchConfiguration config, String mode,
+			ILaunch launch, IProgressMonitor monitor) throws CoreException {
+
+		IBinaryObject exeFile = null;
+		IPath exePath = verifyProgramPath(config);
+		ICProject project = verifyCProject(config);
+		if (exePath != null) {
+			exeFile = verifyBinary(project, exePath);
+			String arguments = getProgramArguments(config);
+			String remoteExePath = config.getAttribute(
+					IRemoteConnectionConfigurationConstants.ATTR_REMOTE_PATH,
+					""); //$NON-NLS-1$
+			String prelaunchCmd = config
+					.getAttribute(
+							IRemoteConnectionConfigurationConstants.ATTR_PRERUN_COMMANDS,
+							""); //$NON-NLS-1$
+
+			if (monitor == null)
+				monitor = new NullProgressMonitor();
+
+			if (!RSECorePlugin.isInitComplete(RSECorePlugin.INIT_MODEL)) {
+				monitor.subTask(Messages.RemoteRunLaunchDelegate_10);
+				try {
+					RSECorePlugin
+							.waitForInitCompletion(RSECorePlugin.INIT_MODEL);
+				} catch (InterruptedException e) {
+					throw new CoreException(new Status(IStatus.ERROR,
+							getPluginID(), IStatus.OK, e.getLocalizedMessage(),
+							e));
+				}
+			}
+			if (mode.equals(ILaunchManager.DEBUG_MODE)) {
+				monitor.beginTask(Messages.RemoteRunLaunchDelegate_0, 100);
+				setDefaultSourceLocator(launch, config);
+				String debugMode = config
+						.getAttribute(
+								ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
+								ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN);
+				if (debugMode
+						.equals(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN)) {
+					Process remoteShellProcess = null;
+					ICDISession dsession = null;
+					try {
+						// Download the binary to the remote before debugging.
+						monitor.setTaskName(Messages.RemoteRunLaunchDelegate_2);
+						remoteFileDownload(config, launch, exePath.toString(),
+								remoteExePath, new SubProgressMonitor(monitor,
+										80));
+
+						// Automatically start up the gdbserver. In the future
+						// this should be expanded to launch
+						// an arbitrary remote daemon.
+						String gdbserver_port_number = config
+								.getAttribute(
+										IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT,
+										IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT);
+						String gdbserver_command = config
+								.getAttribute(
+										IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND,
+										IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND_DEFAULT);
+						String command_arguments = ":" + gdbserver_port_number + " " //$NON-NLS-1$ //$NON-NLS-2$
+								+ spaceEscapify(remoteExePath);
+						if (arguments != null && !arguments.equals("")) //$NON-NLS-1$
+							command_arguments += " " + arguments; //$NON-NLS-1$
+						monitor.setTaskName(Messages.RemoteRunLaunchDelegate_9);
+						remoteShellProcess = remoteShellExec(config,
+								prelaunchCmd, gdbserver_command,
+								command_arguments, new SubProgressMonitor(
+										monitor, 5));
+						DebugPlugin.newProcess(launch, remoteShellProcess,
+								Messages.RemoteRunLaunchDelegate_RemoteShell);
+
+						// Pre-set configuration constants for the
+						// GDBSERVERCDIDebugger to indicate how the gdbserver
+						// was automatically started on the remote.
+						// GDBServerCDIDebugger uses these to figure out how
+						// to connect to the remote gdbserver.
+						ILaunchConfigurationWorkingCopy wc = config
+								.getWorkingCopy();
+						wc
+								.setAttribute(
+										IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP,
+										true);
+						wc
+								.setAttribute(
+										IGDBServerMILaunchConfigurationConstants.ATTR_HOST,
+										getRemoteHostname(config));
+						wc
+								.setAttribute(
+										IGDBServerMILaunchConfigurationConstants.ATTR_PORT,
+										gdbserver_port_number);
+						wc.doSave();
+
+						// Default to using the GDBServerCDIDebugger.
+						GDBServerCDIDebugger2 debugger = new GDBServerCDIDebugger2();
+						dsession = ((ICDIDebugger2) debugger).createSession(
+								launch, exePath.toFile(),
+								new SubProgressMonitor(monitor, 15));
+
+						boolean stopInMain = config
+								.getAttribute(
+										ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN,
+										false);
+						String stopSymbol = null;
+						if (stopInMain)
+							stopSymbol = launch
+									.getLaunchConfiguration()
+									.getAttribute(
+											ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL,
+											ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT);
+
+						ICDITarget[] targets = dsession.getTargets();
+						for (int i = 0; i < targets.length; i++) {
+							Process process = targets[i].getProcess();
+							IProcess iprocess = null;
+							if (process != null) {
+								iprocess = DebugPlugin.newProcess(launch,
+										process, renderProcessLabel(exePath
+												.toOSString()),
+										getDefaultProcessMap());
+							}
+							CDIDebugModel.newDebugTarget(launch, project
+									.getProject(),
+									targets[i],
+									renderProcessLabel("gdbserver debugger"), //$NON-NLS-1$
+									iprocess, exeFile, true, false, stopSymbol,
+									true);
+						}
+					} catch (CoreException e) {
+						try {
+							if (dsession != null)
+								dsession.terminate();
+							if (remoteShellProcess != null)
+								remoteShellProcess.destroy();
+						} catch (CDIException e1) {
+							// ignore
+						}
+						throw e;
+					} finally {
+						monitor.done();
+					}
+				}
+
+			} else if (mode.equals(ILaunchManager.RUN_MODE)) {
+				monitor.beginTask(Messages.RemoteRunLaunchDelegate_0, 100);
+				Process remoteProcess = null;
+				try {
+					// Download the binary to the remote before debugging.
+					monitor.setTaskName(Messages.RemoteRunLaunchDelegate_2);
+					remoteFileDownload(config, launch, exePath.toString(),
+							remoteExePath, new SubProgressMonitor(monitor, 80));
+					// Use a remote shell to launch the binary.
+					monitor.setTaskName(Messages.RemoteRunLaunchDelegate_12);
+					remoteProcess = remoteShellExec(config, prelaunchCmd,
+							remoteExePath, arguments, new SubProgressMonitor(
+									monitor, 20));
+					DebugPlugin.newProcess(launch, remoteProcess,
+							renderProcessLabel(exePath.toOSString()));
+				} catch (CoreException e) {
+					throw e;
+				} finally {
+					monitor.done();
+				}
+
+			} else {
+				IStatus status = new Status(IStatus.ERROR, getPluginID(),
+						IStatus.OK, NLS.bind(
+								Messages.RemoteRunLaunchDelegate_1, mode), null);
+				throw new CoreException(status);
+			}
+		}
+	}
+
+	private String spaceEscapify(String inputString) {
+		if (inputString == null)
+			return null;
+
+		return inputString.replaceAll(" ", "\\\\ "); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	protected IHost getCurrentConnection(ILaunchConfiguration config)
+			throws CoreException {
+		String remoteConnection = config.getAttribute(
+				IRemoteConnectionConfigurationConstants.ATTR_REMOTE_CONNECTION,
+				""); //$NON-NLS-1$
+		IHost connection = RSEHelper
+				.getRemoteConnectionByName(remoteConnection);
+		if (connection == null) {
+			abort(Messages.RemoteRunLaunchDelegate_13, null,
+					ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+		}
+		return connection;
+	}
+
+	protected Process remoteFileDownload(ILaunchConfiguration config,
+			ILaunch launch, String localExePath, String remoteExePath,
+			IProgressMonitor monitor) throws CoreException {
+
+		boolean skipDownload = config
+				.getAttribute(
+						IRemoteConnectionConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET,
+						false);
+
+		if (skipDownload)
+			// Nothing to do. Download is skipped.
+			return null;
+		monitor.beginTask(Messages.RemoteRunLaunchDelegate_2, 100);
+		IFileService fileService;
+		try {
+			fileService = (IFileService) RSEHelper
+					.getConnectedRemoteFileService(
+							getCurrentConnection(config),
+							new SubProgressMonitor(monitor, 10));
+			File file = new File(localExePath);
+			Path remotePath = new Path(remoteExePath);
+			fileService.upload(file, remotePath.removeLastSegments(1)
+					.toString(), remotePath.lastSegment(), true, null, null,
+					new SubProgressMonitor(monitor, 85));
+			// Need to change the permissions to match the original file
+			// permissions because of a bug in upload
+			Process p = remoteShellExec(
+					config,
+					"", "chmod", "+x " + spaceEscapify(remotePath.toString()), new SubProgressMonitor(monitor, 5)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			Thread.sleep(500);
+			p.destroy();
+		} catch (SystemOperationCancelledException e) {
+			cancel(e.getLocalizedMessage(), IStatus.CANCEL);
+		} catch (Exception e) {
+			abort(Messages.RemoteRunLaunchDelegate_6, e,
+					ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+		} finally {
+			monitor.done();
+		}
+		return null;
+	}
+
+	protected String getRemoteHostname(ILaunchConfiguration config)
+			throws CoreException {
+		IHost currentConnection = getCurrentConnection(config);
+		return currentConnection.getHostName();
+	}
+
+	protected Process remoteShellExec(ILaunchConfiguration config,
+			String prelaunchCmd, String remoteCommandPath, String arguments,
+			IProgressMonitor monitor) throws CoreException {
+		// The exit command is called to force the remote shell to close after
+		// our command
+		// is executed. This is to prevent a running process at the end of the
+		// debug session.
+		// See Bug 158786.
+		monitor.beginTask(NLS.bind(Messages.RemoteRunLaunchDelegate_8,
+				remoteCommandPath, arguments), 10);
+		String real_remote_command = arguments == null ? spaceEscapify(remoteCommandPath)
+				: spaceEscapify(remoteCommandPath) + " " + arguments; //$NON-NLS-1$
+
+		String remote_command = real_remote_command + CMD_DELIMITER + EXIT_CMD;
+
+		if (!prelaunchCmd.trim().equals("")) //$NON-NLS-1$
+			remote_command = prelaunchCmd + CMD_DELIMITER + remote_command;
+
+		IShellService shellService;
+		Process p = null;
+		try {
+			shellService = (IShellService) RSEHelper
+					.getConnectedRemoteShellService(
+							getCurrentConnection(config),
+							new SubProgressMonitor(monitor, 7));
+
+			// This is necessary because runCommand does not actually run the
+			// command right now.
+			String env[] = new String[0];
+			try {
+				IHostShell hostShell = shellService.launchShell(
+						"", env, new SubProgressMonitor(monitor, 3)); //$NON-NLS-1$
+				hostShell.writeToShell(remote_command);
+				p = new HostShellProcessAdapter(hostShell);
+			} catch (Exception e) {
+				if (p != null) {
+					p.destroy();
+				}
+				abort(Messages.RemoteRunLaunchDelegate_7, e,
+						ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+			}
+		} catch (Exception e1) {
+			// TODO Auto-generated catch block
+			abort(e1.getMessage(), e1,
+					ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+		}
+
+		monitor.done();
+		return p;
+	}
+
+	protected String getPluginID() {
+		return "org.eclipse.rse.internal.remotecdt"; //$NON-NLS-1$
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.launch.remote/toc.xml b/results/plugins/org.eclipse.cdt.launch.remote/toc.xml
new file mode 100644
index 0000000..1b26111
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.launch.remote/toc.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+<!--
+Copyright (c) 2006 Wind River Systems, Inc.
+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 
+
+Contributors: 
+Martin Oberhuber (Wind River) - initial API and implementation  
+-->
+<toc link_to="../org.eclipse.rse.doc.user/toc.xml#rse_user_extensions"
+	 label="Launching Remote C/C++ Applications"> 
+	<topic label="Launching Remote C/C++ Applications" href="remotecdt.html"/>
+</toc>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/.classpath b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/.classpath
new file mode 100644
index 0000000..adb2aa1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="tests"/>
+	<classpathentry kind="src" path="suite"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/.cvsignore b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/.cvsignore
new file mode 100644
index 0000000..c5e82d7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/.cvsignore
@@ -0,0 +1 @@
+bin
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/.project b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/.project
new file mode 100644
index 0000000..76577e5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.managedbuilder.core.tests</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/.settings/org.eclipse.jdt.core.prefs b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..18c1888
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,70 @@
+#Fri Jan 09 10:48:29 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/results/plugins/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/messages.properties b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/ChangeLog
similarity index 100%
copy from results/plugins/org.eclipse.cdt.debug.ui.memory.transport/src/org/eclipse/cdt/debug/ui/memory/transport/messages.properties
copy to results/plugins/org.eclipse.cdt.managedbuilder.core.tests/ChangeLog
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..a1d2f95
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Tests
+Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core.tests; singleton:=true
+Bundle-Version: 5.0.100.qualifier
+Bundle-Activator: org.eclipse.cdt.managedbuilder.testplugin.CTestPlugin
+Bundle-Vendor: Eclipse CDT
+Bundle-Localization: plugin
+Export-Package: org.eclipse.cdt.managedbuilder.core.tests,
+ org.eclipse.cdt.managedbuilder.templateengine.tests,
+ org.eclipse.cdt.managedbuilder.testplugin,
+ org.eclipse.cdt.managedbuilder.tests.suite,
+ org.eclipse.cdt.projectmodel.tests
+Require-Bundle: org.eclipse.core.runtime,
+ org.junit,
+ org.eclipse.core.resources,
+ org.eclipse.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.cdt.core,
+ org.eclipse.cdt.managedbuilder.core,
+ org.eclipse.cdt.core.tests;bundle-version="5.0.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/about.html b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/about.html
new file mode 100644
index 0000000..9c7ba0a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/about.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head>
+
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>May 2, 2006</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/build.properties b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/build.properties
new file mode 100644
index 0000000..ec94669
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/build.properties
@@ -0,0 +1,23 @@
+###############################################################################
+#  Copyright (c) 2005, 2009 IBM Corporation and others.
+#  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
+# 
+#  Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+bin.includes = META-INF/,\
+               about.html,\
+               icons/,\
+               plugin.properties,\
+               plugin.xml,\
+               resources/,\
+               .,\
+               testdata/
+jars.compile.order = .
+output.. = bin/
+source.. = suite/,\
+           tests/
+src.includes = about.html
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/icons/one.gif b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/icons/one.gif
new file mode 100644
index 0000000..ca29dd7
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/icons/one.gif differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/icons/two.gif b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/icons/two.gif
new file mode 100644
index 0000000..489f9c3
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/icons/two.gif differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/plugin.properties b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/plugin.properties
new file mode 100644
index 0000000..a7f33d8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2007, 2008 QNX Software Systems and others.
+# 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
+#
+# Contributors:
+#     QNX Software Systems - initial API and implementation
+#	  IBM Corporation
+###############################################################################
+GNUMakeBuilder.name=Gnu Make Builder
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml
new file mode 100644
index 0000000..1ca7ae0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml
@@ -0,0 +1,9185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+    
+<!-- Managed Make Builder Tool Specifications - CDT 2.0 format -->
+
+   <extension
+         id="buildTest"
+         name="Tools for Build Test"
+         point="org.eclipse.cdt.managedbuilder.core.ManagedBuildInfo">
+         
+	  <!-- Test tools and project types that primarily test support for the old extension point,
+	       and reading and writing elements and attributes   -->
+      <tool
+            natureFilter="both"
+            name="Target Independent Tool"
+            sources="rc"
+            headerExtensions="h"
+            outputFlag="/fo"
+            command="RC.EXE"
+            outputs="free"
+            id="target.independent.tool"
+            isSystem="true">
+         <optionCategory
+               owner="target.independent.tool"
+               name="Free"
+               id="indy.cat.free">
+         </optionCategory>
+         <option
+               defaultValue="Live free or die"
+               name="String in Free"
+               category="indy.cat.free"
+               valueType="string"
+               id="indy.cat.free.string">
+         </option>
+         <optionCategory
+               owner="indy.cat.free"
+               name="Chained"
+               id="indy.cat.chained">
+         </optionCategory>
+         <option
+               defaultValue="false"
+               name="Boolean in Chained"
+               category="indy.cat.chained"
+               valueType="boolean"
+               id="indy.cat.chained.boolean">
+         </option>
+      </tool>
+      <target
+            name="Test Root"
+            id="test.root"
+            cleanCommand="del /myworld"
+            isTest="true"
+            defaultExtension="toor"
+            isAbstract="false"
+            makeCommand="make"
+            binaryParser="org.eclipse.cdt.core.PE"
+            makeArguments="-k"
+            osList="win32">
+         <tool
+               natureFilter="cnature"
+               sources="foo,bar"
+               name="Root Tool"
+               headerExtensions="baz"
+               outputFlag="-r"
+               outputs="toor"
+               command="doIt"
+               id="root.tool"
+               isSystem="true">
+            <optionCategory
+                  owner="root.tool"
+                  name="Category"
+                  id="category">
+            </optionCategory>
+            <option
+                  name="List Option in Top"
+                  command="-L"
+                  valueType="stringList"
+                  id="list.option">
+               <listOptionValue
+                     value="a">
+               </listOptionValue>
+               <listOptionValue
+                     value="b"
+                     builtIn="false">
+               </listOptionValue>
+               <listOptionValue
+                     value="c"
+                     builtIn="true">
+               </listOptionValue>
+            </option>
+            <option
+                  defaultValue="false"
+                  name="Boolean Option in Top"
+                  command="-b"
+                  valueType="boolean"
+                  id="boolean.option">
+            </option>
+            <option
+                  defaultValue="x"
+                  name="String Option in Category"
+                  category="category"
+                  valueType="string"
+                  id="string.option">
+            </option>
+            <option
+                  defaultValue=""
+                  name="Another String Option in Category"
+                  category="category"
+                  command="-str"
+                  id="another.string.option"
+                  valueType="string">
+            </option>
+            <option
+                  name="Enumerated Option in Category"
+                  category="category"
+                  valueType="enumerated"
+                  id="enumerated.option">
+               <enumeratedOptionValue
+                     name="Default Enum"
+                     isDefault="true"
+                     command="-e1"
+                     id="default.enum.option">
+               </enumeratedOptionValue>
+               <enumeratedOptionValue
+                     name="Another Enum"
+                     command="-e2"
+                     id="another.enum.option">
+               </enumeratedOptionValue>
+            </option>
+            <option
+                  commandFalse="-nob"
+                  name="Boolean Option in Category"
+                  category="category"
+                  id="boolean.false.option"
+                  valueType="boolean">
+            </option>
+         </tool>
+         <configuration
+               name="Root Config"
+               id="root.config">
+         </configuration>
+         <configuration
+               name="Root Override Config"
+               id="root.override.config"
+               isSystem="true">
+            <toolReference
+                  id="root.tool">
+               <optionReference
+                     defaultValue="y"
+                     id="string.option">
+               </optionReference>
+               <optionReference
+                     defaultValue="true"
+                     id="boolean.option">
+               </optionReference>
+            </toolReference>
+         </configuration>
+         <configuration
+               name="Complete Override Config"
+               id="complete.override.config"
+               isSystem="true">
+            <toolReference
+                  id="root.tool">
+               <optionReference
+                     defaultValue="overridden"
+                     id="string.option">
+               </optionReference>
+               <optionReference
+                     defaultValue="alsooverridden"
+                     id="another.string.option">
+               </optionReference>
+               <optionReference
+                     defaultValue="true"
+                     id="boolean.option">
+               </optionReference>
+               <optionReference
+                     defaultValue="true"
+                     id="boolean.false.option">
+               </optionReference>
+               <optionReference
+                     defaultValue="another.enum.option"
+                     id="enumerated.option">
+               </optionReference>
+               <optionReference
+                     id="list.option">
+                  <listOptionValue
+                        value="d">
+                  </listOptionValue>
+                  <listOptionValue
+                        value="e">
+                  </listOptionValue>
+                  <listOptionValue
+                        value="f">
+                  </listOptionValue>
+               </optionReference>
+            </toolReference>
+         </configuration>
+      </target>
+      <target
+            name="Test Sub"
+            id="test.sub"
+            cleanCommand="rm -yourworld"
+            isTest="true"
+            defaultExtension="bus"
+            isAbstract="false"
+            binaryParser="org.eclipse.cdt.core.PE"
+            archList="x86,ppc"
+            parent="test.root"
+            makeArguments="-d"
+            osList="win32,linux,solaris">
+         <configuration
+               name="Sub Config"
+               id="sub.config">
+         </configuration>
+         <tool
+               natureFilter="both"
+               sources="yarf"
+               name="Sub Tool"
+               headerExtensions="arf,barf"
+               outputs="bus"
+               outputPrefix="lib"
+               id="tool.sub"
+               isSystem="true">
+            <option
+                  name="Include Paths"
+                  command="-I"
+                  browseType="directory"
+                  valueType="includePath"
+                  id="sub.tool.opt.inc.paths">
+               <listOptionValue
+                     value="/usr/include">
+               </listOptionValue>
+               <listOptionValue
+                     value="/opt/gnome/include">
+               </listOptionValue>
+               <listOptionValue
+                     value="/usr/gnu/include"
+                     builtIn="true">
+               </listOptionValue>
+            </option>
+            <option
+                  name="Defined Symbols"
+                  command="-D"
+                  valueType="definedSymbols"
+                  id="sub.tool.opt.def.symbols">
+               <listOptionValue
+                     value="BUILTIN"
+                     builtIn="true">
+               </listOptionValue>
+            </option>
+            <option
+                  name="More Includes"
+                  command="-I"
+                  browseType="directory"
+                  valueType="includePath"
+                  id="sub.tool.opts.inc.paths.more">
+               <listOptionValue
+                     value="C:\home\tester/include"
+                     builtIn="false">
+               </listOptionValue>
+               <listOptionValue
+                     value="&quot;../includes&quot;"
+                     builtIn="false">
+               </listOptionValue>
+            </option>
+            <option
+                  name="User Objects"
+                  browseType="file"
+                  valueType="userObjs"
+                  id="sub.tool.opt.objs">
+               <listOptionValue
+                     value="obj1.o"
+                     builtIn="false">
+               </listOptionValue>
+               <listOptionValue
+                     value="obj2.o"
+                     builtIn="false">
+               </listOptionValue>
+            </option>
+            <option
+                  valueType="stringList"
+                  name="No Command StringList"
+                  id="sub.tool.string.list">
+               <listOptionValue value="x"/>
+               <listOptionValue value="y"/>
+               <listOptionValue value="z"/>
+            </option>
+         </tool>
+      </target>
+      <target
+            isTest="true"
+            name="Test Sub Sub"
+            parent="test.sub"
+            binaryParser="org.eclipse.cdt.core.ELF"
+            defaultExtension="tss"
+            makeCommand="nmake"
+            id="test.sub.sub">
+         <toolReference
+               id="target.independent.tool">
+            <optionReference
+                  defaultValue="true"
+                  id="indy.cat.chained.boolean"/>
+         </toolReference>
+         <configuration
+               name="Sub Sub Config"
+               id="sub.sub.config"/>
+      </target>
+      <dynamicElementProvider
+            name="Test Target Provider"
+            class="org.eclipse.cdt.managedbuilder.core.tests.TestManagedConfigProvider">
+      </dynamicElementProvider>
+      <target
+            isTest="true"
+            name="Forward Grandchild"
+            parent="test.forward.child.target"
+            binaryParser="org.eclipse.cdt.core.tests.target1"
+            id="test.forward.grandchild.target">
+         <toolReference
+               command="newcommand"
+               id="test.forward.tool">
+         </toolReference>
+      </target>
+      <target
+            isTest="true"
+            osList="win32,solaris,linux"
+            name="Forward Child"
+            binaryParser="org.eclipse.cdt.core.tests.target2"
+            parent="test.forward.parent.target"
+            id="test.forward.child.target">
+         <toolReference
+               id="test.forward.tool">
+            <optionReference
+                  id="test.forward.option">
+            </optionReference>
+         </toolReference>
+      </target>
+      <target
+            isTest="true"
+            name="Forward Parent"
+            binaryParser="org.eclipse.cdt.core.tests.target3"
+            id="test.forward.parent.target">
+         <tool
+               natureFilter="both"
+               name="Forward Parent Tool"
+               id="test.forward.tool"
+               isSystem="true">
+            <option
+                  name="Test Forward Option"
+                  category="test.forward.child.category"
+                  valueType="boolean"
+                  id="test.forward.option">
+            </option>
+            <optionCategory
+                  owner="test.forward.parent.category"
+                  name="Forward Child Category"
+                  id="test.forward.child.category">
+            </optionCategory>
+            <optionCategory
+                  owner="test.forward.tool"
+                  name="Forward Parent Category"
+                  id="test.forward.parent.category">
+            </optionCategory>
+         </tool>
+         <configuration
+         		name="Who Cares"
+         		id="test.forward.parent.config"
+         		isSystem="true">
+         	<toolReference
+         		id="test.forward.tool"/>
+         </configuration>
+      </target>
+      <target
+            isTest="true"
+            errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser"
+            name="Test Error Parsers"
+            binaryParser="org.eclipse.cdt.core.PE"
+            isAbstract="false"
+            id="test.error.parsers">
+         <tool
+               natureFilter="cnature"
+               sources="x,y"
+               name="EP Tool"
+               outputFlag="-o"
+               outputs="xy"
+               command="EP"
+               id="error.parsers.tool"
+               isSystem="true">
+         </tool>
+         <configuration
+               name="EP Config"
+               id="ep.config"
+               isSystem="true"/>
+      </target>
+   </extension>
+
+<!-- Managed Make Builder Tool Specifications - CDT 2.1 format -->
+   <extension
+         id="build.test.2.1"
+         name="Managed Build Tools Test Description"
+         point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
+      <managedBuildRevision
+            fileVersion="2.1.0">
+      </managedBuildRevision>
+
+	  <!-- Test tools and project types that correspond to the Gnu tool-chain  
+	       NOTE:  The warnings are the result intentional testing of deprecated attributes -->
+      <tool
+            natureFilter="cnature"
+            sources="o"
+			outputs=""
+            name="linker.gnu.c"
+            outputFlag="-o"
+            command="gcc"
+            dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator"
+            id="cdt.managedbuild.tool.testgnu.c.linker"
+            isSystem="true">
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu.c.linker"
+               name="General"
+               id="testgnu.c.link.category.general">
+         </optionCategory>
+         <option
+               defaultValue="false"
+               name="Posix.Linker.NoStartFiles"
+               category="testgnu.c.link.category.general"
+               command="-nostartfiles"
+               id="testgnu.c.link.option.nostart"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="Posix.Linker.NoDefLibs"
+               category="testgnu.c.link.category.general"
+               command="-nodefaultlibs"
+               id="testgnu.c.link.option.nodeflibs"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="Posix.Linker.NoStdLibs"
+               category="testgnu.c.link.category.general"
+               command="-nostdlib"
+               id="testgnu.c.link.option.nostdlibs"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="Posix.Linker.Strip"
+               category="testgnu.c.link.category.general"
+               command="--strip-all"
+               id="testgnu.c.link.option.strip"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="Posix.Linker.Static"
+               category="testgnu.c.link.category.general"
+               command="-static"
+               id="testgnu.c.link.option.noshared"
+               valueType="boolean">
+         </option>
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu.c.linker"
+               name="Libs"
+               id="testgnu.c.link.category.libs">
+         </optionCategory>
+         <option
+               name="Posix.Libs"
+               category="testgnu.c.link.category.libs"
+               command="-l"
+               id="testgnu.c.link.option.libs"
+               browseType="file"
+               valueType="libs">
+         </option>
+         <option
+               name="Posix.Libsearch"
+               category="testgnu.c.link.category.libs"
+               command="-L"
+               id="testgnu.c.link.option.paths"
+               browseType="directory"
+               valueType="stringList">
+         </option>
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu.c.linker"
+               name="Misc"
+               id="testgnu.c.link.category.other">
+         </optionCategory>
+         <option
+               name="Posix.Linker.Flags"
+               category="testgnu.c.link.category.other"
+               valueType="string"
+               id="testgnu.c.link.option.ldflags">
+         </option>
+         <option
+               name="Posix.Linker.XLinker"
+               category="testgnu.c.link.category.other"
+               command="-Xlinker,"
+               valueType="stringList"
+               id="testgnu.c.link.option.other">
+         </option>
+         <option
+               name="Posix.UserObjs"
+               category="testgnu.c.link.category.other"
+               browseType="file"
+               valueType="userObjs"
+               id="testgnu.c.link.option.userobjs">
+         </option>
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu.c.linker"
+               name="Shared.Settings"
+               id="testgnu.c.link.category.shared">
+         </optionCategory>
+         <option
+               defaultValue="false"
+               name="Posix.Linker.Shared"
+               category="testgnu.c.link.category.shared"
+               command="-shared"
+               id="testgnu.c.link.option.shared"
+               valueType="boolean">
+         </option>
+         <option
+               name="Posix.Linker.SOName"
+               category="testgnu.c.link.category.shared"
+               command="-Wl,-soname="
+               id="testgnu.c.link.option.soname"
+               valueType="string">
+         </option>
+         <option
+               name="Posix.Linker.Implib"
+               category="testgnu.c.link.category.shared"
+               command="-Wl,--out-implib="
+               id="testgnu.c.link.option.implname"
+               valueType="string">
+         </option>
+         <option
+               name="Posix.Linker.Defname"
+               category="testgnu.c.link.category.shared"
+               command="-Wl,--output-def="
+               id="testgnu.c.link.option.defname"
+               valueType="string">
+         </option>
+      </tool>
+      <tool
+            natureFilter="ccnature"
+            sources="o"
+            outputs=""
+            name="linker.gnu.cpp"
+            outputFlag="-o"
+            command="g++"
+            dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator"
+            id="cdt.managedbuild.tool.testgnu.cpp.linker"
+            isSystem="true">
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu.cpp.linker"
+               name="General"
+               id="testgnu.cpp.link.category.options">
+         </optionCategory>
+         <option
+               defaultValue="false"
+               name="Posix.Linker.NoStartFiles"
+               category="testgnu.cpp.link.category.options"
+               command="-nostartfiles"
+               id="testgnu.cpp.link.option.nostart"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="Posix.Linker.NoDefLibs"
+               category="testgnu.cpp.link.category.options"
+               command="-nodefaultlibs"
+               id="testgnu.cpp.link.option.nodeflibs"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="Posix.Linker.NoStdLibs"
+               category="testgnu.cpp.link.category.options"
+               command="-nostdlib"
+               id="testgnu.cpp.link.option.nostdlibs"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="Posix.Linker.Strip"
+               category="testgnu.cpp.link.category.options"
+               command="--strip-all"
+               id="testgnu.cpp.link.option.strip"
+               valueType="boolean">
+         </option>
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu.cpp.linker"
+               name="Libs"
+               id="testgnu.cpp.link.category.libs">
+         </optionCategory>
+         <option
+               name="Posix.Libs"
+               category="testgnu.cpp.link.category.libs"
+               command="-l"
+               id="testgnu.cpp.link.option.libs"
+               browseType="file"
+               valueType="libs">
+         </option>
+         <option
+               name="Posix.Libsearch"
+               category="testgnu.cpp.link.category.libs"
+               command="-L"
+               id="testgnu.cpp.link.option.paths"
+               browseType="directory"
+               valueType="stringList">
+         </option>
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu.cpp.linker"
+               name="Misc"
+               id="testgnu.cpp.link.category.other">
+         </optionCategory>
+         <option
+               name="Posix.Linker.Flags"
+               category="testgnu.cpp.link.category.other"
+               valueType="string"
+               id="testgnu.cpp.link.option.flags">
+         </option>
+         <option
+               name="Posix.Linker.XLinker"
+               category="testgnu.cpp.link.category.other"
+               command="-Xlinker "
+               valueType="stringList"
+               id="testgnu.cpp.link.option.other">
+         </option>
+         <option
+               name="Posix.UserObjs"
+               category="testgnu.cpp.link.category.other"
+               browseType="file"
+               valueType="userObjs"
+               id="testgnu.cpp.link.option.userobjs">
+         </option>
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu.cpp.linker"
+               name="Shared.Settings"
+               id="testgnu.cpp.link.category.shared">
+         </optionCategory>
+         <option
+               defaultValue="false"
+               name="Posix.Linker.Shared"
+               category="testgnu.cpp.link.category.shared"
+               command="-shared"
+               valueType="boolean"
+               id="testgnu.cpp.link.option.shared">
+         </option>
+         <option
+               name="Posix.Linker.SOName"
+               category="testgnu.cpp.link.category.shared"
+               command="-Wl,-soname="
+               valueType="string"
+               id="testgnu.cpp.link.option.soname">
+         </option>
+         <option
+               name="Posix.Linker.Implib"
+               category="testgnu.cpp.link.category.shared"
+               command="-Wl,--out-implib="
+               valueType="string"
+               id="testgnu.cpp.link.option.implname">
+         </option>
+         <option
+               name="Posix.Linker.Defname"
+               category="testgnu.cpp.link.category.shared"
+               command="-Wl,--output-def="
+               valueType="string"
+               id="testgnu.cpp.link.option.defname">
+         </option>
+      </tool>
+      <tool
+            natureFilter="both"
+            isAbstract="true"
+            sources="o"
+            name="archiver.gnu"
+            outputs="a"
+            command="ar"
+            outputPrefix="lib"
+            dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator"
+            id="cdt.managedbuild.tool.testgnu.archiver"
+            isSystem="true">
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu.archiver"
+               name="General"
+               id="testgnu.lib.category.general">
+         </optionCategory>
+         <option
+               defaultValue="-r"
+               name="Posix.Archiver.Flags"
+               category="testgnu.lib.category.general"
+               valueType="string"
+               id="testgnu.both.lib.option.flags">
+         </option>
+      </tool>
+      <tool
+            command="as"
+            sources="s,S"
+            outputs="o"
+            name="assembler.gnu"
+            outputFlag="-o"
+            id="cdt.managedbuild.tool.testgnu.assembler"
+            natureFilter="both"
+            isSystem="true">
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu.assembler"
+               name="General"
+               id="testgnu.asm.category.general">
+         </optionCategory>
+         <option
+               name="Gnu.Assembler.Flags"
+               category="testgnu.asm.category.general"
+               valueType="string"
+               id="testgnu.both.asm.option.flags">
+         </option>
+         <option
+               command="-I"
+               valueType="includePath"
+               category="testgnu.asm.category.general"
+               browseType="directory"
+               name="Posix.InclPaths"
+               id="testgnu.both.asm.option.include.paths"/>
+         <option
+               command="-W"
+               defaultValue="false"
+               valueType="boolean"
+               category="testgnu.asm.category.general"
+               name="Gnu.Assembler.warn.suppress"
+               id="testgnu.both.asm.option.warnings.nowarn"/>
+         <option
+               command="-v"
+               defaultValue="false"
+               valueType="boolean"
+               category="testgnu.asm.category.general"
+               name="Gnu.Assembler.version"
+               id="testgnu.both.asm.option.version"/>
+      </tool>
+      
+      <tool
+		  name="compiler.gnu.c"
+		  id="cdt.managedbuild.tool.testgnu.c.compiler"
+		  isAbstract="true"
+		  sources="c"
+		  command="gcc"
+		  dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator"
+		  headerExtensions="h"
+		  natureFilter="cnature"
+		  outputs="o"
+		  outputFlag="-o"
+		  isSystem="true">
+		  <optionCategory
+		      owner="cdt.managedbuild.tool.testgnu.c.compiler"
+			  name="Preproc"
+			  id="testgnu.c.compiler.category.preprocessor">
+		  </optionCategory>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Nostdinc"
+			  category="testgnu.c.compiler.category.preprocessor"
+			  command="-nostdinc"
+			  id="testgnu.c.compiler.option.preprocessor.nostdinc"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.PreprocOnly"
+			  category="testgnu.c.compiler.category.preprocessor"
+			  command="-E"
+			  id="testgnu.c.compiler.option.preprocessor.preprocess"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu.c.compiler"
+			  name="Symbols"
+			  id="testgnu.c.compiler.category.symbols">
+		  </optionCategory>
+		  <option
+			  name="Posix.DefSym"
+			  category="testgnu.c.compiler.category.symbols"
+			  command="-D"
+			  id="testgnu.c.compiler.option.preprocessor.def.symbols"
+			  valueType="definedSymbols">
+		  </option>
+		  <option
+			  name="Posix.UndefSym"
+			  category="testgnu.c.compiler.category.symbols"
+			  command="-U"
+			  id="testgnu.c.compiler.option.preprocessor.undef.symbol"
+			  valueType="stringList">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu.c.compiler"
+			  name="Dirs"
+			  id="testgnu.c.compiler.category.dirs">
+		  </optionCategory>
+		  <option
+			  name="Posix.InclPaths"
+			  category="testgnu.c.compiler.category.dirs"
+			  command="-I"
+			  id="testgnu.c.compiler.option.include.paths"
+			  valueType="includePath"
+			  browseType="directory">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu.c.compiler"
+			  name="Optimize"
+			  id="testgnu.c.compiler.category.optimization">
+		  </optionCategory>
+		  <option
+			  name="Posix.OptLevel"
+			  category="testgnu.c.compiler.category.optimization"
+			  id="testgnu.c.compiler.option.optimization.level"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+		  		  name="Posix.Optimize.None"
+				  isDefault="false"
+				  command="-O0"
+				  id="testgnu.c.optimization.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Optimize.Optimize"
+				  command="-O1"
+				  id="testgnu.c.optimization.level.optimize">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Optimize.More"
+				  isDefault="true"
+				  command="-O2"
+				  id="testgnu.c.optimization.level.more">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Optimize.Most"
+				  command="-O3"
+				  id="testgnu.c.optimization.level.most">
+		  </enumeratedOptionValue>
+		  </option>
+		  <option
+			  name="Posix.Optimize.Flags"
+			  category="testgnu.c.compiler.category.optimization"
+			  id="testgnu.c.compiler.option.optimization.flags"
+			  valueType="string">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu.c.compiler"
+			  name="Debug"
+			  id="testgnu.c.compiler.category.debug">
+		  </optionCategory>
+		  <option
+			  name="Posix.DebugLevel"
+			  category="testgnu.c.compiler.category.debug"
+			  id="testgnu.c.compiler.option.debugging.level"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+				  name="Posix.Debug.None"
+				  isDefault="false"
+				  id="testgnu.c.debugging.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Debug.Min"
+				  command="-g1"
+				  id="testgnu.c.debugging.level.minimal">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Debug.Def"
+				  isDefault="true"
+				  command="-g"
+				  id="testgnu.c.debugging.level.default">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Debug.Max"
+				  isDefault="false"
+				  command="-g3"
+				  id="testgnu.c.debugging.level.max">
+		  </enumeratedOptionValue>
+		  </option>
+		  <option
+			  name="Posix.Debug.Other"
+			  category="testgnu.c.compiler.category.debug"
+			  id="testgnu.c.compiler.option.debugging.other"
+			  valueType="string">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Debug.gprof"
+			  category="testgnu.c.compiler.category.debug"
+			  command="-pg"
+			  id="testgnu.c.compiler.option.debugging.gprof"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Debug.prof"
+			  category="testgnu.c.compiler.category.debug"
+			  command="-p"
+			  id="testgnu.c.compiler.option.debugging.prof"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu.c.compiler"
+			  name="Warn"
+			  id="testgnu.c.compiler.category.warnings">
+		  </optionCategory>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.Syntax"
+			  category="testgnu.c.compiler.category.warnings"
+			  command="-fsyntax-only"
+			  id="testgnu.c.compiler.option.warnings.syntax"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.Pedandic"
+			  category="testgnu.c.compiler.category.warnings"
+			  command="-pedantic"
+			  id="testgnu.c.compiler.option.warnings.pedantic"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.PedErrors"
+			  category="testgnu.c.compiler.category.warnings"
+			  command="-pedantic-errors"
+			  id="testgnu.c.compiler.option.warnings.pedantic.error"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.nowarn"
+			  category="testgnu.c.compiler.category.warnings"
+			  command="-w"
+			  id="testgnu.c.compiler.option.warnings.nowarn"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="true"
+			  name="Posix.Warn.allwarn"
+			  category="testgnu.c.compiler.category.warnings"
+			  command="-Wall"
+			  id="testgnu.c.compiler.option.warnings.allwarn"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.toerrs"
+			  category="testgnu.c.compiler.category.warnings"
+			  command="-Werror"
+			  id="testgnu.c.compiler.option.warnings.toerrors"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu.c.compiler"
+			  name="Misc"
+			  id="testgnu.c.compiler.category.other">
+		  </optionCategory>
+		  <option
+			  defaultValue="-c -fmessage-length=0"
+			  name="OtherFlags"
+			  category="testgnu.c.compiler.category.other"
+			  id="testgnu.c.compiler.option.misc.other"
+			  valueType="string">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Verbose"
+			  category="testgnu.c.compiler.category.other"
+			  command="-v"
+			  id="testgnu.c.compiler.option.misc.verbose"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Ansi"
+			  category="testgnu.c.compiler.category.other"
+			  command="-ansi"
+			  id="testgnu.c.compiler.option.misc.ansi"
+			  valueType="boolean">
+		  </option>
+	  </tool>
+	  <tool
+		  name="compiler.gnu.cpp"
+		  id="cdt.managedbuild.tool.testgnu.cpp.compiler"
+		  isAbstract="true"
+		  sources="c,C,cc,cxx,cpp"
+		  command="g++"
+		  dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator"
+		  headerExtensions="h,H,hpp"
+		  natureFilter="ccnature"
+		  outputs="o"
+		  outputFlag="-o"
+		  isSystem="true">
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu.cpp.compiler"
+			  name="Preproc"
+			  id="testgnu.cpp.compiler.category.preprocessor">
+		  </optionCategory>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Nostdinc"
+			  category="testgnu.cpp.compiler.category.preprocessor"
+			  command="-nostdinc"
+			  id="testgnu.cpp.compiler.option.preprocessor.nostdinc"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.PreprocOnly"
+			  category="testgnu.cpp.compiler.category.preprocessor"
+			  command="-E"
+			  id="testgnu.cpp.compiler.option.preprocessor.preprocess"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  name="Posix.DefSym"
+			  category="testgnu.cpp.compiler.category.preprocessor"
+			  command="-D"
+			  id="testgnu.cpp.compiler.option.preprocessor.def"
+			  valueType="definedSymbols">
+		  </option>
+		  <option
+			  name="Posix.UndefSym"
+			  category="testgnu.cpp.compiler.category.preprocessor"
+			  command="-U"
+			  id="testgnu.cpp.compiler.option.preprocessor.undef"
+			  valueType="stringList">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu.cpp.compiler"
+			  name="Dirs"
+			  id="testgnu.cpp.compiler.category.dirs">
+		  </optionCategory>
+		  <option
+			  name="Posix.InclPaths"
+			  category="testgnu.cpp.compiler.category.dirs"
+			  command="-I"
+			  id="testgnu.cpp.compiler.option.include.paths"
+			  valueType="includePath"
+			  browseType="directory">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu.cpp.compiler"
+			  name="Optimize"
+			  id="testgnu.cpp.compiler.category.optimization">
+		  </optionCategory>
+		  <option
+			  name="Posix.OptLevel"
+			  category="testgnu.cpp.compiler.category.optimization"
+			  id="testgnu.cpp.compiler.option.optimization.level"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+				  name="Posix.Optimize.None"
+				  command="-O0"
+				  id="testgnu.cpp.compiler.optimization.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Optimize.Optimize"
+				  command="-O1"
+				  id="testgnu.cpp.compiler.optimization.level.optimize">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Optimize.More"
+				  isDefault="true"
+				  command="-O2"
+				  id="testgnu.cpp.compiler.optimization.level.more">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Optimize.Most"
+				  command="-O3"
+				  id="testgnu.cpp.compiler.optimization.level.most">
+		  </enumeratedOptionValue>
+		  </option>
+		  <option
+			  name="Posix.Optimize.Flags"
+			  category="testgnu.cpp.compiler.category.optimization"
+			  id="testgnu.cpp.compiler.option.optimization.flags"
+			  valueType="string">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu.cpp.compiler"
+			  name="Debug"
+			  id="testgnu.cpp.compiler.category.debug">
+		  </optionCategory>
+		  <option
+			  name="Posix.DebugLevel"
+			  category="testgnu.cpp.compiler.category.debug"
+			  id="testgnu.cpp.compiler.option.debugging.level"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+				  name="Posix.Debug.None"
+				  isDefault="false"
+				  id="testgnu.cpp.compiler.debugging.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Debug.Min"
+				  command="-g1"
+				  id="testgnu.cpp.compiler.debugging.level.minimal">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Debug.Def"
+				  isDefault="true"
+				  command="-g"
+				  id="testgnu.cpp.compiler.debugging.level.default">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Debug.Max"
+				  isDefault="false"
+				  command="-g3"
+				  id="testgnu.cpp.compiler.debugging.level.max">
+		  </enumeratedOptionValue>
+		  </option>
+		  <option
+			  name="Posix.Debug.Other"
+			  category="testgnu.cpp.compiler.category.debug"
+			  id="testgnu.cpp.compiler.option.debugging.other"
+			  valueType="string">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Debug.prof"
+			  category="testgnu.cpp.compiler.category.debug"
+			  command="-p"
+			  id="testgnu.cpp.compiler.option.debugging.prof"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Debug.gprof"
+			  category="testgnu.cpp.compiler.category.debug"
+			  command="-pg"
+			  id="testgnu.cpp.compiler.option.debugging.gprof"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu.cpp.compiler"
+			  name="Warn"
+			  id="testgnu.cpp.compiler.category.warnings">
+		  </optionCategory>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.Syntax"
+			  category="testgnu.cpp.compiler.category.warnings"
+			  command="-fsyntax-only"
+			  id="testgnu.cpp.compiler.option.warnings.syntax"
+			  valueType="boolean">
+		   </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.Pedandic"
+			  category="testgnu.cpp.compiler.category.warnings"
+			  command="-pedantic"
+			  id="testgnu.cpp.compiler.option.warnings.pedantic"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.PedErrors"
+			  category="testgnu.cpp.compiler.category.warnings"
+			  command="-pedantic-errors"
+			  id="testgnu.cpp.compiler.option.warnings.pedantic.error"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.nowarn"
+			  category="testgnu.cpp.compiler.category.warnings"
+			  command="-w"
+			  id="testgnu.cpp.compiler.option.warnings.nowarn"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="true"
+			  name="Posix.Warn.allwarn"
+			  category="testgnu.cpp.compiler.category.warnings"
+			  command="-Wall"
+			  id="testgnu.cpp.compiler.option.warnings.allwarn"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.toerrs"
+			  category="testgnu.cpp.compiler.category.warnings"
+			  command="-Werror"
+			  id="testgnu.cpp.compiler.option.warnings.toerrors"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu.cpp.compiler"
+			  name="Misc"
+			  id="testgnu.cpp.compiler.category.other">
+		  </optionCategory>
+		  <option
+			  defaultValue="-c -fmessage-length=0"
+			  name="OtherFlags"
+			  category="testgnu.cpp.compiler.category.other"
+			  id="testgnu.cpp.compiler.option.other.other"
+			  valueType="string">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Verbose"
+			  category="testgnu.cpp.compiler.category.other"
+			  command="-v"
+			  id="testgnu.cpp.compiler.option.other.verbose"
+			  valueType="boolean">
+		  </option>
+	  </tool>
+      
+      <projectType      
+            isAbstract="false"     
+            isTest="true" 
+            name="testgnu21.exe"
+            id="cdt.managedbuild.target.testgnu21.exe">
+         <configuration
+               name="Dbg"
+               id="cdt.managedbuild.config.testgnu.exe.debug"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">
+               <toolChain
+		          id="cdt.managedbuild.toolchain.testgnu.exe.debug"
+		          name="Dbg ToolChain"
+		          scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+		          osList="solaris,linux,hpux,aix,qnx"
+		          archList="all"
+		          isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testgnu.platform.exe.debug"
+		              name="Dbg Platform"
+		              binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE"
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+	              </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testgnu.builder.exe.debug"
+		              name="Dbg Builder"
+		              command="make"
+		              arguments="-k"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+		     	  </builder>               
+                  <tool
+                      id="cdt.managedbuild.tool.testgnu.c.compiler.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu.c.compiler"
+                      isSystem="true">                          
+			  	      <option
+					      id="testgnu.c.compiler.exe.debug.option.optimization.level"
+						  defaultValue="testgnu.c.optimization.level.none"
+						  superClass="testgnu.c.compiler.option.optimization.level">
+					  </option>
+					  <option   
+					      id="testgnu.c.compiler.exe.debug.option.debugging.level"					     
+						  defaultValue="testgnu.c.debugging.level.max"
+					      superClass="testgnu.c.compiler.option.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+                      id="cdt.managedbuild.tool.testgnu.cpp.compiler.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu.cpp.compiler"
+                      isSystem="true">                         
+                      <option
+				          id="testgnu.cpp.compiler.exe.debug.option.optimization.level"
+                          defaultValue="testgnu.cpp.compiler.optimization.level.none"
+                          superClass="testgnu.cpp.compiler.option.optimization.level">
+                      </option>
+                      <option
+						  id="testgnu.cpp.compiler.exe.debug.option.debugging.level"
+                          defaultValue="testgnu.cpp.compiler.debugging.level.max"
+                          superClass="testgnu.cpp.compiler.option.debugging.level">
+                      </option>
+                  </tool>
+                  <tool
+                      id="cdt.managedbuild.tool.testgnu.c.linker.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu.c.linker"
+                      isSystem="true">
+                  </tool> 
+                  <tool
+                      id="cdt.managedbuild.tool.testgnu.cpp.linker.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu.cpp.linker"
+                      isSystem="true">
+                  </tool> 
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu.assembler.exe.debug"
+					  superClass="cdt.managedbuild.tool.testgnu.assembler"
+					  isSystem="true">
+				  </tool>   
+			  </toolChain>
+         </configuration>
+         <configuration
+               name="Rel"
+               id="cdt.managedbuild.config.testgnu.exe.release"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">               
+               <toolChain
+		          id="cdt.managedbuild.toolchain.testgnu.exe.release"
+		          name="Rel ToolChain"
+		          scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+		          osList="solaris,linux,hpux,aix,qnx"
+		          archList="all"
+		          isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testgnu.platform.exe.release"
+		              name="Rel Platform"		             
+		              binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE"
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">		              
+		          </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testgnu.builder.exe.release"
+		              name="Rel Builder"		              
+		              command="make"
+		              arguments="-k">
+				  </builder> 
+                  <tool
+                      id="cdt.managedbuild.tool.testgnu.c.compiler.exe.release"
+                      superClass="cdt.managedbuild.tool.testgnu.c.compiler">                          
+					  <option
+						  id="testgnu.c.compiler.exe.release.option.optimization.level"
+						  defaultValue="testgnu.c.optimization.level.most"
+						  superClass="testgnu.c.compiler.option.optimization.level">
+					  </option>
+					  <option
+						  id="testgnu.c.compiler.exe.release.option.debugging.level"
+						  defaultValue="testgnu.c.debugging.level.none"
+						  superClass="testgnu.c.compiler.option.debugging.level">
+					  </option>
+                  </tool>
+                  <tool
+                      id="cdt.managedbuild.tool.testgnu.cpp.compiler.exe.release"
+                      superClass="cdt.managedbuild.tool.testgnu.cpp.compiler">                     
+					  <option
+						  id="testgnu.cpp.compiler.exe.release.option.optimization.level"
+						  defaultValue="testgnu.cpp.compiler.optimization.level.most"
+						  superClass="testgnu.cpp.compiler.option.optimization.level">
+					  </option>
+					  <option
+						  id="testgnu.cpp.compiler.exe.release.option.debugging.level"
+						  defaultValue="testgnu.cpp.compiler.debugging.level.none"
+						  superClass="testgnu.cpp.compiler.option.debugging.level">
+					  </option>
+                  </tool>
+                  <tool
+                      id="cdt.managedbuild.tool.testgnu.c.linker.exe.release"
+                      superClass="cdt.managedbuild.tool.testgnu.c.linker">
+                  </tool> 
+                  <tool
+                      id="cdt.managedbuild.tool.testgnu.cpp.linker.exe.release"
+                      superClass="cdt.managedbuild.tool.testgnu.cpp.linker">
+                  </tool>  
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu.assembler.exe.release"
+					  superClass="cdt.managedbuild.tool.testgnu.assembler">
+				  </tool>   
+               </toolChain>
+         </configuration>
+      </projectType>     
+      
+      <projectType      
+            isAbstract="false"     
+            isTest="true"
+            name="testgnu21.so"
+            id="cdt.managedbuild.target.testgnu21.so">
+         <configuration
+               name="Debug"
+               cleanCommand="rm -rf"
+               artifactExtension="so"               
+               errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"                          
+               id="cdt.managedbuild.config.testgnu.so.debug">
+               <toolChain
+		          id="cdt.managedbuild.toolchain.testgnu.so.debug"
+		          name="so Debug ToolChain"
+		          scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"		          
+		          osList="solaris,linux,hpux,aix,qnx"                
+		          archList="all"
+		          isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testgnu.platform.so.debug"
+		              name="so Debug Platform"
+		              binaryParser="org.eclipse.cdt.core.ELF"		            
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+		          </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testgnu.builder.so.debug"
+		              name="so Debug Builder"
+		              command="make"
+		              arguments="-k">
+				  </builder>               		         
+				  <tool
+				      id="cdt.managedbuild.tool.testgnu.c.compiler.so.debug"
+					  superClass="cdt.managedbuild.tool.testgnu.c.compiler">
+					  <option
+						  id="testgnu.c.compiler.so.debug.option.optimization.level"
+						  defaultValue="testgnu.c.optimization.level.none"
+						  superClass="testgnu.c.compiler.option.optimization.level">
+					  </option>
+					  <option
+					      id="testgnu.c.compiler.so.debug.option.debugging.level"
+						  defaultValue="testgnu.c.debugging.level.max"
+						  superClass="testgnu.c.compiler.option.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+				      id="cdt.managedbuild.tool.testgnu.cpp.compiler.so.debug"
+					  superClass="cdt.managedbuild.tool.testgnu.cpp.compiler">
+					  <option
+					      id="testgnu.cpp.compiler.so.debug.option.optimization.level"
+						  defaultValue="testgnu.cpp.compiler.optimization.level.none"
+						  superClass="testgnu.cpp.compiler.option.optimization.level">
+					  </option>
+					  <option
+					      id="testgnu.cpp.compiler.so.debug.option.debugging.level"
+						  defaultValue="testgnu.cpp.compiler.debugging.level.max"
+						  superClass="testgnu.cpp.compiler.option.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+				      id="cdt.managedbuild.tool.testgnu.c.linker.so.debug"
+					  outputs="so"
+					  outputPrefix="lib"
+					  superClass="cdt.managedbuild.tool.testgnu.c.linker">
+					  <option
+						  id="testgnu.c.link.so.debug.option.shared"
+						  defaultValue="true"
+						  superClass="testgnu.c.link.option.shared">
+					  </option>
+				  </tool>
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu.cpp.linker.so.debug"
+					  outputs="so"
+					  outputPrefix="lib"
+					  superClass="cdt.managedbuild.tool.testgnu.cpp.linker">
+					  <option
+						  id="testgnu.cpp.link.so.debug.option.shared"
+						  defaultValue="true"
+						  superClass="testgnu.cpp.link.option.shared">
+					  </option>
+				  </tool>
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu.assembler.so.debug"
+					  superClass="cdt.managedbuild.tool.testgnu.assembler">
+				  </tool>   
+			   </toolChain>
+         </configuration>
+         <configuration
+               name="Release"
+               cleanCommand="rm -rf"
+               artifactExtension="so"
+               errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"
+               id="cdt.managedbuild.config.testgnu.so.release">
+               <toolChain
+		          id="cdt.managedbuild.toolchain.testgnu.so.release"
+		          name="so Release ToolChain"
+		          scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"		          
+		          osList="solaris,linux,hpux,aix,qnx"                
+		          archList="all"
+		          isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testgnu.platform.so.release"
+		              name="so Release Platform"
+		              binaryParser="org.eclipse.cdt.core.ELF"		            
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+		          </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testgnu.builder.so.release"
+		              name="so Release Builder"
+		              command="make"
+		              arguments="-k">
+				  </builder>               
+				  <tool				     
+				      id="cdt.managedbuild.tool.testgnu.c.compiler.so.release"
+					  superClass="cdt.managedbuild.tool.testgnu.c.compiler">
+				      <option
+				          id="testgnu.c.compiler.so.release.option.optimization.level"
+						  defaultValue="testgnu.c.optimization.level.most"
+						  superClass="testgnu.c.compiler.option.optimization.level">
+				      </option>
+				      <option
+				          id="testgnu.c.compiler.so.release.option.debugging.level"
+						  defaultValue="testgnu.c.debugging.level.none"
+						  superClass="testgnu.c.compiler.option.debugging.level">
+				      </option>
+				  </tool>
+				  <tool
+				      id="cdt.managedbuild.tool.testgnu.cpp.compiler.so.release"
+					  superClass="cdt.managedbuild.tool.testgnu.cpp.compiler">
+				      <option
+				          id="testgnu.cpp.compiler.so.release.option.optimization.level"
+						  defaultValue="testgnu.cpp.compiler.optimization.level.most"
+						  superClass="testgnu.cpp.compiler.option.optimization.level">
+				      </option>
+				      <option
+				          id="testgnu.cpp.compiler.so.release.option.debugging.level"
+						  defaultValue="testgnu.cpp.compiler.debugging.level.none"
+						  superClass="testgnu.cpp.compiler.option.debugging.level">
+				      </option>
+				  </tool>				
+				  <tool
+				      id="cdt.managedbuild.tool.testgnu.c.linker.so.release"
+					  outputs="so"
+					  outputPrefix="lib"
+					  superClass="cdt.managedbuild.tool.testgnu.c.linker">
+					  <option
+						  id="testgnu.c.link.so.release.option.shared"
+						  defaultValue="true"
+						  superClass="testgnu.c.link.option.shared">
+					  </option>
+				  </tool>
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu.cpp.linker.so.release"
+					  outputs="so"
+					  outputPrefix="lib"
+					  superClass="cdt.managedbuild.tool.testgnu.cpp.linker">
+					  <option
+						  id="testgnu.cpp.link.so.release.option.shared"
+						  defaultValue="true"
+						  superClass="testgnu.cpp.link.option.shared">
+					  </option>
+				  </tool>
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu.assembler.so.release"
+					  superClass="cdt.managedbuild.tool.testgnu.assembler">
+				  </tool>   
+			   </toolChain>  
+         </configuration>         
+      </projectType>
+          
+      <projectType 
+            isTest="true"
+            name="testgnu21.lib"
+            isAbstract="false"
+            id="cdt.managedbuild.target.testgnu21.lib">                        
+         <configuration
+			   name="Dbg"
+			   artifactExtension="a"
+			   cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"
+			   id="cdt.managedbuild.config.testgnu.lib.debug">
+               <toolChain
+		          id="cdt.managedbuild.toolchain.testgnu.lib.debug"
+		          name="Dbg TC"
+		          scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"		          
+		          osList="solaris,linux,hpux,aix,qnx"                
+		          archList="all"
+		          isSystem="true">
+				  <targetPlatform
+					  id="cdt.managedbuild.target.testgnu.platform.lib.debug"
+				 	  name="Dbg P"
+					  binaryParser="org.eclipse.cdt.core.ELF"		            
+					  osList="solaris,linux,hpux,aix,qnx"
+					  archList="all">
+				  </targetPlatform>
+			  	  <builder
+					  id="cdt.managedbuild.target.testgnu.builder.lib.debug"
+					  name="Dbg B"
+					  command="make"
+					  arguments="-k">
+			      </builder>               		         
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu.c.compiler.lib.debug"
+					  superClass="cdt.managedbuild.tool.testgnu.c.compiler">
+				      <option
+					      id="testgnu.c.compiler.lib.debug.option.optimization.level"
+						  defaultValue="testgnu.c.optimization.level.none"
+						  superClass="testgnu.c.compiler.option.optimization.level">
+				      </option>
+				      <option
+						  id="testgnu.c.compiler.lib.debug.option.debugging.level"						
+						  defaultValue="testgnu.c.debugging.level.max"
+						  superClass="testgnu.c.compiler.option.debugging.level">
+				      </option>
+				  </tool>
+                  <tool
+					  id="cdt.managedbuild.tool.testgnu.cpp.compiler.lib.debug"
+                      superClass="cdt.managedbuild.tool.testgnu.cpp.compiler">
+					  <option
+					      id="testgnu.cpp.compiler.lib.debug.option.optimization.level"
+					      defaultValue="testgnu.cpp.compiler.optimization.level.none"
+					      superClass="testgnu.cpp.compiler.option.optimization.level">
+					  </option>
+					  <option
+					      id="testgnu.cpp.compiler.lib.debug.option.debugging.level"
+					      defaultValue="testgnu.cpp.compiler.debugging.level.max"
+					      superClass="testgnu.cpp.compiler.option.debugging.level">
+					  </option>
+                  </tool>
+			      <tool
+		    		  id="cdt.managedbuild.tool.testgnu.archiver.lib.debug"
+				      outputs="a"
+                      outputPrefix="lib"
+			          superClass="cdt.managedbuild.tool.testgnu.archiver">
+				  </tool>                 
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu.assembler.lib.debug"
+					  superClass="cdt.managedbuild.tool.testgnu.assembler">
+				  </tool>   
+               </toolChain>                 
+         </configuration>
+         <configuration
+               name="Rel"
+               artifactExtension="a"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"
+               id="cdt.managedbuild.config.testgnu.lib.release">
+               <toolChain
+		          id="cdt.managedbuild.toolchain.testgnu.lib.release"
+		          name="Rel TC"
+		          scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"		          
+		          osList="solaris,linux,hpux,aix,qnx"                
+		          archList="all"
+		          isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testgnu.platform.lib.release"
+		              name="Rel P"
+		              binaryParser="org.eclipse.cdt.core.ELF"		            
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+		          </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testgnu.builder.lib.release"
+		              name="Rel B"
+		              command="make"
+		              arguments="-k">
+				  </builder>               		            
+		          <tool
+					  id="cdt.managedbuild.tool.testgnu.c.compiler.lib.release"
+					  superClass="cdt.managedbuild.tool.testgnu.c.compiler">
+					  <option
+						  id="testgnu.c.compiler.lib.release.option.optimization.level"
+						  defaultValue="testgnu.c.optimization.level.most"
+						  superClass="testgnu.c.compiler.option.optimization.level">
+					  </option>
+					  <option
+						  id="testgnu.c.compiler.lib.release.option.debugging.level"
+					      defaultValue="testgnu.c.debugging.level.none"
+					      superClass="testgnu.c.compiler.option.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu.cpp.compiler.lib.release"
+					  superClass="cdt.managedbuild.tool.testgnu.cpp.compiler">
+					  <option
+						  id="testgnu.cpp.compiler.lib.release.option.optimization.level"
+						  defaultValue="testgnu.cpp.compiler.optimization.level.most"
+						  superClass="testgnu.cpp.compiler.option.optimization.level">
+					  </option>
+					  <option
+						  id="testgnu.cpp.compiler.lib.release.option.debugging.level"
+						  defaultValue="testgnu.cpp.compiler.debugging.level.none"
+						  superClass="testgnu.cpp.compiler.option.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu.archiver.lib.release"
+					  outputs="a"
+                      outputPrefix="lib"
+				      superClass="cdt.managedbuild.tool.testgnu.archiver">
+				  </tool>
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu.assembler.lib.release"
+					  superClass="cdt.managedbuild.tool.testgnu.assembler">
+				  </tool>   
+               </toolChain>				  
+         </configuration>                  
+      </projectType>
+          
+      <projectType 
+            isTest="true"
+            name="Test Java Attributes"
+            isAbstract="false"
+            id="cdt.managedbuild.test.java.attrs">                        
+         <configuration
+			   name="The One and Only"
+			   artifactName="Testme"
+			   artifactExtension="xyz"
+			   id="cdt.managedbuild.test.java.attrs.config">
+               <toolChain
+		          id="cdt.managedbuild.test.java.attrs.toolchain"
+		          name="The Tool-Chain"
+		          isSystem="true">
+				  <tool
+					  id="cdt.managedbuild.test.java.attrs.tool"
+					  superClass="cdt.managedbuild.tool.testgnu.c.compiler"
+					  commandLineGenerator="org.eclipse.cdt.managedbuilder.core.tests.ManagedBuildCommandLineGenerator">
+				      <option
+						  id="testgnu.c.compiler.option.preprocessor.def.symbols.test"
+						  superClass="testgnu.c.compiler.option.preprocessor.def.symbols">
+						  <listOptionValue
+						  	value="foo">
+						  </listOptionValue>
+						  <listOptionValue
+						  	value="bar">
+						  </listOptionValue>
+				      </option>
+				  </tool>
+				  <builder
+				      id="cdt.managedbuild.test.java.attrs.builder"
+		              name="Test Builder"
+		              command="makeMe"
+		              arguments="-k"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.core.tests.BuildFileGenerator">
+		     	  </builder>               
+               </toolChain>                 
+         </configuration>
+      </projectType>
+   </extension>
+
+<!-- Managed Make Builder Tool Specifications - CDT 3.0 format -->
+   <extension
+         id="cdt.managed.build.test30.info"
+         name="MBS 3.0 Test definitions"
+         point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
+      <managedBuildRevision
+            fileVersion="3.0.0">
+      </managedBuildRevision>
+
+	  <!-- Test tools and project types that correspond to the Gnu tool-chain  -->
+      <tool
+            natureFilter="cnature"
+            name="MBS30.linker.gnu.c"
+            outputFlag="-o"
+            command="gcc"
+            id="cdt.managedbuild.tool.testgnu30.c.linker"
+            isSystem="true">
+         <envVarBuildPath 
+         	pathType="buildpathLibrary"
+         	variableList="LIBRARY_PATH">
+         </envVarBuildPath>
+         
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu30.c.linker"
+               name="MBS30OptCat.General"
+               id="gnu.c.link.category30.general">
+         </optionCategory>
+         <option
+               defaultValue="false"
+               name="MBS30Opt.Posix.Linker.NoStartFiles"
+               category="gnu.c.link.category30.general"
+               command="-nostartfiles"
+               id="gnu.c.link.option30.nostart"
+               tip="This space intentionally left blank"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="MBS30Opt.Posix.Linker.NoDefLibs"
+               category="gnu.c.link.category30.general"
+               command="-nodefaultlibs"
+               id="gnu.c.link.option30.nodeflibs"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="MBS30Opt.Posix.Linker.NoStdLibs"
+               category="gnu.c.link.category30.general"
+               command="-nostdlib"
+               id="gnu.c.link.option30.nostdlibs"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="MBS30Opt.Posix.Linker.Strip"
+               category="gnu.c.link.category30.general"
+               command="--strip-all"
+               id="gnu.c.link.option30.strip"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="MBS30Opt.Posix.Linker.Static"
+               category="gnu.c.link.category30.general"
+               command="-static"
+               id="gnu.c.link.option30.noshared"
+               valueType="boolean">
+         </option>
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu30.c.linker"
+               name="MBS30OptCat.Libs"
+               id="gnu.c.link.category30.libs">
+         </optionCategory>
+         <option
+               name="MBS30Opt.Posix.Libs"
+               category="gnu.c.link.category30.libs"
+               command="-l"
+               tip="Enter additional libraries for the link"
+               id="gnu.c.link.option30.libs"
+               browseType="file"
+               valueType="libs">
+         </option>
+         <option
+               name="MBS30Opt.Posix.Libsearch"
+               category="gnu.c.link.category30.libs"
+               command="-L"
+               id="gnu.c.link.option30.paths"
+               browseType="directory"
+               tip="Enter additional directories to use in searching for libraries"
+               valueType="stringList">
+         </option>
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu30.c.linker"
+               name="MBS30OptCat.Misc"
+               id="gnu.c.link.category30.other">
+         </optionCategory>
+         <option
+               name="MBS30Opt.Posix.Linker.Flags"
+               category="gnu.c.link.category30.other"
+               valueType="string"
+               id="gnu.c.link.option30.ldflags">
+         </option>
+         <option
+               name="MBS30Opt.Posix.Linker.XLinker"
+               category="gnu.c.link.category30.other"
+               command="-Xlinker ${VALUE}"
+               valueType="stringList"
+               id="gnu.c.link.option30.other">
+         </option>
+         <option
+               name="MBS30Opt.Posix.UserObjs"
+               category="gnu.c.link.category30.other"
+               browseType="file"
+               valueType="userObjs"
+               id="gnu.c.link.option30.userobjs"
+               tip="Enter additional object files for the link">
+         </option>
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu30.c.linker"
+               name="MBS30OptCat.Shared.Settings"
+               id="gnu.c.link.category30.shared">
+         </optionCategory>
+         <option
+               defaultValue="false"
+               name="MBS30Opt.Posix.Linker.Shared"
+               category="gnu.c.link.category30.shared"
+               command="-shared"
+               id="gnu.c.link.option30.shared"
+               valueType="boolean">
+         </option>
+         <option
+               name="MBS30Opt.Posix.Linker.SOName"
+               category="gnu.c.link.category30.shared"
+               command="-Wl,-soname="
+               id="gnu.c.link.option30.soname"
+               browseType="file"
+               valueType="string">
+         </option>
+         <option
+               name="MBS30Opt.Posix.Linker.Implib"
+               category="gnu.c.link.category30.shared"
+               command="-Wl,--out-implib="
+               id="gnu.c.link.option30.implname"
+               browseType="directory"
+               valueType="string">
+         </option>
+         <option
+               name="MBS30Opt.Posix.Linker.Defname"
+               category="gnu.c.link.category30.shared"
+               command="-Wl,--output-def="
+               id="gnu.c.link.option30.defname"
+               valueType="string">
+         </option>
+         <inputType
+            sources="o"
+			multipleOfType="true"
+            dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator"
+            buildVariable="OBJS"
+            id="cdt.managedbuild.tool.testgnu30.c.linker.input">
+            <additionalInput
+            	paths="$(USER_OBJS)"
+            	kind="additionalinputdependency">
+            </additionalInput>
+            <additionalInput
+            	paths="$(LIBS)"
+            	kind="additionalinput">
+            </additionalInput>
+         </inputType>
+         <outputType
+			outputs=""
+            buildVariable="EXECUTABLES"
+            nameProvider="org.eclipse.cdt.managedbuilder.core.tests.TestLinkerNameProvider"
+            id="cdt.managedbuild.tool.testgnu30.c.linker.output">
+         </outputType>
+      </tool>
+      <tool
+            natureFilter="ccnature"
+            name="MBS30.linker.gnu.cpp"
+            outputFlag="-o"
+            command="g++"
+            id="cdt.managedbuild.tool.testgnu30.cpp.linker"
+            isSystem="true">
+         <envVarBuildPath 
+         	pathType="buildpathLibrary"
+         	variableList="LIBRARY_PATH">
+         </envVarBuildPath>
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu30.cpp.linker"
+               name="MBS30OptCat.General"
+               id="gnu.cpp.link.category30.options">
+         </optionCategory>
+         <option
+               defaultValue="false"
+               name="MBS30Opt.Posix.Linker.NoStartFiles"
+               category="gnu.cpp.link.category30.options"
+               command="-nostartfiles"
+               id="gnu.cpp.link.option30.nostart"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="MBS30Opt.Posix.Linker.NoDefLibs"
+               category="gnu.cpp.link.category30.options"
+               command="-nodefaultlibs"
+               id="gnu.cpp.link.option30.nodeflibs"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="MBS30Opt.Posix.Linker.NoStdLibs"
+               category="gnu.cpp.link.category30.options"
+               command="-nostdlib"
+               id="gnu.cpp.link.option30.nostdlibs"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="MBS30Opt.Posix.Linker.Strip"
+               category="gnu.cpp.link.category30.options"
+               command="--strip-all"
+               id="gnu.cpp.link.option30.strip"
+               valueType="boolean">
+         </option>
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu30.cpp.linker"
+               name="MBS30OptCat.Libs"
+               id="gnu.cpp.link.category30.libs">
+         </optionCategory>
+         <option
+               name="MBS30Opt.Posix.Libs"
+               category="gnu.cpp.link.category30.libs"
+               command="-l"
+               id="gnu.cpp.link.option30.libs"
+               browseType="file"
+               valueType="libs">
+         </option>
+         <option
+               name="MBS30Opt.Posix.Libsearch"
+               category="gnu.cpp.link.category30.libs"
+               command="-L"
+               id="gnu.cpp.link.option30.paths"
+               browseType="directory"
+               valueType="stringList">
+         </option>
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu30.cpp.linker"
+               name="MBS30OptCat.Misc"
+               id="gnu.cpp.link.category30.other">
+         </optionCategory>
+         <option
+               name="MBS30Opt.Posix.Linker.Flags"
+               category="gnu.cpp.link.category30.other"
+               valueType="string"
+               id="gnu.cpp.link.option30.flags">
+         </option>
+         <option
+               name="MBS30Opt.Posix.Linker.XLinker"
+               category="gnu.cpp.link.category30.other"
+               command="-Xlinker ${VALUE}"
+               valueType="stringList"
+               id="gnu.cpp.link.option30.other">
+         </option>
+         <option
+               name="MBS30Opt.Posix.UserObjs"
+               category="gnu.cpp.link.category30.other"
+               browseType="file"
+               valueType="userObjs"
+               id="gnu.cpp.link.option30.userobjs">
+         </option>
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu30.cpp.linker"
+               name="MBS30OptCat.Shared.Settings"
+               id="gnu.cpp.link.category30.shared">
+         </optionCategory>
+         <option
+               defaultValue="false"
+               name="MBS30Opt.Posix.Linker.Shared"
+               category="gnu.cpp.link.category30.shared"
+               command="-shared"
+               valueType="boolean"
+               id="gnu.cpp.link.option30.shared">
+         </option>
+         <option
+               name="MBS30Opt.Posix.Linker.SOName"
+               category="gnu.cpp.link.category30.shared"
+               command="-Wl,-soname="
+               valueType="string"
+               browseType="file"
+               id="gnu.cpp.link.option30.soname">
+         </option>
+         <option
+               name="MBS30Opt.Posix.Linker.Implib"
+               category="gnu.cpp.link.category30.shared"
+               command="-Wl,--out-implib="
+               valueType="string"
+               browseType="directory"
+               id="gnu.cpp.link.option30.implname">
+         </option>
+         <option
+               name="MBS30Opt.Posix.Linker.Defname"
+               category="gnu.cpp.link.category30.shared"
+               command="-Wl,--output-def="
+               valueType="string"
+               id="gnu.cpp.link.option30.defname">
+         </option>
+         <inputType
+            sources="o"
+			multipleOfType="true"
+            dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator"
+            buildVariable="OBJS"
+            id="cdt.managedbuild.tool.testgnu30.cpp.linker.input">
+            <additionalInput
+            	paths="$(USER_OBJS)"
+            	kind="additionalinputdependency">
+            </additionalInput>
+            <additionalInput
+            	paths="$(LIBS)"
+            	kind="additionalinput">
+            </additionalInput>
+         </inputType>
+         <outputType
+			outputs=""
+            buildVariable="EXECUTABLES"
+            id="cdt.managedbuild.tool.testgnu30.cpp.linker.output">
+         </outputType>
+      </tool>
+      <tool
+            natureFilter="both"
+            isAbstract="true"
+            name="MBS30.archiver.gnu"
+            command="ar"
+            id="cdt.managedbuild.tool.testgnu30.archiver"
+            isSystem="true">
+         <optionCategory
+               owner="cdt.managedbuild.tool.testgnu30.archiver"
+               name="MBS30OptCat.General"
+               id="gnu.lib.category30.general">
+         </optionCategory>
+         <option
+               defaultValue="-r"
+               name="MBS30Opt.Posix.Archiver.Flags"
+               category="gnu.lib.category30.general"
+               valueType="string"
+               id="gnu.both.lib.option30.flags">
+         </option>
+         <inputType
+            sources="o"
+			multipleOfType="true"
+            dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator"
+            buildVariable="OBJS"
+            id="cdt.managedbuild.tool.testgnu30.archiver.input">
+            <additionalInput
+            	paths="$(USER_OBJS)"
+            	kind="additionalinputdependency">
+            </additionalInput>
+            <additionalInput
+            	paths="$(LIBS)"
+            	kind="additionalinput">
+            </additionalInput>
+         </inputType>
+         <outputType
+			outputs="a"
+            outputPrefix="lib"
+            buildVariable="ARCHIVES"
+            id="cdt.managedbuild.tool.testgnu30.archiver.output">
+         </outputType>
+      </tool>
+      
+      <tool
+		  name="MBS30.compiler.gnu.c"
+		  id="cdt.managedbuild.tool.testgnu30.c.compiler"
+		  isAbstract="true"
+		  command="gcc"
+		  natureFilter="cnature"
+		  outputFlag="-o"
+		  isSystem="true">
+         <envVarBuildPath 
+         	pathType="buildpathInclude"
+         	variableList="CPATH,C_INCLUDE_PATH">
+         </envVarBuildPath>
+		  <optionCategory
+		      owner="cdt.managedbuild.tool.testgnu30.c.compiler"
+			  name="MBS30OptCat.Preproc"
+			  id="gnu.c.compiler.category30.preprocessor">
+		  </optionCategory>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Nostdinc"
+			  category="gnu.c.compiler.category30.preprocessor"
+			  command="-nostdinc"
+			  id="gnu.c.compiler.option30.preprocessor.nostdinc"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.PreprocOnly"
+			  category="gnu.c.compiler.category30.preprocessor"
+			  command="-E"
+			  id="gnu.c.compiler.option30.preprocessor.preprocess"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu30.c.compiler"
+			  name="MBS30OptCat.Symbols"
+			  id="gnu.c.compiler.category30.symbols">
+		  </optionCategory>
+		  <option
+			  name="MBS30Opt.Posix.DefSym"
+			  category="gnu.c.compiler.category30.symbols"
+			  command="-D"
+			  id="gnu.c.compiler.option30.preprocessor.def.symbols"
+			  valueType="definedSymbols">
+		  </option>
+		  <option
+			  name="MBS30Opt.Posix.UndefSym"
+			  category="gnu.c.compiler.category30.symbols"
+			  command="-U"
+			  id="gnu.c.compiler.option30.preprocessor.undef.symbol"
+			  valueType="stringList">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu30.c.compiler"
+			  name="MBS30OptCat.Dirs"
+			  id="gnu.c.compiler.category30.dirs">
+		  </optionCategory>
+		  <option
+			  name="MBS30Opt.Posix.InclPaths"
+			  category="gnu.c.compiler.category30.dirs"
+			  command="-I"
+			  id="gnu.c.compiler.option30.include.paths"
+			  valueType="includePath"
+			  browseType="directory">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu30.c.compiler"
+			  name="MBS30OptCat.Optimize"
+			  id="gnu.c.compiler.category30.optimization">
+		  </optionCategory>
+		  <option
+			  name="MBS30Opt.Posix.OptLevel"
+			  category="gnu.c.compiler.category30.optimization"
+			  id="gnu.c.compiler.option30.optimization.level"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+		  		  name="MBS30Opt.Posix.Optimize.None"
+				  isDefault="false"
+				  command="-O0"
+				  id="gnu.c.optimization.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Optimize.Optimize"
+				  command="-O1"
+				  id="gnu.c.optimization.level.optimize">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Optimize.More"
+				  isDefault="true"
+				  command="-O2"
+				  id="gnu.c.optimization.level.more">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Optimize.Most"
+				  command="-O3"
+				  id="gnu.c.optimization.level.most">
+		  </enumeratedOptionValue>
+		  </option>
+		  <option
+			  name="MBS30Opt.Posix.Optimize.Flags"
+			  category="gnu.c.compiler.category30.optimization"
+			  id="gnu.c.compiler.option30.optimization.flags"
+			  valueType="string">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu30.c.compiler"
+			  name="MBS30OptCat.Debug"
+			  id="gnu.c.compiler.category30.debug">
+		  </optionCategory>
+		  <option
+			  name="MBS30Opt.Posix.DebugLevel"
+			  category="gnu.c.compiler.category30.debug"
+			  id="gnu.c.compiler.option30.debugging.level"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Debug.None"
+				  isDefault="false"
+				  id="gnu.c.debugging.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Debug.Min"
+				  command="-g1"
+				  id="gnu.c.debugging.level.minimal">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Debug.Def"
+				  isDefault="true"
+				  command="-g"
+				  id="gnu.c.debugging.level.default">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Debug.Max"
+				  isDefault="false"
+				  command="-g3"
+				  id="gnu.c.debugging.level.max">
+		  </enumeratedOptionValue>
+		  </option>
+		  <option
+			  name="MBS30Opt.Posix.Debug.Other"
+			  category="gnu.c.compiler.category30.debug"
+			  id="gnu.c.compiler.option30.debugging.other"
+			  valueType="string">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Debug.gprof"
+			  category="gnu.c.compiler.category30.debug"
+			  command="-pg"
+			  id="gnu.c.compiler.option30.debugging.gprof"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Debug.prof"
+			  category="gnu.c.compiler.category30.debug"
+			  command="-p"
+			  id="gnu.c.compiler.option30.debugging.prof"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu30.c.compiler"
+			  name="MBS30OptCat.Warn"
+			  id="gnu.c.compiler.category30.warnings">
+		  </optionCategory>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Warn.Syntax"
+			  category="gnu.c.compiler.category30.warnings"
+			  command="-fsyntax-only"
+			  id="gnu.c.compiler.option30.warnings.syntax"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Warn.Pedandic"
+			  category="gnu.c.compiler.category30.warnings"
+			  command="-pedantic"
+			  id="gnu.c.compiler.option30.warnings.pedantic"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Warn.PedErrors"
+			  category="gnu.c.compiler.category30.warnings"
+			  command="-pedantic-errors"
+			  id="gnu.c.compiler.option30.warnings.pedantic.error"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Warn.nowarn"
+			  category="gnu.c.compiler.category30.warnings"
+			  command="-w"
+			  id="gnu.c.compiler.option30.warnings.nowarn"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="true"
+			  name="MBS30Opt.Posix.Warn.allwarn"
+			  category="gnu.c.compiler.category30.warnings"
+			  command="-Wall"
+			  id="gnu.c.compiler.option30.warnings.allwarn"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Warn.toerrs"
+			  category="gnu.c.compiler.category30.warnings"
+			  command="-Werror"
+			  id="gnu.c.compiler.option30.warnings.toerrors"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu30.c.compiler"
+			  name="MBS30OptCat.Misc"
+			  id="gnu.c.compiler.category30.other">
+		  </optionCategory>
+		  <option
+			  defaultValue="-c -fmessage-length=0"
+			  name="MBS30Opt.OtherFlags"
+			  category="gnu.c.compiler.category30.other"
+			  id="gnu.c.compiler.option30.misc.other"
+			  valueType="string">
+		  </option>
+		  <option
+	          applicabilityCalculator="org.eclipse.cdt.managedbuilder.core.tests.AlwaysOnApplicabilityCalculator"
+			  category="gnu.c.compiler.category30.other"
+			  command="-v"
+    	      defaultValue="true"
+			  id="gnu.c.compiler.option30.misc.verbose"
+        	  name="MBS30Opt.Posix.Verbose"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Ansi"
+			  category="gnu.c.compiler.category30.other"
+			  command="-ansi"
+			  id="gnu.c.compiler.option30.misc.ansi"
+			  valueType="boolean">
+		  </option>
+		  <option
+	          applicabilityCalculator="org.eclipse.cdt.managedbuilder.core.tests.AlwaysOffApplicabilityCalculator"
+        	  defaultValue="true"
+        	  name="MBS30Opt.Posix.FakeOption"
+			  category="gnu.c.compiler.category30.other"
+    	      command="-fake"
+	          id="gnu.c.compiler.option30.misc.FakeOption"
+    	      isAbstract="false"
+   		      valueType="boolean">
+   		  </option>
+          <inputType
+		      sources="c"
+			  dependencyExtensions="h"
+			  dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator"
+              id="cdt.managedbuild.tool.testgnu30.c.compiler.input">
+          </inputType>
+          <outputType
+			  outputs="o"
+              buildVariable="OBJS"
+              id="cdt.managedbuild.tool.testgnu30.c.compiler.output">
+          </outputType>
+	  </tool>
+	  <tool
+		  name="MBS30.compiler.gnu.cpp"
+		  id="cdt.managedbuild.tool.testgnu30.cpp.compiler"
+		  isAbstract="true"
+		  command="g++"
+		  natureFilter="ccnature"
+		  outputFlag="-o"
+		  isSystem="true">
+         <envVarBuildPath 
+         	pathType="buildpathInclude"
+         	variableList="CPATH,CPLUS_INCLUDE_PATH">
+         </envVarBuildPath>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu30.cpp.compiler"
+			  name="MBS30OptCat.Preproc"
+			  id="gnu.cpp.compiler.category30.preprocessor">
+		  </optionCategory>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Nostdinc"
+			  category="gnu.cpp.compiler.category30.preprocessor"
+			  command="-nostdinc"
+			  id="gnu.cpp.compiler.option30.preprocessor.nostdinc"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.PreprocOnly"
+			  category="gnu.cpp.compiler.category30.preprocessor"
+			  command="-E"
+			  id="gnu.cpp.compiler.option30.preprocessor.preprocess"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  name="MBS30Opt.Posix.DefSym"
+			  category="gnu.cpp.compiler.category30.preprocessor"
+			  command="-D"
+			  id="gnu.cpp.compiler.option30.preprocessor.def"
+			  valueType="definedSymbols">
+		  </option>
+		  <option
+			  name="MBS30Opt.Posix.UndefSym"
+			  category="gnu.cpp.compiler.category30.preprocessor"
+			  command="-U"
+			  id="gnu.cpp.compiler.option30.preprocessor.undef"
+			  valueType="stringList">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu30.cpp.compiler"
+			  name="MBS30OptCat.Dirs"
+			  id="gnu.cpp.compiler.category30.dirs">
+		  </optionCategory>
+		  <option
+			  name="MBS30Opt.Posix.InclPaths"
+			  category="gnu.cpp.compiler.category30.dirs"
+			  command="-I"
+			  id="gnu.cpp.compiler.option30.include.paths"
+			  valueType="includePath"
+			  browseType="directory">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu30.cpp.compiler"
+			  name="MBS30OptCat.Optimize"
+			  id="gnu.cpp.compiler.category30.optimization">
+		  </optionCategory>
+		  <option
+			  name="MBS30Opt.Posix.OptLevel"
+			  category="gnu.cpp.compiler.category30.optimization"
+			  id="gnu.cpp.compiler.option30.optimization.level"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Optimize.None"
+				  command="-O0"
+				  id="gnu.cpp.compiler.optimization.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Optimize.Optimize"
+				  command="-O1"
+				  id="gnu.cpp.compiler.optimization.level.optimize">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Optimize.More"
+				  isDefault="true"
+				  command="-O2"
+				  id="gnu.cpp.compiler.optimization.level.more">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Optimize.Most"
+				  command="-O3"
+				  id="gnu.cpp.compiler.optimization.level.most">
+		  </enumeratedOptionValue>
+		  </option>
+		  <option
+			  name="MBS30Opt.Posix.Optimize.Flags"
+			  category="gnu.cpp.compiler.category30.optimization"
+			  id="gnu.cpp.compiler.option30.optimization.flags"
+			  valueType="string">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu30.cpp.compiler"
+			  name="MBS30OptCat.Debug"
+			  id="gnu.cpp.compiler.category30.debug">
+		  </optionCategory>
+		  <option
+			  name="MBS30Opt.Posix.DebugLevel"
+			  category="gnu.cpp.compiler.category30.debug"
+			  id="gnu.cpp.compiler.option30.debugging.level"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Debug.None"
+				  isDefault="false"
+				  id="gnu.cpp.compiler.debugging.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Debug.Min"
+				  command="-g1"
+				  id="gnu.cpp.compiler.debugging.level.minimal">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Debug.Def"
+				  isDefault="true"
+				  command="-g"
+				  id="gnu.cpp.compiler.debugging.level.default">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="MBS30Opt.Posix.Debug.Max"
+				  isDefault="false"
+				  command="-g3"
+				  id="gnu.cpp.compiler.debugging.level.max">
+		  </enumeratedOptionValue>
+		  </option>
+		  <option
+			  name="MBS30Opt.Posix.Debug.Other"
+			  category="gnu.cpp.compiler.category30.debug"
+			  id="gnu.cpp.compiler.option30.debugging.other"
+			  valueType="string">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Debug.prof"
+			  category="gnu.cpp.compiler.category30.debug"
+			  command="-p"
+			  id="gnu.cpp.compiler.option30.debugging.prof"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Debug.gprof"
+			  category="gnu.cpp.compiler.category30.debug"
+			  command="-pg"
+			  id="gnu.cpp.compiler.option30.debugging.gprof"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu30.cpp.compiler"
+			  name="MBS30OptCat.Warn"
+			  id="gnu.cpp.compiler.category30.warnings">
+		  </optionCategory>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Warn.Syntax"
+			  category="gnu.cpp.compiler.category30.warnings"
+			  command="-fsyntax-only"
+			  id="gnu.cpp.compiler.option30.warnings.syntax"
+			  valueType="boolean">
+		   </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Warn.Pedandic"
+			  category="gnu.cpp.compiler.category30.warnings"
+			  command="-pedantic"
+			  id="gnu.cpp.compiler.option30.warnings.pedantic"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Warn.PedErrors"
+			  category="gnu.cpp.compiler.category30.warnings"
+			  command="-pedantic-errors"
+			  id="gnu.cpp.compiler.option30.warnings.pedantic.error"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Warn.nowarn"
+			  category="gnu.cpp.compiler.category30.warnings"
+			  command="-w"
+			  id="gnu.cpp.compiler.option30.warnings.nowarn"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="true"
+			  name="MBS30Opt.Posix.Warn.allwarn"
+			  category="gnu.cpp.compiler.category30.warnings"
+			  command="-Wall"
+			  id="gnu.cpp.compiler.option30.warnings.allwarn"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Warn.toerrs"
+			  category="gnu.cpp.compiler.category30.warnings"
+			  command="-Werror"
+			  id="gnu.cpp.compiler.option30.warnings.toerrors"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="cdt.managedbuild.tool.testgnu30.cpp.compiler"
+			  name="MBS30OptCat.Misc"
+			  id="gnu.cpp.compiler.category30.other">
+		  </optionCategory>
+		  <option
+			  defaultValue="-c -fmessage-length=0"
+			  name="MBS30Opt.OtherFlags"
+			  category="gnu.cpp.compiler.category30.other"
+			  id="gnu.cpp.compiler.option30.other.other"
+			  valueType="string">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="MBS30Opt.Posix.Verbose"
+			  category="gnu.cpp.compiler.category30.other"
+			  command="-v"
+			  id="gnu.cpp.compiler.option30.other.verbose"
+			  valueType="boolean">
+		  </option>
+          <inputType
+			  sources="c,C,cc,cxx,cpp"
+			  dependencyExtensions="h,H,hpp"
+			  dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator"
+              id="cdt.managedbuild.tool.testgnu30.cpp.compiler.input">
+          </inputType>
+          <outputType
+			  outputs="o"
+              buildVariable="OBJS"
+              id="cdt.managedbuild.tool.testgnu30.cpp.compiler.output">
+          </outputType>
+	  </tool>
+        
+      <projectType      
+            isAbstract="false"     
+            isTest="true"
+            name="MBS30TargetName.gnu.exe"
+            id="cdt.managedbuild.target.gnu30.exe">
+         <configuration
+               name="MBS30ConfigName.Dbg"
+               id="cdt.managedbuild.config.testgnu30.exe.debug"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">
+               <toolChain
+                     archList="all"
+                     osList="solaris,linux,hpux,aix,qnx"
+                     name="MBS30ToolChainName.Dbg"
+                     targetTool="cdt.managedbuild.tool.testgnu30.c.linker.exe.debug;cdt.managedbuild.tool.testgnu30.cpp.linker.exe.debug"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                     id="cdt.managedbuild.toolchain.testgnu30.exe.debug"
+                     isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testgnu30.platform.exe.debug"
+		              name="MBS30PlatformName.Dbg"
+		              binaryParser="org.eclipse.cdt.core.ELF"
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+	              </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testgnu30.builder.exe.debug"
+		              name="MBS30BuilderName.Dbg"
+		              command="make"
+		              arguments="-k"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+		     	  </builder>               
+                  <tool
+                      id="cdt.managedbuild.tool.testgnu30.c.compiler.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu30.c.compiler">                          
+			  	      <option
+					      id="gnu.c.compiler.exe.debug.option30.optimization.level"
+						  defaultValue="gnu.c.optimization.level.none"
+						  superClass="gnu.c.compiler.option30.optimization.level">
+					  </option>
+					  <option   
+					      id="gnu.c.compiler.exe.debug.option30.debugging.level"					     
+						  defaultValue="gnu.c.debugging.level.max"
+					      superClass="gnu.c.compiler.option30.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+                      id="cdt.managedbuild.tool.testgnu30.cpp.compiler.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu30.cpp.compiler">                         
+                      <option
+				          id="gnu.cpp.compiler.exe.debug.option30.optimization.level"
+                          defaultValue="gnu.cpp.compiler.optimization.level.none"
+                          superClass="gnu.cpp.compiler.option30.optimization.level">
+                      </option>
+                      <option
+						  id="gnu.cpp.compiler.exe.debug.option30.debugging.level"
+                          defaultValue="gnu.cpp.compiler.debugging.level.max"
+                          superClass="gnu.cpp.compiler.option30.debugging.level">
+                      </option>
+                  </tool>
+                  <tool
+                      id="cdt.managedbuild.tool.testgnu30.c.linker.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu30.c.linker">
+                  </tool> 
+                  <tool
+                      id="cdt.managedbuild.tool.testgnu30.cpp.linker.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu30.cpp.linker">
+                  </tool> 
+			  </toolChain>
+         </configuration>
+         <configuration
+               name="MBS30ConfigName.Rel"
+               id="cdt.managedbuild.config.testgnu30.exe.release"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">               
+               <toolChain
+                     archList="all"
+                     osList="solaris,linux,hpux,aix,qnx"
+                     name="MBS30ToolChainName.Rel"
+                     targetTool="cdt.managedbuild.tool.testgnu30.c.linker.exe.release;cdt.managedbuild.tool.testgnu30.cpp.linker.exe.release"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                     id="cdt.managedbuild.toolchain.testgnu30.exe.release"
+                     isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testgnu30.platform.exe.release"
+		              name="MBS30PlatformName.Rel"		             
+		              binaryParser="org.eclipse.cdt.core.ELF"
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">		              
+		          </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testgnu30.builder.exe.release"
+		              name="MBS30BuilderName.Rel"		              
+		              command="make"
+		              arguments="-k"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+				  </builder> 
+                  <tool
+                      id="cdt.managedbuild.tool.testgnu30.c.compiler.exe.release"
+                      superClass="cdt.managedbuild.tool.testgnu30.c.compiler">                          
+					  <option
+						  id="gnu.c.compiler.exe.release.option30.optimization.level"
+						  defaultValue="gnu.c.optimization.level.most"
+						  superClass="gnu.c.compiler.option30.optimization.level">
+					  </option>
+					  <option
+						  id="gnu.c.compiler.exe.release.option30.debugging.level"
+						  defaultValue="gnu.c.debugging.level.none"
+						  superClass="gnu.c.compiler.option30.debugging.level">
+					  </option>
+                  </tool>
+                  <tool
+                      id="cdt.managedbuild.tool.testgnu30.cpp.compiler.exe.release"
+                      superClass="cdt.managedbuild.tool.testgnu30.cpp.compiler">                     
+					  <option
+						  id="gnu.cpp.compiler.exe.release.option30.optimization.level"
+						  defaultValue="gnu.cpp.compiler.optimization.level.most"
+						  superClass="gnu.cpp.compiler.option30.optimization.level">
+					  </option>
+					  <option
+						  id="gnu.cpp.compiler.exe.release.option30.debugging.level"
+						  defaultValue="gnu.cpp.compiler.debugging.level.none"
+						  superClass="gnu.cpp.compiler.option30.debugging.level">
+					  </option>
+                  </tool>
+                  <tool
+                      id="cdt.managedbuild.tool.testgnu30.c.linker.exe.release"
+                      superClass="cdt.managedbuild.tool.testgnu30.c.linker">
+                  </tool> 
+                  <tool
+                      id="cdt.managedbuild.tool.testgnu30.cpp.linker.exe.release"
+                      superClass="cdt.managedbuild.tool.testgnu30.cpp.linker">
+                  </tool>  
+               </toolChain>
+         </configuration>
+      </projectType>     
+      
+      <projectType      
+            isAbstract="false"     
+            isTest="true"
+            name="MBS30TargetName.gnu.so"
+            id="cdt.managedbuild.target.gnu30.so">
+         <configuration
+               name="MBS30ConfigName.Dbg"
+               cleanCommand="rm -rf"
+               artifactExtension="so"               
+               errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"                          
+               id="cdt.managedbuild.config.testgnu30.so.debug">
+               <toolChain
+                     archList="all"
+                     osList="solaris,linux,hpux,aix,qnx"
+                     name="MBS30ToolChainName.Dbg"
+                     targetTool="cdt.managedbuild.tool.testgnu30.c.linker.so.debug;cdt.managedbuild.tool.testgnu30.cpp.linker.so.debug"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                     id="cdt.managedbuild.toolchain.testgnu30.so.debug"
+                     isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testgnu30.platform.so.debug"
+		              name="MBS30PlatformName.Dbg"
+		              binaryParser="org.eclipse.cdt.core.ELF"		            
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+		          </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testgnu30.builder.so.debug"
+		              name="MBS30BuilderName.Dbg"
+		              command="make"
+		              arguments="-k"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">		              
+				  </builder>               		         
+				  <tool
+				      id="cdt.managedbuild.tool.testgnu30.c.compiler.so.debug"
+					  superClass="cdt.managedbuild.tool.testgnu30.c.compiler">
+					  <option
+						  id="gnu.c.compiler.so.debug.option30.optimization.level"
+						  defaultValue="gnu.c.optimization.level.none"
+						  superClass="gnu.c.compiler.option30.optimization.level">
+					  </option>
+					  <option
+					      id="gnu.c.compiler.so.debug.option30.debugging.level"
+						  defaultValue="gnu.c.debugging.level.max"
+						  superClass="gnu.c.compiler.option30.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+				      id="cdt.managedbuild.tool.testgnu30.cpp.compiler.so.debug"
+					  superClass="cdt.managedbuild.tool.testgnu30.cpp.compiler">
+					  <option
+					      id="gnu.cpp.compiler.so.debug.option30.optimization.level"
+						  defaultValue="gnu.cpp.compiler.optimization.level.none"
+						  superClass="gnu.cpp.compiler.option30.optimization.level">
+					  </option>
+					  <option
+					      id="gnu.cpp.compiler.so.debug.option30.debugging.level"
+						  defaultValue="gnu.cpp.compiler.debugging.level.max"
+						  superClass="gnu.cpp.compiler.option30.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+				      id="cdt.managedbuild.tool.testgnu30.c.linker.so.debug"
+					  superClass="cdt.managedbuild.tool.testgnu30.c.linker">
+					  <option
+						  id="gnu.c.link.so.debug.option30.shared"
+						  defaultValue="true"
+						  superClass="gnu.c.link.option30.shared">
+					  </option>
+			          <outputType
+						  outputs="so"
+						  outputPrefix="lib"
+			              buildVariable="LIBRARIES"
+			              superClass="cdt.managedbuild.tool.testgnu30.c.linker.output"
+			              id="cdt.managedbuild.tool.testgnu30.c.linker.so.debug.output">
+			          </outputType>
+				  </tool>
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu30.cpp.linker.so.debug"
+					  superClass="cdt.managedbuild.tool.testgnu30.cpp.linker">
+					  <option
+						  id="gnu.cpp.link.so.debug.option30.shared"
+						  defaultValue="true"
+						  superClass="gnu.cpp.link.option30.shared">
+					  </option>
+			          <outputType
+						  outputs="so"
+						  outputPrefix="lib"
+			              buildVariable="LIBRARIES"
+			              superClass="cdt.managedbuild.tool.testgnu30.cpp.linker.output"
+			              id="cdt.managedbuild.tool.testgnu30.cpp.linker.so.debug.output">
+			          </outputType>
+				  </tool>
+			   </toolChain>
+         </configuration>
+         <configuration
+               name="MBS30ConfigName.Rel"
+               cleanCommand="rm -rf"
+               artifactExtension="so"
+               errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"
+               id="cdt.managedbuild.config.testgnu30.so.release">
+               <toolChain
+                     archList="all"
+                     osList="solaris,linux,hpux,aix,qnx"
+                     name="MBS30ToolChainName.Rel"
+                     targetTool="cdt.managedbuild.tool.testgnu30.c.linker.so.release;cdt.managedbuild.tool.testgnu30.cpp.linker.so.release"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                     id="cdt.managedbuild.toolchain.testgnu30.so.release"
+                     isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testgnu30.platform.so.release"
+		              name="MBS30PlatformName.Rel"
+		              binaryParser="org.eclipse.cdt.core.ELF"		            
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+		          </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testgnu30.builder.so.release"
+		              name="MBS30BuilderName.Rel"
+		              command="make"
+		              arguments="-k"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">		              
+				  </builder>               
+				  <tool				     
+				      id="cdt.managedbuild.tool.testgnu30.c.compiler.so.release"
+					  superClass="cdt.managedbuild.tool.testgnu30.c.compiler">
+				      <option
+				          id="gnu.c.compiler.so.release.option30.optimization.level"
+						  defaultValue="gnu.c.optimization.level.most"
+						  superClass="gnu.c.compiler.option30.optimization.level">
+				      </option>
+				      <option
+				          id="gnu.c.compiler.so.release.option30.debugging.level"
+						  defaultValue="gnu.c.debugging.level.none"
+						  superClass="gnu.c.compiler.option30.debugging.level">
+				      </option>
+				  </tool>
+				  <tool
+				      id="cdt.managedbuild.tool.testgnu30.cpp.compiler.so.release"
+					  superClass="cdt.managedbuild.tool.testgnu30.cpp.compiler">
+				      <option
+				          id="gnu.cpp.compiler.so.release.option30.optimization.level"
+						  defaultValue="gnu.cpp.compiler.optimization.level.most"
+						  superClass="gnu.cpp.compiler.option30.optimization.level">
+				      </option>
+				      <option
+				          id="gnu.cpp.compiler.so.release.option30.debugging.level"
+						  defaultValue="gnu.cpp.compiler.debugging.level.none"
+						  superClass="gnu.cpp.compiler.option30.debugging.level">
+				      </option>
+				  </tool>				
+				  <tool
+				      id="cdt.managedbuild.tool.testgnu30.c.linker.so.release"
+					  superClass="cdt.managedbuild.tool.testgnu30.c.linker">
+					  <option
+						  id="gnu.c.link.so.release.option30.shared"
+						  defaultValue="true"
+						  superClass="gnu.c.link.option30.shared">
+					  </option>
+			          <outputType
+						  outputs="so"
+						  outputPrefix="lib"
+			              buildVariable="LIBRARIES"
+			              superClass="cdt.managedbuild.tool.testgnu30.c.linker.output"
+			              id="cdt.managedbuild.tool.testgnu30.c.linker.so.release.output">
+			          </outputType>
+				  </tool>
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu30.cpp.linker.so.release"
+					  superClass="cdt.managedbuild.tool.testgnu30.cpp.linker">
+					  <option
+						  id="gnu.cpp.link.so.release.option30.shared"
+						  defaultValue="true"
+						  superClass="gnu.cpp.link.option30.shared">
+					  </option>
+			          <outputType
+						  outputs="so"
+						  outputPrefix="lib"
+			              buildVariable="LIBRARIES"
+			              superClass="cdt.managedbuild.tool.testgnu30.cpp.linker.output"
+			              id="cdt.managedbuild.tool.testgnu30.cpp.linker.so.release.output">
+			          </outputType>
+				  </tool>
+			   </toolChain>  
+         </configuration>         
+      </projectType>
+          
+      <projectType 
+            isTest="true"
+            name="MBS30TargetName.gnu.lib"
+            isAbstract="false"
+            id="cdt.managedbuild.target.gnu30.lib">                        
+         <configuration
+			   name="MBS30ConfigName.Dbg"
+			   artifactExtension="a"
+			   cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"
+			   id="cdt.managedbuild.config.testgnu30.lib.debug">
+               <toolChain
+                     archList="all"
+                     osList="solaris,linux,hpux,aix,qnx"
+                     name="MBS30ToolChainName.Dbg"
+                     targetTool="cdt.managedbuild.tool.testgnu30.archiver.lib.debug"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                     id="cdt.managedbuild.toolchain.testgnu30.lib.debug"
+                     isSystem="true">
+				  <targetPlatform
+					  id="cdt.managedbuild.target.testgnu30.platform.lib.debug"
+				 	  name="MBS30PlatformName.Dbg"
+					  binaryParser="org.eclipse.cdt.core.ELF"		            
+					  osList="solaris,linux,hpux,aix,qnx"
+					  archList="all">
+				  </targetPlatform>
+			  	  <builder
+					  id="cdt.managedbuild.target.testgnu30.builder.lib.debug"
+					  name="MBS30BuilderName.Dbg"
+					  command="make"
+					  arguments="-k"
+					  buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">		              
+			      </builder>               		         
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu30.c.compiler.lib.debug"
+					  superClass="cdt.managedbuild.tool.testgnu30.c.compiler">
+				      <option
+					      id="gnu.c.compiler.lib.debug.option30.optimization.level"
+						  defaultValue="gnu.c.optimization.level.none"
+						  superClass="gnu.c.compiler.option30.optimization.level">
+				      </option>
+				      <option
+						  id="gnu.c.compiler.lib.debug.option30.debugging.level"						
+						  defaultValue="gnu.c.debugging.level.max"
+						  superClass="gnu.c.compiler.option30.debugging.level">
+				      </option>
+				  </tool>
+                  <tool
+					  id="cdt.managedbuild.tool.testgnu30.cpp.compiler.lib.debug"
+                      superClass="cdt.managedbuild.tool.testgnu30.cpp.compiler">
+					  <option
+					      id="gnu.cpp.compiler.lib.debug.option30.optimization.level"
+					      defaultValue="gnu.cpp.compiler.optimization.level.none"
+					      superClass="gnu.cpp.compiler.option30.optimization.level">
+					  </option>
+					  <option
+					      id="gnu.cpp.compiler.lib.debug.option30.debugging.level"
+					      defaultValue="gnu.cpp.compiler.debugging.level.max"
+					      superClass="gnu.cpp.compiler.option30.debugging.level">
+					  </option>
+                  </tool>
+			      <tool
+		    		  id="cdt.managedbuild.tool.testgnu30.archiver.lib.debug"
+			          superClass="cdt.managedbuild.tool.testgnu30.archiver">
+				  </tool>                 
+               </toolChain>                 
+         </configuration>
+         <configuration
+               name="MBS30ConfigName.Rel"
+               artifactExtension="a"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"
+               id="cdt.managedbuild.config.testgnu30.lib.release">
+               <toolChain
+                     archList="all"
+                     osList="solaris,linux,hpux,aix,qnx"
+                     name="MBS30ToolChainName.Rel"
+                     targetTool="cdt.managedbuild.tool.testgnu30.archiver.lib.release"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                     id="cdt.managedbuild.toolchain.testgnu30.lib.release"
+                     isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testgnu30.platform.lib.release"
+		              name="MBS30PlatformName.Rel"
+		              binaryParser="org.eclipse.cdt.core.ELF"		            
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+		          </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testgnu30.builder.lib.release"
+		              name="MBS30BuilderName.Rel"
+		              command="make"
+		              arguments="-k"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">		              
+				  </builder>               		            
+		          <tool
+					  id="cdt.managedbuild.tool.testgnu30.c.compiler.lib.release"
+					  superClass="cdt.managedbuild.tool.testgnu30.c.compiler">
+					  <option
+						  id="gnu.c.compiler.lib.release.option30.optimization.level"
+						  defaultValue="gnu.c.optimization.level.most"
+						  superClass="gnu.c.compiler.option30.optimization.level">
+					  </option>
+					  <option
+						  id="gnu.c.compiler.lib.release.option30.debugging.level"
+					      defaultValue="gnu.c.debugging.level.none"
+					      superClass="gnu.c.compiler.option30.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu30.cpp.compiler.lib.release"
+					  superClass="cdt.managedbuild.tool.testgnu30.cpp.compiler">
+					  <option
+						  id="gnu.cpp.compiler.lib.release.option30.optimization.level"
+						  defaultValue="gnu.cpp.compiler.optimization.level.most"
+						  superClass="gnu.cpp.compiler.option30.optimization.level">
+					  </option>
+					  <option
+						  id="gnu.cpp.compiler.lib.release.option30.debugging.level"
+						  defaultValue="gnu.cpp.compiler.debugging.level.none"
+						  superClass="gnu.cpp.compiler.option30.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+					  id="cdt.managedbuild.tool.testgnu30.archiver.lib.release"
+				      superClass="cdt.managedbuild.tool.testgnu30.archiver">
+				  </tool>
+               </toolChain>				  
+         </configuration>                  
+      </projectType>
+      
+	  <!-- Test tools and project types for initial and final copy steps -->
+      <tool
+      		name="Copy tool"
+      		command="cp"
+      		commandLinePattern="${COMMAND} ${INPUTS} ${OUTPUT}"
+      		id="cdt.managedbuild.tool30.copy.x.c"
+      		isSystem="true">
+         <inputType
+            id="cdt.managedbuild.tool30.copy.x.c.inputs"
+            sources="x">
+         </inputType>
+         <outputType
+            id="cdt.managedbuild.tool30.copy.x.c.output"
+			outputs="c"
+			buildVariable="CS">
+         </outputType>
+      </tool>   
+      <tool
+      		name="Deploy tool"
+      		command="cp"
+      		commandLinePattern="${COMMAND} ${INPUTS} ${OUTPUT}"
+      		id="cdt.managedbuild.tool30.deploy.x.c"
+      		isSystem="true">
+         <inputType
+            id="cdt.managedbuild.tool30.deploy.x.c.inputs"
+            buildVariable="EXECUTABLES"
+            sources="foo">
+         </inputType>
+         <outputType
+            id="cdt.managedbuild.tool30.deploy.x.c.output"
+			outputs="exe"
+			buildVariable="FINAL">
+         </outputType>
+      </tool>   
+      
+      <projectType      
+            isAbstract="false"     
+            isTest="true"
+            name="Testprepost30.gnu.exe"
+            id="cdt.managedbuild.Testprepost30.gnu.exe">
+         <configuration
+               name="Dbg"
+               id="cdt.managedbuild.config.Testprepost30.gnu.exe.debug"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">
+               <toolChain
+                      archList="all"
+                      osList="solaris,linux,hpux,aix,qnx"
+                      name="ToolChainDbg"
+                      scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                      targetTool="foo.bar;cdt.managedbuild.tool30.deploy.x.c.1"
+                      id="cdt.managedbuild.Testprepost30.gnu.toolchain.exe.debug"
+                      isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.Testprepost30.gnu.platform.exe.debug"
+		              name="PlatformDbg"
+		              binaryParser="org.eclipse.cdt.core.ELF"
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+	              </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.Testprepost30.gnu.builder.exe.debug"
+		              name="BuilderDbg"
+		              command="make"
+		              arguments="-k"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+		     	  </builder>               
+                  <tool
+                      id="cdt.managedbuild.tool.Testprepost30.gnu.c.compiler.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu30.c.compiler">                         
+			  	      <option
+					      id="gnu.c.compiler.Testprepost30.exe.debug.option.optimization.level"
+						  defaultValue="gnu.c.optimization.level.none"
+						  superClass="gnu.c.compiler.option30.optimization.level">
+					  </option>
+					  <option   
+					      id="gnu.c.compiler.Testprepost30.exe.debug.option.debugging.level"					     
+						  defaultValue="gnu.c.debugging.level.max"
+					      superClass="gnu.c.compiler.option30.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+                      id="cdt.managedbuild.tool.Testprepost30.gnu.cpp.compiler.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu30.cpp.compiler">                         
+                      <option
+				          id="gnu.cpp.compiler.Testprepost30.exe.debug.option.optimization.level"
+                          defaultValue="gnu.cpp.compiler.optimization.level.none"
+                          superClass="gnu.cpp.compiler.option30.optimization.level">
+                      </option>
+                      <option
+						  id="gnu.cpp.compiler.Testprepost30.exe.debug.option.debugging.level"
+                          defaultValue="gnu.cpp.compiler.debugging.level.max"
+                          superClass="gnu.cpp.compiler.option30.debugging.level">
+                      </option>
+                  </tool>
+                  <tool
+                      id="cdt.managedbuild.tool.Testprepost30.gnu.c.linker.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu30.c.linker">
+			         <outputType
+	                    id="cdt.managedbuild.tool.Testprepost30.gnu.c.linker.exe.debug.output"
+			            superClass="cdt.managedbuild.tool.testgnu30.c.linker.output"
+						outputs="foo">
+			         </outputType>
+                  </tool> 
+                  <tool
+                      id="cdt.managedbuild.tool.Testprepost30.gnu.cpp.linker.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu30.cpp.linker">
+                  </tool> 
+				  <tool
+					  id="cdt.managedbuild.tool30.copy.x.c.1"
+					  superClass="cdt.managedbuild.tool30.copy.x.c">
+				  </tool>   
+				  <tool
+					  id="cdt.managedbuild.tool30.deploy.x.c.1"
+					  superClass="cdt.managedbuild.tool30.deploy.x.c">
+				  </tool>   
+			  </toolChain>
+         </configuration>
+      </projectType>     
+      
+	  <!-- Test tools and project types for a more complicated tool-chain, using
+	       tar -xf, gcc, strip, linker, cjpeg, copy -->
+      
+      <projectType      
+            isAbstract="false"     
+            isTest="true"
+            name="test30_1"
+            id="test30_1.gnu.so">
+         <configuration
+               name="TheConfig"
+               id="test30_1.gnu.so.config"
+               artifactExtension="so.4.5.6"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser">
+               <toolChain
+                      archList="all"
+                      osList="all"
+                      name="ToolChain for test30_1"
+                      scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                      targetTool="test30_1.gnu.so.deploy"
+                      secondaryOutputs="test30_1.gnu.so.cjpeg.output"
+                      id="test30_1.gnu.so.toolchain"
+                      isSystem="true">
+		          <targetPlatform
+		              id="test30_1.gnu.so.platform"
+		              name="Platform for test30_1"
+		              binaryParser="org.eclipse.cdt.core.ELF">
+	              </targetPlatform>
+				  <builder
+		              id="test30_1.gnu.so.builder"
+		              name="Builder for test30_1"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+		     	  </builder>               
+                  <tool
+                      id="test30_1.gnu.so.c.compiler"
+                      superClass="cdt.managedbuild.tool.testgnu30.c.compiler">
+			          <outputType
+						  outputs="oprestripped"
+	                      id="test30_1.gnu.so.c.compiler.output"
+			              superClass="cdt.managedbuild.tool.testgnu30.c.compiler.output">
+			          </outputType>
+				  </tool>
+                  <tool
+                      id="test30_1.gnu.so.c.linker"
+                      superClass="cdt.managedbuild.tool.testgnu30.c.linker">
+			         <option
+			               defaultValue="true"
+			               id="test30_1.gnu.c.link.option30.shared"
+			               superClass="gnu.c.link.option30.shared">
+			         </option>
+			         <inputType
+			            buildVariable="STRIPPEDOBJS"
+			            id="test30_1.gnu.so.c.linker.input"
+			            superClass="cdt.managedbuild.tool.testgnu30.c.linker.input">
+			         </inputType>
+                  </tool> 
+			      <tool
+			      		name="Un-tar"
+			      		command="tar"
+			      		commandLinePattern="${COMMAND} ${FLAGS} ${INPUTS}"
+			      		id="test30_1.gnu.so.tar">
+					 <optionCategory
+						  name="Misc"
+						  id="test30_1.gnu.so.tar.category.misc">
+					 </optionCategory>
+					 <option
+						  defaultValue="-xf"
+						  name="All Flags"
+						  category="test30_1.gnu.so.tar.category.misc"
+						  id="test30_1.gnu.so.tar.misc.other"
+						  valueType="string">
+					 </option>
+			         <inputType
+			            id="test30_1.gnu.so.tar.input"
+			            sources="tar">
+			         </inputType>
+			         <outputType
+			            id="test30_1.gnu.so.tar.outputc"
+			            multipleOfType="true"
+						outputNames="f1.c;f2.c">
+			         </outputType>
+			         <outputType
+			            id="test30_1.gnu.so.tar.outputh"
+						outputNames="test_ar.h">
+			         </outputType>
+			         <outputType
+			            id="test30_1.gnu.so.tar.outputbmp"
+						outputNames="CDT.bmp">
+			         </outputType>
+			      </tool>   
+			      <tool
+			      		name="Strip object file"
+			      		command="strip"
+			            outputFlag="-o"
+			            commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}"
+			      		id="test30_1.gnu.so.strip">
+					 <optionCategory
+						  name="Misc"
+						  id="test30_1.gnu.so.strip.category.misc">
+					 </optionCategory>
+					 <option
+						  defaultValue="--preserve-dates"
+						  name="All Flags"
+						  category="test30_1.gnu.so.strip.category.misc"
+						  id="test30_1.gnu.so.strip.misc.other"
+						  valueType="string">
+					 </option>
+					 <!--  The following buildVariable should be ignored because a pattern rule is generated -->
+			         <inputType
+			            id="test30_1.gnu.so.strip.input"
+			            buildVariable="OBJS"
+			            sources="oprestripped">
+			         </inputType>
+			         <outputType
+			            id="test30_1.gnu.so.strip.output"
+			            buildVariable="STRIPPEDOBJS"
+			            namePattern="%.o"
+			            outputs="o">
+			         </outputType>
+			      </tool>   
+			      <tool
+			      		name="Convert to jpeg"
+			      		command="cjpeg"
+			            outputFlag="-outfile"
+			            commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}"
+			      		id="test30_1.gnu.so.cjpeg">
+					 <optionCategory
+						  name="Misc"
+						  id="test30_1.gnu.so.cjpeg.category.misc">
+					 </optionCategory>
+					 <option
+						  name="All Flags"
+						  category="test30_1.gnu.so.cjpeg.category.misc"
+						  id="test30_1.gnu.so.cjpeg.misc.other"
+						  valueType="string">
+					 </option>
+			         <inputType
+			            id="test30_1.gnu.so.cjpeg.input"
+			            sources="bmp">
+			         </inputType>
+			         <outputType
+			            id="test30_1.gnu.so.cjpeg.output"
+			            primaryInputType="test30_1.gnu.so.cjpeg.input"
+			            outputs="jpeg">
+			         </outputType>
+			      </tool>   
+				  <tool
+					 id="test30_1.gnu.so.deploy"
+					 superClass="cdt.managedbuild.tool30.deploy.x.c">
+					 <inputType
+						 id="test30_1.gnu.so.deploy.input"
+						 sources="so.1.2.3">
+			         </inputType>
+			         <outputType
+						 id="test30_1.gnu.so.deploy.output"
+						 outputs="so.4.5.6">
+			         </outputType>
+				  </tool>   
+			  </toolChain>
+         </configuration>
+      </projectType>      
+                 
+      <toolChain
+            archList="all"
+            id="test30_sto.dummy.toolchain.parent"
+            isAbstract="true"
+            name="test30_sto ToolChain.Parent"
+            osList="all"
+            isSystem="true">   
+         <optionCategory
+               id="test30_sto.dummy.category.5"
+               name="Category.Top.5.NoIcon"/>
+         <optionCategory
+               icon="icons/two.gif"
+               id="test30_sto.dummy.category.6"
+               name="Category.Top.6.Icon2"/>
+            <option
+                  category="test30_sto.dummy.category.5"
+                  id="test30_sto.dummy.option.parent.5.1"
+                  isAbstract="true"
+                  name="Option5.1.Handler.Parent"
+                  valueHandler="org.eclipse.cdt.managedbuilder.core.tests.TestValueHandler"
+                  valueHandlerExtraArgument="Option5.1"
+                  valueType="boolean"/>
+         <tool
+               icon="icons/one.gif"
+               id="test30_sto.dummy.tool.parent.1"
+               isAbstract="true"
+               name="test30_sto Tool1.Parent"/>
+         <tool
+               id="test30_sto.dummy.tool.parent.2"
+               isAbstract="true"
+               name="test30_sto Tool2.Parent">
+            <option
+                  id="test30_sto.dummy.option.parent.2.1.1"
+                  isAbstract="true"
+                  name="Option2.1.1.Handler.Parent"
+                  valueHandler="org.eclipse.cdt.managedbuilder.core.tests.TestValueHandler"
+                  valueHandlerExtraArgument="Option2.1.1"
+                  valueType="string"/>
+         </tool>
+         <tool
+               id="test30_sto.dummy.tool.parent.3"
+               isAbstract="true"
+               name="test30_sto Tool3.Parent">
+            <optionCategory
+                  icon="icons/one.gif"
+                  id="test30_sto.dummy.category.parent.3.1"
+                  name="Category.Tool3.1.Icon1"
+                  owner="test30_sto.dummy.tool.parent.3"/>
+            <option
+                  category="test30_sto.dummy.category.parent.3.1"
+                  id="test30_sto.dummy.option.parent.3.1.1"
+                  isAbstract="true"
+                  name="Option3.1.1.NoHandler.Parent"/>
+            <option
+                  category="test30_sto.dummy.category.parent.3.1"
+                  id="test30_sto.dummy.option.parent.3.1.2"
+                  isAbstract="true"
+                  name="Option3.1.2.Handler.Parent"
+                  valueHandler="org.eclipse.cdt.managedbuilder.core.tests.TestValueHandler"
+                  valueHandlerExtraArgument="Option3.1.2"/>
+         </tool>
+      </toolChain>
+      <projectType
+            id="test30_sto.dummy"
+            isAbstract="false"
+            isTest="true"
+            name="test30_sto">
+         <configuration
+               id="test30_sto.dummy.config"
+               name="Configuration for test30_sto">
+            <toolChain
+                  id="test30_sto.dummy.toolchain"
+                  isAbstract="false"
+                  name="Toolchain for test30_sto"
+                  superClass="test30_sto.dummy.toolchain.parent"
+                  isSystem="true">
+               <targetPlatform
+                     archList="all"
+                     id="test30_sto.dummy.platform"
+                     isAbstract="false"
+                     name="Platform for test30_sto"
+                     osList="all"/>
+               <builder
+                     buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
+                     id="test30_sto.dummy.builder"
+                     isAbstract="false"
+                     name="Builder for test30_sto"/>
+               <tool
+                     id="test30_sto.dummy.tool.1"
+                     isAbstract="false"
+                     name="Tool.1.Icon1"
+                     superClass="test30_sto.dummy.tool.parent.1"/>
+               <tool
+                     id="test30_sto.dummy.tool.2"
+                     isAbstract="false"
+                     name="Tool.2.NoIcon"
+                     superClass="test30_sto.dummy.tool.parent.2">
+                  <optionCategory
+                        icon="icons/two.gif"
+                        id="test30_sto.dummy.category.2.1"
+                        name="Category.Tool2.1.Icon2"
+                        owner="test30_sto.dummy.tool.2"/>
+                  <option
+                        category="test30_sto.dummy.category.2.1"
+                        id="test30_sto.dummy.option.2.1.1"
+                        isAbstract="false"
+                        name="Option2.1.1.Handler"
+                        superClass="test30_sto.dummy.option.parent.2.1.1"/>
+                  <option
+                        category="test30_sto.dummy.category.2.1"
+                        id="test30_sto.dummy.option.2.1.2"
+                        isAbstract="false"
+                        name="Option2.1.2.NoHandler"/>
+                  <optionCategory
+                        icon="icons/one.gif"
+                        id="test30_sto.dummy.category.2.2"
+                        name="Category.Tool2.2.Icon1"
+                        owner="test30_sto.dummy.tool.2"/>
+                  <option
+                        category="test30_sto.dummy.category.2.2"
+                        id="test30_sto.dummy.option.2.2.1"
+                        isAbstract="false"
+                        name="Option2.2.1.NoHandler"/>
+                  <option
+                        category="test30_sto.dummy.category.2.2"
+                        id="test30_sto.dummy.option.2.2.2"
+                        isAbstract="false"
+                        name="Option2.2.2.Handler"
+                        valueHandler="org.eclipse.cdt.managedbuilder.core.tests.TestValueHandler"
+                        valueHandlerExtraArgument="Option2.2.2"/>
+               </tool>
+               <tool
+                     icon="icons/two.gif"
+                     id="test30_sto.dummy.tool.3"
+                     isAbstract="false"
+                     name="Tool.3.Icon2"
+                     superClass="test30_sto.dummy.tool.parent.3">
+                  <option
+                        id="test30_sto.dummy.option.3.1.1"
+                        superClass="test30_sto.dummy.option.parent.3.1.1"
+                        isAbstract="false"
+                        name="Option3.1.1.NoHandler"/>
+                  <option
+                        id="test30_sto.dummy.option.3.1.2"
+                        superClass="test30_sto.dummy.option.parent.3.1.2"
+                        isAbstract="false"
+                        name="Option3.1.2.Handler"/>
+               </tool>
+               <tool
+                     icon="icons/one.gif"
+                     id="test30_sto.dummy.tool.4"
+                     isAbstract="false"
+                     name="Tool4.Icon1"/>                     
+               <optionCategory
+                     icon="icons/one.gif"
+                     id="test30_sto.dummy.category.7"
+                     name="Category.Top.7.Icon1"/>
+               <option
+                     id="test30_sto.dummy.option.5.1"
+                     isAbstract="false"
+                     name="Option5.1.Handler"
+                     superClass="test30_sto.dummy.option.parent.5.1"/>
+               <option
+                     category="test30_sto.dummy.category.6"
+                     id="test30_sto.dummy.option.6.1"
+                     isAbstract="false"
+                     name="Option6.1.NoHandler"
+                     valueType="boolean"/>
+               <option
+                     category="test30_sto.dummy.category.7"
+                     id="test30_sto.dummy.option.7.1"
+                     isAbstract="false"
+                     name="Option7.1.Handler"
+                     valueHandler="org.eclipse.cdt.managedbuilder.core.tests.TestValueHandler"
+                     valueHandlerExtraArgument="Option7.1"
+                     valueType="boolean"/>
+            </toolChain>
+         </configuration>
+      </projectType>
+      
+	  <!-- Test tools and project types for testing multiple input types,
+	       multiple output types, and input & output options
+	       tar -cf, tar -tf, & cat -->
+      
+      <projectType      
+            isAbstract="false"     
+            isTest="true"
+            name="test30_2"
+            id="test30_2.tar">
+         <configuration
+               name="X"
+               id="test30_2.tar.config"
+               artifactExtension="log"
+               cleanCommand="rm -rf"
+			   errorParsers="">
+               <toolChain
+                      name="ToolChain for test30_2"
+                      targetTool="test30_2.cat"
+                      id="test30_2.tar.toolchain"
+                      isSystem="true">
+				  <builder
+		              id="test30_2.tar.builder"
+		              name="Builder for test30_2"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+		     	  </builder>               
+			      <tool
+			      		name="tar-create"
+			      		command="tar"
+			      		commandLinePattern="${COMMAND} ${FLAGS} ${INPUTS}"
+			      		id="test30_2.tar-create">
+					 <optionCategory
+						  name="Options"
+						  id="test30_2.tar-create.category">
+					 </optionCategory>
+					 <option
+						  defaultValue="-cf"
+						  name="All Flags"
+						  category="test30_2.tar-create.category"
+						  id="test30_2.tar-create.other"
+						  valueType="string">
+					 </option>
+					 <option
+					 	  defaultValue="new.tar"
+					 	  name="Tar Filename"
+						  category="test30_2.tar-create.category"
+						  id="test30_2.tar-create.filename"
+						  valueType="string">
+					 </option>
+			         <inputType
+			            id="test30_2.tar-create.input1"
+			            name="All cpp files"
+			            multipleOfType="true"
+			            primaryInput="true"
+			            sourceContentType="org.eclipse.cdt.core.cxxSource">
+			         </inputType>
+			         <inputType
+			            id="test30_2.tar-create.input2"
+			            name="All asm files"
+			            multipleOfType="true"
+			            sourceContentType="org.eclipse.cdt.core.asmSource">
+			         </inputType>
+			         <outputType
+			            id="test30_2.tar-create.outputtar"
+			            name="Tar file"
+			            outputs="tar"
+			            buildVariable="TAROUT"
+			            primaryOutput="true"
+						option="test30_2.tar-create.filename">
+			         </outputType>
+			      </tool>   
+			      <tool
+			      		name="tar-list"
+			      		command="tar"
+			      		commandLinePattern="${COMMAND} ${FLAGS} ${INPUTS} &gt; ${OUTPUT}"
+		 	            commandLineGenerator="org.eclipse.cdt.managedbuilder.core.tests.Test30_2_CommandLineGenerator"
+			      		id="test30_2.tar-list">
+					 <optionCategory
+						  name="Options"
+						  id="test30_2.tar-list.category">
+					 </optionCategory>
+					 <option
+						  defaultValue="-tf"
+						  name="All Flags"
+						  category="test30_2.tar-list.category"
+						  id="test30_2.tar-list.other"
+						  valueType="string">
+					 </option>
+					 <option
+						  defaultValue="new.log"
+						  name="Log File Name"
+						  category="test30_2.tar-list.category"
+						  id="test30_2.tar-list.filename"
+						  valueType="string">
+					 </option>
+			         <inputType
+			            id="test30_2.tar-list.input1"
+			            buildVariable="TAROUT"
+			            sources="tar">
+			         </inputType>
+			         <outputType
+			            id="test30_2.tar-list.outputlog"
+			            name="Log file"
+			            outputs="log"
+			            buildVariable="LOGFILE"
+			            option="test30_2.tar-list.filename">
+			         </outputType>
+			      </tool>   
+			      <tool
+			      		name="cat"
+			      		command="cat"
+			      		commandLinePattern="${COMMAND} ${INPUTS}"
+			      		id="test30_2.cat">
+			         <inputType
+			            id="test30_2.cat.input"
+			            buildVariable="LOGFILE"
+			            sources="log">
+			         </inputType>
+			         <outputType
+			            id="test30_2.cat.output"
+			            name="Terminal (dummy output)"
+			            outputs="tmp">
+			         </outputType>
+			      </tool>
+			  </toolChain>
+         </configuration>
+      </projectType>                 
+
+<!-- 
+	Project type for testing Environment variables and Macros features
+	Note: toolchains are cut and cannot be used for real compilation.
+-->
+            <projectType
+                  id="cdt.managedbuild.target.testenv.exe"
+                  isAbstract="false"
+                  isTest="true"
+                  name="testenv.exe"
+                  projectEnvironmentSupplier="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                  projectMacroSupplier="org.eclipse.cdt.managedbuilder.core.tests.TestMacro">
+         <configuration
+               name="One"
+               id="cdt.managedbuild.config.testenv.exe.debug"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">
+               <toolChain
+                     archList="all"
+                     configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     configurationMacroSupplier="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     id="cdt.managedbuild.toolchain.testenv.exe.debug"
+                     isToolChainSupported="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     name="Dbg ToolChain"
+                     osList="solaris,linux,hpux,aix,qnx"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                     isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testenv.platform.exe.debug"
+		              name="Dbg Platform"
+		              binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE"
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+	              </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testenv.builder.exe.debug"
+		              name="Dbg Builder"
+		              command="make"
+		              arguments="-k"
+		              variableFormat="@="
+		              isVariableCaseSensitive="false"
+		              reservedMacroNames="PATH"		              
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+		     	  </builder>               
+                  <tool
+                      id="cdt.managedbuild.tool.testenv.c.compiler.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu.c.compiler">
+			  	      <option
+        		          id="macro.test.string"
+        		          defaultValue="000"
+                		  superClass="gnu.c.compiler.option30.optimization.flags"
+                		  value="111"
+        		          valueType="string">
+					  </option>
+					  <option
+		                  valueType="stringList"
+        		          name="ass"
+        		          superClass="gnu.cpp.compiler.option30.preprocessor.undef"
+                		  id="macro.test.list">
+			               <listOptionValue value="x"/>
+            			   <listOptionValue value="y"/>
+			               <listOptionValue value="z"/>
+            		  </option>
+	                  <envVarBuildPath
+        	                  pathType="buildpathInclude"
+                	          variableList="CFGI,CFG0,PRJI">
+	                  </envVarBuildPath>
+        	          <envVarBuildPath
+                	          pathType="buildpathLibrary"
+                        	  variableList="CFGL,PRJL">
+	                  </envVarBuildPath>
+				  </tool>
+				  <tool
+                      id="cdt.managedbuild.tool.testenv.cpp.compiler.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu.cpp.compiler">                         
+                  </tool>
+			  </toolChain>
+         </configuration>
+         <configuration
+               name="Two"
+               id="cdt.managedbuild.config.testenv.exe.release"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">               
+               <toolChain
+                     archList="all"
+                     configurationMacroSupplier="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     id="cdt.managedbuild.toolchain.testenv.exe.release"
+                     isToolChainSupported="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     name="Rel ToolChain"
+                     osList="solaris,linux,hpux,aix,qnx"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                     isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testenv.platform.exe.release"
+		              name="Rel Platform"		             
+		              binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE"
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">		              
+		          </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testenv.builder.exe.release"
+		              name="Rel Builder"		              
+		              command="make"
+		              isVariableCaseSensitive="true"
+		              macroInputFileNameValue="$(notdir $&lt;)"
+			          macroInputFileExtValue="$(suffix $(notdir $&lt;))"
+			          macroInputFileBaseNameValue="$(basename $(notdir $&lt;))"
+			          macroInputFileRelPathValue="$&lt;"
+			          macroInputDirRelPathValue="$(dir $&lt;)"
+			          macroOutputFileNameValue="$(notdir $@)"
+			          macroOutputFileExtValue="$(suffix $(notdir $@))"
+			          macroOutputFileBaseNameValue="$(basename $(notdir $@))"
+			          macroOutputFileRelPathValue="$@"
+			          macroOutputDirRelPathValue="$(dir $@)"
+		              arguments="-k">
+				  </builder> 
+                  <tool
+                      id="cdt.managedbuild.tool.testenv.c.compiler.exe.release"
+                      superClass="cdt.managedbuild.tool.testgnu.c.compiler">                          
+	                  <envVarBuildPath
+        	                  pathType="buildpathInclude"
+                	          variableList="CFGI,CFG1,PRJI">
+	                  </envVarBuildPath>
+        	          <envVarBuildPath
+                	          pathType="buildpathLibrary"
+                        	  variableList="CFGL,PRJL">
+	                  </envVarBuildPath>
+                  </tool>
+               </toolChain>
+         </configuration>
+         <configuration
+               name="Three"
+               id="cdt.managedbuild.config.testenv.exe.xz"
+               cleanCommand="rm -rf">
+               <toolChain
+                     configurationMacroSupplier="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     id="cdt.managedbuild.toolchain.testenv.exe.xz"
+                     isToolChainSupported="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     name="Three ToolChain"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                     isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testenv.platform.exe.xz"
+		              name="xz Platform">
+		          </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testenv.builder.exe.xz"
+		              name="XZ Builder"		              
+		              command="make"
+		              isVariableCaseSensitive="false"
+		              variableFormat="@="
+		              reservedMacroNameSupplier="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+		              arguments="-k">
+				  </builder> 
+                  <tool
+                      id="cdt.managedbuild.tool.testenv.c.compiler.exe.xz"
+                      superClass="cdt.managedbuild.tool.testgnu.c.compiler">                          
+                  </tool>
+               </toolChain>
+         </configuration>
+         <configuration
+               name="Four"
+               id="cdt.managedbuild.config.testenv.exe.min">
+               <toolChain
+                     id="cdt.managedbuild.toolchain.testenv.exe.min"
+                     isToolChainSupported="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     name="Three ToolChain"
+                     isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testenv.platform.exe.min"
+		              name="Rel Platform">
+		          </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testenv.builder.exe.min"
+		              name="Min Builder"		              
+		              command="make"
+		              isVariableCaseSensitive="true"
+		              variableFormat="@=">
+				  </builder> 
+                  <tool
+                      id="cdt.managedbuild.tool.testenv.c.compiler.exe.min"
+                      superClass="cdt.managedbuild.tool.testgnu.c.compiler">                          
+                  </tool>
+               </toolChain>
+         </configuration>
+         <configuration
+               name="Five"
+               id="cdt.managedbuild.config.testenv.exe.five"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">
+               <toolChain
+                     archList="all"
+                     configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     configurationMacroSupplier="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     id="cdt.managedbuild.toolchain.testenv.exe.five"
+                     isToolChainSupported="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     name="Dbg ToolChain"
+                     osList="solaris,linux,hpux,aix,qnx"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                     isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testenv.platform.exe.five"
+		              name="Dbg Platform"
+		              binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE"
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+	              </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testenv.builder.exe.five"
+		              name="Dbg Builder"
+		              command="make"
+		              arguments="-k"
+		              variableFormat="@="
+		              isVariableCaseSensitive="false"
+		              reservedMacroNames="PATH"		              
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.core.tests.TestMacro">
+		     	  </builder>               
+                  <tool
+                      id="cdt.managedbuild.tool.testenv.c.compiler.exe.five"
+                      superClass="cdt.managedbuild.tool.testgnu.c.compiler">
+			  	      <option
+        		          id="macro.test.string1"
+        		          defaultValue="000"
+                		  superClass="gnu.c.compiler.option30.optimization.flags"
+                		  value="111"
+        		          valueType="string">
+					  </option>
+					  <option
+		                  valueType="stringList"
+        		          name="ass"
+        		          superClass="gnu.cpp.compiler.option30.preprocessor.undef"
+                		  id="macro.test.list1">
+			               <listOptionValue value="x"/>
+            			   <listOptionValue value="y"/>
+			               <listOptionValue value="z"/>
+            		  </option>
+				  </tool>
+				  <tool
+                      id="cdt.managedbuild.tool.testenv.cpp.compiler.exe.five"
+                      superClass="cdt.managedbuild.tool.testgnu.cpp.compiler">                         
+                  </tool>
+			  </toolChain>
+         </configuration>
+         
+      </projectType>     
+     
+  	  <!-- Test tool-chain defined at top level -->
+
+      <toolChain
+      	id="TopTC.toolchain.base"
+      	name="TopLevel Toolchain"
+      	isAbstract="true"
+      	scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+      	isSystem="true">
+      		<targetPlatform
+      			id="TopTC.platform"
+      			name="TopTC Platform"
+      			binaryParser="org.eclipse.cdt.core.PE"/>
+      		<builder
+      			id="TopTC.managedbuilder"
+      			name="TopTC Builder"/>
+      		<tool
+      			id="TopTC.tool.assembler"
+      			superClass="cdt.managedbuild.tool.gnu.assembler"/>
+      </toolChain>
+      <toolChain
+      	id="TopTC.toolchain.release"
+      	name="TopTC Release Toolchain"
+      	isAbstract="true"
+      	superClass="TopTC.toolchain.base"
+      	isSystem="true">
+      		<tool
+      			id="TopTC.c.compiler.release"
+      			superClass="cdt.managedbuild.tool.gnu.c.compiler"
+      			command="$(CC)">
+      				<option
+      					id="TopTC.c.compiler.release.option.optimization.level"
+      					superClass="gnu.c.compiler.option.optimization.level"
+      					defaultValue="gnu.c.optimization.level.most"/>
+      				<option
+      					id="TopTC.c.compiler.release.option.debugging.level"
+      					superClass="gnu.c.compiler.option.debugging.level"
+      					defaultValue="gnu.c.debugging.level.none"/>
+      		</tool>
+      		<tool
+      			id="TopTC.tool.cpp.compiler.release"
+      			superClass="cdt.managedbuild.tool.gnu.cpp.compiler"
+      			command="$(CXX)">
+      				<option
+      					id="TopTC.cpp.compiler.release.option.optimization.level"
+      					superClass="gnu.cpp.compiler.option.optimization.level"
+      					defaultValue="gnu.cpp.compiler.optimization.level.most"/>
+      				<option
+      					id="TopTC.cpp.compiler.release.option.debugging.level"
+      					superClass="gnu.cpp.compiler.option.debugging.level"
+      					defaultValue="gnu.cpp.compiler.debugging.level.none"/>
+      		</tool>
+      </toolChain>
+      <toolChain
+      	id="TopTC.toolchain.debug"
+      	name="TopTC Debug Toolchain"
+      	isAbstract="true"
+      	superClass="TopTC.toolchain.base"
+      	isSystem="true">
+      		<tool
+      			id="TopTC.c.compiler.debug"
+      			superClass="cdt.managedbuild.tool.gnu.c.compiler"
+      			command="$(CC)">
+      				<option
+      					id="TopTC.c.compiler.debug.option.optimization.level"
+      					superClass="gnu.c.compiler.option.optimization.level"
+      					defaultValue="gnu.c.optimization.level.none"/>
+      				<option
+      					id="TopTC.c.compiler.debug.option.debugging.level"
+      					superClass="gnu.c.compiler.option.debugging.level"
+      					defaultValue="gnu.c.debugging.level.max"/>
+      		</tool>
+      		<tool
+      			id="TopTC.cpp.compiler.debug"
+      			superClass="cdt.managedbuild.tool.gnu.cpp.compiler"
+      			command="$(CXX)">
+      				<option
+      					id="TopTC.cpp.compiler.debug.option.optimization.level"
+      					superClass="gnu.cpp.compiler.option.optimization.level"
+      					defaultValue="gnu.cpp.compiler.optimization.level.none"/>
+      				<option
+      					id="TopTC.cpp.compiler.debug.option.debugging.level"
+      					superClass="gnu.cpp.compiler.option.debugging.level"
+      					defaultValue="gnu.cpp.compiler.debugging.level.max"/>
+      		</tool>
+      </toolChain>
+      <projectType
+      	isAbstract="false"
+      	isTest="true"
+        name="TopTC exe"
+        id="TopTC.target.exe">   
+            <configuration
+            	id="TopTC.config.exe.debug"
+            	name="Debug"
+		      	errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"
+		      	cleanCommand="rm -rf">
+		      		<toolChain
+		      			id="TopTC.toolchain.exe.debug"
+		      			superClass="TopTC.toolchain.debug"
+		      			isSystem="true">
+		      				<tool
+		      					id="TopTC..c.linker.exe.debug"
+		      					superClass="cdt.managedbuild.tool.gnu.c.linker"
+		      					command="$(CC)"/>
+		      				<tool
+		      					id="TopTC.cpp.linker.exe.debug"
+		      					superClass="cdt.managedbuild.tool.gnu.cpp.linker"
+		      					command="$(CXX)"/>
+		      		</toolChain>
+		    </configuration>
+            <configuration
+            	id="TopTC.config.exe.release"
+            	name="Release"
+		      	errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"
+		      	cleanCommand="rm -rf">
+		      		<toolChain
+		      			id="TopTC.toolchain.exe.release"
+		      			superClass="TopTC.toolchain.release"
+		      			isSystem="true">
+		      				<tool
+		      					id="TopTC..c.linker.exe.release"
+		      					superClass="cdt.managedbuild.tool.gnu.c.linker"
+		      					command="$(CC)"/>
+		      				<tool
+		      					id="TopTC..cpp.linker.exe.release"
+		      					superClass="cdt.managedbuild.tool.gnu.cpp.linker"
+		      					command="$(CXX)"/>
+		      		</toolChain>
+		    </configuration>
+	  </projectType>
+
+<!-- 
+	Project type for testing  Configuration Name Provider & Multiple Tool Chain versions features
+	Note: toolchains are cut and cannot be used for real compilation.
+-->
+     <projectType
+         id="cdt.managedbuild.target.testMultipleVersions.exe"
+         isAbstract="false"
+         isTest="true"
+         configurationNameProvider="org.eclipse.cdt.managedbuilder.core.tests.TestConfigurationNameProvider"
+         name="testMultipleVersions.exe">
+         <configuration
+               name="Debug"
+               description="debug configuration for IA32 windows"
+               id="cdt.managedbuild.config.testMultipleVersions.exe.debug"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">
+               <toolChain
+                     id="cdt.managedbuild.toolchain.testMultipleVersions.exe.debug_1.1.0"
+                     name="Debug IA32 ToolChain"
+                     archList="x86"                                         
+                     osList="linux"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                     isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testMultipleVersions.platform.exe.debug"
+		              name="Debug IA32 Platform"
+		              binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE"
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+	              </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testMultipleVersions.builder.exe.debug_1.1.0"
+		              name="Debug IA32 Builder"
+		              command="make"
+		              arguments="-k"
+		              variableFormat="@="
+		              isVariableCaseSensitive="false"
+		              reservedMacroNames="PATH"		              
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+		     	  </builder>               
+                  <tool
+                      id="cdt.managedbuild.tool.testMultipleVersions.c.compiler.exe.debug_1.1.0"
+                      superClass="cdt.managedbuild.tool.testgnu.c.compiler">
+				  </tool>
+				  <tool
+                      id="cdt.managedbuild.tool.testMultipleVersions.cpp.compiler.exe.debug_1.1.0"
+                      superClass="cdt.managedbuild.tool.testgnu.cpp.compiler">                         
+                  </tool>
+			  </toolChain>
+         </configuration>
+         <configuration
+               name="Release"
+               description="release configuration for IA32 windows"
+               id="cdt.managedbuild.config.testMultipleVersions.exe.release"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">               
+               <toolChain
+                     archList="x86"                                         
+                     osList="linux"
+                     id="cdt.managedbuild.toolchain.testMultipleVersions.exe.release"
+                     name="Release IA32 ToolChain"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                     isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testMultipleVersions.platform.exe.release"
+		              name="Release IA32 Platform"		             
+		              binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE"
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">		              
+		          </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testMultipleVersions.builder.exe.release"
+		              name="Release IA32 Builder"		              
+		              command="make"
+		              arguments="-k">
+				  </builder> 
+                  <tool
+                      id="cdt.managedbuild.tool.testMultipleVersions.c.compiler.exe.release"
+                      superClass="cdt.managedbuild.tool.testgnu.c.compiler">                          
+                  </tool>
+               </toolChain>
+         </configuration>
+         <configuration
+               name="Debug"
+               description="debug configuration for IA64 windows"
+               id="cdt.managedbuild.config.testMultipleVersions.exe.debug64"
+               cleanCommand="rm -rf">
+               <toolChain
+                     archList="ia64"                                         
+                     osList="linux"
+                     configurationMacroSupplier="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     id="cdt.managedbuild.toolchain.testMultipleVersions.exe.debug64_2.2.0"
+                     name="Debug IA64 ToolChain"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                     isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testMultipleVersions.platform.exe.debug64"
+		              name="Debug IA64 Platform">
+		          </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testMultipleVersions.builder.exe.debug64_3.2.1"
+		              name="Debug IA64 Builder"		              
+		              command="make"
+		              arguments="-k">
+				  </builder> 
+                  <tool
+                      id="cdt.managedbuild.tool.testMultipleVersions.c.compiler.exe.debug64_5.0.9"
+                      superClass="cdt.managedbuild.tool.testgnu.c.compiler">                          
+                  </tool>
+               </toolChain>
+         </configuration>
+         <configuration
+               name="Release"
+               description="release configuration for IA64 windows"
+               id="cdt.managedbuild.config.testMultipleVersions.exe.release64">
+               <toolChain
+                    archList="ia64"                                         
+                    osList="linux"               
+                     id="cdt.managedbuild.toolchain.testMultipleVersions.exe.release64_2.2.0"
+                     versionsSupported="1.2.0,2.0.0,2.1.3"
+                     isToolChainSupported="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     name="Three ToolChain"
+                     isSystem="true">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.testMultipleVersions.platform.exe.release64"
+		              name="Release IA64 Platform">
+		          </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.testMultipleVersions.builder.exe.release64_3.2.1"
+		              name="Release IA64 Builder"		              
+   		              versionsSupported="2.0.0,2.1.1,3.0.3"
+		              command="make"
+		              isVariableCaseSensitive="true"
+		              variableFormat="@=">
+				  </builder> 
+                  <tool
+                      id="cdt.managedbuild.tool.testMultipleVersions.c.compiler.exe.release64_5.0.9"
+                      superClass="cdt.managedbuild.tool.testgnu.c.compiler">                          
+                  </tool>
+               </toolChain>
+         </configuration>
+        
+      </projectType>
+      
+<!-- 
+	Project type for testing  Project Converter convenience routines
+	Note: toolchains are cut and cannot be used for real compilation.
+-->
+     <projectType
+         id="testProjectConverterConvenienceRoutines.exe"
+         isAbstract="false"
+         isTest="true"         
+         name="testProjectConverterConvenienceRoutines.exe">
+         <configuration
+               name="Debug"
+               description="debug configuration for IA32 windows"
+               id="config.testProjectConverterConvenienceRoutines.exe.debug"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">
+               <toolChain isSystem="true"
+                     id="toolchain.testProjectConverterConvenienceRoutines.exe.debug_1.1.0"
+                     name="Debug IA32 ToolChain"
+                     archList="x86"                                         
+                     osList="linux">                     
+		          <targetPlatform
+		              id="target.testProjectConverterConvenienceRoutines.platform.exe.debug"
+		              name="Debug IA32 Platform"
+		              binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE"
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+	              </targetPlatform>
+				  <builder
+				      id="target.testProjectConverterConvenienceRoutines.builder.exe.debug_1.1.0"
+		              name="Debug IA32 Builder"
+		              command="make"
+		              arguments="-k"
+		              variableFormat="@="
+		              isVariableCaseSensitive="false"
+		              reservedMacroNames="PATH"		              
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+		     	  </builder>               
+                  <tool
+                      id="tool.testProjectConverterConvenienceRoutines.c.compiler.exe.debug_1.1.0"
+                      superClass="cdt.managedbuild.tool.testgnu.c.compiler">
+				  </tool>
+				  <tool
+                      id="tool.testProjectConverterConvenienceRoutines.cpp.compiler.exe.debug_1.1.0"
+                      superClass="cdt.managedbuild.tool.testgnu.cpp.compiler">                         
+                  </tool>
+			  </toolChain>
+         </configuration>
+	</projectType>
+     <projectType
+           id="org.eclipse.cdt.managedbuilder.core.tests.BDMacroSupportProjectType"
+           isAbstract="false"
+           isTest="true"
+           name="Build Definitions Macro Support Project Type">
+        <configuration
+              artifactExtension="tar"
+              cleanCommand="rm"
+              id="org.eclipse.cdt.managedbuilder.core.tests.BDMacroSupportConfiguration"
+              name="Default">
+           <toolChain isSystem="true"
+                 id="org.eclipse.cdt.managedbuilder.core.tests.BDMacroSupportToolchain"
+                 isAbstract="false"
+                 name="Build Definition Macro Support Toolchain"
+                 targetTool="org.eclipse.cdt.managedbuilder.core.tests.BDMacroSupportBarTool">
+              <builder
+                    arguments="-k"
+                    buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
+                    command="make"
+                    id="org.eclipse.cdt.managedbuilder.core.tests.BDMacroSupportBuilder"
+                    isAbstract="false"
+                    name="GNU Make"
+                    superClass="cdt.managedbuild.target.gnu.builder"/>
+              <tool
+                    command="cp"
+                    commandLinePattern="${command} ${inputs} ${output}"
+                    id="org.eclipse.cdt.managedbuilder.core.tests.BDMacroSupportFooTool"
+                    isAbstract="false"
+                    name="Foo Tool"
+                    natureFilter="both">
+                 <inputType
+                       id="org.eclipse.cdt.managedbuilder.core.tests.BDMacroSupportFooInputType"
+                       multipleOfType="false"
+                       name="Foo Files"
+                       primaryInput="true"
+                       sources="foo"/>
+                 <outputType
+                       buildVariable="BAR_FILES"
+                       id="org.eclipse.cdt.managedbuilder.core.tests.BDMacroSupportBarOutputType"
+                       multipleOfType="false"
+                       name="Bar Files"
+                       outputPrefix="this_is_a_test_prefix_with_a_macro_for_the_project_name_between_here_${ProjName}_and_here"
+                       outputs="bar"
+                       primaryInputType="org.eclipse.cdt.managedbuilder.core.tests.BDMacroSupportFooInputType"
+                       primaryOutput="true"/>
+              </tool>
+              <tool
+                    command="tar"
+                    commandLinePattern="${command} cvf ${OutputFileRelPath} ${inputs}"
+                    id="org.eclipse.cdt.managedbuilder.core.tests.BDMacroSupportBarTool"
+                    isAbstract="false"
+                    name="Bar Tool"
+                    natureFilter="both">
+                 <inputType
+                       buildVariable="BAR_FILES"
+                       id="org.eclipse.cdt.managedbuilder.core.tests.BDMacroSupportBarInputType"
+                       multipleOfType="true"
+                       name="Bar Files"
+                       primaryInput="true"
+                       sources="bar"/>
+                 <outputType
+                       id="org.eclipse.cdt.managedbuilder.core.tests.BDMacroSupportTarOutputType"
+                       multipleOfType="false"
+                       name="Tar File"
+                       outputPrefix=" "
+                       outputs="tar"
+                       primaryInputType="org.eclipse.cdt.managedbuilder.core.tests.BDMacroSupportBarInputType"
+                       primaryOutput="true"/>
+              </tool>
+           </toolChain>
+        </configuration>
+     </projectType>
+
+   </extension>
+
+ <!-- Test Converters for testing the converter convenience routines -->      
+   <extension
+         point="org.eclipse.cdt.managedbuilder.core.projectConverter">
+      <converter
+            id="test.converter"
+            name="Test Project Converter"
+            class="org.eclipse.cdt.managedbuilder.core.tests.ProjectConverter"
+            fromId="toolchain.testProjectConverterConvenienceRoutines.exe.debug_1.1.0"
+            toId="toolchain.testProjectConverterConvenienceRoutines.exe.debug_1.2.0"            
+            mbsVersion="3.0.0">
+      </converter>
+   </extension> 
+   
+   <!-- Test Converters for testing the conversion while importing a CDT2.1 project -->      
+
+    <extension point="org.eclipse.cdt.managedbuilder.core.projectConverter">
+    <converter
+            id="test.ToolChainConverter"
+            name="Test Tool Chain Converter"
+            class="org.eclipse.cdt.managedbuilder.core.tests.ProjectConverter21"
+            fromId="test.toolChain_1.0.0"
+            toId="test.toolChain_2.0.0"            
+            mbsVersion="3.0.0">
+     </converter>
+     <converter
+            id="test.Tool1Converter"
+            name="Test Tool1 Converter"
+            class="org.eclipse.cdt.managedbuilder.core.tests.ProjectConverter21"
+            fromId="test.tool1_1.0.0"
+            toId="test.tool1_2.0.0"            
+            mbsVersion="3.0.0">
+     </converter>
+     <converter
+            id="test.Tool2Converter"
+            name="Test Tool2 Converter"
+            class="org.eclipse.cdt.managedbuilder.core.tests.ProjectConverter21"
+            fromId="test.tool2_1.0.0"
+            toId="test.tool2_2.0.0"            
+            mbsVersion="3.0.0">
+     </converter>
+   </extension>
+         
+ <!-- Test Converters for testing the conversion while importing a CDT2.0 & CDT2.1 projects -->      
+
+ <extension
+         point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
+      <managedBuildRevision
+            fileVersion="3.0.0">
+      </managedBuildRevision>
+ 
+ 	<projectType      
+            isAbstract="false"     
+            isTest="true"
+            name="Test - Version 1.0"
+            id="test_1.0.0">
+         <configuration
+               name="Test Configuration"
+               id="test.config_1.0.0"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">               
+               <toolChain isSystem="true"
+		          id="test.toolChain_1.0.0"
+		          name="Test ToolChain Ver 1.0"
+		          convertToId="test.toolChain_2.0.0"		          
+		          archList="all">
+		          <targetPlatform
+		              id="test.target_1.0.0"
+		              name="Test Target"		             
+		              binaryParser="org.eclipse.cdt.core.ELF"
+		              archList="all">		              
+		          </targetPlatform>
+				  <builder
+				      id="test.builder_1.0.0"
+		              name="Test Builder Version 1.0"		              
+		              command="make"
+		              arguments="-k"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+				  </builder> 
+                  <tool
+                      id="test.tool1_1.0.0"
+                      name="Test Tool 1 - - Version 1.0"
+                      convertToId="test.tool1_2.0.0"
+                      superClass="cdt.managedbuild.tool.gnu.c.compiler">                          
+                  </tool>
+                  <tool
+                      id="test.tool2_1.0.0"
+                      name="Test Tool 2 - Version 1.0"
+                      convertToId="test.tool2_2.0.0"
+                      superClass="cdt.managedbuild.tool.gnu.cpp.compiler">                     
+                  </tool>
+               </toolChain>
+         </configuration>
+      </projectType>          
+
+	 <projectType      
+            isAbstract="false"     
+            isTest="true"
+            name="Test - Version 2.0"
+            id="test_2.0.0">
+         <configuration
+               name="Test Configuration 2.0"
+               id="test.config_2.0.0"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">               
+               <toolChain isSystem="true"
+		          id="test.toolChain_2.0.0"
+		          name="Test ToolChain Ver 2.0"
+		          archList="all">
+		          <targetPlatform
+		              id="test.target_2.0.0"
+		              name="Test Target ver 2.0"		             
+		              binaryParser="org.eclipse.cdt.core.ELF"
+		              archList="all">		              
+		          </targetPlatform>
+				  <builder
+				      id="test.builder_2.0.0"
+		              name="Test Builder Version 2.0"		              
+		              command="make"
+		              arguments="-k"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+				  </builder> 
+                  <tool
+                      id="test.tool1_2.0.0"
+                      name="Test Tool 1 - - Version 2.0"
+                      superClass="cdt.managedbuild.tool.gnu.c.compiler">                          
+                  </tool>
+                  <tool
+                      id="test.tool2_2.0.0"
+                      name="Test Tool 2 - Version 2.0"
+                      superClass="cdt.managedbuild.tool.gnu.cpp.compiler">                     
+                  </tool>
+               </toolChain>
+         </configuration>
+      </projectType>
+      
+      <projectType
+            isAbstract="false"
+            name="Test"
+           	isTest="true"
+            superClass="cdt.managedbuild.target.gnu.exe"
+            id="test.target">
+            <configuration id="test.config" name="Test Configuration">
+            	<toolChain isSystem="true" 
+            		id="test.toolchain" 
+            		name="Test Toolchain"
+            		convertToId="test.toolchain_1.2.0">
+					<builder
+						  superClass="cdt.managedbuild.target.gnu.builder"
+					      id="test.builder"
+			              name=""
+			              command="make"
+			              arguments="-k">
+			     	</builder>
+            		<tool 
+            			id="test.c.compiler"
+            			superClass="cdt.managedbuild.tool.gnu.c.compiler">
+            		</tool>
+            		<tool 
+            			id="test.cpp.compiler"
+            			superClass="cdt.managedbuild.tool.gnu.cpp.compiler">
+            		</tool>
+            	</toolChain>
+			</configuration>
+      </projectType>
+      
+      <projectType
+            isAbstract="false"
+            isTest="true"
+            name="Test 1.2.0"
+            superClass="cdt.managedbuild.target.gnu.exe"
+            id="test.target_1.2.0">
+            <configuration id="test.config_1.2.0" name="Test Configuration">
+            	<toolChain isSystem="true" 
+            		id="test.toolchain_1.2.0" 
+            		name="Test Toolchain 1.2.0">     
+					<builder
+						  superClass="cdt.managedbuild.target.gnu.builder"
+					      id="test.builder_1.2.0"
+			              name=""
+			              command="make"
+			              arguments="-k">
+			     	</builder>
+            		<tool 
+            			id="test.c.compiler_1.2.0"
+            			superClass="cdt.managedbuild.tool.gnu.c.compiler">
+            		</tool>
+            		<tool 
+            			id="test.cpp.compiler_1.2.0"
+            			superClass="cdt.managedbuild.tool.gnu.cpp.compiler">
+            		</tool>
+            	</toolChain>
+			</configuration>
+      </projectType>
+
+<!-- tool chain definitions for test project type for verifying the project conversion -->
+
+ 	<projectType      
+            isAbstract="false"     
+            isTest="true"
+            name="TestProject Conversion - Version 1.0"
+            convertToId="testProject_2.0.0"
+            id="testProject_1.0.0">
+         <configuration
+               name="Test Configuration"
+               id="testProject.config_1.0.0"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">               
+               <toolChain isSystem="true"
+		          id="testProject.toolChain_1.0.0"
+		          name="Test ToolChain Ver 1.0"
+		          archList="all">
+		          <targetPlatform
+		              id="testProject.target_1.0.0"
+		              name="Test Target"		             
+		              binaryParser="org.eclipse.cdt.core.ELF"
+		              archList="all">		              
+		          </targetPlatform>
+				  <builder
+				      id="testProject.builder_1.0.0"
+		              name="Test Builder Version 1.0"		              
+		              command="make"
+		              arguments="-k"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+				  </builder> 
+                  <tool
+                      id="testProject.tool1_1.0.0"
+                      name="Test Tool 1 - - Version 1.0"
+                      superClass="cdt.managedbuild.tool.gnu.c.compiler">                          
+                  </tool>
+                  <tool
+                      id="testProject.tool2_1.0.0"
+                      name="Test Tool 2 - Version 1.0"
+                      superClass="cdt.managedbuild.tool.gnu.cpp.compiler">                     
+                  </tool>
+               </toolChain>
+         </configuration>
+      </projectType>          
+      
+      <projectType      
+            isAbstract="false"     
+            isTest="true"
+            name="TestProject Conversion - Version 2.0"
+            id="testProject_2.0.0">
+         <configuration
+               name="Test Configuration"
+               id="testProject.config_2.0.0"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">               
+               <toolChain isSystem="true"
+		          id="testProject.toolChain_2.0.0"
+		          name="Test ToolChain Ver 2.0"
+		          archList="all">
+		          <targetPlatform
+		              id="testProject.target_2.0.0"
+		              name="Test Target"		             
+		              binaryParser="org.eclipse.cdt.core.ELF"
+		              archList="all">		              
+		          </targetPlatform>
+				  <builder
+				      id="testProject.builder_2.0.0"
+		              name="Test Builder Version 2.0"		              
+		              command="make"
+		              arguments="-k"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+				  </builder> 
+                  <tool
+                      id="testProject.tool1_2.0.0"
+                      name="Test Tool 1 - - Version 2.0"
+                      superClass="cdt.managedbuild.tool.gnu.c.compiler">                          
+                  </tool>
+                  <tool
+                      id="testProject.tool2_2.0.0"
+                      name="Test Tool 2 - Version 2.0"
+                      superClass="cdt.managedbuild.tool.gnu.cpp.compiler">                     
+                  </tool>
+               </toolChain>
+         </configuration>
+      </projectType>          
+      
+   </extension>
+   
+   <extension
+         point="org.eclipse.cdt.managedbuilder.core.projectConverter">
+      <converter
+            id="test.converter"
+            name="Test Project Converter"
+            class="org.eclipse.cdt.managedbuilder.core.tests.ProjectConverter20"
+            fromId="test.toolchain"
+            toId="test.toolchain_1.2.0"            
+            mbsVersion="3.0.0">
+      </converter>
+      <!-- converter for the projectType testProject_1.0.0 -->
+      <converter
+            id="testProject.converter"
+            name="Test Project Converter"
+            class="org.eclipse.cdt.managedbuilder.core.tests.TestProjectConverter"
+            fromId="testProject_1.0.0"
+            toId="testProject_2.0.0"            
+            mbsVersion="3.0.0">
+      </converter>
+      
+   </extension>  
+
+   <extension
+         id="cdt.test.fortran.toolchain"
+         name="CDT Test Fortran Toolchain"
+         point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
+
+    <!-- This tool-chain tests external dependency calulation using Fortran -->
+
+    <!-- Compiler tool -->
+
+	<tool
+		natureFilter="both"
+		name="Test Fortran Compiler"
+		outputFlag="-c -object:"
+		command="myfort"
+		commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}"
+		id="cdt.test.fortran.compilestep"
+		isSystem="true">
+		<inputType
+		    sources="f,F,for,FOR,f90,F90"
+			dependencyCalculator="org.eclipse.cdt.managedbuilder.core.tests.DefaultFortranDependencyCalculator"
+            id="cdt.test.fortran.compilestep.input">
+        </inputType>
+        <outputType
+			outputs="obj"
+            buildVariable="OBJS"
+            id="cdt.test.fortran.compilestep.output">
+        </outputType>		
+        <outputType
+			outputs="mod"
+            buildVariable="MODS"
+            multipleOfType="true"
+            nameProvider="org.eclipse.cdt.managedbuilder.core.tests.DefaultFortranDependencyCalculator"
+            id="cdt.test.fortran.compilestep.output.modules">
+        </outputType>		
+		<!-- pp General -->
+        <optionCategory
+			owner="cdt.test.fortran.compilestep"
+            name="General"
+            id="cdt.test.fortran.compilestep.category.general">
+        </optionCategory>
+		<option
+			defaultValue="false"
+			name="Include Debug Information (-debug)"
+			category="cdt.test.fortran.compilestep.category.general"
+			command="-debug"
+			valueType="boolean"
+			id="cdt.test.fortran.compilestep.general.debug">
+		</option>
+		<option
+			name="Optimization Level"
+			category="cdt.test.fortran.compilestep.category.general"
+			valueType="enumerated"
+			id="cdt.test.fortran.compilestep.general.optimization">
+		    <enumeratedOptionValue
+				name="Disable (-Od)"
+				command="-Od"
+				id="general.opt.none">
+		    </enumeratedOptionValue>
+		    <enumeratedOptionValue
+				name="Minimize Size (-O1)"
+				command="-O1"
+				id="general.opt.size">
+		    </enumeratedOptionValue>
+		    <enumeratedOptionValue
+				name="Maximize Speed (-O2)"
+				isDefault="true"
+				command=""
+				id="general.opt.speed">
+		    </enumeratedOptionValue>
+		</option>
+		<option
+			name="Additional Include Directories (-I)"
+			category="cdt.test.fortran.compilestep.category.general"
+			command="-I"
+			valueType="includePath"
+			browseType="directory"
+			id="cdt.test.fortran.compilestep.preprocessor.includedirectories">
+		</option>
+		<!-- pp Compiler Command Line  -->
+		<optionCategory
+			owner="cdt.test.fortran.compilestep"
+			name="Command Line"
+			id="cdt.test.fortran.compilestep.category.comline">
+		</optionCategory>
+		<option
+			name="Additional Options"
+			category="cdt.test.fortran.compilestep.category.comline"
+			valueType="string"
+			id="cdt.test.fortran.compilestep.coptions">
+		</option>
+	</tool>
+    
+    <!-- Linker tool -->
+    
+    <tool
+        natureFilter="both"
+        name="Linker"
+        outputFlag="-o"
+        command="mylink"
+		commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}"
+        id="cdt.test.fortran.linkstep"
+        isSystem="true">
+        <inputType
+            sourceContentType="org.eclipse.cdt.managedbuilder.core.compiledObjectFile"
+            sources="o"
+			multipleOfType="true"
+            dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator"
+            buildVariable="OBJS"
+            id="cdt.test.fortran.linkstep.input">
+            <additionalInput
+            	paths="$(USER_OBJS)"
+            	kind="additionalinputdependency">
+            </additionalInput>
+            <additionalInput
+            	paths="$(LIBS)"
+            	kind="additionalinput">
+            </additionalInput>
+        </inputType>
+        <outputType
+			outputs="exe"
+            buildVariable="EXECUTABLES"
+            primaryOutput="true"
+            id="cdt.test.fortran.linkstep.output">
+        </outputType>        
+		<!-- pp Libraries  -->
+		<optionCategory
+            owner="cdt.test.fortran.linkstep"
+            name="Libraries"
+            id="cdt.test.fortran.linkstep.category.options">
+		</optionCategory>
+		<option
+            name="Additional Libraries (-l)"
+            category="cdt.test.fortran.linkstep.category.options"
+            command="-l"
+            valueType="libs"
+            id="cdt.test.fortran.linkstep.libname">
+		</option>
+		<option
+            name="Search Directory for Libraries (-L)"
+            category="cdt.test.fortran.linkstep.category.options"
+            command="-L"
+            valueType="stringList"
+            id="cdt.test.fortran.linkstep.libpath">
+		</option>
+
+		<!-- pp Linker Command Line  -->
+		<optionCategory
+            owner="cdt.test.fortran.linkstep"
+            name="Command Line"
+            id="cdt.test.fortran.linkstep.category.comline">
+		</optionCategory>
+		<option
+            name="Additional Options"
+            category="cdt.test.fortran.linkstep.category.comline"
+            valueType="string"
+            id="cdt.test.fortran.linkstep.loptions">
+		</option>
+    </tool>
+                         
+    <!-- Executable project type -->
+      
+    <projectType      
+        isTest="true"
+        isAbstract="false"
+        name="Fortran Executable"
+        id="cdt.test.fortran.executable">
+        <configuration
+            name="Release"
+            id="cdt.test.fortran.executable.release"
+            cleanCommand="rm -rf">
+            <toolChain isSystem="true"
+		        id="cdt.test.fortran.toolchain.executable.release"
+		        name="ToolChain.Executable.Release"
+		        targetTool="cdt.test.fortran.linkstep.executable.release"
+                osList="win32"
+                archList="x86">
+				<targetPlatform
+		            id="cdt.test.fortran.platform.executable.release"
+		            name="Platform.Executable.Release"
+		            binaryParser="org.eclipse.cdt.core.PE"
+		            osList="win32"
+		            archList="x86">		              
+		        </targetPlatform>
+				<builder
+				    id="cdt.test.fortran.builder.executable.release"
+		            name="Builder.Executable.Release"		              
+		            command="make"
+                    arguments="-k"
+                    buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">                      
+				</builder> 				  				  
+				<tool
+				    id="cdt.test.fortran.compilestep.executable.release"
+					superClass="cdt.test.fortran.compilestep">					
+				    <option
+				        id="cdt.test.fortran.compilestep.general.optimization.executable.release"
+						defaultValue="general.opt.speed"
+						superClass="cdt.test.fortran.compilestep.general.optimization">
+				    </option>
+				    <option
+				        id="cdt.test.fortran.compilestep.general.debug.executable.release"
+						defaultValue="false"
+						superClass="cdt.test.fortran.compilestep.general.debug">
+				    </option>
+				</tool>
+				<tool               
+					id="cdt.test.fortran.linkstep.executable.release"
+					superClass="cdt.test.fortran.linkstep">
+				</tool>
+		    </toolChain>
+        </configuration>
+        <configuration
+            name="Debug"
+            id="cdt.test.fortran.executable.debug"
+            cleanCommand="rm -rf">
+            <toolChain isSystem="true"
+		        id="cdt.test.fortran.toolchain.executable.debug"
+		        name="ToolChain.Executable.Debug"
+		        targetTool="cdt.test.fortran.linkstep.executable.debug"
+                osList="win32"
+                archList="x86">
+                <targetPlatform
+		            id="cdt.test.fortran.platform.executable.debug"
+		            name="Platform.Executable.Debug"		            
+		            binaryParser="org.eclipse.cdt.core.PE"
+		            osList="win32"
+		            archList="x86">		              
+		        </targetPlatform>
+				<builder
+				    id="cdt.test.fortran.builder.executable.debug"
+		            name="Builder.Executable.Debug"		              
+		            command="make"
+                    arguments="-k"
+                    buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">                      
+				</builder> 				  				  
+				<tool
+				    id="cdt.test.fortran.compilestep.executable.debug"
+					superClass="cdt.test.fortran.compilestep">
+					<option
+					    id="cdt.test.fortran.compilestep.general.optimization.executable.debug"
+						defaultValue="general.opt.none"
+						superClass="cdt.test.fortran.compilestep.general.optimization">
+					</option>
+					<option
+					    id="cdt.test.fortran.compilestep.general.debug.executable.debug"
+						defaultValue="true"
+						superClass="cdt.test.fortran.compilestep.general.debug">
+					</option>
+				</tool>
+				<tool               
+					id="cdt.test.fortran.linkstep.executable.debug"
+					superClass="cdt.test.fortran.linkstep">
+				</tool>
+		    </toolChain>		  
+        </configuration>
+    </projectType>
+    
+    <!-- Executable project type end -->
+
+    <!-- Project type for testing assignToOption -->
+
+    <projectType
+            id="cdt.test.assignToOption.executableProjectType"
+            isAbstract="false"
+            isTest="true"
+            name="AssignToOption Executable">
+         <configuration
+               artifactExtension="out"
+               cleanCommand="rm -rf"
+               id="cdt.test.assignToOption.debug"
+               name="Debug">
+            <toolChain isSystem="true"
+                  id="cdt.test.assignToOption.exeDebugToolchain"
+                  isAbstract="false"
+                  name="AssingToOption Tools"
+                  targetTool="cdt.test.assignToOption.exeLinkerDebug">
+               <tool
+                     id="cdt.test.assignToOption.compilerDebug"
+                     isAbstract="false"
+                     name="AssignToOption Compiler"
+                     superClass="cdt.test.assignToOption.compiler"/>
+               <tool
+                     id="cdt.test.assignToOption.exeLinkerDebug"
+                     isAbstract="false"
+                     name="AssignToOption Executable Linker"
+                     superClass="cdt.test.assignToOption.exeLinker"/>
+				<builder
+				    id="cdt.test.assignToOption.builder"
+		            name="AssignToOption Builder"		              
+		            command="make"
+                    arguments="-k"
+                    buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">                      
+				</builder> 				  				  
+            </toolChain>
+         </configuration>
+    </projectType>
+    <tool
+            command="ATOC"
+            id="cdt.test.assignToOption.compiler"
+            isAbstract="false"
+            name="AssignToOption Compiler"
+            natureFilter="both"
+            isSystem="true">
+         <inputType
+               id="cdt.test.assignToOption.compilerSources"
+               multipleOfType="false"
+               name="ATOC Sources"
+               primaryInput="true"
+               sources="c,C,cpp,CPP"/>
+         <inputType
+               id="cdt.test.assignToOption.compilerSecondary"
+               name="Compiler Option Files"
+               assignToOption="cdt.test.assignToOption.compilerFileOption"
+               sources="cop"/>
+         <outputType
+               buildVariable="OBJS"
+               id="cdt.test.assignToOption.compilerObjectFilesTypeOutput"
+               multipleOfType="false"
+               name="Object Files"
+               outputs="obj"
+               primaryInputType="cdt.test.assignToOption.compilerSources"
+               primaryOutput="true"/>
+         <option
+               command="-opt"
+               id="cdt.test.assignToOption.compilerFileOption"
+               isAbstract="false"
+               name="Compiler Option File"
+	           applicabilityCalculator="org.eclipse.cdt.managedbuilder.core.tests.CmdLineApplicabilityCalculator"
+               valueType="string"/>
+    </tool>
+    <tool
+            command="ATOL"
+            id="cdt.test.assignToOption.exeLinker"
+            isAbstract="false"
+            name="AssignToOption Executable Linker"
+            natureFilter="both"
+            outputFlag="-o"
+            isSystem="true">
+         <inputType
+               buildVariable="OBJS"
+               id="cdt.test.assignToOption.compilerObjectFilesTypeInput"
+               multipleOfType="true"
+               name="Object Files"
+               primaryInput="true"
+               sources="obj"/>
+         <inputType
+               id="cdt.test.assignToOption.linkerFileInputType"
+               multipleOfType="true"
+               name="Linker Option Files"
+               assignToOption="cdt.test.assignToOption.linkerFileOption"
+               primaryInput="false"
+               sources="opt"/>
+         <outputType
+               id="cdt.test.assignToOption.exeOutputType"
+               name="AssignToOption Executable"
+               outputs="out"
+               primaryInputType="cdt.test.assignToOption.compilerObjectFilesTypeInput"
+               primaryOutput="true"/>
+         <option
+               browseType="file"
+               category="cdt.test.assignToOption.optionCategory1"
+               command="-opt"
+               id="cdt.test.assignToOption.linkerFileOption"
+               isAbstract="false"
+               name="Linker Option File"
+               resourceFilter="project"
+               valueType="stringList"/>
+         <optionCategory
+               id="cdt.test.assignToOption.optionCategory1"
+               name="Linker Options"
+               owner="cdt.test.assignToOption.exeLinker"/>
+    </tool>
+
+    <!-- Project type for testing option command ${VALUE} -->
+
+    <projectType
+            id="cdt.test.dollarValue.ProjectType"
+            isAbstract="false"
+            isTest="true"
+            name="Dollar Value Type">
+         <configuration
+               id="cdt.test.dollarValue.one"
+               name="One">
+            <toolChain isSystem="true"
+                  id="cdt.test.dollarValue.Toolchain"
+                  isAbstract="false"
+                  name="Tools">
+                <tool
+		            command="xxx"
+		            id="cdt.test.dollarValue.Tool"
+		            isAbstract="false"
+		            name="Tool"
+		            natureFilter="both"
+		            outputFlag="-o">
+		         <optionCategory
+		               id="cdt.test.dollarValue.optionCategory1"
+		               name="Test Options"
+		               owner="cdt.test.dollarValue.Tool"/>
+		         <option
+		               category="cdt.test.dollarValue.optionCategory1"
+		               command="-opt1 ${value}"
+		               id="cdt.test.dollarValue.option1"
+		               name="Option1"
+		               valueType="string"/>
+		         <option
+		               category="cdt.test.dollarValue.optionCategory1"
+		               command="-opt2${VALUE}suffix"
+		               id="cdt.test.dollarValue.option2"
+		               name="Option2"
+		               valueType="string"/>
+		         <option
+		               category="cdt.test.dollarValue.optionCategory1"
+		               command="${vAlUe}"
+		               id="cdt.test.dollarValue.option3"
+		               name="Option3"
+		               valueType="string"/>
+		         <option
+		               category="cdt.test.dollarValue.optionCategory1"
+		               command="${${VALUe}}"
+		               id="cdt.test.dollarValue.option4"
+		               name="Option4"
+		               valueType="string"/>
+		         <option
+		               category="cdt.test.dollarValue.optionCategory1"
+		               command="${value}${Value}"
+		               id="cdt.test.dollarValue.option5"
+		               name="Option5"
+		               valueType="string"/>
+		         <option
+		               category="cdt.test.dollarValue.optionCategory1"
+		               command="x${Value}yy${valuE}z"
+		               id="cdt.test.dollarValue.option6"
+		               name="Option5"
+		               valueType="string"/>
+                </tool>
+				<builder
+				    id="cdt.test.dollarValue.builder"
+		            name="Builder"		              
+		            command="make"
+                    arguments="-k"
+                    buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">                      
+				</builder> 				  				  
+            </toolChain>
+         </configuration>
+    </projectType>
+    
+    <!-- enablement testing -->
+    
+      <projectType
+                  id="cdt.managedbuild.target.enablement.exe"
+                  isAbstract="false"
+                  isTest="true"
+                  name="enablement.exe"
+                  projectEnvironmentSupplier="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                  projectMacroSupplier="org.eclipse.cdt.managedbuilder.core.tests.TestMacro">
+         <configuration
+               name="One"
+               id="cdt.managedbuild.config.enablement.exe.debug"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">
+               <toolChain isSystem="true"
+                     archList="all"
+                     configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     configurationMacroSupplier="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     id="cdt.managedbuild.toolchain.enablement.exe.debug"
+                     isToolChainSupported="org.eclipse.cdt.managedbuilder.core.tests.TestMacro"
+                     name="Dbg ToolChain"
+                     osList="solaris,linux,hpux,aix,qnx"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.enablement.platform.exe.debug"
+		              name="Dbg Platform"
+		              binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE"
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+	              </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.enablement.builder.exe.debug"
+		              name="Dbg Builder"
+		              command="make"
+		              arguments="-k"
+		              variableFormat="@="
+		              isVariableCaseSensitive="false"
+		              reservedMacroNames="PATH"		              
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+		     	  </builder>               
+                  <tool
+                      id="enablement.this.child_1.2.3"
+                      superClass="enablement.this">
+			  	      <option
+        		          id="enablement.macro.test.string"
+        		          defaultValue="000"
+                		  superClass="gnu.c.compiler.option30.optimization.flags"
+                		  value="111"
+        		          valueType="string">
+					  </option>
+					  <option
+		                  valueType="stringList"
+        		          name="ass"
+        		          superClass="gnu.cpp.compiler.option30.preprocessor.undef"
+                		  id="enablement.macro.test.list">
+			               <listOptionValue value="x"/>
+            			   <listOptionValue value="y"/>
+			               <listOptionValue value="z"/>
+            		  </option>
+	                  <envVarBuildPath
+        	                  pathType="buildpathInclude"
+                	          variableList="CFGI,CFG0,PRJI">
+	                  </envVarBuildPath>
+        	          <envVarBuildPath
+                	          pathType="buildpathLibrary"
+                        	  variableList="CFGL,PRJL">
+	                  </envVarBuildPath>
+				  </tool>
+				  <tool
+                      id="enablement.other.child"
+                      superClass="enablement.other">                         
+                  </tool>
+                  <tool
+                      id="enablement.this.child.2_1.2.3"
+                      superClass="enablement.this"/>
+			  </toolChain>
+         </configuration>
+      </projectType>
+      
+      <tool
+		  name="compiler.gnu.c"
+		  id="enablement.this"
+		  isAbstract="true"
+		  sources="c"
+		  command="gcc"
+		  dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator"
+		  headerExtensions="h"
+		  natureFilter="cnature"
+		  outputs="o"
+		  outputFlag="-o"
+		  isSystem="true">
+		  <optionCategory
+		      owner="enablement.this"
+			  name="Preproc"
+			  id="testgnu.enablement.c.compiler.category.preprocessor">
+		  </optionCategory>
+		  <option
+			  defaultValue="false"
+			  name="1a"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="test1"
+			  commandFalse="cmdF"
+			  id="enablement.command.c1"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="command" value="c1">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="2"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="c2"
+			  commandFalse="cmdF"
+			  id="enablement.command.c2"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="command" value="test">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="3"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.commandFalse.c1"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="c1">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="4"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="c2"
+			  id="enablement.commandFalse.c2"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="test">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="5"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.command.c1.commandFalse.cF1"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="command" value="c1">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="6"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.command.cmd.commandFalse.cmdF"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="test">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="command" value="test">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="7"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.command.c1.commandFalse.cmdF"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="command" value="c1">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="8"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.command.cmd.commandFalse.cF1"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="command" value="test">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="9"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.ui.en"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+			  <enablement type="UI_ENABLEMENT">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="10"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.ui.vis"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+			  <enablement type="UI_VISIBILITY">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="11"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.cmd.us"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+			  <enablement type="CMD_USAGE">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="12"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.cmdUs.or.uiVis"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+			  <enablement type="CMD_USAGE|UI_VISIBILITY">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="13"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.uiEn.or.uiVis"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+			  <enablement type="UI_ENABLEMENT|UI_VISIBILITY">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="14"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.all"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+			  <enablement type="ALL">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="15"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.all.ac.vh"
+			  valueType="boolean"
+			  applicabilityCalculator="org.eclipse.cdt.managedbuilder.core.tests.OptionEnablementTests"
+			  valueHandlerExtraArgument="org.eclipse.cdt.managedbuilder.core.tests.OptionEnablementTests">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+			  <enablement type="ALL">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+ 		  </option>
+<!-- marker -->
+		  <option
+			  defaultValue="false"
+			  name="16"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.all.cF1.ac.vh"
+			  valueType="boolean"
+			  applicabilityCalculator="org.eclipse.cdt.managedbuilder.core.tests.OptionEnablementTests"
+			  valueHandlerExtraArgument="org.eclipse.cdt.managedbuilder.core.tests.OptionEnablementTests">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+			  <enablement type="ALL">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="17"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.all.cF.cmdF"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+			  <enablement type="ALL">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="18"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.all.cF.cF1"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+			  <enablement type="ALL">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="19"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="this.boolean"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<checkOption/>
+			  </enablement>
+ 		  </option>
+		  <option
+			  defaultValue="false"
+			  name="20"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkOpt.all.Q.this.boolean.True"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<checkOption optionId="this.boolean" value="true"/>
+			  </enablement>
+			  </option>
+		  <option
+			  defaultValue="false"
+			  name="21"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkOpt.all.Q.this.boolean.False"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<checkOption optionId="this.boolean" value="false"/>
+			  </enablement>
+			  </option>
+		  <option
+			  defaultValue="false"
+			  name="22"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkOpt.all.Q.this.string.Q.empty"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<checkOption optionId="this.string" value=""/>
+			  </enablement>
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="23"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkOpt.all.Q.this.string.Q.test a b c"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<checkOption optionId="this.string" value="test a b c"/>
+			  </enablement>
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="24"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkOpt.all.Q.this.enum.Q.testgnu.enablement.c.optimization.level.optimize"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<checkOption optionId="this.enum" value="testgnu.enablement.c.optimization.level.optimize"/>
+			  </enablement>
+		  </option> 		  
+		  <option
+			  defaultValue="false"
+			  name="25"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkOpt.all.Q.this.Q.true"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<checkOption value="true"/>
+			  </enablement>
+		  </option> 		  
+		  <option
+			  defaultValue="false"
+			  name="26"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkOpt.all.Q.this.string.Q.start ${ParentVersion} stop"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<checkOption optionId="this.string" value="start ${ParentVersion} stop"/>
+			  </enablement>
+		  </option> 		  
+		  <option
+			  defaultValue="false"
+			  name="27"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkOpt.all.Q.this.string.Q.other.string"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<checkOption optionId="this.string" otherOptionId="other.string" otherHolderId="enablement.other"/>
+			  </enablement>
+		  </option> 		  
+		  <option
+			  defaultValue="false"
+			  name="28"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkOpt.all.Q.this.boolean.Q.other.boolean"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<checkOption optionId="this.boolean" otherOptionId="other.boolean" otherHolderId="enablement.other"/>
+			  </enablement>
+		  </option> 
+		  <option
+			  defaultValue="false"
+			  name="29"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkString"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<checkString string="1.2.3" value="${ParentVersion}"/>
+			  </enablement>
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="30"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkString.2"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<checkString value="1.2.3" string="${ParentVersion}"/>
+			  </enablement>
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="31"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkString.3"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<checkString value="a ${ParentVersion} b" string="a ${ParentVersion} b"/>
+			  </enablement>
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="32"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkFalse.false"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<false/>
+			  </enablement>
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="33"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkNot.false"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<not>
+			  		<checkString string="1" value="1"/>
+			  	</not>
+			  </enablement>
+		  </option>		  
+		  <option
+			  defaultValue="false"
+			  name="34"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkOr.true"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<or>
+			  		<checkString string="1" value="2"/>
+			  		<checkString string="1" value="1"/>
+			  	</or>
+			  </enablement>
+		  </option>		
+		  <option
+			  defaultValue="false"
+			  name="35"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkAnd.false"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement type="ALL">
+			  	<and>
+			  		<checkString string="1" value="2"/>
+			  		<checkString string="1" value="1"/>
+			  	</and>
+			  </enablement>
+		  </option>		
+		  <option
+			  defaultValue="false"
+			  name="36"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="cmd"
+			  commandFalse="cmdF"
+			  id="enablement.checkHolder.true.1.false.2"
+			  valueType="boolean">
+			  <!--enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="cF1">
+			  	<checkString string="1" value="1"/>
+			  </enablement-->
+			  <enablement>
+			  		<checkHolder holderId="enablement.this.child_1.2.3"/>
+			  </enablement>
+		  </option>		  
+
+		  <option
+			  defaultValue="false"
+			  name="Posix.Nostdinc"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="-nostdinc"
+			  id="testgnu.enablement.c.compiler.option.preprocessor.nostdinc"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="command" value="test">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+			  <enablement type="UI_ENABLEMENT">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+			  <enablement type="UI_VISIBILITY">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+			  <enablement type="CMD_USAGE">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Nostdinc"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  commandFalse="-nostdinc"
+			  id="testgnu1.enablement.c.compiler.option.preprocessor.nostdinc"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="test">
+			  	<checkString string="1" value="1"/>
+			  </enablement>
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.PreprocOnly"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  command="-E"
+			  id="testgnu.enablement.c.compiler.option.preprocessor.preprocess"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="command" value="test">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+			  <enablement type="UI_ENABLEMENT">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+			  <enablement type="UI_VISIBILITY">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+			  <enablement type="CMD_USAGE">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.PreprocOnly"
+			  category="testgnu.enablement.c.compiler.category.preprocessor"
+			  commandFalse="-E"
+			  id="testgnu1.enablement.c.compiler.option.preprocessor.preprocess"
+			  valueType="boolean">
+			  <enablement type="CONTAINER_ATTRIBUTE" attribute="commandFalse" value="test">
+			  	<checkString string="1" value="2"/>
+			  </enablement>
+		  </option>
+		  <optionCategory
+			  owner="enablement.this"
+			  name="Symbols"
+			  id="testgnu.enablement.c.compiler.category.symbols">
+		  </optionCategory>
+		  <option
+			  name="Posix.DefSym"
+			  category="testgnu.enablement.c.compiler.category.symbols"
+			  command="-D"
+			  id="testgnu.enablement.c.compiler.option.preprocessor.def.symbols"
+			  valueType="definedSymbols">
+		  </option>
+		  <option
+			  name="Posix.UndefSym"
+			  category="testgnu.enablement.c.compiler.category.symbols"
+			  command="-U"
+			  id="testgnu.enablement.c.compiler.option.preprocessor.undef.symbol"
+			  valueType="stringList">
+		  </option>
+		  <optionCategory
+			  owner="enablement.this"
+			  name="Dirs"
+			  id="testgnu.enablement.c.compiler.category.dirs">
+		  </optionCategory>
+		  <option
+			  name="Posix.InclPaths"
+			  category="testgnu.enablement.c.compiler.category.dirs"
+			  command="-I"
+			  id="testgnu.enablement.c.compiler.option.include.paths"
+			  valueType="includePath"
+			  browseType="directory">
+		  </option>
+		  <optionCategory
+			  owner="enablement.this"
+			  name="Optimize"
+			  id="testgnu.enablement.c.compiler.category.optimization">
+		  </optionCategory>
+		  <option
+			  name="Posix.OptLevel"
+			  category="testgnu.enablement.c.compiler.category.optimization"
+			  id="this.enum"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+		  		  name="Posix.Optimize.None"
+				  isDefault="false"
+				  command="-O0"
+				  id="testgnu.enablement.c.optimization.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Optimize.Optimize"
+				  command="-O1"
+				  id="testgnu.enablement.c.optimization.level.optimize">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Optimize.More"
+				  isDefault="true"
+				  command="-O2"
+				  id="testgnu.enablement.c.optimization.level.more">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Optimize.Most"
+				  command="-O3"
+				  id="testgnu.enablement.c.optimization.level.most">
+		  </enumeratedOptionValue>
+		  </option>
+		  <option
+			  name="Posix.Optimize.Flags"
+			  category="testgnu.enablement.c.compiler.category.optimization"
+			  id="this.string"
+			  valueType="string">
+		  </option>
+		  <optionCategory
+			  owner="enablement.this"
+			  name="Debug"
+			  id="testgnu.enablement.c.compiler.category.debug">
+		  </optionCategory>
+		  <option
+			  name="Posix.DebugLevel"
+			  category="testgnu.enablement.c.compiler.category.debug"
+			  id="testgnu.enablement.c.compiler.option.debugging.level"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+				  name="Posix.Debug.None"
+				  isDefault="false"
+				  id="testgnu.enablement.c.debugging.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Debug.Min"
+				  command="-g1"
+				  id="testgnu.enablement.c.debugging.level.minimal">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Debug.Def"
+				  isDefault="true"
+				  command="-g"
+				  id="testgnu.enablement.c.debugging.level.default">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Debug.Max"
+				  isDefault="false"
+				  command="-g3"
+				  id="testgnu.enablement.c.debugging.level.max">
+		  </enumeratedOptionValue>
+		  </option>
+		  <option
+			  name="Posix.Debug.Other"
+			  category="testgnu.enablement.c.compiler.category.debug"
+			  id="testgnu.enablement.c.compiler.option.debugging.other"
+			  valueType="string">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Debug.gprof"
+			  category="testgnu.enablement.c.compiler.category.debug"
+			  command="-pg"
+			  id="testgnu.enablement.c.compiler.option.debugging.gprof"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Debug.prof"
+			  category="testgnu.enablement.c.compiler.category.debug"
+			  command="-p"
+			  id="testgnu.enablement.c.compiler.option.debugging.prof"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="enablement.this"
+			  name="Warn"
+			  id="testgnu.enablement.c.compiler.category.warnings">
+		  </optionCategory>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.Syntax"
+			  category="testgnu.enablement.c.compiler.category.warnings"
+			  command="-fsyntax-only"
+			  id="testgnu.enablement.c.compiler.option.warnings.syntax"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.Pedandic"
+			  category="testgnu.enablement.c.compiler.category.warnings"
+			  command="-pedantic"
+			  id="testgnu.enablement.c.compiler.option.warnings.pedantic"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.PedErrors"
+			  category="testgnu.enablement.c.compiler.category.warnings"
+			  command="-pedantic-errors"
+			  id="testgnu.enablement.c.compiler.option.warnings.pedantic.error"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.nowarn"
+			  category="testgnu.enablement.c.compiler.category.warnings"
+			  command="-w"
+			  id="testgnu.enablement.c.compiler.option.warnings.nowarn"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="true"
+			  name="Posix.Warn.allwarn"
+			  category="testgnu.enablement.c.compiler.category.warnings"
+			  command="-Wall"
+			  id="testgnu.enablement.c.compiler.option.warnings.allwarn"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Warn.toerrs"
+			  category="testgnu.enablement.c.compiler.category.warnings"
+			  command="-Werror"
+			  id="testgnu.enablement.c.compiler.option.warnings.toerrors"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="enablement.this"
+			  name="Misc"
+			  id="testgnu.enablement.c.compiler.category.other">
+		  </optionCategory>
+		  <option
+			  defaultValue="-c -fmessage-length=0"
+			  name="OtherFlags"
+			  category="testgnu.enablement.c.compiler.category.other"
+			  id="testgnu.enablement.c.compiler.option.misc.other"
+			  valueType="string">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Verbose"
+			  category="testgnu.enablement.c.compiler.category.other"
+			  command="-v"
+			  id="testgnu.enablement.c.compiler.option.misc.verbose"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Posix.Ansi"
+			  category="testgnu.enablement.c.compiler.category.other"
+			  command="-ansi"
+			  id="testgnu.enablement.c.compiler.option.misc.ansi"
+			  valueType="boolean">
+		  </option>
+	  </tool>
+	  
+	  <tool
+		  name="compiler.gnu.c"
+		  id="enablement.other"
+		  isAbstract="true"
+		  sources="cpp"
+		  command="gcc"
+		  dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator"
+		  headerExtensions="h"
+		  natureFilter="cnature"
+		  outputs="o"
+		  outputFlag="-o"
+		  isSystem="true">
+		 <optionCategory
+			  owner="enablement.other"
+			  name="Misc"
+			  id="cat.ather">
+		  </optionCategory>
+		  
+		 <option
+			  defaultValue="false"
+			  name="Posix.Ansi"
+			  category="cat.ather"
+			  command="-ansi"
+			  id="other.boolean"
+			  valueType="boolean"/> 
+		<option
+			  defaultValue="otherVal ${ParentVersion}"
+			  name="OtherFlags"
+			  category="cat.ather"
+			  id="other.string"
+			  valueType="string">
+		  </option>
+		<option
+			  name="Posix.DebugLevel"
+			  category="cat.ather"
+			  id="other.enum"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+				  name="Posix.Debug.None"
+				  isDefault="false"
+				  id="testgnu.enablement.c.debugging.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Debug.Min"
+				  command="-g1"
+				  id="other.enum.minimal">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Debug.Def"
+				  isDefault="true"
+				  command="-g"
+				  id="other.enum.default">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Posix.Debug.Max"
+				  isDefault="false"
+				  command="-g3"
+				  id="other.enum.max">
+		  </enumeratedOptionValue>
+		  </option>
+	</tool>
+
+    <!-- Interactive testing of option categories
+         Specifically of using the same option categories and options in
+         multiple tools in the same tool-chain.
+         This requires interactive testing of setting options -->
+       <tool
+         command="BaseCommand"
+         id="test1.baseTool"
+         isAbstract="false"
+         name="Base Tool"
+         isSystem="true">
+           <optionCategory
+             id="test1.baseTool.optionCategory"
+             name="Base Option Category1"/>
+           <option
+             category="test1.baseTool.optionCategory"
+             command="-aCmd"
+             defaultValue="BaseA"
+             id="test1.baseTool.optionA"
+             isAbstract="false"
+             name="Base Option A"
+             resourceFilter="all"
+             valueType="string"/>
+           <optionCategory
+             id="test1.baseTool.optionCategory2"
+             name="Base SubCategory2"
+             owner="test1.baseTool.optionCategory"/>
+           <option
+             category="test1.baseTool.optionCategory2"
+             command="-sub"
+             id="test1.baseTool.suboptionA"
+             name="SubOption A"
+             resourceFilter="all"
+             valueType="boolean"/>
+        </tool>
+        <projectType
+          id="test1.projectType"
+          isAbstract="false"
+          isTest="true"
+          name="Inheritance Test Project (case 1)">
+            <configuration
+              artifactExtension="out"
+              cleanCommand="rm -rf"
+              id="test1.configuration"
+              name="Test Configuration 1">
+		        <toolChain isSystem="true"
+	              archList="foo"
+	              id="test1.toolChain1"
+	              isAbstract="false"
+	              name="Test1 Tool Chain 1"
+	              osList="solaris,linux,hpux,aix,qnx"
+	              targetTool="test1.baseTool">
+		            <tool
+                      command="DerivedCommand1"
+                      id="test1.derivedToolOne"
+                      superClass="test1.baseTool">
+		            </tool>
+		            <tool
+                      command="DerivedCommand2"
+                      id="test1.derivedToolTwo"
+                      name="Derived Tool Two"
+                      superClass="test1.baseTool">
+		            </tool>
+		        </toolChain>
+	        </configuration>
+            <configuration
+              artifactExtension="out"
+              cleanCommand="rm -rf"
+              id="test1.configuration 2"
+              name="Test Configuration 2">
+		        <toolChain isSystem="true"
+	              archList="foo"
+	              id="test1.toolChain2"
+	              name="Test1 Tool Chain 2"
+	              targetTool="test1.baseTool">
+		            <tool
+                      id="test1.derivedToolOne2"
+                      superClass="test1.baseTool">
+		            </tool>
+		            <tool
+                      id="test1.derivedToolTwo2"
+                      name="Derived Tool Two"
+                      superClass="test1.baseTool">
+		            </tool>
+			       <tool
+			         command="xtra"
+			         id="test1.uniqueTool"
+			         name="Unique Tool">
+			           <optionCategory
+			             id="test1.uniqueTool.optionCategory"
+			             name="Unique Option Category1"/>
+			           <option
+			             category="test1.uniqueTool.optionCategory"
+			             command="-uopt"
+			             defaultValue="UniqueA"
+			             id="test1.uniqueTool.optionA"
+			             name="Unique Option A"
+			             resourceFilter="all"
+			             valueType="string"/>
+			        </tool>
+		        </toolChain>
+	        </configuration>
+        </projectType>
+    
+    <!-- projects for testing  the default dependency calculators -->
+      <projectType      
+            isAbstract="false"     
+            isTest="true"
+            name="DependencyCalculator2 Tester"
+            id="depcalc2.managedbuild.target.gnu.exe">
+         <configuration
+               name="Debug"
+               cleanCommand="rm"
+               id="depcalc2.managedbuild.config.gnu.exe.debug">
+			<toolChain isSystem="true"
+				id="test.dependency.calculator.2"
+				name="GCC using DependencyCalculator2"
+				superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
+			  <tool
+			      id="depcalc2.managedbuild.tool.gnu.c.compiler"
+			      superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
+		        <inputType
+					dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator2"
+		            id="depcalc2.managedbuild.tool.gnu.c.compiler.input"
+		            superClass="cdt.managedbuild.tool.gnu.c.compiler.input">
+		        </inputType>
+			  </tool>
+			  <tool
+			      id="depcalc2.managedbuild.tool.gnu.cpp.compiler"
+			      superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
+		        <inputType
+					dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator2"
+		            id="depcalc2.managedbuild.tool.gnu.cpp.compiler.input"
+		            superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input">
+		        </inputType>
+			  </tool>
+			</toolChain>
+		 </configuration>
+       </projectType>
+      <projectType      
+            isAbstract="false"     
+            isTest="true"
+            name="DependencyCalculator3 Tester"
+            id="depcalc3.managedbuild.target.gnu.exe">
+         <configuration
+               name="Debug"
+               cleanCommand="rm"
+               id="depcalc3.managedbuild.config.gnu.exe.debug">
+			<toolChain isSystem="true"
+				id="test.dependency.calculator.3"
+				name="GCC using DependencyCalculator3"
+				superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
+			  <tool
+			      id="depcalc3.managedbuild.tool.gnu.c.compiler"
+			      superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
+		        <inputType
+					dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator3"
+		            id="depcalc3.managedbuild.tool.gnu.c.compiler.input"
+		            superClass="cdt.managedbuild.tool.gnu.c.compiler.input">
+		        </inputType>
+			  </tool>
+			  <tool
+			      id="depcalc3.managedbuild.tool.gnu.cpp.compiler"
+			      superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
+		        <inputType
+					dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator3"
+		            id="depcalc3.managedbuild.tool.gnu.cpp.compiler.input"
+		            superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input">
+		        </inputType>
+			  </tool>
+			</toolChain>
+		 </configuration>
+       </projectType>
+      <projectType      
+            isAbstract="false"     
+            isTest="true"
+            name="DependencyCalculatorPreBuild Tester"
+            id="depcalcPreBuild.managedbuild.target.gnu.exe">
+         <configuration
+               name="Debug"
+               cleanCommand="rm"
+               id="depcalcPreBuild.managedbuild.config.gnu.exe.debug">
+			<toolChain isSystem="true"
+				id="test.dependency.calculator.PreBuild"
+				name="GCC using DependencyCalculatorPreBuild"
+				superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
+			  <tool
+			      id="depcalcPreBuild.managedbuild.tool.gnu.c.compiler"
+			      superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
+		        <inputType
+					dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculatorPreBuild"
+		            id="depcalcPreBuild.managedbuild.tool.gnu.c.compiler.input"
+		            superClass="cdt.managedbuild.tool.gnu.c.compiler.input">
+		        </inputType>
+			  </tool>
+			  <tool
+			      id="depcalcPreBuild.managedbuild.tool.gnu.cpp.compiler"
+			      superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
+		        <inputType
+					dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculatorPreBuild"
+		            id="depcalcPreBuild.managedbuild.tool.gnu.cpp.compiler.input"
+		            superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input">
+		        </inputType>
+			  </tool>
+			</toolChain>
+		 </configuration>
+       </projectType>
+
+        
+        <!-- specific proj types for testing build description model -->
+        
+              <projectType      
+            isAbstract="false"     
+            isTest="true"
+            name="MBS30TargetName.gnu.exe"
+            id="cdt.managedbuild.target.bdm.exe">
+         <configuration
+               name="MBS30ConfigName.Dbg"
+               id="cdt.managedbuild.config.bdm.exe.debug"
+               cleanCommand="rm -rf"
+			   errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser">
+               <toolChain isSystem="true"
+                     archList="all"
+                     osList="solaris,linux,hpux,aix,qnx"
+                     name="MBS30ToolChainName.Dbg"
+                     targetTool="cdt.managedbuild.tool.bdm.c.linker.exe.debug;cdt.managedbuild.tool.bdm.cpp.linker.exe.debug"
+                     scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+                     id="cdt.managedbuild.toolchain.bdm.exe.debug">
+		          <targetPlatform
+		              id="cdt.managedbuild.target.bdm.platform.exe.debug"
+		              name="MBS30PlatformName.Dbg"
+		              binaryParser="org.eclipse.cdt.core.ELF"
+		              osList="solaris,linux,hpux,aix,qnx"
+		              archList="all">
+	              </targetPlatform>
+				  <builder
+				      id="cdt.managedbuild.target.bdm.builder.exe.debug"
+		              name="MBS30BuilderName.Dbg"
+		              command="make"
+		              arguments="-k"
+		              buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator">
+		     	  </builder>               
+                  <tool
+                      id="cdt.managedbuild.tool.bdm.c.compiler.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu30.c.compiler">                          
+			  	      <option
+					      id="gnu.c.compiler.exe.debug.optionBdm.optimization.level"
+						  defaultValue="gnu.c.optimization.level.none"
+						  superClass="gnu.c.compiler.option30.optimization.level">
+					  </option>
+					  <option   
+					      id="gnu.c.compiler.exe.debug.optionBdm.debugging.level"					     
+						  defaultValue="gnu.c.debugging.level.max"
+					      superClass="gnu.c.compiler.option30.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+                      id="cdt.managedbuild.tool.bdm.cpp.compiler.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu30.cpp.compiler">                         
+                      <option
+				          id="gnu.cpp.compiler.exe.debug.optionBdm.optimization.level"
+                          defaultValue="gnu.cpp.compiler.optimization.level.none"
+                          superClass="gnu.cpp.compiler.option30.optimization.level">
+                      </option>
+                      <option
+						  id="gnu.cpp.compiler.exe.debug.optionBdm.debugging.level"
+                          defaultValue="gnu.cpp.compiler.debugging.level.max"
+                          superClass="gnu.cpp.compiler.option30.debugging.level">
+                      </option>
+                  </tool>
+                  <tool
+                      id="cdt.managedbuild.tool.bdm.c.linker.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu30.c.linker">
+                  </tool> 
+                  <tool
+      			       id="cdt.managedbuild.tool.bdm.cpp.linker.exe.debug"
+                      superClass="cdt.managedbuild.tool.testgnu30.cpp.linker">
+                  </tool> 
+                  
+         <tool
+            natureFilter="ccnature"
+            name="BDM test s1 to o1 tool"
+            outputFlag="-o"
+            command="g++"
+            id="cdt.managedbuild.tool.bdm.tool.1">
+
+         <inputType
+            sources="s1"
+			multipleOfType="false"
+            id="cdt.managedbuild.tool.bdm.tool.1.input">
+         </inputType>
+         <outputType
+			outputs="o1"
+            buildVariable="BDM_O1"
+            id="cdt.managedbuild.tool.bdm.tool.1.output">
+         </outputType>
+      </tool>
+
+         <tool
+            natureFilter="ccnature"
+            name="BDM test s2 + o1 to o tool"
+            outputFlag="-o"
+            command="g++"
+            id="cdt.managedbuild.tool.bdm.tool.2">
+
+         <inputType
+            sources="s2"
+			multipleOfType="false"
+            id="cdt.managedbuild.tool.bdm.tool.2.input">
+         </inputType>
+         <inputType
+	         id="cdt.managedbuild.tool.bdm.tool.2.input.addl">
+            <additionalInput
+            	paths="$(BDM_O1)"
+            	kind="additionalinputdependency">
+            </additionalInput>
+         </inputType>
+         <outputType
+			outputs="o"
+            buildVariable="OBJS"
+            id="cdt.managedbuild.tool.bdm.tool.2.output">
+         </outputType>
+      </tool>
+
+			  </toolChain>
+         </configuration>
+
+      </projectType>
+
+     <projectType
+           id="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest"
+           isAbstract="false"
+           isTest="true"
+           name="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest"
+           superClass="cdt.managedbuild.target.gnu30.exe">
+        <configuration
+              id="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest"
+              name="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest"
+              parent="cdt.managedbuild.config.testgnu30.exe.release">
+           <toolChain isSystem="true"
+                 id="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.toolChain"
+                 isAbstract="false"
+                 name="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.toolChain"
+                 superClass="cdt.managedbuild.toolchain.testgnu30.exe.release"
+                 unusedChildren="cdt.managedbuild.tool.testgnu30.c.compiler.exe.release;cdt.managedbuild.tool.testgnu30.cpp.compiler.exe.release;cdt.managedbuild.tool.testgnu30.c.linker.exe.release;cdt.managedbuild.tool.testgnu30.cpp.linker.exe.release">
+              <tool 
+                    id="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.c.compiler"
+                    isAbstract="false"
+                    name="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.c.compiler"
+                    superClass="cdt.managedbuild.tool.testgnu30.c.compiler.exe.release">
+                 <optionCategory
+                       id="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.optionCategory1"
+                       name="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.optionCategory1"
+                       owner="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.c.compiler"/>
+                  <option
+                        browseType="file"
+                        category="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.optionCategory1"
+                        command="--compilerInputTypeOption="
+                        id="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.c.compiler.inputTypeOption"
+                        isAbstract="false"
+                        name="inputTypeOption1"
+                        resourceFilter="all"
+                        valueType="stringList"/>
+                 <inputType
+                       id="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.c.compiler.inputType2"
+                       name="inputTypeOption1"
+                       option="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.c.compiler.inputTypeOption"/>
+              </tool>
+              <tool
+                    id="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.c.linker"
+                    isAbstract="false"
+                    name="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.c.linker"
+                    superClass="cdt.managedbuild.tool.testgnu30.c.linker.exe.release">
+                 <optionCategory
+                       id="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.optionCategory2"
+                       name="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.optionCategory2"
+                       owner="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.c.linker"/>
+                  <option
+                        browseType="file"
+                        category="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.optionCategory2"
+                        command="--linkerInputTypeOption="
+                        id="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.c.linker.inputTypeOption"
+                        isAbstract="false"
+                        name="inputTypeOption2"
+                        resourceFilter="all"
+                        valueType="stringList"/>
+                 <inputType
+                       id="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.c.linker.inputType2"
+                       name="inputTypeOption2"
+                       option="org.eclipse.cdt.managedbuilder.core.tests.inputTypeOptionMakefileRenderingTest.c.linker.inputTypeOption"/>
+              </tool>
+           </toolChain>
+        </configuration>
+     </projectType>
+     
+
+   </extension>
+   
+   <!-- The following buildDefinitions support the test in org.eclipse.cdt.managedbuilder.core.tests.PathConverterTest -->
+   <extension
+         point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
+      <managedBuildRevision fileVersion="3.1.0"/>
+      <toolChain isSystem="true"
+            id="pathconvertertest.convertingtoolchain"
+            isAbstract="false"
+            name="path converting toolchain"
+            optionPathConverter="org.eclipse.cdt.managedbuilder.core.tests.TestPathConverter1"/>
+      <toolChain isSystem="true"
+            id="pathconvertertest.nonconvertingtoolchain"
+            isAbstract="false"
+            name="non path converting toolchain"
+            />
+      <tool
+            id="pathconvertertest.convertingtool"
+            isAbstract="false"
+            name="path converting tool"
+            isSystem="true"
+            optionPathConverter="org.eclipse.cdt.managedbuilder.core.tests.TestPathConverter2">
+                  <option
+                        id="pathconvertertest.convertingtool.includeOption"
+                        isAbstract="false"
+                        name="Include Paths"
+                        resourceFilter="all"
+                        valueType="includePath">
+                     <listOptionValue value="file:///usr/local/include"/>
+                  </option>
+             </tool>
+      <tool
+            id="pathconvertertest.nonconvertingtool"
+            isAbstract="false"
+            name="non path converting tool"
+            isSystem="true"
+            />
+      <projectType
+            id="pathconvertertest.projecttype"
+            isAbstract="false"
+            isTest="true"
+            name="pathconvertertest">
+         <configuration
+               id="pathconvertertest.tcnn.tonn"
+               name="config toolchain-nn, tool-nn">
+            <toolChain isSystem="true"
+                  id="pathconvertertest.config.tcnn.tonn.toolchain"
+                  isAbstract="false"
+                  name="toolchain tcnn tonn"
+                  superClass="pathconvertertest.nonconvertingtoolchain">
+               <builder
+                     id="pathconvertertest.config.tcnn.tonn.toolchain.builder"
+                     isAbstract="false"
+                     isVariableCaseSensitive="false"
+                     name="builder tcnn tonn"/>
+               <targetPlatform
+                     id="pathconvertertest.config.tcnn.tonn.toolchain.targetplatform"
+                     isAbstract="false"
+                     name="targetplatform tcnn tonn"/>
+               <tool
+                     id="pathconvertertest.config.tcnn.tonn.toolchain.tool"
+                     isAbstract="false"
+                     name="tool tcnn tonn"
+                     superClass="pathconvertertest.nonconvertingtool">
+               </tool>
+            </toolChain>
+         </configuration>
+         <configuration
+               id="pathconvertertest.tcny.tonn"
+               name="config toolchain-ny, tool-nn">
+            <toolChain isSystem="true"
+                  id="pathconvertertest.config.tcny.tonn.toolchain"
+                  isAbstract="false"
+                  name="toolchain tcny tonn"
+                  superClass="pathconvertertest.convertingtoolchain">
+               <builder
+                     id="pathconvertertest.config.tcny.tonn.toolchain.builder"
+                     isAbstract="false"
+                     isVariableCaseSensitive="false"
+                     name="builder tcny tonn"/>
+               <targetPlatform
+                     id="pathconvertertest.config.tcny.tonn.toolchain.targetplatform"
+                     isAbstract="false"
+                     name="targetplatform tcny tonn"/>
+               <tool
+                     id="pathconvertertest.config.tcny.tonn.toolchain.tool"
+                     isAbstract="false"
+                     name="tool tcny tonn"
+                     superClass="pathconvertertest.nonconvertingtool"/>
+            </toolChain>
+         </configuration>
+         <configuration
+               id="pathconvertertest.tcyy.tonn"
+               name="config toolchain-yy, tool-nn">
+            <toolChain isSystem="true"
+                  id="pathconvertertest.config.tcyy.tonn.toolchain"
+                  isAbstract="false"
+                  name="toolchain tcyy tonn"
+                  optionPathConverter="org.eclipse.cdt.managedbuilder.core.tests.TestPathConverter3"
+                  superClass="pathconvertertest.convertingtoolchain">
+               <builder
+                     id="pathconvertertest.config.tcyy.tonn.toolchain.builder"
+                     isAbstract="false"
+                     isVariableCaseSensitive="false"
+                     name="builder tcyy tonn"/>
+               <targetPlatform
+                     id="pathconvertertest.config.tcyy.tonn.toolchain.targetplatform"
+                     isAbstract="false"
+                     name="targetplatform tcyy tonn"/>
+               <tool
+                     id="pathconvertertest.config.tcyy.tonn.toolchain.tool"
+                     isAbstract="false"
+                     name="tool tcyy tonn"
+                     superClass="pathconvertertest.nonconvertingtool"/>
+            </toolChain>
+         </configuration>
+         <configuration
+               id="pathconvertertest.tcyy.tony"
+               name="config toolchain-yy, tool-ny">
+            <toolChain isSystem="true"
+                  id="pathconvertertest.config.tcyy.tony.toolchain"
+                  isAbstract="false"
+                  name="toolchain tcyy tony"
+                  optionPathConverter="org.eclipse.cdt.managedbuilder.core.tests.TestPathConverter3"
+                  superClass="pathconvertertest.convertingtoolchain">
+               <builder
+                     id="pathconvertertest.config.tcyy.tony.toolchain.builder"
+                     isAbstract="false"
+                     isVariableCaseSensitive="false"
+                     name="builder tcyy tony"/>
+               <targetPlatform
+                     id="pathconvertertest.config.tcyy.tony.toolchain.targetplatform"
+                     isAbstract="false"
+                     name="targetplatform tcyy tony"/>
+               <tool
+                     id="pathconvertertest.config.tcyy.tony.toolchain.tool"
+                     isAbstract="false"
+                     name="tool tcyy tony"
+                     superClass="pathconvertertest.convertingtool"/>
+            </toolChain>
+         </configuration>
+         <configuration
+               id="pathconvertertest.tcyy.toyy"
+               name="config toolchain-yy, tool-yy">
+            <toolChain isSystem="true"
+                  id="pathconvertertest.config.tcyy.toyy.toolchain"
+                  isAbstract="false"
+                  name="toolchain tcyy toyy"
+                  optionPathConverter="org.eclipse.cdt.managedbuilder.core.tests.TestPathConverter3"
+                  superClass="pathconvertertest.convertingtoolchain">
+               <builder
+                     id="pathconvertertest.config.tcyy.toyy.toolchain.builder"
+                     isAbstract="false"
+                     isVariableCaseSensitive="false"
+                     name="builder tcyy toyy"/>
+               <targetPlatform
+                     id="pathconvertertest.config.tcyy.toyy.toolchain.targetplatform"
+                     isAbstract="false"
+                     name="targetplatform tcyy toyy"/>
+               <tool
+                     id="pathconvertertest.config.tcyy.toyy.toolchain.tool"
+                     isAbstract="false"
+                     name="tool tcyy toyy"
+                     optionPathConverter="org.eclipse.cdt.managedbuilder.core.tests.TestPathConverter4"
+                     superClass="pathconvertertest.convertingtool"/>
+            </toolChain>
+         </configuration>
+      </projectType>
+      
+      <tool
+                     id="lv.tests.tool.base"
+                     isAbstract="false"
+                     isSystem="true"
+                     name="lv.tests tool">
+             <option
+                  name="List Option in Top"
+                  command="-L"
+                  valueType="stringList"
+                  id="lv.tests.list.option">
+               <listOptionValue
+                     value="a">
+               </listOptionValue>
+               <listOptionValue
+                     value="b"
+                     builtIn="false">
+               </listOptionValue>
+               <listOptionValue
+                     value="c"
+                     builtIn="true">
+               </listOptionValue>
+            </option>
+             <option
+                  name="List Option in Top"
+                  command="-L"
+                  valueType="libFiles"
+                  id="lv.tests.libFiles.option">
+               <listOptionValue
+                     value="lf_a">
+               </listOptionValue>
+               <listOptionValue
+                     value="lf_b"
+                     builtIn="false">
+               </listOptionValue>
+               <listOptionValue
+                     value="lf_c"
+                     builtIn="true">
+               </listOptionValue>
+            </option>
+            <inputType
+                  id="lv.test.it"
+                  sources="c,cpp">
+            </inputType>
+       </tool>
+      
+      <projectType
+            id="lv.tests.ptype"
+            isAbstract="false"
+            isTest="true"
+            name="lv_tests">
+         <configuration
+               id="lv.tests.cfg1"
+               name="lvTests">
+            <toolChain isSystem="true"
+                  id="lv.tests.tc"
+                  isAbstract="false"
+                  name="lv tests tc">
+               <builder
+                     id="lv.tests.builder"
+                     isAbstract="false"
+                     isVariableCaseSensitive="false"
+                     name="lv tests b"/>
+               <targetPlatform
+                     id="lv.tests.targetplatform"
+                     isAbstract="false"
+                     name="lv.tests targetplatform"/>
+               <tool
+                     id="lv.tests.tool"
+                     isAbstract="false"
+                     name="lv.tests tool"
+                     superClass="lv.tests.tool.base">
+             <!--option
+                  name="List Option in Top"
+                  command="-L"
+                  valueType="stringList"
+                  id="lv.tests.list.option.2">
+               <listOptionValue
+                     value="a2">
+               </listOptionValue>
+               <listOptionValue
+                     value="b2"
+                     builtIn="false">
+               </listOptionValue>
+               <listOptionValue
+                     value="c2"
+                     builtIn="true">
+               </listOptionValue>
+            </option>
+             <option
+                  name="List Option in Top"
+                  command="-L"
+                  valueType="libFiles"
+                  id="lv.tests.libFile.option.2">
+               <listOptionValue
+                     value="lf_a2">
+               </listOptionValue>
+               <listOptionValue
+                     value="lf_b2"
+                     builtIn="false">
+               </listOptionValue>
+               <listOptionValue
+                     value="lf_c2"
+                     builtIn="true">
+               </listOptionValue>
+            </option-->
+               </tool>
+            </toolChain>
+         </configuration>
+
+      </projectType>
+
+   </extension>
+   
+   <extension
+         point="org.eclipse.cdt.core.templates">
+      <template
+            id="org.eclipse.cdt.managedbuilder.core.tests.templates.AppendToMBSStringOptionValue"
+            filterPattern=".*AppendToMBSStringOptionValue"
+            location="testdata/AppendToMBSStringOptionValue.xml"
+            projectType="org.eclipse.cdt.managedbuilder.core.tests.projectType"/>
+      <template
+            id="org.eclipse.cdt.managedbuilder.core.tests.templates.AppendToMBSStringListOptionValues"
+            filterPattern=".*AppendToMBSStringListOptionValues"
+            location="testdata/AppendToMBSStringListOptionValues.xml"
+            projectType="org.eclipse.cdt.managedbuilder.core.tests.projectType"/>
+      <template
+            id="org.eclipse.cdt.managedbuilder.core.tests.templates.CreateIncludeFolder"
+            filterPattern=".*CreateIncludeFolder"
+            location="testdata/CreateIncludeFolder.xml"
+            projectType="org.eclipse.cdt.managedbuilder.core.tests.projectType"/>
+      <template
+            id="org.eclipse.cdt.managedbuilder.core.tests.templates.ExcludeResources"
+            filterPattern=".*ExcludeResources"
+            location="testdata/ExcludeResources.xml"
+            projectType="org.eclipse.cdt.managedbuilder.core.tests.projectType"/>
+      <template
+            id="org.eclipse.cdt.managedbuilder.core.tests.templates.NewManagedProject"
+            filterPattern=".*NewManagedProject"
+            location="testdata/NewManagedProject.xml"
+            projectType="org.eclipse.cdt.managedbuilder.core.tests.projectType"/>
+      <template
+            id="org.eclipse.cdt.managedbuilder.core.tests.templates.SetMBSBooleanOptionValue"
+            filterPattern=".*SetMBSBooleanOptionValue"
+            location="testdata/SetMBSBooleanOptionValue.xml"
+            projectType="org.eclipse.cdt.managedbuilder.core.tests.projectType"/>
+      <template
+            id="org.eclipse.cdt.managedbuilder.core.tests.templates.SetMBSStringOptionValue"
+            filterPattern=".*SetMBSStringOptionValue"
+            location="testdata/SetMBSStringOptionValue.xml"
+            projectType="org.eclipse.cdt.managedbuilder.core.tests.projectType"/>
+      <template
+            id="org.eclipse.cdt.managedbuilder.core.tests.templates.SetMBSStringListOptionValues"
+            filterPattern=".*SetMBSStringListOptionValues"
+            location="testdata/SetMBSStringListOptionValues.xml"
+            projectType="org.eclipse.cdt.managedbuilder.core.tests.projectType"/>
+   </extension>
+   
+   <!-- 4.0 tests -->
+   <extension
+         id="test.four.dot.zero.cdt.managed.build.info"
+         name="Managed Build Tools Description"
+         point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
+      <managedBuildRevision
+            fileVersion="4.0.0">
+      </managedBuildRevision>
+      <tool
+            natureFilter="cnature"
+            name="Test 4.0 ToolName.linker.gnu.c"
+            outputFlag="-o"
+		  isSystem="true"
+            command="gcc"
+            id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker"
+            errorParsers="org.eclipse.cdt.core.GLDErrorParser">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+	            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+            </property>
+            </supportedProperties>
+         <envVarBuildPath 
+         	pathType="buildpathLibrary"
+         	variableList="LIBRARY_PATH">
+         </envVarBuildPath>
+         
+         <optionCategory
+               owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker"
+               name="Test 4.0 OptionCategory.General"
+               id="test.gnu.c.link.category.general">
+         </optionCategory>
+         <option
+               defaultValue="false"
+               name="Test 4.0 Option.Posix.Linker.NoStartFiles"
+               category="test.gnu.c.link.category.general"
+               command="-nostartfiles"
+               id="test.gnu.c.link.option.nostart"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="Test 4.0 Option.Posix.Linker.NoDefLibs"
+               category="test.gnu.c.link.category.general"
+               command="-nodefaultlibs"
+               id="test.gnu.c.link.option.nodeflibs"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="Test 4.0 Option.Posix.Linker.NoStdLibs"
+               category="test.gnu.c.link.category.general"
+               command="-nostdlib"
+               id="test.gnu.c.link.option.nostdlibs"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="Test 4.0 Option.Posix.Linker.Strip"
+               category="test.gnu.c.link.category.general"
+               command="-s"
+               id="test.gnu.c.link.option.strip"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="Test 4.0 Option.Posix.Linker.Static"
+               category="test.gnu.c.link.category.general"
+               command="-static"
+               id="test.gnu.c.link.option.noshared"
+               valueType="boolean">
+         </option>
+         <optionCategory
+               owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker"
+               name="Test 4.0 OptionCategory.Libs"
+               id="test.gnu.c.link.category.libs">
+         </optionCategory>
+         <option
+               name="Test 4.0 Option.Posix.Libs"
+               category="test.gnu.c.link.category.libs"
+               command="-l"
+               id="test.gnu.c.link.option.libs"
+               browseType="none"
+               valueType="libs">
+         </option>
+         <option
+               name="Test 4.0 Option.Posix.Libsearch"
+               category="test.gnu.c.link.category.libs"
+               command="-L"
+               id="test.gnu.c.link.option.paths"
+               browseType="directory"
+               valueType="libPaths">
+         </option>
+         <optionCategory
+               owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker"
+               name="Test 4.0 OptionCategory.Misc"
+               id="test.gnu.c.link.category.other">
+         </optionCategory>
+         <option
+               name="Test 4.0 Option.Posix.Linker.Flags"
+               category="test.gnu.c.link.category.other"
+               valueType="string"
+               id="test.gnu.c.link.option.ldflags">
+         </option>
+         <option
+               name="Test 4.0 Option.Posix.Linker.XLinker"
+               category="test.gnu.c.link.category.other"
+               command="-Xlinker ${VALUE}"
+               valueType="stringList"
+               id="test.gnu.c.link.option.other">
+         </option>
+         <option
+               name="Test 4.0 Option.Posix.UserObjs"
+               category="test.gnu.c.link.category.other"
+               browseType="file"
+               valueType="userObjs"
+               id="test.gnu.c.link.option.userobjs">
+         </option>
+         <optionCategory
+               owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker"
+               name="Test 4.0 OptionCategory.Shared.Settings"
+               id="test.gnu.c.link.category.shared">
+         </optionCategory>
+         <option
+               defaultValue="false"
+               name="Test 4.0 Option.Posix.Linker.Shared"
+               category="test.gnu.c.link.category.shared"
+               command="-shared"
+               id="test.gnu.c.link.option.shared"
+               valueType="boolean">
+              <enablement 
+              	type="CONTAINER_ATTRIBUTE" 
+              	attribute="defaultValue" 
+              	value="true"
+              	extensionAdjustment="false">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildArtefactType"
+			  		value="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+			  </enablement>
+         </option>
+         <option
+               name="Test 4.0 Option.Posix.Linker.SOName"
+               category="test.gnu.c.link.category.shared"
+               command="-Wl,-soname="
+               id="test.gnu.c.link.option.soname"
+               valueType="string">
+         </option>
+         <option
+               name="Test 4.0 Option.Posix.Linker.Implib"
+               category="test.gnu.c.link.category.shared"
+               command="-Wl,--out-implib="
+               id="test.gnu.c.link.option.implname"
+               valueType="string">
+         </option>
+         <option
+               name="Test 4.0 Option.Posix.Linker.Defname"
+               category="test.gnu.c.link.category.shared"
+               command="-Wl,--output-def="
+               id="test.gnu.c.link.option.defname"
+               valueType="string">
+         </option>
+         <inputType
+            sourceContentType="org.eclipse.cdt.managedbuilder.core.compiledObjectFile"
+            sources="o"
+			multipleOfType="true"
+            dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator"
+            buildVariable="OBJS"
+            id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.input">
+            <additionalInput
+            	paths="$(USER_OBJS)"
+            	kind="additionalinputdependency">
+            </additionalInput>
+            <additionalInput
+            	paths="$(LIBS)"
+            	kind="additionalinput">
+            </additionalInput>
+         </inputType>
+         <outputType
+			outputs=""
+            buildVariable="EXECUTABLES"
+            nameProvider="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuLinkOutputNameProvider"
+            id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.output">
+             <enablement 
+              	type="ALL">
+			  	<checkOption 
+			  		optionId="test.gnu.c.link.option.shared"
+			  		value="false"/>
+			  </enablement>
+         </outputType>
+         <outputType
+		    outputs="so"
+			outputPrefix="lib"
+            nameProvider="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuLinkOutputNameProvider"
+			buildVariable="LIBRARIES"
+			id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.output.so">
+             <enablement 
+              	type="ALL">
+			  	<checkOption 
+			  		optionId="test.gnu.c.link.option.shared"
+			  		value="true"/>
+			  </enablement>
+		 </outputType>
+      </tool>
+      <tool
+            natureFilter="ccnature"
+            name="Test 4.0 ToolName.linker.gnu.cpp"
+		  isSystem="true"
+            outputFlag="-o"
+            command="g++"
+            id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker"
+            errorParsers="org.eclipse.cdt.core.GLDErrorParser">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+	            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+            </property>
+            </supportedProperties>
+         <envVarBuildPath 
+         	pathType="buildpathLibrary"
+         	variableList="LIBRARY_PATH">
+         </envVarBuildPath>
+         <optionCategory
+               owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker"
+               name="Test 4.0 OptionCategory.General"
+               id="test.gnu.cpp.link.category.options">
+         </optionCategory>
+         <option
+               defaultValue="false"
+               name="Test 4.0 Option.Posix.Linker.NoStartFiles"
+               category="test.gnu.cpp.link.category.options"
+               command="-nostartfiles"
+               id="test.gnu.cpp.link.option.nostart"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="Test 4.0 Option.Posix.Linker.NoDefLibs"
+               category="test.gnu.cpp.link.category.options"
+               command="-nodefaultlibs"
+               id="test.gnu.cpp.link.option.nodeflibs"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="Test 4.0 Option.Posix.Linker.NoStdLibs"
+               category="test.gnu.cpp.link.category.options"
+               command="-nostdlib"
+               id="test.gnu.cpp.link.option.nostdlibs"
+               valueType="boolean">
+         </option>
+         <option
+               defaultValue="false"
+               name="Test 4.0 Option.Posix.Linker.Strip"
+               category="test.gnu.cpp.link.category.options"
+               command="-s"
+               id="test.gnu.cpp.link.option.strip"
+               valueType="boolean">
+         </option>
+         <optionCategory
+               owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker"
+               name="Test 4.0 OptionCategory.Libs"
+               id="test.gnu.cpp.link.category.libs">
+         </optionCategory>
+         <option
+               name="Test 4.0 Option.Posix.Libs"
+               category="test.gnu.cpp.link.category.libs"
+               command="-l"
+               id="test.gnu.cpp.link.option.libs"
+               browseType="none"
+               valueType="libs">
+         </option>
+         <option
+               name="Test 4.0 Option.Posix.Libsearch"
+               category="test.gnu.cpp.link.category.libs"
+               command="-L"
+               id="test.gnu.cpp.link.option.paths"
+               browseType="directory"
+               valueType="libPaths">
+         </option>
+         <optionCategory
+               owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker"
+               name="Test 4.0 OptionCategory.Misc"
+               id="test.gnu.cpp.link.category.other">
+         </optionCategory>
+         <option
+               name="Test 4.0 Option.Posix.Linker.Flags"
+               category="test.gnu.cpp.link.category.other"
+               valueType="string"
+               id="test.gnu.cpp.link.option.flags">
+         </option>
+         <option
+               name="Test 4.0 Option.Posix.Linker.XLinker"
+               category="test.gnu.cpp.link.category.other"
+               command="-Xlinker ${VALUE}"
+               valueType="stringList"
+               id="test.gnu.cpp.link.option.other">
+         </option>
+         <option
+               name="Test 4.0 Option.Posix.UserObjs"
+               category="test.gnu.cpp.link.category.other"
+               browseType="file"
+               valueType="userObjs"
+               id="test.gnu.cpp.link.option.userobjs">
+         </option>
+         <optionCategory
+               owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker"
+               name="Test 4.0 OptionCategory.Shared.Settings"
+               id="test.gnu.cpp.link.category.shared">
+         </optionCategory>
+         <option
+               defaultValue="false"
+               name="Test 4.0 Option.Posix.Linker.Shared"
+               category="test.gnu.cpp.link.category.shared"
+               command="-shared"
+               valueType="boolean"
+               id="test.gnu.cpp.link.option.shared">
+               <enablement 
+              	type="CONTAINER_ATTRIBUTE" 
+              	attribute="defaultValue" 
+              	value="true"
+              	extensionAdjustment="false">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildArtefactType"
+			  		value="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+			  </enablement>
+         </option>
+         <option
+               name="Test 4.0 Option.Posix.Linker.SOName"
+               category="test.gnu.cpp.link.category.shared"
+               command="-Wl,-soname="
+               valueType="string"
+               id="test.gnu.cpp.link.option.soname">
+         </option>
+         <option
+               name="Test 4.0 Option.Posix.Linker.Implib"
+               category="test.gnu.cpp.link.category.shared"
+               command="-Wl,--out-implib="
+               valueType="string"
+               id="test.gnu.cpp.link.option.implname">
+         </option>
+         <option
+               name="Test 4.0 Option.Posix.Linker.Defname"
+               category="test.gnu.cpp.link.category.shared"
+               command="-Wl,--output-def="
+               valueType="string"
+               id="test.gnu.cpp.link.option.defname">
+         </option>
+         <inputType
+            sourceContentType="org.eclipse.cdt.managedbuilder.core.compiledObjectFile"
+            sources="o"
+			multipleOfType="true"
+            dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator"
+            buildVariable="OBJS"
+            id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.input">
+            <additionalInput
+            	paths="$(USER_OBJS)"
+            	kind="additionalinputdependency">
+            </additionalInput>
+            <additionalInput
+            	paths="$(LIBS)"
+            	kind="additionalinput">
+            </additionalInput>
+         </inputType>
+         <outputType
+			outputs=""
+            buildVariable="EXECUTABLES"
+            nameProvider="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuLinkOutputNameProvider"
+            id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.output">
+              <enablement 
+              	type="ALL">
+			  	<checkOption 
+			  		optionId="test.gnu.cpp.link.option.shared"
+			  		value="false"/>
+			  </enablement>
+         </outputType>
+         <outputType
+			  outputs="so"
+			  outputPrefix="lib"
+            nameProvider="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuLinkOutputNameProvider"
+	          buildVariable="LIBRARIES"
+              id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.output.so">
+              <enablement 
+              	type="ALL">
+			  	<checkOption 
+			  		optionId="test.gnu.cpp.link.option.shared"
+			  		value="true"/>
+			  </enablement>
+         </outputType>
+      </tool>
+      <tool
+            natureFilter="both"
+            isAbstract="true"
+            isSystem="true"
+            name="Test 4.0 ToolName.archiver.gnu"
+            command="ar"
+            id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
+            </property>
+            </supportedProperties>
+         <optionCategory
+               owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver"
+               name="Test 4.0 OptionCategory.General"
+               id="test.gnu.lib.category.general">
+         </optionCategory>
+         <option
+               defaultValue="-r"
+               name="Test 4.0 Option.Posix.Archiver.Flags"
+               category="test.gnu.lib.category.general"
+               valueType="string"
+               id="test.gnu.both.lib.option.flags">
+         </option>
+         <inputType
+            sourceContentType="org.eclipse.cdt.managedbuilder.core.compiledObjectFile"
+            sources="o"
+			multipleOfType="true"
+            dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator"
+            buildVariable="OBJS"
+            id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.input">
+            <additionalInput
+            	paths="$(USER_OBJS)"
+            	kind="additionalinputdependency">
+            </additionalInput>
+            <additionalInput
+            	paths="$(LIBS)"
+            	kind="additionalinput">
+            </additionalInput>
+         </inputType>
+         <outputType
+			outputs="a"
+            outputPrefix="lib"
+            buildVariable="ARCHIVES"
+            nameProvider="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuLinkOutputNameProvider"
+            id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.output">
+         </outputType>
+      </tool>
+
+      <tool
+            command="as"
+		  isSystem="true"
+            name="Test 4.0 ToolName.assembler.gnu"
+            outputFlag="-o"
+            id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler"
+            natureFilter="both"
+            errorParsers="org.eclipse.cdt.core.GASErrorParser">
+         <optionCategory
+               owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler"
+               name="Test 4.0 OptionCategory.General"
+               id="test.gnu.asm.category.general">
+         </optionCategory>
+         <option
+               name="Test 4.0 Option.Gnu.Assembler.Flags"
+               category="test.gnu.asm.category.general"
+               valueType="string"
+               id="test.gnu.both.asm.option.flags">
+         </option>
+         <option
+               command="-I"
+               valueType="includePath"
+               category="test.gnu.asm.category.general"
+               browseType="directory"
+               name="Test 4.0 Option.Posix.InclPaths"
+               id="test.gnu.both.asm.option.include.paths"/>
+         <option
+               command="-W"
+               defaultValue="false"
+               valueType="boolean"
+               category="test.gnu.asm.category.general"
+               name="Test 4.0 Option.Gnu.Assembler.warn.suppress"
+               id="test.gnu.both.asm.option.warnings.nowarn"/>
+         <option
+               command="-v"
+               defaultValue="false"
+               valueType="boolean"
+               category="test.gnu.asm.category.general"
+               name="Test 4.0 Option.Gnu.Assembler.version"
+               id="test.gnu.both.asm.option.version"/>
+         <inputType
+            sourceContentType="org.eclipse.cdt.core.asmSource"
+            sources="s,S"
+            id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.input">
+         </inputType>
+         <outputType
+			outputs="o"
+            buildVariable="OBJS"
+            id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.output">
+         </outputType>
+      </tool>
+
+      <tool
+		  name="Test 4.0 ToolName.compiler.gnu.c"
+		  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler"
+		  isSystem="true"
+		  isAbstract="true"
+		  command="gcc"
+		  natureFilter="both"
+		  outputFlag="-o"
+		  errorParsers="org.eclipse.cdt.core.GCCErrorParser">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildType">
+	            <value id="org.eclipse.cdt.build.core.buildType.debug"/>
+    	        <value id="org.eclipse.cdt.build.core.buildType.release"/>
+            </property>
+            </supportedProperties>
+         <envVarBuildPath 
+         	pathType="buildpathInclude"
+         	variableList="CPATH,C_INCLUDE_PATH">
+         </envVarBuildPath>
+		  <optionCategory
+		      owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler"
+			  name="Test 4.0 OptionCategory.Preproc"
+			  id="test.gnu.c.compiler.category.preprocessor">
+		  </optionCategory>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Nostdinc"
+			  category="test.gnu.c.compiler.category.preprocessor"
+			  command="-nostdinc"
+			  id="test.gnu.c.compiler.option.preprocessor.nostdinc"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.PreprocOnly"
+			  category="test.gnu.c.compiler.category.preprocessor"
+			  command="-E"
+			  id="test.gnu.c.compiler.option.preprocessor.preprocess"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler"
+			  name="Test 4.0 OptionCategory.Symbols"
+			  id="test.gnu.c.compiler.category.symbols">
+		  </optionCategory>
+		  <option
+			  name="Test 4.0 Option.Posix.DefSym"
+			  category="test.gnu.c.compiler.category.symbols"
+			  command="-D"
+			  id="test.gnu.c.compiler.option.preprocessor.def.symbols"
+			  valueType="definedSymbols">
+		  </option>
+		  <option
+			  name="Test 4.0 Option.Posix.UndefSym"
+			  category="test.gnu.c.compiler.category.symbols"
+			  command="-U"
+			  id="test.gnu.c.compiler.option.preprocessor.undef.symbol"
+			  valueType="undefDefinedSymbols">
+		  </option>
+		  <optionCategory
+			  owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler"
+			  name="Test 4.0 OptionCategory.Dirs"
+			  id="test.gnu.c.compiler.category.dirs">
+		  </optionCategory>
+		  <option
+			  name="Test 4.0 Option.Posix.InclPaths"
+			  category="test.gnu.c.compiler.category.dirs"
+			  command="-I"
+			  id="test.gnu.c.compiler.option.include.paths"
+			  valueType="includePath"
+			  browseType="directory">
+		  </option>
+		  <optionCategory
+			  owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler"
+			  name="Test 4.0 OptionCategory.Optimize"
+			  id="test.gnu.c.compiler.category.optimization">
+		  </optionCategory>
+		  <option
+			  name="Test 4.0 Option.Posix.OptLevel"
+			  category="test.gnu.c.compiler.category.optimization"
+			  id="test.gnu.c.compiler.option.optimization.level"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+		  		  name="Test 4.0 Option.Posix.Optimize.None"
+				  isDefault="false"
+				  command="-O0"
+				  id="test.gnu.c.optimization.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Optimize.Optimize"
+				  command="-O1"
+				  id="test.gnu.c.optimization.level.optimize">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Optimize.More"
+				  isDefault="true"
+				  command="-O2"
+				  id="test.gnu.c.optimization.level.more">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Optimize.Most"
+				  command="-O3"
+				  id="test.gnu.c.optimization.level.most">
+		  </enumeratedOptionValue>
+		      <enablement 
+              	type="CONTAINER_ATTRIBUTE" 
+              	attribute="defaultValue" 
+              	value="test.gnu.c.optimization.level.most"
+              	extensionAdjustment="false">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildType"
+			  		value="org.eclipse.cdt.build.core.buildType.release"/>
+			  </enablement>
+              <enablement 
+              	type="CONTAINER_ATTRIBUTE" 
+              	attribute="defaultValue" 
+              	value="test.gnu.c.optimization.level.none"
+              	extensionAdjustment="false">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildType"
+			  		value="org.eclipse.cdt.build.core.buildType.debug"/>
+			  </enablement>
+		  
+		  </option>
+		  <option
+			  name="Test 4.0 Option.Posix.Optimize.Flags"
+			  category="test.gnu.c.compiler.category.optimization"
+			  id="test.gnu.c.compiler.option.optimization.flags"
+			  valueType="string">
+		  </option>
+		  <optionCategory
+			  owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler"
+			  name="Test 4.0 OptionCategory.Debug"
+			  id="test.gnu.c.compiler.category.debug">
+		  </optionCategory>
+		  <option
+			  name="Test 4.0 Option.Posix.DebugLevel"
+			  category="test.gnu.c.compiler.category.debug"
+			  id="test.gnu.c.compiler.option.debugging.level"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Debug.None"
+				  isDefault="false"
+				  id="test.gnu.c.debugging.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Debug.Min"
+				  command="-g1"
+				  id="test.gnu.c.debugging.level.minimal">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Debug.Def"
+				  isDefault="true"
+				  command="-g"
+				  id="test.gnu.c.debugging.level.default">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Debug.Max"
+				  isDefault="false"
+				  command="-g3"
+				  id="test.gnu.c.debugging.level.max">
+		  </enumeratedOptionValue>
+		      <enablement 
+              	type="CONTAINER_ATTRIBUTE" 
+              	attribute="value" 
+              	value="test.gnu.c.debugging.level.none"
+              	extensionAdjustment="false">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildType"
+			  		value="org.eclipse.cdt.build.core.buildType.release"/>
+			  </enablement>
+              <enablement 
+              	type="CONTAINER_ATTRIBUTE" 
+              	attribute="value" 
+              	value="test.gnu.c.debugging.level.max"
+              	extensionAdjustment="false">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildType"
+			  		value="org.eclipse.cdt.build.core.buildType.debug"/>
+			  </enablement>
+		  
+		  </option>
+		  <option
+			  name="Test 4.0 Option.Posix.Debug.Other"
+			  category="test.gnu.c.compiler.category.debug"
+			  id="test.gnu.c.compiler.option.debugging.other"
+			  valueType="string">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Debug.gprof"
+			  category="test.gnu.c.compiler.category.debug"
+			  command="-pg"
+			  id="test.gnu.c.compiler.option.debugging.gprof"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Debug.prof"
+			  category="test.gnu.c.compiler.category.debug"
+			  command="-p"
+			  id="test.gnu.c.compiler.option.debugging.prof"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler"
+			  name="Test 4.0 OptionCategory.Warn"
+			  id="test.gnu.c.compiler.category.warnings">
+		  </optionCategory>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Warn.Syntax"
+			  category="test.gnu.c.compiler.category.warnings"
+			  command="-fsyntax-only"
+			  id="test.gnu.c.compiler.option.warnings.syntax"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Warn.Pedandic"
+			  category="test.gnu.c.compiler.category.warnings"
+			  command="-pedantic"
+			  id="test.gnu.c.compiler.option.warnings.pedantic"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Warn.PedErrors"
+			  category="test.gnu.c.compiler.category.warnings"
+			  command="-pedantic-errors"
+			  id="test.gnu.c.compiler.option.warnings.pedantic.error"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Warn.nowarn"
+			  category="test.gnu.c.compiler.category.warnings"
+			  command="-w"
+			  id="test.gnu.c.compiler.option.warnings.nowarn"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="true"
+			  name="Test 4.0 Option.Posix.Warn.allwarn"
+			  category="test.gnu.c.compiler.category.warnings"
+			  command="-Wall"
+			  id="test.gnu.c.compiler.option.warnings.allwarn"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Warn.toerrs"
+			  category="test.gnu.c.compiler.category.warnings"
+			  command="-Werror"
+			  id="test.gnu.c.compiler.option.warnings.toerrors"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler"
+			  name="Test 4.0 OptionCategory.Misc"
+			  id="test.gnu.c.compiler.category.other">
+		  </optionCategory>
+		  <option
+			  defaultValue="-c -fmessage-length=0"
+			  name="Test 4.0 Option.OtherFlags"
+			  category="test.gnu.c.compiler.category.other"
+			  id="test.gnu.c.compiler.option.misc.other"
+			  valueType="string">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Verbose"
+			  category="test.gnu.c.compiler.category.other"
+			  command="-v"
+			  id="test.gnu.c.compiler.option.misc.verbose"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Ansi"
+			  category="test.gnu.c.compiler.category.other"
+			  command="-ansi"
+			  id="test.gnu.c.compiler.option.misc.ansi"
+			  valueType="boolean">
+		  </option>
+          <inputType
+              sourceContentType="org.eclipse.cdt.core.cSource"
+		      sources="c"
+              dependencyContentType="org.eclipse.cdt.core.cHeader"
+			  dependencyExtensions="h"
+			  dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator2"
+              id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.input"
+              languageId="org.eclipse.cdt.core.gcc">
+          </inputType>
+          <outputType
+			  outputs="o"
+              buildVariable="OBJS"
+              id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.output">
+          </outputType>
+	  </tool>
+	  <tool
+		  name="Test 4.0 ToolName.compiler.gnu.cpp"
+		  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler"
+		  isAbstract="true"
+		  isSystem="true"
+		  command="g++"
+		  natureFilter="ccnature"
+		  outputFlag="-o"
+		  errorParsers="org.eclipse.cdt.core.GCCErrorParser">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildType">
+	            <value id="org.eclipse.cdt.build.core.buildType.debug"/>
+    	        <value id="org.eclipse.cdt.build.core.buildType.release"/>
+            </property>
+            </supportedProperties>
+         <envVarBuildPath 
+         	pathType="buildpathInclude"
+         	variableList="CPATH,CPLUS_INCLUDE_PATH">
+         </envVarBuildPath>
+		  <optionCategory
+			  owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler"
+			  name="Test 4.0 OptionCategory.Preproc"
+			  id="test.gnu.cpp.compiler.category.preprocessor">
+		  </optionCategory>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Nostdinc"
+			  category="test.gnu.cpp.compiler.category.preprocessor"
+			  command="-nostdinc"
+			  id="test.gnu.cpp.compiler.option.preprocessor.nostdinc"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.PreprocOnly"
+			  category="test.gnu.cpp.compiler.category.preprocessor"
+			  command="-E"
+			  id="test.gnu.cpp.compiler.option.preprocessor.preprocess"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  name="Test 4.0 Option.Posix.DefSym"
+			  category="test.gnu.cpp.compiler.category.preprocessor"
+			  command="-D"
+			  id="test.gnu.cpp.compiler.option.preprocessor.def"
+			  valueType="definedSymbols">
+		  </option>
+		  <option
+			  name="Test 4.0 Option.Posix.UndefSym"
+			  category="test.gnu.cpp.compiler.category.preprocessor"
+			  command="-U"
+			  id="test.gnu.cpp.compiler.option.preprocessor.undef"
+			  valueType="undefDefinedSymbols">
+		  </option>
+		  <optionCategory
+			  owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler"
+			  name="Test 4.0 OptionCategory.Dirs"
+			  id="test.gnu.cpp.compiler.category.dirs">
+		  </optionCategory>
+		  <option
+			  name="Test 4.0 Option.Posix.InclPaths"
+			  category="test.gnu.cpp.compiler.category.dirs"
+			  command="-I"
+			  id="test.gnu.cpp.compiler.option.include.paths"
+			  valueType="includePath"
+			  browseType="directory">
+		  </option>
+		  <optionCategory
+			  owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler"
+			  name="Test 4.0 OptionCategory.Optimize"
+			  id="test.gnu.cpp.compiler.category.optimization">
+		  </optionCategory>
+		  <option
+			  name="Test 4.0 Option.Posix.OptLevel"
+			  category="test.gnu.cpp.compiler.category.optimization"
+			  id="test.gnu.cpp.compiler.option.optimization.level"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Optimize.None"
+				  command="-O0"
+				  id="test.gnu.cpp.compiler.optimization.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Optimize.Optimize"
+				  command="-O1"
+				  id="test.gnu.cpp.compiler.optimization.level.optimize">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Optimize.More"
+				  isDefault="true"
+				  command="-O2"
+				  id="test.gnu.cpp.compiler.optimization.level.more">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Optimize.Most"
+				  command="-O3"
+				  id="test.gnu.cpp.compiler.optimization.level.most">
+		  </enumeratedOptionValue>
+		      <enablement 
+              	type="CONTAINER_ATTRIBUTE" 
+              	attribute="value" 
+              	value="test.gnu.cpp.compiler.optimization.level.most"
+              	extensionAdjustment="false">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildType"
+			  		value="org.eclipse.cdt.build.core.buildType.release"/>
+			  </enablement>
+              <enablement 
+              	type="CONTAINER_ATTRIBUTE" 
+              	attribute="value" 
+              	value="test.gnu.cpp.compiler.optimization.level.none"
+              	extensionAdjustment="false">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildType"
+			  		value="org.eclipse.cdt.build.core.buildType.debug"/>
+			  </enablement>		  
+		  </option>
+		  <option
+			  name="Test 4.0 Option.Posix.Optimize.Flags"
+			  category="test.gnu.cpp.compiler.category.optimization"
+			  id="test.gnu.cpp.compiler.option.optimization.flags"
+			  valueType="string">
+		  </option>
+		  <optionCategory
+			  owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler"
+			  name="Test 4.0 OptionCategory.Debug"
+			  id="test.gnu.cpp.compiler.category.debug">
+		  </optionCategory>
+		  <option
+			  name="Test 4.0 Option.Posix.DebugLevel"
+			  category="test.gnu.cpp.compiler.category.debug"
+			  id="test.gnu.cpp.compiler.option.debugging.level"
+			  valueType="enumerated">
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Debug.None"
+				  isDefault="false"
+				  id="test.gnu.cpp.compiler.debugging.level.none">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Debug.Min"
+				  command="-g1"
+				  id="test.gnu.cpp.compiler.debugging.level.minimal">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Debug.Def"
+				  isDefault="true"
+				  command="-g"
+				  id="test.gnu.cpp.compiler.debugging.level.default">
+		  </enumeratedOptionValue>
+		  <enumeratedOptionValue
+				  name="Test 4.0 Option.Posix.Debug.Max"
+				  isDefault="false"
+				  command="-g3"
+				  id="test.gnu.cpp.compiler.debugging.level.max">
+		  </enumeratedOptionValue>
+		  	 <enablement 
+              	type="CONTAINER_ATTRIBUTE" 
+              	attribute="value" 
+              	value="test.gnu.cpp.compiler.debugging.level.none"
+              	extensionAdjustment="false">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildType"
+			  		value="org.eclipse.cdt.build.core.buildType.release"/>
+			  </enablement>
+              <enablement 
+              	type="CONTAINER_ATTRIBUTE" 
+              	attribute="value" 
+              	value="test.gnu.cpp.compiler.debugging.level.max"
+              	extensionAdjustment="false">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildType"
+			  		value="org.eclipse.cdt.build.core.buildType.debug"/>
+			  </enablement>		  
+		  
+		  </option>
+		  <option
+			  name="Test 4.0 Option.Posix.Debug.Other"
+			  category="test.gnu.cpp.compiler.category.debug"
+			  id="test.gnu.cpp.compiler.option.debugging.other"
+			  valueType="string">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Debug.prof"
+			  category="test.gnu.cpp.compiler.category.debug"
+			  command="-p"
+			  id="test.gnu.cpp.compiler.option.debugging.prof"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Debug.gprof"
+			  category="test.gnu.cpp.compiler.category.debug"
+			  command="-pg"
+			  id="test.gnu.cpp.compiler.option.debugging.gprof"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler"
+			  name="Test 4.0 OptionCategory.Warn"
+			  id="test.gnu.cpp.compiler.category.warnings">
+		  </optionCategory>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Warn.Syntax"
+			  category="test.gnu.cpp.compiler.category.warnings"
+			  command="-fsyntax-only"
+			  id="test.gnu.cpp.compiler.option.warnings.syntax"
+			  valueType="boolean">
+		   </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Warn.Pedandic"
+			  category="test.gnu.cpp.compiler.category.warnings"
+			  command="-pedantic"
+			  id="test.gnu.cpp.compiler.option.warnings.pedantic"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Warn.PedErrors"
+			  category="test.gnu.cpp.compiler.category.warnings"
+			  command="-pedantic-errors"
+			  id="test.gnu.cpp.compiler.option.warnings.pedantic.error"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Warn.nowarn"
+			  category="test.gnu.cpp.compiler.category.warnings"
+			  command="-w"
+			  id="test.gnu.cpp.compiler.option.warnings.nowarn"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="true"
+			  name="Test 4.0 Option.Posix.Warn.allwarn"
+			  category="test.gnu.cpp.compiler.category.warnings"
+			  command="-Wall"
+			  id="test.gnu.cpp.compiler.option.warnings.allwarn"
+			  valueType="boolean">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Warn.toerrs"
+			  category="test.gnu.cpp.compiler.category.warnings"
+			  command="-Werror"
+			  id="test.gnu.cpp.compiler.option.warnings.toerrors"
+			  valueType="boolean">
+		  </option>
+		  <optionCategory
+			  owner="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler"
+			  name="Test 4.0 OptionCategory.Misc"
+			  id="test.gnu.cpp.compiler.category.other">
+		  </optionCategory>
+		  <option
+			  defaultValue="-c -fmessage-length=0"
+			  name="Test 4.0 Option.OtherFlags"
+			  category="test.gnu.cpp.compiler.category.other"
+			  id="test.gnu.cpp.compiler.option.other.other"
+			  valueType="string">
+		  </option>
+		  <option
+			  defaultValue="false"
+			  name="Test 4.0 Option.Posix.Verbose"
+			  category="test.gnu.cpp.compiler.category.other"
+			  command="-v"
+			  id="test.gnu.cpp.compiler.option.other.verbose"
+			  valueType="boolean">
+		  </option>
+          <inputType
+              sourceContentType="org.eclipse.cdt.core.cxxSource"
+			  sources="c,C,cc,cxx,cpp"
+              dependencyContentType="org.eclipse.cdt.core.cxxHeader"
+			  dependencyExtensions="h,H,hpp"
+			  dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator2"
+              id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.input"
+              languageId="org.eclipse.cdt.core.g++">
+          </inputType>
+          <outputType
+			  outputs="o"
+              buildVariable="OBJS"
+              id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.output">
+          </outputType>
+	  </tool>
+      
+      <tool
+          id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin"
+          name="Test 4.0 ToolName.linker.cygwin.gnu.c"
+           isSystem="true"
+          superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker">
+          <envVarBuildPath 
+              pathType="buildpathLibrary"
+              variableList="LIBRARY_PATH">
+          </envVarBuildPath>
+          <outputType
+			  outputs="exe"
+              superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.output"
+              id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.output">
+          </outputType>
+		  <outputType
+	          outputs="dll,a.dll"
+	          outputPrefix=""
+			  buildVariable="LIBRARIES"
+			  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.output.so"
+			  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.output.so">
+	      </outputType>
+      </tool>
+      <tool
+          id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin"
+          name="Test 4.0 ToolName.linker.cygwin.gnu.cpp"
+          isSystem="true"
+          superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker">
+          <envVarBuildPath 
+              pathType="buildpathLibrary"
+              variableList="LIBRARY_PATH">
+          </envVarBuildPath>
+		  <outputType
+			  outputs="exe"
+              superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.output"
+			  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.output">
+		  </outputType>
+		  <outputType
+	          outputs="dll,a.dll"
+	          outputPrefix=""
+			  buildVariable="LIBRARIES"
+			  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.output.so"
+			  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.output.so">
+	      </outputType>
+		  
+      </tool>
+      <tool
+          id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin"
+          name="Test 4.0 ToolName.compiler.cygwin.gnu.c"
+          isSystem="true"
+          superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler"
+          optionPathConverter="org.eclipse.cdt.managedbuilder.core.tests.OneDirectionalPathConverter">
+          <envVarBuildPath 
+              pathType="buildpathInclude"
+              variableList="CPATH,C_INCLUDE_PATH">
+          </envVarBuildPath>
+          <inputType
+          	  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.input.cygwin"
+              superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.input"/>
+      </tool>      
+      <tool
+          id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin"
+          name="Test 4.0 ToolName.compiler.cygwin.gnu.cpp"
+          isSystem="true"
+          superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler"
+          optionPathConverter="org.eclipse.cdt.managedbuilder.core.tests.BidirectionalPathConverter">
+          <envVarBuildPath 
+              pathType="buildpathInclude"
+              variableList="CPATH,CPLUS_INCLUDE_PATH">
+          </envVarBuildPath>
+          <inputType
+          	  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.input.cygwin"
+              superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+      </tool>      
+
+	  <builder
+	  	  isAbstract="true"
+	      id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder"
+          command="make"
+          isSystem="true"
+          arguments=""
+          variableFormat="${=}"
+          isVariableCaseSensitive="true"
+          reservedMacroNames="ROOT,DEPS,OBJS,.*_SRCS,EXECUTABLES,SUBDIRS,LIBS,USER_OBJS,.*_INPUTS,.*_OUTPUTS"
+          buildfileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
+          macroInputFileNameValue="$(notdir $&lt;)"
+          macroInputFileExtValue="$(suffix $(notdir $&lt;))"
+          macroInputFileBaseNameValue="$(basename $(notdir $&lt;))"
+          macroInputFileRelPathValue="$&lt;"
+          macroInputDirRelPathValue="$(dir $&lt;)"
+          macroOutputFileNameValue="$(notdir $@)"
+          macroOutputFileExtValue="$(suffix $(notdir $@))"
+          macroOutputFileBaseNameValue="$(basename $(notdir $@))"
+          macroOutputFileRelPathValue="$@"
+          macroOutputDirRelPathValue="$(dir $@)"
+          autoBuildTarget="all"
+          incrementalBuildTarget="all"
+          cleanBuildTarget="clean"
+          ignoreErrCmd="-k"
+          parallelBuildCmd="-j*"
+          errorParsers="org.eclipse.cdt.core.MakeErrorParser"
+          name="%GNUMakeBuilder.name">
+   	  </builder>   
+   	  
+      <toolChain
+          archList="all"
+          isSystem="true"
+          osList="linux,hpux,aix,qnx"
+          name="Test 4.0 ToolChainName.Linux"
+          targetTool="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker;test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker;test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver"
+          id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.base">
+		          <targetPlatform
+		              id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.base"
+		              name="Test 4.0 PlatformName.Dbg"
+		              binaryParser="org.eclipse.cdt.core.ELF"
+		              osList="linux,hpux,aix,qnx"
+		              archList="all">
+	              </targetPlatform>
+				  <builder
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder"
+				      id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.base">
+		     	  </builder>    
+			      <tool
+		    		  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.base"
+			          superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver">
+			  <enablement 
+              	type="ALL">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildArtefactType"
+			  		value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
+			  </enablement>
+				  </tool>                 
+				  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.base"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler">                         
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.base"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler">                          
+				  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.base"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker">
+             <enablement 
+              	type="ALL">
+              	<not>
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildArtefactType"
+			  		value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
+			  	</not>
+			  </enablement>
+                  </tool> 
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.base"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker">
+             <enablement 
+              	type="ALL">
+              	<not>
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildArtefactType"
+			  		value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
+			  	</not>
+			  </enablement>
+                  </tool> 
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.base"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler">
+				  </tool>   
+			  </toolChain>
+ 
+         <configuration
+               id="test.four.dot.zero.cdt.managedbuild.config.gnu.base"
+               cleanCommand="rm -rf"
+			   >
+		    <enablement type="CONTAINER_ATTRIBUTE" 
+              	attribute="artifactExtension"
+              	value="so"
+              	extensionAdjustment="false">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildArtefactType"
+			  		value="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+			  </enablement>
+		    <enablement type="CONTAINER_ATTRIBUTE" 
+              	attribute="artifactExtension" 
+              	value="a"
+              	extensionAdjustment="false">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildArtefactType"
+			  		value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
+			  </enablement>
+		</configuration>
+      
+      <projectType      
+            isAbstract="false"     
+            isTest="true"
+            buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe"
+            id="test.four.dot.zero.cdt.managedbuild.target.gnu.exe">
+         <configuration
+               name="Test 4.0 ConfigName.Dbg"
+               id="test.four.dot.zero.cdt.managedbuild.config.gnu.exe.debug"
+               buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug"
+               parent="test.four.dot.zero.cdt.managedbuild.config.gnu.base"
+               cleanCommand="rm -rf">
+               <toolChain
+               		superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.base"
+                     id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.exe.debug">
+		          <targetPlatform
+		              id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.exe.debug"
+		              superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.base">
+	              </targetPlatform>
+				  <builder
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.base"
+				      id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.exe.debug">
+		     	  </builder>               
+				  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.base">                         
+                    <option
+				          id="test.gnu.cpp.compiler.exe.debug.option.optimization.level"
+                          superClass="test.gnu.cpp.compiler.option.optimization.level">
+                      </option>
+                      <option
+						  id="test.gnu.cpp.compiler.exe.debug.option.debugging.level"
+                          superClass="test.gnu.cpp.compiler.option.debugging.level">
+                      </option>           
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.exe.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.base">                          
+			  	      <option
+					      id="test.gnu.c.compiler.exe.debug.option.optimization.level"
+						  superClass="test.gnu.c.compiler.option.optimization.level">
+					  </option>
+					  <option   
+					      id="test.gnu.c.compiler.exe.debug.option.debugging.level"					     
+					      superClass="test.gnu.c.compiler.option.debugging.level">
+					  </option>
+				  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.exe.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.base">
+                  </tool> 
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.exe.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.base">
+                  </tool> 
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.exe.debug"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.base">
+				  </tool>   
+			  </toolChain>
+         </configuration>
+         <configuration
+               name="Test 4.0 ConfigName.Rel"
+               id="test.four.dot.zero.cdt.managedbuild.config.gnu.exe.release"
+               buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release"
+               parent="test.four.dot.zero.cdt.managedbuild.config.gnu.base"
+               cleanCommand="rm -rf">               
+               <toolChain
+               		superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.base"
+                     id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.exe.release">
+		          <targetPlatform
+		              id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.exe.release"
+		              superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.base">		              
+		          </targetPlatform>
+				  <builder
+				  	  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.base"
+				      id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.exe.release">
+				  </builder> 
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.exe.release"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.base">                     
+					  <option
+						  id="test.gnu.cpp.compiler.exe.release.option.optimization.level"
+						  superClass="test.gnu.cpp.compiler.option.optimization.level">
+					  </option>
+					  <option
+						  id="test.gnu.cpp.compiler.exe.release.option.debugging.level"
+						  superClass="test.gnu.cpp.compiler.option.debugging.level">
+					  </option>
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.exe.release"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.base">                          
+					  <option
+						  id="test.gnu.c.compiler.exe.release.option.optimization.level"
+						  superClass="test.gnu.c.compiler.option.optimization.level">
+					  </option>
+					  <option
+						  id="test.gnu.c.compiler.exe.release.option.debugging.level"
+						  superClass="test.gnu.c.compiler.option.debugging.level">
+					  </option>
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.exe.release"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.base">
+                  </tool> 
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.exe.release"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.base">
+                  </tool>  
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.exe.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.base">
+				  </tool>   
+               </toolChain>
+         </configuration>
+      </projectType>     
+      
+      <projectType      
+            isAbstract="false"     
+            isTest="true"
+            buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"
+            id="test.four.dot.zero.cdt.managedbuild.target.gnu.so">
+         <configuration
+               name="Test 4.0 ConfigName.Dbg"
+               cleanCommand="rm -rf"
+               buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug"
+               parent="test.four.dot.zero.cdt.managedbuild.config.gnu.base"                                         
+               id="test.four.dot.zero.cdt.managedbuild.config.gnu.so.debug">
+               <toolChain
+               		 superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.base"
+                     id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.so.debug">
+		          <targetPlatform
+		              id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.so.debug"
+		              superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.base">
+		          </targetPlatform>
+				  <builder
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.base"
+				      id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.so.debug">		              
+				  </builder>               		         
+				  <tool
+				      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.so.debug"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.base">
+					  <option
+					      id="test.gnu.cpp.compiler.so.debug.option.optimization.level"
+						  superClass="test.gnu.cpp.compiler.option.optimization.level">
+					  </option>
+					  <option
+					      id="test.gnu.cpp.compiler.so.debug.option.debugging.level"
+						  superClass="test.gnu.cpp.compiler.option.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+				      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.so.debug"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.base">
+					  <option
+						  id="test.gnu.c.compiler.so.debug.option.optimization.level"
+						  superClass="test.gnu.c.compiler.option.optimization.level">
+					  </option>
+					  <option
+					      id="test.gnu.c.compiler.so.debug.option.debugging.level"
+						  superClass="test.gnu.c.compiler.option.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+				      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.so.debug"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.base">
+					  <option
+						  id="test.gnu.c.link.so.debug.option.shared"
+						  superClass="test.gnu.c.link.option.shared">
+					  </option>
+			          <outputType
+			              superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.output.so"
+			              id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.so.debug.output">
+			          </outputType>
+				  </tool>
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.so.debug"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.base">
+					  <option
+						  id="test.gnu.cpp.link.so.debug.option.shared"
+						  superClass="test.gnu.cpp.link.option.shared">
+					  </option>
+			          <outputType
+			              superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.output.so"
+			              id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.so.debug.output">
+			          </outputType>
+				  </tool>
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.so.debug"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.base">
+				  </tool>   
+			   </toolChain>
+         </configuration>
+         <configuration
+               name="Test 4.0 ConfigName.Rel"
+               cleanCommand="rm -rf"
+               buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release"
+               parent="test.four.dot.zero.cdt.managedbuild.config.gnu.base"               
+               id="test.four.dot.zero.cdt.managedbuild.config.gnu.so.release">
+               <toolChain
+					 superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.base"
+                     id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.so.release">
+		          <targetPlatform
+		              id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.so.release"
+		              superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.base">
+		          </targetPlatform>
+				  <builder
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.base"
+				      id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.so.release">		              
+				  </builder>               
+				  <tool
+				      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.so.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.base">
+				      <option
+				          id="test.gnu.cpp.compiler.so.release.option.optimization.level"
+						  superClass="test.gnu.cpp.compiler.option.optimization.level">
+				      </option>
+				      <option
+				          id="test.gnu.cpp.compiler.so.release.option.debugging.level"
+						  superClass="test.gnu.cpp.compiler.option.debugging.level">
+				      </option>
+				  </tool>				
+				  <tool				     
+				      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.so.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.base">
+				      <option
+				          id="test.gnu.c.compiler.so.release.option.optimization.level"
+						  superClass="test.gnu.c.compiler.option.optimization.level">
+				      </option>
+				      <option
+				          id="test.gnu.c.compiler.so.release.option.debugging.level"
+						  superClass="test.gnu.c.compiler.option.debugging.level">
+				      </option>
+				  </tool>
+				  <tool
+				      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.so.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.base">
+					  <option
+						  id="test.gnu.c.link.so.release.option.shared"
+						  superClass="test.gnu.c.link.option.shared">
+					  </option>
+			          <outputType
+			              superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.output.so"
+			              id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.so.release.output">
+			          </outputType>
+				  </tool>
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.so.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.base">
+					  <option
+						  id="test.gnu.cpp.link.so.release.option.shared"
+						  superClass="test.gnu.cpp.link.option.shared">
+					  </option>
+			          <outputType
+			              superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.output.so"
+			              id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.so.release.output">
+			          </outputType>
+				  </tool>
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.so.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.base">
+				  </tool>   
+			   </toolChain>  
+         </configuration>         
+      </projectType>
+          
+      <projectType 
+            isTest="true"
+            buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib"
+            isAbstract="false"
+            id="test.four.dot.zero.cdt.managedbuild.target.gnu.lib">                        
+         <configuration
+			   name="Test 4.0 ConfigName.Dbg"
+               buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug"
+               parent="test.four.dot.zero.cdt.managedbuild.config.gnu.base"
+			   cleanCommand="rm -rf"
+			   id="test.four.dot.zero.cdt.managedbuild.config.gnu.lib.debug">
+               <toolChain
+                     superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.base"
+                     id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.lib.debug">
+				  <targetPlatform
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.lib.debug"
+				 	  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.base">
+				  </targetPlatform>
+			  	  <builder
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.base"
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.lib.debug">		              
+			      </builder>               		         
+                  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.lib.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.base">
+					  <option
+					      id="test.gnu.cpp.compiler.lib.debug.option.optimization.level"
+					      superClass="test.gnu.cpp.compiler.option.optimization.level">
+					  </option>
+					  <option
+					      id="test.gnu.cpp.compiler.lib.debug.option.debugging.level"
+					      superClass="test.gnu.cpp.compiler.option.debugging.level">
+					  </option>
+                  </tool>
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.lib.debug"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.base">
+				      <option
+					      id="test.gnu.c.compiler.lib.debug.option.optimization.level"
+						  superClass="test.gnu.c.compiler.option.optimization.level">
+				      </option>
+				      <option
+						  id="test.gnu.c.compiler.lib.debug.option.debugging.level"						
+						  superClass="test.gnu.c.compiler.option.debugging.level">
+				      </option>
+				  </tool>
+			      <tool
+		    		  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.lib.debug"
+			          superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.base">
+				  </tool>                 
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.lib.debug"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.base">
+				  </tool>   
+               </toolChain>                 
+         </configuration>
+         <configuration
+               name="Test 4.0 ConfigName.Rel"
+               buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release"
+               parent="test.four.dot.zero.cdt.managedbuild.config.gnu.base"
+               cleanCommand="rm -rf"
+			   id="test.four.dot.zero.cdt.managedbuild.config.gnu.lib.release">
+               <toolChain
+                     superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.base"
+                     id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.lib.release">
+		          <targetPlatform
+		              id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.lib.release"
+		              superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.base">
+		          </targetPlatform>
+				  <builder
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.base"
+				      id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.lib.release">		              
+				  </builder>               		            
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.lib.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.base">
+					  <option
+						  id="test.gnu.cpp.compiler.lib.release.option.optimization.level"
+						  superClass="test.gnu.cpp.compiler.option.optimization.level">
+					  </option>
+					  <option
+						  id="test.gnu.cpp.compiler.lib.release.option.debugging.level"
+						  superClass="test.gnu.cpp.compiler.option.debugging.level">
+					  </option>
+				  </tool>
+		          <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.lib.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.base">
+					  <option
+						  id="test.gnu.c.compiler.lib.release.option.optimization.level"
+						  superClass="test.gnu.c.compiler.option.optimization.level">
+					  </option>
+					  <option
+						  id="test.gnu.c.compiler.lib.release.option.debugging.level"
+					      superClass="test.gnu.c.compiler.option.debugging.level">
+					  </option>
+				  </tool>
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.lib.release"
+				      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.base">
+				  </tool>
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.lib.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.base">
+				  </tool>   
+               </toolChain>				  
+         </configuration>                  
+      </projectType>
+      
+                  <toolChain
+                     archList="all"
+                     osList="win32"
+                     name="Test 4.0 ToolChainName.Cygwin"
+                     targetTool="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base;test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.base;test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver"
+                     isSystem="true"
+                     id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.base">
+                  <targetPlatform
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.base"
+				 	  name="Test 4.0 PlatformName.Dbg"
+                      binaryParser="org.eclipse.cdt.core.Cygwin_PE"            					  
+					  osList="win32"					  
+					  archList="all">
+				  </targetPlatform>
+				    <builder
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder"
+				      id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.base">
+		     	  </builder>    
+				  
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.base"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler">
+				  </tool> 		               		         
+			      <tool
+		    		  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.cygwin.base"
+			          superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver">
+			  <enablement 
+              	type="ALL">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildArtefactType"
+			  		value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
+			  </enablement>
+				  </tool>                 
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.base"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin">
+                  </tool>
+                  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.base"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin">
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.base"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin">
+               <enablement 
+              	type="ALL">
+              	<not>
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildArtefactType"
+			  		value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
+			  	</not>
+			  </enablement>
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin">
+               <enablement 
+              	type="ALL">
+              	<not>
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildArtefactType"
+			  		value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
+			  	</not>
+			  </enablement>
+                  </tool>                  
+
+               </toolChain>     
+               
+                     <configuration
+               id="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.base"
+               cleanCommand="rm -rf"
+               artifactExtension="exe"
+			   >
+		    <enablement type="CONTAINER_ATTRIBUTE" 
+              	attribute="artifactExtension" 
+              	value="dll"
+              	extensionAdjustment="false">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildArtefactType"
+			  		value="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+			  </enablement>
+		    <enablement type="CONTAINER_ATTRIBUTE" 
+              	attribute="artifactExtension" 
+              	value="a"
+              	extensionAdjustment="false">
+			  	<checkBuildProperty 
+			  		property="org.eclipse.cdt.build.core.buildArtefactType"
+			  		value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
+			  </enablement>
+		</configuration>
+
+      <projectType 
+            buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe"
+            id="test.four.dot.zero.cdt.managedbuild.target.gnu.cygwin.exe"
+            isTest="true"
+            isAbstract="false">                                  
+         <configuration
+               name="Test 4.0 ConfigName.Dbg"
+               cleanCommand="rm -rf"
+               id="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.exe.debug"
+               parent="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.base"
+               buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug">
+               <toolChain
+               		 superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.base"
+                     id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.exe.debug">
+                  <targetPlatform
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.exe.debug"
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.base">
+				  </targetPlatform>
+			  	  <builder
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.base"
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.exe.debug">		              
+			      </builder>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.exe.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.base">
+                      <option
+                          id="test.gnu.cpp.compiler.cygwin.exe.debug.option.optimization.level"
+                          superClass="test.gnu.cpp.compiler.option.optimization.level">
+                      </option>
+                      <option
+						  id="test.gnu.cpp.compiler.cygwin.exe.debug.option.debugging.level"
+                          superClass="test.gnu.cpp.compiler.option.debugging.level">
+                      </option>
+                  </tool>
+                  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.base">
+					  <option
+						  id="test.gnu.c.compiler.cygwin.exe.debug.option.optimization.level"
+						  superClass="test.gnu.c.compiler.option.optimization.level">
+					  </option>
+					  <option
+						  id="test.gnu.c.compiler.cygwin.exe.debug.option.debugging.level"
+						  superClass="test.gnu.c.compiler.option.debugging.level">
+					  </option>
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.exe.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.base">
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.exe.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base">
+                  </tool>                  
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.exe.debug"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.base">
+				  </tool>   
+               </toolChain>                                   
+         </configuration>
+         <configuration
+               name="Test 4.0 ConfigName.Rel"
+               cleanCommand="rm -rf"
+               id="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.exe.release"
+               parent="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.base"
+               buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release">
+               <toolChain
+                     superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.base"
+                     id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.exe.release">
+                  <targetPlatform
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.exe.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.base">
+				  </targetPlatform>
+			  	  <builder
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.base"
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.exe.release">		              
+			      </builder>               		                       
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.exe.release"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.base">
+                      <option
+                          id="test.gnu.cpp.compiler.cygwin.exe.release.option.optimization.level"
+                          superClass="test.gnu.cpp.compiler.option.optimization.level">
+                      </option>
+                      <option
+                          id="test.gnu.cpp.compiler.cygwin.exe.release.option.debugging.level"
+                          superClass="test.gnu.cpp.compiler.option.debugging.level">
+                      </option>
+                  </tool>                      
+                  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.release"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.base">
+                      <option
+                          id="test.gnu.c.compiler.cygwin.exe.release.option.optimization.level"
+                          superClass="test.gnu.c.compiler.option.optimization.level">
+                      </option>
+                      <option
+                          id="test.gnu.c.compiler.cygwin.exe.release.option.debugging.level"
+                          superClass="test.gnu.c.compiler.option.debugging.level">
+                      </option>
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.exe.release"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.base">
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.exe.release"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base">
+                  </tool>
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.exe.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.base">
+				  </tool>   
+               </toolChain>                                                     
+         </configuration>
+      </projectType>              
+         
+      <projectType                  
+            buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"
+            id="test.four.dot.zero.cdt.managedbuild.target.gnu.cygwin.so"
+            isAbstract="false"
+            isTest="true">            
+         <configuration
+               name="Test 4.0 ConfigName.Dbg"
+               cleanCommand="rm -rf"
+               parent="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.base"
+               buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug"
+               id="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.so.debug">
+               <toolChain
+                     superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.base"
+                     id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.so.debug">
+                  <targetPlatform
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.so.debug"
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.base">
+				  </targetPlatform>
+			  	  <builder
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.base"
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.so.debug">		              
+			      </builder>               		         
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.so.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.base">
+                      <option
+                          id="test.gnu.cpp.compiler.cygwin.so.debug.option.optimization.level"
+                          superClass="test.gnu.cpp.compiler.option.optimization.level">
+                      </option>
+                      <option
+                          id="test.gnu.cpp.compiler.cygwin.so.debug.option.debugging.level"
+                          superClass="test.gnu.cpp.compiler.option.debugging.level">
+                      </option>
+                  </tool>
+                  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.so.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.base">
+					  <option
+						  id="test.gnu.c.compiler.cygwin.so.debug.option.optimization.level"
+						  superClass="test.gnu.c.compiler.option.optimization.level">
+					  </option>
+					  <option
+						  id="test.gnu.c.compiler.cygwin.so.debug.option.debugging.level"
+						  superClass="test.gnu.c.compiler.option.debugging.level">
+					  </option>
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.so.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.base">
+                      <option
+                          id="test.gnu.c.link.cygwin.so.debug.option.shared"
+                          superClass="test.gnu.c.link.option.shared">
+                      </option>
+			          <outputType
+			              superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.output.so"
+			              id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.so.debug.output">
+			          </outputType>
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.so.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base">
+                      <option
+                          id="test.gnu.cpp.link.cygwin.so.debug.option.shared"
+                          superClass="test.gnu.cpp.link.option.shared">
+                      </option>
+			          <outputType
+			              superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.output.so"
+			              id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.so.debug.output">
+			          </outputType>
+                  </tool>                  
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.so.debug"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.base">
+				  </tool>   
+               </toolChain>                                                     
+         </configuration>
+         <configuration
+               name="Test 4.0 ConfigName.Rel"
+               cleanCommand="rm -rf"
+               parent="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.base"
+               buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release"
+               id="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.so.release">               
+               <toolChain
+                     superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.base"
+                     id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.so.release">
+                  <targetPlatform
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.so.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.base">
+				  </targetPlatform>
+			  	  <builder
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.base"
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.so.release">		              
+			      </builder>               		                                       
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.so.release"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.base">
+                      <option
+                          id="test.gnu.cpp.compiler.cygwin.so.release.option.optimization.level"
+                          superClass="test.gnu.cpp.compiler.option.optimization.level">
+                      </option>
+                      <option
+                          id="test.gnu.cpp.compiler.cygwin.so.release.option.debugging.level"
+                          superClass="test.gnu.cpp.compiler.option.debugging.level">
+                      </option>
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.so.release"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.base">
+                      <option 
+                          id="test.gnu.c.compiler.cygwin.so.release.option.optimization.level"
+                          superClass="test.gnu.c.compiler.option.optimization.level">
+                      </option>
+                      <option
+                          id="test.gnu.c.compiler.cygwin.so.release.option.debugging.level"
+                          superClass="test.gnu.c.compiler.option.debugging.level">
+                      </option>
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.so.release"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.base">
+                      <option
+                          id="test.gnu.c.link.cygwin.so.release.option.shared"
+                          superClass="test.gnu.c.link.option.shared">
+                      </option>
+			          <outputType
+			              superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.output.so"
+			              id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.linker.cygwin.so.release.output">
+			          </outputType>
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.so.release"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base">
+                      <option
+                          id="test.gnu.cpp.link.cygwin.so.release.option.shared"
+                          superClass="test.gnu.cpp.link.option.shared">
+                      </option>
+			          <outputType
+			              superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.output.so"
+			              id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.linker.cygwin.so.release.output">
+			          </outputType>
+                  </tool>
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.so.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.base">
+				  </tool>   
+               </toolChain>                                                                                
+         </configuration>
+      </projectType>
+                       
+      <projectType 
+            buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib"
+            id="test.four.dot.zero.cdt.managedbuild.target.gnu.cygwin.lib"
+            isTest="true"
+            isAbstract="false">            
+         <configuration
+               name="Test 4.0 ConfigName.Dbg"
+               parent="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.base"
+               buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug"
+               cleanCommand="rm -rf"
+               id="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.lib.debug">
+               <toolChain
+                     superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.base"
+                     id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.lib.debug">
+                  <targetPlatform
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.lib.debug"
+				 	  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.base">
+				  </targetPlatform>
+			  	  <builder
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.base"
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.lib.debug">		              
+			      </builder>               		                                                              
+			      <tool
+			          id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.lib.debug"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.base">
+					  <option
+					      id="test.gnu.cpp.compiler.cygwin.lib.debug.option.optimization.level"
+					      superClass="test.gnu.cpp.compiler.option.optimization.level">
+					  </option>
+					  <option
+					        id="test.gnu.cpp.compiler.cygwin.lib.debug.option.debugging.level"
+							superClass="test.gnu.cpp.compiler.option.debugging.level">
+					  </option>
+				  </tool>  
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.lib.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.base">
+                      <option
+                          id="test.gnu.c.compiler.cygwin.lib.debug.option.optimization.level"
+                          superClass="test.gnu.c.compiler.option.optimization.level">
+                      </option>
+                      <option
+                          id="test.gnu.c.compiler.cygwin.lib.debug.option.debugging.level"
+                          superClass="test.gnu.c.compiler.option.debugging.level">
+                      </option>
+                  </tool>
+                  <tool
+                      id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.cygwin.lib.debug"
+                      superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.cygwin.base">
+                  </tool>
+				  <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.lib.debug"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.base">
+				  </tool>   
+               </toolChain>                                                                                				               				  
+         </configuration>
+         <configuration
+               name="Test 4.0 ConfigName.Rel"
+               parent="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.base"
+               buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release"
+               cleanCommand="rm -rf"
+               id="test.four.dot.zero.cdt.managedbuild.config.gnu.cygwin.lib.release">
+               <toolChain
+                     superClass="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.base"
+                     id="test.four.dot.zero.cdt.managedbuild.toolchain.gnu.cygwin.lib.release">
+                  <targetPlatform
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.lib.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.platform.cygwin.base">
+				  </targetPlatform>
+			  	  <builder
+					  superClass="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.base"
+					  id="test.four.dot.zero.cdt.managedbuild.target.gnu.builder.cygwin.lib.release">		              
+			      </builder>               		                                                                                              
+                  <tool
+                     id="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.lib.release"
+                     superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.base">
+                     <option       
+                         id="test.gnu.cpp.compiler.cygwin.lib.release.option.optimization.level"         
+                         superClass="test.gnu.cpp.compiler.option.optimization.level">
+                     </option>
+                     <option
+                         id="test.gnu.cpp.compiler.cygwin.lib.release.option.debugging.level"
+                         superClass="test.gnu.cpp.compiler.option.debugging.level">
+                     </option>
+                 </tool>
+                  <tool
+                     id="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.lib.release"
+                     superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.c.compiler.cygwin.base">
+                     <option
+                         id="test.gnu.c.compiler.cygwin.lib.release.option.optimization.level"
+                         superClass="test.gnu.c.compiler.option.optimization.level">
+                     </option>
+                     <option
+                         id="test.gnu.c.compiler.cygwin.lib.release.option.debugging.level"                        
+                         superClass="test.gnu.c.compiler.option.debugging.level">                         
+                     </option>
+                  </tool>
+                 <tool
+                     id="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.cygwin.lib.release"
+                     superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.archiver.cygwin.base">
+                 </tool>
+				 <tool
+					  id="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.lib.release"
+					  superClass="test.four.dot.zero.cdt.managedbuild.tool.gnu.assembler.cygwin.base">
+				 </tool>   
+              </toolChain>                                                                                				                    
+         </configuration>         
+      </projectType>                              
+     
+     <!-- tcModificationInfo tests -->
+           	<toolChain id="tcm.tc1" name="tcm.tc1" isSystem="true">
+           		<builder id="tcm.b1" name="tcm.b1">
+           		</builder>
+           		<tool id="tcm.t1" name="tcm.t1">
+            		  <supportedProperties>
+		            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+			            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+		    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+		            </property>
+		            </supportedProperties>
+           			<option id="tcm.o1"/>
+           			<inputType id="tcm.it.1" sources="tcmfoo"/>
+           		</tool>
+           		<tool id="tcm.t2" name="tcm.t2">
+           			<option id="tcm.o2"/>
+           			<inputType id="tcm.it.2" sources="tcmbar"/>
+           		</tool>
+           	</toolChain>
+
+           	<toolChain id="tcm.tc2" name="tcm.tc2" isSystem="true">
+           		<builder id="tcm.tc2.b1" name="tcm.tc2.b1">
+           		</builder>
+           		<tool id="tcm.tc2.t1" name="tcm.tc2.t1">
+		             <supportedProperties>
+		            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+			            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+		    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+		            </property>
+		            </supportedProperties>
+                   <option id="tcm.tc2.o1"/>
+                   <inputType id="tcm.it.3" sources="tcmfoo"/>
+           		</tool>
+           		<tool id="tcm.tc2.t2" name="tcm.tc2.t2">
+           			<option id="tcm.tc2.o2"/>
+           			<inputType id="tcm.it.4" sources="tcmbar"/>
+           		</tool>
+           	</toolChain>
+           	
+           	<toolChain id="tcm.tc3" name="tcm.tc3" isSystem="true">
+           		<builder id="tcm.tc3.b1" name="tcm.tc3.b1">
+           		</builder>
+           		<tool id="tcm.tc3.t1" name="tcm.tc3.t1">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+	            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+            </property>
+            </supportedProperties>           		
+           			<option id="tcm.tc3.o1"/>
+           			<inputType id="tcm.it.5" sources="tcmfoo"/>
+           		</tool>
+           		<tool id="tcm.tc3.t2" name="tcm.tc3.t2">
+           			<option id="tcm.tc3.o2"/>
+           			<inputType id="tcm.it.6" sources="tcmbar"/>
+           		</tool>
+           	</toolChain>
+
+           	<toolChain id="tcm.tc4" name="tcm.tc4" isSystem="true">
+           		<builder id="tcm.tc4.b1" name="tcm.tc4.b1">
+           		</builder>
+           		<tool id="tcm.tc4.t1" name="tcm.tc4.t1">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+	            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+            </property>
+            </supportedProperties>           		
+           			<option id="tcm.tc4.o1"/>
+           			<inputType id="tcm.it.7" sources="tcmfoo"/>
+           		</tool>
+           		<tool id="tcm.tc4.t2" name="tcm.tc4.t2">
+           			<option id="tcm.tc4.o2"/>
+           			<inputType id="tcm.it.8" sources="tcmbar"/>
+           		</tool>
+           	</toolChain>
+
+           	<toolChain id="tcm.tc5" name="tcm.tc5" isSystem="true">
+           		<builder id="tcm.tc5.b1" name="tcm.tc5.b1">
+           		</builder>
+           		<tool id="tcm.tc5.t1" name="tcm.tc5.t1">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+	            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+            </property>
+            </supportedProperties>           		
+           			<option id="tcm.tc5.o1"/>
+           			<inputType id="tcm.it.9" sources="tcmfoo"/>
+           		</tool>
+           		<tool id="tcm.tc5.t2" name="tcm.tc5.t2">
+           			<option id="tcm.tc5.o2"/>
+           			<inputType id="tcm.it.10" sources="tcmbar"/>
+           		</tool>
+           	</toolChain>
+
+     <projectType
+           id="tcm.pt" name="tcm.pt" 
+           isTest="true"
+           buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe">
+           <configuration id="tcm.pt.cfg" name="test">
+           	<toolChain id="tcm.pt.cfg.tc" superClass="tcm.tc1">
+           		<builder id="tcm.pt.b1" superClass="tcm.b1" name="tcm.b1">
+           		</builder>
+           		<tool id="tcm.pt.cfg.t1" superClass="tcm.t1">
+           		</tool>
+           		<tool id="tcm.pt.cfg.t2" superClass="tcm.t2">
+           		</tool>
+           	</toolChain>
+           </configuration>
+     </projectType>
+     
+     <projectType
+           id="tcm.pt2" name="tcm.pt2" 
+           isTest="true"
+           buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe">
+           <configuration id="tcm.pt2.cfg" name="test">
+           	<toolChain id="tcm.pt2.cfg.tc" superClass="tcm.tc1">
+           		<builder id="tcm.pt2.b1" superClass="tcm.b1" name="tcm.b1">
+           		</builder>
+           		<tool id="tcm.pt2.cfg.t1" superClass="tcm.t1">
+           		</tool>
+           		<tool id="tcm.pt2.cfg.t2" superClass="tcm.t2">
+           		</tool>
+           	</toolChain>
+           </configuration>
+     </projectType>
+
+<!-- 2.1 -->
+           	<toolChain id="tcm2.tc" name="tcm2.tc" isSystem="true">
+           		<builder id="tcm2.tc.b1" name="tcm2.tc.b1">
+           		</builder>
+           		<tool id="tcm2.tc.t1" name="tcm2.tc.t1">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+	            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+            </property>
+            </supportedProperties>           		
+           			<option id="tcm2.tc.o1"/>
+           			<inputType id="tcm.it.11" sources="tcmfoo"/>
+           		</tool>
+           		<tool id="tcm2.tc.t2" name="tcm2.tc.t2">
+           			<option id="tcm2.tc.o2"/>
+           			<inputType id="tcm.it.12" sources="tcmfoo"/>
+           		</tool>
+           	</toolChain>
+
+          	<toolChain id="tcm2.tc2" name="tcm2.tc2" isSystem="true">
+           		<builder id="tcm2.tc2.b1" name="tcm2.tc2.b1">
+           		</builder>
+           		<tool id="tcm2.tc2.t1" name="tcm2.tc2.t1">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+	            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+            </property>
+            </supportedProperties>           		
+           			<option id="tcm2.tc2.o1"/>
+           			<inputType id="tcm.it.13" sources="tcmfoo"/>
+           		</tool>
+           		<tool id="tcm2.tc2.t2" name="tcm2.tc2.t2">
+           			<option id="tcm2.tc2.o2"/>
+           			<inputType id="tcm.it.14" sources="tcmbar"/>
+           		</tool>
+           	</toolChain>
+          	<toolChain id="tcm2.tc2.derive" superClass="tcm2.tc2" name="tcm2.tc2.derive" isSystem="true">
+          	</toolChain>
+          	<toolChain id="tcm2.tc.derive" superClass="tcm2.tc" name="tcm2.tc.derive" isSystem="true">
+          	</toolChain>
+
+           	<toolChain id="tcm.base.tc" name="tcm.base.tc" isSystem="true">
+           		<builder id="tcm.base.tc.b1" name="tcm.base.tc.b1">
+           		</builder>
+           		<tool id="tcm.base.tc.t1" name="tcm.base.tc.t1">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+	            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+            </property>
+            </supportedProperties>           		
+           			<option id="tcm.base.tc.o1"/>
+           			<inputType id="tcm.it.15" sources="tcmfoo"/>
+           		</tool>
+           		<tool id="tcm.base.tc.t2" name="tcm.base.tc.t2">
+           			<option id="tcm.base.tc.o2"/>
+           			<inputType id="tcm.it.16" sources="tcmbar"/>
+           		</tool>
+           	</toolChain>     
+           	
+           	<toolChain id="tcm.derive.tc1" superClass="tcm.base.tc" name="tcm.derive.tc1" isSystem="true">
+           		<builder id="tcm.derive.tc1.b1" superClass="tcm.base.tc.b1" name="tcm.derive.tc1.b1">
+           		</builder>
+           		<tool id="tcm.derive.tc1.t1" superClass="tcm.base.tc.t1" name="tcm.derive.tc1.t1">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+	            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+            </property>
+            </supportedProperties>           		
+           			<option id="tcm.derive.tc1.o1"/>
+           			<inputType id="tcm.it.17" sources="tcmfoo"/>
+           		</tool>
+           		<tool id="tcm.derive.tc1.t2" superClass="tcm.base.tc.t2" name="tcm.derive.tc1.t2">
+           			<option id="tcm.derive.tc1.o2"/>
+           			<inputType id="tcm.it.18" sources="tcmbar"/>
+           		</tool>
+           	</toolChain>     
+
+           	<toolChain id="tcm.derive.tc2" superClass="tcm.base.tc" name="tcm.derive.tc2" isSystem="true">
+           		<builder id="tcm.derive.tc2.b1" superClass="tcm.base.tc.b1" name="tcm.derive.tc2.b1">
+           		</builder>
+           		<tool id="tcm.derive.tc2.t1" superClass="tcm.base.tc.t1" name="tcm.derive.tc2.t1">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+	            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+            </property>
+            </supportedProperties>           		
+           			<option id="tcm.derive.tc2.o1"/>
+           			<inputType id="tcm.it.19" sources="tcmfoo"/>
+           		</tool>
+           		<tool id="tcm.derive.tc2.t2" superClass="tcm.base.tc.t2" name="tcm.derive.tc2.t2">
+           			<option id="tcm.derive.tc2.o2"/>
+           			<inputType id="tcm.it.20" sources="tcmbar"/>
+           		</tool>
+           	</toolChain>   
+           	
+           <projectType
+           id="tcm.pt.derive1" name="tcm.pt.derive1" 
+           isTest="true"
+           buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe">
+           <configuration id="tcm.pt.derive1.cfg" name="test">
+           	<toolChain id="tcm.pt.derive.tc1" superClass="tcm.derive.tc1">
+           		<builder id="tcm.pt.derive.b1" superClass="tcm.derive.tc1.b1">
+           		</builder>
+           		<tool id="tcm.pt.derive.t1" superClass="tcm.derive.tc1.t1">
+           		</tool>
+           		<tool id="tcm.pt.derive.t2" superClass="tcm.derive.tc1.t2">
+           		</tool>
+           	</toolChain>
+           </configuration>
+     </projectType>
+           	
+<!-- 2.2 -->
+
+           	<toolChain id="tcm.base2.tc" name="tcm.base2.tc" isSystem="true">
+           		<builder id="tcm.base2.tc.b1" name="tcm.base2.tc.b1">
+           		</builder>
+           		<tool id="tcm.base2.tc.t1" name="tcm.base2.tc.t1">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+	            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+            </property>
+            </supportedProperties>           		
+           			<option id="tcm.base2.tc.o1"/>
+           			<inputType id="tcm.it.21" sources="tcmfoo"/>
+           		</tool>
+           		<tool id="tcm.base2.tc.t2" name="tcm.base2.tc.t2">
+           			<option id="tcm.base2.tc.o2"/>
+           			<inputType id="tcm.it.22" sources="tcmbar"/>
+           		</tool>
+           	</toolChain>     
+           	
+           	<toolChain id="tcm.derive2.tc1" superClass="tcm.base2.tc" name="tcm.derive2.tc1" isSystem="true">
+           		<builder id="tcm.derive2.tc1.b1" superClass="tcm.base2.tc.b1" name="tcm.derive2.tc1.b1">
+           		</builder>
+           		<tool id="tcm.derive2.tc1.t1" superClass="tcm.base2.tc.t1" name="tcm.derive2.tc1.t1">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+	            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+            </property>
+            </supportedProperties>           		
+           			<option id="tcm.derive2.tc1.o1"/>
+           			<inputType id="tcm.it.23" sources="tcmfoo"/>
+           		</tool>
+           		<tool id="tcm.derive2.tc1.t2" superClass="tcm.base2.tc.t2" name="tcm.derive2.tc1.t2">
+           			<option id="tcm.derive2.tc1.o2"/>
+           			<inputType id="tcm.it.24" sources="tcmbar"/>
+           		</tool>
+           	</toolChain>     
+
+           	<toolChain id="tcm.derive2.tc2" superClass="tcm.base2.tc" name="tcm.derive2.tc2" isSystem="true">
+           		<builder id="tcm.derive2.tc2.b1" superClass="tcm.base2.tc.b1" name="tcm.derive2.tc2.b1">
+           		</builder>
+           		<tool id="tcm.derive2.tc2.t1" superClass="tcm.base2.tc.t1" name="tcm.derive2.tc2.t1">
+            <supportedProperties>
+            <property id="org.eclipse.cdt.build.core.buildArtefactType">
+	            <value id="org.eclipse.cdt.build.core.buildArtefactType.exe"/>
+    	        <value id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
+            </property>
+            </supportedProperties>           		
+           			<option id="tcm.derive2.tc2.o1"/>
+           			<inputType id="tcm.it.25" sources="tcmfoo"/>
+           		</tool>
+           		<tool id="tcm.derive2.tc2.t2" superClass="tcm.base2.tc.t2" name="tcm.derive2.tc2.t2">
+           			<option id="tcm.derive2.tc2.o2"/>
+           			<inputType id="tcm.it.26" sources="tcmbar"/>
+           		</tool>
+           	</toolChain>       
+           	    
+   </extension>
+   <extension
+         id="test.tcModificationInfo.extension.id1"
+         name="Test ToolChain Modification Info Extension"
+         point="org.eclipse.cdt.managedbuilder.core.tcModificationInfo">
+
+         <conflictDefinition>
+             <matchObject
+                   objectIds="tcm.tc2"
+                   objectType="toolChain"/>
+             <matchObject
+                   objectIds="tcm.pt.cfg"
+                   objectType="configuration"/>
+         </conflictDefinition>
+
+         <conflictDefinition>
+             <matchObject
+                   objectIds="tcm.tc3"
+                   objectType="toolChain"/>
+             <matchObject
+                   objectIds="tcm.tc1"
+                   objectType="toolChain"/>
+         </conflictDefinition>
+
+         <conflictDefinition>
+             <matchObject
+                   objectIds="tcm.tc4.b1"
+                   objectType="builder"/>
+             <matchObject
+                   objectIds="tcm.tc1"
+                   objectType="toolChain"/>
+         </conflictDefinition>
+
+         <conflictDefinition>
+             <matchObject
+                   objectIds="tcm.tc5.t1"
+                   objectType="tool"/>
+             <matchObject
+                   objectIds="tcm.tc1"
+                   objectType="toolChain"/>
+         </conflictDefinition>
+
+         <conflictDefinition>
+             <matchObject
+                   objectIds="tcm.tc4.t1"
+                   objectType="tool"/>
+             <matchObject
+                   objectIds="tcm.tc3.t1"
+                   objectType="tool"/>
+         </conflictDefinition>
+   </extension>
+   <!-- 2 -->
+      <extension
+         id="test.tcModificationInfo.extension.id2"
+         name="Test ToolChain Modification Info Extension2"
+         point="org.eclipse.cdt.managedbuilder.core.tcModificationInfo">
+
+         <conflictDefinition>
+             <matchObject
+                   objectIds="tcm.base.tc"
+                   objectType="toolChain"
+                   searchScope="ALL_EXTENSION_SUPERCLASSES"/>                   
+             <matchObject
+                   objectIds="tcm.base2.tc;tcm2.tc"
+                   objectType="toolChain"
+                   searchScope="ALL_EXTENSION_SUPERCLASSES">
+                   <pattern
+                   	objectIds="tcm2.tc2"
+                   	searchScope="EXTENSION_OBJECT"/>
+             </matchObject>
+         </conflictDefinition>
+   </extension>
+</plugin>
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/depCalcProjects/test1DepCalc2/test1DepCalc2.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/depCalcProjects/test1DepCalc2/test1DepCalc2.zip
new file mode 100755
index 0000000..583ff18
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/depCalcProjects/test1DepCalc2/test1DepCalc2.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/depCalcProjects/test1DepCalc3/test1DepCalc3.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/depCalcProjects/test1DepCalc3/test1DepCalc3.zip
new file mode 100755
index 0000000..03a9370
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/depCalcProjects/test1DepCalc3/test1DepCalc3.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/depCalcProjects/test1DepCalcPreBuild/test1DepCalcPreBuild.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/depCalcProjects/test1DepCalcPreBuild/test1DepCalcPreBuild.zip
new file mode 100755
index 0000000..43d7536
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/depCalcProjects/test1DepCalcPreBuild/test1DepCalcPreBuild.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/oldTypeProjects/1.2/test12.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/oldTypeProjects/1.2/test12.zip
new file mode 100644
index 0000000..5a2b760
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/oldTypeProjects/1.2/test12.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/oldTypeProjects/2.0/test20.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/oldTypeProjects/2.0/test20.zip
new file mode 100644
index 0000000..5b4569e
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/oldTypeProjects/2.0/test20.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/oldTypeProjects/2.1/test21.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/oldTypeProjects/2.1/test21.zip
new file mode 100644
index 0000000..6ae610b
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/oldTypeProjects/2.1/test21.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/oldTypeProjects/2.1CPP/Test21CXX.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/oldTypeProjects/2.1CPP/Test21CXX.zip
new file mode 100644
index 0000000..6918e91
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/oldTypeProjects/2.1CPP/Test21CXX.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/Benchmarks/makefile b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/Benchmarks/makefile
new file mode 100644
index 0000000..35ecf0d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/Benchmarks/makefile
@@ -0,0 +1,43 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+ROOT := ..
+
+-include $(ROOT)/makefile.init
+
+RM := rm -rf
+
+# All of the sources participating in the build are defined here
+-include sources.mk
+-include $(SUBDIRS:%=%/subdir.mk)
+-include objects.mk
+ifneq ($(strip $(DEPS)),)
+-include $(DEPS)
+endif
+
+-include $(ROOT)/makefile.defs
+
+# Add inputs and outputs from these tool invocations to the build variables 
+
+# All Target
+all: lib.a
+
+# Tool invocations
+lib.a: $(OBJS) $(USER_OBJS)
+	@echo 'Building target: $@'
+	@echo 'Invoking: archiver.gnu'
+	@echo ar -r lib.a $(OBJS) $(USER_OBJS) $(LIBS)
+	@ar -r lib.a $(OBJS) $(USER_OBJS) $(LIBS)
+	@echo 'Finished building target: $@'
+	@echo ' '
+
+# Other Targets
+clean:
+	-$(RM) $(OBJS)$(DEPS) lib.a
+	- at echo ' '
+
+.PHONY: all clean dependents
+.SECONDARY:
+
+-include $(ROOT)/makefile.targets
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/Benchmarks/objects.mk b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/Benchmarks/objects.mk
new file mode 100644
index 0000000..eae6a31
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/Benchmarks/objects.mk
@@ -0,0 +1,7 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+LIBS :=
+
+USER_OBJS :=
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/Benchmarks/sources.mk b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/Benchmarks/sources.mk
new file mode 100644
index 0000000..754c6cd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/Benchmarks/sources.mk
@@ -0,0 +1,15 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+C_SRCS := 
+S_UPPER_SRCS := 
+O_SRCS := 
+S_SRCS := 
+OBJS := 
+DEPS := 
+
+# Every subdirectory with source files must be described here
+SUBDIRS := \
+. \
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/Benchmarks/subdir.mk b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/Benchmarks/subdir.mk
new file mode 100644
index 0000000..5cf8f31
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/Benchmarks/subdir.mk
@@ -0,0 +1,32 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables 
+C_SRCS += \
+$(ROOT)/f1.c \
+$(ROOT)/f2.c 
+
+OBJS += \
+./f1.o \
+./f2.o 
+
+DEPS += \
+${addprefix ./, \
+f1.d \
+f2.d \
+}
+
+
+# Each subdirectory must supply rules for building sources it contributes
+%.o: $(ROOT)/%.c
+	@echo 'Building file: $<'
+	@echo 'Invoking: compiler.gnu.c'
+	@echo gcc -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $<
+	@gcc -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< && \
+	echo -n $(@:%.o=%.d) $(dir $@) > $(@:%.o=%.d) && \
+	gcc -MM -MG -P -w -O0 -g3 -Wall -c -fmessage-length=0  $< >> $(@:%.o=%.d)
+	@echo 'Finished building: $<'
+	@echo ' '
+
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/f1.c b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/f1.c
new file mode 100644
index 0000000..5e77893
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/f1.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+#include "test_ar.h"
+
+void f1_ar()
+{
+	printf ( "Hello from f1_ar.\n" ) ;
+	return ;
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/f2.c b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/f2.c
new file mode 100644
index 0000000..56e2c73
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/f2.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+#include "test_ar.h"
+
+void f2_ar()
+{
+	printf ( "Hello from f2_ar.\n" ) ;
+	return ;
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/test_ar.h b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/test_ar.h
new file mode 100644
index 0000000..55e38f0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedFolder/test_ar.h
@@ -0,0 +1,2 @@
+void f1_ar() ;
+void f2_ar() ;
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedLib/f1.c b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedLib/f1.c
new file mode 100644
index 0000000..5e77893
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedLib/f1.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+#include "test_ar.h"
+
+void f1_ar()
+{
+	printf ( "Hello from f1_ar.\n" ) ;
+	return ;
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedLib/f2.c b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedLib/f2.c
new file mode 100644
index 0000000..56e2c73
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedLib/f2.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+#include "test_ar.h"
+
+void f2_ar()
+{
+	printf ( "Hello from f2_ar.\n" ) ;
+	return ;
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedLib/linkedLib.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedLib/linkedLib.zip
new file mode 100644
index 0000000..f536b03
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedLib/linkedLib.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedLib/test_ar.h b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedLib/test_ar.h
new file mode 100644
index 0000000..55e38f0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/linkedLib/test_ar.h
@@ -0,0 +1,2 @@
+void f1_ar() ;
+void f2_ar() ;
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/multiResConfig/testResCfg.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/multiResConfig/testResCfg.zip
new file mode 100644
index 0000000..975249c
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/multiResConfig/testResCfg.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/singleFileExe/testSingleExe.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/singleFileExe/testSingleExe.zip
new file mode 100644
index 0000000..b2100c0
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/singleFileExe/testSingleExe.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/twoFileSO/testDoubleSO.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/twoFileSO/testDoubleSO.zip
new file mode 100644
index 0000000..d07b43f
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test21Projects/twoFileSO/testDoubleSO.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/CDTFortranTest1/CDTFortranTest1.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/CDTFortranTest1/CDTFortranTest1.zip
new file mode 100644
index 0000000..37d87cd
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/CDTFortranTest1/CDTFortranTest1.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/CDTFortranTest2/CDTFortranTest2.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/CDTFortranTest2/CDTFortranTest2.zip
new file mode 100644
index 0000000..ce64c2c
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/CDTFortranTest2/CDTFortranTest2.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/TestATO/TestATO.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/TestATO/TestATO.zip
new file mode 100644
index 0000000..fa239e7
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/TestATO/TestATO.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/copyandDeploy/copyandDeploy.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/copyandDeploy/copyandDeploy.zip
new file mode 100644
index 0000000..9b2ff59
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/copyandDeploy/copyandDeploy.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/deleteFile/deleteFile.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/deleteFile/deleteFile.zip
new file mode 100644
index 0000000..5cf1538
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/deleteFile/deleteFile.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/inputTypeOption/inputTypeOption.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/inputTypeOption/inputTypeOption.zip
new file mode 100644
index 0000000..ee3fc81
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/inputTypeOption/inputTypeOption.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/Benchmarks/makefile b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/Benchmarks/makefile
new file mode 100644
index 0000000..08a017c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/Benchmarks/makefile
@@ -0,0 +1,43 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+ROOT := ..
+
+-include $(ROOT)/makefile.init
+
+RM := rm -rf
+
+# All of the sources participating in the build are defined here
+-include sources.mk
+-include $(SUBDIRS:%=%/subdir.mk)
+-include objects.mk
+ifneq ($(strip $(DEPS)),)
+-include $(DEPS)
+endif
+
+-include $(ROOT)/makefile.defs
+
+# Add inputs and outputs from these tool invocations to the build variables 
+
+# All Target
+all: lib.a
+
+# Tool invocations
+lib.a: $(OBJS) $(USER_OBJS)
+	@echo 'Building target: $@'
+	@echo 'Invoking: MBS30.archiver.gnu'
+	@echo ar -r lib.a $(OBJS) $(USER_OBJS) $(LIBS)
+	@ar -r lib.a $(OBJS) $(USER_OBJS) $(LIBS)
+	@echo 'Finished building target: $@'
+	@echo ' '
+
+# Other Targets
+clean:
+	-$(RM) $(OBJS)$(ARCHIVES)$(DEPS) lib.a
+	- at echo ' '
+
+.PHONY: all clean dependents
+.SECONDARY:
+
+-include $(ROOT)/makefile.targets
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/Benchmarks/objects.mk b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/Benchmarks/objects.mk
new file mode 100644
index 0000000..80f5104
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/Benchmarks/objects.mk
@@ -0,0 +1,7 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+LIBS :=
+
+USER_OBJS :=
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/Benchmarks/sources.mk b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/Benchmarks/sources.mk
new file mode 100644
index 0000000..02f9758
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/Benchmarks/sources.mk
@@ -0,0 +1,14 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+C_SRCS := 
+O_SRCS := 
+OBJS := 
+ARCHIVES := 
+DEPS := 
+
+# Every subdirectory with source files must be described here
+SUBDIRS := \
+. \
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/Benchmarks/subdir.mk b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/Benchmarks/subdir.mk
new file mode 100644
index 0000000..d0bc945
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/Benchmarks/subdir.mk
@@ -0,0 +1,34 @@
+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables 
+C_SRCS += \
+$(ROOT)/f1.c \
+$(ROOT)/f2.c 
+
+OBJS += \
+${addprefix ./, \
+f1.o \
+f2.o \
+}
+
+DEPS += \
+${addprefix ./, \
+f1.d \
+f2.d \
+}
+
+
+# Each subdirectory must supply rules for building sources it contributes
+%.o: $(ROOT)/%.c
+	@echo 'Building file: $<'
+	@echo 'Invoking: MBS30.compiler.gnu.c'
+	@echo gcc -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $<
+	@gcc -O0 -g3 -Wall -c -fmessage-length=0 -o$@ $< && \
+	echo -n $(@:%.o=%.d) $(dir $@) > $(@:%.o=%.d) && \
+	gcc -MM -MG -P -w -O0 -g3 -Wall -c -fmessage-length=0  $< >> $(@:%.o=%.d)
+	@echo 'Finished building: $<'
+	@echo ' '
+
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/f1.c b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/f1.c
new file mode 100644
index 0000000..9e324f6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/f1.c
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 Intel Corporation
+ * 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
+ *
+ * Contributors:
+ *     Intel Corporation - initial API and implementation
+ *******************************************************************************/
+#include <stdio.h>
+#include "test_ar.h"
+
+void f1_ar()
+{
+	printf ( "Hello from f1_ar.\n" ) ;
+	return ;
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/f2.c b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/f2.c
new file mode 100644
index 0000000..181c0b4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/f2.c
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 Intel Corporation
+ * 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
+ *
+ * Contributors:
+ *     Intel Corporation - initial API and implementation
+ *******************************************************************************/
+#include <stdio.h>
+#include "test_ar.h"
+
+void f2_ar()
+{
+	printf ( "Hello from f2_ar.\n" ) ;
+	return ;
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/test_ar.h b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/test_ar.h
new file mode 100644
index 0000000..816003d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedFolder/test_ar.h
@@ -0,0 +1,12 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 Intel Corporation
+ * 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
+ *
+ * Contributors:
+ *     Intel Corporation - initial API and implementation
+ *******************************************************************************/
+void f1_ar() ;
+void f2_ar() ;
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedLib30/f1_30.c b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedLib30/f1_30.c
new file mode 100644
index 0000000..f8cfa4e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedLib30/f1_30.c
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 Intel Corporation
+ * 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
+ *
+ * Contributors:
+ *     Intel Corporation - initial API and implementation
+ *******************************************************************************/
+#include <stdio.h>
+#include "test_ar_30.h"
+
+void f1_ar()
+{
+	printf ( "Hello from f1_ar.\n" ) ;
+	return ;
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedLib30/f2_30.c b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedLib30/f2_30.c
new file mode 100644
index 0000000..b9d82bb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedLib30/f2_30.c
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 Intel Corporation
+ * 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
+ *
+ * Contributors:
+ *     Intel Corporation - initial API and implementation
+ *******************************************************************************/
+#include <stdio.h>
+#include "test_ar_30.h"
+
+void f2_ar()
+{
+	printf ( "Hello from f2_ar.\n" ) ;
+	return ;
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedLib30/linkedLib30.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedLib30/linkedLib30.zip
new file mode 100644
index 0000000..a2d408a
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedLib30/linkedLib30.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedLib30/test_ar_30.h b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedLib30/test_ar_30.h
new file mode 100644
index 0000000..816003d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/linkedLib30/test_ar_30.h
@@ -0,0 +1,12 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 Intel Corporation
+ * 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
+ *
+ * Contributors:
+ *     Intel Corporation - initial API and implementation
+ *******************************************************************************/
+void f1_ar() ;
+void f2_ar() ;
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/multiResConfig/multiResConfig.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/multiResConfig/multiResConfig.zip
new file mode 100644
index 0000000..08d728e
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/multiResConfig/multiResConfig.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/noFilesToBuild/noFilesToBuild.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/noFilesToBuild/noFilesToBuild.zip
new file mode 100644
index 0000000..17f0abb
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/noFilesToBuild/noFilesToBuild.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/preAndPostBuildSteps/preAndPostBuildSteps.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/preAndPostBuildSteps/preAndPostBuildSteps.zip
new file mode 100644
index 0000000..c0ba47c
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/preAndPostBuildSteps/preAndPostBuildSteps.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/rcbsBasicTest/rcbsBasicTest.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/rcbsBasicTest/rcbsBasicTest.zip
new file mode 100644
index 0000000..162fd70
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/rcbsBasicTest/rcbsBasicTest.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/singleFileExe/singleFileExe.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/singleFileExe/singleFileExe.zip
new file mode 100644
index 0000000..6708723
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/singleFileExe/singleFileExe.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test with spaces/test with spaces.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test with spaces/test with spaces.zip
new file mode 100644
index 0000000..9fae2d4
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test with spaces/test with spaces.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test30_1/test30_1.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test30_1/test30_1.zip
new file mode 100644
index 0000000..021b482
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test30_1/test30_1.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test30_2/test30_2.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test30_2/test30_2.zip
new file mode 100644
index 0000000..828a18e
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test30_2/test30_2.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/testFileWithNoExtension/testFileWithNoExtension.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/testFileWithNoExtension/testFileWithNoExtension.zip
new file mode 100644
index 0000000..e758c2a
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/testFileWithNoExtension/testFileWithNoExtension.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/testMacroSupportInBuildDefinitions/testMacroSupportInBuildDefinitions.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/testMacroSupportInBuildDefinitions/testMacroSupportInBuildDefinitions.zip
new file mode 100644
index 0000000..c1c4b8e
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/testMacroSupportInBuildDefinitions/testMacroSupportInBuildDefinitions.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/twoFileSO/twoFileSO.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/twoFileSO/twoFileSO.zip
new file mode 100644
index 0000000..34d70eb
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/twoFileSO/twoFileSO.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test3xStdMakeProjects/std_cpp_1.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test3xStdMakeProjects/std_cpp_1.zip
new file mode 100644
index 0000000..46607da
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test3xStdMakeProjects/std_cpp_1.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test40Projects/test_40/test_40.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test40Projects/test_40/test_40.zip
new file mode 100644
index 0000000..d086257
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test40Projects/test_40/test_40.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test40Projects/test_40_pathconverter/test_40_pathconverter.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test40Projects/test_40_pathconverter/test_40_pathconverter.zip
new file mode 100644
index 0000000..e9040f1
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/test40Projects/test_40_pathconverter/test_40_pathconverter.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/testBuildDescriptionProjects/test30_1/test30_1.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/testBuildDescriptionProjects/test30_1/test30_1.zip
new file mode 100644
index 0000000..eb52f1c
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/testBuildDescriptionProjects/test30_1/test30_1.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/toolChainConversionProjects/test20/Test20.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/toolChainConversionProjects/test20/Test20.zip
new file mode 100644
index 0000000..d6ee8e4
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/toolChainConversionProjects/test20/Test20.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/toolChainConversionProjects/test21/Test21.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/toolChainConversionProjects/test21/Test21.zip
new file mode 100644
index 0000000..c7977cc
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/toolChainConversionProjects/test21/Test21.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/toolChainConversionProjects/testProjectConversion/testProjectConversion.zip b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/toolChainConversionProjects/testProjectConversion/testProjectConversion.zip
new file mode 100644
index 0000000..4816a72
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/resources/toolChainConversionProjects/testProjectConversion/testProjectConversion.zip differ
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java
new file mode 100644
index 0000000..8841232
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/BuildSystemTestHelper.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.testplugin;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+
+import junit.framework.Assert;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
+import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+public class BuildSystemTestHelper {
+	
+	static public IProject createProject(String name, IPath location, String projTypeId) throws CoreException {
+		IProject project = createProject(name, location);
+
+		return createDescription(project, projTypeId);
+	}
+	
+	static public IProject createDescription(IProject project, String projTypeId) throws CoreException {
+		CoreModel coreModel = CoreModel.getDefault();
+		ICProjectDescription des = coreModel.getProjectDescription(project);
+		Assert.assertNull("detDescription1 returned not null!", des);
+		
+		des = coreModel.createProjectDescription(project, true);
+		Assert.assertNotNull("createDescription returned null!", des);
+		
+		Assert.assertNull("detDescription2 returned not null!", coreModel.getProjectDescription(project));
+		
+		Assert.assertFalse("new des should be not valid", des.isValid());
+		
+		Assert.assertEquals(0, des.getConfigurations().length);
+		
+		ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
+		IProjectType type = ManagedBuildManager.getProjectType(projTypeId);
+		Assert.assertNotNull("project type not found", type);
+
+		ManagedProject mProj = new ManagedProject(project, type);
+		info.setManagedProject(mProj);
+		
+		IConfiguration cfgs[] = type.getConfigurations();
+		
+		for(int i = 0; i < cfgs.length; i++){
+			String id = ManagedBuildManager.calculateChildId(cfgs[i].getId(), null);
+			Configuration config = new Configuration(mProj, (Configuration)cfgs[i], id, false, true, false);
+			CConfigurationData data = config.getConfigurationData();
+			Assert.assertNotNull("data is null for created configuration", data);
+			ICConfigurationDescription cfgDes = des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
+		}
+		coreModel.setProjectDescription(project, des);
+		return project;
+	}
+	
+	static public IProject createProject(String name) throws CoreException{
+		return createProject(name, (IPath)null);
+	}
+	
+	static public IProject createProject(
+			final String name, 
+			final IPath location) throws CoreException{
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IWorkspaceRoot root = workspace.getRoot();
+		final IProject newProjectHandle = root.getProject(name);
+		IProject project = null;
+		
+		if (!newProjectHandle.exists()) {
+			IWorkspaceDescription workspaceDesc = workspace.getDescription();
+			workspaceDesc.setAutoBuilding(false);
+			workspace.setDescription(workspaceDesc);
+			IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());
+			if(location != null)
+				description.setLocation(location);
+			//description.setLocation(root.getLocation());
+			project = CCorePlugin.getDefault().createCDTProject(description, newProjectHandle, new NullProgressMonitor());
+		} else {
+			IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+				public void run(IProgressMonitor monitor) throws CoreException {
+					newProjectHandle.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+				}
+			};
+			NullProgressMonitor monitor = new NullProgressMonitor();
+			workspace.run(runnable, root, IWorkspace.AVOID_UPDATE, monitor);
+			project = newProjectHandle;
+		}
+        
+		// Open the project if we have to
+		if (!project.isOpen()) {
+			project.open(new NullProgressMonitor());
+		}
+				
+		return project;	
+	}
+	
+	static public void checkDiff(Object[] arr1, Object[] arr2){
+		LinkedHashSet set1 = new LinkedHashSet(Arrays.asList(arr1));
+		LinkedHashSet set2 = new LinkedHashSet(Arrays.asList(arr2));
+		LinkedHashSet set1Copy = new LinkedHashSet(set1);
+		set1.removeAll(set2);
+		set2.removeAll(set1Copy);
+
+		String set1String = collectionToString(set1);
+		String set2String = collectionToString(set2);
+		String diffMsg = "array1 entries: " + set1String + ",\n array2 entries: " + set2String + "\n"; 
+		Assert.assertEquals("arrays have different size\n" + diffMsg, arr1.length, arr2.length);
+		Assert.assertEquals("arrays have different contents\n" + diffMsg, 0, set1.size());
+		Assert.assertEquals("arrays have different contents\n" + diffMsg, 0, set2.size());
+		
+		if(!Arrays.equals(arr1, arr2)){
+			Assert.fail("different element order, dumping..\n array1 entries: " + arrayToString(arr1) + "\n array2 entries: " + arrayToString(arr2) + "\n"); 
+		}
+	}
+
+	static public String collectionToString(Collection c){
+		return arrayToString(c.toArray());
+	}
+
+	static public String arrayToString(Object[] arr){
+		StringBuffer buf = new StringBuffer();
+		buf.append('[');
+		for(int i = 0; i < arr.length; i++)	{
+			if(i != 0)
+				buf.append(", ");
+			
+			buf.append(arr[i].toString());
+		}
+		buf.append(']');
+		return buf.toString();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/CTestPlugin.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/CTestPlugin.java
new file mode 100644
index 0000000..8936d71
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/CTestPlugin.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.testplugin;
+
+import java.io.File;
+import java.net.URL;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+
+public class CTestPlugin extends Plugin {
+	
+	private static CTestPlugin fgDefault;
+	
+	public CTestPlugin() {
+		fgDefault= this;
+	}
+	
+	public static CTestPlugin getDefault() {
+		return fgDefault;
+	}
+	
+	public static IWorkspace getWorkspace() {
+		return ResourcesPlugin.getWorkspace();
+	}
+	
+	public static File getFileInPlugin(IPath path) {
+		try {
+			URL url = getDefault().find(path,null);
+			if(url != null){
+				url= Platform.asLocalURL(url);
+				return new File(url.getFile());
+			}
+			return null;
+
+		} catch (Exception e) {
+			return null;
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/DiffUtil.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/DiffUtil.java
new file mode 100644
index 0000000..383c1fe
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/DiffUtil.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.testplugin;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+
+public class DiffUtil {
+	private static final String DIFF_CMD = "diff -ub";
+	private static DiffUtil fInstance;
+	
+	private DiffUtil(){
+		
+	}
+	
+	public static DiffUtil getInstance(){
+		if(fInstance == null)
+			fInstance = new DiffUtil();
+		return fInstance;
+	}
+	
+	private static String createCommand(String location1, String location2){
+		StringBuffer buf = new StringBuffer();
+		buf.append(DIFF_CMD).append(" ").append(location1).append(" ").append(location2);
+		return buf.toString(); 
+	}
+	
+	public String diff(String location1, String location2){
+		InputStream in = invokeDiff(location1, location2);
+		if(in == null)
+			return null;
+		
+		String charSet = null;
+		BufferedReader br;
+		if (null == charSet) { 
+			br = new BufferedReader(new InputStreamReader(in));
+		} else {
+			try {
+				br = new BufferedReader(new InputStreamReader(in, charSet));
+			} catch (UnsupportedEncodingException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+				return null;
+			}
+		}
+		String line;
+		String prev_key = null; // previous key read and saved in envVars
+		String prev_value = null; // value of previous key
+		StringBuffer buf = new StringBuffer();
+		try {
+			while ((line = br.readLine()) != null) {
+				buf.append("\n");
+				buf.append(line);
+			}
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+			return null;
+		}
+		return buf.toString();
+	}
+	
+	private InputStream invokeDiff(String location1, String location2){
+		try {
+			Process p = Runtime.getRuntime().exec(createCommand(location1, location2));
+			return p.getInputStream();
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return null;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java
new file mode 100644
index 0000000..7fe98f0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java
@@ -0,0 +1,870 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.testplugin;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.zip.ZipFile;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IAdditionalInput;
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
+import org.eclipse.cdt.managedbuilder.core.IInputType;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.wizards.datatransfer.ImportOperation;
+import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;
+
+public class ManagedBuildTestHelper {
+	private static final String rcbsToolId = new String("org.eclipse.cdt.managedbuilder.ui.rcbs");	//$NON-NLS-1$
+	private static final String rcbsToolName = new String("Resource Custom Build Step");	//$NON-NLS-1$
+	private static final String rcbsToolInputTypeId = new String("org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype");	//$NON-NLS-1$
+	private static final String rcbsToolInputTypeName = new String("Resource Custom Build Step Input Type");	//$NON-NLS-1$
+	private static final String rcbsToolOutputTypeId = new String("org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype");	//$NON-NLS-1$
+	private static final String rcbsToolOutputTypeName = new String("Resource Custom Build Step Output Type");	//$NON-NLS-1$
+	private static final String PATH_SEPERATOR = ";";	//$NON-NLS-1$
+
+	
+	/* (non-Javadoc)
+	 * Create a new project named <code>name</code> or return the project in 
+	 * the workspace of the same name if it exists.
+	 * 
+	 * @param name The name of the project to create or retrieve.
+	 * @return 
+	 * @throws CoreException
+	 */
+	static public IProject createProject(
+			final String name, 
+			final IPath location, 
+			final String projectId, 
+			final String projectTypeId) throws CoreException {
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		final IProject newProjectHandle = root.getProject(name);
+		IProject project = null;
+		
+		if (!newProjectHandle.exists()) {
+			IWorkspace workspace = ResourcesPlugin.getWorkspace();
+			if (projectId.equals(ManagedBuilderCorePlugin.MANAGED_MAKE_PROJECT_ID)) {
+				createNewManagedProject(newProjectHandle, name, location, projectId, projectTypeId);
+				project = newProjectHandle;
+			} else {
+				IWorkspaceDescription workspaceDesc = workspace.getDescription();
+				workspaceDesc.setAutoBuilding(false);
+				workspace.setDescription(workspaceDesc);
+				IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());
+				//description.setLocation(root.getLocation());
+				project = CCorePlugin.getDefault().createCProject(description, newProjectHandle, new NullProgressMonitor(), ManagedBuilderCorePlugin.MANAGED_MAKE_PROJECT_ID);
+			}
+		} else {
+			IWorkspace workspace = ResourcesPlugin.getWorkspace();
+			IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+				public void run(IProgressMonitor monitor) throws CoreException {
+					newProjectHandle.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+				}
+			};
+			NullProgressMonitor monitor = new NullProgressMonitor();
+			workspace.run(runnable, root, IWorkspace.AVOID_UPDATE, monitor);
+			project = newProjectHandle;
+		}
+        
+		// Open the project if we have to
+		if (!project.isOpen()) {
+			project.open(new NullProgressMonitor());
+		}
+				
+		return project;	
+	}
+	
+	static public IProject createProject(
+			final String name, 
+			final String projectTypeId) {
+		try {
+			return 	createProject(name, 
+					null, 
+					ManagedBuilderCorePlugin.MANAGED_MAKE_PROJECT_ID, 
+					projectTypeId);
+		} catch (CoreException e) {
+			TestCase.fail(e.getLocalizedMessage());
+		}
+		return null;
+	}
+	
+	static public IFile createFile(IProject project, String name){
+		return createFile(project, name, new ByteArrayInputStream(new byte[0]));
+	}
+
+	static public IFile createFile(IProject project, String name, String contents){
+		return createFile(project, name, new ByteArrayInputStream(contents.getBytes()));
+	}
+
+	static public IFile createFile(IProject project, String name, InputStream contents){
+		IFile file = project.getFile(name);
+		if( !file.exists() ){
+			try {
+				IPath dirPath = file.getFullPath().removeLastSegments(1).removeFirstSegments(1);
+				if(dirPath.segmentCount() > 0){
+					IFolder rc = project.getFolder(dirPath);
+					if(!rc.exists()){
+						rc.create(true, true, null);
+					}
+				}
+					
+//				file.create( new ByteArrayInputStream( "#include <stdio.h>\n extern void bar(); \n int main() { \nprintf(\"Hello, World!!\"); \n bar();\n return 0; }".getBytes() ), false, null );
+				file.create(contents, false, null );
+			} catch (CoreException e) {
+				TestCase.fail(e.getLocalizedMessage());
+			}
+		}
+		return file;
+	}
+
+	static public IFolder createFolder(IProject project, String name){
+		IFolder folder = project.getFolder(name);
+		if( !folder.exists() ){
+			try {
+				IPath dirPath = folder.getFullPath().removeLastSegments(1).removeFirstSegments(1);
+				if(dirPath.segmentCount() > 0){
+					IFolder rc = project.getFolder(dirPath);
+					if(!rc.exists()){
+						rc.create(true, true, null);
+					}
+				}
+					
+//				file.create( new ByteArrayInputStream( "#include <stdio.h>\n extern void bar(); \n int main() { \nprintf(\"Hello, World!!\"); \n bar();\n return 0; }".getBytes() ), false, null );
+				folder.create(true , false, null );
+			} catch (CoreException e) {
+				TestCase.fail(e.getLocalizedMessage());
+			}
+		}
+		return folder;
+	}
+
+	/**
+	 * Remove the <code>IProject</code> with the name specified in the argument from the 
+	 * receiver's workspace.
+	 *  
+	 * @param name
+	 */
+	static public void removeProject(String name) {
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		final IProject project = root.getProject(name);
+		if (project.exists()) {
+			IWorkspace workspace = ResourcesPlugin.getWorkspace();
+			IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+				public void run(IProgressMonitor monitor) throws CoreException {
+					System.gc();
+					System.runFinalization();
+					project.delete(true, true, null);
+				}
+			};
+			NullProgressMonitor monitor = new NullProgressMonitor();
+			try {
+				workspace.run(runnable, root, IWorkspace.AVOID_UPDATE, monitor);
+			} catch (CoreException e2) {
+				Assert.fail("failed to remove the project: " + e2.getLocalizedMessage());
+			}
+		}
+	}
+	
+	public static IProject loadProject(String name, String path){
+		IPath zipPath = new Path("resources").append(path).append(name).append(name).addFileExtension("zip");
+		File zipFile = CTestPlugin.getFileInPlugin(zipPath);
+		if(zipFile == null){
+			zipPath = new Path("resources").append(path).append(name).addFileExtension("zip");
+			zipFile = CTestPlugin.getFileInPlugin(zipPath);
+		}
+		if(zipFile == null) {
+			Assert.fail("zip file " + zipPath.toString() + " is missing.");
+			return null;
+		}
+
+		
+		try{
+			return createProject(name, zipFile, null, null);
+		}
+		catch(Exception e){
+			Assert.fail("fail to create the project: " + e.getLocalizedMessage());
+		}
+		
+		return null;
+	}
+	
+	static public IProject createProject(String projectName, File zip, IPath location, String projectTypeId) throws CoreException, InvocationTargetException, IOException {
+		IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
+		IProject project= root.getProject(projectName);
+		if (project.exists()) 
+			removeProject(projectName);
+		
+		IPath destPath = (location != null) ?
+				location :
+				project.getFullPath();
+		if (zip != null) {
+			importFilesFromZip(new ZipFile(zip), destPath, null);
+		}
+		
+		return createProject(projectName, location, ManagedBuilderCorePlugin.MANAGED_MAKE_PROJECT_ID, projectTypeId);
+	}
+	
+	static public void importFilesFromZip(ZipFile srcZipFile, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException {		
+		ZipFileStructureProvider structureProvider=	new ZipFileStructureProvider(srcZipFile);
+		try {
+			ImportOperation op= new ImportOperation(destPath, structureProvider.getRoot(), structureProvider, new IOverwriteQuery() {
+						public String queryOverwrite(String file) {
+							return ALL;
+						}
+			});
+			op.run(monitor);
+		} catch (InterruptedException e) {
+			// should not happen
+			Assert.assertTrue(false);
+		}
+	}
+
+	static public IProject createNewManagedProject(IProject newProjectHandle, 
+			final String name, 
+			final IPath location, 
+			final String projectId, 
+			final String projectTypeId) throws CoreException {
+		final IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IWorkspaceRoot root = workspace.getRoot();
+		final IProject project = newProjectHandle;
+		IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+			public void run(IProgressMonitor monitor) throws CoreException {
+				// Create the base project
+				IWorkspaceDescription workspaceDesc = workspace.getDescription();
+				workspaceDesc.setAutoBuilding(false);
+				workspace.setDescription(workspaceDesc);
+				IProjectDescription description = workspace.newProjectDescription(project.getName());
+				if (location != null) {
+					description.setLocation(location);
+				}
+				CCorePlugin.getDefault().createCProject(description, project, new NullProgressMonitor(), projectId);
+				// Add the managed build nature and builder
+				addManagedBuildNature(project);
+				
+				// Find the base project type definition
+				IProjectType[] projTypes = ManagedBuildManager.getDefinedProjectTypes();
+				IProjectType projType = ManagedBuildManager.getProjectType(projectTypeId);
+				Assert.assertNotNull(projType);
+				
+				// Create the managed-project (.cdtbuild) for our project that builds an executable.
+				IManagedProject newProject = null;
+				try {
+					newProject = ManagedBuildManager.createManagedProject(project, projType);
+				} catch (Exception e) {
+					Assert.fail("Failed to create managed project for: " + project.getName());
+				}
+				Assert.assertEquals(newProject.getName(), projType.getName());
+				Assert.assertFalse(newProject.equals(projType));
+				ManagedBuildManager.setNewProjectVersion(project);
+				// Copy over the configs
+				IConfiguration defaultConfig = null;
+				IConfiguration[] configs = projType.getConfigurations();
+				for (int i = 0; i < configs.length; ++i) {
+					// Make the first configuration the default 
+					if (i == 0) {
+						defaultConfig = newProject.createConfiguration(configs[i], projType.getId() + "." + i);
+					} else {
+						newProject.createConfiguration(configs[i], projType.getId() + "." + i);
+					}
+				}
+				ManagedBuildManager.setDefaultConfiguration(project, defaultConfig);
+				
+				IConfiguration cfgs[] = newProject.getConfigurations();
+				for(int i = 0; i < cfgs.length; i++){
+					cfgs[i].setArtifactName(newProject.getDefaultArtifactName());
+				}
+				
+				ManagedBuildManager.getBuildInfo(project).setValid(true);
+			}
+		};
+		NullProgressMonitor monitor = new NullProgressMonitor();
+		try {
+			workspace.run(runnable, root, IWorkspace.AVOID_UPDATE, monitor);
+		} catch (CoreException e2) {
+			Assert.fail(e2.getLocalizedMessage());
+		}
+
+		// Initialize the path entry container
+		IStatus initResult = ManagedBuildManager.initBuildInfoContainer(project);
+		if (initResult.getCode() != IStatus.OK) {
+			Assert.fail("Initializing build information failed for: " + project.getName() + " because: " + initResult.getMessage());
+		}
+		return project;
+	}
+
+	static public void addManagedBuildNature (IProject project) {
+		// Create the buildinformation object for the project
+		IManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
+//		info.setValid(true);
+		
+		// Add the managed build nature
+		try {
+			ManagedCProjectNature.addManagedNature(project, new NullProgressMonitor());
+			ManagedCProjectNature.addManagedBuilder(project, new NullProgressMonitor());
+		} catch (CoreException e) {
+			Assert.fail("Test failed on adding managed build nature or builder: " + e.getLocalizedMessage());
+		}
+
+		// Associate the project with the managed builder so the clients can get proper information
+		ICDescriptor desc = null;
+		try {
+			desc = CCorePlugin.getDefault().getCProjectDescription(project, true);
+			desc.remove(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID);
+			desc.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, ManagedBuildManager.INTERFACE_IDENTITY);
+		} catch (CoreException e) {
+			Assert.fail("Test failed on adding managed builder as scanner info provider: " + e.getLocalizedMessage());
+		}
+		try {
+			desc.saveProjectData();
+		} catch (CoreException e) {
+			Assert.fail("Test failed on saving the ICDescriptor data: " + e.getLocalizedMessage());		}
+	}
+	
+	static public boolean compareBenchmarks(final IProject project, IPath testDir, IPath[] files) {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+			public void run(IProgressMonitor monitor) throws CoreException {
+				project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+			}
+		};
+		try {
+			NullProgressMonitor monitor = new NullProgressMonitor();
+			workspace.run(runnable, workspace.getRoot(), IWorkspace.AVOID_UPDATE, monitor);
+		} catch (Exception e) {
+			Assert.fail("File " + files[0].lastSegment() + " - project refresh failed.");
+		}
+		for (int i=0; i<files.length; i++) {
+			IPath testFile = testDir.append(files[i]);
+			IPath benchmarkFile = Path.fromOSString("Benchmarks/" + files[i]);
+			StringBuffer testBuffer = readContentsStripLineEnds(project, testFile);
+			StringBuffer benchmarkBuffer = readContentsStripLineEnds(project, benchmarkFile);
+			if (!testBuffer.toString().equals(benchmarkBuffer.toString())) {
+				StringBuffer buffer = new StringBuffer();
+				buffer.append("File ").append(testFile.lastSegment()).append(" does not match its benchmark.\n ");
+				buffer.append("expected:\n ");
+				buffer.append("\"").append(benchmarkBuffer).append("\"");
+				buffer.append("\n\n ");
+				buffer.append("but was:\n ");
+				buffer.append("\"").append(testBuffer).append("\"");
+				buffer.append("\n\n ");
+				
+				buffer.append(">>>>>>>>>>>>>>>start diff: \n");
+				String location1 = getFileLocation(project, benchmarkFile);
+				String location2 = getFileLocation(project, testFile);
+				String diff = DiffUtil.getInstance().diff(location1, location2);
+				if(diff == null)
+					diff = "!diff failed!";
+				buffer.append(diff);
+				buffer.append("\n<<<<<<<<<<<end diff");
+				buffer.append("\n\n ");
+				
+				Assert.fail(buffer.toString());
+			} 
+		}
+		return true;
+	}
+
+	static public boolean compareBenchmarks(final IProject project, IPath testDir, String[] fileNames) {
+		return compareBenchmarks(project, testDir, new Path("benchmarks").append(testDir), fileNames);
+	}
+
+	static public boolean compareBenchmarks(final IProject project, IPath testDir, IPath benchmarkDir, String[] fileNames) {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+			public void run(IProgressMonitor monitor) throws CoreException {
+				project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+			}
+		};
+		try {
+			NullProgressMonitor monitor = new NullProgressMonitor();
+			workspace.run(runnable, workspace.getRoot(), IWorkspace.AVOID_UPDATE, monitor);
+		} catch (Exception e) {
+			Assert.fail("File " + fileNames[0] + " - project refresh failed.");
+		}
+		
+		IFolder testFolder = (IFolder)project.findMember(testDir);
+		IFolder bmFolder = (IFolder)project.findMember(benchmarkDir);
+		
+		return compareBenchmarks(testFolder, bmFolder, fileNames);
+	}
+	
+	static public boolean compareBenchmarks(IFolder testFolder, IFolder bmFolder, String[] fileNames) {
+		Assert.assertNotNull(testFolder);
+		Assert.assertNotNull(bmFolder);
+		
+		for (int i=0; i<fileNames.length; i++) {
+			IFile tFile = testFolder.getFile(fileNames[i]);
+			IFile bmFile = bmFolder.getFile(fileNames[i]);
+			if(!tFile.exists() && !bmFile.exists())
+				continue;
+			
+			compareBenchmarks(tFile, bmFile);
+		}
+		
+		return true;
+	}
+	
+	static public boolean compareBenchmarks(IFile tFile, IFile bmFile) {
+		StringBuffer testBuffer = readContentsStripLineEnds(tFile);
+		StringBuffer benchmarkBuffer = readContentsStripLineEnds(bmFile);
+		if (!testBuffer.toString().equals(benchmarkBuffer.toString())) {
+			StringBuffer buffer = new StringBuffer();
+			buffer.append("File ").append(tFile.getName()).append(" does not match its benchmark.\n ");
+			buffer.append("expected:\n ");
+			buffer.append("\"").append(benchmarkBuffer).append("\"");
+			buffer.append("\n\n ");
+			buffer.append("but was:\n ");
+			buffer.append("\"").append(testBuffer).append("\"");
+			buffer.append("\n\n ");
+				
+			buffer.append(">>>>>>>>>>>>>>>start diff: \n");
+			String location1 = getFileLocation(bmFile.getProject(), bmFile.getProjectRelativePath());
+			String location2 = getFileLocation(tFile.getProject(), tFile.getProjectRelativePath());
+			String diff = DiffUtil.getInstance().diff(location1, location2);
+			if(diff == null)
+				diff = "!diff failed!";
+			buffer.append(diff);
+			buffer.append("\n<<<<<<<<<<<end diff");
+			buffer.append("\n\n ");
+				
+			Assert.fail(buffer.toString());
+		} 
+		return true;
+	}
+
+	static public boolean verifyFilesDoNotExist(final IProject project, IPath testDir, IPath[] files) {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+			public void run(IProgressMonitor monitor) throws CoreException {
+				project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+			}
+		};
+		try {
+			NullProgressMonitor monitor = new NullProgressMonitor();
+			workspace.run(runnable, workspace.getRoot(), IWorkspace.AVOID_UPDATE, monitor);
+		} catch (Exception e) {
+			Assert.fail("File " + files[0].lastSegment() + " - project refresh failed.");
+		}
+		for (int i=0; i<files.length; i++) {
+			IPath testFile = testDir.append(files[i]);
+			IPath fullPath = project.getLocation().append(testFile);
+			try {
+				if (fullPath.toFile().exists()) {
+					Assert.fail("File " + testFile.lastSegment() + " unexpectedly found.");
+					return false;
+				}					
+			} catch (Exception e) {
+				Assert.fail("File " + fullPath.toString() + " could not be referenced.");
+			}
+		}
+		return true;
+	}
+
+	static public String getFileLocation(IProject project, IPath path){
+		return project.getLocation().append(path).toString();
+	}
+	static public StringBuffer readContentsStripLineEnds(IFile file) {
+		return readContentsStripLineEnds(file.getProject(), file.getProjectRelativePath());
+	}
+	static public StringBuffer readContentsStripLineEnds(IProject project, IPath path) {
+		StringBuffer buff = new StringBuffer();
+		IPath fullPath = project.getLocation().append(path);
+		try {
+			FileReader input = null;
+			try {
+				input = new FileReader(fullPath.toFile());
+			} catch (Exception e) {
+				Assert.fail("File " + fullPath.toString() + " could not be read: " + e.getLocalizedMessage());
+			}
+			//InputStream input = file.getContents(true);   // A different way to read the file...
+			int c;
+			do {
+				c = input.read();
+				if (c == -1) break;
+				if (c != '\r' && c != '\n') {
+					buff.append((char)c);
+				}
+			} while (c != -1);
+			input.close();
+		} catch (Exception e) {
+			Assert.fail("File " + fullPath.toString() + " could not be read.");
+		}
+		return buff;
+	}
+	
+	static public IPath copyFilesToTempDir(IPath srcDir, IPath tmpSubDir, IPath[] files) {
+		IPath tmpSrcDir = null;
+		String userDirStr = System.getProperty("user.home");
+		if (userDirStr != null) {
+			IPath userDir = Path.fromOSString(userDirStr);
+			tmpSrcDir = userDir.append(tmpSubDir);
+			if (userDir.toString().equalsIgnoreCase(tmpSrcDir.toString())) {
+				Assert.fail("Temporary sub-directory cannot be the empty string.");				
+			} else {
+				File tmpSrcDirFile = tmpSrcDir.toFile();
+				if (tmpSrcDirFile.exists()) {
+					//  Make sure that this is the expected directory before we delete it...
+					if (tmpSrcDir.lastSegment().equals(tmpSubDir.lastSegment())) {
+						deleteDirectory(tmpSrcDirFile);
+					} else {
+						Assert.fail("Temporary directory " + tmpSrcDirFile.toString() + " already exists.");
+					}
+				}
+				boolean succeed = tmpSrcDirFile.mkdir();
+				if (succeed) {
+					for (int i=0; i<files.length; i++) {
+						IPath file = files[i];
+						IPath srcFile = srcDir.append(file);
+						FileReader srcReader = null;
+						try {
+							srcReader = new FileReader(srcFile.toFile());
+						} catch (Exception e) {
+							Assert.fail("File " + file.toString() + " could not be read.");
+						}
+						if (file.segmentCount() > 1) {
+							IPath newDir = tmpSrcDir;
+							do {
+								IPath dir = file.uptoSegment(1);
+								newDir = newDir.append(dir);
+								file = file.removeFirstSegments(1);
+								succeed = newDir.toFile().mkdir();
+							} while (file.segmentCount() > 1);
+						}
+						IPath destFile = tmpSrcDir.append(files[i]);
+						FileWriter writer = null;
+						try {
+							writer = new FileWriter(destFile.toFile());
+						} catch (Exception e) {
+							Assert.fail("File " + files[i].toString() + " could not be written.");
+						}
+						try {
+							int c;
+							do {
+								c = srcReader.read();
+								if (c == -1) break;
+								writer.write(c);
+							} while (c != -1);
+							srcReader.close();
+							writer.close();
+						} catch (Exception e) {
+							Assert.fail("File " + file.toString() + " could not be copied.");
+						}
+					}
+				}
+			}
+		}
+		return tmpSrcDir;
+	}
+	
+	static public void deleteTempDir(IPath tmpSubDir, IPath[] files) {
+		IPath tmpSrcDir = null;
+		String userDirStr = System.getProperty("user.home");
+		if (userDirStr != null) {
+			IPath userDir = Path.fromOSString(userDirStr);
+			tmpSrcDir = userDir.append(tmpSubDir);
+			if (userDir.toString().equalsIgnoreCase(tmpSrcDir.toString())) {
+				Assert.fail("Temporary sub-directory cannot be the empty string.");				
+			} else {
+				File tmpSrcDirFile = tmpSrcDir.toFile();
+				if (!tmpSrcDirFile.exists()) {
+					Assert.fail("Temporary directory " + tmpSrcDirFile.toString() + " does not exist.");				
+				} else {
+					boolean succeed;
+					for (int i=0; i<files.length; i++) {
+						// Delete the file
+						IPath thisFile = tmpSrcDir.append(files[i]);
+						succeed = thisFile.toFile().delete();
+					}
+					// Delete the dir
+					succeed = tmpSrcDirFile.delete();
+				}
+			}
+		}
+	}
+	
+	/*
+	 * Cloned from core CProjectHelper
+	 */
+	public static void delete(ICProject cproject) {
+		try {
+			cproject.getProject().delete(true, true, null);
+		} catch (CoreException e) {
+			try {
+				Thread.sleep(1000);
+			} catch (InterruptedException e1) {
+			} finally {
+				try {
+					System.gc();
+					System.runFinalization();
+					cproject.getProject().delete(true, true, null);
+				} catch (CoreException e2) {
+					Assert.fail(getMessage(e2.getStatus()));
+				}
+			}
+		}
+	}
+	
+	/*
+	 * Cloned from core CProjectHelper
+	 */
+	private static String getMessage(IStatus status) {
+		StringBuffer message = new StringBuffer("[");
+		message.append(status.getMessage());
+		if (status.isMultiStatus()) {
+			IStatus children[] = status.getChildren();
+			for( int i = 0; i < children.length; i++) {
+				message.append(getMessage(children[i]));
+			}
+		}
+		message.append("]");
+		return message.toString();
+	}
+
+	static private void deleteDirectory(File dir) {
+		boolean b;
+		File[] toDelete = dir.listFiles();
+		for (int i=0; i<toDelete.length; i++) {
+			File fileToDelete = toDelete[i];
+			if (fileToDelete.isDirectory()) {
+				deleteDirectory(fileToDelete);
+			}
+			b = fileToDelete.delete();
+		}
+		b = dir.delete();
+	}
+	
+	public static ITool createRcbsTool(IConfiguration cfg, String file, String inputs, String outputs, String cmds){
+		IProject project = cfg.getOwner().getProject();
+		IResource f = project.findMember(file);
+		
+		Assert.assertTrue("file does not exist", f != null);
+		Assert.assertEquals("resource is not a file", f.getType(), IResource.FILE);
+		
+		return createRcbsTool(cfg, (IFile)f, inputs, outputs, cmds);
+	}
+
+	public static ITool createRcbsTool(IConfiguration cfg, IFile file, String inputs, String outputs, String cmds){
+		IResourceConfiguration rcCfg = cfg.getResourceConfiguration(file.getFullPath().toString());
+		if(rcCfg == null)
+			rcCfg = cfg.createResourceConfiguration(file);
+		
+		Assert.assertTrue("failed to create resource configuration", rcCfg != null);
+		
+		ITool tool = getRcbsTool(rcCfg, true);
+		
+		setRcbsInputs(tool, inputs);
+		setRcbsOutputs(tool, outputs);
+		tool.setToolCommand(cmds);
+		tool.setAnnouncement("default test rcbs announcement");
+		
+		rcCfg.setRcbsApplicability(IResourceConfiguration.KIND_APPLY_RCBS_TOOL_AS_OVERRIDE);
+		return tool;
+	}
+	
+	public static ITool setRcbsInputs(ITool tool, String inputs){
+		tool.getInputTypes()[0].getAdditionalInputs()[0].setPaths(inputs);
+		return tool;
+	}
+
+	public static ITool setRcbsOutputs(ITool tool, String outputs){
+		tool.getOutputTypes()[0].setOutputNames(outputs);
+		return tool;
+	}
+
+	public static ITool getRcbsTool(IResourceConfiguration rcConfig, boolean create){
+		ITool rcbsTools[] = getRcbsTools(rcConfig);
+		ITool rcbsTool = null; 
+		if(rcbsTools != null)
+			rcbsTool = rcbsTools[0];
+		else if (create) {
+			rcbsTool = rcConfig.createTool(null,rcbsToolId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolName,false);	//$NON-NLS-1$
+			rcbsTool.setCustomBuildStep(true);
+			IInputType rcbsToolInputType = rcbsTool.createInputType(null,rcbsToolInputTypeId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolInputTypeName,false);	//$NON-NLS-1$
+			IAdditionalInput rcbsToolInputTypeAdditionalInput = rcbsToolInputType.createAdditionalInput(new String());
+			rcbsToolInputTypeAdditionalInput.setKind(IAdditionalInput.KIND_ADDITIONAL_INPUT_DEPENDENCY);
+			rcbsTool.createOutputType(null,rcbsToolOutputTypeId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolOutputTypeName,false);	//$NON-NLS-1$
+		}
+		return rcbsTool;
+	}
+	
+	public static ITool[] getRcbsTools(IResourceConfiguration rcConfig){
+		List list = new ArrayList();
+		ITool tools[] = rcConfig.getTools();
+		for (int i = 0; i < tools.length; i++) {
+			ITool tool = tools[i];
+			if (tool.getCustomBuildStep() && !tool.isExtensionElement()) {
+				list.add(tool);
+			}
+		}
+		if(list.size() != 0)
+			return (ITool[])list.toArray(new ITool[list.size()]);
+		return null;
+	}
+
+	public static boolean setObjs(IConfiguration cfg, String[] objs){
+		return setOption(cfg, IOption.OBJECTS, objs);
+	}
+
+	public static boolean setLibs(IConfiguration cfg, String[] objs){
+		return setOption(cfg, IOption.LIBRARIES, objs);
+	}
+
+	public static boolean setOption(IConfiguration cfg, int type, Object value){
+		return setOption(cfg.getFilteredTools(), type, value);
+	}
+
+	public static boolean setOption(IResourceConfiguration rcCfg, int type, Object value){
+		return setOption(rcCfg.getToolsToInvoke()[0], type, value);
+	}
+
+	public static boolean setOption(ITool tools[], int type, Object value){
+		for(int i = 0; i < tools.length; i++){
+			if(setOption(tools[i], type, value))
+				return true;
+		}
+		return false;
+	}
+
+	public static IBuildObject[] getOption(IConfiguration cfg, int type){
+		return getOption(cfg.getFilteredTools(), type);
+	}
+
+	public static IBuildObject[] getOption(IResourceConfiguration rcCfg, int type, Object value){
+		return getOption(new ITool[]{rcCfg.getToolsToInvoke()[0]}, type);
+	}
+
+	public static IBuildObject[] getOption(ITool tools[], int type){
+		for(int i = 0; i < tools.length; i++){
+			IOption option = getOption(tools[i], type);
+			if(option != null)
+				return new IBuildObject[]{tools[i],option};
+		}
+		return null;
+	}
+
+	public static IOption getOption(IHoldsOptions tool, int type){
+		IOption opts[] = tool.getOptions();
+		
+		for(int i = 0; i < opts.length; i++){
+			IOption option = opts[i];
+			try {
+				if(option.getValueType() == type){
+					return option;
+				}
+			} catch (BuildException e) {
+			}
+		}
+		return null;
+	}
+
+	public static boolean setOption(ITool tool, int type, Object value){
+		IOption option = getOption(tool, type);
+		
+		if(option == null)
+			return false;
+		IBuildObject obj = tool.getParent();
+		IConfiguration cfg = null;
+		IResourceConfiguration rcCfg = null;
+		if(obj instanceof IToolChain)
+			cfg = ((IToolChain)obj).getParent();
+		else
+			rcCfg = (IResourceConfiguration)obj;
+
+		try {
+				if(option.getValueType() == type){
+					switch(type){
+						case IOption.BOOLEAN:
+						{
+							boolean val = ((Boolean)value).booleanValue();
+							if(rcCfg != null)
+								rcCfg.setOption(tool, option, val);
+							else
+								cfg.setOption(tool, option, val);
+						}
+							return true;
+						case IOption.ENUMERATED:
+						case IOption.STRING:
+						{
+							String val = (String)value;
+							if(rcCfg != null)
+								rcCfg.setOption(tool, option, val);
+							else
+								cfg.setOption(tool, option, val);
+						}
+							return true;
+						case IOption.STRING_LIST:
+						case IOption.INCLUDE_PATH:
+						case IOption.PREPROCESSOR_SYMBOLS:
+						case IOption.LIBRARIES:
+						case IOption.OBJECTS:
+						case IOption.INCLUDE_FILES:
+						case IOption.LIBRARY_PATHS:
+						case IOption.LIBRARY_FILES:
+						case IOption.MACRO_FILES:
+						{
+							String val[] = (String[])value;
+							if(rcCfg != null)
+								rcCfg.setOption(tool, option, val);
+							else
+								cfg.setOption(tool, option, val);
+						}
+							return true;
+						default:
+							Assert.fail("wrong option type passed");
+					}
+				}
+			} catch (BuildException e) {
+			}
+		return false;
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/tests/suite/AllManagedBuildTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/tests/suite/AllManagedBuildTests.java
new file mode 100644
index 0000000..5e2e399
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/tests/suite/AllManagedBuildTests.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ *  Copyright (c) 2004, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *  IBM - Initial API and implementation
+ *  Markus Schorn (Wind River Systems)
+ *  James Blackburn (Broadcom Corp.)
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.tests.suite;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.build.core.scannerconfig.tests.CfgScannerConfigProfileManagerTests;
+import org.eclipse.cdt.build.core.scannerconfig.tests.GCCSpecsConsoleParserTest;
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.managedbuilder.core.tests.BuildDescriptionModelTests;
+import org.eclipse.cdt.managedbuilder.core.tests.ManagedBuildCoreTests;
+import org.eclipse.cdt.managedbuilder.core.tests.ManagedBuildCoreTests20;
+import org.eclipse.cdt.managedbuilder.core.tests.ManagedBuildCoreTests_SharedToolOptions;
+import org.eclipse.cdt.managedbuilder.core.tests.ManagedBuildDependencyCalculatorTests;
+import org.eclipse.cdt.managedbuilder.core.tests.ManagedBuildEnvironmentTests;
+import org.eclipse.cdt.managedbuilder.core.tests.ManagedBuildMacrosTests;
+import org.eclipse.cdt.managedbuilder.core.tests.ManagedBuildTCSupportedTest;
+import org.eclipse.cdt.managedbuilder.core.tests.ManagedCommandLineGeneratorTest;
+import org.eclipse.cdt.managedbuilder.core.tests.ManagedProject21MakefileTests;
+import org.eclipse.cdt.managedbuilder.core.tests.ManagedProject30MakefileTests;
+import org.eclipse.cdt.managedbuilder.core.tests.ManagedProjectUpdateTests;
+import org.eclipse.cdt.managedbuilder.core.tests.MultiVersionSupportTests;
+import org.eclipse.cdt.managedbuilder.core.tests.OptionEnablementTests;
+import org.eclipse.cdt.managedbuilder.core.tests.PathConverterTest;
+import org.eclipse.cdt.managedbuilder.core.tests.ResourceBuildCoreTests;
+import org.eclipse.cdt.managedbuilder.templateengine.tests.AllTemplateEngineTests;
+import org.eclipse.cdt.projectmodel.tests.BackwardCompatiblityTests;
+import org.eclipse.cdt.projectmodel.tests.CProjectDescriptionSerializationTests;
+import org.eclipse.cdt.projectmodel.tests.OptionStringListValueTests;
+import org.eclipse.cdt.projectmodel.tests.ProjectModelTests;
+
+/**
+ * Main TestSuite for all the managed build tests
+ */
+public class AllManagedBuildTests {
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(AllManagedBuildTests.suite());
+	}
+	public static Test suite() {
+		CCorePlugin.getDefault().getPluginPreferences().setValue(CCorePlugin.PREF_INDEXER, IPDOMManager.ID_FAST_INDEXER);
+
+		TestSuite suite = new TestSuite("Test for org.eclipse.cdt.managedbuild.core.tests");
+		//$JUnit-BEGIN$
+		// build.core.scannerconfig.tests
+		suite.addTest(CfgScannerConfigProfileManagerTests.suite());
+		suite.addTestSuite(GCCSpecsConsoleParserTest.class);
+
+		// managedbuilder.core.tests
+		suite.addTest(ManagedBuildCoreTests20.suite());
+		suite.addTest(ManagedBuildCoreTests.suite());
+		suite.addTest(ManagedProjectUpdateTests.suite());
+		suite.addTest(ManagedCommandLineGeneratorTest.suite());
+		suite.addTest(ResourceBuildCoreTests.suite());
+		suite.addTest(ManagedProject21MakefileTests.suite());
+		suite.addTest(ManagedProject30MakefileTests.suite());
+		suite.addTest(ManagedBuildCoreTests_SharedToolOptions.suite());
+		suite.addTest(ManagedBuildEnvironmentTests.suite());
+		suite.addTest(ManagedBuildMacrosTests.suite());
+		suite.addTest(ManagedBuildTCSupportedTest.suite());
+		suite.addTest(MultiVersionSupportTests.suite());
+		suite.addTest(OptionEnablementTests.suite());
+		suite.addTest(ManagedBuildDependencyCalculatorTests.suite());
+		suite.addTest(BuildDescriptionModelTests.suite());
+		suite.addTest(PathConverterTest.suite());
+
+		// managedbuilder.templateengine.tests
+		suite.addTest(AllTemplateEngineTests.suite());
+
+		// projectmodel.tests
+		suite.addTest(BackwardCompatiblityTests.suite());
+		suite.addTest(CProjectDescriptionSerializationTests.suite());
+		suite.addTest(OptionStringListValueTests.suite());
+		suite.addTest(ProjectModelTests.suite());
+		//$JUnit-END$
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/AppendToMBSStringListOptionValues.xml b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/AppendToMBSStringListOptionValues.xml
new file mode 100644
index 0000000..d132b12
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/AppendToMBSStringListOptionValues.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="AppendToMBSStringListOptionValues test" description="Testing Template Engines AppendToMBSStringListOptionValues Process"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject">
+		<simple name="name" value="$(projectName)" /> 
+		<simple name="location" value="$(location)" />
+		<simple name="artifactExtension" value="exe" />
+		<simple name="isCProject" value="false" />
+	</process>
+
+	<process type="org.eclipse.cdt.managedbuilder.core.SetMBSStringListOptionValues">
+		<simple name="projectName" value="$(projectName)" />		
+		<complex-array name="resourcePaths">
+			<element>
+				<simple name="id" value="$(id)" />
+				<simple-array name="values">
+					<element value="$(StringListValue0)" />
+					<element value="$(StringListValue1)" />
+					<element value="$(StringListValue2)" />
+					<element value="$(StringListValue3)" />
+				</simple-array>
+				<simple name="path" value="" />
+			</element>
+		</complex-array>
+	</process>
+
+	<process type="org.eclipse.cdt.managedbuilder.core.AppendToMBSStringListOptionValues">
+		<simple name="projectName" value="$(projectName)" />		
+		<complex-array name="resourcePaths">
+			<element>
+				<simple name="id" value="$(id)" />
+				<simple-array name="values">
+					<element value="$(AppendStringListValue0)" />
+					<element value="$(AppendStringListValue1)" />
+					<element value="$(AppendStringListValue2)" />
+					<element value="$(AppendStringListValue3)" />
+				</simple-array>
+				<simple name="path" value="" />
+			</element>
+		</complex-array>
+	</process>
+	
+	<process type="org.eclipse.cdt.managedbuilder.core.SetMBSStringListOptionValues">
+		<simple name="projectName" value="$(projectName)" />		
+		<complex-array name="resourcePaths">
+			<element>
+				<simple name="id" value=".*gnu.c.link.option.paths.*" />
+				<simple-array name="values">
+					<element value="$(StringListValue0)" />
+					<element value="$(StringListValue1)" />
+					<element value="$(StringListValue2)" />
+					<element value="$(StringListValue3)" />
+				</simple-array>
+				<simple name="path" value="" />
+			</element>
+		</complex-array>
+	</process>
+	
+	 <process type="org.eclipse.cdt.managedbuilder.core.AppendToMBSStringListOptionValues">
+        <simple name="projectName" value= "$(projectName)"/>      
+        <complex-array name="resourcePaths">
+            <element>
+                <simple name="id" value=".*gnu.c.link.option.paths.*" />
+               <simple-array name="values">
+					<element value="$(AppendStringListValue0)" />
+					<element value="$(AppendStringListValue1)" />
+					<element value="$(AppendStringListValue2)" />
+					<element value="$(AppendStringListValue3)" />
+				</simple-array>
+                <simple name="path" value="" />
+            </element>                                    
+        </complex-array>
+    </process>
+
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/AppendToMBSStringOptionValue.xml b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/AppendToMBSStringOptionValue.xml
new file mode 100644
index 0000000..44ed173
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/AppendToMBSStringOptionValue.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="AppendToMBSStringOptionValue test" description="Testing Template Engines AppendToMBSStringOptionValue Process"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject">
+		<simple name="name" value="$(projectName)" /> 
+		<simple name="location" value="$(location)" />
+		<simple name="artifactExtension" value="exe" />
+		<simple name="isCProject" value="false" />
+	</process>
+
+	<process type="org.eclipse.cdt.managedbuilder.core.SetMBSStringOptionValue">
+		<simple name="projectName" value="$(projectName)" />		
+		<complex-array name="resourcePaths">
+			<element>
+				<simple name="id" value="$(id)" />
+				<simple name="value" value="$(StringValue)" />
+				<simple name="path" value="" />
+			</element>
+		</complex-array>
+	</process>
+
+	<process type="org.eclipse.cdt.managedbuilder.core.AppendToMBSStringOptionValue">
+		<simple name="projectName" value="$(projectName)" />		
+		<complex-array name="resourcePaths">
+			<element>
+				<simple name="id" value="$(id)" />
+				<simple name="value" value="$(AppendStringValue)" />
+				<simple name="path" value="" />
+			</element>
+		</complex-array>
+	</process>
+
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/Basename.cpp b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/Basename.cpp
new file mode 100644
index 0000000..f3e3376
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/Basename.cpp
@@ -0,0 +1,37 @@
+/*
+============================================================================
+ Name        : $(baseName).cpp
+ Author      : $(author)
+ Version     :
+ Copyright   : $(copyright)
+ Description : Exe source file
+============================================================================
+*/
+
+//  Include Files  
+
+#include "$(baseName).h"
+
+//  Defined Constants
+
+#define Constant "CONSTANT"
+
+
+//  Global Variables
+
+static int globalValue;
+
+//  Local Functions
+
+void printMessage(char* message) {
+    printf(message);
+}
+
+// Main Function
+
+int main(int nArgs, char **args) {
+    printMessage("Hello, world!\n");
+    printMessage("$(baseName)");
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/Basename.h b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/Basename.h
new file mode 100644
index 0000000..3c5300a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/Basename.h
@@ -0,0 +1,27 @@
+/*
+============================================================================
+ Name        : $(baseName).h
+ Author      : $(author)
+ Version     :
+ Copyright   : $(copyright)
+ Description : Exe header file
+============================================================================
+*/
+
+#ifndef __$(baseName)_H__
+#define __$(baseName)_H__
+
+
+//  Include Files
+
+#include <stdio.h>
+
+
+//  Function Prototypes
+
+void printMessage(char*);
+
+
+#endif  // __$(baseName)_H__
+
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/CreateIncludeFolder.xml b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/CreateIncludeFolder.xml
new file mode 100644
index 0000000..6aa7b35
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/CreateIncludeFolder.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="Create Include Folder test" description="Create Include Folder test"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject">
+		<simple name="name" value="$(projectName)" /> 
+		<simple name="location" value="$(location)" />
+		<simple name="artifactExtension" value="exe" />
+		<simple name="isCProject" value="$(isCProject)" />
+	</process>
+
+	<process type="org.eclipse.cdt.managedbuilder.core.CreateIncludeFolder">
+		<simple name="projectName" value="$(projectName)"/>
+		<simple name="path" value="$(includeDir1)"/>
+	</process>
+
+	<process type="org.eclipse.cdt.managedbuilder.core.CreateIncludeFolder">
+		<simple name="projectName" value="$(projectName)"/>
+		<simple name="path" value="$(includeDir2)"/>
+	</process>
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/ExcludeResources.xml b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/ExcludeResources.xml
new file mode 100644
index 0000000..1e5e389
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/ExcludeResources.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="ExcludeResources test" description="Testing Template Engines ExcludeResources Process"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject">
+		<simple name="name" value="$(projectName)" /> 
+		<simple name="location" value="$(location)" />
+		<simple name="artifactExtension" value="exe" />
+		<simple name="isCProject" value="false" />
+	</process>
+
+	<process type="org.eclipse.cdt.core.AddFiles">
+		<simple name="projectName" value="$(projectName)"/>
+		<complex-array name="files">
+			<element>
+				<simple name="source" value="Basename.h"/>
+				<simple name="target" value="$(baseName0).h"/>
+				<simple name="replaceable" value="true"/>
+			</element>
+			<element>
+				<simple name="source" value="Basename.cpp"/>
+				<simple name="target" value="$(baseName0).cpp"/>
+				<simple name="replaceable" value="true"/>
+			</element>
+			<element>
+				<simple name="source" value="Basename.h"/>
+				<simple name="target" value="$(baseName1).h"/>
+				<simple name="replaceable" value="true"/>
+			</element>
+			<element>
+				<simple name="source" value="Basename.cpp"/>
+				<simple name="target" value="$(baseName1).cpp"/>
+				<simple name="replaceable" value="true"/>
+			</element>
+			<element>
+				<simple name="source" value="Basename.h"/>
+				<simple name="target" value="$(baseName2).h"/>
+				<simple name="replaceable" value="true"/>
+			</element>
+			<element>
+				<simple name="source" value="Basename.cpp"/>
+				<simple name="target" value="$(baseName2).cpp"/>
+				<simple name="replaceable" value="true"/>
+			</element>
+		</complex-array>
+	</process>
+
+	<process type="org.eclipse.cdt.managedbuilder.core.ExcludeResources">
+        <simple name="projectName" value="$(projectName)"/>
+        <simple name="configIdPattern" value="$(configIdPattern)"/>
+		<simple-array name="filePatterns">
+			<element value="$(filePatterns0)"/>
+		</simple-array>
+        <simple name="invertConfigMatching" value="false"/>
+	</process>
+
+	<process type="org.eclipse.cdt.managedbuilder.core.ExcludeResources">
+        <simple name="projectName" value="$(projectName)"/>
+        <simple name="configIdPattern" value="$(configIdPattern)"/>
+		<simple-array name="filePatterns">
+			<element value="$(filePatterns1)"/>
+		</simple-array>
+        <simple name="invertConfigMatching" value="true"/>
+	</process>
+
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/NewManagedProject.xml b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/NewManagedProject.xml
new file mode 100644
index 0000000..8b3cd71
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/NewManagedProject.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="NewManagedProject  test" description="Testing Template Engines NewManagedProject Process"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject">
+		<simple name="name" value="$(projectName)" /> 
+		<simple name="location" value="$(location)" />
+		<simple name="artifactExtension" value="exe" />
+		<simple name="isCProject" value="true" />
+	</process>
+
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSBooleanOptionValue.xml b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSBooleanOptionValue.xml
new file mode 100644
index 0000000..4e0c78c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSBooleanOptionValue.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="SetMBSBooleanOptionValue test" description="Testing Template Engines SetMBSBooleanOptionValue Process"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject">
+		<simple name="name" value="$(projectName)" /> 
+		<simple name="location" value="$(location)" />
+		<simple name="artifactExtension" value="exe" />
+		<simple name="isCProject" value="false" />
+	</process>
+
+	<process type="org.eclipse.cdt.managedbuilder.core.SetMBSBooleanOptionValue">
+		<simple name="projectName" value="$(projectName)" />		
+		<complex-array name="resourcePaths">
+			<element>
+				<simple name="id" value="$(id)" />
+				<simple name="value" value="true" />
+				<simple name="path" value="" />
+			</element>
+		</complex-array>
+	</process>
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSStringListOptionValues.xml b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSStringListOptionValues.xml
new file mode 100644
index 0000000..7c33a85
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSStringListOptionValues.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="SetMBSStringListOptionValues test" description="Testing Template Engines SetMBSStringListOptionValues Process"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject">
+		<simple name="name" value="$(projectName)" /> 
+		<simple name="location" value="$(location)" />
+		<simple name="artifactExtension" value="exe" />
+		<simple name="isCProject" value="false" />
+	</process>
+
+	<process type="org.eclipse.cdt.managedbuilder.core.SetMBSStringListOptionValues">
+		<simple name="projectName" value="$(projectName)" />		
+		<complex-array name="resourcePaths">
+			<element>
+				<simple name="id" value="$(id)" />
+				<simple-array name="values">
+					<element value="$(StringListValue0)" />
+					<element value="$(StringListValue1)" />
+					<element value="$(StringListValue2)" />
+					<element value="$(StringListValue3)" />
+				</simple-array>
+				<simple name="path" value="" />
+			</element>
+		</complex-array>
+	</process>
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSStringOptionValue.xml b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSStringOptionValue.xml
new file mode 100644
index 0000000..b36f4d6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/testdata/SetMBSStringOptionValue.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="TestTemplate" version="1.0" supplier="Symbian" revision="1.0" author="Symbian"
+		id="??" label="SetMBSStringOptionValue test" description="Testing Template Engines SetMBSStringOptionValue Process"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject">
+		<simple name="name" value="$(projectName)" /> 
+		<simple name="location" value="$(location)" />
+		<simple name="artifactExtension" value="exe" />
+		<simple name="isCProject" value="false" />
+	</process>
+
+	<process type="org.eclipse.cdt.managedbuilder.core.SetMBSStringOptionValue">
+		<simple name="projectName" value="$(projectName)" />		
+		<complex-array name="resourcePaths">
+			<element>
+				<simple name="id" value="$(id)" />
+				<simple name="value" value="$(StringValue)" />
+				<simple name="path" value="" />
+			</element>
+		</complex-array>
+	</process>
+</template>
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/build/core/scannerconfig/tests/CfgScannerConfigProfileManagerTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/build/core/scannerconfig/tests/CfgScannerConfigProfileManagerTests.java
new file mode 100644
index 0000000..8a86125
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/build/core/scannerconfig/tests/CfgScannerConfigProfileManagerTests.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ *  Copyright (c) 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.build.core.scannerconfig.tests;
+
+import java.util.Map;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.build.core.scannerconfig.CfgInfoContext;
+import org.eclipse.cdt.build.core.scannerconfig.ICfgScannerConfigBuilderInfo2Set;
+import org.eclipse.cdt.build.internal.core.scannerconfig2.CfgScannerConfigProfileManager;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+
+public class CfgScannerConfigProfileManagerTests extends BaseTestCase {
+	IProject fProject;
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(CfgScannerConfigProfileManagerTests.class.getName());
+		suite.addTestSuite(CfgScannerConfigProfileManagerTests.class);
+		return suite;
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		fProject = ManagedBuildTestHelper.createProject("CfgScannerConfigProfileManagerProj",
+														"cdt.managedbuild.target.gnu.exe");
+		ManagedBuildTestHelper.addManagedBuildNature(fProject);
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		ManagedBuildTestHelper.removeProject(fProject.getName());
+	}
+
+	/**
+	 * Basic testing of Config based ScannerConfigProfile management.
+	 * 
+	 * This test runs through some of the funcationality used by the DiscoveryTab
+	 * @throws CoreException
+	 */
+	public void testBasicCfgScannerConfigProfileChanges() throws CoreException {
+		ICProjectDescription prjDesc = CoreModel.getDefault().getProjectDescription(fProject);
+		ICConfigurationDescription[] cfgDescs = prjDesc.getConfigurations();
+		assertTrue(cfgDescs.length > 0);
+
+		IConfiguration cfg0 = ManagedBuildManager.getConfigurationForDescription(cfgDescs[0]);
+		ICfgScannerConfigBuilderInfo2Set scbis = CfgScannerConfigProfileManager.getCfgScannerConfigBuildInfo(cfg0);
+
+		// Test changing ICfgScannerConfigBuilderInfo2Set settings
+		boolean resCfgTypeDiscovery = scbis.isPerRcTypeDiscovery();
+		scbis.setPerRcTypeDiscovery(!resCfgTypeDiscovery);
+
+		// Test changing settings on one of the ScannerConfigBuilderInfos
+		Map<CfgInfoContext, IScannerConfigBuilderInfo2> infoMap = scbis.getInfoMap();
+		CfgInfoContext cic = infoMap.entrySet().iterator().next().getKey();
+		IScannerConfigBuilderInfo2 scbi = infoMap.entrySet().iterator().next().getValue();
+		// Get all the settings and invert them
+		boolean autoDiscovery = scbi.isAutoDiscoveryEnabled();
+		scbi.setAutoDiscoveryEnabled(!autoDiscovery);
+		boolean problemReport = scbi.isProblemReportingEnabled();
+		scbi.setProblemReportingEnabled(!problemReport);
+		boolean buildOutputParser = scbi.isBuildOutputParserEnabled();
+		scbi.setBuildOutputParserEnabled(!buildOutputParser);
+		boolean buildOutputFileAction = scbi.isBuildOutputFileActionEnabled();
+		scbi.setBuildOutputFileActionEnabled(!buildOutputFileAction);
+		String buildOutputFilePath = scbi.getBuildOutputFilePath();
+		scbi.setBuildOutputFilePath("dummyFile");
+		// Persist the changes
+		scbis.applyInfo(cic, scbi);
+
+		// Save the project description
+		CoreModel.getDefault().setProjectDescription(fProject, prjDesc);
+		fProject.close(null);
+		fProject.open(null);
+
+		// Check that the changes have persisted
+		prjDesc = CoreModel.getDefault().getProjectDescription(fProject);
+		cfg0 = ManagedBuildManager.getConfigurationForDescription(prjDesc.getConfigurations()[0]);
+		scbis = CfgScannerConfigProfileManager.getCfgScannerConfigBuildInfo(cfg0);
+		assertTrue(scbis.isPerRcTypeDiscovery() != resCfgTypeDiscovery);
+		scbi = scbis.getInfo(cic);
+		// Check that the changes have persisted
+		Assert.isTrue(autoDiscovery != scbi.isAutoDiscoveryEnabled());
+		Assert.isTrue(problemReport != scbi.isProblemReportingEnabled());
+		Assert.isTrue(buildOutputParser != scbi.isBuildOutputParserEnabled());
+		Assert.isTrue(buildOutputFileAction != scbi.isBuildOutputFileActionEnabled());
+		Assert.isTrue("dummyFile".equals(scbi.getBuildOutputFilePath()));
+
+		// Test restore defaults
+		scbis.applyInfo(cic, null);
+		// Save the project description
+		CoreModel.getDefault().setProjectDescription(fProject, prjDesc);
+		fProject.close(null);
+		fProject.open(null);
+		
+		// Check settings are back to original
+		prjDesc = CoreModel.getDefault().getProjectDescription(fProject);
+		cfg0 = ManagedBuildManager.getConfigurationForDescription(prjDesc.getConfigurations()[0]);
+		scbis = CfgScannerConfigProfileManager.getCfgScannerConfigBuildInfo(cfg0);
+		scbi = scbis.getInfo(cic);
+		Assert.isTrue(autoDiscovery == scbi.isAutoDiscoveryEnabled());
+		Assert.isTrue(problemReport == scbi.isProblemReportingEnabled());
+		Assert.isTrue(buildOutputParser == scbi.isBuildOutputParserEnabled());
+		Assert.isTrue(buildOutputFileAction == scbi.isBuildOutputFileActionEnabled());
+		Assert.isTrue(buildOutputFilePath.equals(buildOutputFilePath));
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/build/core/scannerconfig/tests/GCCSpecsConsoleParserTest.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/build/core/scannerconfig/tests/GCCSpecsConsoleParserTest.java
new file mode 100644
index 0000000..06ff95d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/build/core/scannerconfig/tests/GCCSpecsConsoleParserTest.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2009 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+ package org.eclipse.cdt.build.core.scannerconfig.tests;
+
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector;
+import org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes;
+import org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCSpecsConsoleParser;
+
+public class GCCSpecsConsoleParserTest extends TestCase {
+	GCCSpecsConsoleParser parser;
+	private IScannerInfoCollector collector;
+	List<String> includes;
+	List<String> symbols;
+
+	@Override
+	protected void setUp() throws Exception {
+		collector = new IScannerInfoCollector() {
+
+			public List getCollectedScannerInfo(Object resource, ScannerInfoTypes type) {
+				// TODO Auto-generated method stub
+				return null;
+			}
+
+			public void contributeToScannerConfig(Object resource, Map scannerInfo1) {
+				Map<ScannerInfoTypes, List<String>> scannerInfo = scannerInfo1;
+				includes = scannerInfo.get(ScannerInfoTypes.INCLUDE_PATHS);
+				symbols = scannerInfo.get(ScannerInfoTypes.SYMBOL_DEFINITIONS);
+			}
+		};
+		parser = new GCCSpecsConsoleParser();
+		parser.startup(null, null, collector, null);
+	}
+
+	private void enterLine(String line) {
+		parser.processLine(line);
+		parser.shutdown();
+	}
+
+	private void checkMacro(String name, String value) {
+		assertTrue("No symbols", symbols.size() > 0);
+		String string = symbols.get(0);
+		if (string.contains("=")) {
+			String[] val = string.split("=", 2);
+			assertEquals(name, val[0]);
+			assertEquals(value, val[1]);
+		} else {
+			assertEquals(name, string);
+			assertEquals(value, "");
+		}
+
+	}
+
+	public void testProcessLine_NoArgs() {
+		enterLine("#define __MY_MACRO__ __MY_VALUE__");
+		checkMacro("__MY_MACRO__", "__MY_VALUE__");
+	}
+	public void testProcessLine_Const() {
+		enterLine("#define A (3)");
+		checkMacro("A", "(3)");
+	}
+	public void testProcessLine_EmptyArgList() {
+		enterLine("#define A() B");
+		checkMacro("A()", "B");
+	}
+	public void testProcessLine_ParamUnused() {
+		enterLine("#define A(X) B");
+		checkMacro("A(X)", "B");
+	}
+	public void testProcessLine_ParamSpace() {
+		enterLine("#define __MY_MACRO__(P1, P2) __MY_VALUE__(P1, P2)");
+		checkMacro("__MY_MACRO__(P1, P2)", "__MY_VALUE__(P1, P2)");
+	}
+	public void testProcessLine_EmptyBody() {
+		enterLine("#define __MY_MACRO__(P1, P2) ");
+		checkMacro("__MY_MACRO__(P1, P2)", "");
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/AlwaysOffApplicabilityCalculator.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/AlwaysOffApplicabilityCalculator.java
new file mode 100644
index 0000000..fdb9dc5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/AlwaysOffApplicabilityCalculator.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Inc. and others.
+ * 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
+ * 
+ * Contributors:
+ *     Texas Instruments Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IOptionApplicability;
+
+/**
+ * 
+ */
+public class AlwaysOffApplicabilityCalculator implements IOptionApplicability {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionUsedInCommandLine()
+	 */
+	public boolean isOptionUsedInCommandLine(
+			IBuildObject config,
+			IHoldsOptions holder,
+			IOption option) {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionVisible()
+	 */
+	public boolean isOptionVisible(
+			IBuildObject config,
+			IHoldsOptions holder,
+			IOption option) {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionEnabled()
+	 */
+	public boolean isOptionEnabled(
+			IBuildObject config,
+			IHoldsOptions holder,
+			IOption option) {
+		return false;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/AlwaysOnApplicabilityCalculator.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/AlwaysOnApplicabilityCalculator.java
new file mode 100644
index 0000000..5f557c1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/AlwaysOnApplicabilityCalculator.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Inc. and others.
+ * 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
+ * 
+ * Contributors:
+ *     Texas Instruments Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IOptionApplicability;
+
+/**
+ * 
+ */
+public class AlwaysOnApplicabilityCalculator implements IOptionApplicability {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionUsedInCommandLine()
+	 */
+	public boolean isOptionUsedInCommandLine(
+			IBuildObject config,
+			IHoldsOptions holder,
+			IOption option) {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionVisible()
+	 */
+	public boolean isOptionVisible(
+			IBuildObject config,
+			IHoldsOptions holder,
+			IOption option) {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionEnabled()
+	 */
+	public boolean isOptionEnabled(
+			IBuildObject config,
+			IHoldsOptions holder,
+			IOption option) {
+		return false;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BasicTestCase.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BasicTestCase.java
new file mode 100644
index 0000000..81736df
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BasicTestCase.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+
+public class BasicTestCase extends TestCase {
+	private List fProjList = new LinkedList();
+	
+	protected void addProject(IProject project){
+		fProjList.add(project);
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+	}
+
+	protected void tearDown() throws Exception {
+		for(Iterator iter = fProjList.iterator(); iter.hasNext();){
+			IProject proj = (IProject)iter.next();
+			try {
+				proj.delete(true, null);
+			} catch (CoreException e){
+			}
+		}
+		super.tearDown();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BidirectionalPathConverter.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BidirectionalPathConverter.java
new file mode 100644
index 0000000..c40efdc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BidirectionalPathConverter.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import org.eclipse.cdt.core.settings.model.ICSettingEntry;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IReverseOptionPathConverter;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+public class BidirectionalPathConverter extends OneDirectionalPathConverter implements IReverseOptionPathConverter {
+
+	public String convertToOptionValue(ICSettingEntry entry, IOption option,
+			ITool tool) {
+		String name = entry.getName();
+		IPath path = new Path(name);
+		
+		if(PREFIX.isPrefixOf(path))
+			return path.removeFirstSegments(PREFIX.segmentCount()).makeAbsolute().toString();
+		else if (!path.isAbsolute())
+			path = new Path("../" + path.toString());
+		return path.toString();
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildDescriptionModelTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildDescriptionModelTests.java
new file mode 100644
index 0000000..be99d2e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildDescriptionModelTests.java
@@ -0,0 +1,2688 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCProjectNature;
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.managedbuilder.buildmodel.BuildDescriptionManager;
+import org.eclipse.cdt.managedbuilder.buildmodel.IBuildDescription;
+import org.eclipse.cdt.managedbuilder.buildmodel.IBuildIOType;
+import org.eclipse.cdt.managedbuilder.buildmodel.IBuildResource;
+import org.eclipse.cdt.managedbuilder.buildmodel.IBuildStep;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IAdditionalInput;
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
+import org.eclipse.cdt.managedbuilder.core.IInputType;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IOutputType;
+import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildDescription;
+import org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildIOType;
+import org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildResource;
+import org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildStep;
+import org.eclipse.cdt.managedbuilder.internal.buildmodel.DbgUtil;
+import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+ at SuppressWarnings("restriction")
+public class BuildDescriptionModelTests extends TestCase {
+	private static final String PREFIX = "BuildDescription_";
+	private static final String PROJ_PATH = "testBuildDescriptionProjects";
+	
+	private CompositeCleaner fCompositeCleaner = new CompositeCleaner();
+	private Runnable fCleaner = fCompositeCleaner;
+	
+	private class CompositeCleaner implements Runnable{
+		private List<Runnable> fRunnables = new ArrayList<Runnable>();
+
+		public void addRunnable(Runnable r){
+			fRunnables.add(r);
+		}
+
+		public void run() {
+			for(Iterator<Runnable> iter = fRunnables.iterator(); iter.hasNext();){
+				Runnable r = iter.next();
+				r.run();
+			}
+			fRunnables.clear();
+		}
+		
+	}
+	private class ProjectCleaner implements Runnable{
+		List<String> fProjList = new ArrayList<String>();
+		
+		public ProjectCleaner(){
+		}
+
+		public ProjectCleaner(String name){
+			addProject(name);
+		}
+
+		public ProjectCleaner(IProject project){
+			addProject(project);
+		}
+
+		public void addProject(IProject project){
+			addProject(project.getName());
+		}
+
+		public void addProject(String name){
+			fProjList.add(name);
+		}
+
+		public void run() {
+			for(Iterator<String> iter = fProjList.iterator(); iter.hasNext();){
+				String name = iter.next();
+				ManagedBuildTestHelper.removeProject(name);
+			}
+			fProjList.clear();
+		}
+		
+	}
+
+	public static Test suite() {
+		return new TestSuite(BuildDescriptionModelTests.class);
+	}
+	
+	public void testDes_Model(){
+		IProject project = createProject(PREFIX + "1", "test30_2.tar");
+		IFile aAsm = ManagedBuildTestHelper.createFile(project, "a.asm");
+		ManagedBuildTestHelper.createFile(project, "b.asm");
+		ManagedBuildTestHelper.createFile(project, "c.cpp");
+		ManagedBuildTestHelper.createFile(project, "d.cpp");
+	
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		IConfiguration cfg = mProj.getConfigurations()[0];
+		cfg.setArtifactExtension("tmp");
+		String cName = cfg.getName();
+
+		BuildDescription des = new BuildDescription(cfg);
+		
+		BuildResource aAsmRc = des.createResource("a.asm");
+		assertNotNull("failed to create resource a.asm", aAsmRc);
+		
+		if(aAsmRc != des.createResource(aAsm))
+			fail("new build resource created for the same resource");
+
+		if(aAsmRc != des.createResource("a.asm"))
+			fail("new build resource created for the same resource");
+
+		if(aAsmRc != des.createResource(aAsm.getLocation(), aAsm.getLocationURI()))
+			fail("new build resource created for the same resource");
+
+		assertEquals(aAsmRc.getProducerIOType(), null);
+		assertEquals(aAsmRc.getDependentIOTypes().length, 0);
+
+		BuildStep inStep = (BuildStep)des.getInputStep();
+		assertEquals("input step has inputs", inStep.getInputIOTypes().length, 0);
+		assertEquals("initial input step has outputs", inStep.getOutputIOTypes().length, 0);
+		
+		BuildIOType type = inStep.createIOType(false, true, null);
+		if(type == null)
+			fail("failed to create output type");
+		
+		assertNotNull(type);
+		assertEquals(type.getStep(), inStep);
+		
+		type.addResource(aAsmRc);
+		
+		assertEquals(aAsmRc.getProducerIOType(), type);
+		assertEquals(aAsmRc.getDependentIOTypes().length, 0);
+
+		assertEquals("input step has inputs", inStep.getInputIOTypes().length, 0);
+		assertEquals(inStep.getOutputIOTypes().length, 1);
+		assertEquals(inStep.getOutputIOTypes()[0], type);
+		
+		assertEquals(type.getResources().length, 1);
+		assertEquals(type.getResources()[0], aAsmRc);
+		
+		BuildResource bAsmRc = des.createResource("b.asm");
+		assertEquals(bAsmRc.getProducerIOType(), null);
+		assertEquals(bAsmRc.getDependentIOTypes().length, 0);
+
+		type.addResource(bAsmRc);
+		assertEquals(bAsmRc.getProducerIOType(), type);
+		assertEquals(bAsmRc.getDependentIOTypes().length, 0);
+
+		assertEquals("input step has inputs", inStep.getInputIOTypes().length, 0);
+		assertEquals(inStep.getOutputIOTypes().length, 1);
+		assertEquals(inStep.getOutputIOTypes()[0], type);
+		
+		assertEquals(type.getResources().length, 2);
+		
+		BuildStep step = des.createStep(null, null);
+		assertEquals("new step has inputs", inStep.getInputIOTypes().length, 0);
+		assertEquals("new step has outputs", inStep.getOutputIOTypes().length, 1);
+		
+		BuildIOType iType = step.createIOType(true, true, null);
+		if(iType == null)
+			fail("failed to create in type");
+		
+		assertEquals(iType.getStep(), step);
+		
+		assertEquals(aAsmRc.getProducerIOType(), type);
+		assertEquals(aAsmRc.getDependentIOTypes().length, 0);
+
+		iType.addResource(aAsmRc);
+		
+		assertEquals(aAsmRc.getProducerIOType(), type);
+		assertEquals(aAsmRc.getDependentIOTypes().length, 1);
+		assertEquals(aAsmRc.getDependentIOTypes()[0], iType);
+
+		assertEquals("input step has inputs", inStep.getInputIOTypes().length, 0);
+		assertEquals(inStep.getOutputIOTypes().length, 1);
+		assertEquals(inStep.getOutputIOTypes()[0], type);
+		
+		assertEquals(iType.getResources().length, 1);
+		assertEquals(iType.getResources()[0], aAsmRc);
+		
+		assertEquals(bAsmRc.getProducerIOType(), type);
+		assertEquals(bAsmRc.getDependentIOTypes().length, 0);
+
+		iType.addResource(bAsmRc);
+		assertEquals(bAsmRc.getProducerIOType(), type);
+		assertEquals(bAsmRc.getDependentIOTypes().length, 1);
+		assertEquals(bAsmRc.getDependentIOTypes()[0], iType);
+
+		assertEquals("input step has inputs", inStep.getInputIOTypes().length, 0);
+		assertEquals(inStep.getOutputIOTypes().length, 1);
+		assertEquals(inStep.getOutputIOTypes()[0], type);
+		
+		assertEquals(type.getResources().length, 2);
+		
+		
+//		ManagedBuildTestHelper.removeProject(PREFIX + "1");
+	}
+	
+	public void testDesTest30_2_asm_only(){
+		IProject project = createProject(PREFIX + "1", "test30_2.tar");
+		ManagedBuildTestHelper.createFile(project, "a.asm");
+		ManagedBuildTestHelper.createFile(project, "b.asm");
+
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		IConfiguration cfg = mProj.getConfigurations()[0];
+		cfg.setArtifactExtension("tmp");
+		String cName = cfg.getName();
+
+		BuildDescription tDes = new BuildDescription(cfg);
+		
+		IBuildDescription des = null;
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+
+		doTestBuildDescription(des, tDes);
+		
+//		ManagedBuildTestHelper.removeProject(PREFIX + "1");
+	}
+
+
+	public void testDesTest30_2_empty(){
+		IProject project = createProject(PREFIX + "1", "test30_2.tar");
+
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		IConfiguration cfg = mProj.getConfigurations()[0];
+		cfg.setArtifactExtension("tmp");
+		String cName = cfg.getName();
+
+		BuildDescription tDes = new BuildDescription(cfg);
+		IBuildDescription des = null;
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+
+		doTestBuildDescription(des, tDes);
+		
+//		ManagedBuildTestHelper.removeProject(PREFIX + "1");
+	}
+
+	public void testDesDesTest30_2_cpp_only(){
+		IProject project = createProject(PREFIX + "1", "test30_2.tar");
+		ManagedBuildTestHelper.createFile(project, "c.cpp");
+		ManagedBuildTestHelper.createFile(project, "d.cpp");
+	
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		IConfiguration cfg = mProj.getConfigurations()[0];
+		cfg.setArtifactExtension("tmp");
+		String cName = cfg.getName();
+
+		BuildDescription tDes = new BuildDescription(cfg);
+		BuildStep step;
+		BuildIOType type;
+		
+		//
+		step = (BuildStep)tDes.getInputStep();
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+			type.addResource(tDes.createResource("d.cpp"));
+		//
+		//
+		step = tDes.createStep(null, null);
+		
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource("c.cpp"));
+			type.addResource(tDes.createResource("d.cpp"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/new.tar"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/new.tar"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/new.log"));
+		//
+		//
+		step = tDes.createStep(null, null);
+				
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/new.log"));
+				
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/" + cfg.getArtifactName() + ".tmp"));
+		//
+		//
+		step = (BuildStep)tDes.getOutputStep();
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/" + cfg.getArtifactName() + ".tmp"));
+		//
+
+		IBuildDescription des = null;
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+
+		doTestBuildDescription(des, tDes);
+		
+//		ManagedBuildTestHelper.removeProject(PREFIX + "1");
+	}	
+	
+	public void testDesTest30_1(){
+		IProject project = loadProject("test30_1");
+		
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IConfiguration cfg = info.getDefaultConfiguration();
+		String out = cfg.getName() + "/";
+		
+		BuildDescription tDes = new BuildDescription(cfg);
+		BuildStep step;
+		BuildIOType type;
+		
+		//
+		step = (BuildStep)tDes.getOutputStep();
+
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(out + "Test30_1.so.4.5.6"));
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource(out + "CDT.jpeg"));
+		//
+		//
+			step = tDes.createStep(null, null);
+
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(out + "CDT.jpeg"));
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(out + "CDT.bmp"));
+		//
+		//
+			step = tDes.createStep(null, null);
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource(out + "f1.c"));
+			type.addResource(tDes.createResource(out + "f2.c"));
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource(out + "test_ar.h"));
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource(out + "CDT.bmp"));
+
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("test.tar"));
+		//
+		//
+			step = tDes.createStep(null, null);
+
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(out + "Test30_1.so.4.5.6"));
+
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(out + "test30_1.so.1.2.3"));
+		//
+		//
+			step = tDes.createStep(null, null);
+
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(out + "test30_1.so.1.2.3"));
+
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(out + "f1.o"));
+			type.addResource(tDes.createResource(out + "f2.o"));
+		//
+		//
+			step = tDes.createStep(null, null);
+
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(out + "f1.o"));
+
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(out + "f1.oprestripped"));
+		//
+		//
+			step = tDes.createStep(null, null);
+
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(out + "f2.o"));
+
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(out + "f2.oprestripped"));
+		//
+		//
+			step = tDes.createStep(null, null);
+
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(out + "f1.oprestripped"));
+
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(out + "f1.c"));
+		//
+		//
+			step = tDes.createStep(null, null);
+
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(out + "f2.oprestripped"));
+
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(out + "f2.c"));
+		//
+		//
+			step = (BuildStep)tDes.getInputStep();
+
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource("test.tar"));
+		//
+		//
+
+		IBuildDescription des = null;
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+		
+		doTestBuildDescription(des, tDes);
+
+	}
+	
+	public void testDesTest30_2(){
+		IProject project = createProject(PREFIX + "1", "test30_2.tar");
+		ManagedBuildTestHelper.createFile(project, "a.asm");
+		ManagedBuildTestHelper.createFile(project, "b.asm");
+		ManagedBuildTestHelper.createFile(project, "c.cpp");
+		ManagedBuildTestHelper.createFile(project, "d.cpp");
+	
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		IConfiguration cfg = mProj.getConfigurations()[0];
+		cfg.setArtifactExtension("tmp");
+		String cName = cfg.getName();
+
+		BuildDescription tDes = new BuildDescription(cfg);
+		BuildStep step;
+		BuildIOType type;
+		
+		//
+		step = (BuildStep)tDes.getInputStep();
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("a.asm"));
+			type.addResource(tDes.createResource("b.asm"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+			type.addResource(tDes.createResource("d.cpp"));
+		//
+		//
+		step = tDes.createStep(null, null);
+		
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource("c.cpp"));
+			type.addResource(tDes.createResource("d.cpp"));
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("a.asm"));
+			type.addResource(tDes.createResource("b.asm"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/new.tar"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/new.tar"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/new.log"));
+		//
+		//
+		step = tDes.createStep(null, null);
+				
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/new.log"));
+				
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/" + cfg.getArtifactName() + ".tmp"));
+		//
+		//
+		step = (BuildStep)tDes.getOutputStep();
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/" + cfg.getArtifactName() + ".tmp"));
+		//
+
+		IBuildDescription des = null;
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+
+		doTestBuildDescription(des, tDes);
+		
+//		ManagedBuildTestHelper.removeProject(PREFIX + "1");
+	}
+/*	
+	private void doTestStep(IBuildStep step, StepDes testStep){
+		IBuildIOType iTs[] = step.getInputIOTypes();
+		TypeDes tITs[] = testStep.fInTypes;
+
+		IBuildIOType oTs[] = step.getOutputIOTypes();
+		TypeDes tOTs[] = testStep.fOutTypes;
+		
+		assertEquals(iTs.length, tITs.length);
+		assertEquals(oTs.length, tOTs.length);
+		
+		
+	}
+*/
+	private void doTestStep(IBuildStep step, IBuildStep oStep, boolean up){
+		Map<IBuildIOType, IBuildIOType> inMap = new HashMap<IBuildIOType, IBuildIOType>();
+		Map<IBuildIOType, IBuildIOType> outMap = new HashMap<IBuildIOType, IBuildIOType>();
+		
+		stepsMatch(step, oStep, inMap, outMap, true);
+		
+		Map<IBuildIOType, IBuildIOType> map = up ? outMap : inMap;
+		
+		for(Iterator<?> iter = map.entrySet().iterator();iter.hasNext();){
+			Map.Entry entry = (Map.Entry)iter.next();
+			doTestType((IBuildIOType)entry.getKey(), (IBuildIOType)entry.getValue());
+		}
+	}
+	
+	private void doTestType(IBuildIOType type, IBuildIOType oType){
+		Map<IBuildResource, IBuildResource> map = new HashMap<IBuildResource, IBuildResource>();
+		
+		typesMatch(type, oType, map, true);
+		
+		for(Iterator iter = map.entrySet().iterator();iter.hasNext();){
+			Map.Entry entry = (Map.Entry)iter.next();
+			doTestResource((IBuildResource)entry.getKey(), (IBuildResource)entry.getValue(), !type.isInput());
+		}
+	}
+	
+	private void doTestResource(IBuildResource rc, IBuildResource oRc, boolean up){
+		Map<IBuildIOType, IBuildIOType> outMap = new HashMap<IBuildIOType, IBuildIOType>();
+		
+		doTestResourceMatch(rc, oRc, outMap);
+		
+		if(!up){
+			typesMatch(rc.getProducerIOType(), oRc.getProducerIOType(), null, true);
+			doTestStep(rc.getProducerIOType().getStep(), oRc.getProducerIOType().getStep(), up);
+		} else {
+			Set<IBuildStep> stepSet = new HashSet<IBuildStep>();
+			
+			for(Iterator iter = outMap.entrySet().iterator(); iter.hasNext();){
+				Map.Entry entry = (Map.Entry)iter.next();
+				IBuildIOType type = (IBuildIOType)entry.getKey();
+				
+				IBuildStep step = type.getStep();
+				if(stepSet.add(step)){
+					IBuildIOType oType = (IBuildIOType)entry.getValue();
+					typesMatch(type, oType, null, true);
+					doTestStep(step, oType.getStep(), up);
+				}
+			}
+		}
+	}
+	
+	private void doTestResourceMatch(IBuildResource rc, IBuildResource oRc, Map<IBuildIOType, IBuildIOType> outTypeMap){
+		
+		doTrace("matching resource " + DbgUtil.resourceName(rc));
+		
+		if(!rc.getLocation().equals(oRc.getLocation()))
+			doFail("different resource locsations", rc, oRc);
+		
+		IBuildIOType inType = rc.getProducerIOType();
+		IBuildIOType oInType = oRc.getProducerIOType();
+		
+		typesMatch(inType, oInType, null, true);
+		
+		
+		IBuildIOType outTypes[] = rc.getDependentIOTypes();
+		IBuildIOType oOutTypes[] = oRc.getDependentIOTypes();
+		
+		if(outTypes.length != oOutTypes.length)
+			doFail("resources do not match: different number of output types", rc, oRc);
+		
+		for(int i = 0; i < outTypes.length; i++){
+			IBuildIOType oType = getCorType(outTypes[i], oOutTypes);
+			if(oType == null)
+				doFail("resources not match: no cor dep type found", rc, oRc);
+			
+			Object obj = outTypeMap.put(outTypes[i], oType);
+			
+			if(obj != null){
+				doFail("there was corresponding type",rc, oRc);
+			}
+		}
+		
+		doTrace("end matching resource");
+	}
+
+
+	private boolean stepsMatch(IBuildStep step, IBuildStep oStep, Map<IBuildIOType, IBuildIOType> inTypeMap, Map<IBuildIOType, IBuildIOType> outTypeMap, boolean failOnErr){
+		return stepsMatch(step, oStep, inTypeMap, outTypeMap, true, failOnErr);
+	}
+
+	private boolean stepsMatch(IBuildStep step, IBuildStep oStep, Map<IBuildIOType, IBuildIOType> inTypeMap, Map<IBuildIOType, IBuildIOType> outTypeMap, boolean checkSteps, boolean failOnErr){
+		IBuildIOType inTypes[] = step.getInputIOTypes();
+		IBuildIOType oInTypes[] = oStep.getInputIOTypes();
+		
+		doTrace("matching step " + DbgUtil.stepName(step));
+		
+		if(inTypes.length != oInTypes.length){
+			if(failOnErr)
+				doFail("steps do not match: different number of input types",step, oStep);
+			return false;
+		}
+		for(int i = 0; i < inTypes.length; i++){
+			IBuildIOType oType = getCorType(inTypes[i], oInTypes, null, checkSteps);
+			if(oType == null){
+				if(failOnErr)
+					doFail("steps not match, no corresponding input type found", step, oStep);
+				return false;
+			}
+			
+			Object obj = inTypeMap.put(inTypes[i], oType);
+			
+			if(obj != null){
+				if(failOnErr)
+					doFail("there was already corresponding input type", step, oStep);
+				return false;
+			}
+		}
+
+		IBuildIOType outTypes[] = step.getOutputIOTypes();
+		IBuildIOType oOutTypes[] = oStep.getOutputIOTypes();
+		
+		if(outTypes.length != oOutTypes.length){
+			if(failOnErr)
+				doFail("steps do not match: different number of output types", step, oStep);
+			return false;
+		}
+		
+		for(int i = 0; i < outTypes.length; i++){
+			IBuildIOType oType = getCorType(outTypes[i], oOutTypes, null, checkSteps);
+			if(oType == null){
+				if(failOnErr)
+					doFail("steps not match, no corresponding output type found", step, oStep);
+				return false;
+			}
+			
+			Object obj = outTypeMap.put(outTypes[i], oType);
+			
+			if(obj != null){
+				if(failOnErr)
+					doFail("there was already corresponding output type", step, oStep);
+				return false;
+			}
+		}
+		
+		doTrace("end matching step");
+		
+		return true;
+	}
+
+	private IBuildIOType getCorType(IBuildIOType type, IBuildIOType oTypes[]){
+		return getCorType(type, oTypes, null, true);
+	}
+
+	private IBuildIOType getCorType(IBuildIOType type, IBuildIOType oTypes[], Map<IBuildResource, IBuildResource> rcMap, boolean checkSteps){
+		for(int i = 0; i < oTypes.length; i++){
+			if(typesMatch(type, oTypes[i], rcMap, checkSteps, false))
+				return oTypes[i];
+			
+			if(rcMap != null)
+				rcMap.clear();
+		}
+		
+		return null;
+/*		
+		IBuildStep step = type.getStep();
+		IBuildResource rcs[] = type.getResources();
+		for(int i = 0; i < oTypes.length; i++){
+			if(type.isInput() != oTypes[i].isInput())
+				continue;
+			
+			IBuildResource oRcs[] = oTypes[i].getResources();
+			
+			if(rcs.length != oRcs.length)
+				continue;
+			
+			if(resourcesMatch(rcs, oRcs, null)){
+				if(!checkSteps)
+					return oTypes[i];
+				IBuildIOType oType = oTypes[i];
+				IBuildStep step = type.getStep();
+				IBuildStep oStep = oType.getStep();
+				
+				if(typesMatch(step.get))
+				for(int j = 0; j < )
+			}
+		}
+		return null;
+*/
+	}
+
+	private boolean typesMatch(IBuildIOType type, IBuildIOType oType, Map<IBuildResource, IBuildResource> rcMap, boolean failOnError){
+		return typesMatch(type, oType, rcMap, true, failOnError);
+	}
+
+	private boolean typesMatch(IBuildIOType type, IBuildIOType oType, Map<IBuildResource, IBuildResource> rcMap, boolean checkStep, boolean failOnError){
+		
+//		doTrace("matching io type");
+		if(type.isInput() != oType.isInput()){
+			if(failOnError){
+				doFail("types have different I/O property", type, oType);
+			}
+			return false;
+		}
+		
+		IBuildResource rcs[] = type.getResources();
+		IBuildResource oRcs[] = oType.getResources();
+		if(rcs.length != oRcs.length)
+			return false;
+		
+		if(resourcesMatch(rcs, oRcs, rcMap)){
+			Map<IBuildIOType, IBuildIOType> inMap = new HashMap<IBuildIOType, IBuildIOType>();
+			Map<IBuildIOType, IBuildIOType> outMap = new HashMap<IBuildIOType, IBuildIOType>();
+			if(!checkStep)
+				return true;
+			return stepsMatch(type.getStep(), oType.getStep(), inMap, outMap, false, failOnError);
+		} else if(failOnError) {
+			doFail("resources not match", type, oType);
+		}
+//		doTrace("end matching io type");
+
+		return false;
+	}
+	
+	private boolean resourcesMatch(IBuildResource rcs[], IBuildResource oRcs[], Map<IBuildResource, IBuildResource> rcMap){
+		if(rcs.length != oRcs.length)
+			return false;
+		
+		for(int j = 0; j < rcs.length; j++){
+			IPath location = rcs[j].getLocation();
+			int k;
+			for(k = 0; k < oRcs.length; k++){
+				if(oRcs[k].getLocation().equals(location)){
+					if(rcMap != null)
+						rcMap.put(rcs[j], oRcs[k]);
+					break;
+				}
+			}
+			if(k == oRcs.length)
+				return false;
+		}
+		return true;
+	}
+
+	private void doFail(String dump, IBuildIOType type, IBuildIOType oType){
+		doFail(dump + "\nType:\n" + DbgUtil.dumpType(type) + "\noType:\n" + DbgUtil.dumpType(oType));
+	}
+
+	private void doFail(String dump, IBuildResource rc, IBuildResource oRc){
+		doFail(dump + "\nRc:\n" + DbgUtil.dumpResource(rc) + "\noRc:\n" + DbgUtil.dumpResource(oRc));
+	}
+
+	private void doFail(String dump, IBuildStep step, IBuildStep oStep){
+		doFail(dump + "\nStep:\n" + DbgUtil.dumpStep(step) + "\noStep:\n" + DbgUtil.dumpStep(oStep));
+	}
+
+	private void doFail(String dump){
+		doTrace(dump);
+		fail(dump);
+	}
+	
+	private void doTrace(String str){
+		if(DbgUtil.DEBUG)
+			DbgUtil.trace(str);
+	}
+	
+	private void doTestBuildDescription(IBuildDescription des, IBuildDescription tDes){
+		assertEquals(des.getConfiguration(), tDes.getConfiguration());
+		
+		assertNotNull(des.getConfiguration());
+		
+		IProject project = des.getConfiguration().getOwner().getProject();
+		
+		IBuildStep inStep = des.getInputStep();
+		IBuildStep outStep = des.getOutputStep();
+		
+		if(inStep.getInputIOTypes().length !=  0){
+			doFail("input step contains inputs, " + DbgUtil.dumpStep(inStep));
+		}
+		if(outStep.getOutputIOTypes().length !=  0){
+			doFail("output step contains outputs, " + DbgUtil.dumpStep(outStep)); 
+		}
+
+		IBuildStep tInStep = tDes.getInputStep();
+		IBuildStep tOutStep = tDes.getOutputStep();
+
+		doTrace("*****testing down to up..");
+		doTestStep(inStep, tInStep, true);
+		doTrace("*****down to up passed");
+		
+		doTrace("*****testing up to down..");
+		doTestStep(outStep, tOutStep, false);
+		doTrace("*****up to down passed");
+	}
+	
+	protected void tearDown() throws Exception {
+		fCleaner.run();
+		if(DbgUtil.DEBUG)
+			DbgUtil.flush();
+	}
+	
+	private IProject createProject(String name, String id){
+		IProject proj = ManagedBuildTestHelper.createProject(name, id);
+		if(proj != null)
+			fCompositeCleaner.addRunnable(new ProjectCleaner(proj));
+		
+		return proj;
+	}
+	
+	private IProject loadProject(String name){
+		IProject proj = ManagedBuildTestHelper.loadProject(name, PROJ_PATH);
+		if(proj != null)
+			fCompositeCleaner.addRunnable(new ProjectCleaner(proj));
+		
+		return proj;
+	}
+
+	
+	public void testDes_gnu30_exe(){
+		IProject project = createProject(PREFIX + "1", "cdt.managedbuild.target.gnu30.exe");
+		try {
+			CCProjectNature.addCCNature(project, null);
+		} catch (CoreException e1) {
+			fail("fail to add CC nature");
+		}
+		
+		ManagedBuildTestHelper.createFile(project, "a.c");
+		ManagedBuildTestHelper.createFile(project, "b.c");
+		ManagedBuildTestHelper.createFile(project, "c.cpp");
+		ManagedBuildTestHelper.createFile(project, "d.cpp");
+	
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		IConfiguration cfg = mProj.getConfigurations()[0];
+		String art = cfg.getArtifactName();
+		String ext = cfg.getArtifactExtension();
+		if(ext != null && ext.length() > 0)
+			art = art + "." + ext;
+		
+		String cName = cfg.getName();
+
+		BuildDescription tDes = new BuildDescription(cfg);
+		BuildStep step;
+		BuildIOType type;
+		
+		//
+		step = (BuildStep)tDes.getInputStep();
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+			type.addResource(tDes.createResource("d.cpp"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			type.addResource(tDes.createResource("b.c"));
+
+		//
+		//
+		step = tDes.createStep(null, null);
+		
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("b.c"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/b.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/c.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("d.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/d.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+			type.addResource(tDes.createResource(cName + "/b.o"));
+			type.addResource(tDes.createResource(cName + "/c.o"));
+			type.addResource(tDes.createResource(cName + "/d.o"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+		//
+		step = (BuildStep)tDes.getOutputStep();
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+
+		IBuildDescription des = null;
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+
+		doTestBuildDescription(des, tDes);
+	}
+	
+	public void testDes_gnu30_exe_deps(){
+		IProject project = createProject(PREFIX + "gnu30_exe_deps", "cdt.managedbuild.target.gnu30.exe");
+		try {
+			CCProjectNature.addCCNature(project, null);
+		} catch (CoreException e1) {
+			fail("fail to add CC nature");
+		}
+		
+		ManagedBuildTestHelper.createFile(project, "a.c", "\n#include \"a.h\"\n#include \"d.h\"\n");
+		ManagedBuildTestHelper.createFile(project, "b.c");
+		ManagedBuildTestHelper.createFile(project, "c.cpp", "\n#include \"b.h\"\n#include \"e.h\"\n");
+		ManagedBuildTestHelper.createFile(project, "d.cpp");
+		ManagedBuildTestHelper.createFile(project, "a.h", "\n#include \"b.h\"\n");
+		ManagedBuildTestHelper.createFile(project, "b.h", "\n#include \"c.h\"\n");
+		ManagedBuildTestHelper.createFile(project, "c.h", "\n");
+		ManagedBuildTestHelper.createFile(project, "d.h", "\n");
+		ManagedBuildTestHelper.createFile(project, "e.h", "\n");
+		ManagedBuildTestHelper.createFile(project, "f.h", "\n");
+	
+		ICProject cProject = CoreModel.getDefault().create(project);
+		CCorePlugin.getIndexManager().setIndexerId(cProject, IPDOMManager.ID_FAST_INDEXER);
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		IConfiguration cfg = mProj.getConfigurations()[0];
+		String art = cfg.getArtifactName();
+		String ext = cfg.getArtifactExtension();
+		if(ext != null && ext.length() > 0)
+			art = art + "." + ext;
+		
+		String cName = cfg.getName();
+
+		BuildDescription tDes = new BuildDescription(cfg);
+		BuildStep step;
+		BuildIOType type;
+		
+		//
+		step = (BuildStep)tDes.getInputStep();
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+			type.addResource(tDes.createResource("d.cpp"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			type.addResource(tDes.createResource("b.c"));
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("a.h"));
+			type.addResource(tDes.createResource("b.h"));
+			type.addResource(tDes.createResource("c.h"));
+			type.addResource(tDes.createResource("d.h"));
+			type.addResource(tDes.createResource("e.h"));
+		//
+		//
+		step = tDes.createStep(null, null);
+		
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("a.c"));
+
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("a.h"));
+			type.addResource(tDes.createResource("b.h"));
+			type.addResource(tDes.createResource("c.h"));
+			type.addResource(tDes.createResource("d.h"));
+
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("b.c"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/b.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("b.h"));
+			type.addResource(tDes.createResource("c.h"));
+			type.addResource(tDes.createResource("e.h"));
+
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/c.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("d.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/d.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+			type.addResource(tDes.createResource(cName + "/b.o"));
+			type.addResource(tDes.createResource(cName + "/c.o"));
+			type.addResource(tDes.createResource(cName + "/d.o"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+		//
+		step = (BuildStep)tDes.getOutputStep();
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+
+		// TODO: more testing needed, may still need a sleep here because:
+		// the legacy project creation mechanism is used for this test
+		//the IManagedBuildInfo gets created/cached when the project contains only C nature
+		//thus C++ settings are initialy not taken into the account
+		//after that the CC nature is added
+		//in this the build system is initiating the core settings update (ICProjectDescription cache refresh)
+		//the refresh is scheduled as a job, so in case we do not wait here the job may not be completed by the time
+		//the test is run
+		try {
+			Thread.sleep(5000);
+		} catch (InterruptedException e) {
+		}
+		
+		CCorePlugin.getIndexManager().joinIndexer(-1, new NullProgressMonitor());
+		CCorePlugin.getIndexManager().reindex(cProject);
+		CCorePlugin.getIndexManager().joinIndexer(-1, new NullProgressMonitor());
+
+		IBuildDescription des = null;
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+
+		doTestBuildDescription(des, tDes);
+	}
+	
+	public void testDesTestgnu21_exe(){
+		IProject project = createProject(PREFIX + "1", "cdt.managedbuild.target.testgnu21.exe");
+		try {
+			CCProjectNature.addCCNature(project, null);
+		} catch (CoreException e1) {
+			fail("fail to add CC nature");
+		}
+		
+		ManagedBuildTestHelper.createFile(project, "a.c");
+		ManagedBuildTestHelper.createFile(project, "b.c");
+		ManagedBuildTestHelper.createFile(project, "c.cpp");
+		ManagedBuildTestHelper.createFile(project, "d.cpp");
+	
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		IConfiguration cfg = mProj.getConfigurations()[0];
+		String art = cfg.getArtifactName();
+		String ext = cfg.getArtifactExtension();
+		if(ext != null && ext.length() > 0)
+			art = art + "." + ext;
+		
+		String cName = cfg.getName();
+
+		BuildDescription tDes = new BuildDescription(cfg);
+		BuildStep step;
+		BuildIOType type;
+		
+		//
+		step = (BuildStep)tDes.getInputStep();
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+			type.addResource(tDes.createResource("d.cpp"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			type.addResource(tDes.createResource("b.c"));
+
+		//
+		//
+		step = tDes.createStep(null, null);
+		
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("b.c"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/b.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/c.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("d.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/d.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+			type.addResource(tDes.createResource(cName + "/b.o"));
+			type.addResource(tDes.createResource(cName + "/c.o"));
+			type.addResource(tDes.createResource(cName + "/d.o"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+		//
+		step = (BuildStep)tDes.getOutputStep();
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+
+		IBuildDescription des = null;
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+
+		doTestBuildDescription(des, tDes);
+	}
+	
+	public void testDesRcCfg(){
+		IProject project = createProject(PREFIX + "1", "cdt.managedbuild.target.gnu30.exe");
+		try {
+			CCProjectNature.addCCNature(project, null);
+		} catch (CoreException e1) {
+			fail("fail to add CC nature");
+		}
+		
+		IFile ac = ManagedBuildTestHelper.createFile(project, "a.c");
+		IFile bc = ManagedBuildTestHelper.createFile(project, "b.c");
+		IFile ccpp = ManagedBuildTestHelper.createFile(project, "c.cpp");
+		IFile dcpp = ManagedBuildTestHelper.createFile(project, "d.cpp");
+	
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		IConfiguration cfg = mProj.getConfigurations()[0];
+		String art = cfg.getArtifactName();
+		String ext = cfg.getArtifactExtension();
+		if(ext != null && ext.length() > 0)
+			art = art + "." + ext;
+		
+		String cName = cfg.getName();
+		IResourceConfiguration rcCfg = cfg.createResourceConfiguration(ac);
+		assertNotNull(rcCfg);
+		rcCfg = cfg.createResourceConfiguration(ccpp);
+		assertNotNull(rcCfg);
+
+		BuildDescription tDes = new BuildDescription(cfg);
+		BuildStep step;
+		BuildIOType type;
+		
+		//
+		step = (BuildStep)tDes.getInputStep();
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+			type.addResource(tDes.createResource("d.cpp"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			type.addResource(tDes.createResource("b.c"));
+
+		//
+		//
+		step = tDes.createStep(null, null);
+		
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("b.c"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/b.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/c.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("d.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/d.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+			type.addResource(tDes.createResource(cName + "/b.o"));
+			type.addResource(tDes.createResource(cName + "/c.o"));
+			type.addResource(tDes.createResource(cName + "/d.o"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+		//
+		step = (BuildStep)tDes.getOutputStep();
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+
+		IBuildDescription des = null;
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+
+		doTestBuildDescription(des, tDes);
+
+	}
+
+	public void testDesRcbs(){
+		IProject project = createProject(PREFIX + "1", "cdt.managedbuild.target.gnu30.exe");
+		try {
+			CCProjectNature.addCCNature(project, null);
+		} catch (CoreException e1) {
+			fail("fail to add CC nature");
+		}
+		
+		IFile ac = ManagedBuildTestHelper.createFile(project, "a.c");
+		IFile bc = ManagedBuildTestHelper.createFile(project, "b.c");
+		IFile ccpp = ManagedBuildTestHelper.createFile(project, "c.cpp");
+		IFile dcpp = ManagedBuildTestHelper.createFile(project, "d.cpp");
+		IFile er = ManagedBuildTestHelper.createFile(project, "e.r");
+		IFile fr = ManagedBuildTestHelper.createFile(project, "f.r");
+		IFile gr = ManagedBuildTestHelper.createFile(project, "dir1/g.r");
+		IFile hr = ManagedBuildTestHelper.createFile(project, "dir2/h.r");
+		IFile ir = ManagedBuildTestHelper.createFile(project, "dir2/i.r");
+		
+		
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		IConfiguration cfg = mProj.getConfigurations()[0];
+		String art = cfg.getArtifactName();
+		String ext = cfg.getArtifactExtension();
+		if(ext != null && ext.length() > 0)
+			art = art + "." + ext;
+		
+		String cName = cfg.getName();
+		String out = cName + "/";
+		
+		
+		ManagedBuildTestHelper.createRcbsTool(cfg, ccpp, "f.r;dir1/g.r;dir2/h.r", "q.o;w.o;e.o", "a;b;c");
+		ManagedBuildTestHelper.createRcbsTool(cfg, er, "f.r;dir1/g.r;dir2/h.r;dir2/i.r", "z.cpp;x.c", "d;e;f");
+//		IResourceConfiguration rcCfg = cfg.createResourceConfiguration(ac);
+//		assertNotNull(rcCfg);
+//		rcCfg = cfg.createResourceConfiguration(ccpp);
+//		assertNotNull(rcCfg);
+
+		BuildDescription tDes = new BuildDescription(cfg);
+		BuildStep step;
+		BuildIOType type;
+		
+		//
+		step = (BuildStep)tDes.getInputStep();
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+			type.addResource(tDes.createResource("d.cpp"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			type.addResource(tDes.createResource("b.c"));
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("e.r"));
+			type.addResource(tDes.createResource("f.r"));
+			type.addResource(tDes.createResource("dir1/g.r"));
+			type.addResource(tDes.createResource("dir2/h.r"));
+			type.addResource(tDes.createResource("dir2/i.r"));
+		//
+		//
+		step = tDes.createStep(null, null);
+		
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("b.c"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/b.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("f.r"));
+			type.addResource(tDes.createResource("dir1/g.r"));
+			type.addResource(tDes.createResource("dir2/h.r"));
+
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/q.o"));
+			type.addResource(tDes.createResource(cName + "/w.o"));
+			type.addResource(tDes.createResource(cName + "/e.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("d.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/d.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("e.r"));
+
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("f.r"));
+			type.addResource(tDes.createResource("dir1/g.r"));
+			type.addResource(tDes.createResource("dir2/h.r"));
+			type.addResource(tDes.createResource("dir2/i.r"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(out + "z.cpp"));
+			type.addResource(tDes.createResource(out + "x.c"));
+//			type.addResource(tDes.createResource(out + "r.o"));
+//			type.addResource(tDes.createResource(out + "t.o"));
+//			type.addResource(tDes.createResource(out + "y.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource(out + "z.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/z.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource(out + "x.c"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/x.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+			type.addResource(tDes.createResource(cName + "/b.o"));
+//			type.addResource(tDes.createResource(cName + "/c.o"));
+			type.addResource(tDes.createResource(cName + "/d.o"));
+			type.addResource(tDes.createResource(cName + "/q.o"));
+			type.addResource(tDes.createResource(cName + "/w.o"));
+			type.addResource(tDes.createResource(cName + "/e.o"));
+			type.addResource(tDes.createResource(cName + "/z.o"));
+			type.addResource(tDes.createResource(cName + "/x.o"));
+//			type.addResource(tDes.createResource(cName + "/r.o"));
+//			type.addResource(tDes.createResource(cName + "/t.o"));
+//			type.addResource(tDes.createResource(cName + "/y.o"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+		//
+		step = (BuildStep)tDes.getOutputStep();
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+
+		IBuildDescription des = null;
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+
+		doTestBuildDescription(des, tDes);
+
+	}
+
+	public void testDesAddlInVarUserObjs(){
+		IProject project = createProject(PREFIX + "1", "cdt.managedbuild.target.gnu30.exe");
+		try {
+			CCProjectNature.addCCNature(project, null);
+		} catch (CoreException e1) {
+			fail("fail to add CC nature");
+		}
+		
+		IFile ac = ManagedBuildTestHelper.createFile(project, "a.c");
+		IFile bc = ManagedBuildTestHelper.createFile(project, "b.c");
+		IFile ccpp = ManagedBuildTestHelper.createFile(project, "c.cpp");
+		IFile dcpp = ManagedBuildTestHelper.createFile(project, "d.cpp");
+		IFile er = ManagedBuildTestHelper.createFile(project, "e.r");
+		IFile fr = ManagedBuildTestHelper.createFile(project, "f.r");
+		IFile gr = ManagedBuildTestHelper.createFile(project, "dir1/g.r");
+		IFile hr = ManagedBuildTestHelper.createFile(project, "dir2/h.r");
+		IFile ir = ManagedBuildTestHelper.createFile(project, "dir2/i.r");
+		IFile o1 = ManagedBuildTestHelper.createFile(project, "o1.o");
+		IFile o2 = ManagedBuildTestHelper.createFile(project, "dir3/o2.o");
+		
+		
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		IConfiguration cfg = mProj.getConfigurations()[0];
+		String art = cfg.getArtifactName();
+		String ext = cfg.getArtifactExtension();
+		if(ext != null && ext.length() > 0)
+			art = art + "." + ext;
+		
+		String cName = cfg.getName();
+		String out = cName + "/";
+		
+		ManagedBuildTestHelper.setObjs(cfg, new String[]{"o1.o", "dir3/o2.o", "dir4/d/o3.o"});
+		
+		
+		ManagedBuildTestHelper.createRcbsTool(cfg, ccpp, "f.r;dir1/g.r;dir2/h.r", "q.o;w.o;e.o", "a;b;c");
+		ManagedBuildTestHelper.createRcbsTool(cfg, er, "f.r;dir1/g.r;dir2/h.r;dir2/i.r", "z.cpp;x.c", "d;e;f");
+//		IResourceConfiguration rcCfg = cfg.createResourceConfiguration(ac);
+//		assertNotNull(rcCfg);
+//		rcCfg = cfg.createResourceConfiguration(ccpp);
+//		assertNotNull(rcCfg);
+
+		BuildDescription tDes = new BuildDescription(cfg);
+		BuildStep step;
+		BuildIOType type;
+		
+		//
+		step = (BuildStep)tDes.getInputStep();
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+			type.addResource(tDes.createResource("d.cpp"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			type.addResource(tDes.createResource("b.c"));
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("e.r"));
+			type.addResource(tDes.createResource("f.r"));
+			type.addResource(tDes.createResource("dir1/g.r"));
+			type.addResource(tDes.createResource("dir2/h.r"));
+			type.addResource(tDes.createResource("dir2/i.r"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("o1.o"));
+			type.addResource(tDes.createResource("dir3/o2.o"));
+			type.addResource(tDes.createResource("dir4/d/o3.o"));
+
+		//
+		//
+		step = tDes.createStep(null, null);
+		
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("b.c"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/b.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("f.r"));
+			type.addResource(tDes.createResource("dir1/g.r"));
+			type.addResource(tDes.createResource("dir2/h.r"));
+
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/q.o"));
+			type.addResource(tDes.createResource(cName + "/w.o"));
+			type.addResource(tDes.createResource(cName + "/e.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("d.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/d.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("e.r"));
+
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("f.r"));
+			type.addResource(tDes.createResource("dir1/g.r"));
+			type.addResource(tDes.createResource("dir2/h.r"));
+			type.addResource(tDes.createResource("dir2/i.r"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(out + "z.cpp"));
+			type.addResource(tDes.createResource(out + "x.c"));
+//			type.addResource(tDes.createResource(out + "r.o"));
+//			type.addResource(tDes.createResource(out + "t.o"));
+//			type.addResource(tDes.createResource(out + "y.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource(out + "z.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/z.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource(out + "x.c"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/x.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+			type.addResource(tDes.createResource(cName + "/b.o"));
+//			type.addResource(tDes.createResource(cName + "/c.o"));
+			type.addResource(tDes.createResource(cName + "/d.o"));
+			type.addResource(tDes.createResource(cName + "/q.o"));
+			type.addResource(tDes.createResource(cName + "/w.o"));
+			type.addResource(tDes.createResource(cName + "/e.o"));
+			type.addResource(tDes.createResource(cName + "/z.o"));
+			type.addResource(tDes.createResource(cName + "/x.o"));
+//			type.addResource(tDes.createResource(cName + "/r.o"));
+//			type.addResource(tDes.createResource(cName + "/t.o"));
+//			type.addResource(tDes.createResource(cName + "/y.o"));
+
+	//		type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("o1.o"));
+			type.addResource(tDes.createResource("dir3/o2.o"));
+			type.addResource(tDes.createResource("dir4/d/o3.o"));
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+		//
+		step = (BuildStep)tDes.getOutputStep();
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+
+		IBuildDescription des = null;
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+
+		doTestBuildDescription(des, tDes);
+
+	}
+	
+	public void testDesAddlInVar(){
+		IProject project = createProject(PREFIX + "1", "cdt.managedbuild.target.bdm.exe");
+		try {
+			CCProjectNature.addCCNature(project, null);
+		} catch (CoreException e1) {
+			fail("fail to add CC nature");
+		}
+		
+		ManagedBuildTestHelper.createFile(project, "a.c");
+		ManagedBuildTestHelper.createFile(project, "b.c");
+		ManagedBuildTestHelper.createFile(project, "c.cpp");
+		ManagedBuildTestHelper.createFile(project, "d.cpp");
+		ManagedBuildTestHelper.createFile(project, "e.s1");
+		ManagedBuildTestHelper.createFile(project, "dir/f.s1");
+		ManagedBuildTestHelper.createFile(project, "g.s2");
+		ManagedBuildTestHelper.createFile(project, "dir/h.s2");
+	
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		IConfiguration cfg = mProj.getConfigurations()[0];
+		String art = cfg.getArtifactName();
+		String ext = cfg.getArtifactExtension();
+		if(ext != null && ext.length() > 0)
+			art = art + "." + ext;
+		
+		String cName = cfg.getName();
+		String out = cName + "/";
+
+		BuildDescription tDes = new BuildDescription(cfg);
+		BuildStep step;
+		BuildIOType type;
+		
+		//
+		step = (BuildStep)tDes.getInputStep();
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+			type.addResource(tDes.createResource("d.cpp"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			type.addResource(tDes.createResource("b.c"));
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("e.s1"));
+			type.addResource(tDes.createResource("dir/f.s1"));
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("g.s2"));
+			type.addResource(tDes.createResource("dir/h.s2"));
+		//
+		//
+			step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("e.s1"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(out + "e.o1"));
+		//
+		//
+			step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("dir/f.s1"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(out + "dir/f.o1"));
+		//
+		//
+			step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("g.s2"));
+
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource(out + "e.o1"));
+			type.addResource(tDes.createResource(out + "dir/f.o1"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(out + "g.o"));
+		//
+		//
+			step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("dir/h.s2"));
+
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource(out + "e.o1"));
+			type.addResource(tDes.createResource(out + "dir/f.o1"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(out + "dir/h.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+		
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("b.c"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/b.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/c.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("d.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/d.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+			type.addResource(tDes.createResource(cName + "/b.o"));
+			type.addResource(tDes.createResource(cName + "/c.o"));
+			type.addResource(tDes.createResource(cName + "/d.o"));
+			type.addResource(tDes.createResource(out + "g.o"));
+			type.addResource(tDes.createResource(out + "dir/h.o"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+		//
+		step = (BuildStep)tDes.getOutputStep();
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+
+		IBuildDescription des = null;
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+
+		doTestBuildDescription(des, tDes);
+	}
+
+	public void testDes_gnu30_exe_objsInProj(){
+		IProject project = createProject(PREFIX + "1", "cdt.managedbuild.target.gnu30.exe");
+		try {
+			CCProjectNature.addCCNature(project, null);
+		} catch (CoreException e1) {
+			fail("fail to add CC nature");
+		}
+		
+		ManagedBuildTestHelper.createFile(project, "a.c");
+		ManagedBuildTestHelper.createFile(project, "b.c");
+		ManagedBuildTestHelper.createFile(project, "c.cpp");
+		ManagedBuildTestHelper.createFile(project, "d.cpp");
+		ManagedBuildTestHelper.createFile(project, "e.o");
+		ManagedBuildTestHelper.createFile(project, "dir/f.o");
+	
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		IConfiguration cfg = mProj.getConfigurations()[0];
+		String art = cfg.getArtifactName();
+		String ext = cfg.getArtifactExtension();
+		if(ext != null && ext.length() > 0)
+			art = art + "." + ext;
+		
+		String cName = cfg.getName();
+
+		BuildDescription tDes = new BuildDescription(cfg);
+		BuildStep step;
+		BuildIOType type;
+		
+		//
+		step = (BuildStep)tDes.getInputStep();
+
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+			type.addResource(tDes.createResource("d.cpp"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			type.addResource(tDes.createResource("b.c"));
+
+		//
+		//
+		step = tDes.createStep(null, null);
+		
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("a.c"));
+			
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("b.c"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/b.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("c.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/c.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, false, null);
+			type.addResource(tDes.createResource("d.cpp"));
+		
+			type = step.createIOType(false, true, null);
+			type.addResource(tDes.createResource(cName + "/d.o"));
+		//
+		//
+		step = tDes.createStep(null, null);
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/a.o"));
+			type.addResource(tDes.createResource(cName + "/b.o"));
+			type.addResource(tDes.createResource(cName + "/c.o"));
+			type.addResource(tDes.createResource(cName + "/d.o"));
+			
+			type = step.createIOType(false, false, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+		//
+		step = (BuildStep)tDes.getOutputStep();
+			
+			type = step.createIOType(true, true, null);
+			type.addResource(tDes.createResource(cName + "/" + art));
+		//
+
+		IBuildDescription des = null;
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+
+		doTestBuildDescription(des, tDes);
+	}
+	
+	public void testDesRebuildState(){
+		IProject project = createProject(PREFIX + "1", "cdt.managedbuild.target.gnu30.exe");
+		try {
+			CCProjectNature.addCCNature(project, null);
+		} catch (CoreException e1) {
+			fail("fail to add CC nature");
+		}
+		
+		ManagedBuildTestHelper.createFile(project, "a.c");
+		ManagedBuildTestHelper.createFile(project, "b.c");
+		ManagedBuildTestHelper.createFile(project, "c.cpp");
+		ManagedBuildTestHelper.createFile(project, "d.cpp");
+		ManagedBuildTestHelper.createFile(project, "e.o");
+		ManagedBuildTestHelper.createFile(project, "dir/f.o");
+	
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		IConfiguration cfg = mProj.getConfigurations()[0];
+		
+		cfg.setRebuildState(false);
+		
+		assertFalse(cfg.needsRebuild());
+		
+		ITool targetTool = ((Configuration)cfg).calculateTargetTool();
+
+		cfg.setArtifactName("asdafasdfasdfasdfasdf");
+		assertTrue(targetTool.needsRebuild());
+		assertTrue(cfg.needsRebuild());
+		targetTool.setRebuildState(false);
+		assertFalse(targetTool.needsRebuild());
+		assertFalse(cfg.needsRebuild());
+
+		cfg.setBuildArguments("-fgsdfg -sdfg -sdfg -sfdg");
+//		assertFalse(targetTool.needsRebuild());
+//		assertTrue(cfg.needsRebuild());
+//		cfg.setRebuildState(false);
+//		assertFalse(targetTool.needsRebuild());
+		assertFalse(cfg.needsRebuild());
+
+		cfg.setBuildCommand("fdgsdfbvvcbsdfvcx");
+		assertFalse(cfg.needsRebuild());
+
+		cfg.setCleanCommand("sadgvfcxvsdfgvxc");
+		assertFalse(cfg.needsRebuild());
+
+		cfg.setDescription("sfgsdfgsdfcxbvxcbxcvb");
+		assertFalse(cfg.needsRebuild());
+
+		cfg.setErrorParserIds("fgdsfgsdfgsdfgsdfgsdfgdfs;sdfg;sdfg;sdg;g;sdg");
+		assertFalse(cfg.needsRebuild());
+
+		cfg.setName("sdfgsdfgsdfgsdfgsdfgdsfgsdf");
+//		assertFalse(targetTool.needsRebuild());
+//		assertTrue(cfg.needsRebuild());
+//		cfg.setRebuildState(false);
+		assertFalse(targetTool.needsRebuild());
+		assertFalse(cfg.needsRebuild());
+		
+		cfg.setPostannouncebuildStep("sdfasdfasdfsdfadfasf");
+		assertFalse(cfg.needsRebuild());
+
+		cfg.setPostbuildStep("asdf;asdf;asdf;asdf;asdf");
+		assertFalse(cfg.needsRebuild());
+		
+		cfg.setPreannouncebuildStep("sdfgsdgsdhnbvxcvbxcv");
+		assertFalse(cfg.needsRebuild());
+
+		cfg.setPrebuildStep("sdfg;sdfg;sdfg;sdfgvnbcvbn");
+		assertFalse(cfg.needsRebuild());
+
+		ITool tools[] = cfg.getFilteredTools();
+		ITool tool = null;
+		
+		for(int i = 0; i < tools.length; i++){
+			tool = tools[i];
+			if(tool != targetTool)
+				break;
+		}
+		
+		cfg.setToolCommand(tool, "sdgsdcxvzcxvzxc");
+		assertTrue(tool.needsRebuild());
+		assertTrue(cfg.needsRebuild());
+		tool.setRebuildState(false);
+		assertFalse(tool.needsRebuild());
+		assertFalse(cfg.needsRebuild());
+		
+		cfg.setArtifactExtension("adsfasdfasdfasdfasdf");
+		assertTrue(targetTool.needsRebuild());
+		assertTrue(cfg.needsRebuild());
+		targetTool.setRebuildState(false);
+		assertFalse(targetTool.needsRebuild());
+		assertFalse(cfg.needsRebuild());
+
+//		public static final int BOOLEAN = 0;
+//		public static final int ENUMERATED = 1;
+//		public static final int STRING = 2;
+//		public static final int STRING_LIST = 3;
+//		public static final int INCLUDE_PATH = 4;
+//		public static final int PREPROCESSOR_SYMBOLS = 5;
+//		public static final int LIBRARIES = 6;
+//		public static final int OBJECTS = 7;
+
+		IBuildObject obj[] = ManagedBuildTestHelper.getOption(cfg, IOption.BOOLEAN);
+		if(obj != null){
+			IHoldsOptions ho = (IHoldsOptions)obj[0];
+			IOption o = (IOption)obj[1];
+			
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+			
+			try {
+				cfg.setOption(ho, o, !o.getBooleanValue());
+			} catch (BuildException e) {
+				fail("failed to set the option: " + e.getLocalizedMessage());
+			}
+			
+			assertTrue(ho.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			ho.setRebuildState(false);
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+		}
+
+		obj = ManagedBuildTestHelper.getOption(cfg, IOption.ENUMERATED);
+		if(obj != null){
+			IHoldsOptions ho = (IHoldsOptions)obj[0];
+			IOption o = (IOption)obj[1];
+			
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+			
+			try {
+				cfg.setOption(ho, o, "sdfgsdfcvsdfgvxcsdf");
+			} catch (BuildException e) {
+				fail("failed to set the option: " + e.getLocalizedMessage());
+			}
+			
+			assertTrue(ho.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			ho.setRebuildState(false);
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+		}
+
+		obj = ManagedBuildTestHelper.getOption(cfg, IOption.STRING);
+		if(obj != null){
+			IHoldsOptions ho = (IHoldsOptions)obj[0];
+			IOption o = (IOption)obj[1];
+			
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+			
+			try {
+				cfg.setOption(ho, o, "sdfgsdfcvsdfgvxcfdgvsdf");
+			} catch (BuildException e) {
+				fail("failed to set the option: " + e.getLocalizedMessage());
+			}
+			
+			assertTrue(ho.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			ho.setRebuildState(false);
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+		}
+
+		obj = ManagedBuildTestHelper.getOption(cfg, IOption.STRING_LIST);
+		if(obj != null){
+			IHoldsOptions ho = (IHoldsOptions)obj[0];
+			IOption o = (IOption)obj[1];
+			
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+			
+			try {
+				cfg.setOption(ho, o, new String[]{"sdfgsd","fcvsdfgvxcfdgvsdf"});
+			} catch (BuildException e) {
+				fail("failed to set the option: " + e.getLocalizedMessage());
+			}
+			
+			assertTrue(ho.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			ho.setRebuildState(false);
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+		}
+
+		obj = ManagedBuildTestHelper.getOption(cfg, IOption.INCLUDE_PATH);
+		if(obj != null){
+			IHoldsOptions ho = (IHoldsOptions)obj[0];
+			IOption o = (IOption)obj[1];
+			
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+			
+			try {
+				cfg.setOption(ho, o, new String[]{"sdfgsd","fcvsdfgvxcfdgvsdf"});
+			} catch (BuildException e) {
+				fail("failed to set the option: " + e.getLocalizedMessage());
+			}
+			
+			assertTrue(ho.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			ho.setRebuildState(false);
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+		}
+
+		
+		obj = ManagedBuildTestHelper.getOption(cfg, IOption.PREPROCESSOR_SYMBOLS);
+		if(obj != null){
+			IHoldsOptions ho = (IHoldsOptions)obj[0];
+			IOption o = (IOption)obj[1];
+			
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+			
+			try {
+				cfg.setOption(ho, o, new String[]{"sdfgsd","fcvsdfgvxcfdgvsdf"});
+			} catch (BuildException e) {
+				fail("failed to set the option: " + e.getLocalizedMessage());
+			}
+			
+			assertTrue(ho.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			ho.setRebuildState(false);
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+		}
+
+		obj = ManagedBuildTestHelper.getOption(cfg, IOption.LIBRARIES);
+		if(obj != null){
+			IHoldsOptions ho = (IHoldsOptions)obj[0];
+			IOption o = (IOption)obj[1];
+			
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+			
+			try {
+				cfg.setOption(ho, o, new String[]{"sdfgsd","fcvsdfgvxcfdgvsdf"});
+			} catch (BuildException e) {
+				fail("failed to set the option: " + e.getLocalizedMessage());
+			}
+			
+			assertTrue(ho.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			ho.setRebuildState(false);
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+		}
+
+		obj = ManagedBuildTestHelper.getOption(cfg, IOption.OBJECTS);
+		if(obj != null){
+			IHoldsOptions ho = (IHoldsOptions)obj[0];
+			IOption o = (IOption)obj[1];
+			
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+			
+			try {
+				cfg.setOption(ho, o, new String[]{"sdfgsd","fcvsdfgvxcfdgvsdf"});
+			} catch (BuildException e) {
+				fail("failed to set the option: " + e.getLocalizedMessage());
+			}
+			
+			assertTrue(ho.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			ho.setRebuildState(false);
+			assertFalse(ho.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+		}
+
+		IToolChain tch = cfg.getToolChain();
+		tch.setRebuildState(true);
+		assertTrue(tch.needsRebuild());
+		assertTrue(cfg.needsRebuild());
+
+		tch.setRebuildState(false);
+		assertFalse(tch.needsRebuild());
+		assertFalse(cfg.needsRebuild());
+		
+		for(int i = 0; i < tools.length; i++){
+			doTestTool(tools[i]);
+		}
+		
+		IResourceConfiguration rcCfgs[] = cfg.getResourceConfigurations();
+		for(int i = 0; i < rcCfgs.length; i++){
+			IResourceConfiguration rcCfg = rcCfgs[i];
+			
+			assertFalse(rcCfg.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+			
+			rcCfg.setRebuildState(true);
+			assertTrue(rcCfg.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			
+			rcCfg.setRebuildState(false);
+			assertFalse(rcCfg.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+			
+			rcCfg.setExclude(!rcCfg.isExcluded());
+			assertTrue(rcCfg.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+
+			rcCfg.setRebuildState(false);
+			assertFalse(rcCfg.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+
+			rcCfg.setExclude(rcCfg.isExcluded());
+			assertFalse(rcCfg.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+
+			int appl = rcCfg.getRcbsApplicability() + 1;
+			if(appl > 4)
+				appl = 1;
+			rcCfg.setRcbsApplicability(appl);
+			assertTrue(rcCfg.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			rcCfg.setRebuildState(false);
+			assertFalse(rcCfg.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+
+			rcCfg.setRcbsApplicability(rcCfg.getRcbsApplicability());
+			assertFalse(rcCfg.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+			
+			ITool t = rcCfg.getToolsToInvoke()[0];
+			assertFalse(t.needsRebuild());
+			rcCfg.setToolCommand(t, "sdsdcdsffewffdvcx");
+			assertTrue(t.needsRebuild());
+			assertTrue(rcCfg.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			t.setRebuildState(false);
+			assertFalse(t.needsRebuild());
+			assertFalse(rcCfg.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+			
+			rcCfg.setToolCommand(t, t.getToolCommand());
+			assertFalse(t.needsRebuild());
+			assertFalse(rcCfg.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+		}
+	}
+	
+	private void doTestTool(ITool tool){
+		IBuildObject obj = tool.getParent();
+		IConfiguration cfg;
+		if(obj instanceof IResourceConfiguration)
+			cfg = ((IResourceConfiguration)obj).getParent();
+		else
+			cfg = ((IToolChain)obj).getParent();
+		
+		cfg.setRebuildState(false);
+		
+		assertFalse(tool.needsRebuild());
+		
+		tool.setRebuildState(true);
+		assertTrue(tool.needsRebuild());
+		
+		assertTrue(cfg.needsRebuild());
+		
+		cfg.setRebuildState(false);
+
+		assertFalse(tool.needsRebuild());
+		assertFalse(cfg.needsRebuild());
+		
+		tool.setRebuildState(true);
+		assertTrue(tool.needsRebuild());
+		
+		assertTrue(cfg.needsRebuild());
+		
+		tool.setRebuildState(false);
+
+		assertFalse(tool.needsRebuild());
+		assertFalse(cfg.needsRebuild());
+		
+		tool.setCommandLinePattern("asdfasdfasdfasdfasdfasdsdfghdsfg");
+		assertTrue(tool.needsRebuild());
+		assertTrue(cfg.needsRebuild());
+		tool.setRebuildState(false);
+		assertFalse(tool.needsRebuild());
+		assertFalse(cfg.needsRebuild());
+
+		tool.setOutputFlag("asdfasdfasdfasdgsdf");
+		assertTrue(tool.needsRebuild());
+		assertTrue(cfg.needsRebuild());
+		tool.setRebuildState(false);
+		assertFalse(tool.needsRebuild());
+		assertFalse(cfg.needsRebuild());
+		
+		tool.setOutputPrefix("afgsdfgfadcvwerfdvsdczxv");
+		assertTrue(tool.needsRebuild());
+		assertTrue(cfg.needsRebuild());
+		tool.setRebuildState(false);
+		assertFalse(tool.needsRebuild());
+		assertFalse(cfg.needsRebuild());
+
+		tool.setRebuildState(true);
+		assertTrue(tool.needsRebuild());
+		assertTrue(cfg.needsRebuild());
+		tool.setRebuildState(false);
+		assertFalse(tool.needsRebuild());
+		assertFalse(cfg.needsRebuild());
+
+		tool.setToolCommand("dfacvzxcgrsedfxcvsdfcgv");
+		assertTrue(tool.needsRebuild());
+		assertTrue(cfg.needsRebuild());
+		tool.setRebuildState(false);
+		assertFalse(tool.needsRebuild());
+		assertFalse(cfg.needsRebuild());
+
+		IInputType iTypes[] = tool.getInputTypes();
+		
+		for(int i = 0; i < iTypes.length; i++){
+			IInputType iType = iTypes[i];
+			
+			if(iType.isExtensionElement())
+				continue;
+			
+			iType.setAssignToOptionId("qwertyuiop");
+			assertTrue(tool.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			tool.setRebuildState(false);
+			assertFalse(tool.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+			
+			iType.setBuildVariable("asdfghjkl");
+			assertTrue(tool.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			tool.setRebuildState(false);
+			assertFalse(tool.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+
+			iType.setMultipleOfType(!iType.getMultipleOfType());
+			assertTrue(tool.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			tool.setRebuildState(false);
+			assertFalse(tool.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+
+			iType.setOptionId("zxcvbnm");
+			assertTrue(tool.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			tool.setRebuildState(false);
+			assertFalse(tool.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+
+			iType.setPrimaryInput(!iType.getPrimaryInput());
+			assertTrue(tool.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			tool.setRebuildState(false);
+			assertFalse(tool.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+
+			IAdditionalInput addlIns[] = iType.getAdditionalInputs();
+			for(int j = 0; j < addlIns.length; j++){
+				IAdditionalInput a = addlIns[j];
+				
+				a.setPaths("as;sd;fgl;fg;qw;er;ty;ui;op");
+				assertTrue(tool.needsRebuild());
+				assertTrue(cfg.needsRebuild());
+				tool.setRebuildState(false);
+				assertFalse(tool.needsRebuild());
+				assertFalse(cfg.needsRebuild());
+			}
+		}
+		
+		IOutputType oTypes[] = tool.getOutputTypes();
+		
+		for(int i = 0; i < oTypes.length; i++){
+			IOutputType oType = oTypes[i];
+
+			if(oType.isExtensionElement())
+				continue;
+
+			oType.setBuildVariable("qwertyuiop");
+			assertTrue(tool.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			tool.setRebuildState(false);
+			assertFalse(tool.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+
+			oType.setMultipleOfType(!oType.getMultipleOfType());
+			assertTrue(tool.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			tool.setRebuildState(false);
+			assertFalse(tool.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+		
+			oType.setNamePattern("qwerytuuioioyuioghjgfd");
+			assertTrue(tool.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			tool.setRebuildState(false);
+			assertFalse(tool.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+
+			oType.setOptionId("asdfghjklkxcvx");
+			assertTrue(tool.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			tool.setRebuildState(false);
+			assertFalse(tool.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+
+			oType.setOutputNames("asdf;dfgh;hj;jk;ghjk;fgg;sdaf;asdf");
+			assertTrue(tool.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			tool.setRebuildState(false);
+			assertFalse(tool.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+
+			oType.setOutputPrefix("asdfscvbdfgsdfgsdfvcx");
+			assertTrue(tool.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			tool.setRebuildState(false);
+			assertFalse(tool.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+
+			oType.setPrimaryOutput(!oType.getPrimaryOutput());
+			assertTrue(tool.needsRebuild());
+			assertTrue(cfg.needsRebuild());
+			tool.setRebuildState(false);
+			assertFalse(tool.needsRebuild());
+			assertFalse(cfg.needsRebuild());
+		}
+	}
+	
+	public void testDesRebuildStateInDescription(){
+		IProject project = createProject(PREFIX + "1", "cdt.managedbuild.target.bdm.exe");
+		try {
+			CCProjectNature.addCCNature(project, null);
+		} catch (CoreException e1) {
+			fail("fail to add CC nature");
+		}
+		
+		IFile ac = ManagedBuildTestHelper.createFile(project, "a.c");
+		IFile bc = ManagedBuildTestHelper.createFile(project, "b.c");
+		IFile ccpp = ManagedBuildTestHelper.createFile(project, "c.cpp");
+		IFile dcpp = ManagedBuildTestHelper.createFile(project, "d/d.cpp");
+		IFile es2 = ManagedBuildTestHelper.createFile(project, "d2/e.s2");
+		IFile fs2 = ManagedBuildTestHelper.createFile(project, "f.s2");
+		
+		ManagedBuildTestHelper.createFile(project, "e.o");
+		ManagedBuildTestHelper.createFile(project, "dir/f.o");
+	
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject mProj = info.getManagedProject();
+		Configuration cfg = (Configuration)mProj.getConfigurations()[0];
+		String out = cfg.getName() + "/";
+		
+		cfg.setRebuildState(false);
+		
+		IBuildDescription des = null;
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED | BuildDescriptionManager.DEPS);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+		
+		IBuildResource rcs[] = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD);
+		assertEquals(rcs.length, 0);
+		
+		rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REMOVED);
+		assertEquals(rcs.length, 0);
+
+		rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
+		assertEquals(rcs.length, 0);
+
+		//target
+		ITool tool = cfg.calculateTargetTool();
+		
+		tool.setToolCommand("fgdfgcvbcbv");
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+		rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD);
+		IBuildResource oRcs[] = des.getOutputStep().getInputResources();
+		IBuildResource targetRc;
+		assertEquals(rcs.length, 1);
+		assertEquals(oRcs.length, 1);
+		if(rcs[0] != oRcs[0])
+			fail("rebuild resources do not match");
+		
+		targetRc = oRcs[0];
+		
+		rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REMOVED);
+		assertEquals(rcs.length, 0);
+
+		rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
+		assertEquals(rcs.length, 1);
+		assertEquals(oRcs.length, 1);
+		if(rcs[0] != oRcs[0])
+			fail("rebuild resources do not match");
+		
+		cfg.setRebuildState(false);
+		
+		//cpp
+		tool = getToolForInExt(cfg, "cpp");
+		tool.setToolCommand("sdfgzxcvzxcvzxv");
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+		rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD);
+		oRcs = des.getOutputStep().getInputResources();
+		assertEquals(oRcs.length, 1);
+		targetRc = oRcs[0];
+
+		oRcs = new IBuildResource[5];
+		oRcs[0] = getResourceForProjPath(des, out + "c.o");
+		assertNotNull(oRcs[0]);
+		oRcs[1] = getResourceForProjPath(des, out + "d/d.o");
+		assertNotNull(oRcs[1]);
+		oRcs[2] = targetRc;
+		oRcs[3] = getResourceForProjPath(des, out + "a.o");
+		assertNotNull(oRcs[0]);
+		oRcs[4] = getResourceForProjPath(des, out + "b.o");
+		assertNotNull(oRcs[1]);
+		
+		assertEquals(rcs.length, 5);
+		assertEquals(oRcs.length, 5);
+		if(!resourcesEqual(rcs, oRcs))
+			fail("rebuild resources do not match");
+		
+		
+		rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REMOVED);
+		assertEquals(rcs.length, 0);
+
+		rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
+		assertEquals(rcs.length, 5);
+		if(!resourcesEqual(rcs, oRcs))
+			fail("rebuild resources do not match");
+		
+		cfg.setRebuildState(false);
+	
+		//s2
+		tool = getToolForInExt(cfg, "s2");
+		tool.setToolCommand("sdfgzxcvzxcvzxv");
+		try {
+			des = BuildDescriptionManager.createBuildDescription(cfg, null, BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
+		} catch (CoreException e) {
+			fail("build description creation failed: " + e.getLocalizedMessage());
+		}
+		rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD);
+		oRcs = des.getOutputStep().getInputResources();
+		assertEquals(oRcs.length, 1);
+		targetRc = oRcs[0];
+
+		oRcs = new IBuildResource[3];
+		oRcs[0] = getResourceForProjPath(des, out + "d2/e.o");
+		assertNotNull(oRcs[0]);
+		oRcs[1] = getResourceForProjPath(des, out + "f.o");
+		assertNotNull(oRcs[1]);
+		oRcs[2] = targetRc;
+		
+		assertEquals(rcs.length, 3);
+		assertEquals(oRcs.length, 3);
+		if(!resourcesEqual(rcs, oRcs))
+			fail("rebuild resources do not match");
+		
+		
+		rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REMOVED);
+		assertEquals(rcs.length, 0);
+
+		rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
+		assertEquals(rcs.length, 3);
+		if(!resourcesEqual(rcs, oRcs))
+			fail("rebuild resources do not match");
+		
+		cfg.setRebuildState(false);
+		
+	}
+	
+	private IBuildResource getResourceForProjPath(IBuildDescription des, String path){
+		return getResourceForProjPath(des, new Path(path));
+	}
+
+	private IBuildResource getResourceForProjPath(IBuildDescription des, IPath path){
+		IPath location = des.getConfiguration().getOwner().getProject().getLocation().append(path);
+		return des.getBuildResource(location);
+	}
+
+	private ITool getToolForInExt(IConfiguration cfg, String ext){
+		ITool tools[] = cfg.getFilteredTools();
+		for(int i = 0; i < tools.length; i++){
+			if(tools[i].buildsFileType(ext))
+				return tools[i];
+		}
+		return null;
+	}
+	
+	private boolean resourcesEqual(IBuildResource rcs[], IBuildResource oRcs[]){
+		if(rcs.length != oRcs.length)
+			return false;
+		
+		for(int j = 0; j < rcs.length; j++){
+			int k;
+			for(k = 0; k < oRcs.length; k++){
+				if(oRcs[k] == rcs[j]){
+					break;
+				}
+			}
+			if(k == oRcs.length)
+				return false;
+		}
+		return true;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildFileGenerator.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildFileGenerator.java
new file mode 100644
index 0000000..4d392bd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildFileGenerator.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator;
+import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.MultiStatus;
+
+/**
+ *  Test build file generator
+ */
+public class BuildFileGenerator implements IManagedBuilderMakefileGenerator {
+	
+	private IManagedBuilderMakefileGenerator defGen = new GnuMakefileGenerator();
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator#generateDependencies()
+	 */
+	public void generateDependencies() throws CoreException {
+		defGen.generateDependencies();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator#generateMakefiles(org.eclipse.core.resources.IResourceDelta)
+	 */
+	public MultiStatus generateMakefiles(IResourceDelta delta)
+			throws CoreException {
+		return defGen.generateMakefiles(delta);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator#getBuildWorkingDir()
+	 */
+	public IPath getBuildWorkingDir() {
+		IPath current = defGen.getBuildWorkingDir();
+		current.append("temp");
+		return current;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator#getMakefileName()
+	 */
+	public String getMakefileName() {
+		return new String("TestBuildFile.mak");
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator#initialize(org.eclipse.core.resources.IProject, org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void initialize(IProject project, IManagedBuildInfo info,
+			IProgressMonitor monitor) {
+		defGen.initialize(project, info, monitor);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator#isGeneratedResource(org.eclipse.core.resources.IResource)
+	 */
+	public boolean isGeneratedResource(IResource resource) {
+		return defGen.isGeneratedResource(resource);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator#regenerateDependencies(boolean)
+	 */
+	public void regenerateDependencies(boolean force) throws CoreException {
+		defGen.regenerateDependencies(force);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator#regenerateMakefiles()
+	 */
+	public MultiStatus regenerateMakefiles() throws CoreException {
+		return defGen.regenerateMakefiles();
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildSystem40Tests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildSystem40Tests.java
new file mode 100644
index 0000000..f42c115
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/BuildSystem40Tests.java
@@ -0,0 +1,566 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.settings.model.CIncludePathEntry;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICFolderDescription;
+import org.eclipse.cdt.core.settings.model.ICLanguageSetting;
+import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
+import org.eclipse.cdt.core.settings.model.ICSettingEntry;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IFolderInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.OptionStringValue;
+import org.eclipse.cdt.managedbuilder.internal.core.Tool;
+import org.eclipse.cdt.managedbuilder.testplugin.BuildSystemTestHelper;
+import org.eclipse.cdt.managedbuilder.testplugin.CTestPlugin;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+
+public class BuildSystem40Tests  extends TestCase {
+	private IProject p1;
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(BuildSystem40Tests.class);
+		
+		return suite;
+	}
+	
+	public void test40() throws Exception{
+		String[] makefiles = {
+				 "makefile", 
+				 "objects.mk", 
+				 "sources.mk", 
+				 "subdir.mk"};
+//		doTest("test_40", "dbg 2");
+		IProject[] projects = createProjects("test_40", null, null, true);
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		ICProjectDescription des = mngr.getProjectDescription(projects[0]);
+		ICConfigurationDescription cfgDes = des.getConfigurationByName("dbg 2");
+		assertNotNull(cfgDes);
+		des.setActiveConfiguration(cfgDes);
+		mngr.setProjectDescription(projects[0], des);
+		buildProjects(projects, makefiles);
+
+		des = mngr.getProjectDescription(projects[0]);
+		cfgDes = des.getConfigurationByName("Test 4.0 ConfigName.Dbg");
+		assertNotNull(cfgDes);
+		des.setActiveConfiguration(cfgDes);
+		mngr.setProjectDescription(projects[0], des);
+		buildProjects(projects, makefiles);
+		
+		des = mngr.getProjectDescription(projects[0]);
+		cfgDes = des.getConfigurationByName("dbg 3");
+		IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(cfgDes);
+		
+		ICFolderDescription foDes = cfgDes.getRootFolderDescription();
+		ICLanguageSetting ls = foDes.getLanguageSettingForFile("foo.cpp");
+		IFolderInfo foInfo = cfg.getRootFolderInfo();
+		Tool tool = (Tool)foInfo.getToolFromInputExtension("cpp");
+		IOption option = ((Tool)tool).getOptionsOfType(IOption.INCLUDE_PATH)[0];
+		OptionStringValue[] value = option.getBasicStringListValueElements();
+		ICLanguageSettingEntry[] entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		ICLanguageSettingEntry[] expectedEntries = new ICLanguageSettingEntry[] {
+				new CIncludePathEntry("dbg 3/rel/path", 0),
+				new CIncludePathEntry("proj/rel/path", 0),
+				new CIncludePathEntry("/abs/path", 0),
+				new CIncludePathEntry("c:/abs/path", 0),
+				new CIncludePathEntry("/test_40/dir1/dir2/dir3", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/),
+				new CIncludePathEntry("/test_40", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/),
+				new CIncludePathEntry("D:\\docs\\incs", 0),
+		};
+		
+		assertTrue(Arrays.equals(entries, expectedEntries));
+		
+		ls.setSettingEntries(ICSettingEntry.INCLUDE_PATH, entries);
+		
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		assertTrue(Arrays.equals(entries, expectedEntries));
+
+		option = tool.getOptionsOfType(IOption.INCLUDE_PATH)[0];
+		OptionStringValue[] modifiedValue = option.getBasicStringListValueElements();
+		assertTrue(Arrays.equals(modifiedValue, value));
+		
+
+		List list = new ArrayList();
+		list.addAll(Arrays.asList(entries));
+		list.add(new CIncludePathEntry("E:\\tmp\\w", 0));
+		entries = (ICLanguageSettingEntry[])list.toArray(new ICLanguageSettingEntry[0]);
+		ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, entries);
+		expectedEntries = entries;
+		entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+		assertTrue(Arrays.equals(entries, expectedEntries));
+		
+		list = new ArrayList();
+		list.addAll(Arrays.asList(value));
+		list.add(new OptionStringValue("\"E:\\tmp\\w\""));
+		value = (OptionStringValue[])list.toArray(new OptionStringValue[0]);
+
+		option = tool.getOptionsOfType(IOption.INCLUDE_PATH)[0];
+		modifiedValue = option.getBasicStringListValueElements();
+		
+		assertTrue(Arrays.equals(value, modifiedValue));
+		
+		foDes = (ICFolderDescription)cfgDes.getResourceDescription(new Path("d1/d2"), true);
+		foInfo = (IFolderInfo)cfg.getResourceInfo(new Path("d1/d2"), true);
+		
+		ls = foDes.getLanguageSettingForFile("foo.cpp");
+		tool = (Tool)foInfo.getToolFromInputExtension("cpp");
+		option = tool.getOptionsOfType(IOption.INCLUDE_PATH)[0];
+		
+		expectedEntries = new ICLanguageSettingEntry[] {
+				new CIncludePathEntry("dbg 3/d2_rel/path", 0),
+				new CIncludePathEntry("d2_proj/rel/path", 0),
+				new CIncludePathEntry("/d2_abs/path", 0),
+				new CIncludePathEntry("c:/d2_abs/path", 0),
+				new CIncludePathEntry("dbg 3/d1_rel/path", 0),
+				new CIncludePathEntry("d1_proj/rel/path", 0),
+				new CIncludePathEntry("/d1_abs/path", 0),
+				new CIncludePathEntry("c:/d1_abs/path", 0),
+				new CIncludePathEntry("dbg 3/rel/path", 0),
+				new CIncludePathEntry("proj/rel/path", 0),
+				new CIncludePathEntry("/abs/path", 0),
+				new CIncludePathEntry("c:/abs/path", 0),
+				new CIncludePathEntry("/test_40/dir1/dir2/dir3", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/),
+				new CIncludePathEntry("/test_40", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/),
+				new CIncludePathEntry("D:\\docs\\incs", 0),
+				new CIncludePathEntry("E:\\tmp\\w", 0),
+				new CIncludePathEntry("D:\\d1_docs\\incs", 0),
+				new CIncludePathEntry("D:\\d2_docs\\incs", 0),
+		};
+		
+		entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+		
+		BuildSystemTestHelper.checkDiff(expectedEntries, entries);
+		
+		OptionStringValue[] expectedValue = new OptionStringValue[] {
+				new OptionStringValue("d2_rel/path"),
+				new OptionStringValue("../d2_proj/rel/path"),
+				new OptionStringValue("/d2_abs/path"),
+				new OptionStringValue("c:/d2_abs/path"),
+				new OptionStringValue("${IncludeDefaults}"),
+				new OptionStringValue("\"D:\\d2_docs\\incs\""),
+		};
+		
+		value = option.getBasicStringListValueElements();
+		BuildSystemTestHelper.checkDiff(expectedValue, value);
+		
+		ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, entries);
+		value = option.getBasicStringListValueElements();
+		entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+		BuildSystemTestHelper.checkDiff(expectedValue, value);
+		BuildSystemTestHelper.checkDiff(expectedEntries, entries);
+		
+		list = new ArrayList(Arrays.asList(entries));
+		list.remove(6); //new CIncludePathEntry("/d1_abs/path", 0),
+		expectedEntries = (ICLanguageSettingEntry[])list.toArray(new ICLanguageSettingEntry[0]);
+		ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, list);
+		
+		option = tool.getOptionsOfType(IOption.INCLUDE_PATH)[0];
+		
+		expectedValue = new OptionStringValue[] {
+				new OptionStringValue("d2_rel/path"),
+				new OptionStringValue("../d2_proj/rel/path"),
+				new OptionStringValue("/d2_abs/path"),
+				new OptionStringValue("c:/d2_abs/path"),
+				new OptionStringValue("d1_rel/path"),
+				new OptionStringValue("../d1_proj/rel/path"),
+//removed				new OptionStringValue("/d1_abs/path"),
+				new OptionStringValue("c:/d1_abs/path"),
+				new OptionStringValue("rel/path"),
+				new OptionStringValue("../proj/rel/path"),
+				new OptionStringValue("/abs/path"),
+				new OptionStringValue("c:/abs/path"),
+				new OptionStringValue("\"${workspace_loc:/test_40/dir1/dir2/dir3}\""),
+				new OptionStringValue("\"${workspace_loc:/test_40}\""),
+				new OptionStringValue("\"D:\\docs\\incs\""),
+				new OptionStringValue("\"E:\\tmp\\w\""),
+				new OptionStringValue("\"D:\\d1_docs\\incs\""),
+				new OptionStringValue("\"D:\\d2_docs\\incs\""),
+		};
+		
+		value = option.getBasicStringListValueElements();
+		BuildSystemTestHelper.checkDiff(expectedValue, value);
+		
+		entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+		BuildSystemTestHelper.checkDiff(expectedEntries, entries);
+
+		foDes = cfgDes.getRootFolderDescription();
+		foInfo = cfg.getRootFolderInfo();
+		ls = foDes.getLanguageSettingForFile("foo.cpp");
+		tool = (Tool)foInfo.getToolFromInputExtension("cpp");
+		option = tool.getOptionsOfType(IOption.INCLUDE_PATH)[0];
+		
+		list = new ArrayList(Arrays.asList(option.getBasicStringListValueElements()));
+		assertTrue(list.remove(new OptionStringValue("${IncludeDefaults}")));
+		list.add(0, new OptionStringValue("${IncludeDefaults}"));
+		expectedValue = (OptionStringValue[])list.toArray(new OptionStringValue[0]);
+		option = foInfo.setOption(tool, option, (OptionStringValue[])list.toArray(new OptionStringValue[0]));
+		value = option.getBasicStringListValueElements();
+		
+		expectedEntries = new ICLanguageSettingEntry[] {
+				new CIncludePathEntry("dbg 3/rel/path", 0),
+				new CIncludePathEntry("proj/rel/path", 0),
+				new CIncludePathEntry("/abs/path", 0),
+				new CIncludePathEntry("c:/abs/path", 0),
+				new CIncludePathEntry("/test_40/dir1/dir2/dir3", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/),
+				new CIncludePathEntry("/test_40", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/),
+				new CIncludePathEntry("D:\\docs\\incs", 0),
+				new CIncludePathEntry("E:\\tmp\\w", 0),
+		};
+		
+		entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+		
+		BuildSystemTestHelper.checkDiff(expectedValue, value);
+		BuildSystemTestHelper.checkDiff(expectedEntries, entries);
+		
+		ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, entries);
+		
+		assertTrue(option == tool.getOptionsOfType(IOption.INCLUDE_PATH)[0]);
+		value = option.getBasicStringListValueElements();
+		
+		entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+
+		BuildSystemTestHelper.checkDiff(expectedValue, value);
+		BuildSystemTestHelper.checkDiff(expectedEntries, entries);
+		
+	
+		list = new ArrayList(Arrays.asList(option.getBasicStringListValueElements()));
+		assertTrue(list.remove(new OptionStringValue("${IncludeDefaults}")));
+		list.add(list.size(), new OptionStringValue("${IncludeDefaults}"));
+		expectedValue = (OptionStringValue[])list.toArray(new OptionStringValue[0]);
+		option = foInfo.setOption(tool, option, (OptionStringValue[])list.toArray(new OptionStringValue[0]));
+		value = option.getBasicStringListValueElements();
+		
+		expectedEntries = new ICLanguageSettingEntry[] {
+				new CIncludePathEntry("dbg 3/rel/path", 0),
+				new CIncludePathEntry("proj/rel/path", 0),
+				new CIncludePathEntry("/abs/path", 0),
+				new CIncludePathEntry("c:/abs/path", 0),
+				new CIncludePathEntry("/test_40/dir1/dir2/dir3", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/),
+				new CIncludePathEntry("/test_40", ICSettingEntry.VALUE_WORKSPACE_PATH/* | ICSettingEntry.RESOLVED*/),
+				new CIncludePathEntry("D:\\docs\\incs", 0),
+				new CIncludePathEntry("E:\\tmp\\w", 0),
+		};
+		
+		entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+		
+		BuildSystemTestHelper.checkDiff(expectedValue, value);
+		BuildSystemTestHelper.checkDiff(expectedEntries, entries);
+		
+		ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, entries);
+		
+		assertTrue(option == tool.getOptionsOfType(IOption.INCLUDE_PATH)[0]);
+		value = option.getBasicStringListValueElements();
+		
+		entries = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+
+		BuildSystemTestHelper.checkDiff(expectedValue, value);
+		BuildSystemTestHelper.checkDiff(expectedEntries, entries);
+
+		
+		//deletion is performed in case if no fail occured
+		for(int i = 0; i < projects.length; i++){
+			projects[i].delete(true, null);
+			assertNull(mngr.getProjectDescription(projects[i]));
+			assertNull(mngr.getProjectDescription(projects[i], false));
+			
+			assertNull(ManagedBuildManager.getBuildInfo(projects[i]));
+		}
+	}
+	
+	public void test40_pathconverter() throws Exception {
+		IProject[] projects = createProjects("test_40_pathconverter", null, null, true);
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		
+		ICProjectDescription des = mngr.getProjectDescription(projects[0]);
+		ICConfigurationDescription cfgDes = des.getConfigurationByName("Test 4.0 ConfigName.Dbg");
+		IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(cfgDes);
+		
+		ICFolderDescription foDes = cfgDes.getRootFolderDescription();
+		ICLanguageSetting ls = foDes.getLanguageSettingForFile("foo.cpp");
+		IFolderInfo foInfo = cfg.getRootFolderInfo();
+		Tool tool = (Tool)foInfo.getToolFromInputExtension("cpp");
+		IOption option = ((Tool)tool).getOptionsOfType(IOption.INCLUDE_PATH)[0];
+		OptionStringValue[] value = option.getBasicStringListValueElements();
+		ICLanguageSettingEntry[] entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		
+		OptionStringValue[] expectedValue = new OptionStringValue[] {
+				new OptionStringValue("../rel"),
+				new OptionStringValue("/abs"),
+		};
+		
+		ICLanguageSettingEntry[] expectedEntries = new ICLanguageSettingEntry[] {
+				new CIncludePathEntry("rel", 0),
+				new CIncludePathEntry("/test/abs", 0),
+		};
+		
+		BuildSystemTestHelper.checkDiff(expectedValue, value);
+		BuildSystemTestHelper.checkDiff(expectedEntries, entries);
+		
+		ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, entries);
+		assertTrue(option == ((Tool)tool).getOptionsOfType(IOption.INCLUDE_PATH)[0]);
+		value = option.getBasicStringListValueElements();
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		
+		BuildSystemTestHelper.checkDiff(expectedValue, value);
+		BuildSystemTestHelper.checkDiff(expectedEntries, entries);
+		
+		ArrayList list = new ArrayList();
+		list.addAll(Arrays.asList(entries));
+		list.add(new CIncludePathEntry("/test/another/abs", 0));
+		expectedEntries = (ICLanguageSettingEntry[])list.toArray(new ICLanguageSettingEntry[0]);
+		
+		expectedValue = new OptionStringValue[] {
+				new OptionStringValue("../rel"),
+				new OptionStringValue("/abs"),
+				new OptionStringValue("/another/abs"),
+		};
+		
+		ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, list);
+		
+		assertTrue(option == ((Tool)tool).getOptionsOfType(IOption.INCLUDE_PATH)[0]);
+		
+		value = option.getBasicStringListValueElements();
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		
+		BuildSystemTestHelper.checkDiff(expectedValue, value);
+		BuildSystemTestHelper.checkDiff(expectedEntries, entries);
+
+		
+		//testing one-way converter
+		ls = foDes.getLanguageSettingForFile("foo.c");
+		tool = (Tool)foInfo.getToolFromInputExtension("c");
+		option = ((Tool)tool).getOptionsOfType(IOption.INCLUDE_PATH)[0];
+		value = option.getBasicStringListValueElements();
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		
+		expectedValue = new OptionStringValue[] {
+				new OptionStringValue("../rel"),
+				new OptionStringValue("/abs"),
+		};
+		
+		expectedEntries = new ICLanguageSettingEntry[] {
+				new CIncludePathEntry("rel", 0),
+				new CIncludePathEntry("/test/abs", 0),
+		};
+		
+		BuildSystemTestHelper.checkDiff(expectedValue, value);
+		BuildSystemTestHelper.checkDiff(expectedEntries, entries);
+		
+		ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, entries);
+		assertTrue(option == ((Tool)tool).getOptionsOfType(IOption.INCLUDE_PATH)[0]);
+		value = option.getBasicStringListValueElements();
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		
+		BuildSystemTestHelper.checkDiff(expectedValue, value);
+		BuildSystemTestHelper.checkDiff(expectedEntries, entries);
+		
+		list = new ArrayList();
+		list.addAll(Arrays.asList(entries));
+		list.add(new CIncludePathEntry("/another/abs", 0));
+
+		expectedEntries = new ICLanguageSettingEntry[] {
+				new CIncludePathEntry("rel", 0),
+				new CIncludePathEntry("/test/abs", 0),
+				new CIncludePathEntry("/test/another/abs", 0),
+		};
+		
+		expectedValue = new OptionStringValue[] {
+				new OptionStringValue("../rel"),
+				new OptionStringValue("/abs"),
+				new OptionStringValue("/another/abs"),
+		};
+		
+		ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, list);
+		
+		assertTrue(option == ((Tool)tool).getOptionsOfType(IOption.INCLUDE_PATH)[0]);
+		
+		value = option.getBasicStringListValueElements();
+		entries = ls.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		
+		BuildSystemTestHelper.checkDiff(expectedValue, value);
+		BuildSystemTestHelper.checkDiff(expectedEntries, entries);
+		
+		//deletion is performed in case if no fail occured
+		for(int i = 0; i < projects.length; i++){
+			projects[i].delete(true, null);
+			assertNull(mngr.getProjectDescription(projects[i]));
+			assertNull(mngr.getProjectDescription(projects[i], false));
+			
+			assertNull(ManagedBuildManager.getBuildInfo(projects[i]));
+		}
+	}
+	
+	
+//	public void test40_2() throws Exception{
+//		doTest("test_40", "Test 4.0 ConfigName.Dbg");
+//	}
+
+	private void doTest(String projName, String cfgName) throws Exception{
+		String[] makefiles = {
+				 "makefile", 
+				 "objects.mk", 
+				 "sources.mk", 
+				 "subdir.mk"};
+		IProject[] projects = createProjects(projName, null, null, true);
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		ICProjectDescription d = mngr.getProjectDescription(projects[0]);
+		ICConfigurationDescription cfg = d.getConfigurationByName(cfgName);
+		assertNotNull(cfg);
+		d.setActiveConfiguration(cfg);
+		mngr.setProjectDescription(projects[0], d);
+		buildProjects(projects, makefiles);
+	}
+	
+	private void buildProjects(IProject projects[], String[] files) {
+		buildProjectsWorker(projects, files, true);
+	}
+	
+	private void buildProjectsWorker(IProject projects[], String[] files, boolean compareBenchmark) {	
+		if(projects == null || projects.length == 0)
+			return;
+				
+		boolean succeeded = true;
+		for (int i = 0; i < projects.length; i++){
+			IProject curProject = projects[i];
+			
+			IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(curProject);
+			
+			//check whether the managed build info is converted
+			boolean isCompatible = true;//UpdateManagedProjectManager.isCompatibleProject(info);
+			//assertTrue(isCompatible);
+			
+			if (isCompatible){
+				// Build the project in order to generate the makefiles 
+				try{
+					curProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD,null);
+				}
+				catch(CoreException e){
+					fail(e.getStatus().getMessage());
+				}
+				catch(OperationCanceledException e){
+					fail("the project \"" + curProject.getName() + "\" build was cancelled, exception message: " + e.getMessage());
+				}
+				
+				//compare the generated makefiles to their benchmarks
+				if (files != null && files.length > 0) {
+					if (i == 0) {
+						String configName = info.getDefaultConfiguration().getName();
+						IPath buildDir = Path.fromOSString(configName);
+						if (compareBenchmark){
+						    succeeded = ManagedBuildTestHelper.compareBenchmarks(curProject, buildDir, files);
+						} 
+//						else
+//							succeeded = ManagedBuildTestHelper.verifyFilesDoNotExist(curProject, buildDir, files);
+					}
+				}
+			}
+		}
+		
+//		if (succeeded) {	//  Otherwise leave the projects around for comparison
+//			for (int i = 0; i < projects.length; i++)
+//				ManagedBuildTestHelper.removeProject(projects[i].getName());
+//		}
+	}
+	
+	private IProject[] createProjects(String projName, IPath location, String projectTypeId, boolean containsZip) {
+		
+		//  In case the projects need to be updated...
+		IOverwriteQuery queryALL = new IOverwriteQuery(){
+			public String queryOverwrite(String file) {
+				return ALL;
+			}};
+		IOverwriteQuery queryNOALL = new IOverwriteQuery(){
+			public String queryOverwrite(String file) {
+				return NO_ALL;
+			}};
+		
+//		UpdateManagedProjectManager.setBackupFileOverwriteQuery(queryALL);
+//		UpdateManagedProjectManager.setUpdateProjectQuery(queryALL);
+		
+		IProject projects[] = createProject(projName, location, projectTypeId, containsZip);
+		return projects;
+	}
+
+	private IProject[] createProject(String projName, IPath location, String projectTypeId, boolean containsZip){
+		ArrayList projectList = null;
+		if (containsZip) {
+			File testDir = CTestPlugin.getFileInPlugin(new Path("resources/test40Projects/" + projName));
+			if(testDir == null) {
+				fail("Test project directory " + projName + " is missing.");
+				return null;
+			}
+
+			File projectZips[] = testDir.listFiles(new FileFilter(){
+				public boolean accept(File pathname){
+					if(pathname.isDirectory())
+						return false;
+					return true;
+				}
+			});
+			
+			projectList = new ArrayList(projectZips.length);
+			for(int i = 0; i < projectZips.length; i++){
+				try{
+					String projectName = projectZips[i].getName();
+					if(!projectName.endsWith(".zip"))
+						continue;
+					
+					projectName = projectName.substring(0,projectName.length()-".zip".length());
+					if(projectName.length() == 0)
+						continue;
+					IProject project = ManagedBuildTestHelper.createProject(projectName, projectZips[i], location, projectTypeId);
+					if(project != null)
+						projectList.add(project);
+				}
+				catch(Exception e){
+				}
+			}
+			if(projectList.size() == 0) {
+				fail("No projects found in test project directory " + testDir.getName() + ".  The .zip file may be missing or corrupt.");
+				return null;
+			}
+		} else {
+			try{
+				IProject project = ManagedBuildTestHelper.createProject(projName, null, location, projectTypeId);
+				if(project != null)
+					projectList = new ArrayList(1);
+					projectList.add(project);
+			} catch(Exception e){}
+		}
+		
+		return (IProject[])projectList.toArray(new IProject[projectList.size()]);
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/CmdLineApplicabilityCalculator.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/CmdLineApplicabilityCalculator.java
new file mode 100644
index 0000000..94cfc30
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/CmdLineApplicabilityCalculator.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Inc. and others.
+ * 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
+ * 
+ * Contributors:
+ *     Texas Instruments Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IOptionApplicability;
+
+/**
+ * 
+ */
+public class CmdLineApplicabilityCalculator implements IOptionApplicability {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionUsedInCommandLine()
+	 */
+	public boolean isOptionUsedInCommandLine(
+			IBuildObject config,
+			IHoldsOptions holder,
+			IOption option) {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionVisible()
+	 */
+	public boolean isOptionVisible(
+			IBuildObject config,
+			IHoldsOptions holder,
+			IOption option) {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionEnabled()
+	 */
+	public boolean isOptionEnabled(
+			IBuildObject config,
+			IHoldsOptions holder,
+			IOption option) {
+		return false;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/DefaultFortranDependencyCalculator.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/DefaultFortranDependencyCalculator.java
new file mode 100644
index 0000000..4d2c5b2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/DefaultFortranDependencyCalculator.java
@@ -0,0 +1,273 @@
+/*******************************************************************************
+ *  Copyright (c) 2004, 2008 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *  IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.io.*;
+import java.lang.String;
+import java.util.ArrayList;
+
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedOutputNameProvider;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGenerator;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+/**
+ *  This class implements the Dependency Manager and Output Name Provider interfaces
+ *  for a very "quick & dirty" ifort tool-chain on Win32
+ */
+public class DefaultFortranDependencyCalculator implements IManagedDependencyGenerator,
+														   IManagedOutputNameProvider
+{
+	public static final String MODULE_EXTENSION = "mod";	//$NON-NLS-1$
+	
+	/*
+	 * Return a list of the names of all modules used by a file
+	 */
+	private String[] findUsedModuleNames(File file) {
+		ArrayList names = new ArrayList();
+		InputStream in = null;
+		try {
+			in = new BufferedInputStream(new FileInputStream(file));
+			Reader r = new BufferedReader(new InputStreamReader(in));
+			StreamTokenizer st = new StreamTokenizer(r);
+			st.commentChar('!');
+			st.eolIsSignificant(false);
+			st.slashSlashComments(false);
+			st.slashStarComments(false);
+			st.wordChars('_', '_');
+			
+			while (st.nextToken() != StreamTokenizer.TT_EOF) {
+				if (st.ttype == StreamTokenizer.TT_WORD) {
+					if (st.sval.equalsIgnoreCase("use")) {
+						st.nextToken();
+						if (st.ttype == StreamTokenizer.TT_WORD) {
+							names.add(st.sval);
+						} else {
+							st.pushBack();
+						}
+					}
+				}
+			}
+		} catch (Exception e) {
+			return new String[0];
+		} finally {
+			// ensure the input stream is closed or we can run out of fd's...
+			if (in != null)
+				try {
+					in.close();
+				} catch (IOException e) {/*don't care */}
+		}
+		return (String[]) names.toArray(new String[names.size()]);
+	}
+	
+	/*
+	 * Return a list of the names of all modules defined in a file
+	 */
+	private String[] findModuleNames(File file) {
+		ArrayList names = new ArrayList();
+		InputStream in = null;
+		try {
+			in = new BufferedInputStream(new FileInputStream(file));
+			Reader r = new BufferedReader(new InputStreamReader(in));
+			StreamTokenizer st = new StreamTokenizer(r);
+			st.commentChar('!');
+			st.eolIsSignificant(false);
+			st.slashSlashComments(false);
+			st.slashStarComments(false);
+			st.wordChars('_', '_');
+			
+			while (st.nextToken() != StreamTokenizer.TT_EOF) {
+				if (st.ttype == StreamTokenizer.TT_WORD) {
+					if (st.sval.equalsIgnoreCase("module")) {
+						st.nextToken();
+						if (st.ttype == StreamTokenizer.TT_WORD) {
+							names.add(st.sval);
+						} else {
+							st.pushBack();
+						}
+					}
+				}
+			}
+		} catch (Exception e) {
+			return new String[0];
+		} finally {
+			// ensure the input stream is closed or we run out of fd's...
+			if (in != null)
+				try {
+					in.close();
+				} catch (IOException e) {/*don't care */}
+		}
+		return (String[]) names.toArray(new String[names.size()]);
+	}
+
+	/*
+	 * Returns true if the resource is a Fortran source file
+	 */
+	private boolean isFortranFile(ITool tool, IResource resource) {
+		// TODO:  Get the file extensions from the tool's primary input type
+		String ext = resource.getFileExtension();
+		if (ext != null) {
+			if (ext.equalsIgnoreCase("f")) return true;
+			if (ext.equalsIgnoreCase("for")) return true;
+			if (ext.equalsIgnoreCase("f90")) return true;
+		}
+		return false;
+	}
+	
+	/*
+	 * Given a set of the module names used by a source file, and a set of resources to search, determine
+	 * if any of the source files implements the module names.
+	 */
+	private IResource[] FindModulesInResources(IProject project, ITool tool, IResource resource, IResource[] resourcesToSearch, 
+							String topBuildDir, String[] usedNames) {
+		ArrayList modRes = new ArrayList();
+		for (int ir = 0; ir < resourcesToSearch.length; ir++) {
+			if (resourcesToSearch[ir].equals(resource)) continue;
+			if (resourcesToSearch[ir].getType() == IResource.FILE) {
+				File projectFile = resourcesToSearch[ir].getLocation().toFile();
+				if (!isFortranFile(tool, resourcesToSearch[ir])) continue;
+				String[] modules = findModuleNames(projectFile);
+				if (modules != null) {
+					for (int iu = 0; iu < usedNames.length; iu++) {
+						boolean foundDependency = false;
+						for (int im = 0; im < modules.length; im++) {
+							if (usedNames[iu].equalsIgnoreCase(modules[im])) {
+								//  Get the path to the module file that will be created by the build.  By default, ifort appears
+								//  to generate .mod files in the directory from which the compiler is run.  For MBS, this
+								//  is the top-level build directory.  
+								//  TODO: Support the /module:path option and use that in determining the path of the module file 
+								IPath modName = Path.fromOSString(topBuildDir + Path.SEPARATOR + modules[im] + "." + MODULE_EXTENSION);
+								modRes.add(project.getFile(modName));
+								modRes.add(resourcesToSearch[ir]);
+								foundDependency = true;
+								break;
+							}
+						}
+						if (foundDependency) break;
+					}
+				}
+			} else if (resourcesToSearch[ir].getType() == IResource.FOLDER) {
+				try {
+					IResource[] modFound = FindModulesInResources(project, tool, resource, ((IFolder)resourcesToSearch[ir]).members(), 
+							topBuildDir, usedNames);
+					if (modFound != null) {
+						for (int i=0; i<modFound.length; i++) {
+							modRes.add(modFound[i]);
+						}
+					}
+				} catch(Exception e) {}
+			}
+		}		
+		return (IResource[]) modRes.toArray(new IResource[modRes.size()]);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderDependencyCalculator#findDependencies(org.eclipse.core.resources.IResource)
+	 */
+	public IResource[] findDependencies(IResource resource, IProject project) {
+		ArrayList dependencies = new ArrayList();
+
+		//  TODO:  This method should be passed the ITool and the relative path of the top build directory
+		//         For now we'll figure this out from the project.
+		IManagedBuildInfo mngInfo = ManagedBuildManager.getBuildInfo(project);
+		IConfiguration config = mngInfo.getDefaultConfiguration();
+		ITool tool = null;
+		ITool[] tools = config.getTools();
+		for (int i=0; i<tools.length; i++) {
+			if (tools[i].getName().equals("Fortran (ifort) Compiler for Win32")) {
+				tool = tools[i];
+				break;
+			}
+		}
+		
+		File file = resource.getLocation().toFile();
+		try {
+			if (!isFortranFile(tool, resource)) return null;
+	
+			//  Get the names of the modules USE'd by the source file
+			String[] usedNames = findUsedModuleNames(file);
+			if (usedNames.length == 0) return null;
+			
+			//  Search the project files for a Fortran source that creates the module.  If we find one, then compiling this
+			//  source file is dependent upon first compiling the found source file.
+			IResource[] resources = project.members();	
+			IResource[] modRes = FindModulesInResources(project, tool, resource, resources, config.getName(), usedNames);
+			if (modRes != null) {
+				for (int i=0; i<modRes.length; i++) {
+					dependencies.add(modRes[i]);
+				}
+			}
+		}
+		catch (Exception e)
+		{
+			return null;
+		}
+		
+		return (IResource[]) dependencies.toArray(new IResource[dependencies.size()]);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderDependencyCalculator#getCalculatorType()
+	 */
+	public int getCalculatorType() {
+		return TYPE_EXTERNAL;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderDependencyCalculator#getDependencyCommand()
+	 */
+	public String getDependencyCommand(IResource resource, IManagedBuildInfo info) {
+		/* 
+		 * The type of this IManagedDependencyGenerator is TYPE_EXTERNAL,
+		 * so implement findDependencies() rather than getDependencyCommand().
+		 * */
+		return null;
+	}
+
+	/*
+	 *  (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedOutputNameProvider#getOutputNames(org.eclipse.cdt.managedbuilder.core.ITool, org.eclipse.core.runtime.IPath[])
+	 */
+	public IPath[] getOutputNames(ITool tool, IPath[] primaryInputNames) {
+		//  TODO:  This method should be passed the relative path of the top build directory?
+		ArrayList outs = new ArrayList();
+		if (primaryInputNames.length > 0) {
+			// Get the names of modules created by this source file
+			String[] modules = findModuleNames(primaryInputNames[0].toFile());
+			// Add any generated modules
+			if (modules != null) {
+				for (int i = 0; i < modules.length; i++) {
+					//  Return the path to the module file that will be created by the build.  By default, ifort appears
+					//  to generate .mod files in the directory from which the compiler is run.  For MBS, this
+					//  is the top-level build directory.  
+					//  TODO: Support the /module:path option and use that in determining the path of the module file
+					//  TODO: The nameProvider documentation should note that the returned path is relative to the top-level 
+					//        build directory.  HOWEVER, if only a file name is returned, MBS will automatically add on the
+					//        directory path relative to the top-level build directory.  The relative path comes from the source
+					//        file location.  In order to specify that this output file is always in the top-level build 
+					//        directory, regardless of the source file directory structure, return "./path".
+					IPath modName = new Path("./").append(Path.fromOSString(modules[i] + "." + MODULE_EXTENSION));
+					
+					outs.add(modName);				
+				}
+			}
+		}
+		return (IPath[]) outs.toArray(new IPath[outs.size()]);
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCommandLineGenerator.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCommandLineGenerator.java
new file mode 100644
index 0000000..b78f725
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCommandLineGenerator.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineGenerator;
+import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+
+/**
+ *  Test command line generator
+ */
+public class ManagedBuildCommandLineGenerator implements
+		IManagedCommandLineGenerator {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedCommandLineGenerator#generateCommandLineInfo(org.eclipse.cdt.managedbuilder.core.ITool, java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String[], java.lang.String)
+	 */
+	public IManagedCommandLineInfo generateCommandLineInfo(ITool tool,
+			String commandName, String[] flags, String outputFlag,
+			String outputPrefix, String outputName, String[] inputResources,
+			String commandLinePattern) {
+		ManagedBuildCommandLineInfo info = new ManagedBuildCommandLineInfo();
+		//  Concatenate the tool name and the passed in command name
+		info.commandName = new String(tool.getName() + commandName);
+		//  Put out the flags backwards
+		String myflags = new String();
+		for (int i = flags.length - 1; i >= 0; i--) {
+			if (i < flags.length - 1) myflags += " ";
+			myflags += flags[i];
+		}
+		info.commandFlags = myflags;
+		//  Alphabetize the inputs and add foo.cpp
+		String[] inputs = new String[inputResources.length + 1];
+		String myinputs = new String();
+		for (int i=0; i<inputResources.length; i++) {
+			inputs[i] = inputResources[i];
+		}
+		inputs[inputResources.length] = "foo.cpp";
+		//  Sort
+		for (int i = 0; i < inputs.length; i++) {
+			for (int j = 1; j < inputs.length; j++) {
+				if (inputs[j].compareTo(inputs[j-1]) < 0) {
+					String temp = inputs[j-1];
+					inputs[j-1] = inputs[j];
+					inputs[j] = temp;
+				}
+			}
+		}
+		for (int i = 0; i < inputs.length; i++) {
+			if (i > 0) myinputs += " ";
+			myinputs += inputs[i];
+		}
+		info.commandInputs = myinputs;
+		// Don't change the command line pattern
+		info.commandLinePattern = new String(commandLinePattern);
+		// Config artifact name
+		info.commandOutput = new String(((IToolChain)tool.getParent()).getParent().getArtifactName());
+		// -Oh
+		info.commandOutputFlag = new String("-0h");
+		// ""
+		info.commandOutputPrefix = new String("");
+		// "This is a test command line"
+		info.commandLine = new String("This is a test command line");
+		return info;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCommandLineInfo.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCommandLineInfo.java
new file mode 100644
index 0000000..3a05554
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCommandLineInfo.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo;
+
+/**
+ *  Command line info for use with ManagedBuildCommandLineGenerator
+ */
+public class ManagedBuildCommandLineInfo implements IManagedCommandLineInfo {
+	public String commandLine;
+	public String commandLinePattern;
+	public String commandName;
+	public String commandFlags;
+	public String commandInputs;
+	public String commandOutput;
+	public String commandOutputFlag;
+	public String commandOutputPrefix;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo#getCommandLine()
+	 */
+	public String getCommandLine() {
+		return commandLine;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo#getCommandLinePattern()
+	 */
+	public String getCommandLinePattern() {
+		return commandLinePattern;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo#getCommandName()
+	 */
+	public String getCommandName() {
+		return commandName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo#getFlags()
+	 */
+	public String getFlags() {
+		return commandFlags;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo#getInputs()
+	 */
+	public String getInputs() {
+		return commandInputs;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo#getOutput()
+	 */
+	public String getOutput() {
+		return commandOutput;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo#getOutputFlag()
+	 */
+	public String getOutputFlag() {
+		return commandOutputFlag;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo#getOutputPrefix()
+	 */
+	public String getOutputPrefix() {
+		return commandOutputPrefix;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests.java
new file mode 100644
index 0000000..736b26c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests.java
@@ -0,0 +1,612 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IBuilder;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.ITargetPlatform;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.internal.core.Builder;
+import org.eclipse.core.runtime.IConfigurationElement;
+
+
+public class ManagedBuildCoreTests extends TestCase {
+	private static final boolean boolVal = true;
+	private static IProjectType exeType;	
+	private static IProjectType libType;
+	private static IProjectType dllType;
+	
+	public ManagedBuildCoreTests(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite = new TestSuite(ManagedBuildCoreTests.class.getName());		
+		suite.addTest(new ManagedBuildCoreTests("testLoadManifest"));
+		return suite;
+	}
+
+	/**
+	 * Navigates through a CDT 2.1 manifest file and verifies that the
+	 * definitions are loaded correctly. 
+	 */
+	public void testLoadManifest() throws Exception {
+		IProjectType[] projTypes = ManagedBuildManager.getDefinedProjectTypes();
+		exeType = ManagedBuildManager.getProjectType("cdt.managedbuild.target.testgnu21.exe");
+		checkExeProjectType(exeType);				
+		dllType = ManagedBuildManager.getProjectType("cdt.managedbuild.target.testgnu21.so");
+		checkSoProjectType(dllType);	
+		libType = ManagedBuildManager.getProjectType("cdt.managedbuild.target.testgnu21.lib");
+		checkLibProjectType(libType);	
+	}
+		
+	
+	/*
+	 * Do a sanity check on the testgnu exe project type.
+	 */
+	private void checkExeProjectType(IProjectType ptype) throws BuildException {		
+		int i;
+		int expecectedNumConfigs = 2;				
+		String[] expectedConfigName = {"Dbg", "Rel"};
+		String expectedCleanCmd = "rm -rf";
+		String expectedParserId = "org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser";		
+		String expectedOSList = "solaris,linux,hpux,aix,qnx";
+		int expectedSizeOSList = 5;
+		String[] expectedArchList = {"all"};
+		String expectedBinaryParser = "org.eclipse.cdt.core.ELF";
+		String expectedBinaryParser2 = "org.eclipse.cdt.core.PE";
+		String[] expectedPlatformName = {"Dbg Platform",
+				                         "Rel Platform"};
+		String expectedCommand = "make";
+		String expectedArguments = "-k";
+		String[] expectedBuilderName = {"Dbg Builder",
+				                        "Rel Builder"};
+		String expectedBuilderInfo = "org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator";
+	    String[] expectedToolId1 = {"cdt.managedbuild.tool.testgnu.c.compiler.exe.debug",
+                                    "cdt.managedbuild.tool.testgnu.c.compiler.exe.release"};		     
+        String expectedSuperToolId1 = "cdt.managedbuild.tool.testgnu.c.compiler";		    
+        String expectedSuperOutputFlag1 = "-o";
+        String expectedSuperGetToolCommand1 = "gcc";
+        String[] expectedSuperInputExt1 = {"c"};
+	    String[] expectedSuperToolInterfaceExt1 = {"h"};
+	    String[] expectedSuperToolOutputExt1 = {"o"};
+	    String expectedOptionCategory1 = "testgnu.c.compiler.category.preprocessor";        
+	    String[] OptionId1 = {"testgnu.c.compiler.exe.debug.option.optimization.level",
+                              "testgnu.c.compiler.exe.release.option.optimization.level"};		    
+        String[] expectedOptionIdValue1 = {"testgnu.c.optimization.level.none",
+                                           "testgnu.c.optimization.level.most"};
+        String expectedEnumList1 = "Posix.Optimize.None, Posix.Optimize.Optimize, Posix.Optimize.More, Posix.Optimize.Most";
+        int expectedSizeEnumList1 = 4;
+        String[] expectedOptionEnumCmd1arr = {"-O0", "-O3"};        
+        String OptionId2 = "testgnu.c.compiler.option.debugging.other";
+        String expectedOptionIdName2 = "Posix.Debug.Other";        
+        String OptionId3 = "testgnu.c.compiler.option.debugging.gprof";
+        String expectedOptionIdName3 = "Posix.Debug.gprof";
+        String expectedOptionIdCmd3 = "-pg";
+        boolean expectedOptionIdValue3 = false;        
+		int expecectedNumTools = 5;
+		int numOrderCCompilerTool = 0;
+		int expecectedCNature = ITool.FILTER_C;
+		int expecectedCCNature = ITool.FILTER_CC;
+				
+		// Check project attributes
+		//
+		assertNotNull(ptype);		
+		assertTrue(ptype.isTestProjectType());
+		assertFalse(ptype.isAbstract());
+		
+		// Check project configurations
+		//
+		IConfiguration[] configs = ptype.getConfigurations();
+		assertNotNull(configs);
+		assertEquals(expecectedNumConfigs, configs.length);
+		
+		// Loop over configurations
+		//
+		for (int iconfig=0; iconfig < configs.length; iconfig++) {
+			
+			 // Verify configuration attributes
+			 //
+		     assertEquals(configs[iconfig].getName(), (expectedConfigName[iconfig]));		     
+		     assertEquals(expectedCleanCmd, configs[iconfig].getCleanCommand());
+		     assertEquals(expectedParserId, configs[iconfig].getErrorParserIds());
+		     
+		     // Fetch toolchain
+		     //
+		     IToolChain toolChain = configs[iconfig].getToolChain();
+			 
+			 // Fetch and check platform
+			 //		     		     
+		     ITargetPlatform platform = toolChain.getTargetPlatform();
+		     		     				
+			 List expectedOSListarr = new ArrayList();
+			 String[] expectedOSListTokens = expectedOSList.split(","); //$NON-NLS-1$
+			 for (i = 0; i < expectedOSListTokens.length; ++i) {
+				 expectedOSListarr.add(expectedOSListTokens[i].trim());
+			 }
+		     assertTrue(Arrays.equals(platform.getOSList(), (String[]) expectedOSListarr.toArray(new String[expectedSizeOSList])));
+		     assertTrue(Arrays.equals(platform.getArchList(), expectedArchList));
+			 String[] binaryParsers = platform.getBinaryParserList();
+			 assertEquals(binaryParsers.length, 2);
+		     assertEquals(binaryParsers[0], expectedBinaryParser);
+		     assertEquals(binaryParsers[1], expectedBinaryParser2);
+			 assertEquals(platform.getName(), expectedPlatformName[iconfig]);
+			 
+			 // Fetch and check builder			 		     
+			 //
+		     IBuilder builder = toolChain.getBuilder();
+		     assertEquals(builder.getCommand(), expectedCommand);		     
+		     assertEquals(builder.getArguments(), expectedArguments);		  
+		     assertEquals(builder.getName(), expectedBuilderName[iconfig]);		    	     	   
+			 IConfigurationElement element = ((Builder)builder).getBuildFileGeneratorElement();
+			 if (element != null) {
+				 assertEquals(element.getAttribute(IBuilder.BUILDFILEGEN_ID), expectedBuilderInfo);						
+			 }
+		     
+		     // Fetch and check tools list
+		     //
+		     ITool[] tools = toolChain.getTools();
+		     assertEquals(tools.length, expecectedNumTools);
+		     
+		     // Fetch and check the gnu C compiler tool
+		     //
+		     ITool tool;
+		     ITool superTool;
+		     
+		     tool = tools[numOrderCCompilerTool];
+		     superTool = tool.getSuperClass();
+		     assertEquals(tool.getId(), expectedToolId1[iconfig]);		     
+		     assertEquals(superTool.getId(), expectedSuperToolId1);
+		     assertEquals(tool.getNatureFilter(), expecectedCNature);		     
+			 assertTrue(Arrays.equals(superTool.getAllInputExtensions(), expectedSuperInputExt1));			 
+		     assertEquals(superTool.getOutputFlag(), expectedSuperOutputFlag1);
+		     assertEquals(superTool.getToolCommand(), expectedSuperGetToolCommand1);
+		     assertTrue(Arrays.equals(superTool.getAllDependencyExtensions(), expectedSuperToolInterfaceExt1));
+		     assertTrue(Arrays.equals(superTool.getOutputsAttribute(), expectedSuperToolOutputExt1));
+		     
+		     assertTrue(superTool.isAbstract());
+		     
+		     // Fetch and check an option category
+		     //
+		     IOptionCategory[] optionCats = superTool.getChildCategories();
+			 assertEquals(optionCats[0].getId(), (expectedOptionCategory1));
+			 
+			 // Fetch and check options customized for this tool			    
+			 //		     
+		     IOption option;		     		     
+  
+		     // Fetch the optimization level option and verify that it has the proper
+		     // default value, which should overwrite the value set in the abstract
+		     // project that its containing project is derived from
+		     //
+		     option = tool.getOptionById(OptionId1[iconfig]);		     		     
+		     assertTrue(option.isExtensionElement());
+		     String optionDefaultValue = (String)option.getDefaultValue();		     
+		     assertEquals(option.getValueType(), (IOption.ENUMERATED));		     
+		     assertEquals(optionDefaultValue, (expectedOptionIdValue1[iconfig]));
+		     String optionEnumCmd1 = option.getEnumCommand(optionDefaultValue);
+		     assertEquals(optionEnumCmd1, (expectedOptionEnumCmd1arr[iconfig]));		     
+		     List expectedEnumList1arr = new ArrayList();
+		     String enumValues[] = option.getApplicableValues();
+		     String[] expectedEnumList1Tokens = expectedEnumList1.split(","); //$NON-NLS-1$
+			 for (i = 0; i < expectedEnumList1Tokens.length; ++i) {
+			 	expectedEnumList1arr.add(expectedEnumList1Tokens[i].trim());
+			 }
+		     assertTrue(Arrays.equals(option.getApplicableValues(), (String[]) expectedEnumList1arr.toArray(new String[expectedSizeEnumList1])));
+		     
+		     // Fetch the debug other option and verify 
+		     //
+		     option = tool.getOptionById(OptionId2);		     		     
+		     assertTrue(option.isExtensionElement());		    		    
+		     assertEquals(option.getValueType(), (IOption.STRING));		     
+		     assertEquals(option.getName(), (expectedOptionIdName2));	
+		     
+		     // Fetch the debug gprof option and verify 
+		     //
+		     option = tool.getOptionById(OptionId3);		     		     
+		     assertTrue(option.isExtensionElement());		    		    
+		     assertEquals(option.getValueType(), (IOption.BOOLEAN));		
+		     boolean optionDefaultValueb = option.getBooleanValue();
+		     assertEquals(optionDefaultValueb, (expectedOptionIdValue3));
+		     assertEquals(option.getName(), (expectedOptionIdName3));
+		     assertEquals(option.getCommand(), (expectedOptionIdCmd3));		     
+		     
+		} // end for
+	} // end routine
+				
+	/*
+	 * Do a sanity check on the testgnu so project type.
+	 */
+    private void checkSoProjectType(IProjectType ptype) throws BuildException {		
+		int i;
+		int expecectedNumConfigs = 2;				
+		String[] expectedConfigName = {"Debug", "Release"};
+		String expectedCleanCmd = "rm -rf";
+		String expectedParserId = "org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser";
+		String expectedArtifactExtension = "so";	
+		String expectedOSList = "solaris,linux,hpux,aix,qnx";
+		int expectedSizeOSList = 5;
+		String[] expectedArchList = {"all"};
+		String expectedBinaryParser = "org.eclipse.cdt.core.ELF";
+		String[] expectedPlatformName = {"so Debug Platform",
+				                         "so Release Platform"};
+		String expectedCommand = "make";
+		String expectedArguments = "-k";
+		String[] expectedBuilderName = {"so Debug Builder",
+				                        "so Release Builder"};
+		String expectedScannerConfigDiscoveryProfileId = "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile";
+	    String[] expectedToolChainName = {"so Debug ToolChain",
+	                                      "so Release ToolChain"};
+		String[] expectedToolId1 = {"cdt.managedbuild.tool.testgnu.c.linker.so.debug",
+				                    "cdt.managedbuild.tool.testgnu.c.linker.so.release"};		     
+	    String expectedSuperToolId1 = "cdt.managedbuild.tool.testgnu.c.linker";
+	    String expectedToolOutputPrefix = "lib";
+	    String[] expectedToolOutput = {""};
+	    String expectedSuperOutputFlag1 = "-o";
+	    String expectedSuperGetToolCommand1 = "gcc";
+	    String[] expectedSuperInputExt1 = {"o"};    
+	    String[] expectedSuperToolOutputExt1 = {""};
+	    String expectedOptionCategory1 = "testgnu.c.link.category.general";  
+	    String OptionId1A = "testgnu.c.link.option.libs";
+	    String OptionId1B = "testgnu.c.link.option.paths";  
+	    String OptionId1C = "testgnu.c.link.option.userobjs";      	    
+	    String expectedOptionCmd1Aarr = "-l";
+	    String expectedOptionCmd1Barr = "-L";	    
+	    String OptionId2 = "testgnu.c.link.option.defname";
+	    String expectedOptionIdName2 = "Posix.Linker.Defname";
+	    String expectedOptionIdCmd2 = "-Wl,--output-def=";	    
+	    String OptionId3 = "testgnu.c.link.option.nostart";
+	    String expectedOptionIdName3 = "Posix.Linker.NoStartFiles";
+	    String expectedOptionIdCmd3 = "-nostartfiles";
+	    boolean expectedOptionIdValue3 = false;	    
+	    String OptionId4 = "testgnu.c.link.option.shared";
+	    String expectedOptionIdName4 = "Posix.Linker.Shared";
+	    String expectedOptionIdCmd4 = "-shared";
+	    boolean expectedOptionIdValue4 = false;	    
+		int expecectedNumTools = 5;
+		int numOrderCLinkerTool = 2;
+		int expecectedCNature = ITool.FILTER_C;
+		int expecectedCCNature = ITool.FILTER_CC;
+				
+		// Check project attributes
+		//
+		assertNotNull(ptype);		
+		assertTrue(ptype.isTestProjectType());
+		assertFalse(ptype.isAbstract());
+		
+		// Check project configurations
+		//
+		IConfiguration[] configs = ptype.getConfigurations();
+		assertNotNull(configs);
+		assertEquals(expecectedNumConfigs, configs.length);
+
+		// Loop over configurations
+		//
+		for (int iconfig=0; iconfig < configs.length; iconfig++) {
+			
+			 // Verify configuration attributes
+			 //		 
+		     assertEquals(configs[iconfig].getName(), (expectedConfigName[iconfig]));		     
+		     assertEquals(expectedCleanCmd, configs[iconfig].getCleanCommand());
+		     assertEquals(expectedParserId, configs[iconfig].getErrorParserIds());
+		     assertEquals(configs[iconfig].getArtifactExtension(), (expectedArtifactExtension));	
+		     
+		     // Fetch toolchain and verify
+		     //
+		     IToolChain toolChain = configs[iconfig].getToolChain();
+		     assertEquals(toolChain.getName(), (expectedToolChainName[iconfig]));
+		     
+		     List expectedOSListarr = new ArrayList();
+			 String[] expectedOSListTokens = expectedOSList.split(","); //$NON-NLS-1$
+			 for (i = 0; i < expectedOSListTokens.length; ++i) {
+				 expectedOSListarr.add(expectedOSListTokens[i].trim());
+			 }
+		     assertEquals(expectedParserId, configs[iconfig].getErrorParserIds());
+		     assertTrue(Arrays.equals(toolChain.getOSList(), (String[]) expectedOSListarr.toArray(new String[expectedSizeOSList])));
+		     assertTrue(Arrays.equals(toolChain.getArchList(), expectedArchList));
+             assertEquals(expectedScannerConfigDiscoveryProfileId, toolChain.getScannerConfigDiscoveryProfileId());
+		
+			 // Fetch and check platform
+			 //		     		     
+		     ITargetPlatform platform = toolChain.getTargetPlatform();	     		     						 
+		     assertTrue(Arrays.equals(platform.getOSList(), (String[]) expectedOSListarr.toArray(new String[expectedSizeOSList])));
+		     assertTrue(Arrays.equals(platform.getArchList(), expectedArchList));		     
+			 String[] binaryParsers = platform.getBinaryParserList();
+			 assertEquals(binaryParsers.length, 1);
+		     assertEquals(binaryParsers[0], expectedBinaryParser);
+			 assertEquals(platform.getName(), expectedPlatformName[iconfig]);
+			 
+			 // Fetch and check builder			 		     
+			 //
+		     IBuilder builder = toolChain.getBuilder();
+		     assertEquals(builder.getCommand(), expectedCommand);		     
+		     assertEquals(builder.getArguments(), expectedArguments);		  
+		     assertEquals(builder.getName(), expectedBuilderName[iconfig]);
+		     
+		     // Fetch and check tools list
+		     //
+		     ITool[] tools = toolChain.getTools();
+		     assertEquals(tools.length, expecectedNumTools);
+		     
+		     // Fetch and check the gnu C linker tool
+		     //
+		     ITool tool;
+		     ITool superTool;
+		     
+		     tool = tools[numOrderCLinkerTool];
+		     superTool = tool.getSuperClass();
+		     assertEquals(tool.getId(), expectedToolId1[iconfig]);		     
+		     assertEquals(superTool.getId(), expectedSuperToolId1);
+		     assertEquals(tool.getNatureFilter(), expecectedCNature);
+		     assertEquals(tool.getOutputPrefix(), expectedToolOutputPrefix);
+		     assertTrue(Arrays.equals(superTool.getOutputsAttribute(), expectedToolOutput));		     
+			 assertTrue(Arrays.equals(superTool.getAllInputExtensions(), expectedSuperInputExt1));			 
+		     assertEquals(superTool.getOutputFlag(), expectedSuperOutputFlag1);
+		     assertEquals(superTool.getToolCommand(), expectedSuperGetToolCommand1);	    	   
+		     assertTrue(Arrays.equals(superTool.getOutputsAttribute(), expectedSuperToolOutputExt1));	     
+		     
+		     // Fetch and check an option category
+		     //
+		     IOptionCategory[] optionCats = superTool.getChildCategories();
+			 assertEquals(optionCats[0].getId(), (expectedOptionCategory1));
+			 
+			 // Fetch and check options customized for this tool			    
+			 //		     
+		     IOption option;		     		     
+		   
+		     // Fetch the libs option and verify
+		     //
+		     option = tool.getOptionById(OptionId1A);		     		     
+		     assertTrue(option.isExtensionElement());
+		     String optionDefaultValue = (String)option.getDefaultValue();		     
+		     assertEquals(option.getValueType(), (IOption.LIBRARIES));		     	   
+		     assertEquals(option.getCommand(), (expectedOptionCmd1Aarr));
+		     assertEquals(option.getBrowseType(), (IOption.BROWSE_FILE));
+	
+		     // Fetch the libsearch option and verify
+		     //
+		     option = tool.getOptionById(OptionId1B);		     		     
+		     assertTrue(option.isExtensionElement());
+		     optionDefaultValue = (String)option.getDefaultValue();		     
+		     assertEquals(option.getValueType(), (IOption.STRING_LIST));		     	   
+		     assertEquals(option.getCommand(), (expectedOptionCmd1Barr));
+		     assertEquals(option.getBrowseType(), (IOption.BROWSE_DIR));
+	
+		     // Fetch the user objs option and verify
+		     //
+		     option = tool.getOptionById(OptionId1C);		     		     
+		     assertTrue(option.isExtensionElement());
+		     optionDefaultValue = (String)option.getDefaultValue();		     
+		     assertEquals(option.getValueType(), (IOption.OBJECTS));		     	   
+		     assertEquals(option.getBrowseType(), (IOption.BROWSE_FILE));
+	
+		     // Fetch the defname option and verify 
+		     //
+		     option = tool.getOptionById(OptionId2);		     		     
+		     assertTrue(option.isExtensionElement());		    		    
+		     assertEquals(option.getValueType(), (IOption.STRING));		     
+		     assertEquals(option.getName(), (expectedOptionIdName2));	
+		     assertEquals(option.getCommand(), (expectedOptionIdCmd2));
+	  	    	    	     		     
+		     // Fetch the nostartfiles option and verify 
+		     //
+		     option = tool.getOptionById(OptionId3);		     		     
+		     assertTrue(option.isExtensionElement());		    		    
+		     assertEquals(option.getValueType(), (IOption.BOOLEAN));		
+		     boolean optionDefaultValueb1 = option.getBooleanValue();
+		     assertEquals(optionDefaultValueb1, (expectedOptionIdValue3));
+		     assertEquals(option.getName(), (expectedOptionIdName3));
+		     assertEquals(option.getCommand(), (expectedOptionIdCmd3));
+		     
+		     // Fetch the shared option and verify that it has the proper
+		     // default value, which should overwrite the value set in the abstract
+		     // project that its containing project is derived from	   
+		     //
+		     option = tool.getOptionById(OptionId4);		     		     
+		     assertTrue(option.isExtensionElement());		    		    
+		     assertEquals(option.getValueType(), (IOption.BOOLEAN));		
+		     boolean optionDefaultValueb2 = option.getBooleanValue();
+		     assertEquals(optionDefaultValueb2, (expectedOptionIdValue4));
+		     assertEquals(option.getName(), (expectedOptionIdName4));
+		     assertEquals(option.getCommand(), (expectedOptionIdCmd4)); 
+	
+	    } // end for
+	} //end routine 
+		
+    /*
+	 * Do a sanity check on the testgnu lib project type.
+	 */    
+	private void checkLibProjectType(IProjectType ptype) throws BuildException {		
+		int i;
+		int expecectedNumConfigs = 2;				
+		String[] expectedConfigName = {"Dbg", "Rel"};
+		String expectedCleanCmd = "rm -rf";
+		String expectedParserId = "org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser";
+		String expectedArtifactExtension = "a";	
+		String expectedOSList = "solaris,linux,hpux,aix,qnx";
+		int expectedSizeOSList = 5;
+		String[] expectedArchList = {"all"};
+		String expectedBinaryParser = "org.eclipse.cdt.core.ELF";
+		String[] expectedPlatformName = {"Dbg P",
+				                         "Rel P"};
+		String expectedCommand = "make";
+		String expectedArguments = "-k";
+		String[] expectedBuilderName = {"Dbg B",
+				                        "Rel B"};
+        String expectedScannerConfigDiscoveryProfileId = "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile";
+	    String[] expectedToolId1 = {"cdt.managedbuild.tool.testgnu.cpp.compiler.lib.debug",
+	                                "cdt.managedbuild.tool.testgnu.cpp.compiler.lib.release"};		     
+	    String expectedSuperToolId1 = "cdt.managedbuild.tool.testgnu.cpp.compiler";		    
+	    String expectedSuperOutputFlag1 = "-o";
+	    String expectedSuperGetToolCommand1 = "g++";
+	    String[] expectedSuperInputExt1 = {"c","C","cc","cxx","cpp"};
+	    String[] expectedSuperToolInterfaceExt1 = {"h","H","hpp"};
+	    String[] expectedSuperToolOutputExt1 = {"o"};
+	    String expectedOptionCategory1 = "testgnu.cpp.compiler.category.preprocessor";        
+	    String[] OptionId1 = {"testgnu.cpp.compiler.lib.debug.option.optimization.level",
+	                          "testgnu.cpp.compiler.lib.release.option.optimization.level"};		    
+	    String[] expectedOptionIdValue1 = {"testgnu.cpp.compiler.optimization.level.none",
+	                                       "testgnu.cpp.compiler.optimization.level.most"};
+	    String expectedEnumList1 = "Posix.Optimize.None, Posix.Optimize.Optimize, Posix.Optimize.More, Posix.Optimize.Most";
+	    int expectedSizeEnumList1 = 4;
+	    String[] expectedOptionEnumCmd1arr = {"-O0", "-O3"};
+	    
+	    String OptionId2 = "testgnu.cpp.compiler.option.other.other";
+	    String expectedOptionIdName2 = "OtherFlags";
+	    
+	    String OptionId3 = "testgnu.cpp.compiler.option.other.verbose";
+	    String expectedOptionIdName3 = "Posix.Verbose";
+	    String expectedOptionIdCmd3 = "-v";
+	    boolean expectedOptionIdValue3 = false;	    
+		int expecectedNumTools = 4;
+		int numOrderCppCompilerTool = 1;		
+		int expecectedCNature = ITool.FILTER_C;
+		int expecectedCCNature = ITool.FILTER_CC;
+				
+		// Check project attributes
+		//
+		assertNotNull(ptype);		
+		assertTrue(ptype.isTestProjectType());
+		assertFalse(ptype.isAbstract());
+		
+		// Check project configurations
+		//
+		IConfiguration[] configs = ptype.getConfigurations();
+		assertNotNull(configs);
+		assertEquals(expecectedNumConfigs, configs.length);
+		
+		// Loop over configurations
+		//
+		for (int iconfig=0; iconfig < configs.length; iconfig++) {
+			
+			 // Verify configuration attributes
+			 //		 
+		     assertEquals(configs[iconfig].getName(), (expectedConfigName[iconfig]));		     
+		     assertEquals(expectedCleanCmd, configs[iconfig].getCleanCommand());
+		     assertEquals(expectedParserId, configs[iconfig].getErrorParserIds());
+		     assertEquals(configs[iconfig].getArtifactExtension(), (expectedArtifactExtension));	
+		     
+		     // Fetch toolchain and verify
+		     //
+		     IToolChain toolChain = configs[iconfig].getToolChain();
+		     
+		     List expectedOSListarr = new ArrayList();
+			 String[] expectedOSListTokens = expectedOSList.split(","); //$NON-NLS-1$
+			 for (i = 0; i < expectedOSListTokens.length; ++i) {
+				 expectedOSListarr.add(expectedOSListTokens[i].trim());
+			 }
+		     assertEquals(expectedParserId, configs[iconfig].getErrorParserIds());
+		     assertTrue(Arrays.equals(toolChain.getOSList(), (String[]) expectedOSListarr.toArray(new String[expectedSizeOSList])));
+		     assertTrue(Arrays.equals(toolChain.getArchList(), expectedArchList));
+             assertEquals(expectedScannerConfigDiscoveryProfileId, toolChain.getScannerConfigDiscoveryProfileId());
+		
+			 // Fetch and check platform
+			 //		     		     
+		     ITargetPlatform platform = toolChain.getTargetPlatform();	     		     						 
+		     assertTrue(Arrays.equals(platform.getOSList(), (String[]) expectedOSListarr.toArray(new String[expectedSizeOSList])));
+		     assertTrue(Arrays.equals(platform.getArchList(), expectedArchList));		     
+			 String[] binaryParsers = platform.getBinaryParserList();
+			 assertEquals(binaryParsers.length, 1);
+		     assertEquals(binaryParsers[0], expectedBinaryParser);
+			 assertEquals(platform.getName(), expectedPlatformName[iconfig]);
+			 
+			 // Fetch and check builder			 		     
+			 //
+		     IBuilder builder = toolChain.getBuilder();
+		     assertEquals(builder.getCommand(), expectedCommand);		     
+		     assertEquals(builder.getArguments(), expectedArguments);		  
+		     assertEquals(builder.getName(), expectedBuilderName[iconfig]);
+		     
+		     // Fetch and check tools list
+		     //
+		     ITool[] tools = toolChain.getTools();
+		     assertEquals(tools.length, expecectedNumTools);
+		     
+		     // Fetch and check the gnu Cpp compiler tool
+		     //
+		     ITool tool;
+		     ITool superTool;
+		     
+		     tool = tools[numOrderCppCompilerTool];
+		     superTool = tool.getSuperClass();
+		     assertEquals(tool.getId(), expectedToolId1[iconfig]);		     
+		     assertEquals(superTool.getId(), expectedSuperToolId1);
+		     assertEquals(tool.getNatureFilter(), expecectedCCNature);
+			 assertTrue(Arrays.equals(superTool.getAllInputExtensions(), expectedSuperInputExt1));			 
+		     assertEquals(superTool.getOutputFlag(), expectedSuperOutputFlag1);
+		     assertEquals(superTool.getToolCommand(), expectedSuperGetToolCommand1);
+		     assertTrue(Arrays.equals(superTool.getAllDependencyExtensions(), expectedSuperToolInterfaceExt1));
+		     assertTrue(Arrays.equals(superTool.getOutputsAttribute(), expectedSuperToolOutputExt1));	     
+		     
+		     // Fetch and check an option category
+		     //
+		     IOptionCategory[] optionCats = superTool.getChildCategories();
+			 assertEquals(optionCats[0].getId(), (expectedOptionCategory1));
+			 
+			 // Fetch and check options customized for this tool			    
+			 //		     
+		     IOption option;		     		     
+
+		     // Fetch the optimization level option and verify that it has the proper
+		     // default value, which should overwrite the value set in the abstract
+		     // project that its containing project is derived from
+		     //
+		     option = tool.getOptionById(OptionId1[iconfig]);		     		     
+		     assertTrue(option.isExtensionElement());
+		     String optionDefaultValue = (String)option.getDefaultValue();		     
+		     assertEquals(option.getValueType(), (IOption.ENUMERATED));		     
+		     assertEquals(optionDefaultValue, (expectedOptionIdValue1[iconfig]));
+		     String optionEnumCmd1 = option.getEnumCommand(optionDefaultValue);
+		     assertEquals(optionEnumCmd1, (expectedOptionEnumCmd1arr[iconfig]));
+		     
+		     List expectedEnumList1arr = new ArrayList();
+		     String enumValues[] = option.getApplicableValues();
+		     String[] expectedEnumList1Tokens = expectedEnumList1.split(","); //$NON-NLS-1$
+			 for (i = 0; i < expectedEnumList1Tokens.length; ++i) {
+			 	expectedEnumList1arr.add(expectedEnumList1Tokens[i].trim());
+			 }
+		     assertTrue(Arrays.equals(option.getApplicableValues(), (String[]) expectedEnumList1arr.toArray(new String[expectedSizeEnumList1])));
+		     
+		     // Fetch the other flags option and verify 
+		     //
+		     option = tool.getOptionById(OptionId2);		     		     
+		     assertTrue(option.isExtensionElement());		    		    
+		     assertEquals(option.getValueType(), (IOption.STRING));		     
+		     assertEquals(option.getName(), (expectedOptionIdName2));	
+		     
+		     // Fetch the verbose option and verify 
+		     //
+		     option = tool.getOptionById(OptionId3);		     		     
+		     assertTrue(option.isExtensionElement());		    		    
+		     assertEquals(option.getValueType(), (IOption.BOOLEAN));		
+		     boolean optionDefaultValueb = option.getBooleanValue();
+		     assertEquals(optionDefaultValueb, (expectedOptionIdValue3));
+		     assertEquals(option.getName(), (expectedOptionIdName3));
+		     assertEquals(option.getCommand(), (expectedOptionIdCmd3));		     
+		     
+		} // end for				
+	} // end routine
+} // end class
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests20.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests20.java
new file mode 100644
index 0000000..963f306
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests20.java
@@ -0,0 +1,1882 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.Properties;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.parser.IScannerInfo;
+import org.eclipse.cdt.core.parser.IScannerInfoChangeListener;
+import org.eclipse.cdt.core.parser.IScannerInfoProvider;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.ITargetPlatform;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.cdt.managedbuilder.internal.core.Option;
+import org.eclipse.cdt.managedbuilder.testplugin.BuildSystemTestHelper;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+
+/*
+ *  These tests exercise CDT 2.0 manifest file functionality 
+ */
+public class ManagedBuildCoreTests20 extends TestCase {
+	private static final boolean boolVal = true;
+	private static final String testConfigId = "test.config.override";
+	private static final String testConfigName = "Tester";
+	private static final String enumVal = "Another Enum";
+	private static final String[] listVal = {"_DEBUG", "/usr/include", "libglade.a"};
+	private static final String newExt = "wen";
+	private static final String projectName = "ManagedBuildTest";
+	private static final String projectName2 = "ManagedBuildTest2";
+	private static final String projectRename = "ManagedBuildRedux";
+	private static final String rootExt = "toor";
+	private static final String stringVal = "-c -Wall";
+	private static final String anotherStringVal = "thevalue";
+	private static final String subExt = "bus";
+		
+	public ManagedBuildCoreTests20(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite = new TestSuite(ManagedBuildCoreTests20.class.getName());
+		
+		suite.addTest(new ManagedBuildCoreTests20("testExtensions"));
+		suite.addTest(new ManagedBuildCoreTests20("testProjectCreation"));
+		suite.addTest(new ManagedBuildCoreTests20("testConfigurations"));
+		suite.addTest(new ManagedBuildCoreTests20("testConfigurationReset"));
+		suite.addTest(new ManagedBuildCoreTests20("testConfigBuildArtifact"));
+		suite.addTest(new ManagedBuildCoreTests20("testMakeCommandManipulation"));
+		suite.addTest(new ManagedBuildCoreTests20("testScannerInfoInterface"));
+		suite.addTest(new ManagedBuildCoreTests20("testProjectRename"));
+		suite.addTest(new ManagedBuildCoreTests20("testErrorParsers"));
+		suite.addTest(new ManagedBuildCoreTests20("cleanup"));
+		
+		return suite;
+	}
+
+	/**
+	 * Navigates through the build info as defined in the extensions
+	 * defined in this plugin
+	 */
+	public void testExtensions() throws Exception {
+		IProjectType testRoot = null;
+		IProjectType testSub = null;
+		IProjectType testSubSub = null;
+		IProjectType testForwardChild = null;
+		IProjectType testForwardParent = null;
+		IProjectType testForwardGrandchild = null;
+		int numTypes = 0;
+		
+		// Note secret null parameter which means just extensions
+		IProjectType[] projTypes = ManagedBuildManager.getDefinedProjectTypes();
+
+		for (int i = 0; i < projTypes.length; ++i) {
+			IProjectType type = projTypes[i];
+			
+			if (type.getName().equals("Test Root")) {
+				testRoot = type;
+				checkRootProjectType(testRoot);
+			} else if (type.getName().equals("Test Sub")) {
+				testSub = type;
+				checkSubProjectType(testSub);
+			} else if (type.getName().equals("Test Sub Sub")) {
+				testSubSub = type;
+				checkSubSubProjectType(testSubSub);
+			} else if (type.getName().equals("Forward Child")) {
+				testForwardChild = type;
+			} else if (type.getName().equals("Forward Parent")) {
+				testForwardParent = type;
+			} else if (type.getName().equals("Forward Grandchild")) {
+				testForwardGrandchild = type;
+			} else if (type.getId().startsWith("test.provider.Test_")) {
+				numTypes++;
+				checkProviderProjectType(type);
+			}
+		}
+		// check that the forward references are properly resolved.
+		assertNotNull(testForwardChild);
+		assertNotNull(testForwardParent);
+		assertNotNull(testForwardGrandchild);
+		checkForwardProjectTypes(testForwardParent, testForwardChild, testForwardGrandchild);
+		
+		// check that the proper number of projectTypes were dynamically provided
+		assertEquals(3, numTypes);
+		
+		// All these project types are defines in the plugin files, so none
+		// of them should be null at this point
+		assertNotNull(testRoot);
+		assertNotNull(testSub);
+		assertNotNull(testSubSub);
+	}
+
+	/**
+	 * This test exercises the interface the <code>IConfiguration</code> exposes to manipulate 
+	 * its make command.
+	 */
+	public void testMakeCommandManipulation () {
+		String oldMakeCmd = "make";
+		String newMakeCmd = "Ant";
+		
+		// Open the test project
+		IProject project = null;
+		try {
+			project = createProject(projectName);
+			IProjectDescription description = project.getDescription();
+			// Make sure it has a managed nature
+			if (description != null) {
+				assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+			}
+		} catch (CoreException e) {
+			fail("Failed to open project in 'testMakeCommandManipulation': " + e.getLocalizedMessage());
+		}
+		assertNotNull(project);
+		
+		// Now get the default configuration
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		assertNotNull(info);
+		IManagedProject managedProj = info.getManagedProject();
+		assertNotNull(managedProj);
+		IConfiguration defaultConfig = info.getDefaultConfiguration();
+		assertNotNull(defaultConfig);
+		
+		// Does it have a default build command
+		assertFalse(defaultConfig.hasOverriddenBuildCommand());
+		assertEquals(oldMakeCmd, defaultConfig.getBuildCommand());
+		
+		// Change it
+		defaultConfig.setBuildCommand(newMakeCmd);
+		assertEquals(newMakeCmd, defaultConfig.getBuildCommand());
+		assertTrue(defaultConfig.hasOverriddenBuildCommand());
+		
+		// Reset it
+		defaultConfig.setBuildCommand(null);
+		assertFalse(defaultConfig.hasOverriddenBuildCommand());
+		assertEquals(oldMakeCmd, defaultConfig.getBuildCommand());
+		
+		ManagedBuildManager.saveBuildInfo(project, false);
+	}
+	
+	
+	/**
+	 * The purpose of this test is to exercise the build path info interface.
+	 * To get to that point, a new project/config has to be created in the test
+	 * project and the default configuration changed.
+	 *  
+	 * @throws CoreException
+	 */
+	public void testScannerInfoInterface(){
+		// Open the test project
+		IProject project = null;
+		try {
+			project = createProject(projectName);
+			IProjectDescription description = project.getDescription();
+			// Make sure it has a managed nature
+			if (description != null) {
+				assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+			}
+		} catch (CoreException e) {
+			fail("Failed to open project in 'testScannerInfoInterface': " + e.getLocalizedMessage());
+		}
+		
+		//These are the expected path settings
+		 final String[] expectedPaths = new String[5];
+
+		 // This first path is a built-in, so it will not be manipulated by build manager
+		 expectedPaths[0] = (new Path("/usr/include")).toOSString();
+		 expectedPaths[1] = (new Path("/opt/gnome/include")).toOSString();
+		 IPath path = new Path("C:\\home\\tester/include");
+		 if(path.isAbsolute()) // for win32 path is treated as absolute
+			 expectedPaths[2] = path.toOSString();
+		 else // for Linux path is relative
+			 expectedPaths[2] = project.getLocation().append("Sub Config").append(path).toOSString();
+		 expectedPaths[3] = project.getLocation().append( "includes" ).toOSString();
+		 expectedPaths[4] = (new Path("/usr/gnu/include")).toOSString();
+		 
+		// Create a new managed project based on the sub project type
+		IProjectType projType = ManagedBuildManager.getExtensionProjectType("test.sub");
+		assertNotNull(projType);
+		
+		// Create the managed-project (.cdtbuild) for our project
+		IManagedProject newProject = null;
+		try {
+			newProject = ManagedBuildManager.createManagedProject(project, projType);
+		} catch (BuildException e) {
+			fail("Failed creating new project: " + e.getLocalizedMessage());
+		}
+		assertNotNull(newProject);
+		ManagedBuildManager.setNewProjectVersion(project);
+	
+		// Copy over the configs
+		IConfiguration[] baseConfigs = projType.getConfigurations();
+		for (int i = 0; i < baseConfigs.length; ++i) {
+			newProject.createConfiguration(baseConfigs[i], baseConfigs[i].getId() + "." + i);
+		}
+		
+		// Change the default configuration to the sub config
+		IConfiguration[] configs = newProject.getConfigurations();
+		assertEquals(4, configs.length);
+		IManagedBuildInfo buildInfo = ManagedBuildManager.getBuildInfo(project);
+		buildInfo.setDefaultConfiguration(newProject.getConfiguration(configs[0].getId()));
+		buildInfo.setValid(true);
+		// Save, close, reopen
+		ManagedBuildManager.saveBuildInfo(project, true);
+		ManagedBuildManager.removeBuildInfo(project);
+		try {
+			project.close(null);
+		} catch (CoreException e) {
+			fail("Failed on project close: " + e.getLocalizedMessage());
+		}
+		try {
+			project.open(null);
+		} catch (CoreException e) {
+			fail("Failed on project open: " + e.getLocalizedMessage());
+		}
+		buildInfo = ManagedBuildManager.getBuildInfo(project);
+		
+		// Use the plugin mechanism to discover the supplier of the path information
+		IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID + ".ScannerInfoProvider");
+		if (extensionPoint == null) {
+			fail("Failed to retrieve the extension point ScannerInfoProvider.");
+		}
+
+		// Find the first IScannerInfoProvider that supplies build info for the project
+		IScannerInfoProvider provider = CCorePlugin.getDefault().getScannerInfoProvider(project);
+		assertNotNull(provider);
+		
+		// Now subscribe (note that the method will be called after a change
+		provider.subscribe(project, new IScannerInfoChangeListener () {
+			public void changeNotification(IResource project, IScannerInfo info) {
+				// Test the symbols: expect "BUILTIN" from the manifest, and "DEBUG" and "GNOME=ME"
+				// from the overidden settings 
+				Map definedSymbols = info.getDefinedSymbols();
+				assertTrue(definedSymbols.containsKey("BUILTIN"));
+				assertTrue(definedSymbols.containsKey("DEBUG"));
+				assertTrue(definedSymbols.containsKey("GNOME"));
+				assertTrue(definedSymbols.containsValue("ME"));
+				assertEquals((String)definedSymbols.get("BUILTIN"), "");
+				assertEquals((String)definedSymbols.get("DEBUG"), "");
+				assertEquals((String)definedSymbols.get("GNOME"), "ME");
+				// Test the includes path
+				String[] actualPaths = info.getIncludePaths();
+				BuildSystemTestHelper.checkDiff(expectedPaths, actualPaths);
+			}
+		});
+
+		// Check the build information before we change it
+		IScannerInfo currentSettings = provider.getScannerInformation(project);
+		
+		Map currentSymbols = currentSettings.getDefinedSymbols();
+		// It should simply contain the built-in
+		assertTrue(currentSymbols.containsKey("BUILTIN"));
+		assertEquals((String)currentSymbols.get("BUILTIN"), "");
+		
+		String[] currentPaths = currentSettings.getIncludePaths();
+		BuildSystemTestHelper.checkDiff(expectedPaths, currentPaths);
+
+		// Add some defined symbols programmatically
+		String[] expectedSymbols = {"DEBUG", "GNOME = ME "};
+		IConfiguration defaultConfig = buildInfo.getDefaultConfiguration();
+		ITool[] tools = defaultConfig.getTools();
+		ITool subTool = null;
+		for (int i = 0; i < tools.length; i++) {
+			ITool tool = tools[i];
+			if("tool.sub".equalsIgnoreCase(tool.getSuperClass().getId())) {
+				subTool = tool;
+				break;
+			}
+		}
+		assertNotNull(subTool);
+		IOption symbolOpt = null;
+		IOption[] opts = subTool.getOptions();
+		for (int i = 0; i < opts.length; i++) {
+			IOption option = opts[i];
+			try {
+				if (option.getValueType() == IOption.PREPROCESSOR_SYMBOLS) {
+					symbolOpt = option;
+					break;
+				}
+			} catch (BuildException e) {
+				fail("Failed getting option value-type: " + e.getLocalizedMessage());
+			}
+		}
+		assertNotNull(symbolOpt);
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		assertFalse(info.isDirty());
+		ManagedBuildManager.setOption(defaultConfig, subTool, symbolOpt, expectedSymbols);
+		assertTrue(info.isDirty());
+		info.setDirty(false);
+		assertFalse(info.isDirty());
+	}
+	
+	/**
+	 * Create a new configuration based on one defined in the plugin file.
+	 * Overrides all of the configuration settings. Saves, closes, and reopens 
+	 * the project. Then calls a method to check the overridden options.
+	 * 
+	 * Tests creating a new configuration.
+	 * Tests setting options.
+	 * Tests persisting overridden options between project sessions.
+	 * 
+	 */
+	public void testConfigurations() throws CoreException, BuildException {
+		final String rootName = "Root Config";
+		final String overrideName = "Root Override Config";
+		final String completeOverrideName = "Complete Override Config";
+		final String toolCmd = "doIt";
+		final String newCmd = "never";
+		
+		// Open the test project
+		IProject project = createProject(projectName);
+		IProjectDescription description = project.getDescription();
+		// Make sure it has a managed nature
+		if (description != null) {
+			assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+		}
+		
+		// Make sure there is a ManagedProject with 3 configs
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject managedProj = info.getManagedProject();
+		IConfiguration[] definedConfigs = managedProj.getConfigurations(); 		
+		assertEquals(3, definedConfigs.length);
+		IConfiguration baseConfig = definedConfigs[0];
+		assertEquals(definedConfigs[0].getName(), rootName);
+		assertEquals(definedConfigs[1].getName(), overrideName);
+		assertEquals(definedConfigs[2].getName(), completeOverrideName);
+		
+		// Create a new configuration and test the rename function
+		IConfiguration newConfig = managedProj.createConfigurationClone(baseConfig, testConfigId);
+		assertEquals(4, managedProj.getConfigurations().length);
+		newConfig.setName(testConfigName);
+		assertEquals(newConfig.getId(), testConfigId);
+		assertEquals(newConfig.getName(), testConfigName);
+
+		// There is only one tool
+		ITool[] definedTools = newConfig.getTools();
+		assertEquals(1, definedTools.length);
+		ITool rootTool = definedTools[0];
+		
+		// Test changing its command
+		assertEquals(rootTool.getToolCommand(), toolCmd);
+		newConfig.setToolCommand(rootTool, newCmd);
+		assertEquals(rootTool.getToolCommand(), newCmd);
+		
+		// Override options in the new configuration
+		IOptionCategory topCategory = rootTool.getTopOptionCategory();
+		assertEquals("Root Tool", topCategory.getName());
+		Object[][] options = topCategory.getOptions(newConfig);
+		int i;
+		for (i=0; i<options.length; i++)
+			if (options[i][0] == null) break;
+		assertEquals(2, i);
+		ITool tool = (ITool)options[0][0];
+		IOption option = (IOption)options[0][1];
+		ManagedBuildManager.setOption(newConfig, tool, option, listVal);
+		option = (IOption)options[1][1];
+		ManagedBuildManager.setOption(newConfig, tool, option, boolVal);
+
+		IOptionCategory[] categories = topCategory.getChildCategories();
+		assertEquals(1, categories.length);
+		options = categories[0].getOptions(newConfig);
+		for (i=0; i<options.length; i++)
+			if (options[i][0] == null) break;
+		assertEquals(4, i);
+		tool = (ITool)options[0][0];
+		option = (IOption)options[0][1];
+		ManagedBuildManager.setOption(newConfig, tool, option, stringVal);
+		option = (IOption)options[1][1];
+		ManagedBuildManager.setOption(newConfig, tool, option, anotherStringVal);
+		option = (IOption)options[2][1];
+		ManagedBuildManager.setOption(newConfig, tool, option, enumVal);
+		option = (IOption)options[3][1];
+		ManagedBuildManager.setOption(newConfig, tool, option, "False");
+
+		// Save, close, reopen and test again
+		ManagedBuildManager.saveBuildInfo(project, false);
+		ManagedBuildManager.removeBuildInfo(project);
+		project.close(null);
+		project.open(null);
+
+		// Test the values in the new configuration
+		checkOptionReferences(project);
+		
+		// Now delete the new configuration and test the managed project
+		info = ManagedBuildManager.getBuildInfo(project);
+		managedProj = info.getManagedProject();
+		definedConfigs = managedProj.getConfigurations(); 		
+		assertEquals(4, definedConfigs.length);
+		managedProj.removeConfiguration(testConfigId);
+		definedConfigs = managedProj.getConfigurations(); 		
+		assertEquals(3, definedConfigs.length);
+		assertEquals(definedConfigs[0].getName(), rootName);
+		assertEquals(definedConfigs[1].getName(), overrideName);
+		ManagedBuildManager.saveBuildInfo(project, false);
+	}
+	
+	public void testConfigurationReset() {
+		// Open the test project
+		IProject project = null;
+		try {
+			project = createProject(projectName);
+			IProjectDescription description = project.getDescription();
+			// Make sure it has a managed nature
+			if (description != null) {
+				assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+			}
+		} catch (CoreException e) {
+			fail("Failed to open project: " + e.getLocalizedMessage());
+		}
+
+		// Get the default configuration
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		assertNotNull(info);
+		IManagedProject managedProj = info.getManagedProject();
+		assertNotNull(managedProj);
+		IConfiguration defaultConfig = info.getDefaultConfiguration();
+		assertNotNull(defaultConfig);
+		
+		// See if it still contains the overridden values (see testProjectCreation())
+		try {
+			checkRootManagedProject(managedProj, "z");
+		} catch (BuildException e1) {
+			fail("Overridden root managed project check failed: " + e1.getLocalizedMessage());
+		}
+		
+		// Reset the config and retest
+		ManagedBuildManager.resetConfiguration(project, defaultConfig);
+		ManagedBuildManager.saveBuildInfo(project, false);
+		try {
+			checkRootManagedProject(managedProj, "x");
+		} catch (BuildException e2) {
+			fail("Reset root managed project check failed: " + e2.getLocalizedMessage());
+		}
+	}
+	
+	/**
+	 * @throws CoreException
+	 * @throws BuildException
+	 */
+	public void testProjectCreation() throws BuildException {
+		// Create new project
+		IProject project = null;
+		try {
+			project = createProject(projectName);
+			// Now associate the builder with the project
+			ManagedBuildTestHelper.addManagedBuildNature(project);
+			IProjectDescription description = project.getDescription();
+			// Make sure it has a managed nature
+			if (description != null) {
+				assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+			}
+
+		} catch (CoreException e) {
+			fail("Test failed on project creation: " + e.getLocalizedMessage());
+		}
+	
+		// Find the base project type definition
+		IProjectType projType = ManagedBuildManager.getExtensionProjectType("test.root");
+		assertNotNull(projType);
+		
+		// Create the managed-project (.cdtbuild) for our project that builds a dummy executable
+		IManagedProject newProject = ManagedBuildManager.createManagedProject(project, projType);
+		assertEquals(newProject.getName(), projType.getName());
+		assertFalse(newProject.equals(projType));
+		ManagedBuildManager.setNewProjectVersion(project);
+
+		// Copy over the configs
+		IConfiguration defaultConfig = null;
+		IConfiguration[] configs = projType.getConfigurations();
+		for (int i = 0; i < configs.length; ++i) {
+			// Make the first configuration the default 
+			if (i == 0) {
+				defaultConfig = newProject.createConfiguration(configs[i], projType.getId() + "." + i);
+			} else {
+				newProject.createConfiguration(configs[i], projType.getId() + "." + i);
+			}
+		}
+		ManagedBuildManager.setDefaultConfiguration(project, defaultConfig);
+
+		String buildArtifactName = projectName;
+		defaultConfig.setArtifactName(buildArtifactName);
+		defaultConfig.setArtifactExtension(newExt);
+		
+		ManagedBuildManager.getBuildInfo(project).setValid(true);
+		
+		// Initialize the path entry container
+		IStatus initResult = ManagedBuildManager.initBuildInfoContainer(project);
+		if (initResult.getCode() != IStatus.OK) {
+			fail("Initializing build information failed for: " + project.getName() + " because: " + initResult.getMessage());
+		}
+		
+		// Now test the results out
+		checkRootManagedProject(newProject, "x");
+		
+		// Override the "String Option in Category" option value
+		configs = newProject.getConfigurations();
+		ITool[] tools = configs[0].getTools();
+		IOptionCategory topCategory = tools[0].getTopOptionCategory();
+		IOptionCategory[] categories = topCategory.getChildCategories();
+		Object[][] options = categories[0].getOptions(configs[0]);
+		ITool tool = (ITool)options[0][0];
+		IOption option = (IOption)options[0][1];
+		configs[0].setOption(tool, option, "z");
+		options = categories[0].getOptions((IConfiguration)null);
+		tool = (ITool)options[0][0];
+		option = (IOption)options[0][1];
+		assertEquals("x", option.getStringValue());
+		options = categories[0].getOptions(configs[0]);
+		tool = (ITool)options[0][0];
+		option = (IOption)options[0][1];
+		assertEquals("z", option.getStringValue());
+		
+		// Save, close, reopen and test again
+		ManagedBuildManager.saveBuildInfo(project, true);
+		ManagedBuildManager.removeBuildInfo(project);
+		try {
+			project.close(null);
+		} catch (CoreException e) {
+			fail("Failed on project close: " + e.getLocalizedMessage());
+		}
+		try {
+			project.open(null);
+		} catch (CoreException e) {
+			fail("Failed on project open: " + e.getLocalizedMessage());
+		}
+		
+		// Test that the default config was remembered
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		assertEquals(defaultConfig.getId(), info.getDefaultConfiguration().getId());
+
+		// Check the rest of the default information
+		checkRootManagedProject(newProject, "z");
+		
+		// Now test the information the makefile builder needs
+		checkBuildTestSettings(info);
+		ManagedBuildManager.removeBuildInfo(project);
+	}
+
+	/**
+	 * Tests that bugzilla 44159 has been addressed. After a project was renamed, the 
+	 * build information mistakenly referred to the old project as its owner. This
+	 * caused a number of searches on the information to fail. In this bug, it was the 
+	 * list of tools that could not be determined. In other cases, the information 
+	 * retrieval caused NPEs because the old owner no longer existed.
+	 */
+	public void testProjectRename() {
+		// Open the test project
+		IProject project = null;
+		try {
+			project = createProject(projectName);
+			IProjectDescription description = project.getDescription();
+			// Make sure it has a managed nature
+			if (description != null) {
+				assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+			}
+		} catch (CoreException e) {
+			fail("Failed to open project: " + e.getLocalizedMessage());
+		}
+		
+		// Rename the project
+		IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();	
+		IResource newResource = workspaceRoot.findMember(projectRename);
+		if (newResource != null) {
+			try {
+				newResource.delete(IResource.KEEP_HISTORY, new NullProgressMonitor());
+			} catch (CoreException e) {
+				fail("Failed to delete old project " + projectRename + ": " + e.getLocalizedMessage());
+			}		
+		}
+		IProjectDescription description = null;
+		try {
+			description = project.getDescription();
+		} catch (CoreException e) {
+			fail("Failed to find project descriptor for " + projectName + ": " + e.getLocalizedMessage());
+		}
+		description.setName(projectRename);
+		try {
+			project.move(description, IResource.FORCE | IResource.SHALLOW, new NullProgressMonitor());
+		} catch (CoreException e) {
+			fail("Failed to rename project: " + e.getLocalizedMessage());
+		}
+		try {
+			project = createProject(projectRename);
+			description = project.getDescription();
+			// Make sure it has a managed nature
+			if (description != null) {
+				assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+			}
+		} catch (CoreException e) {
+			fail("Failed to open renamed project: " + e.getLocalizedMessage());
+		}
+
+		// By now the project should have 3 configs
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject managedProj = info.getManagedProject();
+		IConfiguration[] definedConfigs = managedProj.getConfigurations(); 		
+		assertEquals(4, definedConfigs.length);
+		IConfiguration baseConfig = definedConfigs[1];
+		
+		// There is only one tool
+		ITool[] definedTools = baseConfig.getTools();
+		assertEquals(1, definedTools.length);
+		ITool rootTool = definedTools[0];
+		
+		// Get the options (2) in top category and (4) in its child
+		IOptionCategory topCategory = rootTool.getTopOptionCategory();
+		assertEquals("Root Tool", topCategory.getName());
+		Object[][] options = topCategory.getOptions(baseConfig);
+		int i;
+		for (i=0; i<options.length; i++)
+			if (options[i][0] == null) break;
+		assertEquals(2, i);
+		IOptionCategory[] categories = topCategory.getChildCategories();
+		assertEquals(1, categories.length);
+		options = categories[0].getOptions(baseConfig);
+		for (i=0; i<options.length; i++)
+			if (options[i][0] == null) break;
+		assertEquals(4, i);
+		
+		// Set the name back
+		newResource = workspaceRoot.findMember(projectName);
+		if (newResource != null) {
+			try {
+				newResource.delete(IResource.KEEP_HISTORY, new NullProgressMonitor());
+			} catch (CoreException e) {
+				fail("Failed to delete old project " + projectName + ": " + e.getLocalizedMessage());
+			}		
+		}
+		try {
+			description = project.getDescription();
+		} catch (CoreException e) {
+			fail("Failed to find project descriptor for " + projectRename + ": " + e.getLocalizedMessage());
+		}
+		description.setName(projectName);
+		try {
+			project.move(description, IResource.FORCE | IResource.SHALLOW, new NullProgressMonitor());
+		} catch (CoreException e) {
+			fail("Failed to re-rename project: " + e.getLocalizedMessage());
+		}
+		try {
+			project = createProject(projectName);
+			description = project.getDescription();
+			// Make sure it has a managed nature
+			if (description != null) {
+				assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+			}
+		} catch (CoreException e) {
+			fail("Failed to open re-renamed project: " + e.getLocalizedMessage());
+		}
+
+		// Do it all again
+		info = ManagedBuildManager.getBuildInfo(project);
+		managedProj = info.getManagedProject();
+		definedConfigs = managedProj.getConfigurations(); 		
+		assertEquals(4, definedConfigs.length);
+		baseConfig = definedConfigs[1];
+		definedTools = baseConfig.getTools();
+		assertEquals(1, definedTools.length);
+		rootTool = definedTools[0];
+		topCategory = rootTool.getTopOptionCategory();
+		assertEquals("Root Tool", topCategory.getName());
+		options = topCategory.getOptions(baseConfig);
+		for (i=0; i<options.length; i++)
+			if (options[i][0] == null) break;
+		assertEquals(2, i);
+		categories = topCategory.getChildCategories();
+		assertEquals(1, categories.length);
+		options = categories[0].getOptions(baseConfig);
+		for (i=0; i<options.length; i++)
+			if (options[i][0] == null) break;
+		assertEquals(4, i);
+	}
+	
+	/**
+	 * Tests the tool settings through the interface the makefile generator
+	 * uses.
+	 * 
+	 * @param project
+	 */
+	private void checkBuildTestSettings(IManagedBuildInfo info) {
+		String ext1 = "foo";
+		String ext2 = "bar";
+		String badExt = "cpp";
+		String expectedOutput = "toor";
+		String expectedCmd = "doIt";
+		
+		assertNotNull(info);
+		assertEquals(info.getBuildArtifactName(), projectName);
+		
+		// There should be a default configuration defined for the project
+		IManagedProject managedProj = info.getManagedProject();
+		assertNotNull(managedProj);
+		IConfiguration buildConfig = info.getDefaultConfiguration();
+		assertNotNull(buildConfig);
+		
+		// Check that tool handles resources with extensions foo and bar by building a baz
+		assertEquals(info.getOutputExtension(ext1), expectedOutput);
+		assertEquals(info.getOutputExtension(ext2), expectedOutput);
+		
+		// Check that it ignores others based on filename extensions
+		assertNull(info.getOutputExtension(badExt));
+		
+		// Now see what the tool command line invocation is for foo and bar
+		assertEquals(info.getToolForSource(ext1), expectedCmd);
+		assertEquals(info.getToolForSource(ext2), expectedCmd);
+		// Make sure that there is no tool to build files of type foo and bar
+		assertNull(info.getToolForConfiguration(ext1));
+		assertNull(info.getToolForConfiguration(ext2));
+		
+		// There is no tool that builds toor
+		assertNull(info.getToolForSource(expectedOutput));
+		// but there is one that produces it
+		assertEquals(info.getToolForConfiguration(expectedOutput), expectedCmd);
+		
+		// Now check the build flags
+		assertEquals(info.getFlagsForSource(ext1), "-La -Lb z -e1 -nob");
+		assertEquals(info.getFlagsForSource(ext1), info.getFlagsForSource(ext2));
+		
+	}
+	
+	/**
+	 * Tests that overridden options are properly read into build model.
+	 * Test that option values that are not overridden remain the same.
+	 * 
+	 * @param project The project to get build model information for.
+	 * @throws BuildException
+	 */
+	private void checkOptionReferences(IProject project) throws BuildException {
+		// Get the configs
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject managedProj = info.getManagedProject();
+		IConfiguration[] definedConfigs = managedProj.getConfigurations(); 		
+		assertEquals(4, definedConfigs.length);
+		IConfiguration newConfig = managedProj.getConfiguration(testConfigId);
+		assertNotNull(newConfig);
+
+		// Now get the tool options and make sure the values are correct		
+		ITool[] definedTools = newConfig.getTools();
+		assertEquals(1, definedTools.length);
+		ITool rootTool = definedTools[0];
+
+		// Check that the options in the new config contain overridden values
+		IOption[] rootOptions = rootTool.getOptions();
+		assertEquals(6, rootOptions.length);
+		// First is the new list
+		assertEquals("List Option in Top", rootOptions[0].getName());
+		assertEquals(IOption.STRING_LIST, rootOptions[0].getValueType());
+		String[] list = rootOptions[0].getStringListValue();
+		assertEquals(3, list.length);
+		assertTrue(Arrays.equals(listVal, list));
+		assertEquals(rootOptions[0].getCommand(), "-L");
+		// Next option is a boolean in top
+		assertEquals("Boolean Option in Top", rootOptions[1].getName());
+		assertEquals(IOption.BOOLEAN, rootOptions[1].getValueType());
+		assertEquals(boolVal, rootOptions[1].getBooleanValue());
+		assertEquals("-b", rootOptions[1].getCommand());
+		// Next option is a string in category
+		assertEquals("String Option in Category", rootOptions[2].getName());
+		assertEquals(IOption.STRING, rootOptions[2].getValueType());
+		assertEquals(stringVal, rootOptions[2].getStringValue());
+		// Next option is a another string in category
+		assertEquals("Another String Option in Category", rootOptions[3].getName());
+		assertEquals(IOption.STRING, rootOptions[3].getValueType());
+		assertEquals(anotherStringVal, rootOptions[3].getStringValue());
+		assertEquals("-str", rootOptions[3].getCommand());
+		// Next option is an enumerated in category
+		assertEquals("Enumerated Option in Category", rootOptions[4].getName());
+		assertEquals(IOption.ENUMERATED, rootOptions[4].getValueType());
+		String selEnum = rootOptions[4].getSelectedEnum();
+		assertEquals(enumVal, selEnum);
+		String[] enums = rootOptions[4].getApplicableValues();
+		assertEquals(2, enums.length);
+		assertEquals("Default Enum", enums[0]);
+		assertEquals("Another Enum", enums[1]);
+		assertEquals("-e1", rootOptions[4].getEnumCommand(enums[0]));
+		assertEquals("-e2", rootOptions[4].getEnumCommand(enums[1]));
+		assertEquals("-e2", rootOptions[4].getEnumCommand(selEnum));
+		// Final option is a boolean in Category
+		assertEquals("Boolean Option in Category", rootOptions[5].getName());
+		assertEquals(IOption.BOOLEAN, rootOptions[5].getValueType());
+		assertEquals(false, rootOptions[5].getBooleanValue());
+		assertEquals("-nob", rootOptions[5].getCommandFalse());
+	}
+	
+	/*
+	 * Do a full sanity check on the root project type.
+	 */
+	private void checkRootProjectType(IProjectType type) throws BuildException {
+		// Project stuff
+		String expectedCleanCmd = "del /myworld";
+		String expectedParserId = "org.eclipse.cdt.core.PE";
+		String[] expectedOSList = {"win32"};
+		String[] expectedArchList = {"all"};
+		assertTrue(type.isTestProjectType());
+		IConfiguration[] configs = type.getConfigurations();
+		if (configs[0].getArtifactName().equals("ManagedBuildTest")) {
+			assertEquals(configs[0].getArtifactExtension(), newExt);
+		} else {
+			assertEquals(configs[0].getArtifactExtension(), rootExt);
+		}
+		assertEquals(expectedCleanCmd, configs[0].getCleanCommand());
+		assertEquals("make", configs[0].getBuildCommand());
+		IToolChain toolChain = configs[0].getToolChain();
+		ITargetPlatform targetPlatform = toolChain.getTargetPlatform();
+		String[] binaryParsers = targetPlatform.getBinaryParserList();
+		assertEquals(binaryParsers.length, 1);
+	    assertEquals(binaryParsers[0], expectedParserId);
+		assertTrue(Arrays.equals(expectedOSList, toolChain.getOSList()));
+		assertTrue(Arrays.equals(expectedArchList, toolChain.getArchList()));
+		// This configuration defines no errors parsers.
+		assertNull(configs[0].getErrorParserIds());
+		assertTrue(Arrays.equals(configs[0].getErrorParserList(), CCorePlugin.getDefault().getAllErrorParsersIDs()));
+		
+		// Tools
+		ITool[] tools = toolChain.getTools();
+		// Root Tool
+		ITool rootTool = tools[0];
+		assertEquals("Root Tool", rootTool.getName());
+		// 6 Options are defined in the root tool
+		IOption[] options = rootTool.getOptions();
+		assertEquals(6, options.length);
+		// First option is a 3-element list with 1 built-in
+		assertEquals("List Option in Top", options[0].getName());
+		assertEquals(IOption.STRING_LIST, options[0].getValueType());
+		String[] valueList = options[0].getStringListValue();
+		assertEquals(2, valueList.length);
+		assertEquals("a", valueList[0]);
+		assertEquals("b", valueList[1]);
+		String[] builtInList = options[0].getBuiltIns();
+		assertEquals(1, builtInList.length);
+		assertEquals("c", builtInList[0]);
+		assertEquals(options[0].getCommand(), "-L");
+		// Next option is a boolean in top
+		assertEquals("Boolean Option in Top", options[1].getName());
+		assertEquals(IOption.BOOLEAN, options[1].getValueType());
+		assertEquals(false, options[1].getBooleanValue());
+		assertEquals("-b", options[1].getCommand());
+		// Next option is a string category
+		assertEquals("String Option in Category", options[2].getName());
+		assertEquals(IOption.STRING, options[2].getValueType());
+		assertEquals("x", options[2].getStringValue());
+		// Next option is another string category
+		assertEquals("Another String Option in Category", options[3].getName());
+		assertEquals(IOption.STRING, options[3].getValueType());
+		assertEquals("", options[3].getStringValue());
+		assertEquals("-str", options[3].getCommand());
+		// Next option is an enumerated
+		assertEquals("Enumerated Option in Category", options[4].getName());
+		assertEquals(IOption.ENUMERATED, options[4].getValueType());
+		// Post-2.0 enums store the ID, not the string value 
+		assertEquals("default.enum.option", options[4].getSelectedEnum());
+		assertEquals("-e1", options[4].getEnumCommand("default.enum.option"));
+		// Need this methof to populate the UI selection widget
+		valueList = options[4].getApplicableValues();
+		assertEquals(2, valueList.length);
+		assertEquals("Default Enum", valueList[0]);
+		assertEquals("Another Enum", valueList[1]);
+		// Test compatability with 1.2 scheme of getting the command from the name
+		assertEquals("-e1", options[4].getEnumCommand(valueList[0]));
+		assertEquals("-e2", options[4].getEnumCommand(valueList[1]));
+		// Final option is another boolean
+		assertEquals("Boolean Option in Category", options[5].getName());
+		assertEquals(IOption.BOOLEAN, options[5].getValueType());
+		assertEquals(false, options[5].getBooleanValue());
+		assertEquals("", options[5].getCommand());
+		assertEquals("-nob", options[5].getCommandFalse());
+		
+		// Option Categories
+		IOptionCategory topCategory = rootTool.getTopOptionCategory();
+		assertEquals("Root Tool", topCategory.getName());
+		Object[][] catoptions = topCategory.getOptions(configs[0]);
+		int i;
+		for (i=0; i<catoptions.length; i++)
+			if (catoptions[i][0] == null) break;
+		assertEquals(2, i);
+		assertEquals("List Option in Top", ((IOption)catoptions[0][1]).getName());
+		assertEquals("Boolean Option in Top", ((IOption)catoptions[1][1]).getName());
+		IOptionCategory[] categories = topCategory.getChildCategories();
+		assertEquals(1, categories.length);
+		assertEquals("Category", categories[0].getName());
+		catoptions = categories[0].getOptions(configs[0]);
+		for (i=0; i<catoptions.length; i++)
+			if (catoptions[i][0] == null) break;
+		assertEquals(4, i);
+		assertEquals("String Option in Category", ((IOption)catoptions[0][1]).getName());
+		assertEquals("Another String Option in Category", ((IOption)catoptions[1][1]).getName());
+		assertEquals("Enumerated Option in Category", ((IOption)catoptions[2][1]).getName());
+		assertEquals("Boolean Option in Category", ((IOption)catoptions[3][1]).getName());
+
+		// There should be 3 defined configs
+		configs = type.getConfigurations();
+		assertEquals(3, configs.length);
+		
+		// Root Config
+		IConfiguration rootConfig = configs[0];
+		assertEquals("Root Config", rootConfig.getName());
+
+		// Tool elements
+		tools = rootConfig.getTools();
+		assertEquals(1, tools.length);
+		assertEquals("Root Tool", tools[0].getName());
+		assertEquals("-r", tools[0].getOutputFlag());
+		assertTrue(tools[0].buildsFileType("foo"));
+		assertTrue(tools[0].buildsFileType("bar"));
+		assertTrue(tools[0].producesFileType("toor"));
+		assertEquals("doIt", tools[0].getToolCommand());
+		assertEquals("", tools[0].getOutputPrefix());
+		// The root tool defines one valid header file extension
+		assertTrue(rootTool.isHeaderFile("baz"));
+		assertTrue(tools[0].isHeaderFile("baz"));
+		assertEquals(ITool.FILTER_C, rootTool.getNatureFilter());
+		
+		// Partially Overriden Configuration
+		assertEquals("Root Override Config", configs[1].getName());
+		tools = configs[1].getTools();
+		assertEquals(1, tools.length);
+		assertEquals("Root Tool", tools[0].getName());
+		topCategory = tools[0].getTopOptionCategory();
+		catoptions = topCategory.getOptions(configs[1]);
+		for (i=0; i<catoptions.length; i++)
+			if (catoptions[i][0] == null) break;
+		assertEquals(2, i);
+		assertEquals("List Option in Top", ((IOption)catoptions[0][1]).getName());
+		valueList = ((IOption)catoptions[0][1]).getStringListValue();
+		assertEquals("a", valueList[0]);
+		assertEquals("b", valueList[1]);
+		assertEquals("Boolean Option in Top", ((IOption)catoptions[1][1]).getName());
+		assertEquals(true, ((IOption)catoptions[1][1]).getBooleanValue());
+		assertEquals("-b", ((IOption)catoptions[1][1]).getCommand());
+		categories = topCategory.getChildCategories();
+		catoptions = categories[0].getOptions(configs[1]);
+		for (i=0; i<catoptions.length; i++)
+			if (catoptions[i][0] == null) break;
+		assertEquals(4, i);
+		assertEquals("String Option in Category", ((IOption)catoptions[0][1]).getName());
+		assertEquals("y", ((IOption)catoptions[0][1]).getStringValue());
+		assertEquals("Another String Option in Category", ((IOption)catoptions[1][1]).getName());
+		assertEquals("", ((IOption)catoptions[1][1]).getStringValue());
+		assertEquals("Enumerated Option in Category", ((IOption)catoptions[2][1]).getName());
+		valueList = ((IOption)catoptions[2][1]).getApplicableValues();
+		assertEquals(2, valueList.length);
+		assertEquals("Default Enum", valueList[0]);
+		assertEquals("Another Enum", valueList[1]);
+		assertEquals("-e1", ((IOption)catoptions[2][1]).getEnumCommand(valueList[0]));
+		assertEquals("-e2", ((IOption)catoptions[2][1]).getEnumCommand(valueList[1]));
+		assertEquals(1, tools.length);
+		assertEquals("Boolean Option in Category", ((IOption)catoptions[3][1]).getName());
+		assertEquals(false, ((IOption)catoptions[3][1]).getBooleanValue());
+		assertEquals("", ((IOption)catoptions[3][1]).getCommand());
+		assertEquals("-nob", ((IOption)catoptions[3][1]).getCommandFalse());
+		assertEquals(1, tools.length);
+		ITool tool = tools[0];
+		assertNotNull(tool);
+		assertEquals("Root Tool", tool.getName());
+		assertEquals("-r", tool.getOutputFlag());
+		assertTrue(tool.buildsFileType("foo"));
+		assertTrue(tool.buildsFileType("bar"));
+		assertTrue(tool.producesFileType("toor"));
+		assertTrue(tool.isHeaderFile("baz"));
+		assertEquals("doIt", tool.getToolCommand());
+		assertEquals("-La -Lb -b y -e1 -nob", tool.getToolFlags());
+		
+		// Completely Overridden configuration
+		assertEquals("Complete Override Config", configs[2].getName());
+		tools = configs[2].getTools();
+		assertEquals(1, tools.length);
+		assertEquals("Root Tool", tools[0].getName());
+		topCategory = tools[0].getTopOptionCategory();
+		catoptions = topCategory.getOptions(configs[2]);
+		for (i=0; i<catoptions.length; i++)
+			if (catoptions[i][0] == null) break;
+		assertEquals(2, i);
+		// Check that there's an string list with totally new values 
+		assertEquals("List Option in Top", ((IOption)catoptions[0][1]).getName());
+		assertEquals(IOption.STRING_LIST, ((IOption)catoptions[0][1]).getValueType());
+		valueList = ((IOption)catoptions[0][1]).getStringListValue();
+		assertTrue(valueList.length == 3);
+		assertEquals("d", valueList[0]);
+		assertEquals("e", valueList[1]);
+		assertEquals("f", valueList[2]);		
+		assertEquals("-L", ((IOption)catoptions[0][1]).getCommand());
+		// and a true boolean (commands should not have changed)
+		assertEquals("Boolean Option in Top", ((IOption)catoptions[1][1]).getName());
+		assertEquals(IOption.BOOLEAN, ((IOption)catoptions[1][1]).getValueType());
+		assertEquals(true, ((IOption)catoptions[1][1]).getBooleanValue());
+		assertEquals("-b", ((IOption)catoptions[1][1]).getCommand());
+		// Check that there's an overridden enumeration and string
+		categories = topCategory.getChildCategories();
+		catoptions = categories[0].getOptions(configs[2]);
+		for (i=0; i<catoptions.length; i++)
+			if (catoptions[i][0] == null) break;
+		assertEquals(4, i);
+		assertEquals("String Option in Category", ((IOption)catoptions[0][1]).getName());
+		assertEquals(IOption.STRING, ((IOption)catoptions[0][1]).getValueType());
+		assertEquals("overridden", ((IOption)catoptions[0][1]).getStringValue());
+		assertEquals("Another String Option in Category", ((IOption)catoptions[1][1]).getName());
+		assertEquals(IOption.STRING, ((IOption)catoptions[1][1]).getValueType());
+		assertEquals("alsooverridden", ((IOption)catoptions[1][1]).getStringValue());
+		assertEquals("Enumerated Option in Category", ((IOption)catoptions[2][1]).getName());
+		assertEquals(IOption.ENUMERATED, ((IOption)catoptions[2][1]).getValueType());
+		assertEquals("another.enum.option", ((IOption)catoptions[2][1]).getSelectedEnum());
+		assertEquals("Boolean Option in Category", ((IOption)catoptions[3][1]).getName());
+		assertEquals(IOption.BOOLEAN, ((IOption)catoptions[3][1]).getValueType());
+		assertEquals(true, ((IOption)catoptions[3][1]).getBooleanValue());
+		tool = tools[0];
+		assertEquals("-Ld -Le -Lf -b overridden -stralsooverridden -e2", tool.getToolFlags());
+		
+		// Make sure that the build manager returns the default makefile generator (not null)
+		assertNotNull(ManagedBuildManager.getBuildfileGenerator(configs[0]));
+	}
+	
+	/*
+	 * Do a full sanity check on the root managed project.
+	 */
+	private void checkRootManagedProject(IManagedProject managedProj, String testValue) throws BuildException {
+		String expectedCleanCmd = "del /myworld";
+		String expectedParserId = "org.eclipse.cdt.core.PE";
+		String[] expectedOSList = {"win32"};
+		String[] expectedArchList = {"all"};
+		assertTrue(managedProj.getProjectType().isTestProjectType());
+		IConfiguration[] configs = managedProj.getConfigurations();
+		if (configs[0].getArtifactName().equals("ManagedBuildTest")) {
+			assertEquals(configs[0].getArtifactExtension(), newExt);
+		} else {
+			assertEquals(configs[0].getArtifactExtension(), rootExt);
+		}
+		assertEquals(expectedCleanCmd, configs[0].getCleanCommand());
+		assertEquals("make", configs[0].getBuildCommand());
+		IToolChain toolChain = configs[0].getToolChain();
+		ITargetPlatform targetPlatform = toolChain.getTargetPlatform();
+		String[] binaryParsers = targetPlatform.getBinaryParserList();
+		assertEquals(binaryParsers.length, 1);
+	    assertEquals(binaryParsers[0], expectedParserId);
+		assertTrue(Arrays.equals(expectedOSList, toolChain.getOSList()));
+		assertTrue(Arrays.equals(expectedArchList, toolChain.getArchList()));
+		// This configuration defines no errors parsers.
+		assertNull(configs[0].getErrorParserIds());
+		assertTrue(Arrays.equals(configs[0].getErrorParserList(), CCorePlugin.getDefault().getAllErrorParsersIDs()));
+		
+		// Tools
+		ITool[] tools = configs[0].getTools();
+		// Root Tool
+		ITool rootTool = tools[0];
+		assertEquals("Root Tool", rootTool.getName());
+		// 6 Options are defined in the root tool
+		IOption[] options = rootTool.getOptions();
+		assertEquals(6, options.length);
+		// First option is a 3-element list with 1 built-in
+		assertEquals("List Option in Top", options[0].getName());
+		assertEquals(IOption.STRING_LIST, options[0].getValueType());
+		String[] valueList = options[0].getStringListValue();
+		assertEquals(2, valueList.length);
+		assertEquals("a", valueList[0]);
+		assertEquals("b", valueList[1]);
+		String[] builtInList = options[0].getBuiltIns();
+		assertEquals(1, builtInList.length);
+		assertEquals("c", builtInList[0]);
+		assertEquals(options[0].getCommand(), "-L");
+		// Next option is a boolean in top
+		assertEquals("Boolean Option in Top", options[1].getName());
+		assertEquals(IOption.BOOLEAN, options[1].getValueType());
+		assertEquals(false, options[1].getBooleanValue());
+		assertEquals("-b", options[1].getCommand());
+		// Next option is a string category
+		assertEquals("String Option in Category", options[2].getName());
+		assertEquals(IOption.STRING, options[2].getValueType());
+		assertEquals(testValue, options[2].getStringValue());
+		// Next option is another string category
+		assertEquals("Another String Option in Category", options[3].getName());
+		assertEquals(IOption.STRING, options[3].getValueType());
+		assertEquals("", options[3].getStringValue());
+		assertEquals("-str", options[3].getCommand());
+		// Next option is an enumerated
+		assertEquals("Enumerated Option in Category", options[4].getName());
+		assertEquals(IOption.ENUMERATED, options[4].getValueType());
+		// Post-2.0 enums store the ID, not the string value 
+		assertEquals("default.enum.option", options[4].getSelectedEnum());
+		assertEquals("-e1", options[4].getEnumCommand("default.enum.option"));
+		// Need this methof to populate the UI selection widget
+		valueList = options[4].getApplicableValues();
+		assertEquals(2, valueList.length);
+		assertEquals("Default Enum", valueList[0]);
+		assertEquals("Another Enum", valueList[1]);
+		// Test compatability with 1.2 scheme of getting the command from the name
+		assertEquals("-e1", options[4].getEnumCommand(valueList[0]));
+		assertEquals("-e2", options[4].getEnumCommand(valueList[1]));
+		// Final option is another boolean
+		assertEquals("Boolean Option in Category", options[5].getName());
+		assertEquals(IOption.BOOLEAN, options[5].getValueType());
+		assertEquals(false, options[5].getBooleanValue());
+		assertEquals("", options[5].getCommand());
+		assertEquals("-nob", options[5].getCommandFalse());
+		
+		// Option Categories
+		IOptionCategory topCategory = rootTool.getTopOptionCategory();
+		assertEquals("Root Tool", topCategory.getName());
+		Object[][] catoptions = topCategory.getOptions(configs[0]);
+		int i;
+		for (i=0; i<catoptions.length; i++)
+			if (catoptions[i][0] == null) break;
+		assertEquals(2, i);
+		IOption catOption = (IOption)catoptions[0][1]; 
+		assertEquals("List Option in Top", catOption.getName());
+		catOption = (IOption)catoptions[1][1]; 
+		assertEquals("Boolean Option in Top", catOption.getName());
+		IOptionCategory[] categories = topCategory.getChildCategories();
+		assertEquals(1, categories.length);
+		assertEquals("Category", categories[0].getName());
+		catoptions = categories[0].getOptions(configs[0]);
+		for (i=0; i<catoptions.length; i++)
+			if (catoptions[i][0] == null) break;
+		assertEquals(4, i);
+		catOption = (IOption)catoptions[0][1]; 
+		assertEquals("String Option in Category", catOption.getName());
+		catOption = (IOption)catoptions[1][1]; 
+		assertEquals("Another String Option in Category", catOption.getName());
+		catOption = (IOption)catoptions[2][1]; 
+		assertEquals("Enumerated Option in Category", catOption.getName());
+		catOption = (IOption)catoptions[3][1]; 
+		assertEquals("Boolean Option in Category", catOption.getName());
+
+		// There should be 3 defined configs
+		assertEquals(3, configs.length);
+		
+		// Root Config
+		IConfiguration rootConfig = configs[0];
+		assertEquals("Root Config", rootConfig.getName());
+
+		// Tool elements
+		tools = rootConfig.getTools();
+		assertEquals(1, tools.length);
+		assertEquals("Root Tool", tools[0].getName());
+		assertEquals("-r", tools[0].getOutputFlag());
+		assertTrue(tools[0].buildsFileType("foo"));
+		assertTrue(tools[0].buildsFileType("bar"));
+		assertTrue(tools[0].producesFileType("toor"));
+		assertEquals("doIt", tools[0].getToolCommand());
+		assertEquals("", tools[0].getOutputPrefix());
+		// The root tool defines one valid header file extension
+		assertTrue(rootTool.isHeaderFile("baz"));
+		assertTrue(tools[0].isHeaderFile("baz"));
+		assertEquals(ITool.FILTER_C, rootTool.getNatureFilter());
+		
+		// Partially Overriden Configuration
+		assertEquals("Root Override Config", configs[1].getName());
+		tools = configs[1].getTools();
+		assertEquals(1, tools.length);
+		assertEquals("Root Tool", tools[0].getName());
+		topCategory = tools[0].getTopOptionCategory();
+		catoptions = topCategory.getOptions(configs[1]);
+		for (i=0; i<catoptions.length; i++)
+			if (catoptions[i][0] == null) break;
+		assertEquals(2, i);
+		catOption = (IOption)catoptions[0][1]; 
+		assertEquals("List Option in Top", catOption.getName());
+		valueList = catOption.getStringListValue();
+		assertEquals("a", valueList[0]);
+		assertEquals("b", valueList[1]);
+		catOption = (IOption)catoptions[1][1]; 
+		assertEquals("Boolean Option in Top", catOption.getName());
+		assertEquals(true, catOption.getBooleanValue());
+		assertEquals("-b", catOption.getCommand());
+		categories = topCategory.getChildCategories();
+		catoptions = categories[0].getOptions(configs[1]);
+		for (i=0; i<catoptions.length; i++)
+			if (catoptions[i][0] == null) break;
+		assertEquals(4, i);
+		catOption = (IOption)catoptions[0][1]; 
+		assertEquals("String Option in Category", catOption.getName());
+		assertEquals("y", catOption.getStringValue());
+		catOption = (IOption)catoptions[1][1]; 
+		assertEquals("Another String Option in Category", catOption.getName());
+		assertEquals("", catOption.getStringValue());
+		catOption = (IOption)catoptions[2][1]; 
+		assertEquals("Enumerated Option in Category", catOption.getName());
+		valueList = catOption.getApplicableValues();
+		assertEquals(2, valueList.length);
+		assertEquals("Default Enum", valueList[0]);
+		assertEquals("Another Enum", valueList[1]);
+		catOption = (IOption)catoptions[2][1]; 
+		assertEquals("-e1", catOption.getEnumCommand(valueList[0]));
+		assertEquals("-e2", catOption.getEnumCommand(valueList[1]));
+		assertEquals(1, tools.length);
+		catOption = (IOption)catoptions[3][1]; 
+		assertEquals("Boolean Option in Category", catOption.getName());
+		assertEquals(false, catOption.getBooleanValue());
+		assertEquals("", catOption.getCommand());
+		assertEquals("-nob", catOption.getCommandFalse());
+		assertEquals(1, tools.length);
+		ITool tool = tools[0];
+		assertNotNull(tool);
+		assertEquals("Root Tool", tool.getName());
+		assertEquals("-r", tool.getOutputFlag());
+		assertTrue(tool.buildsFileType("foo"));
+		assertTrue(tool.buildsFileType("bar"));
+		assertTrue(tool.producesFileType("toor"));
+		assertTrue(tool.isHeaderFile("baz"));
+		assertEquals("doIt", tool.getToolCommand());
+		assertEquals("-La -Lb -b y -e1 -nob", tool.getToolFlags());
+		
+		// Completely Overridden configuration
+		assertEquals("Complete Override Config", configs[2].getName());
+		tools = configs[2].getTools();
+		assertEquals(1, tools.length);
+		assertEquals("Root Tool", tools[0].getName());
+		topCategory = tools[0].getTopOptionCategory();
+		catoptions = topCategory.getOptions(configs[2]);
+		for (i=0; i<catoptions.length; i++)
+			if (catoptions[i][0] == null) break;
+		assertEquals(2, i);
+		// Check that there's an string list with totally new values 
+		catOption = (IOption)catoptions[0][1]; 
+		assertEquals("List Option in Top", catOption.getName());
+		assertEquals(IOption.STRING_LIST, catOption.getValueType());
+		valueList = catOption.getStringListValue();
+		assertTrue(valueList.length == 3);
+		assertEquals("d", valueList[0]);
+		assertEquals("e", valueList[1]);
+		assertEquals("f", valueList[2]);		
+		assertEquals("-L", catOption.getCommand());
+		// and a true boolean (commands should not have changed)
+		catOption = (IOption)catoptions[1][1]; 
+		assertEquals("Boolean Option in Top", catOption.getName());
+		assertEquals(IOption.BOOLEAN, catOption.getValueType());
+		assertEquals(true, catOption.getBooleanValue());
+		assertEquals("-b", catOption.getCommand());
+		// Check that there's an overridden enumeration and string
+		categories = topCategory.getChildCategories();
+		catoptions = categories[0].getOptions(configs[2]);
+		for (i=0; i<catoptions.length; i++)
+			if (catoptions[i][0] == null) break;
+		assertEquals(4, i);
+		catOption = (IOption)catoptions[0][1]; 
+		assertEquals("String Option in Category", catOption.getName());
+		assertEquals(IOption.STRING, catOption.getValueType());
+		assertEquals("overridden", catOption.getStringValue());
+		catOption = (IOption)catoptions[1][1]; 
+		assertEquals("Another String Option in Category", catOption.getName());
+		assertEquals(IOption.STRING, catOption.getValueType());
+		assertEquals("alsooverridden", catOption.getStringValue());
+		catOption = (IOption)catoptions[2][1]; 
+		assertEquals("Enumerated Option in Category", catOption.getName());
+		assertEquals(IOption.ENUMERATED, catOption.getValueType());
+		assertEquals("another.enum.option", catOption.getSelectedEnum());
+		catOption = (IOption)catoptions[3][1]; 
+		assertEquals("Boolean Option in Category", catOption.getName());
+		assertEquals(IOption.BOOLEAN, catOption.getValueType());
+		assertEquals(true, catOption.getBooleanValue());
+		tool = tools[0];
+		assertEquals("-Ld -Le -Lf -b overridden -stralsooverridden -e2", tool.getToolFlags());
+		
+		// Make sure that the build manager returns the default makefile generator (not null)
+		assertNotNull(ManagedBuildManager.getBuildfileGenerator(configs[0]));
+	}
+
+	/*
+	 * The Sub Sub project type has a reference to a tool that is defined  
+	 * independently from the project type itself. This is a common pattern 
+	 * for tools that are shared between many project types.
+	 * 
+	 * The tool itself is defined as having two option categories, with 
+	 * one option in each category. To test that the reference is properly 
+	 * inheritted, the project type overrides the default value of the boolean 
+	 * option. 
+	 * 
+	 * The test confirms that the basic settings are inheritted through the 
+	 * reference, and that the overridden value is used instead of the 
+	 * default. It also tests that the command can be overidden through a 
+	 * tool reference.
+	 * 
+	 * Finally, the string option in the configuration is overridden and the 
+	 * test confirms that it contains both the overridden boolean that the 
+	 * project type provides, and the overridden string that it provides.   
+	 *  
+	 * @param testSubSub
+	 */
+	private void checkSubSubProjectType(IProjectType projType) {
+		final String indyToolName = "Target Independent Tool";
+		final String indyToolCommand = "RC.EXE";
+		final String indyToolInputExt = "rc";
+		final String indyToolOutputExt = "free";
+		final String indyToolOutFlag = "/fo";
+		final String indyToolHeader = "h";
+		final String indyToolHeaderNot = "j";
+		final String indyCatOne = "Free";
+		final String indyCatTwo = "Chained";
+		final String freeOptName = "String in Free";
+		final String chainedOptName = "Boolean in Chained";
+		final String freeOptValue = "Live free or die";
+		final String newCmd = "Let the Wookie win";
+		final String stringOverride = "The future language of slaves";
+		
+		IConfiguration[] configs = projType.getConfigurations();
+		// Check the inherited clean command
+		assertEquals("rm -yourworld", configs[0].getCleanCommand());
+		// Check that the make command is overridden from parent
+		assertEquals("nmake", configs[0].getBuildCommand());
+		// Make sure we get the proper binary parser
+		IToolChain toolChain = configs[0].getToolChain();
+		ITargetPlatform targetPlatform = toolChain.getTargetPlatform();
+		assertEquals("org.eclipse.cdt.core.ELF", targetPlatform.getBinaryParserList()[0]);
+		// Make sure the os list is inherited
+		String[] expectedOSList = {"win32","linux","solaris"};
+		assertTrue(Arrays.equals(expectedOSList, toolChain.getOSList()));
+		// Make sure the arch list is inherited
+		String[] expectedArchList = {"x86", "ppc"}; 
+		assertTrue(Arrays.equals(expectedArchList, toolChain.getArchList()));
+
+		// Get the 5 configurations (3 from test, 1 from test sub and 1 from this)
+		assertEquals(5, configs.length);
+		
+		// Check the tools. We should have 3 (1 from each parent and the one referenced).
+		ITool[] tools = configs[0].getTools();
+		assertEquals(3, tools.length);
+		ITool toolRef = tools[0];
+		
+		// Make sure we get all the tool settings
+		assertEquals(toolRef.getName(), indyToolName);
+		assertEquals(toolRef.getToolCommand(), indyToolCommand);
+		assertTrue(toolRef.buildsFileType(indyToolInputExt));
+		assertEquals(toolRef.getOutputExtension(indyToolInputExt), indyToolOutputExt);
+		assertEquals(toolRef.getOutputFlag(), indyToolOutFlag);
+		assertTrue(toolRef.isHeaderFile(indyToolHeader));
+		assertFalse(toolRef.isHeaderFile(indyToolHeaderNot));
+		assertEquals(toolRef.getNatureFilter(), ITool.FILTER_BOTH);
+		// Check out the referenced tool and make sure we get all option categories
+		IOptionCategory topCategory = toolRef.getTopOptionCategory();
+		IOptionCategory[] categories = topCategory.getChildCategories();
+		assertEquals(1, categories.length);
+		assertEquals(categories[0].getName(), indyCatOne);
+		IOptionCategory[] subCategories = categories[0].getChildCategories();
+		// Is the chained category a subcategory
+		assertEquals(1, subCategories.length);
+		assertEquals(subCategories[0].getName(), indyCatTwo);
+		// Make sure the option in the top category is correct
+		Object[][] optsInCat = categories[0].getOptions(configs[0]);
+		int i;
+		for (i=0; i<optsInCat.length; i++)
+			if (optsInCat[i][0] == null) break;
+		assertEquals(1, i);
+		IOption optCat = (IOption)optsInCat[0][1];
+		assertEquals(freeOptName, optCat.getName());
+		try {
+			// We get the option categories and options from the tool itself, but the 
+			// tool reference will have a set of 0 to n option references that contain 
+			// overridden settings. In this case, the string is inheritted and should 
+			// not be reference
+			assertEquals(IOption.STRING, optCat.getValueType());
+			IOption stringOpt = toolRef.getOptionById(optCat.getId());
+			assertTrue(stringOpt instanceof Option);
+			assertEquals(freeOptValue, stringOpt.getStringValue());
+		} catch (BuildException e1) {
+			fail("Failed getting string value in subsub :" + e1.getLocalizedMessage());
+		}
+
+		// Do the same for the options in the child cat
+		Object[][] optsInSubCat = subCategories[0].getOptions(configs[0]);
+		for (i=0; i<optsInSubCat.length; i++)
+			if (optsInSubCat[i][0] == null) break;
+		assertEquals(1, i);
+		IOption booleanRef = toolRef.getOptionById(((IOption)optsInSubCat[0][1]).getId());
+		assertEquals(chainedOptName, booleanRef.getName());
+		try {
+			assertEquals(IOption.BOOLEAN, booleanRef.getValueType());
+			assertTrue(booleanRef.getBooleanValue());
+		} catch (BuildException e) {
+			fail("Failure getting boolean value in subsub: " + e.getLocalizedMessage());
+		}
+		
+		// Test that the tool command can be changed through the reference
+		toolRef.setToolCommand(newCmd);
+		assertEquals(toolRef.getToolCommand(), newCmd);
+		
+		// Muck about with the options in the local config
+		IConfiguration subSubConfig = projType.getConfiguration("sub.sub.config");
+		assertNotNull(subSubConfig);
+		ITool[] configTools = subSubConfig.getTools();
+		// This tool ref is inherited from parent, so it does not belong to the config
+		ITool configToolRef = configTools[0];
+		assertNotNull(configToolRef);
+		optCat = (IOption)optsInCat[0][1];
+		IOption configStringOpt = configToolRef.getOptionById(optCat.getId());
+		assertNotNull(configStringOpt);
+		// Override the string option		
+		try {
+			subSubConfig.setOption(configToolRef, configStringOpt, stringOverride);
+		} catch (BuildException e) {
+			fail("Failure setting string value in subsubconfiguration: " + e.getLocalizedMessage());
+		}
+		// Now the config should have a tool ref to the independent tool
+		configTools = subSubConfig.getTools();
+		configToolRef = configTools[0];
+		assertNotNull(configToolRef);
+		
+		// Test that the string option is overridden in the configuration
+		optsInCat = categories[0].getOptions(configs[0]);
+		for (i=0; i<optsInCat.length; i++)
+			if (optsInCat[i][0] == null) break;
+		assertEquals(1, i);
+		optCat = (IOption)optsInCat[0][1];
+		assertEquals(freeOptName, optCat.getName());
+		configStringOpt = configToolRef.getOptionById(optCat.getId());
+		try {
+			assertEquals(stringOverride, configStringOpt.getStringValue());
+		} catch (BuildException e) {
+			fail("Failure getting string value in subsubconfiguration: " + e.getLocalizedMessage());
+		}
+		// The tool should also contain the boolean option set to true
+		IOption optSubCat = (IOption)optsInSubCat[0][1];
+		IOption configBoolOpt = configToolRef.getOptionById(optSubCat.getId());
+		assertNotNull(configBoolOpt);
+		try {
+			assertTrue(configBoolOpt.getBooleanValue());
+		} catch (BuildException e) {
+			fail("Failure getting boolean value in subsubconfiguration: " + e.getLocalizedMessage());
+		}
+			
+		// Override it in config and retest
+		try {
+			subSubConfig.setOption(configToolRef, configBoolOpt, false);
+		} catch (BuildException e) {
+			fail("Failure setting boolean value in subsubconfiguration: " + e.getLocalizedMessage());
+		}
+		optsInSubCat = subCategories[0].getOptions(configs[0]);
+		for (i=0; i<optsInSubCat.length; i++)
+			if (optsInSubCat[i][0] == null) break;
+		assertEquals(1, i);
+		configBoolOpt = configToolRef.getOptionById(((IOption)optsInSubCat[0][1]).getId());
+		assertEquals(chainedOptName, booleanRef.getName());
+		try {
+			assertFalse(configBoolOpt.getBooleanValue());
+		} catch (BuildException e) {
+			fail("Failure getting boolean value in subsubconfiguration: " + e.getLocalizedMessage());
+		}
+	}
+
+	/*
+	 * Do a sanity check on the values in the sub-project type. Most of the
+	 * sanity on the how build model entries are read is performed in 
+	 * the root project type check, so these tests just verify that the the sub 
+	 * project type properly inherits from its parent. For the new options
+	 * in the sub project type, the test does a sanity check just to be complete.
+	 */
+	private void checkSubProjectType(IProjectType projType) throws BuildException {
+		final String expectedFlags = "-I/usr/include -I/opt/gnome/include -IC:\\home\\tester/include -I\"../includes\" x y z";
+		
+		IConfiguration[] configs = projType.getConfigurations();
+		// Check the overridden clean command
+		assertEquals("rm -yourworld", configs[0].getCleanCommand());
+		// Make sure the projType inherits the make command
+		assertEquals("make", configs[0].getBuildCommand());
+		// Make sure the binary parser is hard-coded and available
+		IToolChain toolChain = configs[0].getToolChain();
+		ITargetPlatform targetPlatform = toolChain.getTargetPlatform();
+		assertEquals("org.eclipse.cdt.core.PE", targetPlatform.getBinaryParserList()[0]);
+		String[] expectedOSList = {"win32","linux","solaris"};
+		assertTrue(Arrays.equals(expectedOSList, toolChain.getOSList()));
+		// Make sure the list is overridden
+		String[] expectedArchList = {"x86", "ppc"};
+		assertTrue(Arrays.equals(expectedArchList, toolChain.getArchList()));
+
+		// Make sure this is a test projType
+		assertTrue(projType.isTestProjectType());
+		// Make sure the build artifact extension is there
+		assertEquals(configs[0].getArtifactExtension(), subExt);
+				
+		// Get the tools for this projType
+		ITool[] tools = configs[0].getTools();
+		// Do we inherit properly from parent
+		ITool rootTool = tools[0];
+		assertEquals("Root Tool", rootTool.getName());
+		// Now get the tool defined for this projType
+		ITool subTool = tools[1];
+		assertEquals("Sub Tool", subTool.getName());
+		// Confirm that it has four options
+		IOption[] subOpts = subTool.getOptions();
+		assertEquals(5, subOpts.length);
+		assertEquals("", subTool.getOutputFlag());
+		assertTrue(subTool.buildsFileType("yarf"));
+		assertTrue(subTool.producesFileType("bus"));
+		assertEquals("", subTool.getToolCommand());
+		assertEquals("lib", subTool.getOutputPrefix());
+		assertTrue(subTool.isHeaderFile("arf"));
+		assertTrue(subTool.isHeaderFile("barf"));
+		assertEquals(ITool.FILTER_BOTH, subTool.getNatureFilter());
+		
+		// Do a sanity check on the options 
+		assertEquals("Include Paths", subOpts[0].getName());
+		assertEquals(IOption.INCLUDE_PATH, subOpts[0].getValueType());
+		String[] incPath = subOpts[0].getIncludePaths();
+		assertEquals(2, incPath.length);
+		assertEquals("/usr/include", incPath[0]);
+		assertEquals("/opt/gnome/include", incPath[1]);
+		String[] builtInPaths = subOpts[0].getBuiltIns();
+		assertEquals(1, builtInPaths.length);
+		assertEquals("/usr/gnu/include", builtInPaths[0]);
+		assertEquals("-I", subOpts[0].getCommand());
+		assertEquals(IOption.BROWSE_DIR, subOpts[0].getBrowseType());
+				
+		// There are no user-defined preprocessor symbols
+		assertEquals("Defined Symbols", subOpts[1].getName());
+		assertEquals(IOption.PREPROCESSOR_SYMBOLS, subOpts[1].getValueType());
+		String[] defdSymbols = subOpts[1].getDefinedSymbols();
+		assertEquals(0, defdSymbols.length);
+		assertEquals("-D", subOpts[1].getCommand());
+		// But there is a builtin
+		String[] builtInSymbols = subOpts[1].getBuiltIns();
+		assertEquals(1, builtInSymbols.length);
+		assertEquals("BUILTIN", builtInSymbols[0]);
+		// Broswe type should be none
+		assertEquals(IOption.BROWSE_NONE, subOpts[1].getBrowseType());
+
+		assertEquals("More Includes", subOpts[2].getName());
+		assertEquals(IOption.INCLUDE_PATH, subOpts[2].getValueType());
+		String[] moreIncPath = subOpts[2].getIncludePaths();
+		assertEquals(2, moreIncPath.length);
+		assertEquals("C:\\home\\tester/include", moreIncPath[0]);
+		assertEquals("-I", subOpts[2].getCommand());
+		assertEquals(IOption.BROWSE_DIR, subOpts[2].getBrowseType());
+		
+		// Check the user object option
+		assertEquals("User Objects", subOpts[3].getName());
+		assertEquals(IOption.OBJECTS, subOpts[3].getValueType());
+		String[] objs = subOpts[3].getUserObjects();
+		assertEquals(2, objs.length);
+		assertEquals("obj1.o", objs[0]);
+		assertEquals("obj2.o", objs[1]);
+		assertEquals(IOption.BROWSE_FILE, subOpts[3].getBrowseType());
+		assertEquals("", subOpts[3].getCommand());
+		
+		// There should be a string list with no command
+		assertEquals("No Command StringList", subOpts[4].getName());
+		assertEquals(IOption.STRING_LIST, subOpts[4].getValueType());
+		
+		// Make sure the tool flags look right
+		assertEquals(subTool.getToolFlags(), expectedFlags);
+		
+		// Get the configs for this projType; it should inherit all the configs defined for the parent
+		assertEquals(4, configs.length);
+		assertEquals("Sub Config", configs[0].getName());
+		assertEquals("Root Config", configs[1].getName());
+		assertEquals("Root Override Config", configs[2].getName());
+		assertEquals("Complete Override Config", configs[3].getName());
+	}
+
+	private void checkForwardProjectTypes(IProjectType parent, IProjectType child, IProjectType grandchild) {
+		// check that the projType parent reference has been resolved.
+		assertEquals(parent, child.getSuperClass());
+		assertEquals(child, grandchild.getSuperClass());
+		
+		// get the parent tool
+		IConfiguration[] parentConfigs = parent.getConfigurations();
+		ITool[] parentTools = parentConfigs[0].getTools();
+		assertEquals(1, parentTools.length);
+		ITool parentTool = parentTools[0];
+		assertNotNull(parentTool);
+
+		// check option categories
+		IOption option = parentTool.getOptionById("test.forward.option");
+		assertNotNull(option);
+		IOptionCategory[] firstLevel = parentTool.getTopOptionCategory()
+			.getChildCategories();
+		assertEquals(1, firstLevel.length);
+		IOptionCategory[] secondLevel = firstLevel[0].getChildCategories();
+		assertEquals(1, secondLevel.length);
+		assertEquals(0, secondLevel[0].getChildCategories().length);
+		Object[][] optList = secondLevel[0].getOptions(parentConfigs[0]);
+		int i;
+		for (i=0; i<optList.length; i++)
+			if (optList[i][0] == null) break;
+		assertEquals(1, i);
+		assertEquals(option, optList[0][1]);
+		
+		// get the tool reference from the child
+		IConfiguration[] childConfigs = child.getConfigurations();
+		ITool[] childTools = childConfigs[0].getTools();
+		assertEquals(1, childTools.length);
+		ITool childToolRef = childTools[0];
+		assertEquals(parentTool.getSuperClass(), childToolRef.getSuperClass());
+		
+		// get and check the option reference
+		IOption optRef = childToolRef.getOptionById("test.forward.option");
+		assertEquals(option, optRef);
+		
+		// get the tool reference from the grandchild
+		IConfiguration[] grandConfigs = grandchild.getConfigurations();
+		ITool[] grandTools = grandConfigs[0].getTools();
+		assertEquals(1, grandTools.length);
+		ITool grandToolRef = grandTools[0];
+		assertEquals(parentTool.getSuperClass(), grandToolRef.getSuperClass());
+		
+	}
+	
+	public void checkProviderProjectType(IProjectType projType) throws Exception {
+		Properties props = new Properties();
+		props.load(getClass().getResourceAsStream("test_commands"));
+
+		// check that this projType is in the file
+		String command = props.getProperty(projType.getId());
+		assertNotNull(command);
+		
+		IProjectType parent = projType.getSuperClass();
+		assertNotNull(parent);
+		assertEquals("test.forward.parent.target", parent.getId());
+		
+		IConfiguration[] configs = projType.getConfigurations();
+		ITool toolRef = configs[0].getFilteredTools()[0];
+		assertEquals(command, toolRef.getToolCommand());
+	}
+	
+	/**
+	 * Remove all the project information associated with the project used during test.
+	 */
+	public void cleanup() {
+		removeProject(projectName);
+		removeProject(projectName2);
+	}
+	
+	/* (non-Javadoc)
+	 * Create a new project named <code>name</code> or return the project in 
+	 * the workspace of the same name if it exists.
+	 * 
+	 * @param name The name of the project to create or retrieve.
+	 * @return 
+	 * @throws CoreException
+	 */
+	private IProject createProject(String name) throws CoreException {
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		final IProject newProjectHandle = root.getProject(name);
+		IProject project = null;
+		
+		if (!newProjectHandle.exists()) {
+			IWorkspace workspace = ResourcesPlugin.getWorkspace();
+			IWorkspaceDescription workspaceDesc = workspace.getDescription();
+			workspaceDesc.setAutoBuilding(false);
+			workspace.setDescription(workspaceDesc);
+			IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());
+			//description.setLocation(root.getLocation());
+			project = CCorePlugin.getDefault().createCProject(description, newProjectHandle, new NullProgressMonitor(), /*MakeCorePlugin.MAKE_PROJECT_ID*/ManagedBuilderCorePlugin.MANAGED_MAKE_PROJECT_ID);
+
+			// Now associate the builder with the project
+			ManagedBuildTestHelper.addManagedBuildNature(project);
+		} else {
+			IWorkspace workspace = ResourcesPlugin.getWorkspace();
+			IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+				public void run(IProgressMonitor monitor) throws CoreException {
+					newProjectHandle.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+				}
+			};
+			NullProgressMonitor monitor = new NullProgressMonitor();
+			workspace.run(runnable, root, IWorkspace.AVOID_UPDATE, monitor);
+			project = newProjectHandle;
+		}
+        
+		// Open the project if we have to
+		if (!project.isOpen()) {
+			project.open(new NullProgressMonitor());
+		}
+				
+		return project;	
+	}
+	
+	/**
+	 * Remove the <code>IProject</code> with the name specified in the argument from the 
+	 * receiver's workspace.
+	 *  
+	 * @param name
+	 */
+	private void removeProject(String name) {
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		IProject project = root.getProject(name);
+		if (project.exists()) {
+			try {
+				Thread.sleep(1000);
+			} catch (InterruptedException e1) {
+			} finally {
+				try {
+					System.gc();
+					System.runFinalization();
+					project.delete(true, true, null);
+				} catch (CoreException e2) {
+					assertTrue(false);
+				}
+			}
+		}
+	}
+	/**
+	 * @throws CoreException
+	 * @throws BuildException
+	 */
+	public void testErrorParsers() throws BuildException {
+		// Create new project
+		IProject project = null;
+		try {
+			project = createProject(projectName2);
+			// Now associate the builder with the project
+			ManagedBuildTestHelper.addManagedBuildNature(project);
+			IProjectDescription description = project.getDescription();
+			// Make sure it has a managed nature
+			if (description != null) {
+				assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+			}
+		} catch (CoreException e) {
+			fail("Test failed on error parser project creation: " + e.getLocalizedMessage());
+		}
+		
+		// Find the base project Type definition
+		IProjectType projType = ManagedBuildManager.getProjectType("test.error.parsers");
+		assertNotNull(projType);
+		
+		// Create the target for our project that builds a dummy executable
+		IManagedProject newProj = ManagedBuildManager.createManagedProject(project, projType);
+		assertEquals(newProj.getName(), projType.getName());
+		ManagedBuildManager.setNewProjectVersion(project);
+
+		ManagedBuildManager.getBuildInfo(project).setValid(true);
+		// Initialize the path entry container
+		IStatus initResult = ManagedBuildManager.initBuildInfoContainer(project);
+		if (initResult.getCode() != IStatus.OK) {
+			fail("Initializing build information failed for: " + project.getName() + " because: " + initResult.getMessage());
+		}
+		
+		// Copy over the configs
+		IConfiguration[] baseConfigs = projType.getConfigurations();
+		for (int i = 0; i < baseConfigs.length; ++i) {
+			newProj.createConfiguration(baseConfigs[i], baseConfigs[i].getId() + "." + i);
+		}
+		
+		// Test this out
+		checkErrorParsersProject(newProj);
+		
+		// Save, close, reopen and test again
+		ManagedBuildManager.saveBuildInfo(project, true);
+		ManagedBuildManager.removeBuildInfo(project);
+		try {
+			project.close(null);
+		} catch (CoreException e) {
+			fail("Failed on error parser project close: " + e.getLocalizedMessage());
+		}
+		try {
+			project.open(null);
+		} catch (CoreException e) {
+			fail("Failed on error parser project open: " + e.getLocalizedMessage());
+		}
+		
+		// Test that the default config was remembered
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+
+		// Check the rest of the default information
+		checkErrorParsersProject(info.getManagedProject());
+		ManagedBuildManager.removeBuildInfo(project);
+	}
+	
+	/*
+	 * Do a sanity check on the error parsers target.
+	 */
+	private void checkErrorParsersProject(IManagedProject proj) throws BuildException {
+		// Target stuff
+		String expectedBinParserId = "org.eclipse.cdt.core.PE";
+		IConfiguration[] configs = proj.getConfigurations();
+		IToolChain toolChain = configs[0].getToolChain();
+		ITargetPlatform targetPlatform = toolChain.getTargetPlatform();
+		assertEquals(expectedBinParserId, targetPlatform.getBinaryParserList()[0]);
+		// This target defines errors parsers.  Check that the error parsers
+		// have been assigned.
+		assertEquals("org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser", configs[0].getErrorParserIds());
+		
+		// Tool
+		ITool[] tools = configs[0].getTools();
+		ITool rootTool = tools[0];
+		assertEquals(1, tools.length);
+		assertEquals("EP Tool", tools[0].getName());
+		assertEquals("-o", tools[0].getOutputFlag());
+		assertTrue(tools[0].buildsFileType("y"));
+		assertTrue(tools[0].buildsFileType("x"));
+		assertTrue(tools[0].producesFileType("xy"));
+		assertEquals("EP", tools[0].getToolCommand());
+		assertEquals(ITool.FILTER_C, rootTool.getNatureFilter());
+
+		// There should be one defined configs
+		assertEquals(1, configs.length);
+	}
+	
+	/**
+	 * Test that the build artifact of a <code>ITarget</code> can be modified
+	 * programmatically.
+	 */
+	public void testConfigBuildArtifact () throws CoreException {
+		// Open the test project
+		IProject project = createProject(projectName);
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		assertNotNull(info);
+		IManagedProject managedProj = info.getManagedProject();
+		assertNotNull(managedProj);
+		IConfiguration defaultConfig = info.getDefaultConfiguration();
+		assertNotNull(defaultConfig);
+		
+		// Set the build artifact of the configuration
+		String ext = defaultConfig.getArtifactExtension();
+		String name = project.getName() + "." + ext;
+		defaultConfig.setArtifactName(name);
+		
+		// Save, close, reopen and test again
+		ManagedBuildManager.saveBuildInfo(project, false);
+		ManagedBuildManager.removeBuildInfo(project);
+		project.close(null);
+		project.open(null);
+
+		// Check the artifact name
+		info = ManagedBuildManager.getBuildInfo(project);
+		assertNotNull(info);
+		managedProj = info.getManagedProject();
+		assertNotNull(managedProj);
+		defaultConfig = info.getDefaultConfiguration();
+		assertNotNull(defaultConfig);
+		assertEquals(name, defaultConfig.getArtifactName());
+	}
+
+	public void testThatAlwaysFails() {
+		assertTrue(false);
+	}
+	
+}
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests_SharedToolOptions.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests_SharedToolOptions.java
new file mode 100644
index 0000000..df5517d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCoreTests_SharedToolOptions.java
@@ -0,0 +1,564 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 Symbian Ltd and others.
+ * 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
+ *
+ * Contributors:
+ * Symbian - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.net.URL;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.cdt.managedbuilder.core.ManagedOptionValueHandler;
+import org.eclipse.cdt.managedbuilder.testplugin.CTestPlugin;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+
+// TODO LK - write test for resource configurations + IOptionCategory.getOptions(config)
+// TODO LK - write tests for EVENT_OPEN call-backs
+// TODO LK - do not deprecate IOption.getParent() as suggested by Leo
+
+/*
+ *  These tests exercise CDT 3.0 shared tool options extensions 
+ */
+public class ManagedBuildCoreTests_SharedToolOptions extends TestCase {
+
+	class IconComparator {
+		static final int None = 0;
+		static final int One  = 1;
+		static final int Two  = 2;
+
+		// The following uses a numbering scheme defined for
+		// testCategory and testOption
+		
+		// Co-ordinates of option groups 2nd level that have icon 1
+		int One_i[] = { 3, 2, 4, 7 };
+		int One_j[] = { 1, 2, 1, 1 };
+		// Co-ordinates of option groups 2nd level that have icon 1
+		int Two_i[] = { 2, 6 };
+		int Two_j[] = { 1, 1 };
+		
+		IconComparator()
+		{
+			assertEquals(One_i.length, One_j.length);
+			assertEquals(Two_i.length, Two_j.length);				
+		}
+		
+		int Compare(int i, int j)
+		{
+			int k;
+			
+			// Check for icon 1
+			for (k=0; k < One_i.length; k++)
+			{
+				if ( (i == One_i[k]) && (j == One_j[k]) )
+				{
+					return One;
+				}					
+			}
+			// Check for icon 2
+			for (k=0; k < Two_i.length; k++)
+			{
+				if ( (i == Two_i[k]) && (j == Two_j[k]) )
+				{
+					return Two;
+				}					
+			}
+			// None of them
+			return None;
+		}
+	}	
+
+	class ValueHandlerComparator {
+		static final int MBS  = 0;
+		static final int TEST = 1;
+
+		// The following uses a numbering scheme defined for
+		// testCategory and testOption
+		
+		// Co-ordinates of option groups 2nd level that have a test value handler
+		int Test_i[]      = { 2, 2, 3, 5, 7 };
+		int Test_j[]      = { 1, 4, 2, 1, 1 };
+		String Test_arg[] = { "Option2.1.1", "Option2.2.2", "Option3.1.2", "Option5.1", "Option7.1" };
+		String last_arg;
+		
+		ValueHandlerComparator()
+		{
+			assertEquals(Test_i.length, Test_j.length);
+			assertEquals(Test_i.length, Test_arg.length);
+			last_arg = "";
+		}
+		
+		int Compare(int i, int j) {
+			int k;
+			
+			// Check for Test handler
+			for (k=0; k < Test_i.length; k++) {
+				if ( (i == Test_i[k]) && (j == Test_j[k]) ) {
+					last_arg = Test_arg[k];
+					return TEST;
+				}					
+			}
+			// None of them
+			last_arg = "";
+			return MBS;			
+		}
+		
+		String getArg() {
+			return last_arg;
+		}
+	}	
+	
+	// Constants
+	private final String projectName = "test30_sto";
+	private final String projectID   = "test30_sto.dummy";
+	private final String configID    = "test30_sto.dummy.config";
+	private final String configName  = "Configuration for test30_sto";
+
+	// Control variables
+	private boolean testExtensionElements = true;
+	private boolean testIsSetup = false;
+	
+	// Chain leading to tool, etc 
+	private IProjectType    testProject;
+	private IConfiguration  testConfig;	
+	private IToolChain      testToolChain;
+	
+	// Direct children of toolChain
+	private ITool           testTools[];
+	private IOptionCategory testCategoryTop[];
+	private IOption         testOptionTop[];
+	
+	// 2nd level children (of toolChain and tool) mapped in the following pattern
+	// onto the arrays:
+	//    tool_1: cat_1.1  cat_1.2 cat_1.3 ...
+	//    ...
+	//    tool_n: cat_n.1  catn.2 
+	// The same 2d-array is used to store top-level categories
+	//    n+1:    topcat_1
+	//    ...
+	//    n+m:    topcat_m
+	private Object          testCategory[][];
+	private Object          testOption[][];	
+	
+	// Helper classes
+	private IconComparator  iconComparator;
+	private ValueHandlerComparator valueHandlerComparator;
+	
+	public ManagedBuildCoreTests_SharedToolOptions(String name) {
+		super(name);
+		
+		iconComparator = new IconComparator();
+		valueHandlerComparator = new ValueHandlerComparator();
+	}
+	
+	public static Test suite() {
+		TestSuite suite = new TestSuite(ManagedBuildCoreTests_SharedToolOptions.class.getName());
+		
+		suite.addTest(new ManagedBuildCoreTests_SharedToolOptions("testIcons"));
+		suite.addTest(new ManagedBuildCoreTests_SharedToolOptions("testValueHandlers"));
+		suite.addTest(new ManagedBuildCoreTests_SharedToolOptions("testOptions"));
+		suite.addTest(new ManagedBuildCoreTests_SharedToolOptions("testConfiguration"));
+		
+		return suite;
+	}
+
+	private void assertCorrectId(String s1, String s2) {
+		if (testExtensionElements == true) {
+			// A strict comparison is required
+			assertTrue(s1.equals(s2));
+		} else {
+			// Compare for non-extension element Id's
+			assertTrue(s1.startsWith(s2+"."));			
+		}
+	}
+	
+	private IProject createProject(String name) throws CoreException {
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		final IProject newProjectHandle = root.getProject(name);
+		IProject project = null;
+		
+		if (!newProjectHandle.exists()) {
+			IWorkspace workspace = ResourcesPlugin.getWorkspace();
+			IWorkspaceDescription workspaceDesc = workspace.getDescription();
+			workspaceDesc.setAutoBuilding(false);
+			workspace.setDescription(workspaceDesc);
+			IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());
+			//description.setLocation(root.getLocation());
+			project = CCorePlugin.getDefault().createCProject(description, newProjectHandle, new NullProgressMonitor(), ManagedBuilderCorePlugin.MANAGED_MAKE_PROJECT_ID);
+		} else {
+			IWorkspace workspace = ResourcesPlugin.getWorkspace();
+			IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+				public void run(IProgressMonitor monitor) throws CoreException {
+					newProjectHandle.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+				}
+			};
+			NullProgressMonitor monitor = new NullProgressMonitor();
+			workspace.run(runnable, root, IWorkspace.AVOID_UPDATE, monitor);
+			project = newProjectHandle;
+		}
+        
+		// Open the project if we have to
+		if (!project.isOpen()) {
+			project.open(new NullProgressMonitor());
+		}
+				
+		return project;	
+	}
+	
+	/**
+	 * Sets up the test environment for the default project
+	 */
+	private void setupDefaultProject() throws Exception {
+
+		// The assertCorrectId() call needs to be set up 
+		testExtensionElements = true;
+		// Get all the key structures of our test and do some sanity checking 
+		//
+		testProject = ManagedBuildManager.getProjectType(projectID);
+		assertNotNull(testProject);		
+		assertTrue(testProject.isTestProjectType());
+		assertFalse(testProject.isAbstract());
+		
+		// Get and check project configurations - only one
+		//
+		setupConfiguration();
+		assertTrue(testConfig.isExtensionElement());
+	}
+	
+	/**
+	 * Sets up the test configuration from the project set
+	 * in the test
+	 */
+	private void setupConfiguration() throws Exception {
+		
+		IConfiguration[] configs = testProject.getConfigurations();
+		assertNotNull(configs);
+		assertEquals(configs.length, 1);
+		testConfig = configs[0]; 
+	    assertEquals(testConfig.getId(), configID);		     
+	    assertEquals(testConfig.getName(), configName);		
+	}
+	
+	/**
+	 * Sets up the test environment for a project created from the
+	 * default project
+	 */
+	private void setupProject() throws Exception {
+
+		// The assertCorrectId() call needs to be set up 
+		testExtensionElements = false;
+		// Create new project
+		IProject project = null;
+		try {
+			project = createProject(projectName);
+			// Now associate the builder with the project
+			ManagedBuildTestHelper.addManagedBuildNature(project);
+			IProjectDescription description = project.getDescription();
+			// Make sure it has a managed nature
+			if (description != null) {
+				assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+			}
+
+		} catch (CoreException e) {
+			fail("Test failed on project creation: " + e.getLocalizedMessage());
+		}
+		// Find the base project type definition
+		IProjectType[] projTypes = ManagedBuildManager.getDefinedProjectTypes();
+		IProjectType projType = ManagedBuildManager.getProjectType(projectID);
+		assertNotNull(projType);
+		// Create a managed project		
+		IManagedProject newProject = ManagedBuildManager.createManagedProject(project, projType);
+		assertEquals(newProject.getName(), projType.getName());
+		assertFalse(newProject.equals(projType));
+		ManagedBuildManager.setNewProjectVersion(project);
+		// Set up the environment
+		testProject = newProject.getProjectType();
+		IConfiguration config = testProject.getConfiguration(configID);
+		testConfig = newProject.createConfiguration(config, configID + ".12345678");
+	}
+	
+	/**
+	 * Sets up the test environment and does some initial checking.
+	 * Do not do this in the constructor, as it is part of the test.
+	 */
+	private void setupTestEnvironment() throws Exception {
+		
+		int i;
+		
+		// Test ID's
+		//
+		String configID        = "test30_sto.dummy.config";
+		String configName      = "Configuration for test30_sto";
+		String toolChainID     = "test30_sto.dummy.toolchain";
+		String toolChainName   = "Toolchain for test30_sto";
+		// Toolchain Info
+		int numTools           = 4;
+		String toolIDs         = "test30_sto.dummy.tool.";
+		int firstToolID        = 1;
+		// Top level option categories and groups 
+		int numTopCategories   = 3;
+		String topCategoryIDs  = "test30_sto.dummy.category.";
+		int firstTopCategoryID = 5;
+		
+		// Sizes of some arrays
+		int sizeCategoryTop = 0;
+		int sizeOptionTop   = 0;
+		int sizeTools       = 0;		
+	     
+	    // Fetch toolchain
+	    //
+		testToolChain = testConfig.getToolChain();		
+		assertNotNull(testToolChain);
+	    assertEquals(testToolChain.getName(), toolChainName);
+		assertCorrectId(testToolChain.getId(), toolChainID);
+
+		// Fetch and check tools list
+		//
+		testTools = testToolChain.getTools();
+		assertNotNull(testTools);
+		assertEquals(testTools.length, numTools);
+		int toolNo = firstToolID;
+		sizeTools = numTools;
+		for (i=0; i < sizeTools; i++) {
+			assertCorrectId(testTools[i].getId(), toolIDs+toolNo);
+			toolNo++;
+		}
+		
+		// Fetch and check top level option categories and options
+		//
+		testCategoryTop = testToolChain.getChildCategories();
+		testOptionTop = testToolChain.getOptions();
+		
+		if (testCategoryTop != null) {
+			int categoryNo = firstTopCategoryID;
+			sizeCategoryTop = testCategoryTop.length;
+			for (i=0; i < sizeCategoryTop; i++, categoryNo++)
+			{
+				String ID = ((IOptionCategory)testCategoryTop[i]).getId();
+				// Categories are always extension elements, so check
+				// for an identical match
+				assertEquals(ID, topCategoryIDs+categoryNo);
+			}
+		}
+		if (testOptionTop != null) {
+			sizeOptionTop = testOptionTop.length;
+		}
+
+		// Fetch and check 2nd level level option categories and options
+		//
+		testCategory = new Object[testTools.length+sizeCategoryTop][];
+		testOption   = new Object[testTools.length+sizeOptionTop][];	
+		for (i=0; i < sizeTools; i++) {
+			testCategory[i] = testTools[i].getChildCategories();
+			testOption[i]   = testTools[i].getOptions();
+			// Make the arrays safe in case we have null references
+			if ( testCategory[i] == null ) {
+				testCategory[i] = new Object[0];
+			}
+			if ( testOption[i] == null ) {
+				testOption[i] = new Object[0];				
+			}				
+		}
+		// Add top level categories and options to test arrays
+		//
+		for (i=0; i < sizeCategoryTop; i++) {
+			testCategory[sizeTools+i] = new Object[1];
+			testCategory[sizeTools+i][0] = testCategoryTop[i];			
+		}
+		for (i=0; i < sizeOptionTop; i++) {
+			testOption[sizeTools+i] = new Object[1];
+			testOption[sizeTools+i][0] = testOptionTop[i];			
+		}
+	}
+	
+	/**
+	 * Check, whether icon paths in tool1 - tool3 have been created.
+	 * Check, whether icon paths in category 2.1 - 3.1 have been created
+	 */
+	public void testIcons() throws Exception {
+			
+		// Set up the environment
+		if ( testIsSetup == false ) {
+			setupDefaultProject();
+			setupTestEnvironment();
+		}
+		
+		// Get path's of icons to compare against 
+		CTestPlugin me = CTestPlugin.getDefault();
+		URL icon1 = Platform.asLocalURL( me.find(new Path("icons/one.gif"), null));
+		URL icon2 = Platform.asLocalURL( me.find(new Path("icons/two.gif"), null));
+
+		// Check the icons on tools
+		assertToolIcon(testTools[0], icon1);
+		assertToolIcon(testTools[1], null);
+		assertToolIcon(testTools[2], icon2);
+		
+		// Check the top level and 2nd level categories
+		int i;
+		for (i=0; i < testCategory.length; i++) {
+			
+			int j;
+			for (j=0; j < testCategory[i].length; j++) {
+				URL url = ((IOptionCategory)testCategory[i][j]).getIconPath();
+
+				switch ( iconComparator.Compare(i+1, j+1) ) {
+					case IconComparator.None:
+						assertEquals(url, null);
+						break;
+					case IconComparator.One:
+						assertEquals(url, icon1);
+						break;
+					case IconComparator.Two:
+						assertEquals(url, icon2);
+						break;
+				}
+			}
+		}		
+	}
+	
+	private void assertToolIcon(ITool tool, URL url)
+	{
+		assertTrue(tool instanceof IOptionCategory);		
+		IOptionCategory toolCategory = (IOptionCategory)tool;
+		assertEquals(toolCategory.getIconPath(), url);
+	}
+	
+	/**
+	 * Test whether option objects have value handlers as expected
+	 */
+	public void testValueHandlers() throws Exception {
+			
+		// Set up the environment
+		if ( testIsSetup == false ) {
+			setupDefaultProject();
+			setupTestEnvironment();
+		}
+		
+		int i;
+		for (i=0; i < testOption.length; i++) {
+			
+			int j;
+			for (j=0; j < testOption[i].length; j++) {
+				IOption option = (IOption)testOption[i][j];
+				IManagedOptionValueHandler handler = option.getValueHandler();
+				String handlerExtraArg = option.getValueHandlerExtraArgument();
+				
+				switch ( valueHandlerComparator.Compare(i+1, j+1) ) {
+					case ValueHandlerComparator.MBS:
+						assertEquals(ManagedOptionValueHandler.getManagedOptionValueHandler(), handler);
+						break;
+					case ValueHandlerComparator.TEST:
+						assertTrue(handler instanceof TestValueHandler);
+						assertEquals(valueHandlerComparator.getArg(), handlerExtraArg);
+						break;
+				}
+			}
+		}		
+	}
+	
+	/**
+	 * Test whether OptionCatgeory.getOptions(IConfiguration) works as expected
+	 */
+	public void testOptions() throws Exception {
+			
+		// Set up the environment
+		if ( testIsSetup == false ) {
+			setupDefaultProject();
+			setupTestEnvironment();
+		}
+		// Go over all option Categories
+		int i;
+		int j;
+		Object[][] results;
+		for (i=0; i < testCategory.length; i++) {			
+			for (j=0; j < testCategory[i].length; j++) {
+				results = ((IOptionCategory)testCategory[i][j]).getOptions(testConfig);
+				// Go over results and check the following: 
+				// A) results[k][0] must be the parent tool or toolChain
+				// B) results[k][1] must be in testOption[i]
+				for (int k=0; k < results[0].length; k++) {
+					if (results[k][0] == null) {
+						assertNull(results[k][1]);
+						break;
+					}
+					// A) results[k][0] must be the parent tool or toolChain
+					switch (i) {
+					case 0:
+					case 1:
+					case 2:
+					case 3:
+						// Tool
+						assertTrue(results[k][0] instanceof ITool);
+						assertEquals(results[k][0], testTools[i]);
+						break;
+					default:
+						// ToolChain
+						assertTrue(results[k][0] instanceof IToolChain);
+						assertEquals(results[k][0], testToolChain);
+						break;
+					}					
+					// B) results[k][1] must be in testOption[i]
+					//    and its parent must be testCategory[i][j]
+					boolean found = false;
+					for (int l=0; l < testOption[i].length; l++) {
+						if (testOption[i][l] == results[k][1])
+						{
+							found = true;
+							break;
+						}
+					}
+					assertTrue(found);
+					assertEquals(((IOption)results[k][1]).getCategory(), testCategory[i][j]);
+				}
+			}
+		}		
+	}
+	
+	/**
+	 * Test whether all the other tests work as expected for 
+	 * non-extension configurations.
+	 */
+	public void testConfiguration() throws Exception {
+		
+		// Set up the environment
+		setupProject();
+		setupTestEnvironment();
+		// Rerun the other tests, without setting the test up again
+		testIsSetup = true;		
+		testIcons();
+		testValueHandlers();
+		testOptions();
+	}	
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyCalculatorTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyCalculatorTests.java
new file mode 100755
index 0000000..dc02211
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildDependencyCalculatorTests.java
@@ -0,0 +1,240 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+
+/**********************************************************************
+ * These tests are for the default dependency calculators
+ **********************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.ArrayList;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.projectconverter.UpdateManagedProjectManager;
+import org.eclipse.cdt.managedbuilder.testplugin.CTestPlugin;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+
+public class ManagedBuildDependencyCalculatorTests extends TestCase {
+	
+	public ManagedBuildDependencyCalculatorTests(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite = new TestSuite(ManagedBuildDependencyCalculatorTests.class.getName());
+		
+		suite.addTest(new ManagedBuildDependencyCalculatorTests("test1DepCalc2"));
+		suite.addTest(new ManagedBuildDependencyCalculatorTests("test1DepCalc3"));
+		suite.addTest(new ManagedBuildDependencyCalculatorTests("test1DepCalcPreBuild"));
+		return suite;
+	}
+
+	private IProject[] createProject(String projName, IPath location, String projectTypeId, boolean containsZip){
+		ArrayList projectList = null;
+		if (containsZip) {
+			File testDir = CTestPlugin.getFileInPlugin(new Path("resources/depCalcProjects/" + projName));
+			if(testDir == null) {
+				fail("Test project directory " + projName + " is missing.");
+				return null;
+			}
+
+			File projectZips[] = testDir.listFiles(new FileFilter(){
+				public boolean accept(File pathname){
+					if(pathname.isDirectory())
+						return false;
+					return true;
+				}
+			});
+			
+			projectList = new ArrayList(projectZips.length);
+			for(int i = 0; i < projectZips.length; i++){
+				try{
+					String projectName = projectZips[i].getName();
+					if(!projectName.endsWith(".zip"))
+						continue;
+					
+					projectName = projectName.substring(0,projectName.length()-".zip".length());
+					if(projectName.length() == 0)
+						continue;
+					IProject project = ManagedBuildTestHelper.createProject(projectName, projectZips[i], location, projectTypeId);
+					if(project != null)
+						projectList.add(project);
+				}
+				catch(Exception e){
+				}
+			}
+			if(projectList.size() == 0) {
+				fail("No projects found in test project directory " + testDir.getName() + ".  The .zip file may be missing or corrupt.");
+				return null;
+			}
+		} else {
+			try{
+				IProject project = ManagedBuildTestHelper.createProject(projName, null, location, projectTypeId);
+				if(project != null)
+					projectList = new ArrayList(1);
+					projectList.add(project);
+			} catch(Exception e){}
+		}
+		
+		return (IProject[])projectList.toArray(new IProject[projectList.size()]);
+	}
+	
+	private IProject[] createProjects(String projName, IPath location, String projectTypeId, boolean containsZip) {
+		
+		//  In case the projects need to be updated...
+		IOverwriteQuery queryALL = new IOverwriteQuery(){
+			public String queryOverwrite(String file) {
+				return ALL;
+			}};
+		IOverwriteQuery queryNOALL = new IOverwriteQuery(){
+			public String queryOverwrite(String file) {
+				return NO_ALL;
+			}};
+		
+		UpdateManagedProjectManager.setBackupFileOverwriteQuery(queryALL);
+		UpdateManagedProjectManager.setUpdateProjectQuery(queryALL);
+		
+		IProject projects[] = createProject(projName, location, projectTypeId, containsZip);
+		return projects;
+	}
+		
+	private void buildProjectsWorker(IProject projects[], IPath[] files, boolean compareBenchmark) {	
+		if(projects == null || projects.length == 0)
+			return;
+				
+		boolean succeeded = true;
+		for (int i = 0; i < projects.length; i++){
+			IProject curProject = projects[i];
+			
+			IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(curProject);
+			
+			//check whether the managed build info is converted
+			boolean isCompatible = UpdateManagedProjectManager.isCompatibleProject(info);
+			assertTrue(isCompatible);
+			
+			if (isCompatible){
+				// Build the project in order to generate the makefiles 
+				try{
+					curProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD,null);
+				}
+				catch(CoreException e){
+					fail(e.getStatus().getMessage());
+				}
+				catch(OperationCanceledException e){
+					fail("the project \"" + curProject.getName() + "\" build was cancelled, exception message: " + e.getMessage());
+				}
+				
+				//compare the generated makefiles to their benchmarks
+				if (files != null && files.length > 0) {
+					if (i == 0) {
+						String configName = info.getDefaultConfiguration().getName();
+						IPath buildDir = Path.fromOSString(configName);
+						if (compareBenchmark)
+						    succeeded = ManagedBuildTestHelper.compareBenchmarks(curProject, buildDir, files);
+						else
+							succeeded = ManagedBuildTestHelper.verifyFilesDoNotExist(curProject, buildDir, files);
+					}
+				}
+			}
+		}
+		
+		if (succeeded) {	//  Otherwise leave the projects around for comparison
+			for (int i = 0; i < projects.length; i++)
+				ManagedBuildTestHelper.removeProject(projects[i].getName());
+		}
+	}
+
+	// Build projects and compare benchmarks
+	private void buildProjects(IProject projects[], IPath[] files) {
+		buildProjectsWorker(projects, files, true);
+	}
+	
+
+	/* (non-Javadoc)
+	 * test for dependency calculation as a side-effect of compilation
+	 */
+	public void test1DepCalc2(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk"),
+				 //  This file is different using Cygwin vs GCC
+				 //Path.fromOSString("main.d"),
+				 Path.fromOSString("Sources/subdir.mk"),
+				 Path.fromOSString("Sources/func1.d"),
+				 Path.fromOSString("Sources/func2.d"),
+				 Path.fromOSString("Sources/func4.d"),
+				 Path.fromOSString("Sources/sub sources/func 3.d"),
+				 Path.fromOSString("Sources/sub sources/subdir.mk")};
+		IProject[] projects = createProjects("test1DepCalc2", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+	
+
+	/* (non-Javadoc)
+	 * test for dependency calculation using Echo, a 2nd conmpilation step, and post-processing
+	 */
+	public void test1DepCalc3(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk"),
+				 //  This file is different using Cygwin vs GCC
+				 //Path.fromOSString("main.d"),
+				 Path.fromOSString("Sources/subdir.mk"),
+				 Path.fromOSString("Sources/func1.d"),
+				 Path.fromOSString("Sources/func2.d"),
+				 Path.fromOSString("Sources/func4.d"),
+				 Path.fromOSString("Sources/sub sources/func 3.d"),
+				 Path.fromOSString("Sources/sub sources/subdir.mk")};
+		IProject[] projects = createProjects("test1DepCalc3", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+	
+
+	/* (non-Javadoc)
+	 * test for dependency calculation that uses a separate, pre-build, step to generate dependency files
+	 */
+	public void test1DepCalcPreBuild(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk"),
+				 //  This file is different using Cygwin vs GCC
+				 //Path.fromOSString("main.d"),
+				 Path.fromOSString("Sources/subdir.mk"),
+				 Path.fromOSString("Sources/func1.d"),
+				 Path.fromOSString("Sources/func2.d"),
+				 Path.fromOSString("Sources/func4.d"),
+				 Path.fromOSString("Sources/sub sources/func 3.d"),
+				 Path.fromOSString("Sources/sub sources/subdir.mk")};
+		IProject[] projects = createProjects("test1DepCalcPreBuild", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+	
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildEnvironmentTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildEnvironmentTests.java
new file mode 100644
index 0000000..8cbfd01
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildEnvironmentTests.java
@@ -0,0 +1,597 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable;
+import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentBuildPathsChangeListener;
+import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+
+/**
+ * 
+ * */
+public class ManagedBuildEnvironmentTests extends TestCase {
+	final private String REQUIRED_TYPE = "cdt.managedbuild.target.testgnu.exe"; //$NON-NLS-1$
+    // test variable names
+	final private String NAME_CWD  = "CWD";    //$NON-NLS-1$
+	final private String NAME_PWD  = "PWD";    //$NON-NLS-1$
+	final private String NAME_CMN  = "COMMON"; //$NON-NLS-1$
+	final private String NAME_WSP  = "WSP";    //$NON-NLS-1$
+	final private String NAME_PRJI = "PRJI";   //$NON-NLS-1$
+	final private String NAME_PRJL = "PRJL";   //$NON-NLS-1$
+	final private String NAME_CFGI = "CFGI";   //$NON-NLS-1$
+	final private String NAME_CFGL = "CFGL";   //$NON-NLS-1$
+	final private String NAME_CFGX = "CFGX";   //$NON-NLS-1$
+	final private String NAME_CFG  = "CFG";    //$NON-NLS-1$
+	final private String NAME_REM1 = "REMTST1";//$NON-NLS-1$
+	final private String NAME_REM2 = "REMTST2";//$NON-NLS-1$
+    // test variable values
+	final private String VAL_CWDPWD = "CWD_&_PWD_should not be changed";    //$NON-NLS-1$
+	final private String VAL_DUMMY1  = "/a/b/c";         //$NON-NLS-1$
+	final private String VAL_DUMMY2  = "/d/e/f";         //$NON-NLS-1$  
+	final private String VAL_PRO_INC = "/project/inc";   //$NON-NLS-1$
+	final private String VAL_PRO_LIB = "/project/lib";   //$NON-NLS-1$
+	
+	final private String LISTENER_DATA = "O1T1O1O2T2T1O1T1O2T2"; //$NON-NLS-1$
+	
+	// delimiters
+	final private String DEL_WIN  = ";"; //$NON-NLS-1$
+	final private String DEL_UNIX = ":"; //$NON-NLS-1$
+	
+	IEnvironmentVariableProvider envProvider = null;
+	IWorkspace worksp = null;
+	IProject proj = null;
+	IManagedProject mproj = null;
+	String listenerResult = ""; //$NON-NLS-1$
+	
+	IEnvironmentBuildPathsChangeListener listener = new IEnvironmentBuildPathsChangeListener(){
+		public void buildPathsChanged(IConfiguration configuration, int buildPathType){
+			listenerResult = listenerResult + configuration.getName().charAt(0) + buildPathType;
+		}
+	};
+	
+	public ManagedBuildEnvironmentTests() {	super(); }
+	public ManagedBuildEnvironmentTests(String name) { super(name); }
+	
+	public static Test suite() {
+		TestSuite suite = new TestSuite(ManagedBuildEnvironmentTests.class/*.getName()*/);
+//		suite.addTest(new ManagedBuildEnvironmentTests("testEnvNotDef"));    //$NON-NLS-1$		
+//		suite.addTest(new ManagedBuildEnvironmentTests("testEnvUpper"));	 //$NON-NLS-1$
+//		suite.addTest(new ManagedBuildEnvironmentTests("testEnvAppend"));	 //$NON-NLS-1$
+//		suite.addTest(new ManagedBuildEnvironmentTests("testEnvCWDPWD"));	 //$NON-NLS-1$
+//		suite.addTest(new ManagedBuildEnvironmentTests("testEnvSuppliers")); //$NON-NLS-1$
+//		suite.addTest(new ManagedBuildEnvironmentTests("testEnvGetPath"));   //$NON-NLS-1$
+//		suite.addTest(new ManagedBuildEnvironmentTests("testEnvSubscribe")); //$NON-NLS-1$
+//		suite.addTest(new ManagedBuildEnvironmentTests("testEnvGetParams")); //$NON-NLS-1$
+//		suite.addTest(new ManagedBuildEnvironmentTests("testEnvRemove"));    //$NON-NLS-1$
+//		suite.addTest(new ManagedBuildEnvironmentTests("testEnvProvider"));  //$NON-NLS-1$
+		return suite;
+	}
+	
+	//	 Checking behaviour when vars are not defined (except system)   
+	public void testEnvNotDef(){
+		doInit();
+		assertNotNull("System  vars", envProvider.getVariables(null, true, false));    //$NON-NLS-1$
+		assertNotNull("Worksp. vars", envProvider.getVariables(worksp, true, false));  //$NON-NLS-1$
+		assertNotNull("Project vars", envProvider.getVariables(mproj, true, false));   //$NON-NLS-1$
+		IConfiguration[] cfgs = mproj.getConfigurations();
+		for (int k=0; k<cfgs.length; k++) {
+			assertNotNull("Project vars["+k+"]",                  //$NON-NLS-1$ //$NON-NLS-2$
+					envProvider.getVariables(cfgs[k], true, false));   
+		}
+	}
+	
+	/**
+	 * testEnvUpper - check uplevel variables
+	 * In each context, up-level vars should be returned  
+	 */
+//	public void testEnvUpper(){
+//		doInit();
+//		addTestVariables();
+//		IBuildEnvironmentVariable[] a = envProvider.getVariables(null, true, false);
+//		IBuildEnvironmentVariable[] b = envProvider.getVariables(worksp, true, false);
+//		assertTrue(varListContainNames(a, b));
+//		IBuildEnvironmentVariable[] c = envProvider.getVariables(mproj, true, false);
+//		assertTrue(varListContainNames(b, c));
+//		
+//		IConfiguration[] cfgs = mproj.getConfigurations();
+//		for (int k=0; k<cfgs.length; k++) {
+//			IBuildEnvironmentVariable[] d = envProvider.getVariables(cfgs[k], true, false);
+//			assertTrue(varListContainNames(c, d));			
+//		}
+//	}
+
+	/**
+	 * 
+	 *
+	 */
+//	public void testEnvAppend(){
+//		doInit();
+//
+//		IBuildEnvironmentVariable a = envProvider.getVariable(NAME_CMN, worksp, true, false);
+//		assertEquals(NAME_WSP, a.getValue());
+//
+//		assertNotNull(a = envProvider.getVariable(NAME_CMN, mproj, true, false));
+//		assertEquals(NAME_WSP+DEL_UNIX+NAME_PRJI, a.getValue());
+//
+//		IConfiguration cfg = mproj.getConfigurations()[0];
+//		assertNotNull(a = envProvider.getVariable(NAME_CMN, cfg, true, false));
+//		assertEquals(NAME_WSP+DEL_UNIX+NAME_PRJI+DEL_UNIX+NAME_CFGI, a.getValue());
+//	}
+
+	/**
+	 * 
+	 *
+	 */
+	public void testEnvCWDPWD(){
+		doInit();
+		IConfiguration cfg = mproj.getConfigurations()[0];
+		// CWD/PWD vars should NOT be overwritten anywhere
+//		assertNull(envProvider.getVariable(NAME_CWD, worksp, true, false)); 
+//		assertNull(envProvider.getVariable(NAME_CWD, mproj, true, false));
+		IBuildEnvironmentVariable a = envProvider.getVariable(NAME_CWD, cfg, true, false);
+		assertNotNull(a);
+		if (VAL_CWDPWD.equals(a.getValue())) fail("CWD should not be rewritten !"); //$NON-NLS-1$
+		
+//		assertNull(envProvider.getVariable(NAME_PWD, worksp, true, false)); 
+//		assertNull(envProvider.getVariable(NAME_PWD, mproj, true, false));
+		a = envProvider.getVariable(NAME_PWD, cfg, true, false);
+		assertNotNull(a);
+		if (VAL_CWDPWD.equals(a.getValue())) fail("PWD should not be rewritten !"); //$NON-NLS-1$
+		
+		// try to delete: should fail
+//		UserDefinedEnvironmentSupplier usup = getSupplier(cfg, cfg.getName());
+//		assertNull(usup.deleteVariable(NAME_CWD, cfg));
+//		assertNull(usup.deleteVariable(NAME_PWD, cfg));
+//		assertNotNull(envProvider.getVariable(NAME_CWD, cfg, true, false));
+//		assertNotNull(envProvider.getVariable(NAME_PWD, cfg, true, false));
+	}
+/*		
+	public void testEnvSuppliers() {
+		doInit();
+		
+		IEnvironmentVariableSupplier[] arrSupSys = envProvider.getSuppliers(null);
+		assertEquals("System suppliers count not equal to 1", arrSupSys.length, 1); //$NON-NLS-1$
+		IBuildEnvironmentVariable[] a = arrSupSys[0].getVariables(null);
+		assertNotNull(a);
+		IBuildEnvironmentVariable[] b = envProvider.getVariables(null, false, false);
+		assertTrue(varListContainNames(a, b));
+		assertTrue(varListContainNames(b, a));
+		
+		IEnvironmentVariableSupplier[] arrSupWrk = envProvider.getSuppliers(worksp);
+		assertEquals("Workspace suppliers count not equal to 1", arrSupWrk.length, 1); //$NON-NLS-1$
+		a = arrSupWrk[0].getVariables(worksp);
+		assertNotNull(a);
+		b = envProvider.getVariables(worksp, false, false);
+		assertTrue(varListContainNames(a, b));
+		assertTrue(varListContainNames(b, a));	
+
+		IEnvironmentVariableSupplier[] arrSupPro = envProvider.getSuppliers(mproj);
+		assertEquals("Project suppliers count not equal to 2", arrSupPro.length, 2); //$NON-NLS-1$
+
+		b = envProvider.getVariables(mproj, false, false);
+		for (int k=0; k<arrSupPro.length; k++ ) {
+			assertTrue(varListContainNames(arrSupPro[k].getVariables(mproj), b));
+		}
+		
+		IConfiguration[] configs = mproj.getConfigurations();
+		for (int j=0; j<configs.length; j++) {
+			b = envProvider.getVariables(configs[j], false, false);
+			IEnvironmentVariableSupplier[] arrSupCfg = envProvider.getSuppliers(configs[j]);
+			assertEquals("Configuration suppliers count not equal to 3", arrSupCfg.length, 3); //$NON-NLS-1$
+			for (int k=0; k<arrSupCfg.length; k++ ) {
+				assertTrue(varListContainNames(arrSupCfg[k].getVariables(configs[j]), b));
+			}
+		}
+	}
+*/	
+	/*
+	 * plugin.xml contents:
+	     <projectType id="cdt.managedbuild.target.testgnu.exe">
+         ... 
+	           <configuration name="Dbg"
+               ...
+                   <tool 
+                   ...     
+	  	              <envVarBuildPath
+        	                  pathType="buildpathInclude"
+                	          variableList="CFGI,CFG0,PRJI">
+	                  </envVarBuildPath>
+        	          <envVarBuildPath
+                	          pathType="buildpathLibrary"
+                        	  variableList="CFGL,PRJL">
+	                  </envVarBuildPath>
+         ... 
+	           <configuration name="Rel"
+               ...  
+                   <tool 
+                   ...     
+                      <envVarBuildPath
+        	                  pathType="buildpathInclude"
+                	          variableList="CFGI,CFG1,PRJI">
+	                  </envVarBuildPath>
+        	          <envVarBuildPath
+                	          pathType="buildpathLibrary"
+                        	  variableList="CFGL,PRJL">
+	                  </envVarBuildPath>
+	 */
+	public void rm_testEnvGetPath(){
+		doInit();
+		IConfiguration[] configs = mproj.getConfigurations();
+		
+		for (int i=0; i<2; i++) {  // only 2 first configs are affected
+			String[] val_inc = {"/config/include/"+i, "/config"+i+"/include", VAL_PRO_INC};  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			String[] val_lib = {"/config/lib/"+i, VAL_PRO_LIB};  //$NON-NLS-1$
+			String[] s1, s2, s3;
+			s1 = envProvider.getBuildPaths(configs[i], 1); // include
+			s2 = envProvider.getBuildPaths(configs[i], 2); // library
+			s3 = envProvider.getBuildPaths(configs[i], 0); // unknown
+
+			assertNotNull("Include path is null", s1);  //$NON-NLS-1$
+			assertNotNull("Library path is null", s2);  //$NON-NLS-1$
+			assertNotNull("Bad path type returns null", s3); //$NON-NLS-1$
+			assertEquals("Include path should contain 3 entries !", s1.length, 3); //$NON-NLS-1$
+			assertEquals("Library path should contain 2 entries !", s2.length, 2); //$NON-NLS-1$
+			assertEquals("Request with bad path type should return 0 entries !", s3.length, 0); //$NON-NLS-1$
+
+			compareStringLists(configs[i].getName()+"-include", s1, val_inc); //$NON-NLS-1$
+			compareStringLists(configs[i].getName()+"-library", s2, val_lib); //$NON-NLS-1$
+		}
+	}
+	
+//	public void testEnvSubscribe(){
+//		doInit();
+//		IConfiguration[] configs = mproj.getConfigurations();
+//		
+//		IConfiguration cfg = configs[0];
+//		UserDefinedEnvironmentSupplier usup = getSupplier(cfg, cfg.getName());
+//		assertNotNull(usup);	
+//		try {
+//			
+//			usup.deleteVariable(NAME_CFGI,configs[0]);
+//			usup.deleteVariable(NAME_CFGI,configs[1]);
+//			usup.deleteVariable(NAME_CFG+"0",configs[0]);
+//			usup.deleteVariable(NAME_CFG+"1",configs[0]);
+//			usup.deleteVariable(NAME_CFG+"0",configs[1]);
+//			usup.deleteVariable(NAME_CFG+"1",configs[1]);
+//			usup.deleteVariable(NAME_CFGL,configs[0]);
+//			usup.deleteVariable(NAME_CFGL,configs[1]);
+//			usup.deleteVariable(NAME_PRJI,mproj);
+//			usup.deleteVariable(NAME_PRJL,mproj);
+//			usup.deleteVariable(NAME_CFGX,mproj);
+//			listenerResult = ""; //$NON-NLS-1$
+//			
+//	   	    envProvider.subscribe(listener);
+//			// should affect config Deb
+//			usup.createVariable(NAME_CFGI,VAL_DUMMY2,IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, configs[0]);
+//			assertEquals("Step 1", listenerResult, LISTENER_DATA.substring(0,2)); //$NON-NLS-1$
+//			// should affect config Rel
+//			usup.createVariable(NAME_CFGI,VAL_DUMMY2,IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, configs[1]);
+//			assertEquals("Step 2", listenerResult, LISTENER_DATA.substring(0,4)); //$NON-NLS-1$
+//			
+//			// should affect config Deb
+//			usup.createVariable(NAME_CFG+"0",VAL_DUMMY2,IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, configs[0]); //$NON-NLS-1$
+//			assertEquals("Step 3", listenerResult, LISTENER_DATA.substring(0,6)); //$NON-NLS-1$
+//			// should not affect anything - variable not in path of cfg 0 
+//			usup.createVariable(NAME_CFG+"1",VAL_DUMMY2,IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, configs[0]); //$NON-NLS-1$
+//			assertEquals("Step 4", listenerResult, LISTENER_DATA.substring(0,6)); //$NON-NLS-1$
+//
+//			// should affect config Deb
+//			usup.createVariable(NAME_CFGL,VAL_DUMMY2,IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, configs[0]);
+//			assertEquals("Step 5", listenerResult, LISTENER_DATA.substring(0,8)); //$NON-NLS-1$
+//			// should affect config Rel
+//			usup.createVariable(NAME_CFGL,VAL_DUMMY2,IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, configs[1]);
+//			assertEquals("Step 6", listenerResult, LISTENER_DATA.substring(0,10)); //$NON-NLS-1$
+//			
+//			// should not affect anything - variable not in path of cfg 1 
+//			usup.createVariable(NAME_CFG+"0",VAL_DUMMY2,IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, configs[1]); //$NON-NLS-1$
+//			assertEquals("Step 7", listenerResult, LISTENER_DATA.substring(0,10)); //$NON-NLS-1$
+//			// should affect config Rel 
+//			usup.createVariable(NAME_CFG+"1",VAL_DUMMY2,IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, configs[1]); //$NON-NLS-1$
+//			assertEquals("Step 8", listenerResult, LISTENER_DATA.substring(0,12)); //$NON-NLS-1$
+//			
+//			// should affect both configurations
+//			usup.createVariable(NAME_PRJI,VAL_DUMMY2,IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, mproj);
+//			assertEquals("Step 9", listenerResult, LISTENER_DATA.substring(0,16)); //$NON-NLS-1$
+//			// should affect both configurations
+//			usup.createVariable(NAME_PRJL,VAL_DUMMY2,IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, mproj);
+//			assertEquals("Step 10", listenerResult, LISTENER_DATA); //$NON-NLS-1$
+//
+//			
+//			// should not affect anything - no changes
+//			usup.createVariable(NAME_PRJL,VAL_DUMMY2,IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, mproj);
+//			assertEquals("Step 11", listenerResult, LISTENER_DATA); //$NON-NLS-1$
+//			// should not affect anything - variable not in path 			
+//			usup.createVariable(NAME_CFGX,VAL_DUMMY2, IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, mproj);
+//			assertEquals("Step 12", listenerResult, LISTENER_DATA); //$NON-NLS-1$
+//
+//			envProvider.unsubscribe(listener);
+//
+//			// should NOT affect anything - subscription cancelled
+//			usup.createVariable(NAME_PRJI,VAL_DUMMY1,IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, mproj);
+//			usup.createVariable(NAME_CFGI,VAL_DUMMY1,IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, configs[0]);
+//			usup.createVariable(NAME_CFGI,VAL_DUMMY1,IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, configs[1]);
+//			assertEquals("Step 13", listenerResult, LISTENER_DATA); //$NON-NLS-1$
+//			
+//		} catch (Exception e) {
+//			fail("Failed to create configuration vars !"); //$NON-NLS-1$
+//		}
+//	}
+	
+	/**
+	 * 
+	 *
+	 */
+	public void testEnvGetParams(){
+		doInit();
+		IEnvironmentVariableProvider envProvider = ManagedBuildManager.getEnvironmentVariableProvider();
+		IBuildEnvironmentVariable x = null;
+		IBuildEnvironmentVariable y = null;
+		if (System.getProperty("os.name").toLowerCase().startsWith("windows")) { //$NON-NLS-1$ //$NON-NLS-2$
+			assertEquals(envProvider.getDefaultDelimiter(), DEL_WIN);
+			assertFalse(envProvider.isVariableCaseSensitive());
+			// these var instances are different although contents is equal. 
+			x = envProvider.getVariable("PATH", mproj.getConfigurations()[0], true, false);
+			assertNotNull(x);
+			y = envProvider.getVariable("path", mproj.getConfigurations()[0], true, false);
+			assertNotNull(y);
+			assertEquals(x.getName(), y.getName());
+			assertEquals(x.getValue(), y.getValue());
+		} else {
+			assertEquals(envProvider.getDefaultDelimiter(), DEL_UNIX);
+			assertTrue(envProvider.isVariableCaseSensitive());
+			// "path" is different var (may absent); 
+			x = envProvider.getVariable("PATH", mproj.getConfigurations()[0], true, false);
+			assertNotNull(x);
+			y = envProvider.getVariable("path", mproj.getConfigurations()[0], true, false);
+			if (y != null) {
+				assertFalse(x.getName().equals(y.getName()));
+			}
+		}		
+	}
+	/**
+	 * 
+	 *
+	 */
+//	public void testEnvRemove(){
+//		doInit();
+//		IEnvironmentVariableProvider env = ManagedBuildManager.getEnvironmentVariableProvider();
+//		UserDefinedEnvironmentSupplier usup = null;
+//		
+//		// create vars for removal tests
+//		assertNotNull(usup = getSupplier(worksp, "Workspace")); //$NON-NLS-1$
+//		try {
+//			assertNotNull(usup.createVariable(NAME_REM1, VAL_DUMMY1, IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, worksp));
+//			assertNotNull(usup.createVariable(NAME_REM2, VAL_DUMMY1, IBuildEnvironmentVariable.ENVVAR_REPLACE, DEL_UNIX, worksp));
+//		} catch (Exception e) {	fail(e.getLocalizedMessage()); }
+//
+//		assertNotNull(usup = getSupplier(mproj, "Project")); //$NON-NLS-1$
+//		try {
+//			assertNotNull(usup.createVariable(NAME_REM1, VAL_DUMMY2, IBuildEnvironmentVariable.ENVVAR_REMOVE, DEL_UNIX, mproj));
+//			assertNotNull(usup.createVariable(NAME_REM2, VAL_DUMMY2, IBuildEnvironmentVariable.ENVVAR_APPEND, DEL_UNIX, mproj));
+//		} catch (Exception e) {	fail(e.getLocalizedMessage()); }
+//
+//		IConfiguration cfg = mproj.getConfigurations()[0];
+//		assertNotNull(usup = getSupplier(cfg, "Configuration 0")); //$NON-NLS-1$
+//		try {
+//			assertNotNull(usup.createVariable(NAME_REM1, VAL_CWDPWD, IBuildEnvironmentVariable.ENVVAR_REMOVE, DEL_UNIX, cfg));
+//			assertNotNull(usup.createVariable(NAME_REM2, VAL_CWDPWD, IBuildEnvironmentVariable.ENVVAR_REMOVE, DEL_UNIX, cfg));
+//		} catch (Exception e) {	fail(e.getLocalizedMessage()); }
+//		
+//		// Check vars presence/absence on different levels  
+//		IBuildEnvironmentVariable a = env.getVariable(NAME_REM1, worksp, true, false);
+//		IBuildEnvironmentVariable b = env.getVariable(NAME_REM2, worksp, true, false);
+//		assertNotNull(a);
+//		assertNotNull(b);
+//		a = env.getVariable(NAME_REM1, mproj, true, false);
+//		b = env.getVariable(NAME_REM2, mproj, true, false);
+//		assertNull(a);
+//		assertNotNull(b);
+//		assertEquals(b.getValue(), VAL_DUMMY1 + DEL_UNIX + VAL_DUMMY2);
+//		a = env.getVariable(NAME_REM1, cfg, true, false);
+//		b = env.getVariable(NAME_REM2, cfg, true, false);
+//		assertNull(a);
+//		assertNull(b);
+//	}
+	/**
+	 * testEnvProvider() - 
+	 */
+	public void testEnvProvider() {
+		doInit();
+		IBuildEnvironmentVariable a = envProvider.getVariable(TestMacro.PRJ_VAR, mproj.getConfigurations()[0], true, false);
+		assertNotNull(a);
+		assertEquals(TestMacro.PRJ_VAR + mproj.getName(), a.getValue());
+		
+		IConfiguration[] cfgs = mproj.getConfigurations();
+		a = envProvider.getVariable(TestMacro.CFG_VAR, cfgs[0], true, false);
+		assertNotNull(a);
+		assertEquals(TestMacro.CFG_VAR + cfgs[0].getName(), a.getValue());
+		
+		// no provider for another configurations 
+		a = envProvider.getVariable(TestMacro.CFG_VAR, cfgs[1], true, false);
+		assertNull(a);
+		
+		// combination user-defined and provided variables
+//		UserDefinedEnvironmentSupplier usup = getSupplier(cfgs[0], cfgs[0].getName());
+//		usup.createVariable(TestMacro.PRJ_VAR, VAL_DUMMY1, IBuildEnvironmentVariable.ENVVAR_PREPEND, DEL_UNIX, cfgs[0]);
+//		a = envProvider.getVariable(TestMacro.PRJ_VAR, cfgs[0], true, false);
+//		assertNotNull(a);
+//		assertEquals(VAL_DUMMY1+DEL_UNIX+TestMacro.PRJ_VAR+mproj.getName(), a.getValue());
+	}
+
+	/**
+	 * This test is not used iun suite. It just prints variabes 
+	 */	
+	public void testEnvPrint(){
+		doInit();
+		printVar("s-Var", envProvider.getVariables(null, false, false));    //$NON-NLS-1$
+		printVar("w-Var", envProvider.getVariables(worksp, false, false));  //$NON-NLS-1$
+		printVar("p-Var", envProvider.getVariables(mproj, false, false));   //$NON-NLS-1$
+		IConfiguration[] cfgs = mproj.getConfigurations();
+		for (int k=0; k<cfgs.length; k++) {
+			printVar("c[" + k + "]-Var", envProvider.getVariables(cfgs[k], false, false));  //$NON-NLS-1$ //$NON-NLS-2$ 
+		}
+	}
+  	
+	// Create all required user variables
+	
+//	public static UserDefinedEnvironmentSupplier getSupplier(Object obj, String objName) {
+//		IEnvironmentVariableSupplier[] arrSup = null; 
+//		arrSup = ManagedBuildManager.getEnvironmentVariableProvider().getSuppliers(obj);
+//		for (int i=0; i<arrSup.length; i++ ) {
+//			if (arrSup[i] instanceof UserDefinedEnvironmentSupplier) {
+//				return (UserDefinedEnvironmentSupplier) arrSup[i];
+//			}
+//		}
+//		fail("Cannot access user variable supplier for " + objName); //$NON-NLS-1$
+//		return null;
+//	}
+	
+	/**
+	 * 
+	 * 
+	 * Note: CWD and PWD vars are not allowed to be added/changed
+	 */
+//	private void addTestVariables() {
+//		final int STD_MODE = IBuildEnvironmentVariable.ENVVAR_REPLACE;
+//		UserDefinedEnvironmentSupplier usup = null;
+//		usup = getSupplier(worksp, "Workspace"); //$NON-NLS-1$
+//		try {
+//			if (usup != null) {
+//				assertNotNull(usup.createVariable(NAME_CMN, NAME_WSP, IBuildEnvironmentVariable.ENVVAR_APPEND, DEL_UNIX, worksp));
+//				assertNotNull(usup.createVariable(NAME_WSP,VAL_DUMMY1, STD_MODE, DEL_UNIX, worksp));
+//				assertNull(usup.createVariable(NAME_CWD,VAL_CWDPWD, STD_MODE, DEL_UNIX, worksp));
+//				assertNull(usup.createVariable(NAME_PWD,VAL_CWDPWD, STD_MODE, DEL_UNIX, worksp));
+//			}
+//		} catch (Exception e) {
+//			fail("Failed to create workspace vars " + e.getLocalizedMessage()); //$NON-NLS-1$
+//		}
+//
+//		usup = getSupplier(mproj, "Project"); //$NON-NLS-1$
+//		try {
+//			if (usup != null) {
+//				assertNotNull(usup.createVariable(NAME_CMN, NAME_PRJI, IBuildEnvironmentVariable.ENVVAR_APPEND, DEL_UNIX, mproj));
+//				assertNotNull(usup.createVariable(NAME_PRJI,VAL_PRO_INC, STD_MODE, DEL_UNIX, mproj));
+//				assertNotNull(usup.createVariable(NAME_PRJL,VAL_PRO_LIB, STD_MODE, DEL_UNIX, mproj));
+//				assertNull(usup.createVariable(NAME_CWD, VAL_CWDPWD,  STD_MODE, DEL_UNIX, mproj));
+//				assertNull(usup.createVariable(NAME_PWD, VAL_CWDPWD,  STD_MODE, DEL_UNIX, mproj));
+//			}
+//		} catch (Exception e) {
+//			fail("Failed to create project vars " + e.getLocalizedMessage()); //$NON-NLS-1$
+//		}
+//
+//		IConfiguration[] configs = mproj.getConfigurations();
+//		for (int i = 0; i < 2; i++) { // only 2 first configs are affected
+//			IConfiguration cfg = configs[i];
+//			usup = getSupplier(cfg, "Configuration " + cfg.getName()); //$NON-NLS-1$
+//			try {
+//				if (usup != null) {	
+//					assertNotNull(usup.createVariable(NAME_CMN, NAME_CFGI, IBuildEnvironmentVariable.ENVVAR_APPEND, DEL_UNIX, cfg));
+//					assertNotNull(usup.createVariable(NAME_CFGI, "/config/include/"+i,  STD_MODE, DEL_UNIX, cfg)); //$NON-NLS-1$
+//					assertNotNull(usup.createVariable(NAME_CFG+i,"/config"+i+"/include",STD_MODE, DEL_UNIX, cfg)); //$NON-NLS-1$ //$NON-NLS-2$
+//					assertNotNull(usup.createVariable(NAME_CFGL, "/config/lib/"+i,      STD_MODE, DEL_UNIX, cfg)); //$NON-NLS-1$
+//					assertNotNull(usup.createVariable(NAME_CFGX, "/config/unused",      STD_MODE, DEL_UNIX, cfg)); //$NON-NLS-1$
+//					assertNull(usup.createVariable(NAME_CWD, VAL_CWDPWD,             STD_MODE, DEL_UNIX, cfg));
+//					assertNull(usup.createVariable(NAME_PWD, VAL_CWDPWD,             STD_MODE, DEL_UNIX, cfg));
+//				}
+//			} catch (Exception e) {
+//				fail("Failed to create configuration vars for <" + cfg.getName() + "> - "+ e.getLocalizedMessage()); //$NON-NLS-1$ //$NON-NLS-2$
+//			}
+//		}
+//		try {
+//			proj.build(IncrementalProjectBuilder.FULL_BUILD, null);
+//		} catch (Exception e) {}
+//	}
+	private void doInit() {
+		envProvider = ManagedBuildManager.getEnvironmentVariableProvider();
+		assertNotNull(envProvider);
+		ManagedBuildMacrosTests.createManagedProject("Merde"); //$NON-NLS-1$
+		proj = ManagedBuildMacrosTests.proj;
+		assertNotNull(proj);
+		mproj = ManagedBuildMacrosTests.mproj;	
+		assertNotNull(mproj);
+		worksp = proj.getWorkspace();
+		assertNotNull(worksp);
+	}
+	
+	/*
+	 * Print contents of env.var array, with given header.
+	 */
+	private void printVar(String head, IBuildEnvironmentVariable[] vars) {
+		if (vars != null) {
+			if (vars.length > 0) {
+				for (int i=0; i < vars.length; i++) {
+					System.out.println(head + "[" + i + "] " +  //$NON-NLS-1$ //$NON-NLS-2$ 
+							vars[i].getName() + " = " +         //$NON-NLS-1$
+							vars[i].getValue() + " / " +        //$NON-NLS-1$
+							vars[i].getOperation() + vars[i].getDelimiter());
+				}
+			} else { System.out.println(head + ": array is empty");	} //$NON-NLS-1$
+		} else { System.out.println(head + ": array is null"); } //$NON-NLS-1$
+	}
+
+	/*
+	 * check that ALL variables from list "a" have correspondence 
+	 * in list "b"
+	 * empty list or null are treated as corresponding to anything
+	 */
+	private boolean varListContainNames(IBuildEnvironmentVariable[] a, IBuildEnvironmentVariable[] b) {
+		if (a == null) return true;
+		else if (a.length == 0) return true;
+		else if (b == null) return false;
+		
+		for (int i=0; i<a.length; i++) {
+			boolean found = false;
+			for (int j=0; j<b.length; j++) {
+				if (a[i].getName().equals(b[j].getName())) {
+					found = true;
+					break;
+				}
+			}
+			if (!found) return false;
+		}	
+		return true;
+	}
+	
+	/**
+	 * 
+	 * @param head
+	 * @param a
+	 * @param b
+	 */
+	private void compareStringLists(String head, String[] a, String[] b) {
+		long mask =0;
+		long finalmask = Math.round(Math.pow(2,b.length) - 1);
+		for (int k=0; k<a.length; k++) {
+			boolean found = false;
+			for (int m=0; m<b.length; m++) {
+				if (a[k].equals(b[m])) {
+					mask |= 1 << m;
+					found = true;
+					break;
+				}
+			}
+			assertTrue(found);
+		}
+		assertEquals(mask, finalmask);
+	}
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildMacrosTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildMacrosTests.java
new file mode 100644
index 0000000..601e87b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildMacrosTests.java
@@ -0,0 +1,891 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.cdt.managedbuilder.internal.macros.OptionContextData;
+import org.eclipse.cdt.managedbuilder.macros.BuildMacroException;
+import org.eclipse.cdt.managedbuilder.macros.IBuildMacro;
+import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
+import org.eclipse.cdt.managedbuilder.macros.IBuildMacroSupplier;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+
+public class ManagedBuildMacrosTests extends TestCase {
+	static IProject proj = null;
+	static IManagedProject mproj = null;
+	
+	IConfiguration[] cfgs = null;
+	IBuildMacroProvider mp = null;
+	IWorkspace worksp = null;
+	boolean windows = false;
+	
+	boolean print = false; // allows to print most of macros on console
+	boolean flag  = false; // uplevel flag for getMacro/getMacros methods 
+	IBuildMacroSupplier[] ms = null;
+	public static int functionCalled = 0;
+	public static final int GET_ONE_PROJECT  = 1;
+	public static final int GET_MANY_PROJECT = 2;
+	public static final int GET_ONE_CONFIG   = 4;
+	public static final int GET_MANY_CONFIG  = 8;
+	public static final int RESERVED_NAME    = 16;
+	
+	static final String UNKNOWN = "<HZ>"; //$NON-NLS-1$
+	static final String LISTSEP = "|";    //$NON-NLS-1$
+	static final String TEST = "TEST";    //$NON-NLS-1$
+	static final String[] TST = {"DUMMY", "FILETEST",   //$NON-NLS-1$ //$NON-NLS-2$
+		"OPTTEST", "CFGTEST", "PRJTEST",  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		"WSPTEST", "INSTEST", "ENVTEST"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	// used for options testing
+	final String OPT_IDS = "macro.test.string";  //$NON-NLS-1$
+	final String OPT_IDL = "macro.test.list";    //$NON-NLS-1$
+	final String INC_DEF  = "${IncludeDefaults}";//$NON-NLS-1$
+	
+	public ManagedBuildMacrosTests() { super(); }
+	public ManagedBuildMacrosTests(String name) { super(name); }
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(ManagedBuildMacrosTests.class);
+		//$JUnit-BEGIN$
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroConf"));//$NON-NLS-1$
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroEEnv"));//$NON-NLS-1$
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroInst"));//$NON-NLS-1$
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroProj"));//$NON-NLS-1$
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroWrks"));//$NON-NLS-1$
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroOptS"));//$NON-NLS-1$
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroOptL"));//$NON-NLS-1$
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroFile"));//$NON-NLS-1$
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroContext"));//$NON-NLS-1$
+//		
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroResolve"));//$NON-NLS-1$
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroResolveExceptions"));//$NON-NLS-1$
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroResolveLoop"));//$NON-NLS-1$
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroResolveMake"));//$NON-NLS-1$
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroResolveCase"));//$NON-NLS-1$
+//		suite.addTest(new ManagedBuildMacrosTests("testMacroSave"));//$NON-NLS-1$
+		//$JUnit-END$
+		return suite;
+	}
+
+	/**
+	 * testMacroConf()
+	 */
+/*	public void testMacroConf(){
+		doInit();
+		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[0]);
+		assertNotNull(ms);
+		assertEquals(ms.length, 4);
+		assertTrue(addMacro(TEST, IBuildMacro.VALUE_TEXT, TST[IBuildMacroProvider.CONTEXT_CONFIGURATION],
+				IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[0]));
+		functionCalled = 0;
+		String[] a = printMacros(mp.getMacros(IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[0], flag), "Configuration"); //$NON-NLS-1$
+		assertEquals(GET_MANY_CONFIG, functionCalled);
+		String[] b = {"ConfigName", "BuildArtifactFileExt", //$NON-NLS-1$ //$NON-NLS-2$
+				"BuildArtifactFileBaseName", "TargetArchList", //$NON-NLS-1$ //$NON-NLS-2$
+				"TargetOsList", "BuildArtifactFileName", //$NON-NLS-1$ //$NON-NLS-2$
+				"PWD", "CWD", "ConfigDescription", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
+				TEST, "NEW_FOR_CFG" }; //$NON-NLS-1$
+		assertTrue(arrayContains(b, a));
+	}
+*/
+	/**
+	 * testMacroEEnv()
+	 */
+/*	public void testMacroEEnv(){
+		doInit();
+		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_ECLIPSEENV, null);
+		assertNotNull(ms);
+		assertEquals(ms.length, 1);
+		assertFalse(addMacro(TEST, IBuildMacro.VALUE_TEXT, TST[IBuildMacroProvider.CONTEXT_ECLIPSEENV],
+				IBuildMacroProvider.CONTEXT_ECLIPSEENV, null));
+		String[] a = printMacros(mp.getMacros(IBuildMacroProvider.CONTEXT_ECLIPSEENV, null, flag), "EclipseEnv"); //$NON-NLS-1$		
+//		String[] b = {"PATH", "USERNAME"}; //$NON-NLS-1$ //$NON-NLS-2$
+//		assertTrue(arrayContains(b, a));
+	}
+*/
+	/**
+	 * testMacroInst()
+	 */
+/*	public void testMacroInst(){
+		doInit();
+		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_INSTALLATIONS, null);
+		assertNotNull(ms);
+		assertEquals(ms.length, 1);
+		assertFalse(addMacro(TEST, IBuildMacro.VALUE_TEXT, TST[IBuildMacroProvider.CONTEXT_INSTALLATIONS],
+				IBuildMacroProvider.CONTEXT_INSTALLATIONS, null));
+		String[] a = printMacros(mp.getMacros(IBuildMacroProvider.CONTEXT_INSTALLATIONS, null, flag), "Installations "); //$NON-NLS-1$
+		String[] b = {"HostArchName", "MBSVersion", //$NON-NLS-1$ //$NON-NLS-2$ 
+				"EclipseVersion", "HostOsName", "CDTVersion"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		assertTrue(arrayContains(b, a));
+	}
+*/
+	/**
+	 * testMacroProj()
+	 */
+//	public void testMacroProj(){
+//		doInit();
+//		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_PROJECT, mproj);
+//		assertNotNull(ms);
+//		assertEquals(ms.length, 4);
+//		assertTrue(addMacro(TEST, IBuildMacro.VALUE_TEXT, TST[IBuildMacroProvider.CONTEXT_PROJECT],
+//				IBuildMacroProvider.CONTEXT_PROJECT, mproj));
+//		functionCalled = 0;
+//		String[] a = printMacros(mp.getMacros(IBuildMacroProvider.CONTEXT_PROJECT, mproj, flag), "Project "); //$NON-NLS-1$
+//		assertEquals(GET_MANY_PROJECT, functionCalled);
+//		String[] b = {"ProjDirPath", "ProjName", //$NON-NLS-1$ //$NON-NLS-2$ 
+//				TEST, "NEW_FOR_PRJ"};          //$NON-NLS-1$
+//		assertTrue(arrayContains(b, a));
+//	}
+	
+	/**
+	 * testMacroWrks()
+	 */
+//	public void testMacroWrks(){
+//		doInit();
+//		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_WORKSPACE, worksp);
+//		assertNotNull(ms);
+//		assertEquals(ms.length, 5);
+//		assertTrue(addMacro(TEST, IBuildMacro.VALUE_TEXT, TST[IBuildMacroProvider.CONTEXT_WORKSPACE],
+//				IBuildMacroProvider.CONTEXT_WORKSPACE, worksp));
+//		String[] a = printMacros(mp.getMacros(IBuildMacroProvider.CONTEXT_WORKSPACE, worksp, flag), "Workspace "); //$NON-NLS-1$
+//		String[] b = {"DirectoryDelimiter", "WorkspaceDirPath", //$NON-NLS-1$ //$NON-NLS-2$ 
+//				"PathDelimiter", TEST};                       //$NON-NLS-1$
+//		assertTrue(arrayContains(b, a));
+//	}
+	
+	/**
+	 * testMacroOptn()
+	 */
+//	public void testMacroOptS(){
+//		doInit();
+//		IToolChain tc = cfgs[0].getToolChain();
+//		ITool       t = cfgs[0].getTools()[0];
+//		IOption   opt = t.getOptionById(OPT_IDS);
+//		assertNotNull(opt);
+//
+//		// standard check of suppliers # and attempt to add macro (should fail) 
+//		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_OPTION, new OptionContextData(opt,t));
+//		assertNotNull(ms);
+//		assertEquals(ms.length, 1);
+//		assertFalse(addMacro(TEST, IBuildMacro.VALUE_TEXT, TST[IBuildMacroProvider.CONTEXT_OPTION], IBuildMacroProvider.CONTEXT_OPTION, new OptionContextData(opt,t)));
+//
+//		// modify value and check that macros is resolved 
+//		try {
+//			opt = cfgs[0].setOption(t, opt, "222 " + INC_DEF);  //$NON-NLS-1$
+//			String a = mp.resolveValue(opt.getStringValue(), UNKNOWN, LISTSEP, IBuildMacroProvider.CONTEXT_OPTION, new OptionContextData(opt,t));
+//			assertEquals(a, "222 111");  //$NON-NLS-1$
+//		} catch (BuildMacroException e) { fail(e.getLocalizedMessage()); }
+//		  catch (BuildException e) { fail(e.getLocalizedMessage()); }
+//		  
+//		// Create resource configuration
+//		IResourceConfiguration rc = cfgs[0].createResourceConfiguration(getFile());
+//		assertNotNull(rc);
+//		IOption ropt = rc.getTools()[0].getOptionById(OPT_IDS);
+//		try {
+//			ropt = rc.setOption(rc.getTools()[0], ropt, "333 " + INC_DEF);  //$NON-NLS-1$
+//			String a = mp.resolveValue(ropt.getStringValue(), UNKNOWN, LISTSEP, IBuildMacroProvider.CONTEXT_OPTION, new OptionContextData(opt,t));
+//			assertEquals(a, "333 111");  //$NON-NLS-1$
+//		} catch (Exception e) { fail(e.getLocalizedMessage());	}
+//	}
+	
+	
+	public void testMacroOptL(){
+		doInit();
+		IToolChain tc = cfgs[0].getToolChain();
+		ITool       t = cfgs[0].getTools()[0];
+		IOption   opt = t.getOptionById(OPT_IDL);
+		OptionContextData ocd = new OptionContextData(opt,t);
+		assertNotNull(opt);
+		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_OPTION, ocd);
+		assertNotNull(ms);
+		assertEquals(ms.length, 1);
+		
+		try {
+			String[] set0 = opt.getStringListValue();
+			assertNotNull(set0);
+			final String[] set1 = {"new a", /*"test=${TEST}",*/ INC_DEF, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$  
+				 "${PATH}", "PRJ=${NEW_FOR_PRJ}", "LIST=" + INC_DEF};//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			String[] res1 = {"new a", /*"test=CFGTEST",*/ "x", "y",      //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+					     "z", ":", "PRJ=NewMacrosForProjectContext", "LIST=x|y|z"};        //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			try {
+				res1[4] = mp.resolveValue("${PATH}",UNKNOWN,LISTSEP,IBuildMacroProvider.CONTEXT_OPTION, ocd);  //$NON-NLS-1$
+			} catch (BuildMacroException e) { fail(e.getLocalizedMessage()); } 
+
+			opt = cfgs[0].setOption(t, opt, set1);
+			assertNotNull(opt);
+
+			ArrayList ar = new ArrayList(1);
+			for (int i=0; i<set1.length; i++) {
+				try {
+					String[] aus = mp.resolveStringListValue(set1[i], UNKNOWN, LISTSEP, IBuildMacroProvider.CONTEXT_OPTION, new OptionContextData(opt,t));
+					if (aus == null) continue;
+					for (int j=0; j<aus.length; j++) ar.add(aus[j]);
+				} catch (BuildMacroException e) { fail(e.getLocalizedMessage()); } 
+			}
+			String[] res = (String[])ar.toArray(new String[0]);
+			assertEquals(res.length, res1.length);
+			for (int i=0; i<res.length; i++) assertEquals(res[i], res1[i]);
+		} catch (BuildException e) { fail(e.getLocalizedMessage());	}
+	}
+	
+	/**
+	 * testMacroFile()
+	 */
+//	public void testMacroFile(){
+//		final String EIN = "ein.c";     //$NON-NLS-1$
+//		final String AUS = "aus.o";     //$NON-NLS-1$
+//		final String UP2W = "..\\..\\"; //$NON-NLS-1$
+//		final String UP2U = "../../";   //$NON-NLS-1$
+//		final String KLMN = "\\k\\l\\m\\n\\o\\p\\";  //$NON-NLS-1$
+//		final String[] names = 
+//		{"InputFileName", "InputFileExt", "InputFileBaseName",   //$NON-NLS-1$ //$NON-NLS-2$  //$NON-NLS-3$
+//		 "InputFileRelPath", "InputDirRelPath",                  //$NON-NLS-1$ //$NON-NLS-2$ 
+//		 "OutputFileName", "OutputFileExt", "OutputFileBaseName",//$NON-NLS-1$ //$NON-NLS-2$  //$NON-NLS-3$  
+//		 "OutputFileRelPath", "OutputDirRelPath"};               //$NON-NLS-1$ //$NON-NLS-2$
+//		String[] values0wAbs = 
+//		{"a.f77", "f77", "a", "\\xz\\a.f77", "\\xz\\",    //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+//		 "b.exe", "exe", "b", "\\tmp\\b.exe", "\\tmp\\"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+//		final String[] values0wRel = 
+//		{EIN, "c", "ein", UP2W+EIN, UP2W,  //$NON-NLS-1$ //$NON-NLS-2$
+//		 AUS, "o", "aus", UP2W+AUS, UP2W}; //$NON-NLS-1$ //$NON-NLS-2$
+//		
+//		final String[] values0u = 
+//		{EIN, "c", "ein", UP2U+EIN, UP2U,  //$NON-NLS-1$ //$NON-NLS-2$
+//		 AUS, "o", "aus", UP2U+AUS, UP2U}; //$NON-NLS-1$ //$NON-NLS-2$
+//		
+//		final String[] values1 = 
+//		{"$(notdir $<)", "$(suffix $(notdir $<))",       //$NON-NLS-1$ //$NON-NLS-2$
+//		 "$(basename $(notdir $<))", "$<", "$(dir $<)",  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+//		 "$(notdir $@)", "$(suffix $(notdir $@))",       //$NON-NLS-1$ //$NON-NLS-2$
+//		 "$(basename $(notdir $@))", "$@", "$(dir $@)"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+//		
+//		FileContextData fd = null;
+//		
+//		doInit();
+//		ITool t = cfgs[0].getTools()[0];
+//		assertNotNull(t);
+//		IOption opt = t.getOptionById(OPT_IDS);
+//			
+//		String dir=null;
+//		try {
+//			dir = mp.getMacro("WorkspaceDirPath", IBuildMacroProvider.CONTEXT_WORKSPACE, worksp, flag).getStringValue(); //$NON-NLS-1$
+//		} catch (BuildMacroException e) { fail(e.getLocalizedMessage()); }
+//		IPath p = (new Path(dir)).addTrailingSeparator();
+//		
+//		if (windows) {
+//			// check behaviour in case of different disks usage
+//			
+//			// config #4 has changed BuilderMakeFileGenerator, #0 has standard one
+//			IBuildEnvironmentVariable cwdvar = ManagedBuildManager.getEnvironmentVariableProvider().getVariable("CWD", cfgs[0], false, true); //$NON-NLS-1$
+//			String dev0 = Path.fromOSString(cwdvar.getValue()).getDevice().toUpperCase();
+//			String dev1 = (dev0.startsWith("C")) ? "D:" : "C:";  //$NON-NLS-1$  //$NON-NLS-2$  //$NON-NLS-3$  
+//			values0wAbs[3] = dev1 + values0wAbs[3];		
+//			values0wAbs[4] = dev1 + values0wAbs[4];		
+//			values0wAbs[8] = dev1 + values0wAbs[8];
+//			values0wAbs[9] = dev1 + values0wAbs[9];
+//			
+//			fd = new FileContextData(new Path(values0wAbs[3]), new Path(values0wAbs[8]),opt,t);
+//			for (int i=0; i<names.length; i++) 
+//			try {	
+//				assertEquals(values0wAbs[i], mp.getMacro(names[i], IBuildMacroProvider.CONTEXT_FILE, fd, flag).getStringValue());
+//			} catch (BuildMacroException e) { fail(e.getLocalizedMessage()); }
+//			
+//			// check that relative path are reported OK
+//			fd = new FileContextData(p.append(EIN), p.append(AUS),opt,t);
+//			for (int i=0; i<names.length; i++) 
+//			try {
+//				assertEquals(values0wRel[i], mp.getMacro(names[i], IBuildMacroProvider.CONTEXT_FILE, fd, flag).getStringValue());
+//			} catch (BuildMacroException e) { fail(e.getLocalizedMessage()); }
+//
+////			//TODO:
+////			// check paths using changed BuilderMakeFileGenerator in cfg "Five"
+/////*			
+////			int index = 4;
+////			ManagedBuildManager.setDefaultConfiguration(proj, cfgs[index]);
+////			OptionContextData op = new OptionContextData(cfgs[index].getTools()[0].getOptions()[0], cfgs[index].getToolChain());
+////			String p0 = dev0 + KLMN;
+////			fd = new FileContextData(new Path(p0+EIN), new Path(p0+AUS), op);
+////			assertNotNull(fd);
+////			//TODO: the same dir, upper dir, lower dir 
+////			try {
+////				TestMacro.topBuildDir = Path.fromOSString(p0);
+////				assertEquals(p0+EIN, mp.getMacro(names[3], IBuildMacroProvider.CONTEXT_FILE, fd, flag).getStringValue());
+////				assertEquals(p0,     mp.getMacro(names[4], IBuildMacroProvider.CONTEXT_FILE, fd, flag).getStringValue());
+////				assertEquals(p0+AUS, mp.getMacro(names[8], IBuildMacroProvider.CONTEXT_FILE, fd, flag).getStringValue());
+////				assertEquals(p0,     mp.getMacro(names[9], IBuildMacroProvider.CONTEXT_FILE, fd, flag).getStringValue());
+//////				p0 = Path.fromOSString(p0).removeLastSegments(2).addTrailingSeparator().toOSString();
+//////				p0 = dev0+KLMN+"x\\";
+//////				TestMacro.topBuildDir = Path.fromOSString(p0);
+////				assertEquals(p0+EIN, mp.getMacro(names[3], IBuildMacroProvider.CONTEXT_FILE, fd, flag).getStringValue());
+////				assertEquals(p0,     mp.getMacro(names[4], IBuildMacroProvider.CONTEXT_FILE, fd, flag).getStringValue());
+////				assertEquals(p0+AUS, mp.getMacro(names[8], IBuildMacroProvider.CONTEXT_FILE, fd, flag).getStringValue());
+////				assertEquals(p0,     mp.getMacro(names[9], IBuildMacroProvider.CONTEXT_FILE, fd, flag).getStringValue());
+////			} catch (BuildMacroException e) { fail(e.getLocalizedMessage()); }
+//////				*/				
+//			
+//			
+//		} else {
+//			// check relative path only
+//			fd = new FileContextData(p.append(EIN), p.append(AUS),opt,t);
+//			for (int i=0; i<names.length; i++) 
+//			try {	
+//				assertEquals(values0u[i], mp.getMacro(names[i], IBuildMacroProvider.CONTEXT_FILE, fd, flag).getStringValue());
+//			} catch (BuildMacroException e) { fail(e.getLocalizedMessage()); }
+//		}
+//		
+//		// check supplier's parameters
+//		assertNotNull(fd);
+//		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_FILE, fd);
+//		assertNotNull(ms);
+//		assertEquals(ms.length, 1);
+//		assertFalse(addMacro(TEST, IBuildMacro.VALUE_TEXT, 
+//				TST[IBuildMacroProvider.CONTEXT_FILE], IBuildMacroProvider.CONTEXT_FILE, fd));
+//
+//		// For config #3, macros should contain lines specified in plugin.xml
+//		opt = cfgs[1].getTools()[0].getOptions()[0];		
+//		fd = new FileContextData(p.append(EIN), p.append(AUS),opt,cfgs[1].getTools()[0]);
+//		for (int i=0; i<names.length; i++) 
+//		try {
+//			assertEquals(values1[i], mp.getMacro(names[i], IBuildMacroProvider.CONTEXT_FILE, fd, flag).getStringValue());
+//		} catch (BuildMacroException e) { fail(e.getLocalizedMessage()); }
+//	}
+	
+	
+	
+	
+	/**
+	 * testMacroContext()
+	 */
+	public void rm_testMacroContext(){
+		doInit();
+		IBuildMacro mcfg = mp.getMacro(TEST, IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[0], true);
+		IBuildMacro mprj = mp.getMacro(TEST, IBuildMacroProvider.CONTEXT_PROJECT, mproj, true);
+		IBuildMacro mwsp = mp.getMacro(TEST, IBuildMacroProvider.CONTEXT_WORKSPACE, worksp, true);
+		assertNotNull(mcfg);
+		assertNotNull(mprj);
+		assertNotNull(mwsp);
+		try {
+			assertEquals(mcfg.getStringValue(), TST[IBuildMacroProvider.CONTEXT_CONFIGURATION]);
+			assertEquals(mprj.getStringValue(), TST[IBuildMacroProvider.CONTEXT_PROJECT]);
+			assertEquals(mwsp.getStringValue(), TST[IBuildMacroProvider.CONTEXT_WORKSPACE]);
+		} catch (BuildMacroException e) {
+			fail(e.getLocalizedMessage());
+		}
+	}
+	
+	/**
+	 * testMacroResolve()
+	 */
+//	public void testMacroResolve(){
+//		doInit();		
+//		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_WORKSPACE, worksp);
+//		assertNotNull(ms);
+//		String[] lst = {"AAA", "BBB", "CCC"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+//		assertTrue(addMacro("LST", IBuildMacro.VALUE_TEXT_LIST, lst, //$NON-NLS-1$
+//				IBuildMacroProvider.CONTEXT_WORKSPACE, worksp));		
+//		 assertTrue(addMacro("ONE", IBuildMacro.VALUE_TEXT, "EIN", //$NON-NLS-1$ //$NON-NLS-2$
+//				IBuildMacroProvider.CONTEXT_WORKSPACE, worksp));
+//		// 
+//		assertTrue(addMacro("L1", IBuildMacro.VALUE_TEXT, "nested L1-${L2}-L1", //$NON-NLS-1$ //$NON-NLS-2$
+//				IBuildMacroProvider.CONTEXT_WORKSPACE, worksp));
+//		assertTrue(addMacro("L2", IBuildMacro.VALUE_TEXT, "L2-${L3}-L2", //$NON-NLS-1$ //$NON-NLS-2$
+//				IBuildMacroProvider.CONTEXT_WORKSPACE, worksp));
+//		assertTrue(addMacro("L3", IBuildMacro.VALUE_TEXT, "L3-${L4}-L3", //$NON-NLS-1$ //$NON-NLS-2$
+//				IBuildMacroProvider.CONTEXT_WORKSPACE, worksp)); 
+//		assertTrue(addMacro("L4", IBuildMacro.VALUE_TEXT, "L4", //$NON-NLS-1$ //$NON-NLS-2$
+//				IBuildMacroProvider.CONTEXT_WORKSPACE, worksp));
+//				
+//		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_PROJECT, mproj);
+//		assertNotNull(ms);
+//		assertTrue(addMacro("TWO", IBuildMacro.VALUE_TEXT, "ZWEI", //$NON-NLS-1$ //$NON-NLS-2$
+//				IBuildMacroProvider.CONTEXT_PROJECT, mproj));
+//		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[0]);
+//		assertNotNull(ms);
+//		assertTrue(addMacro("three", IBuildMacro.VALUE_TEXT, "DREI", //$NON-NLS-1$ //$NON-NLS-2$
+//				IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[0])); 
+//		
+//		
+//		// check normal workflow
+//		try {
+//			final String pattern = "${ONE} - ${TWO} - ${three} -> ${LST}"; //$NON-NLS-1$
+//			String a = mp.resolveValue(pattern, UNKNOWN, LISTSEP,
+//				IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[0]);
+//			String b = mp.resolveValue(pattern, UNKNOWN, LISTSEP,
+//					IBuildMacroProvider.CONTEXT_PROJECT, mproj);
+//			String c = mp.resolveValue(pattern, UNKNOWN, LISTSEP,
+//					IBuildMacroProvider.CONTEXT_WORKSPACE, worksp);
+//			String d = mp.resolveValue("${L1}", UNKNOWN, LISTSEP, //$NON-NLS-1$
+//					IBuildMacroProvider.CONTEXT_WORKSPACE, worksp);
+//			String e = mp.resolveValue("${one} - ${Two} - ${THREE} -> ${lst}", UNKNOWN, LISTSEP, //$NON-NLS-1$
+//					IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[0]);
+//			
+//			assertEquals(a, "EIN - ZWEI - DREI -> AAA|BBB|CCC"); //$NON-NLS-1$
+//			assertEquals(b, "EIN - ZWEI - <HZ> -> AAA|BBB|CCC"); //$NON-NLS-1$
+//			assertEquals(c, "EIN - <HZ> - <HZ> -> AAA|BBB|CCC"); //$NON-NLS-1$
+//			assertEquals(d, "nested L1-L2-L3-L4-L3-L2-L1"); //$NON-NLS-1$
+//			assertEquals(e, "<HZ> - <HZ> - <HZ> -> <HZ>");  //$NON-NLS-1$  
+//		} catch (BuildMacroException e) {
+//			fail("Exception while resolving: " + e.getLocalizedMessage()); //$NON-NLS-1$
+//		}
+//	}
+	
+	/**
+	 * testMacroResolveExceptions()
+	 */
+	public void testMacroResolveExceptions () {
+		doInit();		
+
+		boolean exceptionRaised = false;
+		try { // ZERO is undefined macro
+			String a = mp.resolveValue("${ONE} - ${ZERO}", null, null,  //$NON-NLS-1$
+				IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[0]);
+		} catch (BuildMacroException e) {
+			exceptionRaised = true;
+		}
+		assertTrue("Exception not raised for undefined macro", exceptionRaised);  //$NON-NLS-1$
+		
+		exceptionRaised = false;
+		try { // delimiter is undefined for list
+			String a = mp.resolveValue("${LST}", null, null,  //$NON-NLS-1$
+				IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[0]);
+		} catch (BuildMacroException e) {
+			exceptionRaised = true;
+		}
+		assertTrue("Exception not raised for undefined delimiter", exceptionRaised);  //$NON-NLS-1$
+	}
+	
+	/**
+	 * testMacroResolveLoop()
+	 */
+//	public void testMacroResolveLoop() {
+//		doInit();
+//		int ctx = IBuildMacroProvider.CONTEXT_WORKSPACE;
+//		Object obj = worksp;
+//		ms = mp.getSuppliers(ctx, obj);
+//		assertNotNull(ms);
+//		
+//		// check state before macros added (should be OK)
+//		try {
+//			mp.checkIntegrity(ctx, obj);
+//		} catch (BuildMacroException e) {
+//			fail("Macros integrity check is failed");  //$NON-NLS-1$
+//		}
+//
+//		// create macro which references to undefined macro 	
+//		assertTrue(addMacro("B1", IBuildMacro.VALUE_TEXT, "B1-${B2}", ctx, obj)); //$NON-NLS-1$ //$NON-NLS-2$
+//		rmMacro("B2", ctx, obj); // usually it does not exist, but to be sure...  //$NON-NLS-1$
+//
+//		// check state after macro added (should be exception)
+//		try {
+//			mp.checkIntegrity(ctx, obj);
+//			fail("Macros misintegrity (ref to undefined) is not detected");  //$NON-NLS-1$
+//		} catch (BuildMacroException e) {}
+//		
+//		// create "dead loop" of nested macros
+//		assertTrue(addMacro("B2", IBuildMacro.VALUE_TEXT, "B2-${B3}", ctx, obj));  //$NON-NLS-1$ //$NON-NLS-2$
+//		assertTrue(addMacro("B3", IBuildMacro.VALUE_TEXT, "B3-${B1}", ctx, obj));  //$NON-NLS-1$ //$NON-NLS-2$
+//		
+//		// check state after macros added (should be exception)
+//		try {
+//			mp.checkIntegrity(ctx, obj);
+//			fail("Macros misintegrity (dead loop) is not detected");  //$NON-NLS-1$
+//		} catch (BuildMacroException e) {}
+//		
+//		// remove "dead loop" of nested macros
+//		assertTrue(rmMacro("B1", ctx, obj)); //$NON-NLS-1$
+//		assertTrue(rmMacro("B2", ctx, obj)); //$NON-NLS-1$
+//		assertTrue(rmMacro("B3", ctx, obj)); //$NON-NLS-1$
+//		
+//		// check state after macros removed (should be OK)
+//		try {
+//			mp.checkIntegrity(ctx, obj);
+//		} catch (BuildMacroException e) {
+//			fail("Macros integrity check is failed " + e.getLocalizedMessage());  //$NON-NLS-1$
+//		}
+//	}
+	/**
+	 * testMacroResolveMake()
+	 */
+	/*
+	public void testMacroResolveMake(){
+		final String p1 = "USERNAME: ";    //$NON-NLS-1$
+		final String p2 = "${USERNAME} ";  //$NON-NLS-1$
+		final String p3 = "PATH: ";        //$NON-NLS-1$  
+		final String p4 = "${PATH} ";      //$NON-NLS-1$
+		final String p5 = "HostOsName: ${HostOsName} WorkspaceDirPath: ${WorkspaceDirPath}";  //$NON-NLS-1$ 
+		final String ein1 = p1 + p2 + p3;
+		final String ein2 = p4 + p5;
+		final String ein = ein1 + ein2;
+		final String aus1 = "@USERNAME ";  //$NON-NLS-1$
+		final String aus2 = "@PATH ";      //$NON-NLS-1$
+		doInit();
+		// Config #0 contains "variableFormat" macro = "@=". Result: 2 first macros NOT resolved 
+		try {
+			UserDefinedEnvironmentSupplier env = EnvironmentVariableProvider.fUserSupplier;
+			env.createVariable("PATH","",IBuildEnvironmentVariable.ENVVAR_PREPEND,null,worksp);
+			env.createVariable("USERNAME","",IBuildEnvironmentVariable.ENVVAR_PREPEND,null,worksp);
+			functionCalled = 0;
+			String a = mp.resolveValueToMakefileFormat(ein, UNKNOWN, LISTSEP, IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[0]);
+			String b = p1 + aus1 + p3 + mp.resolveValue(ein2, UNKNOWN, LISTSEP, IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[0]);
+			assertEquals(a, b); // Env var names should not be resolved but converted to Makefile format			
+			a = mp.resolveValueToMakefileFormat(ein, UNKNOWN, LISTSEP, IBuildMacroProvider.CONTEXT_PROJECT, mproj);
+			assertEquals(a, b); // Project context should return the same as default configuration
+		} catch (BuildMacroException e) {
+			fail(e.getLocalizedMessage());
+		}
+		// Config #1 does not contain "variableFormat" macro. Result: all macros resolved.
+		try {
+			String a = mp.resolveValue(ein, UNKNOWN, LISTSEP, IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[1]);
+			String b = mp.resolveValueToMakefileFormat(ein, UNKNOWN, LISTSEP, IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[1]);
+			assertEquals(a, b);
+		} catch (BuildMacroException e) {
+			fail(e.getLocalizedMessage());
+		}
+		// check that "isReservedName" was not called before
+		assertEquals(functionCalled & RESERVED_NAME, 0);
+
+		// Config #2 contains "...Supplier" macro. Result: PATH unresolved, USERNAME resolved.
+		try {
+			String a = mp.resolveValue(p1 + p2, UNKNOWN, LISTSEP, IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[2]);
+			String b = mp.resolveValue(p5, UNKNOWN, LISTSEP, IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[2]);
+			a = a + p3 + aus2 + b; // USERNAME: xxx PATH: @PATH HostOsName: xxx ...
+			b = mp.resolveValueToMakefileFormat(ein, UNKNOWN, LISTSEP, IBuildMacroProvider.CONTEXT_CONFIGURATION, cfgs[2]);
+			assertEquals(a, b);
+			// check that "isReservedName" has been called
+			assertEquals(functionCalled & RESERVED_NAME, RESERVED_NAME);
+		} catch (BuildMacroException e) {
+			fail(e.getLocalizedMessage());
+		}
+	}
+	*/
+
+	/**
+	 * testMacroResolveCase()
+	 */
+//	public void testMacroResolveCase(){
+//		doInit();
+//		addVars();
+//		final String winOut1 = "@CASETEST uppercase uppercase uppercase";   //$NON-NLS-1$
+//		final String winOut2 = "@CASETEST @CASETEST @CASETEST @CASETEST";   //$NON-NLS-1$
+//		
+//		final String unixOut1 = "@CASETEST capitalize lowercase upper2low"; //$NON-NLS-1$
+//		final String unixOut2 = "@CASETEST @CaseTest @casetest @CaSeTeSt";  //$NON-NLS-1$
+//		
+//		final String ein = "${CASETEST} ${CaseTest} ${casetest} ${CaSeTeSt}"; //$NON-NLS-1$
+//		final int ctx = IBuildMacroProvider.CONTEXT_CONFIGURATION;
+//		String a=null, b=null; 
+//		try {
+//			// Config #0 contains isVariableCaseSensitive = false  
+//			a = mp.resolveValueToMakefileFormat(ein, UNKNOWN, LISTSEP, ctx, cfgs[0]);
+//			// Config #3 contains isVariableCaseSensitive = true
+//			b = mp.resolveValueToMakefileFormat(ein, UNKNOWN, LISTSEP, ctx, cfgs[3]);
+//		} catch (BuildMacroException e) {
+//			fail(e.getLocalizedMessage());
+//		}
+//		if (windows) {
+//			assertEquals(a, winOut1);
+//			assertEquals(b, winOut2);
+//		} else { // linux
+//			assertEquals(a, unixOut1);
+//			assertEquals(b, unixOut2);
+//		}
+//	}
+
+	/**
+	 * testMacroSave()
+	 */
+	
+//	public void testMacroSave(){
+//		final String TO_SAVE_P = "TO_SAVE_P";  //$NON-NLS-1$
+//		final String TO_SAVE_W = "TO_SAVE_W";  //$NON-NLS-1$
+//		doInit();		
+//		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_PROJECT, mproj);
+//		assertNotNull(ms);
+//		assertTrue(addMacro(TO_SAVE_P, IBuildMacro.VALUE_TEXT, TO_SAVE_P,
+//				IBuildMacroProvider.CONTEXT_PROJECT, mproj));
+//		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_WORKSPACE, worksp);
+//		assertNotNull(ms);
+//		assertTrue(addMacro(TO_SAVE_W, IBuildMacro.VALUE_TEXT, TO_SAVE_W,
+//				IBuildMacroProvider.CONTEXT_WORKSPACE, worksp));
+//		try {
+//			// Save the buildinfo, and then remove it, to be complete
+//			ManagedBuildManager.saveBuildInfo(proj, true);
+//			ManagedBuildManager.removeBuildInfo(proj);
+//			proj.close(null);
+//			proj.open(null);
+//		} catch (CoreException e) {
+//			fail("Failed on project close/open: " + e.getLocalizedMessage()); //$NON-NLS-1$
+//		}
+//		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_PROJECT, mproj);
+//		assertNotNull(ms);
+//		String[] a = printMacros(mp.getMacros(IBuildMacroProvider.CONTEXT_PROJECT, mproj, flag), TO_SAVE_P);
+//		String[] b1 = {TO_SAVE_P};
+//		assertTrue(arrayContains(b1, a));
+//
+//		ms = mp.getSuppliers(IBuildMacroProvider.CONTEXT_WORKSPACE, worksp);
+//		assertNotNull(ms);
+//		a = printMacros(mp.getMacros(IBuildMacroProvider.CONTEXT_WORKSPACE, worksp, flag), TO_SAVE_W);
+//		String[] b2 = {TO_SAVE_W};
+//		assertTrue(arrayContains(b2, a));
+//	}	
+	
+/*
+ * Below are service methods 
+ */	
+	//TODO: comments for all methods
+	
+	// returns a list of macro's NAMES (not values).
+	private String[] printMacros(IBuildMacro[] vars, String head) {
+		ArrayList ar = new ArrayList(0);
+		if (vars != null) {
+			if (vars.length > 0) {
+				for (int i=0; i < vars.length; i++) {
+					try {
+						ar.add(vars[i].getName());
+						if (!print) continue;
+						if ((vars[i].getMacroValueType() % 2) == 1) // not-list
+							//if (vars[i] instanceof EclipseVarMacro) {
+							if (vars[i].getName().endsWith("prompt")) {  //$NON-NLS-1$
+								System.out.println(head + "[" + i + "] " +  //$NON-NLS-1$  //$NON-NLS-2$
+									vars[i].getName() + " = <UNREACHABLE>");  //$NON-NLS-1$ 
+							} else {
+								System.out.println(head + "[" + i + "] " +  //$NON-NLS-1$ //$NON-NLS-2$
+								    vars[i].getName() + " = " + vars[i].getStringValue()); //$NON-NLS-1$
+							}				
+						else {
+							System.out.println(head + "[" + i + "] " +  //$NON-NLS-1$ //$NON-NLS-2$
+									vars[i].getName() + ":");  //$NON-NLS-1$
+							String[] m = vars[i].getStringListValue();	
+							printStrings(m, "    ");  //$NON-NLS-1$
+						}
+					} catch (Exception e) {}
+				}
+			} else { if (print) System.out.println(head + ": array is empty");	}  //$NON-NLS-1$
+		} else { if (print) System.out.println(head + ": array is null"); }  //$NON-NLS-1$
+		return (String[])ar.toArray(new String[0]);
+	}
+
+	private void printStrings(String[] vars, String head) {
+		if (!print) return;
+		if (vars != null) {
+			if (vars.length > 0) {
+				for (int j=0; j<vars.length; j++) System.out.println(head + vars[j]);
+			} else { System.out.println(head + ": array is empty");	}  //$NON-NLS-1$
+		} else { System.out.println(head + ": array is null"); }  //$NON-NLS-1$
+	}
+	
+	/* Create new project or get existing one
+	 * 
+	 * Sets "proj" "mproj" class variables
+	 */
+	
+	
+	static void createManagedProject(String name) {
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		proj = root.getProject(name); 
+		if (proj.exists()) {
+			mproj = ManagedBuildManager.getBuildInfo(proj).getManagedProject();
+		} else {
+			IWorkspace workspace = ResourcesPlugin.getWorkspace();
+			IWorkspaceDescription workspaceDesc = workspace.getDescription();
+			workspaceDesc.setAutoBuilding(false);
+			try {
+				workspace.setDescription(workspaceDesc);
+				proj = CCorePlugin.getDefault().createCProject(workspace.newProjectDescription(proj.getName()), 
+					proj, new NullProgressMonitor(), ManagedBuilderCorePlugin.MANAGED_MAKE_PROJECT_ID);
+			
+				// 	add ManagedBuildNature
+				IManagedBuildInfo info = ManagedBuildManager.createBuildInfo(proj);
+				info.setValid(true);
+				ManagedCProjectNature.addManagedNature(proj, null);
+				ManagedCProjectNature.addManagedBuilder(proj, null);
+
+				ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(proj, true);
+				desc.remove(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID);
+				desc.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, ManagedBuildManager.INTERFACE_IDENTITY);
+				desc.saveProjectData();
+			} catch (CoreException e) {
+				fail("Cannot create project: " + e.getLocalizedMessage()); //$NON-NLS-1$
+			}				
+			
+			// Call this function just to avoid init problems in getProjectType();   
+			IProjectType[] projTypes = ManagedBuildManager.getDefinedProjectTypes();
+			IProjectType projType = ManagedBuildManager.getProjectType("cdt.managedbuild.target.testenv.exe"); //$NON-NLS-1$
+			assertNotNull(projType);
+			try {
+				mproj = ManagedBuildManager.createManagedProject(proj, projType);
+			} catch (BuildException e) {}
+			ManagedBuildManager.setNewProjectVersion(proj);
+			IConfiguration[] cfgs = projType.getConfigurations();
+			IConfiguration defcfg = cfgs.length > 0 ? mproj.createConfiguration(cfgs[0], projType.getId() + ".0") : null; //$NON-NLS-1$
+			for (int i = 1; i < cfgs.length; ++i) { // sic ! from 1
+				mproj.createConfiguration(cfgs[i], projType.getId() + "." + i); //$NON-NLS-1$
+			}
+			ManagedBuildManager.setDefaultConfiguration(proj, defcfg);
+		}
+		// open project w/o progress monitor; no action performed if it's opened
+		try {
+			proj.open(null);
+		} catch (CoreException e) {}				
+	}
+	/**
+	 *  doInit() - call it at the beginning of every test
+	 *
+	 */
+	private void doInit() {
+		createManagedProject("Test");  //$NON-NLS-1$
+		assertNotNull(proj);
+		assertNotNull(mproj);
+		worksp = proj.getWorkspace();
+		assertNotNull(worksp);
+		mp = ManagedBuildManager.getBuildMacroProvider();
+		assertNotNull(mp);
+		cfgs = mproj.getConfigurations();
+		assertNotNull(cfgs);
+		windows = System.getProperty("os.name").toLowerCase().startsWith("windows");  //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	/**
+	 *      arrayContains
+	 * check that ALL variables from list a have correspondence in list b
+	 * @param a
+	 * @param b
+	 * @return
+	 */
+	private boolean arrayContains(String[] a, String[] b) {
+		assertNotNull(a);
+		assertNotNull(b);
+		for (int i=0; i<a.length; i++) {
+			boolean found = false;
+			for (int j=0; j<b.length; j++) {
+				if (a[i].equals(b[j])) {
+					found = true;
+					break;
+				}
+			}
+			if (!found) return false;
+		}	
+		return true;
+	}
+	/**
+	 *      addMacro
+	 * @param name
+	 * @param type
+	 * @param value
+	 * @param context
+	 * @param obj
+	 * @return
+	 */
+	/*private boolean addMacro(String name, int type, String value, int context, Object obj) {
+		assertNotNull(ms);
+		for(int i=0; i<ms.length; i++) {
+			if (ms[i] instanceof UserDefinedMacroSupplier) {
+				return (((UserDefinedMacroSupplier)ms[i]).createMacro(name,type,value,context,obj) != null);
+			}
+		}
+		return false;
+	}*/
+	/**
+	 *      addMacro
+	 * @param name
+	 * @param type
+	 * @param value
+	 * @param context
+	 * @param obj
+	 * @return
+	 */
+/*	private boolean addMacro(String name, int type, String[] value, int context, Object obj) {
+		assertNotNull(ms);
+		for(int i=0; i<ms.length; i++) {
+			if (ms[i] instanceof UserDefinedMacroSupplier) {
+				return (((UserDefinedMacroSupplier)ms[i]).createMacro(name,type,value,context,obj) != null);
+			}
+		}
+		return false;
+	}*/
+	/**
+	 *      rmMacro
+	 * @param name     - name of macro 
+	 * @param context  
+	 * @param obj
+	 * @return
+	 */
+/*	private boolean rmMacro(String name, int context, Object obj) {
+		assertNotNull(ms);
+		for(int i=0; i<ms.length; i++) {
+			if (ms[i] instanceof UserDefinedMacroSupplier) {
+				return (((UserDefinedMacroSupplier)ms[i]).deleteMacro(name,context,obj) != null);
+			}
+		}
+		return false;
+	}
+	*/
+	/*
+	 * addVars() - adds macros for testMacroResolveCase
+	 */
+//	private void addVars() {
+//		int app = IBuildEnvironmentVariable.ENVVAR_APPEND;
+//		String del = ""; //$NON-NLS-1$
+//		UserDefinedEnvironmentSupplier usup = null;
+//		usup = ManagedBuildEnvironmentTests.getSupplier(worksp, "Workspace"); //$NON-NLS-1$
+//		if (usup != null) {
+//			try {
+//				usup.createVariable("casetest","lowercase",  app, del, worksp ); //$NON-NLS-1$ //$NON-NLS-2$ 
+//				usup.createVariable("CaseTest","capitalize", app, del, worksp ); //$NON-NLS-1$ //$NON-NLS-2$
+//				usup.createVariable("CaSeTeSt","upper2low",  app, del, worksp ); //$NON-NLS-1$ //$NON-NLS-2$
+//				usup.createVariable("CASETEST","uppercase",  app, del, worksp ); //$NON-NLS-1$ //$NON-NLS-2$
+//			} catch (Exception e) {
+//				fail("Failed to create workspace vars " + e.getLocalizedMessage()); //$NON-NLS-1$
+//			}
+//		}
+//	}
+	/*
+	 * getFile() - open or creates sample file in current project
+	 */
+	private IFile getFile() { 
+		final String FILENAME = "main.c";            //$NON-NLS-1$
+		final String FILETEXT = "int main(){\n return 0;\n}"; //$NON-NLS-1$
+
+		IFile f = proj.getProject().getFile(FILENAME);
+		if ( !f.exists() )
+			try {
+				f.create( new ByteArrayInputStream(FILETEXT.getBytes() ), false, null );
+		} catch (CoreException e) {	fail(e.getLocalizedMessage()); }
+		return f;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildTCSupportedTest.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildTCSupportedTest.java
new file mode 100644
index 0000000..6ba49cc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildTCSupportedTest.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+
+/**
+ * 
+ * */
+public class ManagedBuildTCSupportedTest extends TestCase {
+
+	public ManagedBuildTCSupportedTest() {	super(); }
+	public ManagedBuildTCSupportedTest(String name) { super(name); }
+	
+	public static Test suite() {
+		TestSuite suite = new TestSuite(ManagedBuildTCSupportedTest.class.getName());
+		suite.addTest(new ManagedBuildTCSupportedTest("testIsSupported"));  //$NON-NLS-1$
+		return suite;
+	}
+	
+	/**
+	 * testIsSupported() - 
+	 */
+	public void testIsSupported() {
+		ManagedBuildMacrosTests.createManagedProject("Merde"); //$NON-NLS-1$
+		
+		IManagedProject mproj = ManagedBuildMacrosTests.mproj;	
+		assertNotNull(mproj);
+		IProjectType pt = mproj.getProjectType();
+		assertNotNull(pt);
+		IConfiguration[] cfgs = mproj.getConfigurations();
+		assertNotNull(cfgs);
+		IToolChain tc = cfgs[0].getToolChain();
+		assertNotNull(tc);
+		// all 4 toolchains are not supported now
+		for (int i=0; i<cfgs.length; i++) 
+			TestMacro.supported[i] = false;
+		for (int i=0; i< cfgs.length; i++) {
+			assertFalse(cfgs[i].getToolChain().isSupported());
+			assertFalse(cfgs[i].isSupported());
+		}
+		// so project type should be not supported
+	    assertFalse(pt.isSupported());
+		// 1 of 4 toolChains made supported
+		TestMacro.supported[0] = true;
+		assertTrue(tc.isSupported());
+		assertTrue(cfgs[0].isSupported());
+		for (int i=1; i< cfgs.length; i++) 
+			assertFalse(cfgs[i].isSupported());
+	    assertTrue(pt.isSupported());
+		// all 4 toolchains are supported now
+		for (int i=0; i<cfgs.length; i++) 
+			TestMacro.supported[i] = true;
+		for (int i=0; i<4; i++) 
+			assertTrue(cfgs[i].isSupported());
+		assertFalse(cfgs[4].isSupported());
+	    assertTrue(pt.isSupported());
+	}
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedCommandLineGeneratorTest.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedCommandLineGeneratorTest.java
new file mode 100644
index 0000000..fb53bbe
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedCommandLineGeneratorTest.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.util.ArrayList;
+
+import junit.framework.TestCase;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineGenerator;
+import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo;
+import org.eclipse.cdt.managedbuilder.internal.core.ManagedCommandLineGenerator;
+import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+
+public class ManagedCommandLineGeneratorTest extends TestCase {
+
+    private static String[] testCommandLinePatterns = {null, "${COMMAND}", "${COMMAND} ${FLAGS}", "${COMMAND} ${FLAGS} ${OUTPUT_FLAG}",
+            "${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}", "${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT}",
+            "${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}", 
+            "${command} ${flags} ${output_flag}${output_prefix}${output} ${WRONG_VAR_NAME}"};
+    private static String COMMAND_VAL = "[command]";
+    private static String FLAGS_VAL = "[flags]";
+    private static String[] FLAGS_ARRAY_VAL = FLAGS_VAL.split( "\\s" );
+    private static String OUTPUT_FLAG_VAL = "[outputFlag]";
+    private static String OUTPUT_PREFIX_VAL = "[outputPrefix]";
+    private static String OUTPUT_VAL = "[output]";
+    private static String INPUTS_VAL = "[inputs]";
+    private static String[] INPUTS_ARRAY_VAL = INPUTS_VAL.split( "\\s" );
+    private static String[] commandLineEtalonesForPatterns = {
+            COMMAND_VAL + " " + FLAGS_VAL + " " + OUTPUT_FLAG_VAL + OUTPUT_PREFIX_VAL + "\"" + OUTPUT_VAL + "\"" + " " + "\"" + INPUTS_VAL + "\"",
+            COMMAND_VAL, COMMAND_VAL + " " + FLAGS_VAL, COMMAND_VAL + " " + FLAGS_VAL + " " + OUTPUT_FLAG_VAL, 
+            COMMAND_VAL + " " + FLAGS_VAL + " " + OUTPUT_FLAG_VAL + OUTPUT_PREFIX_VAL,
+            COMMAND_VAL + " " + FLAGS_VAL + " " + OUTPUT_FLAG_VAL +  OUTPUT_PREFIX_VAL + "\"" + OUTPUT_VAL + "\"",
+            COMMAND_VAL + " " + FLAGS_VAL + " " + OUTPUT_FLAG_VAL + OUTPUT_PREFIX_VAL + "\"" + OUTPUT_VAL + "\"" + " " + "\"" + INPUTS_VAL + "\"",
+            COMMAND_VAL + " " + FLAGS_VAL + " " + OUTPUT_FLAG_VAL + OUTPUT_PREFIX_VAL + "\"" + OUTPUT_VAL + "\"" + " " + "${WRONG_VAR_NAME}" };
+    private static String[] commandLineEtalonesForParameters = {
+            FLAGS_VAL + " " + OUTPUT_FLAG_VAL + OUTPUT_PREFIX_VAL + OUTPUT_VAL + " " + INPUTS_VAL,
+            COMMAND_VAL + "  " + OUTPUT_FLAG_VAL + OUTPUT_PREFIX_VAL + OUTPUT_VAL + " " + INPUTS_VAL,
+            COMMAND_VAL + " " + FLAGS_VAL + " " + OUTPUT_PREFIX_VAL + OUTPUT_VAL + " " + INPUTS_VAL,
+            COMMAND_VAL + " " + FLAGS_VAL + " " + OUTPUT_FLAG_VAL + OUTPUT_VAL + " " + INPUTS_VAL,
+            COMMAND_VAL + " " + FLAGS_VAL + " " + OUTPUT_FLAG_VAL + OUTPUT_PREFIX_VAL + " " + INPUTS_VAL,
+            COMMAND_VAL + " " + FLAGS_VAL + " " + OUTPUT_FLAG_VAL + OUTPUT_PREFIX_VAL + OUTPUT_VAL + " ",
+             };
+    
+    public ManagedCommandLineGeneratorTest( String name ) {
+        super(name);
+    }
+    
+    public static Test suite() {
+        TestSuite suite = new TestSuite( ManagedCommandLineGeneratorTest.class.getName() );
+        suite.addTest( new ManagedCommandLineGeneratorTest( "testGetCommandLineGenerator" ) );
+        suite.addTest( new ManagedCommandLineGeneratorTest( "testGenerateCommandLineInfoPatterns" ) );
+        //  TODO:  The parameters set to NULL in these tests are not currently allowed to be null
+        //suite.addTest( new ManagedCommandLineGeneratorTest( "testGenerateCommandLineInfoParameters" ) );
+        suite.addTest( new ManagedCommandLineGeneratorTest( "testCustomGenerator" ) );
+        suite.addTest( new ManagedCommandLineGeneratorTest( "testDollarValue" ) );
+        return suite;
+    }
+    
+    public final void testGetCommandLineGenerator() {
+        IManagedCommandLineGenerator gen = ManagedCommandLineGenerator.getCommandLineGenerator();
+        assertNotNull( gen );
+    }
+
+    public final void testGenerateCommandLineInfoPatterns() {
+        IManagedCommandLineGenerator gen = ManagedCommandLineGenerator.getCommandLineGenerator();
+        IManagedCommandLineInfo info = null;
+        for( int i = 0; i < testCommandLinePatterns.length; i++ ) {
+            info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, INPUTS_ARRAY_VAL, 
+                    testCommandLinePatterns[i] );
+            assertNotNull( info );
+            if( i < commandLineEtalonesForPatterns.length ) {
+                assertEquals( info.getCommandLine(), commandLineEtalonesForPatterns[i] );
+            }
+        }
+    }
+    
+    public final void testGenerateCommandLineInfoParameters() {
+        IManagedCommandLineGenerator gen = ManagedCommandLineGenerator.getCommandLineGenerator();
+        IManagedCommandLineInfo info = gen.generateCommandLineInfo( null, null, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, INPUTS_ARRAY_VAL, null );
+        assertNotNull( info );
+        assertEquals( info.getCommandLine(), commandLineEtalonesForParameters[0] );
+        info = gen.generateCommandLineInfo( null, COMMAND_VAL, null, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, INPUTS_ARRAY_VAL, null );
+        assertNotNull( info );
+        assertEquals( info.getCommandLine(), commandLineEtalonesForParameters[1] );
+        info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, null, OUTPUT_PREFIX_VAL, OUTPUT_VAL, INPUTS_ARRAY_VAL, null );
+        assertNotNull( info );
+        assertEquals( info.getCommandLine(), commandLineEtalonesForParameters[2] );
+        info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, null, OUTPUT_VAL, INPUTS_ARRAY_VAL, null );
+        assertNotNull( info );
+        assertEquals( info.getCommandLine(), commandLineEtalonesForParameters[3] );
+        info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, null, INPUTS_ARRAY_VAL, null );
+        assertNotNull( info );
+        assertEquals( info.getCommandLine(), commandLineEtalonesForParameters[4] );
+        info = gen.generateCommandLineInfo( null, COMMAND_VAL, FLAGS_ARRAY_VAL, OUTPUT_FLAG_VAL, OUTPUT_PREFIX_VAL, OUTPUT_VAL, null, null );
+        assertNotNull( info );
+        assertEquals( info.getCommandLine().trim(), commandLineEtalonesForParameters[5].trim() );
+    }
+
+    public final void testCustomGenerator() {
+    	
+    	//  First, verify the elements in the project type
+    	IProjectType proj = ManagedBuildManager.getProjectType("cdt.managedbuild.test.java.attrs");
+    	assertNotNull(proj);
+    	IConfiguration[] configs = proj.getConfigurations();
+    	assertEquals(1, configs.length);
+    	IConfiguration config = proj.getConfiguration("cdt.managedbuild.test.java.attrs.config");
+    	assertNotNull(config);
+    	ITool[] tools = config.getTools();
+    	assertEquals(1, tools.length);
+    	ITool tool = config.getTool("cdt.managedbuild.test.java.attrs.tool");
+    	assertNotNull(tool);
+    	IOption[] options = tool.getOptions();
+    	assertEquals(20, options.length);
+    	IOption option = tool.getOption("testgnu.c.compiler.option.preprocessor.def.symbols.test");
+    	assertNotNull(option);
+    	Object val = option.getValue();
+    	assertTrue(val instanceof ArrayList);
+    	ArrayList list = (ArrayList)val;
+    	assertEquals("foo", list.get(0));
+    	assertEquals("bar", list.get(1));
+    	
+    	//  Next, invoke the commandLineGenerator for this tool
+    	IManagedCommandLineGenerator gen = tool.getCommandLineGenerator();
+    	String[] flags = {"-a", "-b", "-c"};
+    	String[] inputs = {"xy.cpp", "ab.cpp", "lt.cpp", "c.cpp"};
+    	IManagedCommandLineInfo info = gen.generateCommandLineInfo(tool, "MyName", flags, "-of", "opre", "TheOutput.exe", inputs, "[COMMAND] [FLAGS]");
+    	assertEquals("compiler.gnu.cMyName", info.getCommandName());
+    	assertEquals("-c -b -a", info.getFlags());
+    	assertEquals("ab.cpp c.cpp foo.cpp lt.cpp xy.cpp", info.getInputs());
+    	assertEquals("-0h", info.getOutputFlag());
+    	assertEquals("", info.getOutputPrefix());
+    	assertEquals("Testme", info.getOutput());
+    	assertEquals("[COMMAND] [FLAGS]", info.getCommandLinePattern());
+    	assertEquals("This is a test command line", info.getCommandLine());
+    	
+    	//  Next, invoke the build file generator for the tool chain
+    	IManagedBuilderMakefileGenerator makeGen = ManagedBuildManager.getBuildfileGenerator(config);
+    	String name = makeGen.getMakefileName();
+    	assertEquals("TestBuildFile.mak", name);
+    }
+    
+    public final void testDollarValue() {
+		try{
+			IProject project = ManagedBuildTestHelper.createProject("CDV", null, (IPath)null, "cdt.test.dollarValue.ProjectType");
+			IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+			IConfiguration config = info.getDefaultConfiguration();
+			//  Set values for the options
+			ITool[] tools = config.getToolsBySuperClassId("cdt.test.dollarValue.Tool");
+			assertEquals(tools.length, 1);
+			ITool tool = tools[0];
+			IOption option1 = tool.getOptionBySuperClassId("cdt.test.dollarValue.option1");
+			IOption option2 = tool.getOptionBySuperClassId("cdt.test.dollarValue.option2");
+			IOption option3 = tool.getOptionBySuperClassId("cdt.test.dollarValue.option3");
+			IOption option4 = tool.getOptionBySuperClassId("cdt.test.dollarValue.option4");
+			IOption option5 = tool.getOptionBySuperClassId("cdt.test.dollarValue.option5");
+			IOption option6 = tool.getOptionBySuperClassId("cdt.test.dollarValue.option6");
+
+			String command;
+
+			option1 = config.setOption(tool, option1, "OPT1VALUE");
+			option2 = config.setOption(tool, option2, "");
+			option3 = config.setOption(tool, option3, "X");
+			option4 = config.setOption(tool, option4, "opt4");
+			command = tool.getToolCommandFlagsString(null, null);
+	    	assertEquals("-opt1 OPT1VALUE X ${opt4}", command);
+						
+	    	option1 = config.setOption(tool, option1, "");
+	    	option2 = config.setOption(tool, option2, "Opt2");
+	    	option3 = config.setOption(tool, option3, "All work and no play...");
+	    	option4 = config.setOption(tool, option4, "123456789");
+	    	option5 = config.setOption(tool, option5, "DollarValue");
+			command = tool.getToolCommandFlagsString(null, null);
+	    	assertEquals("-opt2Opt2suffix All work and no play... ${123456789} DollarValueDollarValue", command);
+			
+	    	option1 = config.setOption(tool, option1, "0");
+	    	option2 = config.setOption(tool, option2, "LongValue");
+	    	option3 = config.setOption(tool, option3, "");
+	    	option4 = config.setOption(tool, option4, "");
+	    	option5 = config.setOption(tool, option5, "$");
+	    	option6 = config.setOption(tool, option6, "%%");
+			command = tool.getToolCommandFlagsString(null, null);
+	    	assertEquals("-opt1 0 -opt2LongValuesuffix $$ x%%yy%%z", command);
+			
+	    	option1 = config.setOption(tool, option1, "1");
+	    	option2 = config.setOption(tool, option2, "2");
+	    	option3 = config.setOption(tool, option3, "3");
+	    	option4 = config.setOption(tool, option4, "4");
+	    	option5 = config.setOption(tool, option5, "");
+	    	option6 = config.setOption(tool, option6, "");
+			command = tool.getToolCommandFlagsString(null, null);
+	    	assertEquals("-opt1 1 -opt22suffix 3 ${4}", command);
+			
+			ManagedBuildTestHelper.removeProject("CDV");
+		}
+		catch(Exception e){
+			fail("Test failed on project creation: " + e.getLocalizedMessage());
+		}
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject21MakefileTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject21MakefileTests.java
new file mode 100644
index 0000000..bf297ae
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject21MakefileTests.java
@@ -0,0 +1,324 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+
+/**********************************************************************
+ * These tests are for a 2.1 style tool integration.  That is, the
+ * tool integration does not use any 3.0 elements or attributes,
+ * including InputType, OutputType, etc.
+ **********************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.ArrayList;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.projectconverter.UpdateManagedProjectManager;
+import org.eclipse.cdt.managedbuilder.testplugin.CTestPlugin;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+
+public class ManagedProject21MakefileTests extends TestCase {
+	public static final String MBS_TEMP_DIR = "MBSTemp";
+
+	static boolean pathVariableCreated = false;
+	
+	public ManagedProject21MakefileTests(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite = new TestSuite(ManagedProject21MakefileTests.class.getName());
+		
+		suite.addTest(new ManagedProject21MakefileTests("testSingleFileExe"));
+		suite.addTest(new ManagedProject21MakefileTests("testTwoFileSO"));
+		suite.addTest(new ManagedProject21MakefileTests("testMultiResConfig"));
+		suite.addTest(new ManagedProject21MakefileTests("testLinkedLib"));
+		//  TODO: testLinkedFolder fails intermittently saying that it cannot find
+		//        the makefiles to compare.  This appears to be a test set issue,
+		//        rather than an MBS functionality issue
+		//suite.addTest(new ManagedProject21MakefileTests("testLinkedFolder"));
+		
+		return suite;
+	}
+
+	private IProject[] createProject(String projName, IPath location, String projectTypeId, boolean containsZip){
+		Path path = new Path("resources/test21Projects/" + projName);
+		File testDir = CTestPlugin.getFileInPlugin(path);
+		if(testDir == null) {
+			fail("Test project directory " + path + " is missing.");
+			return null;
+		}
+
+		ArrayList projectList = null;
+		if (containsZip) {
+			File projectZips[] = testDir.listFiles(new FileFilter(){
+				public boolean accept(File pathname){
+					if(pathname.isDirectory())
+						return false;
+					return true;
+				}
+			});
+			
+			projectList = new ArrayList(projectZips.length);
+			for(int i = 0; i < projectZips.length; i++){
+				try{
+					String projectName = projectZips[i].getName();
+					if(!projectName.endsWith(".zip"))
+						continue;
+					
+					projectName = projectName.substring(0,projectName.length()-".zip".length());
+					if(projectName.length() == 0)
+						continue;
+					IProject project = ManagedBuildTestHelper.createProject(projectName, projectZips[i], location, projectTypeId);
+					if(project != null)
+						projectList.add(project);
+				}
+				catch(Exception e){
+				}
+			}
+			if(projectList.size() == 0) {
+				fail("No projects found in test project directory " + testDir.getName() + ".  The .zip file may be missing or corrupt.");
+				return null;
+			}
+		} else {
+			try{
+				IProject project = ManagedBuildTestHelper.createProject(projName, null, location, projectTypeId);
+				if(project != null)
+					projectList = new ArrayList(1);
+					projectList.add(project);
+			} catch(Exception e){}
+		}
+		
+		return (IProject[])projectList.toArray(new IProject[projectList.size()]);
+	}
+	
+	private IProject[] createProjects(String projName, IPath location, String projectTypeId, boolean containsZip) {
+		
+		//  In case the projects need to be updated...
+		IOverwriteQuery queryALL = new IOverwriteQuery(){
+			public String queryOverwrite(String file) {
+				return ALL;
+			}};
+		IOverwriteQuery queryNOALL = new IOverwriteQuery(){
+			public String queryOverwrite(String file) {
+				return NO_ALL;
+			}};
+		
+		UpdateManagedProjectManager.setBackupFileOverwriteQuery(queryALL);
+		UpdateManagedProjectManager.setUpdateProjectQuery(queryALL);
+		
+		IProject projects[] = createProject(projName, location, projectTypeId, containsZip);
+		return projects;
+	}
+		
+	private boolean buildProjects(IProject projects[], IPath[] files) {	
+		if(projects == null || projects.length == 0)
+			return false;
+				
+		boolean succeeded = true;
+		for(int i = 0; i < projects.length; i++){
+			IProject curProject = projects[i];
+			
+			IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(curProject);
+			
+			//check whether the managed build info is converted
+			boolean isCompatible = UpdateManagedProjectManager.isCompatibleProject(info);
+			assertTrue(isCompatible);
+			
+			if(isCompatible){
+				// Build the project in order to generate the maekfiles 
+				try{
+					curProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD,null);
+				}
+				catch(CoreException e){
+					fail(e.getStatus().getMessage());
+				}
+				catch(OperationCanceledException e){
+					fail("the project \"" + curProject.getName() + "\" build was cancelled, exception message: " + e.getMessage());
+				}
+				
+				//compare the generated makefiles to their benchmarks
+				if (files != null && files.length > 0) {
+					if (i == 0) {
+						String configName = info.getDefaultConfiguration().getName();
+						IPath buildDir = Path.fromOSString(configName);
+						succeeded = ManagedBuildTestHelper.compareBenchmarks(curProject, buildDir, files);
+					}
+				}
+			}
+		}
+		
+		if (succeeded) {	//  Otherwise leave the projects around for comparison
+			for(int i = 0; i < projects.length; i++)
+				ManagedBuildTestHelper.removeProject(projects[i].getName());
+		}
+		return succeeded;
+	}
+
+	private void createPathVariable(IPath tmpDir) {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		workspace = ResourcesPlugin.getWorkspace();
+		IPathVariableManager pathMan = workspace.getPathVariableManager();
+		String name = MBS_TEMP_DIR;
+		try {
+			if (pathMan.validateName(name).isOK() && pathMan.validateValue(tmpDir).isOK()) {
+			    pathMan.setValue(name, tmpDir);
+				assertTrue(pathMan.isDefined(name));
+			} else {
+				fail("could not create the path variable " + name);
+			}
+		} catch (Exception e) {fail("could not create the path variable " + name);}
+	}
+	
+	private void createFileLink(IProject project, IPath tmpDir, String linkName, String fileName) {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		String name = MBS_TEMP_DIR;
+		if (!pathVariableCreated) {
+			createPathVariable(tmpDir);
+			pathVariableCreated = true;
+		}
+			
+		try {	
+			// Now we can create a linked resource relative to the defined path variable: 
+			IFile linkF1 = project.getFile(linkName);
+			IPath location = new Path("MBSTemp/" + fileName);
+			if (workspace.validateLinkLocation(linkF1, location).isOK()) {
+			    linkF1.createLink(location, IResource.NONE, null);
+			} else {
+				fail("could not create the link to " + name);
+			}
+		} catch (Exception e) {fail("could not create the link to " + name);}		
+	}
+	
+	/* (non-Javadoc)
+	 * tests 2.1 style tool integration for a single file executable
+	 */
+	public void testSingleFileExe(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk")};
+		IProject[] projects = createProjects("singleFileExe", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+	
+	/* (non-Javadoc)
+	 * tests 2.1 style tool integration for a two file SO
+	 */
+	public void testTwoFileSO(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk")};
+		IProject[] projects = createProjects("twoFileSO", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+
+	/* (non-Javadoc)
+	 * tests 2.1 style tool integration for multiple source files & a resource configuration
+	 */
+	public void testMultiResConfig(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk"),
+				 Path.fromOSString("source1/subdir.mk"),
+				 Path.fromOSString("source2/subdir.mk"),
+				 Path.fromOSString("source2/source21/subdir.mk")};
+		IProject[] projects = createProjects("multiResConfig", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+	
+	/* (non-Javadoc)
+	 * tests 2.1 style tool integration for linked files
+	 */
+	public void testLinkedLib(){
+		boolean succeeded = false;
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 //Path.fromOSString("subdir.mk")   // Can't compare this yet since it contains absolute paths!
+				 Path.fromOSString("sources.mk")}; 
+		IPath[] linkedFiles = {
+				 Path.fromOSString("f1.c"), 
+				 Path.fromOSString("f2.c"), 
+				 Path.fromOSString("test_ar.h")};
+		File srcDirFile = CTestPlugin.getFileInPlugin(new Path("resources/test21Projects/linkedLib/"));
+		IPath srcDir = Path.fromOSString(srcDirFile.toString());
+		IPath tmpSubDir = Path.fromOSString("CDTMBSTest");
+		IPath tmpDir = ManagedBuildTestHelper.copyFilesToTempDir(srcDir, tmpSubDir, linkedFiles);
+		try {
+			IProject[] projects = createProjects("linkedLib", null, "cdt.managedbuild.target.testgnu21.lib", true);
+			//  There should be only one project.  Add our linked files to it.
+			IProject project = projects[0];
+			createFileLink(project, tmpDir, "f1.c", "f1.c");
+			createFileLink(project, tmpDir, "f2link.c", "f2.c");
+			createFileLink(project, tmpDir, "test_ar.h", "test_ar.h");
+			//  Build the project
+			succeeded = buildProjects(projects, makefiles);
+		} finally {
+			if (succeeded)
+				ManagedBuildTestHelper.deleteTempDir(tmpSubDir, linkedFiles);
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * tests 2.1 style tool integration for a linked folder
+	 */
+	public void testLinkedFolder(){
+		boolean succeeded = false;
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("subdir.mk"),
+				 Path.fromOSString("sources.mk")}; 
+		IPath[] linkedFiles = {
+				 Path.fromOSString("f1.c"), 
+				 Path.fromOSString("f2.c"), 
+				 Path.fromOSString("test_ar.h"),
+				 Path.fromOSString("Benchmarks/makefile"), 
+				 Path.fromOSString("Benchmarks/objects.mk"), 
+				 Path.fromOSString("Benchmarks/subdir.mk"),
+				 Path.fromOSString("Benchmarks/sources.mk")}; 
+		File srcDirFile = CTestPlugin.getFileInPlugin(new Path("resources/test21Projects/linkedFolder/"));
+		IPath srcDir = Path.fromOSString(srcDirFile.toString());
+		IPath tmpSubDir = Path.fromOSString("CDTMBSTest");
+		IPath tmpDir = ManagedBuildTestHelper.copyFilesToTempDir(srcDir, tmpSubDir, linkedFiles);
+		if (!pathVariableCreated) {
+			createPathVariable(tmpDir);
+			pathVariableCreated = true;
+		}
+		try {
+			IPath location = Path.fromOSString(MBS_TEMP_DIR);
+			IProject[] projects = createProjects("linkedFolder", location, "cdt.managedbuild.target.testgnu21.lib", false);
+			//  Build the project
+			succeeded = buildProjects(projects, makefiles);
+		} finally {
+			if (succeeded)
+				ManagedBuildTestHelper.deleteTempDir(tmpSubDir, linkedFiles);
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject30MakefileTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject30MakefileTests.java
new file mode 100644
index 0000000..9f9637f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject30MakefileTests.java
@@ -0,0 +1,645 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+
+/**********************************************************************
+ * These tests are for a 3.0 style tool integration.
+ **********************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.managedbuilder.core.IAdditionalInput;
+import org.eclipse.cdt.managedbuilder.core.IInputType;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.IOutputType;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.internal.core.Tool;
+import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
+import org.eclipse.cdt.managedbuilder.projectconverter.UpdateManagedProjectManager;
+import org.eclipse.cdt.managedbuilder.testplugin.CTestPlugin;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+
+public class ManagedProject30MakefileTests extends TestCase {
+	public static final String MBS_TEMP_DIR = "MBSTemp";
+
+	static boolean pathVariableCreated = false;
+	
+	public ManagedProject30MakefileTests(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite = new TestSuite(ManagedProject30MakefileTests.class.getName());
+		
+		suite.addTest(new ManagedProject30MakefileTests("test30SingleFileExe"));
+		suite.addTest(new ManagedProject30MakefileTests("test30TwoFileSO"));
+		suite.addTest(new ManagedProject30MakefileTests("test30MultiResConfig"));
+		suite.addTest(new ManagedProject30MakefileTests("test30LinkedLib"));
+		//  TODO: testLinkedFolder fails intermittently saying that it cannot find
+		//        the makefiles to compare.  This appears to be a test set issue,
+		//        rather than an MBS functionality issue
+		//suite.addTest(new ManagedProject30MakefileTests("test30LinkedFolder"));
+		suite.addTest(new ManagedProject30MakefileTests("test30CopyandDeploy"));
+		suite.addTest(new ManagedProject30MakefileTests("test30DeleteFile"));
+		suite.addTest(new ManagedProject30MakefileTests("test30NoFilesToBuild"));
+		suite.addTest(new ManagedProject30MakefileTests("testFileWithNoExtension"));
+		suite.addTest(new ManagedProject30MakefileTests("testPreAndPostProcessBuildSteps"));
+		suite.addTest(new ManagedProject30MakefileTests("testResourceCustomBuildStep"));
+		suite.addTest(new ManagedProject30MakefileTests("test30_1"));
+		suite.addTest(new ManagedProject30MakefileTests("test30_2"));
+		suite.addTest(new ManagedProject30MakefileTests("testTopTC"));
+		suite.addTest(new ManagedProject30MakefileTests("CDTFortranTest1"));
+		suite.addTest(new ManagedProject30MakefileTests("CDTFortranTest2"));
+		suite.addTest(new ManagedProject30MakefileTests("TestATO"));
+		suite.addTest(new ManagedProject30MakefileTests("testMacroSupportInBuildDefinitions"));
+		suite.addTest(new ManagedProject30MakefileTests("testSpaces"));
+		if(File.separatorChar == '\\'){
+			//the test is valid for windows because it is using windows-specific paths with devices and assumes they are absolute
+			//FIXME: make the test run on linux
+			suite.addTest(new ManagedProject30MakefileTests("testInputTypeOption"));
+		}
+		return suite;
+	}
+
+	private IProject[] createProject(String projName, IPath location, String projectTypeId, boolean containsZip){
+		ArrayList projectList = null;
+		if (containsZip) {
+			File testDir = CTestPlugin.getFileInPlugin(new Path("resources/test30Projects/" + projName));
+			if(testDir == null) {
+				fail("Test project directory " + projName + " is missing.");
+				return null;
+			}
+
+			File projectZips[] = testDir.listFiles(new FileFilter(){
+				public boolean accept(File pathname){
+					if(pathname.isDirectory())
+						return false;
+					return true;
+				}
+			});
+			
+			projectList = new ArrayList(projectZips.length);
+			for(int i = 0; i < projectZips.length; i++){
+				try{
+					String projectName = projectZips[i].getName();
+					if(!projectName.endsWith(".zip"))
+						continue;
+					
+					projectName = projectName.substring(0,projectName.length()-".zip".length());
+					if(projectName.length() == 0)
+						continue;
+					IProject project = ManagedBuildTestHelper.createProject(projectName, projectZips[i], location, projectTypeId);
+					if(project != null)
+						projectList.add(project);
+				}
+				catch(Exception e){
+				}
+			}
+			if(projectList.size() == 0) {
+				fail("No projects found in test project directory " + testDir.getName() + ".  The .zip file may be missing or corrupt.");
+				return null;
+			}
+		} else {
+			try{
+				IProject project = ManagedBuildTestHelper.createProject(projName, null, location, projectTypeId);
+				if(project != null)
+					projectList = new ArrayList(1);
+					projectList.add(project);
+			} catch(Exception e){}
+		}
+		
+		return (IProject[])projectList.toArray(new IProject[projectList.size()]);
+	}
+	
+	private IProject[] createProjects(String projName, IPath location, String projectTypeId, boolean containsZip) {
+		
+		//  In case the projects need to be updated...
+		IOverwriteQuery queryALL = new IOverwriteQuery(){
+			public String queryOverwrite(String file) {
+				return ALL;
+			}};
+		IOverwriteQuery queryNOALL = new IOverwriteQuery(){
+			public String queryOverwrite(String file) {
+				return NO_ALL;
+			}};
+		
+		UpdateManagedProjectManager.setBackupFileOverwriteQuery(queryALL);
+		UpdateManagedProjectManager.setUpdateProjectQuery(queryALL);
+		
+		IProject projects[] = createProject(projName, location, projectTypeId, containsZip);
+		return projects;
+	}
+		
+	private void buildProjectsWorker(IProject projects[], IPath[] files, boolean compareBenchmark) {	
+		if(projects == null || projects.length == 0)
+			return;
+				
+		boolean succeeded = true;
+		for (int i = 0; i < projects.length; i++){
+			IProject curProject = projects[i];
+			
+			IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(curProject);
+			
+			//check whether the managed build info is converted
+			boolean isCompatible = UpdateManagedProjectManager.isCompatibleProject(info);
+			assertTrue(isCompatible);
+			
+			if (isCompatible){
+				// Build the project in order to generate the makefiles 
+				try{
+					curProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD,null);
+				}
+				catch(CoreException e){
+					fail(e.getStatus().getMessage());
+				}
+				catch(OperationCanceledException e){
+					fail("the project \"" + curProject.getName() + "\" build was cancelled, exception message: " + e.getMessage());
+				}
+				
+				//compare the generated makefiles to their benchmarks
+				if (files != null && files.length > 0) {
+					if (i == 0) {
+						String configName = info.getDefaultConfiguration().getName();
+						IPath buildDir = Path.fromOSString(configName);
+						if (compareBenchmark)
+						    succeeded = ManagedBuildTestHelper.compareBenchmarks(curProject, buildDir, files);
+						else
+							succeeded = ManagedBuildTestHelper.verifyFilesDoNotExist(curProject, buildDir, files);
+					}
+				}
+			}
+		}
+		
+		if (succeeded) {	//  Otherwise leave the projects around for comparison
+			for (int i = 0; i < projects.length; i++)
+				ManagedBuildTestHelper.removeProject(projects[i].getName());
+		}
+	}
+
+	// Build projects and compare benchmarks
+	private void buildProjects(IProject projects[], IPath[] files) {
+		buildProjectsWorker(projects, files, true);
+	}
+	
+	// Build projects but don't compare benchmarks because there should be not build files generated
+	private void buildDegenerativeProjects(IProject projects[], IPath[] files) {	
+		buildProjectsWorker(projects, files, false);
+	}
+		
+	private void createPathVariable(IPath tmpDir) {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		workspace = ResourcesPlugin.getWorkspace();
+		IPathVariableManager pathMan = workspace.getPathVariableManager();
+		String name = MBS_TEMP_DIR;
+		try {
+			if (pathMan.validateName(name).isOK() && pathMan.validateValue(tmpDir).isOK()) {
+			    pathMan.setValue(name, tmpDir);
+				assertTrue(pathMan.isDefined(name));
+			} else {
+				fail("could not create the path variable " + name);
+			}
+		} catch (Exception e) {fail("could not create the path variable " + name);}
+	}
+	
+	private void createFileLink(IProject project, IPath tmpDir, String linkName, String fileName) {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		String name = MBS_TEMP_DIR;
+		if (!pathVariableCreated) {
+			createPathVariable(tmpDir);
+			pathVariableCreated = true;
+		}
+			
+		try {	
+			// Now we can create a linked resource relative to the defined path variable: 
+			IFile linkF1 = project.getFile(linkName);
+			IPath location = new Path("MBSTemp/" + fileName);
+			if (workspace.validateLinkLocation(linkF1, location).isOK()) {
+			    linkF1.createLink(location, IResource.NONE, null);
+			} else {
+				fail("could not create the link to " + name);
+			}
+		} catch (Exception e) {fail("could not create the link to " + name);}		
+	}
+	
+	/* (non-Javadoc)
+	 * tests 3.0 style tool integration for a single file executable
+	 */
+	public void test30SingleFileExe(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk")};
+		IProject[] projects = createProjects("singleFileExe", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+	
+	/* (non-Javadoc)
+	 * tests 3.0 style tool integration for a two file SO
+	 */
+	public void test30TwoFileSO(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk")};
+		IProject[] projects = createProjects("twoFileSO", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+
+	/* (non-Javadoc)
+	 * tests 3.0 style tool integration for multiple source files & a resource configuration
+	 */
+	public void test30MultiResConfig(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk"),
+				 Path.fromOSString("main.d"),
+				 Path.fromOSString("source1/subdir.mk"),
+				 Path.fromOSString("source1/Class1.d"),
+				 Path.fromOSString("source2/subdir.mk"),
+				 Path.fromOSString("source2/Class2.d"),
+				 Path.fromOSString("source2/source21/Class21.d"),
+				 Path.fromOSString("source2/source21/subdir.mk")};
+		IProject[] projects = createProjects("multiResConfig", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+	
+	/* (non-Javadoc)
+	 * tests 3.0 style tool integration for linked files
+	 */
+	public void test30LinkedLib(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 //Path.fromOSString("subdir.mk")   // Can't compare this yet since it contains absolute paths!
+				 Path.fromOSString("sources.mk")}; 
+		IPath[] linkedFiles = {
+				 Path.fromOSString("f1_30.c"), 
+				 Path.fromOSString("f2_30.c"), 
+				 Path.fromOSString("test_ar_30.h")};
+		File srcDirFile = CTestPlugin.getFileInPlugin(new Path("resources/test30Projects/linkedLib30/"));
+		IPath srcDir = Path.fromOSString(srcDirFile.toString());
+		IPath tmpSubDir = Path.fromOSString("CDTMBSTest");
+		IPath tmpDir = ManagedBuildTestHelper.copyFilesToTempDir(srcDir, tmpSubDir, linkedFiles);
+		try {
+			IProject[] projects = createProjects("linkedLib30", null, "cdt.managedbuild.target.gnu30.lib", true);
+			//  There should be only one project.  Add our linked files to it.
+			IProject project = projects[0];
+			createFileLink(project, tmpDir, "f1_30.c", "f1_30.c");
+			createFileLink(project, tmpDir, "f2link_30.c", "f2_30.c");
+			createFileLink(project, tmpDir, "test_ar_30.h", "test_ar_30.h");
+			//  Build the project
+			buildProjects(projects, makefiles);
+		} finally {ManagedBuildTestHelper.deleteTempDir(tmpSubDir, linkedFiles);}
+	}
+	
+	/* (non-Javadoc)
+	 * tests 3.0 style tool integration for a linked folder
+	 */
+	public void test30LinkedFolder(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("subdir.mk"),
+				 Path.fromOSString("sources.mk")}; 
+		IPath[] linkedFiles = {
+				 Path.fromOSString("f1.c"), 
+				 Path.fromOSString("f2.c"), 
+				 Path.fromOSString("test_ar.h"),
+				 Path.fromOSString("Benchmarks/makefile"), 
+				 Path.fromOSString("Benchmarks/objects.mk"), 
+				 Path.fromOSString("Benchmarks/subdir.mk"),
+				 Path.fromOSString("Benchmarks/sources.mk")}; 
+		File srcDirFile = CTestPlugin.getFileInPlugin(new Path("resources/test30Projects/linkedFolder/"));
+		IPath srcDir = Path.fromOSString(srcDirFile.toString());
+		IPath tmpSubDir = Path.fromOSString("CDTMBSTest");
+		IPath tmpDir = ManagedBuildTestHelper.copyFilesToTempDir(srcDir, tmpSubDir, linkedFiles);
+		if (!pathVariableCreated) {
+			createPathVariable(tmpDir);
+			pathVariableCreated = true;
+		}
+		try {
+			IPath location = Path.fromOSString(MBS_TEMP_DIR);
+			IProject[] projects = createProjects("linkedFolder", location, "cdt.managedbuild.target.gnu30.lib", false);
+			//  Build the project
+			buildProjects(projects, makefiles);
+		} finally {ManagedBuildTestHelper.deleteTempDir(tmpSubDir, linkedFiles);}
+	}
+
+	/* (non-Javadoc)
+	 * tests 3.0 style tool integration with pre and post process steps added to typical compile & link
+	 */
+	public void test30CopyandDeploy(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk"), 
+				 Path.fromOSString("main.d"), 
+				 Path.fromOSString("Functions/subdir.mk"),
+				 Path.fromOSString("Functions/Func1.d")};
+		IProject[] projects = createProjects("copyandDeploy", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+	
+	/* (non-Javadoc)
+	 * tests 3.0 style tool integration in the context of deleting a file, to see if the proper behavior
+	 * occurs in the managedbuild system
+	 */
+	public void test30DeleteFile(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("subdir.mk"),
+				 Path.fromOSString("sources.mk")}; 		
+
+		IProject[] projects = createProjects("deleteFile", null, null, true);
+		final IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		ArrayList resourceList = new ArrayList(1);
+		IProject project = projects[0];
+		IFile projfile = project.getFile("filetobedeleted.cxx");
+		resourceList.add(projfile);
+		final IResource[] fileResource = (IResource[])resourceList.toArray(new IResource[resourceList.size()]);
+		IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+			public void run(IProgressMonitor monitor) throws CoreException {
+			    workspace.delete(fileResource, false, null);
+			}
+		};
+		try {
+			NullProgressMonitor monitor = new NullProgressMonitor();
+			workspace.run(runnable, workspace.getRoot(), IWorkspace.AVOID_UPDATE, monitor);
+		} catch (Exception e) { 
+		    fail("could not delete file in project " + project.getName());
+		}
+		buildProjects(projects, makefiles);
+	}
+
+	/* (non-Javadoc)
+	 * tests 3.0 managed build system with a project which has only a single source file that is marked as 
+	 * "excluded from build" to see that this degenerative case is handled gracefully
+	 */
+	public void test30NoFilesToBuild(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("subdir.mk"),
+				 Path.fromOSString("sources.mk")}; 		
+
+		IProject[] projects = createProjects("noFilesToBuild", null, null, true);
+		IProject project = projects[0];
+		IFile projfile = project.getFile("filetobeexcluded.cxx");
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IConfiguration config = info.getDefaultConfiguration();
+		IResourceConfiguration rconfig = config.createResourceConfiguration(projfile);
+		rconfig.setExclude(true);
+		buildDegenerativeProjects(projects, makefiles);			
+	}
+
+	/**
+	 * (non-Javadoc)
+	 * tests 3.0 managed build system with a project which has a file with no file extesnion
+	 */
+	public void testFileWithNoExtension()
+	{
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk")};
+		IProject[] projects = createProjects("testFileWithNoExtension", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+	
+	
+	/* (non-Javadoc)
+	 * tests 3.0 style tool integration: create pre-build and post-build steps and verify that 
+	 * the proper commands are generated in the makefile which is created by the managedbuild system
+	 */
+	public void testPreAndPostProcessBuildSteps(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("subdir.mk"),
+				 Path.fromOSString("sources.mk")}; 		
+
+		IProject[] projects = createProjects("preAndPostBuildSteps", null, null, true);				
+		IProject project = projects[0];
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IConfiguration config = info.getDefaultConfiguration();
+		IFile projfile = project.getFile("main.cxx");
+		config.setPreannouncebuildStep("Pre-announce Build Step");
+		config.setPrebuildStep("echo 'executing Pre-Build Step' ");
+		config.setPostannouncebuildStep("Post-announce Build Step");
+		config.setPostbuildStep("echo 'executing Post-Build Step' ");
+		buildProjects(projects, makefiles);
+	}
+
+
+	/* (non-Javadoc)
+	 * tests 3.0 style tool integration: create resource custom build step and verify that 
+	 * the proper commands are generated in the makefile which is created by the managedbuild system
+	 */
+	public void testResourceCustomBuildStep(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("subdir.mk"),
+				 Path.fromOSString("sources.mk")}; 		
+		ITool rcbsTool;
+		IInputType rcbsToolInputType;
+		IAdditionalInput rcbsToolInputTypeAdditionalInput;
+		IOutputType rcbsToolOutputType;
+
+		IProject[] projects = createProjects("rcbsBasicTest", null, null, true);				
+		IProject project = projects[0];
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IConfiguration config = info.getDefaultConfiguration();
+		IFile projfile = project.getFile("rcbsBasicTest.c");
+		IResourceConfiguration rconfig = config.createResourceConfiguration(projfile);
+		rcbsTool = rconfig.createTool(null,"rcbsBasicTestTool","rcbs Basic Test Tool",false);
+		rcbsToolInputType = rcbsTool.createInputType(null,"rcbsToolInputTypeId","rcbsToolInputTypeName",false);
+		rcbsToolInputTypeAdditionalInput = rcbsToolInputType.createAdditionalInput("");
+		rcbsToolInputTypeAdditionalInput.setKind(IAdditionalInput.KIND_ADDITIONAL_INPUT_DEPENDENCY);
+		rcbsToolOutputType = rcbsTool.createOutputType(null,"rcbsToolOutputTypeId","rcbsToolOutputTypeName",false);
+		rcbsToolOutputType.setOutputNames("rcbsBasicTest.o");
+		rcbsTool.setCustomBuildStep(true);
+		rcbsTool.setToolCommand("gcc -g -c ../rcbsBasicTest.c -o ./rcbsBasicTest.o");
+		rcbsTool.setAnnouncement("Now executing custom build step for rcbsBasicTest debug config");
+		rconfig.setRcbsApplicability(IResourceConfiguration.KIND_APPLY_RCBS_TOOL_AS_OVERRIDE);
+		buildProjects(projects, makefiles);
+	}
+
+	
+	/* (non-Javadoc)
+	 * tests 3.0 style tool integration with pre and post process steps added to typical compile & link
+	 */
+	public void test30_1(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk")};
+		IProject[] projects = createProjects("test30_1", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+
+	/* (non-Javadoc)
+	 * tests 3.0 style tool integration with multiple input types use Eclipse content types
+	 */
+	public void test30_2(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk")};
+		IProject[] projects = createProjects("test30_2", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+	
+	/* (non-Javadoc)
+	 * tests 3.0 top-level tool-chain definition
+	 */
+	public void testTopTC(){
+		IProject[] projects = createProjects("TopTC", null, "TopTC.target.exe", false);
+		//  There should be only one project.
+		assertNotNull(projects);
+		assertEquals(1, projects.length);
+		IProject project = projects[0];
+		//  Verify a number of other attributes
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		assertNotNull(info);
+		IManagedProject managedProj = info.getManagedProject();
+		assertNotNull(managedProj);
+		IConfiguration[] configs = managedProj.getConfigurations();
+		assertNotNull(configs);
+		assertEquals(2, configs.length);
+		//  Make sure that each configuration has a tool-chain with all 5 tools
+		for (int i=0; i<configs.length; i++) {
+			IConfiguration config = configs[i];
+			ToolChain tc = (ToolChain)config.getToolChain();
+			Iterator iter = tc.getToolList().listIterator();
+			int j = 0;
+			while (iter.hasNext()) {
+				Tool toolChild = (Tool) iter.next();
+				j++;
+			}
+			assertEquals(5, j);
+		}
+		buildDegenerativeProjects(projects, null);
+	}
+
+	/* (non-Javadoc)
+	 * tests external dependency calculation using Fortran modules
+	 */
+	public void CDTFortranTest1(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk")};
+		IProject[] projects = createProjects("CDTFortranTest1", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+
+	/* (non-Javadoc)
+	 * tests external dependency calculation using Fortran modules
+	 */
+	public void CDTFortranTest2(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("module/subdir.mk"),
+				 Path.fromOSString("Sources/subdir.mk")};
+		IProject[] projects = createProjects("CDTFortranTest2", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+
+	/* (non-Javadoc)
+	 * tests the InputType assignToOption attribute
+	 */
+	public void TestATO(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk")};
+		IProject[] projects = createProjects("TestATO", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+	
+	public void testMacroSupportInBuildDefinitions() {
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk")};
+		IProject[] projects = createProjects("testMacroSupportInBuildDefinitions", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+	
+	/**
+	 * (non-Javadoc)
+	 * tests managed build system with a project which has resources with spaces in their paths
+	 */
+	public void testSpaces()
+	{
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk"),
+				 Path.fromOSString("main with spaces.d"),
+				 Path.fromOSString("sub folder with spaces/subdir.mk"),
+				 Path.fromOSString("sub folder with spaces/foo with spaces.d")};
+		IProject[] projects = createProjects("test with spaces", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+	
+	/**
+	 * (non-Javadoc)
+	 * tests managed build system with a project which has resources with spaces in their paths
+	 */
+	public void testInputTypeOption()
+	{
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk"),
+		};
+		IProject[] projects = createProjects("inputTypeOption", null, null, true);
+		buildProjects(projects, makefiles);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProjectUpdateTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProjectUpdateTests.java
new file mode 100644
index 0000000..f0b9124
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProjectUpdateTests.java
@@ -0,0 +1,274 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.ArrayList;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
+import org.eclipse.cdt.managedbuilder.internal.core.ManagedMakeMessages;
+import org.eclipse.cdt.managedbuilder.projectconverter.UpdateManagedProjectManager;
+import org.eclipse.cdt.managedbuilder.testplugin.CTestPlugin;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+
+public class ManagedProjectUpdateTests extends TestCase {
+	public ManagedProjectUpdateTests(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite = new TestSuite(ManagedProjectUpdateTests.class.getName());
+		
+		suite.addTest(new ManagedProjectUpdateTests("testProjectUpdate12_Update"));
+//		suite.addTest(new ManagedProjectUpdateTests("testProjectUpdate20_Update"));
+		suite.addTest(new ManagedProjectUpdateTests("testProjectUpdate21_Update"));
+//		suite.addTest(new ManagedProjectUpdateTests("testProjectUpdate12_NoUpdate"));
+//		suite.addTest(new ManagedProjectUpdateTests("testProjectUpdate20_NoUpdate"));
+//		suite.addTest(new ManagedProjectUpdateTests("testProjectUpdate21_NoUpdate"));
+		// TODO:  This is affected by the TODO in UpdateManagedProjectManager
+		suite.addTest(new ManagedProjectUpdateTests("testProjectUpdate21CPP_Update"));
+		
+		return suite;
+	}
+	
+	private File getVersionProjectsDir(String version){
+		return CTestPlugin.getFileInPlugin(new Path("resources/oldTypeProjects/"+version));
+	}
+
+	private IProject[] createVersionProjects(String version){
+		File file = getVersionProjectsDir(version);
+		if(file == null) {
+			fail("Test project directory is missing.");
+			return null;
+		}
+		
+		File projectZips[] = file.listFiles(new FileFilter(){
+			public boolean accept(File pathname){
+				if(pathname.isDirectory())
+					return false;
+				return true;
+			}
+		});
+		
+		ArrayList projectList = new ArrayList(projectZips.length);
+		for(int i = 0; i < projectZips.length; i++){
+			try{
+				String projectName = projectZips[i].getName();
+				if(!projectName.endsWith(".zip"))
+					continue;
+				
+				projectName = projectName.substring(0,projectName.length()-".zip".length());
+				if(projectName.length() == 0)
+					continue;
+				IProject project = ManagedBuildTestHelper.createProject(projectName, projectZips[i], null, null);
+				if(project != null)
+					projectList.add(project);
+			}
+			catch(Exception e){
+			}
+		}
+		if(projectList.size() == 0) {
+			fail("No projects found in test project directory " + file.getName() + ".  The .zip file may be missing or corrupt.");
+			return null;
+		}
+		return (IProject[])projectList.toArray(new IProject[projectList.size()]);
+	}
+	
+	private void doTestProjectUpdate(String version, boolean updateProject, boolean overwriteBackupFiles, 
+			IPath[] files){
+		IOverwriteQuery queryALL = new IOverwriteQuery(){
+			public String queryOverwrite(String file) {
+				return ALL;
+			}};
+		IOverwriteQuery queryNOALL = new IOverwriteQuery(){
+			public String queryOverwrite(String file) {
+				return NO_ALL;
+			}};
+		
+		UpdateManagedProjectManager.setBackupFileOverwriteQuery(overwriteBackupFiles ? queryALL : queryNOALL);
+		UpdateManagedProjectManager.setUpdateProjectQuery(updateProject ? queryALL : queryNOALL);
+		
+		IProject projects[] = createVersionProjects(version);
+		if(projects == null || projects.length == 0)
+			return;
+		for(int i = 0; i < projects.length; i++){
+			final IProject curProject = projects[i];
+			
+			//the project conversion occures the first time 
+			//ManagedBuildManager.getBuildInfo gets called
+			IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(curProject);
+			
+			//check whether the managed build info is converted
+			boolean isCompatible = UpdateManagedProjectManager.isCompatibleProject(info);
+			assertTrue(isCompatible);
+			
+			if(isCompatible){
+				//check for correct update
+				if (!updateProject) {
+					//TODO: if the user has chosen not to update the project the .cdtbuild file should not change
+				} else {
+					//  Make sure that we have a valid project
+					if (info == null ||
+						info.getManagedProject() == null ||
+						info.getManagedProject().isValid() == false)
+					{
+						fail("the project \"" + curProject.getName() + "\" was not properly converted");
+					}
+				}
+
+				//check whether the project builds without errors
+				IWorkspace wsp = ResourcesPlugin.getWorkspace();
+				ISchedulingRule rule = wsp.getRuleFactory().buildRule();
+				Job buildJob = new Job("project build job"){ 	//$NON-NLS-1$
+					protected IStatus run(IProgressMonitor monitor) {
+						try {
+							curProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD,null);
+						} catch(CoreException e){
+							fail(e.getStatus().getMessage());
+						} catch(OperationCanceledException e){
+							fail("the project \"" + curProject.getName() + "\" build was cancelled, exception message: " + e.getMessage());
+						}
+						return new Status(
+								IStatus.OK,
+								"org.eclipse.cdt.managedbuilder.core.tests",
+								IStatus.OK,
+								new String(),
+								null);
+					}
+				};
+				buildJob.setRule(rule);
+				
+				buildJob.schedule();
+				
+				try {
+					buildJob.join();
+				} catch (InterruptedException e) {
+					fail("the build job for the project \"" + curProject.getName() + "\" was interrupted, exception message: " + e.getMessage());
+				}
+				
+				IStatus status = buildJob.getResult();
+				if(status.getCode() != IStatus.OK){
+					fail("the build job for the project \"" + curProject.getName() + "\" failed, status message: " + status.getMessage());
+				}
+
+				//compare the generated makefiles to their benchmarks
+				if (files != null && files.length > 0) {
+					if (i == 0) {
+						String configName = info.getDefaultConfiguration().getName();
+						IPath buildDir = Path.fromOSString(configName);
+						ManagedBuildTestHelper.compareBenchmarks(curProject, buildDir, files);
+					}
+				}
+			}
+		}
+		
+		for(int i = 0; i < projects.length; i++)
+			ManagedBuildTestHelper.removeProject(projects[i].getName());
+	}
+	
+	/* (non-Javadoc)
+	 * tests project v1.2 update 
+	 * in case when user chooses to update the project 
+	 */
+	public void testProjectUpdate12_Update(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk")};
+		doTestProjectUpdate("1.2", true, true, makefiles);
+	}
+
+	/* (non-Javadoc)
+	 * tests project v2.0 update 
+	 * in case when user chooses to update the project 
+	 */
+	public void testProjectUpdate20_Update(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk")};
+		doTestProjectUpdate("2.0", true, true, makefiles);
+	}
+
+	/* (non-Javadoc)
+	 * tests project v2.1 update 
+	 * in case when user chooses to update the project 
+	 */
+	public void testProjectUpdate21_Update(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk"), 
+				 Path.fromOSString("Functions/subdir.mk")};
+		doTestProjectUpdate("2.1", true, true, makefiles);
+	}
+
+	/* (non-Javadoc)
+	 * tests project v2.1 update of a C++ project with C source files 
+	 */
+	public void testProjectUpdate21CPP_Update(){
+		IPath[] makefiles = {
+				 Path.fromOSString("makefile"), 
+				 Path.fromOSString("objects.mk"), 
+				 Path.fromOSString("sources.mk"), 
+				 Path.fromOSString("subdir.mk"), 
+				 Path.fromOSString("Functions/subdir.mk")};
+		doTestProjectUpdate("2.1CPP", true, true, makefiles);
+	}
+
+	/* (non-Javadoc)
+	 * tests project v1.2 update 
+	 * in case when user chooses not to update the project 
+	 */
+	public void testProjectUpdate12_NoUpdate(){
+		doTestProjectUpdate("1.2", false, true, null);
+	}
+
+	/* (non-Javadoc)
+	 * tests project v2.0 update 
+	 * in case when user chooses not to update the project 
+	 */
+	public void testProjectUpdate20_NoUpdate(){
+		doTestProjectUpdate("2.0", false, true, null);
+	}
+
+	/* (non-Javadoc)
+	 * tests project v2.1 update 
+	 * in case when user chooses not to update the project 
+	 */
+	public void testProjectUpdate21_NoUpdate(){
+		doTestProjectUpdate("2.1", false, true, null);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/MultiVersionSupportTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/MultiVersionSupportTests.java
new file mode 100644
index 0000000..7d5120b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/MultiVersionSupportTests.java
@@ -0,0 +1,575 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Map;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IBuilder;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.cdt.managedbuilder.projectconverter.UpdateManagedProjectManager;
+import org.eclipse.cdt.managedbuilder.testplugin.CTestPlugin;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+
+
+public class MultiVersionSupportTests extends TestCase {
+	static IProject proj = null;
+	static IManagedProject mproj = null;
+	
+	IConfiguration[] cfgs = null;	
+	private IWorkspace worksp;	
+	private boolean windows;
+	
+	public MultiVersionSupportTests() { super(); }
+	public MultiVersionSupportTests(String name) { super(name); }
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(MultiVersionSupportTests.class.getName());
+		//$JUnit-BEGIN$
+		suite.addTest(new MultiVersionSupportTests("testProjectConverterConvenienceRoutines"));	//$NON-NLS-1$
+		suite.addTest(new MultiVersionSupportTests("testConfigurationNameProvider"));	//$NON-NLS-1$
+		suite.addTest(new MultiVersionSupportTests("testConfigurationDescription"));	//$NON-NLS-1$
+		suite.addTest(new MultiVersionSupportTests("testVersionInfo"));	//$NON-NLS-1$
+		suite.addTest(new MultiVersionSupportTests("testVersionsSupportedAttribute"));	//$NON-NLS-1$
+		//the test is invalid, disabling for now (see bug# 193831)
+//		suite.addTest(new MultiVersionSupportTests("testToolChainConversion_CDT20")); //$NON-NLS-1$
+		suite.addTest(new MultiVersionSupportTests("testToolChainConversion_CDT21")); //$NON-NLS-1$
+		suite.addTest(new MultiVersionSupportTests("testProjectConversion")); //$NON-NLS-1$
+		//$JUnit-END$
+		return suite;
+	}
+
+	
+	/*
+	 * This function tests the functionality of Project converter convenience routines
+	 * defined in ManagedBuildManager class. These convenience routines are generic routines
+	 * anyone can use them 
+	 * 		  i) To find out whether any converters are available for a given Build Object,
+	 * 		 ii) To get a list of converters
+	 * 		iii) To convert a Build Object
+	 */
+	
+	public void testProjectConverterConvenienceRoutines() throws Exception {
+		String projectName = "TestProjectConverterConvenienceRoutines";			//$NON-NLS-1$
+		String projectTypeId = "testProjectConverterConvenienceRoutines.exe";	//$NON-NLS-1$
+
+		doInit(projectName, projectTypeId);
+		
+		// It should contain only one configuration.
+		assertEquals(cfgs.length, 1);
+		
+		IToolChain toolChain = cfgs[0].getToolChain();
+		
+		// Check whether this tool chain has converters using generic convenience routine.
+		boolean hasConverters = ManagedBuildManager.hasTargetConversionElements(toolChain);
+		
+		// Expected value is 'true'
+		assertEquals(hasConverters, true);
+		
+		// Get the list of available converters for ths tool chain using generic convenience routine
+		Map converters = ManagedBuildManager.getConversionElements(toolChain);
+		
+		// Expected value for the number of converters available is '1'
+		assertEquals(converters.size(), 1);
+
+		return;
+	}
+	
+	/*
+	 * This function tests the functionality of configuration name provider.
+	 * Using this functionality, Tool Integrator can provide configuration names dynamically
+	 * based on the OS, architecture.
+	 * 
+	 * In plugin manifest file, there are 4 configurations defined for the project type
+	 * "cdt.managedbuild.target.testMultipleVersions.exe". Two configurations are defined with "Debug"
+	 * as their name and other two are defined with "Release" as their name. But user will see the 
+	 * configuration names as "Debug", "Release", "Debug_ia64" and "Release_ia64" while creating a project.
+	 * 
+	 */
+	public void testConfigurationNameProvider()throws Exception {
+		String [] expectedConfigNames = { "Debug","Release","Debug_ia64","Release_ia64" };	//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		String [] actualConfigNames = new String[4];
+		// create managed project
+		String projectName = "TestConfigurationNameProvider";	//$NON-NLS-1$
+		String projectTypeId = "cdt.managedbuild.target.testMultipleVersions.exe";	//$NON-NLS-1$
+		doInit(projectName, projectTypeId);
+		
+		// Check the configuration names
+		cfgs = mproj.getConfigurations();
+		
+		// Get the actual configuration names
+		for (int i = 0; i < cfgs.length; i++) {
+			actualConfigNames[i] = cfgs[i].getName();		
+		}
+		
+		// Compare the expected and actual,
+		for (int i = 0; i < expectedConfigNames.length; i++) {
+			assertTrue( isArrayContains(actualConfigNames, expectedConfigNames[i]) );			
+		}
+		return;
+	}
+	
+	/*
+	 * This function tests whether the newly added attribute 'description' is retrived from plugin
+	 * manifest file correctly or not. There are 4 configurations defined with different description
+	 * each configuration. This function checks the description of each configuration against
+	 * expected description after creating a project.
+	 */
+	
+	public void testConfigurationDescription()throws Exception {
+		String [] expectedConfigDescriptions = { "debug configuration for IA32 windows","release configuration for IA32 windows","debug configuration for IA64 windows","release configuration for IA64 windows" };	//$NON-NLS-1$
+		String [] actualConfigDescriptions = new String[4];
+		// create managed project
+		String projectName = "TestConfigurationDescription";	//$NON-NLS-1$
+		String projectTypeId = "cdt.managedbuild.target.testMultipleVersions.exe";	//$NON-NLS-1$
+
+		doInit(projectName, projectTypeId);
+		
+		// Check the configuration descriptions
+		cfgs = mproj.getConfigurations();
+		
+		// Get the actual configuration names
+		for (int i = 0; i < cfgs.length; i++) {
+			actualConfigDescriptions[i] = cfgs[i].getDescription();		
+		}
+		
+		// Compare the expected and actual,
+		for (int i = 0; i < expectedConfigDescriptions.length; i++) {
+			assertTrue( isArrayContains(actualConfigDescriptions, expectedConfigDescriptions[i]) );			
+		}
+		return;
+	}
+
+	
+	/*
+	 * This function tests whether the version information stored with in the 'id' of ToolChain/Tool/Builder
+	 * is retrived from plugin manifest file correctly or not. 
+	 */
+	
+	public void testVersionInfo()throws Exception {
+
+		String projectName = "TestVersionInfo";	//$NON-NLS-1$
+		String projectTypeId = "cdt.managedbuild.target.testMultipleVersions.exe";	//$NON-NLS-1$
+
+		// create managed project
+		doInit(projectName, projectTypeId);
+		
+		// Check the configuration descriptions
+		cfgs = mproj.getConfigurations();
+		
+		// Check the version information of ToolChain/Tool/Builder defined under 'Release' Configuration.
+		
+		// It should return the version as '0.0.4' as there is no version information defined
+		// for ToolChain/Tool/Builder. The version '0.0.4' is the default version for CDT3.0
+		
+		// Release configuration 'id' : "cdt.managedbuild.config.testMultipleVersions.exe.release.1"			
+		IConfiguration releaseConfig = mproj.getConfiguration("cdt.managedbuild.config.testMultipleVersions.exe.release.1");	//$NON-NLS-1$
+
+		// the toolchain version should be '0.0.4' as this is default value
+		assertEquals(releaseConfig.getToolChain().getVersion().toString(), "0.0.4");	//$NON-NLS-1$
+		
+		// Get the tools of this toolChain and verify the version of each tool
+		// Each tool version in release configuration should be "0.0.4"
+		ITool [] tools = releaseConfig.getToolChain().getTools();
+		for (int i = 0; i < tools.length; i++) {
+			ITool tool = tools[i];
+			assertEquals(tool.getVersion().toString(),"0.0.4");	//$NON-NLS-1$
+		}
+		
+		// check the builder version
+		IBuilder builder = releaseConfig.getToolChain().getBuilder();
+		assertEquals(builder.getVersion().toString(),"0.0.4");	//$NON-NLS-1$
+		
+		// Check the versions of ToolChain/Tool/Builder in Debug Configuration
+		// Expected version: "1.1.0" for all ToolChain/Tool(s)/Builder.
+		
+		// Get the 'Debug' Configuration
+		// Debug configuration 'id' : "cdt.managedbuild.config.testMultipleVersions.exe.debug.0"			
+		IConfiguration debugConfig = mproj.getConfiguration("cdt.managedbuild.config.testMultipleVersions.exe.debug.0");	//$NON-NLS-1$
+
+		// the toolchain version should be '1.1.0' as that's what defined in plugin manifest file
+		assertEquals(debugConfig.getToolChain().getVersion().toString(), "1.1.0");	//$NON-NLS-1$
+		
+		// Get the tools of this toolChain and verify the version of each tool
+		// Each tool version in debug configuration should be "1.1.0"
+		tools = debugConfig.getToolChain().getTools();
+		for (int i = 0; i < tools.length; i++) {
+			ITool tool = tools[i];
+			assertEquals(tool.getVersion().toString(),"1.1.0");	//$NON-NLS-1$
+		}
+		
+		// check the builder version
+		builder = debugConfig.getToolChain().getBuilder();
+		assertEquals(builder.getVersion().toString(),"1.1.0");	//$NON-NLS-1$
+
+		// Get the 'Debug64' Configuration
+		// Debug configuration 'id' : "cdt.managedbuild.config.testMultipleVersions.exe.debug.0"			
+		IConfiguration debug64Config = mproj.getConfiguration("cdt.managedbuild.config.testMultipleVersions.exe.debug64.2");	//$NON-NLS-1$
+
+		// the toolchain version should be '2.2.0' as that's what defined in plugin manifest file
+		assertEquals(debug64Config.getToolChain().getVersion().toString(), "2.2.0");	//$NON-NLS-1$
+		
+		// Get the tools of this toolChain and verify the version of each tool
+		// Each tool version in debug64 configuration should be "5.0.9" (defined in plugin manifest file)
+		tools = debug64Config.getToolChain().getTools();
+		for (int i = 0; i < tools.length; i++) {
+			ITool tool = tools[i];
+			assertEquals(tool.getVersion().toString(),"5.0.9");	//$NON-NLS-1$
+		}
+		
+		// check the builder version , expected value : "3.2.1"  defined in plugin manifest file
+		builder = debug64Config.getToolChain().getBuilder();
+		assertEquals(builder.getVersion().toString(),"3.2.1");	//$NON-NLS-1$
+
+		return;
+	}
+
+	/*
+	 * This function tests whether the attribute 'versionsSupported' of
+	 * ToolChain/Tool/Builder elements is retrived from plugin manifest file correctly or not.
+	 */
+	
+	public void testVersionsSupportedAttribute() throws Exception {
+		// create managed project
+		String projectName = "TestVersionSupportAttribute";	//$NON-NLS-1$
+		String projectTypeId = "cdt.managedbuild.target.testMultipleVersions.exe";	//$NON-NLS-1$
+
+		doInit(projectName, projectTypeId);
+
+		// Check the configuration descriptions
+		cfgs = mproj.getConfigurations();
+		
+		// Check the version information of ToolChain/Tool/Builder defined under 'Release' Configuration.
+		
+		// It should return the version as '0.0.4' as there is no version information defined
+		// for ToolChain/Tool/Builder. The version '0.0.4' is the default version for CDT3.0
+		
+		// Release configuration 'id' : "cdt.managedbuild.config.testMultipleVersions.exe.release64.3"			
+		IConfiguration releaseConfig = mproj.getConfiguration("cdt.managedbuild.config.testMultipleVersions.exe.release64.3");	//$NON-NLS-1$
+
+		// Get the tool chain
+		IToolChain toolChain = releaseConfig.getToolChain();
+
+		//Get the 'versionsSupported' attribute of toolChain
+		String toolChainVersionsSupported = toolChain.getVersionsSupported();
+		
+		// Compare with the expected value "1.2.0,2.0.0,2.1.3"
+		assertEquals(toolChainVersionsSupported,"1.2.0,2.0.0,2.1.3");	//$NON-NLS-1$
+		
+		// Get the builder 
+		IBuilder builder = releaseConfig.getToolChain().getBuilder();
+		
+		// Get the 'versionsSupported' attribute of builder
+		String versionsSupported = builder.getVersionsSupported();
+		
+		// Compare with expected value "2.0.0,2.1.1,3.0.3"
+		assertEquals(versionsSupported,"2.0.0,2.1.1,3.0.3");	//$NON-NLS-1$
+
+	}
+	
+	static void createManagedProject(String name, String projectTypeId) {
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		proj = root.getProject(name); 
+	
+		if (proj.exists()) {
+			mproj = ManagedBuildManager.getBuildInfo(proj).getManagedProject();
+		} else {
+			IWorkspace workspace = ResourcesPlugin.getWorkspace();
+			IWorkspaceDescription workspaceDesc = workspace.getDescription();
+			workspaceDesc.setAutoBuilding(false);
+			try {
+				workspace.setDescription(workspaceDesc);
+				proj = CCorePlugin.getDefault().createCProject(workspace.newProjectDescription(proj.getName()), 
+					proj, new NullProgressMonitor(), ManagedBuilderCorePlugin.MANAGED_MAKE_PROJECT_ID);
+			
+				// 	add ManagedBuildNature
+				IManagedBuildInfo info = ManagedBuildManager.createBuildInfo(proj);
+				info.setValid(true);
+				ManagedCProjectNature.addManagedNature(proj, null);
+				ManagedCProjectNature.addManagedBuilder(proj, null);
+
+				ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(proj, true);
+				desc.remove(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID);
+				desc.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, ManagedBuildManager.INTERFACE_IDENTITY);
+				desc.saveProjectData();
+			} catch (CoreException e) {
+				fail("Cannot create project: " + e.getLocalizedMessage()); //$NON-NLS-1$
+			}				
+			// Call this function just to avoid init problems in getProjectType();   
+			IProjectType[] projTypes = ManagedBuildManager.getDefinedProjectTypes();
+			IProjectType projType = ManagedBuildManager.getProjectType(projectTypeId);
+			assertNotNull(projType);
+			try {
+				mproj = ManagedBuildManager.createManagedProject(proj, projType);
+			} catch (BuildException e) {}
+			ManagedBuildManager.setNewProjectVersion(proj);
+			IConfiguration[] cfgs = projType.getConfigurations();
+			
+			for (int i = 0; i < cfgs.length; i++) { // sic ! from 1
+				mproj.createConfiguration(cfgs[i], cfgs[i].getId() + "." + i); //$NON-NLS-1$
+			}
+			if( cfgs.length > 0)
+				ManagedBuildManager.setDefaultConfiguration(proj, cfgs[0]);
+			else
+				ManagedBuildManager.setDefaultConfiguration(proj, null);
+		}
+		// open project w/o progress monitor; no action performed if it's opened
+		try {
+			proj.open(null);
+		} catch (CoreException e) {}				
+	}
+
+	/*
+	 *  isArrayContains() 
+	 */
+	private boolean isArrayContains(String[] actualConfigNames, String name) {
+		if (actualConfigNames != null) {
+			for (int i = 0; i < actualConfigNames.length; i++) {
+				if ( ( actualConfigNames[i] != null) && (actualConfigNames[i].equals(name)) ) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 *  doInit() - call it at the beginning of every test
+	 *
+	 */
+	private void doInit(String projectName, String projectTypeId) {
+		createManagedProject(projectName, projectTypeId);
+		assertNotNull(proj);
+		assertNotNull(mproj);
+		worksp = proj.getWorkspace();
+		assertNotNull(worksp);
+		cfgs = mproj.getConfigurations();
+		assertNotNull(cfgs);		
+	}
+	
+	public void testToolChainConversion_CDT20() throws Exception {
+		// Pass projDirName as 'test20', and 'true' to update Project
+		doTestProjectUpdate("test20", true);	//$NON-NLS-1$
+		
+		String tmpDir = System.getProperty("java.io.tmpdir");	//$NON-NLS-1$	
+		
+		File inputFile = new File(tmpDir + "/converterOutput20.txt");	//$NON-NLS-1$
+		try {
+			assertTrue(inputFile.exists());
+			
+			String expectedContent = "Converter for CDT 2.0 Project is invoked";	//$NON-NLS-1$
+			
+			BufferedReader data = new BufferedReader(new FileReader(inputFile));
+			String actualContent;
+			
+			if ((actualContent = data.readLine()) != null) {
+				assertEquals(actualContent,expectedContent);
+			}			
+			
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();			
+		}
+	}
+	
+	public void testToolChainConversion_CDT21() throws Exception {
+		// Pass projDirName as 'test21', and 'true' to update Project
+		doTestProjectUpdate("test21", true);	//$NON-NLS-1$
+		
+		String tmpDir = System.getProperty("java.io.tmpdir");	//$NON-NLS-1$	
+		
+		File inputFile = new File(tmpDir + "/converterOutput21.txt");	//$NON-NLS-1$
+		try {
+			assertTrue(inputFile.exists());
+			
+			String expectedContent = "Converter for CDT 2.1 Project is invoked";	//$NON-NLS-1$
+			
+			BufferedReader data = new BufferedReader(new FileReader(inputFile));
+			String actualContent;
+			
+			if ((actualContent = data.readLine()) != null) {
+				assertEquals(actualContent,expectedContent);
+			}			
+			
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();			
+		}
+	}
+	
+	public void testProjectConversion() throws Exception {
+		// Pass the 'projDirName' as 'testProjectConversion', and 'true' to update Project
+		doTestProjectUpdate("testProjectConversion", true);	//$NON-NLS-1$
+		
+		String tmpDir = System.getProperty("java.io.tmpdir");	//$NON-NLS-1$	
+		
+		File inputFile = new File(tmpDir + "/testProjectConverterOutput.txt");	//$NON-NLS-1$
+		try {
+			assertTrue(inputFile.exists());
+			
+			String expectedContent = "The converter for the projectType testProject_1.0.0 is invoked";	//$NON-NLS-1$
+			
+			BufferedReader data = new BufferedReader(new FileReader(inputFile));
+			String actualContent;
+			
+			if ((actualContent = data.readLine()) != null) {
+				assertEquals(actualContent,expectedContent);
+			}			
+			
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();			
+		}
+	}
+	
+	private IProject getCDT_TestProject(String projDirName) {
+
+		IProject project = null;
+		File file = null;
+		
+		if (projDirName.equalsIgnoreCase("test20")) {	//$NON-NLS-1$
+			file = CTestPlugin.getFileInPlugin(new Path(
+					"resources/toolChainConversionProjects/test20"));	//$NON-NLS-1$
+		} else if (projDirName.equals("test21")) {	//$NON-NLS-1$
+			file = CTestPlugin.getFileInPlugin(new Path(
+			"resources/toolChainConversionProjects/test21"));	//$NON-NLS-1$
+		} else if (projDirName.equals("testProjectConversion")) {	//$NON-NLS-1$
+			file = CTestPlugin.getFileInPlugin(new Path(
+			"resources/toolChainConversionProjects/testProjectConversion"));	//$NON-NLS-1$
+		} 
+
+		if (file == null) {
+			fail("Test project directory " 	//$NON-NLS-1$
+					+ " is missing.");	//$NON-NLS-1$
+			return null;
+		}
+
+		File projectZips[] = file.listFiles(new FileFilter() {
+			public boolean accept(File pathname) {
+				if (pathname.isDirectory())
+					return false;
+				return true;
+			}
+		});
+
+		ArrayList projectList = new ArrayList(projectZips.length);
+		assertEquals(projectZips.length, 1);
+
+		try {
+			String projectName = projectZips[0].getName();
+			if (!projectName.endsWith(".zip"))
+				fail("No projects found in test 'toolChainConversionProjects' project directory "	//$NON-NLS-1$
+						+ file.getName()
+						+ ".  The .zip file may be missing or corrupt.");	//$NON-NLS-1$
+
+			projectName = projectName.substring(0, projectName.length()
+					- ".zip".length());	//$NON-NLS-1$
+			if (projectName.length() == 0)
+				fail("No projects found in test 'toolChainConversionProjects' project directory "	//$NON-NLS-1$
+						+ file.getName()
+						+ ".  The .zip file may be missing or corrupt.");	//$NON-NLS-1$
+			IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		// Path path = (Path) root.getLocation();
+			IPath location = new Path( root.getLocation().toString() );
+			project = ManagedBuildTestHelper.createProject(
+					projectName, projectZips[0], null, null);
+			if (project != null)
+				projectList.add(project);
+		} catch (Exception e) {
+			System.out.println("Exception Occured.");	//$NON-NLS-1$
+		}
+
+		if (projectList.size() == 0) {
+			fail("No projects found in test project directory "		//$NON-NLS-1$
+					+ file.getName()
+					+ ".  The .zip file may be missing or corrupt.");	//$NON-NLS-1$
+			return null;
+		}
+		return project;
+	}
+	
+	private void doTestProjectUpdate(String projDirName, boolean updateProject) {
+		IOverwriteQuery queryALL = new IOverwriteQuery(){
+			public String queryOverwrite(String file) {
+				return ALL;
+			}};
+		IOverwriteQuery queryNOALL = new IOverwriteQuery(){
+			public String queryOverwrite(String file) {
+				return NO_ALL;
+			}};
+		
+		UpdateManagedProjectManager.setUpdateProjectQuery(updateProject ? queryALL : queryNOALL);
+
+		final IProject project = getCDT_TestProject(projDirName);
+		if (project == null)
+			return;
+
+		// the project conversion occurs the first time
+		// ManagedBuildManager.getBuildInfo gets called
+		// If requires it also invokes converters for the project.
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+
+		// check whether the managed build info is converted
+		boolean isCompatible = UpdateManagedProjectManager
+				.isCompatibleProject(info);
+		assertTrue(isCompatible);
+
+		if (isCompatible) {
+			// check for correct update
+			if (!updateProject) {
+				// TODO: if the user has chosen not to update the
+				// project the
+				// .cdtbuild file should not change
+			} else {
+				// Make sure that we have a valid project
+				if (info == null || info.getManagedProject() == null
+						|| info.getManagedProject().isValid() == false) {
+					fail("the project \"" + project.getName()	//$NON-NLS-1$
+							+ "\" was not properly converted");	//$NON-NLS-1$
+				}
+			}
+		}
+		ManagedBuildTestHelper.removeProject(project.getName());
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/OneDirectionalPathConverter.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/OneDirectionalPathConverter.java
new file mode 100644
index 0000000..49e8930
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/OneDirectionalPathConverter.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IOptionPathConverter;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+public class OneDirectionalPathConverter implements IOptionPathConverter {
+	public static Path PREFIX = new Path("/test");
+	
+	public IPath convertToPlatformLocation(String toolSpecificPath,
+			IOption option, ITool tool) {
+		IPath path = new Path(toolSpecificPath);
+		if(path.isAbsolute())
+			return PREFIX.append(toolSpecificPath);
+		return path;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/OptionEnablementTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/OptionEnablementTests.java
new file mode 100644
index 0000000..794f1ef
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/OptionEnablementTests.java
@@ -0,0 +1,544 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IOptionApplicability;
+import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+
+public class OptionEnablementTests extends TestCase 
+								implements IManagedOptionValueHandler,
+											IOptionApplicability{
+	private static boolean fEnUiVisible;
+	private static boolean fEnUiEnabled;
+	private static boolean fEnCmdUsed;
+	
+	private static boolean fHandleValueCalled;
+	
+	private static final String thisEnumIds[] = new String[]{"testgnu.enablement.c.optimization.level.optimize", "testgnu.enablement.c.optimization.level.more"};
+	private static final String thisStrings[] = new String[]{
+//		"", 
+//		"test a b c", 
+//		"some buggy string", 
+		"start 1.2.3 stop"};
+
+
+	public boolean handleValue(IBuildObject configuration, IHoldsOptions holder, IOption option, String extraArgument, int event) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isDefaultValue(IBuildObject configuration, IHoldsOptions holder, IOption option, String extraArgument) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isEnumValueAppropriate(IBuildObject configuration, IHoldsOptions holder, IOption option, String extraArgument, String enumValue) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isOptionUsedInCommandLine(IBuildObject configuration, IHoldsOptions holder, IOption option) {
+		return fEnCmdUsed;
+	}
+
+	public boolean isOptionVisible(IBuildObject configuration, IHoldsOptions holder, IOption option) {
+		return fEnUiVisible;
+	}
+
+	public boolean isOptionEnabled(IBuildObject configuration, IHoldsOptions holder, IOption option) {
+		return fEnUiEnabled;
+	}
+	
+	public static Test suite() {
+		return new TestSuite(OptionEnablementTests.class);
+	}
+	
+	private void resetValueHandler(){
+		fHandleValueCalled = false;
+	}
+	
+	private void setEnablement(boolean cmdUs, boolean uiVis, boolean uiEn){
+		fEnUiVisible = uiVis;
+		fEnUiEnabled = uiEn;
+		fEnCmdUsed = cmdUs;
+	}
+
+	public void testEnablement(){
+		resetValueHandler();
+
+		IProject project = ManagedBuildTestHelper.createProject("en",
+								"cdt.managedbuild.target.enablement.exe");
+		IFile aFile = ManagedBuildTestHelper.createFile(project, "a.c");
+		IFile bFile = ManagedBuildTestHelper.createFile(project, "b.c");
+
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IConfiguration cfg = info.getManagedProject().getConfigurations()[0];
+		assertFalse(fHandleValueCalled);
+		
+		doTestEnablement(cfg);
+		
+		doEnumAllValues(cfg);
+		
+		ManagedBuildTestHelper.removeProject("en");
+	}
+	
+	private void doEnumAllValues(IBuildObject cfgBo){
+		ITool thisTool = getTool(cfgBo,"enablement.this.child_1.2.3");
+		ITool otherTool = getTool(cfgBo,"enablement.other");
+		
+		IBuildObject thisCfg = thisTool.getParent(); 
+		IBuildObject otherCfg = otherTool.getParent();
+		
+		for(int i = 0; i < thisStrings.length; i++){
+			String strVal = thisStrings[i];
+			setOption(cfgBo, thisTool, "this.string", strVal);
+			doTestEnablement(cfgBo);
+		}
+/*
+		for(int i = 0; i < thisEnumIds.length; i++){
+			String strVal = thisEnumIds[i];
+			setOption(cfgBo, thisTool, "this.enum", strVal);
+			doTestEnablement(cfgBo);
+		}
+*/		
+		setOption(cfgBo, thisTool, "this.boolean", false);
+		doTestEnablement(cfgBo);
+
+		setOption(cfgBo, thisTool, "this.boolean", true);
+		doTestEnablement(cfgBo);
+	}
+	
+	private ITool getTool(IBuildObject cfgBo, String id){
+		IResourceConfiguration rcCfg = null;
+		IConfiguration cfg = null;
+		ITool tool = null;
+		if(cfgBo instanceof IResourceConfiguration){
+			rcCfg = (IResourceConfiguration)cfgBo;
+			cfg = rcCfg.getParent();
+			ITool tools[] = rcCfg.getTools();
+			for(int i = 0; i < tools.length; i++){
+				for(ITool tmp = tools[i]; tmp != null; tmp=tmp.getSuperClass()){
+					if(tmp.getId().equals(id)){
+						tool = tools[i];
+						break;
+					}
+				}
+			}
+		} else if(cfgBo instanceof IConfiguration){
+			cfg = (IConfiguration)cfgBo;
+			tool = cfg.getToolsBySuperClassId(id)[0];
+		} else
+			fail("wrong argument");
+		return tool;
+	}
+	
+	private IOption setOption(IBuildObject cfg, IHoldsOptions holder, String id, boolean value){
+		return setOption(cfg, holder, holder.getOptionBySuperClassId(id), value);
+	}
+
+	private IOption setOption(IBuildObject cfg, IHoldsOptions holder, IOption option, boolean value){
+		try{
+		if(cfg instanceof IConfiguration)
+			return ((IConfiguration)cfg).setOption(holder, option, value);
+		else if(cfg instanceof IResourceConfiguration)
+			return ((IResourceConfiguration)cfg).setOption(holder, option, value);
+		} catch(BuildException e){
+			fail(e.getLocalizedMessage());
+		}
+		fail("wrong arg");
+		return null;
+	}
+
+	private IOption setOption(IBuildObject cfg, IHoldsOptions holder, String id, String value){
+		return setOption(cfg, holder, holder.getOptionBySuperClassId(id), value);
+	}
+
+	private IOption setOption(IBuildObject cfg, IHoldsOptions holder, IOption option, String value){
+		try{
+		if(cfg instanceof IConfiguration)
+			return ((IConfiguration)cfg).setOption(holder, option, value);
+		else if(cfg instanceof IResourceConfiguration)
+			return ((IResourceConfiguration)cfg).setOption(holder, option, value);
+		} catch(BuildException e){
+			fail(e.getLocalizedMessage());
+		}
+		fail("wrong arg");
+		return null;
+	}
+
+	private IOption setOption(IBuildObject cfg, IHoldsOptions holder, String id, String value[]){
+		return setOption(cfg, holder, holder.getOptionBySuperClassId(id), value);
+	}
+
+	private IOption setOption(IBuildObject cfg, IHoldsOptions holder, IOption option, String value[]){
+		try{
+		if(cfg instanceof IConfiguration)
+			return ((IConfiguration)cfg).setOption(holder, option, value);
+		else if(cfg instanceof IResourceConfiguration)
+			return ((IResourceConfiguration)cfg).setOption(holder, option, value);
+		} catch(BuildException e){
+			fail(e.getLocalizedMessage());
+		}
+		fail("wrong arg");
+		return null;
+	}
+
+	private void doTestEnablement(IBuildObject cfg){
+		ITool tool = getTool(cfg, "enablement.this.child_1.2.3");
+		ITool otherTool = getTool(cfg, "enablement.other");
+		ITool tool2 = getTool(cfg, "enablement.this.child.2_1.2.3");
+		
+//		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		
+		IOption thisBoolean = tool.getOptionBySuperClassId("this.boolean");
+		IOption thisString = tool.getOptionBySuperClassId("this.string");
+		IOption thisEnum = tool.getOptionBySuperClassId("this.enum");
+		
+		IOption otherString = otherTool.getOptionBySuperClassId("other.string");
+		IOption otherBoolean = otherTool.getOptionBySuperClassId("other.boolean");
+		
+
+		
+		
+		try{
+		
+		IOption option = tool.getOptionBySuperClassId("enablement.command.c1");
+		
+		assertEquals(option.getCommand(), "c1");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.command.c2");
+		assertEquals(option.getCommand(), "c2");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.commandFalse.c1");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "c1");
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.commandFalse.c2");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "c2");
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.command.c1.commandFalse.cF1");
+		assertEquals(option.getCommand(), "c1");
+		assertEquals(option.getCommandFalse(), "cF1");
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.command.cmd.commandFalse.cmdF");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.command.c1.commandFalse.cmdF");
+		assertEquals(option.getCommand(), "c1");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.command.cmd.commandFalse.cF1");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cF1");
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.ui.en");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cF1");
+		assertFalse(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.ui.vis");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cF1");
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.cmd.us");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.cmdUs.or.uiVis");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cF1");
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.uiEn.or.uiVis");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cF1");
+		assertFalse(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.all");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cF1");
+		assertFalse(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.all.ac.vh");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cF1");
+
+		setEnablement(false, false, false);
+		assertFalse(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		setEnablement(false, true, false);
+		assertFalse(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		
+		setEnablement(false, false, true);
+		assertFalse(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		
+		setEnablement(true, false, false);
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		setEnablement(false, false, false);
+		option = tool.getOptionBySuperClassId("enablement.all.cF1.ac.vh");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cF1");
+		assertFalse(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+
+		setEnablement(true, false, true);
+
+		option = tool.getOptionBySuperClassId("enablement.all.cF.cmdF");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.all.cF.cF1");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cF1");
+		assertFalse(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("this.boolean");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkOpt.all.Q.this.boolean.True");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertEquals(thisBoolean.getBooleanValue() == true, 
+				option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertEquals(thisBoolean.getBooleanValue() == true,
+				option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertEquals(thisBoolean.getBooleanValue() == true,
+				option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkOpt.all.Q.this.boolean.False");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertEquals(thisBoolean.getBooleanValue() == false, 
+				option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertEquals(thisBoolean.getBooleanValue() == false,
+				option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertEquals(thisBoolean.getBooleanValue() == false,
+				option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkOpt.all.Q.this.string.Q.empty");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertEquals(thisString.getStringValue().equals(""), 
+				option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertEquals(thisString.getStringValue().equals(""),
+				option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertEquals(thisString.getStringValue().equals(""),
+				option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkOpt.all.Q.this.string.Q.test a b c");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertEquals(thisString.getStringValue().equals("test a b c"), 
+				option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertEquals(thisString.getStringValue().equals("test a b c"),
+				option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertEquals(thisString.getStringValue().equals("test a b c"),
+				option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkOpt.all.Q.this.enum.Q.testgnu.enablement.c.optimization.level.optimize");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		String id = thisEnum.getEnumeratedId(thisEnum.getStringValue());
+		if(id == null)
+			id = "";
+		assertEquals(id.equals("testgnu.enablement.c.optimization.level.optimize"), 
+				option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertEquals(id.equals("testgnu.enablement.c.optimization.level.optimize"),
+				option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertEquals(id.equals("testgnu.enablement.c.optimization.level.optimize"),
+				option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkOpt.all.Q.this.Q.true");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertEquals(option.getBooleanValue() == true, 
+				option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertEquals(option.getBooleanValue()== true, 
+				option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertEquals(option.getBooleanValue() == true, 
+				option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkOpt.all.Q.this.string.Q.start ${ParentVersion} stop");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertEquals(thisString.getStringValue().equals("start 1.2.3 stop"), 
+				option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertEquals(thisString.getStringValue().equals("start 1.2.3 stop"), 
+				option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertEquals(thisString.getStringValue().equals("start 1.2.3 stop"), 
+				option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+ 		  
+		option = tool.getOptionBySuperClassId("enablement.checkOpt.all.Q.this.string.Q.other.string");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertEquals(thisString.getStringValue().equals(otherString.getStringValue()), 
+				option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertEquals(thisString.getStringValue().equals(otherString.getStringValue()), 
+				option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertEquals(thisString.getStringValue().equals(otherString.getStringValue()), 
+				option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkOpt.all.Q.this.string.Q.other.string");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertEquals(thisString.getStringValue().equals(otherString.getStringValue()), 
+				option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertEquals(thisString.getStringValue().equals(otherString.getStringValue()), 
+				option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertEquals(thisString.getStringValue().equals(otherString.getStringValue()), 
+				option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkString");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkString.2");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkString.3");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkFalse.false");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertFalse(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkNot.false");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertFalse(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkOr.true");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool.getOptionBySuperClassId("enablement.checkAnd.false");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertFalse(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+		
+		option = tool.getOptionBySuperClassId("enablement.checkHolder.true.1.false.2");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertTrue(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
+		assertTrue(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
+
+		option = tool2.getOptionBySuperClassId("enablement.checkHolder.true.1.false.2");
+		assertEquals(option.getCommand(), "cmd");
+		assertEquals(option.getCommandFalse(), "cmdF");
+		assertFalse(option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool2, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionVisible(cfg, tool2, option));
+		assertFalse(option.getApplicabilityCalculator().isOptionEnabled(cfg, tool2, option));
+
+		}catch (BuildException e){
+			fail(e.getLocalizedMessage());
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/PathConverterTest.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/PathConverterTest.java
new file mode 100644
index 0000000..a2ccf8c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/PathConverterTest.java
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * Copyright (C) 2006 Siemens AG.
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.IPathEntry;
+import org.eclipse.cdt.internal.core.model.IncludeEntry;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IOptionPathConverter;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.runtime.IPath;
+
+/**
+ * This is a test for the pathConverter attribute
+ * which may be specified for a tool or toolchain
+ * The manifest has an extra buildDefinitions section
+ * with a dedicated project type "pathconvertertest.projecttype"
+ * to support these tests.
+ * @author pn3484
+ *
+ */
+public class PathConverterTest extends TestCase {
+	
+
+	public PathConverterTest(String name) {
+		super(name);
+	}
+
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite(PathConverterTest.class.getName());		
+		suite.addTest(new PathConverterTest("testPathConversionInProject"));
+		suite.addTest(new PathConverterTest("testPathConverterConfigurations"));
+		return suite;
+	}
+
+
+	/**
+	 * The expected converter can be determined from the configuration's id string.
+	 * The id string has a toolchain part "tc&lt;d&gt;&lt;i&gt;" and a tool part "to&lt;d&gt;&lt;i&gt;". <br>
+	 * <br>
+	 * Where &lt;d&gt; stands for whether a converter is directly specified: <br>
+	 *   'n' : No converter specified<br>
+	 *   'y' : Converter of type TestPathConverter2 specified<br>
+	 * <br>
+	 * and &lt;i&gt; stands for whether a converter is inherited from the superclass.<br>
+	 *   'n' : Converter is not inherited<br>
+	 *   'y' : Converter is directly specified<br>
+	 * <br>
+	 * Inherited converters are always TestPathConverter1 type.<br>
+	 * <br>
+	 * The test setup in the manifest file tests the follwing precedence order: <br>
+	 * - A converter set directly on the tool overrides an inherited tool converter <br>
+	 * - An inherited converter overrides any toolchain converters <br>
+	 * - A converter set directly on the toolchain overrides an inherited toolchain converter <br>
+	 */
+	protected Class getExpectedToolConverterClass(String configId)  {
+		// Conservative defaults
+		boolean hasToolConverter = false ;
+		boolean hasToolInheritedConverter = false ;
+		// Analyze tool information
+		int toolInfoAt = configId.indexOf("to");
+		String toolinfo = configId.substring(toolInfoAt+2, toolInfoAt+4);
+		hasToolConverter = (toolinfo.charAt(0)=='y');
+		hasToolInheritedConverter = (toolinfo.charAt(1)=='y');
+		// Assume no converter
+		Class toolConverterClass = getExpectedToolchainConverterClass(configId) ;
+		// Modify converter as appropriate
+		if (hasToolInheritedConverter)  toolConverterClass = TestPathConverter2.class ;
+		if (hasToolConverter)  toolConverterClass = TestPathConverter4.class ;
+		
+		return toolConverterClass ;
+	}
+	
+	/**
+	 * @see getExpectedToolConverterClass()
+	 */
+	protected Class getExpectedToolchainConverterClass(String configId)  {
+		// Conservative defaults
+		boolean hasToolchainConverter = false ;
+		boolean hasToolchainInheritedConverter = false ;
+		// Analyze toolchain information
+		int toolchainInfoAt = configId.indexOf("tc");
+		String toolchaininfo = configId.substring(toolchainInfoAt+2, toolchainInfoAt+4);
+		hasToolchainConverter = (toolchaininfo.charAt(0)=='y');
+		hasToolchainInheritedConverter = (toolchaininfo.charAt(1)=='y');
+		// Assume no converter
+		Class toolConverterClass = null ;
+		// Modify converter as appropriate
+		if (hasToolchainInheritedConverter)  toolConverterClass = TestPathConverter1.class ;
+		if (hasToolchainConverter)  toolConverterClass = TestPathConverter3.class ;
+		
+		return toolConverterClass ;
+	}
+	
+	/**
+	 * Check the converter settings for some key configurations
+	 */
+	public void testPathConverterConfigurations()  {
+		IProjectType[] projTypes = ManagedBuildManager.getDefinedProjectTypes();
+		assertNotNull("Project types were not loaded!", projTypes);
+		IProjectType projType = ManagedBuildManager.getProjectType("pathconvertertest.projecttype");
+		assertNotNull("Projecttype should have been loaded!", projType);
+		
+		IConfiguration[] configurations = projType.getConfigurations();
+		assertTrue("There should be some configurations!", configurations.length>0);
+		
+		// Check all configurations
+		for (int i = 0; i < configurations.length; i++) {
+			IConfiguration configuration = configurations[i];
+			IToolChain toolchain = configuration.getToolChain();
+
+			Class expectedToolchainConverterClass = getExpectedToolchainConverterClass(configuration.getId());
+			IOptionPathConverter toolchainPathConverter = toolchain.getOptionPathConverter();
+			if (null==expectedToolchainConverterClass)  {
+				assertNull("null pathConverter expected for toolchain!", toolchainPathConverter);
+			}  else  {
+				assertEquals("Unexpected pathConverter type for toolchain", expectedToolchainConverterClass, toolchainPathConverter.getClass());
+			}
+			
+			
+			ITool tool = toolchain.getTools()[0]; // We have only one tool in the test setup
+			Class expectedToolConverterClass = getExpectedToolConverterClass(configuration.getId());
+			IOptionPathConverter toolPathConverter = tool.getOptionPathConverter();
+			if (null==expectedToolConverterClass)  {
+				assertNull("null pathConverter expected for tool!", toolPathConverter);
+			}  else  {
+				assertEquals("Unexpected pathConverter type for tool", expectedToolConverterClass, toolPathConverter.getClass());
+			}
+		}
+	}
+	
+	/**
+	 * Check the path conversion in live project for a specific tool.
+	 */
+	public void testPathConversionInProject() throws Exception {
+		IProjectType type = ManagedBuildManager.getProjectType("pathconvertertest.projecttype");
+		IWorkspaceRoot root = null ;
+		IProject project = ManagedBuildTestHelper.createProject("pathconverter01", type.getId());
+		IManagedBuildInfo iinfo = ManagedBuildManager.getBuildInfo(project);
+		assertNotNull("build info could not be obtained", iinfo);
+		ManagedBuildInfo info = (ManagedBuildInfo) iinfo ;
+		boolean isConfigurationSet = info.setDefaultConfiguration("config toolchain-yy, tool-yy");
+		assertTrue("Configuration could not be set", isConfigurationSet);
+		
+		IPathEntry[] pathEntries = info.getManagedBuildValues();
+		assertEquals("Unexpected number of path entries", 1, pathEntries.length);
+		IncludeEntry entry = (IncludeEntry) pathEntries[0];
+		IPath path = entry.getIncludePath();
+		String pathText = path.toString() ;
+		assertEquals("Unexpected value for include path", "/usr/local/include", pathText);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ProjectConverter.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ProjectConverter.java
new file mode 100644
index 0000000..482830e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ProjectConverter.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IConvertManagedBuildObject;
+
+public class ProjectConverter implements IConvertManagedBuildObject {
+
+	public IBuildObject convert(IBuildObject buildObj, String fromId,
+			String toId, boolean isConfirmed) {
+
+		String tmpDir = System.getProperty("java.io.tmpdir");
+		
+		File outputFile = new File(tmpDir + "/converterOutput.txt");
+		try {
+			FileWriter out = new FileWriter(outputFile);
+			out.write("---------- Start-------");
+			out.write("Converter for the build object : '" + buildObj.getName() + "' is invoked.");
+			out.write("From Id : " + fromId );
+			out.write("To Id : " + toId);
+			out.write("---------- End-------");
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+		//	e.printStackTrace();
+			System.out.println("Exception raised.");
+		}
+		
+	
+	return buildObj;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ProjectConverter20.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ProjectConverter20.java
new file mode 100644
index 0000000..55efd14
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ProjectConverter20.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IConvertManagedBuildObject;
+
+public class ProjectConverter20 implements IConvertManagedBuildObject {
+
+	public IBuildObject convert(IBuildObject buildObj, String fromId,
+			String toId, boolean isConfirmed) {
+		
+		String tmpDir = System.getProperty("java.io.tmpdir");	//$NON-NLS-1$
+		
+		File outputFile = new File(tmpDir + "/converterOutput20.txt");	//$NON-NLS-1$
+		try {
+			FileWriter out = new FileWriter(outputFile);			
+			out.write("Converter for CDT 2.0 Project is invoked");	//$NON-NLS-1$
+			out.close();
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+		//	e.printStackTrace();
+			System.out.println("Exception raised.");	//$NON-NLS-1$
+		}
+		return buildObj;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ProjectConverter21.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ProjectConverter21.java
new file mode 100644
index 0000000..7215e04
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ProjectConverter21.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IConvertManagedBuildObject;
+
+public class ProjectConverter21 implements IConvertManagedBuildObject {
+
+	public IBuildObject convert(IBuildObject buildObj, String fromId,
+			String toId, boolean isConfirmed) {
+
+		String tmpDir = System.getProperty("java.io.tmpdir");	//$NON-NLS-1$	
+		
+		File outputFile = new File(tmpDir + "/converterOutput21.txt");	//$NON-NLS-1$
+		try {
+			FileWriter out = new FileWriter(outputFile);			
+			out.write("Converter for CDT 2.1 Project is invoked");	//$NON-NLS-1$
+			out.close();
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+		//	e.printStackTrace();
+			System.out.println("Exception raised.");	//$NON-NLS-1$
+		}
+		return buildObj;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ResourceBuildCoreTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ResourceBuildCoreTests.java
new file mode 100644
index 0000000..e5e1a42
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ResourceBuildCoreTests.java
@@ -0,0 +1,923 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.io.ByteArrayInputStream;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.cdt.managedbuilder.internal.core.Tool;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+
+public class ResourceBuildCoreTests extends TestCase {
+	private static final boolean boolVal = true;
+	private static IProjectType exeType;	
+	private static IProjectType libType;
+	private static IProjectType dllType;
+	
+	
+	private static final String projectName = "T1";
+	private static final String renamedProjectName1 = "T1_1";
+	private static final String renamedProjectName2 = "T1_2";
+	
+	public ResourceBuildCoreTests(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite = new TestSuite(ResourceBuildCoreTests.class.getName());		
+		suite.addTest(new ResourceBuildCoreTests("testResourceConfigurations"));
+		suite.addTest(new ResourceBuildCoreTests("testResourceConfigurationReset"));
+//		suite.addTest(new ResourceBuildCoreTests("testResourceConfigurationBuildInfo"));
+//		suite.addTest(new ResourceBuildCoreTests("testResourceRename"));
+		return suite;
+	}
+
+	/**
+	 * Creates a couple of resource configurations.
+	 * Checks whether the  resource & project default build properties are same or not. 
+	 * Overrides project build properties and checks whether they are reflecting at resource level.
+	 * Overrides resource build properties and checks whether they are reflecting at project level.
+	 * 
+	 */
+	
+	public void testResourceConfigurations() throws Exception {
+			
+		// Create a new project
+		IProject project = null;
+		
+		try {
+			project = createProject(projectName);
+			
+			// Now associate the builder with the project
+			ManagedBuildTestHelper.addManagedBuildNature(project);
+			IProjectDescription description = project.getDescription();
+			// Make sure it has a managed nature
+			if (description != null) {
+				assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+			}
+
+		} catch (CoreException e) {
+			fail("Test failed on project creation: " + e.getLocalizedMessage());
+		}
+	
+		// Find the base project type definition
+		IProjectType[] projTypes = ManagedBuildManager.getDefinedProjectTypes();
+		IProjectType projType = ManagedBuildManager.getProjectType("cdt.managedbuild.target.testgnu21.exe");
+		assertNotNull(projType);
+		
+		// Create the managed-project (.cdtbuild) for our project that builds an executable.
+		IManagedProject newProject = ManagedBuildManager.createManagedProject(project, projType);
+		assertEquals(newProject.getName(), projType.getName());
+		assertFalse(newProject.equals(projType));
+		ManagedBuildManager.setNewProjectVersion(project);
+			
+		// Create a couple of resources ( 'main.c' & 'bar.c')
+		IFile mainFile = project.getProject().getFile( "main.c" );
+		if( !mainFile.exists() ){
+			mainFile.create( new ByteArrayInputStream( "#include <stdio.h>\n extern void bar(); \n int main() { \nprintf(\"Hello, World!!\"); \n bar();\n return 0; }".getBytes() ), false, null );
+		}
+		
+		IFile barFile = project.getProject().getFile( "bar.c" );
+		if( !barFile.exists() ){
+			barFile.create( new ByteArrayInputStream( "#include <stdio.h>\n void bar() { \nprintf(\"Hello, bar()!!\");\n return; }".getBytes() ), false, null );
+		}
+	
+		// Get the configurations and make one of them as default configuration.
+		IConfiguration defaultConfig = null;
+		IConfiguration[] configs = projType.getConfigurations();
+		for (int i = 0; i < configs.length; ++i) {
+			// Make the first configuration the default 
+			if (i == 0) {
+				defaultConfig = newProject.createConfiguration(configs[i], projType.getId() + "." + i);
+			} else {
+				newProject.createConfiguration(configs[i], projType.getId() + "." + i);
+			}
+		}
+		ManagedBuildManager.setDefaultConfiguration(project, defaultConfig);
+
+		// Create Resource Configurations for files main.c and bar.c
+		IResourceConfiguration resMainConfig = defaultConfig.createResourceConfiguration(mainFile);
+		IResourceConfiguration resBarConfig = defaultConfig.createResourceConfiguration(barFile);
+		
+		// Check whether defaultConfig has two resource configurations or not.
+		IResourceConfiguration resConfigs[] = defaultConfig.getResourceConfigurations();
+		assertEquals(2,resConfigs.length);
+		
+		// Get the tools associated with the resource 'main.c'.
+		ITool resMainTools[] = resMainConfig.getTools();
+		assertNotNull(resMainTools);
+		assertEquals(1,resMainTools.length);
+		
+		// Get the tools associated with the resource 'bar.c'.
+		ITool resBarTools[] = resBarConfig.getTools();
+		assertNotNull(resBarTools);
+		assertEquals(1,resBarTools.length);
+
+		// Get the build properties for the resource main.c
+		ITool resMainTool = resMainTools[0];
+		
+		String resMainBuildProps = resMainTool.getToolFlags();
+			
+		// Get the build properties for the resource bar.c
+		ITool resBarTool = resBarTools[0];
+		String resBarBuildProps = resBarTool.getToolFlags();
+		
+		//	Get file extension.
+		String extString = mainFile.getFileExtension();
+		
+		// Get the project build properties.
+		ITool tools[] = defaultConfig.getFilteredTools();
+		Tool projTool = null;
+		String projBuildProps = new String();
+		for (int i = 0; i < tools.length; i++) {
+			if( tools[i].buildsFileType(extString) ) {
+				// Get the build properties of a project in default configuration
+				projTool = (Tool)tools[i];
+				projBuildProps = projTool.getToolFlags();
+				break;
+			}
+		}
+		
+		// Initially, Project build properties and resource build properties are same.
+		assertEquals(resMainBuildProps,projBuildProps);
+				
+		// Initially, build properties of files with same extension ( example , .c files) are equal.
+		assertEquals(resMainBuildProps,resBarBuildProps);
+		
+		// Now modify project build properties and it should reflect in resource build properties also.
+			
+		IOption projDebugOption = projTool.getOptionById("testgnu.c.compiler.exe.debug.option.debugging.level");
+			
+		assertNotNull(projDebugOption);
+		
+		// Override options in the default configuration.
+		// Set the debug option value to '-g2' at Project level
+		IOption newProjDebugOption = ManagedBuildManager.setOption(defaultConfig,projTool,projDebugOption,"testgnu.c.debugging.level.default");
+		
+		// Get the option 'id' and 'value'.
+		String newProjDebugOptionId = newProjDebugOption.getId();
+		String newProjDebugOptionValue  = newProjDebugOption.getStringValue();
+		
+		// Assert old & new(overridden) debug option values of project are different.
+		assertNotSame(projDebugOption.getStringValue(),newProjDebugOptionValue);
+		
+		// Check whether the overridden option at project level is reflecting at resource level or not.			
+		IOption resMainDebugOption = null;
+				
+		IOption resMainOptions[] = resMainTool.getOptions();
+		
+		for(int i=0; i< resMainOptions.length; i++){
+			IOption opt = resMainOptions[i];
+			if( opt != null ) {
+				if(opt.getId().equals(newProjDebugOptionId)){
+					// Resource Configuration doesnot have overridden value for this option.
+					resMainDebugOption = opt;
+					break;
+				}
+				if ( opt.getSuperClass() != null ) {
+					if(opt.getSuperClass().getId().equals(newProjDebugOptionId)){
+						// Resource Configuration does have overridden value for this option.
+						resMainDebugOption = opt;
+						break;	
+					}	
+				}
+			}
+		}
+		
+		String resMainDebugOptionValue = resMainDebugOption.getStringValue();
+		
+		// Assert Debug option values of project and resource are same.
+		assertEquals(newProjDebugOptionValue, resMainDebugOptionValue);
+		
+		// Now, Modify the Debug option at resource level
+		// and verify whether the modified option is reflected at project level. 
+		// It should not reflect at project level.
+		
+		IOption newResMainDebugOption = ManagedBuildManager.setOption(resMainConfig,resMainTool,resMainDebugOption,"gnu.c.debugging.level.minimal");		
+				
+		//Get the latest project Debug option.
+		tools = defaultConfig.getFilteredTools();
+		projTool = null;
+		
+		for (int i = 0; i < tools.length; i++) {
+			if( tools[i].buildsFileType(extString) ) {
+				// Get the build properties of a project in default configuration
+				projTool = (Tool)tools[i];
+				break;
+			}
+		}
+		
+		projDebugOption = projTool.getOptionById(newProjDebugOptionId);
+		String projDebugOptionValue = projDebugOption.getStringValue();
+		
+		String newResMainDebugOptionValue = newResMainDebugOption.getStringValue();
+		
+		// Assert the debug option values of project and resource are different.		
+		assertNotSame(projDebugOptionValue, newResMainDebugOptionValue);
+		
+		// Close and remove project.
+		project.close(null);
+		removeProject(projectName);
+	}
+	
+	/*
+	 * 	Creates a project and a resource(hello.c).
+	 * 	Overrides the build properties in resource configuration, and
+	 * 	resets the resource configuration, verifies whether the overridden
+	 * 	values still exist or not.
+	 */
+	
+	public void testResourceConfigurationReset() throws Exception {
+		
+		// Create a new project
+		IProject project = null;
+		
+		try {
+			project = createProject(projectName);
+			
+			// Now associate the builder with the project
+			ManagedBuildTestHelper.addManagedBuildNature(project);
+			IProjectDescription description = project.getDescription();
+			// Make sure it has a managed nature
+			if (description != null) {
+				assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+			}
+
+		} catch (CoreException e) {
+			fail("Test failed on project creation: " + e.getLocalizedMessage());
+		}
+	
+		// Find the base project type definition
+		IProjectType[] projTypes = ManagedBuildManager.getDefinedProjectTypes();
+		IProjectType projType = ManagedBuildManager.getProjectType("cdt.managedbuild.target.testgnu21.exe");
+		assertNotNull(projType);
+		
+		// Create the managed-project (.cdtbuild) for our project that builds an executable.
+		IManagedProject newProject = ManagedBuildManager.createManagedProject(project, projType);
+		assertEquals(newProject.getName(), projType.getName());
+		assertFalse(newProject.equals(projType));
+		ManagedBuildManager.setNewProjectVersion(project);
+			
+		// Create a resource ( 'hello.c')
+		IFile helloFile = project.getProject().getFile( "hello.c" );
+		if( !helloFile.exists() ){
+			helloFile.create( new ByteArrayInputStream( "#include <stdio.h>\n\n int main() { \nprintf(\"Hello, World!!\"); \n bar();\n return 0; }".getBytes() ), false, null );
+		}
+	
+		// Get the configurations and make one of them as default configuration.
+		IConfiguration defaultConfig = null;
+		IConfiguration[] configs = projType.getConfigurations();
+		for (int i = 0; i < configs.length; ++i) {
+			// Make the first configuration the default 
+			if (i == 0) {
+				defaultConfig = newProject.createConfiguration(configs[i], projType.getId() + "." + i);
+			} else {
+				newProject.createConfiguration(configs[i], projType.getId() + "." + i);
+			}
+		}
+		ManagedBuildManager.setDefaultConfiguration(project, defaultConfig);
+
+		// Create Resource Configurations for hello.c
+		IResourceConfiguration resConfig = defaultConfig.createResourceConfiguration(helloFile);
+		
+		// Check whether defaultConfig has the correct number of resource configurations or not.
+		IResourceConfiguration resConfigs[] = defaultConfig.getResourceConfigurations();
+		assertEquals(1,resConfigs.length);
+		
+		// Get the tools associated with the resource 'hello.c'.
+		ITool resTools[] = resConfig.getTools();
+		assertNotNull(resTools);
+		assertEquals(1,resTools.length);
+		
+		// Get the build properties for the resource hello.c
+		ITool resTool = resTools[0];
+		String defaultResToolFlags = resTool.getToolFlags();
+		
+		// Get the Debug Option.
+		IOption resDebugOption = resTool.getOptionById("testgnu.c.compiler.exe.debug.option.debugging.level");
+		
+		// Get the default value of debug option for resource.
+		String defaultResDebugOptVal = resDebugOption.getStringValue();
+		
+		// Now, override the value with "gnu.c.debugging.level.minimal"
+		IOption newResDebugOption = ManagedBuildManager.setOption(resConfig,resTool,resDebugOption,"gnu.c.debugging.level.minimal");
+		
+		// Get the overridden value of debug option.
+		String newResDebugOptVal = newResDebugOption.getStringValue();
+		String newResToolFlags = resTool.getToolFlags();
+		
+		// Make sure, default and overridden values are different.
+		assertNotSame(defaultResDebugOptVal,newResDebugOptVal);
+		
+		// Reset the resource configuration.
+		ManagedBuildManager.resetResourceConfiguration(project,resConfig);
+		String resetResToolFlags = resTool.getToolFlags();
+		
+		assertNotSame(resetResToolFlags,newResToolFlags);
+		assertEquals(defaultResToolFlags,resetResToolFlags);
+		
+		// Close and remove project.
+		project.close(null);
+		removeProject(projectName);
+	}
+	
+	/*
+	 * 	Creates a project and a couple of resources.
+	 * 	Overrides the build properties of resources. Saves, closes, and reopens 
+	 * 	the project. Then, checks the overridden options. Basically, this function
+	 * 	tests persisting overridden resource build properties between project sessions.
+	 */
+	
+	public void testResourceConfigurationBuildInfo() throws Exception {
+		
+		//	Create a new project
+		IProject project = null;
+		
+		try {
+			project = createProject(projectName);
+			
+			// Now associate the builder with the project
+			ManagedBuildTestHelper.addManagedBuildNature(project);
+			IProjectDescription description = project.getDescription();
+			// Make sure it has a managed nature
+			if (description != null) {
+				assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+			}
+
+		} catch (CoreException e) {
+			fail("Test failed on project creation: " + e.getLocalizedMessage());
+		}
+	
+		// Find the base project type definition
+		IProjectType[] projTypes = ManagedBuildManager.getDefinedProjectTypes();
+		IProjectType projType = ManagedBuildManager.getProjectType("cdt.managedbuild.target.testgnu21.exe");
+		assertNotNull(projType);
+		
+		// Create the managed-project (.cdtbuild) for our project that builds an executable.
+		IManagedProject newProject = ManagedBuildManager.createManagedProject(project, projType);
+		assertEquals(newProject.getName(), projType.getName());
+		assertFalse(newProject.equals(projType));
+		ManagedBuildManager.setNewProjectVersion(project);
+			
+		// Create a couple of resources ( 'main.c' & 'bar.c')
+		IFile mainFile = project.getProject().getFile( "main.c" );
+		if( !mainFile.exists() ){
+			mainFile.create( new ByteArrayInputStream( "#include <stdio.h>\n extern void bar(); \n int main() { \nprintf(\"Hello, World!!\"); \n bar();\n return 0; }".getBytes() ), false, null );
+		}
+		
+		IFile barFile = project.getProject().getFile( "bar.c" );
+		if( !barFile.exists() ){
+			barFile.create( new ByteArrayInputStream( "#include <stdio.h>\n void bar() { \nprintf(\"Hello, bar()!!\");\n return; }".getBytes() ), false, null );
+		}
+	
+		// Get the configurations and make one of them as default configuration.
+		IConfiguration defaultConfig = null;
+		IConfiguration[] configs = projType.getConfigurations();
+		for (int i = 0; i < configs.length; ++i) {
+			// Make the first configuration the default 
+			if (i == 0) {
+				defaultConfig = newProject.createConfiguration(configs[i], projType.getId() + "." + i);
+			} else {
+				newProject.createConfiguration(configs[i], projType.getId() + "." + i);
+			}
+		}
+		ManagedBuildManager.setDefaultConfiguration(project, defaultConfig);
+		
+		// Get the default configuration id.
+		String defaultConfigId = defaultConfig.getId();
+
+		// Create Resource Configurations for files main.c and bar.c
+		IResourceConfiguration resMainConfig = defaultConfig.createResourceConfiguration(mainFile);
+		IResourceConfiguration resBarConfig = defaultConfig.createResourceConfiguration(barFile);
+		
+		// Check whether defaultConfig has two resource configurations or not.
+		IResourceConfiguration resConfigs[] = defaultConfig.getResourceConfigurations();
+		assertEquals(2,resConfigs.length);
+
+		// Get the paths of resource configurations.
+		String resMainPath = resMainConfig.getResourcePath();
+		String resBarPath  = resBarConfig.getResourcePath();
+		
+		// Get the tools associated with the resource 'main.c'.
+		ITool resMainTools[] = resMainConfig.getTools();
+		assertNotNull(resMainTools);
+		assertEquals(1,resMainTools.length);
+		
+		// Get the tools associated with the resource 'bar.c'.
+		ITool resBarTools[] = resBarConfig.getTools();
+		assertNotNull(resBarTools);
+		assertEquals(1,resBarTools.length);
+
+		// Get the build properties for the resource main.c
+		ITool resMainTool = resMainTools[0];
+		
+		String defaultMainBuildProps = resMainTool.getToolFlags();
+			
+		// Get the build properties for the resource bar.c
+		ITool resBarTool = resBarTools[0];
+		String defaultBarBuildProps = resBarTool.getToolFlags();
+		
+		
+		// Now, override debug and optimization options.
+		// In Debug Configuration, Currently default values in resource configurations are
+		//	optimization : -O0,  debug : -g3
+		//  Override the options in the following way.
+		//  main.c :    optimization : '-O1'  debug : '-g1'
+		//  bar.c  :    optimization : '-O2'  debug : '-g2'
+		
+		IOption defaultResMainOptOption = resMainTool.getOptionById("testgnu.c.compiler.exe.debug.option.optimization.level");
+		String defaultResMainOptVal = defaultResMainOptOption.getStringValue();
+		
+		IOption resMainOptOption = ManagedBuildManager.setOption(resMainConfig,resMainTool,defaultResMainOptOption,"gnu.c.optimization.level.optimize");
+		String resMainOptVal = resMainOptOption.getStringValue();
+		
+		IOption defaultResMainDebugOption = resMainTool.getOptionById("testgnu.c.compiler.exe.debug.option.debugging.level");
+		String defaultResMainDebugVal = defaultResMainDebugOption.getStringValue();
+	
+		IOption resMainDebugOption = ManagedBuildManager.setOption(resMainConfig,resMainTool,defaultResMainDebugOption,"gnu.c.debugging.level.minimal");
+		String resMainDebugVal = resMainDebugOption.getStringValue();
+		
+		IOption defaultResBarOptOption = resBarTool.getOptionById("testgnu.c.compiler.exe.debug.option.optimization.level");
+		String defaultResBarOptVal = defaultResBarOptOption.getStringValue();
+		
+		IOption resBarOptOption = ManagedBuildManager.setOption(resBarConfig,resBarTool,defaultResBarOptOption,"gnu.c.optimization.level.more");
+		String resBarOptVal  = resBarOptOption.getStringValue();
+		
+		IOption defaultResBarDebugOption = resBarTool.getOptionById("testgnu.c.compiler.exe.debug.option.debugging.level");
+		String defaultResBarDebugVal = defaultResBarDebugOption.getStringValue();
+		
+		IOption resBarDebugOption = ManagedBuildManager.setOption(resBarConfig,resBarTool,defaultResBarDebugOption,"gnu.c.debugging.level.default");
+		String resBarDebugVal = resBarDebugOption.getStringValue();
+		
+		assertNotSame(defaultResMainOptVal, resMainOptVal);
+		assertNotSame(defaultResMainDebugVal, resMainDebugVal);
+		
+		assertNotSame(defaultResBarOptVal, resBarOptVal);
+		assertNotSame(defaultResBarDebugVal, resBarDebugVal);
+		
+		// Save and Close the project.
+		ManagedBuildManager.saveBuildInfo(project,false);
+		ManagedBuildManager.removeBuildInfo(project);
+		
+		project.close(null);
+		
+		// Now reopen the project.
+		project.open(null);
+		
+		// Get the build info.
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		IManagedProject newManagedProj = info.getManagedProject();
+		
+		// Verify that there are only two configurations.
+		IConfiguration[] definedConfigs = newManagedProj.getConfigurations(); 		
+		assertEquals(2, definedConfigs.length);
+		
+		// Get the default configuration and verify whether it is same as before.
+		IConfiguration newDefaultConfig = info.getDefaultConfiguration();
+		
+		assertEquals(defaultConfigId, newDefaultConfig.getId());
+		
+		// Get the resource configurations in defaultConfig
+		IResourceConfiguration newResConfigs[] = newDefaultConfig.getResourceConfigurations();
+		
+		assertEquals(2, newResConfigs.length);
+		
+		// Get the resource configuration for main.c using the path '/T1/main.c' 
+		IResourceConfiguration newResMainConfig = newDefaultConfig.getResourceConfiguration(resMainPath);
+		assertNotNull(newResMainConfig);
+		
+		ITool newResMainTools[] = newResMainConfig.getTools();
+		assertEquals(1,newResMainTools.length);
+		
+		// Get the Optimization and Debug option values for the resource 'main.c'.
+		ITool newResMainTool = newResMainTools[0];
+		
+		IOption newResMainOptOption = newResMainTool.getOptionById(resMainOptOption.getId());
+		assertNotNull(newResMainOptOption);
+		String newResMainOptVal = newResMainOptOption.getStringValue();
+		
+		IOption newResMainDebugOption = newResMainTool.getOptionById(resMainDebugOption.getId());
+		assertNotNull(newResMainDebugOption);
+		String newResMainDebugVal = newResMainDebugOption.getStringValue();
+		
+		// Assert that optimization & debug option values for the resource main.c are same between the sessions.
+		assertEquals(resMainOptVal, newResMainOptVal);
+		assertEquals(resMainDebugVal,newResMainDebugVal);
+		
+		// Get the resource configuration for bar.c
+		IResourceConfiguration newResBarConfig = newDefaultConfig.getResourceConfiguration(resBarPath);
+		assertNotNull(newResBarConfig);
+		
+		ITool newResBarTools[] = newResBarConfig.getTools();
+		assertEquals(1,newResBarTools.length);
+		
+		//Get the Optimization and Debug option values for the resource 'bar.c'
+		ITool newResBarTool = newResBarTools[0];
+		
+		IOption newResBarOptOption = newResBarTool.getOptionById(resBarOptOption.getId());
+		assertNotNull(newResBarOptOption);
+		String newResBarOptVal = newResBarOptOption.getStringValue();
+		
+		IOption newResBarDebugOption = newResBarTool.getOptionById(resBarDebugOption.getId());
+		assertNotNull(newResBarDebugOption);
+		String newResBarDebugVal = newResBarDebugOption.getStringValue();
+		
+		// Assert that optimization & debug option values for the resource main.c are same between the sessions.
+		assertEquals(resBarOptVal, newResBarOptVal);
+		assertEquals(resBarDebugVal,newResBarDebugVal);
+		
+		//	Close and remove project.
+		project.close(null);
+		removeProject(projectName);
+		
+	}
+	
+	private IProject createProject(String name) throws CoreException {
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		final IProject newProjectHandle = root.getProject(name);
+		IProject project = null;
+		
+		if (!newProjectHandle.exists()) {
+			IWorkspace workspace = ResourcesPlugin.getWorkspace();
+			IWorkspaceDescription workspaceDesc = workspace.getDescription();
+			workspaceDesc.setAutoBuilding(false);
+			workspace.setDescription(workspaceDesc);
+			IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());
+			//description.setLocation(root.getLocation());
+			project = CCorePlugin.getDefault().createCProject(description, newProjectHandle, new NullProgressMonitor(), ManagedBuilderCorePlugin.MANAGED_MAKE_PROJECT_ID);
+		} else {
+			IWorkspace workspace = ResourcesPlugin.getWorkspace();
+			IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+				public void run(IProgressMonitor monitor) throws CoreException {
+					newProjectHandle.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+				}
+			};
+			NullProgressMonitor monitor = new NullProgressMonitor();
+			workspace.run(runnable, root, IWorkspace.AVOID_UPDATE, monitor);
+			project = newProjectHandle;
+		}
+        
+		// Open the project if we have to
+		if (!project.isOpen()) {
+			project.open(new NullProgressMonitor());
+		}
+				
+		return project;	
+	}
+	
+	/**
+	 * Remove the <code>IProject</code> with the name specified in the argument from the 
+	 * receiver's workspace.
+	 *  
+	 * @param name
+	 */
+	private void removeProject(String name) {
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		IProject project = root.getProject(name);
+		if (project.exists()) {
+			try {
+				Thread.sleep(1000);
+			} catch (InterruptedException e1) {
+			} finally {
+				try {
+					System.gc();
+					System.runFinalization();
+					project.delete(true, true, null);
+				} catch (CoreException e2) {
+					assertTrue(false);
+				}
+			}
+		}
+	}
+	
+	public void testProjectCreation() throws BuildException {
+		// Create new project
+		IProject project = null;
+		try {
+			project = createProject(projectName);
+			// Now associate the builder with the project
+			ManagedBuildTestHelper.addManagedBuildNature(project);
+			IProjectDescription description = project.getDescription();
+			// Make sure it has a managed nature
+			if (description != null) {
+				assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+			}
+
+		} catch (CoreException e) {
+			fail("Test failed on project creation: " + e.getLocalizedMessage());
+		}
+	
+		// Find the base project type definition
+		IProjectType[] projTypes = ManagedBuildManager.getDefinedProjectTypes();
+		IProjectType projType = ManagedBuildManager.getProjectType("cdt.managedbuild.target.testgnu21.exe");
+		assertNotNull(projType);
+		
+		// Create the managed-project (.cdtbuild) for our project that builds a dummy executable
+		IManagedProject newProject = ManagedBuildManager.createManagedProject(project, projType);
+		assertEquals(newProject.getName(), projType.getName());
+		assertFalse(newProject.equals(projType));
+		ManagedBuildManager.setNewProjectVersion(project);
+		
+		// Copy over the configs
+		IConfiguration defaultConfig = null;
+		IConfiguration[] configs = projType.getConfigurations();
+		for (int i = 0; i < configs.length; ++i) {
+			// Make the first configuration the default 
+			if (i == 0) {
+				defaultConfig = newProject.createConfiguration(configs[i], projType.getId() + "." + i);
+			} else {
+				newProject.createConfiguration(configs[i], projType.getId() + "." + i);
+			}
+		}
+		ManagedBuildManager.setDefaultConfiguration(project, defaultConfig);
+
+		// Initialize the path entry container
+		IStatus initResult = ManagedBuildManager.initBuildInfoContainer(project);
+		if (initResult.getCode() != IStatus.OK) {
+			fail("Initializing build information failed for: " + project.getName() + " because: " + initResult.getMessage());
+		}
+		
+		// Now test the results out
+	//	checkRootManagedProject(newProject, "x");
+		
+		// Override the "String Option in Category" option value
+		configs = newProject.getConfigurations();
+		ITool[] tools = configs[0].getTools();
+		IOptionCategory topCategory = tools[0].getTopOptionCategory();
+		IOptionCategory[] categories = topCategory.getChildCategories();
+		Object[][] options = categories[0].getOptions(configs[0]);
+		ITool tool = (ITool)options[0][0];
+		IOption option = (IOption)options[0][1];
+		configs[0].setOption(tool, option, "1");
+		options = categories[0].getOptions((IConfiguration)null);
+		tool = (ITool)options[0][0];
+		option = (IOption)options[0][1];
+		assertEquals("x", option.getStringValue());
+		options = categories[0].getOptions(configs[0]);
+		tool = (ITool)options[0][0];
+		option = (IOption)options[0][1];
+		assertEquals("z", option.getStringValue());
+		
+		// Save, close, reopen and test again
+		ManagedBuildManager.saveBuildInfo(project, true);
+		ManagedBuildManager.removeBuildInfo(project);
+		try {
+			project.close(null);
+		} catch (CoreException e) {
+			fail("Failed on project close: " + e.getLocalizedMessage());
+		}
+		try {
+			project.open(null);
+		} catch (CoreException e) {
+			fail("Failed on project open: " + e.getLocalizedMessage());
+		}
+		
+		// Test that the default config was remembered
+		IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+		assertEquals(defaultConfig.getId(), info.getDefaultConfiguration().getId());
+
+		// Check the rest of the default information
+//		checkRootManagedProject(newProject, "z");
+		
+		// Now test the information the makefile builder needs
+	//	checkBuildTestSettings(info);
+		ManagedBuildManager.removeBuildInfo(project);
+	}
+	
+	public void testResourceRename() throws Exception {
+		// Create a new project
+		IProject project = null;
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		
+		try {
+			project = createProject(projectName);
+			
+			// Now associate the builder with the project
+			ManagedBuildTestHelper.addManagedBuildNature(project);
+			IProjectDescription description = project.getDescription();
+			// Make sure it has a managed nature
+			if (description != null) {
+				assertTrue(description.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+			}
+
+		} catch (CoreException e) {
+			fail("Test failed on project creation: " + e.getLocalizedMessage());
+		}
+	
+		// Find the base project type definition
+		IProjectType[] projTypes = ManagedBuildManager.getDefinedProjectTypes();
+		IProjectType projType = ManagedBuildManager.getProjectType("cdt.managedbuild.target.testgnu21.exe");
+		assertNotNull(projType);
+		
+		// Create the managed-project (.cdtbuild) for our project that builds an executable.
+		IManagedProject newProject = ManagedBuildManager.createManagedProject(project, projType);
+		assertEquals(newProject.getName(), projType.getName());
+		assertFalse(newProject.equals(projType));
+		ManagedBuildManager.setNewProjectVersion(project);
+			
+		// Create a couple of resources ( 'main.c' & 'bar.c')
+		IFile mainFile = project.getProject().getFile( "main.c" );
+		if( !mainFile.exists() ){
+			mainFile.create( new ByteArrayInputStream( "#include <stdio.h>\n extern void bar(); \n int main() { \nprintf(\"Hello, World!!\"); \n bar();\n return 0; }".getBytes() ), false, null );
+		}
+		
+		IFile aFile = project.getProject().getFile( "a.c" );
+		if( !aFile.exists() ){
+			aFile.create( new ByteArrayInputStream( "#include <stdio.h>\n void bar() { \nprintf(\"Hello, bar()!!\");\n return; }".getBytes() ), false, null );
+		}
+
+		IFolder dirFolder = project.getProject().getFolder( "dir" );
+		if(!dirFolder.exists())
+			dirFolder.create(true,true,null);
+		IFile bFile = dirFolder.getFile( "b.c" );
+		if( !bFile.exists() ){
+			bFile.create( new ByteArrayInputStream( "#include <stdio.h>\n void bar1() { \nprintf(\"Hello, bar1()!!\");\n return; }".getBytes() ), false, null );
+		}
+
+		// Get the configurations and make one of them as default configuration.
+		IConfiguration defaultConfig = null;
+		IConfiguration[] configs = projType.getConfigurations();
+		for (int i = 0; i < configs.length; ++i) {
+			// Make the first configuration the default 
+			if (i == 0) {
+				defaultConfig = newProject.createConfiguration(configs[i], projType.getId() + "." + i);
+			} else {
+				newProject.createConfiguration(configs[i], projType.getId() + "." + i);
+			}
+		}
+		ManagedBuildManager.setDefaultConfiguration(project, defaultConfig);
+
+		// Create Resource Configurations for files main.c and bar.c
+		IResourceConfiguration resMainConfig = defaultConfig.createResourceConfiguration(mainFile);
+		IResourceConfiguration resAConfig = defaultConfig.createResourceConfiguration(aFile);
+		IResourceConfiguration resBConfig = defaultConfig.createResourceConfiguration(bFile);
+		
+		// Check whether defaultConfig has three resource configurations or not.
+		IResourceConfiguration resConfigs[] = defaultConfig.getResourceConfigurations();
+		assertEquals(resMainConfig,defaultConfig.getResourceConfiguration(mainFile.getFullPath().toString()));
+		assertEquals(resAConfig,defaultConfig.getResourceConfiguration(aFile.getFullPath().toString()));
+		assertEquals(resBConfig,defaultConfig.getResourceConfiguration(bFile.getFullPath().toString()));
+		assertEquals(3,resConfigs.length);
+
+		
+		mainFile.move(mainFile.getFullPath().removeLastSegments(1).append("main1.c"),true,false,null);
+		mainFile = (IFile)project.findMember("main1.c");
+		assertEquals(resMainConfig,defaultConfig.getResourceConfiguration(mainFile.getFullPath().toString()));
+		assertEquals(resAConfig,defaultConfig.getResourceConfiguration(aFile.getFullPath().toString()));
+		assertEquals(resBConfig,defaultConfig.getResourceConfiguration(bFile.getFullPath().toString()));
+		resConfigs = defaultConfig.getResourceConfigurations();
+		assertEquals(3,resConfigs.length);
+
+		dirFolder.move(dirFolder.getFullPath().removeLastSegments(1).append("dir1"),true,false,null);
+		dirFolder = (IFolder)project.findMember("dir1");
+		bFile = (IFile)dirFolder.findMember("b.c");
+		assertEquals(resMainConfig,defaultConfig.getResourceConfiguration(mainFile.getFullPath().toString()));
+		assertEquals(resAConfig,defaultConfig.getResourceConfiguration(aFile.getFullPath().toString()));
+		assertEquals(resBConfig,defaultConfig.getResourceConfiguration(bFile.getFullPath().toString()));
+		resConfigs = defaultConfig.getResourceConfigurations();
+		assertEquals(3,resConfigs.length);
+
+		bFile.move(bFile.getFullPath().removeLastSegments(1).append("b1.c"),true,false,null);
+		bFile = (IFile)dirFolder.findMember("b1.c");
+		assertEquals(resMainConfig,defaultConfig.getResourceConfiguration(mainFile.getFullPath().toString()));
+		assertEquals(resAConfig,defaultConfig.getResourceConfiguration(aFile.getFullPath().toString()));
+		assertEquals(resBConfig,defaultConfig.getResourceConfiguration(bFile.getFullPath().toString()));
+		resConfigs = defaultConfig.getResourceConfigurations();
+		assertEquals(3,resConfigs.length);
+
+		IProjectDescription des = project.getDescription();
+		des.setName(renamedProjectName1);
+		project.move(des,true,null);
+		project = (IProject)root.findMember(renamedProjectName1);
+		mainFile = (IFile)project.findMember("main1.c");
+		aFile = (IFile)project.findMember("a.c");
+		dirFolder = (IFolder)project.findMember("dir1");
+		bFile = (IFile)dirFolder.findMember("b1.c");
+		assertEquals(resMainConfig,defaultConfig.getResourceConfiguration(mainFile.getFullPath().toString()));
+		assertEquals(resAConfig,defaultConfig.getResourceConfiguration(aFile.getFullPath().toString()));
+		assertEquals(resBConfig,defaultConfig.getResourceConfiguration(bFile.getFullPath().toString()));
+		resConfigs = defaultConfig.getResourceConfigurations();
+		assertEquals(3,resConfigs.length);
+		
+		final IResource rcBuf[] = new IResource[5]; 
+		rcBuf[0] = project;
+		rcBuf[1] = mainFile;
+		rcBuf[2] = aFile;
+		rcBuf[3] = dirFolder;
+		rcBuf[4] = bFile;
+
+		ResourcesPlugin.getWorkspace().run( new IWorkspaceRunnable(){
+
+			public void run(IProgressMonitor monitor) throws CoreException {
+				IProject project = (IProject)rcBuf[0];
+				IFile mainFile = (IFile)rcBuf[1];
+				IFile aFile = (IFile)rcBuf[2];
+				IFolder dirFolder = (IFolder)rcBuf[3];
+				IFile bFile = (IFile)rcBuf[4];
+				// TODO Auto-generated method stub
+				mainFile.move(mainFile.getFullPath().removeLastSegments(1).append("main2.c"),true,false,null);
+				mainFile = (IFile)project.findMember("main2.c");
+
+				dirFolder.move(dirFolder.getFullPath().removeLastSegments(1).append("dir2"),true,false,null);
+				dirFolder = (IFolder)project.findMember("dir2");
+				bFile = (IFile)dirFolder.findMember("b1.c");
+
+				bFile.move(bFile.getFullPath().removeLastSegments(1).append("b2.c"),true,false,null);
+				bFile = (IFile)dirFolder.findMember("b2.c");
+
+//				project.move(project.getFullPath().removeLastSegments(1).append(renamedProjectName2),true,null);
+				IProjectDescription des = project.getDescription();
+				des.setName(renamedProjectName2);
+				project.move(des,true,null);
+				project = (IProject)ResourcesPlugin.getWorkspace().getRoot().findMember(renamedProjectName2);
+
+				mainFile = (IFile)project.findMember("main2.c");
+				aFile = (IFile)project.findMember("a.c");
+				dirFolder = (IFolder)project.findMember("dir2");
+				bFile = (IFile)dirFolder.findMember("b2.c");
+				
+				rcBuf[0] = project;
+				rcBuf[1] = mainFile;
+				rcBuf[2] = aFile;
+				rcBuf[3] = dirFolder;
+				rcBuf[4] = bFile;
+			}
+			
+			}, 
+			root,
+			IWorkspace.AVOID_UPDATE,
+			null);
+		
+		project = (IProject)rcBuf[0];
+		mainFile = (IFile)rcBuf[1];
+		aFile = (IFile)rcBuf[2];
+		dirFolder = (IFolder)rcBuf[3];
+		bFile = (IFile)rcBuf[4];
+
+		assertEquals(resMainConfig,defaultConfig.getResourceConfiguration(mainFile.getFullPath().toString()));
+		assertEquals(resAConfig,defaultConfig.getResourceConfiguration(aFile.getFullPath().toString()));
+		assertEquals(resBConfig,defaultConfig.getResourceConfiguration(bFile.getFullPath().toString()));
+		resConfigs = defaultConfig.getResourceConfigurations();
+		assertEquals(3,resConfigs.length);
+		
+		aFile.delete(true,null);
+		// Check whether defaultConfig has two resource configurations or not.
+		assertEquals(resMainConfig,defaultConfig.getResourceConfiguration(mainFile.getFullPath().toString()));
+		assertEquals(null,defaultConfig.getResourceConfiguration(aFile.getFullPath().toString()));
+		assertEquals(resBConfig,defaultConfig.getResourceConfiguration(bFile.getFullPath().toString()));
+		resConfigs = defaultConfig.getResourceConfigurations();
+		assertEquals(2,resConfigs.length);
+		
+		dirFolder.delete(true, null);
+		// Check whether defaultConfig has one resource configuration or not.
+		assertEquals(resMainConfig,defaultConfig.getResourceConfiguration(mainFile.getFullPath().toString()));
+		assertEquals(null,defaultConfig.getResourceConfiguration(aFile.getFullPath().toString()));
+		assertEquals(null,defaultConfig.getResourceConfiguration(bFile.getFullPath().toString()));
+		resConfigs = defaultConfig.getResourceConfigurations();
+		assertEquals(1,resConfigs.length);
+
+		// Close and remove project.
+		project.close(null);
+		removeProject(renamedProjectName2);
+	}
+	
+}	
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java
new file mode 100644
index 0000000..cfea1dc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineGenerator;
+import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+
+/**
+ *  Test command line generator
+ */
+public class Test30_2_CommandLineGenerator implements
+		IManagedCommandLineGenerator {
+
+	public final String AT = "@";	//$NON-NLS-1$
+	public final String COLON = ":";	//$NON-NLS-1$
+	public final String DOT = ".";	//$NON-NLS-1$
+	public final String ECHO = "echo";	//$NON-NLS-1$
+	public final String IN_MACRO = "$<";	//$NON-NLS-1$
+	public final String LINEBREAK = "\\\n";	//$NON-NLS-1$
+	public final String NEWLINE = System.getProperty("line.separator");	//$NON-NLS-1$
+	public final String OUT_MACRO = "$@";	//$NON-NLS-1$
+	public final String SEPARATOR = "/";	//$NON-NLS-1$
+	public final String SINGLE_QUOTE = "'";	//$NON-NLS-1$
+	public final String TAB = "\t";	//$NON-NLS-1$
+	public final String WHITESPACE = " ";	//$NON-NLS-1$
+	public final String WILDCARD = "%";	//$NON-NLS-1$
+	public final String UNDERLINE = "_"; //$NON-NLS-1$
+	
+	public final String VAR_FIRST_CHAR = "$"; //$NON-NLS-1$
+	public final char VAR_SECOND_CHAR = '{'; //$NON-NLS-1$
+	public final String VAR_FINAL_CHAR = "}"; //$NON-NLS-1$
+	public final String CLASS_PROPERTY_PREFIX = "get"; //$NON-NLS-1$
+	
+	public final String CMD_LINE_PRM_NAME = "COMMAND"; //$NON-NLS-1$
+	public final String FLAGS_PRM_NAME = "FLAGS"; //$NON-NLS-1$
+	public final String OUTPUT_FLAG_PRM_NAME = "OUTPUT_FLAG"; //$NON-NLS-1$
+	public final String OUTPUT_PREFIX_PRM_NAME = "OUTPUT_PREFIX"; //$NON-NLS-1$
+	public final String OUTPUT_PRM_NAME = "OUTPUT"; //$NON-NLS-1$
+	public final String INPUTS_PRM_NAME = "INPUTS"; //$NON-NLS-1$
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedCommandLineGenerator#generateCommandLineInfo(org.eclipse.cdt.managedbuilder.core.ITool, java.lang.String, java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String[], java.lang.String)
+	 */
+	public IManagedCommandLineInfo generateCommandLineInfo(ITool tool,
+			String commandName, String[] flags, String outputFlag,
+			String outputPrefix, String outputName, String[] inputResources,
+			String commandLinePattern) {
+		ManagedBuildCommandLineInfo info = new ManagedBuildCommandLineInfo();
+		//  We are only going to change the "flags" to remove the "test30_2.tar-list.filename" option
+		info.commandName = new String(commandName);
+		info.commandOutputFlag = new String(outputFlag);
+		info.commandOutputPrefix = new String(outputPrefix);
+		info.commandOutput = new String(outputName);
+		info.commandLinePattern = new String(commandLinePattern);
+		info.commandInputs = new String();
+		for (int i = 0; i < inputResources.length; i++) {
+			if (i > 0) info.commandInputs += " ";
+			info.commandInputs += inputResources[i];
+		}
+		info.commandFlags = new String();
+		IOption opt = tool.getOptionBySuperClassId("test30_2.tar-list.filename");
+		String optVal = "";
+		try {
+			optVal = opt.getStringValue();
+		} catch (Exception e) {}
+		for (int i = 0; i < flags.length; i++) {
+			if (!(flags[i].equals(optVal))) {
+				if (i > 0) info.commandFlags += " ";
+				info.commandFlags += flags[i];
+			}
+		}
+		//  Generate the command line
+		int start =  0;
+		int stop = 0;
+		StringBuffer sb = new StringBuffer();
+		while( (start = commandLinePattern.indexOf( VAR_FIRST_CHAR, start )) >= 0 ) {
+			if( commandLinePattern.charAt( start + 1 ) != VAR_SECOND_CHAR  ) {
+				sb.append(VAR_FIRST_CHAR);
+				start++;
+				continue;
+			}
+			if( start > stop ) {
+				sb.append( commandLinePattern.substring(stop, start) );
+			}
+			stop = commandLinePattern.indexOf( VAR_FINAL_CHAR, start + 1 );
+			if( stop > 0 && stop <= commandLinePattern.length() ) try {
+				String varName = commandLinePattern.substring( start+2, stop ).trim();
+				if( varName.compareToIgnoreCase( CMD_LINE_PRM_NAME ) == 0 ) sb.append( info.commandName.trim() );
+				else if( varName.compareToIgnoreCase( FLAGS_PRM_NAME ) == 0 ) sb.append( info.commandFlags );
+				else if( varName.compareToIgnoreCase( OUTPUT_FLAG_PRM_NAME ) == 0 ) sb.append( info.commandOutputFlag.trim() );
+				else if( varName.compareToIgnoreCase( OUTPUT_PREFIX_PRM_NAME ) == 0 ) sb.append( info.commandOutputPrefix.trim() );
+				else if( varName.compareToIgnoreCase( OUTPUT_PRM_NAME ) == 0 ) sb.append( info.commandOutput.trim() );
+				else if( varName.compareToIgnoreCase( INPUTS_PRM_NAME ) == 0 ) sb.append( info.commandInputs );
+				else sb.append( VAR_FIRST_CHAR + VAR_SECOND_CHAR + varName + VAR_FINAL_CHAR );
+			} catch( Exception ex ) {
+				// 	do nothing for a while
+			}
+			start = ++stop;
+		}
+		info.commandLine = sb.toString();
+		return info;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestConfigElement.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestConfigElement.java
new file mode 100644
index 0000000..9d38aec
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestConfigElement.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 TimeSys Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * TimeSys Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.cdt.managedbuilder.core.IManagedConfigElement;
+import org.eclipse.core.runtime.IExtension;
+
+public class TestConfigElement implements IManagedConfigElement {
+	
+	private String name;
+	private Map attributeMap;
+	private IManagedConfigElement[] children;
+	
+	public TestConfigElement(String name, String[][] attributes, 
+			IManagedConfigElement[] children) {
+		this.name = name;
+		this.children = children;
+		this.attributeMap = new TreeMap();
+		for (int i = 0; i < attributes.length; i++) {
+			attributeMap.put(attributes[i][0], attributes[i][1]);
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedConfigElement#getName()
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedConfigElement#getAttribute(java.lang.String)
+	 */
+	public String getAttribute(String name) {
+		return (String)attributeMap.get(name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedConfigElement#getChildren()
+	 */
+	public IManagedConfigElement[] getChildren() {
+		return children;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedConfigElement#getChildren(java.lang.String)
+	 */
+	public IManagedConfigElement[] getChildren(String elementName) {
+		List ret = new ArrayList(children.length);
+		for (int i = 0; i < children.length; i++) {
+			if (children[i].getName().equals(elementName)) {
+				ret.add(children[i]);
+			}
+		}
+		return (IManagedConfigElement[])ret.toArray(new IManagedConfigElement[ret.size()]);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedConfigElement#getExtension(java.lang.String)
+	 */
+	public IExtension getExtension() {
+		return null;
+	}		
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestConfigurationNameProvider.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestConfigurationNameProvider.java
new file mode 100644
index 0000000..3fbd1e6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestConfigurationNameProvider.java
@@ -0,0 +1,66 @@
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IConfigurationNameProvider;
+import org.eclipse.core.runtime.Platform;
+
+
+public class TestConfigurationNameProvider implements
+		IConfigurationNameProvider {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.cdt.managedbuilder.core.IConfigurationNameProvider#getNewConfigurationName(org.eclipse.cdt.managedbuilder.core.IConfiguration,
+	 *      java.lang.String[]) This function will generate a unique
+	 *      configuration name based on used names, current OS and current
+	 *      Architecture.
+	 * 
+	 */
+	private static int configNumber = 0;
+
+	public String getNewConfigurationName(IConfiguration configuration,
+			String[] usedConfigurationNames) {
+
+		String configName = configuration.getName();
+
+		// Get the current OS & architecture
+		String os = Platform.getOS();
+		String arch = Platform.getOSArch();
+
+		if (isArrayContains(usedConfigurationNames, configName) == false)
+			return configName;
+		else {
+			String[] supportedArchList = configuration.getToolChain()
+					.getArchList();
+			if (supportedArchList.length == 1) {
+				String newConfigName = configName + "_" + supportedArchList[0];
+				if (isArrayContains(usedConfigurationNames, newConfigName) == false) {
+					return newConfigName;
+				}
+			}
+
+			String[] supportedOsList = configuration.getToolChain().getOSList();
+			if (supportedOsList.length == 1) {
+				String newConfigName = configName + "_" + supportedOsList[0];
+				if (isArrayContains(usedConfigurationNames, newConfigName) == false) {
+					return newConfigName;
+				}
+			}
+			configNumber += 1;
+			return configName + "_" + configNumber;
+		}
+	}
+
+	private boolean isArrayContains(String[] usedNames, String name) {
+		if (usedNames != null) {
+			for (int i = 0; i < usedNames.length; i++) {
+				if ( ( usedNames[i] != null) && (usedNames[i].equals(name)) ) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestLinkerNameProvider.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestLinkerNameProvider.java
new file mode 100644
index 0000000..584e1ff
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestLinkerNameProvider.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import org.eclipse.cdt.managedbuilder.core.IManagedOutputNameProvider;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator;
+
+public class TestLinkerNameProvider implements IManagedOutputNameProvider {
+
+	public IPath[] getOutputNames(ITool tool, IPath[] primaryInputNames) {
+		IPath[] name = new IPath[1];
+		boolean isSO = false;
+		IOption optShared = tool.getOptionBySuperClassId("gnu.c.link.option30.shared");	//$NON-NLS-1$
+		if (optShared != null) {
+			try {
+				isSO = optShared.getBooleanValue();
+			} catch (Exception e) {}
+		}
+		if (isSO) {
+			String soName = "";	//$NON-NLS-1$
+			IOption optSOName = tool.getOptionBySuperClassId("gnu.c.link.option30.soname");	//$NON-NLS-1$
+			if (optSOName != null) {
+				try {
+					soName = optSOName.getStringValue();
+				} catch (Exception e) {}
+			}
+			if (soName != null && soName.length() > 0) {
+				name[0] = Path.fromOSString(soName);
+			} else {
+				name[0] = Path.fromOSString(primaryInputNames[0].removeFileExtension().addFileExtension("so").lastSegment());	//$NON-NLS-1$
+			}
+			return name;
+		} 
+		String fileName = "default";	//$NON-NLS-1$
+		if (primaryInputNames != null && primaryInputNames.length > 0) {
+			fileName = primaryInputNames[0].removeFileExtension().toString();
+			if (fileName.startsWith("$(") && fileName.endsWith(")")) {	//$NON-NLS-1$ //$NON-NLS-2$
+				fileName = fileName.substring(2,fileName.length()-1);
+			}
+		}
+		String[] exts = tool.getPrimaryOutputType().getOutputExtensions(tool);
+		if (exts != null && exts[0].length() > 0) {
+			fileName += IManagedBuilderMakefileGenerator.DOT + exts[0];
+		}
+		name[0] = Path.fromOSString(fileName);
+		name[0] = name[0].removeFirstSegments(name[0].segmentCount() - 1);
+		return name;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestMacro.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestMacro.java
new file mode 100644
index 0000000..b9191b2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestMacro.java
@@ -0,0 +1,237 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+
+ package org.eclipse.cdt.managedbuilder.core.tests;
+
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedIsToolChainSupported;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable;
+import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier;
+import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider;
+import org.eclipse.cdt.managedbuilder.envvar.IProjectEnvironmentVariableSupplier;
+import org.eclipse.cdt.managedbuilder.internal.envvar.BuildEnvVar;
+import org.eclipse.cdt.managedbuilder.internal.macros.BuildMacro;
+import org.eclipse.cdt.managedbuilder.macros.IBuildMacro;
+import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
+import org.eclipse.cdt.managedbuilder.macros.IConfigurationBuildMacroSupplier;
+import org.eclipse.cdt.managedbuilder.macros.IProjectBuildMacroSupplier;
+import org.eclipse.cdt.managedbuilder.macros.IReservedMacroNameSupplier;
+import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.PluginVersionIdentifier;
+
+/**
+ * 
+ *
+ */
+public class TestMacro implements 
+	IConfigurationBuildMacroSupplier, 
+	IProjectBuildMacroSupplier,
+	IReservedMacroNameSupplier,
+	IConfigurationEnvironmentVariableSupplier,
+	IProjectEnvironmentVariableSupplier,
+	IManagedIsToolChainSupported,
+	IManagedBuilderMakefileGenerator
+	{
+
+	public static boolean supported[] = {false, false, false, false, false};
+	public static IPath topBuildDir = null;
+	
+	public static String CFG_VAR = "CFG_PROVIDER_VAR"; //$NON-NLS-1$
+	public static String PRJ_VAR = "PRJ_PROVIDER_VAR"; //$NON-NLS-1$
+	
+//	IConfigurationBuildMacroSupplier
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.macros.IConfigurationBuildMacroSupplier#getMacro(java.lang.String, org.eclipse.cdt.managedbuilder.core.IConfiguration, org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider)
+	 */
+	public IBuildMacro getMacro(String macroName, IConfiguration configuration,
+			IBuildMacroProvider provider) {
+		ManagedBuildMacrosTests.functionCalled |= ManagedBuildMacrosTests.GET_ONE_CONFIG;
+		
+		IBuildMacro ms = null;
+		if (!(provider instanceof TestMacro)) {
+			ms = provider.getMacro(macroName, 
+					IBuildMacroProvider.CONTEXT_CONFIGURATION,
+					configuration, false);
+		}
+		return ms;
+	}
+
+	public IBuildMacro getMacro(String macroName, IManagedProject mproj,
+			IBuildMacroProvider provider) {
+		ManagedBuildMacrosTests.functionCalled |= ManagedBuildMacrosTests.GET_ONE_PROJECT;
+
+		IBuildMacro ms = null;
+		if (!(provider instanceof TestMacro)) {
+			ms = provider.getMacro(macroName, 
+					IBuildMacroProvider.CONTEXT_PROJECT,
+					mproj, false);
+		}
+		return ms;
+	}
+
+//	IProjectBuildMacroSupplier
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.macros.IConfigurationBuildMacroSupplier#getMacros(org.eclipse.cdt.managedbuilder.core.IConfiguration, org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider)
+	 */
+	public IBuildMacro[] getMacros(IConfiguration configuration,
+			IBuildMacroProvider provider) {
+		ManagedBuildMacrosTests.functionCalled |= ManagedBuildMacrosTests.GET_MANY_CONFIG;
+		IBuildMacro[] ms = null;
+		if (!(provider instanceof TestMacro)) {
+			ms = provider.getMacros(IBuildMacroProvider.CONTEXT_CONFIGURATION, configuration, false);
+			IBuildMacro[] newms = null;
+			if (ms != null && ms.length > 0) {
+				newms = new IBuildMacro[ms.length + 1];
+				System.arraycopy(ms, 0, newms, 0, ms.length);
+			} else {
+				newms = new BuildMacro[1];
+			}
+			newms[ms.length] = new BuildMacro("NEW_FOR_CFG", 1, "NewMacrosForConfigContext");  //$NON-NLS-1$ //$NON-NLS-2$
+			return newms;
+		}
+		return null;
+	}
+
+	/**
+	 * 
+	 */
+	public IBuildMacro[] getMacros(IManagedProject mproj,
+			IBuildMacroProvider provider) {
+		ManagedBuildMacrosTests.functionCalled |= ManagedBuildMacrosTests.GET_MANY_PROJECT;
+		IBuildMacro[] ms = null;
+		if (!(provider instanceof TestMacro)) {
+			ms = provider.getMacros(IBuildMacroProvider.CONTEXT_PROJECT, mproj, false);
+			IBuildMacro[] newms = null;
+			if (ms != null && ms.length > 0) {
+				newms = new IBuildMacro[ms.length + 1];
+				System.arraycopy(ms, 0, newms, 0, ms.length);
+			} else {
+				newms = new BuildMacro[1];
+			}
+			newms[newms.length - 1] = new BuildMacro("NEW_FOR_PRJ", 1, "NewMacrosForProjectContext");  //$NON-NLS-1$ //$NON-NLS-2$
+			return newms;
+		}
+		return null;
+	}
+
+//	IReservedMacroNameSupplier
+	
+	/**
+	 * 
+	 */
+	public boolean isReservedName(String macroName, IConfiguration configuration) {
+		ManagedBuildMacrosTests.functionCalled |= ManagedBuildMacrosTests.RESERVED_NAME;
+		if (macroName.equalsIgnoreCase("USERNAME")) return true;  //$NON-NLS-1$
+		return false;
+	}
+	
+//	IConfigurationEnvironmentVariableSupplier
+	
+	/**
+	 * 
+	 */
+	public IBuildEnvironmentVariable getVariable(String variableName, 
+			IConfiguration configuration,
+			IEnvironmentVariableProvider provider) {
+		if (CFG_VAR.equals(variableName)) {
+			return new BuildEnvVar(CFG_VAR, CFG_VAR + configuration.getName());
+		} else
+			return null;
+	}
+
+	/**
+	 * 
+	 */
+	public IBuildEnvironmentVariable[] getVariables (IConfiguration configuration,
+			IEnvironmentVariableProvider provider) {
+		IBuildEnvironmentVariable v = getVariable(CFG_VAR, configuration, provider);
+		if (v != null) {
+			IBuildEnvironmentVariable[] vs = new IBuildEnvironmentVariable[1];
+			vs[0] = v;
+			return(vs);
+		} else	
+			return null;
+	}
+	
+//	IProjectEnvironmentVariableSupplier
+	
+	/**
+	 * 
+	 */
+	public IBuildEnvironmentVariable getVariable(String variableName, 
+			IManagedProject project,
+			IEnvironmentVariableProvider provider) {
+		if (PRJ_VAR.equals(variableName)) {
+			return new BuildEnvVar(PRJ_VAR, PRJ_VAR + project.getName());
+		} else
+			return null;
+	}
+	
+	/**
+	 * 
+	 */
+	public IBuildEnvironmentVariable[] getVariables (IManagedProject project,
+			IEnvironmentVariableProvider provider) {
+		IBuildEnvironmentVariable v = getVariable(PRJ_VAR, project, provider);
+		if (v != null) {
+			IBuildEnvironmentVariable[] vs = new IBuildEnvironmentVariable[1];
+			vs[0] = v;
+			return(vs);
+		} else	
+			return null;
+	}
+
+	
+//	IManagedIsToolChainSupported
+	
+	/**
+	 * 
+	 */
+	public boolean isSupported(IToolChain toolChain, 
+			PluginVersionIdentifier version, 
+			String instance) {
+		if ("One".equals(toolChain.getParent().getName()))   return supported[0]; //$NON-NLS-1$
+		if ("Two".equals(toolChain.getParent().getName()))   return supported[1]; //$NON-NLS-1$
+		if ("Three".equals(toolChain.getParent().getName())) return supported[2]; //$NON-NLS-1$
+		if ("Four".equals(toolChain.getParent().getName()))  return supported[3]; //$NON-NLS-1$
+		return false;
+	}
+
+	
+//	IManagedBuilderMakefileGenerator
+	
+	/**
+	 */
+	public IPath getBuildWorkingDir() {
+//		System.out.println("---- getBuildWorkingDir: " + topBuildDir); 
+		return topBuildDir; 
+		}
+	public void generateDependencies() {}
+	public MultiStatus generateMakefiles(IResourceDelta delta) { return null; }
+	public String getMakefileName() {return "test_instead_make"; } //$NON-NLS-1$
+	public void initialize(IProject project, IManagedBuildInfo info, IProgressMonitor monitor) {
+//		System.out.println("---- init: " + topBuildDir); 
+	}
+	public boolean isGeneratedResource(IResource resource) { return false; }
+	public void regenerateDependencies(boolean force) {}
+	public MultiStatus regenerateMakefiles() { return null; }
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestManagedConfigProvider.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestManagedConfigProvider.java
new file mode 100644
index 0000000..d40a587
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestManagedConfigProvider.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2005 TimeSys Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * TimeSys Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+import org.eclipse.cdt.managedbuilder.core.IConfigurationV2;
+import org.eclipse.cdt.managedbuilder.core.IManagedConfigElement;
+import org.eclipse.cdt.managedbuilder.core.IManagedConfigElementProvider;
+import org.eclipse.cdt.managedbuilder.core.ITarget;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+
+public class TestManagedConfigProvider implements IManagedConfigElementProvider {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedConfigProvider#getConfigElements()
+	 */
+	public IManagedConfigElement[] getConfigElements() {
+		try {
+			Properties props = new Properties();
+			props.load(getClass().getResourceAsStream("test_commands"));
+			IManagedConfigElement[] ret = new IManagedConfigElement[props.size()];
+			Iterator it = props.keySet().iterator();
+			int i = 0;
+			while (it.hasNext()) {
+				String targetId = (String)it.next();
+				String command = props.getProperty(targetId);
+				ret[i++] = createTarget(targetId, command);
+			}
+			return ret;
+		} catch (Exception ex) {
+			ex.printStackTrace();
+		}
+		return new IManagedConfigElement[0];
+	}
+
+	private IManagedConfigElement createTarget(String targetId, String command) {
+		IManagedConfigElement toolRef = new TestConfigElement(
+			IConfigurationV2.TOOLREF_ELEMENT_NAME, 
+			new String[][] {
+					{ITool.ID, "test.forward.tool"},
+					{ITool.COMMAND, command}},
+			new IManagedConfigElement[0]);
+
+		IManagedConfigElement config = new TestConfigElement(
+				IConfigurationV2.CONFIGURATION_ELEMENT_NAME, 
+				new String[][] {
+						{IConfigurationV2.ID, targetId + ".config"},
+						{IConfigurationV2.NAME, "test.forward.config"}},
+				new IManagedConfigElement[] {toolRef});
+				
+		IManagedConfigElement target = new TestConfigElement(
+			ITarget.TARGET_ELEMENT_NAME,
+			new String[][] {
+					{ITarget.ID, targetId},
+					{ITarget.NAME, targetId.substring(targetId.lastIndexOf('.')+1).
+						replace('_', ' ')},
+					{ITarget.PARENT, "test.forward.parent.target"},
+					{ITarget.IS_TEST, "true"},
+					{ITarget.OS_LIST, "win32,linux,solaris"}},
+			new IManagedConfigElement[] {config});
+		
+		return target;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestPathConverter1.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestPathConverter1.java
new file mode 100644
index 0000000..e0887e5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestPathConverter1.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (C) 2006 Siemens AG.
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IOptionPathConverter;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * This minimalistic testing implementation does not actually change the path
+ * It just converts to an IPath object
+ * TestPathConverter1 is the converter which can be inherited from the toolchain
+ */
+public class TestPathConverter1 implements IOptionPathConverter {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IOptionPathConverter#convertToPlatformLocation(java.lang.String)
+	 */
+	public IPath convertToPlatformLocation(String toolSpecificPath, IOption option, ITool tool) {
+		Path path = new Path(toolSpecificPath);
+		return path ;
+	}
+
+}
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestPathConverter2.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestPathConverter2.java
new file mode 100644
index 0000000..58b2fe6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestPathConverter2.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (C) 2006 Siemens AG.
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+/**
+ * TestpathConverter2 can be inherited from the pathconvertertest.convertingtool
+ */
+public class TestPathConverter2 extends TestPathConverter1 {
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestPathConverter3.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestPathConverter3.java
new file mode 100644
index 0000000..ef20631
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestPathConverter3.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (C) 2006 Siemens AG.
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+/**
+ * TestPathConverter3 is set on toolchains in several configurations
+ */
+public class TestPathConverter3 extends TestPathConverter1 {
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestPathConverter4.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestPathConverter4.java
new file mode 100644
index 0000000..3c4d16f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestPathConverter4.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (C) 2006 Siemens AG.
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * This path converter will be used to test that a conversion actually takes place.
+ * It is referenced from the tool pathconvertertest.config.tcyy.toyy.toolchain.tool
+ * in the test projecttype.<br>
+ * The tool pathconvertertest.config.tcyy.toyy.toolchain.tool inherits a path option
+ * from the pathconvertertest.convertingtool tool. The include path option has the 
+ * intentionally strange value file:///usr/local/include. 
+ * The "file://" part gets stripped away to satisfy the test.
+ */
+public class TestPathConverter4 extends TestPathConverter1 {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.tests.TestPathConverter1#convertToPlatformLocation(java.lang.String)
+	 */
+	public IPath convertToPlatformLocation(String toolSpecificPath, IOption option, ITool tool) {
+		String convertedString = toolSpecificPath.substring("file://".length());
+		IPath path = new Path(convertedString);
+		return path ;
+	}
+
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestProjectConverter.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestProjectConverter.java
new file mode 100644
index 0000000..1f3a06a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestProjectConverter.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IConvertManagedBuildObject;
+
+
+public class TestProjectConverter implements IConvertManagedBuildObject {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IConvertManagedBuildObject#convert(org.eclipse.cdt.managedbuilder.core.IBuildObject, java.lang.String, java.lang.String, boolean)
+	 */
+	public IBuildObject convert(IBuildObject buildObj, String fromId,
+			String toId, boolean isConfirmed) {
+		
+		String tmpDir = System.getProperty("java.io.tmpdir");	//$NON-NLS-1$
+		
+		File outputFile = new File(tmpDir + "/testProjectConverterOutput.txt");	//$NON-NLS-1$
+		try {
+			FileWriter out = new FileWriter(outputFile);			
+			out.write("The converter for the projectType testProject_1.0.0 is invoked");	//$NON-NLS-1$
+			out.close();
+		} catch (IOException e) {
+			System.out.println("Exception raised.");	//$NON-NLS-1$
+		}
+		return buildObj;
+	}
+}
+
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestValueHandler.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestValueHandler.java
new file mode 100644
index 0000000..b4fba86
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/TestValueHandler.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Symbian Ltd and others.
+ * 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
+ *
+ * Contributors:
+ * Symbian Ltd - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
+import org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.ManagedOptionValueHandler;
+
+public class TestValueHandler extends ManagedOptionValueHandler implements
+		IManagedOptionValueHandler {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler#handleValue(IConfiguration,IToolChain,IOption,String,int)
+	 */
+	public boolean handleValue(IBuildObject configuration, 
+                   IHoldsOptions holder, 
+                   IOption option,
+                   String extraArgument, int event)
+	{
+		// The event was not handled, thus return false
+		return false;
+	}	
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ToolChainModificationTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ToolChainModificationTests.java
new file mode 100644
index 0000000..6d028bc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ToolChainModificationTests.java
@@ -0,0 +1,372 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.core.tests;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
+import org.eclipse.cdt.core.settings.model.util.CDataUtil;
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IBuilder;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IFolderInfo;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.internal.core.FolderInfo;
+import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
+import org.eclipse.cdt.managedbuilder.tcmodification.IConfigurationModification;
+import org.eclipse.cdt.managedbuilder.tcmodification.IFolderInfoModification;
+import org.eclipse.cdt.managedbuilder.tcmodification.IModificationOperation;
+import org.eclipse.cdt.managedbuilder.tcmodification.IToolChainModificationManager;
+import org.eclipse.cdt.managedbuilder.tcmodification.IToolModification;
+import org.eclipse.cdt.managedbuilder.testplugin.BuildSystemTestHelper;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+public class ToolChainModificationTests extends BasicTestCase {
+	private static final String PROJ_NAME_PREFIX="TCM_";
+	
+	public static Test suite() {
+		TestSuite suite = new TestSuite(ToolChainModificationTests.class);
+		
+		return suite;
+	}
+
+	public void testRootToolChainStatus() throws Exception {
+		final String projName = PROJ_NAME_PREFIX + "p1"; 
+		IProject project = BuildSystemTestHelper.createProject(projName);
+		BuildSystemTestHelper.createDescription(project, "tcm.pt");
+		ICProjectDescriptionManager desMngr = CoreModel.getDefault().getProjectDescriptionManager();
+		
+		ICProjectDescription des = desMngr.getProjectDescription(project);
+		IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(des.getConfigurations()[0]);
+		IToolChainModificationManager mngr = ManagedBuildManager.getToolChainModificationManager();
+		
+		IConfigurationModification cfgM = (IConfigurationModification)mngr.createModification(cfg.getRootFolderInfo());
+		assertTrue(cfgM.isToolChainCompatible());
+		assertTrue(cfgM.isBuilderCompatible());
+		
+		IToolChain[] ctcs = cfgM.getCompatibleToolChains();
+		HashSet set = new HashSet();
+		FolderInfo foInfo = (FolderInfo)cfg.getRootFolderInfo();
+		ToolChain tc = (ToolChain)foInfo.getToolChain();
+		IToolChain[] allSys = ManagedBuildManager.getRealToolChains();
+		filterPropsSupported(foInfo, tc, allSys, set);
+		set.remove(ManagedBuildManager.getRealToolChain(tc));
+		IToolChain incompatibleTc = ManagedBuildManager.getExtensionToolChain("tcm.tc2");
+		incompatibleTc = ManagedBuildManager.getRealToolChain(incompatibleTc);
+		set.remove(incompatibleTc);
+		compare(Arrays.asList(ctcs), set);
+		
+		HashSet incomp = new HashSet(Arrays.asList(allSys));
+		incomp.removeAll(Arrays.asList(ctcs));
+		assertTrue(incomp.contains(incompatibleTc));
+		
+		IBuilder[] cbs = cfgM.getCompatibleBuilders();
+		Set bSet = new HashSet();
+		IBuilder[] allSysB = ManagedBuildManager.getRealBuilders();
+		filterPropsSupported(cfg, allSysB, bSet);
+		IBuilder incompatibleB = ManagedBuildManager.getExtensionBuilder("tcm.tc4.b1");
+		incompatibleB = ManagedBuildManager.getRealBuilder(incompatibleB);
+		bSet.remove(cfgM.getRealBuilder());
+		bSet.remove(incompatibleB);
+		compare(Arrays.asList(cbs), bSet);
+		
+		HashSet incompB = new HashSet(Arrays.asList(allSysB));
+		incompB.removeAll(Arrays.asList(cbs));
+		assertTrue(incompB.contains(incompatibleB));
+		
+		IToolChain tc3 = ManagedBuildManager.getExtensionToolChain("tcm.tc3");
+		cfgM.setToolChain(tc3);
+		assertEquals(tc3, cfgM.getToolChain());
+		assertEquals(tc3.getBuilder(), cfgM.getBuilder());
+		
+		IBuilder b5 = ManagedBuildManager.getExtensionBuilder("tcm.tc5.b1");
+		cfgM.setBuilder(b5);
+		assertEquals(tc3, cfgM.getToolChain());
+		assertEquals(b5, cfgM.getBuilder());
+
+		project.delete(true, null);
+	}
+	
+	private boolean contains(Object[] array, Object obj){
+		return new HashSet(Arrays.asList(array)).contains(obj);
+	}
+	
+	private HashSet filterSupportedToolChains(IFolderInfo foInfo, IToolChain tc){
+		HashSet set = new HashSet();
+		IToolChain[] allSys = ManagedBuildManager.getRealToolChains();
+		filterPropsSupported((FolderInfo)foInfo, (ToolChain)tc, allSys, set);
+		set.remove(ManagedBuildManager.getRealToolChain(tc));
+		return set;
+	}
+	
+	public void testChildToolChainStatus() throws Exception {
+		final String projName = PROJ_NAME_PREFIX + "p2"; 
+		IProject project = BuildSystemTestHelper.createProject(projName);
+		BuildSystemTestHelper.createDescription(project, "tcm.pt2");
+		ICProjectDescriptionManager desMngr = CoreModel.getDefault().getProjectDescriptionManager();
+		
+		ICProjectDescription des = desMngr.getProjectDescription(project);
+		IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(des.getConfigurations()[0]);
+		IToolChainModificationManager mngr = ManagedBuildManager.getToolChainModificationManager();
+		
+		IConfigurationModification cfgM = (IConfigurationModification)mngr.createModification(cfg.getRootFolderInfo());
+		assertEquals(cfgM.getToolChain(), cfg.getToolChain());
+		assertTrue(cfgM.isToolChainCompatible());
+		assertTrue(cfgM.isBuilderCompatible());
+		
+		IPath foPath = new Path("a");
+		IFolder fo = project.getFolder(foPath);
+		fo.create(true, true, null);
+		
+		IFolderInfo foInfo = cfg.createFolderInfo(foPath);
+		IFolderInfoModification foM = mngr.createModification(foInfo);
+		assertEquals(foM.getToolChain(), foInfo.getToolChain());
+		assertTrue(foM.isToolChainCompatible());
+
+		cfgM = (IConfigurationModification)mngr.createModification(cfg.getRootFolderInfo());
+		assertEquals(cfgM.getToolChain(), cfg.getToolChain());
+		assertTrue(cfgM.isToolChainCompatible());
+		assertTrue(cfgM.isBuilderCompatible());
+
+		HashSet set = filterSupportedToolChains(cfg.getRootFolderInfo(), cfg.getToolChain());
+		IToolChain[] tcs = cfgM.getCompatibleToolChains();
+		compare(Arrays.asList(tcs), set);
+
+		tcs = foM.getCompatibleToolChains();
+		set = filterSupportedToolChains(foInfo, foInfo.getToolChain());
+		IToolChain incompatibleTc = ManagedBuildManager.getExtensionToolChain("tcm.tc3");
+		incompatibleTc = ManagedBuildManager.getRealToolChain(incompatibleTc);
+		set.remove(incompatibleTc);
+		compare(Arrays.asList(tcs), set);
+
+		foM.setToolChain(incompatibleTc);
+		assertFalse(foM.isToolChainCompatible());
+		foInfo.changeToolChain(incompatibleTc, CDataUtil.genId("blah.blah"), incompatibleTc.getName());
+		cfgM = (IConfigurationModification)mngr.createModification(cfg.getRootFolderInfo());
+		assertTrue(cfgM.isToolChainCompatible());
+		foM = mngr.createModification(foInfo);
+		assertFalse(foM.isToolChainCompatible());
+		
+		project.delete(true, null);
+	}
+	
+	public void testChildToolChainStatus2() throws Exception {
+		final String projName = PROJ_NAME_PREFIX + "p3"; 
+		IProject project = BuildSystemTestHelper.createProject(projName);
+		BuildSystemTestHelper.createDescription(project, "tcm.pt.derive1");
+		ICProjectDescriptionManager desMngr = CoreModel.getDefault().getProjectDescriptionManager();
+		
+		ICProjectDescription des = desMngr.getProjectDescription(project);
+		IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(des.getConfigurations()[0]);
+		IToolChainModificationManager mngr = ManagedBuildManager.getToolChainModificationManager();
+		
+		IConfigurationModification cfgM = (IConfigurationModification)mngr.createModification(cfg.getRootFolderInfo());
+		assertEquals(cfgM.getToolChain(), cfg.getToolChain());
+		assertTrue(cfgM.isToolChainCompatible());
+		assertTrue(cfgM.isBuilderCompatible());
+		
+		IPath foPath = new Path("a");
+		IFolder fo = project.getFolder(foPath);
+		fo.create(true, true, null);
+		
+		IFolderInfo foInfo = cfg.createFolderInfo(foPath);
+		IFolderInfoModification foM = mngr.createModification(foInfo);
+		assertEquals(foM.getToolChain(), foInfo.getToolChain());
+		assertTrue(foM.isToolChainCompatible());
+
+		cfgM = (IConfigurationModification)mngr.createModification(cfg.getRootFolderInfo());
+		assertEquals(cfgM.getToolChain(), cfg.getToolChain());
+		assertTrue(cfgM.isToolChainCompatible());
+		assertTrue(cfgM.isBuilderCompatible());
+
+		HashSet set = filterSupportedToolChains(cfg.getRootFolderInfo(), cfg.getToolChain());
+		IToolChain[] tcs = cfgM.getCompatibleToolChains();
+		compare(Arrays.asList(tcs), set);
+
+		tcs = foM.getCompatibleToolChains();
+		set = filterSupportedToolChains(foInfo, foInfo.getToolChain());
+		rmToolChains(set, new String[]{
+				"tcm.base2.tc",
+				"tcm.derive2.tc1",
+				"tcm.derive2.tc2",
+				"tcm2.tc2",
+				"tcm2.tc",
+				"tcm2.tc.derive",
+				});
+		
+		compare(Arrays.asList(tcs), set);
+
+		foM.setToolChain(ManagedBuildManager.getExtensionToolChain("tcm.derive2.tc1"));
+		assertFalse(foM.isToolChainCompatible());
+		foInfo.changeToolChain(ManagedBuildManager.getExtensionToolChain("tcm.derive2.tc1"), CDataUtil.genId("blah.blah"), null);
+		cfgM = (IConfigurationModification)mngr.createModification(cfg.getRootFolderInfo());
+		assertTrue(cfgM.isToolChainCompatible());
+		foM = mngr.createModification(foInfo);
+		assertFalse(foM.isToolChainCompatible());
+		
+		project.delete(true, null);
+	}
+	
+	private void rmToolChains(Set set, String[] ids){
+		for(int i = 0; i < ids.length; i++){
+			IToolChain incompatibleTc = ManagedBuildManager.getExtensionToolChain(ids[i]);
+			assertNotNull("no tool-chain of id " + ids[i], incompatibleTc);
+			incompatibleTc = ManagedBuildManager.getRealToolChain(incompatibleTc);
+			assertTrue("set does not contain tc \"" + incompatibleTc.getId() 
+					+ "\" which is a real tc for \"" + ids[i] + "\"", set.remove(incompatibleTc));
+		}
+	}
+	
+	private IToolChain getRealToolChain(String id){
+		IToolChain tc = ManagedBuildManager.getExtensionToolChain(id);
+		return ManagedBuildManager.getRealToolChain(tc);
+	}
+
+	private void compare(Collection c1, Collection c2){
+		HashSet s1 = new HashSet(c1);
+		HashSet s1c = (HashSet)s1.clone();
+		
+		HashSet s2 = new HashSet(c2);
+
+		s1.removeAll(s2);
+		s2.removeAll(s1c);
+		StringBuffer buf = new StringBuffer();
+		buf.append("checking c1..\n");
+		boolean fail = checkEmpty(s1, buf);
+		buf.append("checking c2..\n");
+		fail |= checkEmpty(s2, buf);
+		
+		if(fail)
+			fail(buf.toString());
+	}
+	
+	private boolean checkEmpty(Collection c, StringBuffer buf){
+		if(c.size() != 0){
+			buf.append("non-empty dump:\n");
+			for(Iterator iter = c.iterator(); iter.hasNext(); ){
+				buf.append("\t ").append((((IBuildObject)iter.next()).getId())).append('\n');
+			}
+			buf.append("end\n");
+			return true; 
+		}
+		return false;
+	}
+	
+	private Collection filterPropsSupported(FolderInfo foInfo, ToolChain tc, IToolChain[] tcs, Collection c){
+		if(c == null)
+			c = new ArrayList(); 
+		for(int i = 0; i < tcs.length; i++){
+			if(foInfo.isToolChainCompatible(tc, tcs[i]))
+				c.add(tcs[i]);
+		}
+		
+		return c;
+	}
+	
+	private Collection filterPropsSupported(IConfiguration cfg, IBuilder[] bs, Collection c){
+		if(c == null)
+			c = new ArrayList(); 
+		for(int i = 0; i < bs.length; i++){
+			if(cfg.isBuilderCompatible(bs[i]))
+				c.add(bs[i]);
+		}
+		
+		return c;
+	}
+
+	private boolean getReplacementToolInfo(IModificationOperation[] ops, Set set){
+		boolean removable = false;
+		for(int i = 0; i < ops.length; i++){
+			ITool tool = ops[i].getReplacementTool();
+			if(tool == null){
+				removable = true;
+			} else {
+				set.add(tool);
+			}
+		}
+		return removable;
+	}
+	
+	public void testToolModificationWithChild() throws Exception {
+		final String projName = PROJ_NAME_PREFIX + "p4"; 
+		IProject project = BuildSystemTestHelper.createProject(projName);
+		BuildSystemTestHelper.createDescription(project, "tcm.pt");
+		
+		ICProjectDescriptionManager desMngr = CoreModel.getDefault().getProjectDescriptionManager();
+		
+		ICProjectDescription des = desMngr.getProjectDescription(project);
+		IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(des.getConfigurations()[0]);
+		IToolChain tc4 = ManagedBuildManager.getExtensionToolChain("tcm.tc4");
+		cfg.getRootFolderInfo().changeToolChain(tc4, CDataUtil.genId(null), null);
+		
+		IToolChainModificationManager mngr = ManagedBuildManager.getToolChainModificationManager();
+		
+		IConfigurationModification cfgM = (IConfigurationModification)mngr.createModification(cfg.getRootFolderInfo());
+		assertEquals(cfgM.getToolChain(), cfg.getToolChain());
+		assertTrue(cfgM.isToolChainCompatible());
+		assertTrue(cfgM.isBuilderCompatible());
+		
+		IPath foPath = new Path("a");
+		IFolder fo = project.getFolder(foPath);
+		fo.create(true, true, null);
+		
+		IFolderInfo foInfo = cfg.createFolderInfo(foPath);
+		IFolderInfoModification foM = mngr.createModification(foInfo);
+		assertEquals(foM.getToolChain(), foInfo.getToolChain());
+		assertTrue(foM.isToolChainCompatible());
+		
+		cfgM = (IConfigurationModification)mngr.createModification(cfg.getRootFolderInfo());
+		assertEquals(cfgM.getToolChain(), cfg.getToolChain());
+		assertTrue(cfgM.isToolChainCompatible());
+		assertTrue(cfgM.isBuilderCompatible());
+
+		ITool tool41 = ManagedBuildManager.getExtensionTool("tcm.tc4.t1");
+		IToolModification tm = cfgM.getToolModification(tool41);
+		assertTrue(tm.isProjectTool());
+		
+		IModificationOperation[] ops = tm.getSupportedOperations();
+		ITool tool31 = ManagedBuildManager.getExtensionTool("tcm.tc3.t1");
+		Set replacement = new HashSet();
+		boolean removable = getReplacementToolInfo(ops, replacement);
+		
+		assertFalse(removable);
+		assertTrue(replacement.contains(tool31));
+
+		tm = foM.getToolModification(tool41);
+		assertTrue(tm.isProjectTool());
+		
+		ops = tm.getSupportedOperations();
+		replacement = new HashSet();
+		removable = getReplacementToolInfo(ops, replacement);
+		
+		assertFalse(removable);
+		assertFalse(replacement.contains(tool31));
+
+		int tmp = IToolChainModificationManager.OBJECT_CONFIGURATION;
+		
+		project.delete(true, null);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/test_commands b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/test_commands
new file mode 100644
index 0000000..067d069
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/test_commands
@@ -0,0 +1,3 @@
+test.provider.Test_One=cmd1
+test.provider.Test_Two=cmd2
+test.provider.Test_Three=cmd
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/AllTemplateEngineTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/AllTemplateEngineTests.java
new file mode 100644
index 0000000..da6eb62
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/AllTemplateEngineTests.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007 2008 Symbian Software Limited and others.
+ * 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
+ *
+ * Contributors:
+ * Bala Torati (Symbian) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.templateengine.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * This is a TestSuite, the TestCases created to test Template engine are
+ * added to test-suite. The test suite will execute all the test cases added
+ * to the Suite.
+ * 
+ * @since 4.0
+ */
+public class AllTemplateEngineTests extends TestSuite{
+
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(AllTemplateEngineTests.suite());
+	}
+
+	/**
+	 * Since the TemplateEngine consists of UI(Wizard).
+	 * A TestWizard is created to which the dynamically generated
+	 * UIPages are added.  The Wizard is launched from here.
+	 * The TestCases created to test the TemplateEngine is initialized here.
+	 * @return
+	 * 
+	 * @since 4.0
+	 */
+	public static Test suite() {
+		TestSuite suite = new TestSuite("Template engine tests"); //$NON-NLS-1$
+		//$JUnit-BEGIN$
+
+		suite.addTestSuite(TestProcesses.class);
+
+		//$JUnit-END$
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TemplateEngineTestsHelper.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TemplateEngineTestsHelper.java
new file mode 100644
index 0000000..f9505ec
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TemplateEngineTestsHelper.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Limited and others.
+ * 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
+ *
+ * Contributors:
+ * Bala Torati (Symbian) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.templateengine.tests;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.templateengine.TemplateDescriptor;
+import org.eclipse.cdt.core.templateengine.TemplateEngine;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Bundle;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * 
+ * All supporting functions which are not part of Testing class.
+ * 
+ * @since 4.0
+*/
+
+public class TemplateEngineTestsHelper {
+	
+	public static final String LOGGER_FILE_NAME="TemplateEngineTests";	//$NON-NLS-1$
+	private static List projectTypes = new ArrayList();
+	private static List projectTypeNames = new ArrayList();
+	
+	/**
+	 * get the url of a xml template, by passing the xml file name.
+	 * @param templateName
+	 * @return URL
+	 */
+	public static URL getTemplateURL(String templateName){
+		Bundle bundle = Platform.getBundle("org.eclipse.cdt.managedbuilder.core.tests"); //$NON-NLS-1$
+		URL url = FileLocator.find(bundle, new Path("testdata/"+templateName), null); //$NON-NLS-1$
+		if ( url != null )
+		{ 
+			try {
+				url = FileLocator.toFileURL(url);
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+		}
+		return url;
+	}
+	
+	public static int getChildCount(TemplateDescriptor templateDescriptor, String propertyGroupID){
+		List list = templateDescriptor.getPropertyGroupList();
+		for (int i = 0, l = list.size(); i < l; i++) {
+			Element element = (Element) list.get(i);
+			NamedNodeMap attributes = element.getAttributes();
+			for (int j = 0, l1 = attributes.getLength(); j < l1; j++) {
+				String value = attributes.item(j).getNodeValue();
+				if (value.equals(propertyGroupID)) {
+					return TemplateEngine.getChildrenOfElement(element).size();
+				}
+			}
+		}
+		return 0;
+	}
+	
+	public static boolean failIfErrorStatus(IStatus[] statuses) {
+		for(int i=0; i<statuses.length; i++) {
+			IStatus status = statuses[i];
+			if (status.getCode() == IStatus.ERROR) {
+				TestCase.fail(status.getMessage());
+				return true;
+			}
+			IStatus[] children = status.getChildren();
+			if (children != null) {
+				if (failIfErrorStatus(children)) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+	
+	public static void turnOffAutoBuild() throws CoreException {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IWorkspaceDescription workspaceDesc = workspace.getDescription();
+		workspaceDesc.setAutoBuilding(false);
+		workspace.setDescription(workspaceDesc);
+	}
+	
+	public static List getProjectTypes() {
+		populateProjectTypes();
+		return projectTypes;
+	}
+
+	public static List getProjectTypeNames() {
+		populateProjectTypes();
+		return projectTypeNames;
+	}
+	
+	/* (non-Javadoc)
+	 * Collects all the valid project types for the platform Eclipse is running on
+	 * Note: This method is a copy of populateTypes() from org.eclipse.cdt.managedbuilder.ui.wizards.CProjectPlatformPage class.
+	 */
+	private static void populateProjectTypes() {
+		IProjectType[] allProjectTypes = ManagedBuildManager.getDefinedProjectTypes();
+		String os = Platform.getOS();
+		String arch = Platform.getOSArch();
+		
+		for (int index = 0; index < allProjectTypes.length; ++index) {
+			IProjectType type = allProjectTypes[index];
+			if (!type.isAbstract() && !type.isTestProjectType()) {
+				
+				if (!type.getConvertToId().equals("")) //$NON-NLS-1$
+					continue;
+				
+				if (type.isSupported()) {
+					IConfiguration[] configs = type.getConfigurations();
+					for (int j = 0; j < configs.length; ++j) {
+						IToolChain tc = configs[j].getToolChain();
+						List osList = Arrays.asList(tc.getOSList());
+						if (osList.contains("all") || osList.contains(os)) {	//$NON-NLS-1$
+							List archList = Arrays.asList(tc.getArchList());
+							if (archList.contains("all") || archList.contains(arch)) { //$NON-NLS-1$
+								projectTypes.add(type);
+								break;
+							}
+						}
+					}
+				}
+			}
+		}
+
+		for (Iterator iter = projectTypes.iterator(); iter.hasNext();) {
+			projectTypeNames.add(((IProjectType)iter.next()).getName());
+		}
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TestProcesses.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TestProcesses.java
new file mode 100644
index 0000000..c7370df
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TestProcesses.java
@@ -0,0 +1,360 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Limited and others.
+ * 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
+ *
+ * Contributors:
+ * Bala Torati (Symbian) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.templateengine.tests;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.templateengine.TemplateCore;
+import org.eclipse.cdt.core.templateengine.TemplateEngine;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+public class TestProcesses extends TestCase {	
+	private static final String workspaceLocation = ResourcesPlugin.getWorkspace().getRoot().getRawLocation().toOSString();
+	private static final String INCLUDE_FOLDER = "Include"; //$NON-NLS-1$
+	private static final String APPEND = "Append"; //$NON-NLS-1$
+	private static final String MBS_GNU_CPP_LINK_OPTION_ID = ".*gnu.cpp.link.option.*"; //$NON-NLS-1$
+	private static final String MBS_STRING_OPTION_VALUE = "MBSStringOption"; //$NON-NLS-1$
+	private static final String[] MBS_STRING_LIST_OPTION_VALUES = {"MBS", "String", "List", "Option"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+	private static final String RELEASE_CONFIG_ID = ".*release.*"; //$NON-NLS-1$
+	private static final String PROJECT_TYPE = "org.eclipse.cdt.managedbuilder.core.tests.projectType"; //$NON-NLS-1$
+
+	String projectName;
+	
+	protected void setUp() throws Exception {
+		TemplateEngineTestsHelper.turnOffAutoBuild();
+		projectName= "TemplateEngineTestsProject"+System.currentTimeMillis();
+	}
+	
+	protected void tearDown() throws Exception {
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+		project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+		if (project.exists()) {
+			try {
+				ManagedBuildTestHelper.delete(CoreModel.getDefault().create(project));
+			} catch(Exception e) {
+				e.printStackTrace();
+				fail(e.getMessage());
+			}
+		}
+	}
+
+	public void testCreateIncludeFolder() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*CreateIncludeFolder"); //$NON-NLS-1$
+		template.getTemplateInfo().setConfigurations(getConfigurations());
+
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", projectName); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("includeDir1", INCLUDE_FOLDER + 1); //$NON-NLS-1$
+		valueStore.put("includeDir2", INCLUDE_FOLDER + 2); //$NON-NLS-1$
+
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+		assertTrue(project.exists());
+		IFolder folder = project.getFolder(INCLUDE_FOLDER + 1);
+		assertTrue(folder.exists());
+		folder = project.getFolder(INCLUDE_FOLDER + 2);
+		assertTrue(folder.exists());
+	}
+
+	public void testNewManagedProject() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*NewManagedProject"); //$NON-NLS-1$
+		template.getTemplateInfo().setConfigurations(getConfigurations());
+
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", projectName); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+		assertTrue(project.exists());
+	}
+
+	public void testSetMBSBooleanOptionValue() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*SetMBSBooleanOptionValue"); //$NON-NLS-1$
+		template.getTemplateInfo().setConfigurations(getConfigurations());
+
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", projectName); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("id", MBS_GNU_CPP_LINK_OPTION_ID); //$NON-NLS-1$
+
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+		assertTrue(project.exists());
+		try {
+			assertSetMBSOptionValues(project, MBS_GNU_CPP_LINK_OPTION_ID, IOption.BOOLEAN, false);
+		} catch (BuildException e) {
+			fail(e.getMessage());
+		}
+
+	}
+
+	public void testSetMBSStringOptionValue() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*SetMBSStringOptionValue"); //$NON-NLS-1$
+		template.getTemplateInfo().setConfigurations(getConfigurations());
+
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", projectName); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("id", MBS_GNU_CPP_LINK_OPTION_ID); //$NON-NLS-1$
+		valueStore.put("StringValue", MBS_STRING_OPTION_VALUE); //$NON-NLS-1$
+
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+		assertTrue(project.exists());
+		try {
+			assertSetMBSOptionValues(project, MBS_GNU_CPP_LINK_OPTION_ID, IOption.STRING, false);
+		} catch (BuildException e) {
+			fail(e.getMessage());
+		}
+	}
+
+	public void testSetMBSStringListOptionValues() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*SetMBSStringListOptionValues"); //$NON-NLS-1$
+		template.getTemplateInfo().setConfigurations(getConfigurations());
+
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", projectName); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("id", MBS_GNU_CPP_LINK_OPTION_ID); //$NON-NLS-1$
+
+		for (int i=0; i < MBS_STRING_LIST_OPTION_VALUES.length; i++) {
+			valueStore.put("StringListValue" + i, MBS_STRING_LIST_OPTION_VALUES[i]); //$NON-NLS-1$
+		}
+
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+		assertTrue(project.exists());
+		try {
+			assertSetMBSOptionValues(project, MBS_GNU_CPP_LINK_OPTION_ID, IOption.STRING_LIST, false);
+		} catch (BuildException e) {
+			fail(e.getMessage());
+		}
+	}
+
+	public void testAppendToMBSStringOptionValue() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*AppendToMBSStringOptionValue"); //$NON-NLS-1$
+		template.getTemplateInfo().setConfigurations(getConfigurations());
+
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", projectName); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("id", MBS_GNU_CPP_LINK_OPTION_ID); //$NON-NLS-1$
+		valueStore.put("StringValue", MBS_STRING_OPTION_VALUE); //$NON-NLS-1$
+		valueStore.put("AppendStringValue", APPEND + MBS_STRING_OPTION_VALUE); //$NON-NLS-1$
+
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+		assertTrue(project.exists());
+		try {
+			assertSetMBSOptionValues(project, MBS_GNU_CPP_LINK_OPTION_ID, IOption.STRING, true);
+		} catch (BuildException e) {
+			fail(e.getMessage());
+		}
+	}
+
+	public void testAppendToMBSStringListOptionValues() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*AppendToMBSStringListOptionValues"); //$NON-NLS-1$
+		template.getTemplateInfo().setConfigurations(getConfigurations());
+
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", projectName); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("id", MBS_GNU_CPP_LINK_OPTION_ID); //$NON-NLS-1$
+		
+		for (int i=0; i < MBS_STRING_LIST_OPTION_VALUES.length; i++) {
+			valueStore.put("StringListValue" + i, MBS_STRING_LIST_OPTION_VALUES[i]); //$NON-NLS-1$
+		}
+
+		for (int i=0; i < MBS_STRING_LIST_OPTION_VALUES.length; i++) {
+			valueStore.put("AppendStringListValue" + i, APPEND + MBS_STRING_LIST_OPTION_VALUES[i]); //$NON-NLS-1$
+		}
+
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+		assertTrue(project.exists());
+		try {
+			assertSetMBSOptionValues(project, MBS_GNU_CPP_LINK_OPTION_ID, IOption.STRING_LIST, true);
+			assertSetMBSOptionValues(project, ".*gnu.c.link.option.paths.*", IOption.LIBRARY_PATHS, true);
+		} catch (BuildException e) {
+			fail(e.getMessage());
+		}
+	}
+
+	public void testExcludeResources() {
+		TemplateCore template = TemplateEngine.getDefault().getFirstTemplate(PROJECT_TYPE, null, ".*ExcludeResources"); //$NON-NLS-1$
+		template.getTemplateInfo().setConfigurations(getConfigurations());
+
+		Map valueStore = template.getValueStore();
+		valueStore.put("projectName", projectName); //$NON-NLS-1$
+		valueStore.put("projectType", PROJECT_TYPE); //$NON-NLS-1$
+		valueStore.put("location", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("isCProject", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+
+		for (int i=0; i < 3; i++) {
+			valueStore.put("baseName" + i, "BaseName" + i); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+
+		valueStore.put("configIdPattern", RELEASE_CONFIG_ID); //$NON-NLS-1$
+		valueStore.put("filePatterns0", ".*BaseName0.*"); //Exlude BaseName0.* from Release config //$NON-NLS-1$ //$NON-NLS-2$
+		valueStore.put("filePatterns1", ".*BaseName1.*"); //Exlude BaseName1.* from all other configs except from Release config //$NON-NLS-1$ //$NON-NLS-2$
+
+		if (TemplateEngineTestsHelper.failIfErrorStatus(template.executeTemplateProcesses(null, false))) {
+			return;
+		}
+
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+		assertTrue(project.exists());
+
+		IConfiguration[] projectConfigs = ManagedBuildManager.getBuildInfo(project).getManagedProject().getConfigurations();
+		for(int i=0; i<projectConfigs.length; i++) {
+			IConfiguration config = projectConfigs[i];
+			IResourceConfiguration[] resourceConfigs = config.getResourceConfigurations();
+			for (int j=0; j<resourceConfigs.length; j++) {
+				if (resourceConfigs[j].isExcluded()) {
+					String resourcePath = resourceConfigs[j].getResourcePath();
+					if (resourcePath.matches(".*BaseName0.*")) { //$NON-NLS-1$
+						//Exclude BaseName0.* only from Release config
+						assertTrue(config.getId().matches(RELEASE_CONFIG_ID));	
+					} else if (resourcePath.matches(".*BaseName1.*")) { //$NON-NLS-1$
+						//Exclude BaseName1.* from all other configs other than from Release config
+						assertFalse(config.getId().matches(RELEASE_CONFIG_ID));	
+					} else {
+						fail(resourcePath + " shouldn't be excluded from project"); //$NON-NLS-1$
+					}
+				}
+			}
+		}
+	}
+
+	private void assertSetMBSOptionValues(IProject project, String id, int optionType, boolean append) throws BuildException {
+		IConfiguration[] projectConfigs = ManagedBuildManager.getBuildInfo(project).getManagedProject().getConfigurations();
+
+		boolean foundCandidate= false;
+		for(int i=0; i<projectConfigs.length; i++) {
+			IConfiguration config = projectConfigs[i];
+			IOption[] globalOptions = config.getToolChain().getOptions();
+			foundCandidate |= assertMBSOptionValues(id.toLowerCase(), globalOptions, optionType, append);
+
+			ITool[] tools = config.getTools();
+			for(int j=0; j<tools.length; j++) {
+				foundCandidate |= assertMBSOptionValues(id.toLowerCase(), tools[j].getOptions(), optionType, append);
+			}
+		}
+		assertTrue(foundCandidate);
+	}
+
+	public boolean assertMBSOptionValues(String id, IOption[] options, int optionType, boolean append) throws BuildException {
+		boolean foundCandidate= false;
+		for (int i = 0; i < options.length; i++) {
+			IOption option = options[i];
+			if (option.getId().toLowerCase().matches(id)) {
+				foundCandidate= true;
+				if (option.getValueType() == optionType) {
+					switch (optionType) {
+					case IOption.BOOLEAN:
+						assertTrue(option.getBooleanValue() == true);
+						break;
+					case IOption.STRING:
+						if (append) {
+							assertTrue(option.getStringValue().equals(MBS_STRING_OPTION_VALUE + APPEND + MBS_STRING_OPTION_VALUE));
+						} else {
+							assertTrue(option.getStringValue().equals(MBS_STRING_OPTION_VALUE));
+						}
+						break;
+					default:
+						if(option.getValue() instanceof List) {
+							List list= (List) option.getValue();
+							String[] optionValues= (String[]) list.toArray(new String[list.size()]); 
+							if (append) {
+								assertTrue(optionValues.length == 2 * MBS_STRING_LIST_OPTION_VALUES.length);
+								int j=0;
+								for (; j < MBS_STRING_LIST_OPTION_VALUES.length; j++) {
+									assertTrue(optionValues[j].equals(MBS_STRING_LIST_OPTION_VALUES[j]));
+								}
+								for (; j < optionValues.length; j++) {
+									assertTrue(optionValues[j].equals(APPEND + MBS_STRING_LIST_OPTION_VALUES[j-MBS_STRING_LIST_OPTION_VALUES.length]));
+								}
+							} else {
+								assertTrue(optionValues.length == MBS_STRING_LIST_OPTION_VALUES.length);
+								for (int j=0; j < optionValues.length; j++) {
+									assertTrue(optionValues[j].equals(MBS_STRING_LIST_OPTION_VALUES[j]));
+								}
+							}
+							break;
+						}
+					continue;
+					}
+				}
+			}
+		}
+		return foundCandidate;
+	}
+
+	/**
+	 * @return the gnu mingw exe debug configuration
+	 */
+	private List/*<IConfiguration>*/ getConfigurations() {
+		IConfiguration config= ManagedBuildManager.getExtensionConfiguration("cdt.managedbuild.config.gnu.mingw.exe.debug");
+		return Collections.singletonList(config);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/BackwardCompatiblityTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/BackwardCompatiblityTests.java
new file mode 100644
index 0000000..d1cb7b4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/BackwardCompatiblityTests.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.projectmodel.tests;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IProject;
+
+public class BackwardCompatiblityTests extends TestCase {
+	private static final String TEST_3X_STD_MAKE_PROJECTS = "test3xStdMakeProjects";
+	
+	private List projList = new LinkedList();
+	
+	public static Test suite() {
+		return new TestSuite(BackwardCompatiblityTests.class);
+	}
+	
+	public void test3xStdMakeProject(){
+		String PROJ_NAME = "std_cpp_1";
+		
+		String[] BIN_PARSERS = new String[]{
+				"org.eclipse.cdt.core.ELF",
+				"org.eclipse.cdt.core.PE",
+				"org.eclipse.cdt.core.GNU_ELF",
+				"org.eclipse.cdt.core.MachO"
+		};
+		
+		String[] ERR_PARSERS = new String[]{
+				"org.eclipse.cdt.core.MakeErrorParser",
+				"org.eclipse.cdt.core.GASErrorParser",
+				"org.eclipse.cdt.core.VCErrorParser"
+		};
+		
+		IProject project = loadStdProject(PROJ_NAME);
+		projList.add(project);
+
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+		assertFalse(mngr.isNewStyleProject(project));
+		ICProjectDescription des = mngr.getProjectDescription(project, false);
+		checkDescription(des);
+
+		des = mngr.getProjectDescription(project, true);
+		checkDescription(des);
+		
+	}
+	
+	private void checkDescription(ICProjectDescription des){
+		ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
+
+		assertFalse(mngr.isNewStyleProject(des));
+		assertFalse(des.isCdtProjectCreating());
+		assertEquals(1, des.getConfigurations().length);
+		
+	}
+	
+	private IProject loadStdProject(String name){
+		return ManagedBuildTestHelper.loadProject(name, TEST_3X_STD_MAKE_PROJECTS);
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+	}
+
+	protected void tearDown() throws Exception {
+		for(Iterator iter = projList.iterator(); iter.hasNext();){
+			IProject proj = (IProject)iter.next();
+			try {
+				proj.delete(true, null);
+			} catch (Exception e){
+			}
+			iter.remove();
+		}
+		super.tearDown();
+	}
+	
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/CProjectDescriptionSerializationTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/CProjectDescriptionSerializationTests.java
new file mode 100644
index 0000000..9274031
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/CProjectDescriptionSerializationTests.java
@@ -0,0 +1,209 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.projectmodel.tests;
+
+import junit.framework.Assert;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
+import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
+import org.eclipse.cdt.make.core.MakeCorePlugin;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
+import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
+import org.eclipse.cdt.managedbuilder.testplugin.BuildSystemTestHelper;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.QualifiedName;
+/**
+ * Creates a project in a loop and checks that it is created with appropriate number
+ * of build configurations
+ *
+ */
+public class CProjectDescriptionSerializationTests extends TestCase {
+	/**
+	 * @return Test
+	 */
+	public static Test suite() {
+		return new TestSuite(CProjectDescriptionSerializationTests.class);
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+	}
+
+	/**
+	 * This test is intended to test serialization of C++ project
+	 * @throws Exception
+	 */
+	public void testTooManyConfigurations() throws Exception {
+		String projectName = "testTooManyConfigurations";
+		String pluginProjectTypeId = "cdt.managedbuild.target.gnu.cygwin.exe";
+
+		CoreModel coreModel = CoreModel.getDefault();
+		
+		{
+			// Create model project and accompanied descriptions
+			IProject project = BuildSystemTestHelper.createProject(projectName);
+			ICProjectDescription des = coreModel.createProjectDescription(project, false);
+			Assert.assertNotNull("createDescription returned null!", des);
+
+			{
+				ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
+				IProjectType type = ManagedBuildManager.getProjectType(pluginProjectTypeId);
+				Assert.assertNotNull("project type not found", type);
+
+				ManagedProject mProj = new ManagedProject(project, type);
+				info.setManagedProject(mProj);
+
+				IConfiguration cfgs[] = type.getConfigurations();
+				Assert.assertNotNull("configurations not found", cfgs);
+				Assert.assertTrue("no configurations found in the project type",cfgs.length>0);
+
+				for (IConfiguration configuration : cfgs) {
+					String id = ManagedBuildManager.calculateChildId(configuration.getId(), null);
+					Configuration config = new Configuration(mProj, (Configuration)configuration, id, false, true, false);
+					CConfigurationData data = config.getConfigurationData();
+					Assert.assertNotNull("data is null for created configuration", data);
+					ICConfigurationDescription cfgDes = des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
+				}
+				Assert.assertEquals(2, des.getConfigurations().length);
+			}
+
+			// Persist the project
+			coreModel.setProjectDescription(project, des);
+			project.close(null);
+		}
+
+
+		{
+			IWorkspace workspace = ResourcesPlugin.getWorkspace();
+			IWorkspaceRoot root = workspace.getRoot();
+
+			IWorkspaceDescription workspaceDesc = workspace.getDescription();
+			workspaceDesc.setAutoBuilding(false);
+			workspace.setDescription(workspaceDesc);
+
+			// Trying to induce an anomaly
+			for (int i=0;i<144;i++)
+			{
+				// Open project
+				IProject project = root.getProject(projectName);
+				project.open(null);
+				Assert.assertEquals(true, project.isOpen());
+
+				// Check project description
+				ICProjectDescription des = coreModel.getProjectDescription(project);
+				Assert.assertEquals(2, des.getConfigurations().length);
+
+				IManagedBuildInfo buildInfo = ManagedBuildManager.getBuildInfo(project);
+				// once in a while managedProject.getConfigurations() can return null
+				// inside buildInfo.getConfigurationNames() which results in NPE
+				String[] configurationNames = buildInfo.getConfigurationNames();
+				// this Assert triggers as well on occasion
+				Assert.assertNotNull("buildInfo.getConfigurationNames() returned null", configurationNames);
+
+				IConfiguration configurations[] = buildInfo.getManagedProject().getConfigurations();
+				// this condition is not supposed to be true
+				// since the project is supposed to have exactly 2 configurations
+				if (configurations.length != 2) {
+					String message = i + "-th round: Invalid number (not 2) of configurations loaded. ";
+					for (IConfiguration configuration : configurations) {
+						message = message + "["+configuration.getName()+"], ";
+					}
+					Assert.assertEquals(message, 2, configurations.length);
+				}
+
+				project.close(null);
+			}
+		}
+	}
+	
+	/**
+	 * This test is intended to check persistentProperties after a project is created.
+	 * @throws Exception
+	 */
+	public void testPersistentProperties() throws Exception {
+		CoreModel coreModel = CoreModel.getDefault();
+		ICProjectDescriptionManager mngr = coreModel.getProjectDescriptionManager();
+		
+		String pluginProjectTypeId = "cdt.managedbuild.target.gnu.cygwin.exe";
+		final String projectName = "testPersistentProperties";
+		
+		{
+			// Create model project and accompanied descriptions
+			IProject project = BuildSystemTestHelper.createProject(projectName);
+			ICProjectDescription des = coreModel.createProjectDescription(project, false);
+			Assert.assertNotNull("createDescription returned null!", des);
+			
+			{
+				ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
+				IProjectType type = ManagedBuildManager.getProjectType(pluginProjectTypeId);
+				Assert.assertNotNull("project type not found", type);
+				
+				ManagedProject mProj = new ManagedProject(project, type);
+				info.setManagedProject(mProj);
+				
+				IConfiguration cfgs[] = type.getConfigurations();
+				Assert.assertNotNull("configurations not found", cfgs);
+				Assert.assertTrue("no configurations found in the project type",cfgs.length>0);
+				
+				for (IConfiguration configuration : cfgs) {
+					String id = ManagedBuildManager.calculateChildId(configuration.getId(), null);
+					Configuration config = new Configuration(mProj, (Configuration)configuration, id, false, true, false);
+					CConfigurationData data = config.getConfigurationData();
+					Assert.assertNotNull("data is null for created configuration", data);
+					ICConfigurationDescription cfgDes = des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
+				}
+				Assert.assertEquals(2, des.getConfigurations().length);
+			}
+			
+			coreModel.setProjectDescription(project, des);
+			Assert.assertEquals(project, des.getProject());
+			
+			Thread.sleep(1000);  // let scanner discovery participate
+			try {
+				QualifiedName pdomName = new QualifiedName(CCorePlugin.PLUGIN_ID, "pdomName");
+				QualifiedName activeCfg = new QualifiedName(CCorePlugin.PLUGIN_ID, "activeConfiguration");
+				QualifiedName settingCfg = new QualifiedName(CCorePlugin.PLUGIN_ID, "settingConfiguration");
+				QualifiedName discoveredScannerConfigFileName = new QualifiedName(MakeCorePlugin.PLUGIN_ID, "discoveredScannerConfigFileName");
+				
+				assertTrue("pdomName", project.getPersistentProperties().containsKey(pdomName));
+				assertTrue("activeCfg", project.getPersistentProperties().containsKey(activeCfg));
+				assertTrue("discoveredScannerConfigFileName", project.getPersistentProperties().containsKey(discoveredScannerConfigFileName));
+				assertTrue("settingCfg", project.getPersistentProperties().containsKey(settingCfg));
+			} catch (CoreException e) {
+				Assert.fail(e.getMessage());
+			}
+				
+			project.close(null);
+		}
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/OptionStringListValueTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/OptionStringListValueTests.java
new file mode 100644
index 0000000..b246b89
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/OptionStringListValueTests.java
@@ -0,0 +1,284 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.projectmodel.tests;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.settings.model.CIncludePathEntry;
+import org.eclipse.cdt.core.settings.model.CLibraryFileEntry;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICFolderDescription;
+import org.eclipse.cdt.core.settings.model.ICLanguageSetting;
+import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
+import org.eclipse.cdt.core.settings.model.ICLibraryFileEntry;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
+import org.eclipse.cdt.core.settings.model.ICSettingEntry;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IFolderInfo;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.OptionStringValue;
+import org.eclipse.cdt.managedbuilder.testplugin.BuildSystemTestHelper;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class OptionStringListValueTests extends TestCase {
+	private static final String PROJ_NAME_PREFIX = "OptionStringListValueTests_";
+
+	public static Test suite() {
+		return new TestSuite(OptionStringListValueTests.class);
+	}
+	
+	protected void setUp() throws Exception {
+	}
+
+	protected void tearDown() throws Exception {
+	}
+	
+	public void testCfgDesEntries() throws Exception {
+		String projName = PROJ_NAME_PREFIX + "1";
+		IProject project = BuildSystemTestHelper.createProject(projName, null, "cdt.managedbuild.target.gnu30.exe");
+		CoreModel model = CoreModel.getDefault();
+		ICProjectDescriptionManager mngr = model.getProjectDescriptionManager();
+		
+		ICProjectDescription des = mngr.getProjectDescription(project);
+		ICConfigurationDescription cfgDes = des.getConfigurations()[0];
+		IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(cfgDes);
+		
+		ICFolderDescription fDes = cfgDes.getRootFolderDescription();
+		IFolderInfo fInfo = cfg.getRootFolderInfo();
+		
+		ICLanguageSetting ls = fDes.getLanguageSettingForFile("a.c");
+		List list = new ArrayList();
+		list.add(new CIncludePathEntry("a", 0));
+		list.add(new CIncludePathEntry("b", 0));
+		list.addAll(ls.getSettingEntriesList(ICSettingEntry.INCLUDE_PATH));
+		ls.setSettingEntries(ICSettingEntry.INCLUDE_PATH, list);
+		
+		List returned = ls.getSettingEntriesList(ICSettingEntry.INCLUDE_PATH);
+		assertEquals(list.size(), returned.size());
+		assertTrue(Arrays.equals(list.toArray(), returned.toArray()));
+		
+		mngr.setProjectDescription(project, des);
+		
+		IWorkspace wsp = ResourcesPlugin.getWorkspace();
+		IWorkspaceRoot root = wsp.getRoot(); 
+		project.delete(false, true, new NullProgressMonitor());
+		
+		project = root.getProject(projName);
+		des = mngr.getProjectDescription(project);
+		assertNull("project description is not null for removed project", des);
+		
+		project = BuildSystemTestHelper.createProject(projName);
+		des = mngr.getProjectDescription(project);
+		assertNotNull("project description is null for re-created project", des);
+		assertTrue("des should be valid for re-created project", des.isValid());
+		
+		cfgDes = des.getConfigurations()[0];
+		fDes = cfgDes.getRootFolderDescription();
+		ls = fDes.getLanguageSettingForFile("a.c");
+		
+		returned = ls.getSettingEntriesList(ICSettingEntry.INCLUDE_PATH);
+		assertEquals(list.size(), returned.size());
+		assertTrue(Arrays.equals(list.toArray(), returned.toArray()));
+	}
+	
+	public void testLibFiles() throws Exception {
+		String projName = PROJ_NAME_PREFIX + "2";
+		IProject project = BuildSystemTestHelper.createProject(projName, null, "lv.tests.ptype");
+		CoreModel model = CoreModel.getDefault();
+		ICProjectDescriptionManager mngr = model.getProjectDescriptionManager();
+		
+		ICProjectDescription des = mngr.getProjectDescription(project);
+		ICConfigurationDescription cfgDes = des.getConfigurations()[0];
+		IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(cfgDes);
+		
+		ICFolderDescription fDes = cfgDes.getRootFolderDescription();
+		IFolderInfo fInfo = cfg.getRootFolderInfo();
+		
+		ICLanguageSetting ls = fDes.getLanguageSettingForFile("a.c");
+		List list = new ArrayList();
+		list.add(new CLibraryFileEntry("usr_a", 0, new Path("ap"), new Path("arp"), new Path("apx")));
+		list.add(new CLibraryFileEntry("usr_b", 0, new Path("bp"), null, null));
+		list.add(new CLibraryFileEntry("usr_c", 0, new Path("cp"), new Path("crp"), null));
+		list.add(new CLibraryFileEntry("usr_d", 0, new Path("dp"), null, new Path("dpx")));
+		list.addAll(ls.getSettingEntriesList(ICSettingEntry.LIBRARY_FILE));
+		ls.setSettingEntries(ICSettingEntry.LIBRARY_FILE, list);
+		
+		ICLanguageSettingEntry[] resolved = ls.getResolvedSettingEntries(ICSettingEntry.LIBRARY_FILE);
+		assertEquals(list.size(), resolved.length);
+		for(int i = 0; i < resolved.length; i++){
+			ICLibraryFileEntry other = (ICLibraryFileEntry)list.get(i);
+			ICLibraryFileEntry r = (ICLibraryFileEntry)resolved[i];
+			assertEquals(other.getName(), r.getName());
+			assertEquals(other.getSourceAttachmentPath(), r.getSourceAttachmentPath());
+			assertEquals(other.getSourceAttachmentRootPath(), r.getSourceAttachmentRootPath());
+			assertEquals(other.getSourceAttachmentPrefixMapping(), r.getSourceAttachmentPrefixMapping());
+		}
+		
+		List returned = ls.getSettingEntriesList(ICSettingEntry.LIBRARY_FILE);
+		assertEquals(list.size(), returned.size());
+		assertTrue(Arrays.equals(list.toArray(), returned.toArray()));
+		
+		mngr.setProjectDescription(project, des);
+		
+		IWorkspace wsp = ResourcesPlugin.getWorkspace();
+		IWorkspaceRoot root = wsp.getRoot(); 
+		project.delete(false, true, new NullProgressMonitor());
+		
+		project = root.getProject(projName);
+		des = mngr.getProjectDescription(project);
+		assertNull("project description is not null for removed project", des);
+		
+		project = BuildSystemTestHelper.createProject(projName);
+		des = mngr.getProjectDescription(project);
+		assertNotNull("project description is null for re-created project", des);
+		assertTrue("des should be valid for re-created project", des.isValid());
+		
+		cfgDes = des.getConfigurations()[0];
+		fDes = cfgDes.getRootFolderDescription();
+		ls = fDes.getLanguageSettingForFile("a.c");
+		
+		returned = ls.getSettingEntriesList(ICSettingEntry.LIBRARY_FILE);
+		checkEntriesMatch(list, returned);
+		assertEquals(list.size(), returned.size());
+		assertTrue(Arrays.equals(list.toArray(), returned.toArray()));
+	}
+	
+	private Set[] diff(List list1, List list2){
+		Set set1 = new LinkedHashSet(list1);
+		set1.removeAll(list2);
+		Set set2 = new LinkedHashSet(list2);
+		set2.removeAll(list1);
+		if(set1.size() == 0 && set2.size() == 0)
+			return null;
+		return new Set[]{set1, set2};
+	}
+	
+	private void checkEntriesMatch(List list1, List list2){
+		Set[] diff = diff(list1, list2);
+		if(diff != null){
+			fail("entries diff");
+		}
+	}
+	
+	private static String[] toValues(OptionStringValue[] ves){
+		String[] values = new String[ves.length];
+		for(int i = 0; i < ves.length; i++){
+			values[i] = ves[i].getValue();
+		}
+		return values;
+	}
+	
+	private static void checkOptionValues(IOption option) throws Exception {
+		List list = (List)option.getValue();
+		String values[] = (String[])list.toArray(new String[list.size()]);
+		String[] values2 = option.getBasicStringListValue();
+		OptionStringValue[] values3 = option.getBasicStringListValueElements();
+		assertTrue(Arrays.equals(values, values2));
+		assertTrue(Arrays.equals(values, toValues(values3)));
+	}
+
+	public void testOptions() throws Exception {
+		String projName = PROJ_NAME_PREFIX + "3";
+		IProject project = BuildSystemTestHelper.createProject(projName, null, "lv.tests.ptype");
+		CoreModel model = CoreModel.getDefault();
+		ICProjectDescriptionManager mngr = model.getProjectDescriptionManager();
+		
+		ICProjectDescription des = mngr.getProjectDescription(project);
+		ICConfigurationDescription cfgDes = des.getConfigurations()[0];
+		IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(cfgDes);
+		
+		ICFolderDescription fDes = cfgDes.getRootFolderDescription();
+		IFolderInfo fInfo = cfg.getRootFolderInfo();
+		
+		ITool tool = fInfo.getToolsBySuperClassId("lv.tests.tool")[0];
+		IOption option = tool.getOptionBySuperClassId("lv.tests.libFiles.option");
+		
+		String[] builtins = option.getBuiltIns();
+		assertEquals(1, builtins.length);
+		String expectedBIs[] = new String[]{"lf_c"};
+		assertTrue(Arrays.equals(expectedBIs, builtins));
+		
+		checkOptionValues(option);
+		
+		List list = new ArrayList();
+		list.add("usr_1");
+		list.add("usr_2");
+		list.addAll(Arrays.asList(option.getBasicStringListValue()));
+		String[] updated = (String[])list.toArray(new String[0]);
+		option = ManagedBuildManager.setOption(fInfo, tool, option, updated);
+		
+		assertTrue(Arrays.equals(updated, option.getBasicStringListValue()));
+		checkOptionValues(option);
+
+		list = new ArrayList();
+		list.add(new OptionStringValue("usr_3", false, "ap", "arp", "apx"));
+		list.add(new OptionStringValue("usr_4", false, null, null, null));
+		list.add(new OptionStringValue("usr_5", false, "cp", null, null));
+		list.add(new OptionStringValue("usr_6", false, "dp", null, "dpx"));
+		list.add(new OptionStringValue("usr_6", false, null, null, "epx"));
+		list.addAll(Arrays.asList(option.getBasicStringListValueElements()));
+		
+		OptionStringValue updatedves[] = (OptionStringValue[])list.toArray(new OptionStringValue[0]);
+		IOption updatedOption = ManagedBuildManager.setOption(fInfo, tool, option, updatedves); 
+		assertTrue(option == updatedOption);
+		OptionStringValue[] ves = option.getBasicStringListValueElements();
+		assertEquals(updatedves.length, ves.length);
+		assertTrue(Arrays.equals(updatedves, ves));
+		checkOptionValues(option);
+		
+		mngr.setProjectDescription(project, des);
+		
+		IWorkspace wsp = ResourcesPlugin.getWorkspace();
+		IWorkspaceRoot root = wsp.getRoot(); 
+		project.delete(false, true, new NullProgressMonitor());
+		
+		project = root.getProject(projName);
+		des = mngr.getProjectDescription(project);
+		assertNull("project description is not null for removed project", des);
+		
+		project = BuildSystemTestHelper.createProject(projName);
+		des = mngr.getProjectDescription(project);
+		assertNotNull("project description is null for re-created project", des);
+		assertTrue("des should be valid for re-created project", des.isValid());
+		
+		cfgDes = des.getConfigurations()[0];
+		fDes = cfgDes.getRootFolderDescription();
+		
+		cfg = ManagedBuildManager.getConfigurationForDescription(cfgDes);
+		
+		fInfo = cfg.getRootFolderInfo();
+		
+		tool = fInfo.getToolsBySuperClassId("lv.tests.tool")[0];
+		option = tool.getOptionBySuperClassId("lv.tests.libFiles.option");
+		
+		ves = option.getBasicStringListValueElements();
+		assertTrue(Arrays.equals(updatedves, ves));
+		checkOptionValues(option);
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/ProjectModelTests.java b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/ProjectModelTests.java
new file mode 100644
index 0000000..d9baea4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/projectmodel/tests/ProjectModelTests.java
@@ -0,0 +1,876 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.projectmodel.tests;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ElementChangedEvent;
+import org.eclipse.cdt.core.model.ICElementDelta;
+import org.eclipse.cdt.core.model.IElementChangedListener;
+import org.eclipse.cdt.core.settings.model.CIncludePathEntry;
+import org.eclipse.cdt.core.settings.model.CMacroEntry;
+import org.eclipse.cdt.core.settings.model.CSourceEntry;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICExternalSetting;
+import org.eclipse.cdt.core.settings.model.ICFileDescription;
+import org.eclipse.cdt.core.settings.model.ICFolderDescription;
+import org.eclipse.cdt.core.settings.model.ICLanguageSetting;
+import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICResourceDescription;
+import org.eclipse.cdt.core.settings.model.ICSettingBase;
+import org.eclipse.cdt.core.settings.model.ICSettingEntry;
+import org.eclipse.cdt.core.settings.model.ICSourceEntry;
+import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
+import org.eclipse.cdt.core.settings.model.extension.CLanguageData;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IFileInfo;
+import org.eclipse.cdt.managedbuilder.core.IFolderInfo;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.IResourceInfo;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
+import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
+import org.eclipse.cdt.managedbuilder.testplugin.BuildSystemTestHelper;
+import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class ProjectModelTests extends TestCase implements IElementChangedListener{
+	private CModelEventChecker fEventChecker;
+	
+	public void elementChanged(ElementChangedEvent event) {
+		if(fEventChecker != null)
+			fEventChecker.checkEvent(event);
+	}
+	
+	private class CModelEventChecker {
+		private boolean fEventOccured;
+		
+		void checkEvent(ElementChangedEvent event){
+			fEventOccured = true;
+		}
+		
+	}
+	
+	private class CDefaultModelEventChecker extends CModelEventChecker{
+
+		void checkEvent(ElementChangedEvent event) {
+			super.checkEvent(event);
+			
+			assertEquals(ElementChangedEvent.POST_CHANGE, event.getType());
+			
+			ICElementDelta delta = event.getDelta();
+			System.out.println(delta.toString());
+		}
+		
+	}
+	
+	
+
+	public static Test suite() {
+		return new TestSuite(ProjectModelTests.class);
+	}
+	
+	protected void setUp() throws Exception {
+		super.setUp();
+		fEventChecker = null;
+		CoreModel.getDefault().addElementChangedListener(this);
+	}
+
+	protected void tearDown() throws Exception {
+		super.tearDown();
+		fEventChecker = null;
+		CoreModel.getDefault().removeElementChangedListener(this);
+	}
+
+	private void modify(ICFileDescription fiDes){
+		ICLanguageSetting ls = fiDes.getLanguageSetting();
+		modify(ls);
+	}
+	
+	private void modify(ICFolderDescription foDes){
+		ICLanguageSetting ls = foDes.getLanguageSettingForFile("a.c");
+		modify(ls);
+	}
+	
+	private void modify(ICLanguageSetting ls){
+		List list = ls.getSettingEntriesList(ICSourceEntry.INCLUDE_PATH);
+		list.add(new CIncludePathEntry("_modify_", 0));
+		ls.setSettingEntries(ICSettingEntry.INCLUDE_PATH, list);
+	}
+
+	private void modify(IFileInfo fiInfo){
+		CLanguageData lData = fiInfo.getCLanguageDatas()[0];
+		modify(lData);
+	}
+	
+	private void modify(CLanguageData lData){
+		ICLanguageSettingEntry[] entries = lData.getEntries(ICSourceEntry.INCLUDE_PATH);
+		ICLanguageSettingEntry[] updatedEntries = new ICLanguageSettingEntry[entries.length + 1];
+		System.arraycopy(entries, 0, updatedEntries, 0, entries.length);
+		updatedEntries[entries.length] = new CIncludePathEntry("_modify_", 0);
+		lData.setEntries(ICSettingEntry.INCLUDE_PATH, updatedEntries);
+	}
+
+	public void testDescription() throws Exception{
+		final String projectName = "test1";
+		IProject project = createProject(projectName);
+		CoreModel coreModel = CoreModel.getDefault();
+		ICProjectDescription des = coreModel.getProjectDescription(project);
+		assertNull("detDescription1 returned not null!", des);
+		
+		des = coreModel.createProjectDescription(project, true);
+		assertNotNull("createDescription returned null!", des);
+		
+		assertNull("detDescription2 returned not null!", coreModel.getProjectDescription(project));
+		
+		assertFalse("new des should be not valid", des.isValid());
+		
+		assertEquals(0, des.getConfigurations().length);
+		
+		ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
+		IProjectType type = ManagedBuildManager.getProjectType("cdt.managedbuild.target.gnu30.exe");
+		assertNotNull("project type not found", type);
+
+		ManagedProject mProj = new ManagedProject(project, type);
+		info.setManagedProject(mProj);
+		
+		IConfiguration cfgs[] = type.getConfigurations();
+		
+
+		for(int i = 0; i < cfgs.length; i++){
+			String id = ManagedBuildManager.calculateChildId(cfgs[i].getId(), null);
+			Configuration config = new Configuration(mProj, (Configuration)cfgs[i], id, false, true, false);
+			CConfigurationData data = config.getConfigurationData();
+			assertNotNull("data is null for created configuration", data);
+			ICConfigurationDescription cfgDes = des.createConfiguration("org.eclipse.cdt.managedbuilder.core.configurationDataProvider", data);
+		}
+		coreModel.setProjectDescription(project, des);
+		
+		IWorkspace wsp = ResourcesPlugin.getWorkspace();
+		IWorkspaceRoot root = wsp.getRoot(); 
+		project.delete(false, true, new NullProgressMonitor());
+		
+		project = root.getProject(projectName);
+		des = coreModel.getProjectDescription(project);
+		assertNull("project description is not null for removed project", des);
+		
+		project = createProject(projectName);
+		des = coreModel.getProjectDescription(project);
+		assertNotNull("project description is null for re-created project", des);
+		assertTrue("des should be valid for re-created project", des.isValid());
+		
+		ICConfigurationDescription cfgDess[] = des.getConfigurations();
+		
+		assertEquals(2, cfgDess.length);
+		
+		ICConfigurationDescription cfgDes = cfgDess[0];
+		ICResourceDescription rcDess[] = cfgDes.getResourceDescriptions();
+		assertEquals(1, rcDess.length);
+		assertEquals(cfgDes.getRootFolderDescription(), rcDess[0]);
+		assertFalse(cfgDes.isModified());
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), true));
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), false));
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), false));
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path("ds/sd/sdf/"), false));
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), true));
+		assertEquals(null, cfgDes.getResourceDescription(new Path("ds/sd/sdf/"), true));
+		
+		ICFileDescription fd_abc = cfgDes.createFileDescription(new Path("a/b/c.c"), rcDess[0]);
+		
+		assertTrue(cfgDes.isModified());
+
+		modify(fd_abc);
+		
+			ICProjectDescription anotherDes = coreModel.getProjectDescription(project);
+			assertNotNull("project description is null for re-created project", des);
+			assertTrue("des should be valid for re-created project", des.isValid());
+			
+			ICConfigurationDescription anotherCfgDess[] = anotherDes.getConfigurations();
+			
+			assertEquals(2, anotherCfgDess.length);
+			
+			ICConfigurationDescription anotherCfgDes = anotherCfgDess[0];
+			ICResourceDescription anotherRcDess[] = anotherCfgDes.getResourceDescriptions();
+			assertEquals(1, anotherRcDess.length);
+			assertEquals(anotherCfgDes.getRootFolderDescription(), anotherRcDess[0]);
+			assertFalse(anotherCfgDes.isModified());
+		
+		CConfigurationData cfgData = cfgDes.getConfigurationData();
+		assertEquals(cfgData, cfgDes.getConfigurationData());
+		IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(cfgDes);
+		IResourceInfo infos[] = cfg.getResourceInfos();
+		assertEquals(2, infos.length);
+
+		ICFolderDescription rf = cfgDes.getRootFolderDescription();
+		ICResourceDescription nestedFis[] = rf.getNestedResourceDescriptions(ICSettingBase.SETTING_FILE);
+		ICResourceDescription nestedFos[] = rf.getNestedResourceDescriptions(ICSettingBase.SETTING_FOLDER);
+		assertEquals(2, cfgDes.getResourceDescriptions().length);
+		assertEquals(0, nestedFos.length);
+		assertEquals(1, nestedFis.length);
+		
+		ICFileDescription fd_asd = cfgDes.createFileDescription(new Path("a/s/d.c"), cfgDes.getRootFolderDescription());
+		modify(fd_asd);
+		assertEquals(3, cfgDes.getResourceDescriptions().length);
+		nestedFis = rf.getNestedResourceDescriptions(ICSettingBase.SETTING_FILE);
+		nestedFos = rf.getNestedResourceDescriptions(ICSettingBase.SETTING_FOLDER);
+		assertEquals(0, nestedFos.length);
+		assertEquals(2, nestedFis.length);
+		
+		IFileInfo fi = cfg.createFileInfo(new Path("z/x/c.c"));
+		modify(fi);
+		nestedFis = rf.getNestedResourceDescriptions(ICSettingBase.SETTING_FILE);
+		nestedFos = rf.getNestedResourceDescriptions(ICSettingBase.SETTING_FOLDER);
+		assertEquals(0, nestedFos.length);
+		assertEquals(3, nestedFis.length);
+		assertEquals(4, cfgDes.getResourceDescriptions().length);
+
+		fi = cfg.createFileInfo(new Path("q/w/e.c"));
+		modify(fi);
+		ICFileDescription fd_qwe = (ICFileDescription)cfgDes.getResourceDescription(new Path("q/w/e.c"), true);
+		assertNotNull(fd_qwe);
+		assertEquals(5, cfgDes.getResourceDescriptions().length);
+		nestedFis = rf.getNestedResourceDescriptions(ICSettingBase.SETTING_FILE);
+		nestedFos = rf.getNestedResourceDescriptions(ICSettingBase.SETTING_FOLDER);
+		assertEquals(0, nestedFos.length);
+		assertEquals(4, nestedFis.length);
+		
+		cfgDes.removeResourceDescription(fd_abc);
+		nestedFis = rf.getNestedResourceDescriptions(ICSettingBase.SETTING_FILE);
+		nestedFos = rf.getNestedResourceDescriptions(ICSettingBase.SETTING_FOLDER);
+		assertEquals(0, nestedFos.length);
+		assertEquals(3, nestedFis.length);
+		assertEquals(4, cfgDes.getResourceDescriptions().length);
+
+		cfg.removeResourceInfo(new Path("a/s/d.c"));
+		assertEquals(3, cfgDes.getResourceDescriptions().length);
+		nestedFis = rf.getNestedResourceDescriptions(ICSettingBase.SETTING_FILE);
+		nestedFos = rf.getNestedResourceDescriptions(ICSettingBase.SETTING_FOLDER);
+		assertEquals(0, nestedFos.length);
+		assertEquals(2, nestedFis.length);
+		
+		IFileInfo fi_qwe = (IFileInfo)cfg.getResourceInfo(new Path("q/w/e.c"), true);
+		assertNotNull(fi_qwe);
+		
+		ICFileDescription fid_qwe = (ICFileDescription)cfgDes.getResourceDescription(new Path("q/w/e.c"), true);
+		assertNotNull(fid_qwe);
+		fi_qwe.setPath(new Path("r/t/y.c"));
+		assertEquals(fi_qwe, cfg.getResourceInfo(new Path("r/t/y.c"), true));
+		assertNull(cfgDes.getResourceDescription(new Path("q/w/e.c"), true));
+		ICFileDescription fid_rty = (ICFileDescription)cfgDes.getResourceDescription(new Path("r/t/y.c"), true);
+		assertEquals(fid_qwe, fid_rty);
+		
+		fid_rty.setPath(new Path("f/g/h.c"));
+		assertNull(cfg.getResourceInfo(new Path("r/t/y.c"), true));
+		IFileInfo fi_fgh = (IFileInfo)cfg.getResourceInfo(new Path("f/g/h.c"), true);
+		assertEquals(fi_qwe, fi_fgh);
+		
+		ICFolderDescription fod_fg1 = cfgDes.createFolderDescription(new Path("f/g/1"), cfgDes.getRootFolderDescription());
+		modify(fod_fg1);
+		ICFolderDescription fod_fg12 = cfgDes.createFolderDescription(new Path("f/g/1/2"), fod_fg1);
+		modify(fod_fg12);
+		assertEquals(fod_fg12, fod_fg1.getNestedResourceDescription(new Path("2"), true));
+
+		ICFileDescription fid_fg13 = cfgDes.createFileDescription(new Path("f/g/1/3.c"), fod_fg1);
+		modify(fid_fg13);
+		assertEquals(fid_fg13, fod_fg1.getNestedResourceDescription(new Path("3.c"), true));
+		
+		assertEquals(2, fod_fg1.getNestedResourceDescriptions().length);
+		assertEquals(1, fod_fg1.getNestedResourceDescriptions(ICSettingBase.SETTING_FILE).length);
+		assertEquals(1, fod_fg1.getNestedResourceDescriptions(ICSettingBase.SETTING_FOLDER).length);
+
+		IFolderInfo fo_fg1 = (IFolderInfo)cfg.getResourceInfo(new Path("f/g/1"), true);
+		assertNotNull(fo_fg1);
+		
+		fo_fg1.setPath(new Path("t/y/u"));
+
+		assertEquals(2, fod_fg1.getNestedResourceDescriptions().length);
+		assertEquals(1, fod_fg1.getNestedResourceDescriptions(ICSettingBase.SETTING_FILE).length);
+		assertEquals(1, fod_fg1.getNestedResourceDescriptions(ICSettingBase.SETTING_FOLDER).length);
+		
+		assertEquals(fod_fg12, cfgDes.getResourceDescription(new Path("t/y/u/2"), true));
+		assertEquals(fid_fg13, cfgDes.getResourceDescription(new Path("t/y/u/3.c"), true));
+
+		ICLanguageSetting settings[] = cfgDes.getRootFolderDescription().getLanguageSettings();
+		for(int i = 0; i < settings.length; i++){
+			ICLanguageSetting setting = settings[i];
+			ICLanguageSettingEntry[] entries = setting.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+			for(int j = 0; j < entries.length; j++){
+				System.out.println(entries[j].getName());
+			}
+			System.out.println(entries.length);
+		}
+		coreModel.setProjectDescription(project, des);
+		
+		project.delete(false, true, new NullProgressMonitor());
+		
+		project = root.getProject(projectName);
+		assertFalse(project.exists());
+		assertFalse(project.isOpen());
+		des = coreModel.getProjectDescription(project);
+		assertFalse(project.exists());
+		assertFalse(project.isOpen());
+		assertNull("project description is not null for removed project", des);
+		
+		project = createProject(projectName);
+		long time = System.currentTimeMillis();
+		des = coreModel.getProjectDescription(project);
+		time = System.currentTimeMillis() - time;
+		System.out.println("time to load = " + time);
+		
+		assertNotNull("project description is null for re-created project", des);
+		assertTrue("des should be valid for re-created project", des.isValid());
+		
+		cfgDess = des.getConfigurations();
+		cfgDes = cfgDess[0];
+		rf = cfgDes.getRootFolderDescription();
+		settings = rf.getLanguageSettings();
+		ICLanguageSettingEntry updatedEntries[] = new ICLanguageSettingEntry[0];
+		for(int i = 0; i < settings.length; i++){
+			ICLanguageSetting setting = settings[i];
+			ICLanguageSettingEntry[] entries = setting.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+			if(entries.length > 0){
+				ICLanguageSettingEntry updated[] = new ICLanguageSettingEntry[entries.length + 1];
+				System.arraycopy(entries, 0, updated, 1, entries.length);
+				updated[0] = new CIncludePathEntry("a/b/c", 0);
+				setting.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, updated);
+				updatedEntries = setting.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+				assertEquals(updated.length, updatedEntries.length);
+				for(int k = 0; k < updated.length; k++){
+					assertEquals(updated[i].getValue(), updatedEntries[i].getValue());
+				}
+			}
+		}
+		
+		fEventChecker = new CDefaultModelEventChecker();
+		coreModel.setProjectDescription(project, des);
+		fEventChecker = null;
+		
+		project.delete(false, true, new NullProgressMonitor());
+		
+		project = root.getProject(projectName);
+		assertFalse(project.exists());
+		assertFalse(project.isOpen());
+		des = coreModel.getProjectDescription(project);
+		assertNull("project description is not null for removed project", des);
+		
+		project = createProject(projectName);
+		time = System.currentTimeMillis();
+		des = coreModel.getProjectDescription(project);
+		time = System.currentTimeMillis() - time;
+		System.out.println("time to load = " + time);
+		
+		assertNotNull("project description is null for re-created project", des);
+		assertTrue("des should be valid for re-created project", des.isValid());
+		
+		cfgDess = des.getConfigurations();
+		cfgDes = cfgDess[0];
+		rf = cfgDes.getRootFolderDescription();
+		settings = rf.getLanguageSettings();
+
+		for(int i = 0; i < settings.length; i++){
+			ICLanguageSetting setting = settings[i];
+			ICLanguageSettingEntry[] entries = setting.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+			BuildSystemTestHelper.checkDiff(entries, updatedEntries);
+			if(entries.length > 0){
+//				ICLanguageSettingEntry updated[] = new ICLanguageSettingEntry[entries.length + 1];
+//				System.arraycopy(entries, 0, updated, 1, entries.length);
+//				updated[0] = new CIncludePathEntry("a/b/c", 0);
+//				setting.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, updated);
+//				updatedEntries = setting.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+				assertEquals(entries.length, updatedEntries.length);
+				for(int k = 0; k < entries.length; k++){
+					assertEquals(entries[i].getValue(), updatedEntries[i].getValue());
+				}
+			}
+		}
+
+		assertEquals(2, cfgDess.length);
+		nestedFis = rf.getNestedResourceDescriptions(ICSettingBase.SETTING_FILE);
+		nestedFos = rf.getNestedResourceDescriptions(ICSettingBase.SETTING_FOLDER);
+		assertEquals(2, nestedFos.length);
+		assertEquals(3, nestedFis.length);
+		
+		assertEquals(6, cfgDes.getResourceDescriptions().length);
+		
+		IFolder folder = ManagedBuildTestHelper.createFolder(project, "a/b");
+		ICFolderDescription base = (ICFolderDescription)cfgDes.getResourceDescription(new Path("a/b"), false);
+		ICFolderDescription abFoDes =  cfgDes.createFolderDescription(new Path("a/b"), base);
+		ICLanguageSetting ls = abFoDes.getLanguageSettingForFile("a.c");
+		assertNotNull(ls);
+		List list = ls.getSettingEntriesList(ICLanguageSettingEntry.INCLUDE_PATH);
+		list.add(0, new CIncludePathEntry("zzza/b/c", 0));
+		ls.setSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH, list);
+
+		System.out.println("setting entries for non-root folder..\n");
+		fEventChecker = new CDefaultModelEventChecker();
+		coreModel.setProjectDescription(project, des);
+		fEventChecker = null;
+		
+		time = System.currentTimeMillis();
+		des = coreModel.getProjectDescription(project);
+		time = System.currentTimeMillis() - time;
+		System.out.println("time to load = " + time);
+		
+		assertNotNull("project description is null for re-created project", des);
+		assertTrue("des should be valid for re-created project", des.isValid());
+		
+		cfgDess = des.getConfigurations();
+		cfgDes = cfgDess[0];
+		rf = cfgDes.getRootFolderDescription();
+		
+		IFolder f_bc = ManagedBuildTestHelper.createFolder(project, "b/c");
+		base = (ICFolderDescription)cfgDes.getResourceDescription(new Path("b/c"), false);
+		ICFolderDescription bcFoDes =  cfgDes.createFolderDescription(new Path("b/c"), base);
+		ls = bcFoDes.getLanguageSettingForFile("a.c");
+		assertNotNull(ls);
+		ICLanguageSetting rLS = rf.getLanguageSettingForFile("a.c");
+		assertNotNull(rLS);
+		List lsList = ls.getSettingEntriesList(ICLanguageSettingEntry.INCLUDE_PATH);
+		List rLSList = rLS.getSettingEntriesList(ICLanguageSettingEntry.INCLUDE_PATH);
+		
+		System.out.println("default entries for non-root folder..\n");
+		fEventChecker = new CDefaultModelEventChecker();
+		coreModel.setProjectDescription(project, des);
+		fEventChecker = null;
+
+		project.delete(true, true, new NullProgressMonitor());
+	}
+	
+	public void testSourceEntries() throws Exception {
+		final String projectName = "test2";
+		IProject project = createProject(projectName);
+		CoreModel coreModel = CoreModel.getDefault();
+		ICProjectDescription des = coreModel.getProjectDescription(project);
+		assertNull("detDescription1 returned not null!", des);
+		
+		des = coreModel.createProjectDescription(project, true);
+		assertNotNull("createDescription returned null!", des);
+		
+		assertNull("detDescription2 returned not null!", coreModel.getProjectDescription(project));
+		
+		assertFalse("new des should be not valid", des.isValid());
+		
+		assertEquals(0, des.getConfigurations().length);
+		
+		ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
+		IProjectType type = ManagedBuildManager.getProjectType("cdt.managedbuild.target.gnu30.exe");
+		assertNotNull("project type not found", type);
+
+		ManagedProject mProj = new ManagedProject(project, type);
+		info.setManagedProject(mProj);
+		
+		IConfiguration cfgs[] = type.getConfigurations();
+		
+
+		for(int i = 0; i < cfgs.length; i++){
+			String id = ManagedBuildManager.calculateChildId(cfgs[i].getId(), null);
+			Configuration config = new Configuration(mProj, (Configuration)cfgs[i], id, false, true);
+			CConfigurationData data = config.getConfigurationData();
+			assertNotNull("data is null for created configuration", data);
+			ICConfigurationDescription cfgDes = des.createConfiguration("org.eclipse.cdt.managedbuilder.core.configurationDataProvider", data);
+		}
+		coreModel.setProjectDescription(project, des);
+		
+		IWorkspace wsp = ResourcesPlugin.getWorkspace();
+		IWorkspaceRoot root = wsp.getRoot(); 
+		project.delete(false, true, new NullProgressMonitor());
+		
+		project = root.getProject(projectName);
+		des = coreModel.getProjectDescription(project);
+		assertNull("project description is not null for removed project", des);
+		
+		project = createProject(projectName);
+		des = coreModel.getProjectDescription(project);
+		assertNotNull("project description is null for re-created project", des);
+		assertTrue("des should be valid for re-created project", des.isValid());
+		
+		ICConfigurationDescription cfgDess[] = des.getConfigurations();
+		
+		assertEquals(2, cfgDess.length);
+		
+		ICConfigurationDescription cfgDes = cfgDess[0];
+		ICResourceDescription rcDess[] = cfgDes.getResourceDescriptions();
+		assertEquals(1, rcDess.length);
+		assertEquals(cfgDes.getRootFolderDescription(), rcDess[0]);
+		assertFalse(cfgDes.isModified());
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), true));
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), false));
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), false));
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path("ds/sd/sdf/"), false));
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), true));
+		assertEquals(null, cfgDes.getResourceDescription(new Path("ds/sd/sdf/"), true));
+
+		ICSourceEntry s[] = cfgDes.getSourceEntries();
+		IPath projPath = cfgDes.getProjectDescription().getProject().getFullPath();
+		assertEquals(1, s.length);
+		assertEquals(projPath, s[0].getFullPath());
+		assertEquals(0, s[0].getExclusionPatterns().length);
+		
+		IFolder folder = ManagedBuildTestHelper.createFolder(project, "a/b");
+
+		ICSourceEntry updatetSEs[] = new ICSourceEntry[2];
+		updatetSEs[0] = new CSourceEntry(projPath.append("a"), new Path[]{new Path("b")}, ICSourceEntry.VALUE_WORKSPACE_PATH);
+		updatetSEs[1] = s[0];
+		
+		cfgDes.setSourceEntries(updatetSEs);
+		
+		s = cfgDes.getSourceEntries();
+		updatetSEs[1] = new CSourceEntry(projPath, new Path[]{new Path("a")}, ICSourceEntry.VALUE_WORKSPACE_PATH | ICSourceEntry.RESOLVED);
+		checkArrays(updatetSEs, s);
+		//assertTrue(Arrays.equals(updatetSEs, s));
+
+		System.out.println("saving updated source entries..\n");
+		fEventChecker = new CDefaultModelEventChecker();
+		coreModel.setProjectDescription(project, des);
+		fEventChecker = null;
+		
+		des = coreModel.getProjectDescription(project);
+		cfgDes = des.getConfigurations()[0];
+		checkArrays(cfgDes.getSourceEntries(), s);
+		
+		project.delete(true, true, new NullProgressMonitor());
+	}
+
+	public void testMacroEntries() throws Exception {
+		final String projectName = "test3";
+		IProject project = createProject(projectName);
+		CoreModel coreModel = CoreModel.getDefault();
+		ICProjectDescription des = coreModel.getProjectDescription(project);
+		assertNull("detDescription1 returned not null!", des);
+		
+		des = coreModel.createProjectDescription(project, true);
+		assertNotNull("createDescription returned null!", des);
+		
+		assertNull("detDescription2 returned not null!", coreModel.getProjectDescription(project));
+		
+		assertFalse("new des should be not valid", des.isValid());
+		
+		assertEquals(0, des.getConfigurations().length);
+		
+		ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
+		IProjectType type = ManagedBuildManager.getProjectType("cdt.managedbuild.target.gnu30.exe");
+		assertNotNull("project type not found", type);
+
+		ManagedProject mProj = new ManagedProject(project, type);
+		info.setManagedProject(mProj);
+		
+		IConfiguration cfgs[] = type.getConfigurations();
+		
+		for(int i = 0; i < cfgs.length; i++){
+			String id = ManagedBuildManager.calculateChildId(cfgs[i].getId(), null);
+			Configuration config = new Configuration(mProj, (Configuration)cfgs[i], id, false, true);
+			CConfigurationData data = config.getConfigurationData();
+			assertNotNull("data is null for created configuration", data);
+			ICConfigurationDescription cfgDes = des.createConfiguration("org.eclipse.cdt.managedbuilder.core.configurationDataProvider", data);
+		}
+		coreModel.setProjectDescription(project, des);
+
+		des = coreModel.getProjectDescription(project);
+		assertNotNull("project description is null ", des);
+		assertTrue("des should be valid ", des.isValid());
+		
+		ICConfigurationDescription cfgDess[] = des.getConfigurations();
+		
+		assertEquals(2, cfgDess.length);
+		
+		ICConfigurationDescription cfgDes = cfgDess[0];
+		ICResourceDescription rcDess[] = cfgDes.getResourceDescriptions();
+		assertEquals(1, rcDess.length);
+		assertEquals(cfgDes.getRootFolderDescription(), rcDess[0]);
+		assertFalse(cfgDes.isModified());
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), true));
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), false));
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), false));
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path("ds/sd/sdf/"), false));
+		assertEquals(cfgDes.getRootFolderDescription(), cfgDes.getResourceDescription(new Path(""), true));
+		assertEquals(null, cfgDes.getResourceDescription(new Path("ds/sd/sdf/"), true));
+
+		ICFolderDescription rf = cfgDes.getRootFolderDescription();
+		ICLanguageSetting setting = rf.getLanguageSettingForFile("a.c");
+		ICLanguageSettingEntry entries[] = setting.getSettingEntries(ICLanguageSettingEntry.MACRO);
+		
+		for(int i = 0; i < entries.length; i++){
+			System.out.println("name = \"" + entries[i].getName() + "\", value = \"" + entries[i].getValue() + "\"");
+		}
+		
+		CMacroEntry entry = new CMacroEntry("a", "b", 0);
+		List list = new ArrayList();
+		list.add(entry);
+		list.addAll(Arrays.asList(entries));
+		
+		setting.setSettingEntries(ICLanguageSettingEntry.MACRO, list);
+	
+		ICLanguageSettingEntry updatedEntries[] = setting.getSettingEntries(ICLanguageSettingEntry.MACRO);
+		assertEquals(entries.length + 1, updatedEntries.length);
+		
+		boolean found = false;
+		for(int i = 0; i < updatedEntries.length; i++){
+			if(updatedEntries[i].getName().equals("a") 
+					&& updatedEntries[i].getValue().equals("b")){
+				found = true;
+				break;
+			}
+		}
+		
+		assertTrue(found);
+	}
+	
+	public void testReferences() throws Exception{
+		final String projectName4 = "test4";
+		final String projectName5 = "test5";
+		final String projectName6 = "test6";
+		final String projectName7 = "test7";
+		CoreModel coreModel = CoreModel.getDefault();
+
+		IProject project4 = createProject(projectName4, "cdt.managedbuild.target.gnu30.exe");
+		IProject project5 = createProject(projectName5, "cdt.managedbuild.target.gnu30.exe");
+		IProject project6 = createProject(projectName6, "cdt.managedbuild.target.gnu30.exe");
+		IProject project7 = createProject(projectName7, "cdt.managedbuild.target.gnu30.exe");
+		
+		ICProjectDescription des4 = coreModel.getProjectDescription(project4);
+		ICProjectDescription des5 = coreModel.getProjectDescription(project5);
+		ICConfigurationDescription dess[] = des5.getConfigurations();
+		String id1 = dess[0].getId();
+		String id2 = dess[1].getId();
+		
+		ICLanguageSettingEntry entries[] = new ICLanguageSettingEntry[]{
+				new CMacroEntry("a", "b", 0),
+				new CMacroEntry("c", "d", 0),
+				new CIncludePathEntry("a/b/c", 0),
+				new CIncludePathEntry("d/e/f", 0),
+		};
+		dess[0].createExternalSetting(null, null, null, entries);
+		dess[0].setActive();
+		
+		ICExternalSetting extSettings[] = dess[0].getExternalSettings();
+		assertEquals(extSettings.length, 1);
+		
+		checkArrays(extSettings[0].getEntries(), entries);
+		List list = new ArrayList(Arrays.asList(entries));
+		list.remove(3);
+		list.remove(2);
+		checkArrays(extSettings[0].getEntries(ICLanguageSettingEntry.MACRO), list.toArray());
+		list = new ArrayList(Arrays.asList(entries));
+		list.remove(0);
+		list.remove(0);
+		checkArrays(extSettings[0].getEntries(ICLanguageSettingEntry.INCLUDE_PATH), list.toArray());
+		coreModel.setProjectDescription(project5, des5);
+		
+		extSettings = coreModel.getProjectDescription(project5).getActiveConfiguration().getExternalSettings();
+		assertEquals(extSettings.length, 1);
+		
+		checkArrays(extSettings[0].getEntries(), entries);
+		list = new ArrayList(Arrays.asList(entries));
+		list.remove(3);
+		list.remove(2);
+		checkArrays(extSettings[0].getEntries(ICLanguageSettingEntry.MACRO), list.toArray());
+		list = new ArrayList(Arrays.asList(entries));
+		list.remove(0);
+		list.remove(0);
+		checkArrays(extSettings[0].getEntries(ICLanguageSettingEntry.INCLUDE_PATH), list.toArray());
+		
+		dess = des4.getConfigurations();
+		ICLanguageSetting ls = dess[0].getRootFolderDescription().getLanguageSettingForFile("a.c");
+		ICLanguageSettingEntry macros[] = ls.getSettingEntries(ICLanguageSettingEntry.MACRO);
+		ICLanguageSettingEntry includes[] = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+		assertFalse(arrayContains(entries[0], macros));
+		assertFalse(arrayContains(entries[1], macros));
+		assertFalse(arrayContains(entries[2], includes));
+		assertFalse(arrayContains(entries[3], includes));
+		Map map = new HashMap();
+		map.put(projectName5, "");
+		dess[0].setReferenceInfo(map);
+		ICLanguageSettingEntry updatedMacros[] = ls.getSettingEntries(ICLanguageSettingEntry.MACRO);
+		ICLanguageSettingEntry udatedIncludes[] = ls.getSettingEntries(ICLanguageSettingEntry.INCLUDE_PATH);
+		assertTrue(arrayContains(entries[0], updatedMacros));
+		assertTrue(arrayContains(entries[1], updatedMacros));
+		assertTrue(arrayContains(entries[2], udatedIncludes));
+		assertTrue(arrayContains(entries[3], udatedIncludes));
+
+	}
+	
+	public void testActiveCfg() throws Exception{
+		final String projectName = "test8";
+		
+		IProject project = createProject(projectName, "cdt.managedbuild.target.gnu30.exe");
+		CoreModel coreModel = CoreModel.getDefault();
+		
+		ICProjectDescription des = coreModel.getProjectDescription(project);
+		ICConfigurationDescription cfgs[] = des.getConfigurations();
+		String id1 = cfgs[0].getId();
+		String id2 = cfgs[1].getId();
+		
+		cfgs[0].setActive();
+		assertEquals(cfgs[0], des.getActiveConfiguration());
+		
+		coreModel.setProjectDescription(project, des);
+		
+		des = coreModel.getProjectDescription(project);
+		cfgs = des.getConfigurations();
+		assertEquals(id1, des.getActiveConfiguration().getId());
+		
+		ICConfigurationDescription newActive = null;
+		for(int i = 0; i < cfgs.length; i++){
+			if(!cfgs[i].getId().equals(id1)){
+				newActive = cfgs[i];
+				break;
+			}
+		}
+		
+		String newActiveId = newActive.getId();
+		newActive.setActive();
+		assertEquals(newActive, des.getActiveConfiguration());
+		
+		coreModel.setProjectDescription(project, des);
+		
+		des = coreModel.getProjectDescription(project);
+		assertEquals(newActiveId, des.getActiveConfiguration().getId());
+		
+		
+	}
+
+	private boolean arrayContains(Object el, Object[] a){
+		for(int i = 0; i < a.length; i++){
+			if(el.equals(a[i]))
+				return true;
+		}
+		return false;
+	}
+	
+	private void checkArrays(Object[] a1, Object[] a2){
+		if(a1 == null){
+			assertTrue(a2 == null);
+			return;
+		}
+		assertTrue(a2 != null);
+
+		assertEquals(a1.length, a2.length);
+		
+		for(int i = 0; i < a1.length; i++){
+			Object o1 = a1[i];
+			boolean found = false;
+			for(int j = 0; j < a2.length; j++){
+				if(o1.equals(a2[j])){
+					found = true;
+					break;
+				}
+			}
+			
+			if(!found){
+				fail("a2 array does not contain the \"" + o1 + "\" element");
+			}
+		}
+	}
+	
+	static public IProject createProject(String name, String projTypeId) throws CoreException{
+		IProject project = createProject(name);
+		
+		CoreModel coreModel = CoreModel.getDefault();
+		ICProjectDescription des = coreModel.getProjectDescription(project);
+		assertNull("detDescription1 returned not null!", des);
+		
+		des = coreModel.createProjectDescription(project, true);
+		assertNotNull("createDescription returned null!", des);
+		
+		assertNull("detDescription2 returned not null!", coreModel.getProjectDescription(project));
+		
+		assertFalse("new des should be not valid", des.isValid());
+		
+		assertEquals(0, des.getConfigurations().length);
+		
+		ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
+		IProjectType type = ManagedBuildManager.getProjectType(projTypeId);
+		assertNotNull("project type not found", type);
+
+		ManagedProject mProj = new ManagedProject(project, type);
+		info.setManagedProject(mProj);
+		
+		IConfiguration cfgs[] = type.getConfigurations();
+		
+
+		for(int i = 0; i < cfgs.length; i++){
+			String id = ManagedBuildManager.calculateChildId(cfgs[i].getId(), null);
+			Configuration config = new Configuration(mProj, (Configuration)cfgs[i], id, false, true);
+			CConfigurationData data = config.getConfigurationData();
+			assertNotNull("data is null for created configuration", data);
+			ICConfigurationDescription cfgDes = des.createConfiguration("org.eclipse.cdt.managedbuilder.core.configurationDataProvider", data);
+		}
+
+		coreModel.setProjectDescription(project, des);
+
+		return project;
+	}
+	
+	static public IProject createProject(String name) throws CoreException{
+		return createProject(name, (IPath)null);
+	}
+	
+	static public IProject createProject(
+			final String name, 
+			final IPath location) throws CoreException{
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IWorkspaceRoot root = workspace.getRoot();
+		final IProject newProjectHandle = root.getProject(name);
+		IProject project = null;
+		
+		if (!newProjectHandle.exists()) {
+			IWorkspaceDescription workspaceDesc = workspace.getDescription();
+			workspaceDesc.setAutoBuilding(false);
+			workspace.setDescription(workspaceDesc);
+			IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());
+			if(location != null)
+				description.setLocation(location);
+			//description.setLocation(root.getLocation());
+			project = CCorePlugin.getDefault().createCDTProject(description, newProjectHandle, new NullProgressMonitor());
+		} else {
+			IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+				public void run(IProgressMonitor monitor) throws CoreException {
+					newProjectHandle.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+				}
+			};
+			NullProgressMonitor monitor = new NullProgressMonitor();
+			workspace.run(runnable, root, IWorkspace.AVOID_UPDATE, monitor);
+			project = newProjectHandle;
+		}
+        
+		// Open the project if we have to
+		if (!project.isOpen()) {
+			project.open(new NullProgressMonitor());
+		}
+				
+		return project;	
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/.classpath b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/.classpath
new file mode 100644
index 0000000..2fbb7a2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/results/plugins/org.eclipse.cdt.core.aix/.cvsignore b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/.cvsignore
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.aix/.cvsignore
copy to results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/.cvsignore
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/.project b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/.project
new file mode 100644
index 0000000..fe93b1e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.managedbuilder.ui.tests</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/.settings/org.eclipse.jdt.core.prefs b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0c64ec4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Thu Nov 20 11:28:56 CET 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b2ec451
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Managed Build UI Tests Plug-in
+Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.ui.tests; singleton:=true
+Bundle-Version: 5.0.100.qualifier
+Bundle-Activator: org.eclipse.cdt.managedbuilder.ui.tests.testplugin.TestsPlugin
+Bundle-Vendor: Eclipse CDT
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.cdt.managedbuilder.ui,
+ org.eclipse.cdt.ui,
+ org.junit,
+ org.eclipse.cdt.managedbuilder.core,
+ org.eclipse.cdt.core,
+ org.eclipse.core.resources
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/about.html b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/about.html
new file mode 100644
index 0000000..9c7ba0a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/about.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head>
+
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>May 2, 2006</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/build.properties b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/build.properties
new file mode 100644
index 0000000..f81aa4c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/build.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2005 Texas Instruments Incorporated and others.
+# 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
+# 
+# Contributors:
+#     Texas Instruments - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+               .,\
+               about.html,\
+               META-INF/
+src.includes = about.html
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/plugin.xml b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/plugin.xml
new file mode 100644
index 0000000..cb7d425
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/plugin.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+     <extension
+         point="org.eclipse.cdt.managedbuilder.ui.newWizardPages">
+      <wizardPage
+            ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.AlwaysPresentWizardPage"
+            operationClass="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.TestRunnable"
+            pageClass="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.AlwaysPresentWizardPage"/>
+      <wizardPage
+            ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.NatureAWizardPage"
+            pageClass="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.NatureAWizardPage">
+         <nature  natureID="A"/>
+      </wizardPage>
+      <wizardPage
+            ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.NatureBWizardPage"
+            pageClass="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.NatureBWizardPage">
+         <nature  natureID="B"/>
+      </wizardPage>
+      <wizardPage
+            ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainCWizardPage"
+            pageClass="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainCWizardPage">
+         <toolchain  toolchainID="C"/>
+      </wizardPage>
+      <wizardPage
+            ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainCv20WizardPage"
+            pageClass="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainCv20WizardPage">
+         <toolchain
+               toolchainID="C"
+               versionsSupported="2.0.0"/>
+      </wizardPage>
+      <wizardPage
+            ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ProjectTypeDWizardPage"
+            pageClass="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ProjectTypeDWizardPage">
+         <projectType  projectTypeID="D"/>
+      </wizardPage>
+      <wizardPage
+            ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ProjectTypeEWizardPage"
+            pageClass="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ProjectTypeEWizardPage">
+         <projectType  projectTypeID="E"/>
+      </wizardPage>
+      <wizardPage
+            ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainFWizardPage"
+            pageClass="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainFWizardPage">
+         <toolchain toolchainID="F"/>
+      </wizardPage>
+   </extension>
+
+
+
+
+</plugin>
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCProjectPlatformPage.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCProjectPlatformPage.java
new file mode 100644
index 0000000..aaf746a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCProjectPlatformPage.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Innoopract Informationssysteme GmbH and others.
+ * 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
+ *
+ * Contributors:
+ * Innoopract - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.ui.tests;
+
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.core.parser.util.ArrayUtil;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager;
+import org.eclipse.cdt.ui.wizards.CDTMainWizardPage;
+import org.eclipse.cdt.ui.wizards.CDTProjectWizard;
+import org.eclipse.cdt.ui.wizards.CWizardHandler;
+import org.eclipse.cdt.ui.wizards.IWizardItemsListListener;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Tests for the get/setSelectedProjectType() of CProjectPlatformPage.
+ * @author Elias Volanakis
+ */
+public class TestCProjectPlatformPage extends TestCase implements IWizardItemsListListener {
+
+	//TODO: migrate to the new UI functionality
+	private CDTProjectWizard wizard;
+	private TestPage page;
+	private boolean currentState=false;
+	
+	protected void setUp() throws Exception {
+		MBSCustomPageManager.init();
+		MBSCustomPageManager.loadExtensions();
+		wizard = new CDTProjectWizard();
+		page = new TestPage(wizard);
+		wizard.addPages();
+	}
+	
+	protected void tearDown() throws Exception {
+		page.dispose();
+		page = null;
+		wizard = null;
+	}
+	ArrayUtil x;
+	
+	// testing methods
+	//////////////////
+	
+	/* Test the new page, set selection, create page lifecycle. */
+	public void testHandler1() throws Exception {
+		CWizardHandler h = new CWizardHandler(getShell(), "Head", "Name");
+		assertNotNull(h);
+		/*
+		IProjectType pt = new TestProjectType();
+		assertEquals(0, h.getToolChainsCount());
+		IToolchain tc = new Toolchain(new TestFolderInfo());
+		IToolChain xz;
+		tc.setId("test1");
+		h.addTc(tc);
+		// Test toolchain cannot be added
+		assertEquals(h.getToolChainsCount(), 1);
+		tc = new TestToolchain();
+		h.addTc(tc);
+		assertEquals(h.getToolChainsCount(), 2);
+		IToolChain[] tcs = h.getSelectedToolChains();
+		assertEquals(tcs.length, 33);
+		*/
+	}
+	
+	/* Test the new page, create page, set selection lifecycle. */
+	public void testProject() throws Exception {
+		
+		//IPath p = 
+		ResourcesPlugin.getWorkspace().getRoot().getLocation();
+		/*
+		NewModelProjectWizard wiz = new CDTProjectWizard();
+		/*
+		String s = System.getenv("TEMP");
+		
+		System.out.println(s);
+		assertNotNull(wiz);
+		/*
+		IProject pr1 = wiz.createIProject("test1", null);
+		assertNotNull(pr1);
+		
+		IProject pr2 = wiz.createIProject("test2", p.append("test2"));
+		assertNotNull(pr2);
+		*/
+	}
+	
+	/* 
+	 * Tests that setting the selection to a projectType thats not on the list,
+	 * is handled correctly.
+	 */
+	public void testSelectedProjectType3() throws Exception {
+	}
+	
+	
+	// helping methods and classes
+	//////////////////////////////
+	
+	private Shell getShell() {
+		return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+	}
+	
+	class TestPage extends WizardPage implements IWizardItemsListListener{
+		TestPage(CDTProjectWizard wizard) throws Exception {
+			super(CDTMainWizardPage.class.getName());
+		}
+		IProjectType getFirstType() {
+			return null; //(IProjectType) projectTypes.get(0);
+		}
+		IProjectType getSecondType() {
+			return null; //(IProjectType) projectTypes.get(1);
+		}
+		public boolean isCurrent() {
+			// TODO Auto-generated method stub
+			return false;
+		}
+		public void toolChainListChanged(int count) {
+			// TODO Auto-generated method stub
+			
+		}
+		public void createControl(Composite parent) {
+			// TODO Auto-generated method stub
+			
+		}
+		public List filterItems(List items) {
+			return items;
+		}
+	}
+
+	// methods of IToolChainListListener
+	public boolean isCurrent() { return currentState; }
+	public void toolChainListChanged(int count) {}
+
+	public List filterItems(List items) {
+		return items;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCustomPageManager.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCustomPageManager.java
new file mode 100644
index 0000000..55eeb2b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCustomPageManager.java
@@ -0,0 +1,908 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Texas Instruments Incorporated and others.
+ * 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
+ * 
+ * Contributors:
+ *     Texas Instruments - initial API and implementation
+ *     IBM Corporation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.managedbuilder.ui.tests.util.TestToolchain;
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+/**
+ *   This class is responsible for testing the functionality of the custom page manager (MBSCustomPageManager)
+ *   that manages custom wizard pages that are provided by ISVs to supplement the pages in the New Project wizards
+ *   for Managed Build.
+ *   
+ *   The idea behind the test plan is pretty simple.
+ *   
+ *   There are seven custom wizard pages specified by this plugin.  One page has no restrictions placed upon it and
+ *   thus should always be present.  There are two pages which are constrained by different natures respectively,
+ *   two constrained by different toolchains, and two constrained by different project types.  The goal is to
+ *   change around what options (i.e. nature, project type, toolchain) a hypothetical user would set, and then
+ *   check to see if the proper pages are displayed in the proper order.
+ */
+public class TestCustomPageManager extends TestCase
+{
+
+	private static final String alwaysPresentPageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.AlwaysPresentWizardPage";
+	private static final String natureAPageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.NatureAWizardPage";
+	private static final String natureBPageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.NatureBWizardPage";
+	private static final String toolchainCPageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainCWizardPage";
+	private static final String projectTypeDPageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ProjectTypeDWizardPage";
+	private static final String projectTypeEPageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ProjectTypeEWizardPage";
+	private static final String toolchainFPageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainFWizardPage";
+	private static final String toolchainCv20PageName = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainCv20WizardPage";
+	
+	public static boolean testFlag = false;
+	
+	public void setUp() throws Exception
+	{
+		MBSCustomPageManager.init();
+		
+		MBSCustomPageManager.loadExtensions();
+		
+		testFlag = false;
+	}
+
+	//TODO: migrate tests to new managed builder UI 
+	/**
+	 *  Test with a setup such that only an unconstrained page should show up.
+	 */
+	public void testOneVisiblePage()
+	{
+		// set the project type to be "X"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "X");
+
+		// set the toolchain to "Y"
+		List toolchainSet = new ArrayList();
+		TestToolchain toolchain = new TestToolchain();
+		toolchain.setID("Y");
+		toolchainSet.add(toolchain);
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.TOOLCHAIN, toolchainSet);
+		
+		// set the nature to "Z"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.NATURE, "Z");
+		
+		// check each of the pages
+		
+		// this page should always be visible
+		if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+		{
+			fail("AlwaysPresentWizardPage should be visible");
+		}
+		
+		// next page for this page should be null
+		if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != null)
+		{
+			fail("AlwaysPresentWizardPage should not have a next page.");
+		}
+		
+		// the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureAPageName))
+		{
+			fail("NatureAWizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureBPageName))
+		{
+			fail("NatureBWizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainCPageName))
+		{
+			fail("ToolChainCWizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainCv20PageName))
+		{
+			fail("ToolChainCv20WizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+		{
+			fail("ProjectTypeDWizardPage should not be visible");
+		}
+
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+		{
+			fail("ProjectTypeEWizardPage should not be visible");
+		}		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+		{
+			fail("ToolchainFWizardPage should not be visible");
+		}
+	}
+	
+	
+	/**
+	 *   Set the nature to "A".  Only pages with no contraints or natures set to "A" should show up.
+	 */
+	public void testNatureA()
+	{
+//		 set the project type to be "X"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "X");
+
+		// set the toolchain to "Y"
+		List toolchainSet = new ArrayList();
+		TestToolchain toolchain = new TestToolchain();
+		toolchain.setID("Y");
+		toolchainSet.add(toolchain);
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.TOOLCHAIN, toolchainSet);
+		
+		// set the nature to "A"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.NATURE, "A");
+		
+		// check each of the pages
+		
+		// this page should always be visible
+		if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+		{
+			fail("AlwaysPresentWizardPage should be visible");
+		}
+		
+		// next page for this page should be the page for Nature A
+		if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(natureAPageName).getWizardPage())
+		{
+			fail("AlwaysPresentWizardPage's next page should be NatureAWizardPage");
+		}
+		
+		// Nature A page's previous page should be the always present page
+		if(MBSCustomPageManager.getPreviousPage(natureAPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+		{
+			fail("NatureAWizardPage's next page should be AlwaysPresentWizardPage");
+		}
+	
+		// Nature A page should be visible
+		if(!MBSCustomPageManager.isPageVisible(natureAPageName))
+		{
+			fail("NatureAWizardPage should be visible");
+		}
+		
+		// Nature A page's next page should be null
+		if(MBSCustomPageManager.getNextPage(natureAPageName) != null)
+		{
+			fail("NatureAWizardPage should not have a next page.");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureBPageName))
+		{
+			fail("NatureBWizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainCPageName))
+		{
+			fail("ToolChainCWizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainCv20PageName))
+		{
+			fail("ToolChainCv20WizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+		{
+			fail("ProjectTypeDWizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+		{
+			fail("ProjectTypeEWizardPage should not be visible");
+		}		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+		{
+			fail("ToolchainFWizardPage should not be visible");
+		}
+	}
+	
+	/**
+	 *   Set the nature to "B".  Only pages with no contraints or natures set to "B" should show up.
+	 */
+	public void testNatureB()
+	{
+//		 set the project type to be "X"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "X");
+
+		// set the toolchain to "Y"
+		List toolchainSet = new ArrayList();
+		TestToolchain toolchain = new TestToolchain();
+		toolchain.setID("Y");
+		toolchainSet.add(toolchain);
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.TOOLCHAIN, toolchainSet);
+		
+		// set the nature to "B"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.NATURE, "B");
+		
+		// check each of the pages
+		
+		// this page should always be visible
+		if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+		{
+			fail("AlwaysPresentWizardPage should be visible");
+		}
+		
+		// next page for this page should be the page for Nature B
+		if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(natureBPageName).getWizardPage())
+		{
+			fail("AlwaysPresentWizardPage's next page should be NatureBWizardPage");
+		}
+		
+		// Nature B page's previous page should be the always present page
+		if(MBSCustomPageManager.getPreviousPage(natureBPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+		{
+			fail("NatureBWizardPage's next page should be AlwaysPresentWizardPage");
+		}
+		
+		// Nature B page should be visible
+		if(!MBSCustomPageManager.isPageVisible(natureBPageName))
+		{
+			fail("NatureBWizardPage should be visible");
+		}
+		
+		// Nature B page's next page should be null
+		if(MBSCustomPageManager.getNextPage(natureBPageName) != null)
+		{
+			fail("NatureBWizardPage should not have a next page.");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureAPageName))
+		{
+			fail("NatureAWizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainCPageName))
+		{
+			fail("ToolChainCWizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainCv20PageName))
+		{
+			fail("ToolChainCv20WizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+		{
+			fail("ProjectTypeDWizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+		{
+			fail("ProjectTypeEWizardPage should not be visible");
+		}		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+		{
+			fail("ToolchainFWizardPage should not be visible");
+		}
+	}
+	
+	/**
+	 *   Set the toolchain to "C".  Only pages with no contraints or toolchains set to "C" should show up.
+	 */
+	public void testToolchainC()
+	{
+//		 set the project type to be "X"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "X");
+
+		// set the toolchain to "C"
+		List toolchainSet = new ArrayList();
+		TestToolchain toolchain = new TestToolchain();
+		toolchain.setID("C");
+		toolchainSet.add(toolchain);
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.TOOLCHAIN, toolchainSet);
+		
+		// set the nature to "Z"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.NATURE, "Z");
+		
+		// check each of the pages
+		
+		// this page should always be visible
+		if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+		{
+			fail("AlwaysPresentWizardPage should be visible");
+		}
+		
+		// next page for this page should be the page for toolchain C
+		if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(toolchainCPageName).getWizardPage())
+		{
+			fail("AlwaysPresentWizardPage's next page should be ToolchainCWizardPage");
+		}
+		
+		// toolchain C page's previous page should be the always present page
+		if(MBSCustomPageManager.getPreviousPage(toolchainCPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+		{
+			fail("ToolchainCWizardPage's previous page should be AlwaysPresentWizardPage");
+		}
+		
+		// Toolchain C page should be visible
+		if(!MBSCustomPageManager.isPageVisible(toolchainCPageName))
+		{
+			fail("ToolchainCWizardPage should be visible");
+		}
+		
+		// Toolchain C page's next page should be null
+		if(MBSCustomPageManager.getNextPage(toolchainCPageName) != null)
+		{
+			fail("ToolchainCWizardPage should not have a next page.");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainCv20PageName))
+		{
+			fail("ToolChainCv20WizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureAPageName))
+		{
+			fail("NatureAWizardPage should not be visible");
+		}
+		
+		//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureBPageName))
+		{
+			fail("NatureBWizardPage should not be visible");
+		}		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+		{
+			fail("ProjectTypeDWizardPage should not be visible");
+		}
+		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+		{
+			fail("ProjectTypeEWizardPage should not be visible");
+		}		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+		{
+			fail("ToolchainFWizardPage should not be visible");
+		}
+	}
+	
+	/**
+	 *   Set the toolchain to "C_2.0.0".  Only pages with no contraints, or toolchains set to "C", or toolchains set to "C" version 2.0.0 should show up.
+	 */
+	public void testToolchainCv20()
+	{
+//		 set the project type to be "X"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "X");
+
+		// set the toolchain to "C"
+		List toolchainSet = new ArrayList();
+		TestToolchain toolchain = new TestToolchain();
+		toolchain.setID("C_2.0.0");
+		toolchainSet.add(toolchain);
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.TOOLCHAIN, toolchainSet);
+		
+		// set the nature to "Z"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.NATURE, "Z");
+		
+		// check each of the pages
+		
+		// this page should always be visible
+		if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+		{
+			fail("AlwaysPresentWizardPage should be visible");
+		}
+		
+		// next page for this page should be the page for toolchain C
+		if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(toolchainCPageName).getWizardPage())
+		{
+			fail("AlwaysPresentWizardPage's next page should be ToolchainCWizardPage");
+		}
+		
+		// toolchain C page's previous page should be the always present page
+		if(MBSCustomPageManager.getPreviousPage(toolchainCPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+		{
+			fail("ToolchainCWizardPage's previous page should be AlwaysPresentWizardPage");
+		}
+		
+		// Toolchain C page should be visible
+		if(!MBSCustomPageManager.isPageVisible(toolchainCPageName))
+		{
+			fail("ToolchainCWizardPage should be visible");
+		}
+		
+		// Toolchain C page's next page should be the page for C 2.0
+		if(MBSCustomPageManager.getNextPage(toolchainCPageName) != MBSCustomPageManager.getPageData(toolchainCv20PageName).getWizardPage())
+		{
+			fail("ToolchainCWizardPage's next page should be ToolchainCv20WizardPage.");
+		}
+		
+		// toolchain C v 2.0.0 page's previous page should be the toolchain C page
+		if(MBSCustomPageManager.getPreviousPage(toolchainCv20PageName) != MBSCustomPageManager.getPageData(toolchainCPageName).getWizardPage())
+		{
+			fail("ToolchainCv20WizardPage's previous page should be ToolchainCWizardPage");
+		}
+		
+		// Toolchain C v 2.0.0 page should be visible
+		if(!MBSCustomPageManager.isPageVisible(toolchainCv20PageName))
+		{
+			fail("ToolchainCWizardPage should be visible");
+		}
+		
+		// Toolchain C v 2.0.0 page's next page should be null
+		if(MBSCustomPageManager.getNextPage(toolchainCv20PageName) != null)
+		{
+			fail("ToolchainCv20WizardPage should not have a next page.");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureAPageName))
+		{
+			fail("NatureAWizardPage should not be visible");
+		}
+		
+		//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureBPageName))
+		{
+			fail("NatureBWizardPage should not be visible");
+		}		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+		{
+			fail("ProjectTypeDWizardPage should not be visible");
+		}
+		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+		{
+			fail("ProjectTypeEWizardPage should not be visible");
+		}		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+		{
+			fail("ToolchainFWizardPage should not be visible");
+		}
+	}
+	
+	
+	
+	/**
+	 *   Set the project type to "D".  Only pages with no contraints or project types set to "D" should show up.
+	 */
+	public void testProjectTypeD()
+	{
+//		 set the project type to be "D"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "D");
+
+		// set the toolchain to "Y"
+		List toolchainSet = new ArrayList();
+		TestToolchain toolchain = new TestToolchain();
+		toolchain.setID("Y");
+		toolchainSet.add(toolchain);
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.TOOLCHAIN, toolchainSet);
+		
+		// set the nature to "Z"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.NATURE, "Z");
+		
+		// check each of the pages
+		
+		// this page should always be visible
+		if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+		{
+			fail("AlwaysPresentWizardPage should be visible");
+		}
+		
+		// next page for this page should be the page for project type D
+		if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(projectTypeDPageName).getWizardPage())
+		{
+			fail("AlwaysPresentWizardPage's next page should be ProjectTypeDWizardPage");
+		}
+		
+		// Project type D page's previous page should be the always present page
+		if(MBSCustomPageManager.getPreviousPage(projectTypeDPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+		{
+			fail("ProjectTypeDWizardPage's next page should be AlwaysPresentWizardPage");
+		}
+		
+		// Project type D page should be visible
+		if(!MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+		{
+			fail("ProjectTypeDWizardPage should be visible");
+		}
+		
+		// Project type D page's next page should be null
+		if(MBSCustomPageManager.getNextPage(projectTypeDPageName) != null)
+		{
+			fail("ProjectTypeDWizardPage should not have a next page.");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureAPageName))
+		{
+			fail("NatureAWizardPage should not be visible");
+		}
+		
+		//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureBPageName))
+		{
+			fail("NatureBWizardPage should not be visible");
+		}		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainCPageName))
+		{
+			fail("ToolChainCWizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainCv20PageName))
+		{
+			fail("ToolChainCv20WizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+		{
+			fail("ProjectTypeEWizardPage should not be visible");
+		}		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+		{
+			fail("ToolchainFWizardPage should not be visible");
+		}
+		
+	}
+	
+
+	
+	/**
+	 *   Set the project type to "E".  Only pages with no contraints or project types set to "E" should show up.
+	 */
+	public void testProjectTypeE()
+	{
+//		 set the project type to be "E"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "E");
+
+		// set the toolchain to "Y"
+		List toolchainSet = new ArrayList();
+		TestToolchain toolchain = new TestToolchain();
+		toolchain.setID("Y");
+		toolchainSet.add(toolchain);
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.TOOLCHAIN, toolchainSet);
+		
+		// set the nature to "Z"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.NATURE, "Z");
+		
+		// check each of the pages
+		
+		// this page should always be visible
+		if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+		{
+			fail("AlwaysPresentWizardPage should be visible");
+		}
+		
+		// next page for this page should be the page for project type D
+		if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(projectTypeEPageName).getWizardPage())
+		{
+			fail("AlwaysPresentWizardPage's next page should be ProjectTypeEWizardPage");
+		}
+		
+		// Project type E page's previous page should be the always present page
+		if(MBSCustomPageManager.getPreviousPage(projectTypeEPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+		{
+			fail("ProjectTypeDWizardPage's next page should be AlwaysPresentWizardPage");
+		}
+		
+		// Project type E page should be visible
+		if(!MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+		{
+			fail("ProjectTypeDWizardPage should be visible");
+		}
+		
+		// Project type D page's next page should be null
+		if(MBSCustomPageManager.getNextPage(projectTypeEPageName) != null)
+		{
+			fail("ProjectTypeEWizardPage should not have a next page.");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureAPageName))
+		{
+			fail("NatureAWizardPage should not be visible");
+		}
+		
+		//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureBPageName))
+		{
+			fail("NatureBWizardPage should not be visible");
+		}		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainCPageName))
+		{
+			fail("ToolChainCWizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainCv20PageName))
+		{
+			fail("ToolChainCv20WizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+		{
+			fail("ProjectTypeDWizardPage should not be visible");
+		}		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+		{
+			fail("ToolchainFWizardPage should not be visible");
+		}
+		
+	}
+	
+	/**
+	 *   Set the toolchain to "F".  Only pages with no contraints or toolchains set to "F" should show up.
+	 */
+	public void testToolchainF()
+	{
+//		 set the project type to be "X"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "X");
+
+		// set the toolchain to "F"
+		List toolchainSet = new ArrayList();
+		TestToolchain toolchain = new TestToolchain();
+		toolchain.setID("F");
+		toolchainSet.add(toolchain);
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.TOOLCHAIN, toolchainSet);
+		
+		// set the nature to "Z"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.NATURE, "Z");
+		
+		// check each of the pages
+		
+		// this page should always be visible
+		if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+		{
+			fail("AlwaysPresentWizardPage should be visible");
+		}
+		
+		// next page for this page should be the page for toolchain F
+		if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(toolchainFPageName).getWizardPage())
+		{
+			fail("AlwaysPresentWizardPage's next page should be ToolchainFWizardPage");
+		}
+		
+		// toolchain F page's previous page should be the always present page
+		if(MBSCustomPageManager.getPreviousPage(toolchainFPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+		{
+			fail("ToolchainFWizardPage's previous page should be AlwaysPresentWizardPage");
+		}
+		
+		// Toolchain C page should be visible
+		if(!MBSCustomPageManager.isPageVisible(toolchainFPageName))
+		{
+			fail("ToolchainFWizardPage should be visible");
+		}
+		
+		// Toolchain F page's next page should be null
+		if(MBSCustomPageManager.getNextPage(toolchainFPageName) != null)
+		{
+			fail("ToolchainCWizardPage should not have a next page.");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureAPageName))
+		{
+			fail("NatureAWizardPage should not be visible");
+		}
+		
+		//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureBPageName))
+		{
+			fail("NatureBWizardPage should not be visible");
+		}		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainCv20PageName))
+		{
+			fail("ToolChainCv20WizardPage should not be visible");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+		{
+			fail("ProjectTypeDWizardPage should not be visible");
+		}
+		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+		{
+			fail("ProjectTypeEWizardPage should not be visible");
+		}		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainCPageName))
+		{
+			fail("ToolchainCWizardPage should not be visible");
+		}
+	}
+	
+	/**
+	 *  Set nature to A, toolchain to C, project type to D.  We should have several pages with different constraints appearing.
+	 */
+	public void testMultiplePages()
+	{
+//		 set the project type to be "D"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, "D");
+
+		// set the toolchain to "C"
+		List toolchainSet = new ArrayList();
+		TestToolchain toolchain = new TestToolchain();
+		toolchain.setID("C");
+		toolchainSet.add(toolchain);
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.TOOLCHAIN, toolchainSet);
+		
+		// set the nature to "A"
+		MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.NATURE, "A");
+		
+		// check each of the pages
+		
+		// this page should always be visible
+		if(!MBSCustomPageManager.isPageVisible(alwaysPresentPageName))
+		{
+			fail("AlwaysPresentWizardPage should be visible");
+		}
+		
+		// next page for this page should be the page for Nature A
+		if(MBSCustomPageManager.getNextPage(alwaysPresentPageName) != MBSCustomPageManager.getPageData(natureAPageName).getWizardPage())
+		{
+			fail("AlwaysPresentWizardPage's next page should be NatureAWizardPage");
+		}
+		
+		// Nature A page's previous page should be the always present page
+//		 next page for this page should be the page for Nature A
+		if(MBSCustomPageManager.getPreviousPage(natureAPageName) != MBSCustomPageManager.getPageData(alwaysPresentPageName).getWizardPage())
+		{
+			fail("NatureAWizardPage's next page should be AlwaysPresentWizardPage");
+		}
+	
+		// Nature A page should be visible
+		if(!MBSCustomPageManager.isPageVisible(natureAPageName))
+		{
+			fail("NatureAWizardPage should be visible");
+		}
+		
+		// next page for this page should be the page for toolchain C
+		if(MBSCustomPageManager.getNextPage(natureAPageName) != MBSCustomPageManager.getPageData(toolchainCPageName).getWizardPage())
+		{
+			fail("NatureAWizardPage's next page should be ToolchainCWizardPage");
+		}
+		
+		// Toolchain C page's previous page should be NatureAWizardPage
+		if(MBSCustomPageManager.getPreviousPage(toolchainCPageName) != MBSCustomPageManager.getPageData(natureAPageName).getWizardPage())
+		{
+			fail("ToolchainCWizardPage's previous page should be NatureAWizardPage");
+		}
+		
+		// Toolchain C page should be visible
+		if(!MBSCustomPageManager.isPageVisible(toolchainCPageName))
+		{
+			fail("ToolchainCWizardPage should be visible");
+		}
+		
+		// next page for this page should be the page for project type D
+		if(MBSCustomPageManager.getNextPage(toolchainCPageName) != MBSCustomPageManager.getPageData(projectTypeDPageName).getWizardPage())
+		{
+			fail("ToolchainCWizardPage's next page should be ProjectTypeDWizardPage");
+		}
+		
+		// Project type D page's previous page should be the toolchain C page
+		if(MBSCustomPageManager.getPreviousPage(projectTypeDPageName) != MBSCustomPageManager.getPageData(toolchainCPageName).getWizardPage())
+		{
+			fail("ProjectTypeDWizardPage's previous page should be toolchainCPageName");
+		}
+		
+		// Project type D page should be visible
+		if(!MBSCustomPageManager.isPageVisible(projectTypeDPageName))
+		{
+			fail("ProjectTypeDWizardPage should be visible");
+		}
+		
+		// Project type D page's next page should be null
+		if(MBSCustomPageManager.getNextPage(projectTypeDPageName) != null)
+		{
+			fail("ProjectTypeDWizardPage should not have a next page.");
+		}
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(natureBPageName))
+		{
+			fail("NatureBWizardPage should not be visible");
+		}
+		
+		//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(projectTypeEPageName))
+		{
+			fail("ProjectTypeEWizardPage should not be visible");
+		}		
+		
+//		 the rest of the pages should be invisible
+		if(MBSCustomPageManager.isPageVisible(toolchainFPageName))
+		{
+			fail("ToolchainFWizardPage should not be visible");
+		}
+	}
+	
+	
+	public void testOperation() throws Exception
+	{
+		MBSCustomPageManager.getPageData(alwaysPresentPageName).getOperation().run(new NullProgressMonitor());
+		
+		if(testFlag != true)
+		{
+			fail("Running operation associated with AlwaysPresentWizardPage failed.");
+		}
+	}
+	
+	public TestCustomPageManager(String name)
+	{
+		
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite = new TestSuite(TestCustomPageManager.class.getName());
+		
+		suite.addTest(new TestCustomPageManager("testOneVisiblePage"));
+		suite.addTest(new TestCustomPageManager("testNatureA"));
+		suite.addTest(new TestCustomPageManager("testNatureB"));
+		suite.addTest(new TestCustomPageManager("testToolchainC"));
+		suite.addTest(new TestCustomPageManager("testToolchainCv20"));
+		suite.addTest(new TestCustomPageManager("testProjectTypeD"));
+		suite.addTest(new TestCustomPageManager("testProjectTypeE"));
+		suite.addTest(new TestCustomPageManager("testToolchainF"));
+		suite.addTest(new TestCustomPageManager("testMultiplePages"));
+		suite.addTest(new TestCustomPageManager("testOperation"));
+		return suite;
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/suite/AllManagedBuildUITests.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/suite/AllManagedBuildUITests.java
new file mode 100644
index 0000000..50a700e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/suite/AllManagedBuildUITests.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.ui.tests.suite;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.managedbuilder.ui.tests.TestCProjectPlatformPage;
+import org.eclipse.cdt.managedbuilder.ui.tests.TestCustomPageManager;
+
+/**
+ *
+ */
+public class AllManagedBuildUITests {
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(AllManagedBuildUITests.suite());
+	}
+	public static Test suite() {
+		TestSuite suite = new TestSuite(
+				"Test for org.eclipse.cdt.managedbuilder.ui.tests");
+		//$JUnit-BEGIN$
+// TODO uncoment this		
+		suite.addTest(TestCustomPageManager.suite());
+		suite.addTestSuite(TestCProjectPlatformPage.class);
+		
+		//$JUnit-END$
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/testplugin/TestsPlugin.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/testplugin/TestsPlugin.java
new file mode 100644
index 0000000..b7db590
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/testplugin/TestsPlugin.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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
+ * 
+ * Contributors:
+ *     Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.testplugin;
+
+import org.eclipse.ui.plugin.*;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.osgi.framework.BundleContext;
+import java.util.*;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class TestsPlugin extends AbstractUIPlugin {
+	//The shared instance.
+	private static TestsPlugin plugin;
+	//Resource bundle.
+	private ResourceBundle resourceBundle;
+	
+	/**
+	 * The constructor.
+	 */
+	public TestsPlugin() {
+		super();
+		plugin = this;
+	}
+
+	/**
+	 * This method is called upon plug-in activation
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+	}
+
+	/**
+	 * This method is called when the plug-in is stopped
+	 */
+	public void stop(BundleContext context) throws Exception {
+		super.stop(context);
+		plugin = null;
+		resourceBundle = null;
+	}
+
+	/**
+	 * Returns the shared instance.
+	 */
+	public static TestsPlugin getDefault() {
+		return plugin;
+	}
+
+	/**
+	 * Returns the string from the plugin's resource bundle,
+	 * or 'key' if not found.
+	 */
+	public static String getResourceString(String key) {
+		ResourceBundle bundle = TestsPlugin.getDefault().getResourceBundle();
+		try {
+			return (bundle != null) ? bundle.getString(key) : key;
+		} catch (MissingResourceException e) {
+			return key;
+		}
+	}
+
+	/**
+	 * Returns the plugin's resource bundle,
+	 */
+	public ResourceBundle getResourceBundle() {
+		try {
+			if (resourceBundle == null)
+				resourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.managedbuilder.ui.tests.TestsPluginResources");
+		} catch (MissingResourceException x) {
+			resourceBundle = null;
+		}
+		return resourceBundle;
+	}
+
+	/**
+	 * Returns an image descriptor for the image file at the given
+	 * plug-in relative path.
+	 *
+	 * @param path the path
+	 * @return the image descriptor
+	 */
+	public static ImageDescriptor getImageDescriptor(String path) {
+		return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.cdt.managedbuilder.ui.tests", path);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestConfiguration.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestConfiguration.java
new file mode 100644
index 0000000..5792625
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestConfiguration.java
@@ -0,0 +1,563 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     Intel Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.ui.tests.util;
+
+import org.eclipse.cdt.core.settings.model.ICSourceEntry;
+import org.eclipse.cdt.core.settings.model.extension.CBuildData;
+import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
+import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyValue;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IBuildObjectProperties;
+import org.eclipse.cdt.managedbuilder.core.IBuilder;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IFileInfo;
+import org.eclipse.cdt.managedbuilder.core.IFolderInfo;
+import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
+import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IResourceInfo;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier;
+import org.eclipse.cdt.managedbuilder.macros.IConfigurationBuildMacroSupplier;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.PluginVersionIdentifier;
+
+public class TestConfiguration implements IConfiguration {
+
+	IToolChain toolchain;
+	
+	public TestConfiguration(IToolChain tc) {
+		toolchain = tc;
+	}
+	
+	public boolean buildsFileType(String srcExt) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public ITool calculateTargetTool() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void changeBuilder(IBuilder newBuilder, String id, String name) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public IFileInfo createFileInfo(IPath path) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IFileInfo createFileInfo(IPath path, String id, String name) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IFileInfo createFileInfo(IPath path, IFolderInfo base,
+			ITool baseTool, String id, String name) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IFileInfo createFileInfo(IPath path, IFileInfo base, String id,
+			String name) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IFolderInfo createFolderInfo(IPath path) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IFolderInfo createFolderInfo(IPath path, String id, String name) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IFolderInfo createFolderInfo(IPath path, IFolderInfo base,
+			String id, String name) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IToolChain createToolChain(IToolChain superClass, String Id,
+			String name, boolean isExtensionElement) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IManagedCommandLineInfo generateToolCommandLineInfo(
+			String sourceExtension, String[] flags, String outputFlag,
+			String outputPrefix, String outputName, String[] inputResources,
+			IPath inputLocation, IPath outputLocation) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getArtifactExtension() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getArtifactName() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getBuildArguments() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getBuildCommand() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public CBuildData getBuildData() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IConfigurationBuildMacroSupplier getBuildMacroSupplier() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IBuilder getBuilder() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getCleanCommand() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public CConfigurationData getConfigurationData() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getDescription() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IBuilder getEditableBuilder() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getErrorParserIds() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String[] getErrorParserList() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool[] getFilteredTools() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String[] getLibs(String extension) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IManagedProject getManagedProject() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getOutputExtension(String resourceExtension) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getOutputFlag(String outputExt) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getOutputPrefix(String outputExtension) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IConfiguration getParent() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getPostannouncebuildStep() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getPostbuildStep() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getPreannouncebuildStep() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getPrebuildStep() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IProjectType getProjectType() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IResourceConfiguration getResourceConfiguration(String path) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IResourceConfiguration[] getResourceConfigurations() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IResourceInfo getResourceInfo(IPath path, boolean exactPath) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IResourceInfo getResourceInfoById(String id) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IResourceInfo[] getResourceInfos() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IFolderInfo getRootFolderInfo() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IPath[] getSourcePaths() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool getTargetTool() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool getTool(String id) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IToolChain getToolChain() {
+		return toolchain;
+	}
+
+	public String getToolCommand(ITool tool) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool getToolFromInputExtension(String sourceExtension) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool getToolFromOutputExtension(String extension) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool[] getTools() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool[] getToolsBySuperClassId(String id) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String[] getUserObjects(String extension) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public boolean hasOverriddenBuildCommand() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isBuilderCompatible(IBuilder builder) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isDirty() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isExtensionElement() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isHeaderFile(String ext) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isManagedBuildOn() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isSupported() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isSystemObject() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isTemporary() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean needsFullRebuild() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean needsRebuild() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public void removeResourceConfiguration(IResourceInfo resConfig) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void removeResourceInfo(IPath path) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setArtifactExtension(String extension) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setArtifactName(String name) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setBuildArguments(String makeArgs) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setBuildCommand(String command) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setCleanCommand(String command) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setDescription(String description) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setDirty(boolean isDirty) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setErrorParserIds(String ids) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setErrorParserList(String[] ids) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setManagedBuildOn(boolean on) throws BuildException {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setName(String name) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public IOption setOption(IHoldsOptions parent, IOption option, boolean value)
+			throws BuildException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IOption setOption(IHoldsOptions parent, IOption option, String value)
+			throws BuildException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IOption setOption(IHoldsOptions parent, IOption option,
+			String[] value) throws BuildException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setPostannouncebuildStep(String announceStep) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setPostbuildStep(String step) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setPreannouncebuildStep(String announceStep) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setPrebuildStep(String step) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setRebuildState(boolean rebuild) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setSourcePaths(IPath[] paths) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setToolCommand(ITool tool, String command) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public boolean supportsBuild(boolean managed) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public String getBaseId() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getId() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getManagedBuildRevision() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getName() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public PluginVersionIdentifier getVersion() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setVersion(PluginVersionIdentifier version) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public IBuildObjectProperties getBuildProperties() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+	public IResource getOwner() { return null; }
+
+	public IResourceConfiguration createResourceConfiguration(IFile file) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IBuildPropertyValue getBuildArtefactType() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setBuildArtefactType(String id) throws BuildException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public ICSourceEntry[] getSourceEntries() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setSourceEntries(ICSourceEntry[] entries) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestFolderInfo.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestFolderInfo.java
new file mode 100644
index 0000000..eced614
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestFolderInfo.java
@@ -0,0 +1,251 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     Intel Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.ui.tests.util;
+
+import org.eclipse.cdt.core.settings.model.extension.CFolderData;
+import org.eclipse.cdt.core.settings.model.extension.CLanguageData;
+import org.eclipse.cdt.core.settings.model.extension.CResourceData;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IFolderInfo;
+import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
+import org.eclipse.cdt.managedbuilder.core.IModificationStatus;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.OptionStringValue;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.PluginVersionIdentifier;
+
+public class TestFolderInfo implements IFolderInfo {
+
+	IConfiguration cfg;
+	public TestFolderInfo(IConfiguration parent) {
+		cfg = parent;
+	}
+	
+	public boolean buildsFileType(String srcExt) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public IToolChain changeToolChain(IToolChain newSuperClass, String Id,
+			String name) throws BuildException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool[] getFilteredTools() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public CFolderData getFolderData() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getOutputExtension(String resourceExtension) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool getTool(String id) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IToolChain getToolChain() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IModificationStatus getToolChainModificationStatus(ITool[] removed,
+			ITool[] added) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool getToolFromInputExtension(String sourceExtension) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool getToolFromOutputExtension(String extension) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool[] getToolsBySuperClassId(String id) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public boolean isHeaderFile(String ext) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isToolChainCompatible(IToolChain ch) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public void modifyToolChain(ITool[] removed, ITool[] added)
+			throws BuildException {
+		// TODO Auto-generated method stub
+
+	}
+
+	public CLanguageData[] getCLanguageDatas() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public int getKind() {
+		// TODO Auto-generated method stub
+		return 0;
+	}
+
+	public IConfiguration getParent() {
+		return cfg;
+	}
+
+	public IPath getPath() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public CResourceData getResourceData() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool[] getTools() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public boolean isDirty() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isExcluded() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isExtensionElement() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isValid() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean needsRebuild() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public void setDirty(boolean dirty) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setExclude(boolean excluded) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public IOption setOption(IHoldsOptions parent, IOption option, boolean value)
+			throws BuildException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IOption setOption(IHoldsOptions parent, IOption option, String value)
+			throws BuildException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IOption setOption(IHoldsOptions parent, IOption option,
+			String[] value) throws BuildException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setPath(IPath path) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setRebuildState(boolean rebuild) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public boolean supportsBuild(boolean managed) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public String getBaseId() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getId() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getManagedBuildRevision() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getName() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public PluginVersionIdentifier getVersion() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setVersion(PluginVersionIdentifier version) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public boolean canExclude(boolean exclude) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public IOption setOption(IHoldsOptions parent, IOption option,
+			OptionStringValue[] value) throws BuildException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public boolean isSupported() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestProjectType.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestProjectType.java
new file mode 100644
index 0000000..ceb4dee
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestProjectType.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     Intel Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.managedbuilder.ui.tests.util;
+
+import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyValue;
+import org.eclipse.cdt.managedbuilder.core.IBuildObjectProperties;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IConfigurationNameProvider;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.envvar.IProjectEnvironmentVariableSupplier;
+import org.eclipse.cdt.managedbuilder.macros.IProjectBuildMacroSupplier;
+import org.eclipse.core.runtime.PluginVersionIdentifier;
+
+public class TestProjectType implements IProjectType {
+	private IConfiguration[] cfgs = new IConfiguration[1];
+	
+	public TestProjectType() {
+		cfgs[0] = new TestConfiguration(new TestToolchain());
+	}
+	
+	public boolean checkForMigrationSupport() {	return false; }
+
+	public IConfiguration createConfiguration(IConfiguration parent, String id,
+			String name) { return null; }
+	public IProjectBuildMacroSupplier getBuildMacroSupplier() { return null; }
+	public IConfiguration getConfiguration(String id) {	return null; }
+	public IConfigurationNameProvider getConfigurationNameProvider() { return null; }
+	public IConfiguration[] getConfigurations() { return cfgs; }
+	public String getConvertToId() { return null; }
+	public IProjectEnvironmentVariableSupplier getEnvironmentVariableSupplier() { return null; }
+	public String getNameAttribute() { return null; }
+	public IProjectType getSuperClass() { return null; }
+	public String getUnusedChildren() { return null; }
+	public boolean isAbstract() { return false; }
+	public boolean isSupported() { return false; }
+	public boolean isTestProjectType() { return false; }
+	public void removeConfiguration(String id) {}
+	public void setConvertToId(String convertToId) {}
+	public void setIsAbstract(boolean b) {}
+	public String getBaseId() {	return null; }
+	public String getId() { return null; }
+	public String getManagedBuildRevision() { return null; }
+	public String getName() { return null; }
+	public PluginVersionIdentifier getVersion() { return null; }
+	public void setVersion(PluginVersionIdentifier version) {}
+	public IBuildObjectProperties getBuildProperties() { return null; }
+
+	public IBuildPropertyValue getBuildArtefactType() {
+		return null;
+	}
+
+	public boolean isSystemObject() {
+		return isTestProjectType();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestToolchain.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestToolchain.java
new file mode 100644
index 0000000..08fa5bf
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/util/TestToolchain.java
@@ -0,0 +1,316 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Texas Instruments Incorporated and others.
+ * 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
+ *
+ * Contributors:
+ *     Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.util;
+
+import org.eclipse.cdt.core.settings.model.extension.CTargetPlatformData;
+import org.eclipse.cdt.managedbuilder.core.IBuilder;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IFolderInfo;
+import org.eclipse.cdt.managedbuilder.core.IOutputType;
+import org.eclipse.cdt.managedbuilder.core.IOptionPathConverter;
+import org.eclipse.cdt.managedbuilder.core.IResourceInfo;
+import org.eclipse.cdt.managedbuilder.core.ITargetPlatform;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.internal.core.HoldsOptions;
+import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier;
+import org.eclipse.cdt.managedbuilder.macros.IConfigurationBuildMacroSupplier;
+import org.eclipse.core.runtime.PluginVersionIdentifier;
+
+public class TestToolchain extends HoldsOptions implements IToolChain {
+
+	public TestToolchain() {
+		super(true /* resolved */);
+		// TODO Auto-generated constructor stub
+	}
+
+	public String getManagedBuildRevision() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public PluginVersionIdentifier getVersion() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setVersion(PluginVersionIdentifier version) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public IConfigurationBuildMacroSupplier getBuildMacroSupplier() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IConfiguration getParent() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITargetPlatform createTargetPlatform(ITargetPlatform superClass,
+			String Id, String name, boolean isExtensionElement) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITargetPlatform getTargetPlatform() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void removeLocalTargetPlatform() {
+		// TODO Auto-generated method stub
+
+	}
+
+	public String getVersionsSupported() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getConvertToId() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setVersionsSupported(String versionsSupported) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public void setConvertToId(String convertToId) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public IBuilder createBuilder(IBuilder superClass, String Id, String name,
+			boolean isExtensionElement) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void removeLocalBuilder() {
+		// TODO Auto-generated method stub
+
+	}
+
+	public IBuilder getBuilder() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool createTool(ITool superClass, String Id, String name,
+			boolean isExtensionElement) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool[] getTools() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool getTool(String id) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public ITool[] getToolsBySuperClassId(String id) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IToolChain getSuperClass() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public boolean isAbstract() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public void setIsAbstract(boolean b) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public String getUnusedChildren() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String[] getOSList() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setOSList(String[] OSs) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public String[] getArchList() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setArchList(String[] archs) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public String getErrorParserIds() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getErrorParserIds(IConfiguration config) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String[] getErrorParserList() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setErrorParserIds(String ids) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public String getScannerConfigDiscoveryProfileId() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setScannerConfigDiscoveryProfileId(String profileId) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public String getTargetToolIds() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setTargetToolIds(String targetToolIds) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public String[] getTargetToolList() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IOutputType[] getSecondaryOutputs() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setSecondaryOutputs(String ids) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public boolean isDirty() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public void setDirty(boolean isDirty) {
+		// TODO Auto-generated method stub
+
+	}
+
+	public boolean isExtensionElement() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean isSupported() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getId() {
+		return id;
+	
+	}
+
+	public String getName() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	private String id = null;
+	
+	public void setID(String id)
+	{
+		this.id = id;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.IToolChain#getPathConverter()
+	 */
+	public IOptionPathConverter getOptionPathConverter() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	protected IResourceInfo getParentResourceInfo() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IFolderInfo getParentFolderInfo() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public CTargetPlatformData getTargetPlatformData() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getUniqueRealName() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public boolean isSystemObject() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean matches(IToolChain tc) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public boolean supportsBuild(boolean managed) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+	
+	
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/AlwaysPresentWizardPage.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/AlwaysPresentWizardPage.java
new file mode 100644
index 0000000..ad449f8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/AlwaysPresentWizardPage.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Texas Instruments Incorporated and others.
+ * 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
+ *
+ * Contributors:
+ *     Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class AlwaysPresentWizardPage extends MBSCustomPage
+{
+
+	private Composite composite;
+
+	public AlwaysPresentWizardPage()
+	{
+		pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.AlwaysPresentWizardPage";
+	}
+
+	public boolean canFlipToNextPage()
+	{
+
+		return (MBSCustomPageManager.getNextPage(pageID) != null);
+	}
+
+	public String getName()
+	{
+		return new String("Always Present Page");
+	}
+
+
+	public void createControl(Composite parent)
+	{
+
+		composite = new Composite(parent, SWT.NULL);
+		composite.setLayout(new GridLayout());
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		Text pageText = new Text(composite, SWT.CENTER);
+		pageText.setBounds(composite.getBounds());
+		pageText.setText("This page is a test page provided by the org.eclipse.cdt.managedbuilder.ui.tests plugin.");
+		pageText.setVisible(true);
+
+	}
+
+	public void dispose()
+	{
+		composite.dispose();
+
+	}
+
+	public Control getControl()
+	{
+		return composite;
+	}
+
+	public String getDescription()
+	{
+		return new String("This page is for testing, please ignore it.");
+	}
+
+	public String getErrorMessage()
+	{
+		return null;
+	}
+
+	public Image getImage()
+	{
+		return wizard.getDefaultPageImage();
+	}
+
+	public String getMessage()
+	{
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getTitle()
+	{
+		return new String("Test Page");
+	}
+
+	public void performHelp()
+	{
+		// do nothing
+
+	}
+
+	public void setDescription(String description)
+	{
+		// do nothing
+
+	}
+
+	public void setImageDescriptor(ImageDescriptor image)
+	{
+		// do nothing
+
+	}
+
+	public void setTitle(String title)
+	{
+		// do nothing
+
+	}
+
+	public void setVisible(boolean visible)
+	{
+		composite.setVisible(visible);
+
+	}
+
+	protected boolean isCustomPageComplete()
+	{
+		return true;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/NatureAWizardPage.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/NatureAWizardPage.java
new file mode 100644
index 0000000..627adac
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/NatureAWizardPage.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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
+ * 
+ * Contributors:
+ *     Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class NatureAWizardPage extends MBSCustomPage
+{
+
+	private Composite composite;
+
+	public NatureAWizardPage()
+	{
+		pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.NatureAWizardPage";
+	}
+
+	public String getName()
+	{
+		return new String("Nature A Wizard Page");
+	}
+
+	public void createControl(Composite parent)
+	{
+
+		composite = new Composite(parent, SWT.NULL);
+		composite.setLayout(new GridLayout());
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		Text pageText = new Text(composite, SWT.CENTER);
+		pageText.setBounds(composite.getBounds());
+		pageText.setText("Nature A Wizard Page");
+		pageText.setVisible(true);
+
+	}
+
+	public void dispose()
+	{
+		composite.dispose();
+
+	}
+
+	public Control getControl()
+	{
+		return composite;
+	}
+
+	public String getDescription()
+	{
+		return new String("My description");
+	}
+
+	public String getErrorMessage()
+	{
+		return new String("My error msg");
+	}
+
+	public Image getImage()
+	{
+		return wizard.getDefaultPageImage();
+	}
+
+	public String getMessage()
+	{
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getTitle()
+	{
+		return new String("My Title");
+	}
+
+	public void performHelp()
+	{
+		// do nothing
+
+	}
+
+	public void setDescription(String description)
+	{
+		// do nothing
+
+	}
+
+	public void setImageDescriptor(ImageDescriptor image)
+	{
+		// do nothing
+
+	}
+
+	public void setTitle(String title)
+	{
+		// do nothing
+
+	}
+
+	public void setVisible(boolean visible)
+	{
+		composite.setVisible(visible);
+
+	}
+
+	protected boolean isCustomPageComplete()
+	{
+		return true;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/NatureBWizardPage.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/NatureBWizardPage.java
new file mode 100644
index 0000000..614d031
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/NatureBWizardPage.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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
+ * 
+ * Contributors:
+ *     Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class NatureBWizardPage extends MBSCustomPage
+{
+
+	private Composite composite;
+
+	public NatureBWizardPage()
+	{
+		pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.NatureBWizardPage";
+	}
+
+	public String getName()
+	{
+		return new String("Nature B Wizard Page");
+	}
+
+	public void createControl(Composite parent)
+	{
+
+		composite = new Composite(parent, SWT.NULL);
+		composite.setLayout(new GridLayout());
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		Text pageText = new Text(composite, SWT.CENTER);
+		pageText.setBounds(composite.getBounds());
+		pageText.setText("Nature B Wizard Page");
+		pageText.setVisible(true);
+
+	}
+
+	public void dispose()
+	{
+		composite.dispose();
+
+	}
+
+	public Control getControl()
+	{
+		return composite;
+	}
+
+	public String getDescription()
+	{
+		return new String("My description");
+	}
+
+	public String getErrorMessage()
+	{
+		return new String("My error msg");
+	}
+
+	public Image getImage()
+	{
+		return wizard.getDefaultPageImage();
+	}
+
+	public String getMessage()
+	{
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getTitle()
+	{
+		return new String("My Title");
+	}
+
+	public void performHelp()
+	{
+		// do nothing
+
+	}
+
+	public void setDescription(String description)
+	{
+		// do nothing
+
+	}
+
+	public void setImageDescriptor(ImageDescriptor image)
+	{
+		// do nothing
+
+	}
+
+	public void setTitle(String title)
+	{
+		// do nothing
+
+	}
+
+	public void setVisible(boolean visible)
+	{
+		composite.setVisible(visible);
+
+	}
+
+	protected boolean isCustomPageComplete()
+	{
+		return true;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ProjectTypeDWizardPage.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ProjectTypeDWizardPage.java
new file mode 100644
index 0000000..f1c69b5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ProjectTypeDWizardPage.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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
+ * 
+ * Contributors:
+ *     Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class ProjectTypeDWizardPage extends MBSCustomPage
+{
+
+	private Composite composite;
+
+	public ProjectTypeDWizardPage()
+	{
+		pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ProjectTypeDWizardPage";
+	}
+
+	public String getName()
+	{
+		return new String("Project Type D WizardPage");
+	}
+
+	public void createControl(Composite parent)
+	{
+
+		composite = new Composite(parent, SWT.NULL);
+		composite.setLayout(new GridLayout());
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		Text pageText = new Text(composite, SWT.CENTER);
+		pageText.setBounds(composite.getBounds());
+		pageText.setText("Project Type D WizardPage");
+		pageText.setVisible(true);
+
+	}
+
+	public void dispose()
+	{
+		composite.dispose();
+
+	}
+
+	public Control getControl()
+	{
+		return composite;
+	}
+
+	public String getDescription()
+	{
+		return new String("My description");
+	}
+
+	public String getErrorMessage()
+	{
+		return new String("My error msg");
+	}
+
+	public Image getImage()
+	{
+		return wizard.getDefaultPageImage();
+	}
+
+	public String getMessage()
+	{
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getTitle()
+	{
+		return new String("My Title");
+	}
+
+	public void performHelp()
+	{
+		// do nothing
+
+	}
+
+	public void setDescription(String description)
+	{
+		// do nothing
+
+	}
+
+	public void setImageDescriptor(ImageDescriptor image)
+	{
+		// do nothing
+
+	}
+
+	public void setTitle(String title)
+	{
+		// do nothing
+
+	}
+
+	public void setVisible(boolean visible)
+	{
+		composite.setVisible(visible);
+
+	}
+
+	protected boolean isCustomPageComplete()
+	{
+		return true;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ProjectTypeEWizardPage.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ProjectTypeEWizardPage.java
new file mode 100644
index 0000000..3aa7be6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ProjectTypeEWizardPage.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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
+ * 
+ * Contributors:
+ *     Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class ProjectTypeEWizardPage extends MBSCustomPage
+{
+
+	private Composite composite;
+
+	public ProjectTypeEWizardPage()
+	{
+		pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ProjectTypeEWizardPage";
+	}
+
+	public String getName()
+	{
+		return new String("Project Type E WizardPage");
+	}
+
+	public void createControl(Composite parent)
+	{
+
+		composite = new Composite(parent, SWT.NULL);
+		composite.setLayout(new GridLayout());
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		Text pageText = new Text(composite, SWT.CENTER);
+		pageText.setBounds(composite.getBounds());
+		pageText.setText("Project Type E WizardPage");
+		pageText.setVisible(true);
+
+	}
+
+	public void dispose()
+	{
+		composite.dispose();
+
+	}
+
+	public Control getControl()
+	{
+		return composite;
+	}
+
+	public String getDescription()
+	{
+		return new String("My description");
+	}
+
+	public String getErrorMessage()
+	{
+		return new String("My error msg");
+	}
+
+	public Image getImage()
+	{
+		return wizard.getDefaultPageImage();
+	}
+
+	public String getMessage()
+	{
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getTitle()
+	{
+		return new String("My Title");
+	}
+
+	public void performHelp()
+	{
+		// do nothing
+
+	}
+
+	public void setDescription(String description)
+	{
+		// do nothing
+
+	}
+
+	public void setImageDescriptor(ImageDescriptor image)
+	{
+		// do nothing
+
+	}
+
+	public void setTitle(String title)
+	{
+		// do nothing
+
+	}
+
+	public void setVisible(boolean visible)
+	{
+		composite.setVisible(visible);
+
+	}
+
+	protected boolean isCustomPageComplete()
+	{
+		return true;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/TestRunnable.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/TestRunnable.java
new file mode 100644
index 0000000..5583906
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/TestRunnable.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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
+ * 
+ * Contributors:
+ *     Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import java.lang.Runnable;
+import org.eclipse.cdt.managedbuilder.ui.tests.TestCustomPageManager;
+
+public class TestRunnable implements Runnable
+{
+
+	/* (non-Javadoc)
+	 * @see java.lang.Runnable#run()
+	 */
+	public void run()
+	{
+		TestCustomPageManager.testFlag = true;
+		
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainCWizardPage.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainCWizardPage.java
new file mode 100644
index 0000000..efb45aa
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainCWizardPage.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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
+ * 
+ * Contributors:
+ *     Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class ToolchainCWizardPage extends MBSCustomPage
+{
+
+	private Composite composite;
+
+	public ToolchainCWizardPage()
+	{
+		pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainCWizardPage";
+	}
+
+	public String getName()
+	{
+		return new String("Toolchain C Wizard Page");
+	}
+
+	public void createControl(Composite parent)
+	{
+
+		composite = new Composite(parent, SWT.NULL);
+		composite.setLayout(new GridLayout());
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		Text pageText = new Text(composite, SWT.CENTER);
+		pageText.setBounds(composite.getBounds());
+		pageText.setText("Toolchain C Wizard Page");
+		pageText.setVisible(true);
+
+	}
+
+	public void dispose()
+	{
+		composite.dispose();
+
+	}
+
+	public Control getControl()
+	{
+		return composite;
+	}
+
+	public String getDescription()
+	{
+		return new String("My description");
+	}
+
+	public String getErrorMessage()
+	{
+		return new String("My error msg");
+	}
+
+	public Image getImage()
+	{
+		return wizard.getDefaultPageImage();
+	}
+
+	public String getMessage()
+	{
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getTitle()
+	{
+		return new String("My Title");
+	}
+
+	public void performHelp()
+	{
+		// do nothing
+
+	}
+
+	public void setDescription(String description)
+	{
+		// do nothing
+
+	}
+
+	public void setImageDescriptor(ImageDescriptor image)
+	{
+		// do nothing
+
+	}
+
+	public void setTitle(String title)
+	{
+		// do nothing
+
+	}
+
+	public void setVisible(boolean visible)
+	{
+		composite.setVisible(visible);
+
+	}
+
+	protected boolean isCustomPageComplete()
+	{
+		return true;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainCv20WizardPage.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainCv20WizardPage.java
new file mode 100644
index 0000000..ec9968b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainCv20WizardPage.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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
+ * 
+ * Contributors:
+ *     Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class ToolchainCv20WizardPage extends MBSCustomPage
+{
+
+	private Composite composite;
+
+	public ToolchainCv20WizardPage()
+	{
+		pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainCv20WizardPage";
+	}
+
+	public String getName()
+	{
+		return new String("Toolchain C v 2.0 Wizard Page");
+	}
+
+	public void createControl(Composite parent)
+	{
+
+		composite = new Composite(parent, SWT.NULL);
+		composite.setLayout(new GridLayout());
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		Text pageText = new Text(composite, SWT.CENTER);
+		pageText.setBounds(composite.getBounds());
+		pageText.setText("Toolchain C v 2.0 Wizard Page");
+		pageText.setVisible(true);
+
+	}
+
+	public void dispose()
+	{
+		composite.dispose();
+
+	}
+
+	public Control getControl()
+	{
+		return composite;
+	}
+
+	public String getDescription()
+	{
+		return new String("My description");
+	}
+
+	public String getErrorMessage()
+	{
+		return new String("My error msg");
+	}
+
+	public Image getImage()
+	{
+		return wizard.getDefaultPageImage();
+	}
+
+	public String getMessage()
+	{
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getTitle()
+	{
+		return new String("My Title");
+	}
+
+	public void performHelp()
+	{
+		// do nothing
+
+	}
+
+	public void setDescription(String description)
+	{
+		// do nothing
+
+	}
+
+	public void setImageDescriptor(ImageDescriptor image)
+	{
+		// do nothing
+
+	}
+
+	public void setTitle(String title)
+	{
+		// do nothing
+
+	}
+
+	public void setVisible(boolean visible)
+	{
+		composite.setVisible(visible);
+
+	}
+
+	protected boolean isCustomPageComplete()
+	{
+		return true;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainFWizardPage.java b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainFWizardPage.java
new file mode 100644
index 0000000..00ffc54
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/wizardPages/ToolchainFWizardPage.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Texas Instruments Incorporated and others.
+ * 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
+ * 
+ * Contributors:
+ *     Texas Instruments - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.managedbuilder.ui.tests.wizardPages;
+
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.SWT;
+
+public class ToolchainFWizardPage extends MBSCustomPage
+{
+
+	private Composite composite;
+
+	public ToolchainFWizardPage()
+	{
+		pageID = "org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainFWizardPage";
+	}
+
+	public String getName()
+	{
+		return new String("Toolchain F Wizard Page");
+	}
+
+	public void createControl(Composite parent)
+	{
+
+		composite = new Composite(parent, SWT.NULL);
+		composite.setLayout(new GridLayout());
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		Text pageText = new Text(composite, SWT.CENTER);
+		pageText.setBounds(composite.getBounds());
+		pageText.setText("Toolchain F Wizard Page");
+		pageText.setVisible(true);
+
+	}
+
+	public void dispose()
+	{
+		composite.dispose();
+
+	}
+
+	public Control getControl()
+	{
+		return composite;
+	}
+
+	public String getDescription()
+	{
+		return new String("My description");
+	}
+
+	public String getErrorMessage()
+	{
+		return new String("My error msg");
+	}
+
+	public Image getImage()
+	{
+		return wizard.getDefaultPageImage();
+	}
+
+	public String getMessage()
+	{
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getTitle()
+	{
+		return new String("My Title");
+	}
+
+	public void performHelp()
+	{
+		// do nothing
+
+	}
+
+	public void setDescription(String description)
+	{
+		// do nothing
+
+	}
+
+	public void setImageDescriptor(ImageDescriptor image)
+	{
+		// do nothing
+
+	}
+
+	public void setTitle(String title)
+	{
+		// do nothing
+
+	}
+
+	public void setVisible(boolean visible)
+	{
+		composite.setVisible(visible);
+
+	}
+
+	protected boolean isCustomPageComplete()
+	{
+		return true;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.debug.ui/.classpath b/results/plugins/org.eclipse.cdt.mylyn.ui/.classpath
similarity index 100%
copy from results/plugins/org.eclipse.cdt.debug.ui/.classpath
copy to results/plugins/org.eclipse.cdt.mylyn.ui/.classpath
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/.project b/results/plugins/org.eclipse.cdt.mylyn.ui/.project
new file mode 100644
index 0000000..d6c138e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.mylyn.ui</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/.settings/org.eclipse.jdt.core.prefs b/results/plugins/org.eclipse.cdt.mylyn.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..cc62c85
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Fri Mar 07 14:55:44 EST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.cdt.mylyn.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..bbeb2d2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,33 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.cdt.mylyn.ui;singleton:=true
+Bundle-Version: 1.0.100.qualifier
+Bundle-Vendor: %bundleVendor
+Require-Bundle: org.eclipse.cdt.core;bundle-version="5.0.0",
+ org.eclipse.mylyn.context.core;bundle-version="3.0.0",
+ org.eclipse.ui,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.mylyn.resources.ui;bundle-version="3.0.0",
+ org.eclipse.mylyn.monitor.core;bundle-version="3.0.0",
+ org.eclipse.cdt.ui;bundle-version="5.0.0",
+ org.eclipse.ui.views,
+ org.eclipse.ui.ide,
+ org.eclipse.mylyn.context.ui;bundle-version="3.0.0",
+ org.eclipse.mylyn.monitor.ui;bundle-version="3.0.0",
+ org.eclipse.jface.text,
+ org.eclipse.ui.editors;bundle-version="3.4.0",
+ org.eclipse.mylyn.tasks.ui;bundle-version="3.0.0",
+ org.eclipse.ui.forms;bundle-version="3.3.100",
+ org.eclipse.mylyn.tasks.core;bundle-version="3.0.0",
+ org.eclipse.ui.navigator;bundle-version="3.3.100",
+ org.eclipse.mylyn.commons.core;bundle-version="3.0.0"
+Export-Package: org.eclipse.cdt.mylyn.internal.ui;x-internal:=true,
+ org.eclipse.cdt.mylyn.internal.ui.actions;x-internal:=true,
+ org.eclipse.cdt.mylyn.internal.ui.editor;x-internal:=true
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Localization: plugin
+Bundle-Activator: org.eclipse.cdt.mylyn.internal.ui.CDTUIBridgePlugin
+Import-Package: com.ibm.icu.text
diff --git a/results/plugins/org.eclipse.cdt.core.aix/about.html b/results/plugins/org.eclipse.cdt.mylyn.ui/about.html
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.aix/about.html
copy to results/plugins/org.eclipse.cdt.mylyn.ui/about.html
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/build.properties b/results/plugins/org.eclipse.cdt.mylyn.ui/build.properties
new file mode 100644
index 0000000..158afa1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/build.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2008 Red Hat Inc. and others.
+# 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
+#
+# Contributors:
+#     Red Hat Inc. - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+               META-INF/,\
+               .,\
+               plugin.properties,\
+               icons/,\
+               about.html
+src.includes = about.html
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/focus-disabled.gif b/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/focus-disabled.gif
new file mode 100644
index 0000000..24bbeae
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/focus-disabled.gif differ
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/focus.gif b/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/focus.gif
new file mode 100644
index 0000000..bf8439c
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/focus.gif differ
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/interest-decrease.gif b/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/interest-decrease.gif
new file mode 100644
index 0000000..645a58f
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/interest-decrease.gif differ
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/interest-folding.gif b/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/interest-folding.gif
new file mode 100644
index 0000000..bf8439c
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/interest-folding.gif differ
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/interest-increase.gif b/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/interest-increase.gif
new file mode 100644
index 0000000..98a2586
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.mylyn.ui/icons/elcl16/interest-increase.gif differ
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/icons/etool16/browse-filtered.gif b/results/plugins/org.eclipse.cdt.mylyn.ui/icons/etool16/browse-filtered.gif
new file mode 100644
index 0000000..273bda0
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.mylyn.ui/icons/etool16/browse-filtered.gif differ
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/icons/wizban/banner-prefs.gif b/results/plugins/org.eclipse.cdt.mylyn.ui/icons/wizban/banner-prefs.gif
new file mode 100644
index 0000000..ce0f6e3
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.mylyn.ui/icons/wizban/banner-prefs.gif differ
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/plugin.properties b/results/plugins/org.eclipse.cdt.mylyn.ui/plugin.properties
new file mode 100644
index 0000000..31a585c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/plugin.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2008, 2009 Red Hat Inc. and others.
+# 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
+#
+# Contributors:
+#     Red Hat Inc. - initial API and implementation
+#	  IBM Corporation
+###############################################################################
+bundleVendor = Eclipse CDT
+bundleName = Mylyn Bridge: C/C++ Development
+structureBridge.name = CDT Structure Bridge
+
+MarkLandmark.label=Mark as Landmark
+MarkLandmark.tooltip=Mark the selected element as a landmark
+RemoveFromContext.label=Remove from Context
+RemoveFromContext.tooltip=Mark selected element as uninteresting
+ShowFilteredChildren.label=Show Filtered Children
+ShowFilteredChildren.tooltip=Show filtered children of selected element, if any exist
+FocusActiveTask.label=Focus on Active Task
+FocusActiveTask.tooltip=Focus only on elements in active Mylyn task
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/plugin.xml b/results/plugins/org.eclipse.cdt.mylyn.ui/plugin.xml
new file mode 100644
index 0000000..47c606f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/plugin.xml
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+   <extension
+         point="org.eclipse.mylyn.context.core.bridges">
+      <structureBridge
+            class="org.eclipse.cdt.mylyn.internal.ui.CDTStructureBridge"
+            name="%structureBridge.name"
+            parentContentType="resource">
+      </structureBridge>
+   </extension>
+   <extension
+         point="org.eclipse.mylyn.context.ui.bridges">
+      <uiBridge
+            class="org.eclipse.cdt.mylyn.internal.ui.CDTUiBridge"
+            contentType="c/c++">
+      </uiBridge>
+      <labelProvider
+            class="org.eclipse.cdt.mylyn.internal.ui.CDTContextLabelProvider"
+            contentType="c/c++">
+      </labelProvider>
+      <preservedFilters
+            viewId="org.eclipse.cdt.ui.CView">
+         <filter
+               class="org.eclipse.cdt.mylyn.internal.ui.CDTDeclarationsFilter">
+         </filter>
+      </preservedFilters>
+   </extension>
+   <extension
+       point="org.eclipse.mylyn.context.ui.startup">
+      <startup
+          class="org.eclipse.cdt.mylyn.internal.ui.CDTUIBridgePlugin$CDTUIBridgeStartup">
+    </startup>
+   </extension>
+   <extension
+         point="org.eclipse.ui.viewActions">
+      <viewContribution
+            id="org.eclipse.cdt.mylyn.ui.cview.contribution"
+            targetID="org.eclipse.cdt.ui.CView">
+         <action
+               class="org.eclipse.cdt.mylyn.internal.ui.actions.FocusCViewAction"
+               disabledIcon="icons/elcl16/focus-disabled.gif"
+               enablesFor="*"
+               icon="icons/elcl16/focus.gif"
+               id="org.eclipse.cdt.mylyn.ui.cview.focusActiveTask.action"
+               label="%FocusActiveTask.label"
+               menubarPath="mylyn"
+               style="toggle"
+               toolbarPath="mylyn"
+               tooltip="%FocusActiveTask.tooltip">
+         </action>
+      </viewContribution>
+   </extension>
+   <extension
+         point="org.eclipse.ui.popupMenus">
+      <objectContribution
+            adaptable="false"
+            id="org.eclipse.cdt.mylyn.ui.interest.increase.contribution"
+            objectClass="org.eclipse.cdt.core.model.ICElement">
+         <action
+               class="org.eclipse.mylyn.internal.context.ui.actions.InterestIncrementAction"
+               definitionId="org.eclipse.mylyn.context.ui.commands.interest.increment"
+               enablesFor="*"
+               icon="icons/elcl16/interest-increase.gif"
+               id="org.eclipse.cdt.mylyn.ui.markAsLandmark.action"
+               label="%MarkLandmark.label"
+               menubarPath="group.reorganize"
+               tooltip="%MarkLandmark.tooltip">
+         </action>
+         <visibility>
+            <and>
+               <systemProperty
+                     name="org.eclipse.mylyn.context.core.context.active"
+                     value="true">
+               </systemProperty>
+               <or>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.IFunction">
+                  </objectClass>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.IMethod">
+                  </objectClass>
+               </or>
+            </and>
+         </visibility>
+      </objectContribution>
+      <objectContribution
+            adaptable="false"
+            id="org.eclipse.cdt.mylyn.ui.interest.remove.contribution.elements"
+            objectClass="org.eclipse.cdt.core.model.ICElement">
+         <action
+               class="org.eclipse.mylyn.internal.context.ui.actions.InterestDecrementAction"
+               definitionId="org.eclipse.mylyn.context.ui.commands.interest.decrement"
+               enablesFor="*"
+               icon="icons/elcl16/interest-decrease.gif"
+               id="org.eclipse.mylyn.cdt.ui.interest.decrease.element"
+               label="%RemoveFromContext.label"
+               menubarPath="group.reorganize"
+               tooltip="%RemoveFromContext.tooltip">
+         </action>
+         <visibility>
+            <and>
+               <systemProperty
+                     name="org.eclipse.mylyn.context.core.context.active"
+                     value="true">
+               </systemProperty>
+               <or>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.IMethod">
+                  </objectClass>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.IFunction">
+                  </objectClass>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.IStructureDeclaration">
+                  </objectClass>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.IDeclaration">
+                  </objectClass>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.IUsing">
+                  </objectClass>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.ITypeDef">
+                  </objectClass>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.IMacro">
+                  </objectClass>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.INamespace">
+                  </objectClass>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.IInclude">
+                  </objectClass>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.IIncludeReference">
+                  </objectClass>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.IEnumerator">
+                  </objectClass>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.IContributedCElement">
+                  </objectClass>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.IBinaryElement">
+                  </objectClass>
+                  <objectClass
+                        name="org.eclipse.cdt.core.model.IBinary">
+                  </objectClass>
+               </or>
+            </and>
+         </visibility>
+      </objectContribution>
+      <viewerContribution
+            id="org.eclipse.cdt.mylyn.ui.browse.filtered.contribution"
+            targetID="org.eclipse.cdt.ui.CView">
+         <action
+               class="org.eclipse.cdt.mylyn.internal.ui.actions.ShowFilteredChildrenAction"
+               enablesFor="1"
+               icon="icons/etool16/browse-filtered.gif"
+               id="org.eclipse.mylyn.cdt.ui.action3"
+               label="%ShowFilteredChildren.label"
+               menubarPath="group.reorganize"
+               tooltip="%ShowFilteredChildren.tooltip">
+         </action>
+         <visibility>
+            <systemProperty
+                  name="org.eclipse.mylyn.context.core.context.active"
+                  value="true">
+            </systemProperty>
+         </visibility>
+      </viewerContribution>
+   </extension>
+   <extension
+         point="org.eclipse.ui.navigator.viewer">
+      <viewerContentBinding
+            viewerId="org.eclipse.mylyn.context.ui.navigator.context">
+         <includes>
+            <contentExtension
+                  pattern="org.eclipse.cdt.ui.navigator.content">
+            </contentExtension>
+         </includes>
+      </viewerContentBinding>
+      <viewerContentBinding
+            viewerId="org.eclipse.mylyn.context.ui.navigator.context.quick">
+         <includes>
+            <contentExtension
+                  pattern="org.eclipse.cdt.ui.navigator.content">
+            </contentExtension>
+         </includes>
+      </viewerContentBinding>
+   </extension>
+</plugin>
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/ActiveFoldingEditorTracker.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/ActiveFoldingEditorTracker.java
new file mode 100644
index 0000000..cdda555
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/ActiveFoldingEditorTracker.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ *******************************************************************************/
+package org.eclipse.cdt.mylyn.internal.ui;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.mylyn.internal.ui.editor.ActiveFoldingListener;
+import org.eclipse.mylyn.monitor.ui.AbstractEditorTracker;
+import org.eclipse.ui.IEditorPart;
+
+/**
+ * @author Mik Kersten
+ * @author Jeff Johnston
+ */
+public class ActiveFoldingEditorTracker extends AbstractEditorTracker {
+
+	protected Map<CEditor, ActiveFoldingListener> editorListenerMap = new HashMap<CEditor, ActiveFoldingListener>();
+
+	@Override
+	public void editorOpened(IEditorPart part) {
+		if (part instanceof CEditor)
+			registerEditor((CEditor) part);
+	}
+
+	@Override
+	public void editorClosed(IEditorPart part) {
+		if (part instanceof CEditor)
+			unregisterEditor((CEditor) part);
+	}
+
+	public void registerEditor(final CEditor editor) {
+		if (editorListenerMap.containsKey(editor)) {
+			return;
+		} else {
+			ActiveFoldingListener listener = new ActiveFoldingListener(editor);
+			editorListenerMap.put(editor, listener);
+		}
+	}
+
+	public void unregisterEditor(CEditor editor) {
+		ActiveFoldingListener listener = editorListenerMap.get(editor);
+		if (listener != null) {
+			listener.dispose();
+		}
+		editorListenerMap.remove(editor);
+	}
+
+	/**
+	 * For testing.
+	 */
+	public Map<CEditor, ActiveFoldingListener> getEditorListenerMap() {
+		return editorListenerMap;
+	}
+
+	@Override
+	protected void editorBroughtToTop(IEditorPart part) {
+		// ignore
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTContextLabelProvider.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTContextLabelProvider.java
new file mode 100644
index 0000000..e19fb59
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTContextLabelProvider.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ *******************************************************************************/
+/*
+ * Created on Aug 6, 2004
+ * Modified for CDT usage Feb 28, 2008
+ */
+package org.eclipse.cdt.mylyn.internal.ui;
+
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
+import org.eclipse.cdt.internal.ui.viewsupport.CElementImageProvider;
+import org.eclipse.cdt.internal.ui.viewsupport.ProblemsLabelDecorator;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.mylyn.context.core.IInteractionElement;
+import org.eclipse.mylyn.context.core.IInteractionRelation;
+import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
+import org.eclipse.mylyn.internal.context.ui.ContextUiImages;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author Mik Kersten
+ * @author Jeff Johnston
+ */
+public class CDTContextLabelProvider extends AppearanceAwareLabelProvider {
+
+	private static final String LABEL_ELEMENT_MISSING_KEY = "MylynCDT.missingElementLabel"; // $NON-NLS-1$
+	private static final String CONTAINMENT_RELATION_NAME_KEY = "MylynCDT.containmentRelation"; // $NON-NLS-1$
+
+	public CDTContextLabelProvider() {
+		super(AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS,
+				AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | CElementImageProvider.SMALL_ICONS);
+	}
+
+	@Override
+	public String getText(Object object) {
+		if (object instanceof IInteractionElement) {
+			IInteractionElement node = (IInteractionElement) object;
+			if (CDTStructureBridge.CONTENT_TYPE.equals(node.getContentType())) {
+				ICElement element = CDTStructureBridge.getElementForHandle(node.getHandleIdentifier());
+				if (element == null) {
+					return CDTUIBridgePlugin.getResourceString(LABEL_ELEMENT_MISSING_KEY);
+				} else {
+					return getTextForElement(element);
+				}
+			}
+		} else if (object instanceof IInteractionRelation) {
+			return getNameForRelationship(((IInteractionRelation) object).getRelationshipHandle());
+		} else if (object instanceof ICElement) {
+			return getTextForElement((ICElement) object);
+		}
+		return super.getText(object);
+	}
+
+	private String getTextForElement(ICElement element) {
+		// FIXME: Removed due to missing interface in 3.0.  Should this test be done somehow?
+//		if (DelegatingContextLabelProvider.isQualifyNamesMode()) {
+//			if (element instanceof IMethod || element instanceof IFunction) {
+//				String parentName = ((ICElement) element).getParent().getElementName();
+//				if (parentName != null && parentName != "") {
+//					return parentName + '.' + super.getText(element);
+//				}
+//			}
+//		}
+		if (element.exists()) {
+			return super.getText(element);
+		} else {
+			return CDTUIBridgePlugin.getResourceString(LABEL_ELEMENT_MISSING_KEY);
+		}
+	}
+
+	@Override
+	public Image getImage(Object object) {
+		if (object instanceof IInteractionElement) {
+			IInteractionElement node = (IInteractionElement) object;
+			if (node.getContentType().equals(CDTStructureBridge.CONTENT_TYPE)) {
+				ICElement element = CDTStructureBridge.getElementForHandle(node.getHandleIdentifier());
+				if (element != null)
+					return super.getImage(element);
+				return null;
+			}
+		} else if (object instanceof IInteractionRelation) {
+			ImageDescriptor descriptor = getIconForRelationship(((IInteractionRelation) object).getRelationshipHandle());
+			if (descriptor != null) {
+				return ContextUiImages.getImage(descriptor);
+			} else {
+				return null;
+			}
+		}
+		return super.getImage(object);
+	}
+
+	private ImageDescriptor getIconForRelationship(String relationshipHandle) {
+		// We have no relation providers for the CDT
+		return null;
+	}
+
+	private String getNameForRelationship(String relationshipHandle) {
+		if (relationshipHandle.equals(InteractionContextManager.CONTAINMENT_PROPAGATION_ID)) {
+			return CDTUIBridgePlugin.getResourceString(CONTAINMENT_RELATION_NAME_KEY);
+		} else {
+			return null;
+		}
+	}
+
+	public static AppearanceAwareLabelProvider createCDTUiLabelProvider() {
+		AppearanceAwareLabelProvider cdtUiLabelProvider = new AppearanceAwareLabelProvider(
+				AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS,
+				AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | CElementImageProvider.SMALL_ICONS);
+		cdtUiLabelProvider.addLabelDecorator(new ProblemsLabelDecorator(null));
+		return cdtUiLabelProvider;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTDeclarationsFilter.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTDeclarationsFilter.java
new file mode 100644
index 0000000..54c45b5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTDeclarationsFilter.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.cdt.mylyn.internal.ui;
+
+import org.eclipse.cdt.core.model.IFunction;
+import org.eclipse.cdt.core.model.IMethod;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+/**
+ * @author Mik Kersten
+ * @author Jeff Johnston
+ */
+public class CDTDeclarationsFilter extends ViewerFilter {
+
+	@Override
+	public boolean select(Viewer viewer, Object parent, Object element) {
+		return !((element instanceof IMethod || element instanceof IFunction));
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTEditorMonitor.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTEditorMonitor.java
new file mode 100644
index 0000000..0c1cc9c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTEditorMonitor.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.cdt.mylyn.internal.ui;
+
+import java.util.Iterator;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IFunction;
+import org.eclipse.cdt.core.model.IMethod;
+import org.eclipse.cdt.internal.ui.actions.SelectionConverter;
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.mylyn.commons.core.StatusHandler;
+import org.eclipse.mylyn.monitor.ui.AbstractUserInteractionMonitor;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * @author Mik Kersten
+ * @author Jeff Johnston
+ */
+public class CDTEditorMonitor extends AbstractUserInteractionMonitor {
+
+	protected ICElement lastSelectedElement = null;
+
+	protected ICElement lastResolvedElement = null;
+
+	protected CEditor currentEditor;
+
+	protected StructuredSelection currentSelection = null;
+
+	public CDTEditorMonitor() {
+		super();
+	}
+
+	/**
+	 * Only public for testing
+	 */
+	@Override
+	public void handleWorkbenchPartSelection(IWorkbenchPart part,
+			ISelection selection, boolean contributeToContext) {
+		try {
+			ICElement selectedElement = null;
+			if (selection instanceof StructuredSelection) {
+				StructuredSelection structuredSelection = (StructuredSelection) selection;
+
+				if (structuredSelection.equals(currentSelection)) {
+					return;
+				}
+				currentSelection = structuredSelection;
+
+				// Object selectedObject =
+				// structuredSelection.getFirstElement();
+				for (Iterator<?> iterator = structuredSelection.iterator(); iterator
+						.hasNext();) {
+					Object selectedObject = iterator.next();
+					if (selectedObject instanceof ICElement) {
+						ICElement checkedElement = checkIfAcceptedAndPromoteIfNecessary((ICElement) selectedObject);
+						if (checkedElement == null) {
+							return;
+						} else {
+							selectedElement = checkedElement;
+						}
+					}
+					if (selectedElement != null) {
+						super.handleElementSelection(part, selectedElement,
+								contributeToContext);
+					}
+				}
+			} else {
+				if (part instanceof CEditor) {
+					currentEditor = (CEditor) part;
+					selectedElement = SelectionConverter
+							.getElementAtOffset(currentEditor);
+					if (selectedElement == null)
+						return; // nothing selected
+
+					if (selectedElement != null) {
+						if (selectedElement.equals(lastSelectedElement)) {
+							super.handleElementEdit(part, selectedElement,
+									contributeToContext);
+						} else if (!selectedElement.equals(lastSelectedElement)) {
+							super.handleElementSelection(part, selectedElement,
+									contributeToContext);
+						}
+					}
+
+					ICElement checkedElement = checkIfAcceptedAndPromoteIfNecessary(selectedElement);
+					if (checkedElement == null) {
+						return;
+					} else {
+						selectedElement = checkedElement;
+					}
+				}
+			}
+			if (selectedElement != null) {
+				lastSelectedElement = selectedElement;
+			}
+		} catch (CModelException e) {
+			// ignore, fine to fail to resolve an element if the model is not
+			// up-to-date
+		}
+	}
+
+	/**
+	 * @return null for elements that aren't modeled
+	 */
+	protected ICElement checkIfAcceptedAndPromoteIfNecessary(ICElement element) {
+		if (element instanceof IMethod || element instanceof IFunction)
+			return element;
+		return null;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTStructureBridge.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTStructureBridge.java
new file mode 100644
index 0000000..440ab08
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTStructureBridge.java
@@ -0,0 +1,316 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ *******************************************************************************/
+package org.eclipse.cdt.mylyn.internal.ui;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IFunction;
+import org.eclipse.cdt.core.model.IInclude;
+import org.eclipse.cdt.core.model.IMethod;
+import org.eclipse.cdt.core.model.IParent;
+import org.eclipse.cdt.core.model.ISourceReference;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.mylyn.commons.core.StatusHandler;
+import org.eclipse.mylyn.context.core.AbstractContextStructureBridge;
+import org.eclipse.mylyn.context.core.IInteractionElement;
+import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
+import org.eclipse.mylyn.internal.resources.ui.ResourceStructureBridge;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.views.markers.internal.ConcreteMarker;
+
+/**
+ * @author Mik Kersten
+ * @author Jeff Johnston
+ */
+public class CDTStructureBridge extends AbstractContextStructureBridge {
+
+	public final static String CONTENT_TYPE = "c/c++"; // $NON-NLS-1$
+	public final static int C_SOURCEROOT = 1000;
+
+	public CDTStructureBridge() {
+	}
+
+	@Override
+	public String getContentType() {
+		return CONTENT_TYPE;
+	}
+
+	@Override
+	public Object getAdaptedParent(Object object) {
+		if (object instanceof IFile) {
+			IFile file = (IFile) object;
+			return CoreModel.getDefault().create(file.getParent());
+		} else {
+			return super.getAdaptedParent(object);
+		}
+	}
+
+	@Override
+	public String getParentHandle(String handle) {
+		ICElement cElement = (ICElement) getObjectForHandle(handle);
+		if (cElement != null && cElement.getParent() != null) {
+			return getHandleForElement(cElement.getParent());
+		} else {
+			return null;
+		}
+	}
+
+	@Override
+	public List<String> getChildHandles(String handle) {
+		Object object = getObjectForHandle(handle);
+		if (object instanceof ICElement) {
+			ICElement element = (ICElement) object;
+			if (element instanceof IParent) {
+				IParent parent = (IParent) element;
+				ICElement[] children;
+				try {
+					children = parent.getChildren();
+					List<String> childHandles = new ArrayList<String>();
+					for (int i = 0; i < children.length; i++) {
+						String childHandle = getHandleIdentifier(children[i]);
+						if (childHandle != null)
+							childHandles.add(childHandle);
+					}
+					AbstractContextStructureBridge parentBridge = ContextCorePlugin.getDefault().getStructureBridge(
+							parentContentType);
+					if (parentBridge != null && parentBridge instanceof ResourceStructureBridge) {
+						// TODO: Make sure line below is correct
+						if (element.getElementType() < ICElement.C_NAMESPACE) {
+							List<String> resourceChildren = parentBridge.getChildHandles(handle);
+							if (!resourceChildren.isEmpty())
+								childHandles.addAll(resourceChildren);
+						}
+					}
+
+					return childHandles;
+				} catch (CModelException e) {
+					// ignore these, usually indicate no-existent element
+				}
+			}
+		}
+		return Collections.emptyList();
+	}
+	
+	public static ICElement getElementForHandle(String handle) {
+		return CoreModel.create(handle);
+	}
+
+
+	@Override
+	public Object getObjectForHandle(String handle) {
+		return getElementForHandle(handle);
+	}
+
+	// In the CDT, an ICElement does not have a handle interface like a
+	// JavaElement.  So, to find an element again, we save its CProject name,
+	// plus its path, plus its element name.  The CProject name allows us
+	// to find the CProject.  The path allows us to find the ITranslationUnit.
+	// The element name (optional) allows us to find an element within the
+	// TranslationUnit.
+	public static String getHandleForElement(ICElement element) {
+		return element.getHandleIdentifier();
+	}
+	
+	/**
+	 * Uses resource-compatible path for projects
+	 */
+	@Override
+	public String getHandleIdentifier(Object object) {
+		if (object instanceof ICElement) {
+			return getHandleForElement((ICElement) object);
+		} else {
+			if (object instanceof IAdaptable) {
+				Object adapter = ((IAdaptable) object).getAdapter(ICElement.class);
+				if (adapter instanceof ICElement) {
+					return getHandleForElement((ICElement) adapter);
+				}
+			}
+		}
+		return null;
+	}
+
+
+	@Override
+	public String getLabel(Object object) {
+		if (object instanceof ICElement) {
+			return ((ICElement) object).getElementName();
+		} else {
+			return "";
+		}
+	}
+
+	@Override
+	public boolean canBeLandmark(String handle) {
+		ICElement element = (ICElement) getObjectForHandle(handle);
+		if ((element instanceof IMethod || element instanceof IFunction) && element.exists()) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	/**
+	 * TODO: figure out if the non ICElement stuff is needed
+	 */
+	@Override
+	public boolean acceptsObject(Object object) {
+		if (object instanceof IResource) {
+			object = ((IResource) object).getAdapter(ICElement.class);
+		}
+
+		boolean accepts = (object instanceof ICElement && !(object instanceof IBinary))
+				|| object instanceof IWorkingSet;
+
+		return accepts;
+	}
+
+	@Override
+	public boolean canFilter(Object object) {
+		// FIXME: Removed some logic from JavaStructureBridge...is it necessary?
+		if (object instanceof IWorkingSet) {
+			try {
+				IWorkingSet workingSet = (IWorkingSet) object;
+				IAdaptable[] elements = workingSet.getElements();
+				for (int i = 0; i < elements.length; i++) {
+					IAdaptable adaptable = elements[i];
+					IInteractionElement element = ContextCorePlugin.getContextManager().getElement(
+							getHandleIdentifier(adaptable));
+					if (element.getInterest().isInteresting())
+						return false;
+				}
+			} catch (Exception e) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	@Override
+	public boolean isDocument(String handle) {
+		ICElement element = (ICElement) getObjectForHandle(handle);
+		return element instanceof ITranslationUnit;
+	}
+
+	@Override
+	public String getHandleForOffsetInObject(Object object, int offset) {
+		IMarker marker;
+		int charStart = 0;
+		if (object instanceof ConcreteMarker)
+			marker = ((ConcreteMarker)object).getMarker();
+		if (object instanceof IMarker) {
+			marker = (IMarker)object;
+		} else {
+			return null;
+		}
+		
+		Object attribute = marker.getAttribute(IMarker.CHAR_START, 0);
+		if (attribute instanceof Integer) {
+			charStart = ((Integer)attribute).intValue();
+		}
+		
+		try {
+			ITranslationUnit translationUnit = null;
+			IResource resource = marker.getResource();
+			if (resource instanceof IFile) {
+				IFile file = (IFile)resource;
+				if (CoreModel.isValidTranslationUnitName(null, file.getName())) {
+					ICElement element = CoreModel.getDefault().create(file);
+					translationUnit = CoreModel.getDefault().createTranslationUnitFrom(element.getCProject(), element.getPath());
+				} else {
+					return null;
+				}
+			}
+			if (translationUnit != null) {
+				ICElement cElement = translationUnit.getElementAtOffset(charStart);
+				if (cElement != null) {
+					if (cElement instanceof IInclude)
+						cElement = cElement.getParent().getParent();
+					return cElement.getElementName();
+				} else {
+					return null;
+				}
+			} else {
+				return null;
+			}
+		} catch (CModelException ex) {
+			if (ex.doesNotExist())
+				StatusHandler.fail(ex.getStatus());
+			return null;
+		}
+	}
+
+	@Override
+	public String getContentType(String elementHandle) {
+		return getContentType();
+	}
+
+	/**
+	 * Some copying from:
+	 * 
+	 * @see org.eclipse.jdt.ui.ProblemsLabelDecorator
+	 */
+	public boolean containsProblem(IInteractionElement node) {
+		try {
+			ICElement element = (ICElement) getObjectForHandle(node.getHandleIdentifier());
+			switch (element.getElementType()) {
+			case ICElement.C_PROJECT:
+			case ICElement.C_CCONTAINER:
+			case ICElement.C_VCONTAINER:
+				return getErrorTicksFromMarkers(element.getResource(), IResource.DEPTH_INFINITE, null);
+			case ICElement.C_UNIT:
+				return getErrorTicksFromMarkers(element.getResource(), IResource.DEPTH_ONE, null);
+			case ICElement.C_USING:
+			case ICElement.C_NAMESPACE:
+			case ICElement.C_INCLUDE:
+			case ICElement.C_TYPEDEF:
+			case ICElement.C_MACRO:
+			case ICElement.C_FUNCTION:
+			case ICElement.C_METHOD:
+			case ICElement.C_FIELD:
+			case ICElement.C_VARIABLE_LOCAL:
+			case ICElement.C_CLASS:
+				ITranslationUnit cu = (ITranslationUnit) element.getAncestor(ICElement.C_UNIT);
+				if (cu != null)
+					return getErrorTicksFromMarkers(element.getResource(), IResource.DEPTH_ONE, null);
+			}
+		} catch (CoreException e) {
+			// ignore
+		}
+		return false;
+	}
+
+	private boolean getErrorTicksFromMarkers(IResource res, int depth, ISourceReference sourceElement)
+			throws CoreException {
+		if (res == null || !res.isAccessible())
+			return false;
+		IMarker[] markers = res.findMarkers(IMarker.PROBLEM, true, depth);
+		if (markers != null) {
+			for (int i = 0; i < markers.length; i++) {
+				IMarker curr = markers[i];
+				if (sourceElement == null) {
+					int priority = curr.getAttribute(IMarker.SEVERITY, -1);
+					if (priority == IMarker.SEVERITY_ERROR) {
+						return true;
+					}
+				}
+			}
+		}
+		return false;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTUIBridgePlugin.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTUIBridgePlugin.java
new file mode 100644
index 0000000..36e32a8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTUIBridgePlugin.java
@@ -0,0 +1,232 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ * 
+ * Contributors:
+ * 		Red Hat Inc. - modification from Java to CDT
+ *******************************************************************************/
+package org.eclipse.cdt.mylyn.internal.ui;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.mylyn.internal.ui.editor.ActiveFoldingListener;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.mylyn.context.ui.IContextUiStartup;
+import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
+import org.eclipse.mylyn.internal.monitor.ui.MonitorUiPlugin;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Mik Kersten
+ * @author Jeff Johnston
+ */
+public class CDTUIBridgePlugin extends AbstractUIPlugin {
+
+	public static final String PLUGIN_ID = "org.eclipse.cdt.mylyn.ui"; //$NON-NLS-1$
+	
+	public static final String AUTO_FOLDING_ENABLED = "org.eclipse.mylyn.context.ui.editor.folding.enabled"; //$NON-NLS-1$
+
+	private static final String MYLYN_FIRST_RUN = "org.eclipse.mylyn.ui.first.run.0_4_9"; //$NON-NLS-1$
+
+	public static final int	START_ACTIVATION_POLICY	= 0x00000002;
+	
+	private static CDTUIBridgePlugin INSTANCE;
+
+	private ResourceBundle resourceBundle;
+
+	private ActiveFoldingEditorTracker editorTracker;
+
+//	private PackageExplorerManager packageExplorerManager = new PackageExplorerManager();
+
+//	private TypeHistoryManager typeHistoryManager = null;
+
+	private LandmarkMarkerManager landmarkMarkerManager = new LandmarkMarkerManager();
+
+	private InterestInducingProblemListener problemListener = new InterestInducingProblemListener();
+
+	private CDTEditorMonitor cEditingMonitor;
+
+	private InterestUpdateDeltaListener cElementChangeListener = new InterestUpdateDeltaListener();
+
+	public CDTUIBridgePlugin() {
+		super();
+		INSTANCE = this;
+	}
+
+	/**
+	 * Startup order is critical.
+	 */
+	@Override
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		initDefaultPrefs();
+
+		// NOTE: moved out of wizard and first task activation to avoid bug 194766
+		if (getPreferenceStore().getBoolean(MYLYN_FIRST_RUN)) {
+			getPreferenceStore().setValue(MYLYN_FIRST_RUN, false);
+			CDTUiUtil.installContentAssist(CUIPlugin.getDefault().getPreferenceStore(), true);
+		}
+	}
+
+	private void lazyStart() {
+		ContextCorePlugin.getContextManager().addListener(landmarkMarkerManager);
+		cEditingMonitor = new CDTEditorMonitor();
+		MonitorUiPlugin.getDefault().getSelectionMonitors().add(cEditingMonitor);
+		installEditorTracker(PlatformUI.getWorkbench());
+		CoreModel.getDefault().addElementChangedListener(cElementChangeListener);
+
+		getPreferenceStore().addPropertyChangeListener(problemListener);
+		if (getPreferenceStore().getBoolean(InterestInducingProblemListener.PREDICTED_INTEREST_ERRORS)) {
+			problemListener.enable();
+		}
+
+//		try {
+//			typeHistoryManager = new TypeHistoryManager();
+//			ContextCorePlugin.getContextManager().addListener(typeHistoryManager);
+//		} catch (Throwable t) {
+//			StatusHandler.log(t, "Could not install type history manager, incompatible Eclipse version.");
+//		}
+	}
+
+	private void initDefaultPrefs() {
+		getPreferenceStore().setDefault(InterestInducingProblemListener.PREDICTED_INTEREST_ERRORS, false);
+		getPreferenceStore().setDefault(MYLYN_FIRST_RUN, true);
+	}
+
+
+	private void lazyStop() {
+//		ContextCorePlugin.getContextManager().removeListener(typeHistoryManager);
+		ContextCorePlugin.getContextManager().removeListener(landmarkMarkerManager);
+		MonitorUiPlugin.getDefault().getSelectionMonitors().remove(cEditingMonitor);
+		CoreModel.getDefault().removeElementChangedListener(cElementChangeListener);
+	}
+
+	@Override
+	public void stop(BundleContext context) throws Exception {
+		lazyStop();
+
+		super.stop(context);
+		INSTANCE = null;
+		resourceBundle = null;
+	}
+
+	private void installEditorTracker(IWorkbench workbench) {
+		editorTracker = new ActiveFoldingEditorTracker();
+		editorTracker.install(workbench);
+		// workbench.addWindowListener(editorTracker);
+		// IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
+		// for (int i = 0; i < windows.length; i++) {
+		// windows[i].addPageListener(editorTracker);
+		// IWorkbenchPage[] pages = windows[i].getPages();
+		// for (int j = 0; j < pages.length; j++) {
+		// pages[j].addPartListener(editorTracker);
+		// }
+		// }
+
+		// update editors that are already opened
+		for (IWorkbenchWindow w : PlatformUI.getWorkbench().getWorkbenchWindows()) {
+			IWorkbenchPage page = w.getActivePage();
+			if (page != null) {
+				IEditorReference[] references = page.getEditorReferences();
+				for (int i = 0; i < references.length; i++) {
+					IEditorPart part = references[i].getEditor(false);
+					if (part != null && part instanceof CEditor) {
+						CEditor editor = (CEditor) part;
+						editorTracker.registerEditor(editor);
+						ActiveFoldingListener.resetProjection(editor);
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * Returns the shared instance.
+	 */
+	public static CDTUIBridgePlugin getDefault() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Returns the string from the plugin's resource bundle, or 'key' if not found.
+	 */
+	public static String getResourceString(String key) {
+		ResourceBundle bundle = CDTUIBridgePlugin.getDefault().getResourceBundle();
+		try {
+			return (bundle != null) ? bundle.getString(key) : key;
+		} catch (MissingResourceException e) {
+			return key;
+		}
+	}
+
+	/**
+	 * Returns the plugin's resource bundle,
+	 */
+	public ResourceBundle getResourceBundle() {
+		try {
+			if (resourceBundle == null)
+				resourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.mylyn.internal.ui.PluginResources"); //$NON-NLS-1$
+		} catch (MissingResourceException x) {
+			resourceBundle = null;
+		}
+		return resourceBundle;
+	}
+	
+	/**
+	 * Returns the string from the plugin's resource bundle,
+	 * or 'key' if not found.
+	 * 
+	 * @param key the message key
+	 * @param args an array of substituition strings
+	 * @return the resource bundle message
+	 */
+	public static String getFormattedString(String key, String[] args) {
+		return MessageFormat.format(getResourceString(key), (Object[])args);
+	}
+
+	/**
+	 * Returns an image descriptor for the image file at the given plug-in relative path.
+	 * 
+	 * @param path
+	 *            the path
+	 * @return the image descriptor
+	 */
+	public static ImageDescriptor getImageDescriptor(String path) {
+		return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+	}
+
+	/**
+	 * For testing.
+	 */
+	public ActiveFoldingEditorTracker getEditorTracker() {
+		return editorTracker;
+	}
+
+
+	/**
+	 * Lazy startup. See extension point "org.eclipse.mylyn.context.ui.startup".
+	 */
+	public static class CDTUIBridgeStartup implements IContextUiStartup {
+
+		public void lazyStartup() {
+			CDTUIBridgePlugin.getDefault().lazyStart();
+		}
+
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTUiBridge.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTUiBridge.java
new file mode 100644
index 0000000..3f91885
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTUiBridge.java
@@ -0,0 +1,162 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ * 
+ * Contributors:
+ * 		Red Hat Inc. - Initial implementation based on JavaUiBridge
+ *******************************************************************************/
+
+package org.eclipse.cdt.mylyn.internal.ui;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.internal.ui.actions.SelectionConverter;
+import org.eclipse.cdt.internal.ui.editor.AbstractCModelOutlinePage;
+import org.eclipse.cdt.internal.ui.editor.CContentOutlinePage;
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.internal.ui.util.EditorUtility;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.mylyn.commons.core.StatusHandler;
+import org.eclipse.mylyn.context.core.IInteractionElement;
+import org.eclipse.mylyn.context.ui.AbstractContextUiBridge;
+import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+
+/**
+ * @author Mik Kersten
+ * @author Jeff Johnston
+ */
+public class CDTUiBridge extends AbstractContextUiBridge {
+
+	private Field cOutlineField = null;
+
+	public CDTUiBridge() {
+		try {
+			cOutlineField = AbstractCModelOutlinePage.class.getDeclaredField("fTreeViewer");
+			cOutlineField.setAccessible(true);
+		} catch (Exception e) {
+			StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID, 
+					CDTUIBridgePlugin.getResourceString("MylynCDT.outlineViewerFailure"), e)); // $NON-NLS-1$
+		}
+	}
+
+	@Override
+	public void open(IInteractionElement node) {
+		try {
+			ICElement cElement = CDTStructureBridge.getElementForHandle(node.getHandleIdentifier());
+			if (cElement == null || !cElement.exists())
+				return;
+			IEditorPart part = EditorUtility.openInEditor(cElement);
+		} catch (Throwable t) {
+			StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID, 
+					CDTUIBridgePlugin.getFormattedString("MylynCDT.openEditorFailure", // $NON-NLS-1$ 
+					new String[]{node.getHandleIdentifier()}), t));
+		}
+	}
+
+	@Override
+	public void close(IInteractionElement node) {
+		try {
+			IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+			if (page != null) {
+				List<IEditorReference> toClose = new ArrayList<IEditorReference>(4);
+				for (IEditorReference reference : page.getEditorReferences()) {
+					try {
+						ICElement input = (ICElement) reference.getEditorInput().getAdapter(ICElement.class);
+						if (input != null
+								&& node.getHandleIdentifier().equals(CDTStructureBridge.getHandleForElement(input))) {
+							toClose.add(reference);
+						}
+					} catch (PartInitException e) {
+						// ignore
+					}
+				}
+				if (toClose.size() > 0) {
+					page.closeEditors(toClose.toArray(new IEditorReference[toClose.size()]), true);
+				}
+			}
+		} catch (Throwable t) {
+			StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID, 
+					CDTUIBridgePlugin.getResourceString("MylynCDT.autoCloseEditorFailure"), t)); // $NON-NLS-1$ 
+		}
+	}
+
+	@Override
+	public boolean acceptsEditor(IEditorPart editorPart) {
+		return editorPart instanceof CEditor;
+	}
+
+	@Override
+	public IInteractionElement getElement(IEditorInput input) {
+		Object adapter = input.getAdapter(ICElement.class);
+		if (adapter instanceof ICElement) {
+			ICElement cElement = (ICElement) adapter;
+			String handle = ContextCorePlugin.getDefault().getStructureBridge(cElement).getHandleIdentifier(
+					cElement);
+			return ContextCorePlugin.getContextManager().getElement(handle);
+		} else {
+			return null;
+		}
+	}
+
+	@Override
+	public List<TreeViewer> getContentOutlineViewers(IEditorPart editorPart) {
+		if (editorPart == null || cOutlineField == null)
+			return null;
+		List<TreeViewer> viewers = new ArrayList<TreeViewer>();
+		Object out = editorPart.getAdapter(IContentOutlinePage.class);
+		if (out instanceof CContentOutlinePage) {
+			CContentOutlinePage page = (CContentOutlinePage) out;
+			if (page.getControl() != null) {
+				try {
+					viewers.add((TreeViewer) cOutlineField.get(page));
+				} catch (Exception e) {
+					StatusHandler.log(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID, 
+							CDTUIBridgePlugin.getResourceString("MylynCDT.log.getOutlineViewerFailure"), e)); // $NON-NLS-1$ 
+				}
+			}
+		}
+		return viewers;
+	}
+
+	@Override
+	public Object getObjectForTextSelection(TextSelection selection, IEditorPart editor) {
+		if (editor instanceof CEditor) {
+			TextSelection textSelection = selection;
+			try {
+				if (selection != null) {
+					return SelectionConverter.getElementAtOffset(((CEditor) editor).getInputCElement(), textSelection);
+				} else {
+					Object element = ((CEditor) editor).getInputCElement();
+					if (element instanceof ICElement)
+						return element;
+				}
+			} catch (CModelException e) {
+				// ignore
+			}
+		}
+		return null;
+	}
+
+	@Override
+	public String getContentType() {
+		return CDTStructureBridge.CONTENT_TYPE;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTUiUtil.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTUiUtil.java
new file mode 100644
index 0000000..96d0756
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/CDTUiUtil.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.cdt.mylyn.internal.ui;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.CoreModelUtil;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.internal.ui.util.ExceptionHandler;
+import org.eclipse.cdt.ui.CElementImageDescriptor;
+import org.eclipse.cdt.ui.PreferenceConstants;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.mylyn.commons.core.StatusHandler;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.views.markers.internal.ConcreteMarker;
+
+/**
+ * @author Mik Kersten
+ * @author Jeff Johnston
+ */
+public class CDTUiUtil {
+
+	private static final Point SMALL_SIZE = new Point(16, 16);
+
+	private static final String SEPARATOR_CODEASSIST = "\0"; 
+
+	public static final String ASSIST_MYLYN_TYPE = "org.eclipse.cdt.mylyn.cdtTypeProposalCategory"; // $NON-NLS-1$
+
+	public static final String ASSIST_MYLYN_NOTYPE = "org.eclipse.cdt.mylyn.cdtNoTypeProposalCategory"; // $NON-NLS-1$
+
+	public static final String ASSIST_CDT_TYPE = "org.eclipse.cdt.ui.cdtTypeProposalCategory"; // $NON-NLS-1$
+
+	public static final String ASSIST_CDT_NOTYPE = "org.eclipse.cdt.ui.cdtNoTypeProposalCategory";  // $NON-NLS-1$
+
+	public static final String ASSIST_CDT_TEMPLATE = "org.eclipse.cdt.ui.templateProposalCategory"; // $NON-NLS-1$
+
+	public static final String ASSIST_MYLYN_TEMPLATE = "org.eclipse.cdt.mylyn.templateProposalCategory"; // $NON-NLS-1$
+
+	public static void installContentAssist(IPreferenceStore cdtPrefs, boolean mylynContentAssist) {
+		String oldValue = cdtPrefs.getString(PreferenceConstants.CODEASSIST_EXCLUDED_CATEGORIES);
+		StringTokenizer tokenizer = new StringTokenizer(oldValue, SEPARATOR_CODEASSIST);
+		Set<String> disabledIds = new HashSet<String>();
+		while (tokenizer.hasMoreTokens()) {
+			disabledIds.add((String) tokenizer.nextElement());
+		}
+		if (!mylynContentAssist) {
+			disabledIds.remove(ASSIST_CDT_TYPE);
+			disabledIds.remove(ASSIST_CDT_NOTYPE);
+			disabledIds.remove(ASSIST_CDT_TEMPLATE);
+			disabledIds.add(ASSIST_MYLYN_NOTYPE);
+			disabledIds.add(ASSIST_MYLYN_TYPE);
+			disabledIds.add(ASSIST_MYLYN_TEMPLATE);
+		} else {
+			disabledIds.add(ASSIST_CDT_TYPE);
+			disabledIds.add(ASSIST_CDT_NOTYPE);
+			disabledIds.add(ASSIST_CDT_TEMPLATE);
+			disabledIds.remove(ASSIST_MYLYN_NOTYPE);
+			disabledIds.remove(ASSIST_MYLYN_TYPE);
+			disabledIds.remove(ASSIST_MYLYN_TEMPLATE);
+		}
+		String newValue = ""; // $NON-NLS-1$
+		for (String id : disabledIds) {
+			newValue += id + SEPARATOR_CODEASSIST;
+		}
+		cdtPrefs.setValue(PreferenceConstants.CODEASSIST_EXCLUDED_CATEGORIES, newValue);
+	}
+
+	public static ImageDescriptor decorate(ImageDescriptor base, int decorations) {
+		ImageDescriptor imageDescriptor = new CElementImageDescriptor(base, decorations, SMALL_SIZE);
+		return imageDescriptor;
+	}
+
+	public static ICElement getCDTElement(ConcreteMarker marker) {
+		if (marker == null)
+			return null;
+		try {
+			IResource res = marker.getResource();
+			ITranslationUnit cu = null;
+			if (res instanceof IFile) {
+				IFile file = (IFile) res;
+				if (CoreModel.isValidTranslationUnitName(null, file.getName())) {
+					cu = CoreModelUtil.findTranslationUnit(file);
+				} else {
+					return null;
+				}
+			}
+			if (cu != null) {
+				ICElement ce = cu.getElementAtOffset(marker.getMarker().getAttribute(IMarker.CHAR_START, 0));
+				return ce;
+			} else {
+				return null;
+			}
+		} catch (CModelException ex) {
+			if (!ex.doesNotExist())
+				ExceptionHandler.handle(ex, CDTUIBridgePlugin.getResourceString("MylynCDT.error"), // $NON-NLS-1$
+						CDTUIBridgePlugin.getResourceString("MylynCDT.findCElementFailure")); //$NON-NLS-1$
+			return null;
+		} catch (Throwable t) {
+			StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID, 
+					CDTUIBridgePlugin.getFormattedString("MylynCDT.findElementFailure", new String[]{marker.toString()}), t)); // $NON-NLS-1$
+			return null;
+		}
+	}
+
+	/**
+	 * Get the fully qualified name of an IMember or IFunction
+	 * 
+	 * @param m
+	 *            The IMember or IFunction to get the fully qualified name for
+	 * @return String representing the fully qualified name
+	 */
+	public static String getFullyQualifiedName(ICElement ce) {
+		if (ce.getParent() == null || ce.getParent() instanceof ICProject)
+			return ce.getElementName();
+		else
+			return getFullyQualifiedName(ce.getParent()) + "." + ce.getElementName(); // $NON-NLS-1$
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/InterestInducingProblemListener.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/InterestInducingProblemListener.java
new file mode 100644
index 0000000..f39928e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/InterestInducingProblemListener.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.cdt.mylyn.internal.ui;
+
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.internal.ui.util.IProblemChangedListener;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.mylyn.commons.core.StatusHandler;
+import org.eclipse.mylyn.context.core.IInteractionElement;
+import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
+
+/**
+ * @author Mik Kersten
+ * @author Jeff Johnston
+ */
+public class InterestInducingProblemListener implements IProblemChangedListener, IPropertyChangeListener {
+
+	public static final String PREDICTED_INTEREST_ERRORS = "org.eclipse.cdt.mylyn.ui.interest.prediction.errors"; // $NON-NLS-1$
+
+	// TODO: consider getting rid of this
+	private CDTStructureBridge cdtStructureBridge = new CDTStructureBridge();
+
+	public void problemsChanged(IResource[] changedResources, boolean isMarkerChange) {
+		try {
+			if (!ContextCorePlugin.getContextManager().isContextActive()) {
+				return;
+			} else {
+				for (int i = 0; i < changedResources.length; i++) {
+					IResource resource = changedResources[i];
+					if (resource instanceof IFile) {
+						ICElement cdtElement = (ICElement) resource.getAdapter(ICElement.class);
+						if (cdtElement != null) {
+							IInteractionElement element = ContextCorePlugin.getContextManager().getElement(
+									CDTStructureBridge.getHandleForElement(cdtElement));
+							if (!cdtStructureBridge.containsProblem(element)) {
+								ContextCorePlugin.getContextManager().removeErrorPredictedInterest(
+										element.getHandleIdentifier(), CDTStructureBridge.CONTENT_TYPE, true);
+							} else {
+								ContextCorePlugin.getContextManager().addErrorPredictedInterest(
+										element.getHandleIdentifier(), CDTStructureBridge.CONTENT_TYPE, true);
+							}
+						}
+					}
+				}
+			}
+		} catch (Exception e) {
+			StatusHandler.log(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID, 
+					CDTUIBridgePlugin.getResourceString("MylynCDT.updateMarkerFailure"), e)); // $NON-NLS-1$
+		}
+	}
+
+	public void propertyChange(PropertyChangeEvent event) {
+		if (PREDICTED_INTEREST_ERRORS.equals(event.getProperty())) {
+			if (CDTUIBridgePlugin.getDefault().getPreferenceStore().getBoolean(PREDICTED_INTEREST_ERRORS)) {
+				enable();
+			} else {
+				disable();
+			}
+		}
+	}
+
+	public void enable() {
+		CUIPlugin.getDefault().getProblemMarkerManager().addListener(this);
+	}
+
+	public void disable() {
+		CUIPlugin.getDefault().getProblemMarkerManager().removeListener(this);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/InterestUpdateDeltaListener.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/InterestUpdateDeltaListener.java
new file mode 100644
index 0000000..c2a86a1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/InterestUpdateDeltaListener.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.cdt.mylyn.internal.ui;
+
+import org.eclipse.cdt.core.model.ElementChangedEvent;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICElementDelta;
+import org.eclipse.cdt.core.model.IElementChangedListener;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.mylyn.commons.core.StatusHandler;
+import org.eclipse.mylyn.context.core.IInteractionElement;
+import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author Mik Kersten
+ * @author Jeff Johnston
+ */
+public class InterestUpdateDeltaListener implements IElementChangedListener {
+
+	private static boolean asyncExecMode = true;
+
+	public void elementChanged(ElementChangedEvent event) {
+		ICElementDelta delta = event.getDelta();
+		handleDelta(delta.getAffectedChildren());
+	}
+
+	/**
+	 * Only handles first addition/removal
+	 */
+	private void handleDelta(ICElementDelta[] delta) {
+		try {
+			ICElement added = null;
+			ICElement removed = null;
+			for (int i = 0; i < delta.length; i++) {
+				ICElementDelta child = delta[i];
+				if (child.getElement() instanceof ITranslationUnit) {
+					// FIXME: not sure I modified this correctly from the java version
+					if (((ITranslationUnit)child.getElement()).getParent() != null) {
+						// see bug 195361, do not reduce interest of temporary working copy
+						return;
+					} 
+				}
+				
+				if (child.getKind() == ICElementDelta.ADDED) {
+					if (added == null) {
+						added = child.getElement();	
+					}
+				} else if (child.getKind() == ICElementDelta.REMOVED) {
+					if (removed == null) {
+						removed = child.getElement();
+					}
+				}
+				handleDelta(child.getAffectedChildren());
+			}
+
+			if (added != null && removed != null) {
+				IInteractionElement element = ContextCorePlugin.getContextManager().getElement(
+						CDTStructureBridge.getHandleForElement(removed));
+				if (element != null) {
+					resetHandle(element, CDTStructureBridge.getHandleForElement(added));
+				}
+			} else if (removed != null) {
+				
+				IInteractionElement element = ContextCorePlugin.getContextManager().getElement(
+						CDTStructureBridge.getHandleForElement(removed));
+				if (element != null) {
+					delete(element);
+				}
+			}
+		} catch (Throwable t) {
+			StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID,
+					CDTUIBridgePlugin.getResourceString("MylynCDT.deltaUpdateFailure"), t)); // $NON-NLS-1$
+		}
+	}
+
+	private void resetHandle(final IInteractionElement element, final String newHandle) {
+		if (!asyncExecMode) {
+			ContextCorePlugin.getContextManager().updateHandle(element, newHandle);
+		} else {
+			IWorkbench workbench = PlatformUI.getWorkbench();
+			if (workbench != null) {
+				workbench.getDisplay().asyncExec(new Runnable() {
+					public void run() {
+						ContextCorePlugin.getContextManager().updateHandle(element, newHandle);
+					}
+				});
+			}
+		}
+	}
+
+	private void delete(final IInteractionElement element) {
+		if (!asyncExecMode) {
+			ContextCorePlugin.getContextManager().deleteElement(element);
+		} else {
+			IWorkbench workbench = PlatformUI.getWorkbench();
+			if (workbench != null) {
+				workbench.getDisplay().asyncExec(new Runnable() {
+					public void run() {
+						ContextCorePlugin.getContextManager().deleteElement(element);
+					}
+				});
+			}
+		}
+	}
+
+	/**
+	 * For testing
+	 */
+	public static void setAsyncExecMode(boolean asyncExecMode) {
+		InterestUpdateDeltaListener.asyncExecMode = asyncExecMode;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/LandmarkMarkerManager.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/LandmarkMarkerManager.java
new file mode 100644
index 0000000..35db7b2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/LandmarkMarkerManager.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ *******************************************************************************/
+/*
+ * Created on Feb 16, 2005
+ */
+package org.eclipse.cdt.mylyn.internal.ui;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IFunction;
+import org.eclipse.cdt.core.model.IMethod;
+import org.eclipse.cdt.core.model.ISourceRange;
+import org.eclipse.cdt.core.model.ISourceReference;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.mylyn.commons.core.StatusHandler;
+import org.eclipse.mylyn.context.core.AbstractContextListener;
+import org.eclipse.mylyn.context.core.IInteractionContext;
+import org.eclipse.mylyn.context.core.IInteractionElement;
+import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
+
+/**
+ * @author Mik Kersten
+ * @author Jeff Johnston
+ */
+public class LandmarkMarkerManager extends AbstractContextListener {
+
+	private static final String ID_MARKER_LANDMARK = "org.eclipse.mylyn.context.ui.markers.landmark"; // $NON-NLS-1$
+
+	private Map<IInteractionElement, Long> markerMap = new HashMap<IInteractionElement, Long>();
+
+	public LandmarkMarkerManager() {
+		super();
+	}
+
+	public void contextActivated(IInteractionContext taskscape) {
+		modelUpdated();
+	}
+
+	public void contextDeactivated(IInteractionContext taskscape) {
+		modelUpdated();
+	}
+
+	public void contextCleared(IInteractionContext context) {
+		modelUpdated();
+	}
+
+	private void modelUpdated() {
+		try {
+			for (IInteractionElement node : markerMap.keySet()) {
+				landmarkRemoved(node);
+			}
+			markerMap.clear();
+			for (IInteractionElement node : ContextCorePlugin.getContextManager().getActiveLandmarks()) {
+				landmarkAdded(node);
+			}
+		} catch (Throwable t) {
+			StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID,
+					CDTUIBridgePlugin.getResourceString("MylynCDT.landmarkUpdateFailure"), t)); // $NON-NLS-1$
+		}
+	}
+
+	public void interestChanged(List<IInteractionElement> nodes) {
+		// don't care when the interest changes
+	}
+
+	public void landmarkAdded(final IInteractionElement node) {
+		if (node == null || node.getContentType() == null)
+			return;
+		if (node.getContentType().equals(CDTStructureBridge.CONTENT_TYPE)) {
+			final ICElement element = CDTStructureBridge.getElementForHandle(node.getHandleIdentifier());
+			if (element == null || !element.exists())
+				return;
+			if (element instanceof IMethod || element instanceof IFunction) {
+				try {
+					final ISourceRange range = ((ISourceReference) element).getSourceRange();
+					final IResource resource = element.getUnderlyingResource();
+					if (resource instanceof IFile) {
+						IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+							public void run(IProgressMonitor monitor) throws CoreException {
+								IMarker marker = resource.createMarker(ID_MARKER_LANDMARK);
+								if (marker != null && range != null) {
+									marker.setAttribute(IMarker.CHAR_START, range.getStartPos());
+									marker.setAttribute(IMarker.CHAR_END, range.getStartPos() + range.getLength());
+									marker.setAttribute(IMarker.MESSAGE, CDTUIBridgePlugin.getResourceString("MylynCDT.landmark")); // $NON-NLS-1$
+									marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO);
+									markerMap.put(node, marker.getId());
+								}
+							}
+						};
+						resource.getWorkspace().run(runnable, null);
+					}
+				} catch (CModelException e) {
+					StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID,
+							CDTUIBridgePlugin.getResourceString("MylynCDT.markerUpdateFailure"), e)); // $NON-NLS-1$
+				} catch (CoreException e) {
+					StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID,
+							CDTUIBridgePlugin.getResourceString("MylynCDT.markerUpdateFailure"), e)); // $NON-NLS-1$
+				}
+			}
+		}
+	}
+
+	public void landmarkRemoved(final IInteractionElement node) {
+		if (node == null)
+			return;
+		if (node.getContentType().equals(CDTStructureBridge.CONTENT_TYPE)) {
+			ICElement element = CDTStructureBridge.getElementForHandle(node.getHandleIdentifier());
+			if (element == null || !element.exists())
+				return;
+			if (element.getAncestor(ICElement.C_UNIT) != null // stuff
+					// from
+					// .class
+					// files
+					&& element instanceof ISourceReference) {
+				try {
+					final IResource resource = element.getUnderlyingResource();
+					IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+						public void run(IProgressMonitor monitor) throws CoreException {
+							if (resource != null) {
+								try {
+									if (markerMap.containsKey(node)) {
+										long id = markerMap.get(node);
+										IMarker marker = resource.getMarker(id);
+										if (marker != null)
+											marker.delete();
+									}
+								} catch (NullPointerException e) {
+									StatusHandler.log(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID,
+											CDTUIBridgePlugin.getResourceString("MylynCDT.log.markerUpdateFailure"), e)); // $NON-NLS-1$
+								}
+							}
+						}
+					};
+					resource.getWorkspace().run(runnable, null);
+				} catch (CModelException e) {
+					// ignore the Java Model errors
+				} catch (CoreException e) {
+					StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID,
+							CDTUIBridgePlugin.getResourceString("MylynCDT.landmarkUpdateFailure"), e)); // $NON-NLS-1$
+				}
+			}
+		}
+	}
+
+	public void relationsChanged(IInteractionElement node) {
+		// don't care when the relationships changed
+	}
+
+	public void elementDeleted(IInteractionElement node) {
+		// don't care when a node is deleted
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/PluginResources.properties b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/PluginResources.properties
new file mode 100644
index 0000000..0c1dd6a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/PluginResources.properties
@@ -0,0 +1,46 @@
+#################################################################################
+#  Copyright (c) 2008 Red Hat, Inc. and others
+#  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
+# 
+#  Contributors:
+#      Red Hat Incorporated - initial API and implementation
+#################################################################################
+MylynCDT.error=error
+MylynCDT.landmark=Mylyn Landmark
+MylynCDT.preferencesWindowTitle=Recommended Preferences
+MylynCDT.preferencesTitle=Mylyn C/C++ Preference Settings
+
+MylynCDT.missingElementLabel=<missing element>
+MylynCDT.containmentRelation=Containment
+
+MylynCDT.wizard.hyperLink.text=If this is your first time using Mylyn please watch the Getting Started video
+MylynCDT.wizard.autoFolding.text=Turn automatic C/C++ editor folding on
+MylynCDT.wizard.autoFolding.label=Toggle via toolbar button
+MylynCDT.wizard.contentAssist=Enable task-context ranked content assist, requires Eclipse restart.
+MylynCDT.wizard.contentAssistWarning=Toggle via Preferences->C/C++->Editor->Content Assist->Advanced
+MylynCDT.wizard.iconsHelp=For a legend of the icons used by Mylyn open: Help (menu) -> Mylyn UI Legend
+MylynCDT.wizard.description=You have activated a task for the first time.\nThe following C/C++ preferences are recommended for the Task-Focused UI.\n
+
+MylynCDT.log.updateModelFailed=Failed to update model based on selection.
+MylynCDT.log.noObjectForHandle=Could not create cdt element for handle: <{0}>.
+MylynCDT.log.getOutlineViewerFailure=Could not get Outline viewer.
+MylynCDT.log.markerUpdateFailure=Could not update markers.
+MylynCDT.log.activeFoldingFailure=Could not install active folding on provider: {0}, must extend {1}.
+
+
+MylynCDT.childAccessFailed=could not get child
+MylynCDT.cantFindElement=can't find ICElement for: {0}
+MylynCDT.outlineViewerFailure=could not get install Mylyn on Outline viewer
+MylynCDT.openEditorFailure=could not open editor for: {0}
+MylynCDT.autoCloseEditorFailure=could not auto close editor
+MylynCDT.findCElementFailure=could not find C/C++ element
+MylynCDT.updateMarkerFailure=could not update on marker change
+MylynCDT.deltaUpdateFailure=delta update failed
+MylynCDT.landmarkUpdateFailure=could not update landmark markers
+MylynCDT.markerUpdateFailure=could not update markers
+MylynCDT.initFoldingFailure=could not update folding, Mylyn is not correctly installed
+MylynCDT.updateFoldingFailure=could not update folding, Mylyn is not correctly installed
+MylynCDT.installAutoFoldingFailure=could not install auto folding, reflection denied
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/TypeHistoryManager.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/TypeHistoryManager.java
new file mode 100644
index 0000000..7062de2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/TypeHistoryManager.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.cdt.mylyn.internal.ui;
+
+import java.util.List;
+
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IStructureDeclaration;
+import org.eclipse.cdt.core.model.ITypeDef;
+import org.eclipse.mylyn.context.core.AbstractContextListener;
+import org.eclipse.mylyn.context.core.IInteractionContext;
+import org.eclipse.mylyn.context.core.IInteractionElement;
+
+/**
+ * @author Mik Kersten
+ * @author Shawn Minto
+ * @author Jeff Johnston
+ */
+public class TypeHistoryManager extends AbstractContextListener {
+
+//	private TypeInfoFactory factory = new TypeInfoFactory();
+
+	public void contextActivated(IInteractionContext context) {
+		clearTypeHistory();
+		for (IInteractionElement node : context.getInteresting())
+			updateTypeHistory(node, true);
+	}
+
+	/**
+	 * Path has to be compatible with ITypeNameRequestor
+	 */
+	private void updateTypeHistory(IInteractionElement node, boolean add) {
+		ICElement element = CDTStructureBridge.getElementForHandle(node.getHandleIdentifier());
+		//FIXME: are there other types we care about...e.g. enumeration?
+		if (element instanceof IStructureDeclaration || element instanceof ITypeDef) {
+			String typename = element.getElementName();
+//			try {
+//				// FIXME: What do we do here?  Is this necessary?
+//				if (element.exists()) {
+//					JavaSearchTypeNameMatch typeNameMatch = new JavaSearchTypeNameMatch(type, type.getFlags());
+//
+//					if (add && !OpenTypeHistory.getInstance().contains(typeNameMatch)) {
+//						OpenTypeHistory.getInstance().accessed(typeNameMatch);
+//					} else {
+//						OpenTypeHistory.getInstance().remove(typeNameMatch);
+//					}
+//				}
+//			} catch (CModelException e) {
+//				StatusHandler.log(e, "failed to update history for a type");
+//			}
+		}
+	}
+
+	public void contextDeactivated(IInteractionContext context) {
+		clearTypeHistory();
+	}
+
+	public void contextCleared(IInteractionContext context) {
+		clearTypeHistory();
+	}
+
+	/**
+	 * Public for testing
+	 */
+	public void clearTypeHistory() {
+		//FIXME: Is this necessary?
+//		TypeNameMatch[] typeInfos = OpenTypeHistory.getInstance().getTypeInfos();
+//		for (int i = 0; i < typeInfos.length; i++) {
+//			OpenTypeHistory.getInstance().remove(typeInfos[i]);
+//		}
+	}
+
+	public void interestChanged(List<IInteractionElement> nodes) {
+		for (IInteractionElement node : nodes) {
+			updateTypeHistory(node, true);
+		}
+	}
+
+	public void elementDeleted(IInteractionElement node) {
+		updateTypeHistory(node, false);
+	}
+	
+	public void elementsDeleted(List<IInteractionElement> elements) {
+		for(IInteractionElement element: elements){
+			updateTypeHistory(element, false);
+		}
+	}
+
+	public void landmarkAdded(IInteractionElement node) {
+		// ignore
+	}
+
+	public void landmarkRemoved(IInteractionElement node) {
+		// ignore
+	}
+
+	public void relationsChanged(IInteractionElement node) {
+		// ignore
+	}
+
+	public void contextPreActivated(IInteractionContext context) {
+		// ignore
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/actions/FocusCViewAction.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/actions/FocusCViewAction.java
new file mode 100644
index 0000000..815b4d3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/actions/FocusCViewAction.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ * 
+ * Contributors:
+ *     Red Hat Inc. - Modification for CDT usage
+ *******************************************************************************/
+
+package org.eclipse.cdt.mylyn.internal.ui.actions;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IMethod;
+import org.eclipse.cdt.internal.ui.actions.SelectionConverter;
+import org.eclipse.cdt.internal.ui.cview.CView;
+import org.eclipse.cdt.internal.ui.cview.ToggleLinkingAction;
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.mylyn.internal.ui.CDTDeclarationsFilter;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.mylyn.context.ui.AbstractAutoFocusViewAction;
+import org.eclipse.mylyn.context.ui.InterestFilter;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * @author Mik Kersten
+ * @author Jeff Johnston
+ */
+public class FocusCViewAction extends AbstractAutoFocusViewAction {
+
+	public FocusCViewAction() {
+		super(new InterestFilter(), true, true, true);
+	}
+
+	@Override
+	protected ISelection resolveSelection(IEditorPart part, ITextSelection changedSelection, StructuredViewer viewer)
+			throws CoreException {
+		Object elementToSelect = null;
+		if (changedSelection instanceof TextSelection && part instanceof CEditor) {
+			ICElement cdtElement = SelectionConverter.getElementAtOffset(((CEditor) part).getInputCElement(), changedSelection);
+			elementToSelect = cdtElement;
+		}
+
+		if (elementToSelect != null) {
+			StructuredSelection currentSelection = (StructuredSelection) viewer.getSelection();
+			if (currentSelection.size() <= 1) {
+				for (ViewerFilter filter : Arrays.asList(viewer.getFilters())) {
+					if (filter instanceof CDTDeclarationsFilter && elementToSelect instanceof IMethod) {
+						elementToSelect = ((IMethod) elementToSelect).getTranslationUnit();
+					}
+				}
+			}
+			return new StructuredSelection(elementToSelect);
+		} else {
+			return null;
+		}
+	}
+
+	// TODO: should have better way of doing this
+	protected void setManualFilteringAndLinkingEnabled(boolean enabled) {
+		IViewPart part = super.getPartForAction();
+		if (part instanceof CView) {
+			for (IContributionItem item : ((CView) part).getViewSite()
+					.getActionBars()
+					.getToolBarManager()
+					.getItems()) {
+				if (item instanceof ActionContributionItem) {
+					ActionContributionItem actionItem = (ActionContributionItem) item;
+					if (actionItem.getAction() instanceof ToggleLinkingAction) {
+						actionItem.getAction().setEnabled(enabled);
+					}
+				}
+			}
+			for (IContributionItem item : ((CView) part).getViewSite()
+					.getActionBars()
+					.getMenuManager()
+					.getItems()) {
+				if (item instanceof ActionContributionItem) {
+					ActionContributionItem actionItem = (ActionContributionItem) item;
+					// TODO: file bug asking for extensibility
+					if (actionItem.getAction().getClass().getSimpleName().equals("ShowFilterDialogAction")) { // $NON-NLS-1$
+						actionItem.getAction().setEnabled(enabled);
+					}
+				}
+				// NOTE: turning off dynamically contributed filter items is not currently feasible
+//				else if (item instanceof ContributionItem) {
+//					ContributionItem contributionItem = (ContributionItem) item;
+//					
+//					if (contributionItem.getClass().getSimpleName().equals("FilterActionMenuContributionItem")) {
+//						try {
+//							Class<?> clazz = contributionItem.getClass();
+//							Field field = clazz.getDeclaredField("fActionGroup");
+//							field.setAccessible(true);
+//							Object object = field.get(contributionItem);
+//							if (object instanceof CustomFiltersActionGroup) {
+//								CustomFiltersActionGroup group = (CustomFiltersActionGroup) object;
+//								group.setFilters(new String[] { });
+//							}
+//						} catch (Exception e) {
+//							e.printStackTrace();
+//						}
+//					}
+//				}
+			}
+		}
+	}
+
+	@Override
+	protected void setDefaultLinkingEnabled(boolean on) {
+		IViewPart part = super.getPartForAction();
+		if (part instanceof CView) {
+			((CView) part).setLinkingEnabled(on);
+		}
+	}
+
+	@Override
+	protected boolean isDefaultLinkingEnabled() {
+		IViewPart part = super.getPartForAction();
+		if (part instanceof CView) {
+			return ((CView) part).isLinkingEnabled();
+		}
+		return false;
+	}
+
+	@Override
+	public List<StructuredViewer> getViewers() {
+		List<StructuredViewer> viewers = new ArrayList<StructuredViewer>();
+		// TODO: get from super
+		IViewPart part = super.getPartForAction();
+		if (part instanceof CView) {
+			viewers.add(((CView) part).getViewer());
+		}
+		return viewers;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/actions/ShowFilteredChildrenAction.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/actions/ShowFilteredChildrenAction.java
new file mode 100644
index 0000000..1d922ee
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/actions/ShowFilteredChildrenAction.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.cdt.mylyn.internal.ui.actions;
+
+import org.eclipse.cdt.internal.ui.cview.CView;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.mylyn.internal.context.ui.BrowseFilteredListener;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * @author Mik Kersten
+ * @author Jeff Johnston
+ */
+public class ShowFilteredChildrenAction extends Action implements IObjectActionDelegate, IViewActionDelegate {
+
+	private BrowseFilteredListener browseFilteredListener;
+
+	private TreeViewer treeViewer;
+
+	private IStructuredSelection selection;
+
+	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+		if (targetPart instanceof CView) {
+			treeViewer = ((CView) targetPart).getViewer();
+			browseFilteredListener = new BrowseFilteredListener(treeViewer);
+		}
+	}
+
+	public void init(IViewPart targetPart) {
+		if (targetPart instanceof CView) {
+			treeViewer = ((CView) targetPart).getViewer();
+			browseFilteredListener = new BrowseFilteredListener(treeViewer);
+		}
+	}
+
+	public void run(IAction action) {
+		if (selection != null) {
+			browseFilteredListener.unfilterSelection(treeViewer, selection);
+		}
+	}
+
+	public void selectionChanged(IAction action, ISelection selection) {
+		if (selection instanceof IStructuredSelection) {
+			this.selection = (IStructuredSelection) selection;
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/editor/ActiveFoldingListener.java b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/editor/ActiveFoldingListener.java
new file mode 100644
index 0000000..b9b64e2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn.ui/src/org/eclipse/cdt/mylyn/internal/ui/editor/ActiveFoldingListener.java
@@ -0,0 +1,233 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Mylyn project committers and others.
+ * 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
+ *******************************************************************************/
+/*
+ * Created on May 16, 2005
+ */
+package org.eclipse.cdt.mylyn.internal.ui.editor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IMethod;
+import org.eclipse.cdt.core.model.IParent;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.internal.ui.editor.CSourceViewer;
+import org.eclipse.cdt.mylyn.internal.ui.CDTStructureBridge;
+import org.eclipse.cdt.mylyn.internal.ui.CDTUIBridgePlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
+import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
+import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+import org.eclipse.mylyn.commons.core.StatusHandler;
+import org.eclipse.mylyn.context.core.AbstractContextListener;
+import org.eclipse.mylyn.context.core.IInteractionContext;
+import org.eclipse.mylyn.context.core.IInteractionElement;
+import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
+import org.eclipse.mylyn.internal.context.ui.ContextUiPlugin;
+
+/**
+ * @author Mik Kersten
+ * @author Jeff Johnston
+ */
+public class ActiveFoldingListener extends AbstractContextListener {
+	private final CEditor editor;
+
+	private ProjectionAnnotationModel updater;
+
+	private static CDTStructureBridge bridge = (CDTStructureBridge) ContextCorePlugin.getDefault()
+			.getStructureBridge(CDTStructureBridge.CONTENT_TYPE);
+
+	private boolean enabled = false;
+
+	private IPropertyChangeListener PREFERENCE_LISTENER = new IPropertyChangeListener() {
+		public void propertyChange(PropertyChangeEvent event) {
+			if (event.getProperty().equals(CDTUIBridgePlugin.AUTO_FOLDING_ENABLED)) {
+				if (event.getNewValue().equals(Boolean.TRUE.toString())) {
+					enabled = true;
+				} else {
+					enabled = false;
+				}
+				updateFolding();
+			}
+		}
+	};
+
+	public ActiveFoldingListener(CEditor editor) {
+		this.editor = editor;
+		if (ContextUiPlugin.getDefault() == null) {
+			StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID,
+					CDTUIBridgePlugin.getResourceString("MylynCDT.initFoldingFailure"))); // $NON-NLS-1$
+		} else { 
+			ContextCorePlugin.getContextManager().addListener(this);
+			ContextUiPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(PREFERENCE_LISTENER);
+
+			enabled = ContextUiPlugin.getDefault().getPreferenceStore().getBoolean(
+					CDTUIBridgePlugin.AUTO_FOLDING_ENABLED);
+			updateFolding();
+		}
+	}
+	
+	protected void collapseElements(ICElement[] elements) {
+		for (int i = 0; i < elements.length; ++i) {
+			collapse(elements[i]);
+		}
+	}
+	
+	private void collapse(ICElement element) {
+		CSourceViewer viewer = (CSourceViewer)editor.getViewer();
+		viewer.doOperation(ProjectionViewer.COLLAPSE);
+	}
+	
+	protected void expandElements(ICElement[] elements) {
+		for (int i = 0; i < elements.length; ++i) {
+			expand(elements[i]);
+		}
+	}
+	
+	private void expand(ICElement element) {
+		CSourceViewer viewer = (CSourceViewer)editor.getViewer();
+		viewer.doOperation(ProjectionViewer.EXPAND);
+	}
+
+	public void dispose() {
+		ContextCorePlugin.getContextManager().removeListener(this);
+		ContextUiPlugin.getDefault().getPluginPreferences().removePropertyChangeListener(PREFERENCE_LISTENER);
+	}
+
+	public static void resetProjection(CEditor CEditor) {
+		// XXX: ignore for 3.2, leave for 3.1?
+	}
+
+	public void updateFolding() {
+		if (!enabled || !ContextCorePlugin.getContextManager().isContextActive()) {
+			editor.resetProjection();
+		} else if (editor.getInputCElement() == null) {
+			return;
+		} else {
+			try {
+				List<ICElement> toExpand = new ArrayList<ICElement>();
+				List<ICElement> toCollapse = new ArrayList<ICElement>();
+
+				ICElement element = editor.getInputCElement();
+				if (element instanceof ITranslationUnit) {
+					ITranslationUnit compilationUnit = (ITranslationUnit) element;
+					List<ICElement> allChildren = getAllChildren(compilationUnit);
+					for (ICElement child : allChildren) {
+						IInteractionElement interactionElement = ContextCorePlugin.getContextManager().getElement(
+								bridge.getHandleIdentifier(child));
+						if (interactionElement != null && interactionElement.getInterest().isInteresting()) {
+							toExpand.add(child);
+						} else {
+							toCollapse.add(child);
+						}
+					}
+				}
+
+				collapseElements(toCollapse.toArray(new ICElement[toCollapse.size()]));
+				expandElements(toExpand.toArray(new ICElement[toExpand.size()]));
+					
+			} catch (Exception e) {
+				StatusHandler.fail(new Status(IStatus.ERROR, CDTUIBridgePlugin.PLUGIN_ID,
+						CDTUIBridgePlugin.getResourceString("MylynCDT.updateFoldingFailure"), e)); // $NON-NLS-1$
+			}
+		}
+	}
+
+	private static List<ICElement> getAllChildren(IParent parentElement) {
+		List<ICElement> allChildren = new ArrayList<ICElement>();
+		try {
+			for (ICElement child : parentElement.getChildren()) {
+				allChildren.add(child);
+				if (child instanceof IParent) {
+					allChildren.addAll(getAllChildren((IParent) child));
+				}
+			}
+		} catch (CModelException e) {
+			// ignore failures
+		}
+		return allChildren;
+	}
+
+	public void interestChanged(List<IInteractionElement> elements) {
+		for (IInteractionElement element : elements) {
+			if (updater == null || !enabled) {
+				return;
+			} else {
+				Object object = bridge.getObjectForHandle(element.getHandleIdentifier());
+				if (object instanceof IMethod) {
+					IMethod member = (IMethod) object;
+					if (element.getInterest().isInteresting()) {
+						expandElements(new ICElement[] { member });
+						// expand the next 2 children down (e.g. anonymous types)
+						try {
+							ICElement[] children = ((IParent) member).getChildren();
+							if (children.length == 1) {
+								expandElements(new ICElement[] { children[0] });
+								if (children[0] instanceof IParent) {
+									ICElement[] childsChildren = ((IParent) children[0]).getChildren();
+									if (childsChildren.length == 1) {
+										expandElements(new ICElement[] { childsChildren[0] });
+									}
+								}
+							}
+						} catch (CModelException e) {
+							// ignore
+						}
+					} else {
+						collapseElements(new ICElement[] { member });
+					}
+				}
+			}
+		}
+	}
+
+	public void contextActivated(IInteractionContext context) {
+		if (ContextUiPlugin.getDefault()
+				.getPreferenceStore()
+				.getBoolean(CDTUIBridgePlugin.AUTO_FOLDING_ENABLED)) {
+			updateFolding();
+		}
+	}
+
+	public void contextDeactivated(IInteractionContext context) {
+		if (ContextUiPlugin.getDefault()
+				.getPreferenceStore()
+				.getBoolean(CDTUIBridgePlugin.AUTO_FOLDING_ENABLED)) {
+			updateFolding();
+		}
+	}
+
+	public void contextCleared(IInteractionContext context) {
+		if (ContextUiPlugin.getDefault()
+				.getPreferenceStore()
+				.getBoolean(CDTUIBridgePlugin.AUTO_FOLDING_ENABLED)) {
+			updateFolding();
+		}
+	}
+
+	public void landmarkAdded(IInteractionElement element) {
+		// ignore
+	}
+
+	public void landmarkRemoved(IInteractionElement element) {
+		// ignore
+	}
+
+	public void relationsChanged(IInteractionElement node) {
+		// ignore
+	}
+
+	public void elementDeleted(IInteractionElement node) {
+		// ignore
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.mylyn/.project b/results/plugins/org.eclipse.cdt.mylyn/.project
new file mode 100644
index 0000000..e5441f3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.mylyn</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.cdt.mylyn/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.cdt.mylyn/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..f478006
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.cdt.mylyn
+Bundle-Version: 1.0.100.qualifier
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin
diff --git a/results/plugins/org.eclipse.cdt.core.aix/about.html b/results/plugins/org.eclipse.cdt.mylyn/about.html
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.aix/about.html
copy to results/plugins/org.eclipse.cdt.mylyn/about.html
diff --git a/results/plugins/org.eclipse.cdt.mylyn/about.ini b/results/plugins/org.eclipse.cdt.mylyn/about.ini
new file mode 100644
index 0000000..cddf93f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=eclipse32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+welcomePage=$nl$/welcome.xml
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/about.mappings b/results/plugins/org.eclipse.cdt.mylyn/about.mappings
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/about.mappings
copy to results/plugins/org.eclipse.cdt.mylyn/about.mappings
diff --git a/results/plugins/org.eclipse.cdt.mylyn/about.properties b/results/plugins/org.eclipse.cdt.mylyn/about.properties
new file mode 100644
index 0000000..2332675
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn/about.properties
@@ -0,0 +1,24 @@
+###############################################################################
+#  Copyright (c) 2008, 2009 Wind River Systems and others.
+#  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
+# 
+#  Contributors:
+#     Wind River Systems - initial API and implementation
+#	  IBM Corporation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=Eclipse C/C++ Development Tools - Mylyn Bridge\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright Eclipse contributors and others, 2005, 2009.  All rights reserved.\n\
+Visit http://www.eclipse.org/cdt
diff --git a/results/plugins/org.eclipse.cdt.mylyn/build.properties b/results/plugins/org.eclipse.cdt.mylyn/build.properties
new file mode 100644
index 0000000..7efa565
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn/build.properties
@@ -0,0 +1,19 @@
+###############################################################################
+#  Copyright (c) 2008 Wind River Systems and others.
+#  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
+# 
+#  Contributors:
+#      Wind River Systems - initial API and implementation
+###############################################################################
+bin.includes = META-INF/,\
+               about.html,\
+               about.ini,\
+               about.properties,\
+               about.mappings,\
+               eclipse32.gif,\
+               epl-v10.html,\
+               notice.html,\
+               plugin.properties
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif b/results/plugins/org.eclipse.cdt.mylyn/eclipse32.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif
copy to results/plugins/org.eclipse.cdt.mylyn/eclipse32.gif
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html b/results/plugins/org.eclipse.cdt.mylyn/epl-v10.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html
copy to results/plugins/org.eclipse.cdt.mylyn/epl-v10.html
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/rootfiles/notice.html b/results/plugins/org.eclipse.cdt.mylyn/notice.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/rootfiles/notice.html
copy to results/plugins/org.eclipse.cdt.mylyn/notice.html
diff --git a/results/plugins/org.eclipse.cdt.mylyn/plugin.properties b/results/plugins/org.eclipse.cdt.mylyn/plugin.properties
new file mode 100644
index 0000000..f84238e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.mylyn/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2009 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#	  IBM Corporation - initial API and implementation
+###############################################################################
+#Properties file for org.eclipse.cdt.mylyn
+Bundle-Vendor = Eclipse CDT
+Bundle-Name = Mylyn Bridge: C/C++ Development
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.p2/.classpath b/results/plugins/org.eclipse.cdt.p2/.classpath
new file mode 100644
index 0000000..c8ff43b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.p2/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+		<accessrules>
+			<accessrule kind="accessible" pattern="**/internal/provisional/**"/>
+			<accessrule kind="accessible" pattern="**/internal/p2/**"/>
+		</accessrules>
+	</classpathentry>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/results/plugins/org.eclipse.cdt.p2/.project b/results/plugins/org.eclipse.cdt.p2/.project
new file mode 100644
index 0000000..8808e4b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.p2/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.p2</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.cdt.p2/.settings/org.eclipse.jdt.core.prefs b/results/plugins/org.eclipse.cdt.p2/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..aca6ee8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.p2/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Sun Nov 30 21:26:19 EST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/results/plugins/org.eclipse.cdt.p2/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.cdt.p2/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..26e1d61
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.p2/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.cdt.p2;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.cdt.internal.p2.Activator
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.equinox.p2.artifact.repository;bundle-version="1.0.2",
+ org.eclipse.equinox.p2.core;bundle-version="1.0.0",
+ org.eclipse.equinox.p2.metadata;bundle-version="1.0.0",
+ org.eclipse.equinox.p2.engine;bundle-version="1.0.1",
+ org.apache.ant;bundle-version="1.7.0",
+ org.eclipse.equinox.p2.touchpoint.natives;bundle-version="1.0.0",
+ org.eclipse.equinox.p2.repository;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.cdt.internal.p2,
+ org.eclipse.cdt.internal.p2.touchpoint.natives.actions
diff --git a/results/plugins/org.eclipse.cdt.core.aix/about.html b/results/plugins/org.eclipse.cdt.p2/about.html
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.aix/about.html
copy to results/plugins/org.eclipse.cdt.p2/about.html
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/about.ini b/results/plugins/org.eclipse.cdt.p2/about.ini
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/about.ini
copy to results/plugins/org.eclipse.cdt.p2/about.ini
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/about.mappings b/results/plugins/org.eclipse.cdt.p2/about.mappings
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/about.mappings
copy to results/plugins/org.eclipse.cdt.p2/about.mappings
diff --git a/results/plugins/org.eclipse.cdt.p2/about.properties b/results/plugins/org.eclipse.cdt.p2/about.properties
new file mode 100644
index 0000000..b35f395
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.p2/about.properties
@@ -0,0 +1,24 @@
+###############################################################################
+#  Copyright (c) 2002, 2009 Wind River Systems and others.
+#  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
+# 
+#  Contributors:
+#     Wind River Systems - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+# NOTE TO TRANSLATOR: Please do not translate the featureVersion variable.
+
+blurb=Eclipse CDT P2 Customizations for SDK installation\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright Eclipse contributors and others, 2000, 2009.  All rights reserved.\n\
+Visit http://www.eclipse.org/cdt
diff --git a/results/plugins/org.eclipse.cdt.p2/build.properties b/results/plugins/org.eclipse.cdt.p2/build.properties
new file mode 100644
index 0000000..0226758
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.p2/build.properties
@@ -0,0 +1,21 @@
+###############################################################################
+#  Copyright (c) 2008 Wind River Systems and others.
+#  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
+# 
+#  Contributors:
+#      Wind River Systems - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               about.html,\
+               about.ini,\
+               about.mappings,\
+               eclipse32.gif,\
+               plugin.properties,\
+               about.properties
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif b/results/plugins/org.eclipse.cdt.p2/eclipse32.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif
copy to results/plugins/org.eclipse.cdt.p2/eclipse32.gif
diff --git a/results/plugins/org.eclipse.cdt.p2/plugin.properties b/results/plugins/org.eclipse.cdt.p2/plugin.properties
new file mode 100644
index 0000000..28b588b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.p2/plugin.properties
@@ -0,0 +1,16 @@
+###############################################################################
+# Copyright (c) 2008, 2009 Wind River Systems and others.
+# 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
+#
+# Contributors:
+#     Doug Schaefer (Wind River) - initial API and implementation
+#	  IBM Corporation
+###############################################################################
+
+installArtifactRepository=Install Artifact Repository
+
+Bundle-Vendor = Eclipse CDT
+Bundle-Name = CDT P2 customizations for SDKs
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.p2/plugin.xml b/results/plugins/org.eclipse.cdt.p2/plugin.xml
new file mode 100644
index 0000000..9c25e54
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.p2/plugin.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+   <extension
+         point="org.eclipse.equinox.p2.engine.actions">
+      <action
+            class="org.eclipse.cdt.internal.p2.touchpoint.natives.actions.UntarAction"
+            name="org.eclipse.equinox.p2.touchpoint.natives.untar"
+            touchpointType="org.eclipse.equinox.p2.native"
+            touchpointVersion="1.0.0"
+            version="1.0.0">
+      </action>
+   </extension>
+   <extension
+         point="org.eclipse.equinox.p2.engine.actions">
+      <action
+            class="org.eclipse.cdt.internal.p2.touchpoint.natives.actions.CleanupUntarAction"
+            name="org.eclipse.equinox.p2.touchpoint.natives.cleanupuntar"
+            touchpointType="org.eclipse.equinox.p2.native"
+            touchpointVersion="1.0.0"
+            version="1.0.0">
+      </action>
+   </extension>
+
+</plugin>
diff --git a/results/plugins/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/Activator.java b/results/plugins/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/Activator.java
new file mode 100644
index 0000000..cdc52ff
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/Activator.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.p2;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.eclipse.cdt.p2";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+	static public BundleContext getContext() {
+		return plugin.getBundle().getBundleContext();
+	}
+	
+	/**
+	 * Return a service from our context.
+	 * 
+	 * @param name name of the service
+	 * @return the service
+	 */
+	@SuppressWarnings("unchecked")
+	public <T> T getService(Class<T> clazz) {
+		BundleContext context = getBundle().getBundleContext();
+		ServiceReference ref = context.getServiceReference(clazz.getName());
+		return (ref != null) ? (T)context.getService(ref) : null;
+	}
+	
+	/**
+	 * Spit out the log.
+	 * 
+	 * @param status
+	 */
+	public void log(int severity, String message, Throwable exception) {
+		Platform.getLog(plugin.getBundle()).log(new Status(severity, PLUGIN_ID, message, exception));
+	}
+	
+	public void log(IStatus status) {
+		Platform.getLog(plugin.getBundle()).log(status);
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/CleanupUntarAction.java b/results/plugins/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/CleanupUntarAction.java
new file mode 100644
index 0000000..d8c108f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/CleanupUntarAction.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.p2.touchpoint.natives.actions;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupzipAction;
+import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
+
+/**
+ * Cleanup an untared artifact.
+ * 
+ * syntax: cleanupuntar(source:@artifact, target:${installFolder}/<subdir>, compression:[gz|bz2])
+ * 
+ * @author DSchaefe
+ *
+ */
+public class CleanupUntarAction extends ProvisioningAction {
+
+	@Override
+	public IStatus execute(Map parameters) {
+		return cleanup(parameters);
+	}
+
+	@Override
+	public IStatus undo(Map parameters) {
+		return UntarAction.untar(parameters);
+	}
+
+	public static IStatus cleanup(Map parameters) {
+		return CleanupzipAction.cleanupzip(parameters, false);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java b/results/plugins/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java
new file mode 100644
index 0000000..0a1d080
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.p2/src/org/eclipse/cdt/internal/p2/touchpoint/natives/actions/UntarAction.java
@@ -0,0 +1,179 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems and others.
+ * 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
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.p2.touchpoint.natives.actions;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.zip.GZIPInputStream;
+
+import org.apache.tools.bzip2.CBZip2InputStream;
+import org.apache.tools.tar.TarEntry;
+import org.apache.tools.tar.TarInputStream;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.engine.Profile;
+import org.eclipse.equinox.internal.p2.touchpoint.natives.Messages;
+import org.eclipse.equinox.internal.p2.touchpoint.natives.Util;
+import org.eclipse.equinox.internal.p2.touchpoint.natives.actions.ActionConstants;
+import org.eclipse.equinox.internal.p2.touchpoint.natives.actions.UnzipAction;
+import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IFileArtifactRepository;
+import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
+import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Untar the artifact with a choice of compression
+ * 
+ * syntax: untar(source:@artifact, target:${installFolder}/<subdir>, compression:[gz|bz2])
+ * 
+ * @author DSchaefe
+ *
+ */
+public class UntarAction extends ProvisioningAction {
+
+	private static final String ACTION_NAME = "untar";
+	private static final String PARM_COMPRESSION = "compression";
+	private static final String VALUE_GZ = "gz";
+	private static final String VALUE_BZ2 = "bz2";
+	
+	private enum Compression {
+		none,
+		gz,
+		bz2
+	}
+	
+	@Override
+	public IStatus execute(Map parameters) {
+		return untar(parameters);
+	}
+
+	@Override
+	public IStatus undo(Map parameters) {
+		return CleanupUntarAction.cleanup(parameters);
+	}
+
+	public static IStatus untar(Map parameters) {
+		String source = (String)parameters.get(ActionConstants.PARM_SOURCE);
+		if (source == null)
+			return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_SOURCE, ACTION_NAME));
+
+		String originalSource = source;
+		String target = (String)parameters.get(ActionConstants.PARM_TARGET);
+		if (target == null)
+			return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET, ACTION_NAME));
+
+		String compressionStr = (String)parameters.get(PARM_COMPRESSION);
+		Compression compression;
+		if (compressionStr == null)
+			return Util.createError(NLS.bind(Messages.param_not_set, PARM_COMPRESSION, ACTION_NAME));
+		else if (compressionStr.equals(VALUE_GZ))
+			compression = Compression.gz;
+		else if (compressionStr.equals(VALUE_BZ2))
+			compression = Compression.bz2;
+		else 
+			// TODO Should put out a log if compression is unknown
+			compression = Compression.none;
+		
+		IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
+		Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
+
+		if (source.equals(ActionConstants.PARM_ARTIFACT)) {
+			//TODO: fix wherever this occurs -- investigate as this is probably not desired
+			if (iu.getArtifacts() == null || iu.getArtifacts().length == 0)
+				return Status.OK_STATUS;
+
+			IArtifactKey artifactKey = iu.getArtifacts()[0];
+
+			IFileArtifactRepository downloadCache;
+			try {
+				downloadCache = Util.getDownloadCacheRepo();
+			} catch (ProvisionException e) {
+				return e.getStatus();
+			}
+			File fileLocation = downloadCache.getArtifactFile(artifactKey);
+			if ((fileLocation == null) || !fileLocation.exists())
+				return Util.createError(NLS.bind(Messages.artifact_not_available, artifactKey));
+			source = fileLocation.getAbsolutePath();
+		}
+
+		File[] unzippedFiles = untar(source, target, compression);
+		StringBuffer unzippedFileNameBuffer = new StringBuffer();
+		for (int i = 0; i < unzippedFiles.length; i++)
+			unzippedFileNameBuffer.append(unzippedFiles[i].getAbsolutePath()).append(ActionConstants.PIPE);
+
+		profile.setInstallableUnitProperty(iu, "unzipped" + ActionConstants.PIPE + originalSource + ActionConstants.PIPE + target, unzippedFileNameBuffer.toString()); //$NON-NLS-1$
+		return Status.OK_STATUS;
+	}
+	
+	private static File[] untar(String source, String destination, Compression compression) {
+		File zipFile = new File(source);
+		if (!zipFile.exists()) {
+			Util.log(UnzipAction.class.getName() + " the files to be unzipped is not here"); //$NON-NLS-1$
+		}
+
+		File target = new File(destination);
+		
+		try {
+			FileInputStream fileIn = new FileInputStream(zipFile);
+			InputStream compIn = fileIn;
+			if (compression.equals(Compression.gz))
+				compIn = new GZIPInputStream(fileIn);
+			else if (compression.equals(Compression.bz2)) {
+				// Skip the magic bytes first
+				fileIn.read(new byte[2]);
+				compIn = new CBZip2InputStream(fileIn);
+			}
+
+			ArrayList<File> fileList = new ArrayList<File>();
+			TarInputStream tarIn = new TarInputStream(compIn);
+			for (TarEntry tarEntry = tarIn.getNextEntry(); tarEntry != null; tarEntry = tarIn.getNextEntry()) {
+				File outFile = new File(target, tarEntry.getName());
+				if (tarEntry.isDirectory()) {
+					outFile.mkdirs();
+				} else {
+					if (outFile.exists())
+						outFile.delete();
+					else
+						outFile.getParentFile().mkdirs();
+					FileOutputStream outStream = new FileOutputStream(outFile);
+					tarIn.copyEntryContents(outStream);
+					outStream.close();
+					
+					// Set last modified time from the tar entry
+					long lastModified = tarEntry.getModTime().getTime();
+					outFile.setLastModified(lastModified);
+					
+					// Set the executable bits from the tar entry
+					// we let the umask determine the r/w
+					int mode = tarEntry.getMode();
+					boolean exec = (mode & 0x111) != 0;
+					boolean execOwner = (mode & 0x11) == 0;
+//					outFile.setExecutable(exec, execOwner);
+					
+					fileList.add(outFile);
+				}
+			}
+			tarIn.close();
+			return fileList.toArray(new File[fileList.size()]);
+		} catch (IOException e) {
+			Util.log(UnzipAction.class.getName() + " error unzipping zipfile: " + zipFile.getAbsolutePath() + " destination: " + destination); //$NON-NLS-1$ //$NON-NLS-2$
+			Util.log(e.getLocalizedMessage());
+		}
+		return null;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.testing/.project b/results/plugins/org.eclipse.cdt.testing/.project
new file mode 100644
index 0000000..162151c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.testing/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.testing</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.cdt.testing/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.cdt.testing/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..3f20f15
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.testing/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.cdt.testing;singleton:=true
+Bundle-Version: 6.0.0.qualifier
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
diff --git a/results/plugins/org.eclipse.cdt.testing/about.html b/results/plugins/org.eclipse.cdt.testing/about.html
new file mode 100644
index 0000000..9c7ba0a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.testing/about.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head>
+
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>May 2, 2006</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.sdk/about.ini b/results/plugins/org.eclipse.cdt.testing/about.ini
similarity index 100%
copy from results/plugins/org.eclipse.cdt.sdk/about.ini
copy to results/plugins/org.eclipse.cdt.testing/about.ini
diff --git a/results/plugins/org.eclipse.cdt.sdk/about.mappings b/results/plugins/org.eclipse.cdt.testing/about.mappings
similarity index 100%
copy from results/plugins/org.eclipse.cdt.sdk/about.mappings
copy to results/plugins/org.eclipse.cdt.testing/about.mappings
diff --git a/results/plugins/org.eclipse.cdt.testing/about.properties b/results/plugins/org.eclipse.cdt.testing/about.properties
new file mode 100644
index 0000000..92d10e7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.testing/about.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2005, 2007 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=Eclipse C/C++ Development Tools Testing Framework\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright Eclipse contributors and others, 2000, 2007.  All rights reserved.\n\
+Visit http://www.eclipse.org/cdt
diff --git a/results/plugins/org.eclipse.cdt.testing/build.properties b/results/plugins/org.eclipse.cdt.testing/build.properties
new file mode 100644
index 0000000..bb2b029
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.testing/build.properties
@@ -0,0 +1,22 @@
+###############################################################################
+#  Copyright (c) 2005, 2009 IBM Corporation and others.
+#  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
+# 
+#  Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+bin.includes = about.html,\
+               about.ini,\
+               about.mappings,\
+               about.properties,\
+               eclipse32_old.gif,\
+               plugin.properties,\
+               test.xml,\
+               epl-v10.html,\
+               notice.html,\
+               META-INF/,\
+               eclipse32.gif
+src.includes = about.html
diff --git a/results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif b/results/plugins/org.eclipse.cdt.testing/eclipse32.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.lrparser/eclipse32.gif
copy to results/plugins/org.eclipse.cdt.testing/eclipse32.gif
diff --git a/results/plugins/org.eclipse.cdt.testing/eclipse32_old.gif b/results/plugins/org.eclipse.cdt.testing/eclipse32_old.gif
new file mode 100644
index 0000000..f71a8f6
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.testing/eclipse32_old.gif differ
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html b/results/plugins/org.eclipse.cdt.testing/epl-v10.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/epl-v10.html
copy to results/plugins/org.eclipse.cdt.testing/epl-v10.html
diff --git a/results/features/org.eclipse.cdt.core.lrparser.feature/rootfiles/notice.html b/results/plugins/org.eclipse.cdt.testing/notice.html
similarity index 100%
copy from results/features/org.eclipse.cdt.core.lrparser.feature/rootfiles/notice.html
copy to results/plugins/org.eclipse.cdt.testing/notice.html
diff --git a/results/plugins/org.eclipse.cdt.testing/plugin.properties b/results/plugins/org.eclipse.cdt.testing/plugin.properties
new file mode 100644
index 0000000..5a4df02
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.testing/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2005, 2009 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+pluginName=Eclipse C/C++ Development Tools Testing Framework
+providerName=Eclipse CDT
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.testing/test.xml b/results/plugins/org.eclipse.cdt.testing/test.xml
new file mode 100644
index 0000000..9fa767a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.testing/test.xml
@@ -0,0 +1,76 @@
+<project name="CDT Automated Tests" default="run" basedir=".">
+
+	<property name="cdt-core-loc" value="${eclipse-home}/cdt_core_folder"/>
+	<property name="cdt-ui-loc" value="${eclipse-home}/cdt_ui_folder"/>
+	<property name="cdt-debug-ui-loc" value="${eclipse-home}/cdt_debug_ui_folder"/>
+	<property name="cdt-mbs-core-loc" value="${eclipse-home}/cdt_mbs_core_folder"/>
+	<property name="cdt-mbs-ui-loc" value="${eclipse-home}/cdt_mbs_ui_folder"/>
+
+	<target name="init">
+		<echo message="library file: ${library-file}"/>
+	</target>
+
+	<target name="cleanup">
+	</target>
+
+	<target name="run" depends="init,suite">
+		<ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+			<property name="includes" value="org*.xml"/>
+			<property name="output-file" value="org.eclipse.cdt.testing.xml"/>
+		</ant>
+	</target>
+
+	<target name="cdt-core" depends="init">
+		<ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+			<property name="data-dir" value="${cdt-core-loc}"/>
+			<property name="plugin-name" value="org.eclipse.cdt.core.tests"/>
+			<property name="classname" value="org.eclipse.cdt.core.suite.AutomatedIntegrationSuite"/>
+			<property name="extraVMargs" value="-Dorg.eclipse.swt.browser.XULRunnerPath=/shared/common/mozilla-xulrunner181-1.8.1.4-30.ppc"/>
+		</ant>
+	</target>
+
+	<target name="cdt-ui" depends="init">
+		<ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+			<property name="data-dir" value="${cdt-ui-loc}"/>
+			<property name="plugin-name" value="org.eclipse.cdt.ui.tests"/>
+			<property name="classname" value="org.eclipse.cdt.ui.tests.AutomatedSuite"/>
+			<property name="extraVMargs" value="-Dorg.eclipse.swt.browser.XULRunnerPath=/shared/common/mozilla-xulrunner181-1.8.1.4-30.ppc"/>
+		</ant>
+	</target>
+
+	<target name="cdt-debug-ui" depends="init">
+		<ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+			<property name="data-dir" value="${cdt-debug-ui-loc}"/>
+			<property name="plugin-name" value="org.eclipse.cdt.debug.ui.tests"/>
+			<property name="classname" value="org.eclipse.cdt.debug.core.tests.AllDebugTests"/>
+			<property name="extraVMargs" value="-Dorg.eclipse.swt.browser.XULRunnerPath=/shared/common/mozilla-xulrunner181-1.8.1.4-30.ppc"/>
+		</ant>
+	</target>
+
+	<target name="cdt-mbs-core" depends="init">
+		<ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+			<property name="data-dir" value="${cdt-mbs-core-loc}"/>
+			<property name="plugin-name" value="org.eclipse.cdt.managedbuilder.core.tests"/>
+			<property name="classname" value="org.eclipse.cdt.managedbuilder.tests.suite.AllManagedBuildTests"/>
+			<property name="extraVMargs" value="-Dorg.eclipse.swt.browser.XULRunnerPath=/shared/common/mozilla-xulrunner181-1.8.1.4-30.ppc"/>
+		</ant>
+	</target>
+
+	<target name="cdt-mbs-ui" depends="init">
+		<ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+			<property name="data-dir" value="${cdt-mbs-ui-loc}"/>
+			<property name="plugin-name" value="org.eclipse.cdt.managedbuilder.ui.tests"/>
+			<property name="classname" value="org.eclipse.cdt.managedbuilder.ui.tests.suite.AllManagedBuildUITests"/>
+			<property name="extraVMargs" value="-Dorg.eclipse.swt.browser.XULRunnerPath=/shared/common/mozilla-xulrunner181-1.8.1.4-30.ppc"/>
+		</ant>
+	</target>
+
+	<target name="suite">
+		<antcall target="cdt-core"/>
+		<antcall target="cdt-ui"/>
+		<antcall target="cdt-debug-ui"/>
+		<antcall target="cdt-mbs-core"/>
+		<antcall target="cdt-mbs-ui"/>
+	</target>
+
+</project>
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/.classpath b/results/plugins/org.eclipse.cdt.ui.tests/.classpath
new file mode 100644
index 0000000..e2fea57
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="ui"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/results/plugins/org.eclipse.cdt.core.aix/.cvsignore b/results/plugins/org.eclipse.cdt.ui.tests/.cvsignore
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.aix/.cvsignore
copy to results/plugins/org.eclipse.cdt.ui.tests/.cvsignore
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/.options b/results/plugins/org.eclipse.cdt.ui.tests/.options
new file mode 100644
index 0000000..d93b298
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/.options
@@ -0,0 +1 @@
+org.eclipse.cdt.ui.tests/debug = false
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/.project b/results/plugins/org.eclipse.cdt.ui.tests/.project
new file mode 100644
index 0000000..4ba31c1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.cdt.ui.tests</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/.settings/org.eclipse.jdt.core.prefs b/results/plugins/org.eclipse.cdt.ui.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..684bece
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,332 @@
+#Wed Feb 27 13:20:15 CET 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=disabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=ignore
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/.settings/org.eclipse.jdt.ui.prefs b/results/plugins/org.eclipse.cdt.ui.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..503cbf0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,8 @@
+#Sun Feb 11 21:07:41 EST 2007
+eclipse.preferences.version=1
+formatter_profile=_Eclipse [built-in] - cdt
+formatter_settings_version=11
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;org.eclipse.cdt;org.eclipse.cdt.internal;org.eclipse.cdt.internal.ui;
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/.settings/org.eclipse.pde.prefs b/results/plugins/org.eclipse.cdt.ui.tests/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..a5686f5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,14 @@
+#Fri Jun 02 11:39:38 CEST 2006
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ChangeLog b/results/plugins/org.eclipse.cdt.ui.tests/ChangeLog
new file mode 100644
index 0000000..90940b1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ChangeLog
@@ -0,0 +1,734 @@
+2005-08-30 Alain Magloire
+	New test for PR 109202 (written by Devin Steffler)
+	* ui/org/eclipse/cdt/ui/tests/tex/selectiontests/CPPSelectionTestsDOMIndexer.java
+
+2005-06-08 Alain Magloire
+	Move to the IContentTypeManager framework: PR 86645
+	* src.org.eclipse/cdt/ui/tests/DOMAST/DOMAST.java
+	
+2005-03-13 Bogdan Gheorghe
+	Updated references to IndexManager to reflect new indexing framework.
+	
+2005-02-03 Tanya Wolff
+	Fixed some content assist regression tests.
+	Added Regression tests (content assist, refactoring) to automated suite for nightly builds
+	* ui/org.eclipse.cdt.ui.tests/AutomatedSuite.java
+	* ui/org.eclipse.cdt.ui.tests.regression/ContentAssistRegressionTests.java
+
+2004-12-17 Tanya Wolff
+	Added more Content Assist Regression tests
+
+2004-12-10 Alain Magloire
+	No need for TestBufferTest test, it is now in JFace.
+
+2004-11-16 Andrew Niefer
+	- created package ui/org.eclipse.ui.tests.regression 
+	- moved ContentAssistRegressionTests to it and created a RefactoringRegressionTests
+	- created a RegressionTestUISuite
+	
+
+2004-11-08 Mikhail Voronin
+	New tests for help extension.
+	* ui/org/eclipse/cdt/ui/tests/chelp/CHelpProviderTester.java
+	* ui/org/eclipse/cdt/ui/tests/chelp/CHelpTest.java
+	* ui/org/eclipse/cdt/ui/tests/chelp/CHelpTestInfoProvider.java
+
+2004-11-02 Tanya Wolff
+	added content assist regression tests
+	*ui.tests.text.contentassist/ContentAssistRegressionTests.java
+	
+2004-05-11 Andrew Niefer
+	Renamed CompletionFailedTest_ScopedReference_ConstructorDefinition to CompletionTest_VariableType_NestedPrefix
+	Modified expected results for CompletionTest_ConstructorReference
+
+2004-04-30 Hoda Amer
+	Added CompletionFailedTest_ScopedReference_ConstructorDefinition
+	Added CompletionTest_ScopedReference_NonCodeScope
+	
+2004-04-12 Hoda Amer
+	Updated CompletionFailedTest_ScopedReference_NoPrefix_Bug50152, renamed it to CompletionTest_ScopedReference_NoPrefix and moved it out of the failed tests folder.
+	
+2004-04-07 John Camelon
+	Updated CompletionFailedTest_ConstructorReference_Bug50808, renamed it to CompletionTest_ConstructorReference and moved it out of the failed tests folder.
+	Updated CompletionFailedTest_TypeDef_Bug52948, renamed it to CompletionTest_TypeDef_Prefix and moved it out of the failed tests folder.
+	Renamed CompletionTest_TypeDef_Bug52948 it to CompletionTest_TypeDef_NoPrefix.
+	Updated CompletionTest_SingleName_Parameter and renamed it to CompletionTest_FunctionReference_Prefix.
+	Updated CompletionFailedTest_FunctionReference_Bug50807, renamed it to CompletionTest_FunctionReference_NoPrefix and moved it out of the failed tests folder.
+
+2004-04-07 John Camelon
+	Updated CompletionFailedTest_ScopedReference_Prefix_Bug50152, moved it out of failed tests package and renamed it to CompletionTest_ScopedReference_Prefix_Bug50152.
+	Updated CompletionFailedTest_TypeDef_Bug52948, moved it out of failed tests package and renamed it to CompletionTest_TypeDef_Bug52948. 
+	Updated CompletionFailedTest_ScopedReference_NoPrefix_Bug50152 to show Hoda/Andrew what is still broken.  	
+
+2004-03-08 Hoda Amer
+	Added one failed test: CompletionFailedTest_TypeDef_Bug52948
+
+2004-03-03 John Camelon
+	Updated failed test to fail in new way as Content Assist feature work continues on ...
+
+2004-01-30 John Camelon
+	Updated CompletionFailedTest_MacroRef_NoPrefix_Bug50487, renamed it to CompletionTest_MacroRef_NoPrefix and moved to passed test package.
+	Updated CompletionFailedTest_MacroRef_Prefix_Bug50487, renamed it to Y and moved to passed test package.
+	
+2004-01-29 Hoda Amer
+	-Added CompletionTest_SingleName_Parameter test to success tests.
+	-Changed BaseTest to check if the expected values exist in the proposed values
+	instead of checking that the expected values exactly match the first part of the proposed values
+	
+2004-01-29 John Camelon
+	Updated CompletionTest_ArgumentType_Prefix_Bug50642, renamed it to CompletionTest_ArgumentType_Prefix and moved to passed test package.
+	Updated CompletionTest_ArgumentType_Prefix2_Bug50642, renamed it to CompletionTest_ArgumentType_Prefix2 and moved to passed test package.
+	Updated CompletionTest_ArgumentType_NoPrefix_Bug50642, renamed it to CompletionTest_ArgumentType_NoPrefix and moved to passed test package.
+	Updated CompletionTest_ArgumentType_NoPrefix2_Bug50642, renamed it to CompletionTest_ArgumentType_NoPrefix2 and moved to passed test package.
+
+2004-01-29 Hoda Amer
+	Added two more tests, namely Function_Reference and Constructor_Reference.
+	Moved tests starts resources all to one directory.
+	
+2004-01-28 John Camelon
+	Updated and renamed CompletionFailedTest_NewTypeReference_NoPrefix_Bug50711 to CompletionTest_NewTypeReference_NoPrefix, moving it to the success tests directory.
+	Updated and renamed CompletionFailedTest_NewTypeReference_Prefix_Bug50711 to CompletionTest_NewTypeReference_Prefix, moving it to the success tests directory.
+
+2004-01-28 John Camelon
+	Updated CompletionTest_SingleName_NoPrefix to include internal macro definitions.
+
+2004-01-27 John Camelon
+	Updated COMPLETION_PARSE clients to use SINGLE_NAME_REFERENCE rather than STATEMENT_START.  
+	Renamed and updated CompletionTest_StatementStart_NoPrefix to CompletionTest_SingleName_Method_NoPrefix.
+	Renamed and updated CompletionTest_StatementStart_Prefix to CompletionTest_SingleName_Method_Prefix.
+	Renamed and updated CompletionFailedTest_ExceptionReference_NoPrefix_Bug50640 to CompletionTest_ExceptionReference_NoPrefix and moved to passed tests folder.
+	Renamed and updated CompletionFailedTest_ExceptionReference_Prefix_Bug50640 to CompletionTest_ExceptionReference_Prefix and moved to passed tests folder.
+	Renamed and updated CompletionFailedTest_NamespaceRef_NoPrefix_Bug50471 to CompletionTest_TypeRef_NoPrefix and moved to passed tests folder.
+	Renamed and updated CompletionFailedTest_NamespaceRef_Prefix_Bug50471 to CompletionTest_TypeRef_Prefix and moved to passed tests folder.
+	Renamed and updated CompletionFailedTest_ClassReference_Prefix_Bug50621 to CompletionTest_ClassReference_Prefix and moved to passed tests folder.
+	Renamed and updated CompletionFailedTest_ClassReference_NoPrefix_Bug50621 to CompletionTest_ClassReference_NoPrefix and moved to passed tests folder.
+
+2004-01-27 Hoda Amer
+	More Completion JUnit tests.
+
+2004-01-26 Hoda Amer
+	More Completion JUnit tests.
+
+2004-01-23 Hoda Amer
+	More Completion JUnit tests.
+	
+2004-01-22 John Camelon
+	Updated CompletionFailedTest_FieldType_NoPrefix_Bug50344 and moved from failed tests.  
+
+2004-01-21 Hoda Amer
+	Renamed completion tests to be more meaningful.
+	
+2004-01-21 Hoda Amer
+	Added more JUnit tests for Content Assist
+
+2004-01-19 Hoda Amer
+	Added a JUnit test case for completion on Macros with function style.
+	
+2004-01-16 Hoda Amer
+	Added More success JUnit tests.
+	Added two failed JUnit tests.
+	
+2004-01-15 Hoda Amer
+	Moved Content Assist testing to the UI.tests plugin
+	Started a new framework of JUnit tests for content assist.
+	Added Content assist tests to the AutomatedSuite test of the UI.tests plugin
+	
+2003-07-17 Peter Graves
+     Remove the usage of the assert, as it's a reserved keyword in 
+     Java 1.4 (Bugzilla 40377)
+
+2003-07-15 Peter Graves
+     Clean up some left over stuff that was moved into org.eclipse.cdt.core.tests,
+     and fixed the test.xml to point to the correct test suite.
+     
+2003-06-25 John Camelon
+	Create new interface and support for calculating lineNumber/offset mapping.  
+	Updated IASTClassSpecifier for qualified name query.  
+	Began structuring expressions and declarators in Parser for ISourceElementRequestor.  
+	Updated other packages to use new interfaces.
+	Updated automatedtests/torture test to use new line number information.  
+
+2003-06-24 John Camelon
+	Updates for ISourceElementRequestor - elaborated types & enumerations.  
+
+2003-06-23 John Camelon
+	Updated Factory infrastructure, constructors, etc. 
+	Introduced Preprocessor class for transitive closure calc. client.  
+
+2003-06-20 Sean Evoy
+	Moved the ManagedBuildInfo extension point to the plugin file in org.eclipse.cdt.core.tests
+
+2003-06-17 Brent Nicolle
+	Added Interface tests of IStructure.java.
+
+2003-06-17 Victor Mozgin
+	Added DeclaratorsTests.java (invocation in AllCoreTests).
+	Added DeclaratorsTests.cpp to org.eclipse.cdt.core.model.tests.resources.
+
+2003-06-16 Vladimir Hirsl
+	Added /build, /parser, /failures and /suite directories to the library. 
+	Copied resources from /model/org.eclipse.cdt.core.model.tests.resources
+	                 to /model/org/clipse/cdt/core/model/tests/resources/cmodel.
+	Added class AISResultPrinter to format test results.  
+	Class AutomatedIntegrationSuite now implements IPlatformRunnable.
+
+2003-06-16 Victor Mozgin
+	Added testOldKRFunctionDeclarations() to DOMTests.
+	Added testKRFunctionDeclarations() to TranslationUnitTests.
+
+2003-06-14 Victor Mozgin
+	Moved testBugSingleton192() from LokiFailures to DOMTests.
+	Added testPointersToMembers() and testPointersToMemberFunctions() to DOMTests.
+	Added testBug36290() and testBug36931() to DOMTests.
+
+2003-06-13 John Camelon
+	Added Class/Base infrastructure to public interfaces & requestor callback. 
+	Moved many internal interfaces to external packages. 
+	Organized imports.  
+
+2003-06-13 Victor Mozgin
+	Renamed NullParserCallback into NullSourceElementRequester in AutomatedFramework.
+
+2003-06-13 John Camelon
+	Merged ParserSymbolTable branch back into HEAD.
+
+2003-06-12 John Camelon
+	Get rest of JUnit tests working, will merge back to HEAD branch.  
+
+2003-06-12 John Camelon
+	Introduction of ASTFactory strategy, some restructuring of packages and interfaces.
+	
+2003-06-11 Victor Mozgin
+	Old Java TestCase.txt and TestCase2.txt for partioning testing have been replaced with C/C++ files.
+	Modified AutomatedIntegrationSuite.java so it doesn't produce JUnit warning anymore.
+	All tests in org.eclipse.cdt.ui.tests should pass now.
+
+3003-06-11 Peter Graves
+    Update the test.xml to get the location of org.eclipse.test from a property
+    if set. If the property is not set, it will default to the old value.
+    
+2003-06-11 Victor Mozgin
+	Added TortureTest to test CDT C++ parser with GCC testsuites.
+	GCC testsuites are not included.
+
+2003-06-10 John Camelon
+	Futher pursuit of the golden hammer, symbol table integration. 
+
+2003-06-10 Brent Nicolle
+	Added some Interface tests of (IInclude, IMacro, IStructure).
+	Made sure all the Test Suites have names in the JUnit hierarchy.
+
+2003-06-09 John Camelon
+	First step in replacing IParserCallback with ISourceElementRequestor.  
+	
+2003-06-09 Victor Mozgin
+	Moved testBug36769() from ACEFailedTest.java to DOMTests.java.
+	Removed ACEFailedTest.java as it is empty now.
+	Added DOMTests.testBug36769B(). 
+
+2003-06-09 Victor Mozgin
+	Moved testBug36932() from DOMFailedTest.java to DOMTests.java.
+	Added DOMTests.testBug36932B() and DOMTests.testBug36932C(). 
+
+2003-06-09 Victor Mozgin
+	Moved testBug36701() from ScannerFailedTests.java to ScannerTestCase.java.
+	Renamed it to testBug36701A() and fixed it.
+	Added ScannerTestCase.testBug36701B().
+
+2003-06-07 Victor Mozgin
+	Moved testBug36766A(), testBug36766B() & testBug36766C() from STLFailedTests.java to DOMTests.java.
+	Renamed them to testBug36766and36769x(), as they cover both PRs.
+	Added testBug36766and36769D() - test for templated destructor.
+
+2003-06-05 John Camelon
+	Moved testBug23478A() & testBug23478B() from failed tests to TranslationUnitTests.java.
+	Removed TranslationUnitFailedTests.java as it was empty. 
+
+2003-05-29 Andrew Niefer
+	Modified tests to support eType & PtrOp changes in core
+	Added ParserSymbolTableTest::testTemplateParameterAsParent
+	Added ParserSymbolTableTest::testTemplateInstanceAsParent
+	Added ParserSymbolTableTest::testTemplateParameterDefaults
+	Added ParserSymbolTableTest::testTemplateParameterAsFunctionArgument
+	started ParserSymbolTableTest::incompletetestTemplateSpecialization
+
+2003-05-26 John Camelon
+	Rollback PST/Parser integration.
+
+2003-05-13 Andrew Niefer	
+	Modified ParserSymbolTableTest to use new interface
+
+2003-05-08 Andrew Niefer
+	Added ParserSymbolTableTest::testMarkRollback
+
+2003-05-06 John Camelon
+	Further integration of SymbolTable into Parser, some refactoring. 
+
+2003-05-05 John Camelon/Andrew Niefer
+	Added CrossReferenceTests to ParserTestSuite to test symbol-table/DOM interworking.
+
+2003-05-05 Andrew Niefer
+	Rewrote ParserSymbolTableTest to reflect structural changes to the symbol table.
+
+2003-05-01 Andrew Niefer
+	Updated FractionalAutomatedTest to use threads
+	Modified ScannerTestCase::testBug36287
+	Added ScannerTestCase::testBug37011
+	Added ScannerTestCase::testOtherPreprocessorDefines
+
+2003-04-28 John Camelon
+	Moved testBug36730() & testBug37019() from DOMFailedTests to DOMTests.
+
+2003-04-28 Andrew Niefer
+	Added DOMFailedTest::testBug37019
+	Added DOMFailedTest::testBug36932
+	Added ScannerFailedTest::testBug37011
+
+2003-04-28 John Camelon
+	Added DOMTests::testOrder().  
+
+2003-04-28 Peter Graves
+	* model/org/eclipse/cdt/core/model/tests/BinaryTests:
+	Updated to remove a few small errors, and deal with some changes
+	to the core CDT
+	 
+2003-04-27 John Camelon
+	Added testBug36932() to DOMTests. 
+	Moved testBugFunctor758() from LokiFailures to DOMTests.
+	Moved testBug36704() from DOMFailedTest to DOMTests.  
+	Moved testBug36699() from DOMFailedTest to DOMTests.  
+	Moved testBug36691() from DOMFailedTest to DOMTests.  
+
+2003-04-25 Andrew Niefer
+	Moved ACEFailedTest::testBug36771 to DOMTests
+	Moved DOMFailedTest::testBug36714 to DOMTests
+	Updated ScannerTestCase::testBug36816
+	
+2003-04-25 John Camelon
+	Added DOMTests::testBug36852(). 
+	Added DOMTests::testBug36764().
+	Moved DOMFailedTests::testBug36702() to DOMTests(). 
+
+2003-04-24 John Camelon
+	Moved fixed tests from FailedTests to DOMTests. 
+	Added DOMTests::testBug36799().
+	Cleaned up tests to reduce amount of code necessary to maintain these things. 
+
+2003-04-24 John Camelon
+	Moved fixed tests from FailedTests to DOMTests. 
+	Added LokiFailures.java to failed tests directory.
+
+2003-04-24 Andrew Niefer
+	Added AutomatedFramework.java
+	Added FractionalAutomatedTest (which derives from AutomatedFramework)
+	Refactored AutomatedTest to derive from AutomatdFramework
+	Added ScannerTestCase.testBug36816
+	Added ScannerTestCase.testBug36255	
+
+2003-04-24 John Camelon
+	Fixed Java 1.3 compliance issue w/AutomatedTest.java
+	Fixed False failure in HelloWorld.java.  
+
+2003-04-21 John Camelon
+	Updated DOMTests::testBug36247(). 
+	Moved testBug36692(), testBug36703(), testBug36708(), testBug36707(), testBug36689()
+	and testBug36690() from DOMFailedTests to DOMTests and updated them. 
+
+2003-04-20 John Camelon
+	Added DOMTests::testBug36551().
+	Adjusted AutomatedTest to turn on line numbering. 
+	Added DOMFailedTests and 11 failed test cases.  
+
+2003-04-17 Andrew Niefer
+	Added ScannerTestCase::testBug36695()
+	Moved ScannerFailedTest::testBug36521 to ScannerTestCase::testBug36521()
+	Moved ScannerFailedTest::testBug36509 to ScannerTestCase::testBug36509()
+	Moved ScannerFailedTest::testBug36475 to ScannerTestCase::testBug36475() 
+	Updated ScannerTestCase::testBug36047
+	Updated ScannerTestCase::testBug36045
+
+2003-04-17 John Camelon
+	Updated DOMTests::testBug36600().
+	Updated LineNumberTest::testDOMLineNos().  
+	Added DOMTests::testBug36559().  
+
+2003-04-17 Andrew Niefer
+	Added AutomatedTest
+	Added resources.cFiles
+	Added resources.cppFiles
+
+2003-04-16 John Camelon
+	Added DOMTests::testBug36532().
+	Added DOMTests::testBug36432(). 
+	Added DOMTests::testBug36594().
+	Added DOMTests::testBug36600(). 
+	Added DOMTests::testArrayOfPointerToFunctions(). 
+
+2003-04-15 John Camelon
+	Added ScannerTestCase::testBug36434().
+	Added ScannerTestCase::testMultipleLines(). 
+	Added ParserTestSuite. 
+	Added LineNumberTest.
+	Updated CModelElementsTests to set the Nature of the C++ project appropriately.
+
+2003-04-15 Andrew Niefer
+	Moved ScannerFailedTest::testBug36047 to ScannerTestCase::testBug36047
+	Added ScannerFailedTest::testBug36475
+
+2003-04-13 John Camelon
+	Added DOMTests::testPointersToFunctions.  
+
+2003-04-11 John Camelon
+	Added DOMTests::testBug36247().  
+
+2003-04-11 Andrew Niefer
+	Moved ScannerFailedTest::testBug36316 to ScannerTestCase::testBug36316
+	Added ScannerFailedTest::testBug36047
+	Added ScannerTestCase::testNestedRecursiveDefines
+
+2003-04-10 John Camelon
+	Added DOMTests::testBug36237().
+
+2003-04-09 John Camelon
+	Removed all the old Code Model Builder source that was no longer being used (NewModelBuilder.java, etc.). 
+	Moved all the files in parser.util directory to the dom.  
+	Organized imports. 
+	Added DOMTests::testTemplateDeclarationOfMethod().
+	Added DOMTests::testBug36250().  
+	Added DOMTests::testBug36240(). 
+	Added DOMTests::testBug36254().
+
+2003-04-09 John Camelon
+	Updated ScannerTest::testBug36045().
+	Added ScannerTest::testBug36287().
+	Added DOMTests::testBug36288(). 
+
+2003-04-06 Andrew Niefer
+	Added ParserSymbolTableTest::testOverloadRanking()
+
+2003-04-04 Alain Magloire
+	* src/org/eclipse/cdt/testplugin/util/VerifyDialog.java:
+	Remove some warnings.
+
+2003-04-03 John Camelon
+	Updated ScannerTest::testSimpleIfdef() for bug36019.  
+	Updated ScannerTest::testNumerics() for bug36020.  
+	Added ScannerTest::testBug36045().  
+	Updated DOMTests::testTemplateDeclaration() for template grammar updates.  
+
+2003-04-01 Andrew Niefer
+	ParserSymbolTableTest. modifications to using declaration tests to reflect changes in the
+	symbol table.  Also added testUserDefinedConversionSequences()
+
+2003-04-01 John Camelon
+	Added testBug35906() to DOMTests.
+
+2003-03-31 John Camelon
+	Added testStruct() to DOMTests.  
+	Added test35892()to ScannerTest. 
+
+2003-03-31 Andrew Niefer
+	In ParserSymbolTableTest, renamed testFunctionResolution_2() to testFunctionResolution_PointersAndBaseClasses(),
+	and modified to reflect changes in function resolution.  
+	Added testFunctionResolution_TypedefsAndPointers().
+	
+2003-03-31 John Camelon
+	Added testWeirdStrings() and testNumerics() to ScannerTestCase. 
+	Added testTemplateSpecialization(), testTemplateDeclaration(), testBug26467(), 
+	  testTypedef() and testTemplateInstantiation() to DOMTests.
+
+2003-03-28 John Camelon
+	Added testConstructorChain() and testASMDefinition() to DOMTests.
+
+2003-03-27 Alain Magloire
+	Changes were done in the Core Model API, the hierarchy is now
+	ICModel
+		ICProject
+			ICContainer
+				ITranslationUnit
+				IArchive
+				IBinary
+	We adjust the tests.
+	* model/org/eclipse/cdt/core/model/tests/ArchiveTests.java
+	* model/org/eclipse/cdt/core/model/tests/BinaryTests.java
+	* model/org/eclipse/cdt/core/model/tests/TranslationUniTests.java
+	* model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
+
+2003-03-26 Andrew Niefer
+	In ParserSymbolTableTest : 
+		updated all tests to reflect TypeInfo changes
+		Added testFunctionResolution() & testFunctionResolution_2() in
+
+2003-03-25 John Camelon
+	Added testDeclSpecifier(), testNamespaceDefinition(), testLinkageSpecification(), 
+	testUsingClauses() and testEnumSpecifier() to DOMTests.
+
+2003-03-23 John Camelon
+	Added ptrOperator() test to DOMTests.  
+	Added testFunctionModifiers() test to DOMTests.
+	Added testArrays() test to DOMTests.
+
+2003-03-20 Alain Magloire
+
+	Patch from Amer Hoda, tests for the CElement deltas for Translation Units.
+	* model/org/eclipse/cdt/core/model/tests/ElementDeltaTest.java
+	* model/org/eclipse/cdt/core/model/tests/resource/WorkingCopyTestStart.h
+	
+2003-03-19 Alain Magloire
+	Patch from Amer Hoda, introducing a simple test for the core model.
+	* model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
+	* model/org/eclipse/cdt/core/model/tests/resource/WorkingCopyTestStart.h
+
+2003-03-18 John Camelon
+	Updated DOMTests to validate simple case of a function declaration with multiple parameters.  
+	* parser/org/eclipse/cdt/core/parser/tests/DOMTests.java
+
+2003-03-11 John Camelon
+	Updated DOMTests for core.internal.parser change of merging DeclarationSpecifier and DeclSpecifier
+	Organized imports
+	* parser/org/eclipse/cdt/core/parser/tests/DOMTests.java
+	* parser/org/eclipse/cdt/core/parser/tests/ParserSymbolTableTest.java
+
+2003-03-10 John Camelon
+	Added macro pasting tests
+
+2003-03-06 Andrew Niefer
+	Added tests for exercising Namespaces & using directives in new parser's symbol table
+
+2003-03-04 Doug Schaefer
+	This is a pretty big patch, but it is the merge of the NewParser1 branch into the HEAD branch.  lder "parser") 
+	JUnit tests for testing various pieces (source folder "parser" in cdt.ui.tests. 
+
+2003-01-29 Peter Graves
+
+    Fixed the warnings when accessing static methods
+    * src/org/eclipse/cdt/testplugin/util/DialogCheck.java:
+    * src/org/eclipse/cdt/testplugin/CTestPlugin.java
+    * src/org/eclipse/cdt/testplugin/TestWorkbench.java
+    * ChangeLog: make all entries have the same formatting
+
+2002-12-17 Peter Graves
+
+    * plugin.xml,test.xml: Some simple cleanups to remove refrences to the jdt and
+	to move closer to automated running
+    
+2002-11-27 Alain Magloire
+
+	* model/org/eclipse/cdt/core/model/tests/CModelTests.java:
+	Use CoreModel.getDefault().
+
+2002-10-30 Alain Magloire
+
+	* model/org/eclipse/cdt/core/model/tests/CModelTests.java (testGetNatureID):
+	The fields and the methods use in this test was removed from the CoreModel class.
+	(testHasNature): The method use in this case was refactor in the classes
+	CProjectNature and CCProjectNature, fix the test.
+
+2002-10-18 Peter Graves
+
+	src/org/eclipse/cdt/testplugin/CProjectHelper.jada
+    Cleanup of the CProjectHelper file to remove unused imports, commeted out code etc.
+    
+=======
+2003-04-21 Andrew Niefer
+	Added DOMFailedTests::testBug36713()
+	Added DOMFailedTests::testBug36714()
+	Added DOMFailedTests::testBug36717()
+	Added DOMFailedTests::testBug36730()
+
+2003-04-21 Andrew Niefer
+	Added ScannerTestCase::testBug36695()
+	Moved ScannerFailedTest::testBug36521 to ScannerTestCase::testBug36521()
+	Moved ScannerFailedTest::testBug36509 to ScannerTestCase::testBug36509()
+	Moved ScannerFailedTest::testBug36475 to ScannerTestCase::testBug36475() 
+	Updated ScannerTestCase::testBug36047
+	Updated ScannerTestCase::testBug36045
+
+2003-04-20 John Camelon
+	Added DOMTests::testBug36551().
+	Adjusted AutomatedTest to turn on line numbering. 
+	Added DOMFailedTests and 11 failed test cases.  
+
+2003-04-17 John Camelon
+	Updated DOMTests::testBug36600().
+	Updated LineNumberTest::testDOMLineNos().  
+	Added DOMTests::testBug36559().  
+
+2003-04-17 Andrew Niefer
+	Added AutomatedTest
+	Added resources.cFiles
+	Added resources.cppFiles
+
+2003-04-16 John Camelon
+	Added DOMTests::testBug36532().
+	Added DOMTests::testBug36432(). 
+	Added DOMTests::testBug36594().
+	Added DOMTests::testBug36600(). 
+	Added DOMTests::testArrayOfPointerToFunctions(). 
+
+2003-04-15 John Camelon
+	Added ScannerTestCase::testBug36434().
+	Added ScannerTestCase::testMultipleLines(). 
+	Added ParserTestSuite. 
+	Added LineNumberTest.
+	Updated CModelElementsTests to set the Nature of the C++ project appropriately.
+
+2003-04-15 Andrew Niefer
+	Moved ScannerFailedTest::testBug36047 to ScannerTestCase::testBug36047
+	Added ScannerFailedTest::testBug36475
+
+2003-04-13 John Camelon
+	Added DOMTests::testPointersToFunctions.  
+
+2003-04-11 John Camelon
+	Added DOMTests::testBug36247().  
+
+2003-04-11 Andrew Niefer
+	Moved ScannerFailedTest::testBug36316 to ScannerTestCase::testBug36316
+	Added ScannerFailedTest::testBug36047
+	Added ScannerTestCase::testNestedRecursiveDefines
+
+2003-04-10 John Camelon
+	Added DOMTests::testBug36237().
+
+2003-04-09 John Camelon
+	Removed all the old Code Model Builder source that was no longer being used (NewModelBuilder.java, etc.). 
+	Moved all the files in parser.util directory to the dom.  
+	Organized imports. 
+	Added DOMTests::testTemplateDeclarationOfMethod().
+	Added DOMTests::testBug36250().  
+	Added DOMTests::testBug36240(). 
+	Added DOMTests::testBug36254().
+
+2003-04-09 John Camelon
+	Updated ScannerTest::testBug36045().
+	Added ScannerTest::testBug36287().
+	Added DOMTests::testBug36288(). 
+
+2003-04-06 Andrew Niefer
+	Added ParserSymbolTableTest::testOverloadRanking()
+
+2003-04-04 Alain Magloire
+	* src/org/eclipse/cdt/testplugin/util/VerifyDialog.java:
+	Remove some warnings.
+
+2003-04-03 John Camelon
+	Updated ScannerTest::testSimpleIfdef() for bug36019.  
+	Updated ScannerTest::testNumerics() for bug36020.  
+	Added ScannerTest::testBug36045().  
+	Updated DOMTests::testTemplateDeclaration() for template grammar updates.  
+
+2003-04-01 Andrew Niefer
+	ParserSymbolTableTest. modifications to using declaration tests to reflect changes in the
+	symbol table.  Also added testUserDefinedConversionSequences()
+
+2003-04-01 John Camelon
+	Added testBug35906() to DOMTests.
+
+2003-03-31 John Camelon
+	Added testStruct() to DOMTests.  
+	Added test35892()to ScannerTest. 
+
+2003-03-31 Andrew Niefer
+	In ParserSymbolTableTest, renamed testFunctionResolution_2() to testFunctionResolution_PointersAndBaseClasses(),
+	and modified to reflect changes in function resolution.  
+	Added testFunctionResolution_TypedefsAndPointers().
+	
+2003-03-31 John Camelon
+	Added testWeirdStrings() and testNumerics() to ScannerTestCase. 
+	Added testTemplateSpecialization(), testTemplateDeclaration(), testBug26467(), 
+	  testTypedef() and testTemplateInstantiation() to DOMTests.
+
+2003-03-28 John Camelon
+	Added testConstructorChain() and testASMDefinition() to DOMTests.
+
+2003-03-27 Alain Magloire
+	Changes were done in the Core Model API, the hierarchy is now
+	ICModel
+		ICProject
+			ICContainer
+				ITranslationUnit
+				IArchive
+				IBinary
+	We adjust the tests.
+	* model/org/eclipse/cdt/core/model/tests/ArchiveTests.java
+	* model/org/eclipse/cdt/core/model/tests/BinaryTests.java
+	* model/org/eclipse/cdt/core/model/tests/TranslationUniTests.java
+	* model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
+
+2003-03-26 Andrew Niefer
+	In ParserSymbolTableTest : 
+		updated all tests to reflect TypeInfo changes
+		Added testFunctionResolution() & testFunctionResolution_2() in
+
+2003-03-25 John Camelon
+	Added testDeclSpecifier(), testNamespaceDefinition(), testLinkageSpecification(), 
+	testUsingClauses() and testEnumSpecifier() to DOMTests.
+
+2003-03-23 John Camelon
+	Added ptrOperator() test to DOMTests.  
+	Added testFunctionModifiers() test to DOMTests.
+	Added testArrays() test to DOMTests.
+
+2003-03-20 Alain Magloire
+
+	Patch from Amer Hoda, tests for the CElement deltas for Translation Units.
+	* model/org/eclipse/cdt/core/model/tests/ElementDeltaTest.java
+	* model/org/eclipse/cdt/core/model/tests/resource/WorkingCopyTestStart.h
+	
+2003-03-19 Alain Magloire
+	Patch from Amer Hoda, introducing a simple test for the core model.
+	* model/org/eclipse/cdt/core/model/tests/WorkingCopyTests.java
+	* model/org/eclipse/cdt/core/model/tests/resource/WorkingCopyTestStart.h
+
+2003-03-18 John Camelon
+	Updated DOMTests to validate simple case of a function declaration with multiple parameters.  
+	* parser/org/eclipse/cdt/core/parser/tests/DOMTests.java
+
+2003-03-11 John Camelon
+	Updated DOMTests for core.internal.parser change of merging DeclarationSpecifier and DeclSpecifier
+	Organized imports
+	* parser/org/eclipse/cdt/core/parser/tests/DOMTests.java
+	* parser/org/eclipse/cdt/core/parser/tests/ParserSymbolTableTest.java
+
+2003-03-10 John Camelon
+	Added macro pasting tests
+
+2003-03-06 Andrew Niefer
+	Added tests for exercising Namespaces & using directives in new parser's symbol table
+
+2003-03-04 Doug Schaefer
+	This is a pretty big patch, but it is the merge of the NewParser1 branch into the HEAD branch.  lder "parser") 
+	JUnit tests for testing various pieces (source folder "parser" in cdt.ui.tests. 
+
+2003-01-29 Peter Graves
+
+    Fixed the warnings when accessing static methods
+    * src/org/eclipse/cdt/testplugin/util/DialogCheck.java:
+    * src/org/eclipse/cdt/testplugin/CTestPlugin.java
+    * src/org/eclipse/cdt/testplugin/TestWorkbench.java
+    * ChangeLog: make all entries have the same formatting
+
+2002-12-17 Peter Graves
+
+    * plugin.xml,test.xml: Some simple cleanups to remove refrences to the jdt and
+	to move closer to automated running
+    
+2002-11-27 Alain Magloire
+
+	* model/org/eclipse/cdt/core/model/tests/CModelTests.java:
+	Use CoreModel.getDefault().
+
+2002-10-30 Alain Magloire
+
+	* model/org/eclipse/cdt/core/model/tests/CModelTests.java (testGetNatureID):
+	The fields and the methods use in this test was removed from the CoreModel class.
+	(testHasNature): The method use in this case was refactor in the classes
+	CProjectNature and CCProjectNature, fix the test.
+
+2002-10-18 Peter Graves
+
+	src/org/eclipse/cdt/testplugin/CProjectHelper.jada
+    Cleanup of the CProjectHelper file to remove unused imports, commeted out code etc.
+    
+>>>>>>> 1.36
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.cdt.ui.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..6a21b82
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,41 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.cdt.ui.tests
+Bundle-SymbolicName: org.eclipse.cdt.ui.tests; singleton:=true
+Bundle-Version: 5.1.0.qualifier
+Bundle-Activator: org.eclipse.cdt.ui.testplugin.CTestPlugin
+Export-Package: org.eclipse.cdt.ui.testplugin,
+ org.eclipse.cdt.ui.testplugin.util,
+ org.eclipse.cdt.ui.tests,
+ org.eclipse.cdt.ui.tests.DOMAST,
+ org.eclipse.cdt.ui.tests.chelp,
+ org.eclipse.cdt.ui.tests.refactoring,
+ org.eclipse.cdt.ui.tests.refactoring.rename,
+ org.eclipse.cdt.ui.tests.text,
+ org.eclipse.cdt.ui.tests.text.contentassist,
+ org.eclipse.cdt.ui.tests.text.selection
+Require-Bundle: org.eclipse.jface.text,
+ org.eclipse.core.resources,
+ org.eclipse.cdt.ui,
+ org.eclipse.swt,
+ org.eclipse.ui,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.views,
+ org.eclipse.ui.workbench.texteditor,
+ org.junit,
+ org.eclipse.cdt.core,
+ org.eclipse.cdt.core.tests,
+ org.eclipse.help,
+ org.eclipse.core.runtime,
+ org.eclipse.search,
+ org.eclipse.compare,
+ org.eclipse.ui.console,
+ org.eclipse.core.expressions,
+ org.eclipse.cdt.make.core,
+ com.ibm.icu,
+ org.eclipse.ltk.core.refactoring;bundle-version="3.4.0",
+ org.eclipse.core.filesystem;bundle-version="1.2.0"
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: Eclipse CDT
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/about.html b/results/plugins/org.eclipse.cdt.ui.tests/about.html
new file mode 100644
index 0000000..fcbffcd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/about.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>June 23, 2005</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/build.properties b/results/plugins/org.eclipse.cdt.ui.tests/build.properties
new file mode 100644
index 0000000..4f4e448
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/build.properties
@@ -0,0 +1,23 @@
+###############################################################################
+#  Copyright (c) 2005, 2009 IBM Corporation and others.
+#  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
+# 
+#  Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+source.. = src/,\
+           ui/
+bin.includes = plugin.xml,\
+               about.html,\
+               test.xml,\
+               .,\
+               resources/,\
+               icons/,\
+               src/,\
+               ui/,\
+               META-INF/,\
+               .options
+src.includes = about.html
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/brkpd_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/brkpd_obj.gif
new file mode 100644
index 0000000..8e8cac5
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/brkpd_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/cdeclaration_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/cdeclaration_obj.gif
new file mode 100644
index 0000000..d079ebb
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/cdeclaration_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/clear.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/clear.gif
new file mode 100644
index 0000000..ffb59e4
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/clear.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/collapseall.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/collapseall.gif
new file mode 100644
index 0000000..dc923f5
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/collapseall.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/define_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/define_obj.gif
new file mode 100644
index 0000000..b3ddb5d
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/define_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/disassembly.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/disassembly.gif
new file mode 100644
index 0000000..dbde1a0
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/disassembly.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/enumerator_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/enumerator_obj.gif
new file mode 100644
index 0000000..a73f31a
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/enumerator_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/expandall.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/expandall.gif
new file mode 100644
index 0000000..c4a67bb
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/expandall.gif differ
diff --git a/results/plugins/org.eclipse.cdt.debug.ui/icons/obj16/expression_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/expression_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.debug.ui/icons/obj16/expression_obj.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/expression_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/jump_co.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/jump_co.gif
new file mode 100644
index 0000000..0107e2e
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/jump_co.gif differ
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/public_co.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/method_public_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/public_co.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/method_public_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/container_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/output_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/container_obj.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/output_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/refresh_view.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/refresh_view.gif
new file mode 100644
index 0000000..a063c23
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/refresh_view.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/reload_view.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/reload_view.gif
new file mode 100644
index 0000000..919423d
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/reload_view.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/search_ref_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/search_ref_obj.gif
new file mode 100644
index 0000000..1b0c43b
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/search_ref_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/showasarray_co.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/showasarray_co.gif
new file mode 100644
index 0000000..a87ddbf
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/showasarray_co.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/source_attach_attrib.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/source_attach_attrib.gif
new file mode 100644
index 0000000..3976f8f
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/source_attach_attrib.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/statement_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/statement_obj.gif
new file mode 100644
index 0000000..eccb83c
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/statement_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/tnames_co.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/tnames_co.gif
new file mode 100644
index 0000000..764201b
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/tnames_co.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui/icons/view16/types.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/types.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.ui/icons/view16/types.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/types.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/var_declaration_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/var_declaration_obj.gif
new file mode 100644
index 0000000..74a3d22
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/var_declaration_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/var_pointer.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/var_pointer.gif
new file mode 100644
index 0000000..ca17bd2
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/var_pointer.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/var_simple.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/var_simple.gif
new file mode 100644
index 0000000..600d968
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/var_simple.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/variable_local_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/variable_local_obj.gif
new file mode 100644
index 0000000..461c4e7
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/variable_local_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/variable_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/variable_obj.gif
new file mode 100644
index 0000000..9fa6383
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/variable_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/warning_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/warning_obj.gif
new file mode 100644
index 0000000..cf8d571
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/warning_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/watch_globals.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/watch_globals.gif
new file mode 100644
index 0000000..797b0e0
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/dom_view/watch_globals.gif differ
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/alphab_sort_co.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/alphab_sort.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/alphab_sort_co.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/alphab_sort.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/alphab_sorted.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/alphab_sorted.gif
new file mode 100644
index 0000000..62a8fdb
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/alphab_sorted.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/class_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/class_obj.gif
new file mode 100644
index 0000000..a4a1486
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/class_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/constructor_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/constructor_obj.gif
new file mode 100644
index 0000000..2b76d36
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/constructor_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/method_protected_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/constructor_ref_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/method_protected_obj.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/constructor_ref_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/home.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/derived.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/home.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/derived.gif
diff --git a/results/plugins/org.eclipse.cdt.make.ui/icons/etool16/segment_edit.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/display_full_name.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.make.ui/icons/etool16/segment_edit.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/display_full_name.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/enum_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/enum_obj.gif
new file mode 100644
index 0000000..4a77d8c
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/enum_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/enumerator_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/enumerator_obj.gif
new file mode 100644
index 0000000..a73f31a
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/enumerator_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/enumerator_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/enumerator_ref_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/enumerator_obj.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/enumerator_ref_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/field_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/field_obj.gif
new file mode 100644
index 0000000..19d27de
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/field_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/field_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/field_ref_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/field_obj.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/field_ref_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/filterbutton.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/filterbutton.gif
new file mode 100644
index 0000000..c3a8930
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/filterbutton.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/friend.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/friend.gif
new file mode 100644
index 0000000..a9a08d0
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/friend.gif differ
diff --git a/results/plugins/org.eclipse.cdt.make.ui/icons/dtool16/segment_edit.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/full_name_displayed.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.make.ui/icons/dtool16/segment_edit.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/full_name_displayed.gif
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/public_co.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/function_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/public_co.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/function_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/function_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/function_ref_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/function_obj.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/function_ref_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/class_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/fwd_class.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/class_obj.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/fwd_class.gif
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/struct_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/fwd_struct.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/struct_obj.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/fwd_struct.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/fwd_union.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/fwd_union.gif
new file mode 100644
index 0000000..f5e3640
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/fwd_union.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/grouped_all.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/grouped_all.gif
new file mode 100644
index 0000000..5b19b27
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/grouped_all.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/grouped_decl.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/grouped_decl.gif
new file mode 100644
index 0000000..58fb932
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/grouped_decl.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/grouped_ref.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/grouped_ref.gif
new file mode 100644
index 0000000..93c5a03
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/grouped_ref.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/grouped_type.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/grouped_type.gif
new file mode 100644
index 0000000..f2f0ebe
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/grouped_type.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/include_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/include_obj.gif
new file mode 100644
index 0000000..2cc5866
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/include_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/macroDecl_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/macroDecl_obj.gif
new file mode 100644
index 0000000..b3ddb5d
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/macroDecl_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/public_co.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/method_public_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/public_co.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/method_public_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/method_public_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/method_public_ref_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/method_public_obj.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/method_public_ref_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/namespace_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/namespace_obj.gif
new file mode 100644
index 0000000..d495f3e
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/namespace_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/namespace_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/namespace_ref_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/namespace_obj.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/namespace_ref_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/ngback.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/ngback.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/ngback.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/ngback.gif
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/ngnext.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/ngnext.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/ngnext.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/ngnext.gif
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/ref-79.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/ref_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/ref-79.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/ref_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.ui/icons/obj16/search_decl_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/search_decl_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.ui/icons/obj16/search_decl_obj.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/search_decl_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/stats.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/stats.gif
new file mode 100644
index 0000000..0c5f208
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/stats.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/struct_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/struct_obj.gif
new file mode 100644
index 0000000..cb2869f
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/struct_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui/icons/elcl16/super_co.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/super_co.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.ui/icons/elcl16/super_co.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/super_co.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/typedecl_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/typedecl_obj.gif
new file mode 100644
index 0000000..7e3ace3
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/typedecl_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/typedef_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/typedecl_ref_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/typedef_obj.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/typedecl_ref_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/typedef_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/typedef_obj.gif
new file mode 100644
index 0000000..34bcaf7
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/typedef_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/union_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/union_obj.gif
new file mode 100644
index 0000000..b8405d5
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/union_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/variable_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/variable_obj.gif
new file mode 100644
index 0000000..600d968
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/variable_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/warning_icon.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/warning_icon.gif
new file mode 100644
index 0000000..cf8d571
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/indexer_view/warning_icon.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/sample.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/sample.gif
new file mode 100644
index 0000000..7952e2e
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/sample.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/brkpd_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/brkpd_obj.gif
new file mode 100644
index 0000000..8e8cac5
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/brkpd_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/cdeclaration_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/cdeclaration_obj.gif
new file mode 100644
index 0000000..d079ebb
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/cdeclaration_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/clear.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/clear.gif
new file mode 100644
index 0000000..ffb59e4
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/clear.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/collapseall.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/collapseall.gif
new file mode 100644
index 0000000..dc923f5
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/collapseall.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/define_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/define_obj.gif
new file mode 100644
index 0000000..b3ddb5d
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/define_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/disassembly.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/disassembly.gif
new file mode 100644
index 0000000..dbde1a0
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/disassembly.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/enumerator_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/enumerator_obj.gif
new file mode 100644
index 0000000..a73f31a
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/enumerator_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/expandall.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/expandall.gif
new file mode 100644
index 0000000..c4a67bb
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/expandall.gif differ
diff --git a/results/plugins/org.eclipse.cdt.debug.ui/icons/obj16/expression_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/expression_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.debug.ui/icons/obj16/expression_obj.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/used/expression_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/jump_co.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/jump_co.gif
new file mode 100644
index 0000000..0107e2e
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/jump_co.gif differ
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/public_co.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/method_public_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/public_co.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/used/method_public_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.doc.user/images/container_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/output_obj.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.doc.user/images/container_obj.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/used/output_obj.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/search_ref_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/search_ref_obj.gif
new file mode 100644
index 0000000..1b0c43b
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/search_ref_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/showasarray_co.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/showasarray_co.gif
new file mode 100644
index 0000000..a87ddbf
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/showasarray_co.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/source_attach_attrib.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/source_attach_attrib.gif
new file mode 100644
index 0000000..3976f8f
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/source_attach_attrib.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/statement_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/statement_obj.gif
new file mode 100644
index 0000000..eccb83c
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/statement_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/tnames_co.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/tnames_co.gif
new file mode 100644
index 0000000..764201b
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/tnames_co.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui/icons/view16/types.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/types.gif
similarity index 100%
copy from results/plugins/org.eclipse.cdt.ui/icons/view16/types.gif
copy to results/plugins/org.eclipse.cdt.ui.tests/icons/used/types.gif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/var_declaration_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/var_declaration_obj.gif
new file mode 100644
index 0000000..74a3d22
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/var_declaration_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/var_pointer.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/var_pointer.gif
new file mode 100644
index 0000000..ca17bd2
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/var_pointer.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/var_simple.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/var_simple.gif
new file mode 100644
index 0000000..600d968
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/var_simple.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/variable_local_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/variable_local_obj.gif
new file mode 100644
index 0000000..461c4e7
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/variable_local_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/variable_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/variable_obj.gif
new file mode 100644
index 0000000..9fa6383
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/variable_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/warning_obj.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/warning_obj.gif
new file mode 100644
index 0000000..cf8d571
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/warning_obj.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/icons/used/watch_globals.gif b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/watch_globals.gif
new file mode 100644
index 0000000..797b0e0
Binary files /dev/null and b/results/plugins/org.eclipse.cdt.ui.tests/icons/used/watch_globals.gif differ
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/plugin.xml b/results/plugins/org.eclipse.cdt.ui.tests/plugin.xml
new file mode 100644
index 0000000..b281c1f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/plugin.xml
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+     <extension
+         point="org.eclipse.cdt.ui.CHelpProvider">
+      <provider
+         class="org.eclipse.cdt.ui.tests.chelp.CHelpTestInfoProvider"
+         id="org.eclipse.cdt.ui.tests.chelp.extension.1"/>
+      <provider
+         class="org.eclipse.cdt.ui.tests.chelp.CHelpTestInfoProvider"
+         id="org.eclipse.cdt.ui.tests.chelp.extension.2"/>
+      <provider
+         class="org.eclipse.cdt.ui.tests.chelp.CHelpTestInfoProvider"
+         id="org.eclipse.cdt.ui.tests.chelp.extension.3"/>
+
+   </extension>
+   
+      <extension
+         point="org.eclipse.ui.views">
+      <view
+            allowMultiple="false"
+            class="org.eclipse.cdt.ui.tests.DOMAST.DOMAST"
+            icon="icons/sample.gif"
+            category="org.eclipse.cdt.ui.views"
+            name="DOM AST"
+            id="org.eclipse.cdt.ui.tests.DOMAST.DOMAST">
+      </view>
+   </extension>
+   <extension
+         point="org.eclipse.ui.perspectiveExtensions">
+      <perspectiveExtension
+            targetID="org.eclipse.ui.resourcePerspective">
+         <view
+               id="org.eclipse.cdt.ui.tests.DOMAST.DOMAST"
+               ratio="0.5"
+               relationship="right"
+               relative="org.eclipse.ui.views.TaskList">
+         </view>
+      </perspectiveExtension>
+   </extension>
+   <extension
+         point="org.eclipse.ui.popupMenus">
+      <viewerContribution
+            targetID="#CEditorContext"
+            id="org.eclipse.cdt.ui.tests.cEditorContribution">
+         <action
+               label="Show IASTNode in DOM View"
+               class="org.eclipse.cdt.ui.tests.DOMAST.ShowInDOMViewAction"
+               menubarPath="additions"
+               id="org.eclipse.cdt.ui.tests.DOMAST.ShowInDOMViewAction1"/>
+      </viewerContribution>
+      <viewerContribution
+            id="org.eclipse.cdt.ui.CView1"
+            targetID="org.eclipse.cdt.ui.CView">
+         <action
+               label="Show in DOM AST"
+               class="org.eclipse.cdt.ui.tests.DOMAST.OpenDOMViewAction"
+               menubarPath="additions"
+               id="org.eclipse.cdt.ui.tests.DOMAST.OpenDOMViewAction"/>
+         <visibility>
+         	<or>
+				<objectState name="extension" value="cpp"/>
+				<objectState name="extension" value="CPP"/>
+				<objectState name="extension" value="c"/>
+				<objectState name="extension" value="C"/>
+				<objectState name="extension" value="cc"/>
+				<objectState name="extension" value="CC"/>
+				<objectState name="extension" value="cxx"/>
+				<objectState name="extension" value="CXX"/>
+         	</or>
+         </visibility>
+      </viewerContribution>
+   </extension>
+   <extension
+         point="org.eclipse.cdt.ui.CElementFilters">
+      <filter
+            targetId="org.eclipse.cdt.ui.tests.DOMAST.DOMASTFilterGroup"
+            name="Problem Filter"
+            enabled="false"
+            description="Filter Problems"
+            class="org.eclipse.cdt.ui.tests.DOMAST.ProblemHolderFilter"
+            id="org.eclipse.cdt.ui.tests.DOMAST.DOMAST.ProblemHolderFilter">
+      </filter>
+      <filter
+            targetId="org.eclipse.cdt.ui.tests.DOMAST.DOMASTFilterGroup"
+            name="Preprocessor Filter"
+            enabled="false"
+            description="Filter Preprocessor Statements"
+            class="org.eclipse.cdt.ui.tests.DOMAST.PreprocessorFilter"
+            id="org.eclipse.cdt.ui.tests.DOMAST.DOMAST.PreprocessorFilter">
+      </filter>
+      <filter
+            targetId="org.eclipse.cdt.ui.tests.DOMAST.DOMASTFilterGroup"
+            name="Include Statements Filter"
+            enabled="false"
+            description="Filter Include Statements"
+            class="org.eclipse.cdt.ui.tests.DOMAST.IncludeStatementFilter"
+            id="org.eclipse.cdt.ui.tests.DOMAST.DOMAST.IncludeStatementFilter">
+      </filter>
+   </extension>
+   <extension
+         point="org.eclipse.cdt.ui.ProposalFilter">
+      <ProposalFilter
+            class="org.eclipse.cdt.ui.tests.text.contentassist.TestProposalFilter"
+            id="org.eclipse.cdt.ui.tests.TestProposalFilter"
+            name="Testing Completion Filter"/>
+   </extension>
+   <extension
+         point="org.eclipse.cdt.core.templates">
+      <template
+            id="org.eclipse.cdt.ui.tests.extraPagesProvider"
+            location="resources/projectTemplates/testExtraPages/template.xml"
+            pagesAfterTemplateSelectionProvider="org.eclipse.cdt.ui.tests.templateengine.TestExtraPagesProvider"
+            projectType="org.eclipse.cdt.build.core.buildArtefactType.exe">
+      </template>
+      <template
+            id="org.eclipse.cdt.ui.tests.testWidgets"
+            location="resources/projectTemplates/testWidgets/template.xml"
+            projectType="org.eclipse.cdt.build.core.buildArtefactType.exe">
+      </template>
+   </extension>
+   
+   
+   <!-- documentation tool comment test owners -->
+   <extension
+         point="org.eclipse.cdt.ui.DocCommentOwner">
+     <owner id="org.cdt.test.DCOM1"
+         name="Test comment owner1"
+         singleline="org.eclipse.cdt.internal.ui.text.doctools.NullDocCommentViewerConfiguration"
+         multiline="org.eclipse.cdt.internal.ui.text.doctools.NullDocCommentViewerConfiguration"
+     />
+   </extension>
+    <extension
+         point="org.eclipse.cdt.ui.DocCommentOwner">
+      <owner  id="org.cdt.test.DCOM2"
+         name="Test comment owner1"
+           singleline="org.eclipse.cdt.internal.ui.text.doctools.NullDocCommentViewerConfiguration"
+         multiline="org.eclipse.cdt.internal.ui.text.doctools.NullDocCommentViewerConfiguration"
+         />
+   </extension>
+    <extension
+          point="org.eclipse.cdt.ui.DocCommentOwner">
+       <owner
+             id="org.cdt.test.DCOM3"
+             multiline="org.eclipse.cdt.internal.ui.text.doctools.NullDocCommentViewerConfiguration"
+             name="Test comment owner1"
+             singleline="org.eclipse.cdt.internal.ui.text.doctools.NullDocCommentViewerConfiguration">
+       </owner>
+    </extension>
+    <extension
+          point="org.eclipse.cdt.ui.DocCommentOwner">
+       <owner
+             id="org.cdt.test.ownerA"
+             multiline="org.eclipse.cdt.ui.tests.text.doctools.TestGenericTagConfiguration$A"
+             name="name_A"
+             singleline="org.eclipse.cdt.ui.tests.text.doctools.TestGenericTagConfiguration$A">
+       </owner>
+    </extension>
+      <extension
+          point="org.eclipse.cdt.ui.DocCommentOwner">
+       <owner
+             id="org.cdt.test.ownerB"
+             multiline="org.eclipse.cdt.ui.tests.text.doctools.TestGenericTagConfiguration$B"
+             name="name_B"
+             singleline="org.eclipse.cdt.ui.tests.text.doctools.TestGenericTagConfiguration$B">
+       </owner>
+    </extension>
+      <extension
+          point="org.eclipse.cdt.ui.DocCommentOwner">
+       <owner
+             id="org.cdt.test.ownerC"
+             multiline="org.eclipse.cdt.ui.tests.text.doctools.TestGenericTagConfiguration$C"
+             name="name_C"
+             singleline="org.eclipse.cdt.ui.tests.text.doctools.TestGenericTagConfiguration$C">
+       </owner>
+    </extension>
+    <extension
+          point="org.eclipse.cdt.ui.DocCommentOwner">
+       <owner
+             id="org.cdt.test.ownerABC"
+             multiline="org.eclipse.cdt.ui.tests.text.doctools.TestGenericTagConfiguration$ABC"
+             name="name_ABC"
+             singleline="org.eclipse.cdt.ui.tests.text.doctools.TestGenericTagConfiguration$ABC">
+       </owner>
+    </extension>
+    <extension
+          point="org.eclipse.cdt.ui.DocCommentOwner">
+       <owner
+             id="org.cdt.test.ownerBDFG"
+             multiline="org.eclipse.cdt.ui.tests.text.doctools.TestGenericTagConfiguration$BDFG"
+             name="name_BDFG"
+             singleline="org.eclipse.cdt.ui.tests.text.doctools.TestGenericTagConfiguration$BDFG">
+       </owner>
+    </extension>
+    <extension
+          point="org.eclipse.cdt.ui.DocCommentOwner">
+       <owner
+             id="org.cdt.test.ownerPUNC"
+             multiline="org.eclipse.cdt.ui.tests.text.doctools.TestGenericTagConfiguration$PUNC"
+             name="name_PUNC"
+             singleline="org.eclipse.cdt.ui.tests.text.doctools.TestGenericTagConfiguration$PUNC">
+       </owner>
+    </extension>
+    
+    <extension point="org.eclipse.ltk.core.refactoring.renameParticipants">
+       <renameParticipant
+            class="org.eclipse.cdt.ui.tests.refactoring.rename.TestRenameParticipant"
+            name="TestRenameParticipant"
+            id="org.eclipse.cdt.ui.tests.TestRenameParticipant"> 
+          <enablement>
+             <with variable="affectedNatures">
+                <iterate operator="or">
+                   <equals value="org.eclipse.cdt.core.cnature"/>
+                </iterate>
+             </with>
+             <with variable="element">
+   	            <instanceof value="org.eclipse.cdt.core.dom.ast.IBinding"/>
+             </with>
+          </enablement>
+       </renameParticipant>
+   	</extension>    
+
+    <extension point="org.eclipse.core.filesystem.filesystems">
+        <filesystem
+            scheme="bug278632">
+            <run class="org.eclipse.cdt.ui.tests.text.BasicCEditorTest$Bug278632FileSystem"/>
+        </filesystem>
+    </extension>
+
+</plugin>
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/Macro.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/Macro.cpp
new file mode 100644
index 0000000..efaa2b6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/Macro.cpp
@@ -0,0 +1 @@
+int x = ONE;
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/Macro.cpp.expected b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/Macro.cpp.expected
new file mode 100644
index 0000000..7b5054e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/Macro.cpp.expected
@@ -0,0 +1,2 @@
+#include "Macro.h"
+int x = ONE;
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/Macro.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/Macro.h
new file mode 100644
index 0000000..9b7992e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/Macro.h
@@ -0,0 +1 @@
+#define ONE 1
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/Other.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/Other.cpp
new file mode 100644
index 0000000..92a2864
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/Other.cpp
@@ -0,0 +1,5 @@
+#include "A.h"
+#include "Macro.h"
+#include "OverloadedFunction.h"
+#include "VariableType.h"
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/OverloadedFunction.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/OverloadedFunction.cpp
new file mode 100644
index 0000000..0e45c49
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/OverloadedFunction.cpp
@@ -0,0 +1,5 @@
+#include "A.h"
+
+void test() {
+  func(0);
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/OverloadedFunction.cpp.expected b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/OverloadedFunction.cpp.expected
new file mode 100644
index 0000000..1317a9d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/OverloadedFunction.cpp.expected
@@ -0,0 +1,8 @@
+#include "A.h"
+#include "OverloadedFunction.h"
+
+using ns3::func;
+
+void test() {
+  func(0);
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/OverloadedFunction.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/OverloadedFunction.h
new file mode 100644
index 0000000..1b11e31
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/OverloadedFunction.h
@@ -0,0 +1,6 @@
+namespace ns3 {
+
+void func(int p);
+void func(char* p);
+
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/ResolvedName.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/ResolvedName.cpp
new file mode 100644
index 0000000..644fbfc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/ResolvedName.cpp
@@ -0,0 +1,5 @@
+namespace ns4 {
+
+A a;
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/ResolvedName.cpp.expected b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/ResolvedName.cpp.expected
new file mode 100644
index 0000000..9377320
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/ResolvedName.cpp.expected
@@ -0,0 +1,6 @@
+#include "ResolvedName.h"
+namespace ns4 {
+
+A a;
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/ResolvedName.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/ResolvedName.h
new file mode 100644
index 0000000..bf44b37
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/ResolvedName.h
@@ -0,0 +1,5 @@
+namespace ns4 {
+
+class A {};
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/UnresolvedName.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/UnresolvedName.cpp
new file mode 100644
index 0000000..ba739fd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/UnresolvedName.cpp
@@ -0,0 +1,7 @@
+#include "ResolvedName.h"
+
+using ns4::A;
+
+void test() {
+	B b;
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/UnresolvedName.cpp.expected b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/UnresolvedName.cpp.expected
new file mode 100644
index 0000000..20cf3c1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/UnresolvedName.cpp.expected
@@ -0,0 +1,9 @@
+#include "ResolvedName.h"
+#include "UnresolvedName.h"
+
+using ns4::A;
+using ns5::B;
+
+void test() {
+	B b;
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/UnresolvedName.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/UnresolvedName.h
new file mode 100644
index 0000000..8ba867a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/UnresolvedName.h
@@ -0,0 +1,5 @@
+namespace ns5 {
+
+class B {};
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/VariableType.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/VariableType.cpp
new file mode 100644
index 0000000..68805e0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/VariableType.cpp
@@ -0,0 +1,9 @@
+#include "VariableTypeHelper.h"
+
+namespace ns2 {
+
+void VT::method() {
+  a_->m();
+}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/VariableType.cpp.expected b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/VariableType.cpp.expected
new file mode 100644
index 0000000..d991b14
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/VariableType.cpp.expected
@@ -0,0 +1,10 @@
+#include "VariableTypeHelper.h"
+#include "VariableType.h"
+
+namespace ns2 {
+
+void VT::method() {
+  a_->m();
+}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/VariableType.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/VariableType.h
new file mode 100644
index 0000000..960b550
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/VariableType.h
@@ -0,0 +1,10 @@
+namespace ns1 {
+
+class A {
+	A(int x);
+	A(int x, int y);
+	~A();
+	void m();
+};
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/VariableTypeHelper.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/VariableTypeHelper.h
new file mode 100644
index 0000000..cafee9f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/addInclude/VariableTypeHelper.h
@@ -0,0 +1,10 @@
+namespace ns1 { class A; }
+
+namespace ns2 {
+
+class VT {
+	void method();
+	ns1::A* a_;
+};
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/ceditor/main.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/ceditor/main.cpp
new file mode 100644
index 0000000..76788d4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/ceditor/main.cpp
@@ -0,0 +1,5 @@
+#include <iostream>
+
+void main() {
+	std::cout << "Hello and so.\n";
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/ceditor/occurrences.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/ceditor/occurrences.cpp
new file mode 100644
index 0000000..5a5bc9d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/ceditor/occurrences.cpp
@@ -0,0 +1,129 @@
+#include "occurrences.h"
+
+#define INT      int
+#define FUNCTION_MACRO(arg) globalFunc(arg)
+#define EMPTY_MACRO(arg) 
+
+enum Enumeration {
+	ONE, TWO, THREE
+};
+
+const int globalConstant = 0;
+int globalVariable = 0;
+static int globalStaticVariable = 0;
+
+void globalFunc(int a);
+static void globalStaticFunc() {
+    EMPTY_MACRO(n);
+	globalVariable = 1;
+    EMPTY_MACRO(1);
+    return 0;
+}
+
+class Base1 {
+	Base1();
+	~Base1();
+};
+
+Base1::~Base1() {}
+Base1::Base1() {}
+
+Base2::Base2() {}
+void Base2::foo() {}
+
+class ClassContainer : Base1, Base2 {
+public:
+	static int staticPubField;
+	const int constPubField;
+	const static int constStaticPubField;
+	size_t pubField;
+
+	static INT staticPubMethod(int arg) {
+		FUNCTION_MACRO(arg);
+		globalFunc(arg);
+		return globalStaticVariable;
+	}
+	int pubMethod();
+
+	typedef float pubTypedef;
+	pubTypedef tdField;
+private:
+	static INT staticPrivMethod();
+};
+
+template<class T1, class T2> class TemplateClass {
+	T1 tArg1;
+	T2 tArg2;
+	TemplateClass(T1 arg1, T2 arg2) {
+		tArg1 = arg1;
+		tArg2 = arg2;
+	}
+	void m(TemplateClass&);
+};
+
+template<class T1> class PartialInstantiatedClass : TemplateClass<T1, Base1> {
+};
+
+struct CppStruct {
+	CppStruct() {}
+	int structField;
+};
+
+union CppUnion {
+	int unionField;
+	CppUnion operator+(CppUnion);
+};
+
+typedef CppUnion TUnion;
+
+namespace ns {
+int namespaceVar = 0;
+int namespaceFunc() {
+	globalStaticFunc();
+	TUnion tu;
+	Enumeration e= TWO;
+	switch (e) {
+	case ONE: case THREE:
+		return 1;
+	}
+	size_t size;
+	return namespaceVar;
+}
+}
+
+INT ClassContainer::pubMethod() {
+	int localVar = 0;
+	ns::namespaceVar= 1;
+	return pubField + localVar;
+}
+
+using namespace ns;
+//using ns::namespaceVar;
+
+INT ClassContainer::staticPrivMethod() {
+	CppStruct* st= new CppStruct();
+	st->structField= namespaceVar;
+	CppUnion un;
+	un.unionField= 2;
+	staticPubMethod(staticPubField);
+	un + un;
+label:
+	FUNCTION_MACRO(0);
+	if (un.unionField < st->structField) 
+		goto label;
+	return globalConstant;
+}
+
+template<int X>
+class ConstantTemplate {
+public:
+	size_t getNumber(size_t y) {
+		return X;
+	}
+};
+
+ConstantTemplate<5> c5;
+ConstantTemplate<5> c52;
+ConstantTemplate<4> c4;
+
+const int c= c5.getNumber(0);
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/ceditor/occurrences.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/ceditor/occurrences.h
new file mode 100644
index 0000000..65c2173
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/ceditor/occurrences.h
@@ -0,0 +1,6 @@
+class Base2 {
+	Base2();
+	void foo();
+};
+
+typedef int size_t;
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/compare/CompareTest.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/compare/CompareTest.cpp
new file mode 100644
index 0000000..04e7115
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/compare/CompareTest.cpp
@@ -0,0 +1,155 @@
+// include
+#include "included.h"
+
+// macro
+#define PRINT(string,msg)  printf(string, msg)
+
+//namespace
+namespace MyPackage
+{
+	// check class
+	// class
+	class Hello
+	{
+	// protected visibility
+	protected:
+		// field
+		int x;
+		// method
+		inline void setX(int X)
+		{
+			x = X;
+		};
+		// check nested pachage
+		// nested namespace
+		namespace MyNestedPackage {
+			// check parent nested class
+			// nested class
+			class Y
+			{	// public visibility
+				public:
+				// constructor
+				Y();
+				//  virtual destructor
+				virtual ~Y();
+			};
+			// check derived nested class
+			// derived class
+			class X : public Y {
+					// private visibility
+					private:
+					// private field
+					B b;
+			        
+					public:
+					// constructor chain
+					X(int x) : Y(x) {
+							cout << "In consturctor\n";
+					}
+			        // method declaration 
+					int doNothing();
+			};
+		}
+	};
+
+	// check enums
+	// enum without name
+	enum { 
+		first = 1, 
+		second, 
+		third 
+	}
+	;
+	// enum with name
+	enum MyEnum { 
+		f, 
+		s, 
+		t };
+
+	// check variables
+	// variable 
+	int v;
+	// unsigned long variable
+	unsigned long vuLong;
+	// unsigned short variable
+	unsigned short vuShort;
+
+	// check variable declarations
+	// variable declaration 
+	extern int evar;
+	// function pointer
+	static void * (*orig_malloc_hook)(const char *file, int line, size_t size);
+
+	// check functions
+	// simple function declaration
+	void foo();
+	// function declaration with parameters
+	char* foo(int& x, 
+		char**y);
+	// simple function definition
+	void boo(){
+		int g = 0;
+	};
+	// check Structs
+	// struct 
+	struct MyStruct{
+		int sint;
+	};
+	// typedef and elaborated types
+	typedef struct MyStruct myStruct;
+	// typedef 
+	typedef struct{ 
+		int ss; 
+	} myTypedef;
+	// unions
+	union U{
+		int U1;
+	};
+
+
+	// check templates
+	// template function declaration
+	template<class A, typename B=C> 
+	A aTemplatedFunction( B bInstance );
+	// template function definition
+	template<class A, typename B=C> 
+	A aTemplatedFunction( B bInstance ) {
+		A a;
+		return a;
+	}
+	// template method
+	class enclosing {
+		// public visibility
+		public:
+		template<class A, typename B=C> 
+		A aTemplatedMethod( B bInstance );
+	};
+	// template class
+	template<class T, typename Tibor = junk> 
+	class myarray { /* */ };
+	// template struct
+	template<class T, typename Tibor = junk> 
+	struct mystruct { /* */ };
+	// template variable
+	template <bool __threads, int __inst>
+	char* default_alloc_template<__threads, __inst>::_S_start_free = 0;
+};
+	// check arrays
+	// arrays
+	int myArray [5][];
+	int main(int argc, char * argv[]) 
+	{ 
+	}
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=180815
+struct bug180815 {
+	int i,j;
+} bug180815_var0, bug180815_var1;
+
+// using
+using Mypackage;
+
+// linkage spec
+extern "C" {
+	void cfunction() {}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart.h
new file mode 100644
index 0000000..33da8f2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart.h
@@ -0,0 +1,72 @@
+#define DEBUG 1
+#define AMacro(x) x+1
+#define XMacro(x,y) x+y
+
+int aVariable;
+int xVariable;
+
+bool aFunction();
+bool xFunction();
+
+enum anEnumeration {
+	aFirstEnum,
+	aSecondEnum, 
+	aThirdEnum
+};
+
+enum xEnumeration {
+	xFirstEnum,
+	xSecondEnum, 
+	xThirdEnum
+};
+
+struct AStruct{
+	int aStructField;
+};
+
+struct XStruct{
+	int xStructField;
+};
+
+void anotherFunction(){
+   int aLocalDeclaration = 1;
+}
+
+void xOtherFunction(){
+   int xLocalDeclaration = 1;
+}
+
+class aClass {
+public:
+	int aField;
+	float xAClassField;
+	int aMethod();
+	void xAClassMethod(int x);
+};
+
+class anotherClass {
+public:
+	int anotherField;
+	void anotherMethod();
+};
+
+class xOtherClass {
+public:
+	xOtherClass(char*);
+	xOtherClass(int);
+	int xOtherField;
+	void xOtherMethod();
+	void xOtherMethod(int);
+};
+
+namespace aNamespace {
+    void aNamespaceFunction(){
+    }
+};
+
+namespace xNamespace {
+    void xNamespaceFunction(){
+    }
+};
+
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart1.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart1.cpp
new file mode 100644
index 0000000..7316b66
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart1.cpp
@@ -0,0 +1,6 @@
+#include "CompletionTestStart.h"
+
+void anotherClass::anotherMethod()
+{
+ a 
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart10.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart10.cpp
new file mode 100644
index 0000000..26d5d6f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart10.cpp
@@ -0,0 +1,7 @@
+#include "CompletionTestStart.h"
+
+void anotherClass::anotherMethod()
+{
+    aClass* c = new aClass();
+    c-> 
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart11.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart11.cpp
new file mode 100644
index 0000000..6043477
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart11.cpp
@@ -0,0 +1,3 @@
+#include "CompletionTestStart.h"
+
+     
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart12.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart12.h
new file mode 100644
index 0000000..29e593e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart12.h
@@ -0,0 +1,6 @@
+#include "CompletionTestStart.h"
+
+class aThirdClass {
+   int x;
+        
+};
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart13.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart13.h
new file mode 100644
index 0000000..b41aa04
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart13.h
@@ -0,0 +1,5 @@
+#include "CompletionTestStart.h"
+
+class aThirdClass {
+        
+};
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart14.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart14.cpp
new file mode 100644
index 0000000..5d33709
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart14.cpp
@@ -0,0 +1,5 @@
+#include "CompletionTestStart.h"
+
+void foo(int x){
+	int y = a 
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart15.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart15.cpp
new file mode 100644
index 0000000..238e95c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart15.cpp
@@ -0,0 +1,5 @@
+#include "CompletionTestStart.h"
+
+void foo(int x){
+	int y =       
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart16.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart16.cpp
new file mode 100644
index 0000000..8e4eed2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart16.cpp
@@ -0,0 +1,3 @@
+#include "CompletionTestStart.h"
+
+void foo ( a 
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart17.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart17.cpp
new file mode 100644
index 0000000..fb9f4cd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart17.cpp
@@ -0,0 +1,3 @@
+#include "CompletionTestStart.h"
+
+void foo (        
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart18.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart18.cpp
new file mode 100644
index 0000000..aa593d2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart18.cpp
@@ -0,0 +1,6 @@
+#include "CompletionTestStart.h"
+
+class ClassA {
+  void foo ( a 
+};
+ 
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart19.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart19.cpp
new file mode 100644
index 0000000..6ec3631
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart19.cpp
@@ -0,0 +1,5 @@
+#include "CompletionTestStart.h"
+
+class ClassA {
+  void foo (        
+};
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart2.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart2.cpp
new file mode 100644
index 0000000..23afd8c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart2.cpp
@@ -0,0 +1,7 @@
+#include "CompletionTestStart.h"
+
+void anotherClass::anotherMethod()
+{
+    aClass c;
+    c.a 
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart20.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart20.h
new file mode 100644
index 0000000..c0dd03e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart20.h
@@ -0,0 +1,4 @@
+#include "CompletionTestStart.h"
+
+class ClassA : public a 
+ 
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart21.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart21.h
new file mode 100644
index 0000000..142826f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart21.h
@@ -0,0 +1,3 @@
+#include "CompletionTestStart.h"
+
+class ClassA : public        
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart22.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart22.cpp
new file mode 100644
index 0000000..721d0ef
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart22.cpp
@@ -0,0 +1,8 @@
+#include "CompletionTestStart.h"
+
+void anotherClass::anotherMethod()
+{
+ try {
+ } catch ( a 
+ 
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart23.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart23.cpp
new file mode 100644
index 0000000..5e2cbae
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart23.cpp
@@ -0,0 +1,7 @@
+#include "CompletionTestStart.h"
+
+void anotherClass::anotherMethod()
+{
+ try {
+ } catch (        
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart24.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart24.cpp
new file mode 100644
index 0000000..1af4d33
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart24.cpp
@@ -0,0 +1,3 @@
+#include "CompletionTestStart.h"
+
+using  
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart25.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart25.cpp
new file mode 100644
index 0000000..6f1f93e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart25.cpp
@@ -0,0 +1,3 @@
+#include "CompletionTestStart.h"
+
+using a  
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart26.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart26.cpp
new file mode 100644
index 0000000..5a09fa9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart26.cpp
@@ -0,0 +1,3 @@
+#include "CompletionTestStart.h"
+
+#ifdef   
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart27.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart27.cpp
new file mode 100644
index 0000000..4f474a2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart27.cpp
@@ -0,0 +1,3 @@
+#include "CompletionTestStart.h"
+
+#ifdef D  
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart28.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart28.cpp
new file mode 100644
index 0000000..6b50a72
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart28.cpp
@@ -0,0 +1,6 @@
+#include "CompletionTestStart.h"
+
+void anotherClass::anotherMethod()
+{
+  aClass myClass = new a    
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart29.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart29.cpp
new file mode 100644
index 0000000..7ee28ed
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart29.cpp
@@ -0,0 +1,7 @@
+#include "CompletionTestStart.h"
+
+void anotherClass::anotherMethod()
+{
+  aClass myClass = new         
+}
+ 
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart3.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart3.cpp
new file mode 100644
index 0000000..9baf943
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart3.cpp
@@ -0,0 +1,3 @@
+#include "CompletionTestStart.h"
+
+ a 
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart30.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart30.cpp
new file mode 100644
index 0000000..9010ea4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart30.cpp
@@ -0,0 +1,6 @@
+#include "CompletionTestStart.h"
+
+void anotherClass::anotherMethod()
+{
+ aNamespace:: 
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart31.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart31.cpp
new file mode 100644
index 0000000..63286f3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart31.cpp
@@ -0,0 +1,6 @@
+#include "CompletionTestStart.h"
+
+void anotherClass::anotherMethod()
+{
+ aNamespace::a 
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart32.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart32.cpp
new file mode 100644
index 0000000..463a344
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart32.cpp
@@ -0,0 +1,3 @@
+#include "CompletionTestStart.h"
+
+using namespace   
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart33.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart33.cpp
new file mode 100644
index 0000000..f6fd9f0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart33.cpp
@@ -0,0 +1,3 @@
+#include "CompletionTestStart.h"
+
+using namespace a  
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart34.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart34.cpp
new file mode 100644
index 0000000..260938d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart34.cpp
@@ -0,0 +1,6 @@
+#include "CompletionTestStart.h"
+
+int anotherClass::anotherMethod(){
+	xOtherClass c;
+	c.xOtherMethod (         
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart35.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart35.cpp
new file mode 100644
index 0000000..c30d27f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart35.cpp
@@ -0,0 +1,5 @@
+#include "CompletionTestStart.h"
+
+int anotherClass::anotherMethod(){
+	xOtherClass* a = new xOtherClass (         
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart36.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart36.cpp
new file mode 100644
index 0000000..9799e8a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart36.cpp
@@ -0,0 +1,7 @@
+#include "CompletionTestStart.h"
+
+void aClass::aMethod()
+{
+	int xLocal = 0;
+	xAClassMethod( x 
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart37.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart37.cpp
new file mode 100644
index 0000000..a9e27fb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart37.cpp
@@ -0,0 +1,5 @@
+#include "CompletionTestStart.h"
+
+typedef int myType;
+
+ m  
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart38.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart38.cpp
new file mode 100644
index 0000000..3e5a238
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart38.cpp
@@ -0,0 +1,11 @@
+class Foo{
+public:
+Foo();
+class DEF{};
+void bar();
+static void fum();
+static int x;
+int y;
+};
+
+Foo::      
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart39.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart39.cpp
new file mode 100644
index 0000000..0779373
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart39.cpp
@@ -0,0 +1,10 @@
+class Foo{
+public:
+Foo();
+void bar();
+static void fum();
+static int x;
+int y;
+};
+
+void Foo::      
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart4.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart4.h
new file mode 100644
index 0000000..d09cc7c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart4.h
@@ -0,0 +1,5 @@
+#include "CompletionTestStart.h"
+
+class aThirdClass {
+    a 
+};
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart40.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart40.cpp
new file mode 100644
index 0000000..8c8f8cf
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart40.cpp
@@ -0,0 +1,7 @@
+#include "CompletionTestStart40.h"
+
+int var;
+
+ x 
+ 
+// end
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart40.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart40.h
new file mode 100644
index 0000000..757ff51
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart40.h
@@ -0,0 +1,61 @@
+#define DEBUG 1
+enum {
+	aFirstEnum,
+	aSecondEnum, 
+	aThirdEnum
+};
+
+enum {
+	xFirstEnum,
+	xSecondEnum, 
+	xThirdEnum
+};
+
+int notAnonymous;
+enum notAnonymousEnum {};
+class notAnonymousClass {};
+
+struct {
+	int aStructField;
+};
+
+struct {
+	int xStructField;
+};
+
+union {
+	int aUnionMember1, aUnionMember2;
+}; 
+
+class {
+public:
+	int aField;
+	float xAClassField;
+	int aMethod();
+	void xAClassMethod(int x);
+};
+
+class {
+public:
+	int anotherField;
+	void anotherMethod();
+};
+
+class xOtherClass {
+public:
+	xOtherClass(char*);
+	xOtherClass(int);
+	int xOtherField;
+	void xOtherMethod();
+	void xOtherMethod(int);
+};
+
+// namespace {
+//    void aNamespaceFunction(){
+//    }
+// };
+
+// namespace {
+//    void xNamespaceFunction(){
+//    }
+// };
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart41.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart41.cpp
new file mode 100644
index 0000000..3fceafa
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart41.cpp
@@ -0,0 +1,9 @@
+#include "CompletionTestStart41.h"
+
+void main() {
+    A a, &aa=a, *ap= new A();
+    a.foo();
+    ap-> 
+}
+
+// end
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart41.h b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart41.h
new file mode 100644
index 0000000..637a9bd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart41.h
@@ -0,0 +1,11 @@
+
+class B {
+public:
+	void bar() {}
+};
+
+class A {
+	public:
+	B* operator->() { return new B(); }
+	void foo() {}
+};
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart42.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart42.cpp
new file mode 100644
index 0000000..a7e00e9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart42.cpp
@@ -0,0 +1,9 @@
+#include "CompletionTestStart41.h"
+
+void main() {
+    A a, &aa=a, *ap= new A();
+    a.foo();
+    a-> 
+}
+
+// end
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart5.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart5.cpp
new file mode 100644
index 0000000..ae96bff
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart5.cpp
@@ -0,0 +1,6 @@
+#include "CompletionTestStart.h"
+
+void anotherClass::anotherMethod()
+{
+    
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart6.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart6.cpp
new file mode 100644
index 0000000..57d57b9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart6.cpp
@@ -0,0 +1,7 @@
+#include "CompletionTestStart.h"
+
+void anotherClass::anotherMethod()
+{
+    aClass* c = new aClass();
+    c->a 
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart7.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart7.cpp
new file mode 100644
index 0000000..d91f3a4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart7.cpp
@@ -0,0 +1,10 @@
+#include "CompletionTestStart.h"
+
+aClass* foo(){
+	return new aClass();
+}
+
+void anotherClass::anotherMethod()
+{
+    foo()->a 
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart8.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart8.cpp
new file mode 100644
index 0000000..0dd8dff
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart8.cpp
@@ -0,0 +1,5 @@
+#include "CompletionTestStart.h"
+
+void foo(int x){
+	int y = AM 
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart9.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart9.cpp
new file mode 100644
index 0000000..6fa0e57
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/contentassist/CompletionTestStart9.cpp
@@ -0,0 +1,7 @@
+#include "CompletionTestStart.h"
+
+void anotherClass::anotherMethod()
+{
+    aClass c;
+    c. 
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/docComments/this.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/docComments/this.cpp
new file mode 100644
index 0000000..b24e4f4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/docComments/this.cpp
@@ -0,0 +1,24 @@
+// N.B: Character positions in this file are hard-coded into expected results in
+// DocCommentHightlightTest.
+
+/* normal0 */
+/*A comment1___ */
+/*B comment2__ */
+/*C comment3_ *//*D comment4___ */
+/*E comment5____ *//*F comment6_ */
+/*G comment7 
+*//*F comment8_ *//*! __comment9 */
+/**
+comment10
+*/
+
+// snormal0
+//A scomment1__
+//B scomment2_
+//C scomment3__
+//! _scomment4
+//* scomment5___
+
+/*# comment11_ #*/ // scomment6__
+/*# comment12__ #*/ //# __scomment7
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/folding/FoldingTest.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/folding/FoldingTest.cpp
new file mode 100644
index 0000000..1fcae93
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/folding/FoldingTest.cpp
@@ -0,0 +1,131 @@
+/*
+ * header comment
+ */
+#define ONE
+#define MULTI_LINE_MACRO(x) \
+    if (DBG) { \
+    	printf(x); \
+    }
+
+#if 0
+# if 1
+ //
+# endif
+#elif X
+// X
+#else
+# if ONE
+#  if 0
+#   if 1
+ //
+#   endif
+#  else
+#   if 1
+ //
+#   endif
+#  endif
+# endif
+#endif
+
+/*
+ * comment
+ */
+int y;
+
+#if 1
+int func() {
+#else
+int func2() {
+#endif
+	return 0;
+}
+
+// multiple single line comments
+// multiple single line comments
+// multiple single line comments
+// multiple single line comments
+// multiple single line comments
+
+class Class {
+public:
+	int pubField;
+    static int staticPubMethod(int arg) {
+        return 0;
+    }
+    int pubMethod();
+};
+
+int Class::pubMethod() {
+	return pubField;
+}
+
+struct CppStruct {
+    int structField;
+};
+
+union CppUnion {
+    int unionField;
+};
+
+// http://bugs.eclipse.org/214590
+int
+main(int argc,
+     char *argv[])
+{
+	int MyI = 0,j = 0;
+	if (0==0) {
+		puts("Wow ");
+	} else {
+		j = j;
+	}
+	for (MyI = 0; MyI < 10; ++MyI) {
+		printf("%d\n",MyI);
+	}
+	while (0) {
+		puts("nothinghere");
+	}
+	switch (1) {
+		case 1:
+			puts("ab");
+			break;
+		case 2:
+			puts("cd");
+		default:
+			puts("xy");
+	}
+	do {
+		puts("tryagain");
+
+	} while (0);
+	if (MyI==0) 
+	{
+		return 1;
+	}
+    return 0;
+}
+
+enum E {
+    e1,
+    e2,
+    e3
+};
+
+// http://bugs.eclipse.org/248613
+jungle::Monkey_ptr
+jungle::MonkeyImpl::
+Initialize()
+{
+}
+// http://bugs.eclipse.org/248716
+void foo() {
+	if (1
+			&& 2)
+	{
+	} else if (3
+			|| 4)
+	{
+	}
+}
+// http://bugs.eclipse.org/255018
+#if 0
+// #endif missing
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/bugs/After.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/bugs/After.cpp
new file mode 100644
index 0000000..10b6575
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/bugs/After.cpp
@@ -0,0 +1,61 @@
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169382
+struct x {
+};
+struct x getX() {
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171520
+int bug = sizeof(int);
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=173837
+class ABaseClass {
+protected:
+	ABaseClass(int x);
+};
+class AClass: public ABaseClass {
+	AClass(int x) throw (int);
+	void test1() const throw (int);
+	void test2() throw ();
+};
+AClass::AClass(int x) throw (int) :
+	ABaseClass(x) {
+	for (int i = 0; i < 12; i++) {
+	}
+}
+// keep space between decl spec and declarator
+int main(int argc, char **argv) {
+}
+// handling of string concat
+char* s1 = "this " "is " "one " "string.";
+char* s2 = "this " "is "
+	"one " "string.";
+// macro definition with line comment
+#define ID(x) x  // identity
+int main() {
+	return ID(0);
+}
+// semicolons inside for
+void g() {
+	for (int i = 0; i < 10; ++i) {
+	}
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=183220
+void bug183220() {
+	int rtc_hdw_cr_sync_next, rtc_hdw_cr_sync, rtc_hdw_cr_resync_enable,
+			rtc_s2000_src_pending, rtc_s2000_cr_sync_pending,
+			rtc_hdw_cr_sync_next, rtc_hdw_current_clock;
+	int rtc_s2000_clock_source_state, RTC_CLOCK_PLL;
+	if (((rtc_hdw_cr_sync_next != rtc_hdw_cr_sync) || rtc_hdw_cr_resync_enable)
+			&& !rtc_s2000_src_pending && !rtc_s2000_cr_sync_pending) {
+		if (!identify_hdw_fvr_master() || !rtc_hdw_current_clock->external
+				|| !rtc_hdw_cr_sync_next || ((rtc_hdw_current_clock->external
+				&& rtc_hdw_cr_sync_next && rtc_s2000_clock_source_state
+				!= RTC_CLOCK_PLL))) {
+		}
+	}
+}
+// declaration with array initializer
+long dummy[] = { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
+		100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
+		100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
+		100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
+		100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
+		100, 100, 100, 100, 100, 100, 100, 100, 100, 100, };
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/bugs/Before.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/bugs/Before.cpp
new file mode 100644
index 0000000..70ba3bd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/bugs/Before.cpp
@@ -0,0 +1,35 @@
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169382
+struct x {};
+struct x getX() {}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171520
+int bug=sizeof(int);
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=173837
+class ABaseClass {protected:ABaseClass(int x);};
+class AClass : public ABaseClass {AClass(int x) throw(int); void test1() const throw(int); void test2() throw();};
+AClass::AClass(int x)throw(int):ABaseClass(x){for (int i=0;i < 12;i++) {}}
+// keep space between decl spec and declarator
+int
+main(int argc,char **argv) {}
+// handling of string concat
+char* s1= "this "   "is "  "one ""string.";
+char* s2= "this " "is " 
+"one " "string.";
+// macro definition with line comment
+#define ID(x) x  // identity
+int main(){return ID(0);}
+// semicolons inside for
+void g(){for(int i=0;i<10;++i){}}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=183220
+void bug183220()
+{
+	int rtc_hdw_cr_sync_next,rtc_hdw_cr_sync,rtc_hdw_cr_resync_enable,rtc_s2000_src_pending,rtc_s2000_cr_sync_pending,rtc_hdw_cr_sync_next,rtc_hdw_current_clock;
+	int rtc_s2000_clock_source_state,RTC_CLOCK_PLL;
+	if (( ( rtc_hdw_cr_sync_next != rtc_hdw_cr_sync ) || rtc_hdw_cr_resync_enable )&& !rtc_s2000_src_pending && !rtc_s2000_cr_sync_pending) { if (!identify_hdw_fvr_master() || !rtc_hdw_current_clock->external || !rtc_hdw_cr_sync_next ||( ( rtc_hdw_current_clock->external && rtc_hdw_cr_sync_next && rtc_s2000_clock_source_state != RTC_CLOCK_PLL ) )) {
+		}
+	}
+}
+// declaration with array initializer
+long dummy[]= { 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
+	100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
+	100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
+	};
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/complex/After.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/complex/After.cpp
new file mode 100644
index 0000000..5f32187
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/complex/After.cpp
@@ -0,0 +1,39 @@
+
+/* This is sample code to test the formatter */
+
+// comment
+class Complex {
+	// comment
+
+	// comment
+
+	// comment
+private:
+	// comment
+	float re;
+	float im;
+public:
+	// comment
+	Complex(float re, float im) :
+		// comment
+				re(re), im(im) {
+	}
+	// comment
+	float GetRe() {
+		return re;
+	}
+	// comment
+	float GetIm() {
+		return im;
+	}
+	void Set(float r, float i);
+	/* Set real part */
+	void SetRe(float r);
+	/*
+	 * Set imaginary part
+	 */
+	void SetIm(float i);
+	void Print();
+};
+
+// comment
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/complex/Before.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/complex/Before.cpp
new file mode 100644
index 0000000..4070a74
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/complex/Before.cpp
@@ -0,0 +1,36 @@
+		
+		
+		/* This is sample code to test the formatter */
+           		
+		
+         		// comment
+	  class Complex {
+   		// comment
+
+   		// comment
+		  
+		  // comment
+		private  :
+     		// comment
+			   float re ;		   	float im;
+				public:
+	         		// comment
+			Complex(float re, float im) :
+         		// comment
+	re(re), im(im) {}
+     		// comment
+			float GetRe() {			return re;}
+     		// comment
+float GetIm() {
+		return im;
+			}
+ void Set(float r, float i);
+   /* Set real part */
+	   void SetRe(float r)  ;
+	  /*
+   * Set imaginary part
+	   */
+		void SetIm(float i);void Print();
+		};
+
+ 		// comment
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/preview/After.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/preview/After.cpp
new file mode 100644
index 0000000..07d43c2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/preview/After.cpp
@@ -0,0 +1,79 @@
+/*
+ * Indentation
+ */
+#include <math.h>
+class Point {
+public:
+	Point(double xc, double yc) :
+		x(xc), y(yc) {
+	}
+	double distance(const Point& other) const;
+	int compareX(const Point& other) const;
+	double x;
+	double y;
+};
+double Point::distance(const Point& other) const {
+	double dx = x - other.x;
+	double dy = y - other.y;
+	return sqrt(dx * dx + dy * dy);
+}
+int Point::compareX(const Point& other) const {
+	if (x < other.x) {
+		return -1;
+	} else if (x > other.x) {
+		return 1;
+	} else {
+		return 0;
+	}
+}
+namespace FOO {
+int foo(int bar) const {
+	switch (bar) {
+	case 0:
+		++bar;
+		break;
+	case 1:
+		--bar;
+	default: {
+		bar += bar;
+		break;
+	}
+	}
+}
+} // end namespace FOO
+/*
+ * Line Wrapping
+ */
+int array[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+		1000, 2000, 3000, 4000, 5000 };
+int compare(int argument, int otherArg) {
+	return argument + otherArg > argument * otherArg + 1000000 ? 100000 + 50000
+			: 200000 - 30000;
+}
+class Other {
+	static void bar(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6,
+			int arg7, int arg8, int arg9) {
+	}
+};
+void foo() {
+	Other::bar(100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000,
+			900000);
+}
+enum EEEE {
+	ONE,
+	TWO,
+	THREE,
+	FOUR,
+	FIVE,
+	SIX,
+	SEVEN = 7,
+	EIGHT,
+	NINE,
+	TEN,
+	HUNDRED,
+	THOUSAND,
+	AMILLION
+};
+template<typename T1, typename T2> class map {
+};
+map<int, int> m;
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.cpp
new file mode 100644
index 0000000..461ecc0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/preview/Before.cpp
@@ -0,0 +1,14 @@
+/*
+ * Indentation
+ */
+#include <math.h>
+class Point {public:Point(double xc, double yc) : x(xc), y(yc) {}double distance(const Point& other) const;int compareX(const Point& other) const;double x;double y;};double Point::distance(const Point& other) const {double dx = x - other.x;double dy = y - other.y;return sqrt(dx * dx + dy * dy);}int Point::compareX(const Point& other) const {if (x < other.x) {return -1;} else if (x > other.x) {return 1;} else {return 0;}}namespace FOO {int foo(int bar) const {switch (bar) {case 0:++bar;break;case 1:--bar;default: {bar += bar;break;}}}} // end namespace FOO
+/*
+ * Line Wrapping
+ */
+int array[]= {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 1000, 2000, 3000, 4000, 5000};
+int compare(int argument, int otherArg) {return argument+otherArg > argument*otherArg+1000000 ? 100000+50000 : 200000-30000;}
+class Other {static void bar(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9) {}};
+void foo() {Other::bar(100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000);}
+enum EEEE{ONE,TWO,THREE,FOUR,FIVE,SIX,SEVEN=7,EIGHT,NINE,TEN,HUNDRED,THOUSAND,AMILLION};
+template<typename T1,typename T2> class map {};map<int,int> m;
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp
new file mode 100644
index 0000000..89ede2d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp
@@ -0,0 +1,49 @@
+//#include <Simple.h>
+#ifndef SIMPLE_H
+#define SIMPLE_H
+
+struct SimpleStruct {
+	int num;
+	char name[];
+	float floatNum;
+};
+
+void SimpleStruct_construct(struct SimpleStruct * const s);
+
+int SimpleStruct_doSomething(const struct SimpleStruct * const s);
+
+#endif /* SIMPLE_H */
+
+const SimpleStruct simpleStruct = { 1, "mySimple", 0.1232 };
+
+#define SIZEOF( A, B ) sizeof( A.B )
+
+#define FOREVER \
+            for(;;)\
+{\
+        \
+                }
+
+const SimpleStruct array[] = { { SIZEOF( simpleStruct, num ),
+#if FOO
+		"foo"
+#  else
+		"bar"
+#endif
+		, 0.5 }, { SIZEOF( simpleStruct, floatNum ), "name", 1.1 } };
+
+//          single line outside scope
+
+void SimpleStruct_construct(struct SimpleStruct * const s) {
+	// single line
+	s->num = 1;
+	s->name = "boo";
+	s->floatNum = 1.5;
+}
+
+int ConnectParams_doSomething(const struct SimpleStruct * const s) {
+	/*
+	 * multiline
+	 */
+	return 1;
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/sample/Before.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/sample/Before.cpp
new file mode 100644
index 0000000..5a012a8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/sample/Before.cpp
@@ -0,0 +1,70 @@
+//#include <Simple.h>
+#ifndef SIMPLE_H
+#define SIMPLE_H
+
+struct SimpleStruct
+{
+	int   num;
+	char  name [ ];
+	float floatNum;
+};
+
+
+void SimpleStruct_construct( struct SimpleStruct * const s );
+
+int SimpleStruct_doSomething( const struct SimpleStruct * const s );
+
+#endif /* SIMPLE_H */
+
+
+const SimpleStruct simpleStruct =
+{
+	1
+  , "mySimple"
+  , 0.1232
+};
+
+#define SIZEOF( A, B ) sizeof( A.B )
+
+              #define FOREVER \
+            for(;;)\
+{\
+        \
+                }
+
+const SimpleStruct array[] =
+{
+	{
+		  SIZEOF( simpleStruct, num ),
+#if FOO
+				"foo"
+   #  else
+		"bar"
+#endif
+	  , 0.5
+	}
+  , {
+	  SIZEOF( simpleStruct, floatNum )
+, "name"
+	  , 1.1
+	}
+};
+
+//          single line outside scope
+
+void SimpleStruct_construct( 
+struct SimpleStruct * const s )
+  {
+// single line
+s->num = 1;
+s->name = "boo";
+s->floatNum = 1.5;
+  }
+
+int ConnectParams_doSomething( const struct SimpleStruct * const s )
+    {
+/*
+ * multiline
+ */
+	return 1;
+	}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/templates/After.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/templates/After.cpp
new file mode 100644
index 0000000..b3f9156
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/templates/After.cpp
@@ -0,0 +1,76 @@
+class Key;
+class Value;
+class SortAlgorithm;
+class DefaultSort;
+class T;
+class X;
+class Y;
+class Bar;
+class Foo {
+	template<class Bar> void fum(int i);
+};
+
+// TEMPLATE_STRUCT
+template<class Key, class Value, class SortAlgorithm = DefaultSort>
+struct Map {
+	Key* keys;
+	Value* values;
+	SortAlgorithm* sortAlgorithm;
+	Map();
+};
+
+// TEMPLATE_CLASS
+template<class T> class nonVector {
+private:
+	T* head;
+
+public:
+	nonVector() {
+		head = new T();
+	}
+	int length() {
+		return 1;
+	}
+	const T& first() const;
+};
+
+// TEMPLATE_UNION
+template<class X, class Y, int size = 16>
+union ArrayOverlay {
+public:
+	X x[size];
+	Y y[size];
+
+	static int numArrays;
+};
+
+// TEMPLATE_METHODS
+class TemplateContainer {
+	// these are in an enclosing class
+	template<class Bar> void fum(int i);
+	template<int>
+	void scrum(void) {
+	}
+	;
+};
+
+// TEMPLATE_FUNCTION
+template<class T> const T& nonVector<T>::first() const {
+	return *head;
+}
+
+template<class X> bool IsGreaterThan(X, X);
+
+template<class Bar> void Foo::fum(int i) {
+}
+
+// TEMPLATE_VARIABLES
+template<bool threads, int inst> char
+		* default_alloc_template<threads, inst>::S_start_free = 0;
+
+// an instantiation, not a template:
+complex<float> cf(0, 0);
+//template<class Language, class CharacterSet, class SortAlgorithm<CharacterSet> >
+//Dictionary* TheSpellCheckDictionary;
+
+int success;
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/templates/Before.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/templates/Before.cpp
new file mode 100644
index 0000000..b8370d4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/formatter/templates/Before.cpp
@@ -0,0 +1,68 @@
+class Key;
+class Value;
+class SortAlgorithm;
+class DefaultSort;
+class T;
+class X;
+class Y;
+class Bar;
+class Foo { template<class Bar> void fum(int i); };
+
+// TEMPLATE_STRUCT
+template<class Key, class Value, class SortAlgorithm=DefaultSort>
+struct Map
+{
+	Key* keys;
+	Value* values;
+	SortAlgorithm* sortAlgorithm;
+	Map();
+};
+
+// TEMPLATE_CLASS
+template<class T> class nonVector {
+private:	T* head;
+
+public:
+	nonVector() {head=new T();}
+	int length() {return 1;}
+	const T& first() const;
+};
+
+// TEMPLATE_UNION
+template<class X, class Y, int size=16>
+union ArrayOverlay {
+public:
+	X x[size];	Y y[size];
+
+	static int numArrays;
+};
+
+// TEMPLATE_METHODS
+class TemplateContainer {
+	// these are in an enclosing class
+	template<class Bar> void fum(int i);
+	template<int> 
+	void scrum(void) {}
+	;
+};
+
+// TEMPLATE_FUNCTION
+template<class T> const T& nonVector<T>::first() const
+	{
+	return *head;
+}
+
+template<class X> bool IsGreaterThan(X,X);
+
+template<class Bar> void Foo::fum(int i) {}
+
+// TEMPLATE_VARIABLES
+template <bool   threads, int inst> char* default_alloc_template<threads, inst>::S_start_free = 0;
+
+// an instantiation, not a template:
+complex
+<float> cf(0,0);
+//template<class Language, class CharacterSet, class SortAlgorithm<CharacterSet> >
+//Dictionary* TheSpellCheckDictionary;
+
+int success;
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/inactiveCode/InactiveCodeTest.c b/results/plugins/org.eclipse.cdt.ui.tests/resources/inactiveCode/InactiveCodeTest.c
new file mode 100644
index 0000000..dc08575
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/inactiveCode/InactiveCodeTest.c
@@ -0,0 +1,76 @@
+#define foo 0
+
+#if 0
+# define NEVER_DEFINED
+#endif
+
+// X is defined
+#define X
+
+#ifdef X
+# define X_IS_DEFINED
+# if 0
+  // always disabled
+# endif
+# define X_IS_IT
+#elif defined (Y)
+# define Y_IS_DEFINED_BUT_NOT_X
+# if 1
+  // always enabled if outer branch enabled
+# endif
+#else
+# define NEITHER_X_NOR_Y_IS_DEFINED
+#endif
+
+// X is not defined, Y is defined
+#undef X
+#define Y
+
+#ifdef X
+# define X_IS_DEFINED
+# if 0
+  // always disabled
+# endif
+# define X_IS_IT
+#elif defined (Y)
+# define Y_IS_DEFINED_BUT_NOT_X
+# if 1
+  // always enabled if outer branch enabled
+# endif
+#else
+# define NEITHER_X_NOR_Y_IS_DEFINED
+#endif
+
+// X is not defined, Y is not defined
+#undef X
+#undef Y
+
+#ifdef X
+# define X_IS_DEFINED
+# if 0
+  // always disabled
+# endif
+# define X_IS_IT
+#elif defined (Y)
+# define Y_IS_DEFINED_BUT_NOT_X
+# if 1
+  // always enabled if outer branch enabled
+# endif
+#else
+# define NEITHER_X_NOR_Y_IS_DEFINED
+#endif
+
+#ifndef F
+#ifdef  // this gives an error
+#error invalid ifdef
+#endif
+
+#if foo
+//my code
+#endif
+
+#endif // unbalanced endif because of invalid ifdef above
+
+#if foo // unterminated #if - http://bugs.eclipse.org/255018
+// inactive code
+// #endif
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/complex/After.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/complex/After.cpp
new file mode 100644
index 0000000..c18516e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/complex/After.cpp
@@ -0,0 +1,25 @@
+
+
+/* This is sample code to test the indenter */
+
+
+
+class Complex {
+private:
+	float re;
+	float im;
+public:
+	Complex(float re, float im) :
+		re(re), im(im) {}
+	float GetRe() 
+	{
+		return re;
+	}
+	float GetIm() {
+		return im;
+	}
+	void Set(float r, float i);
+	void SetRe(float r);
+	void SetIm(float i);
+	void Print();
+};
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/complex/Before.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/complex/Before.cpp
new file mode 100644
index 0000000..41beaba
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/complex/Before.cpp
@@ -0,0 +1,25 @@
+		
+		
+		/* This is sample code to test the indenter */
+           		
+		
+         		
+	  class Complex {
+		private:
+			   float re;
+		   	float im;
+				public:
+			Complex(float re, float im) :
+	re(re), im(im) {}
+			float GetRe() 
+    			    {
+				return re;
+		}
+			float GetIm() {
+		return im;
+			}
+ void Set(float r, float i);
+	   void SetRe(float r);
+		void SetIm(float i);
+	void Print();
+		};
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/sample/After.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/sample/After.cpp
new file mode 100644
index 0000000..b46d3e2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/sample/After.cpp
@@ -0,0 +1,55 @@
+#include <Simple.h>
+
+const SimpleStruct simpleStruct =
+{
+		1,
+		"mySimple",
+		0.1232
+};
+
+#define SIZEOF( A, B ) sizeof( A.B )
+
+#define FOREVER \
+		for(;;)\
+		{\
+			\
+		}
+
+const OtherStruct array[] =
+{
+		{
+#if FOO
+				"foo"
+#  else
+				"bar"
+#endif
+				,	SIZEOF( simpleStruct, num )
+				, &t_int
+				, 0
+		}
+		, {
+				"name"
+				, SIZEOF( simpleStruct, floatnum )
+				, &t_float
+				, 1
+		}
+};
+
+//          single line outside scope
+
+void SimpleStruct_construct( 
+		struct SimpleStruct * const this )
+{
+	// single line
+	this->num = 1;
+	this->name = "boo";
+	this->floatNum = 1.5;
+}
+
+int ConnectParams_doSomething( const struct SimpleStruct * const this )
+{
+	/*
+	 * multiline
+	 */
+	return 1;
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/sample/Before.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/sample/Before.cpp
new file mode 100644
index 0000000..0ce65ac
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/sample/Before.cpp
@@ -0,0 +1,55 @@
+#include <Simple.h>
+
+const SimpleStruct simpleStruct =
+{
+	1,
+"mySimple",
+0.1232
+};
+
+#define SIZEOF( A, B ) sizeof( A.B )
+
+              #define FOREVER \
+            for(;;)\
+{\
+        \
+                }
+
+const OtherStruct array[] =
+{
+	{
+#if FOO
+				"foo"
+   #  else
+		"bar"
+#endif
+	  ,	SIZEOF( simpleStruct, num )
+	  , &t_int
+	  , 0
+	}
+  , {
+		"name"
+	  , SIZEOF( simpleStruct, floatnum )
+	  , &t_float
+	  , 1
+	}
+};
+
+//          single line outside scope
+
+void SimpleStruct_construct( 
+struct SimpleStruct * const this )
+  {
+// single line
+this->num = 1;
+this->name = "boo";
+this->floatNum = 1.5;
+  }
+
+int ConnectParams_doSomething( const struct SimpleStruct * const this )
+    {
+/*
+ * multiline
+ */
+	return 1;
+	}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/unchanged/After.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/unchanged/After.cpp
new file mode 100644
index 0000000..b60e3ef
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/unchanged/After.cpp
@@ -0,0 +1,80 @@
+#include <cppunit/tools/StringTools.h>
+#include <cppunit/portability/Stream.h>
+#include <algorithm>
+
+
+CPPUNIT_NS_BEGIN
+
+
+std::string 
+StringTools::toString( int value )
+{
+	OStringStream stream;
+	stream << value;
+	return stream.str();
+}
+
+
+std::string 
+StringTools::toString( double value )
+{
+	OStringStream stream;
+	stream << value;
+	return stream.str();
+}
+
+
+StringTools::Strings
+StringTools::split( const std::string &text, 
+		char separator )
+{
+	Strings splittedText;
+
+	std::string::const_iterator itStart = text.begin();
+	while ( !text.empty() )
+	{
+		std::string::const_iterator itSeparator = std::find( itStart, 
+				text.end(), 
+				separator );
+		splittedText.push_back( text.substr( itStart - text.begin(),
+				itSeparator - itStart ) );
+		if ( itSeparator == text.end() )
+			break;
+		itStart = itSeparator +1;
+	}
+
+	return splittedText;
+}
+
+
+std::string 
+StringTools::wrap( const std::string &text,
+		int wrapColumn )
+{
+	const char lineBreak = '\n';
+	Strings lines = split( text, lineBreak );
+
+	std::string wrapped;
+	for ( Strings::const_iterator it = lines.begin(); it != lines.end(); ++it )
+	{
+		if ( it != lines.begin() )
+			wrapped += lineBreak;
+
+		const std::string &line = *it;
+		unsigned int index =0;
+		while ( index < line.length() )
+		{
+			std::string lineSlice( line.substr( index, wrapColumn ) );
+			wrapped += lineSlice;
+			index += wrapColumn;
+			if ( index < line.length() )
+				wrapped += lineBreak;
+		}
+	}
+
+	return wrapped;
+}
+
+
+CPPUNIT_NS_END
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/unchanged/Before.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/unchanged/Before.cpp
new file mode 100644
index 0000000..b60e3ef
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/indentation/unchanged/Before.cpp
@@ -0,0 +1,80 @@
+#include <cppunit/tools/StringTools.h>
+#include <cppunit/portability/Stream.h>
+#include <algorithm>
+
+
+CPPUNIT_NS_BEGIN
+
+
+std::string 
+StringTools::toString( int value )
+{
+	OStringStream stream;
+	stream << value;
+	return stream.str();
+}
+
+
+std::string 
+StringTools::toString( double value )
+{
+	OStringStream stream;
+	stream << value;
+	return stream.str();
+}
+
+
+StringTools::Strings
+StringTools::split( const std::string &text, 
+		char separator )
+{
+	Strings splittedText;
+
+	std::string::const_iterator itStart = text.begin();
+	while ( !text.empty() )
+	{
+		std::string::const_iterator itSeparator = std::find( itStart, 
+				text.end(), 
+				separator );
+		splittedText.push_back( text.substr( itStart - text.begin(),
+				itSeparator - itStart ) );
+		if ( itSeparator == text.end() )
+			break;
+		itStart = itSeparator +1;
+	}
+
+	return splittedText;
+}
+
+
+std::string 
+StringTools::wrap( const std::string &text,
+		int wrapColumn )
+{
+	const char lineBreak = '\n';
+	Strings lines = split( text, lineBreak );
+
+	std::string wrapped;
+	for ( Strings::const_iterator it = lines.begin(); it != lines.end(); ++it )
+	{
+		if ( it != lines.begin() )
+			wrapped += lineBreak;
+
+		const std::string &line = *it;
+		unsigned int index =0;
+		while ( index < line.length() )
+		{
+			std::string lineSlice( line.substr( index, wrapColumn ) );
+			wrapped += lineSlice;
+			index += wrapColumn;
+			if ( index < line.length() )
+				wrapped += lineBreak;
+		}
+	}
+
+	return wrapped;
+}
+
+
+CPPUNIT_NS_END
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/projectTemplates/testExtraPages/hello.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/projectTemplates/testExtraPages/hello.cpp
new file mode 100644
index 0000000..ae26788
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/projectTemplates/testExtraPages/hello.cpp
@@ -0,0 +1,10 @@
+#include <iostream>
+using namespace std;
+
+int main() {
+	cout << "$(projectName)" << endl;
+	cout << "$(exampleAttr1)" << endl;
+	cout << "$(exampleAttr2)" << endl;
+	cout << "$(exampleAttr3)" << endl;
+	return 0;
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/projectTemplates/testExtraPages/template.xml b/results/plugins/org.eclipse.cdt.ui.tests/resources/projectTemplates/testExtraPages/template.xml
new file mode 100644
index 0000000..c4fd5c0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/projectTemplates/testExtraPages/template.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="ProjTempl" version="1.0" supplier="Eclipse.org" revision="1.0" author="Symbian Software Ltd."
+		copyright="Copyright (c) 2007 Symbian Software Ltd. and others. 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"
+		id="TestProjectWithExtraPages" label="TestProjectWithExtraPages" description="TestProjectWithExtraPages_Desc"
+		 help="help.html">
+
+	<process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject">
+		<simple name="name" value="$(projectName)" /> 
+		<simple name="artifactExtension" value="exe" /> 
+		<simple name="isCProject" value="true" /> 
+	</process>
+
+	<process type="org.eclipse.cdt.core.CreateSourceFolder">
+		<simple name="projectName" value="$(projectName)"/>
+		<simple name="path" value="src"/>
+	</process>
+
+	<process type="org.eclipse.cdt.core.AddFiles">
+		<simple name="projectName" value="$(projectName)"/>
+		<complex-array name="files">
+			<element>
+				<simple name="source" value="hello.cpp"/>
+				<simple name="target" value="src/hello.cpp"/>
+				<simple name="replaceable" value="true"/>
+			</element>
+		</complex-array>
+	</process>
+</template>
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/projectTemplates/testWidgets/hello.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/projectTemplates/testWidgets/hello.cpp
new file mode 100644
index 0000000..eefb315
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/projectTemplates/testWidgets/hello.cpp
@@ -0,0 +1,24 @@
+#include <iostream>
+using namespace std;
+
+int main() {
+	cout << "$(projectName)" << endl;
+	cout << "$(TestWidget1)" << endl;
+	cout << "$(TestWidget2)" << endl;
+	cout << "$(TestWidget3)" << endl;
+	cout << "$(TestWidget4)" << endl;
+	cout << "$(TestWidget5)" << endl;
+	cout << "$(TestWidget6)" << endl;
+	cout << "$(TestWidget7)" << endl;
+	cout << "$(TestWidget8)" << endl;
+	cout << "$(TestWidget9)" << endl;
+	cout << "$(TestWidget10)" << endl;
+	cout << "$(TestWidget11)" << endl;
+	cout << "$(TestWidget12)" << endl;
+	cout << "$(TestWidget13)" << endl;
+	cout << "$(TestWidget14)" << endl;
+	cout << "$(TestWidget15)" << endl;
+	cout << "$(TestWidget16)" << endl;
+	return 0;
+}
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/projectTemplates/testWidgets/template.xml b/results/plugins/org.eclipse.cdt.ui.tests/resources/projectTemplates/testWidgets/template.xml
new file mode 100644
index 0000000..5abe9f8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/projectTemplates/testWidgets/template.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="ProjTempl" version="1.0" supplier="Eclipse.org" revision="1.0" author="Symbian Software Ltd."
+		copyright="Copyright (c) 2008 Symbian Software Ltd. and others. 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"
+		id="TestWidgets" label="TestWidgetsLabel" description="TestWidgetsDescription"
+		help="help.html">
+
+	<property-group id="basics" label="basicsLabel" description="basicsDescription" type="PAGES-ONLY" help="help.html">
+		<property id="TestWidget1" label="InputWidget1" description="InputWidget1Description" type="input" mandatory="true" pattern=".+"/>
+		<property id="TestWidget2" label="InputWidget2" description="InputWidget2Description" type="input" default="InputWidget2Default" mandatory="false"/>
+
+		<property id="TestWidget3" label="MultilineWidget1" description="MultilineWidget1Description" type="multiline" mandatory="true" pattern=".+"/>
+		<property id="TestWidget4" label="MultilineWidget2" description="MultilineWidget2Description" type="multiline" default="Multiline2Default" mandatory="false"/>
+		
+		<property id="TestWidget5" label="SelectWidget1" description="SelectWidget1Description" type="select" default="0" mandatory="false" persist="false">
+    		<item label="Include" name="1"/>
+    		<item label="Exclude" name="0"/>
+		</property>
+		
+		<property id="TestWidget6" label="SelectWidget2" description="SelectWidget2Description" type="select" default="" mandatory="true" persist="false">
+    		<item label="" value=""/>
+    		<item label="Include" value="1"/>
+    		<item label="Exclude" value="0"/>
+		</property>
+	</property-group>
+	
+	<property-group id="basics2" label="basicsLabel2" description="basicsDescription2" type="PAGES-ONLY" help="help.html">
+		<property id="TestWidget7" label="BooleanWidget1" description="BooleanWidget1Description" type="boolean" default="false"/>
+		<property id="TestWidget8" label="BooleanWidget2" description="BooleanWidget2Description" type="boolean" default="true"/>
+		
+		<property id="TestWidget9" label="StringListWidget1" description="StringListWidget1Description" type="stringlist" mandatory="true"/>
+		<property id="TestWidget10" label="StringListWidget2" description="StringListWidget2Description" type="stringlist" default="StringList2Default" mandatory="false"/>
+		
+		<property id="TestWidget11" label="SpecialListWidget1" description="SpecialListWidget1Description" type="speciallist" mandatory="true"/>
+		<property id="TestWidget12" label="SpecialListWidget2" description="SpecialListWidget2Description" type="speciallist" default="SpecialList2Default" mandatory="false"/>
+		
+		<property id="TestWidget13" label="BrowseWidget1" description="BrowseWidget1Description" type="browse" default="Browse1Default" mandatory="true" pattern=".+"/>
+		<property id="TestWidget14" label="BrowseWidget2" description="BrowseWidget2Description" type="browse" default="Browse2Default" mandatory="false"/>
+	</property-group>
+	
+	<property-group id="basics3" label="basicsLabel3" description="basicsDescription3" type="PAGES-ONLY" help="help.html">
+		<property id="TestWidget15" label="BrowseDirWidget1" description="BrowseDirWidget1Description" type="browsedir" default="BrowseDir1Default" mandatory="true" pattern=".+"/>
+		<property id="TestWidget16" label="BrowseDirWidget2" description="BrowseDirWidget2Description" type="browsedir" default="BrowseDir2Default" mandatory="false"/>
+	</property-group>
+
+	<process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject">
+		<simple name="name" value="$(projectName)" /> 
+		<simple name="artifactExtension" value="exe" /> 
+		<simple name="isCProject" value="true" /> 
+	</process>
+
+	<process type="org.eclipse.cdt.core.CreateSourceFolder">
+		<simple name="projectName" value="$(projectName)"/>
+		<simple name="path" value="src"/>
+	</process>
+
+	<process type="org.eclipse.cdt.core.AddFiles">
+		<simple name="projectName" value="$(projectName)"/>
+		<complex-array name="files">
+			<element>
+				<simple name="source" value="hello.cpp"/>
+				<simple name="target" value="src/hello.cpp"/>
+				<simple name="replaceable" value="true"/>
+			</element>
+		</complex-array>
+	</process>
+</template>
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/quickFix/RenameInFile.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/quickFix/RenameInFile.cpp
new file mode 100644
index 0000000..0c54f27
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/quickFix/RenameInFile.cpp
@@ -0,0 +1,131 @@
+class Base2 {
+	Base2();
+	void foo();
+};
+
+typedef int size_t;
+#define INT      int
+#define FUNCTION_MACRO(arg) globalFunc(arg)
+#define EMPTY_MACRO(arg) 
+
+enum Enumeration {
+	ONE, TWO, THREE
+};
+
+const int globalConstant = 0;
+int globalVariable = 0;
+static int globalStaticVariable = 0;
+
+void globalFunc(int a);
+static void globalStaticFunc() {
+    EMPTY_MACRO(n);
+	globalVariable = 1;
+    EMPTY_MACRO(1);
+    return 0;
+}
+
+class Base1 {
+	Base1();
+	~Base1();
+};
+
+Base1::~Base1() {}
+Base1::Base1() {}
+
+Base2::Base2() {}
+void Base2::foo() {}
+
+class ClassContainer : Base1, Base2 {
+public:
+	static int staticPubField;
+	const int constPubField;
+	const static int constStaticPubField;
+	size_t pubField;
+
+	static INT staticPubMethod(int arg) {
+		FUNCTION_MACRO(arg);
+		globalFunc(arg);
+		return globalStaticVariable;
+	}
+	int pubMethod();
+
+	typedef float pubTypedef;
+	pubTypedef tdField;
+private:
+	static INT staticPrivMethod();
+};
+
+template<class T1, class T2> class TemplateClass {
+	T1 tArg1;
+	T2 tArg2;
+	TemplateClass(T1 arg1, T2 arg2) {
+		tArg1 = arg1;
+		tArg2 = arg2;
+	}
+	void m(TemplateClass&);
+};
+
+template<class T1> class PartialInstantiatedClass : TemplateClass<T1, Base1> {
+};
+
+struct CppStruct {
+	CppStruct() {}
+	int structField;
+};
+
+union CppUnion {
+	int unionField;
+};
+
+typedef CppUnion TUnion;
+
+namespace ns {
+int namespaceVar = 0;
+int namespaceFunc() {
+	globalStaticFunc();
+	TUnion tu;
+	Enumeration e= TWO;
+	switch (e) {
+	case ONE: case THREE:
+		return 1;
+	}
+	size_t size;
+	return namespaceVar;
+}
+}
+
+INT ClassContainer::pubMethod() {
+	int localVar = 0;
+	ns::namespaceVar= 1;
+	return pubField + localVar;
+}
+
+using namespace ns;
+//using ns::namespaceVar;
+
+INT ClassContainer::staticPrivMethod() {
+	CppStruct* st= new CppStruct();
+	st->structField= namespaceVar;
+	CppUnion un;
+	un.unionField= 2;
+	staticPubMethod(staticPubField);
+label:
+	FUNCTION_MACRO(0);
+	if (un.unionField < st->structField) 
+		goto label;
+	return globalConstant;
+}
+
+template<int X>
+class ConstantTemplate {
+public:
+	size_t getNumber(size_t y) {
+		return X;
+	}
+};
+
+ConstantTemplate<5> c5;
+ConstantTemplate<5> c52;
+ConstantTemplate<4> c4;
+
+const int c= c5.getNumber(0);
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractConstant.rts b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractConstant.rts
new file mode 100644
index 0000000..5f14a0c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractConstant.rts
@@ -0,0 +1,472 @@
+//!ExtractConstantInt
+//#org.eclipse.cdt.ui.tests.refactoring.extractconstant.ExtractConstantRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	void bar();
+};
+
+#endif /*A_H_*/
+
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	void bar();
+    static const int theAnswer = 42;
+};
+
+#endif /*A_H_*/
+
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+	return /*$*/42/*$$*/; //Hallo
+}
+
+void A::bar()
+{
+	int a = 42;
+	int b = 42;
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+	return theAnswer; //Hallo
+}
+
+void A::bar()
+{
+	int a = theAnswer;
+	int b = theAnswer;
+}
+
+//!ExtractConstantInt 2
+//#org.eclipse.cdt.ui.tests.refactoring.extractconstant.ExtractConstantRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	void bar();
+};
+
+#endif /*A_H_*/
+
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	void bar();
+    static const int theAnswer = 42;
+};
+
+#endif /*A_H_*/
+
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+	//Hallo
+	return /*$*/42/*$$*/;
+}
+
+void A::bar()
+{
+	int a = 42;
+	int b = 42;
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+	//Hallo
+	return theAnswer;
+}
+
+void A::bar()
+{
+	int a = theAnswer;
+	int b = theAnswer;
+}
+
+//!ExtractConstantFloat
+//#org.eclipse.cdt.ui.tests.refactoring.extractconstant.ExtractConstantRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	float foo();
+	void bar();
+};
+
+#endif /*A_H_*/
+
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	float foo();
+	void bar();
+    static const float theAnswer = 42.0;
+};
+
+#endif /*A_H_*/
+
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+float A::foo()
+{
+	return /*$*/42.0/*$$*/;
+}
+
+void A::bar()
+{
+	float a = 42.0;
+	float b = 42.0;
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+float A::foo()
+{
+	return theAnswer;
+}
+
+void A::bar()
+{
+	float a = theAnswer;
+	float b = theAnswer;
+}
+
+//!ExtractConstantStaticInt
+//#org.eclipse.cdt.ui.tests.refactoring.extractconstant.ExtractConstantRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	static const int a = 42;
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	static const int a = 42;
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+	return 42;
+}
+
+int bar()
+{
+	return /*$*/42/*$$*/;
+}
+
+
+//=
+#include "A.h"
+
+namespace 
+{
+    const int theAnswer = 42;
+}
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+	return theAnswer;
+}
+
+int bar()
+{
+	return theAnswer;
+}
+
+
+//!replaceNumberProtected
+//#org.eclipse.cdt.ui.tests.refactoring.extractconstant.ExtractConstantRefactoringTest
+//@.config
+visibility=protected
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+protected:
+    static const int theAnswer = 42;
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+	return /*$*/42/*$$*/;
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+	return theAnswer;
+}
+
+//!replaceNumberPrivate
+//#org.eclipse.cdt.ui.tests.refactoring.extractconstant.ExtractConstantRefactoringTest
+//@.config
+visibility=private
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+private:
+    static const int theAnswer = 42;
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+	return /*$*/42/*$$*/;
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+	return theAnswer;
+}
+
+//!Bug 246062 [Refactoring] NPE extracting a constant from an inlined method
+//#org.eclipse.cdt.ui.tests.refactoring.extractconstant.ExtractConstantRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+class X {
+	void method() {
+		int a= /*$*/42/*$$*/;
+	}
+};
+
+//=
+class X {
+	void method() {
+		int a= theAnswer;
+    }
+
+public:
+    static const int theAnswer = 42;
+};
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractExpression.rts b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractExpression.rts
new file mode 100644
index 0000000..6598315
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractExpression.rts
@@ -0,0 +1,946 @@
+//!Extract boolean comparison from if-condition.
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=check
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    bool check();
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+    if(/*$*/5 == 3 + 2/*$$*/) {
+		//...
+    }
+}
+
+//=
+#include "test.h"
+
+bool Test::check()
+{
+    return 5 == 3 + 2;
+}
+
+void Test::test()
+{
+    if(check()) {
+		//...
+    }
+}
+
+//!Extract boolean comparison from if-condition with parameter.
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=check
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    bool check(int num);
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+    int num = 1;
+    if(/*$*/5 != 3 + num/*$$*/) {
+		//...
+    }
+}
+
+//=
+#include "test.h"
+
+bool Test::check(int num)
+{
+    return 5 != 3 + num;
+}
+
+void Test::test()
+{
+    int num = 1;
+    if(check(num)) {
+		//...
+    }
+}
+
+//!Extract binary expression that results in a function with the same return type (BasicType) as the LHS.
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=add
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    int add(int five, int six);
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+	int five = 5;
+	int six = 6;
+    int result = /*$*/five + six/*$$*/;
+}
+
+//=
+#include "test.h"
+
+int Test::add(int five, int six)
+{
+    return five + six;
+}
+
+void Test::test()
+{
+	int five = 5;
+	int six = 6;
+    int result = add(five, six);
+}
+
+//!Extract binary expression that results in a function with the same return type (ClassType) as the LHS
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=cat
+
+//@test.h
+struct helper {};
+
+class Test
+{
+  void test();
+};
+
+
+//=
+struct helper {};
+
+class Test
+{
+  void test();
+    helper cat(helper s1, helper s2);
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+	helper s1 = "a";
+	helper s2 = "b";
+    helper result = /*$*/s1 + s2/*$$*/;
+}
+
+//=
+#include "test.h"
+
+helper Test::cat(helper s1, helper s2)
+{
+    return s1 + s2;
+}
+
+void Test::test()
+{
+	helper s1 = "a";
+	helper s2 = "b";
+    helper result = cat(s1, s2);
+}
+
+//!Extract binary expression that results in a function with the same return type (Typedef) as the LHS
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=cat
+
+//@test.h
+struct helper {};
+typedef helper new_helper;
+
+class Test
+{
+  void test();
+};
+
+
+//=
+struct helper {};
+typedef helper new_helper;
+
+class Test
+{
+  void test();
+    new_helper cat(new_helper s1, new_helper s2);
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+	new_helper s1 = "a";
+	new_helper s2 = "b";
+    new_helper result = /*$*/s1 + s2/*$$*/;
+}
+
+//=
+#include "test.h"
+
+new_helper Test::cat(new_helper s1, new_helper s2)
+{
+    return s1 + s2;
+}
+
+void Test::test()
+{
+	new_helper s1 = "a";
+	new_helper s2 = "b";
+    new_helper result = cat(s1, s2);
+}
+
+//!Extract new-Expression
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=new_helper
+
+//@test.cpp
+
+struct helper {};
+
+int main(int argc, char** argv)
+{
+    helper* h = /*$*/new helper/*$$*/;
+	return 0;
+}
+//=
+
+struct helper {};
+
+helper *new_helper()
+{
+    return new helper;
+}
+
+int main(int argc, char** argv)
+{
+    helper* h = new_helper();
+	return 0;
+}
+//!Extract function call
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=join_with_world
+
+//@test.cpp
+class string {};
+
+string join(string s1, char* s2)
+{
+  return s1 + " " + s2;
+}
+
+int main()
+{
+  string hello = "Hello";
+  cout << /*$*/join(hello, "World")/*$$*/ << endl;
+}
+//=
+class string {};
+
+string join(string s1, char* s2)
+{
+  return s1 + " " + s2;
+}
+
+string join_with_world(string hello)
+{
+    return join(hello, "World");
+}
+
+int main()
+{
+  string hello = "Hello";
+  cout << join_with_world(hello) << endl;
+}
+//!Extract method call
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=value_from
+
+//@test.cpp
+struct other
+{
+  bool value() {}
+};
+
+class Klass
+{
+	void set(bool b){}
+	void test()
+	{
+	  other o;
+	  this->set(/*$*/o.value()/*$$*/);
+	}
+};
+
+//=
+struct other
+{
+  bool value() {}
+};
+
+class Klass
+{
+	void set(bool b){}
+
+    bool value_from(other o)
+    {
+        return o.value();
+    }
+
+    void test()
+    {
+        other o;
+        this->set(value_from(o));
+	}
+};
+
+//!Extract function call [we only have the declaration] that returns a pointer
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=has
+
+//@test.cpp
+class Cursor{};
+
+Cursor* contains(const Cursor& pos);
+
+int main() {
+	Cursor c;
+	contains(/*$*/contains(c)/*$$*/);
+}
+
+//=
+class Cursor{};
+
+Cursor* contains(const Cursor& pos);
+
+Cursor *has(Cursor c)
+{
+    return contains(c);
+}
+
+int main() {
+	Cursor c;
+	contains(has(c));
+}
+
+//!Extract function call [we have the definition] that returns a pointer
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=has
+
+//@test.cpp
+class Cursor{};
+
+Cursor* contains(const Cursor& pos)
+{
+	;
+}
+
+int main() {
+	Cursor c;
+	contains(/*$*/contains(c)/*$$*/);
+}
+
+//=
+class Cursor{};
+
+Cursor* contains(const Cursor& pos)
+{
+	;
+}
+
+Cursor *has(Cursor c)
+{
+    return contains(c);
+}
+
+int main() {
+	Cursor c;
+	contains(has(c));
+}
+
+//!Extract string constant
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=greeting
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    wchar_t greeting();
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+    char* hi = /*$*/"hello"/*$$*/;
+}
+
+//=
+#include "test.h"
+
+wchar_t Test::greeting()
+{
+    return "hello";
+}
+
+void Test::test()
+{
+    char* hi = greeting();
+}
+
+//!Extract int constant
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=size
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    int size();
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+    int i = /*$*/42/*$$*/;
+}
+
+//=
+#include "test.h"
+
+int Test::size()
+{
+    return 42;
+}
+
+void Test::test()
+{
+    int i = size();
+}
+
+//!Extract float constant
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=certainty
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    float certainty();
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+    float f = /*$*/0.42/*$$*/;
+}
+
+//=
+#include "test.h"
+
+float Test::certainty()
+{
+    return 0.42;
+}
+
+void Test::test()
+{
+    float f = certainty();
+}
+
+//!Extract char constant
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=newline
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    char newline();
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+    char nl = /*$*/'\n'/*$$*/;
+}
+
+//=
+#include "test.h"
+
+char Test::newline()
+{
+    return '\n';
+}
+
+void Test::test()
+{
+    char nl = newline();
+}
+
+//!Extract boolean true constant
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=valid
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    bool valid();
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+    bool b = /*$*/true/*$$*/;
+}
+
+//=
+#include "test.h"
+
+bool Test::valid()
+{
+    return true;
+}
+
+void Test::test()
+{
+    bool b = valid();
+}
+
+//!Extract boolean false constant
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=invalid
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    bool invalid();
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+    bool b = /*$*/false/*$$*/;
+}
+
+//=
+#include "test.h"
+
+bool Test::invalid()
+{
+    return false;
+}
+
+void Test::test()
+{
+    bool b = invalid();
+}
+
+//!Extract string constant
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=greeting
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    wchar_t greeting();
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+    char* hi = /*$*/"hello"/*$$*/;
+}
+
+//=
+#include "test.h"
+
+wchar_t Test::greeting()
+{
+    return "hello";
+}
+
+void Test::test()
+{
+    char* hi = greeting();
+}
+
+//!Extract int constant
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=size
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    int size();
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+    int i = /*$*/42/*$$*/;
+}
+
+//=
+#include "test.h"
+
+int Test::size()
+{
+    return 42;
+}
+
+void Test::test()
+{
+    int i = size();
+}
+
+//!Extract float constant
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=certainty
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    float certainty();
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+    float f = /*$*/0.42/*$$*/;
+}
+
+//=
+#include "test.h"
+
+float Test::certainty()
+{
+    return 0.42;
+}
+
+void Test::test()
+{
+    float f = certainty();
+}
+
+//!Extract char constant
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=newline
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    char newline();
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+    char nl = /*$*/'\n'/*$$*/;
+}
+
+//=
+#include "test.h"
+
+char Test::newline()
+{
+    return '\n';
+}
+
+void Test::test()
+{
+    char nl = newline();
+}
+
+//!Extract boolean true constant
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=valid
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    bool valid();
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+    bool b = /*$*/true/*$$*/;
+}
+
+//=
+#include "test.h"
+
+bool Test::valid()
+{
+    return true;
+}
+
+void Test::test()
+{
+    bool b = valid();
+}
+
+//!Extract boolean false constant
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+
+//@.config
+filename=test.cpp
+methodname=invalid
+
+//@test.h
+class Test
+{
+  void test();
+};
+
+
+//=
+class Test
+{
+  void test();
+    bool invalid();
+};
+
+
+//@test.cpp
+#include "test.h"
+
+void Test::test()
+{
+    bool b = /*$*/false/*$$*/;
+}
+
+//=
+#include "test.h"
+
+bool Test::invalid()
+{
+    return false;
+}
+
+void Test::test()
+{
+    bool b = invalid();
+}
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractFunctionTemplates.rts b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractFunctionTemplates.rts
new file mode 100644
index 0000000..06a356f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractFunctionTemplates.rts
@@ -0,0 +1,97 @@
+//!Extract template function 
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.cpp
+void test(){
+}
+template <typename T>
+int tempFunct(){
+	
+	T i;
+	i = 0;
+	/*$*/i++;
+	i+=3;/*$$*/
+	
+	return 0;
+}
+
+//=
+void test(){
+}
+template<typename T> void exp(T i)
+{
+    i++;
+    i += 3;
+}
+
+template <typename T>
+int tempFunct(){
+	
+	T i;
+	i = 0;
+    exp(i);
+	
+	return 0;
+}
+
+//!Extract template function with template parameter Bug #12
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.cpp
+void test(){
+}
+template <typename T>
+int tempFunct(T p){
+
+	/*$*/++p;
+	p + 4;/*$$*/
+	return 0;
+}
+
+//=
+void test(){
+}
+template<typename T> void exp(T p)
+{
+    ++p;
+    p + 4;
+}
+
+template <typename T>
+int tempFunct(T p){
+    exp(p);
+	return 0;
+}
+
+//!Extract template function with template type declaration Bug #11
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.cpp
+void test(){
+}
+template <typename T>
+int tempFunct(){
+
+	/*$*/T p;
+	p = 0;
+	p + 4;/*$$*/
+	p + 2;
+	return 0;
+}
+
+//=
+void test(){
+}
+template<typename T> T exp()
+{
+    T p;
+    p = 0;
+    p + 4;
+    return p;
+}
+
+template <typename T>
+int tempFunct(){
+
+	T p = exp();
+	p + 2;
+	return 0;
+}
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractLocalVariable.rts b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractLocalVariable.rts
new file mode 100644
index 0000000..f3a96d6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractLocalVariable.rts
@@ -0,0 +1,330 @@
+//!ExtractLocalVariableRefactoringTest int
+//#org.eclipse.cdt.ui.tests.refactoring.extractlocalvariable.ExtractLocalVariableRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+  A();
+  virtual ~A();
+  int foo();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+  A();
+  virtual ~A();
+  int foo();
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+  return /*$*/42/*$$*/;
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+    int i = 42;
+    return i;
+}
+
+//!ExtractLocalVariableRefactoringTest char
+//#org.eclipse.cdt.ui.tests.refactoring.extractlocalvariable.ExtractLocalVariableRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+  A();
+  virtual ~A();
+  int foo();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+  A();
+  virtual ~A();
+  int foo();
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+  return /*$*/'c'/*$$*/;
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+    char temp = 'c';
+    return temp;
+}
+
+//!ExtractLocalVariableRefactoringTest float
+//#org.eclipse.cdt.ui.tests.refactoring.extractlocalvariable.ExtractLocalVariableRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+  A();
+  virtual ~A();
+  float foo();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+  A();
+  virtual ~A();
+  float foo();
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+float A::foo()
+{
+  return /*$*/42.0/*$$*/;
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+float A::foo()
+{
+    float f = 42.0;
+    return f;
+}
+
+//!ExtractLocalVariableRefactoringTest parentheses
+//#org.eclipse.cdt.ui.tests.refactoring.extractlocalvariable.ExtractLocalVariableRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+  A();
+  virtual ~A();
+  int foo();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+  A();
+  virtual ~A();
+  int foo();
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+  return /*$*/(42)/*$$*/;
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+    int i = 42;
+    return i;
+}
+
+//!ExtractLocalVariableRefactoringTest proposed name in scope
+//#org.eclipse.cdt.ui.tests.refactoring.extractlocalvariable.ExtractLocalVariableRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+  A();
+  virtual ~A();
+  int foo();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+  A();
+  virtual ~A();
+  int foo();
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+  int x = 3;
+  return /*$*/(x + 2)/*$$*/ * 15;
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+  int x = 3;
+    int i = x + 2;
+    return i * 15;
+}
+
+//!Bug #277065 extract local variable fails to extract from for loop
+//#org.eclipse.cdt.ui.tests.refactoring.extractlocalvariable.ExtractLocalVariableRefactoringTest
+//@A.cpp
+void foo(){
+	for(int n = /*$*/5 + 2/*$$*/; n < 10; ++n);
+}
+
+//=
+void foo(){
+    int i = 5 + 2;
+    for(int n = i; n < 10; ++n);
+}
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractMethod.rts b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractMethod.rts
new file mode 100644
index 0000000..14e12ac
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractMethod.rts
@@ -0,0 +1,2808 @@
+//!ExtractFunctionRefactoringTest variable defined in scope
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+    int exp();
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	/*$*/int i = 2;
+	++i;
+	help();/*$$*/
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::exp()
+{
+    int i = 2;
+    ++i;
+    help();
+    return i;
+}
+
+int A::foo()
+{
+	int i = exp();
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//!ExtractFunctionRefactoringTest
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+    void exp(int & i);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int i = 2;
+	//comment
+	/*$*/++i;
+	help();/*$$*/
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::exp(int & i)
+{
+    //comment
+    ++i;
+    help();
+}
+
+int A::foo()
+{
+	int i = 2;
+    exp(i);
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//@.config
+filename=A.cpp
+methodname=exp
+replaceduplicates=false
+returnvalue=false
+returnparameterindex=0
+
+//!Extract Function first extracted statement with leading comment
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@main.cpp
+int main(){
+	
+	int i;
+	// Comment
+	/*$*/i= 7;/*$$*/
+	return i;
+}
+
+//=
+void exp(int & i)
+{
+    // Comment
+    i = 7;
+}
+
+int main(){
+	
+	int i;
+    exp(i);
+	return i;
+}
+
+//@.config
+filename=main.cpp
+methodname=exp
+replaceduplicates=false
+returnvalue=false
+returnparameterindex=0
+
+//!Extract Function last extracted statement with trailling comment
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@main.cpp
+int main(){
+	
+	int i;
+	/*$*/i= 7;/*$$*/ // Comment
+	return i;
+}
+
+//=
+void exp(int & i)
+{
+    i = 7; // Comment
+}
+
+int main(){
+	
+	int i;
+    exp(i);
+    return i;
+}
+
+//@.config
+filename=main.cpp
+methodname=exp
+replaceduplicates=false
+returnvalue=false
+returnparameterindex=0
+
+//!ExtractFunctionRefactoringTest with two variable defined in scope
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+fatalerror=true
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+int A::foo()
+{
+	/*$*/int o = 1;
+	int i = 2;
+	++i;
+	o++;
+	help();/*$$*/
+	o++;
+	return i;
+}int A::help()
+{
+	return 42;
+}	
+
+//!ExtractFunctionRefactoringTest with named typed field
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include "B.h"
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	void foo();
+	B b;
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include "B.h"
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	void foo();
+	B b;
+	
+private:
+	int help();
+    void exp();
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::foo()
+{
+	/*$*/b = new B();
+	help();/*$$*/
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::exp()
+{
+    b = new B();
+    help();
+}
+
+void A::foo()
+{
+    exp();
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//@B.h
+#ifndef B_H_
+#define B_H_
+
+class B
+{
+public:
+	B();
+	virtual ~B();
+};
+
+#endif /*B_H_*/
+
+//!ExtractFunctionRefactoringTest with named typed variable defined in scope
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include "B.h"
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	void foo();
+	B b;
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include "B.h"
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	void foo();
+	B b;
+	
+private:
+	int help();
+    void exp();
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::foo()
+{
+	/*$*/b = new B();
+	help();/*$$*/
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::exp()
+{
+    b = new B();
+    help();
+}
+
+void A::foo()
+{
+    exp();
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//@B.h
+#ifndef B_H_
+#define B_H_
+
+class B
+{
+public:
+	B();
+	virtual ~B();
+};
+
+#endif /*B_H_*/
+
+//!ExtractFunctionRefactoringTest with ObjectStyleMacro
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+    void exp(int & i);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+#define ZWO 2
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int i = 2;
+	/*$*/++i;
+	i += ZWO;
+	help();/*$$*/
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+#define ZWO 2
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::exp(int & i)
+{
+    ++i;
+    i += ZWO;
+    help();
+}
+
+int A::foo()
+{
+	int i = 2;
+    exp(i);
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//!ExtractFunctionRefactoringTest with FunctionStyleMacro
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+    void exp(int & i);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+#define ADD(a,b) a + b + 2
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int i = 2;
+	/*$*/++i;
+	i = ADD(i, 42);
+	help();/*$$*/
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+#define ADD(a,b) a + b + 2
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::exp(int & i)
+{
+    ++i;
+    i = ADD(i, 42);
+    help();
+}
+
+int A::foo()
+{
+	int i = 2;
+    exp(i);
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//!ExtractMethod with Pointer
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+    void exp(int *& i);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int* i = new int(2);
+	/*$*/++*i;
+	help();/*$$*/
+	return *i;
+}
+
+int A::help()
+{
+	return 42;
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::exp(int *& i)
+{
+    ++*i;
+    help();
+}
+
+int A::foo()
+{
+	int* i = new int(2);
+    exp(i);
+	return *i;
+}
+
+int A::help()
+{
+	return 42;
+}
+
+//!ExtractMethod with Pointer and Comment at the end
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+    void exp(int *& i);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int* i = new int(2);
+	/*$*/++*i;
+	help();
+	//A end-comment/*$$*/
+	return *i;
+}
+
+int A::help()
+{
+	return 42;
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::exp(int *& i)
+{
+    ++*i;
+    help();
+}
+
+int A::foo()
+{
+	int* i = new int(2);
+    exp(i);
+	//A end-comment
+	return *i;
+}
+
+int A::help()
+{
+	return 42;
+}
+
+//!ExtractMethod with Pointer and Comment
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+    void exp(int *& i);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	//A beautiful comment
+	int* i = new int(2);
+	/*$*/++*i;
+	help();/*$$*/
+	return *i;
+}
+
+int A::help()
+{
+	return 42;
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::exp(int *& i)
+{
+    ++*i;
+    help();
+}
+
+int A::foo()
+{
+	//A beautiful comment
+	int* i = new int(2);
+    exp(i);
+	return *i;
+}
+
+int A::help()
+{
+	return 42;
+}
+
+//!ExtractFunctionRefactoringTest with Return Value
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+replaceduplicates=true
+returnvalue=true
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+    int exp(int i);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int i = 2;
+	/*$*/++i;
+	help();/*$$*/
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::exp(int i)
+{
+    ++i;
+    help();
+    return i;
+}
+
+int A::foo()
+{
+	int i = 2;
+    i = exp(i);
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//!ExtractFunctionRefactoringTest with Return Value and Ref Parameter
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+replaceduplicates=true
+returnvalue=true
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+    int exp(int i, int & b);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int i = 2;
+	int b = i;
+	/*$*/++i;
+	i = i + b;
+	help();/*$$*/
+	++b;
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::exp(int i, int & b)
+{
+    ++i;
+    i = i + b;
+    help();
+    return i;
+}
+
+int A::foo()
+{
+	int i = 2;
+	int b = i;
+    i = exp(i, b);
+	++b;
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//!ExtractFunctionRefactoringTest with Return Value and Ref Parameter and some more not used aferwards
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+replaceduplicates=true
+returnvalue=true
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+    int exp(int i, B *b, int y, float & x);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int i = 2;
+	float x = i;
+	B* b = new B();
+	int y = x + i;
+	/*$*/++i;
+	b->hello(y);
+	i = i + x;
+	help();/*$$*/
+	++x;
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::exp(int i, B *b, int y, float & x)
+{
+    ++i;
+    b->hello(y);
+    i = i + x;
+    help();
+    return i;
+}
+
+int A::foo()
+{
+	int i = 2;
+	float x = i;
+	B* b = new B();
+	int y = x + i;
+    i = exp(i, b, y, x);
+	++x;
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//!ExtractFunctionRefactoringTest with Return Value take the second and Ref Parameter and some more not used aferwards
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+returnparameterindex=1
+returnvalue=true
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include "B.h"
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include "B.h"
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+    float exp(int & i, B *b, int y, float x);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int i = 2;
+	float x = i;
+	B* b = new B();
+	int y = x + i;
+	/*$*/++i;
+	b->hello(y);
+	i = i + x;
+	help();/*$$*/
+	++x;
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+float A::exp(int & i, B *b, int y, float x)
+{
+    ++i;
+    b->hello(y);
+    i = i + x;
+    help();
+    return x;
+}
+
+int A::foo()
+{
+	int i = 2;
+	float x = i;
+	B* b = new B();
+	int y = x + i;
+    x = exp(i, b, y, x);
+	++x;
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//@B.h
+#ifndef B_H_
+#define B_H_
+
+class B
+{
+public:
+	B();
+	virtual ~B();
+	void hello(float y);
+};
+
+#endif /*B_H_*/
+
+//!ExtractFunctionRefactoringTest with Return Value and a lot Ref Parameter
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+replaceduplicates=true
+returnvalue=true
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include "B.h"
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include "B.h"
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+    int exp(int i, B *& b, int & y, float & x);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int i = 2;
+	float x = i;
+	B* b = new B();
+	int y = x + i;
+	/*$*/++i;
+	b->hello(y);
+	i = i + x;
+	help();/*$$*/
+	b->hello(y);
+	++x;
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::exp(int i, B *& b, int & y, float & x)
+{
+    ++i;
+    b->hello(y);
+    i = i + x;
+    help();
+    return i;
+}
+
+int A::foo()
+{
+	int i = 2;
+	float x = i;
+	B* b = new B();
+	int y = x + i;
+    i = exp(i, b, y, x);
+	b->hello(y);
+	++x;
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//@B.h
+#ifndef B_H_
+#define B_H_
+
+class B
+{
+public:
+	B();
+	virtual ~B();
+	void hello(float y);
+};
+
+#endif /*B_H_*/
+
+//!ExtractFunctionRefactoringTest with Return Value take the second and Ref Parameter
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+returnparameterindex=1
+returnvalue=true
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include "B.h"
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include "B.h"
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+    B *exp(int & i, B *b, int & y, float & x);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int i = 2;
+	float x = i;
+	B* b = new B();
+	int y = x + i;
+	/*$*/++i;
+	b->hello(y);
+	i = i + x;
+	help();/*$$*/
+	b->hello(y);
+	++x;
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+B *A::exp(int & i, B *b, int & y, float & x)
+{
+    ++i;
+    b->hello(y);
+    i = i + x;
+    help();
+    return b;
+}
+
+int A::foo()
+{
+	int i = 2;
+	float x = i;
+	B* b = new B();
+	int y = x + i;
+    b = exp(i, b, y, x);
+	b->hello(y);
+	++x;
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//@B.h
+#ifndef B_H_
+#define B_H_
+
+class B
+{
+public:
+	B();
+	virtual ~B();
+	void hello(float y);
+};
+
+#endif /*B_H_*/
+
+//!ExtractFunctionRefactoringTest protected visibility
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+protected:
+    void exp(int & i);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int i = 2;
+	/*$*/++i;
+	help();/*$$*/
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::exp(int & i)
+{
+    ++i;
+    help();
+}
+
+int A::foo()
+{
+	int i = 2;
+    exp(i);
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//@.config
+filename=A.cpp
+methodname=exp
+replaceduplicates=false
+returnvalue=false
+returnparameterindex=0
+visibility=protected
+
+//!ExtractFunctionRefactoringTest public visibility
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+    void exp(int & i);
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int i = 2;
+	/*$*/++i;
+	help();/*$$*/
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::exp(int & i)
+{
+    ++i;
+    help();
+}
+
+int A::foo()
+{
+	int i = 2;
+    exp(i);
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//@.config
+filename=A.cpp
+methodname=exp
+replaceduplicates=false
+returnvalue=false
+returnparameterindex=0
+visibility=public
+
+//!Bug 288268: c-refactoring creates c++-parameters
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@main.c
+int main()
+{
+    int a,b;
+    /*$*/a = b*2;/*$$*/
+    return a;
+}
+
+//=
+void test(int *a, int b)
+{
+    a = b * 2;
+}
+
+int main()
+{
+    int a,b;
+    test(a, b);
+    return a;
+}
+
+//@.config
+filename=main.c
+methodname=test
+replaceduplicates=false
+returnvalue=false
+//!ExtractFunctionRefactoringTest const Method Bug # 46
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo() const;
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo() const;
+	
+private:
+	int help();
+    void exp(int & i) const;
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo() const
+{
+	int i = 2;
+	/*$*/++i;
+	help();/*$$*/
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::exp(int & i) const
+{
+    ++i;
+    help();
+}
+
+int A::foo() const
+{
+	int i = 2;
+    exp(i);
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//@.config
+filename=A.cpp
+methodname=exp
+replaceduplicates=false
+returnvalue=false
+returnparameterindex=0
+
+//!don't return variables that aren't used 
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=main.h
+methodname=loop
+//@main.h
+
+void method()
+{
+	/*$*/for (int var = 0; var < 100; ++var) {
+		if(var < 50)
+			continue;
+	}/*$$*/
+}
+//=
+
+void loop()
+{
+    for(int var = 0;var < 100;++var){
+        if(var < 50)
+            continue;
+
+    }
+}
+
+void method()
+{
+    loop();
+}
+//!don't extract code that contains 'return'
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=main.h
+fatalerror=true
+//@main.h
+
+void method()
+{
+	/*$*/if(true)
+		return;/*$$*/
+	//unreachable
+}
+//!test if we don't allow to extract 'continue' Bug #53
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+fatalerror=true
+filename=A.h
+//@A.h
+
+void function()
+{
+	for (int var = 0; var < 100; ++var) {
+		/*$*/if(var < 50)
+			continue;/*$$*/
+	}
+}
+
+//! Bug #124 Extract Function with a Macro call in selected code "forgets" the macro
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=Test.cpp
+methodname=runTest
+//@Test.cpp
+#define ASSERTM(msg,cond) if (!(cond)) throw cute::test_failure((msg),__FILE__,__LINE__)
+#define ASSERT(cond) ASSERTM(#cond, cond)
+
+void testFuerRainer(){
+        int i=int();
+        /*$*/++i;
+        //Leading Comment
+        ASSERT (i);
+        //Trailling Comment
+        --i;/*$$*/
+}
+
+//=
+#define ASSERTM(msg,cond) if (!(cond)) throw cute::test_failure((msg),__FILE__,__LINE__)
+#define ASSERT(cond) ASSERTM(#cond, cond)
+
+void runTest(int i)
+{
+    ++i;
+    //Leading Comment
+    ASSERT (i);
+    //Trailling Comment
+    --i;
+}
+
+void testFuerRainer(){
+        int i=int();
+    runTest(i);
+}
+
+//! Bug #124 with comments Extract Function with a Macro call in selected code "forgets" the macro
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=Test.cpp
+methodname=runTest
+//@Test.cpp
+#define ASSERTM(msg,cond) if (!(cond)) throw cute::test_failure((msg),__FILE__,__LINE__)
+#define ASSERT(cond) ASSERTM(#cond, cond)
+
+void testFuerRainer(){
+        int i=int();
+        /*$*/++i;
+        ASSERT (i);
+        --i;/*$$*/
+}
+
+//=
+#define ASSERTM(msg,cond) if (!(cond)) throw cute::test_failure((msg),__FILE__,__LINE__)
+#define ASSERT(cond) ASSERTM(#cond, cond)
+
+void runTest(int i)
+{
+    ++i;
+    ASSERT (i);
+    --i;
+}
+
+void testFuerRainer(){
+        int i=int();
+    runTest(i);
+}
+
+//! Bug #137 String Array problem in Extract Function
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=Test.cpp
+methodname=runTest
+//@Test.cpp
+#include <string>
+
+using namespace std;
+
+int const INITIAL_CAPACITY = 10;
+
+int main(){
+	int m_capacity;
+	/*$*/m_capacity += INITIAL_CAPACITY;
+	string* newElements = new string[m_capacity];/*$$*/
+	newElements[0] = "s";
+}
+
+//=
+#include <string>
+
+using namespace std;
+
+int const INITIAL_CAPACITY = 10;
+
+string *runTest(int m_capacity)
+{
+    m_capacity += INITIAL_CAPACITY;
+    string *newElements = new string[m_capacity];
+    return newElements;
+}
+
+int main(){
+	int m_capacity;
+    string *newElements = runTest(m_capacity);
+	newElements[0] = "s";
+}
+
+//!Bug 239059: Double & in signature of extracted functions
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+returnvalue=false
+returnparameterindex=0
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo(int& a);
+
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo(int& a);
+private:
+    void exp(int & a, int b, int c);
+
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo(int& a)
+{
+	int b = 7;
+	int c = 8;
+	/*$*/a = b + c;/*$$*/
+	return a;
+}
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::exp(int & a, int b, int c)
+{
+    a = b + c;
+}
+
+int A::foo(int& a)
+{
+	int b = 7;
+	int c = 8;
+    exp(a, b, c);
+	return a;
+}
+//!Bug 241717: Typdef causes void as return type
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=Test.cpp
+//@Test.h
+#ifndef TEST_H_
+#define TEST_H_
+
+class RetValueType{
+
+
+};
+
+typedef RetValueType RetType;
+
+class Test {
+public:
+	Test();
+	virtual ~Test();
+private:
+	void test();
+};
+
+#endif /* TEST_H_ */
+//=
+#ifndef TEST_H_
+#define TEST_H_
+
+class RetValueType{
+
+
+};
+
+typedef RetValueType RetType;
+
+class Test {
+public:
+	Test();
+	virtual ~Test();
+private:
+	void test();
+    RetType exp();
+};
+
+#endif /* TEST_H_ */
+//@Test.cpp
+#include "Test.h"
+
+Test::Test() {
+
+}
+
+Test::~Test() {
+}
+
+void Test::test()
+{
+	RetType v = /*$*/RetType()/*$$*/;
+}
+
+//=
+#include "Test.h"
+
+Test::Test() {
+
+}
+
+Test::~Test() {
+}
+
+RetType Test::exp()
+{
+    return RetType();
+}
+
+void Test::test()
+{
+	RetType v = exp();
+}
+
+//!Bug 248238: Extract Method Produces Wrong Return Type Or Just Fails Classtype
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=Test.cpp
+methodname=startTag
+//@testString.h
+
+namespace test{
+
+	class string{
+	public:
+
+		friend string operator+(const string& lhs, const string& rhs)
+		{
+		        return rhs;
+		}
+
+
+		string operator+(const string& rhs){return rhs;}
+		string(char* cp){}
+		string(){};
+
+	};
+}
+
+//@Test.cpp
+#include "testString.h"
+
+test::string toXML() {
+	test::string name;
+	name = "hello";
+	return /*$*/"<" + name + ">"/*$$*/ + "</" + name + ">";
+}
+
+int main() {
+	return 0;
+}
+
+//=
+#include "testString.h"
+
+test::string startTag(test::string & name)
+{
+    return "<" + name + ">";
+}
+
+test::string toXML() {
+	test::string name;
+	name = "hello";
+	return startTag(name) + "</" + name + ">";
+}
+
+int main() {
+	return 0;
+}
+
+//!Bug 248238: Extract Method Produces Wrong Return Type Or Just Fails Typedef
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=Test.cpp
+methodname=startTag
+//@testString.h
+
+namespace test{
+
+class string2{
+	public:
+
+		friend string2 operator+(const string2& lhs, const string2& rhs)
+		{
+		        return rhs;
+		}
+
+
+		string2 operator+(const string2& rhs){return rhs;}
+		string2(char* cp){}
+		string2(){};
+
+	};
+
+	typedef string2 string;
+}
+
+//@Test.cpp
+#include "testString.h"
+
+test::string toXML() {
+	test::string name;
+	name = "hello";
+	return /*$*/"<" + name + ">"/*$$*/ + "</" + name + ">";
+}
+
+int main() {
+	return 0;
+}
+
+//=
+#include "testString.h"
+
+test::string startTag(test::string & name)
+{
+    return "<" + name + ">";
+}
+
+test::string toXML() {
+	test::string name;
+	name = "hello";
+	return startTag(name) + "</" + name + ">";
+}
+
+int main() {
+	return 0;
+}
+
+//!Bug 248622: Extract function fails to extract several expressions; Selection at the end
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=Test.cpp
+methodname=endTag
+//@testString.h
+
+namespace test{
+
+	class string{
+	public:
+
+		friend string operator+(const string& lhs, const string& rhs)
+		{
+		        return rhs;
+		}
+
+
+		string operator+(const string& rhs){return rhs;}
+		string(char* cp){}
+		string(){};
+
+	};
+}
+
+//@Test.cpp
+#include "testString.h"
+
+test::string toXML() {
+	test::string name;
+	name = "hello";
+	return "<" + name + ">" + /*$*/"</" + name + ">"/*$$*/;
+}
+
+int main() {
+	return 0;
+}
+
+//=
+#include "testString.h"
+
+wchar_t endTag(test::string name)
+{
+    return "</" + name + ">";
+}
+
+test::string toXML() {
+	test::string name;
+	name = "hello";
+	return "<" + name + ">" + endTag(name);
+}
+
+int main() {
+	return 0;
+}
+
+//!Bug 248622: Extract function fails to extract several expressions; Selection in the middle
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=Test.cpp
+methodname=exp
+//@testString.h
+
+namespace test{
+
+	class string{
+	public:
+
+		friend string operator+(const string& lhs, const string& rhs)
+		{
+		        return rhs;
+		}
+
+
+		string operator+(const string& rhs){return rhs;}
+		string(char* cp){}
+		string(){};
+
+	};
+}
+
+//@Test.cpp
+#include "testString.h"
+
+test::string toXML() {
+	test::string name;
+	name = "hello";
+	return "<" + name + /*$*/">" + "</"/*$$*/ + name + ">";
+}
+
+int main() {
+	return 0;
+}
+
+//=
+#include "testString.h"
+
+wchar_t exp()
+{
+    return ">" + "</";
+}
+
+test::string toXML() {
+	test::string name;
+	name = "hello";
+	return "<" + name + exp() + name + ">";
+}
+
+int main() {
+	return 0;
+}
+
+//!Bug 248622: Extract function fails to extract several expressions; Selection at the end
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=Test.cpp
+methodname=endTag
+//@testString.h
+
+namespace test{
+
+	class string{
+	public:
+
+		friend string operator+(const string& lhs, const string& rhs)
+		{
+		        return rhs;
+		}
+
+
+		string operator+(const string& rhs){return rhs;}
+		string(char* cp){}
+		string(){};
+
+	};
+}
+
+//@Test.cpp
+#include "testString.h"
+
+test::string toXML() {
+	test::string name;
+	name = "hello";
+	return "<" + name + ">" + /*$*/"</" + name + ">"/*$$*/;
+}
+
+int main() {
+	return 0;
+}
+
+//=
+#include "testString.h"
+
+wchar_t endTag(test::string name)
+{
+    return "</" + name + ">";
+}
+
+test::string toXML() {
+	test::string name;
+	name = "hello";
+	return "<" + name + ">" + endTag(name);
+}
+
+int main() {
+	return 0;
+}
+
+//!Bug 248622: Extract function fails to extract several expressions; Selection in the middle
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=Test.cpp
+methodname=exp
+//@testString.h
+
+namespace test{
+
+	class string{
+	public:
+
+		friend string operator+(const string& lhs, const string& rhs)
+		{
+		        return rhs;
+		}
+
+
+		string operator+(const string& rhs){return rhs;}
+		string(char* cp){}
+		string(){};
+
+	};
+}
+
+//@Test.cpp
+#include "testString.h"
+
+test::string toXML() {
+	test::string name;
+	name = "hello";
+	return "<" + name + /*$*/">" + "</"/*$$*/ + name + ">";
+}
+
+int main() {
+	return 0;
+}
+
+//=
+#include "testString.h"
+
+wchar_t exp()
+{
+    return ">" + "</";
+}
+
+test::string toXML() {
+	test::string name;
+	name = "hello";
+	return "<" + name + exp() + name + ">";
+}
+
+int main() {
+	return 0;
+}
+
+//!Bug#262000 refactoring "extract function" misinterprets artificial blocks
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=main.cpp
+methodname=exp
+//@main.cpp
+int main(int argc, char **argv) {
+
+	/*$*/int a = 0;
+	{
+		a++;
+	}/*$$*/
+
+}
+
+//=
+void exp()
+{
+    int a = 0;
+    {
+        a++;
+    }
+}
+
+int main(int argc, char **argv) {
+    exp();
+}
+
+//!Bug#264712 Refactor extract function deletes comments in header
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=test.cpp
+methodname=exp
+//@classhelper.h
+// Comment
+//
+// Comment
+// Comment
+#ifndef utils_classhelper_h_seen
+#define utils_classhelper_h_seen
+#define IMPORTANT_VALUE 1
+#endif
+
+//@test.h
+/*
+ * Copyright 2009
+ */
+#ifndef test_h_seen
+#define test_h_seen
+
+#include "classhelper.h"
+
+class Test
+{
+  public:
+
+	/**
+	 * Small class with some comments
+	 */
+	Test();
+
+    /** Calculate important things.
+     * @returns the result of the calculation
+     */
+    int calculateStuff();
+
+  private:
+	/**
+	 * Retain a value for something.
+	 */
+    int m_value;
+
+};
+
+#endif
+
+//=
+/*
+ * Copyright 2009
+ */
+#ifndef test_h_seen
+#define test_h_seen
+
+#include "classhelper.h"
+
+class Test
+{
+  public:
+
+	/**
+	 * Small class with some comments
+	 */
+	Test();
+
+    /** Calculate important things.
+     * @returns the result of the calculation
+     */
+    int calculateStuff();
+
+  private:
+	/**
+	 * Retain a value for something.
+	 */
+    int m_value;
+    int exp();
+
+};
+
+#endif
+
+//@test.cpp
+#include "test.h"
+
+Test::Test() {}
+
+int Test::calculateStuff() {
+	// refactor these lines to a new method:
+	/*$*/int result = m_value;
+	result += 10;
+	result *= 10;/*$$*/
+	return result;
+}
+
+//=
+#include "test.h"
+
+Test::Test() {}
+
+int Test::exp()
+{
+    // refactor these lines to a new method:
+    int result = m_value;
+    result += 10;
+    result *= 10;
+    return result;
+}
+
+int Test::calculateStuff() {
+    int result = exp();
+	return result;
+}
+
+//!Bug#281564 Extract Function fails when catching an unnamed exception
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=main.cpp
+methodname=exp
+//@main.cpp
+
+int myFunc() {
+return 5;
+}
+
+int main() {
+
+int a = 0;
+/*$*/try {
+        a = myFunc();
+    }
+    catch(const int & ){
+        a = 3;
+    }/*$$*/
+    return a;
+}
+
+//=
+
+int myFunc() {
+return 5;
+}
+
+void exp(int & a)
+{
+    try {
+        a = myFunc();
+    }
+    catch(const int & ){
+        a = 3;
+    }
+}
+
+int main() {
+
+int a = 0;
+    exp(a);
+    return a;
+}
+
+//!Bug#282004 Refactor->Extract Function in C Project (not C++) won't extract parameters
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+filename=main.c
+methodname=exp
+//@main.c
+int main()
+{
+    int a,b;
+    /*$*/b=a*2;/*$$*/
+    return a;
+}
+
+//=
+void exp(int b, int *a)
+{
+    b = a * 2;
+}
+
+int main()
+{
+    int a,b;
+    exp(b, a);
+    return a;
+}
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractMethodPreprocessor.rts b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractMethodPreprocessor.rts
new file mode 100644
index 0000000..572b4e2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ExtractMethodPreprocessor.rts
@@ -0,0 +1,295 @@
+//!ExtractFunctionRefactoringTest with FunctionStyleMacro2
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+	
+private:
+	int help();
+    void exp(int & ii);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+#define ADD(a,ab) a + ab + 2 + a
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int ii = 2;
+	/*$*/++ii;
+	ii = ADD(ii, 42);
+	help();/*$$*/
+	return ii;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+#define ADD(a,ab) a + ab + 2 + a
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+void A::exp(int & ii)
+{
+    ++ii;
+    ii = ADD(ii, 42);
+    help();
+}
+
+int A::foo()
+{
+	int ii = 2;
+    exp(ii);
+	return ii;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//!Extract Method return value assinged to Macrocall Bug
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+returnvalue=true
+returnparameterindex=1
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+private:
+    int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+private:
+    int help();
+    int exp(int & i, int b);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+#define ADD(b) b = b + 2
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int i = 2;
+	int b = 42;
+	/*$*/++i;
+    help();
+    ADD(b);/*$$*/
+	b += 2;
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+#define ADD(b) b = b + 2
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::exp(int & i, int b)
+{
+    ++i;
+    help();
+    ADD(b);
+    return b;
+}
+
+int A::foo()
+{
+	int i = 2;
+	int b = 42;
+    b = exp(i, b);
+	b += 2;
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//!Extract Method Methodlength with more than 1 Macrocall Bug
+//#org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionRefactoringTest
+//@.config
+returnvalue=true
+returnparameterindex=0
+replaceduplicates=true
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+private:
+    int help();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	virtual ~A();
+	int foo();
+private:
+    int help();
+    int exp(int bb);
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+#define ADD(b) b = b + 2
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::foo()
+{
+	int i = 2;
+	int bb = 42;
+	++i;
+    /*$*/ADD(bb);
+    ADD(bb);/*$$*/
+	bb += 2;
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
+//=
+#include "A.h"
+
+#define ADD(b) b = b + 2
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+int A::exp(int bb)
+{
+    ADD(bb);
+    ADD(bb);
+    return bb;
+}
+
+int A::foo()
+{
+	int i = 2;
+	int bb = 42;
+	++i;
+    bb = exp(bb);
+	bb += 2;
+	return i;
+}
+
+int A::help()
+{
+	return 42;
+}	
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/GenerateGettersAndSetters.rts b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/GenerateGettersAndSetters.rts
new file mode 100644
index 0000000..05b0461
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/GenerateGettersAndSetters.rts
@@ -0,0 +1,784 @@
+//!Generate Getters and Setters One Getter Selection
+//#org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTest
+//@.config
+filename=C.h
+getters=name
+//@C.cpp
+#include "C.h"
+
+int Person::SocSecNo(){
+	return socSecNo;
+}
+
+int main(int argc, char **argv) {
+	
+}
+
+//=
+//@C.h
+#ifndef C_H_
+#define C_H_
+
+class Person {
+
+private:
+
+  int systemId;
+
+protected:
+
+  char *name;
+
+public:
+
+  const int socSecNo;
+  
+  Person myFriend;
+
+
+  Person(int socSecNo); // contructor
+
+  ~Person(); // destructor
+
+
+	char*   Name();
+	
+	void    Print();
+	
+	int     /*$*/SocSecNo/*$$*/();
+	
+	int     GetUniqueId();
+	
+	int getSystemId(){
+		return systemId;
+	}
+	
+	void setSystemId(int systemId){
+		this->systemId = systemId;
+	}
+};
+
+int gooo = 1;
+
+#endif /*C_H_*/
+//=
+#ifndef C_H_
+#define C_H_
+
+class Person {
+
+private:
+
+  int systemId;
+
+protected:
+
+  char *name;
+
+public:
+
+  const int socSecNo;
+  
+  Person myFriend;
+
+
+  Person(int socSecNo); // contructor
+
+  ~Person(); // destructor
+
+
+	char*   Name();
+	
+	void    Print();
+	
+	int     SocSecNo();
+	
+	int     GetUniqueId();
+    char *getName() const
+    {
+        return name;
+    }
+
+    int getSystemId(){
+		return systemId;
+	}
+	
+	void setSystemId(int systemId){
+		this->systemId = systemId;
+	}
+};
+
+int gooo = 1;
+
+#endif /*C_H_*/
+//!Generate Getters and Setters One Getter Selection with Namespace
+//#org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTest
+//@.config
+filename=C.h
+getters=name
+//@C.cpp
+#include "C.h"
+
+int Person::SocSecNo(){
+	return socSecNo;
+}
+
+int main(int argc, char **argv) {
+	
+}
+
+//=
+//@C.h
+#ifndef C_H_
+#define C_H_
+
+namespace Personal {
+	class Person {
+	
+	private:
+	
+	  int systemId;
+	
+	protected:
+	
+	  char *name;
+	
+	public:
+	
+	  const int socSecNo;
+	  
+	  Person myFriend;
+	
+	
+	  Person(int socSecNo); // contructor
+	
+	  ~Person(); // destructor
+	
+	
+		char*   Name();
+		
+		void    Print();
+		
+		int     /*$*/SocSecNo/*$$*/();
+		
+		int     GetUniqueId();
+		
+		int getSystemId(){
+			return systemId;
+		}
+		
+		void setSystemId(int systemId){
+			this->systemId = systemId;
+		}
+	};
+}
+
+int gooo = 1;
+
+#endif /*C_H_*/
+
+//=
+#ifndef C_H_
+#define C_H_
+
+namespace Personal {
+	class Person {
+	
+	private:
+	
+	  int systemId;
+	
+	protected:
+	
+	  char *name;
+	
+	public:
+	
+	  const int socSecNo;
+	  
+	  Person myFriend;
+	
+	
+	  Person(int socSecNo); // contructor
+	
+	  ~Person(); // destructor
+	
+	
+		char*   Name();
+		
+		void    Print();
+		
+		int     SocSecNo();
+		
+		int     GetUniqueId();
+	    char *getName() const
+	    {
+	        return name;
+	    }
+
+	    int getSystemId(){
+			return systemId;
+		}
+		
+		void setSystemId(int systemId){
+			this->systemId = systemId;
+		}
+	};
+}
+
+int gooo = 1;
+
+#endif /*C_H_*/
+
+//!Generate Getters and Setters One Setter Selection
+//#org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTest
+//@.config
+filename=C.h
+setters=name
+//@C.cpp
+#include "C.h"
+
+int Person::SocSecNo(){
+	return socSecNo;
+}
+
+int main(int argc, char **argv) {
+	
+}
+
+//=
+//@C.h
+#ifndef C_H_
+#define C_H_
+
+class Person {
+
+private:
+
+  int systemId;
+
+protected:
+
+  char *name;
+
+public:
+
+  const int socSecNo;
+  
+  Person myFriend;
+
+
+  Person(int socSecNo); // contructor
+
+  ~Person(); // destructor
+
+
+	char*   Name();
+	
+	void    Print();
+	
+	int     /*$*/SocSecNo/*$$*/();
+	
+	int     GetUniqueId();
+	
+	int getSystemId(){
+		return systemId;
+	}
+	
+	void setSystemId(int systemId){
+		this->systemId = systemId;
+	}
+};
+
+
+int gooo = 1;
+
+#endif /*C_H_*/
+//=
+#ifndef C_H_
+#define C_H_
+
+class Person {
+
+private:
+
+  int systemId;
+
+protected:
+
+  char *name;
+
+public:
+
+  const int socSecNo;
+  
+  Person myFriend;
+
+
+  Person(int socSecNo); // contructor
+
+  ~Person(); // destructor
+
+
+	char*   Name();
+	
+	void    Print();
+	
+	int     SocSecNo();
+	
+	int     GetUniqueId();
+    void setName(char *name)
+    {
+        this->name = name;
+    }
+
+    int getSystemId(){
+		return systemId;
+	}
+	
+	void setSystemId(int systemId){
+		this->systemId = systemId;
+	}
+};
+
+
+int gooo = 1;
+
+#endif /*C_H_*/
+//!Generate Getters and Setters Getter and Setter Selection
+//#org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTest
+//@.config
+filename=C.h
+setters=name
+getters=name
+//@C.cpp
+#include "C.h"
+
+int Person::SocSecNo(){
+	return socSecNo;
+}
+
+int main(int argc, char **argv) {
+	
+}
+
+//=
+//@C.h
+#ifndef C_H_
+#define C_H_
+
+class Person {
+
+private:
+
+  int systemId;
+
+protected:
+
+  char *name;
+
+public:
+
+  const int socSecNo;
+  
+  Person myFriend;
+
+
+  Person(int socSecNo); // contructor
+
+  ~Person(); // destructor
+
+
+	char*   Name();
+	
+	void    Print();
+	
+	int     /*$*/SocSecNo/*$$*/();
+	
+	int     GetUniqueId();
+	
+	int getSystemId(){
+		return systemId;
+	}
+	
+	void setSystemId(int systemId){
+		this->systemId = systemId;
+	}
+};
+
+
+int gooo = 1;
+
+#endif /*C_H_*/
+//=
+#ifndef C_H_
+#define C_H_
+
+class Person {
+
+private:
+
+  int systemId;
+
+protected:
+
+  char *name;
+
+public:
+
+  const int socSecNo;
+  
+  Person myFriend;
+
+
+  Person(int socSecNo); // contructor
+
+  ~Person(); // destructor
+
+
+	char*   Name();
+	
+	void    Print();
+	
+	int     SocSecNo();
+	
+	int     GetUniqueId();
+    char *getName() const
+    {
+        return name;
+    }
+
+    void setName(char *name)
+    {
+        this->name = name;
+    }
+
+    int getSystemId(){
+		return systemId;
+	}
+	
+	void setSystemId(int systemId){
+		this->systemId = systemId;
+	}
+};
+
+
+int gooo = 1;
+
+#endif /*C_H_*/
+//!Generate Getters and Setters Multiple Selection
+//#org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTest
+//@.config
+filename=C.h
+getters=name,systemId
+setters=name,systemId
+//@C.cpp
+#include "C.h"
+
+int Person::SocSecNo(){
+	return socSecNo;
+}
+
+int main(int argc, char **argv) {
+	
+}
+
+//=
+//@C.h
+#ifndef C_H_
+#define C_H_
+
+class Person {
+
+private:
+
+  int systemId;
+
+protected:
+
+  char *name;
+
+public:
+
+  const int socSecNo;
+  
+  Person myFriend;
+
+
+  Person(int socSecNo); // contructor
+
+  ~Person(); // destructor
+
+
+	char*   Name();
+	
+	void    Print();
+	
+	int     /*$*/SocSecNo/*$$*/();
+	
+	int     GetUniqueId();
+
+};
+
+int gooo = 1;
+
+#endif /*C_H_*/
+
+//=
+#ifndef C_H_
+#define C_H_
+
+class Person {
+
+private:
+
+  int systemId;
+
+protected:
+
+  char *name;
+
+public:
+
+  const int socSecNo;
+  
+  Person myFriend;
+    char *getName() const
+    {
+        return name;
+    }
+
+    int getSystemId() const
+    {
+        return systemId;
+    }
+
+    void setName(char *name)
+    {
+        this->name = name;
+    }
+
+    void setSystemId(int systemId)
+    {
+        this->systemId = systemId;
+    }
+
+    Person(int socSecNo); // contructor
+
+  ~Person(); // destructor
+
+
+	char*   Name();
+	
+	void    Print();
+	
+	int     SocSecNo();
+	
+	int     GetUniqueId();
+
+};
+
+int gooo = 1;
+
+#endif /*C_H_*/
+
+//!Generate Getters and Setters Visibility order 1
+//#org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTest
+//@.config
+filename=GaS.h
+getters=i,isOk
+setters=i,isOk
+//@GaS.cpp
+#include "Getters.h"
+
+GaS::Getters() {
+}
+
+GaS::~Getters() {
+}
+
+//@GaS.h
+#ifndef GAS_H_
+#define GAS_H_
+
+class GaS {
+public:
+	GaS();
+	virtual ~GaS();
+	bool /*$*/isOk/*$$*/;
+	void methode2();
+
+private:
+	int i;
+};
+
+#endif
+
+//=
+#ifndef GAS_H_
+#define GAS_H_
+
+class GaS {
+public:
+	GaS();
+	virtual ~GaS();
+	bool isOk;
+	void methode2();
+    int getI() const
+    {
+        return i;
+    }
+
+    bool getIsOk() const
+    {
+        return isOk;
+    }
+
+    void setI(int i)
+    {
+        this->i = i;
+    }
+
+    void setIsOk(bool isOk)
+    {
+        this->isOk = isOk;
+    }
+
+private:
+	int i;
+};
+
+#endif
+
+//!Generate Getters and Setters no Methods
+//#org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTest
+//@.config
+filename=C.h
+getters=id
+setters=id
+//@C.h
+#ifndef C_H_
+#define C_H_
+
+class Person {
+private:
+  int /*$*/id/*$$*/;
+};
+
+#endif /*C_H_*/
+
+//=
+#ifndef C_H_
+#define C_H_
+
+class Person {
+private:
+  int id;
+public:
+    int getId() const
+    {
+        return id;
+    }
+
+    void setId(int id)
+    {
+        this->id = id;
+    }
+
+};
+
+#endif /*C_H_*/
+
+//!Generate Getters and Setters no Methods
+//#org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTest
+//@.config
+filename=C.h
+getters=i
+setters=i
+//@C.h
+/*
+ * test.h
+ */
+
+#ifndef TEST_H_
+#define TEST_H_
+
+//comment1
+class test
+{
+	int /*$*/i/*$$*/; //comment2
+	char* b;
+	//comment3
+};
+
+#endif /* TEST_H_ */
+
+//=
+/*
+ * test.h
+ */
+
+#ifndef TEST_H_
+#define TEST_H_
+
+//comment1
+class test
+{
+	int i; //comment2
+	char* b;
+public:
+    int getI() const
+    {
+        return i;
+    }
+
+    void setI(int i)
+    {
+        this->i = i;
+    }
+
+    //comment3
+};
+
+#endif /* TEST_H_ */
+
+//!Generate Getters and Setters no Fields
+//#org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTest
+//@.config
+filename=C.h
+fatalerror=true
+//@C.h
+/*
+ * test.h
+ */
+
+#ifndef TEST_H_
+#define TEST_H_
+
+//comment1
+class test
+{
+	void /*$*/test/*$$*/();
+	//comment3
+};
+
+#endif /* TEST_H_ */
+
+//=
+/*
+ * test.h
+ */
+
+#ifndef TEST_H_
+#define TEST_H_
+
+//comment1
+class test
+{
+	void test();
+	//comment3
+};
+
+#endif /* TEST_H_ */
+
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/HideMethod.rts b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/HideMethod.rts
new file mode 100644
index 0000000..7c97e8a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/HideMethod.rts
@@ -0,0 +1,1457 @@
+//!HideMethodSimple
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    /*$*/void method2();/*$$*/
+    std::string toString();
+private:
+	int i;
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    void method2();
+};
+
+#endif /*A_H_*/
+
+//!HideMethodLineComment
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    //Kommentar
+    /*$*/void method2();/*$$*/
+    std::string toString();
+private:
+    int i;
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    //Kommentar
+    void method2();
+};
+
+#endif /*A_H_*/
+
+//!HideMethodBlockComment
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    /*Kommentar*/
+    /*$*/void method2();/*$$*/
+    std::string toString();
+
+private:
+    int i;
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    /*Kommentar*/
+    void method2();
+};
+
+#endif /*A_H_*/
+
+//!HideMethodLineCommentBehind
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    /*$*/void method2();/*$$*///Kommentar
+    std::string toString();
+private:
+    int i;
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    void method2(); //Kommentar
+};
+
+#endif /*A_H_*/
+
+//!HideMethodBlockCommentBehind
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    /*$*/void method2();/*$$*//*Kommentar*/
+    std::string toString();
+private:
+    int i;
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    void method2(); /*Kommentar*/
+};
+
+#endif /*A_H_*/
+
+//!HideMethodLineCommentWithSpace
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+		
+    //Kommentar
+    /*$*/void method2();/*$$*/
+    std::string toString();
+private:
+    int i;
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    //Kommentar
+    void method2();
+};
+
+#endif /*A_H_*/
+
+//!HideMethodBlockCommentWithSpace
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+
+    /*Kommentar*/
+    /*$*/void method2();/*$$*/
+    std::string toString();
+private:
+    int i;
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    /*Kommentar*/
+    void method2();
+};
+
+#endif /*A_H_*/
+
+//!HideMethodLineCommentWithSpaceBehind
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    /*$*/void method2();/*$$*///Kommentar
+    std::string toString();
+private:
+    int i;
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    void method2(); //Kommentar
+};
+
+#endif /*A_H_*/
+
+//!HideMethodBlockCommentWithSpaceBehind
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    /*$*/void method2();/*$$*//*Kommentar*/
+
+    std::string toString();
+private:
+    int i;
+};
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    void method2(); /*Kommentar*/
+};
+#endif /*A_H_*/
+
+//!HideMethodBigBlockComment
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    /*
+         * Kommentar
+         */
+    /*$*/void method2();/*$$*/
+    std::string toString();
+private:
+    int i;
+};
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    /*
+         * Kommentar
+         */
+    void method2();
+};
+#endif /*A_H_*/
+
+//!HideMethodBigBlockCommentBehind
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+	/*$*/void method2();/*$$*/		/*
+							 * Kommentar
+							 */
+    std::string toString();
+private:
+    int i;
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    void method2(); /*
+							 * Kommentar
+							 */
+};
+
+#endif /*A_H_*/
+
+//!HideMethodBigBlockCommentBeforeAndBehind
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    /*
+     * Davor
+     */
+    /*$*/void method2();/*$$*/		/*
+							 * Kommentar
+							 */
+    std::string toString();
+private:
+    int i;
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    /*
+     * Davor
+     */
+    void method2(); /*
+							 * Kommentar
+							 */
+};
+
+#endif /*A_H_*/
+
+//!HideMethodMixedCommentBeforeAndAfter
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    /*123*/
+    /*$*/void method2();/*$$*///TEST
+    std::string toString();
+private:
+    int i;
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    /*123*/
+    void method2(); //TEST
+};
+
+#endif /*A_H_*/
+
+//!HideMethodBlockCommentBeforeAndBehind
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    /*123*/
+    /*$*/void method2();/*$$*//*TEST*/
+    std::string toString();
+private:
+    int i;
+};
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    /*123*/
+    void method2(); /*TEST*/
+};
+#endif /*A_H_*/
+
+//!HideMethodNoChange
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+errors=1
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+private:
+    /*$*/void method2();/*$$*/
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+private:
+    void method2();
+};
+
+#endif /*A_H_*/
+
+//!HideMethod2MethodsDifferentLine
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    /*$*/void method1();/*$$*/
+    void method2();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    void method2();
+private:
+    void method1();
+};
+
+#endif /*A_H_*/
+
+//!HideMethod2MethodsSameLine
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    /*$*/void method1();/*$$*/void method2();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    void method2();
+private:
+    void method1();
+};
+
+#endif /*A_H_*/
+
+//!HideMethod2MethodsDifferentLineWithComment
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    //Kommentar
+    /*$*/void method1();/*$$*/
+    void method2();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    void method2();
+private:
+    //Kommentar
+    void method1();
+};
+
+#endif /*A_H_*/
+
+//!HideMethod2MethodsSameLineWithComment
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    //Kommentar
+    /*$*/void method1();/*$$*/void method2();
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    void method2();
+private:
+    //Kommentar
+    void method1();
+};
+
+#endif /*A_H_*/
+
+//!HideMethodSimple ImplementationFile
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    void method2();
+    std::string toString();
+private:
+    int i;
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    void method2();
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+void A::/*$*/method2/*$$*/()
+{
+}
+
+//!HideMethodSimple ImplementationFile with Comments BUG #60
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    //TEST 1
+    void method2(); //TEST 2
+    std::string toString();
+private:
+    int i;
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+    A();
+    std::string toString();
+private:
+    int i;
+    //TEST 1
+    void method2(); //TEST 2
+};
+
+#endif /*A_H_*/
+
+//@A.cpp
+#include "A.h"
+
+void A::/*$*/method2/*$$*/()
+{
+}
+
+//!HideMethod with References 1
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=HideMethod.h
+//@HideMethod.h
+#ifndef HIDEMETHOD_H_
+#define HIDEMETHOD_H_
+
+class HideMethod {
+public:
+    HideMethod();
+    virtual ~HideMethod();
+    void /*$*/methode2/*$$*/();
+    void methode3()
+    {
+        methode2();
+    }
+
+};
+
+#endif /* HIDEMETHOD_H_ */
+
+//=
+#ifndef HIDEMETHOD_H_
+#define HIDEMETHOD_H_
+
+class HideMethod {
+public:
+    HideMethod();
+    virtual ~HideMethod();
+    void methode3()
+    {
+        methode2();
+    }
+
+private:
+    void methode2();
+};
+
+#endif /* HIDEMETHOD_H_ */
+
+//!HideMethod with References 2
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=HideMethod.h
+//@HideMethod.h
+#ifndef HIDEMETHOD_H_
+#define HIDEMETHOD_H_
+
+class HideMethod {
+public:
+    HideMethod();
+    virtual ~HideMethod();
+    void /*$*/methode2/*$$*/();
+    void methode3();
+};
+
+#endif /* HIDEMETHOD_H_ */
+
+//=
+#ifndef HIDEMETHOD_H_
+#define HIDEMETHOD_H_
+
+class HideMethod {
+public:
+    HideMethod();
+    virtual ~HideMethod();
+    void methode3();
+private:
+    void methode2();
+};
+
+#endif /* HIDEMETHOD_H_ */
+
+//@HideMethod.cpp
+#include "HideMethod.h"
+
+HideMethod::HideMethod() {
+	// TODO Auto-generated constructor stub
+}
+
+HideMethod::~HideMethod() {
+	// TODO Auto-generated destructor stub
+}
+
+void HideMethod::methode2() {
+	//do nothing
+}
+
+void HideMethod::methode3()
+{
+	methode2();
+}
+
+//=
+#include "HideMethod.h"
+
+HideMethod::HideMethod() {
+	// TODO Auto-generated constructor stub
+}
+
+HideMethod::~HideMethod() {
+	// TODO Auto-generated destructor stub
+}
+
+void HideMethod::methode2() {
+	//do nothing
+}
+
+void HideMethod::methode3()
+{
+	methode2();
+}
+
+//!HideMethod with References 3
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=HideMethod.h
+warnings=1
+//@HideMethod.h
+#ifndef HIDEMETHOD_H_
+#define HIDEMETHOD_H_
+
+class HideMethod {
+public:
+	HideMethod();
+	virtual ~HideMethod();
+	void /*$*/methode2/*$$*/();
+	void methode3();
+};
+
+class test{
+public:
+	void call(){
+		HideMethod hm;
+		hm.methode2();
+	}
+};
+
+#endif /* HIDEMETHOD_H_ */
+
+//=
+#ifndef HIDEMETHOD_H_
+#define HIDEMETHOD_H_
+
+class HideMethod {
+public:
+	HideMethod();
+	virtual ~HideMethod();
+	void methode3();
+private:
+    void methode2();
+};
+
+class test{
+public:
+	void call(){
+		HideMethod hm;
+		hm.methode2();
+	}
+};
+
+#endif /* HIDEMETHOD_H_ */
+
+//!HideMethod with References 4
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=HideMethod.h
+warnings=1
+//@HideMethod.h
+#ifndef HIDEMETHOD_H_
+#define HIDEMETHOD_H_
+
+class HideMethod {
+public:
+    HideMethod();
+    virtual ~HideMethod();
+    void /*$*/methode2/*$$*/();
+    void methode3();
+};
+
+#endif /* HIDEMETHOD_H_ */
+
+//=
+#ifndef HIDEMETHOD_H_
+#define HIDEMETHOD_H_
+
+class HideMethod {
+public:
+    HideMethod();
+    virtual ~HideMethod();
+    void methode3();
+private:
+    void methode2();
+};
+
+#endif /* HIDEMETHOD_H_ */
+
+//@HideMethod.cpp
+#include "HideMethod.h"
+
+HideMethod::HideMethod() {
+	// TODO Auto-generated constructor stub
+
+}
+
+HideMethod::~HideMethod() {
+	// TODO Auto-generated destructor stub
+}
+
+void HideMethod::methode2() {
+	//do nothing
+}
+
+void HideMethod::methode3() {
+	//do nothing
+}
+
+int main(){
+	HideMethod hm;
+	hm.methode2();
+}
+
+//=
+//@HideMethod.cpp
+#include "HideMethod.h"
+
+HideMethod::HideMethod() {
+	// TODO Auto-generated constructor stub
+
+}
+
+HideMethod::~HideMethod() {
+	// TODO Auto-generated destructor stub
+}
+
+void HideMethod::methode2() {
+	//do nothing
+}
+
+void HideMethod::methode3() {
+	//do nothing
+}
+
+int main(){
+	HideMethod hm;
+	hm.methode2();
+}
+
+//!HideMethod with CPP File selection
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=HideMethod.h
+//@HideMethod.h
+#ifndef HIDEMETHOD_H_
+#define HIDEMETHOD_H_
+
+class HideMethod {
+public:
+    HideMethod();
+    virtual ~HideMethod();
+    void methode2();
+    void methode3();
+};
+
+#endif /* HIDEMETHOD_H_ */
+
+//=
+#ifndef HIDEMETHOD_H_
+#define HIDEMETHOD_H_
+
+class HideMethod {
+public:
+    HideMethod();
+    virtual ~HideMethod();
+    void methode3();
+private:
+    void methode2();
+};
+
+#endif /* HIDEMETHOD_H_ */
+
+//@HideMethod.cpp
+#include "HideMethod.h"
+
+HideMethod::HideMethod() {
+	// TODO Auto-generated constructor stub
+}
+
+HideMethod::~HideMethod() {
+	// TODO Auto-generated destructor stub
+}
+
+void HideMethod::/*$*/methode2/*$$*/() {
+	//do nothing
+}
+
+void HideMethod::methode3()
+{
+	methode2();
+}
+
+//=
+#include "HideMethod.h"
+
+HideMethod::HideMethod() {
+	// TODO Auto-generated constructor stub
+}
+
+HideMethod::~HideMethod() {
+	// TODO Auto-generated destructor stub
+}
+
+void HideMethod::methode2() {
+	//do nothing
+}
+
+void HideMethod::methode3()
+{
+	methode2();
+}
+
+//!HideMethodChangeToDefaultVisibility Class1
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+	/*$*/void method2();/*$$*/
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+public:
+private:
+	void method2();
+};
+
+#endif /*A_H_*/
+
+//!HideMethodChangeToDefaultVisibility Class2
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+errors=1
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+	/*$*/void method2();/*$$*/
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+class A{
+	void method2();
+};
+
+#endif /*A_H_*/
+
+//!HideMethodChangeToDefaultVisibility Struct
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+struct A{
+	/*$*/void method2();/*$$*/
+};
+
+#endif /*A_H_*/
+
+//=
+#ifndef A_H_
+#define A_H_
+
+#include <iostream>
+
+struct A{
+private:
+    void method2();
+};
+
+#endif /*A_H_*/
+
+//!HideMethod CheckIfPrivateBug 1
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.cpp
+//@A.cpp
+struct other
+{
+  bool value() {return true;}
+};
+
+class Klass
+{
+public:
+	void /*$*/set/*$$*/(bool b){}
+	void test()
+	{
+	  other o;
+	  this->set(o.value());
+	}
+};
+
+//=
+struct other
+{
+  bool value() {return true;}
+};
+
+class Klass
+{
+public:
+	void test()
+    {
+        other o;
+        this->set(o.value());
+    }
+
+private:
+    void set(bool b)
+    {
+    }
+};
+
+//!HideMethod CheckIfPrivateBug 2
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.cpp
+//@A.cpp
+struct other
+{
+  bool value() {return true;}
+};
+
+class Klass
+{
+public:
+	void set(bool b){}
+	void test()
+	{
+	  other o;
+	  this->/*$*/set/*$$*/(o.value());
+	}
+};
+
+//=
+struct other
+{
+  bool value() {return true;}
+};
+
+class Klass
+{
+public:
+	void test()
+    {
+        other o;
+        this->set(o.value());
+    }
+
+private:
+    void set(bool b)
+    {
+    }
+};
+
+//!HideMethod CheckIfPrivateBug 3
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.cpp
+warnings=1
+//@A.cpp
+struct other
+{
+  bool /*$*/value/*$$*/() {return true;}
+};
+
+class Klass
+{
+public:
+	void set(bool b){}
+	void test()
+	{
+	  other o;
+	  this->set(o.value());
+	}
+};
+
+//=
+struct other
+{
+private:
+    bool value() {return true;}
+};
+
+class Klass
+{
+public:
+	void set(bool b){}
+	void test()
+	{
+	  other o;
+	  this->set(o.value());
+	}
+};
+
+//!HideMethod CheckIfPrivateBug 4
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.cpp
+//@A.cpp
+struct other
+{
+  bool value() {return true;}
+};
+
+class Klass
+{
+public:
+	void set(bool b){}
+	void /*$*/test/*$$*/()
+	{
+	  other o;
+	  this->set(o.value());
+	}
+};
+
+//=
+struct other
+{
+  bool value() {return true;}
+};
+
+class Klass
+{
+public:
+	void set(bool b){}
+
+private:
+    void test()
+	{
+	  other o;
+	  this->set(o.value());
+	}
+};
+
+//!HideMethod Main
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.cpp
+fatalerrors=1
+//@A.cpp
+int /*$*/main/*$$*/(){
+	int i = 2;
+	i++;
+	return 0;
+}
+
+//=
+int main(){
+	int i = 2;
+	i++;
+	return 0;
+}
+
+//!HideMethod empty public sections
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+class Klass
+{
+public:
+    void /*$*/to_move()/*$$*/;
+
+private:
+    void just_private();
+};
+
+//=
+class Klass
+{
+public:
+private:
+    void just_private();
+    void to_move();
+};
+
+//!HideMethod several private sections
+//#org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+class Klass
+{
+public:
+    void /*$*/to_move()/*$$*/;
+
+private:
+    void just_private();
+private:
+};
+
+//=
+class Klass
+{
+public:
+private:
+    void just_private();
+    void to_move();
+private:
+};
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ImplementMethod.rts b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ImplementMethod.rts
new file mode 100644
index 0000000..0f93171
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/ImplementMethod.rts
@@ -0,0 +1,813 @@
+//!Param const and reference and pointer
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+class X {
+public:
+	bool /*$*/a(int = 100)/*$$*/ const;
+};
+
+//=
+class X {
+public:
+	bool a(int = 100) const;
+};
+
+inline bool X::a(int int1) const
+{
+}
+
+
+
+//!Param const and reference and pointer two params
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+class X {
+public:
+	bool /*$*/xy(int, int i)/*$$*/ const;
+};
+
+//=
+class X {
+public:
+	bool xy(int, int i) const;
+};
+
+inline bool X::xy(int int1, int i) const
+{
+}
+
+
+
+//!Test if TemplateMethod stays in header
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+template<class T> class A
+{
+public:
+        /*$*/void test();/*$$*/
+};
+
+//=
+template<class T> class A
+{
+public:
+        void test();
+};
+
+template<class T> inline void A<T>::test()
+{
+}
+
+
+
+//@A.cpp
+#include "A.h"
+
+//=
+#include "A.h"
+
+//!class template member functions
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+template<class T> class A
+{
+public:
+        A();
+        /*$*/void test();/*$$*/
+};
+
+template<class T> A<T>::A()
+{
+}
+
+//=
+template<class T> class A
+{
+public:
+        A();
+        void test();
+};
+
+template<class T> A<T>::A()
+{
+}
+
+template<class T> inline void A<T>::test()
+{
+}
+
+
+
+//!member class
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+
+class Demo
+{
+	class SubClass 
+	{
+		/*$*/void test();/*$$*/
+	};
+};
+
+
+//@A.cpp
+#include "A.h"
+
+//=
+#include "A.h"
+
+void Demo::SubClass::test()
+{
+}
+
+
+
+//!method declared in otherwise empty class without cpp file
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+class A
+{
+public:
+        /*$*/void test();/*$$*/
+};
+
+//=
+class A
+{
+public:
+        void test();
+};
+
+inline void A::test()
+{
+}
+
+
+
+//!method declared in otherwise empty class
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+class A
+{
+public:
+        /*$*/void test();/*$$*/
+};
+
+//=
+class A
+{
+public:
+        void test();
+};
+
+//@A.cpp
+
+//=
+
+
+void A::test()
+{
+}
+
+
+//!implement in existing namespace
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+namespace NameSpace 
+{
+	class ClassInNamespace 
+	{
+	public:
+		int test();
+		/*$*/void test2();/*$$*/
+	};
+}
+
+//@A.cpp
+#include "A.h"
+
+namespace NameSpace
+{
+	int ClassInNamespace::test()
+	{
+		return 5;
+	}
+}
+//=
+#include "A.h"
+
+namespace NameSpace
+{
+	int ClassInNamespace::test()
+	{
+		return 5;
+	}
+
+    void ClassInNamespace::test2()
+    {
+    }
+}
+//!virtual method in the middle of con/destructor, without parameters and void return value
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	/*$*/virtual void foo();/*$$*/
+	~A();
+};
+
+#endif /*A_H_*/
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+A::~A()
+{
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+void A::foo()
+{
+}
+
+A::~A()
+{
+}
+
+//!implement a function at start of source file
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+/*$*/void function();/*$$*/
+void function_with_impl();
+//@A.cpp
+void function_with_impl()
+{
+}
+//=
+void function()
+{
+}
+
+void function_with_impl()
+{
+}
+//!method at end, without parameters and void return value
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	/*$*/void foo();/*$$*/
+};
+
+#endif /*A_H_*/
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+void A::foo()
+{
+}
+
+
+
+//!method at beginning, without parameters, void return value and const
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	/*$*/void foo() const;/*$$*/
+	A();
+};
+
+#endif /*A_H_*/
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+//=
+#include "A.h"
+
+void A::foo() const
+{
+}
+
+A::A()
+{
+}
+
+//!method with int return value
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	/*$*/int foo();/*$$*/
+};
+
+#endif /*A_H_*/
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+int A::foo()
+{
+}
+
+
+
+//!method with two int parameters
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	/*$*/int foo(int param1, int param2);/*$$*/
+};
+
+#endif /*A_H_*/
+//@A.cpp
+#include "A.h"
+
+A::A()
+{
+}
+
+//=
+#include "A.h"
+
+A::A()
+{
+}
+
+int A::foo(int param1, int param2)
+{
+}
+
+
+
+//!method defined in header
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+class A
+{
+public:
+        A();
+        /*$*/void test();/*$$*/
+};
+
+A::A()
+{
+}
+
+//=
+class A
+{
+public:
+        A();
+        void test();
+};
+
+A::A()
+{
+}
+
+inline void A::test()
+{
+}
+
+
+
+//!implement a function at end of source file
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+void function_with_impl();
+/*$*/void function();/*$$*/
+//@A.cpp
+void function_with_impl()
+{
+}
+//=
+void function_with_impl()
+{
+}
+
+void function()
+{
+}
+
+
+//!implement with namespace
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+namespace NameSpace 
+{
+	class ClassInNamespace 
+	{
+	public:
+		int other_test();
+		/*$*/void test();/*$$*/
+	};
+}
+
+//@A.cpp
+#include "A.h"
+void NameSpace::ClassInNamespace::other_test()
+{
+}
+//=
+#include "A.h"
+void NameSpace::ClassInNamespace::other_test()
+{
+}
+
+void NameSpace::ClassInNamespace::test()
+{
+}
+
+
+//!implement function within namespace
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+namespace OuterSpace {
+	namespace NameSpace 
+	{
+		int test();
+		/*$*/int test2();/*$$*/
+	}
+}
+
+//@A.cpp
+#include "A.h"
+namespace OuterSpace {
+	int NameSpace::test()
+	{	
+	}
+}
+//=
+#include "A.h"
+namespace OuterSpace {
+	int NameSpace::test()
+	{	
+	}
+
+    int NameSpace::test2()
+    {
+    }
+}
+//!implement function within namespaces
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+namespace OuterSpace {
+	namespace NameSpace
+	{
+		int test();
+		/*$*/int test2();/*$$*/
+	}
+}
+
+//@A.cpp
+#include "A.h"
+namespace OuterSpace {
+	namespace NameSpace {
+		int test()
+		{	
+		}
+	}
+}
+//=
+#include "A.h"
+namespace OuterSpace {
+	namespace NameSpace {
+		int test()
+		{	
+		}
+
+	    int test2()
+	    {
+	    }
+	}
+}
+//!class template member functions with multiple templates
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+template<class T, class U> class A
+{
+public:
+        A();
+        /*$*/void test();/*$$*/
+};
+
+template<class T, class U> A<T,U>::A()
+{
+}
+
+//=
+template<class T, class U> class A
+{
+public:
+        A();
+        void test();
+};
+
+template<class T, class U> A<T,U>::A()
+{
+}
+
+template<class T, class U> inline void A<T,U>::test()
+{
+}
+
+
+
+//!with default parameters
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+
+class Class
+{
+public:
+	/*$*/void test(int param1, int param2 = 5, int param3 = 10);/*$$*/
+};
+
+
+//@A.cpp
+#include "A.h"
+
+//=
+#include "A.h"
+
+void Class::test(int param1, int param2, int param3)
+{
+}
+
+
+
+//!static method
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+
+class Class
+{
+public:
+	/*$*/static void test();/*$$*/
+};
+
+
+//@A.cpp
+#include "A.h"
+
+//=
+#include "A.h"
+
+void Class::test()
+{
+}
+
+
+
+//! Bug 238253 Pointer refence of the return value lost
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+
+class TestClass {
+public:
+	/*$*/int* get(char* val);/*$$*/
+};
+
+
+//@A.cpp
+#include "A.h"
+
+//=
+#include "A.h"
+
+int *TestClass::get(char *val)
+{
+}
+
+
+
+//! Bug 238554 void parameters
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+
+class Test
+{
+    public:
+	/*$*/void doNothing(void);/*$$*/
+};
+
+
+//@A.cpp
+#include "A.h"
+
+//=
+#include "A.h"
+
+void Test::doNothing(void)
+{
+}
+
+
+
+//! Bug 282989 Refactor->Implement method option doesn't qualify the name in the method definition with a fully qualified container class name
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=TestClass.h
+//@TestClass.h
+#ifndef TESTCLASS_H_
+#define TESTCLASS_H_
+
+namespace nspace{
+class TestClass {
+void /*$*/testMethod()/*$$*/;
+};
+}
+
+#endif /* TESTCLASS_H_ */
+
+//=
+#ifndef TESTCLASS_H_
+#define TESTCLASS_H_
+
+namespace nspace{
+class TestClass {
+void testMethod();
+};
+}
+
+inline void nspace::TestClass::testMethod()
+{
+}
+
+
+
+#endif /* TESTCLASS_H_ */
+
+//!Bug 290110 Source-> Implement Method
+//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
+//@.config
+filename=A.h
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+namespace n1 {
+namespace n2 {
+
+class A {
+public:
+	A();
+	~A();
+	void testmethod(int x);
+protected:
+	class B {
+	public:
+		void /*$*/testmethod2()/*$$*/;
+	};
+};
+
+}
+}
+
+
+#endif /* A_H_ */
+//@A.cpp
+#include "A.h"
+
+namespace n1 {
+namespace n2 {
+
+A::A() {
+}
+
+A::~A() {
+}
+
+}
+}
+
+//=
+#include "A.h"
+
+namespace n1 {
+namespace n2 {
+
+A::A() {
+}
+
+A::~A() {
+}
+
+}
+}
+
+void n1::n2::A::B::testmethod2()
+{
+}
+
+
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/TranslationunitHelper.rts b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/TranslationunitHelper.rts
new file mode 100644
index 0000000..a277b9e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/refactoring/TranslationunitHelper.rts
@@ -0,0 +1,35 @@
+//!before the class
+//#org.eclipse.cdt.ui.tests.refactoring.utils.TranslationUnitHelperTest
+//@.config
+filename=A.h
+offset_unix=27
+offset_win=30
+//@A.h
+#ifndef A_H_
+#define A_H_
+
+class A
+{
+public:
+	A();
+	void foo();
+};
+
+#endif /*A_H_*/
+
+
+//!before a typedef
+//#org.eclipse.cdt.ui.tests.refactoring.utils.TranslationUnitHelperTest
+//@.config
+filename=A.h
+offset_unix=0
+offset_win=0
+//@A.h
+typedef int nummere;
+
+class A
+{
+public:
+	A();
+};
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/resources/semanticHighlighting/SHTest.cpp b/results/plugins/org.eclipse.cdt.ui.tests/resources/semanticHighlighting/SHTest.cpp
new file mode 100644
index 0000000..f283f58
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/resources/semanticHighlighting/SHTest.cpp
@@ -0,0 +1,145 @@
+#define INT      int
+#define FUNCTION_MACRO(arg) globalFunc(arg)
+#define EMPTY_MACRO(arg) 
+
+enum Enumeration {
+    enumerator
+};
+
+const int globalConstant = 0;
+int globalVariable = 0;
+static int globalStaticVariable = 0;
+
+void globalFunc(int a);
+static void globalStaticFunc() {
+    EMPTY_MACRO(n);
+};
+
+class Base1 {};
+class Base2 {};
+
+class ClassContainer : Base1, Base2 {
+    friend void friendFunc();
+    friend class FriendClass;    
+    
+public:
+    static int staticPubField;
+    const int constPubField;
+    const static int constStaticPubField;
+    int pubField;
+
+    static int staticPubMethod(int arg) {
+        FUNCTION_MACRO(arg);
+        globalFunc(arg);
+        return globalStaticVariable;
+    }
+    int pubMethod();
+
+    enum pubEnumeration {pubEnumerator};
+    class pubClass{};
+    class pubStruct{};
+    class pubUnion{};
+    typedef pubClass pubTypedef;
+    
+protected:
+    static const int constStaticProtField = 12; 
+    static int staticProtField;
+    const  int constProtField;
+    int protField;
+
+    static int staticProtMethod();
+    int protMethod();
+
+    enum protEnumeration {protEnumerator};
+    class protClass{};
+    class protStruct{};
+    class protUnion{};
+    typedef protClass protTypedef;
+    
+private:
+    static const int constStaticPrivField = 12; 
+    static int staticPrivField;
+    const  int constPrivField;
+    int privField;    
+
+    static int staticPrivMethod();
+    int privMethod();
+
+    enum privEnumeration {privEnumerator};
+    class privClass{};
+    class privStruct{};
+    class privUnion{};
+    typedef privClass privTypedef;
+
+
+};
+
+template<class T1, class T2> class TemplateClass {
+    T1 tArg1;
+    T2 tArg2;
+    TemplateClass(T1 arg1, T2 arg2) {
+        tArg1 = arg1;
+        tArg2 = arg2;
+    }
+};
+
+template<class T1> class PartialInstantiatedClass : TemplateClass<T1, Base1> {};
+
+
+struct CppStruct {
+    int structField;
+};
+
+union CppUnion {
+    int unionField;
+    CppUnion operator+(CppUnion);
+    CppUnion operator[](int);
+};
+
+typedef CppUnion TUnion;
+
+namespace ns {
+    int namespaceVar = 0;
+    int namespaceFunc() {
+	globalStaticFunc();
+	return namespaceVar;
+    }
+}
+
+INT ClassContainer::protMethod() {
+    return protField;
+}
+
+INT ClassContainer::pubMethod() {
+    int localVar = 0;
+    return pubField + localVar;
+}
+
+INT ClassContainer::staticPrivMethod() {
+    CppStruct* st= new CppStruct();
+    st->structField= 1;
+    CppUnion un;
+    un.unionField= 2;
+    staticPubMethod(staticPrivField);
+    un + un[6];
+label:
+    FUNCTION_MACRO(0);
+    if (un.unionField < st->structField) goto label;
+    problemMethod();
+    // external SDK
+    SDKClass sdkClass;
+    sdkClass.SDKMethod();
+    SDKFunction();
+    return 0;
+}
+
+//http://bugs.eclipse.org/209203
+template <int n>
+int f()
+{
+  return n;
+}
+
+//http://bugs.eclipse.org/220392
+#define EMPTY
+EMPTY int f();
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/CElementDecorator.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/CElementDecorator.java
new file mode 100644
index 0000000..d591d87
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/CElementDecorator.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin;
+
+import org.eclipse.swt.graphics.Image;
+
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.LabelProvider;
+
+/**
+ * Allows to test decorators for Java elements
+ */
+public class CElementDecorator extends LabelProvider implements ILabelDecorator {
+
+	/*
+	 * @see ILabelDecorator#decorateImage(Image, Object)
+	 */
+	public Image decorateImage(Image image, Object element) {
+		return null;
+	}
+
+	/*
+	 * @see ILabelDecorator#decorateText(String, Object)
+	 */
+	public String decorateText(String text, Object element) {
+		return text + "*"; //$NON-NLS-1$
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/CTestPlugin.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/CTestPlugin.java
new file mode 100644
index 0000000..202fbcf
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/CTestPlugin.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *  IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.swt.widgets.Display;
+
+
+public class CTestPlugin extends Plugin {
+	public static String PLUGIN_ID = "org.eclipse.cdt.ui.tests"; //$NON-NLS-1$
+	private static CTestPlugin fgDefault;
+	
+	public CTestPlugin() {
+		super();
+		fgDefault= this;
+	}
+	
+	public static CTestPlugin getDefault() {
+		return fgDefault;
+	}
+	
+	public static IWorkspace getWorkspace() {
+		return ResourcesPlugin.getWorkspace();
+	}
+	
+	public static void enableAutobuild(boolean enable) throws CoreException {
+		// disable auto build
+		IWorkspace workspace= CTestPlugin.getWorkspace();
+		IWorkspaceDescription desc= workspace.getDescription();
+		desc.setAutoBuilding(enable);
+		workspace.setDescription(desc);
+	}
+	
+	public File getFileInPlugin(IPath path) {
+		try {
+			return new File(FileLocator.toFileURL(FileLocator.find(getBundle(), path, null)).getFile());
+		} catch (IOException e) {
+			return null;
+		}
+	}
+	
+	public static String getPluginId() {
+		return PLUGIN_ID;
+	}
+	
+	public static Display getStandardDisplay() {
+		Display display= Display.getCurrent();
+		if (display == null) {
+			display= Display.getDefault();
+		}
+		return display;		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/CTestSetup.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/CTestSetup.java
new file mode 100644
index 0000000..6469c67
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/CTestSetup.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+
+public class CTestSetup extends TestSetup {
+	
+	/**
+	 * @deprecated
+	 * Not needed anymore. No added value
+	 */
+	public CTestSetup(Test test) {
+		super(test);
+	}	
+	
+	protected void setUp() throws Exception {
+	}
+
+	protected void tearDown() throws Exception {
+	}
+	
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/Main.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/Main.java
new file mode 100644
index 0000000..cae4da2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/Main.java
@@ -0,0 +1,528 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin;
+
+// copied from startup.jar. planned to be removed soon
+import java.net.*;
+import java.lang.reflect.*;
+import java.io.*;
+import java.util.*;
+/**
+ * Startup class for Eclipse. Creates a class loader using
+ * supplied URL of platform installation, loads and calls
+ * the Eclipse Boot Loader.  The startup arguments are as follows:
+ * <dl>
+ * <dd>
+ *    -application &lt;id&gt;: the identifier of the application to run
+ * </dd>
+ * <dd>
+ *    -boot &lt;location&gt;: the location, expressed as a URL, of the platform's boot.jar
+ * </dd>
+ * <dd>
+ *    -consolelog : enables log to the console. Handy when combined with -debug
+ * </dd>
+ * <dd>
+ *    -data &lt;location&gt;: sets the workspace location and the default location for projects
+ * </dd>
+ * <dd>
+ *    -debug [options file]: turns on debug mode for the platform and optionally specifies a location
+ * for the .options file. This file indicates what debug points are available for a
+ * plug-in and whether or not they are enabled. If a location is not specified, the platform searches
+ * for the .options file under the install directory
+ * </dd>
+ * <dd>
+ *    -dev [entries]: turns on dev mode and optionally specifies comma-separated class path entries
+ * which are added to the class path of each plug-in
+ * </dd>
+ * <dd>
+ *    -keyring &lt;location&gt;: the location of the authorization database on disk. This argument
+ * has to be used together with the -password argument
+ * </dd>
+ * <dd>
+ *    -password &lt;passwd&gt;: the password for the authorization database
+ * </dd>
+ * <dd>
+ *    -plugins &lt;location&gt;: The arg is a URL pointing to a file which specs the plugin 
+ * path for the platform.  The file is in property file format where the keys are user-defined 
+ * names and the values are comma separated lists of either explicit paths to plugin.xml 
+ * files or directories containing plugins. (e.g., .../eclipse/plugins).
+ * </dd>
+ * <dd>
+ *    -ws &lt;window system&gt;: sets the window system value
+ * </dd>
+ * </dl>
+ */
+public class Main {
+	/**
+	 * Indicates whether this instance is running in debug mode.
+	 */
+	protected boolean debug = false;
+	
+	/**
+	 * The location of the launcher to run.
+	 */
+	protected String bootLocation = null;
+	
+	/**
+	 * The identifier of the application to run.
+	 */
+	protected String application;
+	
+	/**
+	 * The path for finding find plugins.
+	 */
+	protected URL pluginPathLocation;
+	
+	/**
+	 * The boot path location.
+	 */
+	protected String location;
+	
+	/**
+	 * Indicates whether items for UNinstallation should be looked for.
+	 */
+	protected boolean uninstall = false;
+	
+	/**
+	 * The item to be uninstalled.
+	 */
+	protected String uninstallCookie;
+	
+	/**
+	 * The class path entries.
+	 */
+	protected String devClassPath = null;
+	
+	/**
+	 * Indicates whether this instance is running in development mode.
+	 */
+	protected boolean inDevelopmentMode = false;
+
+	// static token describing how to take down the splash screen
+	private static String endSplash = null;
+	
+	// constants
+	private static final String APPLICATION = "-application"; //$NON-NLS-1$
+	private static final String BOOT = "-boot"; //$NON-NLS-1$
+	private static final String DEBUG = "-debug"; //$NON-NLS-1$
+	private static final String DEV = "-dev"; //$NON-NLS-1$
+	private static final String ENDSPLASH = "-endsplash"; //$NON-NLS-1$
+	private static final String UNINSTALL = "-uninstall"; //$NON-NLS-1$
+	private static final String PI_BOOT = "org.eclipse.core.boot"; //$NON-NLS-1$
+	private static final String BOOTLOADER = "org.eclipse.core.boot.BootLoader"; //$NON-NLS-1$
+	private static final String UPDATELOADER = "org.eclipse.core.internal.boot.LaunchInfo"; //$NON-NLS-1$
+
+	// The project containing the boot loader code.  This is used to construct
+	// the correct class path for running in VAJ and VAME.
+	private static final String PROJECT_NAME = "Eclipse Core Boot"; //$NON-NLS-1$
+
+	private static boolean inVAJ;
+	static {
+		try {
+			Class.forName("com.ibm.uvm.lang.ProjectClassLoader"); //$NON-NLS-1$
+			inVAJ = true;
+		} catch (Exception e) {
+			inVAJ = false;
+		}
+	}
+	private static boolean inVAME;
+	static {
+		try {
+			Class.forName("com.ibm.eclipse.core.VAME"); //$NON-NLS-1$
+			inVAME = true;
+		} catch (Exception e) {
+			inVAME = false;
+		}
+	}
+
+/**
+ * Executes the launch.
+ * 
+ * @return the result of performing the launch
+ * @param args command-line arguments
+ * @exception Exception thrown if a problem occurs during the launch
+ */
+protected Object basicRun(String[] args) throws Exception {
+	Class clazz = getBootLoader(bootLocation);
+	Method method = clazz.getDeclaredMethod("run", new Class[] { String.class, URL.class, String.class, String[].class }); //$NON-NLS-1$
+	try {
+		return method.invoke(clazz, new Object[] { application, pluginPathLocation, location, args });
+	} catch (InvocationTargetException e) {
+		if (e.getTargetException() instanceof Error)
+			throw (Error) e.getTargetException();
+		throw e;
+	}
+}
+
+/**
+ * Returns the result of converting a list of comma-separated tokens into an array
+ * 
+ * @return the array of string tokens
+ * @param prop the initial comma-separated string
+ */
+private String[] getArrayFromList(String prop) {
+	if (prop == null || prop.trim().equals("")) //$NON-NLS-1$
+		return new String[0];
+	Vector list = new Vector();
+	StringTokenizer tokens = new StringTokenizer(prop, ","); //$NON-NLS-1$
+	while (tokens.hasMoreTokens()) {
+		String token = tokens.nextToken().trim();
+		if (!token.equals("")) //$NON-NLS-1$
+			list.addElement(token);
+	}
+	return list.isEmpty() ? new String[0] : (String[]) list.toArray(new String[0]);
+}
+/**
+ * Creates and returns a platform <code>BootLoader</code> which can be used to start
+ * up and run the platform.  The given base, if not <code>null</code>,
+ * is the location of the boot loader code.  If the value is <code>null</code>
+ * then the boot loader is located relative to this class.
+ * 
+ * @return the new boot loader
+ * @param base the location of the boot loader
+ */
+public Class getBootLoader(String base) throws Exception {
+	URLClassLoader loader = new URLClassLoader(getBootPath(base), null);
+	return loader.loadClass(BOOTLOADER);
+}
+/**
+ * Returns the <code>URL</code>-based class path describing where the boot classes
+ * are located when running in development mode.
+ * 
+ * @return the url-based class path
+ * @param base the base location
+ * @exception MalformedURLException if a problem occurs computing the class path
+ */
+protected URL[] getDevPath(URL base) throws MalformedURLException {
+	URL url;
+	String devBase = base.toExternalForm();
+	if (!inDevelopmentMode) {
+		url = new URL(devBase + "boot.jar"); //$NON-NLS-1$
+		return new URL[] {url};
+	}
+	String[] locations = getArrayFromList(devClassPath);
+	ArrayList result = new ArrayList(locations.length);
+	for (int i = 0; i < locations.length; i++) {
+		String spec = devBase + locations[i];
+		char lastChar = spec.charAt(spec.length() - 1);
+		if ((spec.endsWith(".jar") || (lastChar == '/' || lastChar == '\\'))) //$NON-NLS-1$
+			url = new URL (spec);
+		else
+			url = new URL(spec + "/"); //$NON-NLS-1$
+		//make sure URL exists before adding to path
+		if (new java.io.File(url.getFile()).exists())
+			result.add(url);
+	}
+	url = new URL(devBase + "boot.jar"); //$NON-NLS-1$
+	if (new java.io.File(url.getFile()).exists())
+		result.add(url);
+	return (URL[])result.toArray(new URL[result.size()]);
+}
+
+/**
+ * Returns the <code>URL</code>-based class path describing where the boot classes are located.
+ * 
+ * @return the url-based class path
+ * @param base the base location
+ * @exception MalformedURLException if a problem occurs computing the class path
+ */
+protected URL[] getBootPath(String base) throws MalformedURLException {
+	URL url = null;
+	// if the given location is not null, assume it is correct and use it. 
+	if (base != null) {
+		url = new URL(base);
+		if (debug)
+			System.out.println("Boot URL: " + url.toExternalForm()); //$NON-NLS-1$
+		return new URL[] {url};	
+	}
+	// Create a URL based on the location of this class' code.
+	// strip off jar file and/or last directory to get 
+	// to the directory containing projects.
+	URL[] result = null;
+	url = getClass().getProtectionDomain().getCodeSource().getLocation();
+	String path = url.getFile();
+	if (path.endsWith(".jar")) //$NON-NLS-1$
+		path = path.substring(0, path.lastIndexOf("/")); //$NON-NLS-1$
+	else 
+		if (path.endsWith("/")) //$NON-NLS-1$
+			path = path.substring(0, path.length() - 1);
+	if (inVAJ || inVAME) {
+		int ix = path.lastIndexOf("/"); //$NON-NLS-1$
+		path = path.substring(0, ix + 1);
+		path = path + PROJECT_NAME + "/"; //$NON-NLS-1$
+		url = new URL(url.getProtocol(), url.getHost(), url.getPort(), path);
+		result = new URL[] {url};
+	} else {
+		path = searchForPlugins(path);
+		path = searchForBoot(path);
+		// add on any dev path elements
+		url = new URL(url.getProtocol(), url.getHost(), url.getPort(), path);
+		result = getDevPath(url);
+	}
+	if (debug) {
+		System.out.println("Boot URL:"); //$NON-NLS-1$
+		for (int i = 0; i < result.length; i++)
+			System.out.println("    " + result[i].toExternalForm());	 //$NON-NLS-1$
+	}
+	return result;
+}
+
+/**
+ * Searches for a plugins root starting at a given location.  If one is
+ * found then this location is returned; otherwise an empty string is
+ * returned.
+ * 
+ * @return the location where plugins were found, or an empty string
+ * @param start the location to begin searching at
+ */
+protected String searchForPlugins(String start) {
+	File path = new File(start);
+	while (path != null) {
+		File test = new File(path, "plugins"); //$NON-NLS-1$
+		if (test.exists())
+			return test.toString();
+		path = path.getParentFile();
+		path = (path == null || path.length() == 1)  ? null : path;
+	}
+	return ""; //$NON-NLS-1$
+}
+/**
+ * Searches for a boot directory starting at a given location.  If one
+ * is found then this location is returned; otherwise an empty string
+ * is returned.
+ * 
+ * @return the location where plugins were found, or an empty string
+ * @param start the location to begin searching at
+ */
+protected String searchForBoot(String start) {
+	FileFilter filter = new FileFilter() {
+		public boolean accept(File candidate) {
+			return candidate.getName().startsWith(PI_BOOT);
+		}
+	};
+	File[] boots = new File(start).listFiles(filter);
+	String result = null;
+	String maxVersion = null;
+	for (int i = 0; i < boots.length; i++) {
+		String name = boots[i].getName();
+		int index = name.lastIndexOf('_');
+		if (index == -1) {
+			result = boots[i].getAbsolutePath();
+			i = boots.length;
+		} else {
+			if (index > 0) {
+				String version = name.substring(index + 1);
+				if (maxVersion == null) {
+					result = boots[i].getAbsolutePath();
+					maxVersion = version;
+				} else
+					if (maxVersion.compareTo(version) == -1) {
+						result = boots[i].getAbsolutePath();
+						maxVersion = version;
+					}						
+			}
+		}
+	}
+	if (result == null)
+		throw new RuntimeException("Could not find bootstrap code. Check location of boot plug-in or specify -boot."); //$NON-NLS-1$
+	return result.replace(File.separatorChar, '/') + "/"; //$NON-NLS-1$
+}
+/**
+ * Returns the update loader for the given boot path.
+ * 
+ * @return the update loader
+ * @param base the boot path base
+ * @exception Exception thrown is a problem occurs determining this loader
+ */
+public Class getUpdateLoader(String base) throws Exception {
+	URLClassLoader loader = new URLClassLoader(getBootPath(base), null);
+	return loader.loadClass(UPDATELOADER);
+}
+/**
+ * Runs the platform with the given arguments.  The arguments must identify
+ * an application to run (e.g., <code>-application com.example.application</code>).
+ * After running the application <code>System.exit(N)</code> is executed.
+ * The value of N is derived from the value returned from running the application.
+ * If the application's return value is an <code>Integer</code>, N is this value.
+ * In all other cases, N = 0.
+ * <p>
+ * Clients wishing to run the platform without a following <code>System.exit</code>
+ * call should use <code>run()</code>.
+ *
+ * @see #run
+ * 
+ * @param args the command line arguments
+ */
+public static void main(String[] args) {
+	Object result = null;
+	try {
+		result = new Main().run(args);
+	} catch (Throwable e) {
+		// try and take down the splash screen.
+		endSplash();
+		System.out.println("Exception launching the Eclipse Platform:"); //$NON-NLS-1$
+		e.printStackTrace();
+	}
+	int exitCode = result instanceof Integer ? ((Integer) result).intValue() : 0;
+	System.exit(exitCode);
+}
+/**
+ * Tears down the currently-displayed splash screen.
+ */
+public static void endSplash() {
+	if (endSplash == null)
+		return;
+	try {
+		Runtime.getRuntime().exec(endSplash);
+	} catch (Exception e) {
+	}
+}
+
+/**
+ * Runs this launcher with the arguments specified in the given string.
+ * 
+ * @param argString the arguments string
+ * @exception Exception thrown if a problem occurs during launching
+ */
+public static void main(String argString) throws Exception {
+	Vector list = new Vector(5);
+	for (StringTokenizer tokens = new StringTokenizer(argString, " "); tokens.hasMoreElements();) //$NON-NLS-1$
+		list.addElement(tokens.nextElement());
+	main((String[]) list.toArray(new String[list.size()]));
+}
+
+/**
+ * Processes the command line arguments
+ * 
+ * @return the arguments to pass through to the launched application
+ * @param args the command line arguments
+ */
+protected String[] processCommandLine(String[] args) throws Exception {
+	int[] configArgs = new int[100];
+	configArgs[0] = -1; // need to initialize the first element to something that could not be an index.
+	int configArgIndex = 0;
+	for (int i = 0; i < args.length; i++) {
+		boolean found = false;
+		// check for args without parameters (i.e., a flag arg)
+		// check if debug should be enabled for the entire platform
+		if (args[i].equalsIgnoreCase(DEBUG)) {
+			debug = true;
+			// passed thru this arg (i.e., do not set found = true
+			continue;
+		}
+		
+		// check if development mode should be enabled for the entire platform
+		// If this is the last arg or there is a following arg (i.e., arg+1 has a leading -), 
+		// simply enable development mode.  Otherwise, assume that that the following arg is
+		// actually some additional development time class path entries.  This will be processed below.
+		if (args[i].equalsIgnoreCase(DEV) && ((i + 1 == args.length) || ((i + 1 < args.length) && (args[i + 1].startsWith("-"))))) { //$NON-NLS-1$
+			inDevelopmentMode = true;
+			// do not mark the arg as found so it will be passed through
+			continue;
+		}
+
+		// done checking for args.  Remember where an arg was found 
+		if (found) {
+			configArgs[configArgIndex++] = i;
+			continue;
+		}
+		// check for args with parameters. If we are at the last argument or if the next one
+		// has a '-' as the first character, then we can't have an arg with a parm so continue.
+		if (i == args.length - 1 || args[i + 1].startsWith("-"))  //$NON-NLS-1$
+			continue;
+		String arg = args[++i];
+
+		// look for the laucher to run
+		if (args[i - 1].equalsIgnoreCase(BOOT)) {
+			bootLocation = arg;
+			found = true;
+		}
+
+		// look for the development mode and class path entries.  
+		if (args[i - 1].equalsIgnoreCase(DEV)) {
+			inDevelopmentMode = true;
+			devClassPath = arg;
+			continue;
+		}
+
+		// look for the application to run
+		if (args[i - 1].equalsIgnoreCase(APPLICATION)) {
+			application = arg;
+			found = true;
+		}
+
+		// look for token to use to end the splash screen
+		if (args[i - 1].equalsIgnoreCase(ENDSPLASH)) {
+			endSplash = arg;
+			continue;
+		}
+
+		// look for items to uninstall
+		if (args[i - 1].equalsIgnoreCase(UNINSTALL)) {
+			uninstall = true;
+			uninstallCookie = arg;
+			found = true;
+		}
+
+		// done checking for args.  Remember where an arg was found 
+		if (found) {
+			configArgs[configArgIndex++] = i - 1;
+			configArgs[configArgIndex++] = i;
+		}
+	}
+	// remove all the arguments consumed by this argument parsing
+	if (configArgIndex == 0)
+		return args;
+	String[] passThruArgs = new String[args.length - configArgIndex];
+	configArgIndex = 0;
+	int j = 0;
+	for (int i = 0; i < args.length; i++) {
+		if (i == configArgs[configArgIndex])
+			configArgIndex++;
+		else
+			passThruArgs[j++] = args[i];
+	}
+	return passThruArgs;
+}
+/**
+ * Runs the application to be launched.
+ * 
+ * @return the return value from the launched application
+ * @param args the arguments to pass to the application
+ * @exception thrown if a problem occurs during launching
+ */
+public Object run(String[] args) throws Exception {
+	String[] passThruArgs = processCommandLine(args);
+	if (uninstall)
+		return updateRun(UNINSTALL, uninstallCookie, passThruArgs);
+	return basicRun(passThruArgs);
+}
+/**
+ * Performs an update run.
+ * 
+ * @return the return value from the update loader
+ * @param flag flag to give to the update loader
+ * @param value value to give to the update loader
+ * @param args arguments to give to the update loader.
+ * @exception Exception thrown if a problem occurs during execution
+ */
+protected Object updateRun(String flag, String value, String[] args) throws Exception {
+	Class clazz = getUpdateLoader(bootLocation);
+	Method method = clazz.getDeclaredMethod("run", new Class[] { String.class, String.class, String.class, String[].class }); //$NON-NLS-1$
+	try {
+		return method.invoke(clazz, new Object[] { flag, value, location, args });
+	} catch (InvocationTargetException e) {
+		if (e.getTargetException() instanceof Error)
+			throw (Error) e.getTargetException();
+		throw e;
+	}
+}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/NewMain.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/NewMain.java
new file mode 100644
index 0000000..dec2b58
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/NewMain.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Properties;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+/** 
+ * Application is responsible for calling core launch api
+ */
+
+public class NewMain extends Main {
+	private static final String DEFAULT_APPLICATION= "org.eclipse.ui.workbench"; //$NON-NLS-1$
+	
+	
+	public NewMain(String application, String location, URL pluginPathLocation, String bootLocation, boolean debug) throws IOException {
+		this.application= application;
+		this.location= location;
+		this.pluginPathLocation= pluginPathLocation;
+		this.bootLocation= bootLocation;
+	}
+	
+	public static void main(String[] args) {
+		try {
+			String location= getLocationFromProperties("platform"); //$NON-NLS-1$
+			new NewMain(DEFAULT_APPLICATION, location, null, null, true).run(args);
+		} catch (Throwable e) {
+			System.out.println("Exception launching the Eclipse Platform UI:"); //$NON-NLS-1$
+			e.printStackTrace();
+		}
+		System.exit(0);
+	}
+	
+
+	/**
+	 * Run this launcher with the arguments specified in the given string.
+	 * This is a short cut method for people running the launcher from
+	 * a scrapbook (i.e., swip-and-doit facility).
+	 */
+	public static void main(String argString) throws Exception {
+		Vector list= new Vector(5);
+		for (StringTokenizer tokens= new StringTokenizer(argString, " "); tokens.hasMoreElements();) //$NON-NLS-1$
+			list.addElement(tokens.nextElement());
+		main((String[]) list.toArray(new String[list.size()]));
+	}
+	
+	public static String getLocationFromProperties(String key) {
+		Properties properties= new Properties();
+		try {
+			FileInputStream fis= new FileInputStream(getSettingsFile());
+			properties.load(fis);
+			return properties.getProperty(key);
+		} catch (IOException e) {
+		}
+		return null;
+	}	
+	
+	private static File getSettingsFile() {
+		String home= System.getProperty("user.home"); //$NON-NLS-1$
+		if (home == null) {
+			System.out.println("Home dir not defined"); //$NON-NLS-1$
+			return null;
+		}
+		return new File(home, "eclipse-workspaces.properties");	 //$NON-NLS-1$
+	}	
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/TestPluginLauncher.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/TestPluginLauncher.java
new file mode 100644
index 0000000..f81cb18
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/TestPluginLauncher.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin;
+
+import java.net.URL;
+
+/**
+ * Helper class to launch a test
+ */
+public class TestPluginLauncher {
+	
+	public static final String APP_NAME= "org.eclipse.jdt.ui.tests.app"; //$NON-NLS-1$
+	
+	public static void run(String location, Class testCase, String[] args) {
+		run(APP_NAME, location, testCase, args);
+	}
+	
+	public static void run(String application, String location, Class testCase, String[] args) {
+		try {
+			String bootLocation= getBootLocation();
+			int nArgs= args.length;
+			String[] newArgs= new String[4 + nArgs];
+			newArgs[0]= testCase.getName();
+			for (int i= 0; i < nArgs; i++) {
+				newArgs[1 + i]= args[i];
+			}
+			newArgs[1 + nArgs]= "-dev"; //$NON-NLS-1$
+			newArgs[1 + nArgs + 1]= "bin"; //$NON-NLS-1$
+			newArgs[1 + nArgs + 2]= "-debug"; //$NON-NLS-1$
+			NewMain newMain= new NewMain(application, location, null, bootLocation, false);
+			newMain.run(newArgs);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public static String getLocationFromProperties(String key) {
+		return NewMain.getLocationFromProperties(key);
+	}
+	
+	public static String getLocationFromProperties() {
+		return NewMain.getLocationFromProperties("tests"); //$NON-NLS-1$
+	}
+	
+	public static String getBootLocation() {
+		URL url= TestPluginLauncher.class.getResource("TestPluginLauncher.class"); //$NON-NLS-1$
+		String s= url.toString();
+		int index= s.indexOf("/org.eclipse.jdt.ui.tests"); //$NON-NLS-1$
+		if (index == -1)
+			throw new IllegalArgumentException();
+		s= s.substring(0, index);
+		s= s + "/org.eclipse.core.boot/boot.jar"; //$NON-NLS-1$
+		return s;
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/AccessibilityTestPass.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/AccessibilityTestPass.java
new file mode 100644
index 0000000..d767872
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/AccessibilityTestPass.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin.util;
+
+
+import java.util.ArrayList;
+
+
+public class AccessibilityTestPass implements IDialogTestPass {
+	private static final int CHECKLIST_SIZE = 5;
+	
+	/**
+	 * @see IDialogTestPass#title()
+	 */
+	public String title() {
+		return "Test Pass: Accessibility";
+	}
+	/**
+	 * @see IDialogTestPass#description()
+	 */
+	public String description() {
+		return "Verify the accessibility of the dialogs.";
+	}
+	/**
+	 * @see IDialogTestPass#label()
+	 */
+	public String label() {
+		return "&Accessibility";
+	}	
+	/**
+	 * @see IDialogTestPass#checkListTexts()
+	 */
+	public ArrayList checkListTexts() {
+		ArrayList list = new ArrayList(CHECKLIST_SIZE);
+		list.add("&1) all widgets are accessible by tabbing.");
+		list.add("&2) forwards and backwards tabbing is in a logical order");
+		list.add("&3) all the widgets with labels have an appropriate mnemonic.");
+		list.add("&4) there are no duplicate mnemonics.");
+		list.add("&5) selectable widgets can be selected using the spacebar.");
+		return list;
+	}
+	/**
+	 * @see IDialogTestPass#failureTexts()
+	 * Size of the return array must be the same size as the checkListTexts'
+	 * ArrayList.
+	 */
+	public String[] failureTexts() {
+		String[] failureText = new String[CHECKLIST_SIZE];
+		failureText[0] = "Some widgets aren't accessible by tabbing.";
+		failureText[1] = "Tabbing order is illogical.";
+		failureText[2] = "Missing or inappropriate mnemonics.";
+		failureText[3] = "Duplicate mnemonics.";
+		failureText[4] = "Some widgets cannot be selected using the spacebar.";
+		return failureText;
+	}
+	/**
+	 * @see IDialogTestPass#queryText()
+	 */
+	public String queryText() {
+		return "Is the accessibility of the dialog acceptable?";
+	}
+	/**
+	 * @see IDialogTestPass#getID()
+	 */
+	public int getID() {
+		return VerifyDialog.TEST_ACCESS;
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/ExpectedStrings.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/ExpectedStrings.java
new file mode 100644
index 0000000..d0f16b3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/ExpectedStrings.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin.util;
+
+
+import java.util.Stack;
+/**
+ * @author Peter Graves
+ *
+ * This utility class maintains a list of strings, and as a tests finds strings
+ * in a structure/list, it will maintain a list of unfound/extra strings.
+ */
+public class ExpectedStrings {
+
+	public String [] expStrings;
+	private boolean[] foundStrings; 
+	private Stack extraStrings; 	/* A stack of the unecpected strings we 
+									 * recieved
+									 */
+	private boolean extra;
+
+	/**
+	 * Constructor for ExpectedStrings.
+	 */
+	public ExpectedStrings() {
+	}
+	/**
+	 * Constructor for ExpectedStrings that accepts a list of strings that
+	 * we expect to get.
+	 */
+	public ExpectedStrings(String[] values) {
+		int x;
+		expStrings=new String[values.length];
+		for (x=0;x<values.length;x++) {
+			expStrings[x]=new String(values[x]);
+		}
+		foundStrings=new boolean[values.length];
+		for (x=0;x<values.length;x++) {
+			foundStrings[x]=false;
+		}
+		extraStrings=new Stack();
+		extra=false;
+	}
+	
+	public int foundString(String current) {
+		int x;
+		for (x=0;x<expStrings.length;x++) {
+			if (current.equals(expStrings[x])) {
+				foundStrings[x]=true;
+				return(0);
+			}
+		}
+		/* If we arrive here, the strings was not found, so this is
+		 * and extra string
+		 */
+
+		 extraStrings.push(new String(current));
+		 extra=true;
+		 return(1);
+	}
+	public int getNum(String name) {
+		int x;
+		for (x=0;x<expStrings.length;x++) {
+			if (name.equals(expStrings[x]))
+				return(x);
+		}
+		return(-1);
+	}
+	public boolean gotAll() {
+		int x;
+		for (x=0;x<expStrings.length;x++) {
+			if (foundStrings[x]==false)
+				return(false);
+		}
+		return(true);
+	}
+	public boolean gotExtra() {
+		return(extra);
+	}
+	public String getMissingString() {
+		int x;
+		String missing = new String("Missing elements: ");
+		for (x=0;x<expStrings.length;x++) {
+			if (foundStrings[x]==false)
+				missing+=expStrings[x];
+				missing+=" ";
+		}
+		return(missing);
+	}
+	public String getExtraString() {
+		String extra= new String("Extra elements: ");
+		while (!extraStrings.empty()) {
+			extra+=extraStrings.pop();
+			extra+=" ";
+		}
+		return(extra);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/ExpectedStringsTests.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/ExpectedStringsTests.java
new file mode 100644
index 0000000..7f78aba
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/ExpectedStringsTests.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin.util;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * @author Peter Graves
+ *
+ *Some simple tests to make sure our ExtraStrings class seems to work.
+ */
+public class ExpectedStringsTests extends TestCase {
+
+	/**
+	 * Constructor for ExpectedStringsTests.
+	 * @param name
+	 */
+	public ExpectedStringsTests(String name) {
+		super(name);
+	}
+	    /**
+     * Sets up the test fixture.
+     *
+     * Called before every test case method.
+     * 
+     * Example code test the packages in the project 
+     *  "com.qnx.tools.ide.cdt.core"
+     */
+    protected void setUp() {
+
+
+    }
+    
+     /**
+     * Tears down the test fixture.
+     *
+     * Called after every test case method.
+     */
+    protected void tearDown() {
+       // release resources here and clean-up
+    }
+    
+    public static TestSuite suite() {
+        return new TestSuite(ExpectedStringsTests.class);
+    }
+    
+    public static void main (String[] args){
+        junit.textui.TestRunner.run(suite());
+    }
+
+	public void testGotAll() {
+		ExpectedStrings myExp;
+		String[] strings= {"stringOne", "stringTwo", "stringThree" };
+		
+		myExp=new ExpectedStrings(strings);
+		assertTrue("No found strings", !myExp.gotAll());
+		myExp.foundString("stringOne");
+		assertTrue("1 found strings", !myExp.gotAll());
+		myExp.foundString("stringTwo");
+		assertTrue("2 found strings", !myExp.gotAll());
+		myExp.foundString("stringThree");
+		assertTrue("All found strings", myExp.gotAll());
+		
+		
+	}
+	public void testGotExtra () {
+		ExpectedStrings myExp;
+		String[] strings= {"stringOne", "stringTwo", "stringThree" };
+		
+		myExp=new ExpectedStrings(strings);
+		assertTrue("No found strings", !myExp.gotExtra());
+		myExp.foundString("stringOne");
+		assertTrue("1 found strings", !myExp.gotExtra());
+		myExp.foundString("stringTwo");
+		assertTrue("2 found strings", !myExp.gotExtra());
+		myExp.foundString("stringThree");
+		assertTrue("All found strings", !myExp.gotExtra());
+		myExp.foundString("Somerandomestring");
+		assertTrue("Extra String", myExp.gotExtra());
+		
+	}
+	
+	public void testGetMissingString()
+	{
+		ExpectedStrings myExp;
+		String[] strings= {"stringOne", "stringTwo", "stringThree" };
+		
+		myExp=new ExpectedStrings(strings);
+		assertNotNull(myExp.getMissingString());
+		myExp.foundString("stringOne");
+		assertNotNull(myExp.getMissingString());
+		myExp.foundString("stringTwo");
+		assertNotNull(myExp.getMissingString());
+		myExp.foundString("stringThree");
+		assertNotNull(myExp.getMissingString());
+
+	}
+	
+	public void testGetExtraString()
+	{
+		ExpectedStrings myExp;
+		String[] strings= {"stringOne", "stringTwo", "stringThree" };
+		
+		myExp=new ExpectedStrings(strings);
+		assertNotNull(myExp.getExtraString());
+		myExp.foundString("stringOnenot");
+		assertNotNull(myExp.getMissingString());
+		myExp.foundString("stringTwonot");
+		assertNotNull(myExp.getMissingString());
+
+	}
+
+
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/FailureDialog.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/FailureDialog.java
new file mode 100644
index 0000000..f453579
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/FailureDialog.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin.util;
+ 
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.resource.JFaceResources;
+
+
+/*
+ * A dialog for collecting notes from the tester regarding
+ * the failure of a test.
+ */
+public class FailureDialog extends Dialog {
+	private Text _text;
+	private String _log;
+	private int SIZING_TEXT_WIDTH = 400;
+	private int SIZING_TEXT_HEIGHT = 200;
+	
+	/**
+	 * Constructor for FailureDialog
+	 */
+	public FailureDialog(Shell parentShell) {
+		super(parentShell);
+	}
+	/* (non-Javadoc)
+	 * Method declared on Window.
+	 */
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Dialog Test Failed");
+	}
+	/* (non-Javadoc)
+	 * Method declared on Dialog.
+	 */
+	protected void createButtonsForButtonBar(Composite parent) {
+		createButton(parent, IDialogConstants.OK_ID, "&OK", true);
+		createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
+	}
+	/* (non-Javadoc)
+	 * Method declared on Dialog.
+	 */
+	protected Control createDialogArea(Composite parent) {
+		// page group
+		Composite composite = (Composite)super.createDialogArea(parent);
+		composite.setSize( composite.computeSize(SWT.DEFAULT, SWT.DEFAULT) );
+		
+		Label label = new Label(composite, SWT.WRAP);
+		label.setText("&Enter a note regarding the failure:");
+		
+		_text = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+		_text.setFont( JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT) );
+		GridData data = new GridData(GridData.FILL_BOTH);
+		data.widthHint = SIZING_TEXT_WIDTH;
+		data.heightHint = SIZING_TEXT_HEIGHT;
+		_text.setLayoutData(data);
+		
+		return composite;
+	}
+	/* (non-Javadoc)
+	 * Method declared on Dialog.
+	 */
+	protected void okPressed() {		
+		_log = _text.getText();
+		super.okPressed();
+	}
+	/*
+	 * @return String the text contained in the input area of
+	 * the dialog.
+	 */
+	String getText() {
+		if (_log == null) {
+			return "Empty entry.";
+		} else {
+			return _log;
+		}
+	}
+	/*
+	 * Sets the text of the input area.  This should only be
+	 * called to set the initial text so only call before invoking
+	 * open().
+	 */
+	void setText(String text) {
+		_text.setText(text);
+	}
+	/*
+	 * Returns a string representation of this class which
+	 * the text contained in the input area of the dialog.
+	 */
+	public String toString() {
+		return getText();
+	}
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/FocusTestPass.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/FocusTestPass.java
new file mode 100644
index 0000000..69c5aaa
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/FocusTestPass.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin.util;
+
+import java.util.ArrayList;
+
+/*
+ * This test pass verifies the initial focus of a dialog
+ * when it is given focus.
+ */
+public class FocusTestPass implements IDialogTestPass {
+	private static final int CHECKLIST_SIZE = 1;
+
+
+	/**
+	 * @see IDialogTestPass#title()
+	 */
+	public String title() {
+		return "Test Pass: Initial Focus";
+	}
+	/**
+	 * @see IDialogTestPass#description()
+	 */
+	public String description() {
+		return "Verify the initial focus of the dialogs.";
+	}
+	/**
+	 * @see IDialogTestPass#label()
+	 */
+	public String label() {
+		return "&Initial Focus";
+	}	
+	/**
+	 * @see IDialogTestPass#checkListTexts()
+	 */
+	public ArrayList checkListTexts() {
+		ArrayList list = new ArrayList(CHECKLIST_SIZE);
+		list.add("&1) the initial focus is appropriate.");
+		return list;
+	}
+	/**
+	 * @see IDialogTestPass#failureTexts()
+	 * Size of the return array must be the same size as the checkListTexts'
+	 * ArrayList.
+	 */
+	public String[] failureTexts() {
+		String[] failureText = new String[CHECKLIST_SIZE];
+		failureText[0] = "The initial focus is inappropriate.";
+		return failureText;
+	}
+	/**
+	 * @see IDialogTestPass#queryText()
+	 */
+	public String queryText() {
+		return "Is the initial focus of the dialog correct?";
+	}
+	/**
+	 * @see IDialogTestPass#getID()
+	 */
+	public int getID() {
+		return VerifyDialog.TEST_FOCUS;
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/IDialogTestPass.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/IDialogTestPass.java
new file mode 100644
index 0000000..5d48349
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/IDialogTestPass.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin.util;
+
+
+import java.util.ArrayList;
+
+
+/*
+ * Interface to describe a visual test pass for a dialog test.
+ */
+public interface IDialogTestPass {
+	/*
+	 * @return String The title of the test pass.
+	 */
+	public String title();
+	/*
+	 * @return String The description of the test pass.
+	 */
+	public String description();
+	/*
+	 * @return String The label of the test pass to be used
+	 * in a selection list.  The return includes an '&'
+	 * if a mnemonic is desired.
+	 */
+	public String label();
+	/*
+	 * @return ArrayList A list of items to appear in a checklist.
+	 * The items in the list must be Strings and should include an
+	 * '&' if a mnemonic is desired.
+	 */
+	public ArrayList checkListTexts();
+	/*
+	 * @return String[] Associated failure messages that correspond
+	 * to the checklist items.  The size of this array should be the
+	 * same size as the checklist.
+	 */
+	public String[] failureTexts();
+	/*
+	 * @return String The test that corresponds to the test pass to
+	 * which the tester will respond with a 'yes' or 'no'.
+	 */
+	public String queryText();
+	/*
+	 * @return int A unique number that identifies the test pass.
+	 */
+	public int getID();
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/SizingTestPass.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/SizingTestPass.java
new file mode 100644
index 0000000..d295b62
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/SizingTestPass.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin.util;
+
+import java.util.ArrayList;
+
+/*
+ * This test pass verifies visually the sizing of the dialog and its
+ * widgets.
+ */
+class SizingTestPass implements IDialogTestPass {
+	private static final int CHECKLIST_SIZE = 5;
+
+	/**
+	 * @see IDialogTestPass#title()
+	 */
+	public String title() {
+		return "Test Pass: Sizing and Display";
+	}
+	/**
+	 * @see IDialogTestPass#description()
+	 */
+	public String description() {
+		return "Verify the sizing and display of the dialogs and widgets.";
+	}
+	/**
+	 * @see IDialogTestPass#label()
+	 */
+	public String label() {
+		return "&Sizing and Display";
+	}	
+	/**
+	 * @see IDialogTestPass#checkListTexts()
+	 */
+	public ArrayList checkListTexts() {
+		ArrayList list = new ArrayList(CHECKLIST_SIZE);
+		list.add("&1) the correct dialog displays.");
+		list.add("&2) the dialog is an appropriate size for the required resolution (1024x768).");
+		list.add("&3) the texts are correct and not cut off.");
+		list.add("&4) all strings have been externalized properly.");
+		list.add("&5) all the widgets are viewable and not cut off.");
+		return list;
+	}
+	/**
+	 * @see IDialogTestPass#failureTexts()
+	 * Size of the return array must be the same size as the checkListTexts'
+	 * ArrayList.
+	 */
+	public String[] failureTexts() {
+		String[] failureText = new String[CHECKLIST_SIZE];
+		failureText[0] = "The wrong dialog displayed.";
+		failureText[1] = "The dialog is too large for the required resolution.";
+		failureText[2] = "Text labels are wrong or cut off.";
+		failureText[3] = "Some strings have not been externalized properly.";
+		failureText[4] = "Some widgets are cut off.";
+		return failureText;
+	}
+	/**
+	 * @see IDialogTestPass#queryText()
+	 */
+	public String queryText() {
+		return "Is the sizing and display of the dialog correct?";
+	}
+	/**
+	 * @see IDialogTestPass#getID()
+	 */
+	public int getID() {
+		return VerifyDialog.TEST_SIZING;
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/StringAsserts.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/StringAsserts.java
new file mode 100644
index 0000000..22bbbc3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/StringAsserts.java
@@ -0,0 +1,192 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin.util;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import junit.framework.Assert;
+
+/**
+ *
+ */
+abstract public class StringAsserts {
+	private StringAsserts() {
+		super();
+	}
+	
+	private static int getDiffPos(String str1, String str2) {
+		int len1= Math.min(str1.length(), str2.length());
+		
+		int diffPos= -1;
+		for (int i= 0; i < len1; i++) {
+			if (str1.charAt(i) != str2.charAt(i)) {
+				diffPos= i;
+				break;
+			}
+		}
+		if (diffPos == -1 && str1.length() != str2.length()) {
+			diffPos= len1;
+		}
+		return diffPos;
+	}
+	
+	private static final int printRange= 6;
+	
+	public static void assertEqualString(String actual, String expected) {	
+		if (actual == null || expected == null) {
+			if (actual == expected) {
+				return;
+			}
+			if (actual == null) {
+				Assert.assertTrue("Content not as expected: is 'null' expected: " + expected, false);
+			} else {
+				Assert.assertTrue("Content not as expected: expected 'null' is: " + actual, false);
+			}
+		}
+		
+		int diffPos= getDiffPos(actual, expected);
+		if (diffPos != -1) {
+			int diffAhead= Math.max(0, diffPos - printRange);
+			int diffAfter= Math.min(actual.length(), diffPos + printRange);
+			
+			String diffStr= actual.substring(diffAhead, diffPos) + '^' + actual.substring(diffPos, diffAfter);
+			
+			// use detailed message
+			String message= "Content not as expected: is\n" + actual + "\nDiffers at pos " + diffPos + ": " + diffStr + "\nexpected:\n" + expected;  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			
+			Assert.assertEquals(message, expected, actual);
+		}
+	}
+	
+	public static void assertEqualStringIgnoreDelim(String actual, String expected) throws IOException {
+		if (actual == null || expected == null) {
+			if (actual == expected) {
+				return;
+			}
+			if (actual == null) {
+				Assert.assertTrue("Content not as expected: is 'null' expected: " + expected, false);
+			} else {
+				Assert.assertTrue("Content not as expected: expected 'null' is: " + actual, false);
+			}
+		}
+		
+		BufferedReader read1= new BufferedReader(new StringReader(actual));
+		BufferedReader read2= new BufferedReader(new StringReader(expected));
+		
+		int line= 1;
+		do {
+			String s1= read1.readLine();
+			String s2= read2.readLine();
+			
+			if (s1 == null || !s1.equals(s2)) {
+				if (s1 == null && s2 == null) {
+					return;
+				}
+				String diffStr= (s1 == null) ? s2 : s1;
+				
+				String message= "Content not as expected: Content is: \n" + actual + "\nDiffers at line " + line + ": " + diffStr + "\nExpected contents: \n" + expected;
+				Assert.assertEquals(message, expected, actual);
+			}
+			line++;
+		} while (true);
+	}	
+	
+	public static void assertEqualStringsIgnoreOrder(String[] actuals, String[] expecteds) {
+		ArrayList<String> list1= new ArrayList<String>(Arrays.asList(actuals));
+		ArrayList<String> list2= new ArrayList<String>(Arrays.asList(expecteds));
+		
+		for (int i= list1.size() - 1; i >= 0; i--) {
+			if (list2.remove(list1.get(i))) {
+				list1.remove(i);
+			}
+		}
+		
+		int n1= list1.size();
+		int n2= list2.size();
+		
+		if (n1 + n2 > 0) {
+			if (n1 == 1 && n2 == 1) {
+				assertEqualString((String) list1.get(0), (String) list2.get(0));
+			}
+			
+			StringBuffer buf= new StringBuffer();
+			for (int i= 0; i < n1; i++) {
+				String s1= (String) list1.get(i);
+				if (s1 != null) {
+					buf.append(s1);
+					buf.append("\n");
+				}
+			}
+			String actual= buf.toString();
+			
+			buf= new StringBuffer();
+			for (int i= 0; i < n2; i++) {
+				String s2= (String) list2.get(i);
+				if (s2 != null) {
+					buf.append(s2);
+					buf.append("\n");
+				}
+			}
+			String expected= buf.toString();
+
+			String message= "Content not as expected: Content is: \n" + actual + "\nExpected contents: \n" + expected;
+			Assert.assertEquals(message, expected, actual);
+		}				
+	}
+	
+	public static void assertExpectedExistInProposals(String[] actuals, String[] expecteds) {
+		ArrayList<String> list1= new ArrayList<String>(Arrays.asList(actuals));
+		ArrayList<String> list2= new ArrayList<String>(Arrays.asList(expecteds));
+		
+		for (int i= list1.size() - 1; i >= 0; i--) {
+			if (list2.remove(list1.get(i))) {
+				list1.remove(i);
+			}
+		}
+		
+		int n1= list1.size();
+		int n2= list2.size();
+		
+		if (n2 > 0) {
+			if (n1 == 1 && n2 == 1) {
+				assertEqualString((String) list1.get(0), (String) list2.get(0));
+			}
+			
+			StringBuffer buf= new StringBuffer();
+			for (int i= 0; i < n1; i++) {
+				String s1= (String) list1.get(i);
+				if (s1 != null) {
+					buf.append(s1);
+					buf.append("\n");
+				}
+			}
+			String actual= buf.toString();
+			
+			buf= new StringBuffer();
+			for (int i= 0; i < n2; i++) {
+				String s2= (String) list2.get(i);
+				if (s2 != null) {
+					buf.append(s2);
+					buf.append("\n");
+				}
+			}
+			String expected= buf.toString();
+
+			String message= "Content not as expected: Content is: \n" + actual + "\nExpected contents: \n" + expected;
+			Assert.assertEquals(message, expected, actual);
+		}
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/VerifyDialog.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/VerifyDialog.java
new file mode 100644
index 0000000..684a55d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/util/VerifyDialog.java
@@ -0,0 +1,315 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.testplugin.util;
+
+
+import java.util.Iterator;
+
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.ShellAdapter;
+import org.eclipse.swt.events.ShellEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+
+/*
+ * This dialog is intended to verify a dialogs in a testing
+ * environment.  The tester can test for sizing, initial focus,
+ * or accessibility.
+ */
+public class VerifyDialog extends TitleAreaDialog {
+	private int SIZING_WIDTH = 400;
+	
+	static int      TEST_TYPE;
+	public static final int TEST_SIZING = 0;
+	public static final int TEST_FOCUS  = 1;
+	public static final int TEST_ACCESS = 2;
+	private IDialogTestPass _dialogTests[] = new IDialogTestPass[3];
+
+
+	private Dialog _testDialog; //the dialog to test
+	private Point  _testDialogSize;
+	
+	private Label  _queryLabel;
+	Button _yesButton;
+	private Button _noButton;
+	private Button _checkList[];
+	private String _failureText;
+	
+	/*
+	 * Create an instance of the verification dialog.
+	 */
+	public VerifyDialog(Shell parent) {
+		super(parent);
+		if ( !(TEST_TYPE <= 2) && !(TEST_TYPE >= 0) ) {
+			TEST_TYPE = TEST_SIZING;
+		}
+		_failureText = "";
+		_dialogTests[0] = new SizingTestPass();
+		_dialogTests[1] = new FocusTestPass();
+		_dialogTests[2] = new AccessibilityTestPass();
+	}
+	
+	/* (non-Javadoc)
+	 * Method declared on Window.
+	 */
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText("Dialog Verification");
+		setShellStyle(SWT.NONE);
+	}
+	/* (non-Javadoc)
+	 * Method declared on Dialog.
+	 */
+	protected void createButtonsForButtonBar(Composite parent) {
+		_yesButton = createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL, true);
+		_noButton = createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL, false);
+	}
+	/* (non-Javadoc)
+	 * Method declared on Dialog.
+	 */
+	protected void buttonPressed(int buttonId) {
+		if (IDialogConstants.YES_ID == buttonId) {
+			setReturnCode(IDialogConstants.YES_ID);
+			if (_testDialog.getShell() != null) {
+				_testDialog.close();
+			}
+			close();
+		} else if (IDialogConstants.NO_ID == buttonId) {
+			handleFailure();
+		}
+	}
+	/* (non-Javadoc)
+	 * Method declared on Dialog.
+	 */
+	protected Control createDialogArea(Composite parent) {
+		// top level composite
+		Composite parentComposite = (Composite)super.createDialogArea(parent);
+
+
+		// create a composite with standard margins and spacing
+		Composite composite = new Composite(parentComposite, SWT.NONE);
+		composite.setSize(SIZING_WIDTH, SWT.DEFAULT);
+		GridLayout layout = new GridLayout();
+		layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+		layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+		layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+		composite.setLayout(layout);
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+
+		createTestSelectionGroup(composite);
+		createCheckListGroup(composite);
+
+
+		_queryLabel = new Label(composite, SWT.NONE);
+		_queryLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		
+		initializeTest();
+		return composite;
+	}
+	/*
+	 * Group for selecting type of test.
+	 */
+	private void createTestSelectionGroup(Composite parent) {
+		Group group = new Group(parent, SWT.SHADOW_NONE);
+		group.setText("Testing:");
+		group.setLayout( new GridLayout() );
+		GridData data = new GridData(GridData.FILL_HORIZONTAL);
+		group.setLayoutData(data);
+		
+		for (int i = 0; i < _dialogTests.length; i++) {
+			Button radio = new Button(group, SWT.RADIO);
+			radio.setText( _dialogTests[i].label() );
+			final int testID = _dialogTests[i].getID();
+			radio.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					TEST_TYPE = testID;
+					initializeTest();
+					_yesButton.setEnabled(true);
+				}
+			});
+			if ( TEST_TYPE == _dialogTests[i].getID() ) {
+				radio.setSelection(true);
+			}
+		}
+	}
+	/*
+	 * Initializes the checklist with empty checks.
+	 */
+	private void createCheckListGroup(Composite parent) {
+		Group group = new Group(parent, SWT.SHADOW_NONE);
+		group.setText("Verify that:");
+		group.setLayout( new GridLayout() );
+		GridData data = new GridData(GridData.FILL_HORIZONTAL);
+		group.setLayoutData(data);
+		
+		int checkListSize = 0;
+		for (int i = 0; i < _dialogTests.length; i++) {
+			int size = _dialogTests[i].checkListTexts().size();
+			if (size > checkListSize) {
+				checkListSize = size;
+			}
+		}
+		_checkList = new Button[checkListSize];
+		SelectionAdapter selectionAdapter = new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				checkYesEnable();
+			}
+		};
+		for (int i = 0; i < checkListSize; i++) {
+			_checkList[i] = new Button(group, SWT.CHECK);
+			_checkList[i].addSelectionListener(selectionAdapter);
+			data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+			data.grabExcessHorizontalSpace = true;
+			_checkList[i].setLayoutData(data);
+		}		
+	}
+	/*
+	 * Disables the yes button if any of the items in the checklist
+	 * are unchecked.  Enables the yes button otherwise.
+	 */
+	void checkYesEnable() {
+		boolean enable = true;
+		for (int i = 0; i < _checkList.length; i++) {
+			if ( !_checkList[i].getSelection() ) {
+				enable = false;
+			}			
+		}
+		_yesButton.setEnabled(enable);
+	}
+	/*
+	 * Initializes the checklist, banner texts, and query label
+	 */
+	void initializeTest() {
+		IDialogTestPass test = _dialogTests[TEST_TYPE];
+		setTitle( test.title() );
+		setMessage( test.description() );
+		Iterator iterator = test.checkListTexts().iterator();
+		for (int i = 0; i < _checkList.length; i++) {
+			if ( iterator.hasNext() ) {
+				_checkList[i].setText( iterator.next().toString() );
+				_checkList[i].setVisible(true);
+				_checkList[i].update();
+			} else {
+				_checkList[i].setVisible(false);
+				_checkList[i].update();
+			}
+			_checkList[i].setSelection(true);
+		}
+		_queryLabel.setText( test.queryText() );
+	}
+	public String getFailureText() {
+		return _failureText;
+	}
+	/*
+	 * Can't open the verification dialog without a specified
+	 * test dialog, this simply returns a failure and prevents
+	 * opening.  Should use open(Dialog) instead.
+	 * 
+	 */
+	public int open() {
+		_failureText = "Testing dialog is required, use VerifyDialog::open(Dialog)";
+		return IDialogConstants.NO_ID;
+	}
+	/*
+	 * Opens the verification dialog to test the specified dialog.
+	 */
+	public int open(Dialog testDialog) {
+		if (getShell() == null) {
+			create();
+		}
+		getShell().setLocation(0, 0);
+		getShell().setSize(Math.max(SIZING_WIDTH, getShell().getSize().x), getShell().getSize().y);
+		_testDialog = testDialog;
+		if (_testDialog.getShell() == null) {
+			_testDialog.create();
+		}
+		_testDialogSize = _testDialog.getShell().getSize();
+		openNewTestDialog();
+		
+		return super.open();
+	}
+	/*
+	 * Opens the dialog to be verified.
+	 */
+	private void openNewTestDialog() {
+		if (_testDialog.getShell() == null) {
+			_testDialog.create();
+		}
+		_testDialog.setBlockOnOpen(false);
+		_testDialog.getShell().setLocation(getShell().getSize().x + 1, 0);
+		_testDialog.getShell().setSize(_testDialogSize);
+		_testDialog.getShell().addShellListener(new ShellAdapter() {
+			public void shellClosed(ShellEvent e) {				
+				e.doit = false;
+			}
+		
+		});		
+		_testDialog.open();
+	}
+	/*
+	 * The test dialog failed, open the failure dialog.
+	 */
+	private void handleFailure() {
+		IDialogTestPass test = _dialogTests[TEST_TYPE];
+		StringBuffer text = new StringBuffer();
+		String label = test.label();
+		label = label.substring(0, label.indexOf("&")) +
+		        label.substring(label.indexOf("&") + 1);
+		text.append(label).
+		     append(" failed on the ").
+		     append(SWT.getPlatform()).
+		     append(" platform:\n");
+		
+		String failureMessages[] = test.failureTexts();
+		for (int i = 0; i < test.checkListTexts().size(); i++) {
+			if ( !_checkList[i].getSelection() ) {
+				text.append("- ").append(failureMessages[i]).append("\n");
+			}
+		}
+		FailureDialog dialog = new FailureDialog( getShell() );
+		dialog.create();
+		//String temp = text.toString();
+		dialog.setText( text.toString() );
+		if (dialog.open() == IDialogConstants.OK_ID) {
+			_failureText = dialog.toString();
+			setReturnCode(IDialogConstants.NO_ID);
+			if (_testDialog.getShell() != null) {
+				_testDialog.close();
+			}
+			close();
+		}
+	}
+	/*
+	 * In case the shell was closed by a means other than
+	 * the NO button.
+	 */
+	protected void handleShellCloseEvent() {
+		handleFailure();
+	}
+}
+
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/CPPPopulateASTViewAction.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/CPPPopulateASTViewAction.java
new file mode 100644
index 0000000..4e84faa
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/CPPPopulateASTViewAction.java
@@ -0,0 +1,386 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM Rational Software - Initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.DOMAST;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTInitializer;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
+import org.eclipse.cdt.core.dom.ast.IASTProblem;
+import org.eclipse.cdt.core.dom.ast.IASTProblemHolder;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
+import org.eclipse.cdt.core.parser.util.ArrayUtil;
+
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+
+/**
+ * @author dsteffle
+ */
+public class CPPPopulateASTViewAction extends CPPASTVisitor implements IPopulateDOMASTAction {
+	private static final int INITIAL_PROBLEM_SIZE = 4;
+	{
+		shouldVisitNames          = true;
+		shouldVisitDeclarations   = true;
+		shouldVisitInitializers   = true;
+		shouldVisitParameterDeclarations = true;
+		shouldVisitDeclarators    = true;
+		shouldVisitDeclSpecifiers = true;
+		shouldVisitExpressions    = true;
+		shouldVisitStatements     = true;
+		shouldVisitTypeIds        = true;
+		shouldVisitEnumerators    = true;
+		shouldVisitBaseSpecifiers = true;
+		shouldVisitNamespaces     = true;
+		shouldVisitTemplateParameters= true;
+	}
+
+	DOMASTNodeParent root = null;
+	IProgressMonitor monitor = null;
+	IASTProblem[] astProblems = new IASTProblem[INITIAL_PROBLEM_SIZE];
+	
+	public CPPPopulateASTViewAction(IASTTranslationUnit tu, IProgressMonitor monitor) {
+		root = new DOMASTNodeParent(tu);
+		this.monitor = monitor;
+	}
+	
+	private class DOMASTNodeLeafContinue extends DOMASTNodeLeaf {
+		public DOMASTNodeLeafContinue(IASTNode node) {
+			super(node);
+		}
+	}
+
+	/** 
+	 * return null if the algorithm should stop (monitor was cancelled)
+	 * return DOMASTNodeLeafContinue if the algorithm should continue but no valid DOMASTNodeLeaf was added (i.e. node was null
+	 * return the DOMASTNodeLeaf added to the DOM AST View's model otherwise 
+	 * 
+	 * @param node
+	 * @return
+	 */
+	private DOMASTNodeLeaf addRoot(IASTNode node) {
+        if (monitor != null && monitor.isCanceled()) return null;
+        if (node == null) return new DOMASTNodeLeafContinue(null);
+        
+        // only do length check for ASTNode (getNodeLocations on PreprocessorStatements is very expensive)
+        if (node instanceof ASTNode && ((ASTNode)node).getLength() <= 0)
+            return new DOMASTNodeLeafContinue(null);
+        
+        DOMASTNodeParent parent = null;
+        
+        // if it's a preprocessor statement being merged then do a special search for parent (no search)
+        if (node instanceof IASTPreprocessorStatement) {
+            parent = root;  
+        } else {
+            IASTNode tempParent = node.getParent();
+            if (tempParent instanceof IASTPreprocessorStatement) {
+                parent = root.findTreeParentForMergedNode(node);
+            } else {
+                parent = root.findTreeParentForNode(node);              
+            }
+        }
+        
+        if (parent == null)
+            parent = root;
+        
+        return createNode(parent, node);
+	}
+    
+    private DOMASTNodeLeaf createNode(DOMASTNodeParent parent, IASTNode node) {
+        DOMASTNodeParent tree = new DOMASTNodeParent(node);
+        parent.addChild(tree);
+        
+        // set filter flags
+        if (node instanceof IASTProblemHolder || node instanceof IASTProblem) { 
+            tree.setFiltersFlag(DOMASTNodeLeaf.FLAG_PROBLEM);
+            
+            if (node instanceof IASTProblemHolder)
+                astProblems = (IASTProblem[])ArrayUtil.append(IASTProblem.class, astProblems, ((IASTProblemHolder)node).getProblem());
+            else
+                astProblems = (IASTProblem[])ArrayUtil.append(IASTProblem.class, astProblems, node);
+        }
+        if (node instanceof IASTPreprocessorStatement)
+            tree.setFiltersFlag(DOMASTNodeLeaf.FLAG_PREPROCESSOR);
+        if (node instanceof IASTPreprocessorIncludeStatement)
+            tree.setFiltersFlag(DOMASTNodeLeaf.FLAG_INCLUDE_STATEMENTS);
+		
+		return tree;
+    }
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor.CPPBaseVisitorAction#processDeclaration(org.eclipse.cdt.core.dom.ast.IASTDeclaration)
+	 */
+	@Override
+	public int visit(IASTDeclaration declaration) {
+		DOMASTNodeLeaf temp = addRoot(declaration);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor.CPPBaseVisitorAction#processDeclarator(org.eclipse.cdt.core.dom.ast.IASTDeclarator)
+	 */
+	@Override
+	public int visit(IASTDeclarator declarator) {
+		DOMASTNodeLeaf temp =  addRoot(declarator);
+		
+		IASTPointerOperator[] ops = declarator.getPointerOperators();
+		for(int i=0; i<ops.length; i++)
+			addRoot(ops[i]);
+				
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor.CPPBaseVisitorAction#processBaseSpecifier(org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier)
+	 */
+	@Override
+	public int visit(ICPPASTBaseSpecifier specifier) {
+		DOMASTNodeLeaf temp = addRoot(specifier);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor.CPPBaseVisitorAction#processDeclSpecifier(org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier)
+	 */
+	@Override
+	public int visit(IASTDeclSpecifier declSpec) {
+		DOMASTNodeLeaf temp = addRoot(declSpec);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor.CPPBaseVisitorAction#processEnumerator(org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator)
+	 */
+	@Override
+	public int visit(IASTEnumerator enumerator) {
+		DOMASTNodeLeaf temp = addRoot(enumerator);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor.CPPBaseVisitorAction#processExpression(org.eclipse.cdt.core.dom.ast.IASTExpression)
+	 */
+	@Override
+	public int visit(IASTExpression expression) {
+		DOMASTNodeLeaf temp = addRoot(expression);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor.CPPBaseVisitorAction#processInitializer(org.eclipse.cdt.core.dom.ast.IASTInitializer)
+	 */
+	@Override
+	public int visit(IASTInitializer initializer) {
+		DOMASTNodeLeaf temp = addRoot(initializer);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor.CPPBaseVisitorAction#processName(org.eclipse.cdt.core.dom.ast.IASTName)
+	 */
+	@Override
+	public int visit(IASTName name) {
+		DOMASTNodeLeaf temp = null;
+		if (name.toString() != null)
+			temp = addRoot(name);
+		else
+			return PROCESS_CONTINUE;
+		
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor.CPPBaseVisitorAction#processNamespace(org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition)
+	 */
+	@Override
+	public int visit(ICPPASTNamespaceDefinition namespace) {
+		DOMASTNodeLeaf temp = addRoot(namespace);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor.CPPBaseVisitorAction#processParameterDeclaration(org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration)
+	 */
+	@Override
+	public int visit(
+			IASTParameterDeclaration parameterDeclaration) {
+		DOMASTNodeLeaf temp = addRoot(parameterDeclaration);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor.CPPBaseVisitorAction#processStatement(org.eclipse.cdt.core.dom.ast.IASTStatement)
+	 */
+	@Override
+	public int visit(IASTStatement statement) {
+		DOMASTNodeLeaf temp = addRoot(statement);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor.CPPBaseVisitorAction#processTypeId(org.eclipse.cdt.core.dom.ast.IASTTypeId)
+	 */
+	@Override
+	public int visit(IASTTypeId typeId) {
+		DOMASTNodeLeaf temp = addRoot(typeId);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor#visit(org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter)
+     */
+	@Override
+	public int visit(ICPPASTTemplateParameter templateParameter) {
+    	DOMASTNodeLeaf temp = addRoot(templateParameter);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+
+	private DOMASTNodeLeaf mergeNode(ASTNode node) {
+		DOMASTNodeLeaf leaf = addRoot(node);
+		
+		if (node instanceof IASTPreprocessorMacroDefinition)
+			addRoot(((IASTPreprocessorMacroDefinition)node).getName());
+		
+		return leaf;
+	}
+	
+	public DOMASTNodeLeaf[] mergePreprocessorStatements(IASTPreprocessorStatement[] statements) {
+		DOMASTNodeLeaf[] leaves = new DOMASTNodeLeaf[statements.length];
+		for(int i=0; i<statements.length; i++) {
+			if (monitor != null && monitor.isCanceled()) return leaves;
+			
+			if (statements[i] instanceof ASTNode)
+				leaves[i] = mergeNode((ASTNode)statements[i]);
+		}
+		
+		return leaves;
+	}
+	
+	public void mergePreprocessorProblems(IASTProblem[] problems) {
+		for(int i=0; i<problems.length; i++) {
+			if (monitor != null && monitor.isCanceled()) return;
+			
+			if (problems[i] instanceof ASTNode)
+			   mergeNode((ASTNode)problems[i]);
+		}
+	}
+	
+	public DOMASTNodeParent getTree() {
+		return root;
+	}
+	
+	public void groupIncludes(DOMASTNodeLeaf[] treeIncludes) {
+		// loop through the includes and make sure that all of the nodes 
+		// that are children of the TU are in the proper include (based on offset)
+		for (int i=treeIncludes.length - 1; i >= 0; i-- ) {
+			final DOMASTNodeLeaf nodeLeaf = treeIncludes[i];
+			if (nodeLeaf == null || !(nodeLeaf.getNode() instanceof IASTPreprocessorIncludeStatement)) continue;
+
+			final String path= ((IASTPreprocessorIncludeStatement) nodeLeaf.getNode()).getPath();
+			final DOMASTNodeLeaf[] children = root.getChildren(false);
+			for(int j=0; j < children.length; j++) {
+//				if (monitor != null && monitor.isCanceled()) return; // this causes a deadlock when checked here
+				final DOMASTNodeLeaf child = children[j];
+				if (child != null && child != nodeLeaf && 
+						child.getNode().getContainingFilename().equals(path)) {
+					root.removeChild(child);
+					((DOMASTNodeParent)nodeLeaf).addChild(child);
+				}
+			}
+		}
+	}
+	
+	public IASTProblem[] getASTProblems() {
+		return astProblems;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/CPopulateASTViewAction.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/CPopulateASTViewAction.java
new file mode 100644
index 0000000..52ee769
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/CPopulateASTViewAction.java
@@ -0,0 +1,349 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM Rational Software - Initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.DOMAST;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTInitializer;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
+import org.eclipse.cdt.core.dom.ast.IASTProblem;
+import org.eclipse.cdt.core.dom.ast.IASTProblemHolder;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator;
+import org.eclipse.cdt.core.dom.ast.c.CASTVisitor;
+import org.eclipse.cdt.core.dom.ast.c.ICASTDesignator;
+import org.eclipse.cdt.core.parser.util.ArrayUtil;
+
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+
+/**
+ * @author dsteffle
+ */
+public class CPopulateASTViewAction extends CASTVisitor implements IPopulateDOMASTAction {
+	private static final int INITIAL_PROBLEM_SIZE = 4;
+	{
+		shouldVisitNames          = true;
+		shouldVisitDeclarations   = true;
+		shouldVisitInitializers   = true;
+		shouldVisitParameterDeclarations = true;
+		shouldVisitDeclarators    = true;
+		shouldVisitDeclSpecifiers = true;
+		shouldVisitDesignators 	  = true;
+		shouldVisitExpressions    = true;
+		shouldVisitStatements     = true;
+		shouldVisitTypeIds        = true;
+		shouldVisitEnumerators    = true;
+	}
+
+	DOMASTNodeParent root = null;
+	IProgressMonitor monitor = null;
+	IASTProblem[] astProblems = new IASTProblem[INITIAL_PROBLEM_SIZE];
+	
+	public CPopulateASTViewAction(IASTTranslationUnit tu, IProgressMonitor monitor) {
+		root = new DOMASTNodeParent(tu);
+		this.monitor = monitor;
+	}
+	
+	private class DOMASTNodeLeafContinue extends DOMASTNodeLeaf {
+		public DOMASTNodeLeafContinue(IASTNode node) {
+			super(node);
+		}
+	}
+
+	/** 
+	 * return null if the algorithm should stop (monitor was cancelled)
+	 * return DOMASTNodeLeafContinue if the algorithm should continue but no valid DOMASTNodeLeaf was added (i.e. node was null
+	 * return the DOMASTNodeLeaf added to the DOM AST View's model otherwise 
+	 * 
+	 * @param node
+	 * @return
+	 */
+	private DOMASTNodeLeaf addRoot(IASTNode node) {
+		if (monitor != null && monitor.isCanceled()) return null;
+		if (node == null) return new DOMASTNodeLeafContinue(null);
+		
+        // only do length check for ASTNode (getNodeLocations on PreprocessorStatements is very expensive)
+        if (node instanceof ASTNode && ((ASTNode)node).getLength() <= 0)
+            return new DOMASTNodeLeafContinue(null);
+        
+        DOMASTNodeParent parent = null;
+        
+        // if it's a preprocessor statement being merged then do a special search for parent (no search)
+        if (node instanceof IASTPreprocessorStatement) {
+            parent = root;  
+        } else {
+            IASTNode tempParent = node.getParent();
+            if (tempParent instanceof IASTPreprocessorStatement) {
+                parent = root.findTreeParentForMergedNode(node);
+            } else {
+                parent = root.findTreeParentForNode(node);              
+            }
+        }
+        
+        if (parent == null)
+            parent = root;
+        
+        return createNode(parent, node);
+	}
+    
+    private DOMASTNodeLeaf createNode(DOMASTNodeParent parent, IASTNode node) {
+        DOMASTNodeParent tree = new DOMASTNodeParent(node);
+        parent.addChild(tree);
+        
+        // set filter flags
+        if (node instanceof IASTProblemHolder || node instanceof IASTProblem) { 
+            tree.setFiltersFlag(DOMASTNodeLeaf.FLAG_PROBLEM);
+            
+            if (node instanceof IASTProblemHolder)
+                astProblems = (IASTProblem[])ArrayUtil.append(IASTProblem.class, astProblems, ((IASTProblemHolder)node).getProblem());
+            else
+                astProblems = (IASTProblem[])ArrayUtil.append(IASTProblem.class, astProblems, node);
+        }
+        if (node instanceof IASTPreprocessorStatement)
+            tree.setFiltersFlag(DOMASTNodeLeaf.FLAG_PREPROCESSOR);
+        if (node instanceof IASTPreprocessorIncludeStatement)
+            tree.setFiltersFlag(DOMASTNodeLeaf.FLAG_INCLUDE_STATEMENTS);
+		
+		return tree;
+    }
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor.CPPBaseVisitorAction#processDeclaration(org.eclipse.cdt.core.dom.ast.IASTDeclaration)
+	 */
+	public int visit(IASTDeclaration declaration) {
+		DOMASTNodeLeaf temp = addRoot(declaration);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor.CPPBaseVisitorAction#processDeclarator(org.eclipse.cdt.core.dom.ast.IASTDeclarator)
+	 */
+	public int visit(IASTDeclarator declarator) {
+		DOMASTNodeLeaf temp = addRoot(declarator);
+		
+		IASTPointerOperator[] ops = declarator.getPointerOperators();
+		for(int i=0; i<ops.length; i++)
+			addRoot(ops[i]);
+		
+		if (declarator instanceof IASTArrayDeclarator) {
+			IASTArrayModifier[] mods = ((IASTArrayDeclarator)declarator).getArrayModifiers();
+			for(int i=0; i<mods.length; i++)
+				addRoot(mods[i]);	
+		}
+		
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processDesignator(org.eclipse.cdt.core.dom.ast.c.ICASTDesignator)
+	 */
+	public int visit(ICASTDesignator designator) {
+		DOMASTNodeLeaf temp = addRoot(designator);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processDeclSpecifier(org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier)
+	 */
+	public int visit(IASTDeclSpecifier declSpec) {
+		DOMASTNodeLeaf temp = addRoot(declSpec);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processEnumerator(org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator)
+	 */
+	public int visit(IASTEnumerator enumerator) {
+		DOMASTNodeLeaf temp = addRoot(enumerator);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processExpression(org.eclipse.cdt.core.dom.ast.IASTExpression)
+	 */
+	public int visit(IASTExpression expression) {
+		DOMASTNodeLeaf temp = addRoot(expression);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processInitializer(org.eclipse.cdt.core.dom.ast.IASTInitializer)
+	 */
+	public int visit(IASTInitializer initializer) {
+		DOMASTNodeLeaf temp = addRoot(initializer);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processName(org.eclipse.cdt.core.dom.ast.IASTName)
+	 */
+	public int visit(IASTName name) {
+		DOMASTNodeLeaf temp = null;
+		if ( name.toString() != null )
+			temp = addRoot(name);
+		else
+			return PROCESS_CONTINUE;
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processParameterDeclaration(org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration)
+	 */
+	public int visit(
+			IASTParameterDeclaration parameterDeclaration) {
+		DOMASTNodeLeaf temp = addRoot(parameterDeclaration);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processStatement(org.eclipse.cdt.core.dom.ast.IASTStatement)
+	 */
+	public int visit(IASTStatement statement) {
+		DOMASTNodeLeaf temp = addRoot(statement);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.internal.core.dom.parser.c.CVisitor.CBaseVisitorAction#processTypeId(org.eclipse.cdt.core.dom.ast.IASTTypeId)
+	 */
+	public int visit(IASTTypeId typeId) {
+		DOMASTNodeLeaf temp = addRoot(typeId);
+		if (temp == null)
+			return PROCESS_ABORT;
+		else if (temp instanceof DOMASTNodeLeafContinue)
+			return PROCESS_CONTINUE;
+		else
+			return PROCESS_CONTINUE;
+	}
+	
+	private DOMASTNodeLeaf mergeNode(ASTNode node) {
+		DOMASTNodeLeaf temp = addRoot(node);
+		
+		if (node instanceof IASTPreprocessorMacroDefinition )
+			addRoot(((IASTPreprocessorMacroDefinition)node).getName());
+		
+		return temp;
+	}
+	
+	public DOMASTNodeLeaf[] mergePreprocessorStatements(IASTPreprocessorStatement[] statements) {
+		DOMASTNodeLeaf[] leaves = new DOMASTNodeLeaf[statements.length];
+		for(int i=0; i<statements.length; i++) {
+			if (monitor != null && monitor.isCanceled()) return leaves;
+			
+			if (statements[i] instanceof ASTNode)
+				leaves[i] = mergeNode((ASTNode)statements[i]);
+		}
+		
+		return leaves;
+	}
+	
+	public void mergePreprocessorProblems(IASTProblem[] problems) {
+		for(int i=0; i<problems.length; i++) {
+			if (monitor != null && monitor.isCanceled()) return;
+			
+			if (problems[i] instanceof ASTNode)
+			   mergeNode((ASTNode)problems[i]);
+		}
+	}
+	
+	public DOMASTNodeParent getTree() {
+		return root;
+	}
+	
+	public void groupIncludes(DOMASTNodeLeaf[] treeIncludes) {
+		// loop through the includes and make sure that all of the nodes 
+		// that are children of the TU are in the proper include (based on offset)
+		for (int i=treeIncludes.length - 1; i >= 0; i-- ) {
+			final DOMASTNodeLeaf nodeLeaf = treeIncludes[i];
+			if (nodeLeaf == null || !(nodeLeaf.getNode() instanceof IASTPreprocessorIncludeStatement)) continue;
+
+			final String path= ((IASTPreprocessorIncludeStatement) nodeLeaf.getNode()).getPath();
+			final DOMASTNodeLeaf[] children = root.getChildren(false);
+			for(int j=0; j < children.length; j++) {
+//				if (monitor != null && monitor.isCanceled()) return; // this causes a deadlock when checked here
+				final DOMASTNodeLeaf child = children[j];
+				if (child != null && child != nodeLeaf && 
+						child.getNode().getContainingFilename().equals(path)) {
+					root.removeChild(child);
+					((DOMASTNodeParent)nodeLeaf).addChild(child);
+				}
+			}
+		}
+	}
+	
+	public IASTProblem[] getASTProblems() {
+		return astProblems;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMAST.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMAST.java
new file mode 100644
index 0000000..4d8d138
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMAST.java
@@ -0,0 +1,1167 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM Rational Software - Initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.DOMAST;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.DrillDownAdapter;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
+import org.eclipse.ui.views.properties.PropertySheet;
+
+import org.eclipse.cdt.core.dom.ast.ASTSignatureUtil;
+import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTInitializer;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
+import org.eclipse.cdt.core.dom.ast.IASTProblem;
+import org.eclipse.cdt.core.dom.ast.IASTProblemDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTProblemExpression;
+import org.eclipse.cdt.core.dom.ast.IASTProblemStatement;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator;
+import org.eclipse.cdt.core.dom.ast.c.ICASTDesignator;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorChainInitializer;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.parser.ParserUtil;
+import org.eclipse.cdt.core.resources.FileStorage;
+import org.eclipse.cdt.ui.actions.CustomFiltersActionGroup;
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTTranslationUnit;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTranslationUnit;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.internal.ui.util.EditorUtility;
+
+/**
+ * This is a simple DOM AST View used for development testing.
+ */
+
+public class DOMAST extends ViewPart {
+   public static final String VIEW_ID = "org.eclipse.cdt.ui.tests.DOMAST.DOMAST"; //$NON-NLS-1$
+   private static final String PROPERTIES_VIEW = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$
+   private static final String ASTUTIL_MENU_LABEL = "ASTUtil#"; //$NON-NLS-1$
+   private static final String DISPLAY_TYPE = "getNodeType(IASTNode)"; //$NON-NLS-1$
+   private static final String DISPLAY_SIGNATURE = "getNodeSignature(IASTNode)"; //$NON-NLS-1$
+   private static final String DISPLAY_EXPRESSION = "getExpressionString(IASTExpression)"; //$NON-NLS-1$
+   private static final String DISPLAY_INITIALIZER = "getInitializerString(IASTInitializer)"; //$NON-NLS-1$
+   private static final String NOT_VALID_COMPILATION_UNIT = "The active editor does not contain a valid compilation unit."; //$NON-NLS-1$
+   private static final String EXTENSION_CXX = "CXX"; //$NON-NLS-1$
+   private static final String EXTENSION_CPP = "CPP"; //$NON-NLS-1$
+   private static final String EXTENSION_CC = "CC"; //$NON-NLS-1$
+   private static final String EXTENSION_C = "C"; //$NON-NLS-1$
+   private static final String DOM_AST_HAS_NO_CONTENT = "DOM AST has no content"; //$NON-NLS-1$
+   private static final String SEARCH_FOR_IASTNAME = "Search for IASTName"; //$NON-NLS-1$
+   private static final String CLEAR = "Clear"; //$NON-NLS-1$
+   private static final String DOMAST_FILTER_GROUP_ID = "org.eclipse.cdt.ui.tests.DOMAST.DOMASTFilterGroup"; //$NON-NLS-1$
+   private static final String LOAD_ACTIVE_EDITOR = "Load Active Editor"; //$NON-NLS-1$
+   private static final String COLLAPSE_ALL = "Collapse ALL"; //$NON-NLS-1$
+   private static final String EXPAND_ALL = "Expand All"; //$NON-NLS-1$
+   private static final String REFRESH_DOM_AST   = "Refresh DOM AST";  //$NON-NLS-1$
+   public static final String VIEW_NAME         = "DOM View";         //$NON-NLS-1$
+   private static final String POPUPMENU         = "#PopupMenu";       //$NON-NLS-1$
+   private static final String OPEN_DECLARATIONS = "Open Declarations"; //$NON-NLS-1$
+   private static final String OPEN_REFERENCES   = "Open References";  //$NON-NLS-1$
+   private static final String DISPLAY_PROBLEMS   = "Display Problems";  //$NON-NLS-1$
+   TreeViewer          viewer;
+   private DrillDownAdapter    drillDownAdapter;
+   private Action              displayProblemsAction;
+   private Action			   displayNodeTypeAction;
+   private Action			   displayNodeSignatureAction;
+   private Action			   displayExpressionAction;
+   private Action			   displayInitializerAction;
+   protected Action            singleClickAction;
+   private Action              loadActiveEditorAction;
+   private Action              refreshAction;
+   private Action			   expandAllAction;
+   private Action			   collapseAllAction;
+   private Action			   clearAction;
+   private Action			   searchNamesAction;
+
+   protected ITranslationUnit  tu             = null;
+   private IEditorPart         part              = null;
+
+   private CustomFiltersActionGroup customFiltersActionGroup;
+   
+   protected static ViewContentProvider.StartInitializingASTView initializeASTViewJob = null;
+
+   /*
+    * The content provider class is responsible for providing objects to the
+    * view. It can wrap existing objects in adapters or simply return objects
+    * as-is. These objects may be sensitive to the current input of the view, or
+    * ignore it and always show the same content (like Task List, for example).
+    */
+
+   public class ViewContentProvider implements IStructuredContentProvider,
+         ITreeContentProvider {
+      private static final String POPULATING_AST_VIEW = "Populating AST View"; //$NON-NLS-1$
+	  private DOMASTNodeParent invisibleRoot;
+      private DOMASTNodeParent tuTreeParent = null;
+      private IASTTranslationUnit tu = null;
+	  protected IASTProblem[] astProblems = null;
+
+      public ViewContentProvider() {
+      }
+      
+      public ViewContentProvider(ITranslationUnit tu) {
+    	  this(tu, null);
+      }
+      
+      public ViewContentProvider(ITranslationUnit tu, Object[] expanded) {
+       	initializeASTViewJob = new StartInitializingASTView(new InitializeView(POPULATING_AST_VIEW, this, viewer, tu), expanded);
+   		initializeASTViewJob.schedule();
+
+     }
+      
+      public DOMASTNodeParent getTUTreeParent() {
+      	if (tuTreeParent == null && invisibleRoot != null) {
+      		for(int i=0; i<invisibleRoot.getChildren().length; i++) {
+      			if (invisibleRoot.getChildren()[i] instanceof DOMASTNodeParent && invisibleRoot.getChildren()[i].getNode() instanceof IASTTranslationUnit){
+      	      		tuTreeParent = (DOMASTNodeParent)invisibleRoot.getChildren()[i];
+      	      		return tuTreeParent;
+      			}
+      		}
+      	}
+      	
+      	return tuTreeParent;
+      }
+      
+      public IASTTranslationUnit getTU() {
+      	if (tu == null && invisibleRoot != null) {
+      		for(int i=0; i<invisibleRoot.getChildren().length; i++) {
+      			if (invisibleRoot.getChildren()[i] instanceof DOMASTNodeParent && invisibleRoot.getChildren()[i].getNode() instanceof IASTTranslationUnit){
+      	      		tu = (IASTTranslationUnit)invisibleRoot.getChildren()[i].getNode();
+      			}
+      		}
+      	}
+      	
+      	return tu;
+      }
+	  
+      public void dispose() {
+      }
+
+      public Object[] getElements(Object parent) {
+         if (parent.equals(getViewSite())) {
+            if (invisibleRoot == null)
+               initialize();
+            return getChildren(invisibleRoot);
+         }
+         return getChildren(parent);
+      }
+
+      public Object getParent(Object child) {
+         if (child instanceof DOMASTNodeLeaf) {
+            return ((DOMASTNodeLeaf) child).getParent();
+         }
+         return null;
+      }
+
+      public Object[] getChildren(Object parent) {
+         if (parent instanceof DOMASTNodeParent) {
+            return ((DOMASTNodeParent) parent).getChildren();
+         }
+         return new Object[0];
+      }
+
+      public boolean hasChildren(Object parent) {
+         if (parent instanceof DOMASTNodeParent)
+            return ((DOMASTNodeParent) parent).hasChildren();
+         return false;
+      }
+
+      private class StartInitializingASTView extends Job {
+      	private static final String INITIALIZE_AST_VIEW = "Initialize AST View"; //$NON-NLS-1$
+		InitializeView job = null;
+      	Object[] expanded = null;
+      	
+      	public StartInitializingASTView(InitializeView job, Object[] expanded) {
+      		super(INITIALIZE_AST_VIEW);
+      		this.job = job;
+      		this.expanded = expanded;
+      	}
+      	
+		/* (non-Javadoc)
+		 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+		 */
+		@Override
+		protected IStatus run(IProgressMonitor monitor) {
+		    job.schedule();
+	      	
+		    try {
+		    	job.join();
+		    } catch (InterruptedException ie) {
+		    	return Status.CANCEL_STATUS;
+		    }
+	      		
+	    	CTestPlugin.getStandardDisplay().asyncExec(new InitializeRunnable(viewer)); // update the view from the Display thread
+	    	// if there are objects to expand then do so now
+	    	if (expanded != null) {
+	    		CTestPlugin.getStandardDisplay().asyncExec(new Runnable() {
+					public void run() {
+			         	// set the expansion of the view based on the original snapshot (educated guess)
+			         	Tree tree = viewer.getTree();
+			         	expandTreeIfNecessary(tree.getItems(), expanded);
+						
+					}
+					
+					private void expandTreeIfNecessary(TreeItem[] tree, Object[] theExpanded) {
+			     		for( int i=0; i<tree.length; i++) {
+			     			for( int j=0; j<theExpanded.length; j++) {
+				     			if (theExpanded[j] instanceof DOMASTNodeLeaf &&
+				     					tree[i].getData() instanceof DOMASTNodeLeaf &&
+				     					((DOMASTNodeLeaf)theExpanded[j]).toString().equals(((DOMASTNodeLeaf)tree[i].getData()).toString()) && 
+				     					((DOMASTNodeLeaf)theExpanded[j]).getOffset() == (((DOMASTNodeLeaf)tree[i].getData()).getOffset())) {
+				     				tree[i].setExpanded(true);
+				     				viewer.refresh();
+				     				expandTreeIfNecessary(tree[i].getItems(), theExpanded);
+				     			}
+			     			}
+			     		}
+			     	}});
+	    	}
+	    	
+			return job.getResult();
+		}
+      	
+      }
+      
+      private class InitializeView extends Job {
+
+		private static final String COLON_SPACE = ": "; //$NON-NLS-1$
+        private static final String DOM_AST_VIEW_DONE = "[DOM AST View] done "; //$NON-NLS-1$
+        private static final String DOM_AST_VIEW_FINISHED = "[DOM AST View] finished: "; //$NON-NLS-1$
+        private static final String RETRIEVING_PREPROCESSOR_PROBLEMS = "Retrieving all preprocessor problems from TU"; //$NON-NLS-1$
+		private static final String RETRIEVING_PREPROCESSOR_STATEMENTS = "Retrieving all preprocessor statements from TU"; //$NON-NLS-1$
+		private static final String _PREPROCESSOR_PROBLEMS_ = " preprocessor problems"; //$NON-NLS-1$
+		private static final String _PREPROCESSOR_STATEMENTS_ = " preprocessor statements"; //$NON-NLS-1$
+		private static final String MERGING_ = "Merging "; //$NON-NLS-1$
+		private static final String GROUPING_AST = "Grouping AST View according to includes"; //$NON-NLS-1$
+		private static final String GENERATING_INITIAL_TREE = "Generating initial AST Tree for the View"; //$NON-NLS-1$
+		private static final String PARSING_TRANSLATION_UNIT = "Parsing Translation Unit"; //$NON-NLS-1$
+		String name = null;
+      	DOMASTNodeParent root = null;
+      	ViewContentProvider provider = null;
+      	TreeViewer view = null;
+      	ITranslationUnit tu = null;
+      	
+    	/**
+		 * @param name
+		 */
+		public InitializeView(String name, ViewContentProvider provider, TreeViewer view, ITranslationUnit tu) {
+			super(name);
+			this.name = name;
+			setUser(true);
+			this.provider = provider;
+			this.view = view;
+			this.tu = tu;
+		}
+		
+	    public DOMASTNodeParent getInvisibleRoot() {
+	      	return root;
+	    }
+
+		/**
+    	 * @return Returns the scheduling rule for this operation
+    	 */
+    	public ISchedulingRule getScheduleRule() {
+    		return ResourcesPlugin.getWorkspace().getRoot();
+    	}
+    	
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
+		 */
+    	@Override
+		protected IStatus run(IProgressMonitor monitor) {
+    		long start=0;
+			long overallStart=System.currentTimeMillis();
+			
+    		if (tu == null || monitor == null)
+	            return Status.CANCEL_STATUS;
+
+			if (monitor.isCanceled()) return Status.CANCEL_STATUS;
+			monitor.beginTask(name, 100);
+			start=System.currentTimeMillis();
+			
+	        IPopulateDOMASTAction action = null;
+	        IASTTranslationUnit aTu;
+
+	        try {
+	        	monitor.subTask(PARSING_TRANSLATION_UNIT);
+	        	start=System.currentTimeMillis();
+	        	aTu = tu.getAST();
+	        	monitor.worked(30);
+	        	System.out.println(DOM_AST_VIEW_DONE + PARSING_TRANSLATION_UNIT + COLON_SPACE + (System.currentTimeMillis()- start) );
+    		} catch (CoreException e) {
+    			return Status.CANCEL_STATUS;
+    		}
+	         
+	         if (monitor.isCanceled()) return Status.CANCEL_STATUS;
+	         
+	         monitor.subTask(GENERATING_INITIAL_TREE);
+	         start=System.currentTimeMillis();
+	         if (aTu instanceof CPPASTTranslationUnit ) {
+	            action = new CPPPopulateASTViewAction(aTu, monitor);
+	            aTu.accept( (ASTVisitor) action);
+	         } 
+	         else if (aTu instanceof CASTTranslationUnit){
+	            action = new CPopulateASTViewAction(aTu, monitor);
+	            aTu.accept( (ASTVisitor) action);
+	         }
+	         monitor.worked(30);
+             System.out.println(DOM_AST_VIEW_DONE + GENERATING_INITIAL_TREE + COLON_SPACE + (System.currentTimeMillis()- start) );
+	         
+	         // display roots
+	         root = new DOMASTNodeParent(null); 
+	         
+	         if (monitor.isCanceled()) return Status.CANCEL_STATUS;
+	         monitor.subTask(RETRIEVING_PREPROCESSOR_STATEMENTS);
+	         start=System.currentTimeMillis();
+	         IASTPreprocessorStatement[] statements = aTu.getAllPreprocessorStatements();
+	         monitor.worked(5);
+	         System.out.println(DOM_AST_VIEW_DONE + RETRIEVING_PREPROCESSOR_STATEMENTS + COLON_SPACE + (System.currentTimeMillis()- start) );
+	         
+	         monitor.subTask(MERGING_ + statements.length + _PREPROCESSOR_STATEMENTS_);
+	         start=System.currentTimeMillis();
+	         // merge preprocessor statements to the tree
+	         DOMASTNodeLeaf[] includeStatements = action.mergePreprocessorStatements(statements);
+	         monitor.worked(2);
+	         System.out.println(DOM_AST_VIEW_DONE + MERGING_ + statements.length + _PREPROCESSOR_STATEMENTS_ + COLON_SPACE + (System.currentTimeMillis()- start) );
+	         
+	         if (monitor.isCanceled()) return Status.CANCEL_STATUS;
+	         monitor.subTask(RETRIEVING_PREPROCESSOR_PROBLEMS);
+	         start=System.currentTimeMillis();
+	         IASTProblem[] problems = aTu.getPreprocessorProblems();
+	         monitor.worked(2);
+	         System.out.println(DOM_AST_VIEW_DONE + RETRIEVING_PREPROCESSOR_PROBLEMS + COLON_SPACE + (System.currentTimeMillis()- start) );
+	         	         
+	         monitor.subTask(MERGING_ + problems.length + _PREPROCESSOR_PROBLEMS_);
+	         start=System.currentTimeMillis();
+	         // merge preprocessor problems to the tree
+	         action.mergePreprocessorProblems(problems);
+	         monitor.worked(1);
+	         System.out.println(DOM_AST_VIEW_DONE + MERGING_ + problems.length + _PREPROCESSOR_PROBLEMS_ + COLON_SPACE + (System.currentTimeMillis()- start) );
+
+	         if (monitor.isCanceled()) return Status.CANCEL_STATUS;
+	         monitor.subTask(GROUPING_AST);
+	         start=System.currentTimeMillis();
+	         // group #includes
+	         action.groupIncludes(includeStatements);
+	         monitor.worked(30);
+	         System.out.println(DOM_AST_VIEW_DONE + GROUPING_AST + COLON_SPACE + (System.currentTimeMillis()- start) );
+
+	         root.addChild(action.getTree());
+			 
+			 // get the IASTProblems from the action
+			 if (action instanceof CPopulateASTViewAction)
+				 astProblems = ((CPopulateASTViewAction)action).getASTProblems();
+			 else if (action instanceof CPPPopulateASTViewAction)
+				 astProblems = ((CPPPopulateASTViewAction)action).getASTProblems();
+	         
+	         provider.setInvisibleRoot(root);
+	         
+	         monitor.done();
+			
+	         System.out.println(DOM_AST_VIEW_FINISHED + (System.currentTimeMillis()- overallStart) );
+	         
+			return Status.OK_STATUS;
+		}
+		
+      }
+	  
+	  public IASTProblem[] getASTProblems() {
+		  return astProblems;
+	  }
+      
+      private void initialize() {
+      	invisibleRoot = new DOMASTNodeParent(); // blank the AST View, when the job above is complete it will update the AST View with the proper tree
+      }
+      
+      protected void setInvisibleRoot(DOMASTNodeParent root) {
+      	invisibleRoot = root;
+      }
+
+	  	public class InitializeRunnable implements Runnable {
+			TreeViewer view = null;
+			
+			public InitializeRunnable(TreeViewer view) {
+				this.view = view;
+			}
+			
+			/* (non-Javadoc)
+			 * @see java.lang.Runnable#run()
+			 */
+			public void run() {
+				if (view == null) return;
+				if (view.getTree().isDisposed())
+					return;
+				view.refresh();
+				
+				if (view.getTree().getItems().length > 0) {
+					TreeItem[] selection = new TreeItem[1];
+					selection[0] = view.getTree().getItems()[0];
+					
+					// select the first item to prevent it from being selected accidentally (and possibly switching editors accidentally)
+					view.getTree().setSelection(selection);
+				}
+			}
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+		 */
+		public void inputChanged(Viewer aViewer, Object oldInput, Object newInput) {
+		}
+		
+		private TreeItem expandTreeToTreeObject(TreeItem[] treeItems, DOMASTNodeLeaf treeObj) {
+			for (int i=0; i<treeItems.length; i++) {
+				if (treeItems[i].getData() == treeObj) {
+	 				return treeItems[i];
+	 			}
+	 			
+	 			DOMASTNodeParent parent = treeObj.getParent();
+	 			
+	 			if (parent == null) return null; 
+
+	 			while (parent != treeItems[i].getData()) {
+	 				parent = parent.getParent();
+	 				if (parent == null) break;
+	 			}
+	 			
+	 			if (parent == treeItems[i].getData()) {
+	 				treeItems[i].setExpanded(true);
+	 				viewer.refresh();
+
+	 				return expandTreeToTreeObject(treeItems[i].getItems(), treeObj);
+	 			}
+	 		}
+	 		
+	 		return null; // nothing found
+		}
+		
+	 	private TreeItem expandTreeToTreeObject(DOMASTNodeLeaf treeObj) {
+	 		return expandTreeToTreeObject(viewer.getTree().getItems(), treeObj);
+	 	}
+		
+		/**
+		 * Find an ASTNode in the tree and expand the tree to that node.
+		 * Returns true if successful, false otherwise.
+		 * 
+		 * @param offset
+		 * @param findString
+		 * @param searchForward
+		 * @param caseSensitive
+		 * @param wholeWord
+		 * @param regExSearch
+		 * @return
+		 */
+		public boolean findAndSelect(IASTNode node, boolean useOffset) {
+			// get the DOMASTNodeLeaf from the AST View's model corresponding to the IASTNode
+			DOMASTNodeLeaf treeNode = null;
+			TreeItem treeItem = null;
+			
+			treeNode =  getTUTreeParent().findTreeObject(node, useOffset);
+
+			if (treeNode != null && treeNode.getParent() != null) {
+				// found a matching DOMASTNodeLeaf, so expand the tree to that object
+				treeItem = expandTreeToTreeObject(treeNode);
+			}
+			
+			// select the node that was found (and is now displayed)
+			if (treeItem != null) {
+				TreeItem[] items = new TreeItem[1];
+				items[0] = treeItem;
+				treeItem.getParent().setSelection(items);
+					
+				return true;
+			}
+
+			return false;
+		}
+   }
+
+   class ViewLabelProvider extends LabelProvider {
+
+      private static final String BLANK_STRING = ""; //$NON-NLS-1$
+
+    @Override
+	public String getText(Object obj) {
+		  if (obj == null) return BLANK_STRING;
+         return obj.toString();
+      }
+
+      @Override
+	public Image getImage(Object obj) {
+         String imageKey = DOMASTPluginImages.IMG_DEFAULT;
+
+         IASTNode node = null;
+         if (obj instanceof DOMASTNodeLeaf) {
+            node = ((DOMASTNodeLeaf) obj).getNode();
+         }
+
+         if (node instanceof IASTArrayModifier) {
+            imageKey = DOMASTPluginImages.IMG_IASTArrayModifier;
+         } else if (node instanceof IASTDeclaration) {
+            if (node instanceof IASTProblemDeclaration)
+         		imageKey = DOMASTPluginImages.IMG_IASTProblem;
+         	else
+         		imageKey = DOMASTPluginImages.IMG_IASTDeclaration;
+         } else if (node instanceof IASTDeclarator) {
+            imageKey = DOMASTPluginImages.IMG_IASTDeclarator;
+         } else if (node instanceof IASTDeclSpecifier) {
+            imageKey = DOMASTPluginImages.IMG_IASTDeclSpecifier;
+         } else if (node instanceof IASTEnumerator) {
+            imageKey = DOMASTPluginImages.IMG_IASTEnumerator;
+         } else if (node instanceof IASTExpression) {
+         	if (node instanceof IASTProblemExpression)
+         		imageKey = DOMASTPluginImages.IMG_IASTProblem;
+         	else
+         		imageKey = DOMASTPluginImages.IMG_IASTExpression;
+         } else if (node instanceof IASTInitializer) {
+            imageKey = DOMASTPluginImages.IMG_IASTInitializer;
+         } else if (node instanceof IASTName) {
+            imageKey = DOMASTPluginImages.IMG_IASTName;
+         } else if (node instanceof IASTParameterDeclaration) {
+            imageKey = DOMASTPluginImages.IMG_IASTParameterDeclaration;
+         } else if (node instanceof IASTPointerOperator) {
+            imageKey = DOMASTPluginImages.IMG_IASTPointerOperator;
+         } else if (node instanceof IASTPreprocessorStatement) {
+            imageKey = DOMASTPluginImages.IMG_IASTPreprocessorStatement;
+         } else if (node instanceof IASTProblem) {
+            imageKey = DOMASTPluginImages.IMG_IASTProblem;
+         } else if (node instanceof IASTSimpleDeclaration) {
+       		imageKey = DOMASTPluginImages.IMG_IASTSimpleDeclaration;
+         } else if (node instanceof IASTStatement) {
+         	if (node instanceof IASTProblemStatement)
+         		imageKey = DOMASTPluginImages.IMG_IASTProblem;
+         	else
+         		imageKey = DOMASTPluginImages.IMG_IASTStatement;
+         } else if (node instanceof IASTTranslationUnit) {
+            imageKey = DOMASTPluginImages.IMG_IASTTranslationUnit;
+         } else if (node instanceof IASTTypeId) {
+            imageKey = DOMASTPluginImages.IMG_IASTTypeId;
+         } else if (node instanceof ICASTDesignator) {
+            imageKey = DOMASTPluginImages.IMG_ICASTDesignator;
+         } else if (node instanceof ICPPASTConstructorChainInitializer) {
+            imageKey = DOMASTPluginImages.IMG_ICPPASTConstructorChainInitializer;
+         } else if (node instanceof ICPPASTTemplateParameter) {
+            imageKey = DOMASTPluginImages.IMG_ICPPASTTemplateParameter;
+         }
+
+         return DOMASTPluginImages.get(imageKey);
+      }
+   }
+
+   class NameSorter extends ViewerSorter {
+	   
+   }
+
+   public DOMAST() {
+
+   }
+
+   /**
+    * This is a callback that will allow us to create the viewer and initialize
+    * it.
+    */
+   @Override
+public void createPartControl(Composite parent) {
+
+      if (part == null) {
+         part = getActiveEditor();
+      }
+
+      viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+      drillDownAdapter = new DrillDownAdapter(viewer);
+
+      if (part instanceof CEditor) {
+    	  ICElement inputElement = ((CEditor)part).getInputCElement();
+    	  if(inputElement instanceof ITranslationUnit) {
+    		  viewer.setContentProvider(new ViewContentProvider((ITranslationUnit)inputElement));
+    		  setTranslationUnit((ITranslationUnit)inputElement);
+    	  }
+    	  else {
+    		  viewer.setContentProvider(new ViewContentProvider(null));
+    	  }
+      } else {
+    	  viewer.setContentProvider(new ViewContentProvider(null)); // don't attempt to create a view based on old file info
+      }
+
+      viewer.setLabelProvider(new ViewLabelProvider());
+      viewer.setInput(getViewSite());
+	  
+      makeActions();
+      hookContextMenu();
+      hookSingleClickAction();
+
+      customFiltersActionGroup = new CustomFiltersActionGroup(DOMAST_FILTER_GROUP_ID, viewer);
+      contributeToActionBars();
+	  
+	  viewer.addSelectionChangedListener(new UpdatePropertiesListener());
+   }
+   
+   private class UpdatePropertiesListener implements ISelectionChangedListener {
+
+	public void selectionChanged(SelectionChangedEvent event) {
+		ISelection selection = viewer.getSelection();
+		IViewPart propertyPart = getSite().getPage().findView(PROPERTIES_VIEW);
+		if (propertyPart instanceof PropertySheet) {
+			((PropertySheet)propertyPart).selectionChanged(getSite().getPart(), selection);
+		}
+	}
+	   
+   }
+
+   public void setContentProvider(ViewContentProvider vcp) {
+	  if (viewer == null) return;
+      viewer.setContentProvider(vcp);
+   }
+   
+   public IContentProvider getContentProvider() {
+   		return viewer.getContentProvider();
+   }
+
+   private void hookContextMenu() {
+      MenuManager menuMgr = new MenuManager(POPUPMENU);
+      menuMgr.setRemoveAllWhenShown(true);
+      menuMgr.addMenuListener(new IMenuListener() {
+		  private void hideMenuItems(IMenuManager manager) {
+			  IContributionItem[] items = manager.getItems();
+			  
+			  for (int i = 0; i < items.length; i++) {
+				  if (items[i] instanceof IMenuManager) {
+					  hideMenuItems((IMenuManager)items[i]);
+				  }
+				  
+				  if (items[i] instanceof ActionContributionItem) {
+					  String text = ((ActionContributionItem) items[i]).getAction().getText();
+					  IASTNode selectedNode = null;
+					  if (viewer.getSelection() instanceof StructuredSelection
+							  && ((StructuredSelection) viewer.getSelection())
+							  .getFirstElement() instanceof DOMASTNodeLeaf) {
+						  selectedNode = ((DOMASTNodeLeaf) ((StructuredSelection) viewer
+								  .getSelection()).getFirstElement()).getNode(); 
+					  }
+					  
+					  if (text.equals(OPEN_REFERENCES) || text.equals(OPEN_DECLARATIONS)) {
+						  if (selectedNode instanceof IASTName) {
+							  items[i].setVisible(true);
+						  } else {
+							  items[i].setVisible(false);
+						  }
+					  }
+					  
+					  if (text.equals(DISPLAY_SIGNATURE)) {
+						  if (selectedNode instanceof IASTDeclarator || 
+								  selectedNode instanceof IASTDeclSpecifier ||
+								  selectedNode instanceof IASTTypeId) {
+							  items[i].setVisible(true);
+						  } else {
+							  items[i].setVisible(false);
+						  }
+					  } else if (text.equals(DISPLAY_TYPE)) {
+						  if (selectedNode instanceof IASTDeclarator ||
+								  selectedNode instanceof IASTTypeId ||
+								  (selectedNode instanceof IASTName && (
+										  ((IASTName)selectedNode).resolveBinding() instanceof IVariable ||
+										  ((IASTName)selectedNode).resolveBinding() instanceof IFunction ||
+										  ((IASTName)selectedNode).resolveBinding() instanceof IType))) {
+							  items[i].setVisible(true);
+						  } else {
+							  items[i].setVisible(false);
+						  }
+					  } else if (text.equals(DISPLAY_EXPRESSION)) {
+						  if (selectedNode instanceof IASTExpression) {
+							  items[i].setVisible(true);
+						  } else {
+							  items[i].setVisible(false);
+						  }
+					  } else if (text.equals(DISPLAY_INITIALIZER)) {
+						  if (selectedNode instanceof IASTInitializer) {
+							  items[i].setVisible(true);
+						  } else {
+							  items[i].setVisible(false);
+						  }
+					  }
+				  }
+			  }
+		  }
+		  
+         public void menuAboutToShow(IMenuManager manager) {
+            DOMAST.this.fillContextMenu(manager);
+            hideMenuItems(manager);
+         }
+      });
+      Menu menu = menuMgr.createContextMenu(viewer.getControl());
+      viewer.getControl().setMenu(menu);
+      getSite().registerContextMenu(menuMgr, viewer);
+   }
+
+   private void contributeToActionBars() {
+      IActionBars bars = getViewSite().getActionBars();
+      fillLocalPullDown(bars.getMenuManager());
+      fillLocalToolBar(bars.getToolBarManager());
+      customFiltersActionGroup.fillActionBars(bars);
+   }
+
+   private void fillLocalPullDown(IMenuManager manager) {
+   }
+
+   void fillContextMenu(IMenuManager manager) {
+      manager.add(new Separator());
+	  // ASTUtil#... menu
+	  MenuManager astMenu = new MenuManager(ASTUTIL_MENU_LABEL);
+	  astMenu.add(displayNodeTypeAction);
+	  astMenu.add(displayNodeSignatureAction);
+	  astMenu.add(displayExpressionAction);
+	  astMenu.add(displayInitializerAction);
+	  manager.add(astMenu);
+	  manager.add(new Separator());
+      drillDownAdapter.addNavigationActions(manager);
+      // Other plug-ins can contribute there actions here
+      manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+   }
+
+   private void fillLocalToolBar(IToolBarManager manager) {
+   	  manager.add(expandAllAction);
+      manager.add(collapseAllAction);
+      manager.add(new Separator());
+   	  manager.add(refreshAction);
+   	  manager.add(loadActiveEditorAction);
+   	  manager.add(new Separator());
+   	  manager.add(clearAction);
+      manager.add(new Separator());
+      manager.add(searchNamesAction);
+//	  manager.add(displayProblemsAction);
+      manager.add(new Separator());
+      drillDownAdapter.addNavigationActions(manager);
+   }
+
+   private void makeActions() {
+	   loadActiveEditorAction = new Action() {
+		   @Override
+		public void run() {
+			   // first make sure there is an open editor
+			   IEditorPart editor = getActiveEditor();
+			   if (editor != null) {
+				   openDOMASTView(getActiveEditor());
+			   }
+		   }
+	   };
+	   loadActiveEditorAction.setText(LOAD_ACTIVE_EDITOR);
+	   loadActiveEditorAction.setToolTipText(LOAD_ACTIVE_EDITOR);
+	   loadActiveEditorAction.setImageDescriptor(DOMASTPluginImages.DESC_RELOAD_VIEW);
+	   
+	   refreshAction = new Action() {
+		   @Override
+		public void run() {
+			   // take a snapshot of the tree expansion
+			   Object[] expanded = viewer.getExpandedElements();
+			   
+			   // set the new content provider
+			   setContentProvider(new ViewContentProvider(tu, expanded));
+		   }
+	   };
+	   refreshAction.setText(REFRESH_DOM_AST);
+	   refreshAction.setToolTipText(REFRESH_DOM_AST);
+	   refreshAction.setImageDescriptor(DOMASTPluginImages.DESC_REFRESH_VIEW);
+	   
+	   expandAllAction = new Action() {
+		   @Override
+		public void run() {
+			   viewer.expandAll();
+		   }
+	   };
+	   expandAllAction.setText(EXPAND_ALL);
+	   expandAllAction.setToolTipText(EXPAND_ALL);
+	   expandAllAction.setImageDescriptor(DOMASTPluginImages.DESC_EXPAND_ALL);
+	   
+	   collapseAllAction = new Action() {
+		   @Override
+		public void run() {
+			   viewer.collapseAll();
+		   }
+	   };
+	   collapseAllAction.setText(COLLAPSE_ALL);
+	   collapseAllAction.setToolTipText(COLLAPSE_ALL);
+	   collapseAllAction.setImageDescriptor(DOMASTPluginImages.DESC_COLLAPSE_ALL);
+	   
+	   clearAction = new Action() {
+		   @Override
+		public void run() {
+			   viewer.setContentProvider(new ViewContentProvider(null));
+			   viewer.refresh();
+		   }
+	   };
+	   clearAction.setText(CLEAR);
+	   clearAction.setToolTipText(CLEAR);
+	   clearAction.setImageDescriptor(DOMASTPluginImages.DESC_CLEAR);
+	   
+	   searchNamesAction = new Action() {
+		   private void performSearch() {
+			   if (viewer.getTree().getItems().length == 0) {
+				   showMessage(DOM_AST_HAS_NO_CONTENT);
+			   }
+			   
+			   FindIASTNameDialog dialog = new FindIASTNameDialog(getSite().getShell(), new FindIASTNameTarget(viewer));
+			   dialog.open();
+		   }
+		   
+		   @Override
+		public void run() {
+			   performSearch();
+		   }
+	   };
+	   searchNamesAction.setText(SEARCH_FOR_IASTNAME);
+	   searchNamesAction.setToolTipText(SEARCH_FOR_IASTNAME);
+	   searchNamesAction.setImageDescriptor(DOMASTPluginImages.DESC_SEARCH_NAMES);
+	   
+	   displayNodeTypeAction = new Action() { 
+		   @Override
+		public void run() {
+			   ISelection selection = viewer.getSelection();
+			   if (selection instanceof IStructuredSelection &&
+					   ((IStructuredSelection)selection).getFirstElement() instanceof DOMASTNodeLeaf &&
+					   ((DOMASTNodeLeaf)((IStructuredSelection)selection).getFirstElement()).getNode() != null) {
+				   showMessage("ASTUtil#getNodeType(IASTNode): \"" + ASTTypeUtil.getNodeType(((DOMASTNodeLeaf)((IStructuredSelection)selection).getFirstElement()).getNode()) + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+			   }
+		   } };
+	   displayNodeTypeAction.setText(DISPLAY_TYPE);
+	   displayNodeTypeAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
+			   .getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
+	   
+	   displayNodeSignatureAction = new Action() { 
+		   @Override
+		public void run() {
+			   ISelection selection = viewer.getSelection();
+			   if (selection instanceof IStructuredSelection &&
+					   ((IStructuredSelection)selection).getFirstElement() instanceof DOMASTNodeLeaf &&
+					   ((DOMASTNodeLeaf)((IStructuredSelection)selection).getFirstElement()).getNode() != null) {
+				   showMessage("ASTSignatureUtil#getNodeSignature(IASTNode): \"" + ASTSignatureUtil.getNodeSignature(((DOMASTNodeLeaf)((IStructuredSelection)selection).getFirstElement()).getNode()) + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+			   }
+		   } };
+	   displayNodeSignatureAction.setText(DISPLAY_SIGNATURE);
+	   displayNodeSignatureAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
+			   .getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
+	   
+	   displayExpressionAction = new Action() { 
+		   @Override
+		public void run() {
+			   ISelection selection = viewer.getSelection();
+			   if (selection instanceof IStructuredSelection &&
+					   ((IStructuredSelection)selection).getFirstElement() instanceof DOMASTNodeLeaf &&
+					   ((DOMASTNodeLeaf)((IStructuredSelection)selection).getFirstElement()).getNode() instanceof IASTExpression) {
+				   showMessage("ASTSignatureUtil#getExpressionString(IASTExpression): \"" + ASTSignatureUtil.getExpressionString((IASTExpression)((DOMASTNodeLeaf)((IStructuredSelection)selection).getFirstElement()).getNode()) + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+			   }
+		   } };
+	   displayExpressionAction.setText(DISPLAY_EXPRESSION);
+	   displayExpressionAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
+			   .getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
+	   
+	   displayInitializerAction = new Action() { 
+		   @Override
+		public void run() {
+			   ISelection selection = viewer.getSelection();
+			   if (selection instanceof IStructuredSelection &&
+					   ((IStructuredSelection)selection).getFirstElement() instanceof DOMASTNodeLeaf &&
+					   ((DOMASTNodeLeaf)((IStructuredSelection)selection).getFirstElement()).getNode() instanceof IASTInitializer) {
+				   showMessage("ASTSignatureUtil#getInitializerString(IASTInitializer): \"" + ASTSignatureUtil.getInitializerString((IASTInitializer)((DOMASTNodeLeaf)((IStructuredSelection)selection).getFirstElement()).getNode()) + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+			   }
+		   } };
+	   displayInitializerAction.setText(DISPLAY_INITIALIZER);
+	   displayInitializerAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
+			   .getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
+	   
+	   singleClickAction = new ASTHighlighterAction(part);
+   }
+
+   protected IEditorPart getActiveEditor() {
+   	IEditorPart editor = null;
+   	
+   	if (getSite().getPage().isEditorAreaVisible() &&
+	   	getSite().getPage().getActiveEditor() != null &&
+	   	getSite().getPage().getActiveEditor() instanceof CEditor) {
+	   	editor = getSite().getPage().getActiveEditor();
+	    part = editor;
+   	}
+
+   	return editor;
+   }
+      
+   private class ASTHighlighterAction extends Action {
+       private static final String A_PART_INSTANCEOF = "aPart instanceof "; //$NON-NLS-1$
+       IEditorPart aPart = null;
+
+      public ASTHighlighterAction(IEditorPart part) {
+         this.aPart = part;
+      }
+
+      public void setPart(IEditorPart part) {
+         this.aPart = part;
+      }
+
+      protected boolean open(String filename) throws PartInitException,
+            CModelException {
+         IPath path = new Path(filename);
+         IFile f = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(
+               path);
+         if (f != null) {
+            EditorUtility.openInEditor(f);
+            return true;
+         }
+
+         FileStorage storage = new FileStorage(null, path);
+         EditorUtility.openInEditor(storage);
+         return true;
+      }
+
+      @Override
+	public void run() {
+          ISelection selection = viewer.getSelection();
+          Object obj = ((IStructuredSelection) selection).getFirstElement();
+          if (obj instanceof DOMASTNodeLeaf) {
+             if (((DOMASTNodeLeaf)obj).getNode() instanceof IASTTranslationUnit) // don't do anything for TU
+                 return;
+             
+             String filename = ((DOMASTNodeLeaf) obj).getFilename();
+             
+             if (filename.equals(DOMASTNodeLeaf.BLANK_STRING))
+                return;
+             
+             IResource r = ParserUtil.getResourceForFilename(filename);
+             if (r != null) {
+                try {
+                   aPart = EditorUtility.openInEditor(r);
+                } catch (PartInitException pie) {
+                   return;
+                } catch (CModelException e) {
+                   return;
+                }
+             } else {
+                IPath path = new Path( filename );
+
+                if (tu != null) {
+                    try {
+                    	aPart = EditorUtility.openInEditor(path, tu);
+	                } catch (PartInitException e) {
+	                	return;
+	                }
+                }
+             }
+             
+             if( aPart instanceof AbstractTextEditor )
+             {
+                 ((AbstractTextEditor) aPart).selectAndReveal(((DOMASTNodeLeaf) obj).getOffset(),
+                       ((DOMASTNodeLeaf) obj).getLength());
+             }
+             else
+                 System.out.println( A_PART_INSTANCEOF + aPart.getClass().getName() );
+     
+             aPart.getSite().getPage().activate(aPart.getSite().getPage().findView(VIEW_ID));
+             
+          }
+       }
+
+   }
+
+   private void hookSingleClickAction() {
+      viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+         public void selectionChanged(SelectionChangedEvent event) {
+            singleClickAction.run();
+         }
+      });
+   }
+
+   void showMessage(String message) {
+      MessageDialog.openInformation(viewer.getControl().getShell(), VIEW_NAME,
+            message.replaceAll("&", "&&")); //$NON-NLS-1$ //$NON-NLS-2$
+   }
+
+   /**
+    * Passing the focus request to the viewer's control.
+    */
+   @Override
+public void setFocus() {
+       if (viewer==null) return;
+      viewer.getControl().setFocus();
+	  
+	  ISelection selection = viewer.getSelection();
+      IViewPart propertyPart = getSite().getPage().findView(PROPERTIES_VIEW);
+	  if (propertyPart instanceof PropertySheet) {
+		  ((PropertySheet)propertyPart).selectionChanged(getSite().getPart(), selection);
+	  }
+   }
+
+   public void setPart(IEditorPart part) {
+      this.part = part;
+
+      if (singleClickAction instanceof ASTHighlighterAction)
+         ((ASTHighlighterAction) singleClickAction).setPart(part);
+   }
+
+   
+   public void setTranslationUnit(ITranslationUnit tu) {
+	   this.tu = tu;
+   }
+
+   private class RunAfterViewOpenJob extends Job {
+   	
+   	Runnable runner = null;
+   	
+   	/**
+	 * 
+	 */
+	public RunAfterViewOpenJob(String name, Runnable runner) {
+		super(name);
+		this.runner = runner;
+	}
+   	
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	@Override
+	protected IStatus run(IProgressMonitor monitor) {
+		try {
+			initializeASTViewJob.join();
+			CTestPlugin.getStandardDisplay().asyncExec(runner);
+		} catch (InterruptedException ie) {}
+		
+		return Status.OK_STATUS;
+
+	}
+   }
+   
+   /**
+    * Open the DOM AST View and return a reference to it.  This helper method can also be used to run an
+    * Action after the DOM AST View has been fully loaded (like find/select nodes in the view).
+    * 
+    * Note:  The action is not guaranteed to run.  An example would be if loading the view is canceled.
+    * 
+    * @param editor
+    * @param action
+    * @return
+    */
+    public static IViewPart openDOMASTViewRunAction(IEditorPart editor, Runnable runnable, String nameOfJob) {
+    	IViewPart view = openDOMASTView(editor);
+    	
+    	if (view == null) return null;
+    	
+   		RunAfterViewOpenJob job = ((DOMAST)view).new RunAfterViewOpenJob(nameOfJob, runnable);
+   		job.schedule();
+    	
+    	return view;
+    }
+   
+    /**
+     * Open the DOM AST View and return a reference to it.
+     * 
+     * @param editor
+     * @return
+     */
+	public static IViewPart openDOMASTView(IEditorPart editor) {
+		IWorkbenchPartSite site = editor.getSite();
+		Shell shell = site.getShell();
+		IViewPart tempView = null;
+		
+		// get the active editor
+    	if (editor instanceof CEditor) {
+
+    		try {
+    			tempView = site.getPage().showView(VIEW_ID);
+    		} catch (PartInitException pie) {}
+    		
+    		if (tempView != null) {
+    			if (tempView instanceof DOMAST) {
+    				ICElement input = ((CEditor)editor).getInputCElement();
+    				
+    				if(!(input instanceof ITranslationUnit)) {
+    					MessageDialog.openInformation(shell, DOMAST.VIEW_NAME, NOT_VALID_COMPILATION_UNIT);
+        				return null;
+    				}
+    				
+    				((DOMAST)tempView).setTranslationUnit((ITranslationUnit)input);
+    				((DOMAST)tempView).setPart(editor);
+    				((DOMAST)tempView).setContentProvider(((DOMAST)tempView).new ViewContentProvider((ITranslationUnit)input));
+    			}
+    		}
+
+    		site.getPage().activate(tempView);
+    		
+    	}
+    	
+    	return tempView;
+	}
+   
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTNodeLeaf.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTNodeLeaf.java
new file mode 100644
index 0000000..36fe860
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTNodeLeaf.java
@@ -0,0 +1,673 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM Rational Software - Initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.DOMAST;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+
+import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
+import org.eclipse.cdt.core.dom.ast.ASTSignatureUtil;
+import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
+import org.eclipse.cdt.core.dom.ast.IASTCastExpression;
+import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTPointer;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorObjectStyleMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTProblem;
+import org.eclipse.cdt.core.dom.ast.IASTProblemHolder;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.c.ICASTArrayDesignator;
+import org.eclipse.cdt.core.dom.ast.c.ICASTArrayModifier;
+import org.eclipse.cdt.core.dom.ast.c.ICASTDesignator;
+import org.eclipse.cdt.core.dom.ast.c.ICASTFieldDesignator;
+import org.eclipse.cdt.core.dom.ast.c.ICASTPointer;
+import org.eclipse.cdt.core.dom.ast.gnu.c.IGCCASTArrayRangeDesignator;
+import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTPointer;
+import org.eclipse.cdt.core.parser.Keywords;
+import org.eclipse.cdt.core.parser.util.ArrayUtil;
+
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+
+/**
+ * @author dsteffle
+ */
+public class DOMASTNodeLeaf implements IAdaptable {
+	private static final String INTERNAL = "internal"; //$NON-NLS-1$
+    private static final String VARIABLE_SIZED_ = "* "; //$NON-NLS-1$
+	private static final String VOLATILE_ = "volatile "; //$NON-NLS-1$
+	private static final String STATIC_ = "static "; //$NON-NLS-1$
+	private static final String RESTRICT_ = "restrict "; //$NON-NLS-1$
+	private static final String CONST_ = "const "; //$NON-NLS-1$
+	private static final String DASH = "-"; //$NON-NLS-1$
+	private static final String FILE_SEPARATOR = "\\"; //$NON-NLS-1$
+	public static final String BLANK_STRING = ""; //$NON-NLS-1$
+	private static final String IGCCAST_PREFIX = "IGCCAST"; //$NON-NLS-1$
+	private static final String IGNUAST_PREFIX = "IGNUAST"; //$NON-NLS-1$
+	private static final String IGPPAST_PREFIX = "IGPPAST"; //$NON-NLS-1$
+	private static final String ICPPAST_PREFIX = "ICPPAST"; //$NON-NLS-1$
+	private static final String ICAST_PREFIX = "ICAST"; //$NON-NLS-1$
+	private static final String IAST_PREFIX = "IAST"; //$NON-NLS-1$
+	private static final String START_OF_LIST = ": "; //$NON-NLS-1$
+	private static final String LIST_SEPARATOR = ", "; //$NON-NLS-1$
+	private static final String PERIOD = "."; //$NON-NLS-1$
+	private IASTNode node = null;
+	private DOMASTNodeParent parent;
+	
+	// used for applying filters to the tree, since it is lazily populated
+	// all parents of the desired tree object to display need to have a flag as well
+	private int filterFlag = 0;
+	private static Set<String> ignoreInterfaces= new HashSet<String>(); 
+	public static final int FLAG_PROBLEM = 1<<0;
+	public static final int FLAG_PREPROCESSOR = 1<<1;
+	public static final int FLAG_INCLUDE_STATEMENTS = 1<<2;
+	static {
+		ignoreInterfaces.addAll(Arrays.asList(new String[] {
+				"IASTCompletionContext", "IASTNode"
+				}));
+	}
+	public DOMASTNodeLeaf(IASTNode node) {
+		this.node = node;
+	}
+	public IASTNode getNode() {
+		return node;
+	}
+	public void setParent(DOMASTNodeParent parent) {
+		this.parent = parent;
+	}
+	public DOMASTNodeParent getParent() {
+		return parent;
+	}
+	
+	private boolean hasProperPrefix(String string) {
+		if (string.startsWith(IAST_PREFIX) ||
+				string.startsWith(ICAST_PREFIX) ||
+				string.startsWith(ICPPAST_PREFIX) ||
+				string.startsWith(IGPPAST_PREFIX) ||
+				string.startsWith(IGNUAST_PREFIX) ||
+				string.startsWith(IGCCAST_PREFIX)) {
+			if (!ignoreInterfaces.contains(string)) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	@Override
+	public String toString() {
+	    if( node == null ) return BLANK_STRING; 
+		StringBuffer buffer = new StringBuffer();
+		List<Class<?>> search= new LinkedList<Class<?>>();
+		boolean done= false;
+		boolean needComma= false;
+		
+		for (search.add(node.getClass()); !search.isEmpty(); ) {
+			Class<?> clazz= search.remove(0);
+			if (clazz.isInterface()) {
+				if (clazz.getPackage().toString().indexOf(INTERNAL) < 0) {
+					String interfaceName= clazz.getName();
+					interfaceName= interfaceName.substring(interfaceName.lastIndexOf(PERIOD) + 1);
+					if (hasProperPrefix(interfaceName)) {
+						if (needComma)
+							buffer.append(LIST_SEPARATOR);
+						buffer.append(interfaceName);
+						needComma= true;
+						done= true;
+					}
+				}				
+			} 
+			if (!done) {
+				search.addAll(Arrays.asList((Class<?>[])clazz.getInterfaces()));
+				final Class<?> superclass = clazz.getSuperclass();
+				if (superclass != null)
+					search.add(superclass);
+			}
+		}
+		
+		if ( node instanceof IASTProblemHolder ) {
+			buffer.append(START_OF_LIST);
+			buffer.append(((IASTProblemHolder)node).getProblem().getMessageWithLocation());
+		} else if ( node instanceof IASTSimpleDeclaration ) {
+			String name = null;
+			IASTDeclarator[] decltors = ((IASTSimpleDeclaration)node).getDeclarators();
+			
+			if ( decltors.length > 0 ) {
+				buffer.append(START_OF_LIST);
+				for (int i=0; i<decltors.length; i++) {
+					name = getDeclaratorName(decltors[i]);
+					buffer.append(name);
+					
+					if (i+1<decltors.length)
+						buffer.append(LIST_SEPARATOR);
+				}
+			}
+			return buffer.toString();
+		} else if ( node instanceof IASTFunctionDefinition ) {
+			String name = getDeclaratorName( ((IASTFunctionDefinition)node).getDeclarator() );
+			if (name != null) {
+				buffer.append(START_OF_LIST);
+				buffer.append(name);
+			}
+			return buffer.toString();
+		} else if ( node instanceof IASTName ) {
+			buffer.append(START_OF_LIST);
+			buffer.append(node);
+			return buffer.toString();
+		} else if ( node instanceof IASTTranslationUnit ) {
+			String fileName = ((IASTTranslationUnit)node).getFilePath();
+			int lastSlash = fileName.lastIndexOf(FILE_SEPARATOR);
+			
+			if (lastSlash > 0) {
+				buffer.append(START_OF_LIST);
+				buffer.append(fileName.substring(lastSlash+1)); // TODO make path relative to project, i.e. /projectName/path/file.c
+			}
+			
+			return buffer.toString();
+		} else if( node instanceof IASTDeclSpecifier )
+		{
+		    buffer.append( START_OF_LIST );
+		    buffer.append( getSignature((IASTDeclSpecifier)node) );
+		    return buffer.toString();
+		} else if ( node instanceof IASTPreprocessorIncludeStatement ) {
+			String path = ((IASTPreprocessorIncludeStatement)node).getPath();
+			int lastSlash = path.lastIndexOf(FILE_SEPARATOR) + 1;
+			buffer.append( START_OF_LIST );
+			buffer.append( path.substring(lastSlash) );
+		} else if ( node instanceof IASTPreprocessorObjectStyleMacroDefinition ) {
+			String name = ((IASTPreprocessorObjectStyleMacroDefinition)node).getName().toString();
+			if (name != null) {
+				buffer.append( START_OF_LIST );
+				buffer.append( name );
+			}
+		} else if ( node instanceof IASTLiteralExpression ) {
+			buffer.append(START_OF_LIST);
+			buffer.append(node.toString());
+		} else if ( node instanceof IASTCastExpression ) {
+			buffer.append(START_OF_LIST);
+			buffer.append( ASTSignatureUtil.getCastOperatorString( (IASTCastExpression)node ) );
+		} else if ( node instanceof IASTUnaryExpression ) {
+			buffer.append(START_OF_LIST);
+			buffer.append( ASTSignatureUtil.getUnaryOperatorString( (IASTUnaryExpression)node ) );
+		} else if ( node instanceof IASTBinaryExpression ) {
+			buffer.append(START_OF_LIST);
+			buffer.append( ASTSignatureUtil.getBinaryOperatorString( (IASTBinaryExpression)node ) );
+		} else if ( node instanceof ICASTDesignator ) {
+			if ( node instanceof ICASTArrayDesignator && ((ICASTArrayDesignator)node).getSubscriptExpression() != null ) {
+				buffer.append(START_OF_LIST);
+				buffer.append(((ICASTArrayDesignator)node).getSubscriptExpression());
+			} else if ( node instanceof ICASTFieldDesignator && ((ICASTFieldDesignator)node).getName() != null ) {
+				buffer.append(START_OF_LIST);
+				buffer.append(((ICASTFieldDesignator)node).getName());
+			} else if ( node instanceof IGCCASTArrayRangeDesignator && ((IGCCASTArrayRangeDesignator)node).getRangeCeiling() != null && ((IGCCASTArrayRangeDesignator)node).getRangeFloor() != null ) {
+				buffer.append(START_OF_LIST);
+				buffer.append(((IGCCASTArrayRangeDesignator)node).getRangeCeiling());
+				buffer.append(DASH);
+				buffer.append(((IGCCASTArrayRangeDesignator)node).getRangeFloor());
+			}
+		} else if ( node instanceof IASTArrayModifier ) {
+			boolean started = false;
+			if ( node instanceof ICASTArrayModifier ) {
+				started = true;
+				buffer.append(START_OF_LIST);
+				if (((ICASTArrayModifier)node).isConst()) buffer.append(CONST_);
+				if (((ICASTArrayModifier)node).isRestrict()) buffer.append(RESTRICT_);
+				if (((ICASTArrayModifier)node).isStatic()) buffer.append(STATIC_);
+				if (((ICASTArrayModifier)node).isVolatile()) buffer.append(VOLATILE_);
+				if (((ICASTArrayModifier)node).isVariableSized()) buffer.append(VARIABLE_SIZED_);
+			}			
+
+			IASTExpression constantExpression = ((IASTArrayModifier)node).getConstantExpression();
+			if ( constantExpression != null && constantExpression instanceof IASTIdExpression ) { 
+				if (!started) buffer.append(START_OF_LIST);
+				buffer.append(((IASTIdExpression)constantExpression).getName().toString());
+			}
+		} else if ( node instanceof IASTPointer ) {
+			boolean started = false;
+			
+			if (node instanceof ICASTPointer) {
+				if (((ICASTPointer)node).isRestrict()) {
+					started = true;
+					buffer.append(START_OF_LIST);
+					buffer.append(RESTRICT_);
+				}
+			} else if (node instanceof IGPPASTPointer) {
+				if (((IGPPASTPointer)node).isRestrict()) {
+					started = true;
+					buffer.append(START_OF_LIST);
+					buffer.append(RESTRICT_);
+				}
+			}
+			
+			if (((IASTPointer)node).isConst()) {
+				if (!started) {
+					started = true;
+					buffer.append(START_OF_LIST);
+				}
+				buffer.append(CONST_);
+			}
+			
+			if (((IASTPointer)node).isVolatile()) {
+				if (!started) {
+					started = true;
+					buffer.append(START_OF_LIST);
+				}
+				buffer.append(VOLATILE_);
+			}
+		}
+		
+		return buffer.toString();
+	}
+	private String getSignature(IASTDeclSpecifier declSpec) {
+		if (declSpec instanceof IASTCompositeTypeSpecifier) {
+			StringBuilder buf= new StringBuilder();
+			IASTCompositeTypeSpecifier comp = (IASTCompositeTypeSpecifier) declSpec;
+			switch(comp.getKey()) {
+			case IASTCompositeTypeSpecifier.k_struct:
+				buf.append(Keywords.cSTRUCT);
+				break;
+			case IASTCompositeTypeSpecifier.k_union:
+				buf.append(Keywords.cUNION);
+				break;
+			default:
+				buf.append(Keywords.cCLASS);
+				break;
+			}
+			buf.append(' ');
+			buf.append(comp.getName().toString());
+			return buf.toString();
+		} else if (declSpec instanceof IASTEnumerationSpecifier) {
+			StringBuilder buf= new StringBuilder();
+			IASTEnumerationSpecifier comp = (IASTEnumerationSpecifier) declSpec;
+			buf.append(Keywords.cENUM);
+			buf.append(' ');
+			buf.append(comp.getName().toString());
+			return buf.toString();
+		}
+		String intermed= declSpec.getRawSignature();
+		return intermed.replaceAll("\\s+", " ");
+	}
+	
+	private String getDeclaratorName(IASTDeclarator decltor) {
+		String name = BLANK_STRING;
+		while (decltor != null && decltor.getName() != null && decltor.getName().toString() == null) {
+			decltor = decltor.getNestedDeclarator();
+		}
+		if (decltor != null && decltor.getName() != null) {
+			name = decltor.getName().toString();
+		}
+		return name;
+	}
+	
+	@SuppressWarnings("unchecked")
+	public Object getAdapter(Class key) {
+		if (key == IPropertySource.class)
+			return new ASTPropertySource(getNode());
+		
+		return null;
+	}
+	
+	public String getFilename()
+	{
+		if ( node == null ) return BLANK_STRING;
+       IASTFileLocation f = node.getFileLocation();
+       if( f == null )
+           return BLANK_STRING; 
+       return f.getFileName();
+	}
+	
+	public int getOffset() {
+       IASTFileLocation f = node.getFileLocation();
+       if( f == null )
+           return 0; 
+       return f.getNodeOffset();
+	}
+	
+	public int getLength() {
+       IASTFileLocation f = node.getFileLocation();
+       if( f == null )
+           return 0; 
+       return f.getNodeLength();
+	}
+	
+	public void setFiltersFlag(int flag) {
+		filterFlag |= flag;
+		
+		if (parent != null ) {
+			parent.setFiltersFlag(flag);
+		}
+	}
+	
+	public int getFiltersFlag() {
+		return filterFlag;
+	}
+	
+	public int relativeNodePosition( IASTNode n ){
+	    ASTNode astNode = (ASTNode) n;
+	    ASTNode thisNode = (ASTNode) getNode();
+	    if( thisNode.getOffset() > astNode.getOffset() )
+            return -1;
+        if( (thisNode.getOffset() + thisNode.getLength()) < (astNode.getOffset() + astNode.getLength()) )
+            return 1;
+	    return 0;
+	}
+	
+	private static class ASTPropertySource implements IPropertySource {
+		private static final String DOMEXCEPTION_THIS_METHOD_ISN_T_SUPPORTED_BY_THIS_OBJECT = "DOMException - this method isn't supported by this Object"; //$NON-NLS-1$
+        private static final String FLUSH_CACHE_METHOD_NAME = "flushCache"; //$NON-NLS-1$
+        private static final IPropertyDescriptor[] BLANK_DESCRIPTORS = new IPropertyDescriptor[0];
+		private static final String OPEN_PAREN = " ("; //$NON-NLS-1$
+		private static final String CLOSE_PAREN = ")"; //$NON-NLS-1$
+		private static final String L_BRACKET_STRING = "["; //$NON-NLS-1$
+		private static final String R_BRACKET_STRING = "]"; //$NON-NLS-1$
+		private static final String CLONE_METHOD_NAME = "clone"; //$NON-NLS-1$
+		private static final String NO_ELEMENT_STRING = "[0]"; //$NON-NLS-1$
+		private static final String SEMI = ";"; //$NON-NLS-1$
+		private static final String GETTYPE_METHOD_NAME = "getType"; //$NON-NLS-1$
+		private static final String EXCEPTION_ON = " on "; //$NON-NLS-1$
+		private static final String NULL_STRING = "null"; //$NON-NLS-1$
+		private static final String OBJECT_SEPARATOR = ", "; //$NON-NLS-1$
+		private static final String COLON_SEPARATOR = ": "; //$NON-NLS-1$
+		private static final String IBINDING_TAG = "IBinding: "; //$NON-NLS-1$
+		private static final String EMPTY_PARAMETER = "()"; //$NON-NLS-1$
+		private static final String NODE_PREFIX = "Node: "; //$NON-NLS-1$
+		private static final String BINDING_PREFIX = "Binding: "; //$NON-NLS-1$
+		private static final int DEFAULT_DESCRIPTOR_SIZE = 4;
+		IASTNode node = null;
+		
+		public ASTPropertySource(IASTNode node) {
+			this.node = node;
+		}
+		
+		public Object getEditableValue() {
+			return null;
+		}
+		public IPropertyDescriptor[] getPropertyDescriptors() {
+            if (node instanceof IASTTranslationUnit) // skip the properties for the TU (too expensive)
+                return BLANK_DESCRIPTORS;
+            
+			IPropertyDescriptor[] descriptors = new IPropertyDescriptor[DEFAULT_DESCRIPTOR_SIZE];
+			
+			if (node instanceof IASTName) {
+				IPropertyDescriptor[] desc = getPropertyDescriptors(((IASTName)node).resolveBinding());
+				if (desc != null)
+					for(int i=0; i<desc.length; i++)
+						descriptors = (IPropertyDescriptor[])ArrayUtil.append(IPropertyDescriptor.class, descriptors, desc[i]);
+				desc = getPropertyDescriptors(node);
+				if (desc != null)
+					for(int i=0; i<desc.length; i++)
+						descriptors = (IPropertyDescriptor[])ArrayUtil.append(IPropertyDescriptor.class, descriptors, desc[i]);
+				
+			} else {
+				IPropertyDescriptor[] desc = getPropertyDescriptors(node);
+				if (desc != null)
+					for(int i=0; i<desc.length; i++)
+						descriptors = (IPropertyDescriptor[])ArrayUtil.append(IPropertyDescriptor.class, descriptors, desc[i]);
+			}
+			
+			return (IPropertyDescriptor[])ArrayUtil.trim(IPropertyDescriptor.class, descriptors);
+		}
+		
+		private IPropertyDescriptor[] getPropertyDescriptors(Object obj) {
+			IPropertyDescriptor[] desc = new IPropertyDescriptor[DEFAULT_DESCRIPTOR_SIZE];
+			if (obj==null) return BLANK_DESCRIPTORS;
+			Class<?> objClass = obj.getClass();
+			Class<?>[] interfaces = objClass.getInterfaces();
+			
+			for(int i=0; i<interfaces.length; i++) {
+				Method[] methods = interfaces[i].getMethods();
+				for(int j=0; j<methods.length; j++) {
+					// multiple interfaces can have the same method, so don't duplicate that method in the property view
+					// which causes an ArrayIndexOutOfBoundsException elsewhere
+					if (alreadyEncountered(methods[j], desc))
+						continue;
+					
+					if (methods[j].getParameterTypes().length > 0 || (!shouldInvokeMethod(methods[j].getName()))) continue; // only do getters, that aren't in the bad list (like clone())
+					
+					TextPropertyDescriptor text = null;
+					if (obj instanceof IBinding)
+						text = new TextPropertyDescriptor(BINDING_PREFIX + methods[j].getName(), methods[j].getName() + EMPTY_PARAMETER);
+					else
+						text = new TextPropertyDescriptor(NODE_PREFIX + methods[j].getName(), methods[j].getName() + EMPTY_PARAMETER);
+					
+					if (text != null) {
+						if (obj instanceof IBinding)
+							text.setCategory(IBINDING_TAG + ((IASTName)node).resolveBinding().getClass().getName().substring(((IASTName)node).resolveBinding().getClass().getName().lastIndexOf(PERIOD) + 1) + COLON_SEPARATOR + getValueString(((IASTName)node).resolveBinding()));
+						else
+							text.setCategory(objClass.getName().substring(objClass.getName().lastIndexOf(PERIOD) + 1) + COLON_SEPARATOR + getValueString(node));
+						desc = (IPropertyDescriptor[])ArrayUtil.append(IPropertyDescriptor.class, desc, text);
+					}
+				}
+			}
+			
+			return (IPropertyDescriptor[])ArrayUtil.trim(IPropertyDescriptor.class, desc);
+		}
+		
+		private boolean alreadyEncountered(Method method, IPropertyDescriptor[] desc) {
+			StringBuffer name = null;
+			for(int i=0; i<desc.length; i++) {
+				if (desc[i] == null) // reached the end of the array
+					break;
+				
+				name = new StringBuffer();
+				name.append(method.getName());
+				name.append(EMPTY_PARAMETER);
+				if (name.toString().equals(desc[i].getDisplayName()))
+					return true;
+			}
+			
+			return false;
+		}
+		
+		public Object getPropertyValue(Object id) {
+			if (!(id instanceof String))
+				return BLANK_STRING;
+			
+			Class<?> nodeClass = node.getClass();
+			
+			String value = BLANK_STRING;
+			
+			try {
+				Object result = null;
+				if (node instanceof IASTName && ((String)id).startsWith(BINDING_PREFIX)) {
+					String methodName = id.toString();
+					methodName = methodName.replaceAll(BINDING_PREFIX, BLANK_STRING);
+					Method method = ((IASTName)node).resolveBinding().getClass().getMethod(methodName, new Class[0]); // only going to be getter methods...
+					result = method.invoke(((IASTName)node).resolveBinding());
+				} else {
+					String methodName = id.toString();
+					methodName = methodName.replaceAll(NODE_PREFIX, BLANK_STRING);
+					Method method = nodeClass.getMethod(methodName, new Class[0]); // only going to be getter methods...
+					result = method.invoke(node);
+				}
+				
+				if (result == null) {
+					value = NULL_STRING;
+				} else if (result.getClass().isArray()) { // if it's an array
+					if (result.getClass().getComponentType().equals(char.class)) // array of char
+						value = String.valueOf((char[])result);
+					else if (result.getClass().isPrimitive()) {
+						value = trimObjectToString(result.toString());
+					} else
+						value = getValueString((Object[])result);
+				} else {
+					value = getValueString(result);
+				}
+			} catch (Exception e) {
+                if (e instanceof InvocationTargetException) {
+                    if (((InvocationTargetException)e).getTargetException() instanceof DOMException)
+                        return DOMEXCEPTION_THIS_METHOD_ISN_T_SUPPORTED_BY_THIS_OBJECT;
+                
+                    e.printStackTrace(); // display all exceptions to developers
+                    return trimObjectToString(((InvocationTargetException)e).getTargetException().toString()) + EXCEPTION_ON + ((InvocationTargetException)e).getTargetException().getStackTrace()[0].toString();
+                }
+                
+                return e.toString();
+			}
+			
+			return value;
+		}
+		
+		private String trimObjectToString(String str) {
+			return str.substring(str.lastIndexOf(PERIOD) + 1);
+		}
+		
+		private String getValueString(Object obj) {
+			if (obj == null) return NULL_STRING;
+			
+			StringBuffer buffer = new StringBuffer();
+			
+			if (obj.getClass().isPrimitive()) {
+				buffer.append(trimObjectToString(obj.toString()));
+			} else if (obj instanceof ASTNodeProperty) {
+				buffer.append(((ASTNodeProperty)obj).getName());
+			} else if (obj instanceof IASTProblemHolder) {
+				IASTProblemHolder ph= (IASTProblemHolder) obj;
+				IASTProblem problem= ph.getProblem();
+				buffer.append(problem.getMessage());
+			} else if (obj instanceof IASTName) {
+				final String toString = ((IASTName)obj).toString();
+                if( toString != null )
+                {
+                    buffer.append( trimObjectToString(toString) );
+                    buffer.append(COLON_SEPARATOR);
+                    buffer.append( getType(((IASTName)obj).resolveBinding()) );
+                }
+			} else if (obj instanceof IType) {
+				buffer.append(getType(obj));
+			} else if (obj instanceof IBinding) {
+				buffer.append(((IBinding)obj).getName());
+				buffer.append(COLON_SEPARATOR);
+				buffer.append(getType(obj));
+			} else if (obj instanceof IASTExpression) {
+				buffer.append(ASTSignatureUtil.getExpressionString((IASTExpression)obj));
+			} else if (obj instanceof IASTNode) {
+				String utilString = ASTSignatureUtil.getNodeSignature((IASTNode)obj);
+				if (utilString != null && !utilString.equals(BLANK_STRING)) {
+					buffer.append(trimObjectToString(obj.toString()));
+					buffer.append(COLON_SEPARATOR);
+					buffer.append(utilString);
+				}
+				else
+					buffer.append(trimObjectToString(obj.toString()));
+			} else
+				buffer.append(obj.toString());
+			
+			if( obj instanceof IBinding ){
+				buffer.append( OPEN_PAREN );
+				buffer.append( Integer.toHexString(obj.hashCode()) );
+				buffer.append( CLOSE_PAREN );
+			}
+			
+			return buffer.toString();
+		}
+		
+		private String getType(Object obj) {
+			if (obj == null) return NULL_STRING;
+			
+			if (obj instanceof IType)
+				return ASTTypeUtil.getType((IType)obj);
+			
+			Method[] methods = obj.getClass().getMethods();
+			boolean hasGetType = false;
+			
+			int i=0;
+			for(; i<methods.length; i++) {
+				if (methods[i].getName().equals(GETTYPE_METHOD_NAME)) {
+					hasGetType = true;
+					break;
+				}
+			}
+			
+			if (hasGetType) {
+				try {
+					Object result = methods[i].invoke(obj);
+					
+					if (result instanceof IType) {
+						return ASTTypeUtil.getType((IType)result);
+					}
+				} catch (Exception e) {
+					if (e instanceof InvocationTargetException) {
+                        if (((InvocationTargetException)e).getTargetException() instanceof DOMException)
+                            return DOMEXCEPTION_THIS_METHOD_ISN_T_SUPPORTED_BY_THIS_OBJECT;
+                    
+                        e.printStackTrace(); // display all exceptions to developers
+						return trimObjectToString(((InvocationTargetException)e).getTargetException().toString()) + EXCEPTION_ON + ((InvocationTargetException)e).getTargetException().getStackTrace()[0].toString();
+                    }
+					
+					return e.toString();
+				}
+			}
+			
+			return BLANK_STRING; // if there is no type
+		}
+		
+		private String getValueString(Object[] objs) {
+			if (objs.length==0) return trimObjectToString(objs.getClass().getName()).replaceAll(SEMI, BLANK_STRING) + NO_ELEMENT_STRING;
+			
+			StringBuffer buffer = new StringBuffer();
+			buffer.append(L_BRACKET_STRING);
+			for(int i=0; i<objs.length; i++) {
+				buffer.append(getValueString(objs[i]));
+				if (i<objs.length-1) buffer.append(OBJECT_SEPARATOR); 
+			}
+			buffer.append(R_BRACKET_STRING);
+			
+			return buffer.toString();
+		}
+		
+		// used to determine if a getter method should be invoked or not, there may be a list of them in the future...
+		private boolean shouldInvokeMethod(String method) {
+			if (method.equals(CLONE_METHOD_NAME)) 
+				return false;
+            if (method.equals(FLUSH_CACHE_METHOD_NAME)) 
+                return false;
+            if (method.startsWith("set"))
+            	return false;
+			
+			return true;
+		}
+		
+		public boolean isPropertySet(Object id) {
+			return false;
+		}
+		public void resetPropertyValue(Object id) {
+		}
+		public void setPropertyValue(Object id, Object value) {
+		}
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTNodeParent.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTNodeParent.java
new file mode 100644
index 0000000..0dd2a9c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTNodeParent.java
@@ -0,0 +1,397 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.DOMAST;
+
+import java.lang.reflect.Array;
+
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTNodeLocation;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.parser.util.ArrayUtil;
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+
+/**
+ * @author dsteffle
+ */
+public class DOMASTNodeParent extends DOMASTNodeLeaf {
+    private static final int NO_PREPROCESSOR_STATMENT = -1;
+	private static final DOMASTNodeLeaf[] EMPTY_CHILDREN_ARRAY = new DOMASTNodeLeaf[0];
+	private static final int DEFAULT_NODE_CHAIN_SIZE = 4;
+	private static final int DEFAULT_CHILDREN_SIZE = 4;
+	int index=0;
+	private DOMASTNodeLeaf[] children;
+	boolean cleanupedElements = false;
+    private int indexFirstPreproStmnt=NO_PREPROCESSOR_STATMENT;
+	
+	public int getStartSearch() {
+		return index;
+	}
+
+	public DOMASTNodeParent() {
+		super(null);
+		children = EMPTY_CHILDREN_ARRAY;
+	}
+	
+	public DOMASTNodeParent(IASTNode node) {
+		super(node);
+		children = new DOMASTNodeLeaf[DEFAULT_CHILDREN_SIZE];
+	}
+	public void addChild(DOMASTNodeLeaf child) {
+        if (child.getNode() instanceof IASTPreprocessorStatement && indexFirstPreproStmnt == NO_PREPROCESSOR_STATMENT) {
+            indexFirstPreproStmnt=index;
+        }
+        
+		if (index==children.length) {
+			children = (DOMASTNodeLeaf[])ArrayUtil.append(DOMASTNodeLeaf.class, children, child);
+			index++;
+		} else {
+			children[index++] = child;
+		}
+		
+		child.setParent(this);
+	}
+	public void removeChild(DOMASTNodeLeaf child) {
+		for(int i=0; i<children.length; i++) {
+			if (children[i] == child) {
+				children[i] = null; 
+				break;
+			}
+		}
+		child.setParent(null);
+	}
+	
+    public DOMASTNodeLeaf[] getChildren(boolean cleanupElements) {
+        if (cleanupElements) {
+            return getChildren();
+        }
+        
+        return children;
+    }
+    
+	public DOMASTNodeLeaf [] getChildren() {
+        // remove null children from the array (if not already done so)
+        if (!cleanupedElements) {
+            cleanChildren();
+        }
+        
+        return children;
+	}
+    
+	/**
+	 * Inserts obj into the array at position pos and if this is not possible (due to a bad offset)
+	 * then the obj is just appended to the end of the array.
+	 * 
+	 * @param c
+	 * @param array
+	 * @param obj
+	 * @param pos
+	 * @return
+	 */
+	public Object[] insert(Class c, Object[] array, Object obj, int pos) {
+		if (pos < 0 || pos >= array.length) {
+			return ArrayUtil.append(c, array, obj);
+		}
+		
+		Object[] temp = (Object[]) Array.newInstance( c, array.length + 1 );
+		if (pos > 0) {
+			System.arraycopy( array, 0, temp, 0, pos );
+			temp[pos] = obj;
+			System.arraycopy( array, pos, temp, pos + 1, array.length - pos );
+		} else {
+			temp[0] = obj;
+			System.arraycopy( array, 0, temp, 1, array.length );
+		}
+		
+		return temp;
+	}
+	
+    public void cleanChildren() {
+        // remove null elements
+        children = (DOMASTNodeLeaf[])ArrayUtil.removeNulls(DOMASTNodeLeaf.class, children);
+        
+        // sort the elements
+		//if (indexFirstPreproStmnt >= 0) { // TODO Devin what if it's ALL preprocessor statements ?
+			int firstOffset=0;
+			int firstLength=0;
+			int checkOffset=0;
+			int checkLength=0;
+			boolean moved=false;
+			for (int j=0, i=0; j < children.length && children[j] != null; j++) {
+				if( !(children[j].getNode() instanceof IASTPreprocessorStatement) )
+					continue;
+				while(true) {
+					if (i==j) break; // don't need to check itself or anything after it
+					
+					checkOffset = ((ASTNode)children[j].getNode()).getOffset();
+					checkLength = ((ASTNode)children[j].getNode()).getLength();
+					firstOffset = ((ASTNode)children[i].getNode()).getOffset();
+					firstLength = ((ASTNode)children[i].getNode()).getLength();
+					
+					// if the checking element comes before the first element then move the checking element before the first element
+					if (checkOffset < firstOffset && checkOffset + checkLength < firstOffset + firstLength) {
+						DOMASTNodeLeaf temp = children[j];
+						System.arraycopy( children, i, children, i + 1, j - i );
+						children[i] = temp;
+						break;
+					}
+					
+					// if the checking element is within the bounds of the first element then it must be a child of that element
+					if (checkOffset > firstOffset && checkOffset + checkLength < firstOffset + firstLength) {
+						DOMASTNodeLeaf temp = children[j];
+						if( j + 1 < children.length )
+							System.arraycopy( children, j + 1, children, j, children.length - j - 1 );
+						children[ children.length - 1 ] = null;
+						((DOMASTNodeParent)children[i]).addChild(temp);
+						j--;
+						break;
+					}
+					
+					i++;
+				}
+			}
+	//	}
+		children = (DOMASTNodeLeaf[])ArrayUtil.removeNulls(DOMASTNodeLeaf.class, children);
+        
+        // need to also clean up the children's children, to make sure all nulls are removed (prevent expansion sign when there isn't one)
+        for(int i=0; i<children.length; i++) {
+            if (children[i] instanceof DOMASTNodeParent) {
+                DOMASTNodeLeaf[] kids = ((DOMASTNodeParent)children[i]).children;
+                // remove null elements
+                kids = (DOMASTNodeLeaf[])ArrayUtil.removeNulls(DOMASTNodeLeaf.class, kids);
+                ((DOMASTNodeParent)children[i]).setChildren(kids);
+            }
+        }
+        
+        cleanupedElements = true;
+    }
+    
+	public boolean hasChildren() {
+		return children.length>0;
+	}
+
+    /**
+     * Returns the DOMASTNodeParent whose IASTNode is the parent of the IASTNode.
+     *
+     * This function is an optimization function used to only search merged preprocessor nodes.
+     * 
+     * @param node
+     * @return
+     */
+    public DOMASTNodeParent findTreeParentForMergedNode(IASTNode node) {
+        if (node == null || node.getParent() == null) return null;
+        
+        IASTNode parentToFind = node.getParent();
+        
+        // first check this node before checking children
+        if (this.getNode() == parentToFind) {
+            return this;
+        }
+        
+        // build the chain of nodes... and use it to search the tree for the DOMASTNodeParent that owns the node's parent
+        IASTNode[] nodeChain = new IASTNode[DEFAULT_NODE_CHAIN_SIZE];
+        IASTNode topNode = node.getParent();
+        ArrayUtil.append(IASTNode.class, nodeChain, node);
+        nodeChain = (IASTNode[])ArrayUtil.append(IASTNode.class, nodeChain, topNode);
+        while(topNode.getParent() != null && !(topNode.getParent() instanceof IASTTranslationUnit)) {
+            topNode = topNode.getParent();
+            nodeChain = (IASTNode[])ArrayUtil.append(IASTNode.class, nodeChain, topNode);
+        }
+        
+        // loop through the chain of nodes and use it to only search the necessary children required to find the node
+        DOMASTNodeLeaf[] childrenToSearch = children;
+        int j=childrenToSearch.length-1;
+        outerLoop: for(int i=nodeChain.length-1; i>=0; i--) {
+            if (nodeChain[i] != null) {
+                parentToFind = nodeChain[i];
+                
+                for(; j>=0; j--) {
+                    if (childrenToSearch[j] instanceof DOMASTNodeParent) {
+                        if ( childrenToSearch[j].getNode() == node.getParent() ) {
+                            return (DOMASTNodeParent)childrenToSearch[j];
+                        }
+                                                
+                        if (childrenToSearch[j].getNode() == parentToFind) {
+                            int pos = j;
+                            j = ((DOMASTNodeParent)childrenToSearch[pos]).getStartSearch();
+                            childrenToSearch = ((DOMASTNodeParent)childrenToSearch[pos]).getChildren(false);
+                            continue outerLoop;
+                        }
+                    }
+                }
+            }
+        }
+        
+        return null; // nothing found
+    }
+    
+	/**
+	 * Returns the DOMASTNodeParent whose IASTNode is the parent of the IASTNode.
+	 * 
+	 * @param node
+	 * @return
+	 */
+	public DOMASTNodeParent findTreeParentForNode(IASTNode node) {
+		if (node == null || node.getParent() == null) return null;
+		
+		IASTNode parentToFind = node.getParent();
+		
+		// first check this node before checking children
+		if (this.getNode() == parentToFind) {
+			return this;
+		}
+		
+		// build the chain of nodes... and use it to search the tree for the DOMASTNodeParent that owns the node's parent
+		IASTNode[] nodeChain = new IASTNode[DEFAULT_NODE_CHAIN_SIZE];
+		IASTNode topNode = node.getParent();
+		ArrayUtil.append(IASTNode.class, nodeChain, node);
+		nodeChain = (IASTNode[])ArrayUtil.append(IASTNode.class, nodeChain, topNode);
+		while(topNode.getParent() != null && !(topNode.getParent() instanceof IASTTranslationUnit)) {
+			topNode = topNode.getParent();
+			nodeChain = (IASTNode[])ArrayUtil.append(IASTNode.class, nodeChain, topNode);
+		}
+		
+		// loop through the chain of nodes and use it to only search the necessary children required to find the node
+		DOMASTNodeLeaf[] childrenToSearch = children;
+		int j=getStartSearch();
+		outerLoop: for(int i=nodeChain.length-1; i>=0; i--) {
+			if (nodeChain[i] != null) {
+				parentToFind = nodeChain[i];
+				
+				for(; j>=0; j--) { // use the DOMASTNodeParent's index to start searching at the end of it's children (performance optimization)
+					if (j<childrenToSearch.length && childrenToSearch[j] instanceof DOMASTNodeParent) {
+						if ( childrenToSearch[j].getNode() == node.getParent() ) {
+							return (DOMASTNodeParent)childrenToSearch[j];
+						}
+												
+						if (childrenToSearch[j].getNode() == parentToFind) {
+							int pos = j;
+							j = ((DOMASTNodeParent)childrenToSearch[pos]).getStartSearch();
+							childrenToSearch = ((DOMASTNodeParent)childrenToSearch[pos]).getChildren(false);
+							continue outerLoop;
+						}
+					}
+				}
+			}
+		}
+		
+		// try finding the best parent possible
+		IASTNode parent = node.getParent();
+		DOMASTNodeParent tree = null;
+		while (parent != null && tree == null) {
+			tree = findTreeParentForNode(parent);
+			if (tree != null) return tree;
+			
+			parent = parent.getParent();
+		}
+		
+		return null; // nothing found
+	}
+
+	public int relativeNodePosition( IASTNode n ){
+	    ASTNode astNode = (ASTNode) n;
+	    if( !cleanupedElements ){
+            cleanChildren();
+        }
+	    if( children.length > 0 ){
+	        ASTNode first = (ASTNode) children[0].getNode();
+	        if( first.getOffset() > astNode.getOffset() )
+	            return -1;
+	        ASTNode last = (ASTNode) children[ children.length - 1 ].getNode();
+	        if( (last.getOffset() + last.getLength()) < (astNode.getOffset() + astNode.getLength()) )
+	            return 1;
+	        return 0;
+	    }
+	    return super.relativeNodePosition( n );
+	}
+	/**
+	 * Returns the DOMASTNodeParent that corresponds to the IASTNode.  This is the DOMASTNodeParent
+	 * that represents the IASTNode in the DOM AST View.
+	 * 
+	 * @param node
+	 * @return
+	 */
+	public DOMASTNodeParent findTreeObject(IASTNode node, boolean useOffset) {
+		if (node == null) return null;
+		
+		// first check this node before checking children
+		if (equalNodes(node, this.getNode(), useOffset)) {
+			return this;
+		}
+		if( children.length == 0 )
+			return null;
+		if( !cleanupedElements ){
+			cleanChildren();
+		}
+		int a = 0, z = children.length - 1;
+		int idx = (z - a) / 2 ;
+		while( true ){
+			int compare = children[ idx ].relativeNodePosition( node );
+			if( compare == 0 ){
+				if( children[idx] instanceof DOMASTNodeParent ){
+					return ((DOMASTNodeParent)children[idx]).findTreeObject( node, useOffset );
+				}
+				return null; //??
+			} else if( compare == -1 )
+				z = idx;
+			else
+				a = idx;
+			int diff = z - a;
+			if( diff == 0 )
+				return null;
+			else if( diff == 1 )
+				idx = ( idx == z ) ? a : z;
+			else 
+				idx = a + ( z - a ) / 2;
+			if( z == a )
+				return null;
+			if( z - a == 1 && children[ a ].relativeNodePosition( node ) == 1 && children[ z ].relativeNodePosition( node ) == -1 )
+				return null;
+		}   
+	}
+	
+	private boolean equalNodes(IASTNode node1, IASTNode node2, boolean useOffset) {
+		if (useOffset) {
+			if (node1 instanceof ASTNode && node2 instanceof ASTNode) {
+				if (((ASTNode)node1).getOffset() == ((ASTNode)node2).getOffset() &&
+						((ASTNode)node1).getLength() == ((ASTNode)node2).getLength()) {
+					if (node1.getClass().equals(node2.getClass()))
+						return true;
+					else
+						return false;
+				}
+			} else {
+				IASTNodeLocation[] locs1 = node1.getNodeLocations();
+				IASTNodeLocation[] locs2 = node2.getNodeLocations();
+				for(int i=0; i<locs1.length && i<locs2.length; i++) {
+					if (locs1[i].getNodeOffset() != locs2[i].getNodeOffset() ||
+							locs1[i].getNodeLength() != locs2[i].getNodeLength())
+						return false;
+				}
+				
+				if (node1.getClass().equals(node2.getClass()))
+					return true;
+				else
+					return false;
+			}
+		} else {
+			if ( node1 == node2 ) 
+				return true;
+		}
+		
+		return false;
+	}
+	
+	public void setChildren(DOMASTNodeLeaf[] children) {
+		this.children = children;
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTPluginImages.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTPluginImages.java
new file mode 100644
index 0000000..b7b5cb5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/DOMASTPluginImages.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.DOMAST;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * @author dsteffle
+ */
+public class DOMASTPluginImages {
+	private static ImageRegistry imageRegistry = new ImageRegistry(CUIPlugin.getStandardDisplay());
+	
+	/**
+	 * Returns the standard display to be used. The method first checks, if
+	 * the thread calling this method has an associated display. If so, this
+	 * display is returned. Otherwise the method returns the default display.
+	 */
+	public static Display getStandardDisplay() {
+		Display display= Display.getCurrent();
+		if (display == null) {
+			display= Display.getDefault();
+		}
+		return display;		
+	}	
+	
+	// Subdirectory (under the package containing this class) where 16 color images are
+	private static URL fgIconBaseURL;
+
+	static {
+		try {
+			fgIconBaseURL= new URL(CTestPlugin.getDefault().getBundle().getEntry("/"), "icons/" ); //$NON-NLS-1$ //$NON-NLS-2$
+		} catch (MalformedURLException e) {}
+	}	
+	public static final String PLUGIN_ID = "org.eclipse.cdt.testplugin.CTestPlugin"; //$NON-NLS-1$
+	private static final String NAME_PREFIX= PLUGIN_ID + '.';
+	private static final int NAME_PREFIX_LENGTH= NAME_PREFIX.length();
+	public static final String ICON_PREFIX= "dom_view/"; //$NON-NLS-1$
+
+	public static final String IMG_IASTArrayModifier= NAME_PREFIX + "showasarray_co.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTDeclaration= NAME_PREFIX + "cdeclaration_obj.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTDeclarator= NAME_PREFIX + "variable_obj.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTDeclSpecifier= NAME_PREFIX + "var_simple.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTEnumerator= NAME_PREFIX + "enumerator_obj.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTExpression= NAME_PREFIX + "expression_obj.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTInitializer= NAME_PREFIX + "variable_local_obj.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTName= NAME_PREFIX + "tnames_co.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTParameterDeclaration= NAME_PREFIX + "var_declaration_obj.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTPointerOperator= NAME_PREFIX + "var_pointer.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTPreprocessorStatement= NAME_PREFIX + "define_obj.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTProblem= NAME_PREFIX + "warning_obj.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTSimpleDeclaration= NAME_PREFIX + "method_public_obj.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTStatement= NAME_PREFIX + "statement_obj.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTTranslationUnit= NAME_PREFIX + "source_attach_attrib.gif"; //$NON-NLS-1$
+	public static final String IMG_IASTTypeId= NAME_PREFIX + "types.gif"; //$NON-NLS-1$
+	public static final String IMG_ICASTDesignator= NAME_PREFIX + "watch_globals.gif"; //$NON-NLS-1$
+	public static final String IMG_ICPPASTConstructorChainInitializer = NAME_PREFIX + "jump_co.gif"; //$NON-NLS-1$
+	public static final String IMG_ICPPASTTemplateParameter = NAME_PREFIX + "disassembly.gif"; //$NON-NLS-1$
+	public static final String IMG_DEFAULT = NAME_PREFIX + "brkpd_obj.gif"; //$NON-NLS-1$
+	public static final String IMG_EXPAND_ALL = NAME_PREFIX + "expandall.gif"; //$NON-NLS-1$
+	public static final String IMG_COLLAPSE_ALL = NAME_PREFIX + "collapseall.gif"; //$NON-NLS-1$
+	public static final String IMG_CLEAR = NAME_PREFIX + "clear.gif"; //$NON-NLS-1$
+	public static final String IMG_SEARCH_NAMES = NAME_PREFIX + "search_ref_obj.gif"; //$NON-NLS-1$
+    public static final String IMG_REFRESH_VIEW = NAME_PREFIX + "refresh_view.gif"; //$NON-NLS-1$
+    public static final String IMG_RELOAD_VIEW = NAME_PREFIX + "reload_view.gif"; //$NON-NLS-1$
+	
+	public static final ImageDescriptor DESC_IASTArrayModifier= createManaged(ICON_PREFIX, IMG_IASTArrayModifier);
+	public static final ImageDescriptor DESC_IASTDeclaration= createManaged(ICON_PREFIX, IMG_IASTDeclaration);
+	public static final ImageDescriptor DESC_IASTDeclarator= createManaged(ICON_PREFIX, IMG_IASTDeclarator);
+	public static final ImageDescriptor DESC_IASTDeclSpecifier= createManaged(ICON_PREFIX, IMG_IASTDeclSpecifier);
+	public static final ImageDescriptor DESC_IASTEnumerator= createManaged(ICON_PREFIX, IMG_IASTEnumerator);
+	public static final ImageDescriptor DESC_IASTExpression= createManaged(ICON_PREFIX, IMG_IASTExpression);
+	public static final ImageDescriptor DESC_IASTInitializer= createManaged(ICON_PREFIX, IMG_IASTInitializer);
+	public static final ImageDescriptor DESC_IASTName= createManaged(ICON_PREFIX, IMG_IASTName);
+	public static final ImageDescriptor DESC_IASTParameterDeclaration= createManaged(ICON_PREFIX, IMG_IASTParameterDeclaration);
+	public static final ImageDescriptor DESC_IASTPointerOperator= createManaged(ICON_PREFIX, IMG_IASTPointerOperator);
+	public static final ImageDescriptor DESC_IASTPreprocessorStatement= createManaged(ICON_PREFIX, IMG_IASTPreprocessorStatement);
+	public static final ImageDescriptor DESC_IASTProblem= createManaged(ICON_PREFIX, IMG_IASTProblem);
+	public static final ImageDescriptor DESC_IASTSimpleDeclaration= createManaged(ICON_PREFIX, IMG_IASTSimpleDeclaration);
+	public static final ImageDescriptor DESC_IASTStatement= createManaged(ICON_PREFIX, IMG_IASTStatement);
+	public static final ImageDescriptor DESC_IASTTranslationUnit= createManaged(ICON_PREFIX, IMG_IASTTranslationUnit);
+	public static final ImageDescriptor DESC_IASTTypeId= createManaged(ICON_PREFIX, IMG_IASTTypeId);
+	public static final ImageDescriptor DESC_ICASTDesignator= createManaged(ICON_PREFIX, IMG_ICASTDesignator);
+	public static final ImageDescriptor DESC_ICPPASTConstructorChainInitializer= createManaged(ICON_PREFIX, IMG_ICPPASTConstructorChainInitializer);
+	public static final ImageDescriptor DESC_ICPPASTTemplateParameter= createManaged(ICON_PREFIX, IMG_ICPPASTTemplateParameter);
+	public static final ImageDescriptor DESC_DEFAULT= createManaged(ICON_PREFIX, IMG_DEFAULT);
+	public static final ImageDescriptor DESC_EXPAND_ALL= createManaged(ICON_PREFIX, IMG_EXPAND_ALL);
+	public static final ImageDescriptor DESC_COLLAPSE_ALL= createManaged(ICON_PREFIX, IMG_COLLAPSE_ALL);
+	public static final ImageDescriptor DESC_CLEAR= createManaged(ICON_PREFIX, IMG_CLEAR);
+	public static final ImageDescriptor DESC_SEARCH_NAMES= createManaged(ICON_PREFIX, IMG_SEARCH_NAMES);
+    public static final ImageDescriptor DESC_REFRESH_VIEW= createManaged(ICON_PREFIX, IMG_REFRESH_VIEW);
+    public static final ImageDescriptor DESC_RELOAD_VIEW= createManaged(ICON_PREFIX, IMG_RELOAD_VIEW);
+	
+	private static ImageDescriptor createManaged(String prefix, String name) {
+		return createManaged(imageRegistry, prefix, name);
+	}
+	
+	private static ImageDescriptor createManaged(ImageRegistry registry, String prefix, String name) {
+		ImageDescriptor result= ImageDescriptor.createFromURL(makeIconFileURL(prefix, name.substring(NAME_PREFIX_LENGTH)));
+		registry.put(name, result);
+		return result;
+	}
+	
+	private static URL makeIconFileURL(String prefix, String name) {
+		StringBuffer buffer= new StringBuffer(prefix);
+		buffer.append(name);
+		try {
+			return new URL(fgIconBaseURL, buffer.toString());
+		} catch (MalformedURLException e) {
+			CUIPlugin.log(e);
+			return null;
+		}
+	}
+	
+	public static Image get(String key) {
+		return imageRegistry.get(key);
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/FindIASTNameDialog.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/FindIASTNameDialog.java
new file mode 100644
index 0000000..d3f8e75
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/FindIASTNameDialog.java
@@ -0,0 +1,1350 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.DOMAST;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.PatternSyntaxException;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.events.ShellAdapter;
+import org.eclipse.swt.events.ShellEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.resource.JFaceColors;
+
+import org.eclipse.jface.text.IFindReplaceTarget;
+import org.eclipse.jface.text.IFindReplaceTargetExtension;
+import org.eclipse.jface.text.IFindReplaceTargetExtension3;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextUtilities;
+
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.texteditor.TextEditorPlugin;
+import org.eclipse.ui.texteditor.IEditorStatusLine;
+
+/**
+ * Find/Replace dialog. The dialog is opened on a particular 
+ * target but can be re-targeted. Internally used by the <code>FindReplaceAction</code>
+ */
+class FindIASTNameDialog extends Dialog {
+
+	private static final String REGULAR_EXPRESSIONS_LABEL = "Regular expressions"; //$NON-NLS-1$
+	private static final String WHOLE_WORD_LABEL = "Whole Word"; //$NON-NLS-1$
+	private static final String CASE_SENSITIVE_LABEL = "Case Sensitive"; //$NON-NLS-1$
+	private static final String OPTIONS_LABEL = "Options"; //$NON-NLS-1$
+	private static final String BLANK_STRING = ""; //$NON-NLS-1$
+	private static final String NAME_NOT_FOUND = "Name not found."; //$NON-NLS-1$
+	private static final String FIND_NEXT_LABEL = "Find Next"; //$NON-NLS-1$
+	private static final String FIND_IASTNAME_LABEL = "Find IASTName:"; //$NON-NLS-1$
+	/**
+	 * Updates the find replace dialog on activation changes.
+	 */
+	class ActivationListener extends ShellAdapter {
+		/*
+		 * @see ShellListener#shellActivated(ShellEvent)
+		 */
+		public void shellActivated(ShellEvent e) {
+			
+			String oldText= fFindField.getText(); // XXX workaround for 10766
+			List oldList= new ArrayList();
+			oldList.addAll(fFindHistory);
+
+			readConfiguration();
+			
+
+			fFindField.removeModifyListener(fFindModifyListener);
+
+			updateCombo(fFindField, fFindHistory);
+			if (!fFindHistory.equals(oldList) && !fFindHistory.isEmpty())
+				fFindField.setText((String) fFindHistory.get(0));
+			else 
+				fFindField.setText(oldText);
+			if (findFieldHadFocus())
+				fFindField.setSelection(new Point(0, fFindField.getText().length()));
+			fFindField.addModifyListener(fFindModifyListener);
+
+			fActiveShell= (Shell)e.widget;
+			updateButtonState();
+			
+			if (findFieldHadFocus() && getShell() == fActiveShell && !fFindField.isDisposed())
+				fFindField.setFocus();
+		}
+		
+		/**
+		 * Returns <code>true</code> if the find field had focus,
+		 * <code>false</code> if it did not.
+		 * 
+		 * @return <code>true</code> if the find field had focus,
+		 *         <code>false</code> if it did not
+		 */
+		private boolean findFieldHadFocus() {
+			/*
+			 * See bug 45447. Under GTK and Motif, the focus of the find field
+			 * is already gone when shellDeactivated is called. On the other
+			 * hand focus has already been restored when shellActivated is
+			 * called.
+			 * 
+			 * Therefore, we select and give focus if either
+			 * fGiveFocusToFindField is true or the find field has focus.
+			 */
+			return fGiveFocusToFindField || okToUse(fFindField) && fFindField.isFocusControl();
+		}
+		
+		/*
+		 * @see ShellListener#shellDeactivated(ShellEvent)
+		 */
+		public void shellDeactivated(ShellEvent e) {
+			fGiveFocusToFindField= fFindField.isFocusControl();
+
+			storeSettings();
+
+//			fGlobalRadioButton.setSelection(true);
+//			fSelectedRangeRadioButton.setSelection(false);
+			fUseSelectedLines= false;
+
+			if (fTarget != null && (fTarget instanceof IFindReplaceTargetExtension))
+				((IFindReplaceTargetExtension) fTarget).setScope(null);
+			
+			fOldScope= null;
+
+			fActiveShell= null;			
+			updateButtonState();
+		}
+	}
+
+	/**
+	 * Modify listener to update the search result in case of incremental search.
+	 * @since 2.0
+	 */
+	private class FindModifyListener implements ModifyListener {
+		
+		/*
+		 * @see ModifyListener#modifyText(ModifyEvent)
+		 */
+		public void modifyText(ModifyEvent e) {
+			searchTextChanged = true;
+			
+			if (isIncrementalSearch() && !isRegExSearchAvailableAndChecked()) {
+				if (fFindField.getText().equals(BLANK_STRING) && fTarget != null) { //$NON-NLS-1$
+					// empty selection at base location
+					int offset= fIncrementalBaseLocation.x;
+
+					if (isForwardSearch() && !fNeedsInitialFindBeforeReplace || !isForwardSearch() && fNeedsInitialFindBeforeReplace)
+						offset= offset + fIncrementalBaseLocation.y;
+
+					fNeedsInitialFindBeforeReplace= false;
+					findAndSelect(offset, BLANK_STRING, isForwardSearch(), isCaseSensitiveSearch(), isWholeWordSearch(), isRegExSearchAvailableAndChecked()); //$NON-NLS-1$
+				} else {
+					performSearch(false);
+				}
+			}
+			
+			updateButtonState();
+		}
+	}
+
+	/** The size of the dialogs search history. */
+	private static final int HISTORY_SIZE= 5;
+
+	protected boolean searchTextChanged=false; 
+	private Point fLocation;
+	private Point fIncrementalBaseLocation;
+	private boolean fWrapInit, fCaseInit, fWholeWordInit, fForwardInit, fGlobalInit, fIncrementalInit;
+	/**
+	 * Tells whether an initial find operation is needed
+	 * before the replace operation.
+	 * @since 3.0 
+	 */
+	private boolean fNeedsInitialFindBeforeReplace;
+	/**
+	 * Initial value for telling whether the search string is a regular expression.
+	 * @since 3.0
+	 */
+	boolean fIsRegExInit;
+
+	private List fFindHistory;
+	private IRegion fOldScope;
+
+	private IFindReplaceTarget fTarget;
+	private Shell fParentShell;
+	private Shell fActiveShell;
+
+	private final ActivationListener fActivationListener= new ActivationListener();
+	private final ModifyListener fFindModifyListener= new FindModifyListener();
+
+	private Label fStatusLabel;
+	private Button fForwardRadioButton, fGlobalRadioButton, fSelectedRangeRadioButton;
+	private Button fCaseCheckBox, fWrapCheckBox, fWholeWordCheckBox, fIncrementalCheckBox;
+
+	/**
+	 * Checkbox for selecting whether the search string is a regular expression.
+	 * @since 3.0
+	 */
+	private Button fIsRegExCheckBox;
+	
+	private Button fFindNextButton;
+	Combo fFindField, fReplaceField;
+	private Rectangle fDialogPositionInit;
+
+	private IDialogSettings fDialogSettings;
+	/**
+	 * Tells whether the target supports regular expressions.
+	 * <code>true</code> if the target supports regular expressions
+	 * @since 3.0
+	 */
+	private boolean fIsTargetSupportingRegEx;
+	/**
+	 * Tells whether fUseSelectedLines radio is checked.
+	 * @since 3.0
+	 */
+	private boolean fUseSelectedLines;
+	/**
+	 * <code>true</code> if the find field should receive focus the next time
+	 * the dialog is activated, <code>false</code> otherwise.
+	 * @since 3.0
+	 */
+	private boolean fGiveFocusToFindField= true;
+
+
+	
+	/**
+	 * Creates a new dialog with the given shell as parent.
+	 * @param parentShell the parent shell
+	 */
+	public FindIASTNameDialog(Shell parentShell, IFindReplaceTarget target) {
+		super(parentShell);
+		
+		fParentShell= null;
+		updateTarget(target, false);
+
+		fDialogPositionInit= null;
+		fFindHistory= new ArrayList(HISTORY_SIZE - 1);
+
+		fWrapInit= false;
+		fCaseInit= false;
+		fIsRegExInit= false;
+		fWholeWordInit= false;
+		fIncrementalInit= false;
+		fGlobalInit= true;
+		fForwardInit= true;
+
+		readConfiguration();
+		
+		setShellStyle(SWT.CLOSE | SWT.MODELESS | SWT.BORDER | SWT.TITLE);
+		setBlockOnOpen(false);
+	}
+	
+	/**
+	 * Returns this dialog's parent shell.
+	 * @return the dialog's parent shell
+	 */
+	public Shell getParentShell() {
+		return super.getParentShell();
+	}
+	
+	
+	/**
+	 * Returns <code>true</code> if control can be used.
+	 *
+	 * @param control the control to be checked
+	 * @return <code>true</code> if control can be used
+	 */
+	private boolean okToUse(Control control) {
+		return control != null && !control.isDisposed();
+	}
+	
+	/*
+	 * @see org.eclipse.jface.window.Window#create()
+	 */
+	public void create() {
+		
+		super.create();
+		
+		Shell shell= getShell();
+		shell.addShellListener(fActivationListener);
+		if (fLocation != null)
+			shell.setLocation(fLocation);
+		
+		// set help context
+//		WorkbenchHelp.setHelp(shell, IAbstractTextEditorHelpContextIds.FIND_REPLACE_DIALOG);
+
+		// fill in combo contents
+		fFindField.removeModifyListener(fFindModifyListener);
+		updateCombo(fFindField, fFindHistory);
+		fFindField.addModifyListener(fFindModifyListener);
+//		updateCombo(fReplaceField, fReplaceHistory);
+
+		// get find string
+		initFindStringFromSelection();
+		
+		// set dialog position
+		if (fDialogPositionInit != null)
+			shell.setBounds(fDialogPositionInit);
+		
+		shell.setText(FIND_IASTNAME_LABEL);
+		// shell.setImage(null);
+	}
+
+	/**
+	 * Create the button section of the find/replace dialog.
+	 *
+	 * @param parent the parent composite
+	 * @return the button section
+	 */
+	private Composite createButtonSection(Composite parent) {
+		
+		Composite panel= new Composite(parent, SWT.NULL);		
+		GridLayout layout= new GridLayout();
+		layout.numColumns= 1;
+		panel.setLayout(layout);
+		
+		fFindNextButton= makeButton(panel, FIND_NEXT_LABEL, 102, true, new SelectionAdapter() { //$NON-NLS-1$
+			public void widgetSelected(SelectionEvent e) {
+				if (fTarget instanceof FindIASTNameTarget && searchTextChanged) {
+					((FindIASTNameTarget)fTarget).clearMatchingNames();
+					searchTextChanged = false;
+				}
+				
+				if (isIncrementalSearch() && !isRegExSearchAvailableAndChecked())
+					initIncrementalBaseLocation();
+
+				fNeedsInitialFindBeforeReplace= false;
+				performSearch();
+				updateFindHistory();
+				fFindNextButton.setFocus();
+			}
+		});
+		setGridData(fFindNextButton, GridData.FILL, true, GridData.FILL, false);
+		
+		return panel;
+	}
+	
+	/**
+	 * Creates the options configuration section of the find replace dialog.
+	 *
+	 * @param parent the parent composite
+	 * @return the options configuration section
+	 */
+	private Composite createConfigPanel(Composite parent) {
+
+		Composite panel= new Composite(parent, SWT.NULL);
+		GridLayout layout= new GridLayout();
+		layout.numColumns= 1;
+		panel.setLayout(layout);
+
+		Composite directionGroup= createDirectionGroup(panel);
+		setGridData(directionGroup, GridData.FILL, true, GridData.FILL, false);
+
+		Composite optionsGroup= createOptionsGroup(panel);
+		setGridData(optionsGroup, GridData.FILL, true, GridData.FILL, false);
+		GridData data= (GridData) optionsGroup.getLayoutData();
+		data.horizontalSpan= 2;
+		optionsGroup.setLayoutData(data);
+
+		return panel;
+	}
+	
+	/*
+	 * @see org.eclipse.jface.window.Window#createContents(org.eclipse.swt.widgets.Composite)
+	 */
+	protected Control createContents(Composite parent) {
+
+		Composite panel= new Composite(parent, SWT.NULL);
+		GridLayout layout= new GridLayout();
+		layout.numColumns= 1;
+		layout.makeColumnsEqualWidth= true;
+		panel.setLayout(layout);
+
+		Composite inputPanel= createInputPanel(panel);
+		setGridData(inputPanel, GridData.FILL, true, GridData.CENTER, false);
+
+		Composite configPanel= createConfigPanel(panel);
+		setGridData(configPanel, GridData.FILL, true, GridData.CENTER, true);
+		
+		Composite buttonPanelB= createButtonSection(panel);
+		setGridData(buttonPanelB, GridData.FILL, true, GridData.CENTER, false);
+		
+		Composite statusBar= createStatusAndCloseButton(panel);
+		setGridData(statusBar, GridData.FILL, true, GridData.CENTER, false);
+		
+		updateButtonState();
+		
+		applyDialogFont(panel);
+		
+		return panel;
+	}
+	
+	/**
+	 * Creates the direction defining part of the options defining section
+	 * of the find replace dialog.
+	 *
+	 * @param parent the parent composite
+	 * @return the direction defining part
+	 */
+	private Composite createDirectionGroup(Composite parent) {
+
+		Composite panel= new Composite(parent, SWT.NONE);
+		GridLayout layout= new GridLayout();
+		layout.marginWidth= 0;
+		layout.marginHeight= 0;
+		panel.setLayout(layout);
+
+		Group group= new Group(panel, SWT.SHADOW_ETCHED_IN);
+		group.setText("Direction"); //$NON-NLS-1$
+		GridLayout groupLayout= new GridLayout();
+		group.setLayout(groupLayout);
+		group.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		SelectionListener selectionListener= new SelectionListener() {
+			public void widgetSelected(SelectionEvent e) {
+				if (isIncrementalSearch() && !isRegExSearchAvailableAndChecked())
+					initIncrementalBaseLocation();
+			}
+
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		};
+
+		fForwardRadioButton= new Button(group, SWT.RADIO | SWT.LEFT);
+		fForwardRadioButton.setText("Forward"); //$NON-NLS-1$
+		setGridData(fForwardRadioButton, GridData.BEGINNING, false, GridData.CENTER, false);
+		fForwardRadioButton.addSelectionListener(selectionListener);
+
+		Button backwardRadioButton= new Button(group, SWT.RADIO | SWT.LEFT);
+		backwardRadioButton.setText("Backward"); //$NON-NLS-1$
+		setGridData(backwardRadioButton, GridData.BEGINNING, false, GridData.CENTER, false);
+		backwardRadioButton.addSelectionListener(selectionListener);
+
+		backwardRadioButton.setSelection(!fForwardInit);
+		fForwardRadioButton.setSelection(fForwardInit);
+
+		return panel;
+	}
+
+	/**
+	 * Tells the dialog to perform searches only in the scope given by the actually selected lines.
+	 * @param selectedLines <code>true</code> if selected lines should be used
+	 * @since 2.0
+	 */
+	private void useSelectedLines(boolean selectedLines) {
+		if (isIncrementalSearch() && !isRegExSearchAvailableAndChecked())
+			initIncrementalBaseLocation();
+
+		if (fTarget == null || !(fTarget instanceof IFindReplaceTargetExtension))
+			return;
+
+		IFindReplaceTargetExtension extensionTarget= (IFindReplaceTargetExtension) fTarget;
+
+		if (selectedLines) {
+
+			IRegion scope;
+			if (fOldScope == null) {
+				Point lineSelection= extensionTarget.getLineSelection();
+				scope= new Region(lineSelection.x, lineSelection.y);
+			} else {
+				scope= fOldScope;
+				fOldScope= null;
+			}
+
+			int offset= isForwardSearch()
+				? scope.getOffset() 
+				: scope.getOffset() + scope.getLength();					
+
+			extensionTarget.setSelection(offset, 0);					
+			extensionTarget.setScope(scope);
+		} else {
+			fOldScope= extensionTarget.getScope();
+			extensionTarget.setScope(null);			
+		}
+	}
+
+	/**
+	 * Creates the panel where the user specifies the text to search
+	 * for and the optional replacement text.
+	 *
+	 * @param parent the parent composite
+	 * @return the input panel
+	 */
+	private Composite createInputPanel(Composite parent) {
+		Composite panel= new Composite(parent, SWT.NULL);
+		GridLayout layout= new GridLayout();
+		layout.numColumns= 2;
+		panel.setLayout(layout);
+
+		Label findLabel= new Label(panel, SWT.LEFT);
+		findLabel.setText("Find Name:"); //$NON-NLS-1$
+		setGridData(findLabel, GridData.BEGINNING, false, GridData.CENTER, false);
+
+		fFindField= new Combo(panel, SWT.DROP_DOWN | SWT.BORDER);
+		setGridData(fFindField, GridData.FILL, true, GridData.CENTER, false);
+		fFindField.addModifyListener(fFindModifyListener);
+
+		return panel;
+	}
+
+	/**
+	 * Creates the functional options part of the options defining
+	 * section of the find replace dialog.
+	 *
+	 * @param parent the parent composite
+	 * @return the options group
+	 */
+	private Composite createOptionsGroup(Composite parent) {
+
+		Composite panel= new Composite(parent, SWT.NULL);
+		GridLayout layout= new GridLayout();
+		layout.marginWidth= 0;
+		layout.marginHeight= 0;
+		panel.setLayout(layout);
+
+		Group group= new Group(panel, SWT.SHADOW_NONE);
+		group.setText(OPTIONS_LABEL); //$NON-NLS-1$
+		GridLayout groupLayout= new GridLayout();
+		groupLayout.numColumns= 2;
+		groupLayout.makeColumnsEqualWidth= true;		
+		group.setLayout(groupLayout);
+		group.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		SelectionListener selectionListener= new SelectionListener() {
+			public void widgetSelected(SelectionEvent e) {
+				storeSettings();
+			}
+
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		};
+
+		fCaseCheckBox= new Button(group, SWT.CHECK | SWT.LEFT);
+		fCaseCheckBox.setText(CASE_SENSITIVE_LABEL); //$NON-NLS-1$
+		setGridData(fCaseCheckBox, GridData.BEGINNING, false, GridData.CENTER, false);
+		fCaseCheckBox.setSelection(fCaseInit);
+		fCaseCheckBox.addSelectionListener(selectionListener);
+
+		fWholeWordCheckBox= new Button(group, SWT.CHECK | SWT.LEFT);
+		fWholeWordCheckBox.setText(WHOLE_WORD_LABEL); //$NON-NLS-1$
+		setGridData(fWholeWordCheckBox, GridData.BEGINNING, false, GridData.CENTER, false);
+		fWholeWordCheckBox.setSelection(fWholeWordInit);
+		fWholeWordCheckBox.addSelectionListener(selectionListener);
+
+		fIsRegExCheckBox= new Button(group, SWT.CHECK | SWT.LEFT);
+		fIsRegExCheckBox.setText(REGULAR_EXPRESSIONS_LABEL); //$NON-NLS-1$
+		setGridData(fIsRegExCheckBox, GridData.BEGINNING, false, GridData.CENTER, false);
+		((GridData)fIsRegExCheckBox.getLayoutData()).horizontalSpan= 2;
+		fIsRegExCheckBox.setSelection(fIsRegExInit);
+		fIsRegExCheckBox.addSelectionListener(new SelectionAdapter() {
+			/*
+			 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+			 */
+			public void widgetSelected(SelectionEvent e) {
+				boolean newState= fIsRegExCheckBox.getSelection();
+				if (fTarget instanceof FindIASTNameTarget)
+					((FindIASTNameTarget)fTarget).clearMatchingNames();
+				
+				updateButtonState();
+				storeSettings();
+			}
+		});
+		fWholeWordCheckBox.setEnabled(!isRegExSearchAvailableAndChecked());
+		fWholeWordCheckBox.addSelectionListener(new SelectionAdapter() {
+			/*
+			 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+			 */
+			public void widgetSelected(SelectionEvent e) {
+				if (fTarget instanceof FindIASTNameTarget)
+					((FindIASTNameTarget)fTarget).clearMatchingNames();
+				
+				updateButtonState();
+			}
+		});
+		return panel;
+	}
+	
+	/**
+	 * Creates the status and close section of the dialog.
+	 *
+	 * @param parent the parent composite
+	 * @return the status and close button
+	 */
+	private Composite createStatusAndCloseButton(Composite parent) {
+
+		Composite panel= new Composite(parent, SWT.NULL);
+		GridLayout layout= new GridLayout();
+		layout.numColumns= 2;
+		layout.marginWidth= 0;
+		layout.marginHeight= 0;		
+		panel.setLayout(layout);
+
+		fStatusLabel= new Label(panel, SWT.LEFT);
+		setGridData(fStatusLabel, GridData.FILL, true, GridData.CENTER, false);
+
+		String label= "Close"; //$NON-NLS-1$
+		Button closeButton= createButton(panel, 101, label, false);
+		setGridData(closeButton, GridData.END, false, GridData.END, false);
+
+		return panel;
+	}
+
+	/*
+	 * @see Dialog#buttonPressed
+	 */
+	protected void buttonPressed(int buttonID) {
+		if (buttonID == 101)
+			close();
+	}
+	
+	// ------- action invocation ---------------------------------------
+
+	/**
+	 * Returns the position of the specified search string, or <code>-1</code> if the string can
+	 * not be found when searching using the given options.
+	 * 
+	 * @param findString the string to search for
+	 * @param startPosition the position at which to start the search
+	 * @param forwardSearch the direction of the search
+	 * @param caseSensitive	should the search be case sensitive
+	 * @param wrapSearch	should the search wrap to the start/end if arrived at the end/start
+	 * @param wholeWord does the search string represent a complete word
+	 * @param regExSearch if <code>true</code> findString represents a regular expression
+	 * @return the occurrence of the find string following the options or <code>-1</code> if nothing found
+	 * @since 3.0
+	 */
+	private int findIndex(String findString, int startPosition, boolean forwardSearch, boolean caseSensitive, boolean wrapSearch, boolean wholeWord, boolean regExSearch) {
+
+		if (forwardSearch) {
+			if (wrapSearch) {
+				int index= findAndSelect(startPosition, findString, true, caseSensitive, wholeWord, regExSearch);
+				if (index == -1) {
+					if (okToUse(getShell()) && !isIncrementalSearch())
+						getShell().getDisplay().beep();
+					index= findAndSelect(-1, findString, true, caseSensitive, wholeWord, regExSearch);
+				}
+				return index;
+			}
+			return findAndSelect(startPosition, findString, true, caseSensitive, wholeWord, regExSearch);
+		}
+
+		// backward
+		if (wrapSearch) {
+			int index= findAndSelect(startPosition - 1, findString, false, caseSensitive, wholeWord, regExSearch);
+			if (index == -1) {
+				if (okToUse(getShell()) && !isIncrementalSearch())
+					getShell().getDisplay().beep();
+				index= findAndSelect(-1, findString, false, caseSensitive, wholeWord, regExSearch);
+			}
+			return index;
+		}
+		return findAndSelect(startPosition - 1, findString, false, caseSensitive, wholeWord, regExSearch);
+	}
+	
+	/**
+	 * Searches for a string starting at the given offset and using the specified search
+	 * directives. If a string has been found it is selected and its start offset is 
+	 * returned.
+	 *
+	 * @param offset the offset at which searching starts
+	 * @param findString the string which should be found
+	 * @param forwardSearch the direction of the search
+	 * @param caseSensitive <code>true</code> performs a case sensitive search, <code>false</code> an insensitive search
+	 * @param wholeWord if <code>true</code> only occurrences are reported in which the findString stands as a word by itself 
+	 * @param regExSearch if <code>true</code> findString represents a regular expression 
+	 * @return the position of the specified string, or -1 if the string has not been found
+	 * @since 3.0
+	 */
+	private int findAndSelect(int offset, String findString, boolean forwardSearch, boolean caseSensitive, boolean wholeWord, boolean regExSearch) {
+		if (fTarget instanceof IFindReplaceTargetExtension3)
+			return ((IFindReplaceTargetExtension3)fTarget).findAndSelect(offset, findString, forwardSearch, caseSensitive, wholeWord, regExSearch);
+		return fTarget.findAndSelect(offset, findString, forwardSearch, caseSensitive, wholeWord);
+	}
+
+	/**
+	 * Replaces the selection with <code>replaceString</code>. If
+	 * <code>regExReplace</code> is <code>true</code>,
+	 * <code>replaceString</code> is a regex replace pattern which will get
+	 * expanded if the underlying target supports it. Returns the region of the
+	 * inserted text; note that the returned selection covers the expanded
+	 * pattern in case of regex replace.
+	 * 
+	 * @param replaceString the replace string (or a regex pattern)
+	 * @param regExReplace <code>true</code> if <code>replaceString</code>
+	 *        is a pattern
+	 * @return the selection after replacing, i.e. the inserted text
+	 * @since 3.0
+	 */
+	Point replaceSelection(String replaceString, boolean regExReplace) {
+		if (fTarget instanceof IFindReplaceTargetExtension3)
+			((IFindReplaceTargetExtension3)fTarget).replaceSelection(replaceString, regExReplace);
+		else
+			fTarget.replaceSelection(replaceString);
+		
+		return fTarget.getSelection();
+	}
+	
+	/**
+	 * Returns whether the specified search string can be found using the given options.
+	 * 
+	 * @param findString the string to search for
+	 * @param forwardSearch the direction of the search
+	 * @param caseSensitive	should the search be case sensitive
+	 * @param wrapSearch	should the search wrap to the start/end if arrived at the end/start
+	 * @param wholeWord does the search string represent a complete word
+	 * @param incremental is this an incremental search
+	 * @param regExSearch if <code>true</code> findString represents a regular expression 
+	 * @return <code>true</code> if the search string can be found using the given options
+	 * 
+	 * @since 3.0
+	 */
+	private boolean findNext(String findString, boolean forwardSearch, boolean caseSensitive, boolean wrapSearch, boolean wholeWord, boolean incremental, boolean regExSearch) {
+
+		if (fTarget == null)
+			return false;
+
+		Point r= null;
+		if (incremental)
+			r= fIncrementalBaseLocation;
+		else
+			r= fTarget.getSelection();
+
+		int findReplacePosition= r.x;
+		if (forwardSearch && !fNeedsInitialFindBeforeReplace || !forwardSearch && fNeedsInitialFindBeforeReplace)
+			findReplacePosition += r.y;
+
+		fNeedsInitialFindBeforeReplace= false;
+
+		int index= findIndex(findString, findReplacePosition, forwardSearch, caseSensitive, wrapSearch, wholeWord, regExSearch);
+
+		if (index != -1)
+			return true;
+		
+		return false;
+	}
+
+	/**
+	 * Returns the dialog's boundaries.
+	 * @return the dialog's boundaries
+	 */
+	private Rectangle getDialogBoundaries() {
+		if (okToUse(getShell()))
+			return getShell().getBounds();
+		return fDialogPositionInit;
+	}
+	
+	/**
+	 * Returns the dialog's history.
+	 * @return the dialog's history
+	 */
+	private List getFindHistory() {
+		return fFindHistory;
+	}
+
+	// ------- accessors ---------------------------------------
+
+	/**
+	 * Retrieves the string to search for from the appropriate text input field and returns it. 
+	 * @return the search string
+	 */
+	private String getFindString() {
+		if (okToUse(fFindField)) {
+			return fFindField.getText();
+		}
+		return BLANK_STRING; //$NON-NLS-1$
+	}
+	
+	// ------- init / close ---------------------------------------
+
+	/**
+	 * Returns the actual selection of the find replace target.
+	 * @return the selection of the target
+	 */
+	private String getSelectionString() {
+		String selection= fTarget.getSelectionText();
+		if (selection != null && selection.length() > 0) {
+			int[] info= TextUtilities.indexOf(TextUtilities.DELIMITERS, selection, 0);
+			if (info[0] > 0)
+				return selection.substring(0, info[0]);
+			else if (info[0] == -1)
+				return selection;
+		}
+		return null;
+	}
+	
+	/**
+	 * @see org.eclipse.jface.window.Window#close()
+	 */
+	public boolean close() {
+		handleDialogClose();
+		return super.close();
+	}
+	
+	/**
+	 * Removes focus changed listener from browser and stores settings for re-open.
+	 */
+	private void handleDialogClose() {
+
+		// remove listeners
+		if (okToUse(fFindField)) {
+			fFindField.removeModifyListener(fFindModifyListener);
+		}
+		
+		if (fParentShell != null) {
+			fParentShell.removeShellListener(fActivationListener);
+			fParentShell= null;
+		}
+		
+		getShell().removeShellListener(fActivationListener);
+		
+		// store current settings in case of re-open
+		storeSettings();
+
+		if (fTarget != null && fTarget instanceof IFindReplaceTargetExtension)
+			((IFindReplaceTargetExtension) fTarget).endSession();
+
+		// prevent leaks
+		fActiveShell= null;
+		fTarget= null;
+		
+	}
+
+	/**
+	 * Writes the current selection to the dialog settings.
+	 * @since 3.0
+	 */
+	private void writeSelection() {
+		if (fTarget == null)
+			return;
+		String selection= fTarget.getSelectionText();
+		if (selection == null)
+			selection= BLANK_STRING; //$NON-NLS-1$
+
+		IDialogSettings s= getDialogSettings();
+		s.put("selection", selection); //$NON-NLS-1$
+	}
+	
+	/**
+	 * Stores the current state in the dialog settings.
+	 * @since 2.0
+	 */
+	private void storeSettings() {
+		fDialogPositionInit= getDialogBoundaries();
+		fWrapInit= isWrapSearch();
+		fWholeWordInit= isWholeWordSetting();
+		fCaseInit= isCaseSensitiveSearch();
+		fIsRegExInit= isRegExSearch();
+		fIncrementalInit= isIncrementalSearch();
+		fForwardInit= isForwardSearch();
+
+		writeConfiguration();		
+	}
+	
+	/**
+	 * Initializes the string to search for and the appropriate
+	 * text inout field based on the selection found in the
+	 * action's target.
+	 */
+	private void initFindStringFromSelection() {
+		if (fTarget != null && okToUse(fFindField)) {
+			String selection= getSelectionString();
+			fFindField.removeModifyListener(fFindModifyListener);
+			if (selection != null) {
+				fFindField.setText(selection);
+				if (!selection.equals(fTarget.getSelectionText())) {
+					useSelectedLines(true);
+					fGlobalRadioButton.setSelection(false);
+					fSelectedRangeRadioButton.setSelection(true);
+					fUseSelectedLines= true;
+				}
+			} else {
+				if (BLANK_STRING.equals(fFindField.getText())) { //$NON-NLS-1$
+					if (fFindHistory.size() > 0)
+						fFindField.setText((String) fFindHistory.get(0));
+					else
+						fFindField.setText(BLANK_STRING); //$NON-NLS-1$				
+				}
+			}
+			fFindField.setSelection(new Point(0, fFindField.getText().length()));
+			fFindField.addModifyListener(fFindModifyListener);
+		}
+	}
+
+	/**
+	 * Initializes the anchor used as starting point for incremental searching.
+	 * @since 2.0
+	 */
+	private void initIncrementalBaseLocation() {
+		if (fTarget != null && isIncrementalSearch() && !isRegExSearchAvailableAndChecked()) {
+			fIncrementalBaseLocation= fTarget.getSelection();
+		} else {
+			fIncrementalBaseLocation= new Point(0, 0);	
+		}
+	}
+
+	// ------- history ---------------------------------------
+		
+	/**
+	 * Retrieves and returns the option case sensitivity from the appropriate check box.
+	 * @return <code>true</code> if case sensitive
+	 */
+	private boolean isCaseSensitiveSearch() {
+		if (okToUse(fCaseCheckBox)) {
+			return fCaseCheckBox.getSelection();
+		}
+		return fCaseInit;
+	}
+
+	/**
+	 * Retrieves and returns the regEx option from the appropriate check box.
+	 * 
+	 * @return <code>true</code> if case sensitive
+	 * @since 3.0
+	 */
+	private boolean isRegExSearch() {
+		if (okToUse(fIsRegExCheckBox)) {
+			return fIsRegExCheckBox.getSelection();
+		}
+		return fIsRegExInit;
+	}
+
+	/**
+	 * If the target supports regular expressions search retrieves and returns
+	 * regEx option from appropriate check box.
+	 * 
+	 * @return <code>true</code> if regEx is available and checked
+	 * @since 3.0
+	 */
+	private boolean isRegExSearchAvailableAndChecked() {
+		if (okToUse(fIsRegExCheckBox)) {
+			return fIsTargetSupportingRegEx && fIsRegExCheckBox.getSelection();
+		}
+		return fIsRegExInit;
+	}
+
+	/**
+	 * Retrieves and returns the option search direction from the appropriate check box.
+	 * @return <code>true</code> if searching forward
+	 */
+	private boolean isForwardSearch() {
+		if (okToUse(fForwardRadioButton)) {
+			return fForwardRadioButton.getSelection();
+		}
+		return fForwardInit;
+	}
+
+	/**
+	 * Retrieves and returns the option search whole words from the appropriate check box.
+	 * @return <code>true</code> if searching for whole words
+	 */
+	private boolean isWholeWordSetting() {
+		if (okToUse(fWholeWordCheckBox)) {
+			return fWholeWordCheckBox.getSelection();
+		}
+		return fWholeWordInit;
+	}
+
+	/**
+	 * Returns <code>true</code> if searching should be restricted to entire
+	 * words, <code>false</code> if not. This is the case if the respective
+	 * checkbox is turned on, regex is off, and the checkbox is enabled, i.e. 
+	 * the current find string is an entire word.
+	 * 
+	 * @return <code>true</code> if the search is restricted to whole words
+	 */
+	private boolean isWholeWordSearch() {
+		return isWholeWordSetting() && !isRegExSearchAvailableAndChecked() && (okToUse(fWholeWordCheckBox) ? fWholeWordCheckBox.isEnabled() : true);
+	}
+
+	/**
+	 * Retrieves and returns the option wrap search from the appropriate check box.
+	 * @return <code>true</code> if wrapping while searching
+	 */
+	private boolean isWrapSearch() {
+		if (okToUse(fWrapCheckBox)) {
+			return fWrapCheckBox.getSelection();
+		}
+		return fWrapInit;
+	}
+
+	/**
+	 * Retrieves and returns the option incremental search from the appropriate check box.
+	 * @return <code>true</code> if incremental search
+	 * @since 2.0
+	 */
+	private boolean isIncrementalSearch() {
+		if (okToUse(fIncrementalCheckBox)) {
+			return fIncrementalCheckBox.getSelection();
+		}
+		return fIncrementalInit;
+	}
+
+	/**
+	 * Creates a button.
+	 * @param parent the parent control
+	 * @param key the key to lookup the button label
+	 * @param id the button id
+	 * @param dfltButton is this button the default button
+	 * @param listener a button pressed listener
+	 * @return the new button
+	 */
+	private Button makeButton(Composite parent, String label, int id, boolean dfltButton, SelectionListener listener) {
+		Button b= createButton(parent, id, label, dfltButton);
+		b.addSelectionListener(listener);
+		return b;
+	}
+
+	/**
+	 * Returns the status line manager of the active editor or <code>null</code> if there is no such editor.
+	 * @return the status line manager of the active editor
+	 */
+	private IEditorStatusLine getStatusLineManager() {
+		IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		if (window == null)
+			return null;
+
+		IWorkbenchPage page= window.getActivePage();
+		if (page == null)
+			return null;
+			
+		IEditorPart editor= page.getActiveEditor();
+		if (editor == null)
+			return null;
+
+		return (IEditorStatusLine) editor.getAdapter(IEditorStatusLine.class);
+	}
+
+	/**
+	 * Sets the given status message in the status line.
+	 * 
+	 * @param error <code>true</code> if it is an error
+	 * @param message the error message
+	 */
+	private void statusMessage(boolean error, String message) {
+		fStatusLabel.setText(message);
+
+		if (error)
+			fStatusLabel.setForeground(JFaceColors.getErrorText(fStatusLabel.getDisplay()));
+		else
+			fStatusLabel.setForeground(null);
+
+		IEditorStatusLine statusLine= getStatusLineManager();
+		if (statusLine != null)
+			statusLine.setMessage(error, message, null);	
+
+		if (error)
+			getShell().getDisplay().beep();
+	}
+
+	/**
+	 * Sets the given error message in the status line.
+	 * @param message the message
+	 */
+	private void statusError(String message) {
+		statusMessage(true, message);
+	}
+
+	/**
+	 * Sets the given message in the status line.
+	 * @param message the message
+	 */
+	private void statusMessage(String message) {
+		statusMessage(false, message);
+	}
+
+	/**
+	 * Locates the user's findString in the text of the target.
+	 */
+	private void performSearch() {
+		performSearch(isIncrementalSearch() && !isRegExSearchAvailableAndChecked());
+	}
+	
+	/**
+	 * Locates the user's findString in the text of the target.
+	 * 
+	 * @param mustInitIncrementalBaseLocation <code>true</code> if base location must be initialized
+	 * @since 3.0
+	 */
+	private void performSearch(boolean mustInitIncrementalBaseLocation) {
+
+		if (mustInitIncrementalBaseLocation)
+			initIncrementalBaseLocation();
+		
+		String findString= getFindString();
+
+		if (findString != null && findString.length() > 0) {
+
+			try {
+				boolean somethingFound= findNext(findString, isForwardSearch(), isCaseSensitiveSearch(), isWrapSearch(), isWholeWordSearch(), isIncrementalSearch() && !isRegExSearchAvailableAndChecked(), isRegExSearchAvailableAndChecked());
+				if (somethingFound) {
+					statusMessage(BLANK_STRING); //$NON-NLS-1$
+				} else {
+					statusMessage(NAME_NOT_FOUND); //$NON-NLS-1$
+				}
+			} catch (PatternSyntaxException ex) {
+				statusError(ex.getLocalizedMessage());
+			} catch (IllegalStateException ex) {
+				// we don't keep state in this dialog
+			}
+		}
+		writeSelection();
+		updateButtonState();
+	}
+	
+	// ------- UI creation ---------------------------------------
+	
+	/**
+	 * Attaches the given layout specification to the <code>component</code>.
+	 * 
+	 * @param component the component
+	 * @param horizontalAlignment horizontal alignment
+	 * @param grabExcessHorizontalSpace grab excess horizontal space
+	 * @param verticalAlignment vertical alignment
+	 * @param grabExcessVerticalSpace grab excess vertical space
+	 */
+	private void setGridData(Control component, int horizontalAlignment, boolean grabExcessHorizontalSpace, int verticalAlignment, boolean grabExcessVerticalSpace) {
+		GridData gd= new GridData();
+		gd.horizontalAlignment= horizontalAlignment;
+		gd.grabExcessHorizontalSpace= grabExcessHorizontalSpace;
+		gd.verticalAlignment= verticalAlignment;
+		gd.grabExcessVerticalSpace= grabExcessVerticalSpace;
+		component.setLayoutData(gd);
+	}
+
+	/** 
+	 * Updates the enabled state of the buttons.
+	 * 
+	 * @since 3.0
+	 */
+	private void updateButtonState() {
+		if (okToUse(getShell()) && okToUse(fFindNextButton)) {
+			boolean enable= fTarget != null && (fActiveShell == fParentShell || fActiveShell == getShell());
+			String str= getFindString();
+			boolean findString= str != null && str.length() > 0;
+			
+			boolean wholeWord= isWord(str) && !isRegExSearchAvailableAndChecked();
+			fWholeWordCheckBox.setEnabled(wholeWord);
+
+			fFindNextButton.setEnabled(enable && findString);
+		}
+	}
+	
+	/**
+	 * Tests whether each character in the given
+	 * string is a letter.
+	 * 
+	 * @param str
+	 * @return <code>true</code> if the given string is a word
+	 * @since 3.0
+	 */
+	private boolean isWord(String str) {
+		if (str == null || str.length() == 0)
+			return false;
+		
+		for (int i= 0; i < str.length(); i++) {
+			if (!Character.isJavaIdentifierPart(str.charAt(i)))
+				return false;
+		}
+		return true;
+	}
+	
+	/**
+	 * Updates the given combo with the given content.
+	 * @param combo combo to be updated
+	 * @param content to be put into the combo
+	 */
+	private void updateCombo(Combo combo, List content) {
+		combo.removeAll();
+		for (int i= 0; i < content.size(); i++) {
+			combo.add(content.get(i).toString());
+		}
+	}
+
+	// ------- open / reopen ---------------------------------------
+
+	/**
+	 * Called after executed find action to update the history.
+	 */
+	private void updateFindHistory() {
+		if (okToUse(fFindField)) {
+			fFindField.removeModifyListener(fFindModifyListener);
+			updateHistory(fFindField, fFindHistory);
+			fFindField.addModifyListener(fFindModifyListener);
+		}
+	}
+
+	/**
+	 * Updates the combo with the history.
+	 * @param combo to be updated
+	 * @param history to be put into the combo
+	 */
+	private void updateHistory(Combo combo, List history) {
+		String findString= combo.getText();
+		int index= history.indexOf(findString);
+		if (index != 0) {
+			if (index != -1) {
+				history.remove(index);
+			}
+			history.add(0, findString);
+			updateCombo(combo, history);
+			combo.setText(findString);
+		}
+	}
+	
+	/**
+	 * Updates this dialog because of a different target.
+	 * @param target the new target
+	 * @param isTargetEditable <code>true</code> if the new target can be modifed
+	 * @since 2.0
+	 */
+	public void updateTarget(IFindReplaceTarget target, boolean isTargetEditable) {
+		
+		fNeedsInitialFindBeforeReplace= true;
+		
+		if (target != fTarget) {
+			if (fTarget != null && fTarget instanceof IFindReplaceTargetExtension)
+				((IFindReplaceTargetExtension) fTarget).endSession();
+
+			fTarget= target;
+			if (target != null)
+				fIsTargetSupportingRegEx= target instanceof IFindReplaceTargetExtension3;
+
+			if (fTarget != null && fTarget instanceof IFindReplaceTargetExtension) {
+				((IFindReplaceTargetExtension) fTarget).beginSession();
+
+				fGlobalInit= true;
+				fGlobalRadioButton.setSelection(fGlobalInit);
+				fSelectedRangeRadioButton.setSelection(!fGlobalInit);
+				fUseSelectedLines= !fGlobalInit;
+			}
+		}
+
+		if (okToUse(fIsRegExCheckBox))
+			fIsRegExCheckBox.setEnabled(fIsTargetSupportingRegEx);
+	
+		if (okToUse(fWholeWordCheckBox))
+			fWholeWordCheckBox.setEnabled(!isRegExSearchAvailableAndChecked());
+		
+		if (okToUse(fIncrementalCheckBox))
+			fIncrementalCheckBox.setEnabled(!isRegExSearchAvailableAndChecked());
+
+		// see pr 51073
+		fGiveFocusToFindField= true;
+	}
+
+	/** 
+	 * Sets the parent shell of this dialog to be the given shell.
+	 *
+	 * @param shell the new parent shell
+	 */
+	public void setParentShell(Shell shell) {
+		if (shell != fParentShell) {
+			
+			if (fParentShell != null)
+				fParentShell.removeShellListener(fActivationListener);
+							
+			fParentShell= shell;
+			fParentShell.addShellListener(fActivationListener);
+		}
+		
+		fActiveShell= shell;
+	}
+	
+	
+	//--------------- configuration handling --------------
+	
+	/**
+	 * Returns the dialog settings object used to share state
+	 * between several find/replace dialogs.
+	 * 
+	 * @return the dialog settings to be used
+	 */
+	private IDialogSettings getDialogSettings() {
+		IDialogSettings settings= TextEditorPlugin.getDefault().getDialogSettings();
+		fDialogSettings= settings.getSection(getClass().getName());
+		if (fDialogSettings == null)
+			fDialogSettings= settings.addNewSection(getClass().getName());
+		return fDialogSettings;
+	}
+	
+	/**
+	 * Initializes itself from the dialog settings with the same state
+	 * as at the previous invocation.
+	 */
+	private void readConfiguration() {
+		IDialogSettings s= getDialogSettings();
+
+		try {
+			int x= s.getInt("x"); //$NON-NLS-1$
+			int y= s.getInt("y"); //$NON-NLS-1$
+			fLocation= new Point(x, y);
+		} catch (NumberFormatException e) {
+			fLocation= null;
+		}
+			
+		fWrapInit= s.getBoolean("wrap"); //$NON-NLS-1$
+		fCaseInit= s.getBoolean("casesensitive"); //$NON-NLS-1$
+		fWholeWordInit= s.getBoolean("wholeword"); //$NON-NLS-1$
+		fIncrementalInit= s.getBoolean("incremental"); //$NON-NLS-1$
+		fIsRegExInit= s.getBoolean("isRegEx"); //$NON-NLS-1$
+		
+		String[] findHistory= s.getArray("findhistory"); //$NON-NLS-1$
+		if (findHistory != null) {
+			List history= getFindHistory();
+			history.clear();
+			for (int i= 0; i < findHistory.length; i++)
+				history.add(findHistory[i]);
+		}		
+	}
+	
+	/**
+	 * Stores its current configuration in the dialog store.
+	 */
+	private void writeConfiguration() {
+		IDialogSettings s= getDialogSettings();
+
+		Point location= getShell().getLocation();
+		s.put("x", location.x); //$NON-NLS-1$
+		s.put("y", location.y); //$NON-NLS-1$
+		
+		s.put("wrap", fWrapInit); //$NON-NLS-1$
+		s.put("casesensitive", fCaseInit); //$NON-NLS-1$
+		s.put("wholeword", fWholeWordInit); //$NON-NLS-1$
+		s.put("incremental", fIncrementalInit); //$NON-NLS-1$
+		s.put("isRegEx", fIsRegExInit); //$NON-NLS-1$
+		List history= getFindHistory();
+		while (history.size() > 8)
+			history.remove(8);
+		String[] names= new String[history.size()];
+		history.toArray(names);
+		s.put("findhistory", names); //$NON-NLS-1$
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/FindIASTNameTarget.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/FindIASTNameTarget.java
new file mode 100644
index 0000000..c7886a4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/FindIASTNameTarget.java
@@ -0,0 +1,440 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.DOMAST;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.jface.text.IFindReplaceTarget;
+import org.eclipse.jface.text.IFindReplaceTargetExtension3;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.TreeItem;
+
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.c.CASTVisitor;
+import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
+
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTTranslationUnit;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTranslationUnit;
+
+/**
+ * @author dsteffle
+ */
+public class FindIASTNameTarget implements IFindReplaceTarget, IFindReplaceTargetExtension3 {
+
+	IASTTranslationUnit tu = null;
+	DOMASTNodeParent tuTreeParent = null;
+	TreeViewer viewer = null;
+	IASTName[] matchingNames = null;
+	boolean wasForward = true;
+	int index = 0;
+	
+    static protected class CNameCollector extends CASTVisitor {
+        private static final int REGULAR_NAME_ADD = -1;
+		private static final String BLANK_STRING = ""; //$NON-NLS-1$
+		{
+            shouldVisitNames = true;
+        }
+        public List nameList = new ArrayList();
+        
+        String findString = null;
+		boolean caseSensitive = true;
+		boolean wholeWord = true;
+		boolean regExSearch = false;
+		
+		public CNameCollector(String findString, boolean caseSensitive, boolean wholeWord, boolean regExSearch) {
+			this.findString = findString;
+			this.caseSensitive = caseSensitive;
+			this.wholeWord = wholeWord;
+			this.regExSearch = regExSearch;
+		}
+
+		public int processName( IASTName name, int offset) {
+        	if (name.toString() == null || name.toString() == BLANK_STRING) return PROCESS_CONTINUE;
+        	String searchString = null;
+        	String match = null;
+        	boolean addName = false;
+        	
+        	if (caseSensitive) {
+        		searchString = findString;
+        		match = name.toString();
+        	} else {
+        		searchString = findString.toUpperCase();
+        		match = name.toString().toUpperCase();
+        	}	
+        	
+           	if (regExSearch) {
+           		if (match.matches(searchString))
+           			addName = true;
+           	} else if (!wholeWord) {
+           		if (match.indexOf(searchString) >= 0)
+           			addName = true;
+           	} else {
+           		if (match.equals(searchString))
+           			addName = true;
+           	}
+           	
+           	if (addName) {
+           		if (offset >= 0)
+           			nameList.add(offset, name);
+           		else
+           			nameList.add( name );
+           	}
+        	
+            return PROCESS_CONTINUE;
+		}
+		
+        public int visit( IASTName name ){
+        	return processName(name, REGULAR_NAME_ADD);
+        }
+        public IASTName getName( int idx ){
+            if( idx < 0 || idx >= nameList.size() )
+                return null;
+            return (IASTName) nameList.get( idx );
+        }
+        public int size() { return nameList.size(); } 
+        
+        private void mergeName(IASTName name) {
+        	if (name instanceof ASTNode) {
+        		int offset = ((ASTNode)name).getOffset();
+        		for( int i=0; i<nameList.size(); i++) {
+        			if (nameList.get(i) instanceof ASTNode && 
+        					((ASTNode)nameList.get(i)).getOffset() > offset) {
+        				processName(name, i);
+        				return;
+        			}
+        		}
+        		// if couldn't find the proper place to put the name, then add default
+        		visit(name);
+        	}
+        }
+        
+        public IASTName[] getNameArray(IASTPreprocessorStatement[] statements) {
+        	// first merge all of the preprocessor names into the array list
+        	for(int i=0; i<statements.length; i++) {
+        		if (statements[i] instanceof IASTPreprocessorMacroDefinition) {
+        			IASTName name = ((IASTPreprocessorMacroDefinition)statements[i]).getName();
+        			if (name != null) {
+        				mergeName(name);
+        			}
+        		}
+        	}
+        	
+        	// convert the array list into an array of IASTNames
+        	IASTName[] namedArray = new IASTName[nameList.size()];
+        	
+        	for(int i=0; i<nameList.size(); i++) {
+        		if (nameList.get(i) instanceof IASTName)
+        			namedArray[i] = (IASTName)nameList.get(i);
+        	}
+        	
+        	return namedArray;
+        }
+    }
+    
+    static protected class CPPNameCollector extends CPPASTVisitor {
+        private static final int REGULAR_NAME_ADD = -1;
+		private static final String BLANK_STRING = ""; //$NON-NLS-1$
+		{
+            shouldVisitNames = true;
+        }
+        public List nameList = new ArrayList();
+        
+        String findString = null;
+		boolean caseSensitive = true;
+		boolean wholeWord = true;
+		boolean regExSearch = false;
+		Pattern p = null;
+		Matcher m = null;
+		
+		public CPPNameCollector(String findString, boolean caseSensitive, boolean wholeWord, boolean regExSearch) {
+			this.findString = findString;
+			this.caseSensitive = caseSensitive;
+			this.wholeWord = wholeWord;
+			this.regExSearch = regExSearch;
+		}
+        
+		public int processName( IASTName name, int index) {
+        	if (name.toString() == null || name.toString() == BLANK_STRING) return PROCESS_CONTINUE;
+        	String searchString = null;
+        	String match = null;
+        	boolean addName = false;
+        	
+        	if (caseSensitive) {
+        		searchString = findString;
+        		match = name.toString();
+        	} else {
+        		searchString = findString.toUpperCase();
+        		match = name.toString().toUpperCase();
+        	}	
+        	
+           	if (regExSearch) {
+           		if (match.matches(searchString))
+           			addName = true;
+           	} else if (!wholeWord) {
+           		if (match.indexOf(searchString) >= 0)
+           			addName = true;
+           	} else {
+           		if (match.equals(searchString))
+           			addName = true;
+           	}
+           	
+           	if (addName) {
+           		if (index >= 0)
+           			nameList.add(index, name);
+           		else
+           			nameList.add( name );
+           	}
+        	
+            return PROCESS_CONTINUE;
+		}
+		
+        public int visit( IASTName name ){
+        	return processName(name, REGULAR_NAME_ADD);
+        }
+        public IASTName getName( int idx ){
+            if( idx < 0 || idx >= nameList.size() )
+                return null;
+            return (IASTName) nameList.get( idx );
+        }
+        public int size() { return nameList.size(); } 
+        
+        private void mergeName(IASTName name) {
+        	if (name instanceof ASTNode) {
+        		int offset = ((ASTNode)name).getOffset();
+        		for( int i=0; i<nameList.size(); i++) {
+        			if (nameList.get(i) instanceof ASTNode && 
+        					((ASTNode)nameList.get(i)).getOffset() > offset) {
+        				processName(name, i);
+        				return;
+        			}
+        		}
+        		// if couldn't find the proper place to put the name, then add default
+        		visit(name);
+        	}
+        }
+        
+        public IASTName[] getNameArray(IASTPreprocessorStatement[] statements) {
+        	// first merge all of the preprocessor names into the array list
+        	for(int i=0; i<statements.length; i++) {
+        		if (statements[i] instanceof IASTPreprocessorMacroDefinition) {
+        			IASTName name = ((IASTPreprocessorMacroDefinition)statements[i]).getName();
+        			if (name != null) {
+        				mergeName(name);
+        			}
+        		}
+        	}
+        	
+        	// convert the array list into an array of IASTNames
+        	IASTName[] namedArray = new IASTName[nameList.size()];
+        	
+        	for(int i=0; i<nameList.size(); i++) {
+        		if (nameList.get(i) instanceof IASTName)
+        			namedArray[i] = (IASTName)nameList.get(i);
+        	}
+        	
+        	return namedArray;
+        }
+    }
+	
+	public FindIASTNameTarget(TreeViewer viewer) {
+		if (viewer.getContentProvider() instanceof DOMAST.ViewContentProvider) {
+			tu = ((DOMAST.ViewContentProvider)viewer.getContentProvider()).getTU();
+			tuTreeParent = ((DOMAST.ViewContentProvider)viewer.getContentProvider()).getTUTreeParent();
+		}
+		
+		this.viewer = viewer;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.IFindReplaceTarget#canPerformFind()
+	 */
+	public boolean canPerformFind() {
+		return true;
+	}
+
+	// recursively search for the next node
+	public IASTName findNextMatchingName(String findString,
+			boolean searchForward, boolean caseSensitive, boolean wholeWord, boolean regExSearch) {
+		
+		if (matchingNames == null && tu != null) {
+			if (tu instanceof CPPASTTranslationUnit) {
+				CPPNameCollector col = new CPPNameCollector(findString, caseSensitive, wholeWord, regExSearch);
+				tu.accept(col);
+				matchingNames = col.getNameArray(tu.getAllPreprocessorStatements());
+			} else if(tu instanceof CASTTranslationUnit) {
+				CNameCollector col = new CNameCollector(findString, caseSensitive, wholeWord, regExSearch);
+				tu.accept(col);
+				matchingNames = col.getNameArray(tu.getAllPreprocessorStatements());
+			}
+		}
+	
+		if (searchForward) {
+			if (!wasForward) {
+				wasForward = true;
+				index+=2;
+			}
+			
+			if (index >=0 && index < matchingNames.length && matchingNames[index] != null)
+				return matchingNames[index++];
+		} else {
+			if (wasForward) {
+				wasForward = false;
+				index-=2;
+			}
+			
+			if (index >= 0 && index < matchingNames.length && matchingNames[index] != null)
+				return matchingNames[index--];
+		}
+		
+		return null;
+	}
+		
+	private TreeItem expandTreeToTreeObject(TreeItem[] treeItems, DOMASTNodeLeaf treeObj) {
+		for (int i=0; i<treeItems.length; i++) {
+			if (treeItems[i].getData() == treeObj) {
+ 				return treeItems[i];
+ 			}
+ 			
+ 			DOMASTNodeParent parent = treeObj.getParent();
+ 			
+ 			if (parent == null) return null; 
+
+ 			while (parent != treeItems[i].getData()) {
+ 				parent = parent.getParent();
+ 				if (parent == null) break;
+ 			}
+ 			
+ 			if (parent == treeItems[i].getData()) {
+ 				treeItems[i].setExpanded(true);
+ 				viewer.refresh();
+
+ 				return expandTreeToTreeObject(treeItems[i].getItems(), treeObj);
+ 			}
+ 		}
+ 		
+ 		return null; // nothing found
+	}
+	
+ 	private TreeItem expandTreeToTreeObject(DOMASTNodeLeaf treeObj) {
+ 		return expandTreeToTreeObject(viewer.getTree().getItems(), treeObj);
+ 	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.IFindReplaceTarget#findAndSelect(int, java.lang.String, boolean, boolean, boolean)
+	 */
+	public int findAndSelect(int widgetOffset, String findString,
+			boolean searchForward, boolean caseSensitive, boolean wholeWord) {
+		return findAndSelect(widgetOffset, findString, searchForward, caseSensitive, wholeWord, false);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.IFindReplaceTarget#getSelection()
+	 */
+	public Point getSelection() {
+		IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
+		
+		if (selection.isEmpty()) {
+			return new Point(0, 0);
+		}
+		
+		return new Point(((ASTNode)((DOMASTNodeLeaf)selection.getFirstElement()).getNode()).getOffset(), 0);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.IFindReplaceTarget#getSelectionText()
+	 */
+	public String getSelectionText() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.IFindReplaceTarget#isEditable()
+	 */
+	public boolean isEditable() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.IFindReplaceTarget#replaceSelection(java.lang.String)
+	 */
+	public void replaceSelection(String text) {
+		// TODO Auto-generated method stub
+
+	}
+	
+	public void clearMatchingNames() {
+		matchingNames = null;
+		index = 0;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.IFindReplaceTargetExtension3#findAndSelect(int, java.lang.String, boolean, boolean, boolean, boolean)
+	 */
+	public int findAndSelect(int offset, String findString, boolean searchForward, boolean caseSensitive, boolean wholeWord, boolean regExSearch) {
+		// find the next name in the list of names
+		IASTName foundName = null;
+		foundName = findNextMatchingName( findString, searchForward, caseSensitive, wholeWord, regExSearch );
+		
+		// get the DOMASTNodeLeaf from the AST View's model corresponding to that name
+		DOMASTNodeLeaf treeNode = null;
+		TreeItem treeItem = null;
+		treeNode =  tuTreeParent.findTreeObject(foundName, true);
+
+		if (treeNode != null && treeNode.getParent() != null) {
+			// found a matching DOMASTNodeLeaf, so expand the tree to that object
+			treeItem = expandTreeToTreeObject(treeNode);
+		}
+		
+		// loop until the next name within the matchingNames list is found in the tree
+		while ((treeNode == null || treeItem == null) &&  matchingNames.length > 0 &&
+				((searchForward && index < matchingNames.length) ||
+				(!searchForward && index >= 0))) {
+			foundName = findNextMatchingName( findString, searchForward, caseSensitive, wholeWord, regExSearch );
+			treeNode =  tuTreeParent.findTreeObject(foundName, true);
+			
+			if (treeNode != null && treeNode.getParent() != null) {
+				// found a matching DOMASTNodeLeaf, so expand the tree to that object
+				treeItem = expandTreeToTreeObject(treeNode);
+			}
+		}
+		
+		// select the node that was found (and is now displayed)
+		if (treeItem != null) {
+			TreeItem[] items = new TreeItem[1];
+			items[0] = treeItem;
+			treeItem.getParent().setSelection(items);
+				
+			return 0;
+		}
+
+		return -1;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.IFindReplaceTargetExtension3#replaceSelection(java.lang.String, boolean)
+	 */
+	public void replaceSelection(String text, boolean regExReplace) {
+		// TODO Auto-generated method stub
+		
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/IPopulateDOMASTAction.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/IPopulateDOMASTAction.java
new file mode 100644
index 0000000..b5ac4da
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/IPopulateDOMASTAction.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.DOMAST;
+
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
+import org.eclipse.cdt.core.dom.ast.IASTProblem;
+
+/**
+ * @author dsteffle
+ */
+public interface IPopulateDOMASTAction {
+	public DOMASTNodeParent getTree();
+	public DOMASTNodeLeaf[] mergePreprocessorStatements(IASTPreprocessorStatement[] statements);
+	public void mergePreprocessorProblems(IASTProblem[] problems);
+	public void groupIncludes(DOMASTNodeLeaf[] statements);
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/IncludeStatementFilter.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/IncludeStatementFilter.java
new file mode 100644
index 0000000..8a2c82a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/IncludeStatementFilter.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.DOMAST;
+
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+/**
+ * @author dsteffle
+ */
+public class IncludeStatementFilter extends ViewerFilter {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	public boolean select(Viewer viewer, Object parentElement, Object element) {
+		if (element instanceof DOMASTNodeLeaf) {
+			int flag = ((DOMASTNodeLeaf)element).getFiltersFlag() & DOMASTNodeLeaf.FLAG_INCLUDE_STATEMENTS;
+			if (flag > 0) {
+				IASTNode node = ((DOMASTNodeLeaf)element).getNode();
+				if (node instanceof IASTPreprocessorIncludeStatement)
+					return false;
+				
+				return true;
+			}
+		}
+
+		return true;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/OpenDOMViewAction.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/OpenDOMViewAction.java
new file mode 100644
index 0000000..be547a3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/OpenDOMViewAction.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.DOMAST;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorActionDelegate;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ISourceReference;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+
+import org.eclipse.cdt.internal.ui.util.EditorUtility;
+
+/**
+ * @author dsteffle
+ */
+public class OpenDOMViewAction implements IViewActionDelegate, IEditorActionDelegate, IObjectActionDelegate {
+
+	IViewPart viewPart = null;
+	ISelection selection = null;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
+	 */
+	public void init(IViewPart view) {
+		this.viewPart = view;
+		
+		
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+	 */
+	public void run(IAction action) {
+		// TODO Auto-generated method stub
+	
+		Object obj = ((IStructuredSelection)selection).getFirstElement();
+		ITranslationUnit tu = null;
+		IEditorPart part = null;
+		if (obj instanceof ISourceReference) {
+			tu = ((ISourceReference) obj).getTranslationUnit();
+			if (tu != null) {
+				if (viewPart != null) {
+					if (obj instanceof ICElement) {
+						try {
+							part = EditorUtility.openInEditor(obj);
+						} catch (CModelException cme) {
+						} catch (PartInitException pie) {}
+					
+					}
+				}
+			}
+		}
+		
+		IViewPart tempView = null;
+
+		try {
+			tempView = viewPart.getSite().getPage().showView(DOMAST.VIEW_ID);
+		} catch (PartInitException pie) {}
+		
+		if (tempView != null) {
+			if (tempView instanceof DOMAST) {
+				((DOMAST)tempView).setTranslationUnit(tu);
+				((DOMAST)tempView).setPart(part);
+				((DOMAST)tempView).setContentProvider(((DOMAST)tempView).new ViewContentProvider(tu));
+			}
+		}
+
+		viewPart.getSite().getPage().activate(tempView);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+	 */
+	public void selectionChanged(IAction action, ISelection selection) {
+		this.selection = selection;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorActionDelegate#setActiveEditor(org.eclipse.jface.action.IAction, org.eclipse.ui.IEditorPart)
+	 */
+	public void setActiveEditor(IAction action, IEditorPart targetEditor) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
+	 */
+	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/PreprocessorFilter.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/PreprocessorFilter.java
new file mode 100644
index 0000000..d3f5e16
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/PreprocessorFilter.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.DOMAST;
+
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+/**
+ * @author dsteffle
+ */
+public class PreprocessorFilter extends ViewerFilter {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	public boolean select(Viewer viewer, Object parentElement, Object element) {
+		if (element instanceof DOMASTNodeLeaf) {
+			int flag = ((DOMASTNodeLeaf)element).getFiltersFlag() & DOMASTNodeLeaf.FLAG_PREPROCESSOR;
+			if (flag > 0) {
+				if (((DOMASTNodeLeaf)element).getNode() instanceof IASTPreprocessorStatement)
+					return false;
+
+				return true;
+			}
+		}
+
+		return true;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/ProblemHolderFilter.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/ProblemHolderFilter.java
new file mode 100644
index 0000000..b698acd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/ProblemHolderFilter.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.DOMAST;
+
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTProblem;
+import org.eclipse.cdt.core.dom.ast.IASTProblemHolder;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+/**
+ * @author dsteffle
+ */
+public class ProblemHolderFilter extends ViewerFilter {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	public boolean select(Viewer viewer, Object parentElement, Object element) {
+		if (element instanceof DOMASTNodeLeaf) {
+			int flag = ((DOMASTNodeLeaf)element).getFiltersFlag() & DOMASTNodeLeaf.FLAG_PROBLEM;
+			if (flag > 0) {
+				IASTNode node = ((DOMASTNodeLeaf)element).getNode();
+				if (node instanceof IASTProblem ||
+						node instanceof IASTProblemHolder)
+					return false;
+				
+				return true;
+			}
+		}
+
+		return true;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/ShowInDOMViewAction.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/ShowInDOMViewAction.java
new file mode 100644
index 0000000..4034425
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/ShowInDOMViewAction.java
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM Rational Software - Initial API and implementation
+ *    Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.DOMAST;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IEditorActionDelegate;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IPathEditorInput;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.ActionDelegate;
+import org.eclipse.ui.editors.text.ILocationProvider;
+import org.eclipse.ui.ide.ResourceUtil;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTNodeLocation;
+import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+/**
+ * @author dsteffle
+ */
+public class ShowInDOMViewAction extends ActionDelegate implements
+		IEditorActionDelegate {
+
+	private static final String FIND_NODE_IN_AST_DOM_VIEW = "Find Node in AST DOM View"; //$NON-NLS-1$
+	CEditor editor = null;
+	IASTTranslationUnit tu = null;
+	IViewPart view = null;
+	String file = null;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IEditorActionDelegate#setActiveEditor(org.eclipse.jface.action.IAction, org.eclipse.ui.IEditorPart)
+	 */
+	public void setActiveEditor(IAction action, IEditorPart targetEditor) {
+		if (targetEditor instanceof CEditor)
+			editor = (CEditor)targetEditor;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.actions.ActionDelegate#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
+	 */
+	public void runWithEvent(IAction action, Event event) {
+		TextSelection selection = null;
+		
+		if (editor != null &&
+				editor.getSelectionProvider().getSelection() instanceof TextSelection) {
+			selection = (TextSelection)editor.getSelectionProvider().getSelection();
+		}
+		if (selection != null) {
+			if (!isFileInView()) {
+				view = DOMAST.openDOMASTViewRunAction(editor, new FindDisplayNode(selection.getOffset(), selection.getLength()), FIND_NODE_IN_AST_DOM_VIEW);				
+			} else {
+				new FindDisplayNode(selection.getOffset(), selection.getLength()).run();
+			}
+		}
+	}
+
+	protected void showMessage(String message) {
+		MessageDialog.openInformation(CTestPlugin.getStandardDisplay().getActiveShell(), DOMAST.VIEW_NAME, message);
+	}
+	
+	private boolean isFileInView() {
+		file= getInputFile(editor);
+		
+		if (file == null) return false;
+
+		try {
+			view = editor.getSite().getPage().showView(DOMAST.VIEW_ID);
+		} catch (PartInitException pie) {}
+		
+		if (view instanceof DOMAST) {
+			IContentProvider provider = ((DOMAST)view).getContentProvider();
+			if (provider != null && provider instanceof DOMAST.ViewContentProvider) {
+				tu = ((DOMAST.ViewContentProvider)provider).getTU();
+				
+				if (tu != null) {
+					String fileName = null;
+					
+					// check if file is tu
+					IASTNodeLocation[] locs = tu.getNodeLocations();
+					for (int i=0; i<locs.length; i++) {
+						if (locs[i] instanceof IASTFileLocation) {
+							fileName = ((IASTFileLocation)locs[i]).getFileName();
+						}
+					}
+					
+					if (fileName != null && fileName.equals(file) ) {
+						return true;
+					}
+					
+					// check the #includes on the TU (i.e. check if selecting something from a header file shown in DOM View)
+					IASTPreprocessorIncludeStatement[] includes = tu.getIncludeDirectives();
+					for(int i=0; i<includes.length; i++) {
+						if (includes[i].getPath().equals(file)) {
+							return true;
+						}
+					}
+				}
+			}
+		}
+
+		
+		return false;
+	}
+
+	/**
+	 * Get the absolute file system location of the file open in the given editor.
+	 * @param editor
+	 * @return the absolute file system location or <code>null</code>
+	 */
+	private String getInputFile(ITextEditor editor) {
+		IEditorInput input= editor.getEditorInput();
+		if (input == null) {
+			return null;
+		}
+		IFile file= ResourceUtil.getFile(input);
+		if (file != null) {
+			return file.getLocation().toOSString();
+		}
+		if (input instanceof IPathEditorInput) {
+			IPath location= ((IPathEditorInput)input).getPath();
+			if (location != null) {
+				return location.toOSString();
+			}
+		}
+		ILocationProvider locationProvider= (ILocationProvider)input.getAdapter(ILocationProvider.class);
+		if (locationProvider != null) {
+			IPath location= locationProvider.getPath(input);
+			if (location != null) {
+				return location.toOSString();
+			}
+		}
+		return null;
+	}
+
+	private class FindDisplayNode implements Runnable {
+		private static final String IAST_NODE_NOT_FOUND = "IASTNode not found for the selection. "; //$NON-NLS-1$
+		private static final String IASTNode_NOT_FOUND = IAST_NODE_NOT_FOUND;
+		int offset = 0;
+		int length = 0;
+		
+		public FindDisplayNode(int offset, int length) {
+			this.offset = offset;
+			this.length = length;
+		}
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.action.Action#run()
+		 */
+		public void run() {
+			if (view instanceof DOMAST) {
+				IContentProvider provider = ((DOMAST)view).getContentProvider();
+				if (provider != null && provider instanceof DOMAST.ViewContentProvider) {
+					tu = ((DOMAST.ViewContentProvider)provider).getTU();
+					file = getInputFile(editor);
+				}
+			}
+			
+			// the selection is within a file currently shown in the DOM AST View
+			if (tu != null && file != null && view instanceof DOMAST) {
+				IASTNode node = tu.getNodeSelector(file).findNode(offset, length);
+				if (node != null && ((DOMAST)view).getContentProvider() instanceof DOMAST.ViewContentProvider) {
+					boolean success = ((DOMAST.ViewContentProvider)((DOMAST)view).getContentProvider()).findAndSelect(node, true); // use offsets when searching for node equality
+                    if( ! success )
+                        showMessage(IASTNode_NOT_FOUND);
+				} else {
+					showMessage(IASTNode_NOT_FOUND);
+				}
+			}
+		}
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/templateengine/TestExtraPagesProvider.java b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/templateengine/TestExtraPagesProvider.java
new file mode 100644
index 0000000..d7258b5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/templateengine/TestExtraPagesProvider.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Limited and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.templateengine;
+
+import java.util.Collections;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWizard;
+
+import org.eclipse.cdt.ui.templateengine.AbstractWizardDataPage;
+import org.eclipse.cdt.ui.templateengine.IPagesAfterTemplateSelectionProvider;
+import org.eclipse.cdt.ui.templateengine.IWizardDataPage;
+
+/**
+ * An example implementation of {@link IPagesAfterTemplateSelectionProvider} for
+ * testing purposes.
+ */
+public class TestExtraPagesProvider implements IPagesAfterTemplateSelectionProvider {
+	IWizardDataPage[] pages;
+	
+	public IWizardDataPage[] createAdditionalPages(IWorkbenchWizard wizard,
+			IWorkbench workbench, IStructuredSelection selection) {
+		pages= new IWizardDataPage[3];
+		pages[0]= new MyPage("Example custom page 1", "exampleAttr1", "Value1");
+		pages[1]= new MyPage("Example custom page 2", "exampleAttr2", "Value2");
+		pages[2]= new MyPage("Example custom page 3", "exampleAttr3", "Value3");
+		return pages;
+	}
+
+	public IWizardDataPage[] getCreatedPages(IWorkbenchWizard wizard) {
+		return pages;
+	}
+
+	/**
+	 * An example implementation of {@link IWizardDataPage} for test purposes.
+	 */
+	static class MyPage extends AbstractWizardDataPage implements IWizardDataPage {
+		String labelText , dataKey, dataValue;
+		
+		public MyPage(String labelText, String dataKey, String dataValue) {
+			super("CustomTestPageName", "Title", null);
+			setMessage("Custom test page message");
+			this.labelText= labelText;
+			this.dataKey= dataKey;
+			this.dataValue= dataValue;
+		}
+		
+		public Map getPageData() {
+			return Collections.singletonMap(dataKey, dataValue);
+		}
+
+		public void createControl(Composite parent) {
+			Label l= new Label(parent, SWT.NONE);
+			l.setText(labelText);
+			setControl(l);
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/test.xml b/results/plugins/org.eclipse.cdt.ui.tests/test.xml
new file mode 100644
index 0000000..bc8852d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/test.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+
+<project name="testsuite" default="run" basedir=".">
+  <!-- The property ${eclipse-home} should be passed into this script -->
+  <!-- Set a meaningful default value for when it is not. -->
+  <property name="eclipse-home" value="${basedir}"/>
+  
+  <!-- This is the default name of the org.eclipse.test plugin. -->
+  <!-- We need to be able to override this for the case where the -->
+  <!-- org.eclipse.test plugin was build as part of a feature and -->
+  <!-- will have a name similar to org.eclipse.test_2.1.0  -->
+  <property name="org.eclipse.test" value="org.eclipse.test"/>
+  <!-- sets the properties eclipse-home, and library-file -->
+  <property name="plugin-name" value="org.eclipse.cdt.ui.tests"/>
+  <property name="library-file"
+            value="${eclipse-home}/plugins/${org.eclipse.test}/library.xml"/>
+
+  <!-- This target holds all initialization code that needs to be done for -->
+  <!-- all tests that are to be run. Initialization for individual tests -->
+  <!-- should be done within the body of the suite target. -->
+  <target name="init">
+    <tstamp/>
+    <delete>
+      <fileset dir="${eclipse-home}" includes="org*.xml"/>
+    </delete>
+  </target>
+
+  <!-- This target defines the tests that need to be run. -->
+  <target name="suite">
+    <property name="cdt-folder" 
+              value="${eclipse-home}/cdt_folder"/>
+    <delete dir="${cdt-folder}" quiet="true"/>
+    <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+      <property name="data-dir" value="${cdt-folder}"/>
+      <property name="plugin-name" value="${plugin-name}"/>
+      <property name="classname" 
+                value="org.eclipse.cdt.ui.tests.AutomatedSuite"/>
+    </ant>
+  </target>
+
+  <!-- This target holds code to cleanup the testing environment after -->
+  <!-- after all of the tests have been run. You can use this target to -->
+  <!-- delete temporary files that have been created. -->
+  <target name="cleanup">
+  </target>
+
+  <!-- This target runs the test suite. Any actions that need to happen -->
+  <!-- after all the tests have been run should go here. -->
+  <target name="run" depends="init,suite,cleanup">
+    <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+      <property name="includes" value="org*.xml"/>
+      <property name="output-file" value="${plugin-name}.xml"/>
+    </ant>
+  </target>
+
+</project>
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java
new file mode 100644
index 0000000..6e44a45
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ * Anton Leherbauer (Wind River Systems)
+ * Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.ui.tests.buildconsole.BuildConsoleTests;
+import org.eclipse.cdt.ui.tests.callhierarchy.CallHierarchyTestSuite;
+import org.eclipse.cdt.ui.tests.chelp.CHelpTest;
+import org.eclipse.cdt.ui.tests.includebrowser.IncludeBrowserTestSuite;
+import org.eclipse.cdt.ui.tests.outline.OutlineTestSuite;
+import org.eclipse.cdt.ui.tests.quickfix.AssistQuickFixTest;
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTestSuite;
+import org.eclipse.cdt.ui.tests.search.SearchTestSuite;
+import org.eclipse.cdt.ui.tests.text.TextTestSuite;
+import org.eclipse.cdt.ui.tests.text.contentassist.ContentAssistTestSuite;
+import org.eclipse.cdt.ui.tests.text.contentassist2.ContentAssist2TestSuite;
+import org.eclipse.cdt.ui.tests.text.selection.SelectionTestSuite;
+import org.eclipse.cdt.ui.tests.typehierarchy.TypeHierarchyTestSuite;
+import org.eclipse.cdt.ui.tests.viewsupport.ViewSupportTestSuite;
+import org.eclipse.cdt.ui.tests.wizards.settingswizards.SettingsWizardTestSuite;
+
+/**
+ * Test all areas of the UI.
+ */
+public class AutomatedSuite extends TestSuite {
+
+	/**
+	 * Returns the suite.  This is required to
+	 * use the JUnit Launcher.
+	 */
+	public static Test suite() throws Exception {
+		return new AutomatedSuite();
+	}
+
+	/**
+	 * Construct the test suite.
+	 */
+	public AutomatedSuite() throws Exception {
+		
+		// tests from package org.eclipse.cdt.ui.tests.text
+		addTest(TextTestSuite.suite());
+
+		// tests from package org.eclipse.cdt.ui.tests.outline
+		addTest(OutlineTestSuite.suite());
+
+		// tests for package org.eclipse.cdt.ui.tests.viewsupport
+		addTest(ViewSupportTestSuite.suite());
+
+		// tests for package org.eclipse.cdt.ui.tests.callhierarchy
+		addTest(CallHierarchyTestSuite.suite());
+
+		// tests for package org.eclipse.cdt.ui.tests.typehierarchy
+		addTest(TypeHierarchyTestSuite.suite());
+
+		// tests for package org.eclipse.cdt.ui.tests.includebrowser
+		addTest(IncludeBrowserTestSuite.suite());
+
+		// tests from package org.eclipse.cdt.ui.tests.text.contentAssist
+		addTest(ContentAssistTestSuite.suite());
+
+		// tests from package org.eclipse.cdt.ui.tests.text.contentAssist2
+		addTest(ContentAssist2TestSuite.suite());
+		
+		// tests from package org.eclipse.cdt.ui.tests.text.selection
+		addTest(SelectionTestSuite.suite());
+		
+		// tests from package org.eclipse.cdt.ui.tests.quickfix
+		addTest(AssistQuickFixTest.suite());
+
+		// tests from package org.eclipse.cdt.ui.tests.buildconsole
+		addTest(BuildConsoleTests.suite());
+		
+		// tests from package org.eclipse.cdt.ui.tests.search
+		addTest(SearchTestSuite.suite());
+
+		// tests from package org.eclipse.cdt.ui.tests.refactoring
+		addTest(RefactoringTestSuite.suite());
+		
+		// tests from package org.eclipse.cdt.ui.tests.chelp
+		addTest(CHelpTest.suite());
+		
+		// tests from package org.eclipse.cdt.ui.tests.wizards.settingswizards
+		addTest(SettingsWizardTestSuite.suite());
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/BaseUITestCase.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/BaseUITestCase.java
new file mode 100644
index 0000000..8cc5662
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/BaseUITestCase.java
@@ -0,0 +1,375 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.NotEnabledException;
+import org.eclipse.core.commands.NotHandledException;
+import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTException;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.WorkbenchException;
+import org.eclipse.ui.handlers.IHandlerService;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ILinkage;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexFile;
+import org.eclipse.cdt.core.index.IndexLocationFactory;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+import org.eclipse.cdt.ui.testplugin.util.StringAsserts;
+
+public class BaseUITestCase extends BaseTestCase {
+	
+	public BaseUITestCase() {
+		super();
+	}
+	
+	public BaseUITestCase(String name) {
+		super(name);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.testplugin.util.BaseTestCase#setUp()
+	 */
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		final IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		IViewPart view= activePage.findView("org.eclipse.cdt.ui.tests.DOMAST.DOMAST");
+		if (view != null) {
+			activePage.hideView(view);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.testplugin.util.BaseTestCase#tearDown()
+	 */
+	@Override
+	protected void tearDown() throws Exception {
+		runEventQueue(0);
+		super.tearDown();
+	}
+
+	/**
+	 * Reads a section in comments form the source of the given class. Fully 
+	 * equivalent to <code>readTaggedComment(getClass(), tag)</code>
+	 * @since 4.0
+	 */
+    protected String readTaggedComment(final String tag) throws IOException {
+    	return TestSourceReader.readTaggedComment(CTestPlugin.getDefault().getBundle(), "ui", getClass(), tag);
+    }
+ 
+    /**
+     * Reads multiple sections in comments from the source of the given class.
+     * @since 4.0
+     */
+	public StringBuffer[] getContentsForTest(int sections) throws IOException {
+		return TestSourceReader.getContentsForTest(CTestPlugin.getDefault().getBundle(), "ui", getClass(), getName(), sections);
+	}
+	
+    protected IFile createFile(IContainer container, String fileName, String contents) throws Exception {
+    	return TestSourceReader.createFile(container, new Path(fileName), contents);
+    }
+    
+    protected IASTTranslationUnit createIndexBasedAST(IIndex index, ICProject project, IFile file) throws CModelException, CoreException {
+    	return TestSourceReader.createIndexBasedAST(index, project, file);
+    }
+
+	protected void waitForIndexer(IIndex index, IFile file, int maxmillis) throws Exception {
+		boolean firstTime= true;
+		long endTime= System.currentTimeMillis() + maxmillis;
+		while (firstTime || System.currentTimeMillis() < endTime) {
+			if (!firstTime) 
+				Thread.sleep(50);
+			firstTime= false;
+			
+			if (CCorePlugin.getIndexManager().isIndexerSetupPostponed(CoreModel.getDefault().create(file.getProject())))
+				continue;
+			index.acquireReadLock();
+			try {
+				IIndexFile pfile= index.getFile(ILinkage.CPP_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+				if (pfile != null && pfile.getTimestamp() >= file.getLocalTimeStamp()) {
+					return;
+				}
+				pfile= index.getFile(ILinkage.C_LINKAGE_ID, IndexLocationFactory.getWorkspaceIFL(file));
+				if (pfile != null && pfile.getTimestamp() >= file.getLocalTimeStamp()) {
+					return;
+				}
+			}
+			finally {
+				index.releaseReadLock();
+				int time= (int) (endTime- System.currentTimeMillis());
+				if (time > 0) {
+					CCorePlugin.getIndexManager().joinIndexer(time, NPM);
+				}
+			}
+		}
+		throw new Exception("Indexer did not complete in time!");
+	}
+	
+	protected void runEventQueue(int time) {
+		final long endTime= System.currentTimeMillis()+time;
+		while(true) {
+			while (Display.getCurrent().readAndDispatch());
+			long diff= endTime-System.currentTimeMillis();
+			if (diff <= 0) {
+				break;
+			}
+			try {
+				Thread.sleep(Math.min(20, diff));
+			} catch (InterruptedException e) {
+				return;
+			}
+		}
+	}
+
+	protected void expandTreeItem(Tree tree, int idx) {
+		expandTreeItem(tree, new int[] {idx});
+	}
+
+	protected void expandTreeItem(Tree tree, int idx1, int idx2) {
+		expandTreeItem(tree, new int[] {idx1, idx2});
+	}
+
+	protected void expandTreeItem(Tree tree, int[] idxs) {
+		TreeItem item= tree.getItem(idxs[0]);
+		assertNotNull(item);
+		expandTreeItem(item);
+		for (int i=1; i < idxs.length; i++) {
+			item= item.getItem(idxs[i]);
+			assertNotNull(item);
+			expandTreeItem(item);
+		}
+	}
+	
+	protected void expandTreeItem(TreeItem item) {
+		Event event = new Event();
+		event.item = item;
+		item.getParent().notifyListeners(SWT.Expand, event);	
+		item.setExpanded(true);
+		runEventQueue(0);
+	}
+
+	protected void selectTreeItem(Tree tree, int idx) {
+		selectTreeItem(tree, new int[] {idx});
+	}
+
+	protected void selectTreeItem(Tree tree, int idx1, int idx2) {
+		selectTreeItem(tree, new int[] {idx1, idx2});
+	}
+
+	protected void selectTreeItem(Tree tree, int[] idxs) {
+		TreeItem item= tree.getItem(idxs[0]);
+		assertNotNull(item);
+		for (int i=1; i < idxs.length; i++) {
+			item= item.getItem(idxs[i]);
+			assertNotNull(item);
+		}
+		tree.setSelection(item);
+		Event event = new Event();
+		event.item = item;
+		item.getParent().notifyListeners(SWT.Selection, event);	
+		runEventQueue(0);
+	}
+
+	protected void closeEditor(IEditorPart editor) {
+		IWorkbenchPartSite site;
+		IWorkbenchPage page;
+		if (editor != null && (site= editor.getSite()) != null && (page= site.getPage()) != null) {
+			page.closeEditor(editor, false);
+		}
+	}
+	
+	protected void closeAllEditors() {
+		IWorkbenchWindow[] windows= PlatformUI.getWorkbench().getWorkbenchWindows();
+		for (int i= 0; i < windows.length; i++) {
+			IWorkbenchPage[] pages= windows[i].getPages();
+			for (int j= 0; j < pages.length; j++) {
+				IWorkbenchPage page= pages[j];
+				page.closeAllEditors(false);
+			}
+		}
+	}
+	
+	protected void restoreAllParts() throws WorkbenchException {
+		IWorkbenchPage page= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		page.zoomOut();
+		runEventQueue(0);
+
+		IViewReference[] viewRefs= page.getViewReferences();
+		for (int i = 0; i < viewRefs.length; i++) {
+			IViewReference ref = viewRefs[i];
+			page.setPartState(ref, IWorkbenchPage.STATE_RESTORED);
+		}
+		IEditorReference[] editorRefs= page.getEditorReferences();
+		for (int i = 0; i < editorRefs.length; i++) {
+			IEditorReference ref = editorRefs[i];
+			page.setPartState(ref, IWorkbenchPage.STATE_RESTORED);
+		}
+		runEventQueue(0);
+	}
+	
+	protected IViewPart activateView(String id) throws PartInitException {
+		IViewPart view= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(id);
+		assertNotNull(view);
+		runEventQueue(0);
+		return  view;
+	}
+	
+	protected void executeCommand(IViewPart viewPart, String commandID) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
+		IHandlerService hs= (IHandlerService)viewPart.getSite().getService(IHandlerService.class);
+		assertNotNull(hs);
+		hs.executeCommand(commandID, null);
+	}
+
+	private Control[] findControls(Control w, Class<?> clazz) {
+		ArrayList<Control> result= new ArrayList<Control>();
+		findControls(w, clazz, result);
+		return result.toArray(new Control[result.size()]);
+	}
+	
+	private void findControls(Control w, Class<?> clazz, List<Control> result) {	
+		if (clazz.isInstance(w)) {
+			result.add(w);
+		}
+		if (w instanceof Composite) {
+			Composite comp= (Composite) w;
+			Control[] children= comp.getChildren();
+			for (int i = 0; i < children.length; i++) {
+				findControls(children[i], clazz, result);
+			}
+		}
+	}
+
+	final protected TreeItem checkTreeNode(IViewPart part, int i0, String label) {
+		Tree tree= null;
+		TreeItem root= null;
+		StringBuilder cands= new StringBuilder();
+		for (int i=0; i<400; i++) {
+			cands.setLength(0);
+			Control[] trees= findControls(part.getSite().getShell(), Tree.class);
+			for (int j = 0; j < trees.length; j++) {
+				try {
+					tree= (Tree) trees[j];
+					root= tree.getItem(i0);
+					if (label.equals(root.getText())) {
+						return root;
+					}
+					if (j > 0) {
+						cands.append('|');
+					}
+					cands.append(root.getText());
+				} 
+				catch (SWTException e) {
+					// in case widget was disposed, item may be replaced
+				}
+				catch (IllegalArgumentException e) {
+					// item does not yet exist.
+				}
+			}
+			runEventQueue(10);
+		}
+		assertNotNull("No tree in viewpart", tree);
+		assertNotNull("Tree node " + label + "{" + i0 + "} does not exist!", root);
+		assertEquals(label, cands.toString());
+		return root;
+	}
+
+	final protected TreeItem checkTreeNode(Tree tree, int i0, String label) {
+		TreeItem root= null;
+		for (int millis=0; millis < 5000; millis= millis==0 ? 1 : millis*2) {
+			runEventQueue(millis);
+			try {
+				root= tree.getItem(i0);
+				if (label.equals(root.getText())) {
+					return root;
+				}
+			} 
+			catch (SWTException e) {
+				// in case widget was disposed, item may be replaced
+			}
+			catch (IllegalArgumentException e) {
+				// item does not yet exist.
+			}
+		}
+		assertNotNull("Tree node " + label + "{" + i0 + "} does not exist!", root);
+		assertEquals(label, root.getText());
+		return root;
+	}
+	
+	final protected TreeItem checkTreeNode(Tree tree, int i0, int i1, String label) {
+		TreeItem item= null;
+		String itemText= null;
+		for (int millis=0; millis < 5000; millis= millis==0 ? 1 : millis*2) {
+			runEventQueue(millis);
+			TreeItem root= tree.getItem(i0);
+			try {
+				TreeItem firstItem= root.getItem(0);
+				final String text= firstItem.getText();
+				if (text.length() > 0 && !text.equals("...")) {
+					item= root.getItem(i1);
+					itemText= item.getText();
+					assertNotNull("Unexpected tree node " + itemText, label);
+					if (label.equals(itemText)) {
+						return item;
+					}
+					if (millis > 2000) {
+						assertEquals(label, itemText);
+						return item;
+					}
+				}
+			} catch (IllegalArgumentException e) {
+				if (label != null) {
+					fail("Tree node " + label + "{" + i0 + "," + i1 + "} does not exist!");
+				}
+				return null;
+			} catch (SWTException e) {
+				// widget was disposed, try again.
+			}
+		}
+		assertEquals("Timeout expired waiting for tree node {" + i0 + "," + i1 + "}", label, itemText);
+		return null;
+	}
+	
+	public static void assertEqualString(String actual, String expected) {
+		StringAsserts.assertEqualString(actual, expected);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/buildconsole/BuildConsoleTests.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/buildconsole/BuildConsoleTests.java
new file mode 100644
index 0000000..f3cde15
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/buildconsole/BuildConsoleTests.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.buildconsole;
+
+import java.io.IOException;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.IDocument;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.resources.IConsole;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.IBuildConsoleManager;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+import org.eclipse.cdt.ui.tests.text.DisplayHelper;
+
+/**
+ * BuildConsoleTests.
+ */
+public class BuildConsoleTests extends BaseUITestCase {
+
+	private ICProject fCProject;
+
+	public BuildConsoleTests(String name) {
+		super(name);
+	}
+
+	public static TestSuite suite() {
+		return new TestSuite(BuildConsoleTests.class);
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+		fCProject= CProjectHelper.createCCProject(getName(), "unused", IPDOMManager.ID_FAST_INDEXER);
+	}
+
+	protected void tearDown() throws Exception {
+		CProjectHelper.delete(fCProject);
+		fCProject= null;
+		super.tearDown();
+	}
+
+	public void testSecondaryBuildConsole() throws IOException, CoreException {
+		IBuildConsoleManager mgr= CUIPlugin.getDefault().getConsoleManager("My Other Console", "cdt.ui.testConsole");
+		IConsole console= mgr.getConsole(fCProject.getProject());
+		String stdoutText = "This is stdout\n";
+		console.getOutputStream().write(stdoutText.getBytes());
+		String stderrText = "This is stderr\n";
+		console.getErrorStream().write(stderrText.getBytes());
+		DisplayHelper.sleep(CUIPlugin.getStandardDisplay(), 200);
+		IDocument doc= mgr.getConsoleDocument(fCProject.getProject());
+		assertEquals(stdoutText+stderrText, doc.get());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/BasicCallHierarchyTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/BasicCallHierarchyTest.java
new file mode 100644
index 0000000..db3dbca
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/BasicCallHierarchyTest.java
@@ -0,0 +1,733 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.callhierarchy;
+
+import java.io.IOException;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.PartInitException;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+
+import org.eclipse.cdt.internal.core.model.CoreModelMessages;
+
+import org.eclipse.cdt.internal.ui.callhierarchy.CHNode;
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+
+public class BasicCallHierarchyTest extends CallHierarchyBaseTest {
+	private static final String ANON= CoreModelMessages.getString("CElementLabels.anonymous");
+	
+	public BasicCallHierarchyTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return suite(BasicCallHierarchyTest.class);
+	}
+
+	public void testFunctionsC() throws Exception {
+		doTestFunctions("functions.c");
+	}
+
+	public void testFunctionsCpp() throws Exception {
+		doTestFunctions("functions.cpp");
+	}
+
+	// {testFunctions}
+	// void proto();
+	// void func() {
+	// };
+	// void main() {
+	//    proto(); //ref
+	//    func(); //ref
+	// };
+	private void doTestFunctions(String filename) throws IOException, Exception, PartInitException {
+		String content = readTaggedComment("testFunctions");
+		IFile file= createFile(getProject(), filename, content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("proto"), 5);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "proto()");
+		expandTreeItem(tree, 0);
+		checkTreeNode(tree, 0, 0, "main()");
+
+		editor.selectAndReveal(content.indexOf("func"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "func()");
+		checkTreeNode(tree, 0, 0, "main()");
+
+		editor.selectAndReveal(content.indexOf("proto(); //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "proto()");
+		checkTreeNode(tree, 0, 0, "main()");
+
+		editor.selectAndReveal(content.indexOf("func(); //ref"), 4);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "func()");
+		checkTreeNode(tree, 0, 0, "main()");
+	}
+
+	public void testVariablesC() throws Exception {
+		doTestVariables("variables.c");
+	}
+	
+	public void testVariablesCpp() throws Exception {
+		doTestVariables("variables.cpp");
+	}
+	
+	// {testVariables}
+	// extern int extern_var;
+	// int global_var= 0;
+	// void main() {
+	//    int i= extern_var; //ref
+	//    i= global_var; //ref
+	// };
+	private void doTestVariables(String filename) throws Exception {
+		String content = readTaggedComment("testVariables");
+		IFile file= createFile(getProject(), filename, content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("extern_var"), 0);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "extern_var");
+		checkTreeNode(tree, 0, 0, "main()");
+
+		editor.selectAndReveal(content.indexOf("global_var"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "global_var");
+		checkTreeNode(tree, 0, 0, "main()");
+
+		editor.selectAndReveal(content.indexOf("extern_var; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "extern_var");
+		checkTreeNode(tree, 0, 0, "main()");
+
+		editor.selectAndReveal(content.indexOf("global_var; //ref"), 7);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "global_var");
+		checkTreeNode(tree, 0, 0, "main()");
+	}
+
+	public void testEnumeratorC() throws Exception {
+		doTestEnumerator("enumerator.c", "testEnumerator");
+	}
+	
+	public void testEnumeratorCpp() throws Exception {
+		doTestEnumerator("enumerator.cpp", "testEnumerator");
+	}
+
+	public void testAnonymousEnumeratorC_156671() throws Exception {
+		doTestEnumerator("enumerator.c", "testAnonymousEnumerator");
+	}
+	
+	public void testAnonymousEnumeratorCpp_156671() throws Exception {
+		doTestEnumerator("enumerator.cpp", "testAnonymousEnumerator");
+	}
+
+	// {testEnumerator}
+	// enum Enum {enumerator=12};
+	// void main() {
+	//    int i= enumerator; //ref
+	// };
+
+	// {testAnonymousEnumerator}
+	// enum {enumerator};
+	// void main() {
+	//    int i= enumerator; //ref
+	// };
+	private void doTestEnumerator(String filename, String contentTag) throws Exception {
+		String content = readTaggedComment(contentTag);
+		IFile file= createFile(getProject(), filename, content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("enumerator"), 0);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "enumerator");
+		checkTreeNode(tree, 0, 0, "main()");
+
+		editor.selectAndReveal(content.indexOf("main"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "main()");
+
+		editor.selectAndReveal(content.indexOf("enumerator; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "enumerator");
+		checkTreeNode(tree, 0, 0, "main()");
+
+		editor.selectAndReveal(content.indexOf("main"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "main()");
+	}
+	
+	// {testStructMembers}
+	// struct s1 {
+	//    int mem1;
+	// };
+	// typedef struct s2 {
+	//    int mem2;
+	// } t2;
+	// typedef struct {
+	//    int mem3;
+	// } t3;
+	// struct s4 {
+	//    struct {
+	//       int mem5;
+	//    } mem4;
+	// };
+	//
+	// void main() {
+	//    struct s1 vs1;
+	//	  struct s2 vs2;
+	//	  struct s4 vs4;
+	//	  t2 vt2;
+	//	  t3 vt3;
+	//    int i;
+	//    i= vs1.mem1; //ref
+	//    i= vs2.mem2; //ref
+	//    i= vs4.mem4.mem5; //ref
+	//    i= vt2.mem2; //ref
+	//    i= vt3.mem3; //ref
+	// };
+	public void testStructMembersC() throws Exception {
+		String content = readTaggedComment("testStructMembers");
+		IFile file= createFile(getProject(), "struct_member.c", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+		
+		editor.selectAndReveal(content.indexOf("mem1"), 0);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "s1::mem1");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem2"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "s2::mem2");
+		checkTreeNode(tree, 0, 0, "main() (2 matches)");
+		
+		editor.selectAndReveal(content.indexOf("mem3"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, ANON+"::mem3");
+		
+		editor.selectAndReveal(content.indexOf("mem4"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "s4::mem4");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem5"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, ANON+"::mem5");
+		
+		editor.selectAndReveal(content.indexOf("mem1; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "s1::mem1");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem2; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "s2::mem2");
+		checkTreeNode(tree, 0, 0, "main() (2 matches)");
+		
+		editor.selectAndReveal(content.indexOf("mem4."), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "s4::mem4");
+		checkTreeNode(tree, 0, 0, "main()");
+	}
+	
+	public void testStructMembersCpp() throws Exception {
+		String content = readTaggedComment("testStructMembers");
+		IFile file= createFile(getProject(), "struct_member.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+		
+		editor.selectAndReveal(content.indexOf("mem1"), 0);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "s1::mem1");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem2"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "s2::mem2");
+		checkTreeNode(tree, 0, 0, "main() (2 matches)");
+		
+		editor.selectAndReveal(content.indexOf("mem3"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, ANON+"::mem3");
+		
+		editor.selectAndReveal(content.indexOf("mem4"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "s4::mem4");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem5"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "s4::"+ANON+"::mem5");
+		
+		editor.selectAndReveal(content.indexOf("mem1; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "s1::mem1");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem2; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "s2::mem2");
+		checkTreeNode(tree, 0, 0, "main() (2 matches)");
+		
+		editor.selectAndReveal(content.indexOf("mem4."), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "s4::mem4");
+		checkTreeNode(tree, 0, 0, "main()");
+	}
+	
+	public void testAnonymousStructMembersC_156671() throws Exception {
+		String content = readTaggedComment("testStructMembers");
+		IFile file= createFile(getProject(), "anon_struct_member.c", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+		
+		editor.selectAndReveal(content.indexOf("mem3"), 0);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, ANON+"::mem3");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem5"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, ANON+"::mem5");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem3; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, ANON+"::mem3");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem5; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, ANON+"::mem5");
+		checkTreeNode(tree, 0, 0, "main()");
+	}
+	
+	public void testAnonymousStructMembersCpp_156671() throws Exception {
+		String content = readTaggedComment("testStructMembers");
+		IFile file= createFile(getProject(), "anon_struct_member.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+		
+		editor.selectAndReveal(content.indexOf("mem3"), 0);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, ANON+"::mem3");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem5"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "s4::"+ANON+"::mem5");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem3; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, ANON+"::mem3");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem5; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "s4::"+ANON+"::mem5");
+		checkTreeNode(tree, 0, 0, "main()");
+	}
+	
+	// {testUnionMembers}
+	// union u1 {
+	//    int mem1;
+	//    char c;
+	// };
+	// typedef union u2 {
+	//    int mem2;
+	//    char c;
+	// } t2;
+	// typedef union {
+	//    int mem3;
+	//    char c;
+	// } t3;
+	// union u4 {
+	//    union {
+	//       int mem5;
+	//       char c;
+	//    } mem4;
+	//    char c;
+	// };
+	//
+	// void main() {
+	//    union u1 vs1;
+	//	  union u2 vs2;
+	//	  union u4 vs4;
+	//	  t2 vt2;
+	//	  t3 vt3;
+	//    int i;
+	//    i= vs1.mem1; //ref
+	//    i= vs2.mem2; //ref
+	//    i= vs4.mem4.mem5; //ref
+	//    i= vt2.mem2; //ref
+	//    i= vt3.mem3; //ref
+	// };
+	public void testUnionMembersC() throws Exception {
+		String content = readTaggedComment("testUnionMembers");
+		IFile file= createFile(getProject(), "union_member.c", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+		
+		editor.selectAndReveal(content.indexOf("mem1"), 0);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "u1::mem1");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem2"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "u2::mem2");
+		checkTreeNode(tree, 0, 0, "main() (2 matches)");
+		
+		editor.selectAndReveal(content.indexOf("mem3"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, ANON+"::mem3");
+		
+		editor.selectAndReveal(content.indexOf("mem4"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "u4::mem4");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem5"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, ANON+"::mem5");
+		
+		editor.selectAndReveal(content.indexOf("mem1; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "u1::mem1");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem2; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "u2::mem2");
+		checkTreeNode(tree, 0, 0, "main() (2 matches)");
+		
+		editor.selectAndReveal(content.indexOf("mem4."), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "u4::mem4");
+		checkTreeNode(tree, 0, 0, "main()");
+	}
+	
+	public void testUnionMembersCpp() throws Exception {
+		String content = readTaggedComment("testUnionMembers");
+		IFile file= createFile(getProject(), "union_member.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+		
+		editor.selectAndReveal(content.indexOf("mem1"), 0);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "u1::mem1");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem2"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "u2::mem2");
+		checkTreeNode(tree, 0, 0, "main() (2 matches)");
+		
+		editor.selectAndReveal(content.indexOf("mem3"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, ANON+"::mem3");
+		
+		editor.selectAndReveal(content.indexOf("mem4"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "u4::mem4");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem5"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "u4::"+ANON+"::mem5");
+		
+		editor.selectAndReveal(content.indexOf("mem1; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "u1::mem1");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem2; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "u2::mem2");
+		checkTreeNode(tree, 0, 0, "main() (2 matches)");
+		
+		editor.selectAndReveal(content.indexOf("mem4."), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "u4::mem4");
+		checkTreeNode(tree, 0, 0, "main()");
+	}
+
+	public void testAnonymousUnionMembersC_156671() throws Exception {
+		String content = readTaggedComment("testUnionMembers");
+		IFile file= createFile(getProject(), "anon_union_member.c", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+		
+		editor.selectAndReveal(content.indexOf("mem3"), 0);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, ANON+"::mem3");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem5"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, ANON+"::mem5");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem3; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, ANON+"::mem3");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem5; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, ANON+"::mem5");
+		checkTreeNode(tree, 0, 0, "main()");
+	}
+	
+	public void testAnonymousUnionMembersCpp_156671() throws Exception {
+		String content = readTaggedComment("testUnionMembers");
+		IFile file= createFile(getProject(), "anon_union_member.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+		
+		editor.selectAndReveal(content.indexOf("mem3"), 0);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, ANON+"::mem3");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem5"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "u4::"+ANON+"::mem5");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem3; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, ANON+"::mem3");
+		checkTreeNode(tree, 0, 0, "main()");
+		
+		editor.selectAndReveal(content.indexOf("mem5; //ref"), 0);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "u4::"+ANON+"::mem5");
+		checkTreeNode(tree, 0, 0, "main()");
+	}
+	
+	// void gf();
+	// static void sf() {
+	//     gf();
+	//     sf();
+	// }
+
+	// void gf() {
+	//     gf();
+	//     sf();
+	// }
+	public void testStaticFunctionsC() throws Exception {
+		StringBuffer[] sbs= getContentsForTest(2);
+		String content2= sbs[0].toString();
+		String content1= content2 + sbs[1].toString();
+		IFile file1= createFile(getProject(), "staticFunc1.c", content1);
+		IFile file2= createFile(getProject(), "staticFunc2.c", content2);
+		waitForIndexer(fIndex, file1, INDEXER_WAIT_TIME);
+		waitForIndexer(fIndex, file2, INDEXER_WAIT_TIME);
+
+		TreeItem i1, i2, i3, i4, i5, i6;
+		Tree tree;
+		CEditor editor= openEditor(file1);
+		
+		// first file with definition of gf()
+		editor.selectAndReveal(content1.indexOf("sf"), 0);
+		openCallHierarchy(editor);
+		tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "sf()");
+		assertEquals(1, tree.getItemCount());
+
+		i1= checkTreeNode(tree, 0, 0, "gf()");	// sf()[f1] <- gf()
+		i2= checkTreeNode(tree, 0, 1, "sf()");   // sf()[f1] <- sf()[f1]
+		checkTreeNode(tree, 0, 2, null);
+
+		expandTreeItem(i1);
+		expandTreeItem(i2);
+		checkTreeNode(i2, 0, null);
+		i3= checkTreeNode(i1, 0, "gf()");   // sf()[f1] <- gf() <- gf()
+		i4= checkTreeNode(i1, 1, "sf()");   // sf()[f1] <- gf() <- sf()[f1]
+		i5= checkTreeNode(i1, 2, "sf()");   // sf()[f1] <- gf() <- sf()[f2]
+
+		if (((CHNode) i4.getData()).getRepresentedDeclaration().getResource().equals(file2)) {
+			TreeItem i0= i4; i4=i5; i5=i0;
+		}
+		expandTreeItem(i3);
+		expandTreeItem(i4);
+		expandTreeItem(i5);
+		checkTreeNode(i3, 0, null);
+		checkTreeNode(i4, 0, null);
+		i6= checkTreeNode(i5, 0, "sf()"); 	// sf()[f1] <- gf() <- sf()[f2] <- sf()[f2]
+		
+		expandTreeItem(i6);
+		checkTreeNode(i6, 0, null);
+
+		// second file without definition of gf()
+		editor = openEditor(file2);
+		editor.selectAndReveal(content1.indexOf("sf"), 0);
+		openCallHierarchy(editor);
+		tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "sf()");
+		assertEquals(1, tree.getItemCount());
+
+		i1= checkTreeNode(tree, 0, 0, "sf()");	// sf()[f2] <- sf()[f2]
+		checkTreeNode(tree, 0, 1, null);			// not called by gf()
+
+		expandTreeItem(i1);
+		checkTreeNode(i1, 0, null);
+	}
+
+	// void gf();
+	// static void sf() {
+	//     gf();
+	//     sf();
+	// }
+
+	// void gf() {
+	//     gf();
+	//     sf();
+	// }
+	public void testStaticFunctionsCpp() throws Exception {
+		StringBuffer[] sbs= getContentsForTest(2);
+		String content2= sbs[0].toString();
+		String content1= content2 + sbs[1].toString();
+		IFile file1= createFile(getProject(), "staticFunc1.cpp", content1);
+		IFile file2= createFile(getProject(), "staticFunc2.cpp", content2);
+		waitForIndexer(fIndex, file1, INDEXER_WAIT_TIME);
+		waitForIndexer(fIndex, file2, INDEXER_WAIT_TIME);
+
+		TreeItem i0, i1, i2, i3, i4, i5, i6;
+		Tree tree;
+		CEditor editor;
+		
+		// first file with definition of gf()
+		editor= openEditor(file1);
+		editor.selectAndReveal(content1.indexOf("sf"), 0);
+		openCallHierarchy(editor);
+		tree = getCHTreeViewer().getTree();
+		i0= checkTreeNode(tree, 0, "sf()");
+		assertEquals(1, tree.getItemCount());
+
+		i1= checkTreeNode(tree, 0, 0, "gf()");	// sf()[f1] <- gf()
+		i2= checkTreeNode(tree, 0, 1, "sf()");   // sf()[f1] <- sf()[f1]
+		checkTreeNode(tree, 0, 2, null);
+
+		expandTreeItem(i1);
+		expandTreeItem(i2);
+		checkTreeNode(i2, 0, null);
+		i3= checkTreeNode(i1, 0, "gf()");   // sf()[f1] <- gf() <- gf()
+		i4= checkTreeNode(i1, 1, "sf()");   // sf()[f1] <- gf() <- sf()[f1]
+		i5= checkTreeNode(i1, 2, "sf()");   // sf()[f1] <- gf() <- sf()[f2]
+
+		if (((CHNode) i4.getData()).getRepresentedDeclaration().getResource().equals(file2)) {
+			i0= i4; i4=i5; i5=i0;
+		}
+		expandTreeItem(i3);
+		expandTreeItem(i4);
+		expandTreeItem(i5);
+		checkTreeNode(i3, 0, null);
+		checkTreeNode(i4, 0, null);
+		i6= checkTreeNode(i5, 0, "sf()"); 	// sf()[f1] <- gf() <- sf()[f2] <- sf()[f2]
+		
+		expandTreeItem(i6);
+		checkTreeNode(i6, 0, null);
+
+		// second file without definition of gf()
+		editor= openEditor(file2);
+		editor.selectAndReveal(content1.indexOf("sf"), 0);
+		openCallHierarchy(editor);
+		tree = getCHTreeViewer().getTree();
+		i0= checkTreeNode(tree, 0, "sf()");
+		assertEquals(1, tree.getItemCount());
+
+		i1= checkTreeNode(tree, 0, 0, "sf()");	// sf()[f2] <- sf()[f2]
+		checkTreeNode(tree, 0, 1, null);			// not called by gf()
+
+		expandTreeItem(i1);
+		checkTreeNode(i1, 0, null);
+	}
+	
+	
+	public void testFunctionsWithParamsC_175267() throws Exception {
+		doTestFunctionsWithParams("functionsWithParams.c");
+	}
+
+	public void testFunctionsWithParamsCpp() throws Exception {
+		doTestFunctionsWithParams("functionsWithParams.cpp");
+	}
+
+	// {testFunctionsWithParams}
+	// void proto(int);
+	// void func(int a) {
+	// };
+	// void main(int a) {
+	//    proto(1); //ref
+	//    func(1); //ref
+	// };
+	private void doTestFunctionsWithParams(String filename) throws IOException, Exception, PartInitException {
+		ICProject triggerCompositeBindings= CProjectHelper.createCCProject("__disturb__", "bin", IPDOMManager.ID_FAST_INDEXER);
+		try {
+			String content = readTaggedComment("testFunctionsWithParams");
+			IFile file= createFile(getProject(), filename, content);
+			waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+			CEditor editor = openEditor(file);
+
+			editor.selectAndReveal(content.indexOf("proto"), 5);
+			openCallHierarchy(editor);
+			Tree tree = getCHTreeViewer().getTree();
+			checkTreeNode(tree, 0, "proto(int)");
+			checkTreeNode(tree, 0, 0, "main(int)");
+
+			editor.selectAndReveal(content.indexOf("func"), 2);
+			openCallHierarchy(editor);
+			checkTreeNode(tree, 0, "func(int)");
+			checkTreeNode(tree, 0, 0, "main(int)");
+
+			editor.selectAndReveal(content.indexOf("proto(1); //ref"), 0);
+			openCallHierarchy(editor);
+			checkTreeNode(tree, 0, "proto(int)");
+			checkTreeNode(tree, 0, 0, "main(int)");
+
+			editor.selectAndReveal(content.indexOf("func(1); //ref"), 4);
+			openCallHierarchy(editor);
+			checkTreeNode(tree, 0, "func(int)");
+			checkTreeNode(tree, 0, 0, "main(int)");
+		}
+		finally {
+			CProjectHelper.delete(triggerCompositeBindings);
+		}
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/BasicCppCallHierarchyTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/BasicCppCallHierarchyTest.java
new file mode 100644
index 0000000..cfe52e5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/BasicCppCallHierarchyTest.java
@@ -0,0 +1,445 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.callhierarchy;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.widgets.Tree;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+
+public class BasicCppCallHierarchyTest extends CallHierarchyBaseTest {
+	
+	public BasicCppCallHierarchyTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return suite(BasicCppCallHierarchyTest.class);
+	}
+
+	// {testMethods}
+	// class MyClass {
+	// public:
+	//    void method();
+	//    void inline_method() {
+	//        method(); // r1
+	//        inline_method(); // r1
+	//    }
+	// };
+	//
+	// void MyClass::method() {
+	//    method(); // r2
+	//    inline_method(); // r2
+	// }
+	//
+	// void func() {
+    //	   MyClass m, *n;
+    //	   m.method(); // r3
+    //	   n->inline_method(); // r3
+    // }
+	public void testMethods() throws Exception {
+		String content = readTaggedComment("testMethods");
+		IFile file= createFile(getProject(), "testMethods.cpp", content);
+		waitForIndexer(fIndex, file, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("method"), 2);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "MyClass::method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("inline_method"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("method(); // r1"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("inline_method(); // r1"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("method(); // r2"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("inline_method(); // r2"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("method(); // r3"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("inline_method(); // r3"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+	}
+	
+	// {testStaticMethods}
+	// class MyClass {
+	// public:
+	//    static void method();
+	//    static void inline_method() {
+	//        method(); // r1
+	//        inline_method(); // r1
+	//    }
+	// };
+	//
+	// void MyClass::method() {
+	//    method(); // r2
+	//    inline_method(); // r2
+	// }
+	//
+	// void func() {
+    //	   MyClass::method(); // r3
+    //	   MyClass::inline_method(); // r3
+    // }
+	public void testStaticMethods() throws Exception {
+		String content = readTaggedComment("testStaticMethods");
+		IFile file= createFile(getProject(), "testStaticMethods.cpp", content);
+		waitForIndexer(fIndex, file, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("method"), 2);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "MyClass::method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("inline_method"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("method(); // r1"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("inline_method(); // r1"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("method(); // r2"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("inline_method(); // r2"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("method(); // r3"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("inline_method(); // r3"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+	}
+	
+	
+	// {testFields}
+	// class MyClass {
+	// public:
+	//    int field;
+	//    int static_field;
+	//    void method();
+	//    void inline_method() {
+	//       int i= field; // r1
+	//		 i= static_field; // r1
+	//    }
+	// };
+	//
+	// void MyClass::method() {
+	//    int i= field; // r2
+	//    i= static_field; // r2
+	// }
+	//
+	// void func() {
+    //	   MyClass m;
+    //	   int i= m.field; // r3
+    //	   i= MyClass::static_field; // r3
+    // }
+	
+	public void testFields() throws Exception {
+		String content = readTaggedComment("testFields");
+		IFile file= createFile(getProject(), "testFields.cpp", content);
+		waitForIndexer(fIndex, file, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("field"), 2);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "MyClass::field");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("static_field"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::static_field");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("field; // r1"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::field");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("static_field; // r1"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::static_field");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("field; // r2"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::field");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("static_field; // r2"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::static_field");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("field; // r3"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::field");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(content.indexOf("static_field; // r3"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::static_field");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+	}
+
+	// 	{testAutomaticConstructor}
+	//  class MyClass {
+	// 	public:
+	//		MyClass();
+	//		virtual ~MyClass();
+	//	};
+	//
+	//  void automatic() {
+	//    MyClass m;
+	//  }		
+	public void _testAutomaticConstructor_156668() throws Exception {
+		String content = readTaggedComment("testAutomaticConstructor");
+		IFile file= createFile(getProject(), "testConstructor.cpp", content);
+		waitForIndexer(fIndex, file, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("MyClass()"), 2);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "MyClass::MyClass()");
+		checkTreeNode(tree, 0, 0, "automatic()");
+
+		editor.selectAndReveal(content.indexOf("~MyClass"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::~MyClass()");
+		checkTreeNode(tree, 0, 0, "automatic()");
+	}
+
+	// 	{testConstructor}
+	//  class MyClass {
+	// 	public:
+	//		MyClass();
+	//		virtual ~MyClass();
+	//	};
+	// 
+	//  void heap() {
+	//    MyClass* m= new MyClass();
+	//    delete m;
+	//  }
+	public void testConstructor() throws Exception {
+		String content = readTaggedComment("testConstructor");
+		IFile file= createFile(getProject(), "testConstructor.cpp", content);
+		waitForIndexer(fIndex, file, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("MyClass()"), 2);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "MyClass::MyClass()");
+		checkTreeNode(tree, 0, 0, "heap()");
+	}
+	
+	public void testDestructor_156669() throws Exception {
+		String content = readTaggedComment("testConstructor");
+		IFile file= createFile(getProject(), "testConstructor.cpp", content);
+		waitForIndexer(fIndex, file, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("~MyClass()"), 2);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "MyClass::~MyClass()");
+		checkTreeNode(tree, 0, 0, "heap()");
+	}
+	
+	
+	// {testNamespace}
+	// namespace ns {
+	//    int var;
+	//    void func();
+	// };
+	//
+	// void ns::func() {
+	//    --var; // r1
+	//    func(); // r1
+    // }
+	//
+	// void gfunc1() {
+	//    int i= ns::var; // r2
+	//    ns::func(); // r2
+    // }
+	//
+	// using namespace ns;
+	// void gfunc2() {
+	//    int i= var; // r3
+	//    func(); // r3
+    // }
+	public void testNamespace() throws Exception {
+		String content = readTaggedComment("testNamespace");
+		IFile file= createFile(getProject(), "testNamespace.cpp", content);
+		waitForIndexer(fIndex, file, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("var"), 2);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "ns::var");
+		checkTreeNode(tree, 0, 0, "gfunc1()");
+		checkTreeNode(tree, 0, 1, "gfunc2()");
+		checkTreeNode(tree, 0, 2, "ns::func()");
+
+		editor.selectAndReveal(content.indexOf("func()"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "ns::func()");
+		checkTreeNode(tree, 0, 0, "gfunc1()");
+		checkTreeNode(tree, 0, 1, "gfunc2()");
+		checkTreeNode(tree, 0, 2, "ns::func()");
+
+		editor.selectAndReveal(content.indexOf("func(); // r1"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "ns::func()");
+		checkTreeNode(tree, 0, 0, "gfunc1()");
+		checkTreeNode(tree, 0, 1, "gfunc2()");
+		checkTreeNode(tree, 0, 2, "ns::func()");
+
+		editor.selectAndReveal(content.indexOf("var; // r2"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "ns::var");
+		checkTreeNode(tree, 0, 0, "gfunc1()");
+		checkTreeNode(tree, 0, 1, "gfunc2()");
+		checkTreeNode(tree, 0, 2, "ns::func()");
+
+		editor.selectAndReveal(content.indexOf("func(); // r2"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "ns::func()");
+		checkTreeNode(tree, 0, 0, "gfunc1()");
+		checkTreeNode(tree, 0, 1, "gfunc2()");
+		checkTreeNode(tree, 0, 2, "ns::func()");
+
+		editor.selectAndReveal(content.indexOf("var; // r3"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "ns::var");
+		checkTreeNode(tree, 0, 0, "gfunc1()");
+		checkTreeNode(tree, 0, 1, "gfunc2()");
+		checkTreeNode(tree, 0, 2, "ns::func()");
+
+		editor.selectAndReveal(content.indexOf("func(); // r3"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "ns::func()");
+		checkTreeNode(tree, 0, 0, "gfunc1()");
+		checkTreeNode(tree, 0, 1, "gfunc2()");
+		checkTreeNode(tree, 0, 2, "ns::func()");
+	}
+
+	public void testNamespacePart2_156519() throws Exception {
+		String content = readTaggedComment("testNamespace");
+		IFile file= createFile(getProject(), "testNamespace.cpp", content);
+		waitForIndexer(fIndex, file, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("var; // r1"), 2);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+
+		checkTreeNode(tree, 0, "ns::var");
+		checkTreeNode(tree, 0, 0, "gfunc1()");
+		checkTreeNode(tree, 0, 1, "gfunc2()");
+		checkTreeNode(tree, 0, 2, "ns::func()");
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CallHierarchyAcrossProjectsTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CallHierarchyAcrossProjectsTest.java
new file mode 100644
index 0000000..610ae71
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CallHierarchyAcrossProjectsTest.java
@@ -0,0 +1,316 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.callhierarchy;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.TestScannerProvider;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+
+public class CallHierarchyAcrossProjectsTest extends CallHierarchyBaseTest {
+	
+	private ICProject fCProject2;
+
+	public CallHierarchyAcrossProjectsTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return suite(CallHierarchyAcrossProjectsTest.class);
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+
+		fCProject2= CProjectHelper.createCCProject("__chTest_2__", "bin", IPDOMManager.ID_NO_INDEXER);
+		CCorePlugin.getIndexManager().setIndexerId(fCProject2, IPDOMManager.ID_FAST_INDEXER);
+		CCorePlugin.getIndexManager().joinIndexer(INDEXER_WAIT_TIME, NPM);
+		fIndex= CCorePlugin.getIndexManager().getIndex(new ICProject[] {fCProject, fCProject2});
+		TestScannerProvider.sIncludes= new String[]{fCProject.getProject().getLocation().toOSString(), fCProject2.getProject().getLocation().toOSString()};
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		if (fCProject2 != null) {
+			CProjectHelper.delete(fCProject2);
+		}
+		super.tearDown();
+	}
+
+	// // testMethods.h
+	// class MyClass {
+	// public:
+	//    void method();
+	//    void inline_method() {
+	//        method(); // r1
+	//        inline_method(); // r1
+	//    }
+	// };
+	
+	// // testMethods.cpp
+	// #include "testMethods.h"
+	// void MyClass::method() {
+	//    method(); // r2
+	//    inline_method(); // r2
+	// }
+	//
+	// void func() {
+    //	   MyClass m, *n;
+    //	   m.method(); // r3
+    //	   n->inline_method(); // r3
+    // }
+	public void testMethods() throws Exception {
+		StringBuffer[] content= getContentsForTest(2);
+		String header= content[0].toString();
+		String source = content[1].toString();
+		IFile headerFile= createFile(fCProject.getProject(), "testMethods.h", header);
+		waitForIndexer(fIndex, headerFile, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		IFile sourceFile= createFile(fCProject2.getProject(), "testMethods.cpp", source);
+		waitForIndexer(fIndex, sourceFile, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		CEditor editor= openEditor(sourceFile);
+		
+		
+		editor.selectAndReveal(source.indexOf("method"), 2);
+		openCallHierarchy(editor, true);
+		Tree tree = getCHTreeViewer().getTree();
+
+		checkTreeNode(tree, 0, "MyClass::method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(source.indexOf("method(); // r2"), 2);
+		openCallHierarchy(editor);
+
+		checkTreeNode(tree, 0, "MyClass::method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(source.indexOf("inline_method(); // r2"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(source.indexOf("method(); // r3"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(source.indexOf("inline_method(); // r3"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+	}
+	
+	
+	// // testMethods.h
+	// class MyClass {
+	// public:
+	//    void method1();
+	//    void method2();
+	//    void method3();
+	// };
+	
+	// // testMethods1.cpp
+	// #include "testMethods.h"
+	// void MyClass::method1() {
+	//    method2(); 
+	// }
+	// void MyClass::method3() {
+	// }
+	
+	// // testMethods2.cpp
+	// #include "testMethods.h"
+	// void MyClass::method2() {
+	//    method3(); 
+	// }
+	public void testMethodsInMultipleFiles() throws Exception {
+		StringBuffer[] content= getContentsForTest(3);
+		String header= content[0].toString();
+		String source1 = content[1].toString();
+		String source2 = content[2].toString();
+		IFile headerFile= createFile(fCProject.getProject(), "testMethods.h", header);
+		IFile sourceFile1= createFile(fCProject.getProject(), "testMethods1.cpp", source1);
+		IFile sourceFile2= createFile(fCProject2.getProject(), "testMethods2.cpp", source2);
+
+		CEditor editor= openEditor(sourceFile1);
+		waitForIndexer(fIndex, sourceFile2, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		
+		editor.selectAndReveal(source1.indexOf("method3"), 2);
+		openCallHierarchy(editor);
+		TreeViewer tv = getCHTreeViewer();
+
+		checkTreeNode(tv.getTree(), 0, "MyClass::method3()");
+		TreeItem item= checkTreeNode(tv.getTree(), 0, 0, "MyClass::method2()");
+		checkTreeNode(tv.getTree(), 0, 1, null); 
+		tv.setExpandedState(item.getData(), true); 
+		TreeItem nextItem= checkTreeNode(item, 0, "MyClass::method1()");
+		checkTreeNode(item, 1, null); item= nextItem;
+		tv.setExpandedState(item.getData(), true); 
+		checkTreeNode(item, 0, null);
+	}
+
+	// // testMethods.h
+	// class MyClass {
+	// public:
+	//    void method1();
+	//    void method2();
+	//    void method3();
+	// };
+	
+	// // testMethods1.cpp
+	// #include "testMethods.h"
+	// void MyClass::method1() {
+	//    method2(); 
+	// }
+	// void MyClass::method3() {
+	// }
+	
+	// // testMethods2.cpp
+	// #include "testMethods.h"
+	// void MyClass::method2() {
+	//    method3(); 
+	// }
+	// void MyClass::method1() {
+	//   method3();
+	// }
+	public void testMultipleImplsForMethod() throws Exception {
+		StringBuffer[] content= getContentsForTest(3);
+		String header= content[0].toString();
+		String source1 = content[1].toString();
+		String source2 = content[2].toString();
+		IFile headerFile= createFile(getProject(), "testMethods.h", header);
+		IFile sourceFile1= createFile(fCProject2.getProject(), "testMethods1.cpp", source1);
+		IFile sourceFile2= createFile(getProject(), "testMethods2.cpp", source2);
+
+		CEditor editor= openEditor(sourceFile1);
+		waitForIndexer(fIndex, sourceFile1, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		waitForIndexer(fIndex, sourceFile2, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		
+		editor.selectAndReveal(source1.indexOf("method3"), 2);
+		openCallHierarchy(editor);
+		TreeViewer tv = getCHTreeViewer();
+
+		checkTreeNode(tv.getTree(), 0, "MyClass::method3()");
+		TreeItem item0= checkTreeNode(tv.getTree(), 0, 0, "MyClass::method1()");
+		TreeItem item1= checkTreeNode(tv.getTree(), 0, 1, "MyClass::method2()");
+		checkTreeNode(tv.getTree(), 0, 2, null); 
+		
+		// method 1
+		tv.setExpandedState(item0.getData(), true); 
+		checkTreeNode(item0, 0, null);
+		
+		// method 2
+		tv.setExpandedState(item1.getData(), true); 
+		TreeItem nextItem= checkTreeNode(item1, 0,  "MyClass::method1()");
+		checkTreeNode(item1, 1, null); item1= nextItem;
+		tv.setExpandedState(item1.getData(), true); 
+		checkTreeNode(item1, 0, null);
+	}
+
+	// // testMethods.h
+	// class MyClass {
+	// public:
+	//    void method1();
+	//    void method2();
+	//    void method3();
+	// };
+	
+	// // testMethods1.cpp
+	// #include "testMethods.h"
+	// void MyClass::method1() {
+	//    method2(); 
+	// }
+	// void MyClass::method3() {
+	// }
+	
+	// // testMethods2.cpp
+	// #include "testMethods.h"
+	// void MyClass::method1() {
+	//    method3(); 
+	// }
+	// void MyClass::method2() {
+	// }
+	// void main() {
+	//    MyClass mc;
+	// 	  mc.method1();
+	// }
+	public void testReverseMultipleImplsForMethod() throws Exception {
+		StringBuffer[] content= getContentsForTest(3);
+		String header= content[0].toString();
+		String source1 = content[1].toString();
+		String source2 = content[2].toString();
+		IFile headerFile= createFile(getProject(), "testMethods.h", header);
+		IFile sourceFile1= createFile(getProject(), "testMethods1.cpp", source1);
+		IFile sourceFile2= createFile(getProject(), "testMethods2.cpp", source2);
+
+		CEditor editor= openEditor(sourceFile2);
+		waitForIndexer(fIndex, sourceFile2, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		
+		editor.selectAndReveal(source2.indexOf("main"), 2);
+		openCallHierarchy(editor, false);
+		TreeViewer tv = getCHTreeViewer();
+
+		final Tree tree = tv.getTree();
+		checkTreeNode(tree, 0, "main()");
+		TreeItem item= checkTreeNode(tree, 0, 0,  "MyClass::method1()");
+		checkTreeNode(tree, 0, 1, null); 
+		tv.setExpandedState(item.getData(), true); 
+
+		TreeItem item0= checkTreeNode(item, 0, "MyClass::method1()");
+		TreeItem item1= checkTreeNode(item, 1, "MyClass::method1()");
+		checkTreeNode(item, 2, null); item= null;
+		
+		try {
+			tv.setExpandedState(item0.getData(), true); 
+			checkTreeNode(item0, 0,  "MyClass::method2()");
+		}
+		catch (Throwable e) {
+			TreeItem tmp= item0; item0= item1; item1= tmp;
+		}
+
+		// method 1
+		tv.setExpandedState(item0.getData(), true); 
+		TreeItem nextItem= checkTreeNode(item0, 0,  "MyClass::method2()");
+		checkTreeNode(item0, 1, null); item0= nextItem;
+		tv.setExpandedState(item0.getData(), true); 
+		checkTreeNode(item0, 0, null);
+		
+		// method 2
+		tv.setExpandedState(item1.getData(), true); 
+		nextItem= checkTreeNode(item1, 0,  "MyClass::method3()");
+		checkTreeNode(item1, 1, null); item1= nextItem;
+		tv.setExpandedState(item1.getData(), true); 
+		checkTreeNode(item1, 0, null);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CallHierarchyBaseTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CallHierarchyBaseTest.java
new file mode 100644
index 0000000..7ebf0e9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CallHierarchyBaseTest.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.callhierarchy;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWTException;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+import org.eclipse.cdt.ui.tests.text.EditorTestHelper;
+
+import org.eclipse.cdt.internal.ui.callhierarchy.CHViewPart;
+import org.eclipse.cdt.internal.ui.callhierarchy.CallHierarchyUI;
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+public class CallHierarchyBaseTest extends BaseUITestCase {
+	protected static final int INDEXER_WAIT_TIME = 8000;
+	private static int sProjectCounter= 0;
+
+	protected ICProject fCProject;
+	protected IIndex fIndex;
+
+	public CallHierarchyBaseTest(String name) {
+		super(name);
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		CallHierarchyUI.setIsJUnitTest(true);
+		String prjName= "chTest"+sProjectCounter++;
+		fCProject= CProjectHelper.createCCProject(prjName, "bin", IPDOMManager.ID_FAST_INDEXER);
+		CCorePlugin.getIndexManager().joinIndexer(INDEXER_WAIT_TIME, NPM);
+		fIndex= CCorePlugin.getIndexManager().getIndex(fCProject);
+		IWorkbenchPage page= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		IViewReference[] refs= page.getViewReferences();
+		for (int i = 0; i < refs.length; i++) {
+			IViewReference viewReference = refs[i];
+			page.setPartState(viewReference, IWorkbenchPage.STATE_RESTORED);
+		}
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		closeAllEditors();
+		if (fCProject != null) {
+			CProjectHelper.delete(fCProject);
+		}
+		super.tearDown();
+	}
+	
+	protected IProject getProject() {
+		return fCProject.getProject();
+	}
+	
+	protected CEditor openEditor(IFile file) throws PartInitException {
+		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		CEditor editor= (CEditor) IDE.openEditor(page, file);
+		EditorTestHelper.joinReconciler(EditorTestHelper.getSourceViewer(editor), 100, 500, 10);
+		return editor;
+	}	
+
+	protected void openCallHierarchy(CEditor editor) {
+		CallHierarchyUI.open(editor, (ITextSelection) editor.getSelectionProvider().getSelection());
+	}
+
+	protected void openCallHierarchy(CEditor editor, boolean showReferencedBy) {
+		CallHierarchyUI.setIsJUnitTest(true);
+		CallHierarchyUI.open(editor, (ITextSelection) editor.getSelectionProvider().getSelection());
+		runEventQueue(0);
+		CHViewPart ch= null;
+		IWorkbenchPage page = editor.getSite().getPage();
+		for (int i = 0; i < 400; i++) {
+			ch= (CHViewPart)page.findView(CUIPlugin.ID_CALL_HIERARCHY);
+			if (ch != null) 
+				break;
+			runEventQueue(10);
+		}
+		assertNotNull(ch);
+		ch.onSetShowReferencedBy(showReferencedBy);
+	}
+
+	protected TreeViewer getCHTreeViewer() {
+		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		runEventQueue(0);
+		CHViewPart ch= null;
+		for (int i=0; i<50; i++) {
+			ch= (CHViewPart)page.findView(CUIPlugin.ID_CALL_HIERARCHY);
+			if (ch != null) 
+				break;
+			runEventQueue(10);
+		}
+		assertNotNull(ch);
+		return ch.getTreeViewer();
+	}
+	
+	protected TreeItem checkTreeNode(TreeItem root, int i1, String label) {
+		TreeItem item= null;
+		try {
+			for (int i=0; i<200; i++) {
+				item= root.getItem(i1);
+				try {
+					String text= item.getText();
+					if (!"...".equals(text) && !"".equals(text)) {
+						break;
+					}
+				} catch (SWTException e) {
+					// in case widget was disposed, item may be replaced
+				}
+				runEventQueue(10);
+			}
+		}
+		catch (IllegalArgumentException e) {
+			assertNull("Tree node " + label + " does not exist!", label);
+			return null;
+		}
+		assertNotNull("Unexpected tree node " + item.getText(), label);
+		assertEquals(label, item.getText());
+		return item;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CallHierarchyBugs.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CallHierarchyBugs.java
new file mode 100644
index 0000000..1d2923c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CallHierarchyBugs.java
@@ -0,0 +1,446 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.callhierarchy;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchWindow;
+
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.ui.CUIPlugin;
+
+import org.eclipse.cdt.internal.ui.callhierarchy.CHViewPart;
+import org.eclipse.cdt.internal.ui.callhierarchy.CallHierarchyUI;
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+
+public class CallHierarchyBugs extends CallHierarchyBaseTest {
+	
+	public CallHierarchyBugs(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return suite(CallHierarchyBugs.class);
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		restoreAllParts();
+	}
+	
+	// class SomeClass {
+	// public:
+	//    void method();
+	//    int field;
+	// };
+
+	// #include "SomeClass.h"
+	// void SomeClass::method() {
+	//    field= 1;
+	// }
+	public void testCallHierarchyFromOutlineView_183941() throws Exception {
+		StringBuffer[] contents = getContentsForTest(2);
+		IFile file1= createFile(getProject(), "SomeClass.h", contents[0].toString());
+		IFile file2= createFile(getProject(), "SomeClass.cpp", contents[1].toString());
+		waitForIndexer(fIndex, file2, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+
+		final CHViewPart ch= (CHViewPart) activateView(CUIPlugin.ID_CALL_HIERARCHY);
+		final IViewPart outline= activateView(IPageLayout.ID_OUTLINE);
+		final IWorkbenchWindow workbenchWindow = ch.getSite().getWorkbenchWindow();
+
+		// open editor, check outline
+		openEditor(file1);
+		Tree outlineTree= checkTreeNode(outline, 0, "SomeClass").getParent();
+		expandTreeItem(outlineTree, 0);
+		TreeItem node= checkTreeNode(outlineTree, 0, 0, "method() : void");
+
+		openCH(workbenchWindow, node);
+		Tree chTree= checkTreeNode(ch, 0, "SomeClass::method()").getParent();
+		checkTreeNode(chTree, 0, 1, null);
+		
+		ch.onSetShowReferencedBy(false);
+		checkTreeNode(chTree, 0, "SomeClass::method()");
+		checkTreeNode(chTree, 0, 0, "SomeClass::field");
+	}
+	
+	// class SomeClass {
+	// public:
+	//    void ambiguous_impl();
+	//    int ref1;
+	//	  int ref2;
+	// };
+	//
+	// void SomeClass::ambiguous_impl() {
+	//    ref1= 1;
+	// }
+	// void other() {}
+
+	// #include "SomeClass.h"
+	// void SomeClass::ambiguous_impl() {
+	//    ref2= 0;
+	// }
+	public void testCallHierarchyFromOutlineViewAmbiguous_183941() throws Exception {
+		StringBuffer[] contents = getContentsForTest(2);
+		IFile file1= createFile(getProject(), "SomeClass.h", contents[0].toString());
+		IFile file2= createFile(getProject(), "SomeClass.cpp", contents[1].toString());
+		waitForIndexer(fIndex, file2, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+
+		final CHViewPart ch= (CHViewPart) activateView(CUIPlugin.ID_CALL_HIERARCHY);
+		final IViewPart outline= activateView(IPageLayout.ID_OUTLINE);
+		final IWorkbenchWindow workbenchWindow = ch.getSite().getWorkbenchWindow();
+
+		// open editor, check outline
+		openEditor(file1);
+		TreeItem node1= checkTreeNode(outline, 1, "SomeClass::ambiguous_impl() : void");
+		Tree outlineTree= node1.getParent();
+		TreeItem node2= checkTreeNode(outlineTree, 2, "other() : void");
+
+		// open and check call hierarchy
+		openCH(workbenchWindow, node1);
+		ch.onSetShowReferencedBy(false);
+
+		Tree chTree= checkTreeNode(ch, 0, "SomeClass::ambiguous_impl()").getParent();
+		checkTreeNode(chTree, 0, 0, "SomeClass::ref1");
+
+		// open and check call hierarchy
+		openCH(workbenchWindow, node2);
+		checkTreeNode(chTree, 0, "other()");
+
+		
+		// open editor, check outline
+		openEditor(file2);
+		outlineTree= checkTreeNode(outline, 0, "SomeClass.h").getParent();
+		node1= checkTreeNode(outlineTree, 1, "SomeClass::ambiguous_impl() : void");
+		
+		// open and check call hierarchy
+		openCH(workbenchWindow, node1);
+		ch.onSetShowReferencedBy(false);
+		chTree= checkTreeNode(ch, 0, "SomeClass::ambiguous_impl()").getParent();
+		checkTreeNode(chTree, 0, 0, "SomeClass::ref2");
+	}
+
+	private void openCH(final IWorkbenchWindow workbenchWindow, TreeItem node1) {
+		Object obj= node1.getData();
+		assertTrue(obj instanceof ICElement);
+		CallHierarchyUI.open(workbenchWindow, (ICElement) obj);
+	}
+	
+	// class Base {
+	// public:
+	//    virtual void vmethod();
+	//    void method();
+	// };
+	// class Derived : public Base {
+	// public:
+	//    void vmethod();
+	//    void method();
+	// };
+	// void vrefs() {
+	//    Base* b= 0;
+	//    b->vmethod(); b->method();
+	// }
+	// void regRefs() {
+	//    Base* b= 0;
+	//    b->Base::vmethod(); b->Base::method(); 
+	// }
+	public void testPolyMorphicMethodCalls_156689() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "SomeClass.cpp", content);
+		waitForIndexer(fIndex, file, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+
+		final CHViewPart ch= (CHViewPart) activateView(CUIPlugin.ID_CALL_HIERARCHY);
+		final IWorkbenchWindow workbenchWindow = ch.getSite().getWorkbenchWindow();
+
+		// open editor, check outline
+		CEditor editor= openEditor(file);
+		int idx = content.indexOf("vmethod");
+		editor.selectAndReveal(idx, 0);
+		openCallHierarchy(editor);
+
+		Tree chTree= checkTreeNode(ch, 0, "Base::vmethod()").getParent();
+		checkTreeNode(chTree, 0, 0, "regRefs()");
+		checkTreeNode(chTree, 0, 1, "vrefs()");
+		checkTreeNode(chTree, 0, 2, null);
+
+		idx = content.indexOf("vmethod", idx+1);
+		editor.selectAndReveal(idx, 0);
+		openCallHierarchy(editor);
+
+		chTree= checkTreeNode(ch, 0, "Derived::vmethod()").getParent();
+		checkTreeNode(chTree, 0, 0, "vrefs()");
+		checkTreeNode(chTree, 0, 1, null);
+
+		idx = content.indexOf(" method")+1;
+		editor.selectAndReveal(idx, 0);
+		openCallHierarchy(editor);
+
+		chTree= checkTreeNode(ch, 0, "Base::method()").getParent();
+		checkTreeNode(chTree, 0, 0, "regRefs()");
+		checkTreeNode(chTree, 0, 1, "vrefs()");
+		checkTreeNode(chTree, 0, 2, null);
+
+		idx = content.indexOf(" method", idx+1)+1;
+		editor.selectAndReveal(idx, 0);
+		openCallHierarchy(editor);
+
+		chTree= checkTreeNode(ch, 0, "Derived::method()").getParent();
+		checkTreeNode(chTree, 0, 0, null);
+	}
+
+	// class Base {
+	// public:
+	//    virtual void vmethod();
+	// };
+	// class Derived : public Base {
+	// public:
+	//    void vmethod();
+	// };
+	// void vrefs() {
+	//    Base* b= 0;
+	//    b->vmethod();
+	// }
+	public void testReversePolyMorphicMethodCalls_156689() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "SomeClass.cpp", content);
+		waitForIndexer(fIndex, file, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+
+		final CHViewPart ch= (CHViewPart) activateView(CUIPlugin.ID_CALL_HIERARCHY);
+		final IWorkbenchWindow workbenchWindow = ch.getSite().getWorkbenchWindow();
+
+		// open editor, check outline
+		CEditor editor= openEditor(file);
+		int idx = content.indexOf("vrefs");
+		editor.selectAndReveal(idx, 0);
+		openCallHierarchy(editor, false);
+
+		Tree chTree= checkTreeNode(ch, 0, "vrefs()").getParent();
+		TreeItem item= checkTreeNode(chTree, 0, 0, "Base::vmethod()");
+		checkTreeNode(chTree, 0, 1, null);
+
+		expandTreeItem(item);
+		checkTreeNode(item, 0, "Base::vmethod()");
+		checkTreeNode(item, 1, "Derived::vmethod()");
+		checkTreeNode(item, 2, null);
+	}
+	
+	//	template <class T> class CSome {
+	//		public:
+	//			T Foo (const T& x) { return 2*x; }
+	//	};
+	//	template <> class CSome <int> {
+	//		public:
+	//			int Foo (const int& x) { return 3*x; }
+	//	};
+	//	void test() {
+	//		CSome <int> X;
+	//		X.Foo(3);
+	//	}
+	public void testMethodInstance_Bug240599() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "CSome.cpp", content);
+		waitForIndexer(fIndex, file, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+
+		final CHViewPart ch= (CHViewPart) activateView(CUIPlugin.ID_CALL_HIERARCHY);
+		final IWorkbenchWindow workbenchWindow = ch.getSite().getWorkbenchWindow();
+
+		// open editor, check outline
+		CEditor editor= openEditor(file);
+		int idx = content.indexOf("Foo(3)");
+		editor.selectAndReveal(idx, 0);
+		openCallHierarchy(editor, true);
+		Tree chTree= checkTreeNode(ch, 0, "CSome::Foo(const int &)").getParent();
+		TreeItem item= checkTreeNode(chTree, 0, 0, "test()");
+		checkTreeNode(chTree, 0, 1, null);
+	}
+	
+	//	class Base {
+	//	public:
+	//	   virtual void First() {}
+	//	   virtual void Second() {}
+	//	};
+	//
+	//	class Derived: public Base {
+	//  public:
+	//	   virtual void First() {}
+	//	   virtual void Second() {}
+	//	};
+	//
+	//	void func(Base *base) {
+	//		base->First();
+	//		base->Second();
+	//	}
+	//
+	//	int main() {
+	//		Derived derived;
+	//		func(&derived);
+	//		return 0;
+	//	}
+	public void testMultiplePolyMorphicMethodCalls_244987() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "SomeClass244987.cpp", content);
+		waitForIndexer(fIndex, file, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+
+		final CHViewPart ch= (CHViewPart) activateView(CUIPlugin.ID_CALL_HIERARCHY);
+		final IWorkbenchWindow workbenchWindow = ch.getSite().getWorkbenchWindow();
+
+		// open editor, check outline
+		CEditor editor= openEditor(file);
+		int idx = content.indexOf("main");
+		editor.selectAndReveal(idx, 0);
+		openCallHierarchy(editor, false);
+
+		Tree chTree= checkTreeNode(ch, 0, "main()").getParent();
+		TreeItem ti= checkTreeNode(chTree, 0, 0, "func(Base *)");
+		expandTreeItem(ti);
+		checkTreeNode(chTree, 0, 1, null);
+
+		TreeItem ti1= checkTreeNode(ti, 0, "Base::First()");
+		expandTreeItem(ti1);
+		TreeItem ti2= checkTreeNode(ti, 1, "Base::Second()");
+		expandTreeItem(ti2);
+		checkTreeNode(ti, 2, null);
+		
+		checkTreeNode(ti1, 0, "Base::First()");
+		checkTreeNode(ti1, 1, "Derived::First()");
+		checkTreeNode(ti1, 2, null);
+
+		checkTreeNode(ti2, 0, "Base::Second()");
+		checkTreeNode(ti2, 1, "Derived::Second()");
+		checkTreeNode(ti2, 2, null);
+
+	}
+
+	//	#define MACRO(name) void PREFIX_ ## name(char *a , char *b)
+	//	#define CALL(x) call(x)
+	//
+	//	void call(int);
+	//	MACRO(Test) {
+	//		CALL(0);
+	//	}
+	public void testMacrosHidingCall_249801() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "file249801.cpp", content);
+		waitForIndexer(fIndex, file, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+
+		final CHViewPart ch= (CHViewPart) activateView(CUIPlugin.ID_CALL_HIERARCHY);
+
+		// open editor, check outline
+		CEditor editor= openEditor(file);
+		int idx = content.indexOf("MACRO(Test");
+		editor.selectAndReveal(idx, 0);
+		openCallHierarchy(editor, false);
+
+		Tree chTree= checkTreeNode(ch, 0, "PREFIX_Test(char *, char *)").getParent();
+		TreeItem ti= checkTreeNode(chTree, 0, 0, "call(int)");
+
+		idx = content.indexOf("CALL(0");
+		editor.selectAndReveal(idx+4, 0);
+		openCallHierarchy(editor, true);
+		chTree= checkTreeNode(ch, 0, "call(int)").getParent();
+		ti= checkTreeNode(chTree, 0, 0, "PREFIX_Test(char *, char *)");
+	}
+
+	//	void shared_func();
+
+	//  #include "260262.h"
+
+	//	void call() {
+	//     shared_func();
+	//	}
+	public void testMultiLanguageWithPrototype_260262() throws Exception {
+		final StringBuffer[] contents = getContentsForTest(3);
+		final String hcontent = contents[0].toString();
+		final String content_inc = contents[1].toString();
+		final String content_full = content_inc + contents[2].toString();
+		IFile header= createFile(getProject(), "260262.h", hcontent);
+		IFile f1= createFile(getProject(), "260262.c", content_full);
+		IFile f2= createFile(getProject(), "260262.cpp", content_inc);
+		waitForIndexer(fIndex, f2, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+
+		final CHViewPart ch= (CHViewPart) activateView(CUIPlugin.ID_CALL_HIERARCHY);
+
+		// open editor, check outline
+		CEditor editor= openEditor(header);
+		int idx = hcontent.indexOf("shared_func()");
+		editor.selectAndReveal(idx, 0);
+		openCallHierarchy(editor, true);
+
+		Tree chTree= checkTreeNode(ch, 0, "shared_func()").getParent();
+		TreeItem ti= checkTreeNode(chTree, 0, 0, "call()");
+		checkTreeNode(chTree, 0, 1, null);
+	}
+
+	//	inline void shared_func() {}
+
+	//  #include "260262.h"
+
+	//	void call() {
+	//     shared_func();
+	//	}
+	public void testMultiLanguageWithInlinedfunc_260262() throws Exception {
+		final StringBuffer[] contents = getContentsForTest(3);
+		final String hcontent = contents[0].toString();
+		final String content_inc = contents[1].toString();
+		final String content_full = content_inc + contents[2].toString();
+		IFile header= createFile(getProject(), "260262.h", hcontent);
+		IFile f1= createFile(getProject(), "260262.c", content_full);
+		IFile f2= createFile(getProject(), "260262.cpp", content_inc);
+		waitForIndexer(fIndex, f2, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+
+		final CHViewPart ch= (CHViewPart) activateView(CUIPlugin.ID_CALL_HIERARCHY);
+
+		// open editor, check outline
+		CEditor editor= openEditor(header);
+		int idx = hcontent.indexOf("shared_func()");
+		editor.selectAndReveal(idx, 0);
+		openCallHierarchy(editor, true);
+
+		Tree chTree= checkTreeNode(ch, 0, "shared_func()").getParent();
+		TreeItem ti= checkTreeNode(chTree, 0, 0, "call()");
+		checkTreeNode(chTree, 0, 1, null);
+	}
+	
+	//	namespace {
+	//		void doNothing()
+	//		{
+	//		}
+	//	}
+	//	int main() {
+	//      doNothing();
+	//		return 0;
+	//	}
+	public void testUnnamedNamespace_283679() throws Exception {
+		final StringBuffer[] contents = getContentsForTest(1);
+		final String content = contents[0].toString();
+		IFile f2= createFile(getProject(), "testUnnamedNamespace_283679.cpp", content);
+		waitForIndexer(fIndex, f2, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+
+		final CHViewPart ch= (CHViewPart) activateView(CUIPlugin.ID_CALL_HIERARCHY);
+
+		// open editor, check outline
+		CEditor editor= openEditor(f2);
+		int idx = content.indexOf("doNothing()");
+		editor.selectAndReveal(idx, 0);
+		openCallHierarchy(editor, true);
+
+		Tree chTree= checkTreeNode(ch, 0, "doNothing()").getParent();
+		TreeItem ti= checkTreeNode(chTree, 0, 0, "main()");
+		checkTreeNode(chTree, 0, 1, null);
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CallHierarchyTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CallHierarchyTestSuite.java
new file mode 100644
index 0000000..2e5dcfa
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CallHierarchyTestSuite.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.ui.tests.callhierarchy;
+
+import junit.framework.TestSuite;
+
+public class CallHierarchyTestSuite extends TestSuite {
+
+    public static TestSuite suite() {
+        return new CallHierarchyTestSuite();
+    }
+    
+    public CallHierarchyTestSuite() {
+        super(CallHierarchyTestSuite.class.getName());
+        addTest(BasicCallHierarchyTest.suite());
+        addTest(BasicCppCallHierarchyTest.suite());
+        addTest(InitializersInCallHierarchyTest.suite());
+        addTest(CppCallHierarchyTest.suite());
+        addTest(CallHierarchyAcrossProjectsTest.suite());
+        addTest(CallHierarchyBugs.suite());
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CppCallHierarchyTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CppCallHierarchyTest.java
new file mode 100644
index 0000000..4feaa41
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/CppCallHierarchyTest.java
@@ -0,0 +1,378 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.callhierarchy;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+
+import org.eclipse.cdt.core.CCorePlugin;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+
+public class CppCallHierarchyTest extends CallHierarchyBaseTest {
+	
+	public CppCallHierarchyTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return suite(CppCallHierarchyTest.class);
+	}
+
+	// // testMethods.h
+	// class MyClass {
+	// public:
+	//    void method();
+	//    void inline_method() {
+	//        method(); // r1
+	//        inline_method(); // r1
+	//    }
+	// };
+	
+	// // testMethods.cpp
+	// #include "testMethods.h"
+	// void MyClass::method() {
+	//    method(); // r2
+	//    inline_method(); // r2
+	// }
+	//
+	// void func() {
+    //	   MyClass m, *n;
+    //	   m.method(); // r3
+    //	   n->inline_method(); // r3
+    // }
+	public void testMethods() throws Exception {
+		StringBuffer[] content= getContentsForTest(2);
+		String header= content[0].toString();
+		String source = content[1].toString();
+		IFile headerFile= createFile(getProject(), "testMethods.h", header);
+		IFile sourceFile= createFile(getProject(), "testMethods.cpp", source);
+		waitForIndexer(fIndex, sourceFile, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(sourceFile);
+		editor.selectAndReveal(source.indexOf("method"), 2);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+
+		checkTreeNode(tree, 0, "MyClass::method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(source.indexOf("method(); // r2"), 2);
+		openCallHierarchy(editor);
+
+		checkTreeNode(tree, 0, "MyClass::method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(source.indexOf("inline_method(); // r2"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(source.indexOf("method(); // r3"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+
+		editor.selectAndReveal(source.indexOf("inline_method(); // r3"), 2);
+		openCallHierarchy(editor);
+		checkTreeNode(tree, 0, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 0, "func()");
+		checkTreeNode(tree, 0, 1, "MyClass::inline_method()");
+		checkTreeNode(tree, 0, 2, "MyClass::method()");
+	}
+	
+	
+	// // testMethods.h
+	// class MyClass {
+	// public:
+	//    void method1();
+	//    void method2();
+	//    void method3();
+	// };
+	
+	// // testMethods1.cpp
+	// #include "testMethods.h"
+	// void MyClass::method1() {
+	//    method2(); 
+	// }
+	// void MyClass::method3() {
+	// }
+	
+	// // testMethods2.cpp
+	// #include "testMethods.h"
+	// void MyClass::method2() {
+	//    method3(); 
+	// }
+	public void testMethodsInMultipleFiles() throws Exception {
+		StringBuffer[] content= getContentsForTest(3);
+		String header= content[0].toString();
+		String source1 = content[1].toString();
+		String source2 = content[2].toString();
+		IFile headerFile= createFile(getProject(), "testMethods.h", header);
+		IFile sourceFile1= createFile(getProject(), "testMethods1.cpp", source1);
+		IFile sourceFile2= createFile(getProject(), "testMethods2.cpp", source2);
+
+		CEditor editor= openEditor(sourceFile1);
+		waitForIndexer(fIndex, sourceFile2, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		
+		editor.selectAndReveal(source1.indexOf("method3"), 2);
+		openCallHierarchy(editor);
+		TreeViewer tv = getCHTreeViewer();
+
+		checkTreeNode(tv.getTree(), 0, "MyClass::method3()");
+		TreeItem item= checkTreeNode(tv.getTree(), 0, 0, "MyClass::method2()");
+		checkTreeNode(tv.getTree(), 0, 1, null);
+		tv.setExpandedState(item.getData(), true); 
+		TreeItem nextItem = checkTreeNode(item, 0, "MyClass::method1()");
+		checkTreeNode(item, 1, null); item= nextItem;
+		tv.setExpandedState(item.getData(), true); 
+		checkTreeNode(item, 0, null);
+	}
+
+	// // testMethods.h
+	// class MyClass {
+	// public:
+	//    void method1();
+	//    void method2();
+	//    void method3();
+	// };
+	
+	// // testMethods1.cpp
+	// #include "testMethods.h"
+	// void MyClass::method1() {
+	//    method2(); 
+	// }
+	// void MyClass::method3() {
+	// }
+	
+	// // testMethods2.cpp
+	// #include "testMethods.h"
+	// void MyClass::method2() {
+	//    method3(); 
+	// }
+	// void MyClass::method1() {
+	//   method3();
+	// }
+	public void testMultipleImplsForMethod() throws Exception {
+		StringBuffer[] content= getContentsForTest(3);
+		String header= content[0].toString();
+		String source1 = content[1].toString();
+		String source2 = content[2].toString();
+		IFile headerFile= createFile(getProject(), "testMethods.h", header);
+		IFile sourceFile1= createFile(getProject(), "testMethods1.cpp", source1);
+		IFile sourceFile2= createFile(getProject(), "testMethods2.cpp", source2);
+
+		waitForIndexer(fIndex, sourceFile2, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(sourceFile1);
+		editor.selectAndReveal(source1.indexOf("method3"), 2);
+		openCallHierarchy(editor);
+		TreeViewer tv = getCHTreeViewer();
+
+		TreeItem item= checkTreeNode(tv.getTree(), 0, "MyClass::method3()");
+		TreeItem item0= checkTreeNode(tv.getTree(), 0, 0, "MyClass::method1()");
+		TreeItem item1= checkTreeNode(tv.getTree(), 0, 1, "MyClass::method2()");
+		checkTreeNode(tv.getTree(), 0, 2, null); item= null;
+		
+		// method 1
+		tv.setExpandedState(item0.getData(), true); 
+		checkTreeNode(item0, 0, null);
+		
+		// method 2
+		tv.setExpandedState(item1.getData(), true); 
+		TreeItem nextItem= checkTreeNode(item1, 0,  "MyClass::method1()");
+		checkTreeNode(item1, 1, null); item1= nextItem;
+		tv.setExpandedState(item1.getData(), true); 
+		checkTreeNode(item1, 0, null);
+	}
+
+	// // testMethods.h
+	// class MyClass {
+	// public:
+	//    void method1();
+	//    void method2();
+	//    void method3();
+	// };
+	
+	// // testMethods1.cpp
+	// #include "testMethods.h"
+	// void MyClass::method1() {
+	//    method2(); 
+	// }
+	// void MyClass::method3() {
+	// }
+	
+	// // testMethods2.cpp
+	// #include "testMethods.h"
+	// void MyClass::method1() {
+	//    method3(); 
+	// }
+	// void MyClass::method2() {
+	// }
+	// void main() {
+	//    MyClass mc;
+	// 	  mc.method1();
+	// }
+	public void testReverseMultipleImplsForMethod() throws Exception {
+		StringBuffer[] content= getContentsForTest(3);
+		String header= content[0].toString();
+		String source1 = content[1].toString();
+		String source2 = content[2].toString();
+		IFile headerFile= createFile(getProject(), "testMethods.h", header);
+		IFile sourceFile1= createFile(getProject(), "testMethods1.cpp", source1);
+		IFile sourceFile2= createFile(getProject(), "testMethods2.cpp", source2);
+
+		CEditor editor= openEditor(sourceFile2);
+		waitForIndexer(fIndex, sourceFile2, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		
+		editor.selectAndReveal(source2.indexOf("main"), 2);
+		openCallHierarchy(editor, false);
+		TreeViewer tv = getCHTreeViewer();
+
+		TreeItem item= checkTreeNode(tv.getTree(), 0, "main()");
+		TreeItem nextItem= checkTreeNode(item, 0,  "MyClass::method1()");
+		checkTreeNode(item, 1, null); item= nextItem;
+		tv.setExpandedState(item.getData(), true); 
+
+		TreeItem item0= checkTreeNode(item, 0, "MyClass::method1()");
+		TreeItem item1= checkTreeNode(item, 1, "MyClass::method1()");
+		checkTreeNode(item, 2, null); item= null;
+		
+		// method 1
+		try {
+			tv.setExpandedState(item0.getData(), true); 
+			nextItem= checkTreeNode(item0, 0,  "MyClass::method2()");
+		}
+		catch (Throwable e) {
+			TreeItem tmp= item0; item0= item1; item1= tmp;
+		}
+		expandTreeItem(item0); 
+		nextItem= checkTreeNode(item0, 0,  "MyClass::method2()");
+		checkTreeNode(item0, 1, null); item0= nextItem;
+		tv.setExpandedState(item0.getData(), true); 
+		checkTreeNode(item0, 0, null);
+		
+		// method 2
+		tv.setExpandedState(item1.getData(), true); 
+		nextItem= checkTreeNode(item1, 0,  "MyClass::method3()");
+		checkTreeNode(item1, 1, null); item1= nextItem;
+		tv.setExpandedState(item1.getData(), true); 
+		checkTreeNode(item1, 0, null);
+	}
+
+	
+	// void cfunc();
+	// void cxcpp() {
+	//    cfunc();
+	// }
+	
+	// extern "C" void cxcpp();
+	// void cppfunc() {
+	//    cxcpp();
+	// }
+	public void testCPPCallsC() throws Exception {
+		StringBuffer[] content= getContentsForTest(2);
+		String cSource= content[0].toString();
+		String cppSource = content[1].toString();
+		IFile cFile= createFile(getProject(), "s.c", cSource);
+		IFile cppFile= createFile(getProject(), "s.cpp", cppSource);
+		CEditor editor= openEditor(cFile);
+		waitForIndexer(fIndex, cppFile, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		CCorePlugin.getIndexManager().joinIndexer(INDEXER_WAIT_TIME, NPM);
+		
+		editor.selectAndReveal(cSource.indexOf("cfunc"), 2);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+
+		checkTreeNode(tree, 0, "cfunc()");
+		TreeItem node= checkTreeNode(tree, 0, 0, "cxcpp()");
+		checkTreeNode(tree, 0, 1, null);
+		
+		expandTreeItem(node); 
+		checkTreeNode(node, 0, "cppfunc()");
+		checkTreeNode(node, 1, null);
+		
+
+		editor= openEditor(cppFile);
+		editor.selectAndReveal(cppSource.indexOf("cppfunc"), 2);
+		openCallHierarchy(editor, false);
+		tree = getCHTreeViewer().getTree();
+
+		checkTreeNode(tree, 0, "cppfunc()");
+		node= checkTreeNode(tree, 0, 0, "cxcpp()");
+		checkTreeNode(tree, 0, 1, null);
+		
+		expandTreeItem(node); 
+		checkTreeNode(node, 0, "cfunc()");
+		checkTreeNode(node, 1, null);
+	}
+
+	// void cfunc() {
+	//    cxcpp();
+	// }
+	
+	// void cppfunc() {}
+	// extern "C" {void cxcpp() {
+	//    cppfunc();
+	// }}
+	public void testCCallsCPP() throws Exception {
+		StringBuffer[] content= getContentsForTest(2);
+		String cSource= content[0].toString();
+		String cppSource = content[1].toString();
+		IFile cFile= createFile(getProject(), "s.c", cSource);
+		IFile cppFile= createFile(getProject(), "s.cpp", cppSource);
+		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		CEditor editor= openEditor(cFile);
+		waitForIndexer(fIndex, cppFile, CallHierarchyBaseTest.INDEXER_WAIT_TIME);
+		CCorePlugin.getIndexManager().joinIndexer(INDEXER_WAIT_TIME, NPM);
+		
+		editor.selectAndReveal(cSource.indexOf("cfunc"), 2);
+		openCallHierarchy(editor, false);
+		Tree tree = getCHTreeViewer().getTree();
+
+		checkTreeNode(tree, 0, "cfunc()");
+		TreeItem node= checkTreeNode(tree, 0, 0, "cxcpp()");
+		checkTreeNode(tree, 0, 1, null);
+		
+		expandTreeItem(node); 
+		checkTreeNode(node, 0, "cppfunc()");
+		checkTreeNode(node, 1, null);
+		
+
+		editor= openEditor(cppFile);
+		editor.selectAndReveal(cppSource.indexOf("cppfunc"), 2);
+		openCallHierarchy(editor, true);
+		tree = getCHTreeViewer().getTree();
+
+		checkTreeNode(tree, 0, "cppfunc()");
+		node= checkTreeNode(tree, 0, 0, "cxcpp()");
+		checkTreeNode(tree, 0, 1, null);
+		
+		expandTreeItem(node); 
+		checkTreeNode(node, 0, "cfunc()");
+		checkTreeNode(node, 1, null);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/InitializersInCallHierarchyTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/InitializersInCallHierarchyTest.java
new file mode 100644
index 0000000..368f49c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/callhierarchy/InitializersInCallHierarchyTest.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.callhierarchy;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.widgets.Tree;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+public class InitializersInCallHierarchyTest extends CallHierarchyBaseTest {
+
+	public InitializersInCallHierarchyTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return suite(InitializersInCallHierarchyTest.class);
+	}	
+	
+	// {intvar}
+	// enum Enum{a= 12};
+	// int b= a;
+	public void testCIntVarInitializer() throws Exception {
+		String content = readTaggedComment("intvar");
+		IFile file= createFile(getProject(), "intvar.c", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor = openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("a"), 1);
+		openCallHierarchy(editor);
+		Tree tree = getCHTreeViewer().getTree();
+		checkTreeNode(tree, 0, "a");
+		checkTreeNode(tree, 0, 0, "{init b}()");
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/chelp/CHelpProviderTester.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/chelp/CHelpProviderTester.java
new file mode 100644
index 0000000..d27cef8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/chelp/CHelpProviderTester.java
@@ -0,0 +1,333 @@
+/**********************************************************************
+ * Copyright (c) 2004, 2005 Intel Corporation and others.
+ * 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
+ * 
+ * Contributors: 
+ *     Intel Corporation - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.cdt.ui.tests.chelp;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import junit.framework.Assert;
+
+import org.eclipse.cdt.internal.ui.CHelpProviderManager;
+import org.eclipse.cdt.internal.ui.text.CHelpBookDescriptor;
+import org.eclipse.cdt.internal.ui.text.CHelpSettings;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.ICHelpBook;
+import org.eclipse.cdt.ui.ICHelpResourceDescriptor;
+import org.eclipse.cdt.ui.IFunctionSummary;
+import org.eclipse.cdt.ui.IRequiredInclude;
+import org.eclipse.cdt.ui.text.ICHelpInvocationContext;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.IHelpResource;
+
+/**
+ * 
+ */
+public class CHelpProviderTester{
+	private static final String KEY_PROVIDER_ID = "providerID";
+	private static final String KEY_REQUESTED_NAME = "requestedName";
+	private static final String KEY_BOOK_TITLE = "bookTitle";
+	private static final String KEY_BOOK_TYPE = "bookType";
+	
+	private Properties fProperties;
+	private static CHelpProviderTester fDefaultInstance = null;
+	
+	private CHelpProviderTester(){
+	}
+	
+	public static CHelpProviderTester getDefault(){
+		if(fDefaultInstance == null)
+			fDefaultInstance = new CHelpProviderTester();
+		return fDefaultInstance;
+	}
+	
+	private class CHelpBook implements ICHelpBook{
+		private int fCHelpType;
+		private String fTitle;
+		
+		public CHelpBook(String providerID, int type){
+			fCHelpType = type;
+			fTitle = generateBookTitle(providerID,type);
+		}
+			
+		public String getTitle(){
+			return fTitle;
+		}
+			
+		public int getCHelpType(){
+			return fCHelpType;
+		}
+	}
+	
+	private class CHelpResourceDescriptor implements ICHelpResourceDescriptor{
+		ICHelpBook fBook;
+		String fString;
+		String fLabel;
+		String fHref;
+		IHelpResource fResources[];
+		
+		public CHelpResourceDescriptor(ICHelpBook helpBook, String string, String providerID){
+			fBook = helpBook;
+			fString = string;
+			fHref = string + helpBook.getTitle() + ".html";
+			fLabel = generateHelpString(helpBook, string, providerID);
+			fResources = new IHelpResource[1];
+			fResources[0] = new IHelpResource(){
+				public String getHref(){
+					return fHref;
+				}
+				
+				public String getLabel(){
+					return fLabel;
+				}				
+			};
+		}
+	
+		public ICHelpBook getCHelpBook(){
+			return fBook;
+		}
+		
+		public IHelpResource[] getHelpResources(){
+			return fResources;
+		}
+	}
+
+	private class FunctionSummary implements IFunctionSummary {
+
+        private String fName = "Name";
+        private String fReturnType = "ReturnType";
+        private String fPrototype = "Prototype";
+        private String fSummary = "Summary";
+        private String fSynopsis = "Synopsis";
+        private IRequiredInclude[] incs = new IRequiredInclude[] { new RequiredInclude("dummy.h")};
+        private class RequiredInclude implements IRequiredInclude {
+        	private String include;
+        	
+        	public RequiredInclude (String file) {
+        		include = file;
+        	}
+        	
+        	public String getIncludeName() {
+        		return include;
+        	}
+        	
+        	public boolean isStandard() {
+        		return true;
+        	}
+        }
+        
+        public FunctionSummary(ICHelpBook helpBook, String string, String providerID){
+        	fName = string;
+        	fSummary = generateHelpString(helpBook, string, providerID);
+        }
+
+        public class FunctionPrototypeSummary implements IFunctionPrototypeSummary {
+            public String getName()             { return fName; }
+            public String getReturnType()       { return fReturnType; }
+            public String getArguments()        { return fPrototype; }
+            public String getPrototypeString(boolean namefirst) {
+                if (true == namefirst) {
+                    return fName + " (" + fPrototype + ") " + fReturnType;
+                }
+                else {
+                    return fReturnType + " " + fName + " (" + fPrototype + ")";
+                }
+            }
+        }
+
+        public String getName()                         { return fName; }
+        public String getNamespace()                    { return "dummy namespace"; }
+        public String getDescription()                  { return fSummary; }
+        public IFunctionPrototypeSummary getPrototype() { return new FunctionPrototypeSummary(); }
+        
+        public IRequiredInclude[] getIncludes() {
+        	return incs; 
+        }
+        
+    }
+
+	private static String generateHelpString(ICHelpBook helpBook, String name, String providerID){
+		Properties props = new Properties();
+		props.setProperty(KEY_PROVIDER_ID, providerID);
+		props.setProperty(KEY_REQUESTED_NAME, name);
+		props.setProperty(KEY_BOOK_TITLE, helpBook.getTitle());
+		ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+		try{
+			props.store(outputStream,null);
+		}
+		catch(Exception e){
+		}
+		return outputStream.toString();
+	}
+	
+	private static String generateBookTitle(String providerID, int bookType){
+		Properties props = new Properties();
+		props.setProperty(KEY_PROVIDER_ID, providerID);
+		props.setProperty(KEY_BOOK_TYPE, String.valueOf(bookType));
+		ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+		try{
+			props.store(outputStream,null);
+		}
+		catch(Exception e){
+		}
+		return outputStream.toString();
+	}
+
+	private CHelpProviderTester(String string) throws IOException{
+		fProperties = new Properties();
+		ByteArrayInputStream stream = new ByteArrayInputStream(string.getBytes());
+		
+		try{
+			fProperties.load(stream);
+		}catch(IOException e){
+			//TODO: handle
+			throw e;
+		}
+	}
+	
+	private String getValueByKey(String key){
+		String val = fProperties.getProperty(key);
+		if(val == null)
+			val = new String();
+		return val;
+	}
+	
+	private String getHelpProviderID(){
+		return getValueByKey(KEY_PROVIDER_ID);
+	}
+
+	private String getRequestedName(){
+		return getValueByKey(KEY_REQUESTED_NAME);
+	}
+
+	private String getBookTitle(){
+		return getValueByKey(KEY_BOOK_TITLE);
+	}
+	
+	public boolean onlyTestInfoProvidersAvailable(){
+		IConfigurationElement configElements[] = Platform.getExtensionRegistry().getConfigurationElementsFor(CUIPlugin.PLUGIN_ID, CHelpSettings.CONTRIBUTION_EXTENSION);
+		int numExts = 0;
+		for(int i = 0; i < configElements.length; i++){
+			String id = configElements[i].getAttribute("id");
+			if(!id.startsWith(CHelpTest.TEST_EXTENSION_ID_PREFIX))
+				return false;
+		}
+		return true;
+	}
+
+	public ICHelpResourceDescriptor[] generateHelpResources(ICHelpBook[] helpBooks, String name, String providerID){
+		ICHelpResourceDescriptor des[] = new ICHelpResourceDescriptor[helpBooks.length];
+		for(int i = 0; i < helpBooks.length; i++){
+			des[i] = new CHelpResourceDescriptor(helpBooks[i],name,providerID);
+		}
+		return des;
+	}
+	
+	public IFunctionSummary generateFunctionInfo(ICHelpBook[] helpBooks, String name, String providerID){
+		if(helpBooks.length == 0)
+			return null;
+		return new FunctionSummary(helpBooks[0],name,providerID);
+	}
+	
+	public IFunctionSummary[] generateMatchingFunctions(ICHelpBook[] helpBooks, String prefix, String providerID){
+		IFunctionSummary sum[] = new IFunctionSummary[helpBooks.length];
+		for(int i = 0; i < helpBooks.length; i++){
+			sum[i] = new FunctionSummary(helpBooks[i],prefix,providerID);
+		}
+		return sum;
+	}
+	
+	public ICHelpBook[] generateCHelpBooks(final String providerID){
+		ICHelpBook books[] = new ICHelpBook[3];
+		books[0] = new CHelpBook(providerID,ICHelpBook.HELP_TYPE_C);
+		books[1] = new CHelpBook(providerID,ICHelpBook.HELP_TYPE_CPP);
+		books[2] = new CHelpBook(providerID,ICHelpBook.HELP_TYPE_ASM);
+		return books;
+	}
+	
+	private void checkResponse(CHelpProviderTester data[], ICHelpInvocationContext context, String name, boolean allBooksResponded){
+		CHelpBookDescriptor bookDes[] = CHelpProviderManager.getDefault().getCHelpBookDescriptors(context);
+		for(int i = 0; i < data.length; i++){
+			CHelpProviderTester tester = data[i];
+			Assert.assertTrue("the name passed to CHelpProvider (" + tester.getRequestedName() + ") differs prom tha name passed to manager (" + name + ")",name.equals(tester.getRequestedName()));
+			String bookTitle = tester.getBookTitle();
+			int j = 0;
+			for(; j < bookDes.length; j++){
+				if(bookTitle.equals(bookDes[j].getCHelpBook().getTitle())){
+					Assert.assertTrue("provider was requested for help in disabled book",bookDes[j].isEnabled());
+					break;
+				}
+			}
+			Assert.assertFalse("provider was requested for help in non-existent book",j == bookDes.length);
+		}
+		
+		if(allBooksResponded){
+			for(int i = 0; i < bookDes.length; i++){
+				if(bookDes[i].isEnabled()){
+					String bookTitle = bookDes[i].getCHelpBook().getTitle();
+					int j = 0;
+					for(; j < data.length; j++){
+						if(bookTitle.equals(data[j].getBookTitle()))
+							break;
+					}
+					Assert.assertFalse("provider was not requested for help in enabled book",j == bookDes.length);
+				}
+			}
+		}
+	}
+
+	public void checkHelpResources(ICHelpResourceDescriptor helpDescriptors[], ICHelpInvocationContext context, String name){
+		if(helpDescriptors == null || helpDescriptors.length == 0)
+			return;
+		List dataList = new ArrayList(helpDescriptors.length);
+		for(int i = 0; i < helpDescriptors.length; i++){
+			try{
+				dataList.add(new CHelpProviderTester(helpDescriptors[i].getHelpResources()[0].getLabel()));
+			}catch(IOException e){
+				Assert.fail("checkHelpResources failed to instantiate CHelpProviderTester, IOException occured: " + e.getMessage());
+			}
+		}
+		if(dataList.size() > 0)
+			checkResponse((CHelpProviderTester[])dataList.toArray(new CHelpProviderTester[dataList.size()]), context, name, true);
+	}
+
+	public void checkMatchingFunctions(IFunctionSummary summaries[], ICHelpInvocationContext context, String name){
+		if(summaries == null || summaries.length == 0)
+			return;
+		List dataList = new ArrayList(summaries.length);
+		for(int i = 0; i < summaries.length; i++){
+			try{
+				dataList.add(new CHelpProviderTester(summaries[i].getDescription()));
+			}catch(IOException e){
+				Assert.fail("checkMatchingFunctions failed to instantiate CHelpProviderTester, IOException occured: " + e.getMessage());
+			}
+		}
+		if(dataList.size() > 0)
+			checkResponse((CHelpProviderTester[])dataList.toArray(new CHelpProviderTester[dataList.size()]), context, name, true);
+	}
+	
+	public void checkFunctionInfo(IFunctionSummary summary, ICHelpInvocationContext context, String name){
+		if(summary == null)
+			return;
+		CHelpProviderTester data[] = new CHelpProviderTester[1];
+		try{
+			data[0] = new CHelpProviderTester(summary.getDescription());
+			checkResponse(data, context, name, false);
+		}catch(IOException e){
+			Assert.fail("checkFunctionInfo failed to instantiate CHelpProviderTester, IOException occured: " + e.getMessage());
+		}
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/chelp/CHelpTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/chelp/CHelpTest.java
new file mode 100644
index 0000000..6adbbac
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/chelp/CHelpTest.java
@@ -0,0 +1,244 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Intel Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     Intel Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.chelp;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.ICHelpBook;
+import org.eclipse.cdt.ui.ICHelpResourceDescriptor;
+import org.eclipse.cdt.ui.IFunctionSummary;
+import org.eclipse.cdt.ui.text.ICHelpInvocationContext;
+
+import org.eclipse.cdt.internal.ui.CHelpProviderManager;
+import org.eclipse.cdt.internal.ui.text.CHelpBookDescriptor;
+import org.eclipse.cdt.internal.ui.text.CHelpSettings;
+
+/**
+ * 
+ * CHelpProvider tests
+ */
+public class CHelpTest extends TestCase {
+	public final static String TEST_EXTENSION_ID_PREFIX = "org.eclipse.cdt.ui.tests.chelp.extension"; //$NON-NLS-1$
+	private final static String C_PROJECT_NAME = "cHelpTestProject"; //$NON-NLS-1$
+	private final static String CC_PROJECT_NAME = "ccHelpTestProject"; //$NON-NLS-1$
+	private final static String BIN_DIR_NAME = "bin"; //$NON-NLS-1$
+	
+	private ICProject fCProject = null;
+	private ICProject fCCProject = null;
+	private ICHelpInvocationContext fDefaultCCHelpContext = null;
+	private ICHelpInvocationContext fDefaultCHelpContext = null;
+	
+	private ICHelpInvocationContext getDefaultCCHelpContext() throws CoreException{
+		if(fDefaultCCHelpContext == null){
+			final IProject project = getCCProject().getProject();
+			fDefaultCCHelpContext = new ICHelpInvocationContext(){
+				public IProject getProject(){
+					return project;
+				}
+				public ITranslationUnit getTranslationUnit(){
+					return null;
+				}
+			};
+		}
+		return fDefaultCCHelpContext;
+	}
+
+	private ICHelpInvocationContext getDefaultCHelpContext() throws CoreException{
+		if(fDefaultCHelpContext == null){
+			final IProject project = getCProject().getProject();
+			fDefaultCHelpContext = new ICHelpInvocationContext(){
+				public IProject getProject(){
+					return project;
+				}
+				public ITranslationUnit getTranslationUnit(){
+					return null;
+				}
+			};
+		}
+		return fDefaultCHelpContext;
+	}
+
+	private ICProject getCProject() throws CoreException{
+		if(fCProject == null)
+			fCProject = CProjectHelper.createCProject(C_PROJECT_NAME, BIN_DIR_NAME, IPDOMManager.ID_NO_INDEXER);
+		return fCProject;
+	}
+	
+	private ICProject getCCProject() throws CoreException{
+		if(fCCProject == null)
+			fCCProject = CProjectHelper.createCCProject(CC_PROJECT_NAME, BIN_DIR_NAME, IPDOMManager.ID_NO_INDEXER);
+		return fCCProject;
+	}
+
+	public static Test suite() {
+		return new TestSuite(CHelpTest.class);
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		CHelpTestInfoProvider.fgEnabled= true;
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		CHelpTestInfoProvider.fgEnabled= false;
+		super.tearDown();
+	}
+
+	public void testCHelpProviderManagerGeneral(){
+		CHelpProviderManager mngr = CHelpProviderManager.getDefault();
+		if(mngr == null)
+			fail("manager not created"); //$NON-NLS-1$
+		if(mngr != CHelpProviderManager.getDefault())
+			fail("getDefault returned an other instance of manager"); //$NON-NLS-1$
+		
+		try{
+			ICHelpInvocationContext cContext = getDefaultCHelpContext();
+			ICHelpInvocationContext ccContext = getDefaultCCHelpContext();
+
+			String requestedName = "dummyName"; //$NON-NLS-1$
+			CHelpProviderManager.getDefault().getMatchingFunctions(cContext,requestedName);
+			CHelpProviderManager.getDefault().getMatchingFunctions(ccContext,requestedName);
+
+			CHelpProviderManager.getDefault().getFunctionInfo(cContext,requestedName);
+			CHelpProviderManager.getDefault().getFunctionInfo(ccContext,requestedName);
+
+			CHelpProviderManager.getDefault().getHelpResources(cContext,requestedName);
+			CHelpProviderManager.getDefault().getHelpResources(ccContext,requestedName);
+
+			IConfigurationElement configElements[] = Platform.getExtensionRegistry().getConfigurationElementsFor(CUIPlugin.PLUGIN_ID, CHelpSettings.CONTRIBUTION_EXTENSION);
+			int numExts = 0;
+			for(int i = 0; i < configElements.length; i++){
+				String id = configElements[i].getAttribute("id"); //$NON-NLS-1$
+				if(id.startsWith(TEST_EXTENSION_ID_PREFIX))
+					numExts++;
+			}
+			
+			assertTrue("number of provider instances created (" + CHelpTestInfoProvider.getNumProviders() + ") is not equal to number of extensions (" + numExts + ")",numExts == CHelpTestInfoProvider.getNumProviders()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		}catch(CoreException e){
+			fail("CoreException occured: " + e.getMessage()); //$NON-NLS-1$
+		}
+	}
+	
+	public void testGetMatchingFunctions(){
+		if(!CHelpProviderTester.getDefault().onlyTestInfoProvidersAvailable()){
+			//this test assumes that only CHelpTestInfoProviders are available
+			return;
+		}
+		try{
+			ICHelpInvocationContext cContext = getDefaultCHelpContext();
+			ICHelpInvocationContext ccContext = getDefaultCCHelpContext();
+			
+			String requestedName = "dummyName"; //$NON-NLS-1$
+			IFunctionSummary summaries[] = CHelpProviderManager.getDefault().getMatchingFunctions(cContext,requestedName);
+			CHelpProviderTester.getDefault().checkMatchingFunctions(summaries, cContext, requestedName);
+
+			summaries = CHelpProviderManager.getDefault().getMatchingFunctions(ccContext,requestedName);
+			CHelpProviderTester.getDefault().checkMatchingFunctions(summaries, ccContext, requestedName);
+		}
+		catch(CoreException e){
+			fail("CoreException occured: " + e.getMessage()); //$NON-NLS-1$
+		}
+	}
+	
+	public void testGetFunctionInfo(){
+		if(!CHelpProviderTester.getDefault().onlyTestInfoProvidersAvailable()){
+			//this test assumes that only CHelpTestInfoProviders are available
+			return;
+		}
+		try{
+			ICHelpInvocationContext cContext = getDefaultCHelpContext();
+			ICHelpInvocationContext ccContext = getDefaultCCHelpContext();
+			
+			String requestedName = "dummyName"; //$NON-NLS-1$
+			IFunctionSummary summary = CHelpProviderManager.getDefault().getFunctionInfo(cContext,requestedName);
+			CHelpProviderTester.getDefault().checkFunctionInfo(summary, cContext, requestedName);
+
+			summary = CHelpProviderManager.getDefault().getFunctionInfo(ccContext,requestedName);
+			CHelpProviderTester.getDefault().checkFunctionInfo(summary, ccContext, requestedName);
+		}
+		catch(CoreException e){
+			fail("CoreException occured: " + e.getMessage()); //$NON-NLS-1$
+		}
+	}
+
+	public void testGetHelpResources(){
+		if(!CHelpProviderTester.getDefault().onlyTestInfoProvidersAvailable()){
+			//this test assumes that only CHelpTestInfoProviders are available
+			return;
+		}
+		try{
+			ICHelpInvocationContext cContext = getDefaultCHelpContext();
+			ICHelpInvocationContext ccContext = getDefaultCCHelpContext();
+			
+			String requestedName = "dummyName"; //$NON-NLS-1$
+			ICHelpResourceDescriptor resourceDes[] = CHelpProviderManager.getDefault().getHelpResources(cContext,requestedName);
+			CHelpProviderTester.getDefault().checkHelpResources(resourceDes, cContext, requestedName);
+
+			resourceDes = CHelpProviderManager.getDefault().getHelpResources(ccContext,requestedName);
+			CHelpProviderTester.getDefault().checkHelpResources(resourceDes, ccContext, requestedName);
+		}
+		catch(CoreException e){
+			fail("CoreException occured: " + e.getMessage()); //$NON-NLS-1$
+		}
+	}
+	
+	public void testCHelpBookDescriptors(){
+		CHelpProviderManager mngr = CHelpProviderManager.getDefault();
+
+		try{
+			CHelpBookDescriptor ccBookDescriptors[] = mngr.getCHelpBookDescriptors(getDefaultCCHelpContext());
+			CHelpBookDescriptor cBookDescriptors[] = mngr.getCHelpBookDescriptors(getDefaultCHelpContext());
+			
+			assertTrue("CC book descriptors length (" + ccBookDescriptors.length + ") is less than C book descriptors length (" + cBookDescriptors.length + ")", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+					ccBookDescriptors.length >= cBookDescriptors.length);
+			
+			for(int i = 0; i < cBookDescriptors.length; i++){
+				CHelpBookDescriptor curBookDes = cBookDescriptors[i];
+				assertTrue("book \"" + curBookDes.getCHelpBook().getTitle() + "\" of type HELP_TYPE_CPP in book descriptors for C project \"" + getDefaultCHelpContext().getProject().getName() + "\"", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+						curBookDes.getCHelpBook().getCHelpType() != ICHelpBook.HELP_TYPE_CPP);
+				int j = 0;
+				for(; j < ccBookDescriptors.length; j++){
+					if(ccBookDescriptors[j].getCHelpBook().getTitle().equals(curBookDes.getCHelpBook().getTitle()))
+						break;
+				}
+				assertTrue("book \"" + curBookDes.getCHelpBook().getTitle() + "\" was not found in CC books",j < ccBookDescriptors.length); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+			
+			for(int i = 0; i < ccBookDescriptors.length; i++){
+				CHelpBookDescriptor curBookDes = ccBookDescriptors[i];
+				int j = 0;
+				for(; j < cBookDescriptors.length; j++){
+					if(cBookDescriptors[j].getCHelpBook().getTitle().equals(curBookDes.getCHelpBook().getTitle()))
+						break;
+				}
+				assertTrue("book \"" + curBookDes.getCHelpBook().getTitle() + "\" of type HELP_TYPE_C was not found in C books", //$NON-NLS-1$ //$NON-NLS-2$
+						j < cBookDescriptors.length || curBookDes.getCHelpBook().getCHelpType() == ICHelpBook.HELP_TYPE_CPP);
+			}
+		}
+		catch(CoreException e){
+			fail("CoreException occured: " + e.getMessage()); //$NON-NLS-1$
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/chelp/CHelpTestInfoProvider.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/chelp/CHelpTestInfoProvider.java
new file mode 100644
index 0000000..0b9ca24
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/chelp/CHelpTestInfoProvider.java
@@ -0,0 +1,105 @@
+/**********************************************************************
+ * Copyright (c) 2004, 2008 Intel Corporation and others.
+ * 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
+ * 
+ * Contributors:
+ *     Intel Corporation - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.cdt.ui.tests.chelp;
+
+import junit.framework.Assert;
+
+import org.eclipse.cdt.ui.ICHelpBook;
+import org.eclipse.cdt.ui.ICHelpProvider;
+import org.eclipse.cdt.ui.ICHelpResourceDescriptor;
+import org.eclipse.cdt.ui.IFunctionSummary;
+import org.eclipse.cdt.ui.text.ICHelpInvocationContext;
+
+/**
+ *
+ * this class implements ICHelpProvider and provides test information
+ */
+public class CHelpTestInfoProvider implements ICHelpProvider {
+	private static int fNumProviders = 0;
+	private static final String PROVIDER_ID_PREFIX = "TestInfoProvider_";
+	
+	final private String fProviderID;
+	private boolean fIsInitialized = false;
+	
+	private ICHelpBook fCHelpBooks[];
+	
+	/**
+	 * Flag indicating whether this help provider should provide help info.
+	 * Should be set to <code>true</code> during tests only.
+	 */
+	static boolean fgEnabled= false;
+
+	public CHelpTestInfoProvider(){
+		fProviderID = PROVIDER_ID_PREFIX + fNumProviders++;
+		fCHelpBooks = CHelpProviderTester.getDefault().generateCHelpBooks(fProviderID);
+	}
+	
+	public static int getNumProviders(){
+		return fNumProviders;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.ui.ICHelpProvider#initialize()
+	 */
+	public void initialize() {
+		Assert.assertFalse("initialize is called several times",fIsInitialized);
+		fIsInitialized = true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.ui.ICHelpProvider#getCHelpBooks()
+	 */
+	public ICHelpBook[] getCHelpBooks() {
+		if (!fgEnabled) {
+			return new ICHelpBook[0];
+		}
+		Assert.assertTrue("getCHelpBooks is called before completion contributor gets initialized",fIsInitialized);
+		return fCHelpBooks;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.ui.ICHelpProvider#getFunctionInfo(org.eclipse.cdt.ui.text.ICHelpInvocationContext, org.eclipse.cdt.ui.ICHelpBook[], java.lang.String)
+	 */
+	public IFunctionSummary getFunctionInfo(ICHelpInvocationContext context,
+			ICHelpBook[] helpBooks, String name) {
+		if (!fgEnabled) {
+			return null;
+		}
+		Assert.assertTrue("getFunctionInfo is called before completion contributor gets initialized",fIsInitialized);
+		return CHelpProviderTester.getDefault().generateFunctionInfo(helpBooks,name,fProviderID);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.ui.ICHelpProvider#getMatchingFunctions(org.eclipse.cdt.ui.text.ICHelpInvocationContext, org.eclipse.cdt.ui.ICHelpBook[], java.lang.String)
+	 */
+	public IFunctionSummary[] getMatchingFunctions(
+			ICHelpInvocationContext context, ICHelpBook[] helpBooks,
+			String prefix) {
+		if (!fgEnabled) {
+			return new IFunctionSummary[0];
+		}
+		Assert.assertTrue("getMatchingFunctions is called before completion contributor gets initialized",fIsInitialized);
+        return null; // TODO returning null until someone puts in a preference to control it.
+        //return CHelpProviderTester.getDefault().generateMatchingFunctions(helpBooks,prefix,fProviderID);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.ui.ICHelpProvider#getHelpResources(org.eclipse.cdt.ui.text.ICHelpInvocationContext, org.eclipse.cdt.ui.ICHelpBook[], java.lang.String)
+	 */
+	public ICHelpResourceDescriptor[] getHelpResources(
+			ICHelpInvocationContext context, ICHelpBook[] helpBooks, String name) {
+		if (!fgEnabled) {
+			return new ICHelpResourceDescriptor[0];
+		}
+		Assert.assertTrue("getHelpResources is called before completion contributor gets initialized",fIsInitialized);
+		return CHelpProviderTester.getDefault().generateHelpResources(helpBooks,name,fProviderID);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/includebrowser/BasicIncludeBrowserTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/includebrowser/BasicIncludeBrowserTest.java
new file mode 100644
index 0000000..dfe4dc7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/includebrowser/BasicIncludeBrowserTest.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.ui.tests.includebrowser;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.swt.widgets.Tree;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.TestScannerProvider;
+
+
+public class BasicIncludeBrowserTest extends IncludeBrowserBaseTest {
+	
+	public BasicIncludeBrowserTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return suite(BasicIncludeBrowserTest.class);
+	}
+
+
+	// // source
+	// #include "user.h"
+	// #include <system.h>
+	
+	public void testSimpleInclusion() throws Exception {
+		TestScannerProvider.sIncludes= new String[]{getProject().getProject().getLocation().toOSString()};
+
+		StringBuffer[] contents= getContentsForTest(1);
+		IProject project= getProject().getProject();
+		IFile user= createFile(project, "user.h", "");
+		IFile system= createFile(project, "system.h", "");
+		IFile source= createFile(project, "source.cpp", contents[0].toString());
+		waitForIndexer(fIndex, source, INDEXER_WAIT_TIME);
+
+		openIncludeBrowser(source);
+		Tree tree = getIBTree();
+		checkTreeNode(tree, 0, "source.cpp");
+		checkTreeNode(tree, 0, 0, "user.h");
+		checkTreeNode(tree, 0, 1, "system.h");
+		
+		// the tree has to be reversed
+		openIncludeBrowser(user, true);
+		checkTreeNode(tree, 0, "user.h");
+		checkTreeNode(tree, 0, 0, "source.cpp");
+
+		openIncludeBrowser(system);
+		checkTreeNode(tree, 0, "system.h");
+		checkTreeNode(tree, 0, 0, "source.cpp");
+	}
+	
+	// // source
+	// #include "user.h"
+	// #include <system.h>
+	
+	public void testInclusionAccrossProjects() throws Exception {
+		ICProject op= CProjectHelper.createCCProject("__ibTest_other__", "bin", IPDOMManager.ID_FAST_INDEXER);
+		try {
+			fIndex= CCorePlugin.getIndexManager().getIndex(new ICProject[] {getProject(), op});
+			
+			TestScannerProvider.sIncludes= new String[]{op.getProject().getLocation().toOSString()};
+
+			StringBuffer[] contents= getContentsForTest(1);
+			IFile user= createFile(op.getProject(), "user.h", "");
+			IFile system= createFile(op.getProject(), "system.h", "");
+			IFile source= createFile(getProject().getProject(), "source.cpp", contents[0].toString());
+			CCorePlugin.getIndexManager().reindex(op);
+			CCorePlugin.getIndexManager().joinIndexer(INDEXER_WAIT_TIME, NPM);
+
+			openIncludeBrowser(source);
+			Tree tree = getIBTree();
+			checkTreeNode(tree, 0, "source.cpp");
+			checkTreeNode(tree, 0, 0, "user.h");
+			checkTreeNode(tree, 0, 1, "system.h");
+			
+			// the tree has to be reversed
+			openIncludeBrowser(user, true);
+			checkTreeNode(tree, 0, "user.h");
+			checkTreeNode(tree, 0, 0, "source.cpp");
+
+			openIncludeBrowser(system);
+			checkTreeNode(tree, 0, "system.h");
+			checkTreeNode(tree, 0, 0, "source.cpp");
+
+		}
+		finally {
+			CProjectHelper.delete(op);
+		}
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/includebrowser/IncludeBrowserBaseTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/includebrowser/IncludeBrowserBaseTest.java
new file mode 100644
index 0000000..296439e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/includebrowser/IncludeBrowserBaseTest.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.ui.tests.includebrowser;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.model.CoreModelUtil;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+
+import org.eclipse.cdt.internal.ui.includebrowser.IBViewPart;
+
+public class IncludeBrowserBaseTest extends BaseUITestCase {
+	protected static final int INDEXER_WAIT_TIME = 8000;
+	protected static IProgressMonitor NPM= new NullProgressMonitor();
+
+	private ICProject fCProject;
+	protected IIndex fIndex;
+
+
+	public IncludeBrowserBaseTest(String name) {
+		super(name);
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+		fCProject= CProjectHelper.createCCProject("__ibTest__", "bin", IPDOMManager.ID_FAST_INDEXER);
+		
+		// clear the index
+		CCorePlugin.getIndexManager().reindex(fCProject);
+		fIndex= CCorePlugin.getIndexManager().getIndex(fCProject);
+	}
+	
+	protected void tearDown() throws Exception {
+		if (fCProject != null) {
+			CProjectHelper.delete(fCProject);
+		}
+		super.tearDown();
+	}
+	
+	protected ICProject getProject() {
+		return fCProject;
+	}
+	
+	protected IBViewPart openIncludeBrowser(IFile file) throws PartInitException {
+		IBViewPart result = doOpenIncludeBrowser(file);
+		runEventQueue(200);
+		return result;
+	}
+
+	protected IBViewPart openIncludeBrowser(IFile file, boolean includedBy) throws PartInitException {
+		IBViewPart result = doOpenIncludeBrowser(file);
+		result.onSetDirection(includedBy);
+		runEventQueue(200);
+		return result;
+	}
+
+	private IBViewPart doOpenIncludeBrowser(IFile file) throws PartInitException {
+		ITranslationUnit tu= CoreModelUtil.findTranslationUnit(file);
+		if (tu == null) {
+			fail(file.getFullPath().toString() + " is no translation unit!");
+		}
+        IWorkbenchPage page= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+        IBViewPart result= (IBViewPart)page.showView(CUIPlugin.ID_INCLUDE_BROWSER);
+        result.setInput(tu);
+		return result;
+	}
+
+	protected Tree getIBTree() {
+		IWorkbenchPage page= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		runEventQueue(0);
+		IBViewPart ib= (IBViewPart)page.findView(CUIPlugin.ID_INCLUDE_BROWSER);
+		assertNotNull(ib);
+		Tree tree= ib.getTreeViewer().getTree();
+		return tree;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/includebrowser/IncludeBrowserTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/includebrowser/IncludeBrowserTestSuite.java
new file mode 100644
index 0000000..83ff42f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/includebrowser/IncludeBrowserTestSuite.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.includebrowser;
+
+import junit.framework.TestSuite;
+
+public class IncludeBrowserTestSuite extends TestSuite {
+
+    public static TestSuite suite() {
+        return new IncludeBrowserTestSuite();
+    }
+    
+    public IncludeBrowserTestSuite() {
+        super(IncludeBrowserTestSuite.class.getName());
+        addTest(BasicIncludeBrowserTest.suite());
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/outline/BasicOutlineTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/outline/BasicOutlineTest.java
new file mode 100644
index 0000000..c9c2db9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/outline/BasicOutlineTest.java
@@ -0,0 +1,280 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.outline;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.PreferenceConstants;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+import org.eclipse.cdt.ui.tests.text.EditorTestHelper;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+/**
+ * Basic outline view tests.
+ */
+public class BasicOutlineTest extends BaseUITestCase {
+
+	private static final int INDEXER_WAIT_TIME = 10000;
+
+	public static TestSuite suite() {
+		return suite(BasicOutlineTest.class);
+	}
+
+	private ICProject fCProject;
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		restoreAllParts();
+		fCProject = CProjectHelper.createCCProject(getName()+System.currentTimeMillis(), "bin", IPDOMManager.ID_FAST_INDEXER); 
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		closeAllEditors();
+		PreferenceConstants.getPreferenceStore().setToDefault(PreferenceConstants.OUTLINE_GROUP_MEMBERS);
+		PreferenceConstants.getPreferenceStore().setToDefault(PreferenceConstants.OUTLINE_GROUP_NAMESPACES);
+		if(fCProject != null) {
+			CProjectHelper.delete(fCProject);
+		}
+		super.tearDown();
+	}
+
+	protected CEditor openEditor(IFile file) throws PartInitException {
+		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		CEditor editor= (CEditor) IDE.openEditor(page, file);
+		EditorTestHelper.joinReconciler(EditorTestHelper.getSourceViewer(editor), 100, 1000, 10);
+		runEventQueue(500);
+		return editor;
+	}
+
+	protected ICProject getProject() {
+		return fCProject;
+	}
+
+	private void waitForIndexer(IProject project, IFile source) throws Exception, CoreException {
+		waitForIndexer(CCorePlugin.getIndexManager().getIndex(fCProject), source, INDEXER_WAIT_TIME);
+	}
+
+	private void checkTreeItems(TreeItem[] items, String... labels) {
+		assertEquals(items.length, labels.length);
+		int i=0;
+		for (TreeItem treeItem : items) {
+			assertEquals(labels[i++], treeItem.getText());
+		}
+	}
+
+	//#include "user.h"
+	//#include <system.h>
+	//#define MACRO
+	//int main(int argc, char** argv) {}
+	public void testSimpleOutlineContent() throws Exception {
+		StringBuffer[] contents= getContentsForTest(1);
+		IProject project= getProject().getProject();
+		IFile source= createFile(project, "source.cpp", contents[0].toString());
+		waitForIndexer(project, source);
+		
+		final IViewPart outline= activateView(IPageLayout.ID_OUTLINE);
+		openEditor(source);
+		
+		Tree tree= checkTreeNode(outline, 0, "user.h").getParent();
+		checkTreeNode(tree, 1, "system.h");
+		checkTreeNode(tree, 2, "MACRO");
+		checkTreeNode(tree, 3, "main(int, char**) : int");
+	}
+
+	//class Foo {
+	//	static int field;
+	//	void bar();
+	//	void foo();
+	//};
+	
+	//#include "header.h"
+	//void Foo::bar() {}
+	//int Foo::field = 5;
+	//void Foo::foo() {}
+	public void testGroupedMembers() throws Exception {
+		StringBuffer[] contents= getContentsForTest(2);
+		IProject project= getProject().getProject();
+		IFile header= createFile(project, "header.h", contents[0].toString());
+		IFile source= createFile(project, "source.cpp", contents[1].toString());
+		waitForIndexer(project, source);
+
+		final IViewPart outline= activateView(IPageLayout.ID_OUTLINE);
+		openEditor(source);
+		
+		Tree tree= checkTreeNode(outline, 0, "header.h").getParent();
+		checkTreeNode(tree, 1, "Foo::bar() : void");
+		checkTreeNode(tree, 2, "Foo::field : int");
+		checkTreeNode(tree, 3, "Foo::foo() : void");
+		
+		PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.OUTLINE_GROUP_MEMBERS, true);
+		runEventQueue(500);
+		
+		tree= checkTreeNode(outline, 0, "header.h").getParent();
+		expandTreeItem(checkTreeNode(outline, 1, "Foo"));
+		checkTreeNode(tree, 1, 0, "bar() : void");
+		checkTreeNode(tree, 1, 1, "field : int");
+		checkTreeNode(tree, 1, 2, "foo() : void");
+	}
+
+	//namespace ns {
+	//class Foo {
+	//	static int field;
+	//	void bar();
+	//	void foo();
+	//};
+	//};
+
+	//#include "header.h"
+	//namespace ns {
+	//void Foo::bar() {}
+	//}
+	//namespace ns {
+	//int Foo::field = 5;
+	//void Foo::foo() {}
+	//}
+	public void testGroupedMembersInNamespace() throws Exception {
+		StringBuffer[] contents= getContentsForTest(2);
+		IProject project= getProject().getProject();
+		IFile header= createFile(project, "header.h", contents[0].toString());
+		IFile source= createFile(project, "source.cpp", contents[1].toString());
+		waitForIndexer(project, source);
+
+		final IViewPart outline= activateView(IPageLayout.ID_OUTLINE);
+		openEditor(source);
+		
+		TreeItem item= checkTreeNode(outline, 0, "header.h");
+		Tree tree= item.getParent();
+		expandTreeItem(checkTreeNode(tree, 1, "ns"));
+		checkTreeNode(tree, 1, 0, "Foo::bar() : void");
+		expandTreeItem(checkTreeNode(tree, 2, "ns"));
+		checkTreeNode(tree, 2, 0, "Foo::field : int");
+		checkTreeNode(tree, 2, 1, "Foo::foo() : void");
+		
+		PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.OUTLINE_GROUP_MEMBERS, true);
+		runEventQueue(500);
+		
+		checkTreeNode(outline, 0, "header.h");
+		expandTreeItem(checkTreeNode(tree, 1, "ns"));
+		expandTreeItem(item= checkTreeNode(tree, 1, 0, "Foo"));
+		checkTreeItems(item.getItems(), "bar() : void");
+		expandTreeItem(checkTreeNode(tree, 2, "ns"));
+		expandTreeItem(item= checkTreeNode(tree, 2, 0, "Foo"));
+		checkTreeItems(item.getItems(), "field : int", "foo() : void");
+	}
+
+	//namespace ns {
+	//class Foo {
+	//	static int field;
+	//	void bar();
+	//	void foo();
+	//};
+	//};
+
+	//#include "header.h"
+	//namespace ns {
+	//void Foo::bar() {}
+	//}
+	//namespace ns {
+	//int Foo::field = 5;
+	//void Foo::foo() {}
+	//}
+	public void testGroupedNamespaces() throws Exception {
+		StringBuffer[] contents= getContentsForTest(2);
+		IProject project= getProject().getProject();
+		IFile header= createFile(project, "header.h", contents[0].toString());
+		IFile source= createFile(project, "source.cpp", contents[1].toString());
+		waitForIndexer(project, source);
+
+		final IViewPart outline= activateView(IPageLayout.ID_OUTLINE);
+		openEditor(source);
+		
+		TreeItem item= checkTreeNode(outline, 0, "header.h");
+		Tree tree= item.getParent();
+		expandTreeItem(checkTreeNode(tree, 1, "ns"));
+		checkTreeNode(tree, 1, 0, "Foo::bar() : void");
+		expandTreeItem(checkTreeNode(tree, 2, "ns"));
+		checkTreeNode(tree, 2, 0, "Foo::field : int");
+		checkTreeNode(tree, 2, 1, "Foo::foo() : void");
+		
+		PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.OUTLINE_GROUP_NAMESPACES, true);
+		runEventQueue(500);
+		
+		checkTreeNode(outline, 0, "header.h");
+		expandTreeItem(checkTreeNode(tree, 1, "ns"));
+		checkTreeNode(tree, 1, 0, "Foo::bar() : void");
+		checkTreeNode(tree, 1, 1, "Foo::field : int");
+		checkTreeNode(tree, 1, 2, "Foo::foo() : void");
+	}
+
+	//namespace ns {
+	//class Foo {
+	//	static int field;
+	//	void bar();
+	//	void foo();
+	//};
+	//};
+
+	//#include "header.h"
+	//namespace ns {
+	//void Foo::bar() {}
+	//}
+	//namespace ns {
+	//int Foo::field = 5;
+	//void Foo::foo() {}
+	//}
+	public void testGroupedMembersInGroupedNamespaces() throws Exception {
+		StringBuffer[] contents= getContentsForTest(2);
+		IProject project= getProject().getProject();
+		IFile header= createFile(project, "header.h", contents[0].toString());
+		IFile source= createFile(project, "source.cpp", contents[1].toString());
+		waitForIndexer(project, source);
+
+		final IViewPart outline= activateView(IPageLayout.ID_OUTLINE);
+		openEditor(source);
+		
+		TreeItem item= checkTreeNode(outline, 0, "header.h");
+		Tree tree= item.getParent();
+		expandTreeItem(checkTreeNode(tree, 1, "ns"));
+		checkTreeNode(tree, 1, 0, "Foo::bar() : void");
+		expandTreeItem(checkTreeNode(tree, 2, "ns"));
+		checkTreeNode(tree, 2, 0, "Foo::field : int");
+		checkTreeNode(tree, 2, 1, "Foo::foo() : void");
+		
+		PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.OUTLINE_GROUP_MEMBERS, true);
+		PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.OUTLINE_GROUP_NAMESPACES, true);
+		runEventQueue(500);
+		
+		checkTreeNode(outline, 0, "header.h");
+		expandTreeItem(checkTreeNode(tree, 1, "ns"));
+		expandTreeItem(item= checkTreeNode(tree, 1, 0, "Foo"));
+		checkTreeItems(item.getItems(), "bar() : void", "field : int", "foo() : void");
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/outline/OutlineTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/outline/OutlineTestSuite.java
new file mode 100644
index 0000000..14c3df6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/outline/OutlineTestSuite.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.outline;
+
+import junit.framework.TestSuite;
+
+public class OutlineTestSuite extends TestSuite {
+
+    public static TestSuite suite() {
+        return new OutlineTestSuite();
+    }
+    
+    public OutlineTestSuite() {
+        super(OutlineTestSuite.class.getName());
+		addTest(BasicOutlineTest.suite());
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/quickfix/AssistQuickFixTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/quickfix/AssistQuickFixTest.java
new file mode 100644
index 0000000..7523ac6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/quickfix/AssistQuickFixTest.java
@@ -0,0 +1,300 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sebastian Davids <sdavids at gmx.de> - testInvertEquals1-23
+ *     Sergey Prigogin (Google)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.quickfix;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.FindReplaceDocumentAdapter;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.ui.PartInitException;
+
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.parser.IProblem;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+import org.eclipse.cdt.ui.tests.text.EditorTestHelper;
+import org.eclipse.cdt.ui.text.ICCompletionProposal;
+import org.eclipse.cdt.ui.text.IInvocationContext;
+import org.eclipse.cdt.ui.text.IProblemLocation;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.internal.ui.text.correction.CCorrectionProcessor;
+import org.eclipse.cdt.internal.ui.text.correction.CorrectionContext;
+import org.eclipse.cdt.internal.ui.text.correction.ProblemLocation;
+import org.eclipse.cdt.internal.ui.text.correction.proposals.LinkedNamesAssistProposal;
+import org.eclipse.cdt.internal.ui.text.correction.proposals.TUCorrectionProposal;
+
+public class AssistQuickFixTest extends BaseUITestCase {
+	private static final Class<AssistQuickFixTest> THIS = AssistQuickFixTest.class;
+	private static final String PROJECT = "AssistQuickFixTest";
+	
+	private ICProject fCProject;
+	private CEditor fEditor;
+	private IDocument fDocument;
+	private FindReplaceDocumentAdapter fFindReplaceDocumentAdapter;
+	private final IProblem[] fProblems;
+	private IAnnotationModel fAnnotationModel;
+	private IRegion fMatch;
+	private StyledText fTextWidget;
+
+	private ProjectTestSetup fProjectSetup;
+
+	protected static class ProjectTestSetup extends TestSetup {
+		private ICProject fCProject;
+		
+		public ProjectTestSetup(Test test) {
+			super(test);
+		}
+		@Override
+		protected void setUp() throws Exception {
+			super.setUp();
+			fCProject= EditorTestHelper.createCProject(PROJECT, "resources/quickFix", false, true);
+		}
+		@Override
+		protected void tearDown() throws Exception {
+			if (fCProject != null)
+				CProjectHelper.delete(fCProject);
+			
+			super.tearDown();
+		}
+	}
+	
+	public AssistQuickFixTest(String name) {
+		super(name);
+		fProblems = new IProblem[0];
+	}
+	
+	public static Test setUpTest(Test someTest) {
+		return new ProjectTestSetup(someTest);
+	}
+	
+	public static Test suite() {
+		return setUpTest(new TestSuite(THIS));
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		if (!ResourcesPlugin.getWorkspace().getRoot().exists(new Path(PROJECT))) {
+			fProjectSetup= new ProjectTestSetup(this);
+			fProjectSetup.setUp();
+		}
+		fEditor= openCEditor(new Path("/" + PROJECT + "/src/RenameInFile.cpp"));
+		assertNotNull(fEditor);
+		fTextWidget= fEditor.getViewer().getTextWidget();
+		assertNotNull(fTextWidget);
+		boolean ok= EditorTestHelper.joinReconciler((SourceViewer) fEditor.getViewer(), 10, 500, 20);
+		assertTrue("Reconciler did not finish in time", ok);
+		fDocument= fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput());
+		assertNotNull(fDocument);
+		fFindReplaceDocumentAdapter= new FindReplaceDocumentAdapter(fDocument);
+		fAnnotationModel= fEditor.getDocumentProvider().getAnnotationModel(fEditor.getEditorInput());
+	
+		fMatch= null;
+	}
+	
+	/*
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	@Override
+	protected void tearDown() throws Exception {
+		EditorTestHelper.closeAllEditors();
+		if (fProjectSetup != null) {
+			fProjectSetup.tearDown();
+		}
+	}
+	
+	private CEditor openCEditor(IPath path) {
+		IFile file= ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+		assertTrue(file != null && file.exists());
+		try {
+			return (CEditor) EditorTestHelper.openInEditor(file, true);
+		} catch (PartInitException e) {
+			fail();
+			return null;
+		}
+	}	
+	
+	private static final List<ICCompletionProposal> collectCorrections(CorrectionContext context, Class<?>[] filteredTypes) throws CoreException {
+		List<ICCompletionProposal> proposals= new ArrayList<ICCompletionProposal>();
+		IStatus status= CCorrectionProcessor.collectCorrections(context, new IProblemLocation[0], proposals);
+		assertStatusOk(status);
+
+		if (!proposals.isEmpty()) {
+			assertTrue("should be marked as 'has assist'", CCorrectionProcessor.hasAssists(context));
+		}
+
+		if (filteredTypes != null && filteredTypes.length > 0) {
+			for (Iterator<ICCompletionProposal> iter= proposals.iterator(); iter.hasNext(); ) {
+				if (isFiltered(iter.next(), filteredTypes)) {
+					iter.remove();
+				}
+			}
+		}
+		return proposals;
+	}
+
+	private static boolean isFiltered(Object curr, Class<?>[] filteredTypes) {
+		for (int k = 0; k < filteredTypes.length; k++) {
+			if (filteredTypes[k].isInstance(curr)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	private CorrectionContext getCorrectionContext(int offset, int length) {
+		ITranslationUnit tu= CUIPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(fEditor.getEditorInput());
+		return new CorrectionContext(tu, offset, length);
+	}
+
+	private static final ArrayList<ICCompletionProposal> collectAssists(CorrectionContext context, Class<?>[] filteredTypes) throws CoreException {
+		ArrayList<ICCompletionProposal> proposals= new ArrayList<ICCompletionProposal>();
+		IStatus status= CCorrectionProcessor.collectAssists(context, new IProblemLocation[0], proposals);
+		assertStatusOk(status);
+
+		if (!proposals.isEmpty()) {
+			assertTrue("should be marked as 'has assist'", CCorrectionProcessor.hasAssists(context));
+		}
+
+		if (filteredTypes != null && filteredTypes.length > 0) {
+			for (Iterator<ICCompletionProposal> iter= proposals.iterator(); iter.hasNext(); ) {
+				if (isFiltered(iter.next(), filteredTypes)) {
+					iter.remove();
+				}
+			}
+		}
+		return proposals;
+	}
+
+	private static void assertStatusOk(IStatus status) throws CoreException {
+		if (!status.isOK() && status.getException() == null) {
+			// Find a status with an exception
+			for (IStatus child : status.getChildren()) {
+				if (child.getException() != null) {
+					throw new CoreException(child);
+				}
+			}
+		}
+	}
+
+	private static void assertCorrectContext(IInvocationContext context, ProblemLocation problem) {
+		if (problem.getProblemId() != 0) {
+			if (!CCorrectionProcessor.hasCorrections(context.getTranslationUnit(), problem.getProblemId(), problem.getMarkerType())) {
+				assertTrue("Problem type not marked with light bulb: " + problem, false);
+			}
+		}
+	}
+
+	private static void assertNumberOfProposals(List<ICCompletionProposal> proposals, int expectedProposals) {
+		if (proposals.size() != expectedProposals) {
+			StringBuilder buf= new StringBuilder();
+			buf.append("Wrong number of proposals, is: ").append(proposals.size()). append(", expected: ").append(expectedProposals).append('\n');
+			for (ICCompletionProposal proposal : proposals) {
+				buf.append(" - ").append(proposal.getDisplayString()).append('\n');
+				if (proposal instanceof TUCorrectionProposal) {
+					try {
+						buf.append(((TUCorrectionProposal) proposal).getPreviewContent());
+					} catch (CoreException e) {
+						// ignore
+					}
+				}
+			}
+			assertTrue(buf.toString(), false);
+		}
+	}
+
+	private static void assertCorrectLabels(List<ICCompletionProposal> proposals) {
+		for (ICCompletionProposal proposal : proposals) {
+			String name= proposal.getDisplayString();
+			if (name == null || name.length() == 0 || name.charAt(0) == '!' || name.indexOf("{0}") != -1 || name.indexOf("{1}") != -1) {
+				assertTrue("wrong proposal label: " + name, false);
+			}
+			if (proposal.getImage() == null) {
+				assertTrue("wrong proposal image", false);
+			}
+		}
+	}
+
+	private static void assertCorrectContext(CorrectionContext context, ProblemLocation problem) {
+		if (problem.getProblemId() != 0) {
+			if (!CCorrectionProcessor.hasCorrections(context.getTranslationUnit(), problem.getProblemId(), problem.getMarkerType())) {
+				assertTrue("Problem type not marked with light bulb: " + problem, false);
+			}
+		}
+	}
+
+	public void testLocalRenameClass() throws Exception {
+    	final String name = "Base2"; 
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, name, true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+        CorrectionContext context= getCorrectionContext(fMatch.getOffset(), 0);
+        List<ICCompletionProposal> proposals= collectAssists(context, null);
+        
+        assertNumberOfProposals(proposals, 1);
+        assertCorrectLabels(proposals);
+        assertTrue(proposals.get(0) instanceof LinkedNamesAssistProposal);
+    }
+
+	public void testLocalRenameMacro() throws Exception {
+    	final String name = "INT"; 
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, name, true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+        CorrectionContext context= getCorrectionContext(fMatch.getOffset(), 0);
+        List<ICCompletionProposal> proposals= collectAssists(context, null);
+        
+        assertNumberOfProposals(proposals, 1);
+        assertCorrectLabels(proposals);
+        assertTrue(proposals.get(0) instanceof LinkedNamesAssistProposal);
+    }
+
+	public void testLocalRenameLanguageKeyword() throws Exception {
+    	final String name = "int"; 
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, name, true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+        CorrectionContext context= getCorrectionContext(fMatch.getOffset(), 0);
+        List<ICCompletionProposal> proposals= collectAssists(context, null);
+        
+        assertNumberOfProposals(proposals, 0);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/Messages.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/Messages.java
new file mode 100644
index 0000000..85863e7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/Messages.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+	private static final String BUNDLE_NAME = "org.eclipse.cdt.ui.tests.refactoring.messages"; //$NON-NLS-1$
+
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	private Messages() {
+	}
+
+	public static String getString(String key) {
+		try {
+			return RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			return '!' + key + '!';
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringBaseTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringBaseTest.java
new file mode 100644
index 0000000..4ba3929
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringBaseTest.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.Vector;
+
+import org.eclipse.cdt.core.tests.BaseTestFramework;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.ILogListener;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.text.TextSelection;
+
+/**
+ * @author Guido Zgraggen IFS
+ *
+ */
+public abstract class RefactoringBaseTest extends BaseTestFramework implements ILogListener{
+	protected static final NullProgressMonitor NULL_PROGRESS_MONITOR = new NullProgressMonitor();
+	
+	protected TreeMap<String, TestSourceFile> fileMap = new TreeMap<String, TestSourceFile>();
+	protected String fileWithSelection;
+	protected TextSelection selection;
+
+	protected RefactoringBaseTest(String name) {
+		super(name);
+	}
+	
+	public RefactoringBaseTest(String name, Vector<TestSourceFile> files) {
+		super(name);
+		for (TestSourceFile file : files) {
+			fileMap.put(file.getName(), file);
+		}
+	}
+
+	@Override
+	protected abstract void runTest() throws Throwable;
+	
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		for (TestSourceFile testFile : fileMap.values()) {
+			if(testFile.getSource().length() > 0) {
+				importFile(testFile.getName(), testFile.getSource());
+			}
+		}
+	}
+	
+	protected void assertEquals(TestSourceFile file, IFile file2) throws Exception {
+		String code = getCodeFromIFile(file2);
+		assertEquals(file.getExpectedSource(), TestHelper.unifyNewLines(code));
+	}
+	
+	protected void compareFiles(Map<String,TestSourceFile> testResourceFiles) throws Exception {
+		for (String fileName : testResourceFiles.keySet()) {
+			String expectedSource = testResourceFiles.get(fileName).getExpectedSource();
+			IFile iFile = project.getFile(new Path(fileName));
+			String code = getCodeFromIFile(iFile);
+			assertEquals(TestHelper.unifyNewLines(expectedSource), TestHelper.unifyNewLines(code));
+		}
+	}
+
+	protected String getCodeFromIFile(IFile file) throws Exception {
+		BufferedReader br = new BufferedReader(new InputStreamReader(file.getContents()));
+		StringBuilder code = new StringBuilder();
+		String line;
+		while((line = br.readLine()) != null) {
+			code.append(line);
+			code.append('\n');
+		}
+		br.close();
+		return code.toString();
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		System.gc();
+		fileManager.closeAllFiles();
+		super.tearDown();
+	}
+
+	public void logging(IStatus status, String plugin) {
+		Throwable ex = status.getException();
+		StringBuffer stackTrace = new StringBuffer();
+		if(ex != null) {
+			stackTrace.append('\n');
+			for(StackTraceElement ste : ex.getStackTrace()) {
+				stackTrace.append(ste.toString());
+			}
+		}
+		fail("Log-Message: " + status.getMessage() + stackTrace.toString());		 //$NON-NLS-1$
+	}
+
+	public void setFileWithSelection(String fileWithSelection) {
+		this.fileWithSelection = fileWithSelection;
+	}
+
+	public void setSelection(TextSelection selection) {
+		this.selection = selection;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringTest.java
new file mode 100644
index 0000000..7523d81
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringTest.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.Vector;
+
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.RefactoringStatusEntry;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.index.IIndexManager;
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+
+/**
+ * @author Emanuel Graf
+ * 
+ */
+public abstract class RefactoringTest extends RefactoringBaseTest {
+
+	private static final String CONFIG_FILE_NAME = ".config"; //$NON-NLS-1$
+
+	protected String fileName;
+	
+	public RefactoringTest(String name, Vector<TestSourceFile> files) {
+		super(name, files);
+		initializeConfiguration(files);
+		for (TestSourceFile file : files) {
+			fileMap.put(file.getName(), file);
+		}
+	}
+
+	protected abstract void configureRefactoring(Properties refactoringProperties);
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		CCorePlugin.getIndexManager().setIndexerId(cproject, IPDOMManager.ID_FAST_INDEXER);
+		CTestPlugin.getDefault().getLog().addLogListener(this);
+		CCorePlugin.getIndexManager().reindex(cproject);
+		boolean joined = CCorePlugin.getIndexManager().joinIndexer(IIndexManager.FOREVER, NULL_PROGRESS_MONITOR);
+		assertTrue(joined);
+	}
+
+	private void initializeConfiguration(Vector<TestSourceFile> files) {
+		TestSourceFile configFile = null;
+
+		for (TestSourceFile currentFile : files) {
+			if (currentFile.getName().equals(CONFIG_FILE_NAME)) {
+				configFile = currentFile;
+			}
+		}
+
+		Properties refactoringProperties = new Properties();
+
+		try {
+			if(configFile != null) {
+				refactoringProperties.load(new ByteArrayInputStream(configFile.getSource().getBytes()));
+			}
+		} catch (IOException e) {
+			// Property initialization failed
+		}
+
+		initCommonFields(refactoringProperties);
+		configureRefactoring(refactoringProperties);
+		files.remove(configFile);
+
+	}
+
+	private void initCommonFields(Properties refactoringProperties) {
+		fileName = refactoringProperties.getProperty("filename", "A.cpp"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	protected void assertConditionsOk(RefactoringStatus conditions) {
+		assertTrue(conditions.isOK() ? "OK" : "Error or Warning in initial Conditions: " + conditions.getEntries()[0].getMessage() //$NON-NLS-1$ //$NON-NLS-2$
+		, conditions.isOK());
+	}
+
+	protected void assertConditionsWarning(RefactoringStatus conditions, int number) {
+		if (number > 0) {
+			assertTrue("Warning in Condition expected", conditions.hasWarning()); //$NON-NLS-1$
+		}
+		RefactoringStatusEntry[] entries = conditions.getEntries();
+		int count = 0;
+		for (RefactoringStatusEntry entry : entries) {
+			if (entry.isWarning()) {
+				++count;
+			}
+		}
+		assertEquals(number + " Warnings expected found " + count, count, number); //$NON-NLS-1$
+	}
+
+	protected void assertConditionsInfo(RefactoringStatus status, int number) {
+		if (number > 0) {
+			assertTrue("Info in Condition expected", status.hasInfo()); //$NON-NLS-1$
+		}
+		RefactoringStatusEntry[] entries = status.getEntries();
+		int count = 0;
+		for (RefactoringStatusEntry entry : entries) {
+			if (entry.isInfo()) {
+				++count;
+			}
+		}
+		assertEquals(number + " Infos expected found " + count, number, count); //$NON-NLS-1$
+	}
+
+	protected void assertConditionsError(RefactoringStatus status, int number) {
+		if (number > 0) {
+			assertTrue("Error in Condition expected", status.hasError()); //$NON-NLS-1$
+		}
+		RefactoringStatusEntry[] entries = status.getEntries();
+		int count = 0;
+		for (RefactoringStatusEntry entry : entries) {
+			if (entry.isError()) {
+				++count;
+			}
+		}
+		assertEquals(number + " Errors expected found " + count, number, count); //$NON-NLS-1$
+	}
+
+	protected void assertConditionsFatalError(RefactoringStatus status, int number) {
+		if (number > 0) {
+			assertTrue("Fatal Error in Condition expected", status.hasFatalError()); //$NON-NLS-1$
+		}
+		RefactoringStatusEntry[] entries = status.getEntries();
+		int count = 0;
+		for (RefactoringStatusEntry entry : entries) {
+			if (entry.isFatalError()) {
+				++count;
+			}
+		}
+		assertEquals(number + " Fatal Errors expected found " + count, number, count); //$NON-NLS-1$
+	}
+
+	protected void assertConditionsFatalError(RefactoringStatus conditions) {
+		assertTrue("Fatal Error in Condition expected", conditions.hasFatalError()); //$NON-NLS-1$
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringTestSuite.java
new file mode 100644
index 0000000..6932a4b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringTestSuite.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Institute for Software, HSR Hochschule fuer Technik
+ * Rapperswil, University of applied sciences and others
+ * 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
+ *
+ * Contributors:
+ * Institute for Software - initial API and implementation
+ * Tom Ball (Google)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.ui.tests.refactoring.extractconstant.ExtractConstantTestSuite;
+import org.eclipse.cdt.ui.tests.refactoring.extractfunction.ExtractFunctionTestSuite;
+import org.eclipse.cdt.ui.tests.refactoring.extractlocalvariable.ExtractLocalVariableTestSuite;
+import org.eclipse.cdt.ui.tests.refactoring.gettersandsetters.GenerateGettersAndSettersTestSuite;
+import org.eclipse.cdt.ui.tests.refactoring.hidemethod.HideMethodTestSuite;
+import org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodTestSuite;
+import org.eclipse.cdt.ui.tests.refactoring.rename.RenameRegressionTests;
+import org.eclipse.cdt.ui.tests.refactoring.utils.UtilTestSuite;
+
+/**
+ * @author Emanuel Graf
+ *
+ */
+public class RefactoringTestSuite extends TestSuite {
+
+	public static Test suite() throws Exception {
+		TestSuite suite = new RefactoringTestSuite();
+		suite.addTest(UtilTestSuite.suite());
+		suite.addTest(RenameRegressionTests.suite());
+		suite.addTest(ExtractFunctionTestSuite.suite());
+		suite.addTest(ExtractConstantTestSuite.suite());
+		suite.addTest(HideMethodTestSuite.suite());
+		suite.addTest(GenerateGettersAndSettersTestSuite.suite());
+		suite.addTest(ImplementMethodTestSuite.suite());
+		suite.addTest(ExtractLocalVariableTestSuite.suite());
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringTester.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringTester.java
new file mode 100644
index 0000000..203a704
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/RefactoringTester.java
@@ -0,0 +1,216 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.text.TextSelection;
+import org.osgi.framework.Bundle;
+
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+
+/**
+ * @author Emanuel Graf
+ *
+ */
+public class RefactoringTester extends TestSuite{
+	
+	enum MatcherState{skip, inTest, inSource, inExpectedResult}
+	
+	private static final String classRegexp = "//#(.*)\\s*(\\w*)*$"; //$NON-NLS-1$
+	private static final String testRegexp = "//!(.*)\\s*(\\w*)*$"; //$NON-NLS-1$
+	private static final String fileRegexp = "//@(.*)\\s*(\\w*)*$"; //$NON-NLS-1$
+	private static final String resultRegexp = "//=.*$"; //$NON-NLS-1$
+	
+	public static Test suite(String name, String file)throws Exception {
+		BufferedReader in = createReader(file);
+
+		ArrayList<RefactoringBaseTest> testCases = createTests(in);
+		in.close();
+		return createSuite(testCases, name);
+	}
+	
+	protected static BufferedReader createReader(String file) throws IOException {
+		Bundle bundle = CTestPlugin.getDefault().getBundle();
+		Path path = new Path(file);
+		String file2 = FileLocator.toFileURL(FileLocator.find(bundle, path, null)).getFile();
+		return new BufferedReader(new FileReader(file2));
+	}
+	
+	private static ArrayList<RefactoringBaseTest> createTests(BufferedReader inputReader) throws Exception {
+		
+		String line;
+		Vector<TestSourceFile> files = new Vector<TestSourceFile>();
+		TestSourceFile actFile = null;
+		MatcherState matcherState = MatcherState.skip;
+		ArrayList<RefactoringBaseTest> testCases = new ArrayList<RefactoringBaseTest>();
+		String testName = null;
+		String className = null;
+		boolean bevorFirstTest = true;
+		
+		while ((line = inputReader.readLine()) != null){
+			
+			if(lineMatchesBeginOfTest(line)) {
+				if(!bevorFirstTest) {
+					RefactoringBaseTest test = createTestClass(className, testName, files);
+					testCases.add(test);
+					files = new Vector<TestSourceFile>();
+					className = null;
+					testName = null;
+				}
+				matcherState = MatcherState.inTest;
+				testName = getNameOfTest(line);
+				bevorFirstTest = false;
+				continue;
+			}	else if (lineMatchesBeginOfResult(line)) {
+				matcherState = MatcherState.inExpectedResult;
+				continue;
+			}else if (lineMatchesFileName(line)) {
+				matcherState = MatcherState.inSource;
+				actFile = new TestSourceFile(getFileName(line));
+				files.add(actFile);
+				continue;
+			}else if(lineMatchesClassName(line)) {
+				className = getNameOfClass(line);
+				continue;
+			}
+			
+			switch(matcherState) {
+			case inSource:
+				if(actFile != null) {
+					actFile.addLineToSource(line);
+				}
+				break;
+			case inExpectedResult:
+				if(actFile != null) {
+					actFile.addLineToExpectedSource(line);
+				}
+				break;
+			default:
+				break;
+			}
+		}
+		RefactoringBaseTest test = createTestClass(className, testName, files);
+		testCases.add(test);
+		return testCases;
+	}
+	
+
+	
+	private static RefactoringBaseTest createTestClass(String className, String testName, Vector<TestSourceFile> files) throws Exception {
+		
+		
+		try {
+			Class<?> refClass = Class.forName(className);
+			Class<?> paratypes[] = new Class[2];
+			paratypes[0] = testName.getClass();
+			paratypes[1] = files.getClass();
+			Constructor<?> ct = refClass.getConstructor(paratypes);
+			Object arglist[] = new Object[2];
+			arglist[0] = testName;
+			arglist[1] = files;
+			RefactoringBaseTest test = (RefactoringBaseTest) ct.newInstance(arglist);
+			for (TestSourceFile file : files) {
+				TextSelection sel = file.getSelection();
+				if(sel != null) {
+					test.setFileWithSelection(file.getName());
+					test.setSelection(sel);
+					break;
+				}
+			}
+			return test;
+		} catch (ClassNotFoundException e) {
+			throw new Exception(Messages.getString("RefactoringTester.UnknownTestClass")); //$NON-NLS-1$
+		} catch (SecurityException e) {
+			throw new Exception(Messages.getString("RefactoringTester.SecurityException"), e); //$NON-NLS-1$
+		} catch (NoSuchMethodException e) {
+			throw new Exception(Messages.getString("RefactoringTester.ConstructorError")); //$NON-NLS-1$
+		} catch (IllegalArgumentException e) {
+			throw new Exception(Messages.getString("RefactoringTester.IllegalArgument"), e); //$NON-NLS-1$
+		} catch (InstantiationException e) {
+			throw new Exception(Messages.getString("RefactoringTester.InstantiationException"), e); //$NON-NLS-1$
+		} catch (IllegalAccessException e) {
+			throw new Exception(Messages.getString("RefactoringTester.IllegalAccessException"), e); //$NON-NLS-1$
+		} catch (InvocationTargetException e) {
+			throw new Exception(Messages.getString("RefactoringTester.InvocationTargetException"), e); //$NON-NLS-1$
+		}
+	}
+
+	private static String getFileName(String line) {
+		Matcher matcherBeginOfTest = createMatcherFromString(fileRegexp, line);
+		if(matcherBeginOfTest.find())
+			return matcherBeginOfTest.group(1);
+		else
+			return null;
+	}
+
+	private static String getNameOfClass(String line) {
+		Matcher matcherBeginOfTest = createMatcherFromString(classRegexp, line);
+		if(matcherBeginOfTest.find())
+			return matcherBeginOfTest.group(1);
+		else
+			return null;
+	}
+
+	private static boolean lineMatchesBeginOfTest(String line) {
+		return createMatcherFromString(testRegexp, line).find();
+	}
+	
+	private static boolean lineMatchesClassName(String line) {
+		return createMatcherFromString(classRegexp, line).find();
+	}
+	
+	private static boolean lineMatchesFileName(String line) {
+		return createMatcherFromString(fileRegexp, line).find();
+	}
+
+	protected static Matcher createMatcherFromString(String pattern, String line) {
+		return Pattern.compile(pattern).matcher(line);
+	}
+	
+	private static String getNameOfTest(String line) {
+		Matcher matcherBeginOfTest = createMatcherFromString(testRegexp, line);
+		if(matcherBeginOfTest.find())
+			return matcherBeginOfTest.group(1);
+		else
+			return Messages.getString("RefactoringTester.NotNamed"); //$NON-NLS-1$
+	}
+	
+	private static boolean lineMatchesBeginOfResult(String line) {
+		return createMatcherFromString(resultRegexp, line).find();
+	}
+	
+	private static TestSuite createSuite(ArrayList<RefactoringBaseTest> testCases, String name) {
+		TestSuite suite = new TestSuite(name);
+		Iterator<RefactoringBaseTest> it = testCases.iterator();
+		while(it.hasNext()) {
+			RefactoringBaseTest subject =it.next();
+			suite.addTest(subject);
+		}
+		return suite;
+	}
+}
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/TestHelper.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/TestHelper.java
new file mode 100644
index 0000000..a2ec884
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/TestHelper.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring;
+
+public class TestHelper {
+
+	public static String unifyNewLines(String code) {
+		String replacement = System.getProperty("line.separator"); //$NON-NLS-1$
+		return code.replaceAll("(\n)|(\r\n)", replacement); //$NON-NLS-1$
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/TestSourceFile.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/TestSourceFile.java
new file mode 100644
index 0000000..c0c11c1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/TestSourceFile.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.jface.text.TextSelection;
+
+/**
+ * @author Emanuel Graf
+ *
+ */
+public class TestSourceFile {
+	
+	private static final String REPLACEMENT = ""; //$NON-NLS-1$
+	private String name;
+	private StringBuffer source = new StringBuffer();
+	private StringBuffer expectedSource = new StringBuffer();
+	private String separator = System.getProperty("line.separator"); //$NON-NLS-1$
+	private int selectionStart = -1;
+	private int selectionEnd = -1;
+	
+	protected static final String selectionStartRegex = "/\\*\\$\\*/"; //$NON-NLS-1$
+	protected static final String selectionEndRegex = "/\\*\\$\\$\\*/"; //$NON-NLS-1$
+	protected static final String selectionStartLineRegex = "(.*)(" + selectionStartRegex + ")(.*)"; //$NON-NLS-1$ //$NON-NLS-2$
+	protected static final String selectionEndLineRegex = "(.*)("+ selectionEndRegex + ")(.*)"; //$NON-NLS-1$ //$NON-NLS-2$
+	
+	public TestSourceFile(String name) {
+		super();
+		this.name = name;
+	}
+	public String getExpectedSource() {
+		String exp = expectedSource.toString();
+		if(exp.length() == 0) {
+			return getSource();
+		}else {
+			return exp;
+		}
+	}
+	public String getName() {
+		return name;
+	}
+	public String getSource() {
+		return source.toString();
+	}
+	
+	public void addLineToSource(String code) {
+		Matcher start = createMatcherFromString(selectionStartLineRegex, code);
+		if(start.matches()) {
+			selectionStart = start.start(2) + source.length();
+			code = code.replaceAll(selectionStartRegex, REPLACEMENT);
+		}
+		Matcher end = createMatcherFromString(selectionEndLineRegex, code);
+		if(end.matches()) {
+			selectionEnd = end.start(2) + source.length();
+			code = code.replaceAll(selectionEndRegex, REPLACEMENT);
+		}
+		source.append(code);
+		source.append(separator);
+	}
+	
+	public void addLineToExpectedSource(String code) {
+		expectedSource.append(code);
+		expectedSource.append(separator);
+	}
+	
+	public TextSelection getSelection() {
+		if(selectionStart < 0 || selectionEnd <0 ) {
+			return null;
+		}else {
+			return new TextSelection(selectionStart, selectionEnd -selectionStart);
+		}
+	}
+
+	protected static Matcher createMatcherFromString(String pattern, String line) {
+		return Pattern.compile(pattern).matcher(line);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantRefactoringTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantRefactoringTest.java
new file mode 100644
index 0000000..5f02279
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantRefactoringTest.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.extractconstant;
+
+import java.util.Properties;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTest;
+import org.eclipse.cdt.ui.tests.refactoring.TestSourceFile;
+
+import org.eclipse.cdt.internal.ui.refactoring.extractconstant.ExtractConstantInfo;
+import org.eclipse.cdt.internal.ui.refactoring.extractconstant.ExtractConstantRefactoring;
+import org.eclipse.cdt.internal.ui.refactoring.utils.VisibilityEnum;
+
+/**
+ * @author Emanuel Graf
+ */
+public class ExtractConstantRefactoringTest extends RefactoringTest {
+
+
+	protected VisibilityEnum visibility;
+
+	public ExtractConstantRefactoringTest(String name, Vector<TestSourceFile> files) {
+		super(name, files);
+	}
+
+	@Override
+	protected void runTest() throws Throwable {
+		IFile refFile = project.getFile(fileName);
+		ExtractConstantInfo info = new ExtractConstantInfo();
+		ExtractConstantRefactoring refactoring = new ExtractConstantRefactoring( refFile, selection, info);
+		try {
+			refactoring.lockIndex();
+			RefactoringStatus checkInitialConditions = refactoring.checkInitialConditions(NULL_PROGRESS_MONITOR);
+			assertConditionsOk(checkInitialConditions);
+			info.setName("theAnswer"); //$NON-NLS-1$
+			info.setVisibility(visibility);
+			Change createChange = refactoring.createChange(NULL_PROGRESS_MONITOR);
+			RefactoringStatus finalConditions = refactoring.checkFinalConditions(NULL_PROGRESS_MONITOR);
+			assertConditionsOk(finalConditions);
+			createChange.perform(NULL_PROGRESS_MONITOR);
+		}finally {
+			refactoring.unlockIndex();
+		}
+		compareFiles(fileMap);
+
+	}
+
+	@Override
+	protected void configureRefactoring(Properties refactoringProperties) {
+		visibility = VisibilityEnum.getEnumForStringRepresentation(refactoringProperties.getProperty("visibility", VisibilityEnum.v_public.toString())); //$NON-NLS-1$
+	
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantTestSuite.java
new file mode 100644
index 0000000..3300809
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractconstant/ExtractConstantTestSuite.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Google, Inc and others.
+ * 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
+ *
+ * Contributors:
+ * Tom Ball (Google) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.extractconstant;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTester;
+
+/**
+ * Test suite to run just the Extract Constant unit tests.
+ *
+ * @author Tom Ball
+ */
+public class ExtractConstantTestSuite extends TestSuite {
+
+	@SuppressWarnings("nls")
+	public static Test suite() throws Exception {
+		TestSuite suite = new ExtractConstantTestSuite();
+		suite.addTest(RefactoringTester.suite("ExtractConstantRefactoringTest",
+				"resources/refactoring/ExtractConstant.rts"));
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionRefactoringTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionRefactoringTest.java
new file mode 100644
index 0000000..77401a1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionRefactoringTest.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.extractfunction;
+
+import java.util.Properties;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTest;
+import org.eclipse.cdt.ui.tests.refactoring.TestSourceFile;
+
+import org.eclipse.cdt.internal.ui.refactoring.CRefactoring;
+import org.eclipse.cdt.internal.ui.refactoring.NodeContainer.NameInformation;
+import org.eclipse.cdt.internal.ui.refactoring.extractfunction.ExtractFunctionInformation;
+import org.eclipse.cdt.internal.ui.refactoring.extractfunction.ExtractFunctionRefactoring;
+import org.eclipse.cdt.internal.ui.refactoring.utils.VisibilityEnum;
+
+/**
+ * @author Emanuel Graf
+ *
+ */
+public class ExtractFunctionRefactoringTest extends RefactoringTest {
+	
+	protected String methodName;
+	protected boolean replaceDuplicates;
+	protected boolean returnValue;
+	protected int returnParameterIndex;
+	protected boolean fatalError;
+	private VisibilityEnum visibility;
+
+	/**
+	 * @param name
+	 * @param files
+	 */
+	public ExtractFunctionRefactoringTest(String name, Vector<TestSourceFile> files) {
+		super(name, files);
+	}
+
+	@Override
+	protected void runTest() throws Throwable {
+		IFile refFile = project.getFile(fileName);
+		ExtractFunctionInformation info = new ExtractFunctionInformation();
+		CRefactoring refactoring = new ExtractFunctionRefactoring( refFile, selection, info, cproject);
+		RefactoringStatus checkInitialConditions = refactoring.checkInitialConditions(NULL_PROGRESS_MONITOR);
+		
+		if(fatalError){
+			assertConditionsFatalError(checkInitialConditions);
+			return;
+		}
+		else{
+			assertConditionsOk(checkInitialConditions);
+			executeRefactoring(info, refactoring);
+		}
+		
+		
+	}
+
+	private void executeRefactoring(ExtractFunctionInformation info, CRefactoring refactoring) throws CoreException, Exception {
+		info.setMethodName(methodName);
+		info.setReplaceDuplicates(replaceDuplicates);
+		if(info.getInScopeDeclaredVariable() == null){
+			if(returnValue) {
+				info.setReturnVariable(info.getAllAfterUsedNames().get(returnParameterIndex));
+			}
+		} else {
+			info.setReturnVariable( info.getInScopeDeclaredVariable() );
+		}
+		info.setVisibility(visibility);
+		
+		for (NameInformation name : info.getAllAfterUsedNames()) {
+			if(!name.isUserSetIsReturnValue()){
+				name.setUserSetIsReference(name.isReference());
+			}
+		}
+		
+		Change createChange = refactoring.createChange(NULL_PROGRESS_MONITOR);
+		RefactoringStatus finalConditions = refactoring.checkFinalConditions(NULL_PROGRESS_MONITOR);
+		assertConditionsOk(finalConditions);
+		createChange.perform(NULL_PROGRESS_MONITOR);
+		
+		compareFiles(fileMap);
+	}
+
+	
+	@Override
+	protected void configureRefactoring(Properties refactoringProperties) {
+		methodName = refactoringProperties.getProperty("methodname", "exp"); //$NON-NLS-1$ //$NON-NLS-2$
+		replaceDuplicates = Boolean.valueOf(refactoringProperties.getProperty("replaceduplicates", "false")).booleanValue(); //$NON-NLS-1$ //$NON-NLS-2$
+		returnValue = Boolean.valueOf(refactoringProperties.getProperty("returnvalue", "false")).booleanValue();  //$NON-NLS-1$//$NON-NLS-2$
+		returnParameterIndex = new Integer(refactoringProperties.getProperty("returnparameterindex", "0")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
+		fatalError = Boolean.valueOf(refactoringProperties.getProperty("fatalerror", "false")).booleanValue(); //$NON-NLS-1$ //$NON-NLS-2$
+		visibility = VisibilityEnum.getEnumForStringRepresentation(refactoringProperties.getProperty("visibility", VisibilityEnum.v_private.toString())); //$NON-NLS-1$
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionTestSuite.java
new file mode 100644
index 0000000..0f9e6a8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractfunction/ExtractFunctionTestSuite.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.extractfunction;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTester;
+
+/**
+ * @author Emanuel Graf
+ * 
+ */
+public class ExtractFunctionTestSuite extends TestSuite {
+
+	@SuppressWarnings("nls")
+	public static Test suite() throws Exception {
+		TestSuite suite = new ExtractFunctionTestSuite();
+		suite.addTest(RefactoringTester.suite("ExtractMethodRefactoringTests", "resources/refactoring/ExtractMethod.rts"));
+		suite.addTest(RefactoringTester.suite("Extract Expression", "resources/refactoring/ExtractExpression.rts"));
+		suite.addTest(RefactoringTester.suite("ExtractMethodPreprocessorRefactoringTests", "resources/refactoring/ExtractMethodPreprocessor.rts"));
+		suite.addTest(RefactoringTester.suite("Extract Function Templates Tests", "resources/refactoring/ExtractFunctionTemplates.rts"));
+		return suite;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractlocalvariable/ExtractLocalVariableRefactoringTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractlocalvariable/ExtractLocalVariableRefactoringTest.java
new file mode 100644
index 0000000..c59b91e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractlocalvariable/ExtractLocalVariableRefactoringTest.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.extractlocalvariable;
+
+import java.util.Properties;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTest;
+import org.eclipse.cdt.ui.tests.refactoring.TestSourceFile;
+
+import org.eclipse.cdt.internal.ui.refactoring.CRefactoring;
+import org.eclipse.cdt.internal.ui.refactoring.NameNVisibilityInformation;
+import org.eclipse.cdt.internal.ui.refactoring.extractlocalvariable.ExtractLocalVariableRefactoring;
+
+/**
+ * Test harness for Extract Local Variable refactoring tests.
+ * 
+ * @author Tom Ball
+ */
+public class ExtractLocalVariableRefactoringTest extends RefactoringTest {
+	protected String variableName;
+	protected boolean fatalError;
+
+	public ExtractLocalVariableRefactoringTest(String name, Vector<TestSourceFile> files) {
+		super(name, files);
+	}
+
+	@Override
+	protected void runTest() throws Throwable {
+		IFile refFile = project.getFile(fileName);
+		NameNVisibilityInformation info = new NameNVisibilityInformation();
+		info.setName(variableName);
+		CRefactoring refactoring = new ExtractLocalVariableRefactoring( refFile, selection, info);
+		RefactoringStatus checkInitialConditions = refactoring.checkInitialConditions(NULL_PROGRESS_MONITOR);
+		
+		if(fatalError){
+			assertConditionsFatalError(checkInitialConditions);
+			return;
+		}
+
+		assertConditionsOk(checkInitialConditions);
+		Change createChange = refactoring.createChange(NULL_PROGRESS_MONITOR);
+		RefactoringStatus finalConditions = refactoring.checkFinalConditions(NULL_PROGRESS_MONITOR);
+		assertConditionsOk(finalConditions);
+		createChange.perform(NULL_PROGRESS_MONITOR);		
+		compareFiles(fileMap);
+	}
+
+	@Override
+	protected void configureRefactoring(Properties refactoringProperties) {
+		variableName = refactoringProperties.getProperty("variablename", "temp"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractlocalvariable/ExtractLocalVariableTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractlocalvariable/ExtractLocalVariableTestSuite.java
new file mode 100644
index 0000000..dc3f7d3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/extractlocalvariable/ExtractLocalVariableTestSuite.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.extractlocalvariable;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTester;
+
+/**
+ * Test suite to run just the Extract Local Variable unit tests.
+ * 
+ * @author Tom Ball
+ */
+public class ExtractLocalVariableTestSuite extends TestSuite {
+
+	@SuppressWarnings("nls")
+	public static Test suite() throws Exception {
+		TestSuite suite = new ExtractLocalVariableTestSuite();
+		suite.addTest(RefactoringTester.suite("ExtractLocalVariableRefactoringTests", 
+				"resources/refactoring/ExtractLocalVariable.rts"));
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/gettersandsetters/GenerateGettersAndSettersTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/gettersandsetters/GenerateGettersAndSettersTest.java
new file mode 100644
index 0000000..7bb838c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/gettersandsetters/GenerateGettersAndSettersTest.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences
+ * 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  
+ * 
+ * Contributors: 
+ * Emanuel Graf & Leo Buettiker - initial API and implementation 
+ * Thomas Corbat - implementation
+ ******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.gettersandsetters;
+
+import java.util.ArrayList;
+import java.util.Properties;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTest;
+import org.eclipse.cdt.ui.tests.refactoring.TestSourceFile;
+
+import org.eclipse.cdt.internal.ui.refactoring.gettersandsetters.GenerateGettersAndSettersRefactoring;
+import org.eclipse.cdt.internal.ui.refactoring.gettersandsetters.GetterAndSetterContext;
+
+/**
+ * @author Thomas Corbat
+ *
+ */
+public class GenerateGettersAndSettersTest extends RefactoringTest {
+	
+	protected boolean fatalError;
+	private int warnings;
+	private ArrayList<String> selectedGetters;
+	private ArrayList<String> selectedSetters;
+	private GenerateGettersAndSettersRefactoring refactoring;
+
+
+	/**
+	 * @param name
+	 * @param files
+	 */
+	public GenerateGettersAndSettersTest(String name, Vector<TestSourceFile> files) {
+		super(name, files);
+	}
+
+	@Override
+	protected void runTest() throws Throwable {
+		IFile refFile = project.getFile(fileName);
+		refactoring = new GenerateGettersAndSettersRefactoring(refFile, selection, null);
+		RefactoringStatus initialConditions = refactoring.checkInitialConditions(NULL_PROGRESS_MONITOR);
+		
+
+		if(fatalError){
+			assertConditionsFatalError(initialConditions);
+			return;
+		}
+		else{
+			assertConditionsOk(initialConditions);
+			executeRefactoring();
+		}
+		
+		
+	}
+
+	private void executeRefactoring() throws CoreException, Exception {
+
+		RefactoringStatus initialConditions = refactoring.checkInitialConditions(NULL_PROGRESS_MONITOR);
+		assertConditionsOk(initialConditions);
+		selectFields();
+		Change createChange = refactoring.createChange(NULL_PROGRESS_MONITOR);
+		RefactoringStatus finalConditions = refactoring.checkFinalConditions(NULL_PROGRESS_MONITOR);
+		if(warnings > 0){
+			assertConditionsWarning(finalConditions, warnings);
+		}
+		else{
+			assertConditionsOk(finalConditions);
+		}
+
+		createChange.perform(NULL_PROGRESS_MONITOR);
+		
+		compareFiles(fileMap);
+	}
+
+	private void selectFields() {
+		GetterAndSetterContext context = refactoring.getContext();
+	
+		for(IASTSimpleDeclaration currentDecl : context.existingFields){
+			String name = currentDecl.getDeclarators()[0].getName().getRawSignature();
+			if(selectedGetters.contains(name) ){
+				selectedGetters.remove(name);
+				context.selectedFunctions.add(context.createGetterInserter(currentDecl));
+			}
+
+			if(selectedSetters.contains(name) ){
+				selectedSetters.remove(name);
+				context.selectedFunctions.add(context.createSetterInserter(currentDecl));
+			}
+		}
+	}
+
+	
+	@Override
+	protected void configureRefactoring(Properties refactoringProperties) {
+		fatalError = Boolean.valueOf(refactoringProperties.getProperty("fatalerror", "false")).booleanValue();  //$NON-NLS-1$//$NON-NLS-2$
+		warnings = new Integer(refactoringProperties.getProperty("warnings", "0")).intValue();  //$NON-NLS-1$//$NON-NLS-2$
+		String getters = refactoringProperties.getProperty("getters", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		String setters = refactoringProperties.getProperty("setters", ""); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		selectedGetters = new ArrayList<String>();	
+		for(String getterName : getters.split(",")){ //$NON-NLS-1$
+			selectedGetters.add(getterName);
+		}
+		selectedSetters = new ArrayList<String>();
+		for(String setterName : setters.split(",")){ //$NON-NLS-1$
+			selectedSetters.add(setterName);
+		}
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/gettersandsetters/GenerateGettersAndSettersTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/gettersandsetters/GenerateGettersAndSettersTestSuite.java
new file mode 100644
index 0000000..4dd28fc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/gettersandsetters/GenerateGettersAndSettersTestSuite.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Google, Inc and others.
+ * 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
+ *
+ * Contributors:
+ * Tom Ball (Google) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.gettersandsetters;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTester;
+
+/**
+ * Test suite to run just the Generate Getters and Setters unit tests.
+ *
+ * @author Tom Ball
+ */
+public class GenerateGettersAndSettersTestSuite extends TestSuite {
+
+	@SuppressWarnings("nls")
+	public static Test suite() throws Exception {
+		TestSuite suite = new GenerateGettersAndSettersTestSuite();
+		suite.addTest(RefactoringTester.suite("GenerateGettersAndSettersTest",
+				"resources/refactoring/GenerateGettersAndSetters.rts"));
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/hidemethod/HideMethodRefactoringTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/hidemethod/HideMethodRefactoringTest.java
new file mode 100644
index 0000000..06a4238
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/hidemethod/HideMethodRefactoringTest.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.hidemethod;
+
+import java.util.Properties;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTest;
+import org.eclipse.cdt.ui.tests.refactoring.TestSourceFile;
+
+import org.eclipse.cdt.internal.ui.refactoring.CRefactoring;
+import org.eclipse.cdt.internal.ui.refactoring.hidemethod.HideMethodRefactoring;
+
+/**
+ * @author Guido Zgraggen IFS
+ */
+public class HideMethodRefactoringTest extends RefactoringTest {
+	private int warnings;
+	private int errors;
+	private int fatalerrors;
+	
+	public HideMethodRefactoringTest(String name, Vector<TestSourceFile> files) {
+		super(name, files);
+	}
+
+	@Override
+	protected void runTest() throws Throwable {
+
+		IFile refFile = project.getFile(fileWithSelection);
+		CRefactoring refactoring = new HideMethodRefactoring(refFile,selection, null);
+		try {
+		refactoring.lockIndex();
+		RefactoringStatus checkInitialConditions = refactoring.checkInitialConditions(NULL_PROGRESS_MONITOR);
+		if(errors > 0) {
+			assertConditionsError(checkInitialConditions, errors);
+		}else if(fatalerrors > 0) {
+			assertConditionsError(checkInitialConditions, errors);
+			return;
+		}else {
+			assertConditionsOk(checkInitialConditions);
+		}
+		
+		Change createChange = refactoring.createChange(NULL_PROGRESS_MONITOR);
+		RefactoringStatus finalConditions = refactoring.checkFinalConditions(NULL_PROGRESS_MONITOR);
+		if(warnings > 0){
+			assertConditionsWarning(finalConditions, warnings);
+		}else{
+			assertConditionsOk(finalConditions);
+		}
+		createChange.perform(NULL_PROGRESS_MONITOR);
+
+		compareFiles(fileMap);
+		}
+		finally {
+			refactoring.unlockIndex();
+		}
+	}
+
+	@Override
+	protected void configureRefactoring(Properties refactoringProperties) {
+		warnings = new Integer(refactoringProperties.getProperty("warnings", "0")).intValue();  //$NON-NLS-1$//$NON-NLS-2$
+		errors = new Integer(refactoringProperties.getProperty("errors", "0")).intValue();  //$NON-NLS-1$//$NON-NLS-2$
+		fatalerrors = new Integer(refactoringProperties.getProperty("fatalerrors", "0")).intValue();  //$NON-NLS-1$//$NON-NLS-2$
+		
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/hidemethod/HideMethodTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/hidemethod/HideMethodTestSuite.java
new file mode 100644
index 0000000..10dd0f5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/hidemethod/HideMethodTestSuite.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Google, Inc and others.
+ * 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
+ *
+ * Contributors:
+ * Tom Ball (Google) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.hidemethod;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTester;
+
+/**
+ * Test suite to run just the Hide Method unit tests.
+ *
+ * @author Tom Ball
+ */
+public class HideMethodTestSuite extends TestSuite {
+
+	@SuppressWarnings("nls")
+	public static Test suite() throws Exception {
+		TestSuite suite = new HideMethodTestSuite();
+		suite.addTest(RefactoringTester.suite("HideMethodRefactoringTests",
+				"resources/refactoring/HideMethod.rts"));
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/implementmethod/ImplementMethodRefactoringTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/implementmethod/ImplementMethodRefactoringTest.java
new file mode 100644
index 0000000..b78474b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/implementmethod/ImplementMethodRefactoringTest.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.implementmethod;
+
+import java.util.Properties;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTest;
+import org.eclipse.cdt.ui.tests.refactoring.TestSourceFile;
+
+import org.eclipse.cdt.internal.ui.refactoring.CRefactoring;
+import org.eclipse.cdt.internal.ui.refactoring.implementmethod.ImplementMethodRefactoring;
+ 
+/**
+ * @author Mirko Stocker
+ *
+ */
+public class ImplementMethodRefactoringTest extends RefactoringTest {
+
+	protected int finalWarnings;
+	private int initialWarnings;
+
+	public ImplementMethodRefactoringTest(String name,Vector<TestSourceFile> files) {
+		super(name, files);
+	}
+
+	@Override
+	protected void runTest() throws Throwable {
+		
+		IFile refFile = project.getFile(fileName);
+		
+		CRefactoring refactoring = new ImplementMethodRefactoring(refFile, selection, null);
+		
+		try {
+			refactoring.lockIndex();
+			RefactoringStatus checkInitialConditions = refactoring.checkInitialConditions(NULL_PROGRESS_MONITOR);
+
+			if(initialWarnings == 0) {
+				assertConditionsOk(checkInitialConditions);
+			} else {
+				assertConditionsFatalError(checkInitialConditions, initialWarnings);
+				return;
+			}
+
+			refactoring.checkFinalConditions(NULL_PROGRESS_MONITOR);
+			RefactoringStatus finalConditions = refactoring.checkFinalConditions(NULL_PROGRESS_MONITOR);
+			if (finalWarnings == 0) {
+				Change createChange = refactoring.createChange(NULL_PROGRESS_MONITOR);
+				assertConditionsOk(finalConditions);
+				createChange.perform(NULL_PROGRESS_MONITOR);
+			} else {
+				assertConditionsWarning(finalConditions, finalWarnings);
+			}
+			compareFiles(fileMap);
+		}
+		finally {
+			refactoring.unlockIndex();
+		}
+	}
+
+	@Override
+	protected void configureRefactoring(Properties refactoringProperties) {
+		finalWarnings = new Integer(refactoringProperties.getProperty("finalWarnings", "0")).intValue();  //$NON-NLS-1$//$NON-NLS-2$
+		initialWarnings = Integer.parseInt(refactoringProperties.getProperty("initialWarnings", "0"));  //$NON-NLS-1$//$NON-NLS-2$
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/implementmethod/ImplementMethodTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/implementmethod/ImplementMethodTestSuite.java
new file mode 100644
index 0000000..092d5ba
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/implementmethod/ImplementMethodTestSuite.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Google, Inc and others.
+ * 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
+ *
+ * Contributors:
+ * Tom Ball - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.implementmethod;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTester;
+
+/**
+ * Test suite to run just the Implement Method unit tests.
+ *
+ * @author Tom Ball
+ */
+public class ImplementMethodTestSuite extends TestSuite {
+
+	@SuppressWarnings("nls")
+	public static Test suite() throws Exception {
+		TestSuite suite = new ImplementMethodTestSuite();
+		suite.addTest(RefactoringTester.suite("ImplementMethodRefactoringTest",
+				"resources/refactoring/ImplementMethod.rts"));
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/messages.properties b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/messages.properties
new file mode 100644
index 0000000..f007b5a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/messages.properties
@@ -0,0 +1,18 @@
+###############################################################################
+# Copyright (c) 2008 Wind River Systems and others.
+# 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
+#
+# Contributors:
+#     Wind River Systems - initial API and implementation
+###############################################################################
+RefactoringTester.UnknownTestClass=Unknown TestClass. Make sure the test's sourcefile specifies a valid test class.
+RefactoringTester.SecurityException=Security Exception during Test creation
+RefactoringTester.ConstructorError=Test class does not provied required constructor.
+RefactoringTester.IllegalArgument=IllegalArgumentException during Test creation
+RefactoringTester.InstantiationException=InstantiationException during Test creation
+RefactoringTester.IllegalAccessException=IllegalAccessException during Test creation
+RefactoringTester.InvocationTargetException=InvocationTargetException during Test creation
+RefactoringTester.NotNamed=Not Named
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RefactoringTests.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RefactoringTests.java
new file mode 100644
index 0000000..fc77265
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RefactoringTests.java
@@ -0,0 +1,274 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 Wind River Systems, Inc.
+ * 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  
+ * 
+ * Contributors: 
+ *    Markus Schorn - initial API and implementation 
+ ******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.refactoring.rename;
+
+import java.io.StringWriter;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.RefactoringStatusEntry;
+import org.eclipse.ltk.core.refactoring.TextEditChangeGroup;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+import org.eclipse.search.internal.core.text.FileCharSequenceProvider;
+import org.eclipse.text.edits.MultiTextEdit;
+import org.eclipse.text.edits.ReplaceEdit;
+import org.eclipse.text.edits.TextEdit;
+import org.eclipse.text.edits.TextEditGroup;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.tests.BaseTestFramework;
+
+import org.eclipse.cdt.internal.core.dom.SavedCodeReaderFactory;
+
+
+/**
+ * @author markus.schorn at windriver.com
+ */
+public class RefactoringTests extends BaseTestFramework {
+    private int fBufferSize;
+
+    public RefactoringTests() {
+    }
+
+    public RefactoringTests(String name) {
+        super(name);
+    }
+
+    @Override
+	protected void setUp() throws Exception {
+        super.setUp();
+        CCorePlugin.getIndexManager().setIndexerId(cproject, IPDOMManager.ID_FAST_INDEXER);
+        fBufferSize= FileCharSequenceProvider.BUFFER_SIZE;
+        FileCharSequenceProvider.BUFFER_SIZE= 1024*4;
+    }
+
+    @Override
+	protected void tearDown() throws Exception {
+        super.tearDown();
+        SavedCodeReaderFactory.getInstance().getCodeReaderCache().flush();
+        FileCharSequenceProvider.BUFFER_SIZE= fBufferSize;
+    }
+
+    protected void assertTotalChanges(int numChanges, Change changes) throws Exception {
+        assertTotalChanges(numChanges, 0, 0, changes);
+    }
+
+    protected void assertTotalChanges(int numChanges, int potChanges, int commentCh, 
+            Change changes) throws Exception {
+        int count[]= {0,0,0};
+        if( changes != null ) {
+            countChanges( changes, count);
+        }
+        assertEquals( numChanges, count[0] );
+        assertEquals("potential changes: ", potChanges, count[1]); //$NON-NLS-1$
+        assertEquals("comment changes: ", commentCh, count[2]); //$NON-NLS-1$
+    }
+
+    private void countChanges(Change change, int[] count) {
+        if( change instanceof CompositeChange ){
+            Change [] children = ((CompositeChange) change).getChildren();
+            for( int i = 0; i < children.length; i++ ){
+                countChanges( children[i], count);
+            }
+        } else if( change instanceof TextFileChange ){
+            TextFileChange tfc= (TextFileChange) change;
+            TextEditChangeGroup[] tecgs= tfc.getTextEditChangeGroups();
+            for (int i = 0; i < tecgs.length; i++) {
+                TextEditChangeGroup group = tecgs[i];
+                countChanges(group, count);
+            }
+        }
+    }
+
+    private void countChanges(TextEditChangeGroup edit, int[] count) {
+        String name= edit.getName();
+        if (name.indexOf("potential") != -1) { //$NON-NLS-1$
+            count[1]++;
+        }
+        else if (name.indexOf("comment") != -1) { //$NON-NLS-1$
+            count[2]++;
+        }
+        else {
+            count[0]++;
+        }
+    }
+
+    protected void assertChange(Change changes, IFile file, int startOffset, int numChars, String newText) throws Exception {
+        assertChange(changes, file, startOffset, numChars, newText, false);
+    }
+
+    protected void assertChange(Change changes, IFile file, int startOffset, int numChars, String newText, boolean potential) throws Exception {
+        boolean found = false;
+        if( changes != null && changes instanceof CompositeChange ){
+            found = checkCompositeChange( (CompositeChange) changes, file, startOffset, numChars, newText, potential);
+        }
+        
+        if( !found ) {
+            fail ("Rename at offset " + startOffset + " in \"" + file.getLocation() + "\" not found.");  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+            assertFalse( true );
+        }
+    }
+
+    private boolean checkCompositeChange(CompositeChange composite, IFile file, int startOffset, int numChars, String newText, boolean potential) {
+        boolean found = false;
+        Change [] children = composite.getChildren();
+        for( int i = 0; i < children.length; i++ ){
+            if( children[i] instanceof CompositeChange )
+                found = checkCompositeChange( (CompositeChange) children[i], file, startOffset, numChars, newText, potential);
+            else if( children[i] instanceof TextFileChange ){
+                TextFileChange tuChange = (TextFileChange) children[i];
+                if( tuChange.getFile().toString().equals( file.toString() ) ){
+                    found = checkTranslationUnitChange( tuChange, startOffset, numChars, newText, potential );
+                }
+            }
+            if( found )
+                return found;
+        }
+        return found;
+    }
+
+    private boolean checkTranslationUnitChange(TextFileChange change, int startOffset, int numChars, String newText, boolean potential) {
+        TextEditChangeGroup[] groups= change.getTextEditChangeGroups();
+        for (int i = 0; i < groups.length; i++) {
+            TextEditGroup group = groups[i].getTextEditGroup();
+            if ((group.getName().indexOf("potential") != -1) == potential) {  //$NON-NLS-1$
+                TextEdit[] edits= group.getTextEdits();
+                if (checkTextEdits(edits, startOffset, numChars, newText)) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    private boolean checkTextEdit(TextEdit edit, int startOffset, int numChars, String newText) {
+        if (edit instanceof MultiTextEdit) {
+            if (checkTextEdits(((MultiTextEdit) edit).getChildren(), 
+                    startOffset, numChars, newText)) {
+                return true;
+            }
+        }
+        else if (edit instanceof ReplaceEdit) {
+            if (checkReplaceEdit((ReplaceEdit) edit, startOffset, numChars, newText ) ) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean checkTextEdits(TextEdit[] edits, int startOffset, int numChars, String newText) {
+        for (int i = 0; i < edits.length; i++) {
+            TextEdit edit = edits[i];
+            if (checkTextEdit(edit, startOffset, numChars, newText)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean checkReplaceEdit(ReplaceEdit edit, int startOffset, int numChars, String newText) {
+        return ( edit.getOffset() == startOffset && edit.getLength() == numChars && edit.getText().equals( newText ) );
+    }
+    
+    protected IFile createCppFwdDecls(String fileName) throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class class_fwd;         \n"); //$NON-NLS-1$
+        writer.write( "struct struct_fwd;       \n"); //$NON-NLS-1$
+        writer.write( "union union_fwd;         \n"); //$NON-NLS-1$
+        writer.write( "int func_proto();        \n"); //$NON-NLS-1$
+        writer.write( "int func_proto_ov();     \n"); //$NON-NLS-1$
+        writer.write( "int func_proto_ov(int);  \n"); //$NON-NLS-1$
+        writer.write( "int func_proto_ov(int*); \n"); //$NON-NLS-1$
+        writer.write( "extern int extern_var;   \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        return importFile(fileName, contents ); 
+    }
+
+    protected IFile createCFwdDecls(String fileName) throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "struct struct_fwd;       \n"); //$NON-NLS-1$
+        writer.write( "union union_fwd;         \n"); //$NON-NLS-1$
+        writer.write( "int func_proto();        \n"); //$NON-NLS-1$
+        writer.write( "extern int extern_var;   \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        return importFile(fileName, contents ); 
+    }
+
+    protected IFile createCppDefs(String fileName) throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class class_def {               \n"); //$NON-NLS-1$
+        writer.write( "public:                         \n"); //$NON-NLS-1$
+        writer.write( "   int member;                  \n"); //$NON-NLS-1$
+        writer.write( "   static int static_member;    \n"); //$NON-NLS-1$
+        writer.write( "   void method(int par);        \n"); //$NON-NLS-1$
+        writer.write( "   void static_method(int par); \n"); //$NON-NLS-1$
+        writer.write( "   int method_ov();             \n"); //$NON-NLS-1$
+        writer.write( "   int method_ov(int);          \n"); //$NON-NLS-1$
+        writer.write( "   int method_ov(int*);         \n"); //$NON-NLS-1$
+        writer.write( "};                              \n"); //$NON-NLS-1$
+        writer.write( "struct struct_def {        \n"); //$NON-NLS-1$
+        writer.write( "   int st_member;          \n"); //$NON-NLS-1$
+        writer.write( "};                         \n"); //$NON-NLS-1$
+        writer.write( "union union_def {          \n"); //$NON-NLS-1$
+        writer.write( "   int un_member;          \n"); //$NON-NLS-1$
+        writer.write( "};                         \n"); //$NON-NLS-1$
+        writer.write( "typedef int typedef_def;   \n"); //$NON-NLS-1$
+        writer.write( "namespace namespace_def{}; \n"); //$NON-NLS-1$
+        writer.write( "enum enum_def {            \n"); //$NON-NLS-1$
+        writer.write( "   enum_item };            \n"); //$NON-NLS-1$
+        writer.write( "int func_def() {}          \n"); //$NON-NLS-1$
+        writer.write( "int func_def_ov() {}       \n"); //$NON-NLS-1$
+        writer.write( "int func_def_ov(int){}     \n"); //$NON-NLS-1$
+        writer.write( "int func_def_ov(int*){}    \n"); //$NON-NLS-1$
+        writer.write( "int var_def;               \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        return importFile(fileName, contents ); 
+    }
+
+    protected IFile createCDefs(String fileName) throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "struct struct_def {        \n"); //$NON-NLS-1$
+        writer.write( "   int st_member;          \n"); //$NON-NLS-1$
+        writer.write( "};                         \n"); //$NON-NLS-1$
+        writer.write( "union union_def {          \n"); //$NON-NLS-1$
+        writer.write( "   int un_member;          \n"); //$NON-NLS-1$
+        writer.write( "};                         \n"); //$NON-NLS-1$
+        writer.write( "typedef int typedef_def;   \n"); //$NON-NLS-1$
+        writer.write( "enum enum_def {            \n"); //$NON-NLS-1$
+        writer.write( "   enum_item };            \n"); //$NON-NLS-1$
+        writer.write( "int func_def() {}          \n"); //$NON-NLS-1$
+        writer.write( "int var_def;               \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        return importFile(fileName, contents ); 
+    }
+
+    protected void assertRefactoringError(RefactoringStatus status, String msg) {
+        RefactoringStatusEntry e= status.getEntryMatchingSeverity(RefactoringStatus.ERROR);
+        assertNotNull("Expected refactoring error!", e); //$NON-NLS-1$
+        assertEquals(msg, e.getMessage());
+    }
+
+    protected void assertRefactoringWarning(RefactoringStatus status, String msg) {
+        RefactoringStatusEntry e= status.getEntryMatchingSeverity(RefactoringStatus.WARNING);
+        assertNotNull("Expected refactoring warning!", e); //$NON-NLS-1$
+        assertEquals(msg, e.getMessage());
+    }
+
+    protected void assertRefactoringOk(RefactoringStatus status) {
+        assertTrue("Expected refactoring status ok: " + //$NON-NLS-1$
+                status.getMessageMatchingSeverity(status.getSeverity()), 
+                status.getSeverity()==RefactoringStatus.OK); 
+    }
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameFunctionTests.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameFunctionTests.java
new file mode 100644
index 0000000..c838322
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameFunctionTests.java
@@ -0,0 +1,815 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 Wind River Systems, Inc.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.rename;
+
+import java.io.StringWriter;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+
+public class RenameFunctionTests extends RenameTests {
+
+    public RenameFunctionTests(String name) {
+        super(name);
+    }
+    public static Test suite(){
+        return suite(true);
+    }
+    public static Test suite( boolean cleanup ) {
+        TestSuite suite = new TestSuite(RenameFunctionTests.class); 
+
+        if (cleanup) {
+            suite.addTest( new RefactoringTests("cleanupProject") );    //$NON-NLS-1$
+        }
+        return suite;
+    }
+    
+    public void testFunctionNameConflicts() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("int v1(); int v2(); int v3();  \n"); //$NON-NLS-1$
+        writer.write("static int s1();          \n"); //$NON-NLS-1$
+        writer.write("static int s2();          \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("  {                       \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1();        \n"); //$NON-NLS-1$
+        writer.write("  }                       \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        writer.write("void class_def::method(int par2) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w2; v2();         \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static void class_def::static_method(int par3) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w3; v3();         \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        writer = new StringWriter();
+        writer.write( "static int static_other_file();     \n" ); //$NON-NLS-1$        
+        importFile( "other.cpp", writer.toString() ); //$NON-NLS-1$
+
+
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+        int offset3= contents.indexOf("v3"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w2  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par2  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, offset3, "w3");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w3  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "par3");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par3  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        // renamings depending on scope
+        status= checkConditions(cpp, offset1, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+//        lookup inside a static method also returns non-static members
+//        we may want to have a check whether a binding is accessible or not.
+        
+//        status= checkConditions(cpp, offset3, "member");  //$NON-NLS-1$
+//        assertRefactoringOk(status);
+//        status= checkConditions(cpp, offset3, "method");  //$NON-NLS-1$
+//        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "static_method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        // would be good to see an error here
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "func_proto");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "func_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        // would be good to see an error here
+        status= checkConditions(cpp, offset2, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "func_proto");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "func_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+
+        // renamings that are ok.
+        status= checkConditions(cpp, offset1, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset2, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset3, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        
+        // file static stuff
+        status= checkConditions(cpp, contents.indexOf("s1"), "s2"); //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: s2  \n" +
+        		"Conflicting element type: File static function"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, contents.indexOf("s1"), "static_other_file"); //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringOk(status); 
+    }
+    
+    public void testFunctionsPlainC() throws Exception {
+        createCFwdDecls("c_fwd.h"); //$NON-NLS-1$
+        createCDefs("c_def.h"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"c_fwd.h\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"c_def.h\"   \n"); //$NON-NLS-1$
+        writer.write("int v1(); int v2(); int v3();  \n"); //$NON-NLS-1$
+        writer.write("int func_proto();         \n"); //$NON-NLS-1$
+        writer.write("static int s2();          \n"); //$NON-NLS-1$
+        writer.write("void func_def(){         \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1();        \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.c", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("func_proto"); //$NON-NLS-1$
+        Change change= getRefactorChanges(cpp, offset1, "xxx");  //$NON-NLS-1$
+        assertTotalChanges(2, change);
+
+        offset1= contents.indexOf("func_def"); //$NON-NLS-1$
+        change= getRefactorChanges(cpp, offset1, "xxx");  //$NON-NLS-1$
+        assertTotalChanges(2, change);
+    }
+        
+
+    public void testFunctionNameConflictsPlainC() throws Exception {
+        createCFwdDecls("c_fwd.h"); //$NON-NLS-1$
+        createCDefs("c_def.h"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"c_fwd.h\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"c_def.h\"   \n"); //$NON-NLS-1$
+        writer.write("int v1(); int v2(); int v3();  \n"); //$NON-NLS-1$
+        writer.write("static int s1();          \n"); //$NON-NLS-1$
+        writer.write("static int s2();          \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1();        \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.c", contents ); //$NON-NLS-1$
+        
+        writer = new StringWriter();
+        writer.write( "static int static_other_file();     \n" ); //$NON-NLS-1$        
+        importFile( "other.c", writer.toString() ); //$NON-NLS-1$
+
+
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+
+        // renamings that are ok.
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        
+        // file static stuff
+        status= checkConditions(cpp, contents.indexOf("s1"), "s2"); //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: s2  \n" +
+        		"Conflicting element type: File static function"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, contents.indexOf("s1"), "static_other_file"); //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringOk(status); 
+    }
+
+    public void testMethodNameConflicts1() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("class Dummy {             \n"); //$NON-NLS-1$
+        writer.write("  int v1(); int v2();     \n"); //$NON-NLS-1$        
+        writer.write("  int member;             \n"); //$NON-NLS-1$
+        writer.write("  int method(int);        \n"); //$NON-NLS-1$
+        writer.write("  int method_samesig();        \n"); //$NON-NLS-1$
+        writer.write("  static int static_method(int);  \n"); //$NON-NLS-1$
+        writer.write("  static int static_member;       \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$        
+        writer.write("int Dummy::method(int par1) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1();         \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static int Dummy::static_method(int par2) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w2; v2();         \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("w1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w2  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par2  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Overloading  \n" +
+        		"New element: method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "method_samesig");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: method_samesig  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: static_member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Overloading  \n" +
+        		"New element: static_method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+    }
+
+    public void testMethodNameConflicts2() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("class Dummy {             \n"); //$NON-NLS-1$
+        writer.write("  int v1(), v2(), v3();   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$        
+        writer.write("Dummy d;                  \n"); //$NON-NLS-1$        
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("  {                       \n"); //$NON-NLS-1$
+        writer.write("     int w1; d.v1();      \n"); //$NON-NLS-1$
+        writer.write("  }                       \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        writer.write("void class_def::method(int par2) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w2; d.v2();       \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static void class_def::static_method(int par3) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w3; d.v3();       \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+        int offset3= contents.indexOf("v3"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+
+        status= checkConditions(cpp, offset3, "w3");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "par3");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+
+        // renamings depending on scope
+        status= checkConditions(cpp, offset1, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset1, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "class_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset2, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "class_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset3, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "class_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+    }
+    
+    public void testBug72605() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("class Foo {               \n"); //$NON-NLS-1$
+        writer.write("  void m1(int x=0);       \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("void Foo::m1(int x) {}    \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset =  contents.indexOf("m1") ; //$NON-NLS-1$
+        int offset2=  contents.indexOf("m1", offset+1) ; //$NON-NLS-1$        
+        Change changes = getRefactorChanges(cpp, offset, "z"); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        changes = getRefactorChanges(cpp, offset2, "z"); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+    }
+    
+    public void testBug72732() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("class Foo {               \n"); //$NON-NLS-1$
+        writer.write("  virtual void mthd() = 0;\n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("class Moo: public Foo{    \n"); //$NON-NLS-1$
+        writer.write("  void mthd() = 0;        \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf("mthd") ; //$NON-NLS-1$
+        offset=  contents.indexOf("mthd", offset+1) ; //$NON-NLS-1$        
+        Change changes = getRefactorChanges(cpp, offset, "z"); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameMacroTests.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameMacroTests.java
new file mode 100644
index 0000000..dd5c787
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameMacroTests.java
@@ -0,0 +1,223 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 Wind River Systems, Inc.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation 
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.rename;
+
+import java.io.StringWriter;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+
+public class RenameMacroTests extends RenameTests {
+
+    public RenameMacroTests(String name) {
+        super(name);
+    }
+    public static Test suite(){
+        return suite(true);
+    }
+    public static Test suite( boolean cleanup ) {
+        TestSuite suite = new TestSuite(RenameMacroTests.class); 
+        if (cleanup) {
+            suite.addTest( new RefactoringTests("cleanupProject") );    //$NON-NLS-1$
+        }
+        return suite;
+    }
+    
+    
+    public void testMacroRename() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("#define HALLO x   \n"); //$NON-NLS-1$
+        writer.write("class v1 {                \n"); //$NON-NLS-1$
+        writer.write(" int HALLO;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("class HALLO {                \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("class v3 {                \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("class v4 {                \n"); //$NON-NLS-1$
+        writer.write(" int HALLO();          \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("int v4::HALLO(){}      \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("  {                       \n"); //$NON-NLS-1$
+        writer.write("     int HALLO; v1::v++;    \n"); //$NON-NLS-1$
+        writer.write("  }                       \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("HALLO"); //$NON-NLS-1$
+        int offset2= contents.indexOf("HALLO", offset1+1); //$NON-NLS-1$
+        
+        Change ch= getRefactorChanges(cpp, offset1, "WELT");  //$NON-NLS-1$
+        assertTotalChanges(6, ch);
+        int off= offset1;
+        assertChange(ch, cpp, off, 5, "WELT"); //$NON-NLS-1$
+        off= contents.indexOf("HALLO", off+1); //$NON-NLS-1$
+        assertChange(ch, cpp, off, 5, "WELT"); //$NON-NLS-1$
+        off= contents.indexOf("HALLO", off+1); //$NON-NLS-1$
+        assertChange(ch, cpp, off, 5, "WELT"); //$NON-NLS-1$
+        off= contents.indexOf("HALLO", off+1); //$NON-NLS-1$
+        assertChange(ch, cpp, off, 5, "WELT"); //$NON-NLS-1$
+        off= contents.indexOf("HALLO", off+1); //$NON-NLS-1$
+        assertChange(ch, cpp, off, 5, "WELT"); //$NON-NLS-1$
+        off= contents.indexOf("HALLO", off+1); //$NON-NLS-1$
+        assertChange(ch, cpp, off, 5, "WELT"); //$NON-NLS-1$
+        off= contents.indexOf("HALLO", off+1); //$NON-NLS-1$
+
+        ch= getRefactorChanges(cpp, offset2, "WELT");  //$NON-NLS-1$
+        assertTotalChanges(6, ch);
+        off= offset1;
+        assertChange(ch, cpp, off, 5, "WELT"); //$NON-NLS-1$
+        off= contents.indexOf("HALLO", off+1); //$NON-NLS-1$
+        assertChange(ch, cpp, off, 5, "WELT"); //$NON-NLS-1$
+        off= contents.indexOf("HALLO", off+1); //$NON-NLS-1$
+        assertChange(ch, cpp, off, 5, "WELT"); //$NON-NLS-1$
+        off= contents.indexOf("HALLO", off+1); //$NON-NLS-1$
+        assertChange(ch, cpp, off, 5, "WELT"); //$NON-NLS-1$
+        off= contents.indexOf("HALLO", off+1); //$NON-NLS-1$
+        assertChange(ch, cpp, off, 5, "WELT"); //$NON-NLS-1$
+        off= contents.indexOf("HALLO", off+1); //$NON-NLS-1$
+        assertChange(ch, cpp, off, 5, "WELT"); //$NON-NLS-1$
+        off= contents.indexOf("HALLO", off+1); //$NON-NLS-1$
+    }
+    
+    public void testMacroNameConflicts() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#define MACRO 1           \n"); //$NON-NLS-1$
+        writer.write("int v1(); int v2(); int v3();  \n"); //$NON-NLS-1$
+        writer.write("static int s1();          \n"); //$NON-NLS-1$
+        writer.write("static int s2();          \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1();        \n"); //$NON-NLS-1$
+        writer.write("     extern_var;          \n"); //$NON-NLS-1$
+        writer.write("     var_def;             \n"); //$NON-NLS-1$
+        writer.write("     enum_item;           \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        writer = new StringWriter();
+        writer.write( "static int static_other_file();     \n" ); //$NON-NLS-1$        
+        importFile( "other.cpp", writer.toString() ); //$NON-NLS-1$
+        waitForIndexer();
+
+
+        int offset1= contents.indexOf("MACRO"); //$NON-NLS-1$
+        
+        // conflicts after renaming
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Name conflict  \n" +
+        		"New element: w1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("par1"), "MACRO");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "'MACRO' conflicts with the name of an existing macro!"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Name conflict  \n" +
+        		"New element: par1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Name conflict  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Name conflict  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Name conflict  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+   }
+
+    public void testClassMacroClash() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("class CC {int a;};         \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+
+        writer = new StringWriter();
+        writer.write("#define CC mm              \n"); //$NON-NLS-1$
+        writer.write("int CC;                   \n"); //$NON-NLS-1$
+        String contents2 = writer.toString();
+        IFile cpp2= importFile("test2.cpp", contents2 ); //$NON-NLS-1$
+
+        int offset1= contents.indexOf("CC"); //$NON-NLS-1$
+        Change ch= getRefactorChanges(cpp, offset1, "CCC");  //$NON-NLS-1$
+        assertTotalChanges(1, ch);
+
+        int offset2= contents2.indexOf("CC"); //$NON-NLS-1$
+        ch= getRefactorChanges(cpp2, offset2, "CCC");  //$NON-NLS-1$
+        assertTotalChanges(2, ch);
+    }
+    
+    public void testIncludeGuard() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("#ifndef _guard            \n"); //$NON-NLS-1$
+        writer.write("#define _guard            \n"); //$NON-NLS-1$
+        writer.write(" int HALLO                \n"); //$NON-NLS-1$
+        writer.write("#endif /* _guard */       \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("_guard"); //$NON-NLS-1$
+        int offset2= contents.indexOf("_guard", offset1+1); //$NON-NLS-1$
+        Change ch= getRefactorChanges(cpp, offset2, "WELT");  //$NON-NLS-1$
+        assertTotalChanges(2, 0, 1, ch);
+        int off= offset1;
+        assertChange(ch, cpp, off, 6, "WELT"); //$NON-NLS-1$
+        off= contents.indexOf("_guard", off+1); //$NON-NLS-1$
+        assertChange(ch, cpp, off, 6, "WELT"); //$NON-NLS-1$
+    }
+    
+    public void testMacroParameters() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("int var;                  \n"); //$NON-NLS-1$
+        writer.write("#define M1(var) var       \n"); //$NON-NLS-1$
+        writer.write("#define M2(var, x) (var+x)*var  \n"); //$NON-NLS-1$
+        writer.write("#define M3 var            \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("var"); //$NON-NLS-1$
+        Change ch= getRefactorChanges(cpp, offset1, "xxx");  //$NON-NLS-1$
+        assertTotalChanges(1, 1, 0, ch);
+    }
+
+    public void testRenameMacroAsMacroArgument() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("#define M1(var) var       \n"); //$NON-NLS-1$
+        writer.write("#define M2 1              \n"); //$NON-NLS-1$
+        writer.write("int b= M2;                \n"); //$NON-NLS-1$        
+        writer.write("int a= M1(M2);            \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("M2"); //$NON-NLS-1$
+        Change ch= getRefactorChanges(cpp, offset1, "xxx");  //$NON-NLS-1$
+        assertTotalChanges(countOccurrences(contents, "M2"), ch); //$NON-NLS-1$
+    }        
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameRegressionTests.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameRegressionTests.java
new file mode 100644
index 0000000..4e5bc0f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameRegressionTests.java
@@ -0,0 +1,1276 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     Andrew Niefer (IBM Corporation) - initial API and implementation
+ *     Wind River Systems Inc. - ported for new rename implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.rename;
+
+import java.io.StringWriter;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.participants.RenameArguments;
+
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.tests.FailingTest;
+
+public class RenameRegressionTests extends RenameTests {
+
+    public RenameRegressionTests() {
+        super();
+    }
+    public RenameRegressionTests(String name) {
+        super(name);
+    }    
+    
+    public static Test suite(){
+        return suite( true );
+    }
+    public static Test suite( boolean cleanup ) {
+        
+        TestSuite innerSuite= new TestSuite(RenameRegressionTests.class);
+        innerSuite.addTest( new FailingTest(new RenameRegressionTests("_testMethod_35_72726"),72726) ); //$NON-NLS-1$
+        
+        TestSuite suite = new TestSuite("RenameRegressionTests"); //$NON-NLS-1$
+        suite.addTest( innerSuite );
+        suite.addTest( RenameVariableTests.suite(false));
+        suite.addTest( RenameFunctionTests.suite(false));
+        suite.addTest( RenameTypeTests.suite(false));
+        suite.addTest( RenameMacroTests.suite(false));
+        suite.addTest( RenameTemplatesTests.suite(false));
+        
+        if( cleanup )
+            suite.addTest( new RenameRegressionTests("cleanupProject") );    //$NON-NLS-1$
+        
+        return suite;
+    }
+    
+    public void testSimpleRename() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "int boo;    // boo  \n" ); //$NON-NLS-1$
+        writer.write( "#if 0               \n" ); //$NON-NLS-1$
+        writer.write( "boo                 \n" ); //$NON-NLS-1$
+        writer.write( "#endif              \n" ); //$NON-NLS-1$
+        writer.write( "void f() {          \n" ); //$NON-NLS-1$
+        writer.write( "   boo++;           \n" ); //$NON-NLS-1$
+        writer.write( "}                   \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        Change changes = getRefactorChanges( file, contents.indexOf( "boo" ), "ooga" ); //$NON-NLS-1$ //$NON-NLS-2$
+        
+        assertTotalChanges( 2, 1, 1, changes );
+        assertChange( changes, file, contents.indexOf("boo"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("boo++"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+    }
+
+    public void testLocalVar() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "void f() {          \n" ); //$NON-NLS-1$
+        writer.write( "   int boo;         \n" ); //$NON-NLS-1$
+        writer.write( "   boo++;           \n" ); //$NON-NLS-1$
+        writer.write( "   {                \n" ); //$NON-NLS-1$
+        writer.write( "     int boo;       \n" ); //$NON-NLS-1$
+        writer.write( "     boo++;         \n" ); //$NON-NLS-1$
+        writer.write( "   }                \n" ); //$NON-NLS-1$
+        writer.write( "   boo++;           \n" ); //$NON-NLS-1$
+        writer.write( "}                   \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        int offset= contents.indexOf("boo"); //$NON-NLS-1$
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        Change changes = getRefactorChanges( file, offset, "ooga" ); //$NON-NLS-1$ 
+        
+        assertTotalChanges( 3, changes );
+        assertChange( changes, file, offset, 3, "ooga" );  //$NON-NLS-1$
+        offset= contents.indexOf("boo", offset+1); //$NON-NLS-1$
+        assertChange( changes, file, offset, 3, "ooga" );  //$NON-NLS-1$
+        offset= contents.lastIndexOf("boo"); //$NON-NLS-1$
+        assertChange( changes, file, offset, 3, "ooga" );  //$NON-NLS-1$
+    }
+
+    public void testParameter() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "void f(int boo) {   \n" ); //$NON-NLS-1$
+        writer.write( "   boo++;           \n" ); //$NON-NLS-1$
+        writer.write( "   {                \n" ); //$NON-NLS-1$
+        writer.write( "     int boo;       \n" ); //$NON-NLS-1$
+        writer.write( "     boo++;         \n" ); //$NON-NLS-1$
+        writer.write( "   }                \n" ); //$NON-NLS-1$
+        writer.write( "   boo++;           \n" ); //$NON-NLS-1$
+        writer.write( "}                   \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        int offset= contents.indexOf("boo"); //$NON-NLS-1$
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        Change changes = getRefactorChanges( file, offset, "ooga" ); //$NON-NLS-1$ 
+        
+        assertTotalChanges( 3, changes );
+        assertChange( changes, file, offset, 3, "ooga" );  //$NON-NLS-1$
+        offset= contents.indexOf("boo", offset+1); //$NON-NLS-1$
+        assertChange( changes, file, offset, 3, "ooga" );  //$NON-NLS-1$
+        offset= contents.lastIndexOf("boo"); //$NON-NLS-1$
+        assertChange( changes, file, offset, 3, "ooga" );  //$NON-NLS-1$
+    }
+
+    public void testFileStaticVar() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "static int boo;     \n" ); //$NON-NLS-1$
+        writer.write( "void f() {          \n" ); //$NON-NLS-1$
+        writer.write( "   boo++;           \n" ); //$NON-NLS-1$
+        writer.write( "}                   \n" ); //$NON-NLS-1$
+        writer.write( "void g(int boo) {   \n" ); //$NON-NLS-1$
+        writer.write( "   boo++;           \n" ); //$NON-NLS-1$
+        writer.write( "}                   \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        importFile( "t2.cpp", contents ); //$NON-NLS-1$
+        
+        int offset= contents.indexOf("boo"); //$NON-NLS-1$
+        Change changes = getRefactorChanges( file, offset, "ooga" ); //$NON-NLS-1$ 
+        
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, offset, 3, "ooga" );  //$NON-NLS-1$
+        offset= contents.indexOf("boo", offset+1); //$NON-NLS-1$
+        assertChange( changes, file, offset, 3, "ooga" );  //$NON-NLS-1$
+    }
+
+    public void testClass_1() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Boo/*vp1*/{}; \n" ); //$NON-NLS-1$
+        writer.write( "void f() {          \n" ); //$NON-NLS-1$
+        writer.write( "   Boo a;           \n" ); //$NON-NLS-1$
+        writer.write( "}                   \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset= contents.indexOf( "Boo/*vp1*/" ); //$NON-NLS-1$
+        Change changes = getRefactorChanges( file, offset, "Ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("Boo/*vp1*/"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Boo a"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+    }
+    public void testAttribute_2() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Boo{          \n" ); //$NON-NLS-1$
+        writer.write( "  int att1;//vp1,res1   \n" ); //$NON-NLS-1$
+        writer.write( "};                  \n" ); //$NON-NLS-1$
+        writer.write( "void f() {          \n" ); //$NON-NLS-1$
+        writer.write( "   Boo a;           \n" ); //$NON-NLS-1$
+        writer.write( "   a.att1;//res2     \n" ); //$NON-NLS-1$
+        writer.write( "}                   \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "att1;//vp1" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("att1;//vp1,res1"), 4, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("att1;//res2"), 4, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+    }
+    public void testMethod_1() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Foo{                                \n" ); //$NON-NLS-1$
+        writer.write( "public:                                   \n" ); //$NON-NLS-1$
+        writer.write( "  const void* method1(const char*);       \n" ); //$NON-NLS-1$
+        writer.write( "};                                        \n" ); //$NON-NLS-1$
+        writer.write( "const void* Foo::method1(const char* x) { \n"); //$NON-NLS-1$
+        writer.write( "   return (void*) x;                      \n" ); //$NON-NLS-1$
+        writer.write( "}                                         \n" ); //$NON-NLS-1$
+        writer.write( "void test() {                             \n" ); //$NON-NLS-1$
+        writer.write( "     Foo d;                               \n" ); //$NON-NLS-1$
+        writer.write( "     d.method1(\"hello\");                \n" ); //$NON-NLS-1$
+        writer.write( "}                                         \n" ); //$NON-NLS-1$
+        String source = writer.toString();
+        IFile cpp = importFile( "t.cpp", source ); //$NON-NLS-1$
+        //vp1 const
+        int offset = source.indexOf( "method1" ); //$NON-NLS-1$
+        Change changes = getRefactorChanges(cpp, offset, "m1" ); //$NON-NLS-1$
+        assertTotalChanges( 3, changes );
+        assertChange( changes, cpp, source.indexOf("method1"), 7, "m1" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("method1(const"), 7, "m1" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("method1(\"hello"), 7, "m1" );  //$NON-NLS-1$//$NON-NLS-2$
+   }
+
+    public void testMethod_3() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Boo{                   \n" ); //$NON-NLS-1$
+        writer.write( "  int method1(){}//vp1,res1  \n" ); //$NON-NLS-1$
+        writer.write( "};                           \n" ); //$NON-NLS-1$
+        writer.write( "void f() {                   \n" ); //$NON-NLS-1$
+        writer.write( "   Boo a;                    \n" ); //$NON-NLS-1$
+        writer.write( "   a.method1();//res2        \n" ); //$NON-NLS-1$
+        writer.write( "}                            \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "method1(){}//vp1" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("method1(){}//vp1,res1"), 7, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("method1();//res2"), 7, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+    }
+  
+   
+    public void testConstructor_26() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Boo{                   \n" ); //$NON-NLS-1$
+        writer.write( "  Boo(){}//vp1,res1  \n" ); //$NON-NLS-1$
+        writer.write( "};                           \n" ); //$NON-NLS-1$
+        writer.write( "void f() {                   \n" ); //$NON-NLS-1$
+        writer.write( "   Boo a = new Boo();                    \n" ); //$NON-NLS-1$
+        writer.write( "}                            \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "Boo(){}" ) ; //$NON-NLS-1$
+        try {
+            getRefactorChanges(file, offset, "ooga" ); //$NON-NLS-1$
+        } catch (AssertionFailedError e) {
+            assertTrue(e.getMessage().startsWith("Input check on ooga failed.")); //$NON-NLS-1$
+            return;
+        }
+        fail ("An error should have occurred in the input check."); //$NON-NLS-1$
+    }
+    //The constructor name is accepted, but the refactoring doesn't remove the return
+    //type and there is a compile error. Renaming to a constructor should be disabled.
+    //However, the UI does display the error in the preview panel. Defect 78769 states
+    //the error should be shown on the first page. The parser passes, but the UI could be
+    //better.
+    public void testConstructor_27() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Boo{           \n" ); //$NON-NLS-1$
+        writer.write( "  int foo(){}//vp1   \n" ); //$NON-NLS-1$
+        writer.write( "};                   \n" ); //$NON-NLS-1$
+        writer.write( "void f() {           \n" ); //$NON-NLS-1$
+        writer.write( "   Boo a;            \n" ); //$NON-NLS-1$
+        writer.write( "   a.foo();          \n" ); //$NON-NLS-1$
+        writer.write( "}                    \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "foo(){}" ) ; //$NON-NLS-1$
+        try {
+            getRefactorChanges(file, offset, "Boo" ); //$NON-NLS-1$
+        } catch (AssertionFailedError e) {
+            //test passes
+            assertTrue(e.getMessage().startsWith("Input check on Boo failed.")); //$NON-NLS-1$
+            return;
+        }
+        fail ("An error should have occurred in the input check."); //$NON-NLS-1$
+    }
+    public void testDestructor_28() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Boo{           \n" ); //$NON-NLS-1$
+        writer.write( "  ~Boo(){}//vp1      \n" ); //$NON-NLS-1$
+        writer.write( "};                   \n" ); //$NON-NLS-1$
+        writer.write( "void f() {           \n" ); //$NON-NLS-1$
+        writer.write( "   Boo a ;           \n" ); //$NON-NLS-1$
+        writer.write( "   a.~Boo();         \n" ); //$NON-NLS-1$
+        writer.write( "}                    \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "~Boo(){}" ) ; //$NON-NLS-1$
+        try {
+            getRefactorChanges(file, offset, "ooga" ); //$NON-NLS-1$
+        } catch (AssertionFailedError e) {
+            assertTrue(e.getMessage().startsWith("Input check on ooga failed.")); //$NON-NLS-1$
+            return;
+        }
+        fail ("An error should have occurred in the input check."); //$NON-NLS-1$
+    }
+    public void testDestructor_29_72612() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Boo{           \n" ); //$NON-NLS-1$
+        writer.write( "  int foo(){}//vp1   \n" ); //$NON-NLS-1$
+        writer.write( "};                   \n" ); //$NON-NLS-1$
+        writer.write( "void f() {           \n" ); //$NON-NLS-1$
+        writer.write( "   Boo a;            \n" ); //$NON-NLS-1$
+        writer.write( "   a.foo();          \n" ); //$NON-NLS-1$
+        writer.write( "}                    \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "foo(){}" ) ; //$NON-NLS-1$
+        try {
+            getRefactorChanges(file, offset, "~Boo" ); //$NON-NLS-1$
+        } catch (AssertionFailedError e) {
+            //test passes
+            assertTrue(e.getMessage().startsWith("Input check on ~Boo failed.")); //$NON-NLS-1$
+            return;
+        }
+        fail ("An error should have occurred in the input check."); //$NON-NLS-1$
+    }
+    public void testFunction_31() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "void foo(){}             \n" ); //$NON-NLS-1$
+        writer.write( "void foo/*vp1*/(int i){} \n" ); //$NON-NLS-1$
+        writer.write( "class Foo{               \n" ); //$NON-NLS-1$
+        writer.write( "   int method1(){        \n" ); //$NON-NLS-1$
+        writer.write( "    foo(3);              \n" ); //$NON-NLS-1$
+        writer.write( "    foo();               \n" ); //$NON-NLS-1$
+        writer.write( "   }                     \n" ); //$NON-NLS-1$
+        writer.write( "};                       \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "foo/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "ooga" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("foo/*vp1*/"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("foo(3)"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+ 
+   }
+    public void testMethod_32_72717() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Base {                 \n" ); //$NON-NLS-1$
+        writer.write( " virtual void foo()=0;       \n" ); //$NON-NLS-1$
+        writer.write( "};                           \n" ); //$NON-NLS-1$
+        writer.write( "class Derived: public Base { \n" ); //$NON-NLS-1$
+        writer.write( " virtual void foo();         \n" ); //$NON-NLS-1$
+        writer.write( " void foo(char i);           \n" ); //$NON-NLS-1$
+        writer.write( " void moon/*vp1*/(int i);    \n" ); //$NON-NLS-1$
+        writer.write( "};                           \n" ); //$NON-NLS-1$
+         
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "moon/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "foo" ); //$NON-NLS-1$
+        assertTotalChanges( 1, changes );
+        assertChange( changes, file, contents.indexOf("moon/*vp1*/"), 4, "foo" );  //$NON-NLS-1$//$NON-NLS-2$
+        RefactoringStatus status= checkConditions(file, offset, "foo"); //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Overloading  \n" +
+        		"New element: foo  \n" + 
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+   }
+    
+    public void testMethod_33_72605() throws Exception {
+            StringWriter writer = new StringWriter();
+            writer.write( "class Foo {                  \n" ); //$NON-NLS-1$
+            writer.write( " void aMethod/*vp1*/(int x=0);       \n" ); //$NON-NLS-1$
+            writer.write( "};                           \n" ); //$NON-NLS-1$
+            writer.write( "void Foo::aMethod(int x){}   \n" ); //$NON-NLS-1$
+            String contents = writer.toString();
+            IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+            int offset =  contents.indexOf( "aMethod/*vp1*/" ) ; //$NON-NLS-1$
+            Change changes = getRefactorChanges(file, offset, "ooga" ); //$NON-NLS-1$
+            assertTotalChanges( 2, changes );
+            assertChange( changes, file, contents.indexOf("aMethod/*vp1*/"), 7, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+            assertChange( changes, file, contents.indexOf("aMethod(int x)"), 7, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+            
+    }
+
+    public void testMethod_33b_72605() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Foo {                  \n" ); //$NON-NLS-1$
+        writer.write( " void aMethod/*vp1*/(int x=0);       \n" ); //$NON-NLS-1$
+        writer.write( "};                           \n" ); //$NON-NLS-1$
+        String header = writer.toString();
+        IFile hFile= importFile("t.hh", header); //$NON-NLS-1$
+        writer= new StringWriter();
+        writer.write( "#include \"t.hh\"            \n" ); //$NON-NLS-1$
+        writer.write( "void Foo::aMethod(int x){}   \n" ); //$NON-NLS-1$
+        String source = writer.toString();
+        IFile cppfile = importFile( "t.cpp", source ); //$NON-NLS-1$
+        waitForIndexer();
+
+        int hoffset =  header.indexOf( "aMethod" ) ; //$NON-NLS-1$
+        int cppoffset =  source.indexOf( "aMethod" ) ; //$NON-NLS-1$
+        
+        Change changes = getRefactorChanges(hFile, hoffset, "ooga" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, hFile, hoffset, 7, "ooga" );  //$NON-NLS-1$
+        assertChange( changes, cppfile, cppoffset, 7, "ooga" );  //$NON-NLS-1$
+
+        changes = getRefactorChanges(cppfile, cppoffset, "ooga" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, hFile, hoffset, 7, "ooga" );  //$NON-NLS-1$
+        assertChange( changes, cppfile, cppoffset, 7, "ooga" );  //$NON-NLS-1$
+    }
+
+    public void testMethod_34() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Base{              \n" ); //$NON-NLS-1$
+        writer.write( "  virtual void v/*vp1*/()=0;     \n" ); //$NON-NLS-1$
+        writer.write( "};                       \n" ); //$NON-NLS-1$
+        writer.write( "class Derived: Base {    \n" ); //$NON-NLS-1$
+        writer.write( "  void v(){};            \n" ); //$NON-NLS-1$
+        writer.write( "};                       \n" ); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "v/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "ooga" ); //$NON-NLS-1$
+        //dervied method is not renamed; only a warning to rename derived or base class methods
+        assertTotalChanges( 1, changes );
+        assertChange( changes, file, contents.indexOf("v/*vp1*/"), 1, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        
+    }
+    // defect is input for new name is not allowed
+    public void _testMethod_35_72726() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Foo{                               \n" ); //$NON-NLS-1$
+        writer.write( "  Foo& operator *=/*vp1*/(const Foo &rhs);\n" ); //$NON-NLS-1$
+        writer.write( "  Foo& operator==/*vp2*/(const Foo &rhs);\n" ); //$NON-NLS-1$
+        writer.write( "};                                       \n" ); //$NON-NLS-1$
+        writer.write( "Foo& Foo::operator *=(const Foo &rhs){   \n" ); //$NON-NLS-1$
+        writer.write( "  return *this;                          \n" ); //$NON-NLS-1$
+        writer.write( "};                                       \n" ); //$NON-NLS-1$
+        writer.write( "Foo& Foo::operator==(const Foo &rhs){    \n" ); //$NON-NLS-1$
+        writer.write( "  return *this;                          \n" ); //$NON-NLS-1$
+        writer.write( "};                                       \n" ); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        //vp1 with space
+        int offset =  contents.indexOf( "operator *=/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "operator +=" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("operator *=/*vp1*/"), 11, "operator +=" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("operator *=(const"), 11, "operator +=" );  //$NON-NLS-1$//$NON-NLS-2$
+        //vp2 without space
+        offset =  contents.indexOf( "operator==/*vp2*/" ) ; //$NON-NLS-1$
+        changes = getRefactorChanges(file, offset, "operator=" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("operator==/*vp2*/"), 11, "operator=" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("operator==(const"), 11, "operator=" );  //$NON-NLS-1$//$NON-NLS-2$
+       
+   }
+    public void testMethod_39() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Foo{                              \n" ); //$NON-NLS-1$
+        writer.write( "  const void*   method1(const char*);   \n" ); //$NON-NLS-1$
+        writer.write( "  const int   method2(int j);           \n" ); //$NON-NLS-1$
+        writer.write( "};                                      \n" ); //$NON-NLS-1$
+        String header = writer.toString();
+        IFile h = importFile( "t.hh", header ); //$NON-NLS-1$
+       
+        writer = new StringWriter();
+        writer.write( "#include \"t.hh\"                                             \n" ); //$NON-NLS-1$
+        writer.write( "const void* Foo::method1(const char* x){return (void*) x;}    \n" ); //$NON-NLS-1$
+        writer.write( "const int Foo::method2(int){return 5;}             \n" ); //$NON-NLS-1$
+        writer.write( "void test() {                                      \n" ); //$NON-NLS-1$
+        writer.write( "     Foo d;                                        \n" ); //$NON-NLS-1$
+        writer.write( "     d.method1(\"hello\");                         \n" ); //$NON-NLS-1$
+        writer.write( "     int i =d.method2(3);                          \n" ); //$NON-NLS-1$
+        writer.write( "}                                                  \n" ); //$NON-NLS-1$
+        String source = writer.toString();
+        IFile cpp = importFile( "t.cpp", source ); //$NON-NLS-1$
+        waitForIndexer();
+        
+        //vp1 const
+        int offset = header.indexOf( "method1" ); //$NON-NLS-1$
+        Change changes = getRefactorChanges(h, offset, "m1" ); //$NON-NLS-1$
+        assertTotalChanges( 3, changes );
+        assertChange( changes, h, header.indexOf("method1"), 7, "m1" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("method1(const"), 7, "m1" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("method1(\"hello"), 7, "m1" );  //$NON-NLS-1$//$NON-NLS-2$
+        //vp2 const in definition with ::
+        offset = source.indexOf( "method2(int" ); //$NON-NLS-1$
+        changes = getRefactorChanges(cpp, offset, "m2" ); //$NON-NLS-1$
+        assertTotalChanges( 3, changes );
+        assertChange( changes, h, header.indexOf("method2"), 7, "m2" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("method2(int"), 7, "m2" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("method2(3"), 7, "m2" );  //$NON-NLS-1$//$NON-NLS-2$
+        
+   }
+    public void testMethod_40() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Foo{                                   \n" ); //$NON-NLS-1$
+        writer.write( "  static int method1/*vp1*/(const char* x);  \n" ); //$NON-NLS-1$
+        writer.write( "  static int method2/*vp2*/(int);            \n" ); //$NON-NLS-1$
+        writer.write( "};                                           \n" ); //$NON-NLS-1$
+        String header = writer.toString();
+        IFile h = importFile( "t.hh", header ); //$NON-NLS-1$
+       
+        writer = new StringWriter();
+        writer.write( "#include \"t.hh\"                             \n" ); //$NON-NLS-1$
+        writer.write( "static int Foo::method1(const char* x){return 5;}  \n" ); //$NON-NLS-1$
+        writer.write( "static int Foo::method2(int x){return (2);}; \n" ); //$NON-NLS-1$
+        writer.write( "void test() {                                \n" ); //$NON-NLS-1$
+        writer.write( "     Foo::method1(\"hello\");                \n" ); //$NON-NLS-1$
+        writer.write( "     int i =Foo::method2(3);                 \n" ); //$NON-NLS-1$
+        writer.write( "}                                            \n" ); //$NON-NLS-1$
+        String source = writer.toString();
+        IFile cpp = importFile( "t.cpp", source ); //$NON-NLS-1$
+        waitForIndexer();
+
+        //vp1 static method declaration
+        int offset = header.indexOf( "method1/*vp1*/" ); //$NON-NLS-1$
+        Change changes = getRefactorChanges(h, offset, "m1" ); //$NON-NLS-1$
+        assertTotalChanges( 3, changes );
+        assertChange( changes, h, header.indexOf("method1/*vp1*/"), 7, "m1" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("method1(const"), 7, "m1" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("method1(\"hello"), 7, "m1" );  //$NON-NLS-1$//$NON-NLS-2$
+        //vp2 static method definition
+        offset = source.indexOf( "Foo::method2" )+5; //$NON-NLS-1$
+        changes = getRefactorChanges(cpp, offset, "m2" ); //$NON-NLS-1$
+        assertTotalChanges( 3, changes );
+        assertChange( changes, h, header.indexOf("method2/*vp2*/"), 7, "m2" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("method2(int x"), 7, "m2" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("method2(3"), 7, "m2" );  //$NON-NLS-1$//$NON-NLS-2$
+       
+   }
+   
+   public void testMethod_41() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Foo{                                   \n" ); //$NON-NLS-1$
+        writer.write( "public:                                      \n" ); //$NON-NLS-1$
+        writer.write( "  volatile int  method1/*vp1*/(int);         \n" ); //$NON-NLS-1$
+        writer.write( "private:                                     \n" ); //$NON-NLS-1$
+        writer.write( "  int b;                                     \n" ); //$NON-NLS-1$
+        writer.write( "};                                           \n" ); //$NON-NLS-1$
+        String header = writer.toString();
+        IFile h = importFile( "t.hh", header ); //$NON-NLS-1$
+       
+        writer = new StringWriter();
+        writer.write( "#include \"t.hh\"                            \n" ); //$NON-NLS-1$
+        writer.write( "volatile int Foo::method1(int x){return (2);};               \n" ); //$NON-NLS-1$
+        writer.write( "void test() {                                \n" ); //$NON-NLS-1$
+        writer.write( "  Foo d;                             \n" ); //$NON-NLS-1$
+        writer.write( "  int i =d.method1(1);                       \n" ); //$NON-NLS-1$
+        writer.write( "}                                            \n" ); //$NON-NLS-1$
+        String source = writer.toString();
+        IFile cpp = importFile( "t.cpp", source ); //$NON-NLS-1$
+        waitForIndexer();
+
+        //vp1 volatile
+        int offset =  header.indexOf( "method1/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(h, offset, "m1" ); //$NON-NLS-1$
+        assertTotalChanges( 3, changes );
+        assertChange( changes, h, header.indexOf("method1/*vp1*/"), 7, "m1" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("method1(int x"), 7, "m1" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("method1(1"), 7, "m1" );  //$NON-NLS-1$//$NON-NLS-2$
+      
+   }
+   public void testMethod_43() throws Exception {
+    StringWriter writer = new StringWriter();
+    writer.write( "class Foo{                                   \n" ); //$NON-NLS-1$
+    writer.write( "public:                                      \n" ); //$NON-NLS-1$
+    writer.write( "  inline void  method1/*vp1*/(int i) {b=i;}  \n" ); //$NON-NLS-1$
+    writer.write( "private:                                     \n" ); //$NON-NLS-1$
+    writer.write( "  int b;                                     \n" ); //$NON-NLS-1$
+    writer.write( "};                                           \n" ); //$NON-NLS-1$
+    String header = writer.toString();
+    IFile h = importFile( "t.hh", header ); //$NON-NLS-1$
+   
+    writer = new StringWriter();
+    writer.write( "#include \"t.hh\"                            \n" ); //$NON-NLS-1$
+    writer.write( "void test() {                                \n" ); //$NON-NLS-1$
+    writer.write( "  Foo* d;                                    \n" ); //$NON-NLS-1$
+    writer.write( "  d->method1(1);                             \n" ); //$NON-NLS-1$
+    writer.write( "}                                            \n" ); //$NON-NLS-1$
+    String source = writer.toString();
+    IFile cpp = importFile( "t.cpp", source ); //$NON-NLS-1$
+    waitForIndexer();
+
+    //vp1 inline
+    int offset =  header.indexOf( "method1/*vp1*/" ) ; //$NON-NLS-1$
+    Change changes = getRefactorChanges(h, offset, "m1" ); //$NON-NLS-1$
+    assertTotalChanges( 2, changes );
+    assertChange( changes, h, header.indexOf("method1/*vp1*/"), 7, "m1" );  //$NON-NLS-1$//$NON-NLS-2$
+    assertChange( changes, cpp, source.indexOf("method1(1"), 7, "m1" );  //$NON-NLS-1$//$NON-NLS-2$
+  
+   }
+   public void testMethod_44() throws Exception {
+    StringWriter writer = new StringWriter();
+    writer.write( "class Base{              \n" ); //$NON-NLS-1$
+    writer.write( "  virtual void v();      \n" ); //$NON-NLS-1$
+    writer.write( "  int i;                 \n" ); //$NON-NLS-1$
+    writer.write( "};                       \n" ); //$NON-NLS-1$
+    writer.write( "void Base::v(){}         \n" ); //$NON-NLS-1$
+    writer.write( "class Derived: Base {    \n" ); //$NON-NLS-1$
+    writer.write( "  virtual void v/*vp1*/(){}//explicitly virtual          \n" ); //$NON-NLS-1$
+    writer.write( "};                       \n" ); //$NON-NLS-1$
+    writer.write( "class Derived2: Derived {\n" ); //$NON-NLS-1$
+    writer.write( "  void v(){i++;}         \n" ); //$NON-NLS-1$
+    writer.write( "};                       \n" ); //$NON-NLS-1$
+    String contents = writer.toString();
+    IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+    //vp1 implicit virtual method
+    int offset =  contents.indexOf( "v/*vp1*/" ) ; //$NON-NLS-1$
+    Change changes = getRefactorChanges(file, offset, "v1" ); //$NON-NLS-1$
+    assertTotalChanges( 3, changes );
+    assertChange( changes, file, contents.indexOf("v()"), 1, "v1" );  //$NON-NLS-1$//$NON-NLS-2$
+    assertChange( changes, file, contents.indexOf("v/*vp1*/"), 1, "v1" );  //$NON-NLS-1$//$NON-NLS-2$
+    assertChange( changes, file, contents.indexOf("v(){"), 1, "v1" );  //$NON-NLS-1$//$NON-NLS-2$       
+}
+   public void testMethod_45() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Base{              \n" ); //$NON-NLS-1$
+        writer.write( "  virtual void v();      \n" ); //$NON-NLS-1$
+        writer.write( "  int i;                 \n" ); //$NON-NLS-1$
+        writer.write( "};                       \n" ); //$NON-NLS-1$
+        writer.write( "void Base::v(){}         \n" ); //$NON-NLS-1$
+        writer.write( "class Derived: Base {    \n" ); //$NON-NLS-1$
+        writer.write( "  void v/*vp1*/(){}//implicitly virtual          \n" ); //$NON-NLS-1$
+        writer.write( "};                       \n" ); //$NON-NLS-1$
+        writer.write( "class Derived2: Derived {\n" ); //$NON-NLS-1$
+        writer.write( "  void v(){i++;}         \n" ); //$NON-NLS-1$
+        writer.write( "};                       \n" ); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        waitForIndexer();
+        //vp1 implicit virtual method
+        int offset =  contents.indexOf( "v/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "v1" ); //$NON-NLS-1$
+        assertTotalChanges( 4, changes );
+        assertChange( changes, file, contents.indexOf("v()"), 1, "v1" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("v(){}"), 1, "v1" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("v/*vp1*/"), 1, "v1" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("v(){i"), 1, "v1" );  //$NON-NLS-1$//$NON-NLS-2$       
+    }
+
+   public void testStruct_46() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "struct st1/*vp1*/{};             \n" ); //$NON-NLS-1$
+        writer.write( "class c1/*vp1*/{                 \n" ); //$NON-NLS-1$
+        writer.write( "  public: struct st2/*vp2*/{} s; \n" ); //$NON-NLS-1$
+        writer.write( "};                               \n" ); //$NON-NLS-1$
+        writer.write( "namespace N{                     \n" ); //$NON-NLS-1$
+        writer.write( " struct st3/*vp3*/{};            \n" ); //$NON-NLS-1$
+        writer.write( " class c2/*vp1*/{                \n" ); //$NON-NLS-1$
+        writer.write( "   st1 s;                        \n" ); //$NON-NLS-1$
+        writer.write( "   st3 ss;                       \n" ); //$NON-NLS-1$
+        writer.write( "   c2() {                        \n" ); //$NON-NLS-1$
+        writer.write( "     c1::st2 s;                  \n" ); //$NON-NLS-1$
+        writer.write( "   }                             \n" ); //$NON-NLS-1$
+        writer.write( " };                              \n" ); //$NON-NLS-1$
+        writer.write( "}                                \n" ); //$NON-NLS-1$
+           
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        //vp1 global declaration
+        int offset =  contents.indexOf( "st1/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "Ooga1" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("st1/*vp1*/"), 3, "Ooga1" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("st1 s"), 3, "Ooga1" );  //$NON-NLS-1$//$NON-NLS-2$
+        //vp2 Declared in class
+        offset =  contents.indexOf( "st2/*vp2*/" ) ; //$NON-NLS-1$
+        changes = getRefactorChanges(file, offset, "Ooga2" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("st2/*vp2*/"), 3, "Ooga2" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("st2 s"), 3, "Ooga2" );  //$NON-NLS-1$//$NON-NLS-2$
+        //vp3 Declared in namespace
+        offset =  contents.indexOf( "st3/*vp3*/" ) ; //$NON-NLS-1$
+        changes = getRefactorChanges(file, offset, "Ooga3" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("st3/*vp3*/"), 3, "Ooga3" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("st3 ss"), 3, "Ooga3" );  //$NON-NLS-1$//$NON-NLS-2$
+    }
+    public void testUnion_47() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "union st1/*vp1*/{};              \n" ); //$NON-NLS-1$
+        writer.write( "class c1/*vp1*/{                 \n" ); //$NON-NLS-1$
+        writer.write( "  public: union st2/*vp2*/{} s;  \n" ); //$NON-NLS-1$
+        writer.write( "};                               \n" ); //$NON-NLS-1$
+        writer.write( "namespace N{                     \n" ); //$NON-NLS-1$
+        writer.write( " union st3/*vp3*/{};             \n" ); //$NON-NLS-1$
+        writer.write( " class c2/*vp1*/{                \n" ); //$NON-NLS-1$
+        writer.write( "   st1 s;                        \n" ); //$NON-NLS-1$
+        writer.write( "   st3 ss;                       \n" ); //$NON-NLS-1$
+        writer.write( "   c2() {                        \n" ); //$NON-NLS-1$
+        writer.write( "     c1::st2 s;                  \n" ); //$NON-NLS-1$
+        writer.write( "   }                             \n" ); //$NON-NLS-1$
+        writer.write( " };                              \n" ); //$NON-NLS-1$
+        writer.write( "}                                \n" ); //$NON-NLS-1$
+           
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        //vp1 global declaration
+        int offset =  contents.indexOf( "st1/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "Ooga1" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("st1/*vp1*/"), 3, "Ooga1" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("st1 s"), 3, "Ooga1" );  //$NON-NLS-1$//$NON-NLS-2$
+        //vp2 Declared in class
+        offset =  contents.indexOf( "st2/*vp2*/" ) ; //$NON-NLS-1$
+        changes = getRefactorChanges(file, offset, "Ooga2" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("st2/*vp2*/"), 3, "Ooga2" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("st2 s"), 3, "Ooga2" );  //$NON-NLS-1$//$NON-NLS-2$
+        //vp3 Declared in namespace
+        offset =  contents.indexOf( "st3/*vp3*/" ) ; //$NON-NLS-1$
+        changes = getRefactorChanges(file, offset, "Ooga3" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("st3/*vp3*/"), 3, "Ooga3" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("st3 ss"), 3, "Ooga3" );  //$NON-NLS-1$//$NON-NLS-2$
+}
+    public void testEnumeration_48() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "enum e1/*vp1*/{E0};              \n" ); //$NON-NLS-1$
+        writer.write( "class c1 {                       \n" ); //$NON-NLS-1$
+        writer.write( "  public: enum e2/*vp2*/{E1} s;  \n" ); //$NON-NLS-1$
+        writer.write( "};                               \n" ); //$NON-NLS-1$
+        writer.write( "namespace N{                     \n" ); //$NON-NLS-1$
+        writer.write( " enum e3/*vp3*/{};               \n" ); //$NON-NLS-1$
+        writer.write( " class c2/*vp1*/{                \n" ); //$NON-NLS-1$
+        writer.write( "   e1 s;                         \n" ); //$NON-NLS-1$
+        writer.write( "   e3 ss;                        \n" ); //$NON-NLS-1$
+        writer.write( "   c2() {                        \n" ); //$NON-NLS-1$
+        writer.write( "     c1::e2 s;                   \n" ); //$NON-NLS-1$
+        writer.write( "   }                             \n" ); //$NON-NLS-1$
+        writer.write( " };                              \n" ); //$NON-NLS-1$
+        writer.write( "}                                \n" ); //$NON-NLS-1$
+           
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        //vp1 global declaration
+        int offset =  contents.indexOf( "e1/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "Ooga1" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("e1/*vp1*/"), 2, "Ooga1" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("e1 s"), 2, "Ooga1" );  //$NON-NLS-1$//$NON-NLS-2$
+        //vp2 Declared in class
+        offset =  contents.indexOf( "e2/*vp2*/" ) ; //$NON-NLS-1$
+        changes = getRefactorChanges(file, offset, "Ooga2" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("e2/*vp2*/"), 2, "Ooga2" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("e2 s"), 2, "Ooga2" );  //$NON-NLS-1$//$NON-NLS-2$
+        //vp3 Declared in namespace
+        offset =  contents.indexOf( "e3/*vp3*/" ) ; //$NON-NLS-1$
+        changes = getRefactorChanges(file, offset, "Ooga3" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("e3/*vp3*/"), 2, "Ooga3" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("e3 ss"), 2, "Ooga3" );  //$NON-NLS-1$//$NON-NLS-2$
+    }
+    public void testTemplate_49_72626() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "template <class Type>            \n" ); //$NON-NLS-1$
+        writer.write( "class Array/*vp1*/   {           \n" ); //$NON-NLS-1$
+        writer.write( "  public:    Array(){            \n" ); //$NON-NLS-1$
+        writer.write( "   a=new Type[10];               \n" ); //$NON-NLS-1$
+        writer.write( "  }                              \n" ); //$NON-NLS-1$
+        writer.write( "  virtual Type& operator[](int i){return a[i];}  \n" ); //$NON-NLS-1$
+        writer.write( "  protected: Type *a;            \n" ); //$NON-NLS-1$
+        writer.write( "};                               \n" ); //$NON-NLS-1$
+        writer.write( "void f(){                        \n" ); //$NON-NLS-1$
+        writer.write( "   Array <int> a;                 \n" ); //$NON-NLS-1$
+        writer.write( "}                                \n" ); //$NON-NLS-1$
+           
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "Array" ) ; //$NON-NLS-1$
+        Change changes= getRefactorChanges(file, offset, "Arr2" ); //$NON-NLS-1$
+        assertTotalChanges( 3, changes );
+        assertChange( changes, file, offset, 5, "Arr2" );  //$NON-NLS-1$
+        assertChange( changes, file, offset=contents.indexOf("Array", offset+1), 5, "Arr2" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, offset=contents.indexOf("Array", offset+1), 5, "Arr2" );  //$NON-NLS-1$//$NON-NLS-2$
+    }
+     public void testClass_52() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "namespace N1 {           \n" ); //$NON-NLS-1$
+        writer.write( "class Boo{};             \n" ); //$NON-NLS-1$
+        writer.write( "}                        \n" ); //$NON-NLS-1$
+        writer.write( "namespace N2  {          \n" ); //$NON-NLS-1$
+        writer.write( "class Boo/*vp1*/{};      \n" ); //$NON-NLS-1$
+        writer.write( "}                        \n" ); //$NON-NLS-1$
+        writer.write( "void f() {               \n" ); //$NON-NLS-1$
+        writer.write( "   N1::Boo c1;           \n" ); //$NON-NLS-1$
+        writer.write( "   N2::Boo c2;           \n" ); //$NON-NLS-1$
+        writer.write( "}                        \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "Boo/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "Ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("Boo/*vp1*/"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Boo c2"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+    }
+     public void testClass_53() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Foo/*vp1*/ {//ren1     \n" ); //$NON-NLS-1$
+        writer.write( "  Foo();//ren2               \n" ); //$NON-NLS-1$
+        writer.write( "  virtual ~Foo();//ren3      \n" ); //$NON-NLS-1$
+        writer.write( "};                           \n" ); //$NON-NLS-1$
+        writer.write( "Foo::Foo() {}//ren4,5        \n" ); //$NON-NLS-1$
+        writer.write( "Foo::~Foo() {}//ren6,7       \n" ); //$NON-NLS-1$
+        writer.write( "void f() {                   \n" ); //$NON-NLS-1$
+        writer.write( "   Foo *f=new Foo();//ren8,9 \n" ); //$NON-NLS-1$
+        writer.write( "   f->~Foo();//ren10         \n" ); //$NON-NLS-1$
+        writer.write( "}                            \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "Foo/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "Ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 10, changes );
+        assertChange( changes, file, contents.indexOf("Foo/*vp1*/"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo();//ren2"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo();//ren3"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo::Foo() {}//ren4,5"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo() {}//ren4,5"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo::~Foo() {}//ren6,7"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo() {}//ren6,7"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo *f=new Foo();//ren8,9"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo();//ren8,9"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo();//ren10"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+     }
+     public void testAttribute_54() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Boo{                   \n" ); //$NON-NLS-1$
+        writer.write( "  static int att;//vp1,rn1   \n" ); //$NON-NLS-1$
+        writer.write( "};                           \n" ); //$NON-NLS-1$
+        writer.write( "void f() {                   \n" ); //$NON-NLS-1$
+        writer.write( "   Boo a;                    \n" ); //$NON-NLS-1$
+        writer.write( "   a.att;//rn2               \n" ); //$NON-NLS-1$
+        writer.write( "   Boo::att;//rn3            \n" ); //$NON-NLS-1$
+        writer.write( "}                            \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "att;//vp1" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 3, changes );
+        assertChange( changes, file, contents.indexOf("att;//vp1"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("att;//rn2"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("att;//rn3"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+     }
+     public void testClass_55() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Foo{           \n" ); //$NON-NLS-1$
+        writer.write( "  class Hoo{//vp1    \n" ); //$NON-NLS-1$
+        writer.write( "     public: Hoo();  \n" ); //$NON-NLS-1$
+        writer.write( "  };                 \n" ); //$NON-NLS-1$
+        writer.write( "  Foo(){             \n" ); //$NON-NLS-1$
+        writer.write( "     Foo::Hoo h;     \n" ); //$NON-NLS-1$
+        writer.write( "  }                  \n" ); //$NON-NLS-1$
+        writer.write( "};                   \n" ); //$NON-NLS-1$
+        writer.write( "Foo::Hoo::Hoo(){}    \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "Hoo{" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 5, changes );
+        assertChange( changes, file, contents.indexOf("Hoo{//vp1"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Hoo();"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Hoo h;"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Hoo::Hoo(){}"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Hoo(){}"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+    }
+     public void testClass_55_79231() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Boo{};//vp1            \n" ); //$NON-NLS-1$
+        writer.write( "class Foo{               \n" ); //$NON-NLS-1$
+        writer.write( "   Foo() {               \n" ); //$NON-NLS-1$
+        writer.write( "     class Boo{};        \n" ); //$NON-NLS-1$
+        writer.write( "     Boo t;              \n" ); //$NON-NLS-1$
+        writer.write( "     }                   \n" ); //$NON-NLS-1$
+        writer.write( "};                       \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        //defect is that the inner class defined in a method is also renamed, when it 
+        // shouldn't be.
+        int offset =  contents.indexOf( "Boo{};//vp1" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "Ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 1, changes );
+        assertChange( changes, file, contents.indexOf("Boo{};//vp1"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+     }
+     
+     public void testClass_55_72748() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Foo{};//vp1            \n" ); //$NON-NLS-1$
+        writer.write( "void f(){                \n" ); //$NON-NLS-1$
+        writer.write( "  Foo *somePtr;                  \n" ); //$NON-NLS-1$
+        writer.write( "  if (somePtr == reinterpret_cast<Foo*>(0)){}                \n" ); //$NON-NLS-1$
+        writer.write( "}                        \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        //defect is that the Foo in <> is not renamed 
+        int offset =  contents.indexOf( "Foo{};//vp1" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "Ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 3, changes );
+        assertChange( changes, file, contents.indexOf("Foo{};//vp1"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo *somePtr"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo*>(0)"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+      }
+     public void testClass_56() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Foo{};//vp1,rn1            \n" ); //$NON-NLS-1$
+        writer.write( "class Derived: public Foo{//rn2  \n" ); //$NON-NLS-1$
+        writer.write( "  Derived():Foo(){}//rn3         \n" ); //$NON-NLS-1$
+        writer.write( "};                               \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        //defect is that the inner class defined in a method is also renamed, when it 
+        // shouldn't be.
+        int offset =  contents.indexOf( "Foo{};//vp1" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "Ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 3, changes );
+        assertChange( changes, file, contents.indexOf("Foo{};//vp1"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo{//rn2"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo(){}//rn3"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+    }
+     public void testAttribute_61() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Foo{       \n" ); //$NON-NLS-1$
+        writer.write( " private: static int count;//vp1     \n" ); //$NON-NLS-1$
+        writer.write( "};       \n" ); //$NON-NLS-1$
+        String header = writer.toString();
+        IFile h = importFile( "Foo.hh", header ); //$NON-NLS-1$
+        writer = new StringWriter();
+        writer.write( "#include \"Foo.hh\"                   \n" ); //$NON-NLS-1$
+        writer.write( "int Foo::count=10;                           \n" ); //$NON-NLS-1$
+          
+        String source = writer.toString();
+        IFile cpp = importFile( "Foo.cpp", source ); //$NON-NLS-1$
+        int offset =  header.indexOf( "count" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(h, offset, "ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 2, changes );
+        assertChange( changes, h, header.indexOf("count"), 5, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("count"), 5, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        
+     }
+     public void testEnumerator_62() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "enum Foo{E0, E1};//vp1       \n" ); //$NON-NLS-1$
+        String header = writer.toString();
+        IFile h = importFile( "Foo.hh", header ); //$NON-NLS-1$
+        writer = new StringWriter();
+        writer.write( "#include \"Foo.hh\"                   \n" ); //$NON-NLS-1$
+        writer.write( "void f() {                           \n" ); //$NON-NLS-1$
+        writer.write( " int i=E1;                   \n" ); //$NON-NLS-1$
+        writer.write( "}                            \n" ); //$NON-NLS-1$
+          
+        String source = writer.toString();
+        IFile cpp=importFile( "Foo.cpp", source ); //$NON-NLS-1$
+        waitForIndexer();
+        
+        int offset =  header.indexOf( "E1" ) ; //$NON-NLS-1$
+        getRefactorChanges(h, offset, "Ooga" ); //$NON-NLS-1$
+        Change changes = getRefactorChanges(h, offset, "ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 2, changes );
+        assertChange( changes, h, header.indexOf("E1"), 2, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("E1"), 2, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+       
+     }
+     public void testAttribute_63() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Foo{       \n" ); //$NON-NLS-1$
+        writer.write( " int att;        \n" ); //$NON-NLS-1$
+        writer.write( " Foo(int i);     \n" ); //$NON-NLS-1$
+        writer.write( "};       \n" ); //$NON-NLS-1$
+        String header = writer.toString();
+        IFile h = importFile( "Foo.hh", header ); //$NON-NLS-1$
+        writer = new StringWriter();
+        writer.write( "#include \"Foo.hh\"                   \n" ); //$NON-NLS-1$
+        writer.write( "Foo::Foo(int i): att(i) {}                           \n" ); //$NON-NLS-1$
+          
+        String source = writer.toString();
+        IFile cpp = importFile( "Foo.cpp", source ); //$NON-NLS-1$
+        waitForIndexer();
+        
+        int offset =  header.indexOf( "att" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(h, offset, "ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 2, changes );
+        assertChange( changes, h, header.indexOf("att"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("att"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        
+     }
+     public void testAttribute_64() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Foo{               \n" ); //$NON-NLS-1$
+        writer.write( "   private:              \n" ); //$NON-NLS-1$
+        writer.write( "   int b;//vp1,rn1       \n" ); //$NON-NLS-1$
+        writer.write( "   int m(int b) {        \n" ); //$NON-NLS-1$
+        writer.write( "         return b;       \n" ); //$NON-NLS-1$
+        writer.write( "   }                     \n" ); //$NON-NLS-1$
+        writer.write( "   int n() {             \n" ); //$NON-NLS-1$
+        writer.write( "         return b;//rn2  \n" ); //$NON-NLS-1$
+        writer.write( "   }                     \n" ); //$NON-NLS-1$
+        writer.write( "   int o() {             \n" ); //$NON-NLS-1$
+        writer.write( "         int b=2;        \n" ); //$NON-NLS-1$
+        writer.write( "   return b;             \n" ); //$NON-NLS-1$
+        writer.write( " }                       \n" ); //$NON-NLS-1$
+        writer.write( "};                       \n" ); //$NON-NLS-1$
+        String header = writer.toString();
+        IFile h = importFile( "Foo.hh", header ); //$NON-NLS-1$
+        int offset =  header.indexOf( "b;//vp1" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(h, offset, "ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 2, changes );
+        assertChange( changes, h, header.indexOf("b;//vp1"), 1, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, h, header.indexOf("b;//rn2"), 1, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        
+     }
+     public void testAttribute_65() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class A{             \n" ); //$NON-NLS-1$
+        writer.write( "    int x();         \n" ); //$NON-NLS-1$
+        writer.write( "};                   \n" ); //$NON-NLS-1$
+        writer.write( "class B{             \n" ); //$NON-NLS-1$
+        writer.write( "    friend class A;  \n" ); //$NON-NLS-1$
+        writer.write( "    private:         \n" ); //$NON-NLS-1$
+        writer.write( "    int att;         \n" ); //$NON-NLS-1$
+        writer.write( "};                   \n" ); //$NON-NLS-1$
+        String header = writer.toString();
+        IFile h = importFile( "Foo.hh", header ); //$NON-NLS-1$
+        writer = new StringWriter();
+        writer.write( "#include \"Foo.hh\"   \n" ); //$NON-NLS-1$
+        writer.write( "int A::x() {         \n" ); //$NON-NLS-1$
+        writer.write( " B b;                \n" ); //$NON-NLS-1$
+        writer.write( " int att=b.att;      \n" ); //$NON-NLS-1$
+        writer.write( "}                    \n" ); //$NON-NLS-1$
+        String source = writer.toString();
+        IFile cpp = importFile( "Foo.cpp", source ); //$NON-NLS-1$
+        int offset =  header.indexOf( "att" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(h, offset, "ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 2, changes );
+        assertChange( changes, h, header.indexOf("att"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, cpp, source.indexOf("att;"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        
+     }
+     public void testNamespace_66() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "namespace Foo/*vp1*/{            \n" ); //$NON-NLS-1$
+        writer.write( " namespace Baz/*vp2*/ {          \n" ); //$NON-NLS-1$
+        writer.write( "   int i;                \n" ); //$NON-NLS-1$
+        writer.write( " }                       \n" ); //$NON-NLS-1$
+        writer.write( " using namespace Baz;    \n" ); //$NON-NLS-1$
+        writer.write( "}                        \n" ); //$NON-NLS-1$
+        writer.write( "void f() {               \n" ); //$NON-NLS-1$
+        writer.write( "  Foo::i = 1;            \n" ); //$NON-NLS-1$
+        writer.write( "}                        \n" ); //$NON-NLS-1$
+       
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        //vp1 Foo with ref in function
+        int offset =  contents.indexOf( "Foo/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "Ooga" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("Foo/*vp1*/"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo::"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        //vp2 nested Baz with ref in using
+        offset =  contents.indexOf( "Baz/*vp2*/" ) ; //$NON-NLS-1$
+        changes = getRefactorChanges(file, offset, "Wooga" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("Baz/*vp2*/"), 3, "Wooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Baz;"), 3, "Wooga" );  //$NON-NLS-1$//$NON-NLS-2$
+   
+     }
+
+     public void testNamespace_66_79281() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "namespace Foo{           \n" ); //$NON-NLS-1$
+        writer.write( " int i;                  \n" ); //$NON-NLS-1$
+        writer.write( "}                        \n" ); //$NON-NLS-1$
+        writer.write( "namespace Bar/*vp1*/ = Foo;      \n" ); //$NON-NLS-1$
+        writer.write( "void f() {               \n" ); //$NON-NLS-1$
+        writer.write( "  Bar::i = 1;            \n" ); //$NON-NLS-1$
+        writer.write( "}                        \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "Bar/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "Ooga" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("Bar/*vp1*/"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Bar::"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+    } 
+
+    public void testNamespace_66_79282() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "namespace Foo/*vp1*/{}           \n" ); //$NON-NLS-1$
+        writer.write( "namespace Bar = Foo;     \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        //defect is Foo on line 2 is not renamed
+        int offset =  contents.indexOf( "Foo/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "Ooga" ); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, file, contents.indexOf("Foo/*vp1*/"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("Foo;"), 3, "Ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+    }
+    public void testFunction_67() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "void foo/*vp1*/(){}//rn1     \n" ); //$NON-NLS-1$
+        writer.write( "void bar(){                  \n" ); //$NON-NLS-1$
+        writer.write( "  foo();//rn2                \n" ); //$NON-NLS-1$
+        writer.write( "}                            \n" ); //$NON-NLS-1$
+        writer.write( "namespace N{                 \n" ); //$NON-NLS-1$
+        writer.write( "  class A{                   \n" ); //$NON-NLS-1$
+        writer.write( "  A() {foo();}//rn3          \n" ); //$NON-NLS-1$
+        writer.write( "  };                         \n" ); //$NON-NLS-1$
+        writer.write( "}                            \n" ); //$NON-NLS-1$
+         
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "foo/*vp1*/" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "ooga" ); //$NON-NLS-1$
+        assertTotalChanges( 3, changes );
+        assertChange( changes, file, contents.indexOf("foo/*vp1*/"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("foo();//rn2"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("foo();}//rn3"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+   } 
+    public void testVariable_68() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class A{                 \n" ); //$NON-NLS-1$
+        writer.write( "  public: int i;         \n" ); //$NON-NLS-1$
+        writer.write( "};                       \n" ); //$NON-NLS-1$
+        writer.write( "A var;//vp1,rn1          \n" ); //$NON-NLS-1$
+        writer.write( "void f(){                \n" ); //$NON-NLS-1$
+        writer.write( "  int j = ::var.i;//rn2  \n" ); //$NON-NLS-1$
+        writer.write( "}                        \n" ); //$NON-NLS-1$
+        writer.write( "class B{                 \n" ); //$NON-NLS-1$
+        writer.write( "  void g(){              \n" ); //$NON-NLS-1$
+        writer.write( "    var.i=3;//rn3        \n" ); //$NON-NLS-1$
+        writer.write( "  }                      \n" ); //$NON-NLS-1$
+        writer.write( "};                       \n" ); //$NON-NLS-1$
+         
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "var;//vp1" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "ooga" ); //$NON-NLS-1$
+        assertTotalChanges( 3, changes );
+        assertChange( changes, file, contents.indexOf("var;//vp1"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("var.i;//rn2"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+        assertChange( changes, file, contents.indexOf("var.i=3;//rn3"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+   } 
+    public void testVariable_68_79295() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "int var;//vp1            \n" ); //$NON-NLS-1$
+        writer.write( "void f(int var){         \n" ); //$NON-NLS-1$
+        writer.write( "  int i = var;           \n" ); //$NON-NLS-1$
+        writer.write( "}                        \n" ); //$NON-NLS-1$
+           
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        //defect is the argument and local variable var are incorrectly renamed
+        int offset =  contents.indexOf( "var;//vp1" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(file, offset, "ooga" ); //$NON-NLS-1$
+        assertTotalChanges( 1, changes );
+        assertChange( changes, file, contents.indexOf("var;//vp1"), 3, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+    } 
+    //similar to test 92, except this one will continue with warning, or error status
+    //while case in 92 must stop refactor with fatal status
+    public void testClass_81_72620() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "union u_haul{};      \n" ); //$NON-NLS-1$
+        writer.write( "struct s_haul{};     \n" ); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "s_haul" ) ; //$NON-NLS-1$
+        try {
+            getRefactorChanges(file, offset, "u_haul" ); //$NON-NLS-1$
+        } catch (AssertionFailedError e) {
+            assertTrue(e.getMessage().startsWith("Input check on u_haul failed.")); //$NON-NLS-1$
+            return;
+        }
+        fail ("An error should have occurred in the input check."); //$NON-NLS-1$ 
+    }
+    public void testVariable_88_72617() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class A{};               \n" ); //$NON-NLS-1$
+        writer.write( "A a;//vp1                \n" ); //$NON-NLS-1$
+        String header = writer.toString();
+        IFile h = importFile( "Foo.hh", header ); //$NON-NLS-1$
+        writer = new StringWriter();
+        writer.write( "#include \"Foo.hh\"   \n" ); //$NON-NLS-1$
+        writer.write( "void f() {           \n" ); //$NON-NLS-1$
+        writer.write( " A a;                \n" ); //$NON-NLS-1$
+        writer.write( "}                    \n" ); //$NON-NLS-1$
+        String source = writer.toString();
+        importFile( "Foo.cpp", source ); //$NON-NLS-1$
+        int offset =  header.indexOf( "a;//vp1" ) ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(h, offset, "ooga" ); //$NON-NLS-1$
+        
+        assertTotalChanges( 1, changes );
+        assertChange( changes, h, header.indexOf("a;//vp1"), 1, "ooga" );  //$NON-NLS-1$//$NON-NLS-2$
+    }
+    //2 ways to test name collistion on same type:
+    //if you don't know the error message, catch on getRefactorChanges
+    //or if you want to verify a message or severity, use getRefactorMessages
+    //and getRefactorSeverity
+     public void testClass_92A() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Boo{};         \n" ); //$NON-NLS-1$
+        writer.write( "  void f() {}        \n" ); //$NON-NLS-1$
+        writer.write( "};                   \n" ); //$NON-NLS-1$
+        writer.write( "class Foo/*vp1*/{};  \n" ); //$NON-NLS-1$
+        
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "Foo/*vp1*/" ) ; //$NON-NLS-1$
+        try {
+            getRefactorChanges(file, offset, "Boo" ); //$NON-NLS-1$
+        } catch (AssertionFailedError e) {
+            assertTrue(e.getMessage().startsWith("Input check on Boo failed.")); //$NON-NLS-1$
+            return;
+        }
+        fail ("An error or warning should have occurred in the input check."); //$NON-NLS-1$ 
+    }
+    public void testClass_92B() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class A{};           \n" ); //$NON-NLS-1$
+        writer.write( "class B{};//vp1      \n" ); //$NON-NLS-1$
+           
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "B{};//vp1" ) ; //$NON-NLS-1$
+        
+        String[] messages = getRefactorMessages( file, offset, "A" ); //$NON-NLS-1$
+        assertEquals(1, messages.length);
+        assertEquals("A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: A  \n" +
+        		"Conflicting element type: Type", messages[0]);   //$NON-NLS-1$
+        // assert that you cannot refactor because severity is FATAL (4)
+        int s = getRefactorSeverity(file, offset, "A"); //$NON-NLS-1$
+        assertEquals(RefactoringStatus.ERROR,s);
+    }
+    
+    public void testRenameParticipant() throws Exception {
+        TestRenameParticipant.reset();
+        StringWriter writer = new StringWriter();
+        writer.write( "class A{}; " ); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile file = importFile( "t.cpp", contents ); //$NON-NLS-1$
+        int offset =  contents.indexOf( "A" ) ; //$NON-NLS-1$
+        getRefactorChanges(file, offset, "B"); //$NON-NLS-1$
+        assertEquals(1, TestRenameParticipant.getConditionCheckCount());
+        assertEquals(1, TestRenameParticipant.getCreateChangeCount());
+        Object element= TestRenameParticipant.getElement();
+
+        assertNotNull(element);
+        assertTrue(element instanceof IBinding);
+        IBinding binding= (IBinding) element;
+        assertEquals(binding.getName(), "A");  //$NON-NLS-1$
+        
+        RenameArguments args= TestRenameParticipant.staticGetArguments();
+        assertNotNull(args);
+        assertEquals("B", args.getNewName()); //$NON-NLS-1$
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameTemplatesTests.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameTemplatesTests.java
new file mode 100644
index 0000000..b8852a6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameTemplatesTests.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 Wind River Systems, Inc.
+ * 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
+ *
+ * Contributors:
+ * Markus Schorn - initial API and implementation 
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.refactoring.rename;
+
+import java.io.StringWriter;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+
+/**
+ * @author markus.schorn at windriver.com
+ */
+public class RenameTemplatesTests extends RenameTests {
+
+    public RenameTemplatesTests(String name) {
+        super(name);
+    }
+    public static Test suite(){
+        return suite(true);
+    }
+    public static Test suite( boolean cleanup ) {
+        TestSuite suite = new TestSuite(RenameTemplatesTests.class); 
+        if (cleanup) {
+            suite.addTest( new RefactoringTests("cleanupProject") );    //$NON-NLS-1$
+        }
+        return suite;
+    }
+    
+    
+    public void testClassTemplate() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("template <class Type>   \n"); //$NON-NLS-1$
+        writer.write("class Array {                \n"); //$NON-NLS-1$
+        writer.write("public:                   \n"); //$NON-NLS-1$
+        writer.write("   Array(unsigned sz) {}  \n"); //$NON-NLS-1$
+        writer.write("   ~Array(){}             \n"); //$NON-NLS-1$
+        writer.write("   Type& operator[] (unsigned idx); \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("template <class Type>     \n"); //$NON-NLS-1$
+        writer.write("inline Type& Array<Type>::operator[] (unsigned index) {\n"); //$NON-NLS-1$
+        writer.write("   return 1;              \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("Array"); //$NON-NLS-1$
+        
+        RefactoringStatus stat= checkConditions(cpp, offset1, "WELT"); //$NON-NLS-1$
+        assertRefactoringOk(stat);
+        
+        Change ch= getRefactorChanges(cpp, offset1, "WELT");  //$NON-NLS-1$
+        assertTotalChanges(4, ch);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameTests.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameTests.java
new file mode 100644
index 0000000..383ab3a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameTests.java
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 Wind River Systems, Inc.
+ * 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  
+ * 
+ * Contributors: 
+ *    Markus Schorn - initial API and implementation 
+ ******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.refactoring.rename;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.RefactoringStatusEntry;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.index.IIndexManager;
+
+import org.eclipse.cdt.internal.ui.refactoring.rename.CRefactoringArgument;
+import org.eclipse.cdt.internal.ui.refactoring.rename.CRefactory;
+import org.eclipse.cdt.internal.ui.refactoring.rename.CRenameProcessor;
+import org.eclipse.cdt.internal.ui.refactoring.rename.CRenameRefactoring;
+import org.eclipse.cdt.internal.ui.refactoring.rename.TextSearchWrapper;
+
+/**
+ * @author markus.schorn at windriver.com
+ */
+public class RenameTests extends RefactoringTests {
+
+    private static final IProgressMonitor NPM = new NullProgressMonitor();
+
+	public RenameTests(String name) {
+        super(name);
+    }
+
+    public RenameTests() {
+    }
+
+    /**
+     * @param element   The CElement to rename
+     * @param newName   The new name for the element
+     * @return
+     * @throws Exception
+     */
+    public Change getRefactorChanges(IFile file, int offset, String newName) throws Exception {
+        CRenameRefactoring proc = createRefactoring(file, offset, newName);
+        
+        ((CRenameProcessor) proc.getProcessor()).lockIndex();
+        try {
+        	RefactoringStatus rs = checkConditions(proc);
+        	if (!rs.hasError()) {
+        		Change change = proc.createChange( new NullProgressMonitor() );
+        		return change;
+        	} 
+
+        	fail ("Input check on "+ newName + " failed. "+rs.getEntryMatchingSeverity(RefactoringStatus.ERROR) ); //$NON-NLS-1$ //$NON-NLS-2$
+        	//rs.getFirstMessage(RefactoringStatus.ERROR) is not the message displayed in 
+        	//the UI for renaming a method to a constructor, the first message which is only
+        	//a warning is shown in the UI. If you click preview, then the error and the warning
+        	//is shown. 
+        	return null;
+        } finally {
+            ((CRenameProcessor) proc.getProcessor()).unlockIndex();
+        }
+    }
+
+    private CRenameRefactoring createRefactoring(IFile file, int offset, String newName) {
+    	CRefactoringArgument arg= new CRefactoringArgument(file, offset, 0);
+        CRenameProcessor proc= new CRenameProcessor(CRefactory.getInstance(), arg);
+        proc.setReplacementText( newName );
+        proc.setSelectedOptions(-1);
+        proc.setScope(TextSearchWrapper.SCOPE_WORKSPACE);
+        return new CRenameRefactoring(proc);
+    }
+
+    public String[] getRefactorMessages(IFile file, int offset, String newName) throws Exception {
+        String[] result;
+        CRenameRefactoring proc = createRefactoring(file, offset, newName);
+        ((CRenameProcessor) proc.getProcessor()).lockIndex();
+        try {
+        	RefactoringStatus rs = checkConditions(proc);
+        	if (!rs.hasWarning()){
+        		fail ("Input check on "+ newName + " passed. There should have been warnings or errors. ") ; //$NON-NLS-1$ //$NON-NLS-2$
+        		return null;
+        	}
+        	RefactoringStatusEntry[] rse = rs.getEntries();
+        	result = new String[rse.length];
+        	for (int i=0; i< rse.length; i++){
+        		RefactoringStatusEntry entry = rse[i];
+        		result[i]=entry.getMessage();
+
+        	} 
+        	return result;
+        } finally {
+            ((CRenameProcessor) proc.getProcessor()).unlockIndex();
+        }
+    }
+
+    public RefactoringStatus checkConditions(IFile file, int offset, String newName) throws Exception {
+        CRenameRefactoring proc = createRefactoring(file, offset, newName);
+        ((CRenameProcessor) proc.getProcessor()).lockIndex();
+        try {
+        	return checkConditions(proc);
+        } finally {
+            ((CRenameProcessor) proc.getProcessor()).unlockIndex();
+        }
+    }
+    
+    private RefactoringStatus checkConditions(CRenameRefactoring proc) throws CoreException {
+        RefactoringStatus rs =proc.checkInitialConditions(new NullProgressMonitor() );
+        if (!rs.hasError()){
+            rs= proc.checkFinalConditions(new NullProgressMonitor());
+        }
+        return rs;
+    }
+
+    public int getRefactorSeverity(IFile file, int offset, String newName) throws Exception {
+        CRenameRefactoring proc = createRefactoring(file, offset, newName);
+        ((CRenameProcessor) proc.getProcessor()).lockIndex();
+        try {
+        	RefactoringStatus rs = checkConditions(proc);
+
+        	return (rs.getSeverity());
+        } finally {
+            ((CRenameProcessor) proc.getProcessor()).unlockIndex();
+        }
+    }
+
+    protected int countOccurrences(String contents, String lookup) {
+        int idx= contents.indexOf(lookup);
+        int count= 0;
+        while (idx >=0) {
+            count++;
+            idx= contents.indexOf(lookup, idx+lookup.length());
+        }
+        return count;
+    }
+    
+	protected void waitForIndexer() throws InterruptedException {
+		final IIndexManager im = CCorePlugin.getIndexManager();
+		int sleep= 1;
+		while (im.isIndexerSetupPostponed(cproject)) {
+			Thread.sleep(sleep);
+			sleep *= 2;
+			assertTrue(sleep < 2000);
+		}
+		assertTrue(im.joinIndexer(10000, NPM));
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameTypeTests.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameTypeTests.java
new file mode 100644
index 0000000..01c23f6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameTypeTests.java
@@ -0,0 +1,2298 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Wind River Systems, Inc.
+ * 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
+ *
+ * Contributors:
+ * Markus Schorn - initial API and implementation 
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.refactoring.rename;
+
+import java.io.StringWriter;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+
+/**
+ * @author markus.schorn at windriver.com
+ */
+public class RenameTypeTests extends RenameTests {
+
+    public RenameTypeTests(String name) {
+        super(name);
+    }
+    public static Test suite(){
+        return suite(true);
+    }
+    public static Test suite( boolean cleanup ) {
+        TestSuite suite = new TestSuite(RenameTypeTests.class); 
+        if (cleanup) {
+            suite.addTest( new RefactoringTests("cleanupProject") );    //$NON-NLS-1$
+        }
+        return suite;
+    }
+    
+    
+    public void testClassNameConflicts() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("class v1 {                \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("class v2 {                \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("class v3 {                \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("class v4 {                \n"); //$NON-NLS-1$
+        writer.write(" int function();          \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("int v4::function(){}      \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("  {                       \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1::v++;    \n"); //$NON-NLS-1$
+        writer.write("  }                       \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        writer.write("void class_def::method(int par2) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w2; v2::v++;     \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static void class_def::static_method(int par3) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w3; v3::v++;     \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+        int offset3= contents.indexOf("v3"); //$NON-NLS-1$
+        int offset4= contents.indexOf("v4"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "w3");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "par3");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings colliding with types.
+     // renamings colliding with types.
+        status= checkConditions(cpp, offset1, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset2, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        
+        status= checkConditions(cpp, offset3, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset4, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+    }
+
+    public void testNamespaceNameConflicts() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("namespace v4 {            \n"); //$NON-NLS-1$
+        writer.write(" int function();          \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("namespace v1 {            \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("namespace v2 {            \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("namespace v3 {            \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("int v4::function(){}      \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("  {                       \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1::v++;    \n"); //$NON-NLS-1$
+        writer.write("  }                       \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        writer.write("void class_def::method(int par2) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w2; v2::v++;     \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static void class_def::static_method(int par3) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w3; v3::v++;     \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+        int offset3= contents.indexOf("v3"); //$NON-NLS-1$
+        int offset4= contents.indexOf("v4"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "w3");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "par3");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings colliding with types.
+        status= checkConditions(cpp, offset1, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset2, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        
+        status= checkConditions(cpp, offset3, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset4, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+    }
+
+    public void testStructNameConflicts() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("struct v4 {               \n"); //$NON-NLS-1$
+        writer.write(" int function();          \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("struct v1 {               \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("struct v2 {               \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("struct v3 {               \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("int v4::function(){}      \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("  {                       \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1::v++;    \n"); //$NON-NLS-1$
+        writer.write("  }                       \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        writer.write("void class_def::method(int par2) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w2; v2::v++;     \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static void class_def::static_method(int par3) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w3; v3::v++;     \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+        int offset3= contents.indexOf("v3"); //$NON-NLS-1$
+        int offset4= contents.indexOf("v4"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "w3");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "par3");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings colliding with types.
+        status= checkConditions(cpp, offset1, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset2, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        
+        status= checkConditions(cpp, offset3, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset4, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+    }
+
+    public void testStructNameConflictsPlainC() throws Exception {
+        createCFwdDecls("c_fwd.h"); //$NON-NLS-1$
+        createCDefs("c_def.h"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"c_fwd.h\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"c_def.h\"   \n"); //$NON-NLS-1$
+        writer.write("struct v1 {               \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("struct v2 {               \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("struct v3 {               \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("  {                       \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1::v++;    \n"); //$NON-NLS-1$
+        writer.write("  }                       \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings colliding with types.
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+    }
+
+    public void testUnionNameConflicts() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("union v4 {                \n"); //$NON-NLS-1$
+        writer.write(" int function();          \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("union v1 {                \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("union v2 {                \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("union v3 {                \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("int v4::function(){}      \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("  {                       \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1::v++;    \n"); //$NON-NLS-1$
+        writer.write("  }                       \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        writer.write("void class_def::method(int par2) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w2; v2::v++;     \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static void class_def::static_method(int par3) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w3; v3::v++;     \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+        int offset3= contents.indexOf("v3"); //$NON-NLS-1$
+        int offset4= contents.indexOf("v4"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "w3");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "par3");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings colliding with types.
+        status= checkConditions(cpp, offset1, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset2, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        
+        status= checkConditions(cpp, offset3, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset4, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset4, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset4, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+    }
+
+    public void testUnionNameConflictsPlainC() throws Exception {
+        createCFwdDecls("c_fwd.h"); //$NON-NLS-1$
+        createCDefs("c_def.h"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"c_fwd.h\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"c_def.h\"   \n"); //$NON-NLS-1$
+        writer.write("union v1 {                \n"); //$NON-NLS-1$
+        writer.write(" int v;                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("union v1 vv1;             \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("     int w1; vv1.v++;    \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.c", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings colliding with types.
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+    }
+
+    public void testEnumNameConflicts() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("enum v1 {                 \n"); //$NON-NLS-1$
+        writer.write("    v11                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("enum v2 {                 \n"); //$NON-NLS-1$
+        writer.write("    v22                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("enum v3 {                 \n"); //$NON-NLS-1$
+        writer.write("     v33                  \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1 v;        \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        writer.write("void class_def::method(int par2) { \n"); //$NON-NLS-1$
+        writer.write("     int w2; v2 v;         \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static void class_def::static_method(int par3) { \n"); //$NON-NLS-1$
+        writer.write("     int w3; v3 v;         \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+        int offset3= contents.indexOf("v3"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "w3");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "par3");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings colliding with types.
+        status= checkConditions(cpp, offset1, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset2, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        
+        status= checkConditions(cpp, offset3, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+    }
+
+    public void testEnumNameConflictsPlainC() throws Exception {
+        createCppFwdDecls("c_fwd.h"); //$NON-NLS-1$
+        createCppDefs("c_def.h"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"c_fwd.h\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"c_def.h\"   \n"); //$NON-NLS-1$
+        writer.write("enum v1 {                 \n"); //$NON-NLS-1$
+        writer.write("    v11                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("enum v2 {                 \n"); //$NON-NLS-1$
+        writer.write("    v22                   \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("enum v3 {                 \n"); //$NON-NLS-1$
+        writer.write("     v33                  \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("     int w1; enum v1 v;   \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.c", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings colliding with types.
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+    }
+
+    public void testTypedefNameConflicts() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("typedef int v1;           \n"); //$NON-NLS-1$
+        writer.write("typedef long v2;          \n"); //$NON-NLS-1$
+        writer.write("typedef struct {int a;} v3; \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1 v;        \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        writer.write("void class_def::method(int par2) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w2; v2 v;         \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static void class_def::static_method(int par3) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w3; v3 v;         \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+        int offset3= contents.indexOf("v3"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "w3");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "par3");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings colliding with types.
+        status= checkConditions(cpp, offset1, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset2, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        
+        status= checkConditions(cpp, offset3, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringWarning(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: namespace_def  \n" +
+        		"Conflicting element type: Namespace"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+    }
+    
+    public void testTypedefNameConflictsPlainC() throws Exception {
+        createCFwdDecls("c_fwd.h"); //$NON-NLS-1$
+        createCDefs("c_def.h"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"c_fwd.h\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"c_def.h\"   \n"); //$NON-NLS-1$
+        writer.write("typedef int v1;           \n"); //$NON-NLS-1$
+        writer.write("typedef long v2;          \n"); //$NON-NLS-1$
+        writer.write("typedef struct {int a;} v3; \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1 v;        \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.c", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings colliding with types.
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_fwd  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: struct_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: union_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: typedef_def  \n" +
+        		"Conflicting element type: Type"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+    }
+    
+    public void testRenameClass() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("class String              \n"); //$NON-NLS-1$
+        writer.write("{                         \n"); //$NON-NLS-1$
+        writer.write("public:                   \n"); //$NON-NLS-1$
+        writer.write("  String();               \n"); //$NON-NLS-1$
+        writer.write("  String(const String &other); \n"); //$NON-NLS-1$
+        writer.write("  ~String();                   \n"); //$NON-NLS-1$
+        writer.write("  String &operator=( const String &other ); \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("  String::String(){}      \n"); //$NON-NLS-1$
+        writer.write("  String::String(const String &other){}; \n"); //$NON-NLS-1$
+        writer.write("  String::~String(){};                   \n"); //$NON-NLS-1$
+        writer.write("  String& String::operator=( const String &other ) \n"); //$NON-NLS-1$
+        writer.write("     {return *this;}                        \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+
+        int offset1= contents.indexOf("String"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "CString");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        Change ch= getRefactorChanges(cpp, offset1, "CString"); //$NON-NLS-1$
+        assertTotalChanges(countOccurrences(contents, "String"), ch); //$NON-NLS-1$
+    }
+    
+    public void testBug72888() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("class MyEx {};            \n"); //$NON-NLS-1$
+        writer.write("void someFunc() {         \n"); //$NON-NLS-1$
+        writer.write("  throw MyEx();          \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("int main(){               \n"); //$NON-NLS-1$
+        writer.write("   try{                   \n"); //$NON-NLS-1$
+        writer.write("      someFunc();         \n"); //$NON-NLS-1$
+        writer.write("   } catch(MyEx &e) {}    \n"); //$NON-NLS-1$
+        writer.write("   return 0;              \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset =  contents.indexOf("MyEx") ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(cpp, offset, "xx"); //$NON-NLS-1$
+        assertTotalChanges( 3, changes );
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameVariableTests.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameVariableTests.java
new file mode 100644
index 0000000..94f51e9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/RenameVariableTests.java
@@ -0,0 +1,2000 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 Wind River Systems, Inc.
+ * 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
+ *
+ * Contributors:
+ * Markus Schorn - initial API and implementation 
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.refactoring.rename;
+
+import java.io.StringWriter;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+
+/**
+ * @author markus.schorn at windriver.com
+ */
+public class RenameVariableTests extends RenameTests {
+
+    public RenameVariableTests(String name) {
+        super(name);
+    }
+    public static Test suite(){
+        return suite(true);
+    }
+    public static Test suite( boolean cleanup ) {
+        TestSuite suite = new TestSuite(RenameVariableTests.class); 
+
+        if (cleanup) {
+            suite.addTest( new RefactoringTests("cleanupProject") );    //$NON-NLS-1$
+        }
+        return suite;
+    }
+    
+    public void testLocalNameConflicts() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("void f(int par1) {         \n"); //$NON-NLS-1$
+        writer.write("  int v1, x1;              \n"); //$NON-NLS-1$
+        writer.write("  {                       \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1++;        \n"); //$NON-NLS-1$
+        writer.write("  }                       \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        writer.write("void class_def::method(int par2) { \n"); //$NON-NLS-1$
+        writer.write("  int v2;                  \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w2; v2++;         \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static void class_def::static_method(int par3) { \n"); //$NON-NLS-1$
+        writer.write("  int v3;                  \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w3; v3++;         \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+        int offset3= contents.indexOf("v3"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("w1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("x1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w2  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par2  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, offset3, "w3");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w3  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "par3");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par3  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        // renamings depending on scope
+        status= checkConditions(cpp, offset1, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+//        lookup inside a static method also returns non-static members
+//        we may want to have a check whether a binding is accessible or not.
+        
+//        status= checkConditions(cpp, offset3, "member");  //$NON-NLS-1$
+//        assertRefactoringOk(status);
+//        status= checkConditions(cpp, offset3, "method");  //$NON-NLS-1$
+//        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "static_method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+
+        // renamings that are ok.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings that are ok.
+        status= checkConditions(cpp, offset1, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset2, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset3, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+    }
+    
+    public void testLocalNameConflictsPlainC() throws Exception {
+        createCFwdDecls("c_fwd.h"); //$NON-NLS-1$
+        createCDefs("c_def.h"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"c_fwd.h\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"c_def.h\"   \n"); //$NON-NLS-1$
+        writer.write("void f(int par1) {     \n"); //$NON-NLS-1$
+        writer.write("  int v1, x1, w1;      \n"); //$NON-NLS-1$
+        writer.write("  w1++; v1++;          \n"); //$NON-NLS-1$
+        writer.write("}                      \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.c", contents ); //$NON-NLS-1$
+
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: w1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("w1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("x1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        // renamings that are ok.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+    }
+
+
+    public void testParameterNameConflicts() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("void f(int par1, int v1) {\n"); //$NON-NLS-1$
+        writer.write("  {                       \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1++;        \n"); //$NON-NLS-1$
+        writer.write("  }                       \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        writer.write("void class_def::method(int par2, int v2) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w2; v2++;         \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static void class_def::static_method(int par3, int v3) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w3; v3++;         \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+        int offset3= contents.indexOf("v3"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("w1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: par1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w2  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: par2  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, offset3, "w3");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w3  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "par3");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: par3  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        // renamings depending on scope
+        status= checkConditions(cpp, offset1, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+//        lookup inside a static method also returns non-static members
+//        we may want to have a check whether a binding is accessible or not.
+        
+//        status= checkConditions(cpp, offset3, "member");  //$NON-NLS-1$
+//        assertRefactoringOk(status);
+//        status= checkConditions(cpp, offset3, "method");  //$NON-NLS-1$
+//        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "static_method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+
+        // renamings that are ok.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings that are ok.
+        status= checkConditions(cpp, offset1, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset2, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset3, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+    }
+    
+    public void testParameterNameConflictsPlainC() throws Exception {
+        createCFwdDecls("c_fwd.h"); //$NON-NLS-1$
+        createCDefs("c_def.h"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"c_fwd.h\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"c_def.h\"   \n"); //$NON-NLS-1$
+        writer.write("void f(int par1, int v1) {\n"); //$NON-NLS-1$
+        writer.write("     int w1; v1++;        \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile c= importFile("test.c", contents ); //$NON-NLS-1$
+
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(c, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(c, contents.indexOf("w1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(c, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(c, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: par1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(c, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(c, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(c, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        // renamings that are ok.
+        status= checkConditions(c, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        // renamings that are ok.
+        status= checkConditions(c, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+    }
+
+    public void testVaribleNameConflicts() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("int v1, v2, v3;           \n"); //$NON-NLS-1$
+        writer.write("static int s1;            \n"); //$NON-NLS-1$
+        writer.write("static int s2;            \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("  {                       \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1++;        \n"); //$NON-NLS-1$
+        writer.write("  }                       \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        writer.write("void class_def::method(int par2) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w2; v2++;         \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static void class_def::static_method(int par3) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w3; v3++;         \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        writer = new StringWriter();
+        writer.write( "static int static_other_file;     \n" ); //$NON-NLS-1$        
+        importFile( "other.cpp", writer.toString() ); //$NON-NLS-1$
+
+
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+        int offset3= contents.indexOf("v3"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("w1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w2  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par2  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, offset3, "w3");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w3  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "par3");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par3  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        // renamings depending on scope
+        status= checkConditions(cpp, offset1, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+//        lookup inside a static method also returns non-static members
+//        we may want to have a check whether a binding is accessible or not.
+        
+//        status= checkConditions(cpp, offset3, "member");  //$NON-NLS-1$
+//        assertRefactoringOk(status);
+//        status= checkConditions(cpp, offset3, "method");  //$NON-NLS-1$
+//        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "static_member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "static_method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        // would be good to see an error here
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "func_proto");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "func_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        // would be good to see an error here
+        status= checkConditions(cpp, offset2, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "func_proto");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "func_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+
+        // renamings that are ok.
+        status= checkConditions(cpp, offset1, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset2, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset3, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        
+        // file static stuff
+        status= checkConditions(cpp, contents.indexOf("s1"), "s2"); //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: s2  \n" +
+        		"Conflicting element type: File static variable"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, contents.indexOf("s1"), "static_other_file"); //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringOk(status); 
+    }
+
+    public void testVaribleNameConflictsPlainC() throws Exception {
+        createCFwdDecls("c_fwd.h"); //$NON-NLS-1$
+        createCDefs("c_def.h"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"c_fwd.h\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"c_def.h\"   \n"); //$NON-NLS-1$
+        writer.write("int v1;                \n"); //$NON-NLS-1$
+        writer.write("static int s1;            \n"); //$NON-NLS-1$
+        writer.write("static int s2;            \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1++;        \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile c= importFile("test.c", contents ); //$NON-NLS-1$
+        
+        writer = new StringWriter();
+        writer.write( "static int static_other_file;     \n" ); //$NON-NLS-1$        
+        importFile( "other.c", writer.toString() ); //$NON-NLS-1$
+
+
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(c, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(c, contents.indexOf("w1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(c, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(c, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(c, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(c, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(c, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(c, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(c, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+
+        // renamings that are ok.
+        status= checkConditions(c, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        
+        // file static stuff
+        status= checkConditions(c, contents.indexOf("s1"), "s2"); //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: s2  \n" +
+        		"Conflicting element type: File static variable"); //$NON-NLS-1$
+
+        status= checkConditions(c, contents.indexOf("s1"), "static_other_file"); //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringOk(status); 
+    }
+
+    public void testEnumeratorNameConflicts() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("enum E {v1, v2, v3};      \n"); //$NON-NLS-1$
+        writer.write("static int s1;            \n"); //$NON-NLS-1$
+        writer.write("static int s2;            \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("  {                       \n"); //$NON-NLS-1$
+        writer.write("     int w1=v1;           \n"); //$NON-NLS-1$
+        writer.write("  }                       \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        writer.write("void class_def::method(int par2) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w2=v2;            \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static void class_def::static_method(int par3) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w3=v3;            \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        writer = new StringWriter();
+        writer.write( "static int static_other_file;     \n" ); //$NON-NLS-1$        
+        importFile( "other.cpp", writer.toString() ); //$NON-NLS-1$
+
+
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+        int offset3= contents.indexOf("v3"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("w1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w2  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par2  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, offset3, "w3");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w3  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "par3");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par3  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        // renamings depending on scope
+        status= checkConditions(cpp, offset1, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "static_member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "static_method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: static_method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        // would be good to see an error here
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "func_proto");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "func_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        // would be good to see an error here
+        status= checkConditions(cpp, offset2, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "func_proto");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "func_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def_ov  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+
+        // renamings that are ok.
+        status= checkConditions(cpp, offset1, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset2, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset3, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "class_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: class_def  \n" +
+        		"Conflicting element type: Constructor"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        
+        // file static stuff
+        status= checkConditions(cpp, contents.indexOf("s1"), "s2"); //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: s2  \n" +
+        		"Conflicting element type: File static variable"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, contents.indexOf("s1"), "static_other_file"); //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringOk(status); 
+    }
+
+    public void testEnumeratorNameConflictsPlainC() throws Exception {
+        createCFwdDecls("c_fwd.h"); //$NON-NLS-1$
+        createCDefs("c_def.h"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"c_fwd.h\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"c_def.h\"   \n"); //$NON-NLS-1$
+        writer.write("enum E {v1, v2, v3};      \n"); //$NON-NLS-1$
+        writer.write("static int s1;            \n"); //$NON-NLS-1$
+        writer.write("static int s2;            \n"); //$NON-NLS-1$
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("     int w1=v1;           \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile c= importFile("test.c", contents ); //$NON-NLS-1$
+        
+        writer = new StringWriter();
+        writer.write( "static int static_other_file;     \n" ); //$NON-NLS-1$        
+        importFile( "other.cpp", writer.toString() ); //$NON-NLS-1$
+
+
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(c, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(c, contents.indexOf("w1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+        status= checkConditions(c, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+        status= checkConditions(c, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(c, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(c, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(c, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        // renamings conflicting with global stuff.
+        status= checkConditions(c, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_proto  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+        status= checkConditions(c, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: func_def  \n" +
+        		"Conflicting element type: Global function"); //$NON-NLS-1$
+
+        status= checkConditions(c, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(c, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+    }
+
+    public void testMemberNameConflicts1() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("class Dummy {             \n"); //$NON-NLS-1$
+        writer.write("  int v1, v2, v3;         \n"); //$NON-NLS-1$        
+        writer.write("  int member;         \n"); //$NON-NLS-1$
+        writer.write("  int method(int);           \n"); //$NON-NLS-1$
+        writer.write("  static int static_method(int);           \n"); //$NON-NLS-1$
+        writer.write("  static int static_member;         \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$        
+        writer.write("void Dummy::method(int par1) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w1; v1++;       \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static void Dummy::static_method(int par2) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w2; v2++;       \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+        int offset3= contents.indexOf("v3"); //$NON-NLS-1$
+
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w1  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("w1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, contents.indexOf("par1"), "v1");  //$NON-NLS-1$ //$NON-NLS-2$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: v1  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par1  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: w2  \n" +
+        		"Conflicting element type: Local variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: par2  \n" +
+        		"Conflicting element type: Parameter"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: extern_var  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: var_def  \n" +
+        		"Conflicting element type: Global variable"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Shadowing  \n" +
+        		"New element: enum_item  \n" +
+        		"Conflicting element type: Enumerator"); //$NON-NLS-1$
+
+
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: static_member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: static_method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "static_member");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: static_member  \n" +
+        		"Conflicting element type: Field"); //$NON-NLS-1$
+        status= checkConditions(cpp, offset3, "static_method");  //$NON-NLS-1$
+        assertRefactoringError(status, "A conflict was encountered during refactoring.  \n" +
+        		"Type of problem: Redeclaration  \n" +
+        		"New element: static_method  \n" +
+        		"Conflicting element type: Method"); //$NON-NLS-1$
+    }
+
+    public void testMemberNameConflicts2() throws Exception {
+        createCppFwdDecls("cpp_fwd.hh"); //$NON-NLS-1$
+        createCppDefs("cpp_def.hh"); //$NON-NLS-1$
+        StringWriter writer = new StringWriter();
+        writer.write("#include \"cpp_fwd.hh\"   \n"); //$NON-NLS-1$
+        writer.write("#include \"cpp_def.hh\"   \n"); //$NON-NLS-1$
+        writer.write("class Dummy {             \n"); //$NON-NLS-1$
+        writer.write("  int v1, v2, v3;         \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$        
+        writer.write("Dummy d;                  \n"); //$NON-NLS-1$        
+        writer.write("void f(int par1){         \n"); //$NON-NLS-1$
+        writer.write("  {                       \n"); //$NON-NLS-1$
+        writer.write("     int w1; d.v1++;        \n"); //$NON-NLS-1$
+        writer.write("  }                       \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+        writer.write("void class_def::method(int par2) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w2; d.v2++;       \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("static void class_def::static_method(int par3) { \n"); //$NON-NLS-1$
+        writer.write("  {                        \n"); //$NON-NLS-1$
+        writer.write("     int w3; d.v3++;       \n"); //$NON-NLS-1$
+        writer.write("  }                        \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1= contents.indexOf("v1"); //$NON-NLS-1$
+        int offset2= contents.indexOf("v2"); //$NON-NLS-1$
+        int offset3= contents.indexOf("v3"); //$NON-NLS-1$
+        
+        // conflicting renamings
+        RefactoringStatus status= checkConditions(cpp, offset1, "w1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "par1");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset1, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset1, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+
+        status= checkConditions(cpp, offset2, "w2");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "par2");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+
+        status= checkConditions(cpp, offset3, "w3");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "par3");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "extern_var");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "var_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "enum_item");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+
+        // renamings depending on scope
+        status= checkConditions(cpp, offset1, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "member");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "method");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "static_member");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "static_method");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+
+        status= checkConditions(cpp, offset1, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset1, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset1, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset1, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "func_proto");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "func_proto_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "func_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "func_def_ov");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset1, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "class_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset1, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset2, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "class_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset2, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset2, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+
+        status= checkConditions(cpp, offset3, "class_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "struct_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "union_fwd");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "class_def");  //$NON-NLS-1$
+        assertRefactoringOk(status); 
+        status= checkConditions(cpp, offset3, "struct_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "union_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "enum_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "typedef_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "namespace_def");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "st_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+        status= checkConditions(cpp, offset3, "un_member");  //$NON-NLS-1$
+        assertRefactoringOk(status);
+    }
+    
+    public void testReferenceViaMacro() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("#define PASSON(x) (x)         \n"); //$NON-NLS-1$
+        writer.write("#define INC(x) PASSON(/*pc*/x)++         \n"); //$NON-NLS-1$
+        writer.write("void f() {                 \n"); //$NON-NLS-1$
+        writer.write("   int v1;                  \n"); //$NON-NLS-1$
+        writer.write("   INC(/*comment*/ v1);                 \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset =  contents.indexOf("v1") ; //$NON-NLS-1$
+        int offset2=  contents.indexOf("v1", offset+1) ; //$NON-NLS-1$        
+        Change changes = getRefactorChanges(cpp, offset2, "z"); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, cpp, offset, 2, "z" );  //$NON-NLS-1$
+        assertChange( changes, cpp, offset2, 2, "z" );  //$NON-NLS-1$
+    }
+
+    public void testReferenceViaMacro2() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("#define INC(x,y) x+=y      \n"); //$NON-NLS-1$
+        writer.write("void f() {                 \n"); //$NON-NLS-1$
+        writer.write("   int v1,v2;              \n"); //$NON-NLS-1$
+        writer.write("   INC(v2,v1);             \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset =  contents.indexOf("v1") ; //$NON-NLS-1$
+        int offset2= contents.indexOf("v1", offset+1) ; //$NON-NLS-1$  
+        Change changes = getRefactorChanges(cpp, offset2, "z"); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, cpp, offset, 2, "z" );  //$NON-NLS-1$
+        assertChange( changes, cpp, offset2, 2, "z" );  //$NON-NLS-1$
+    }
+
+    public void testReferenceViaMacro3() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("#define INC(x,y) x+=y      \n"); //$NON-NLS-1$
+        writer.write("void f() {                 \n"); //$NON-NLS-1$
+        writer.write("   int v1,v2;              \n"); //$NON-NLS-1$
+        writer.write("   INC(v1,v1);             \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset =  contents.indexOf("v1") ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(cpp, offset, "z"); //$NON-NLS-1$
+        assertTotalChanges( 3, changes );
+        assertChange( changes, cpp, offset, 2, "z" );  //$NON-NLS-1$
+        offset=  contents.indexOf("v1", offset+1) ; //$NON-NLS-1$        
+        assertChange( changes, cpp, offset, 2, "z" );  //$NON-NLS-1$
+        offset=  contents.indexOf("v1", offset+1) ; //$NON-NLS-1$        
+        assertChange( changes, cpp, offset, 2, "z" );  //$NON-NLS-1$
+    }
+
+    public void testReferenceViaMacro4() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("#define INC(x)   v2++      \n"); //$NON-NLS-1$
+        writer.write("void f() {                 \n"); //$NON-NLS-1$
+        writer.write("   int v1;                 \n"); //$NON-NLS-1$
+        writer.write("   INC(v1);                \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset =  contents.indexOf("v1") ; //$NON-NLS-1$
+        Change changes = getRefactorChanges(cpp, offset, "z"); //$NON-NLS-1$
+        assertTotalChanges( 1, 1, 0, changes );
+        assertChange( changes, cpp, offset, 2, "z" );  //$NON-NLS-1$
+    }
+
+    public void testReferenceViaMacro5() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("#define INC(x)   v1++      \n"); //$NON-NLS-1$
+        writer.write("void f() {                 \n"); //$NON-NLS-1$
+        writer.write("   int v1,v2;              \n"); //$NON-NLS-1$
+        writer.write("   INC(v2);                \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        writer.write("void f2() {                 \n"); //$NON-NLS-1$
+        writer.write("   int v12;                  \n"); //$NON-NLS-1$
+        writer.write("   INC(v12);                  \n"); //$NON-NLS-1$
+        writer.write("}                          \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset1=  contents.indexOf("v1") ; //$NON-NLS-1$
+        int offset2=  contents.indexOf("v1", offset1+1) ; //$NON-NLS-1$        
+        Change changes = getRefactorChanges(cpp, offset2, "z"); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, cpp, offset1, 2, "z" );  //$NON-NLS-1$
+        assertChange( changes, cpp, offset2, 2, "z" );  //$NON-NLS-1$
+    }
+    
+    public void testBug72646() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("class C2: public C1 {     \n"); //$NON-NLS-1$
+        writer.write("  C2(int x, int y);       \n"); //$NON-NLS-1$
+        writer.write("  int y;                  \n"); //$NON-NLS-1$
+        writer.write("};                        \n"); //$NON-NLS-1$
+        writer.write("C2::C2(int x, int y)      \n"); //$NON-NLS-1$
+        writer.write("   :C1(x), y(y) {}        \n"); //$NON-NLS-1$
+        String contents = writer.toString();
+        IFile cpp= importFile("test.cpp", contents ); //$NON-NLS-1$
+        
+        int offset =  contents.indexOf("y") ; //$NON-NLS-1$
+        offset=  contents.indexOf("y", offset+1) ; //$NON-NLS-1$        
+        Change changes = getRefactorChanges(cpp, offset, "z"); //$NON-NLS-1$
+        assertTotalChanges( 2, changes );
+        assertChange( changes, cpp, offset, 1, "z" );  //$NON-NLS-1$
+        offset=  contents.indexOf("y", offset+1) ; //$NON-NLS-1$        
+        offset=  contents.indexOf("y", offset+1) ; //$NON-NLS-1$        
+        assertChange( changes, cpp, offset, 1, "z" );  //$NON-NLS-1$
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/TestRenameParticipant.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/TestRenameParticipant.java
new file mode 100644
index 0000000..997526c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/rename/TestRenameParticipant.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Wind River Systems, Inc.
+ * 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  
+ * 
+ * Contributors: 
+ * Markus Schorn - initial API and implementation 
+ ******************************************************************************/ 
+
+package org.eclipse.cdt.ui.tests.refactoring.rename;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.ltk.core.refactoring.*;
+import org.eclipse.ltk.core.refactoring.participants.*;
+
+public class TestRenameParticipant extends RenameParticipant {
+    private static Object sElement= null;
+    private static RenameArguments sArguments= null;
+    private static int sConditionCheck= 0;
+    private static int sCreateChange= 0;
+    
+    public static int getConditionCheckCount() {
+        return sConditionCheck;
+    }
+    
+    public static int getCreateChangeCount() {
+        return sCreateChange;
+    }
+    
+    public static Object getElement() {
+        return sElement;
+    }
+
+    public static RenameArguments staticGetArguments() {
+        return sArguments;
+    }
+
+    public static void reset() {
+        sElement= null;
+        sArguments= null;
+        sConditionCheck= sCreateChange= 0;
+    }
+
+    protected boolean initialize(Object element) {
+        sElement= element;
+        return true;
+    }
+
+    public String getName() {
+        return "TestRenameParticipant"; //$NON-NLS-1$
+    }
+
+    public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) throws OperationCanceledException {
+        sConditionCheck++;
+        sArguments= getArguments();
+        return new RefactoringStatus();
+    }
+
+    public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
+        sCreateChange++;
+        return null;
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/CorrectCaseTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/CorrectCaseTest.java
new file mode 100644
index 0000000..a3ae573
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/CorrectCaseTest.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.utils;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.internal.ui.refactoring.utils.IdentifierHelper;
+import org.eclipse.cdt.internal.ui.refactoring.utils.IdentifierResult;
+
+/**
+ * @author Thomas Corbat
+ *
+ */
+public class CorrectCaseTest extends TestCase {
+
+	public CorrectCaseTest(){
+		super("Check Correct Identifier"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public void runTest() {
+		IdentifierResult result;
+		
+		result = IdentifierHelper.checkIdentifierName("A"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("Z"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("a"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("z"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("_"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("_A"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("_Z"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("_a"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("_z"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("__"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("_0"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("_9"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("Aaaa"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("Zaaa"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("aaaa"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("zaaa"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+		
+		result = IdentifierHelper.checkIdentifierName("_aaa"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.VALID == result.getResult());
+
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/DigitFirstCaseTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/DigitFirstCaseTest.java
new file mode 100644
index 0000000..3367c6b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/DigitFirstCaseTest.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.utils;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.internal.ui.refactoring.utils.IdentifierHelper;
+import org.eclipse.cdt.internal.ui.refactoring.utils.IdentifierResult;
+
+/**
+ * @author Thomas Corbat
+ * 
+ */
+public class DigitFirstCaseTest extends TestCase {
+
+	public DigitFirstCaseTest() {
+		super("Check Digit First Identifier"); //$NON-NLS-1$
+	}
+
+	@Override
+	public void runTest() {
+		IdentifierResult result;
+
+		result = IdentifierHelper.checkIdentifierName("0"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.DIGIT_FIRST == result.getResult());
+
+		result = IdentifierHelper.checkIdentifierName("9"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.DIGIT_FIRST == result.getResult());
+
+		result = IdentifierHelper.checkIdentifierName("0a"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.DIGIT_FIRST == result.getResult());
+
+		result = IdentifierHelper.checkIdentifierName("99"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.DIGIT_FIRST == result.getResult());
+
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/EmptyCaseTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/EmptyCaseTest.java
new file mode 100644
index 0000000..bbb5c2a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/EmptyCaseTest.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.utils;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.internal.ui.refactoring.utils.IdentifierHelper;
+import org.eclipse.cdt.internal.ui.refactoring.utils.IdentifierResult;
+
+/**
+ * @author Thomas Corbat
+ * 
+ */
+public class EmptyCaseTest extends TestCase {
+
+	public EmptyCaseTest() {
+		super("Check Empty Identifier"); //$NON-NLS-1$
+	}
+
+	@Override
+	public void runTest() {
+		IdentifierResult result;
+
+		result = IdentifierHelper.checkIdentifierName(""); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.EMPTY == result.getResult());
+
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/IdentifierHelperTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/IdentifierHelperTest.java
new file mode 100644
index 0000000..33e7bec
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/IdentifierHelperTest.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.utils;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Thomas Corbat
+ * 
+ */
+public class IdentifierHelperTest extends TestSuite {
+
+	public IdentifierHelperTest() {
+		super("Identifier Helper Test"); //$NON-NLS-1$
+	}
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite("Test for Identifier Helper"); //$NON-NLS-1$
+		suite.addTest(new CorrectCaseTest());
+		suite.addTest(new DigitFirstCaseTest());
+		suite.addTest(new EmptyCaseTest());
+		suite.addTest(new IllegalCharCaseTest());
+		suite.addTest(new KeywordCaseTest());
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/IllegalCharCaseTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/IllegalCharCaseTest.java
new file mode 100644
index 0000000..0b6d2f5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/IllegalCharCaseTest.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.utils;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.internal.ui.refactoring.utils.IdentifierHelper;
+import org.eclipse.cdt.internal.ui.refactoring.utils.IdentifierResult;
+
+/**
+ * @author Thomas Corbat
+ * 
+ */
+public class IllegalCharCaseTest extends TestCase {
+
+	public IllegalCharCaseTest() {
+		super("Check Illegal Character Identifier"); //$NON-NLS-1$
+	}
+
+	@Override
+	public void runTest() {
+		IdentifierResult result;
+
+		result = IdentifierHelper.checkIdentifierName("a~"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.ILLEGAL_CHARACTER == result.getResult());
+
+		result = IdentifierHelper.checkIdentifierName("a%"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.ILLEGAL_CHARACTER == result.getResult());
+
+		result = IdentifierHelper.checkIdentifierName("a!"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.ILLEGAL_CHARACTER == result.getResult());
+
+		result = IdentifierHelper.checkIdentifierName("{}"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.ILLEGAL_CHARACTER == result.getResult());
+
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/KeywordCaseTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/KeywordCaseTest.java
new file mode 100644
index 0000000..8cfd6fe
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/KeywordCaseTest.java
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.utils;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.internal.ui.refactoring.utils.IdentifierHelper;
+import org.eclipse.cdt.internal.ui.refactoring.utils.IdentifierResult;
+
+/**
+ * @author Thomas Corbat
+ * 
+ */
+public class KeywordCaseTest extends TestCase {
+
+	public KeywordCaseTest() {
+		super("Check Keyword Identifier"); //$NON-NLS-1$
+	}
+
+	@Override
+	public void runTest() {
+		IdentifierResult result;
+
+		result = IdentifierHelper.checkIdentifierName("using"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("bitand"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("for"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("const_cast"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("namespace"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("break"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("static_cast"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("false"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("volatile"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("template"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("else"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("dynamic_cast"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("static"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("or"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("not_eq"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("class"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("enum"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("typedef"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("restrict"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("and"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("reinterpret_cast"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("not"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("default"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("explicit"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("sizeof"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("auto"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("case"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("this"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("try"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("friend"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("asm"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("virtual"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("const"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("or_eq"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("catch"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("switch"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("goto"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("while"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("private"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("throw"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("protected"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("struct"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("if"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("extern"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("union"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("typeid"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("inline"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("compl"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("delete"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("do"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("xor"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("export"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("bitor"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("return"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("true"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("operator"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("register"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("new"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("and_eq"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("typename"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("continue"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("mutable"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("xor_eq"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+		result = IdentifierHelper.checkIdentifierName("public"); //$NON-NLS-1$
+		assertTrue(result.getMessage(), IdentifierResult.KEYWORD == result.getResult());
+
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/PseudoNameGeneratorTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/PseudoNameGeneratorTest.java
new file mode 100644
index 0000000..cc8644d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/PseudoNameGeneratorTest.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.utils;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.internal.ui.refactoring.utils.PseudoNameGenerator;
+
+/**
+ * @author Mirko Stocker
+ *
+ */
+public class PseudoNameGeneratorTest extends TestCase {
+
+	private static final String CHAR2 = "char2"; //$NON-NLS-1$
+	private static final String INT3 = "int3"; //$NON-NLS-1$
+	private static final String INT2 = "int2"; //$NON-NLS-1$
+	private static final String CHAR = "char"; //$NON-NLS-1$
+	private static final String CHAR1 = "char1"; //$NON-NLS-1$
+	private static final String INT = "int"; //$NON-NLS-1$
+	private static final String INT1 = "int1"; //$NON-NLS-1$
+	private PseudoNameGenerator pseudoNameGenerator;
+
+	@Override
+	protected void setUp() throws Exception {
+		pseudoNameGenerator = new PseudoNameGenerator();
+	}
+	
+	public void testNonConflictingCase() {
+		assertEquals(INT1, pseudoNameGenerator.generateNewName(INT));
+	}
+
+	public void testMultipleNonConflictingCase() {
+		assertEquals(INT1, pseudoNameGenerator.generateNewName(INT));
+		assertEquals(CHAR1, pseudoNameGenerator.generateNewName(CHAR));
+	}
+
+	public void testConflictingCase() {
+		pseudoNameGenerator.addExistingName(INT1);
+		assertEquals(INT2, pseudoNameGenerator.generateNewName(INT));
+	}
+
+	public void testMultipleConflictsCase() {
+		pseudoNameGenerator.addExistingName(INT1);
+		pseudoNameGenerator.addExistingName(CHAR1);
+		assertEquals(INT2, pseudoNameGenerator.generateNewName(INT));
+		assertEquals(INT3, pseudoNameGenerator.generateNewName(INT));
+		assertEquals(CHAR2, pseudoNameGenerator.generateNewName(CHAR));
+	}
+	
+	public void testWithNamespace() {
+		assertEquals("string", pseudoNameGenerator.generateNewName("std::string"));  //$NON-NLS-1$//$NON-NLS-2$
+	}
+	
+	public void testBug288736TemplateParam() {
+		assertEquals("tempClass", pseudoNameGenerator.generateNewName("tempClass<int>"));
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/TranslationUnitHelperTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/TranslationUnitHelperTest.java
new file mode 100644
index 0000000..49113f4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/TranslationUnitHelperTest.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.utils;
+
+import java.util.Properties;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IFile;
+
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTest;
+import org.eclipse.cdt.ui.tests.refactoring.TestSourceFile;
+
+import org.eclipse.cdt.internal.ui.refactoring.utils.TranslationUnitHelper;
+
+/**
+ * @author Mirko Stocker
+ *
+ */
+public class TranslationUnitHelperTest extends RefactoringTest {
+
+	private int offset;
+
+	public TranslationUnitHelperTest(String name,Vector<TestSourceFile> files) {
+		super(name, files);
+	}
+
+	@Override
+	protected void runTest() throws Throwable {
+		IFile file = project.getFile(fileName);
+		IASTTranslationUnit unit = TranslationUnitHelper.loadTranslationUnit(file, false);
+		IASTNode firstNode = TranslationUnitHelper.getFirstNode(unit);
+		assertEquals(offset, firstNode.getNodeLocations()[0].getNodeOffset());
+	}
+
+	@Override
+	protected void configureRefactoring(Properties refactoringProperties) {
+		String offsetKind = (System.getProperty("line.separator").equals("\n")) ? "offset_unix" : "offset_win"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		offset = new Integer(refactoringProperties.getProperty(offsetKind, "0")).intValue();  //$NON-NLS-1$
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/UtilTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/UtilTestSuite.java
new file mode 100644
index 0000000..bdeca35
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/refactoring/utils/UtilTestSuite.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * 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  
+ *  
+ * Contributors: 
+ * Institute for Software - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.refactoring.utils;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.ui.tests.refactoring.RefactoringTester;
+
+/**
+ * @author Thomas Corbat
+ *
+ */
+public class UtilTestSuite extends TestSuite {
+
+	public static Test suite() throws Exception {
+		UtilTestSuite suite = new UtilTestSuite(); 
+		suite.addTest(IdentifierHelperTest.suite());
+		suite.addTest(RefactoringTester.suite("TranslationUnitHelperTest", "resources/refactoring/TranslationunitHelper.rts")); //$NON-NLS-1$ //$NON-NLS-2$
+		suite.addTestSuite(PseudoNameGeneratorTest.class);
+		return suite;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/BasicSearchTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/BasicSearchTest.java
new file mode 100644
index 0000000..13ec236
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/BasicSearchTest.java
@@ -0,0 +1,361 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *    Andrew Ferguson (Symbian) - Initial implementation
+ *    Markus Schorn (Wind River Systems)
+ *    IBM Corporation
+ *    Ed Swartz (Nokia)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.search;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileWriter;
+import java.lang.reflect.InvocationTargetException;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.search.ui.IQueryListener;
+import org.eclipse.search.ui.ISearchQuery;
+import org.eclipse.search.ui.ISearchResult;
+import org.eclipse.search.ui.ISearchResultPage;
+import org.eclipse.search.ui.ISearchResultViewPart;
+import org.eclipse.search.ui.NewSearchUI;
+import org.osgi.framework.Bundle;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.index.IIndexManager;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.TestScannerProvider;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+
+import org.eclipse.cdt.internal.ui.search.PDOMSearchPatternQuery;
+import org.eclipse.cdt.internal.ui.search.PDOMSearchQuery;
+import org.eclipse.cdt.internal.ui.search.PDOMSearchResult;
+import org.eclipse.cdt.internal.ui.search.PDOMSearchViewPage;
+
+public class BasicSearchTest extends BaseUITestCase {
+	ICProject fCProject;
+	StringBuffer[] testData;
+
+	public static TestSuite suite() {
+		return suite(BasicSearchTest.class);
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		fCProject = CProjectHelper.createCCProject(getName()+System.currentTimeMillis(), "bin", IPDOMManager.ID_NO_INDEXER); 
+		Bundle b = CTestPlugin.getDefault().getBundle();
+		testData = TestSourceReader.getContentsForTest(b, "ui", this.getClass(), getName(), 2);
+
+		IFile file = TestSourceReader.createFile(fCProject.getProject(), new Path("header.h"), testData[0].toString());
+		CCorePlugin.getIndexManager().setIndexerId(fCProject, IPDOMManager.ID_FAST_INDEXER);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+
+		IFile cppfile= TestSourceReader.createFile(fCProject.getProject(), new Path("references.cpp"), testData[1].toString());
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		if (fCProject != null) {
+			fCProject.getProject().delete(true, NPM);
+		}
+		super.tearDown();
+	}
+
+	// // empty
+
+	// #include "extHead.h"
+	// void bar() {
+	//   foo();
+	// }
+	public void testExternalPathRenderedCorrectly_79193() throws Exception {
+		// make an external file
+		File dir= CProjectHelper.freshDir();
+		File externalFile= new File(dir, "extHead.h");
+		externalFile.deleteOnExit();
+		FileWriter fw= new FileWriter(externalFile);
+		fw.write("void foo() {}\n");
+		fw.close();
+		
+		// rebuild the index
+		TestScannerProvider.sIncludes= new String[] {dir.getAbsolutePath()};
+		CCorePlugin.getIndexManager().reindex(fCProject);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+		
+		// open a query
+		PDOMSearchQuery query= makeProjectQuery("foo");
+		PDOMSearchResult result= runQuery(query);
+		assertEquals(2, result.getElements().length);
+		
+		ISearchResultViewPart vp= NewSearchUI.getSearchResultView();
+		ISearchResultPage page= vp.getActivePage();
+		assertTrue(""+page, page instanceof PDOMSearchViewPage);
+		
+		PDOMSearchViewPage pdomsvp= (PDOMSearchViewPage) page;
+		StructuredViewer viewer= pdomsvp.getViewer();
+		ILabelProvider labpv= (ILabelProvider) viewer.getLabelProvider();
+		IStructuredContentProvider scp= (IStructuredContentProvider) viewer.getContentProvider();
+
+		// project results are in a project node, containing directories and files
+		Object[] resultElements = scp.getElements(result);
+		String label0= labpv.getText(resultElements[0]);
+		String label1= labpv.getText(resultElements[1]);
+		// external results are in a tree, directory containing files
+		Object externalResult = resultElements[1];
+		String path1= labpv.getText(externalResult);
+		String file1= labpv.getText(scp.getElements(externalResult)[0]);
+
+		externalResult = resultElements[0];
+		String path2= labpv.getText(externalResult);
+		String file2= labpv.getText(scp.getElements(externalResult)[0]);
+		
+		// check the results are rendered
+		String expected0= fCProject.getProject().getName();
+		String expected1= new Path(externalFile.getAbsolutePath()).toString();
+		assertTrue(expected0.equals(label0) || expected0.equals(label1));
+		assertTrue(expected1.equals(new Path(path1).append(file1).toString()) || expected1.equals(new Path(path2).append(file2).toString()));
+	}
+
+	// int x, y, xx, yy;
+	
+	public void testNoIndexerEnabled_158955() throws Exception {
+		// rebuild the index with no indexer
+		CCorePlugin.getIndexManager().setIndexerId(fCProject, IIndexManager.ID_NO_INDEXER);
+		CCorePlugin.getIndexManager().reindex(fCProject);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+		
+		// open a query
+		PDOMSearchQuery query= makeProjectQuery("x");
+		PDOMSearchResult result= runQuery(query);
+		assertEquals(0, result.getElements().length);
+		
+		ISearchResultViewPart vp= NewSearchUI.getSearchResultView();
+		ISearchResultPage page= vp.getActivePage();
+		assertTrue(""+page, page instanceof PDOMSearchViewPage);
+		
+		PDOMSearchViewPage pdomsvp= (PDOMSearchViewPage) page;
+		StructuredViewer viewer= pdomsvp.getViewer();
+		ILabelProvider labpv= (ILabelProvider) viewer.getLabelProvider();
+		IStructuredContentProvider scp= (IStructuredContentProvider) viewer.getContentProvider();
+
+		// first result is a project node
+		Object firstRootNode = scp.getElements(result)[0];
+		String label0= labpv.getText(firstRootNode);
+		// ... containing a status message
+		IStatus firstRootChildNode= (IStatus) scp.getElements(firstRootNode)[0];
+		
+		assertEquals(IStatus.WARNING, firstRootChildNode.getSeverity());
+		// can't really verify text in case message is localized...
+	}
+
+	final int INDEXER_IN_PROGRESS_FILE_COUNT = 10;
+	final int INDEXER_IN_PROGRESS_STRUCT_COUNT = 100;
+	
+	// #include "hugeHeader0.h"
+	
+	public void testIndexerInProgress() throws Exception {
+		// make an external file
+		File dir= CProjectHelper.freshDir();
+		
+		// make other project files so we can get incomplete results during indexing
+		for (int i = 1; i < 10; i++) {
+			TestSourceReader.createFile(fCProject.getProject(), new Path("references" + i + ".cpp"), 
+					"#include \"hugeHeader" + i + ".h\"\n");
+		}
+		
+		for (int f = 0; f < INDEXER_IN_PROGRESS_FILE_COUNT; f++) {
+			File externalFile= new File(dir, "hugeHeader" + f + ".h");
+			externalFile.deleteOnExit();
+			FileWriter fw= new FileWriter(externalFile);
+			for (int i = 0; i < INDEXER_IN_PROGRESS_STRUCT_COUNT; i++) {
+				fw.write("typedef struct confusingType_" + f + "_" + i + " {\n");
+				if (i == 0)
+					fw.write("   void *data" + i + ";\n");
+				else
+					fw.write("   myConfusingType_" + f + "_" + (i-1) +" *data" + i + ";\n");
+				fw.write("   int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;\n");
+				fw.write("} myConfusingType_" + f + "_" + i + ";\n");
+			}
+			fw.close();
+		}
+		
+		// rebuild the index and DO NOT JOIN
+		TestScannerProvider.sIncludes= new String[] {dir.getAbsolutePath()};
+		CCorePlugin.getIndexManager().reindex(fCProject);
+
+		// immediate test, likely 0 matches
+		coreTestIndexerInProgress(false);
+		
+		// wait some amount of time to get non-zero and hopefully non-complete results
+		Thread.sleep(500);
+		if (!CCorePlugin.getIndexManager().isIndexerIdle())
+			coreTestIndexerInProgress(false);
+		
+		// now join and test again to get the full results
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+
+		coreTestIndexerInProgress(true);
+	}
+	/**
+	 * 
+	 */
+	private void coreTestIndexerInProgress(boolean expectComplete) {
+		// open a query
+		PDOMSearchQuery query= makeProjectQuery("data*");
+		PDOMSearchResult result= runQuery(query);
+		
+		final int maximumHits = INDEXER_IN_PROGRESS_FILE_COUNT * INDEXER_IN_PROGRESS_STRUCT_COUNT;
+		Object[] elements = result.getElements();
+		if (expectComplete)
+			assertEquals(maximumHits, elements.length);
+		else
+			assertTrue(maximumHits >= elements.length);	// >= because may still be done
+
+		ISearchResultViewPart vp= NewSearchUI.getSearchResultView();
+		ISearchResultPage page= vp.getActivePage();
+		assertTrue(""+page, page instanceof PDOMSearchViewPage);
+		
+		PDOMSearchViewPage pdomsvp= (PDOMSearchViewPage) page;
+		StructuredViewer viewer= pdomsvp.getViewer();
+		ILabelProvider labpv= (ILabelProvider) viewer.getLabelProvider();
+		IStructuredContentProvider scp= (IStructuredContentProvider) viewer.getContentProvider();
+
+		if (!expectComplete) {
+			// even if we don't think the indexer is complete, we can't be 100% sure
+			// the indexer didn't finish before the query started, so don't fail here
+			// if all the hits were found
+			if (elements.length < maximumHits) {
+				// first result is an IStatus indicating indexer was busy
+				Object[] nodeElements = scp.getElements(result);
+				Object node = nodeElements[0];
+				if (!(node instanceof IStatus))
+					node = nodeElements[1];
+				if (node instanceof IStatus)
+				{
+					IStatus firstRootNode = (IStatus) node;				
+					assertEquals(IStatus.WARNING, firstRootNode.getSeverity());
+					// can't really verify text in case message is localized...
+				}
+				else
+					fail("can't get status");
+			}
+		} else {
+			// must NOT have the IStatus
+			Object firstRootNode = scp.getElements(result)[0];
+			
+			assertFalse(firstRootNode instanceof IStatus);
+		}
+		
+	}
+
+	/**
+	 * Run the specified query, and return the result. When tehis method returns the
+	 * search page will have been opened.
+	 * @param query
+	 * @return
+	 */
+	protected PDOMSearchResult runQuery(PDOMSearchQuery query) {
+		final ISearchResult result[]= new ISearchResult[1];
+		IQueryListener listener= new IQueryListener() {
+			public void queryAdded(ISearchQuery query) {}
+			public void queryFinished(ISearchQuery query) {
+				result[0]= query.getSearchResult();
+			}
+			public void queryRemoved(ISearchQuery query) {}
+			public void queryStarting(ISearchQuery query) {}
+		};
+		NewSearchUI.addQueryListener(listener);
+		NewSearchUI.runQueryInForeground(new IRunnableContext() {
+			public void run(boolean fork, boolean cancelable,
+					IRunnableWithProgress runnable)
+					throws InvocationTargetException, InterruptedException {
+				runnable.run(NPM);
+			}
+		}, query);
+		assertTrue(result[0] instanceof PDOMSearchResult);
+		runEventQueue(500);
+		return (PDOMSearchResult) result[0];
+	}
+	
+	// void foo() {}
+
+	// void bar() {
+	//   foo();
+	// }
+	public void testNewResultsOnSearchAgainA() throws Exception {
+		PDOMSearchQuery query= makeProjectQuery("foo");
+		assertOccurences(query, 2);
+		assertOccurences(query, 2);
+		
+		String newContent= "void bar() {}";
+		IFile file = fCProject.getProject().getFile(new Path("references.cpp"));
+		file.setContents(new ByteArrayInputStream(newContent.getBytes()), IResource.FORCE, NPM);
+		Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_REFRESH, null);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000, new NullProgressMonitor()));
+
+		assertOccurences(query, 1);
+	}
+	
+	// void foo() {}
+
+	// void bar() {foo();foo();foo();}
+	public void testNewResultsOnSearchAgainB() throws Exception {
+		PDOMSearchQuery query= makeProjectQuery("foo");
+		assertOccurences(query, 4);
+		assertOccurences(query, 4);
+		
+		// whitespace s.t. new match offset is same as older 
+		String newContent= "void bar() {      foo();      }";
+		IFile file = fCProject.getProject().getFile(new Path("references.cpp"));
+		file.setContents(new ByteArrayInputStream(newContent.getBytes()), IResource.FORCE, NPM);
+		runEventQueue(1000);
+		IIndexManager indexManager = CCorePlugin.getIndexManager();
+		indexManager.update(new ICElement[] {fCProject}, IIndexManager.UPDATE_ALL);
+		assertTrue(indexManager.joinIndexer(360000, new NullProgressMonitor()));
+
+		assertOccurences(query, 2);
+		
+		String newContent2= "void bar() {foo(); foo();}";
+		file.setContents(new ByteArrayInputStream(newContent2.getBytes()), IResource.FORCE, NPM);
+		Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_REFRESH, null);
+		assertTrue(indexManager.joinIndexer(360000, new NullProgressMonitor()));
+
+		assertOccurences(query, 3);
+	}
+	
+	protected PDOMSearchQuery makeProjectQuery(String pattern) {
+		String scope1= "Human Readable Description";
+		return new PDOMSearchPatternQuery(new ICElement[] {fCProject}, scope1, pattern, true, PDOMSearchQuery.FIND_ALL_OCCURANCES | PDOMSearchPatternQuery.FIND_ALL_TYPES);
+	}
+	
+	protected void assertOccurences(PDOMSearchQuery query, int expected) {
+		query.run(NPM);
+		PDOMSearchResult result= (PDOMSearchResult) query.getSearchResult();
+		assertEquals(expected, result.getMatchCount());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/LinkedNamesFinderTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/LinkedNamesFinderTest.java
new file mode 100644
index 0000000..2970cd2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/LinkedNamesFinderTest.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Google, Inc and others.
+ * 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
+ *
+ * Contributors:
+ * 	   Sergey Prigogin (Google) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.search;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Comparator;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.IRegion;
+
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.parser.tests.ast2.AST2BaseTest;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+import org.eclipse.cdt.internal.ui.search.LinkedNamesFinder;
+
+/**
+ * Tests for LinkedNamesFinder class.
+ */
+public class LinkedNamesFinderTest extends AST2BaseTest {
+	private static class RegionComparator implements Comparator<IRegion> {
+		public int compare(IRegion r1, IRegion r2) {
+			return r1.getOffset() - r2.getOffset();
+		}
+	}
+
+	static final RegionComparator REGION_COMPARATOR = new RegionComparator();
+
+	public LinkedNamesFinderTest() {
+	}
+
+	public LinkedNamesFinderTest(String name) {
+		super(name);
+	}
+
+	public static TestSuite suite() {
+		return suite(LinkedNamesFinderTest.class);
+	}
+
+	@Override
+	protected StringBuffer[] getContents(int sections) throws IOException {
+		CTestPlugin plugin = CTestPlugin.getDefault();
+		if (plugin == null)
+			throw new AssertionFailedError("This test must be run as a JUnit plugin test");
+		return TestSourceReader.getContentsForTest(plugin.getBundle(), "ui", getClass(), getName(), sections);
+	}
+
+	private IRegion[] getLinkedRegions(String code, String name, int len, boolean isCpp) throws ParserException {
+		BindingAssertionHelper ba= new BindingAssertionHelper(code, isCpp);
+		IASTName astName = ba.findName(name, len);
+		IRegion[] regions = LinkedNamesFinder.findByName(ba.getTranslationUnit(), astName);
+		Arrays.sort(regions, REGION_COMPARATOR);
+		name = name.substring(0, len);
+		if (name.charAt(0) == '~') {
+			name = name.substring(1);
+		}
+		for (IRegion region : regions) {
+			assertEquals(name, code.substring(region.getOffset(), region.getOffset() + region.getLength()));
+		}
+		return regions;
+	}
+
+	private void assertContents(String code, int offset, String expected) {
+		assertEquals(expected, code.substring(offset, offset + expected.length()));
+	}
+
+	//	class A {
+	//	public:
+	//	  void m(int x);
+	//	  void m(int x, int y);
+	//	};
+	//  
+	//	void A::m(int x) {}
+	//	void A::m(int x, int y) {}
+	public void testMethodParameter() throws Exception {
+		String code = getAboveComment();
+		IRegion[] regions = getLinkedRegions(code, "x);", 1, true);
+		assertEquals(2, regions.length);
+		assertContents(code, regions[0].getOffset(), "x)");
+		assertContents(code, regions[1].getOffset(), "x) {}");
+	}
+
+	//	class A {
+	//	public:
+	//    A();
+	//    A(int x);
+	//    ~A();
+	//	};
+	//  
+	//	A::A() {}
+	//	A::A(int x) {}
+	//	A::~A() {}
+	public void testClass() throws Exception {
+		String code = getAboveComment();
+		IRegion[] regions = getLinkedRegions(code, "A {", 1, true);
+		assertEquals(10, regions.length);
+		assertContents(code, regions[0].getOffset(), "A {");
+		assertContents(code, regions[1].getOffset(), "A();");
+		assertContents(code, regions[2].getOffset(), "A(int x);");
+		assertContents(code, regions[3].getOffset() - 1, "~A();");
+		assertContents(code, regions[4].getOffset(), "A::A() {}");
+		assertContents(code, regions[5].getOffset(), "A() {}");
+		assertContents(code, regions[6].getOffset(), "A::A(int x) {}");
+		assertContents(code, regions[7].getOffset(), "A(int x) {}");
+		assertContents(code, regions[8].getOffset(), "A::~A() {}");
+		assertContents(code, regions[9].getOffset() - 1, "~A() {}");
+		IRegion[] regions2 = getLinkedRegions(code, "A(int x) {}", 1, true);
+		assertTrue(Arrays.equals(regions2, regions));
+		IRegion[] regions3 = getLinkedRegions(code, "~A();", 2, true);
+		assertTrue(Arrays.equals(regions3, regions));
+	}
+
+	//	#ifndef GUARD //1
+	//	#define GUARD //2
+	//	// This is a GUARD test
+	//	#endif // GUARD
+	public void testIncludeGuards() throws Exception {
+		String code = getAboveComment();
+		IRegion[] regions = getLinkedRegions(code, "GUARD //1", 5, true);
+		assertEquals(3, regions.length);
+		assertContents(code, regions[0].getOffset(), "GUARD //1");
+		assertContents(code, regions[1].getOffset(), "GUARD //2");
+		assertContents(code, regions[2].getOffset() - 3, "// GUARD");
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/SearchTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/SearchTestSuite.java
new file mode 100644
index 0000000..224bca5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/SearchTestSuite.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.search;
+
+import junit.framework.TestSuite;
+
+public class SearchTestSuite extends TestSuite {
+    public static TestSuite suite() {
+        return new SearchTestSuite();
+    }
+    
+    public SearchTestSuite() {
+        super(SearchTestSuite.class.getName());
+        addTest(BasicSearchTest.suite());
+        addTest(LinkedNamesFinderTest.suite());
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AbstractAutoEditTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AbstractAutoEditTest.java
new file mode 100644
index 0000000..c014835
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AbstractAutoEditTest.java
@@ -0,0 +1,253 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *     Sergey Prigogin, Google
+ *     Andrew Ferguson (Symbian)
+ *     Andrew Gvozdev
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DocumentCommand;
+import org.eclipse.jface.text.IAutoEditStrategy;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.TextUtilities;
+
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+
+/**
+ * IAutoEditStrategy related tests
+ */
+public class AbstractAutoEditTest extends BaseTestCase {
+	
+	protected AbstractAutoEditTest(String name) {
+		super(name);
+	}
+	
+	/**
+	 * Helper class to test the auto-edit strategies on a document.
+	 * Split out from CAutoIndentTest.
+	 */
+	protected static class AutoEditTester {
+
+		private IAutoEditStrategy tabsToSpacesConverter=null;
+		private Map<String, IAutoEditStrategy> fStrategyMap = new HashMap<String, IAutoEditStrategy>();
+		IDocument fDoc;
+		private String fPartitioning;
+		private int fCaretOffset;
+
+		public AutoEditTester(IDocument doc, String partitioning) {
+			super();
+			fDoc = doc;
+			fPartitioning = partitioning;
+		}
+
+		public void setTabsToSpacesConverter(IAutoEditStrategy converter) {
+			tabsToSpacesConverter = converter;
+		}
+
+		public void setAutoEditStrategy(String contentType, IAutoEditStrategy aes) {
+			fStrategyMap.put(contentType, aes);
+		}
+
+		public IAutoEditStrategy getAutoEditStrategy(String contentType) {
+			return fStrategyMap.get(contentType);
+		}
+
+		/**
+		 * Empties the document, and returns the caret to the origin (0,0)
+		 * @return <code>this</code> for method chaining
+		 */
+		public AutoEditTester reset() {
+			try {
+				goTo(0,0);
+				fDoc.set("");
+			} catch(BadLocationException ble) {
+				fail(ble.getMessage());
+			}
+			return this;
+		}
+		
+		public void type(String text) throws BadLocationException {
+			for (int i = 0; i < text.length(); ++i) {
+				type(text.charAt(i));
+			}
+		}
+
+		public void type(char c) throws BadLocationException {
+			TestDocumentCommand command = new TestDocumentCommand(fCaretOffset, 0, new String(new char[] { c }));
+			customizeDocumentCommand(command);
+			fCaretOffset = command.exec(fDoc);
+		}
+
+		private void customizeDocumentCommand(TestDocumentCommand command) throws BadLocationException {
+			if (tabsToSpacesConverter != null) {
+				tabsToSpacesConverter.customizeDocumentCommand(fDoc, command);
+			}
+			IAutoEditStrategy aes = getAutoEditStrategy(getContentType(command.offset));
+			if (aes != null) {
+				aes.customizeDocumentCommand(fDoc, command);
+			}
+		}
+
+		public void type(int offset, String text) throws BadLocationException {
+			fCaretOffset = offset;
+			type(text);
+		}
+
+		public void type(int offset, char c) throws BadLocationException {
+			fCaretOffset = offset;
+			type(c);
+		}
+
+		public void paste(String text) throws BadLocationException {
+			TestDocumentCommand command = new TestDocumentCommand(fCaretOffset, 0, text);
+			customizeDocumentCommand(command);
+			fCaretOffset = command.exec(fDoc);
+		}
+
+		public void paste(int offset, String text) throws BadLocationException {
+			fCaretOffset = offset;
+			paste(text);
+		}
+
+		public void backspace(int n) throws BadLocationException {
+			for (int i = 0; i < n; ++i) {
+				backspace();
+			}
+		}
+		
+		public void backspace() throws BadLocationException {
+			TestDocumentCommand command = new TestDocumentCommand(fCaretOffset - 1, 1, ""); //$NON-NLS-1$
+			customizeDocumentCommand(command);
+			fCaretOffset = command.exec(fDoc);
+		}
+
+		public int getCaretOffset() {
+			return fCaretOffset;
+		}
+
+		public int setCaretOffset(int offset) {
+			fCaretOffset = offset;
+			if (fCaretOffset < 0)
+				fCaretOffset = 0;
+			else if (fCaretOffset > fDoc.getLength())
+				fCaretOffset = fDoc.getLength();
+			return fCaretOffset;
+		}
+		
+		/**
+		 * Moves caret right or left by the given number of characters.
+		 * 
+		 * @param shift Move distance.
+		 * @return New caret offset.
+		 */
+		public int moveCaret(int shift) {
+			return setCaretOffset(fCaretOffset + shift);
+		}
+		
+		public int goTo(int line) throws BadLocationException {
+			fCaretOffset = fDoc.getLineOffset(line);
+			return fCaretOffset;
+		}
+
+		public int goTo(int line, int column) throws BadLocationException {
+			if (column < 0 || column > fDoc.getLineLength(line)) {
+				throw new BadLocationException("No column " + column + " in line " + line); //$NON-NLS-1$ $NON-NLS-2$
+			}
+			fCaretOffset = fDoc.getLineOffset(line) + column;
+			return fCaretOffset;
+		}
+
+		public int getCaretLine() throws BadLocationException {
+			return fDoc.getLineOfOffset(fCaretOffset);
+		}
+
+		public int getCaretColumn() throws BadLocationException {
+			IRegion region = fDoc.getLineInformationOfOffset(fCaretOffset);
+			return fCaretOffset - region.getOffset();
+		}
+
+		public char getChar() throws BadLocationException {
+			return getChar(0);
+		}
+		
+		public char getChar(int i) throws BadLocationException {
+			return fDoc.getChar(fCaretOffset+i);
+		}
+		
+		public String getLine() throws BadLocationException {
+			return getLine(0);
+		}
+
+		public String getLine(int i) throws BadLocationException {
+			IRegion region = fDoc.getLineInformation(getCaretLine() + i);
+			return fDoc.get(region.getOffset(), region.getLength());
+		}
+
+		public String getContentType(int offset) throws BadLocationException {
+			return TextUtilities.getContentType(fDoc, fPartitioning, offset, true);
+		}
+	}
+	
+	/**
+	 * A DocumentCommand with public constructor and exec method.
+	 */
+	protected static class TestDocumentCommand extends DocumentCommand {
+
+		public TestDocumentCommand(int offset, int length, String text) {
+			super();
+			doit = true;
+			this.text = text;
+
+			this.offset = offset;
+			this.length = length;
+
+			owner = null;
+			caretOffset = -1;
+		}
+
+		/**
+		 * @param doc
+		 * @return the new caret position.
+		 * @throws BadLocationException
+		 */
+		public int exec(IDocument doc) throws BadLocationException {
+			doc.replace(offset, length, text);
+			return caretOffset != -1 ?
+						caretOffset :
+						offset + (text == null ? 0 : text.length());
+		}
+	}
+	
+	protected StringBuffer[] getTestContents() {
+		try {
+			return TestSourceReader.getContentsForTest(CTestPlugin.getDefault().getBundle(), "ui", this.getClass(), getName(), 2);
+		} catch(IOException ioe) {
+			fail(ioe.getMessage());
+		}
+		return null;
+	}
+	
+	protected StringBuffer[] getTestContents1() {
+		try {
+			return TestSourceReader.getContentsForTest(CTestPlugin.getDefault().getBundle(), "ui", this.getClass(), getName(), 1);
+		} catch(IOException ioe) {
+			fail(ioe.getMessage());
+		}
+		return null;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AbstractSemanticHighlightingTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AbstractSemanticHighlightingTest.java
new file mode 100644
index 0000000..96760d5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AbstractSemanticHighlightingTest.java
@@ -0,0 +1,261 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.io.File;
+import java.net.URI;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.BadPositionCategoryException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.SourceViewer;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.index.IIndexLocationConverter;
+import org.eclipse.cdt.core.index.ResourceContainerRelativeLocationConverter;
+import org.eclipse.cdt.core.index.URIRelativeLocationConverter;
+import org.eclipse.cdt.core.index.provider.IPDOMDescriptor;
+import org.eclipse.cdt.core.index.provider.IReadOnlyPDOMProvider;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.PreferenceConstants;
+
+import org.eclipse.cdt.internal.core.CCoreInternals;
+import org.eclipse.cdt.internal.core.index.provider.IndexProviderManager;
+import org.eclipse.cdt.internal.core.index.provider.ReadOnlyPDOMProviderBridge;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.internal.ui.editor.SemanticHighlighting;
+import org.eclipse.cdt.internal.ui.editor.SemanticHighlightingManager;
+import org.eclipse.cdt.internal.ui.editor.SemanticHighlightingPresenter;
+import org.eclipse.cdt.internal.ui.editor.SemanticHighlightings;
+
+/**
+ * Derived from JDT.
+ *
+ * @since 4.0
+ */
+public class AbstractSemanticHighlightingTest extends TestCase {
+	
+	protected static class SemanticHighlightingTestSetup extends TestSetup {
+
+		private ICProject fCProject;
+		private final String fTestFilename;
+		private File fSdkFile;
+		
+		public SemanticHighlightingTestSetup(Test test, String testFilename) {
+			super(test);
+			fTestFilename= testFilename;
+		}
+		
+		@Override
+		protected void setUp() throws Exception {
+			super.setUp();
+			
+			String sdkCode=
+				"void SDKFunction();\n"+
+				"class SDKClass { public: void SDKMethod(); };\n\n";
+			
+			fSdkFile= createExternalSDK(sdkCode);
+			assertNotNull(fSdkFile);
+			fSdkFile.deleteOnExit();
+
+			fCProject= EditorTestHelper.createCProject(PROJECT, LINKED_FOLDER);
+
+			importExternalSDK(fSdkFile, fCProject);
+
+			fEditor= (CEditor) EditorTestHelper.openInEditor(ResourceTestHelper.findFile(fTestFilename), true);
+			fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+			assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 500, 10000, 100));
+			EditorTestHelper.joinBackgroundActivities();
+		}
+
+		private static void importExternalSDK(final File sdk, final ICProject associatedProject) {
+			final URI baseURI= new File("c:/ExternalSDK/").toURI();
+			IndexProviderManager ipm= CCoreInternals.getPDOMManager().getIndexProviderManager();
+			ipm.addIndexProvider(new ReadOnlyPDOMProviderBridge(
+					new IReadOnlyPDOMProvider() {
+						public IPDOMDescriptor[] getDescriptors(
+								ICConfigurationDescription config) {
+							return new IPDOMDescriptor[] {
+									new IPDOMDescriptor() {
+										public IIndexLocationConverter getIndexLocationConverter() {
+											return new URIRelativeLocationConverter(baseURI);
+										}
+
+										public IPath getLocation() {
+											return new Path(sdk.getAbsolutePath());
+										}
+
+									}
+							};
+						}
+						public boolean providesFor(ICProject project)
+						throws CoreException {
+							return associatedProject.equals(project);
+						}
+					}
+			));
+		}
+
+		private static File createExternalSDK(final String code) throws Exception {
+			final File sdk= File.createTempFile("foo", "bar");
+
+			ICProject cproject= CProjectHelper.createCCProject("foo"+System.currentTimeMillis(), null, IPDOMManager.ID_FAST_INDEXER);
+			TestSourceReader.createFile(cproject.getProject(), new Path("/this.h"), code);
+			CCorePlugin.getIndexManager().joinIndexer(5000, new NullProgressMonitor());
+
+			ResourceContainerRelativeLocationConverter cvr= new ResourceContainerRelativeLocationConverter(cproject.getProject());
+			CCoreInternals.getPDOMManager().exportProjectPDOM(cproject, sdk, cvr);
+			assertTrue(sdk.exists());
+
+			CProjectHelper.delete(cproject);
+			return sdk;
+		}
+
+		protected String getTestFilename() {
+			return fTestFilename;
+		}
+
+		@Override
+		protected void tearDown () throws Exception {
+			EditorTestHelper.closeEditor(fEditor);
+			
+			IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
+			store.setToDefault(PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED);
+			
+			SemanticHighlighting[] semanticHighlightings= SemanticHighlightings.getSemanticHighlightings();
+			for (SemanticHighlighting semanticHighlighting : semanticHighlightings) {
+				String enabledPreferenceKey= SemanticHighlightings.getEnabledPreferenceKey(semanticHighlighting);
+				if (!store.isDefault(enabledPreferenceKey))
+					store.setToDefault(enabledPreferenceKey);
+			}
+
+			if (fCProject != null)
+				CProjectHelper.delete(fCProject);
+			
+			if (fSdkFile != null) {
+				fSdkFile.delete();
+			}
+			super.tearDown();
+		}
+	}
+	
+	public static final String LINKED_FOLDER= "resources/semanticHighlighting";
+	
+	public static final String PROJECT= "SHTest";
+	public static final String TESTFILE= "/SHTest/src/SHTest.cpp";
+	private static CEditor fEditor;
+	
+	private static SourceViewer fSourceViewer;
+
+	private String fCurrentHighlighting;
+
+	private SemanticHighlightingTestSetup fProjectSetup;
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		if (!ResourcesPlugin.getWorkspace().getRoot().exists(new Path(PROJECT))) {
+			fProjectSetup= new SemanticHighlightingTestSetup(this, TESTFILE);
+			fProjectSetup.setUp();
+		}
+		disableAllSemanticHighlightings();
+		EditorTestHelper.runEventQueue(500);
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		if (fProjectSetup != null) {
+			fProjectSetup.tearDown();
+			fProjectSetup= null;
+		}
+		super.tearDown();
+	}
+
+	protected void assertEqualPositions(Position[] expected, Position[] actual) {
+		assertEquals(expected.length, actual.length);
+		for (int i= 0, n= expected.length; i < n; i++) {
+			assertEquals(expected[i].isDeleted(), actual[i].isDeleted());
+			assertEquals(expected[i].getOffset(), actual[i].getOffset());
+			assertEquals(expected[i].getLength(), actual[i].getLength());
+		}
+	}
+
+	protected Position createPosition(int line, int column, int length) throws BadLocationException {
+		IDocument document= fSourceViewer.getDocument();
+		return new Position(document.getLineOffset(line) + column, length);
+	}
+
+	String toString(Position[] positions) throws BadLocationException {
+		StringBuffer buf= new StringBuffer();
+		buf.append("// "+fCurrentHighlighting+'\n');
+		IDocument document= fSourceViewer.getDocument();
+		buf.append("Position[] expected= new Position[] {\n");
+		for (Position position : positions) {
+			int line= document.getLineOfOffset(position.getOffset());
+			int column= position.getOffset() - document.getLineOffset(line);
+			buf.append("\tcreatePosition(" + line + ", " + column + ", " + position.getLength() + "),\n");
+		}
+		buf.append("};\n");
+		return buf.toString();
+	}
+
+	protected Position[] getSemanticHighlightingPositions() throws BadPositionCategoryException {
+		SemanticHighlightingManager manager= (SemanticHighlightingManager) new Accessor(fEditor, CEditor.class).get("fSemanticManager");
+		SemanticHighlightingPresenter presenter= (SemanticHighlightingPresenter) new Accessor(manager, manager.getClass()).get("fPresenter");
+		String positionCategory= (String) new Accessor(presenter, presenter.getClass()).invoke("getPositionCategory", new Object[0]);
+		IDocument document= fSourceViewer.getDocument();
+		return document.getPositions(positionCategory);
+	}
+
+	protected void setUpSemanticHighlighting(String semanticHighlighting) {
+		fCurrentHighlighting= semanticHighlighting;
+		enableSemanticHighlighting(semanticHighlighting);
+		// give enough time to finish updating the highlighting positions
+		EditorTestHelper.runEventQueue(1000);
+	}
+
+	private void enableSemanticHighlighting(String preferenceKey) {
+		IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
+		store.setValue(getEnabledPreferenceKey(preferenceKey), true);
+	}
+
+	private String getEnabledPreferenceKey(String preferenceKey) {
+		return PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_PREFIX + preferenceKey + PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED_SUFFIX;
+	}
+	
+	private static void disableAllSemanticHighlightings() {
+		IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
+		store.setValue(PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED, true);
+		SemanticHighlighting[] semanticHilightings= SemanticHighlightings.getSemanticHighlightings();
+		for (SemanticHighlighting semanticHilighting : semanticHilightings) {
+			if (store.getBoolean(SemanticHighlightings.getEnabledPreferenceKey(semanticHilighting)))
+				store.setValue(SemanticHighlightings.getEnabledPreferenceKey(semanticHilighting), false);
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/Accessor.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/Accessor.java
new file mode 100644
index 0000000..c010e3b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/Accessor.java
@@ -0,0 +1,328 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import junit.framework.Assert;
+
+/**
+ * Helper class for accessing classes and members which cannot
+ * be accessed using standard Java access control like private
+ * or package visible elements.
+ * 
+ * <p>Copied from JDT.</p>
+ * 
+ * @since 4.0
+ */
+public class Accessor extends Assert {
+	
+	/** The class to access. */
+	private Class fClass;
+	/** The instance to access. */
+	private Object fInstance;
+
+	/**
+	 * Creates an accessor for the given <code>instance</code> and
+	 * <code>class</code>. Only non-inherited members that particular
+	 * <code>class</code> can be accessed.
+	 * 
+	 * @param instance the instance
+	 * @param clazz the class
+	 */
+	public Accessor(Object instance, Class clazz) {
+		assertNotNull(instance);
+		assertNotNull(clazz);
+		fInstance= instance;
+		fClass= clazz;
+	}
+	
+	/**
+	 * Creates an accessor for the given <code>instance</code> and
+	 * <code>class</code>. Only non-inherited members that particular
+	 * <code>class</code> can be accessed.
+	 * 
+	 * @param instance the instance
+	 * @param className the name of the class
+	 * @param classLoader the class loader to use i.e. <code>getClass().getClassLoader()</code>
+	 */
+	public Accessor(Object instance, String className, ClassLoader classLoader) {
+		assertNotNull(instance);
+		assertNotNull(className);
+		assertNotNull(classLoader);
+		fInstance= instance;
+		try {
+			fClass= Class.forName(className, true, classLoader);
+		} catch (ClassNotFoundException e) {
+			fail();
+		} catch (ExceptionInInitializerError e) {
+			fail();
+		}
+	}
+	
+	/**
+	 * Creates an accessor for the given class.
+	 * <p>
+	 * In order to get the type information from the given
+	 * arguments they must all be instanc eof Object. Use
+	 * {@link #Accessor(String, ClassLoader, Class[], Object[])} if this
+	 * is not the case.</p>
+	 * 
+	 * @param className the name of the class
+	 * @param classLoader the class loader to use i.e. <code>getClass().getClassLoader()</code>
+	 * @param constructorArgs the constructor arguments which must all be instance of Object
+	 */
+	public Accessor(String className, ClassLoader classLoader, Object[] constructorArgs) {
+		this(className, classLoader, getTypes(constructorArgs), constructorArgs);
+	}
+	
+	/**
+	 * Creates an accessor for the given class.
+	 * 
+	 * @param className the name of the class
+	 * @param classLoader the class loader to use i.e. <code>getClass().getClassLoader()</code>
+	 * @param constructorTypes the types of the constructor arguments
+	 * @param constructorArgs the constructor arguments
+	 */
+	public Accessor(String className, ClassLoader classLoader, Class[] constructorTypes, Object[] constructorArgs) {
+		try {
+			fClass= Class.forName(className, true, classLoader);
+		} catch (ClassNotFoundException e) {
+			fail();
+		} catch (ExceptionInInitializerError e) {
+			fail();
+		}
+		Constructor constructor= null;
+		try {
+			constructor= fClass.getDeclaredConstructor(constructorTypes);
+		} catch (SecurityException e2) {
+			fail();
+		} catch (NoSuchMethodException e2) {
+			fail();
+		}
+		assertNotNull(constructor);
+		constructor.setAccessible(true);
+		try {
+			fInstance= constructor.newInstance(constructorArgs);
+		} catch (IllegalArgumentException e) {
+			fail();
+		} catch (InvocationTargetException e) {
+			fail();
+		} catch (InstantiationException e) {
+			fail();
+		} catch (IllegalAccessException e) {
+			fail();
+		}
+	}
+	
+	/**
+	 * Creates an accessor for the given class.
+	 * <p>
+	 * This constructor is used to access static stuff.
+	 * </p>
+	 * 
+	 * @param className the name of the class
+	 * @param classLoader the class loader to use i.e. <code>getClass().getClassLoader()</code>
+	 */
+	public Accessor(String className, ClassLoader classLoader) {
+		try {
+			fClass= Class.forName(className, true, classLoader);
+		} catch (ClassNotFoundException e) {
+			fail();
+		} catch (ExceptionInInitializerError e) {
+			fail();
+		}
+	}
+
+	/**
+	 * Invokes the method with the given method name and arguments.
+	 * <p>
+	 * In order to get the type information from the given
+	 * arguments all those arguments must be instance of Object. Use
+	 * {@link #invoke(String, Class[], Object[])} if this
+	 * is not the case.</p>
+	 * 
+	 * @param methodName the method name
+	 * @param arguments the method arguments which must all be instance of Object
+	 * @return the method return value
+	 */
+	public Object invoke(String methodName, Object[] arguments) {
+		return invoke(methodName, getTypes(arguments), arguments);
+	}
+	
+	/**
+	 * Invokes the method with the given method name and arguments.
+	 * 
+	 * @param methodName the method name
+	 * @param types the argument types
+	 * @param arguments the method arguments
+	 * @return the method return value
+	 */
+	public Object invoke(String methodName, Class[] types, Object[] arguments) {
+		Method method= null;
+		try {
+			method= fClass.getDeclaredMethod(methodName, types);
+		} catch (SecurityException e) {
+			fail();
+		} catch (NoSuchMethodException ex) {
+			fail();
+		}
+		assertNotNull(method);
+		method.setAccessible(true);
+		try {
+			return method.invoke(fInstance, arguments);
+		} catch (IllegalArgumentException e) {
+			fail();
+		} catch (InvocationTargetException e) {
+			fail();
+		} catch (IllegalAccessException e) {
+			fail();
+		}
+		return null;
+	}
+	
+	/**
+	 * Assigns the given value to the field with the given name. 
+	 * 
+	 * @param fieldName the field name
+	 * @param value the value to assign to the field
+	 */
+	public void set(String fieldName, Object value) {
+		Field field= getField(fieldName);
+		try {
+			field.set(fInstance, value);
+		} catch (IllegalArgumentException e) {
+			fail();
+		} catch (IllegalAccessException e) {
+			fail();
+		}
+	}
+	
+	/**
+	 * Assigns the given value to the field with the given name. 
+	 * 
+	 * @param fieldName the field name
+	 * @param value the value to assign to the field
+	 */
+	public void set(String fieldName, boolean value) {
+		Field field= getField(fieldName);
+		try {
+			field.setBoolean(fInstance, value);
+		} catch (IllegalArgumentException e) {
+			fail();
+		} catch (IllegalAccessException e) {
+			fail();
+		}
+	}
+	
+	/**
+	 * Assigns the given value to the field with the given name. 
+	 * 
+	 * @param fieldName the field name
+	 * @param value the value to assign to the field
+	 */
+	public void set(String fieldName, int value) {
+		Field field= getField(fieldName);
+		try {
+			field.setInt(fInstance, value);
+		} catch (IllegalArgumentException e) {
+			fail();
+		} catch (IllegalAccessException e) {
+			fail();
+		}
+	}
+	
+	/**
+	 * Returns the value of the field with the given name. 
+	 * 
+	 * @param fieldName the field name
+	 * @return the value of the field
+	 */
+	public Object get(String fieldName) {
+		Field field= getField(fieldName);
+		try {
+			return field.get(fInstance);
+		} catch (IllegalArgumentException e) {
+			fail();
+		} catch (IllegalAccessException e) {
+			fail();
+		}
+		// Unreachable code
+		return null;
+	}
+	
+	/**
+	 * Returns the value of the field with the given name. 
+	 * 
+	 * @param fieldName the field name
+	 * @return the value of the field
+	 */
+	public boolean getBoolean(String fieldName) {
+		Field field= getField(fieldName);
+		try {
+			return field.getBoolean(fInstance);
+		} catch (IllegalArgumentException e) {
+			fail();
+		} catch (IllegalAccessException e) {
+			fail();
+		}
+		// Unreachable code
+		return false;
+	}
+	
+	/**
+	 * Returns the value of the field with the given name. 
+	 * 
+	 * @param fieldName the field name
+	 * @return the value of the field
+	 */
+	public int getInt(String fieldName) {
+		Field field= getField(fieldName);
+		try {
+			return field.getInt(fInstance);
+		} catch (IllegalArgumentException e) {
+			fail();
+		} catch (IllegalAccessException e) {
+			fail();
+		}
+		// Unreachable code
+		return 0;
+	}
+	
+	private Field getField(String fieldName) {
+		Field field= null;
+		try {
+			field= fClass.getDeclaredField(fieldName);
+		} catch (SecurityException e) {
+			fail();
+		} catch (NoSuchFieldException e) {
+			fail();
+		}
+		field.setAccessible(true);
+		return field;
+	}
+	
+	private static Class[] getTypes(Object[] objects) {
+		if (objects == null)
+			return null;
+		
+		int length= objects.length;
+		Class[] classes= new Class[length];
+		for (int i= 0; i < length; i++) {
+			assertNotNull(objects[i]);
+			classes[i]= objects[i].getClass();
+		}
+		return classes;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AddBlockCommentTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AddBlockCommentTest.java
new file mode 100644
index 0000000..334ea70
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AddBlockCommentTest.java
@@ -0,0 +1,377 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *     Andrew Gvozdev 
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+
+import org.eclipse.cdt.internal.core.model.ext.SourceRange;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+/**
+ * Tests for the AddBlockCommentAction.
+ *
+ * @since 5.0
+ */
+public class AddBlockCommentTest extends BaseUITestCase {
+	private ICProject fCProject;
+	public static TestSuite suite() {
+		return suite(AddBlockCommentTest.class, "_");
+	}
+
+	private CEditor fEditor;
+	private IDocument fDocument;
+	
+	/*
+	 * The class describes a position on a line counting in ordinary people way,
+	 * starting from 1.
+	 */
+	static class LinePosition {
+		private int line;
+		private int position;
+		private IDocument fDoc;
+		
+		LinePosition(int line, int positionOnLine, IDocument doc) {
+			this.line = line;
+			this.position = positionOnLine;
+			this.fDoc = doc;
+		}
+
+		int getOffset() throws BadLocationException {
+			return fDoc.getLineOffset(line-1) + position-1;
+		}
+		
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		
+		final String PROJECT= "BlockComment";
+		// Using any existing file just to open CEditor, the content is not used
+		final String filename= "/BlockComment/src/sample/Before.cpp";
+		fCProject= EditorTestHelper.createCProject(PROJECT, "resources/formatter");
+		fCProject.setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.TAB);
+		fEditor= (CEditor) EditorTestHelper.openInEditor(ResourceTestHelper.findFile(filename), true);
+		fDocument= EditorTestHelper.getSourceViewer(fEditor).getDocument();
+		// Delete contents
+		fDocument.set("");
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		EditorTestHelper.closeEditor(fEditor);
+
+		if (fCProject != null)
+			CProjectHelper.delete(fCProject);
+		
+		super.tearDown();
+	}
+
+	/**
+	 * Run an action to comment block defined by line positions
+	 * and assert that the result matches the expected result.
+	 * "Before" and "After" are taken from test comments.
+	 * 
+	 * @param startLinePosition
+	 * @param endLinePosition
+	 * @throws Exception
+	 */
+	protected void assertFormatterResult(
+			LinePosition startLinePosition,
+			LinePosition endLinePosition) throws Exception {
+
+		StringBuffer[] contents= getContentsForTest(2);
+		String before = contents[0].toString();
+		String after  = contents[1].toString();
+		
+		fDocument.set(before);
+
+		SourceRange range = new SourceRange( startLinePosition.getOffset(),
+				endLinePosition.getOffset()-startLinePosition.getOffset() );
+		fEditor.setSelection(range, true);
+		
+		IAction commentAction= fEditor.getAction("AddBlockComment");
+		assertNotNull("No AddBlockComment action", commentAction);
+		commentAction.setEnabled(true);
+		commentAction.run();
+		
+		String expected= after;
+		assertEquals(expected, fDocument.get());
+	}
+
+	
+	/**
+	 * Run an action to comment block defined by line positions
+	 * and assert that the result matches the expected result.
+	 * "Before" and "After" are taken from test comments.
+	 * 
+	 * @param startLinePosition
+	 * @param endLinePosition
+	 * @param before editor contents before the operation
+	 * @param after expected editor contents after the operation
+	 * @throws Exception
+	 */
+	protected void assertFormatterResult(
+			LinePosition startLinePosition,
+			LinePosition endLinePosition,
+			String before,
+			String after) throws Exception {
+		
+		fDocument.set(before);
+		
+		SourceRange range = new SourceRange( startLinePosition.getOffset(),
+				endLinePosition.getOffset()-startLinePosition.getOffset() );
+		fEditor.setSelection(range, true);
+		
+		IAction commentAction= fEditor.getAction("AddBlockComment");
+		assertNotNull("No AddBlockComment action", commentAction);
+		commentAction.setEnabled(true);
+		commentAction.run();
+		
+		String expected= after;
+		assertEquals(expected, fDocument.get());
+	}
+	
+	//int i, j, k;
+	
+	//int i, /*j,*/ k;
+	public void testCommentPlain() throws Exception {
+		LinePosition startSelection = new LinePosition(1,8,fDocument);
+		LinePosition endSelection   = new LinePosition(1,10,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+
+	//int i,
+	//    j,
+	//    k;
+	
+	//int /*i,
+	//    j,*/
+	//    k;
+	public void testCommentPartialLines1() throws Exception {
+		LinePosition startSelection = new LinePosition(1,5,fDocument);
+		LinePosition endSelection   = new LinePosition(2,7,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//int i,
+	//    j,
+	//    k;
+	
+	//int i,
+	///*    j,
+	//    k*/;
+	public void testCommentPartialLines2() throws Exception {
+		LinePosition startSelection = new LinePosition(2,1,fDocument);
+		LinePosition endSelection   = new LinePosition(3,6,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//int i;
+	//int j;
+	//int k;
+	
+	//int i;
+	///*int j;*/
+	//int k;
+	public void testCommentExactlyOneLine() throws Exception {
+		LinePosition startSelection = new LinePosition(2,1,fDocument);
+		LinePosition endSelection   = new LinePosition(3,1,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//int i;
+	//int j;
+	//int k;
+	//int l;
+	
+	//int i;
+	///*
+	//int j;
+	//int k;
+	//*/
+	//int l;
+	public void testCommentTwoOrMoreLines() throws Exception {
+		LinePosition startSelection = new LinePosition(2,1,fDocument);
+		LinePosition endSelection   = new LinePosition(4,1,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//const int i;
+	
+	///*const*/ int i;
+	public void testCommentFirstCharacterInFile() throws Exception {
+		LinePosition startSelection = new LinePosition(1,1,fDocument);
+		LinePosition endSelection   = new LinePosition(1,6,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//#include <x>
+	//#include <y>
+	
+	///*#include <x>*/
+	//#include <y>
+	public void testCommentPreprocessorFirstLine() throws Exception {
+		LinePosition startSelection = new LinePosition(1,1,fDocument);
+		LinePosition endSelection   = new LinePosition(1,6,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//int i; // comment
+	//int j;
+	
+	//int i; /*// comment*/
+	//int j;
+	public void testCommentCppComment() throws Exception {
+		LinePosition startSelection = new LinePosition(1,10,fDocument);
+		LinePosition endSelection   = new LinePosition(1,12,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//#include <x>
+	//#include <y>
+	//#include <z>
+
+	//#include <x>
+	///*#include <y>*/
+	//#include <z>
+	public void testCommentSpecialPartition() throws Exception {
+		LinePosition startSelection = new LinePosition(2,1,fDocument);
+		LinePosition endSelection   = new LinePosition(3,1,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//#include <x>
+	//   #include \
+	//      <y>
+	//#include <z>
+	
+	//#include <x>
+	///*
+	//   #include \
+	//      <y>
+	//*/
+	//#include <z>
+	public void testCommentSpecialPartitionExtra() throws Exception {
+		LinePosition startSelection = new LinePosition(2,8,fDocument);
+		LinePosition endSelection   = new LinePosition(2,10,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	///*comment*/
+	//int i;
+	
+	///*comment*/
+	//int i;
+	public void testCommentCommentNoScrewUp() throws Exception {
+		LinePosition startSelection = new LinePosition(1,1,fDocument);
+		LinePosition endSelection   = new LinePosition(2,1,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	
+	//int i;
+	///*comment*/
+	//int j;
+	
+	///*int i;
+	//comment*/
+	//int j;
+	public void testCommentMergeUp() throws Exception {
+		LinePosition startSelection = new LinePosition(1,1,fDocument);
+		LinePosition endSelection   = new LinePosition(2,5,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//int i;
+	///*comment*/
+	//int j;
+	
+	//int i;
+	///*comment
+	//int j;*/
+	public void testCommentMergeDown() throws Exception {
+		LinePosition startSelection = new LinePosition(2,5,fDocument);
+		LinePosition endSelection   = new LinePosition(3,7,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	///*comment1*/
+	///*comment2*/
+	//int i;
+	
+	///*comment1
+	//comment2*/
+	//int i;
+	public void testCommentMergeComments() throws Exception {
+		LinePosition startSelection = new LinePosition(1,5,fDocument);
+		LinePosition endSelection   = new LinePosition(2,5,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//
+	//
+	
+	//
+	///*
+	//
+	//*/
+	public void testCommentEndOfFileNoLoopingPlease() throws Exception {
+		// Don't care much about formatting but no looping please
+		LinePosition startSelection = new LinePosition(2,1,fDocument);
+		LinePosition endSelection   = new LinePosition(3,1,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	public void testCommentLastCharacterNoEOL() throws Exception {
+		String before = "int i;";
+		String after = "/*int i;*/";
+		LinePosition startSelection = new LinePosition(1,1,fDocument);
+		LinePosition endSelection   = new LinePosition(1,7,fDocument);
+		assertFormatterResult(startSelection,endSelection,before,after);
+	}
+	
+	public void testCommentLastCppCommentNoEOL() throws Exception {
+		String before = "//int i;";
+		String after = "/*//int i;*/";
+		LinePosition startSelection = new LinePosition(1,3,fDocument);
+		LinePosition endSelection   = new LinePosition(1,7,fDocument);
+		assertFormatterResult(startSelection,endSelection,before,after);
+	}
+	
+	public void testMixedEOLs() throws Exception {
+		String before =
+			  "int i;\r\n"
+			+ "int j;\n"
+			+ "int k;";
+		String after =
+			  "/*\r\n"
+			+ "int i;\r\n"
+			+ "int j;\n"
+			+ "*/\n"
+			+ "int k;";
+		LinePosition startSelection = new LinePosition(1,1,fDocument);
+		LinePosition endSelection   = new LinePosition(3,1,fDocument);
+		assertFormatterResult(startSelection,endSelection,before,after);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AddIncludeTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AddIncludeTest.java
new file mode 100644
index 0000000..962648d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AddIncludeTest.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Google, Inc and others.
+ * 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
+ *
+ * Contributors:
+ * 	  Sergey Prigogin (Google) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.ListResourceBundle;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.SourceViewer;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IWorkingCopy;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.CUIPlugin;
+
+import org.eclipse.cdt.internal.ui.editor.AddIncludeOnSelectionAction;
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+/**
+ * Tests the AddIncludeOnSelectionAction.
+ */
+public class AddIncludeTest extends TestCase {
+	private static final String PROJECT= "AddIncludeTests";
+
+	private static final class EmptyBundle extends ListResourceBundle {
+		protected Object[][] getContents() {
+			return new Object[0][];
+		}
+	}
+
+	protected static class AddIncludeTestSetup extends TestSetup {
+		private ICProject fCProject;
+		
+		public AddIncludeTestSetup(Test test) {
+			super(test);
+		}
+
+		@Override
+		protected void setUp() throws Exception {
+			super.setUp();
+			fCProject= EditorTestHelper.createCProject(PROJECT, "resources/addInclude");
+			CCorePlugin.getIndexManager().setIndexerId(fCProject, IPDOMManager.ID_FAST_INDEXER);		
+			// Wait until the indexer is done
+			assertTrue(CCorePlugin.getIndexManager().joinIndexer(10000, new NullProgressMonitor()));
+		}
+
+		@Override
+		protected void tearDown() throws Exception {
+			if (fCProject != null)
+				CProjectHelper.delete(fCProject);
+			super.tearDown();
+		}
+	}
+
+	public static Test suite() {
+		return new AddIncludeTestSetup(new TestSuite(AddIncludeTest.class));
+	}
+
+	private CEditor fEditor;
+	private SourceViewer fSourceViewer;
+	private IDocument fDocument;
+
+	@Override
+	protected void setUp() throws Exception {
+		String filename= createFileName("");
+		fEditor= (CEditor) EditorTestHelper.openInEditor(ResourceTestHelper.findFile(filename), true);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		fDocument= fSourceViewer.getDocument();
+		IWorkingCopy tu = CUIPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(fEditor.getEditorInput());
+		tu.makeConsistent(new NullProgressMonitor(), true);
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		EditorTestHelper.closeEditor(fEditor);
+	}
+
+	private void assertAddIncludeResult() throws Exception {
+		AddIncludeOnSelectionAction.sIsJUnitTest= true;
+		new AddIncludeOnSelectionAction(fEditor).run();
+
+		String file= createFileName(".expected");
+		String expected= ResourceTestHelper.read(file).toString();
+		assertEquals(expected, fDocument.get());
+	}
+
+	private String createFileName(String suffix) {
+		String name= getName();
+		name= name.substring(4);  // Strip "test" prefix.
+		return "/" + PROJECT + "/src/" + name + ".cpp" + suffix;
+	}
+
+	private void select(String name) {
+		final int offset = fDocument.get().indexOf(name);
+		assertTrue(offset >= 0);
+		fSourceViewer.setSelectedRange(offset, name.length());
+	}
+
+	public void testOverloadedFunction() throws Exception {
+		select("func");
+		assertAddIncludeResult();
+	}
+
+	public void testResolvedName() throws Exception {
+		select("A");
+		assertAddIncludeResult();
+	}
+
+	public void testUnresolvedName() throws Exception {
+		select("B");
+		assertAddIncludeResult();
+	}
+
+	public void testVariableType() throws Exception {
+		select("a_");
+		assertAddIncludeResult();
+	}
+
+	public void testMacro() throws Exception {
+		select("ONE");
+		assertAddIncludeResult();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AsmPartitionerTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AsmPartitionerTest.java
new file mode 100644
index 0000000..418450a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/AsmPartitionerTest.java
@@ -0,0 +1,1265 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentPartitioner;
+import org.eclipse.jface.text.IDocumentPartitioningListener;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.TypedRegion;
+import org.eclipse.jface.text.rules.FastPartitioner;
+
+import org.eclipse.cdt.ui.text.ICPartitions;
+
+import org.eclipse.cdt.internal.ui.text.asm.AsmPartitionScanner;
+
+
+/**
+ * Tests to verify the Asm partitioning.
+ */
+public class AsmPartitionerTest extends TestCase {
+
+	private Document fDocument;
+	protected boolean fDocumentPartitioningChanged;
+
+
+	public AsmPartitionerTest(String name) {
+		super(name);
+	}
+
+	protected void setUp() {
+		fDocument= new Document("xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx");
+		setupDefaultPartitioner();
+
+		fDocumentPartitioningChanged= false;
+		fDocument.addDocumentPartitioningListener(new IDocumentPartitioningListener() {
+			public void documentPartitioningChanged(IDocument document) {
+				fDocumentPartitioningChanged= true;
+			}
+		});
+	}
+
+	protected void setupDefaultPartitioner() {
+		setupPartitioner("", true);
+		
+	}
+	
+	protected void setupPartitioner(String lineCommentChars, boolean detectPreprocessor) {
+		IDocumentPartitioner partitioner= fDocument.getDocumentPartitioner();
+		if (partitioner != null) {
+			partitioner.disconnect();
+		}
+		String[] types= new String[] {
+				ICPartitions.C_MULTI_LINE_COMMENT,
+				ICPartitions.C_SINGLE_LINE_COMMENT,
+				ICPartitions.C_STRING,
+				ICPartitions.C_CHARACTER,
+				ICPartitions.C_PREPROCESSOR
+			};
+		AsmPartitionScanner partitionScanner= new AsmPartitionScanner();
+		partitionScanner.setLineCommentCharacters(lineCommentChars);
+		partitionScanner.setDetectPreprocessorDiretives(detectPreprocessor);
+		partitioner= new FastPartitioner(partitionScanner, types);
+		partitioner.connect(fDocument);
+		fDocument.setDocumentPartitioner(partitioner);
+	}
+	public static Test suite() {
+		return new TestSuite(AsmPartitionerTest.class);
+	}
+
+	protected void tearDown () {
+		IDocumentPartitioner partitioner= fDocument.getDocumentPartitioner();
+		if (partitioner != null) {
+			partitioner.disconnect();
+		}
+		fDocument= null;
+	}
+
+	protected String print(ITypedRegion r) {
+		return "[" + r.getOffset() + "," + r.getLength() + "," + r.getType() + "]";
+	}
+
+	protected void checkPartitioning(ITypedRegion[] expectation, ITypedRegion[] result) {
+		assertEquals("invalid number of partitions", expectation.length, result.length);
+
+		for (int i= 0; i < expectation.length; i++) {
+			ITypedRegion e= expectation[i];
+			ITypedRegion r= result[i];
+			assertTrue(print(r) + " != " + print(e), r.equals(e));
+		}
+
+	}
+
+	public void testInitialPartitioning() {
+		try {
+
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx"
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(38, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(43, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testIntraPartitionChange() {
+		try {
+
+			fDocument.replace(34, 3, "y");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\ny\n/***/\nxxx");
+
+			assertTrue(!fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 3, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(36, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(41, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testIntraPartitionChange2() {
+		try {
+
+			fDocument.replace(41, 0, "yyy");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/**yyy*/\nxxx");
+
+			// assertTrue(!fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(38, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(46, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+	public void testInsertNewPartition() {
+		try {
+
+			fDocument.replace(35, 1, "/***/");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nx/***/x\n/***/\nxxx");
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 2, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(35, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(40, 2, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(42, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(47, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+	public void testInsertStringPartition() {
+		try {
+
+			fDocument.replace(35, 1, "\"yyy\"");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nx\"yyy\"x\n/***/\nxxx");
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 2, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(35, 5, ICPartitions.C_STRING),
+				new TypedRegion(40, 2, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(42, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(47, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+	public void testInsertCharacterPartition() {
+		try {
+
+			fDocument.replace(35, 1, "'y");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nx\"yyy\"x\n/***/\nxxx");
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 2, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(35, 2, ICPartitions.C_CHARACTER),
+				new TypedRegion(37, 2, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(39, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(44, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+	public void testInsertPreprocessorPartition() {
+		try {
+
+			fDocument.replace(4, 0, " # include <x.h>\n");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nx\"yyy\"x\n/***/\nxxx");
+			//	"xxx\n # include <x.h>\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nx\"yyy\"x\n/***/\nxxx");
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4, 17, ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(21, 7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(28, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(33, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(41, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(46, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(50, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(55, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(60, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testRemovePartition1() {
+		try {
+
+			fDocument.replace(13, 16, null);
+			//	"xxx\n/*xxx*/\nx/**/\nxxx\n/***/\nxxx");
+
+			assertTrue(fDocumentPartitioningChanged);
+
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 2, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(13, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(17, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(22, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(27, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testRemovePartition2() {
+
+		testJoinPartition3();
+		fDocumentPartitioningChanged= false;
+
+		try {
+
+			fDocument.replace(5, 2, null);
+			//	"xxx\nxxx\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  12, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(12,  8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(20, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(25, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(29, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(34, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(39, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+
+	public void testJoinPartitions1() {
+		try {
+
+			fDocument.replace(31, 1, null);
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/*/\nxxx\n/***/\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 13, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(42, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testJoinPartitions2() {
+		try {
+
+			fDocument.replace(32, 1, null);
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**\nxxx\n/***/\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 13, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(42, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testJoinPartition3() {
+		try {
+
+			fDocument.replace(9, 2, null);
+			//	"xxx\n/*xxx\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  18, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(22, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(27, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(31, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(36, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(41, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+
+	public void testSplitPartition1() {
+
+		testJoinPartitions1();
+		fDocumentPartitioningChanged= false;
+
+
+		try {
+
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/*/\nxxx\n/***/\nxxx"
+			fDocument.replace(31, 0, "*");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+
+		testInitialPartitioning();
+	}
+
+	public void testSplitPartition2() {
+
+		testJoinPartitions2();
+		fDocumentPartitioningChanged= false;
+
+		try {
+
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**\nxxx\n/***/\nxxx"
+			fDocument.replace(32, 0, "/");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+
+		testInitialPartitioning();
+	}
+
+	public void testSplitPartition3() {
+
+		fDocumentPartitioningChanged= false;
+
+		try {
+
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx"
+			fDocument.replace(12, 9, "");
+			//	"xxx\n/*xxx*/\nx*/\nxxx\n/**/\nxxx\n/***/\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 9, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(20, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(34, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testCorruptPartitioning1() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "/***/\n/***/");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(5, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(6, 5, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(6, 0, "*/\n/***/\n/*");
+			// "/***/\n*/\n/***/\n/*/***/"
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(5, 4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(9, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(14, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(15, 7, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testCorruptPartitioning2() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "/***/\n/***/\n/***/");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(5, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(6, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(12, 5, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(6, 0, "*/\n/***/\n/*");
+			// "/***/\n*/\n/***/\n/*/***/\n/***/"
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(5, 4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(9, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(14, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(15, 7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(22, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(23, 5, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testCorruptPartitioning3() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "/***/\n/**/");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(5, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(6, 4, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(0, 9, "/***/\n/***/\n/***/\n/**");
+			// "/***/\n/***/\n/***/\n/***/"
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(5, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(6, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(12, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(17, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(18, 5, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testOpenPartition1() {
+		try {
+
+			fDocument.replace(42, 1, null);
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(38, 8, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testOpenPartition2() {
+		try {
+
+			fDocument.replace(47, 0, "/*");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx/*"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(38, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(43, 4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(47, 2, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+
+	public void testPartitionFinder() {
+		try {
+
+			ITypedRegion[] partitioning= fDocument.computePartitioning(0, fDocument.getLength());
+
+			for (int i= 0; i < partitioning.length; i++) {
+				ITypedRegion expected= partitioning[i];
+				for (int j= 0; j < expected.getLength(); j++) {
+					ITypedRegion result= fDocument.getPartition(expected.getOffset() + j);
+					assertTrue(expected.equals(result));
+				}
+			}
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testExtendPartition() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "/*");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  2, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(2, 0, " ");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  3, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testTogglePartition() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "\t/*\n\tx\n\t/*/\n\ty\n;\t*/");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation1= {
+				new TypedRegion(0,  1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(1,  10, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(15, 4, ICPartitions.C_SINGLE_LINE_COMMENT)
+			};
+			checkPartitioning(expectation1, result);
+
+			fDocumentPartitioningChanged= false;
+			fDocument.replace(0, 0, ";"); // ";\t/*\n\tx\n\t/*/\n\ty\n;\t*/"
+			assertTrue(fDocumentPartitioningChanged);
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation2= {
+				new TypedRegion(0,  5, ICPartitions.C_SINGLE_LINE_COMMENT),
+				new TypedRegion(5,  4,  IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(9,  11, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+			checkPartitioning(expectation2, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testEditing1() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  0,  IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "/");
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			fDocument.replace(fDocument.getLength(), 0, "/");
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+			checkPartitioning(expectation, result);
+
+
+			fDocument.replace(fDocument.getLength(), 0, "\r\n");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  4,  ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(4, 2, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testEditing2() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  0,  IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "/");
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "\r\n");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testEditing3() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  0,  IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "/");
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			fDocument.replace(fDocument.getLength(), 0, "\r\n *");
+			fDocument.replace(fDocument.getLength(), 0, "/");
+
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  8,  ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(8, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testEditingString() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  0,  IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "\"");
+			fDocument.replace(fDocument.getLength(), 0, "y");
+			fDocument.replace(fDocument.getLength(), 0, "y");
+			fDocument.replace(fDocument.getLength(), 0, "\"");
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_STRING)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "y");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  4,  ICPartitions.C_STRING),
+				new TypedRegion(4, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert escaped double quote
+			fDocument.replace(2, 0, "\\\"");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  6,  ICPartitions.C_STRING),
+				new TypedRegion(6, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert closing and opening double quote
+			fDocument.replace(2, 2, "\"\"");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  3,  ICPartitions.C_STRING),
+				new TypedRegion(3,  3,  ICPartitions.C_STRING),
+				new TypedRegion(6, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert line continuation and newline
+			fDocument.replace(2, 2, "\\\r\n");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  7,  ICPartitions.C_STRING),
+				new TypedRegion(7, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// delete line continuation
+			fDocument.replace(2, 1, "");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0, 4,  ICPartitions.C_STRING),
+				new TypedRegion(4, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(5, 2,  ICPartitions.C_STRING)
+			};
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testEditingCharacter() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  0,  IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "'");
+			fDocument.replace(fDocument.getLength(), 0, "y");
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_CHARACTER)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "yy");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  2,  ICPartitions.C_CHARACTER),
+				new TypedRegion(2, 2, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert escaped single quote
+			fDocument.replace(1, 1, "\\");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  3,  ICPartitions.C_CHARACTER),
+				new TypedRegion(3, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testEditingPreprocessor() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  0,  IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "#");
+			fDocument.replace(fDocument.getLength(), 0, " ");
+			fDocument.replace(fDocument.getLength(), 0, "\t");
+			fDocument.replace(fDocument.getLength(), 0, "include <float.h> ");
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_PREPROCESSOR)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "/* */");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  21,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(21, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "\nz");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  21,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(21, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(26, 1,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(27, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert escaped backslash
+			fDocument.replace(2, 0, "\\\\");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  23,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(23, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(28, 1,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(29, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// replace one backslash with a newline
+			fDocument.replace(3, 1, "\n");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  23,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(23, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(28, 1,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(29, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert backslash and newline inside multiline comment
+			fDocument.replace(26, 0, "\\\r\n");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  23,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(23, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(31, 1,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(32, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// delete NL leaving only CR
+			fDocument.replace(28, 1, "");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  23,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(23, 7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(30, 1,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(31, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// delete backslash
+			fDocument.replace(26, 1, "");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  23,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(23, 6, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(29, 1,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(30, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert white space before #
+			fDocument.replace(0, 0, "  \t");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  26,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(26, 6, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(32, 1,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(33, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testSingleLineComment_CppStyle() throws BadLocationException {
+		fDocument.set("//  single line comment");
+		int p1= fDocument.getLength();
+		ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+		TypedRegion[] expectation= {
+			new TypedRegion(0,  p1, ICPartitions.C_SINGLE_LINE_COMMENT)
+		};
+		checkPartitioning(expectation, result);
+		
+		fDocument.replace(p1++, 0, "\nlabel: opcode arg1,arg2  ");
+		int p2= fDocument.getLength();
+		fDocument.replace(p2, 0, "// end-of-line comment");
+		int p3= fDocument.getLength();
+
+		result= fDocument.computePartitioning(0, fDocument.getLength());
+		expectation= new TypedRegion[] {
+			new TypedRegion(0,  p1, ICPartitions.C_SINGLE_LINE_COMMENT),
+			new TypedRegion(p1, p2-p1, IDocument.DEFAULT_CONTENT_TYPE),
+			new TypedRegion(p2, p3-p2, ICPartitions.C_SINGLE_LINE_COMMENT)
+		};
+		checkPartitioning(expectation, result);
+	}
+
+	public void testSingleLineComment_Hash() throws BadLocationException {
+		// to get single line comment partitions for # lines, 
+		// we need to configure the partitioner
+		setupPartitioner("#", false);
+		fDocument.set("#  single line comment");
+		int p1= fDocument.getLength();
+		ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+		TypedRegion[] expectation= {
+			new TypedRegion(0,  p1, ICPartitions.C_SINGLE_LINE_COMMENT)
+		};
+		checkPartitioning(expectation, result);
+		
+		fDocument.replace(p1++, 0, "\nlabel: opcode arg1,arg2  ");
+		int p2= fDocument.getLength();
+		fDocument.replace(p2, 0, "# end-of-line comment");
+		int p3= fDocument.getLength();
+
+		result= fDocument.computePartitioning(0, fDocument.getLength());
+		expectation= new TypedRegion[] {
+			new TypedRegion(0,  p1, ICPartitions.C_SINGLE_LINE_COMMENT),
+			new TypedRegion(p1, p2-p1, IDocument.DEFAULT_CONTENT_TYPE),
+			new TypedRegion(p2, p3-p2, ICPartitions.C_SINGLE_LINE_COMMENT)
+		};
+		checkPartitioning(expectation, result);
+	}
+	
+	public void testSingleLineComment_Semicolon() throws BadLocationException {
+//		setupPartitioner(";", false);
+		fDocument.set(";  single line comment");
+		int p1= fDocument.getLength();
+		ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+		TypedRegion[] expectation= {
+			new TypedRegion(0,  p1, ICPartitions.C_SINGLE_LINE_COMMENT)
+		};
+		checkPartitioning(expectation, result);
+		
+		fDocument.replace(p1++, 0, "\nlabel: opcode arg1,#arg2  ");
+		int p2= fDocument.getLength();
+		fDocument.replace(p2, 0, "; end-of-line comment");
+		int p3= fDocument.getLength();
+
+		result= fDocument.computePartitioning(0, fDocument.getLength());
+		expectation= new TypedRegion[] {
+			new TypedRegion(0,  p1, ICPartitions.C_SINGLE_LINE_COMMENT),
+			new TypedRegion(p1, p2-p1, IDocument.DEFAULT_CONTENT_TYPE),
+			new TypedRegion(p2, p3-p2, ICPartitions.C_SINGLE_LINE_COMMENT)
+		};
+		checkPartitioning(expectation, result);
+	}
+
+	public void testSingleLineComment_AtSign() throws BadLocationException {
+//		setupPartitioner("@", false);
+		fDocument.set("@  single line comment");
+		int p1= fDocument.getLength();
+		ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+		TypedRegion[] expectation= {
+			new TypedRegion(0,  p1, ICPartitions.C_SINGLE_LINE_COMMENT)
+		};
+		checkPartitioning(expectation, result);
+		
+		fDocument.replace(p1++, 0, "\nlabel: opcode arg1,#arg2  ");
+		int p2= fDocument.getLength();
+		fDocument.replace(p2, 0, "@ end-of-line comment");
+		int p3= fDocument.getLength();
+
+		result= fDocument.computePartitioning(0, fDocument.getLength());
+		expectation= new TypedRegion[] {
+			new TypedRegion(0,  p1, ICPartitions.C_SINGLE_LINE_COMMENT),
+			new TypedRegion(p1, p2-p1, IDocument.DEFAULT_CONTENT_TYPE),
+			new TypedRegion(p2, p3-p2, ICPartitions.C_SINGLE_LINE_COMMENT)
+		};
+		checkPartitioning(expectation, result);
+		
+		//	cmp	dividend, #0			@ Early termination?
+		fDocument.replace(p3++, 0, "\ncmp	dividend, #0			");
+		int p4= fDocument.getLength();
+		fDocument.replace(p4, 0, "@ Early termination?");
+		int p5= fDocument.getLength();
+
+		result= fDocument.computePartitioning(0, fDocument.getLength());
+		expectation= new TypedRegion[] {
+			new TypedRegion(0,  p1, ICPartitions.C_SINGLE_LINE_COMMENT),
+			new TypedRegion(p1, p2-p1, IDocument.DEFAULT_CONTENT_TYPE),
+			new TypedRegion(p2, p3-p2, ICPartitions.C_SINGLE_LINE_COMMENT),
+			new TypedRegion(p3, p4-p3, IDocument.DEFAULT_CONTENT_TYPE),
+			new TypedRegion(p4, p5-p4, ICPartitions.C_SINGLE_LINE_COMMENT)
+		};
+		checkPartitioning(expectation, result);
+}
+
+	public void testSingleLineComment_Star() throws BadLocationException {
+//		setupPartitioner("*", false);
+		fDocument.set("*  single line comment");
+		int p1= fDocument.getLength();
+		ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+		TypedRegion[] expectation= {
+			new TypedRegion(0,  p1, ICPartitions.C_SINGLE_LINE_COMMENT)
+		};
+		checkPartitioning(expectation, result);
+		
+		fDocument.replace(p1++, 0, "\nlabel: opcode arg1,arg2  ");
+		int p2= fDocument.getLength();
+		fDocument.replace(p2, 0, "* no end-of-line comment");
+		int p3= fDocument.getLength();
+
+		result= fDocument.computePartitioning(0, fDocument.getLength());
+		expectation= new TypedRegion[] {
+			new TypedRegion(0,  p1, ICPartitions.C_SINGLE_LINE_COMMENT),
+			new TypedRegion(p1, p3-p1, IDocument.DEFAULT_CONTENT_TYPE),
+		};
+		checkPartitioning(expectation, result);
+	}
+
+	public void testNoSingleLineComment_Dollar() throws BadLocationException {
+		fDocument.set("$ no single line comment");
+		int p1= fDocument.getLength();
+		ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+		TypedRegion[] expectation= {
+			new TypedRegion(0,  p1, IDocument.DEFAULT_CONTENT_TYPE)
+		};
+		checkPartitioning(expectation, result);
+		
+		fDocument.replace(p1++, 0, "\nlabel: opcode arg1,arg2  ");
+		int p2= fDocument.getLength();
+		fDocument.replace(p2, 0, "$ no end-of-line comment");
+		int p3= fDocument.getLength();
+
+		result= fDocument.computePartitioning(0, fDocument.getLength());
+		expectation= new TypedRegion[] {
+			new TypedRegion(0,  p3, IDocument.DEFAULT_CONTENT_TYPE),
+		};
+		checkPartitioning(expectation, result);
+	}
+
+	public void testLineSplicing_Bug124113() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "* comment... \\\\\ncontinued");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_SINGLE_LINE_COMMENT)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(0, fDocument.getLength(), "#define D \\\\\ncontinued");
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_PREPROCESSOR)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(0, fDocument.getLength(), "\"str\\\\\ncontinued\"");
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_STRING)
+			};
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/BasicCEditorTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/BasicCEditorTest.java
new file mode 100644
index 0000000..175a4f4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/BasicCEditorTest.java
@@ -0,0 +1,493 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *     Andrew Eidsness - fix and test for bug 278632
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.io.File;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.filesystem.provider.FileSystem;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+import org.eclipse.cdt.ui.text.ICColorConstants;
+import org.eclipse.cdt.ui.text.IColorManager;
+
+import org.eclipse.cdt.internal.core.model.ExternalTranslationUnit;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.internal.ui.util.EditorUtility;
+
+/**
+ * Basic CEditor tests.
+ * 
+ * @since 4.0
+ */
+public class BasicCEditorTest extends BaseUITestCase {
+
+	final static class TestDocListener implements IDocumentListener {
+		public boolean fDocChanged;
+
+		public void documentAboutToBeChanged(DocumentEvent event) {
+		}
+
+		public void documentChanged(DocumentEvent event) {
+			fDocChanged= true;
+		}
+	}
+
+	public static class Bug278632FileSystem extends FileSystem {
+		public Bug278632FileSystem() {
+			getClass();
+		}
+
+		@Override
+		public IFileStore getStore(URI uri) {
+			try {
+				// For the test case, this just return the FS implementation
+				// used for the null filesystem.
+				// In a real application this would be a real implementation,
+				// however for the purposes
+				// of exposing the bug, any non-file:// scheme will do.
+				return EFS.getStore(new URI(
+						EFS.getNullFileSystem().getScheme(), uri
+								.getSchemeSpecificPart(), null));
+			} catch (URISyntaxException e) {
+				e.printStackTrace();
+				return null;
+			} catch (CoreException e) {
+				e.printStackTrace();
+				return null;
+			}
+		}
+	}
+
+	private static CEditor fEditor;
+	private static SourceViewer fSourceViewer;
+	private ICProject fCProject;
+	private IProject fNonCProject;
+	private StyledText fTextWidget;
+	private Accessor fAccessor;
+	private IDocument fDocument;
+	private TestDocListener fDocListener= new TestDocListener();
+
+	public static Test suite() {
+		return new TestSuite(BasicCEditorTest.class);
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+	}
+
+	@Override
+	protected void tearDown () throws Exception {
+		EditorTestHelper.closeEditor(fEditor);
+		if (fCProject != null)
+			CProjectHelper.delete(fCProject);
+		if (fNonCProject != null) {
+			ResourceHelper.delete(fNonCProject);
+		}
+		super.tearDown();
+	}
+
+	private void setUpEditor(IFile file) throws PartInitException {
+		IEditorPart editor= EditorTestHelper.openInEditor(file, true);
+		assertNotNull(editor);
+		assertTrue(editor instanceof CEditor);
+		fEditor= (CEditor) editor;
+		fTextWidget= fEditor.getViewer().getTextWidget();
+		assertNotNull(fTextWidget);
+		fAccessor= new Accessor(fTextWidget, StyledText.class);
+		fDocument= fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput());
+		assertNotNull(fDocument);
+	}
+
+	private void setUpEditor(String file) throws PartInitException {
+		setUpEditor(ResourceTestHelper.findFile(file));
+	}
+
+	private void setUpEditor(File file) throws PartInitException, CModelException {
+		IEditorPart editor= EditorUtility.openInEditor(new ExternalTranslationUnit(fCProject, file.toURI(), CCorePlugin.CONTENT_TYPE_CXXSOURCE));
+		assertNotNull(editor);
+		assertTrue(editor instanceof CEditor);
+		fEditor= (CEditor) editor;
+		fTextWidget= fEditor.getViewer().getTextWidget();
+		assertNotNull(fTextWidget);
+		fAccessor= new Accessor(fTextWidget, StyledText.class);
+		fDocument= fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput());
+		assertNotNull(fDocument);
+	}
+
+	private void setUpEditorUsingFileStore(File file) throws CoreException {
+		final IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		IEditorPart editor= IDE.openEditorOnFileStore(activePage, EFS.getStore(URIUtil.toURI(file.getAbsolutePath())));
+		assertNotNull(editor);
+		assertTrue(editor instanceof CEditor);
+		fEditor= (CEditor) editor;
+		fTextWidget= fEditor.getViewer().getTextWidget();
+		assertNotNull(fTextWidget);
+		fAccessor= new Accessor(fTextWidget, StyledText.class);
+		fDocument= fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput());
+		assertNotNull(fDocument);
+	}
+
+	public void testEditTranslationUnit() throws Exception {
+		final String file= "/ceditor/src/main.cpp";
+		fCProject= EditorTestHelper.createCProject("ceditor", "resources/ceditor", false, false);
+		IFile mainFile= ResourceTestHelper.findFile(file);
+		assertNotNull(mainFile);
+		setUpEditor(mainFile);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+		String content= fDocument.get();
+		setCaret(0);
+		String newtext= "/* "+getName()+" */";
+		type(newtext);
+		type('\n');
+		String newContent= fDocument.get();
+		assertEquals("Edit failed", newtext, newContent.substring(0, newtext.length()));
+		// save
+		fEditor.doSave(new NullProgressMonitor());
+		assertFalse("Editor is still dirty", fEditor.isDirty());
+		// close and reopen
+		EditorTestHelper.closeEditor(fEditor);
+		setUpEditor(mainFile);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+		content= fDocument.get();
+		assertEquals("Save failed", newContent, content);
+		// check reconciler
+		ITranslationUnit tUnit= (ITranslationUnit)fEditor.getInputCElement();
+		ICElement[] children= tUnit.getChildren();
+		assertEquals(2, children.length);
+		setCaret(content.length());
+		type('\n');
+		type("void func() {}\n");
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+		children= tUnit.getChildren();
+		assertEquals(3, children.length);
+	}
+	//{Point.cpp}
+	//#include <math.h>
+	//class Point {
+	//public:
+	//	Point(double xc, double yc) :
+	//		x(xc), y(yc) {}
+	//	double distance(const Point& other) const;
+	//	int compareX(const Point& other) const;
+	//	double x;
+	//	double y;
+	//};
+	//double Point::distance(const Point& other) const {
+	//	double dx = x - other.x;
+	//	double dy = y - other.y;
+	//	return sqrt(dx * dx + dy * dy);
+	//}
+	//int Point::compareX(const Point& other) const {
+	//	if (x < other.x) {
+	//		return -1;
+	//	}
+	//	else if (x > other.x) {
+	//		return 1;
+	//	}
+	//	else {
+	//		return 0;
+	//	}
+	//}
+	//
+	public void testEditNewTranslationUnit() throws Exception {
+		fCProject= EditorTestHelper.createCProject("ceditor", "resources/ceditor", false, false);
+		IFile newFile= createFile(fCProject.getProject(), "Point.cpp", "");
+		assertNotNull(newFile);
+		setUpEditor(newFile);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+		String content= fDocument.get();
+		setCaret(0);
+		String newText= "/* "+getName()+" */\n";
+		newText += readTaggedComment("Point.cpp");
+		String[] lines= newText.split("\\r\\n|\\r|\\n");
+		for (int i = 0; i < lines.length; i++) {
+			String line= lines[i].trim();
+			if (line.startsWith("}")) {
+				setCaret(fDocument.get().indexOf(line, getCaret())+line.length());
+				Thread.sleep(100);
+			} else {
+				if (i > 0) type('\n');
+				type(line);
+				Thread.sleep(50);
+			}
+		}
+		String newContent= fDocument.get();
+		String[] newLines= newContent.split("\\r\\n|\\r|\\n");
+		for (int i = 0; i < lines.length; i++) {
+			String line= lines[i];
+			assertEquals(line, newLines[i]);
+		}
+		// save
+		fEditor.doSave(new NullProgressMonitor());
+		assertFalse("Editor is still dirty", fEditor.isDirty());
+		// close and reopen
+		EditorTestHelper.closeEditor(fEditor);
+		setUpEditor(newFile);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+		content= fDocument.get().trim();
+		assertEquals("Save failed", newContent, content);
+		// check reconciler
+		ITranslationUnit tUnit= (ITranslationUnit)fEditor.getInputCElement();
+		ICElement[] children= tUnit.getChildren();
+		assertEquals(4, children.length);
+		setCaret(content.length());
+		type('\n');
+		type("void func() {}\n");
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+		children= tUnit.getChildren();
+		assertEquals(5, children.length);
+	}
+	public void testEditInNonCProject() throws Exception {
+		final String file= "/ceditor/src/main.cpp";
+		fNonCProject= EditorTestHelper.createNonCProject("ceditor", "resources/ceditor", false);
+		setUpEditor(file);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+		String content= fDocument.get();
+		setCaret(0);
+		String newtext= "/* "+getName()+" */";
+		type(newtext);
+		type('\n');
+		String newContent= fDocument.get();
+		assertEquals("Edit failed", newtext, newContent.substring(0, newtext.length()));
+		// save
+		fEditor.doSave(new NullProgressMonitor());
+		assertFalse("Editor is still dirty", fEditor.isDirty());
+		// close and reopen
+		EditorTestHelper.closeEditor(fEditor);
+		setUpEditor(file);
+		content= fDocument.get();
+		assertEquals("Save failed", newContent, content);
+	}
+
+	public void testEditExternalTranslationUnit() throws Exception {
+		final String file= "/ceditor/src/main.cpp";
+		fCProject= EditorTestHelper.createCProject("ceditor", "resources/ceditor", false, false);
+		IFile mainFile= ResourceTestHelper.findFile(file);
+		assertNotNull(mainFile);
+		File tmpFile= File.createTempFile("tmp", ".cpp");
+		tmpFile.deleteOnExit();
+		FileTool.copy(mainFile.getLocation().toFile(), tmpFile);
+		setUpEditor(tmpFile);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+		String content= fDocument.get();
+		setCaret(0);
+		String newtext= "/* "+getName()+" */";
+		type(newtext);
+		type('\n');
+		String newContent= fDocument.get();
+		assertEquals("Edit failed", newtext, newContent.substring(0, newtext.length()));
+		// save
+		fEditor.doSave(new NullProgressMonitor());
+		assertFalse("Editor is still dirty", fEditor.isDirty());
+		// close and reopen
+		EditorTestHelper.closeEditor(fEditor);
+		setUpEditor(tmpFile);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+		content= fDocument.get();
+		assertEquals("Save failed", newContent, content);
+		// check reconciler
+		ITranslationUnit tUnit= (ITranslationUnit)fEditor.getInputCElement();
+		ICElement[] children= tUnit.getChildren();
+		assertEquals(2, children.length);
+		setCaret(content.length());
+		type('\n');
+		type("void func() {}\n");
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+		children= tUnit.getChildren();
+		assertEquals(3, children.length);
+		tmpFile.delete();
+	}
+
+	public void testEditExternalTranslationUnitUsingFileStore() throws Exception {
+		final String file= "/ceditor/src/main.cpp";
+		fCProject= EditorTestHelper.createCProject("ceditor", "resources/ceditor", false, false);
+		IFile mainFile= ResourceTestHelper.findFile(file);
+		assertNotNull(mainFile);
+		File tmpFile= File.createTempFile("tmp", ".cpp");
+		tmpFile.deleteOnExit();
+		FileTool.copy(mainFile.getLocation().toFile(), tmpFile);
+		setUpEditorUsingFileStore(tmpFile);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+		String content= fDocument.get();
+		setCaret(0);
+		String newtext= "/* "+getName()+" */";
+		type(newtext);
+		type('\n');
+		String newContent= fDocument.get();
+		assertEquals("Edit failed", newtext, newContent.substring(0, newtext.length()));
+		// save
+		fEditor.doSave(new NullProgressMonitor());
+		assertFalse("Editor is still dirty", fEditor.isDirty());
+		// close and reopen
+		EditorTestHelper.closeEditor(fEditor);
+		setUpEditor(tmpFile);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+		content= fDocument.get();
+		assertEquals("Save failed", newContent, content);
+		// check reconciler
+		ITranslationUnit tUnit= (ITranslationUnit)fEditor.getInputCElement();
+		ICElement[] children= tUnit.getChildren();
+		assertEquals(2, children.length);
+		setCaret(content.length());
+		type('\n');
+		type("void func() {}\n");
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+		children= tUnit.getChildren();
+		assertEquals(3, children.length);
+		tmpFile.delete();
+	}
+
+	public void testSyntaxHighlighting_Bug180433() throws Exception {
+		IColorManager colorMgr= CUIPlugin.getDefault().getTextTools().getColorManager();
+		colorMgr.unbindColor(ICColorConstants.PP_DIRECTIVE);
+		colorMgr.bindColor(ICColorConstants.PP_DIRECTIVE, new RGB(7,7,7));
+		final Color ppDirectiveColor= colorMgr.getColor(ICColorConstants.PP_DIRECTIVE);
+		final String file= "/ceditor/src/main.cpp";
+		fCProject= EditorTestHelper.createCProject("ceditor", "resources/ceditor", false, false);
+		setUpEditor(file);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+		String content= fDocument.get();
+		String include= "#include";
+		int includeIdx= content.indexOf(include);
+		StyleRange style= fTextWidget.getStyleRangeAtOffset(includeIdx);
+		assertSame(style.foreground, ppDirectiveColor);
+	}
+
+	public void testNonFileEFSResource_Bug278632() {
+		IWorkbenchPage page = PlatformUI.getWorkbench()
+				.getActiveWorkbenchWindow().getActivePage();
+		assertNotNull(page);
+
+		IEditorRegistry reg = page.getWorkbenchWindow().getWorkbench()
+				.getEditorRegistry();
+		String editorID = reg.getDefaultEditor(".c").getId();
+
+		URI uri = null;
+		try {
+			uri = new URI("bug278632", "/folder/file", null);
+		} catch (URISyntaxException e) {
+			e.printStackTrace();
+		}
+		assertNotNull(uri);
+
+		IEditorPart part = null;
+		try {
+			part = IDE.openEditor(page, uri, editorID, true);
+		} catch (PartInitException e) {
+			e.printStackTrace();
+		}
+		assertNotNull(part);
+		assertTrue(part instanceof CEditor);
+	}
+
+	/**
+	 * Type characters into the styled text.
+	 * 
+	 * @param characters the characters to type
+	 */
+	private void type(CharSequence characters) {
+		for (int i= 0; i < characters.length(); i++)
+			type(characters.charAt(i), 0, 0);
+	}
+
+	/**
+	 * Type a character into the styled text.
+	 * 
+	 * @param character the character to type
+	 */
+	private void type(char character) {
+		type(character, 0, 0);
+	}
+	
+	/**
+	 * Type a character into the styled text.
+	 * 
+	 * @param character the character to type
+	 * @param keyCode the key code
+	 * @param stateMask the state mask
+	 */
+	private void type(char character, int keyCode, int stateMask) {
+		fDocument.addDocumentListener(fDocListener);
+		fDocListener.fDocChanged= false;
+		Event event= new Event();
+		event.character= character;
+		event.keyCode= keyCode;
+		event.stateMask= stateMask;
+		fAccessor.invoke("handleKeyDown", new Object[] {event});
+		
+		new DisplayHelper() {
+			@Override
+			protected boolean condition() {
+				return fDocListener.fDocChanged;
+			}
+		}.waitForCondition(EditorTestHelper.getActiveDisplay(), 50);
+		fDocument.removeDocumentListener(fDocListener);
+	}
+
+	private int getCaret() {
+		return ((ITextSelection) fEditor.getSelectionProvider().getSelection()).getOffset();
+	}
+
+	private void setCaret(int offset) {
+		fEditor.getSelectionProvider().setSelection(new TextSelection(offset, 0));
+		int newOffset= ((ITextSelection)fEditor.getSelectionProvider().getSelection()).getOffset();
+		assertEquals(offset, newOffset);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/BracketInserterTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/BracketInserterTest.java
new file mode 100644
index 0000000..3bf187f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/BracketInserterTest.java
@@ -0,0 +1,476 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.text.link.ILinkedModeListener;
+import org.eclipse.jface.text.link.LinkedModeModel;
+import org.eclipse.jface.text.link.LinkedPosition;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.PartInitException;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICContainer;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.PreferenceConstants;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+
+/**
+ * Tests the automatic bracket insertion feature of the CEditor. Also tests
+ * linked mode along the way.
+ */
+public class BracketInserterTest extends TestCase {
+
+	private static final String SRC= "src";
+	private static final String SEP= "/";
+	private static final String TU_NAME= "smartedit.cpp";
+	private static final String TU_CONTENTS= 
+		"#include \n" +
+		"class Application {\n" + 
+		"    char* string;\n" + 
+		"    int integer;\n" + 
+		"\n" + 
+		"public:\n" +
+		"    static void main(int argc, char** args);\n" + 
+		"protected:\n" +
+		"    void foo(char** args);\n" +
+		"};\n" +
+		"\n" +
+		"void Application::main(int argc, char** args) {\n" +
+		"    \n" + 
+		"}\n" +
+		"void Application::foo(char** args) {\n" +
+		"    char[] t= args[0];" + 
+		"}\n";
+	
+	// document offsets 
+	private static final int INCLUDE_OFFSET= 9;
+	private static final int BODY_OFFSET= 212;
+	private static final int ARGS_OFFSET= 184;
+	private static final int BRACKETS_OFFSET= 262;
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(BracketInserterTest.class);
+		return suite;
+	}
+	
+	private CEditor fEditor;
+	private StyledText fTextWidget;
+	private IDocument fDocument;
+	private Accessor fAccessor;
+	private ICProject fProject;
+
+	@Override
+	protected void setUp() throws Exception {
+		IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
+		store.setValue(PreferenceConstants.EDITOR_CLOSE_BRACKETS, true);
+		setUpProject();
+		setUpEditor();
+	}
+	
+	private void setUpProject() throws CoreException {
+		fProject= CProjectHelper.createCProject(getName(), "bin", IPDOMManager.ID_NO_INDEXER);
+		ICContainer cContainer= CProjectHelper.addCContainer(fProject, SRC);
+		IFile file= EditorTestHelper.createFile((IContainer)cContainer.getResource(), TU_NAME, TU_CONTENTS, new NullProgressMonitor());
+		assertNotNull(file);
+		assertTrue(file.exists());
+	}
+
+	private void setUpEditor() {
+		fEditor= openCEditor(new Path(SEP + getName() + SEP + SRC + SEP + TU_NAME));
+		assertNotNull(fEditor);
+		fTextWidget= fEditor.getViewer().getTextWidget();
+		assertNotNull(fTextWidget);
+		fAccessor= new Accessor(fTextWidget, StyledText.class);
+		fDocument= fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput());
+		assertNotNull(fDocument);
+		assertEquals(TU_CONTENTS, fDocument.get());
+	}
+
+	private CEditor openCEditor(IPath path) {
+		IFile file= ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+		assertTrue(file != null && file.exists());
+		try {
+			return (CEditor)EditorTestHelper.openInEditor(file, true);
+		} catch (PartInitException e) {
+			fail();
+			return null;
+		}
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		EditorTestHelper.closeEditor(fEditor);
+		fEditor= null;
+		if (fProject != null) {
+			CProjectHelper.delete(fProject);
+			fProject= null;
+		}
+
+		// reset to defaults
+		IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
+		store.setToDefault(PreferenceConstants.EDITOR_CLOSE_BRACKETS);
+	}
+	
+	public void testInsertClosingParenthesis() throws BadLocationException, CModelException, CoreException, CModelException, CoreException {
+		setCaret(BODY_OFFSET);
+		type('(');
+		
+		assertEquals("()", fDocument.get(BODY_OFFSET, 2));
+		assertSingleLinkedPosition(BODY_OFFSET + 1);
+	}
+	
+	public void testDeletingParenthesis() throws CModelException, CoreException {
+		setCaret(BODY_OFFSET);
+		type('(');
+		type(SWT.BS);
+		
+		assertEquals(TU_CONTENTS, fDocument.get());
+		assertFalse(LinkedModeModel.hasInstalledModel(fDocument));
+	}
+	
+	public void testMultipleParenthesisInsertion() throws BadLocationException, CModelException, CoreException {
+		setCaret(BODY_OFFSET);
+		type("((((");
+		
+		assertEquals("(((())))", fDocument.get(BODY_OFFSET, 8));
+		assertEquals(BODY_OFFSET + 4, getCaret());
+		
+		assertModel(true);
+	}
+	
+	public void testDeletingMultipleParenthesisInertion() throws BadLocationException, CModelException, CoreException {
+		setCaret(BODY_OFFSET);
+		type("((((");
+		
+		// delete two levels
+		linkedType(SWT.BS, true, ILinkedModeListener.EXTERNAL_MODIFICATION);
+		linkedType(SWT.BS, true, ILinkedModeListener.EXTERNAL_MODIFICATION);
+
+		assertEquals("(())", fDocument.get(BODY_OFFSET, 4));
+		assertEquals(BODY_OFFSET + 2, getCaret());
+		
+		// delete the second-last level
+		linkedType(SWT.BS, true, ILinkedModeListener.EXTERNAL_MODIFICATION);
+		assertEquals("()", fDocument.get(BODY_OFFSET, 2));
+		assertEquals(BODY_OFFSET + 1, getCaret());
+		
+		// delete last level
+		linkedType(SWT.BS, false, ILinkedModeListener.EXTERNAL_MODIFICATION);
+		assertEquals(TU_CONTENTS, fDocument.get());
+		assertEquals(BODY_OFFSET, getCaret());
+		
+		assertEquals(TU_CONTENTS, fDocument.get());
+		assertFalse(LinkedModeModel.hasInstalledModel(fDocument));
+	}
+	
+	public void testNoInsertInsideText() throws BadLocationException, CModelException, CoreException {
+		setCaret(ARGS_OFFSET);
+		type('(');
+		
+		assertEquals("(in", fDocument.get(ARGS_OFFSET, 3));
+		assertEquals(ARGS_OFFSET + 1, getCaret());
+		assertFalse(LinkedModeModel.hasInstalledModel(fDocument));
+	}
+	
+	public void testInsertInsideBrackets() throws BadLocationException, CModelException, CoreException {
+		setCaret(BRACKETS_OFFSET);
+		type('(');
+		
+		assertEquals("()", fDocument.get(BRACKETS_OFFSET, 2));
+		assertSingleLinkedPosition(BRACKETS_OFFSET + 1);
+	}
+	
+	public void testPeerEntry() throws BadLocationException, CModelException, CoreException {
+		setCaret(BODY_OFFSET);
+		type("()");
+		
+		assertEquals("()", fDocument.get(BODY_OFFSET, 2));
+		assertEquals(BODY_OFFSET + 2, getCaret());
+
+		assertFalse(LinkedModeModel.hasInstalledModel(fDocument));
+	}
+	
+	public void testMultiplePeerEntry() throws BadLocationException, CModelException, CoreException {
+		setCaret(BODY_OFFSET);
+		type("((((");
+
+		linkedType(')', true, ILinkedModeListener.UPDATE_CARET);
+		linkedType(')', true, ILinkedModeListener.UPDATE_CARET);
+		linkedType(')', true, ILinkedModeListener.UPDATE_CARET);
+		
+		assertEquals("(((())))", fDocument.get(BODY_OFFSET, 8));
+		assertEquals(BODY_OFFSET + 7, getCaret());
+		
+		LinkedPosition position= assertModel(false).findPosition(new LinkedPosition(fDocument, BODY_OFFSET + 1, 0));
+		assertNotNull(position);
+		assertEquals(BODY_OFFSET + 1, position.getOffset());
+		assertEquals(6, position.getLength());
+		
+		linkedType(')', false, ILinkedModeListener.UPDATE_CARET);
+		
+		assertEquals("(((())))", fDocument.get(BODY_OFFSET, 8));
+		assertEquals(BODY_OFFSET + 8, getCaret());
+		assertFalse(LinkedModeModel.hasInstalledModel(fDocument));
+	}
+	
+	public void testExitOnTab() throws BadLocationException, CModelException, CoreException {
+		setCaret(BODY_OFFSET);
+		type("((((");
+		linkedType('\t', true, ILinkedModeListener.NONE);
+		
+		assertEquals("(((())))", fDocument.get(BODY_OFFSET, 8));
+		assertEquals(BODY_OFFSET + 5, getCaret());
+
+		linkedType('\t', true, ILinkedModeListener.NONE);
+		linkedType('\t', true, ILinkedModeListener.NONE);
+		
+		assertEquals("(((())))", fDocument.get(BODY_OFFSET, 8));
+		assertEquals(BODY_OFFSET + 7, getCaret());
+
+		linkedType('\t', false, ILinkedModeListener.NONE);
+		
+		assertEquals("(((())))", fDocument.get(BODY_OFFSET, 8));
+		assertEquals(BODY_OFFSET + 8, getCaret());
+
+		assertFalse(LinkedModeModel.hasInstalledModel(fDocument));
+	}
+	
+	public void testExitOnReturn() throws BadLocationException, CModelException, CoreException {
+		setCaret(BODY_OFFSET);
+		type("((((");
+		linkedType(SWT.CR, true, ILinkedModeListener.UPDATE_CARET | ILinkedModeListener.EXIT_ALL);
+		
+		assertEquals("(((())))", fDocument.get(BODY_OFFSET, 8));
+		assertEquals(BODY_OFFSET + 8, getCaret());
+
+		assertFalse(LinkedModeModel.hasInstalledModel(fDocument));
+	}
+	
+	public void testExitOnEsc() throws BadLocationException, CModelException, CoreException {
+		setCaret(BODY_OFFSET);
+		type("((((");
+		linkedType(SWT.ESC, true, ILinkedModeListener.EXIT_ALL);
+		
+		assertEquals("(((())))", fDocument.get(BODY_OFFSET, 8));
+		assertEquals(BODY_OFFSET + 4, getCaret());
+
+		assertFalse(LinkedModeModel.hasInstalledModel(fDocument));
+	}
+	
+	public void testInsertClosingQuote() throws BadLocationException, CModelException, CoreException {
+		setCaret(BODY_OFFSET);
+		type('"');
+		
+		assertEquals("\"\"", fDocument.get(BODY_OFFSET, 2));
+		
+		assertSingleLinkedPosition(BODY_OFFSET + 1);
+	}
+	
+	// bug 270916
+	public void testInsertClosingQuoteInMacroDefinition() throws BadLocationException, CModelException, CoreException {
+		setCaret(BODY_OFFSET);
+		type("#define MACRO ");
+		int offset = getCaret();
+		// enter opening quote (should be closed again)
+		type('"');
+		
+		assertEquals("\"\"", fDocument.get(offset, 2));
+		assertSingleLinkedPosition(offset + 1);
+
+		// enter closing quote (should not add a quote, but proceed cursor)
+		type('"');
+		assertEquals("\"\"", fDocument.get(offset, 2));
+		assertEquals(offset + 2, getCaret());
+		
+		// delete closing quote and enter quote again
+		type(SWT.BS);
+		assertEquals("\"", fDocument.get(offset, 1));
+		int length = fDocument.getLength();
+		type('"');
+
+		assertEquals("\"\"", fDocument.get(offset, 2));
+		assertEquals(offset + 2, getCaret());
+		assertEquals(length + 1, fDocument.getLength());
+	}
+	
+	public void testPreferences() throws BadLocationException, CModelException, CoreException {
+		IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
+		store.setValue(PreferenceConstants.EDITOR_CLOSE_BRACKETS, false);
+		
+		setCaret(BODY_OFFSET);
+		type('(');
+		
+		assertEquals("(", fDocument.get(BODY_OFFSET, 1));
+		assertEquals(BODY_OFFSET + 1, getCaret());
+		
+		assertFalse(LinkedModeModel.hasInstalledModel(fDocument));
+	}
+
+	public void testAngleBracketsAsOperator() throws Exception {
+		setCaret(BODY_OFFSET);
+		type("test<");
+		
+		assertEquals("test<", fDocument.get(BODY_OFFSET, 5));
+		assertFalse(">".equals(fDocument.get(BODY_OFFSET + 5, 1)));
+		assertEquals(BODY_OFFSET + 5, getCaret());
+		
+		assertFalse(LinkedModeModel.hasInstalledModel(fDocument));
+	}
+	
+	public void testAngleBrackets() throws Exception {
+		setCaret(BODY_OFFSET);
+		type("Test<");
+		
+		assertEquals("Test<>", fDocument.get(BODY_OFFSET, 6));
+		assertSingleLinkedPosition(BODY_OFFSET + 5);
+	}
+	
+	public void testAngleBracketsInInclude() throws Exception {
+		setCaret(INCLUDE_OFFSET);
+		type('<');
+		
+		assertEquals("#include <>", fDocument.get(INCLUDE_OFFSET - 9, 11));
+		assertSingleLinkedPosition(INCLUDE_OFFSET + 1);
+	}
+
+	public void testInsertClosingQuoteInInclude() throws Exception {
+		setCaret(INCLUDE_OFFSET);
+		type('"');
+		
+		assertEquals("#include \"\"", fDocument.get(INCLUDE_OFFSET - 9, 11));
+		assertSingleLinkedPosition(INCLUDE_OFFSET + 1);
+	}
+
+	public void testAngleBrackets_165837() throws Exception {
+		setCaret(BODY_OFFSET);
+		type("cout << \n\"aaa\" ");
+		type('<');
+		int caretOffset= getCaret();
+		assertFalse(">".equals(fDocument.get(caretOffset, 1)));
+		assertFalse(LinkedModeModel.hasInstalledModel(fDocument));
+	}
+
+	/* utilities */
+
+	private void assertSingleLinkedPosition(int offset) {
+		assertEquals(offset, getCaret());
+		
+		LinkedPosition position= assertModel(false).findPosition(new LinkedPosition(fDocument, offset, 0));
+		assertNotNull(position);
+		assertEquals(offset, position.getOffset());
+		assertEquals(0, position.getLength());
+	}
+	
+	/**
+	 * Type characters into the styled text.
+	 * 
+	 * @param characters the characters to type
+	 */
+	private void type(CharSequence characters) {
+		for (int i= 0; i < characters.length(); i++)
+			type(characters.charAt(i), 0, 0);
+	}
+
+	/**
+	 * Type a character into the styled text.
+	 * 
+	 * @param character the character to type
+	 */
+	private void type(char character) {
+		type(character, 0, 0);
+	}
+	
+	/**
+	 * Ensure there is a linked mode and type a character into the styled text.
+	 * 
+	 * @param character the character to type
+	 * @param nested whether the linked mode is expected to be nested or not
+	 * @param expectedExitFlags the expected exit flags for the current linked mode after typing the character, -1 for no exit
+	 */
+	private void linkedType(char character, boolean nested, int expectedExitFlags) {
+		final int[] exitFlags= { -1 };
+		assertModel(nested).addLinkingListener(new ILinkedModeListener() {
+			public void left(LinkedModeModel model, int flags) {
+				exitFlags[0]= flags;
+			}
+			public void resume(LinkedModeModel model, int flags) {
+			}
+			public void suspend(LinkedModeModel model) {
+			}
+		});
+		type(character, 0, 0);
+		assertEquals(expectedExitFlags, exitFlags[0]);
+	}
+	
+	private LinkedModeModel assertModel(boolean nested) {
+		LinkedModeModel model= LinkedModeModel.getModel(fDocument, 0); // offset does not matter
+		assertNotNull(model);
+		assertEquals(nested, model.isNested());
+		return model;
+	}
+
+	/**
+	 * Type a character into the styled text.
+	 * 
+	 * @param character the character to type
+	 * @param keyCode the key code
+	 * @param stateMask the state mask
+	 */
+	private void type(char character, int keyCode, int stateMask) {
+		Event event= new Event();
+		event.character= character;
+		event.keyCode= keyCode;
+		event.stateMask= stateMask;
+		fAccessor.invoke("handleKeyDown", new Object[] {event});
+		
+		new DisplayHelper() {
+			@Override
+			protected boolean condition() {
+				return false;
+			}
+		}.waitForCondition(EditorTestHelper.getActiveDisplay(), 200);
+		
+	}
+
+	private int getCaret() {
+		return ((ITextSelection) fEditor.getSelectionProvider().getSelection()).getOffset();
+	}
+
+	private void setCaret(int offset) {
+		fEditor.getSelectionProvider().setSelection(new TextSelection(offset, 0));
+		int newOffset= ((ITextSelection)fEditor.getSelectionProvider().getSelection()).getOffset();
+		assertEquals(offset, newOffset);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/BreakIteratorTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/BreakIteratorTest.java
new file mode 100644
index 0000000..352a088
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/BreakIteratorTest.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sergey Prigogin, Google
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import com.ibm.icu.text.BreakIterator;
+
+import junit.framework.TestCase;
+
+
+public class BreakIteratorTest extends TestCase {
+
+	protected BreakIterator fBreakIterator;
+
+	public void assertNextPositions(CharSequence ci, int position) {
+		assertNextPositions(ci, new int[] {position});
+	}
+
+	public void assertNextPositions(CharSequence ci, int[] positions) {
+		fBreakIterator.setText(ci.toString());
+		
+		// test next()
+		for (int i = 0; i < positions.length; i++) {
+			int pos= fBreakIterator.next(); 
+			assertEquals(positions[i], pos);
+		}
+		
+		// test following()
+		int idx= 0;
+		for (int i = 0; i < positions.length; i++) {
+			int position= positions[i];
+			while (idx < position) {
+				if (!illegalPos(ci, idx))
+					assertEquals(position, fBreakIterator.following(idx));
+				idx++;
+			}
+		}
+		
+	}
+
+	/**
+	 * Check if we are in a multibyte delimiter
+	 * @param idx
+	 * @return
+	 */
+	private boolean illegalPos(CharSequence seq, int idx) {
+		String DELIMS= "\n\r";
+		if (idx == 0 || idx == seq.length())
+			return false;
+		char one= seq.charAt(idx - 1);
+		char two= seq.charAt(idx);
+		return one != two && DELIMS.indexOf(one) != -1 && DELIMS.indexOf(two) != -1;
+	}
+
+	public void assertPreviousPositions(CharSequence ci, int position) {
+		assertPreviousPositions(ci, new int[] {position});
+	}
+
+	public void assertPreviousPositions(CharSequence ci, int[] positions) {
+		fBreakIterator.setText(ci.toString());
+		fBreakIterator.last();
+		
+		for (int i = positions.length - 1; i >= 0; i--) {
+			int pos= fBreakIterator.previous(); 
+			assertEquals(positions[i], pos);
+		}
+	
+		// test preceding()
+		int idx= ci.length();
+		for (int i = positions.length - 1; i >= 0; i--) {
+			int position= positions[i];
+			while (idx > position) {
+				if (!illegalPos(ci, idx))
+					assertEquals(position, fBreakIterator.preceding(idx));
+				idx--;
+			}
+		}
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CAutoIndentTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CAutoIndentTest.java
new file mode 100644
index 0000000..f853be4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CAutoIndentTest.java
@@ -0,0 +1,509 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *     Sergey Prigogin, Google
+ *     Andrew Ferguson (Symbian)
+ *     Andrew Gvozdev
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.runtime.ILogListener;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DefaultLineTracker;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.TabsToSpacesConverter;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.PreferenceConstants;
+import org.eclipse.cdt.ui.text.ICPartitions;
+import org.eclipse.cdt.ui.text.doctools.DefaultMultilineCommentAutoEditStrategy;
+
+import org.eclipse.cdt.internal.formatter.DefaultCodeFormatterOptions;
+
+import org.eclipse.cdt.internal.ui.text.CAutoIndentStrategy;
+import org.eclipse.cdt.internal.ui.text.CTextTools;
+
+/**
+ * Testing the auto indent strategies.
+ */
+public class CAutoIndentTest extends AbstractAutoEditTest {
+
+	private HashMap<String, String> fOptions;
+	private List<IStatus> fStatusLog;
+	private ILogListener fLogListener;
+
+	
+	/**
+	 * @param name
+	 */
+	public CAutoIndentTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return new TestSuite(CAutoIndentTest.class);
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+//		Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();  
+//		shell.forceActive();
+//		shell.forceFocus();
+		fOptions= CCorePlugin.getOptions();
+
+		fStatusLog= Collections.synchronizedList(new ArrayList<IStatus>());
+		fLogListener= new ILogListener() {
+			public void logging(IStatus status, String plugin) {
+				if(!status.isOK()) {
+					fStatusLog.add(status);
+				}
+			}
+		};
+		final Plugin plugin = CUIPlugin.getDefault();
+		if (plugin != null) {
+			plugin.getLog().addLogListener(fLogListener);
+		}
+}
+	
+	/*
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		final Plugin plugin = CUIPlugin.getDefault();
+		if (plugin != null) {
+			plugin.getLog().removeLogListener(fLogListener);
+		}
+		CCorePlugin.setOptions(fOptions);
+		super.tearDown();
+	}
+
+	private AutoEditTester createAutoEditTester() {
+		CTextTools textTools = CUIPlugin.getDefault().getTextTools();
+		IDocument doc = new Document();
+		textTools.setupCDocument(doc);
+		AutoEditTester tester = new AutoEditTester(doc, ICPartitions.C_PARTITIONING);
+		
+		tester.setAutoEditStrategy(IDocument.DEFAULT_CONTENT_TYPE, new CAutoIndentStrategy(ICPartitions.C_PARTITIONING, null));
+		tester.setAutoEditStrategy(ICPartitions.C_MULTI_LINE_COMMENT, new DefaultMultilineCommentAutoEditStrategy());
+		tester.setAutoEditStrategy(ICPartitions.C_PREPROCESSOR, new CAutoIndentStrategy(ICPartitions.C_PARTITIONING, null));
+		return tester;
+	}
+
+	public void testCAutoIndent() throws BadLocationException {
+		AutoEditTester tester = createAutoEditTester(); //$NON-NLS-1$
+		tester.type("void main() {\n"); //$NON-NLS-1$
+		assertEquals(1, tester.getCaretLine());
+		// Nested statement is indented by one.
+		assertEquals(1, tester.getCaretColumn());
+		// The brace was closed automatically.
+		assertEquals("}", tester.getLine(1)); //$NON-NLS-1$
+		tester.type("if (expression1 &&\n"); //$NON-NLS-1$
+		assertEquals(2, tester.getCaretLine());
+		// Continuation line is indented by two relative to the statement.
+		assertEquals(3, tester.getCaretColumn());
+		tester.type("expression2 &&\n"); //$NON-NLS-1$
+		assertEquals(3, tester.getCaretLine());
+		// Second continuation line is also indented by two relative to the statement.
+		assertEquals(3, tester.getCaretColumn());
+		tester.type("expression3) {"); //$NON-NLS-1$
+		// Remember caret position.
+		int offset = tester.getCaretOffset();
+		// Press Enter
+        tester.type("\n");  //$NON-NLS-1$
+		assertEquals(4, tester.getCaretLine());
+		// Nested statement is indented by one relative to the containing statement.
+		assertEquals(2, tester.getCaretColumn());
+		// The brace was closed automatically.
+		assertEquals("\t}", tester.getLine(1)); //$NON-NLS-1$
+		tester.type("int x = 5;"); //$NON-NLS-1$
+		// Move caret back after the opening brace.
+		tester.setCaretOffset(offset);
+		// Press Enter
+        tester.type("\n"); //$NON-NLS-1$
+		assertEquals(4, tester.getCaretLine());
+		// Nested statement is indented by one relative to the containing statement.
+		assertEquals(2, tester.getCaretColumn());
+        // No auto closing brace since the braces are already balanced.
+		assertEquals("\t\tint x = 5;", tester.getLine(1)); //$NON-NLS-1$
+	}
+
+	public void testPasteAutoIndent() throws BadLocationException {
+		AutoEditTester tester = createAutoEditTester(); //$NON-NLS-1$
+		tester.type("class A {\n"); //$NON-NLS-1$
+		tester.goTo(1, 0);
+		tester.paste("class B {\n" +
+				     "protected:\n" +
+				     "\tB();\n" +
+				     "public:\n" +
+				     "\tint getX() const {\n" +
+				     "\t\treturn x_;\n" +
+				     "\t}\n" +
+				     "private:\n" +
+				     "\tint x_;\n" +
+				     "};\n"); //$NON-NLS-1$
+		tester.goTo(1, 0);
+		assertEquals("\tclass B {", tester.getLine(0)); //$NON-NLS-1$
+		assertEquals("\tprotected:", tester.getLine(1)); //$NON-NLS-1$
+		assertEquals("\t\tB();", tester.getLine(2)); //$NON-NLS-1$
+		assertEquals("\tpublic:", tester.getLine(3)); //$NON-NLS-1$
+		assertEquals("\t\tint getX() const {", tester.getLine(4)); //$NON-NLS-1$
+		assertEquals("\t\t\treturn x_;", tester.getLine(5)); //$NON-NLS-1$
+		assertEquals("\t\t}", tester.getLine(6)); //$NON-NLS-1$
+		assertEquals("\tprivate:", tester.getLine(7)); //$NON-NLS-1$
+		assertEquals("\t\tint x_;", tester.getLine(8)); //$NON-NLS-1$
+		assertEquals("\t};", tester.getLine(9)); //$NON-NLS-1$
+	}
+
+	public void testDefaultAutoIndent() throws BadLocationException {
+		AutoEditTester tester = createAutoEditTester(); //$NON-NLS-1$
+		tester.type("   initial indent=5\n"); //$NON-NLS-1$
+		assertEquals(1, tester.getCaretLine());
+		assertEquals(5, tester.getCaretColumn());
+		tester.type("indent=5\n"); //$NON-NLS-1$
+		assertEquals(2, tester.getCaretLine());
+		assertEquals(5, tester.getCaretColumn());
+		tester.backspace();
+		tester.type("indent=4\n"); //$NON-NLS-1$
+		assertEquals(3, tester.getCaretLine());
+		assertEquals(4, tester.getCaretColumn());
+		tester.backspace();
+		tester.backspace();
+		tester.type("indent=2\n"); //$NON-NLS-1$
+		assertEquals(4, tester.getCaretLine());
+		assertEquals(2, tester.getCaretColumn());
+		tester.type("\n"); //$NON-NLS-1$
+		assertEquals(5, tester.getCaretLine());
+		assertEquals(2, tester.getCaretColumn());
+	}
+
+	public void testCCommentAutoIndent() throws BadLocationException {
+		AutoEditTester tester = createAutoEditTester(); //$NON-NLS-1$
+		tester.type("/*\n"); //$NON-NLS-1$
+		assertEquals(ICPartitions.C_MULTI_LINE_COMMENT, tester.getContentType(tester.getCaretOffset()-1));
+		assertEquals(1, tester.getCaretLine());
+		assertEquals(3, tester.getCaretColumn());
+		assertEquals(" * ", tester.getLine()); //$NON-NLS-1$
+		tester.type('\n');
+		assertEquals(" * ", tester.getLine()); //$NON-NLS-1$
+		tester.type('/');
+		assertEquals(" */", tester.getLine()); //$NON-NLS-1$
+		tester.type('\n');
+		assertEquals(3, tester.getCaretLine());
+		assertEquals("", tester.getLine()); //$NON-NLS-1$
+		assertEquals(0, tester.getCaretColumn());
+	}
+
+	public void testPreprocessorAutoIndent() throws BadLocationException {
+		AutoEditTester tester = createAutoEditTester(); //$NON-NLS-1$
+		tester.type("void main() {\n"); //$NON-NLS-1$
+		assertEquals(1, tester.getCaretLine());
+		// Nested statement is indented by one.
+		assertEquals(1, tester.getCaretColumn());
+		// The brace was closed automatically.
+		assertEquals("}", tester.getLine(1)); //$NON-NLS-1$
+		tester.type("#define"); //$NON-NLS-1$
+		assertEquals("#define", tester.getLine()); //$NON-NLS-1$
+		tester.type(" FOREVER \\\n");
+		assertEquals(1, tester.getCaretColumn());
+		tester.type("for(;;) \\\n");
+		assertEquals(1, tester.getCaretColumn());
+		tester.type("\t{");
+		assertEquals(2, tester.getCaretColumn());
+		assertEquals("\t{", tester.getLine());
+		tester.type("\\\n");
+		assertEquals(2, tester.getCaretColumn());
+		assertEquals("\t}", tester.getLine(1));
+	}
+
+	public void testPasteBlockCommentAutoIndent() throws BadLocationException {
+		AutoEditTester tester = createAutoEditTester(); //$NON-NLS-1$
+		tester.type("class A {\n};"); //$NON-NLS-1$
+		tester.goTo(1, 0);
+		tester.paste("/*\n" +
+				     " * block comment\n" +
+				     " */\n");
+		tester.goTo(1, 0);
+		assertEquals("\t/*", tester.getLine(0)); //$NON-NLS-1$
+		assertEquals("\t * block comment", tester.getLine(1)); //$NON-NLS-1$
+		assertEquals("\t */", tester.getLine(2)); //$NON-NLS-1$
+	}
+
+	public void testPasteLineCommentAutoIndent() throws BadLocationException {
+		AutoEditTester tester = createAutoEditTester(); //$NON-NLS-1$
+		tester.type("class A {\n};"); //$NON-NLS-1$
+		tester.goTo(1, 0);
+		tester.paste("// int f;\n");
+		tester.goTo(1, 0);
+		assertEquals("\t// int f;", tester.getLine(0)); //$NON-NLS-1$
+	}
+
+	/**
+	 * Tests brackets with semi-colons are inserted in the appropriate
+	 * contexts
+	 * @throws BadLocationException
+	 */
+	public void testBracketWithSemiColonInsertion() throws BadLocationException {
+		AutoEditTester tester = createAutoEditTester(); 
+		String[] kw= new String[] {"class", "union", "struct", "enum"};
+		String[] kw_inh= new String[] {"class", "union", "struct"};
+		String[] kw_anon= new String[] {"union", "struct", "enum"};
+
+		for(int i=0; i<kw.length; i++) {
+			tester.reset();
+
+			tester.type("\n\n\n "+kw[i]+" A {\n"); //$NON-NLS-1$
+			assertEquals("\n\n\n "+kw[i]+" A {\n\t \n };", tester.fDoc.get()); //$NON-NLS-1$
+		}
+		
+		for(int i=0; i<kw.length; i++) {
+			tester.reset();
+
+			tester.type("\n\n\n"+kw[i]+" A {\n"); //$NON-NLS-1$
+			assertEquals("\n\n\n"+kw[i]+" A {\n\t\n};", tester.fDoc.get()); //$NON-NLS-1$
+		}
+		
+		for(int i=0; i<kw.length; i++) {		
+			tester.reset();
+
+			tester.type("\n\n\n "+kw[i]+" A {\n"); //$NON-NLS-1$
+			assertEquals("\n\n\n "+kw[i]+" A {\n\t \n };", tester.fDoc.get()); //$NON-NLS-1$
+		}
+		
+		for(int i=0; i<kw.length; i++) {		
+			tester.reset();
+
+			tester.type("\n// foo\n\n\n//bar\n\n"); //$NON-NLS-1$
+			tester.goTo(2,0);
+			tester.type(kw[i]+" A {\n"); //$NON-NLS-1$
+			assertEquals("\n// foo\n"+kw[i]+" A {\n\t\n};\n\n//bar\n\n", tester.fDoc.get()); //$NON-NLS-1$
+		}
+
+		// this tests for a sensible behaviour for enums, although the
+		// code generated is invalid, its the user entered part that is
+		// the problem
+		for(int i=0; i<kw_inh.length; i++) {		
+			tester.reset();
+
+			tester.type("\n\n\n"+kw_inh[i]+" A\n:\npublic B\n,\npublic C\n{\n"); //$NON-NLS-1$
+			assertEquals("\n\n\n"+kw_inh[i]+" A\n:\n\tpublic B\n\t,\n\tpublic C\n\t{\n\t\t\n\t};", tester.fDoc.get()); //$NON-NLS-1$
+		}
+		
+		for(int i=0; i<kw.length; i++) {		
+			tester.reset();
+
+			tester.type("\n// foo\n\n\n//bar\n\n"); //$NON-NLS-1$
+			tester.goTo(2,0);
+			tester.type(kw[i]+" /* for(int i=0; i<100; i++) {} */\nA \n{\n"); //$NON-NLS-1$
+			assertEquals("\n// foo\n"+kw[i]+" /* for(int i=0; i<100; i++) {} */\nA \n{\n\t\n};\n\n//bar\n\n", tester.fDoc.get()); //$NON-NLS-1$
+		}		
+
+		for(int i=0; i<kw_anon.length; i++) {		
+			tester.reset();
+
+			tester.type("\n\n\n"+kw_anon[i]+" {\n"); //$NON-NLS-1$
+			assertEquals("\n\n\n"+kw_anon[i]+" {\n\t\n};", tester.fDoc.get()); //$NON-NLS-1$
+		}
+}
+	
+	/**
+	 * Tests that brackets are inserted (without semi-colons) in appropriate
+	 * contexts
+	 * @throws BadLocationException
+	 */
+	public void testBracketInsertion() throws BadLocationException {
+		AutoEditTester tester = createAutoEditTester();
+		
+		tester.type("\nfor (;;) {\n");
+		assertEquals("\nfor (;;) {\n\t\n}", tester.fDoc.get()); //$NON-NLS-1$
+		
+		tester.reset();
+		tester.type("\nfor /*class*/ (;;) {\n"); //$NON-NLS-1$
+		assertEquals("\nfor /*class*/ (;;) {\n\t\n}", tester.fDoc.get()); //$NON-NLS-1$	
+		
+		tester.reset();
+		tester.type("\nfor (;;) /*class*/ {\n"); //$NON-NLS-1$
+		assertEquals("\nfor (;;) /*class*/ {\n\t\n}", tester.fDoc.get()); //$NON-NLS-1$
+
+		tester.reset();
+		tester.type("\nint i[5]={\n"); //$NON-NLS-1$
+		assertEquals("\nint i[5]={\n\t\t\n};", tester.fDoc.get()); //$NON-NLS-1$
+	}
+
+	public void testBracketIndentForConstructorDefinition_Bug183814() throws BadLocationException {
+		DefaultCodeFormatterOptions whitesmiths= DefaultCodeFormatterOptions.getWhitesmithsSettings();
+		CCorePlugin.setOptions(new HashMap<String, String>(whitesmiths.getMap()));
+		AutoEditTester tester = createAutoEditTester(); //$NON-NLS-1$
+		
+		tester.type("Foo::Foo()\n{");
+		assertEquals("Foo::Foo()\n    {", tester.fDoc.get());
+	}
+	
+	public void testSmartPasteWhitesmiths_Bug180531() throws Exception {
+		DefaultCodeFormatterOptions whitesmiths= DefaultCodeFormatterOptions.getWhitesmithsSettings();
+		CCorePlugin.setOptions(new HashMap<String, String>(whitesmiths.getMap()));
+		AutoEditTester tester = createAutoEditTester(); //$NON-NLS-1$
+		
+		tester.type("A::~A()\n{");
+		assertEquals("A::~A()\n    {", tester.fDoc.get());
+		tester.type("\ndelete x;");
+		assertEquals("A::~A()\n    {\n    delete x;\n    }", tester.fDoc.get());
+		
+		tester.setCaretOffset(tester.fDoc.getLength());
+		tester.type('\n');
+		String copy= tester.fDoc.get();
+		tester.paste(copy);
+		assertEquals(copy+copy, tester.fDoc.get());
+	}
+	
+	public void testIndentInsideNamespaceDefinition_Bug188007() throws Exception {
+		AutoEditTester tester = createAutoEditTester();
+		
+		tester.type("namespace ns {\n");
+		assertEquals("", tester.getLine());
+		assertEquals(0, tester.getCaretColumn());
+		
+		DefaultCodeFormatterOptions defaultOptions= DefaultCodeFormatterOptions.getDefaultSettings();
+		defaultOptions.indent_body_declarations_compare_to_namespace_header= true;
+		CCorePlugin.setOptions(new HashMap<String, String>(defaultOptions.getMap()));
+		tester = createAutoEditTester();
+		
+		tester.type("namespace ns {\n");
+		assertEquals("\t", tester.getLine());
+		assertEquals(1, tester.getCaretColumn());
+	}
+	
+	public void testSmartPaste_Bug215310() throws Exception  {
+		AutoEditTester tester = createAutoEditTester(); //$NON-NLS-1$
+		
+		tester.type("#define S \\ \n");
+		tester.type("d\n");
+		tester.paste(
+			"class B : private A \n" + 
+			"{\n" + 
+			"};\n"
+		);
+		
+		assertNoError();
+	}
+
+	public void testAutoIndentDisabled_Bug219923() throws Exception  {
+		AutoEditTester tester = createAutoEditTester(); //$NON-NLS-1$
+		IPreferenceStore store= PreferenceConstants.getPreferenceStore();
+		try {
+			store.setValue(PreferenceConstants.EDITOR_AUTO_INDENT, false);
+			tester.type("void main() {\n"); //$NON-NLS-1$
+			assertEquals(1, tester.getCaretLine());
+			// Nested statement is not indented
+			assertEquals(0, tester.getCaretColumn());
+			// The brace was closed automatically.
+			assertEquals("}", tester.getLine(1)); //$NON-NLS-1$
+			tester.type('\t');
+			tester.type('\n');
+			// indent from previous line
+			assertEquals(1, tester.getCaretColumn());
+			tester.type('{');
+			tester.type('\n');
+			// indent from previous line
+			assertEquals(1, tester.getCaretColumn());
+			tester.type('}');
+			tester.type('\n');
+			// indent from previous line
+			assertEquals(1, tester.getCaretColumn());
+			tester.backspace();
+			tester.type('\n');
+			// indent from previous line
+			assertEquals(0, tester.getCaretColumn());
+		} finally {
+			store.setToDefault(PreferenceConstants.EDITOR_AUTO_INDENT);
+		}
+	}
+
+	public void testTabsAsSpaces_SmartIndentDisabled_Bug242707() throws Exception  {
+		HashMap<String, String> options = new HashMap<String, String>();
+		options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
+		options.put(DefaultCodeFormatterConstants.FORMATTER_INDENTATION_SIZE, "3");
+		options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "3");
+		DefaultCodeFormatterOptions defaultOptions= DefaultCodeFormatterOptions.getDefaultSettings();
+		defaultOptions.set(options);
+		CCorePlugin.setOptions(new HashMap<String, String>(defaultOptions.getMap()));
+		
+		IPreferenceStore store= PreferenceConstants.getPreferenceStore();
+		store.setValue(PreferenceConstants.EDITOR_SMART_TAB, false);
+		
+		AutoEditTester tester = createAutoEditTester();
+		
+		TabsToSpacesConverter tabToSpacesConverter = new TabsToSpacesConverter();
+		tabToSpacesConverter.setNumberOfSpacesPerTab(3);
+		tabToSpacesConverter.setLineTracker(new DefaultLineTracker());
+		tester.setTabsToSpacesConverter(tabToSpacesConverter);
+		
+		
+		try {
+			tester.type("void main() {\n"); //$NON-NLS-1$
+			assertEquals(1, tester.getCaretLine());
+			// Nested statement is indented
+			assertEquals(3, tester.getCaretColumn());
+			assertEquals("   ", tester.getLine(0)); //$NON-NLS-1$
+			// The brace was closed automatically.
+			assertEquals("}", tester.getLine(1)); //$NON-NLS-1$
+			tester.type('\t');
+			// Indent from previous line + expanded tab
+			assertEquals("      ", tester.getLine(0)); //$NON-NLS-1$
+			// Return normal indentation 
+			tester.backspace(3);
+			assertEquals("   ", tester.getLine(0)); //$NON-NLS-1$
+			tester.type("for (;;)\n");
+			// Check indentation under "for" operator
+			assertEquals("      ", tester.getLine(0)); //$NON-NLS-1$
+			// Remove all symbols on the line
+			tester.backspace(6);
+			assertEquals("", tester.getLine(0)); //$NON-NLS-1$
+			// Tabulation should not trigger autoindent, just 1 tab filled with spaces
+			tester.type("\t");
+			assertEquals("   ", tester.getLine(0)); //$NON-NLS-1$
+			tester.type("\t");
+			// Check one more tab
+			assertEquals("      ", tester.getLine(0)); //$NON-NLS-1$
+			// Clean the line to repeat 2 last entries but with spaces
+			tester.backspace(6);
+			assertEquals("", tester.getLine(0)); //$NON-NLS-1$
+			// 1-st sequence of spaces
+			tester.type("     ");
+			assertEquals("     ", tester.getLine(0)); //$NON-NLS-1$
+			// 2-nd sequence of spaces
+			tester.type("     ");
+			assertEquals("          ", tester.getLine(0)); //$NON-NLS-1$
+			
+		} finally {
+			store.setToDefault(PreferenceConstants.EDITOR_SMART_TAB);
+		}
+	}
+	
+	private void assertNoError() {
+		if (!fStatusLog.isEmpty()) {
+			fail(fStatusLog.get(0).toString());
+		}
+	}
+}
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CBreakIteratorTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CBreakIteratorTest.java
new file mode 100644
index 0000000..a8cb234
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CBreakIteratorTest.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sergey Prigogin, Google
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.internal.ui.text.CBreakIterator;
+
+
+public class CBreakIteratorTest extends BreakIteratorTest {
+
+	public static Test suite() {
+		return new TestSuite(CBreakIteratorTest.class);
+	}
+
+	/*
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		fBreakIterator= new CBreakIterator();
+	}
+	
+	public void testNext1() {
+		assertNextPositions("word word", new int[] { 4, 5, 9 });
+	}
+	
+	public void testNext2() {
+		assertNextPositions("wordWord word", new int[] { 4, 8, 9, 13 });
+	}
+	
+	public void testNextSpace() {
+		assertNextPositions(" word ", new int[] { 1, 5, 6 });
+	}
+	
+	public void testNextParen() {
+		assertNextPositions("word(params)", new int[] { 4, 5, 11, 12 });
+	}
+	
+	public void testNextLn() {
+		String s= new String("word \n" +
+				"  word2");
+		assertNextPositions(s, new int[] { 4, 5, 6, 8, 13 });
+	}
+
+	public void testMultiNextLn() {
+		String s= new String("word \n" +
+				"\n" +
+				"\n" +
+				"  word2");
+		assertNextPositions(s, new int[] { 4, 5, 6, 7, 8, 10, 15 });
+	}
+
+	public void testMultiNextLn2() {
+		String s= new String("word \r\n" +
+				"\r\n" +
+				"\r\n" +
+				"  word2");
+		assertNextPositions(s, new int[] { 4, 5, 7, 9, 11, 13, 18 });
+	}
+
+	public void testNextCamelCaseWord() {
+		String s= new String("   _isURLConnection_pool   ");
+		assertNextPositions(s, new int[] { 3, 4, 6, 9, 20, 24, 27 });
+	}
+	
+	public void testPrevious1() {
+		String s= new String("word word");
+		assertPreviousPositions(s, new int[] { 0, 4, 5 });
+	}
+	
+	public void testPrevious2() {
+		String s= new String("wordWord word");
+		assertPreviousPositions(s, new int[] { 0, 4, 8, 9 });
+	}
+	
+	public void testPreviousSpace() {
+		String s= new String(" word ");
+		assertPreviousPositions(s, new int[] { 1, 5 });
+	}
+	
+	public void testPreviousParen() {
+		String s= new String("word(params)");
+		assertPreviousPositions(s, new int[] { 0, 4, 5, 11 });
+	}
+	
+	public void testPreviousLn() {
+		String s= new String("word \n" +
+				"  word2");
+		assertPreviousPositions(s, new int[] { 0, 4, 5, 6, 8 });
+	}
+	
+	public void testMultiPreviousLn() {
+		String s= new String("word \n" +
+				"\n" +
+				"\n" +
+				"  word2");
+		assertPreviousPositions(s, new int[] { 0, 4, 5, 6, 7, 8, 10 });
+	}
+
+	public void testMultiPreviousLn2() {
+		String s= new String("word \r\n" +
+				"\r\n" +
+				"\r\n" +
+				"  word2");
+		assertPreviousPositions(s, new int[] { 0, 4, 5, 7, 9, 11, 13 });
+	}
+
+	public void testPreviousCamelCaseWord() {
+		String s= new String("   _isURLConnection_pool   ");
+		assertPreviousPositions(s, new int[] { 0, 3, 4, 6, 9, 20, 24 });
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CHeaderRuleTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CHeaderRuleTest.java
new file mode 100644
index 0000000..34111bd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CHeaderRuleTest.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.Token;
+
+import org.eclipse.cdt.internal.ui.text.CHeaderRule;
+
+/**
+ * Tests to verify recognition of #include headers.
+ */
+public class CHeaderRuleTest extends TestCase {
+	private static final String HEADER = "header";
+	private IToken fToken;
+	private RuleBasedScanner fScanner;
+	private Document fDocument;
+
+	public CHeaderRuleTest(String name) {
+		super(name);
+	}
+
+	protected void setUp() throws Exception {
+		fToken = new Token(HEADER);
+		fScanner = new RuleBasedScanner();
+		fScanner.setRules(new IRule[] {  new CHeaderRule(fToken) });
+		fDocument = new Document();
+	}
+
+	public static Test suite() {
+		return new TestSuite(CHeaderRuleTest.class);
+	}
+
+	public void testHeader() {
+		assertHeader("#include <foo.h>", "<foo.h>", 9);
+	}
+
+	public void testHeader2() {
+		assertHeader("#include <vector>", "<vector>", 9);
+	}
+
+	public void testHeaderNoSpaceBetween() {
+		assertHeader("#include<vector>", "<vector>", 8);
+	}
+
+	public void testHeaderExtraSpacesBetween() {
+		assertHeader("#include    <foo.h>", "<foo.h>", 12);
+	}
+	
+	public void testHeaderExtraSpacesBefore() {
+		assertHeader("  #include <foo.h>", "<foo.h>", 11);
+	}
+
+	public void testHeaderIncludeNext() {
+		assertHeader("#include_next<vector>", "<vector>", 13);
+	}
+
+	public void testBooleanLogic() {
+		assertNotHeader("if (x < 10 && x > 20) return false;", 6);
+	}
+	
+	public void testVariableDeclaration() {
+		assertNotHeader("vector<int> foo;", 6);
+	}
+	
+	/**
+	 * Verifies that there is a header at the given character position.
+	 * @param string String to check.
+	 * @param header Expected header.
+	 * @param position The location of the token which is expected to be a header.
+	 */
+	private void assertHeader(String string, String header, int position) {
+		fDocument.set(string);
+		fScanner.setRange(fDocument, 0, fDocument.getLength());
+		while (position > 0) {
+			fScanner.read();
+			position--;
+		}
+		IToken token = fScanner.nextToken();
+		assertSame(HEADER, token.getData());
+		assertEquals(header.length(), fScanner.getTokenLength());
+		assertEquals(string.indexOf(header), fScanner.getTokenOffset());
+	}
+	
+	/**
+	 * Verifies that string does not contain a header at the given position.
+	 * @param string The String to check.
+	 * @param position Offset where scanning should begin.
+	 */
+	private void assertNotHeader(String string, int position) {
+		fDocument.set(string);
+		fScanner.setRange(fDocument, 0, fDocument.getLength());
+		while (position > 0) {
+			fScanner.read();
+			position--;
+		}
+		IToken token = fScanner.nextToken();
+		assertNotSame(HEADER, token.getData());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CHeuristicScannerTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CHeuristicScannerTest.java
new file mode 100644
index 0000000..684ef69
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CHeuristicScannerTest.java
@@ -0,0 +1,844 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.HashMap;
+
+import junit.framework.Assert;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.rules.FastPartitioner;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
+import org.eclipse.cdt.ui.text.ICPartitions;
+
+import org.eclipse.cdt.internal.ui.text.CHeuristicScanner;
+import org.eclipse.cdt.internal.ui.text.CIndenter;
+import org.eclipse.cdt.internal.ui.text.FastCPartitionScanner;
+
+/**
+ * CHeuristicScannerTest.
+ * Derived from JDT.
+ */
+public class CHeuristicScannerTest extends TestCase {
+
+	private FastPartitioner fPartitioner;
+	private Document fDocument;
+	private CIndenter fScanner;
+	private CHeuristicScanner fHeuristicScanner;
+
+	public static Test suite() {
+		return new TestSuite(CHeuristicScannerTest.class);
+	}
+
+	/*
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	protected void setUp() {
+		if (CCorePlugin.getDefault() != null) {
+			HashMap options= CCorePlugin.getDefaultOptions();
+			options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.TAB);
+			options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4");
+
+			final String indentOnColumn= DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_NO_SPLIT, DefaultCodeFormatterConstants.INDENT_ON_COLUMN);
+			options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION, indentOnColumn);
+			options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_EXPRESSIONS_IN_INITIALIZER_LIST, indentOnColumn);
+			options.put(DefaultCodeFormatterConstants.FORMATTER_CONTINUATION_INDENTATION, "1");
+			CCorePlugin.setOptions(options);
+		}
+
+		fDocument= new Document();
+		String[] types= new String[] {
+			ICPartitions.C_MULTI_LINE_COMMENT,
+			ICPartitions.C_SINGLE_LINE_COMMENT,
+			ICPartitions.C_STRING,
+			ICPartitions.C_CHARACTER,
+			ICPartitions.C_PREPROCESSOR,
+			IDocument.DEFAULT_CONTENT_TYPE
+		};
+		fPartitioner= new FastPartitioner(new FastCPartitionScanner(), types);
+		fPartitioner.connect(fDocument); 
+		fDocument.setDocumentPartitioner(ICPartitions.C_PARTITIONING, fPartitioner);
+		
+		fHeuristicScanner= new CHeuristicScanner(fDocument);
+		fScanner= new CIndenter(fDocument, fHeuristicScanner);
+	}
+	
+	/*
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		fDocument.setDocumentPartitioner(ICPartitions.C_PARTITIONING, null);
+		fPartitioner.disconnect();
+		fPartitioner= null;
+		fDocument= null;
+
+		if (CCorePlugin.getDefault() != null) {
+			CCorePlugin.setOptions(CCorePlugin.getDefaultOptions());
+		}
+}
+
+	public void testPrevIndentationUnit1() {
+		fDocument.set("\tint a;\n" +
+			"\tif (true)\n" +
+			"");
+		
+		int pos= fScanner.findReferencePosition(18);
+		Assert.assertEquals(9, pos);
+	}
+	
+	public void testPrevIndentationUnit2() {
+		fDocument.set("\tint a;\n" +
+			"\tif (true)\n" +
+			"\t\treturn a");
+		
+		int pos= fScanner.findReferencePosition(28);
+		Assert.assertEquals(21, pos);
+	}
+	
+	public void testPrevIndentationUnit4() {
+		fDocument.set("\tint a;\n" +
+			"\tif (true)\n" +
+			"\t\treturn a\n" +
+			"");
+		
+		int pos= fScanner.findReferencePosition(29);
+		Assert.assertEquals(28, pos);
+	}
+	
+	public void testPrevIndentationUnit5() {
+		fDocument.set("\tint a;\n" +
+			"\tif (true)\n" +
+			"\t\treturn a;\n" +
+			"");
+		
+		int pos= fScanner.findReferencePosition(30);
+		Assert.assertEquals(9, pos);
+	}
+	
+	public void testPrevIndentationUnit6() {
+		// method definition
+		fDocument.set("\tvoid proc (int par1, int par2\n");
+		
+		int pos= fScanner.findReferencePosition(30);
+		Assert.assertEquals(12, pos);
+	}
+	
+	public void testPrevIndentationUnit7() {
+		// for with semis 
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tfor (int i= 4; i < 33; i++) \n" +
+			"");
+		
+		int pos= fScanner.findReferencePosition(fDocument.getLength());
+		Assert.assertEquals(39, pos);
+	}
+	
+	public void testPrevIndentationUnit8() {
+		// TODO this is mean - comment at indentation spot
+		fDocument.set("\t/* comment */ void proc (int par1, int par2) {\n");
+
+		int pos= fScanner.findReferencePosition(fDocument.getLength());
+//		Assert.assertEquals(1, pos);
+		Assert.assertEquals(15, pos);
+	}
+	
+	public void testPrevIndentationUnit9() {
+		// block
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tfor (int i= 4; i < 33; i++) {\n" +
+			"\t\t}\n" +
+			"\t\t\n" +
+			"\t\tint i;\n");
+		
+		int pos= fScanner.findReferencePosition(fDocument.getLength());
+		Assert.assertEquals(fDocument.getLength() - 7, pos);
+	}
+
+	public void testPrevIndentationUnit10() {
+		// if else 
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tif (condition()) {\n" +
+			"\t\t\tcode();\n" +
+			"\t\t} else {\n" +
+			"\t\t\totherCode();\n" +
+			"\t\t}\n" +
+			"");
+		
+		int pos= fScanner.findReferencePosition(fDocument.getLength());
+		Assert.assertEquals(39, pos);
+	}
+
+	public void testPrevIndentationUnit11() {
+		// inside else block
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tif (condition()) {\n" +
+			"\t\t\tcode();\n" +
+			"\t\t} else {\n" +
+			"\t\t\totherCode();\n" +
+			"\t\t" +
+			"");
+		
+		int pos= fScanner.findReferencePosition(fDocument.getLength());
+		Assert.assertEquals(83, pos);
+	}
+
+	public void testPrevIndentation1() {
+		fDocument.set("\tint a;\n" +
+			"\tif (true)\n" +
+			"");
+		
+		String indent= fScanner.getReferenceIndentation(18).toString();
+		Assert.assertEquals("\t", indent);
+	}
+	
+	public void testPrevIndentation2() {
+		fDocument.set("\tint a;\n" +
+			"\tif (true)\n" +
+			"\t\treturn a");
+		
+		String indent= fScanner.getReferenceIndentation(28).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+	
+	public void testPrevIndentation3() {
+		fDocument.set("\tint a;\n" +
+			"\tif (true)\n" +
+			"\t\treturn a;");
+		
+		String indent= fScanner.getReferenceIndentation(29).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+	
+	public void testPrevIndentation4() {
+		fDocument.set("\tint a;\n" +
+			"\tif (true)\n" +
+			"\t\treturn a\n" +
+			"");
+		
+		String indent= fScanner.getReferenceIndentation(29).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+	
+	public void testPrevIndentation5() {
+		fDocument.set("\tint a;\n" +
+			"\tif (true)\n" +
+			"\t\treturn a;\n" +
+			"");
+		
+		String indent= fScanner.getReferenceIndentation(30).toString();
+		Assert.assertEquals("\t", indent);
+	}
+	
+	public void testPrevIndentation6() {
+		fDocument.set("\tvoid proc (int par1, int par2\n");
+		
+		String indent= fScanner.getReferenceIndentation(30).toString();
+		Assert.assertEquals("\t", indent);
+	}
+	
+	public void testPrevIndentation7() {
+		// for with semis 
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tfor (int i= 4; i < 33; i++) \n" +
+			"");
+		
+		String indent= fScanner.getReferenceIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+	
+	public void testPrevIndentation8() {
+		fDocument.set("\t/* comment */ void proc (int par1, int par2) {\n");
+		
+		String indent= fScanner.getReferenceIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t", indent);
+	}
+	
+	public void testPrevIndentation9() {
+		// block
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tfor (int i= 4; i < 33; i++) {\n" +
+			"\t\t}\n" +
+			"\t\t\n" +
+			"\t\tint i;\n");
+		
+		String indent= fScanner.getReferenceIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+
+	public void testPrevIndentation10() {
+		// else
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tif (condition()) {\n" +
+			"\t\t\tcode();\n" +
+			"\t\t} else {\n" +
+			"\t\t\totherCode();\n" +
+			"\t\t}\n" +
+			"");
+		
+		String indent= fScanner.getReferenceIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+
+	public void testPrevIndentation11() {
+		// else
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tif (condition()) {\n" +
+			"\t\t\tcode();\n" +
+			"\t\t} else {\n" +
+			"\t\t\totherCode();\n" +
+			"\t\t" +
+			"");
+		
+		String indent= fScanner.getReferenceIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t\t", indent);
+	}
+
+	public void testIndentation1() {
+		fDocument.set("\tint a;\n" +
+			"\tif (true)\n" +
+			"");
+		
+		String indent= fScanner.computeIndentation(18).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+	
+	public void testIndentation2() {
+		fDocument.set("\tint a;\n" +
+			"\tif (true)\n" +
+			"\t\treturn a");
+		
+		String indent= fScanner.computeIndentation(28).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+	
+	public void testIndentation3() {
+		fDocument.set("\tint a;\n" +
+			"\tif (true)\n" +
+			"\t\treturn a;");
+		
+		String indent= fScanner.computeIndentation(29).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+	
+	public void testIndentation4() {
+		fDocument.set("\tint a;\n" +
+			"\tif (true)\n" +
+			"\t\treturn a\n" +
+			"");
+		
+		String indent= fScanner.computeIndentation(29).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+	
+	public void testIndentation5() {
+		fDocument.set("\tint a;\n" +
+			"\tif (true)\n" +
+			"\t\treturn a;\n" +
+			"");
+		
+		String indent= fScanner.computeIndentation(30).toString();
+		Assert.assertEquals("\t", indent);
+	}
+	
+	public void testIndentation6() {
+		// parameter declaration - alignment with parenthesis 
+		fDocument.set("\tvoid proc (int par1, int par2\n");
+		
+		String indent= fScanner.computeIndentation(30).toString();
+		Assert.assertEquals("\t           ", indent);
+	}
+	
+	public void testIndentation6a() {
+		// parameter declaration - alignment with parenthesis 
+		fDocument.set("\tvoid proc (  int par1, int par2\n");
+		
+		String indent= fScanner.computeIndentation(30).toString();
+		Assert.assertEquals("\t             ", indent);
+	}
+	
+	public void testIndentation7() {
+		// for with semis 
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tfor (int i= 4; i < 33; i++) \n" +
+			"");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t\t", indent);
+	}
+	
+	public void testIndentation8() {
+		// method definition
+		fDocument.set("\t/* package */ void proc (int par1, int par2) {\n");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+	
+	public void testIndentation9() {
+		// block
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tfor (int i= 4; i < 33; i++) {\n" +
+			"\t\t}\n" +
+			"\t\t\n" +
+			"\t\tint i;\n");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+
+	public void testIndentation10() {
+		// else
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tif (condition()) {\n" +
+			"\t\t\tcode();\n" +
+			"\t\t} else {\n" +
+			"\t\t\totherCode();\n" +
+			"\t\t}\n" +
+			"");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+
+	public void testIndentation11() {
+		// else
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tif (condition()) {\n" +
+			"\t\t\tcode();\n" +
+			"\t\t} else {\n" +
+			"\t\t\totherCode();\n" +
+			"\t\t" +
+			"");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t\t", indent);
+	}
+
+	public void testIndentation12() {
+		// multi-line condition
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tif (condition1()\n" +
+			"");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t\t", indent);
+	}
+
+	public void testIndentation13() {
+		// multi-line call
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tthis->doStuff(param1, param2,\n" +
+			"");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t\t", indent);
+	}
+
+	public void testIndentation14() {
+		// multi-line array initializer
+		fDocument.set("\tvoid proc (int par1, int par2) {\n" +
+			"\t\t\n" +
+			"\t\tString[] arr= new String[] { a1, a2,\n" +
+			"");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("		                             ", indent);
+	}
+
+	public void testIndentation15() {
+		// for
+		fDocument.set("\tfor (int i= 0; i < 10; i++) {\n" +
+			"\t\tbar(); bar(); // foo\n" +
+			"\t}\n");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t", indent);
+	}
+
+	public void testIndentation16() {
+		// if
+		fDocument.set("\tif (true)\n" +
+			"\t\t;");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength() - 1).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+
+	public void testIndentation17() {
+		// if
+		fDocument.set("\tif (true)\n" +
+			";");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength() - 1).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+
+	public void testIndentation18() {
+		// if
+		fDocument.set("\tif (true)\n" +
+			"");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+
+	public void testIndentation19() {
+		// if w/ brace right after }
+		fDocument.set("\tif (true) {\n" +
+			"\t\t}");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t", indent);
+	}
+
+	public void testIndentation20() {
+		// if w/ brace right before }
+		fDocument.set("\tif (true) {\n" +
+			"\t\t}");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength() - 1).toString();
+		Assert.assertEquals("\t", indent);
+	}
+
+	public void testIndentation21() {
+		// double if w/ brace
+		fDocument.set("\tif (true)\n" +
+			"\t\tif (true) {\n" +
+			"");	
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t\t", indent);
+	}
+
+	public void testIndentation22() {
+		// after double if w/ brace 
+		fDocument.set("\tif (true)\n" +
+			"\t\tif (true) {\n" +
+			"\t\t\tstuff();" +
+			"\t\t}\n" +
+			"");	
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t", indent); // because of possible dangling else
+	}
+
+	public void testIndentation22a() {
+		// after double if w/ brace 
+		fDocument.set("\tif (true)\n" +
+			"\t\tif (true) {\n" +
+			"\t\t\tstuff();\n" +
+			"\t\t}\n" +
+			"");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength() - 2).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+
+	public void testIndentation22b() {
+		// after double if w/ brace 
+		fDocument.set("\tif (true)\n" +
+			"\t\tif (true) {\n" +
+			"\t\t\tstuff();" +
+			"\t\t}\n" +
+			"a");	
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength() - 1).toString();
+		Assert.assertEquals("\t", indent); // no dangling else possible
+	}
+
+	public void testIndentation23() {
+		// do
+		fDocument.set("\tdo\n" +
+			"");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+
+	public void testIndentation24() {
+		// braceless else 
+		fDocument.set("\tif (true) {\n" +
+			"\t\tstuff();\n" +
+			"\t} else\n" +
+			"\t\tnoStuff");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+
+	public void testIndentation25() {
+		// braceless else 
+		fDocument.set("\tif (true) {\r\n" +
+			"\t\tstuff();\r\n" +
+			"\t} else\r\n" +
+			"\t\tnoStuff;\r\n");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t", indent);
+	}
+
+	public void testIndentation26() {
+		// do while
+		fDocument.set("\tdo\n" +
+			"\t\t\n" +
+			"\twhile (true);" +
+			"");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t", indent);
+	}
+
+	public void testIndentation27() {
+		// do while
+		fDocument.set("\tdo\n" +
+			"\t\t;\n" +
+			"\twhile (true);" +
+			"");
+		
+		int i= fScanner.findReferencePosition(8);
+		Assert.assertEquals(1, i);
+		String indent= fScanner.computeIndentation(8).toString();
+		Assert.assertEquals("\t", indent);
+	}
+
+	public void testIndentation28() {
+		// TODO do while - how to we distinguish from while {} loop?
+		fDocument.set("\tdo\n" +
+			"\t\t;\n" +
+			"\twhile (true);" +
+			"");
+		
+		int i= fScanner.findReferencePosition(fDocument.getLength());
+		Assert.assertEquals(1, i);
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t", indent);
+	}
+
+	public void testIndentation29() {
+		fDocument.set("\t\twhile (condition)\n" +
+				"\t\t\twhile (condition)\n" + 
+				"\t\t\t\tfoo();\n");
+		
+		int i= fScanner.findReferencePosition(fDocument.getLength());
+		Assert.assertEquals(2, i);
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+
+	public void testIndentation30() {
+		// braceless else 
+		fDocument.set("\tif (true)\n" +
+			"\t{");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength() - 1).toString();
+		Assert.assertEquals("\t", indent);
+	}
+
+	public void testIndentation31() {
+		// braceless else 
+		fDocument.set("\tif (true)\n" +
+			"{\t\n" +
+			"\t\tstuff();\n" +
+			"\t} else\n" +
+			"\t\tnoStuff");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t", indent);
+	}
+
+	public void testIndentation32() {
+		// braceless else 
+		fDocument.set("\tswitch(ch) {\n" +
+			"\t\tcase one:\n");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("			", indent);
+	}
+
+	public void testListAlignmentMethodDeclaration() {
+		// parameter declaration - alignment with parenthesis 
+		fDocument.set(	"\tvoid proc (  int par1, int par2,\n" +
+				"	   int par3, int par4,\n");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("	   ", indent);
+	}
+	
+	public void testListAlignmentMethodCall() {
+		// parameter declaration - alignment with parenthesis 
+		fDocument.set(	"\this->proc (par1, par2,\n" +
+				"	   par3, par4,\n");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("	   ", indent);
+	}
+	
+	public void testListAlignmentArray() {
+		// parameter declaration - alignment with parenthesis 
+		fDocument.set(	"\tint[]= new int[] { 1, two,\n" +
+				"	   three, four,\n");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("	   ", indent);
+	}
+	
+	public void testListAlignmentArray2() {
+		// no prior art - probe system settings. 
+		fDocument.set(	"\tint[]= new int[] { 1, two,\n");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t                   ", indent);
+		
+	}
+	
+	public void testBraceAlignmentOfMultilineDeclaration() {
+		fDocument.set(	"	int foobar(int one, int two,\n" + 
+						"						 int three, int four,\n" + 
+						"						 int five) {\n" + 
+						"		\n" + 
+						"		return 0;\n" + 
+						"	}");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength() - 1).toString();
+		Assert.assertEquals("	", indent);
+	}
+	
+	public void testBlocksInCaseStatements() {
+		fDocument.set(
+				"		switch (i) {\n" + 
+				"			case 1:\n" + 
+				"				do {\n" + 
+				"");
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("					", indent);
+	}
+	
+	public void testClassInstanceCreationHeuristic() throws Exception {
+		fDocument.set("   method(new std::vector<std::string>(10), foo, new int[])");
+	    
+	    for (int offset= 0; offset < 15; offset++)
+	    	assertFalse(fHeuristicScanner.looksLikeClassInstanceCreationBackward(offset, CHeuristicScanner.UNBOUND));
+	    for (int offset= 15; offset < 18; offset++)
+	    	assertTrue(fHeuristicScanner.looksLikeClassInstanceCreationBackward(offset, CHeuristicScanner.UNBOUND));
+	    for (int offset= 18; offset < 20; offset++)
+	    	assertFalse(fHeuristicScanner.looksLikeClassInstanceCreationBackward(offset, CHeuristicScanner.UNBOUND));
+	    for (int offset= 20; offset < 26; offset++)
+	    	assertTrue(fHeuristicScanner.looksLikeClassInstanceCreationBackward(offset, CHeuristicScanner.UNBOUND));
+	    for (int offset= 26; offset < 48; offset++)
+	    	assertFalse(fHeuristicScanner.looksLikeClassInstanceCreationBackward(offset, CHeuristicScanner.UNBOUND));
+	    for (int offset= 48; offset < 54; offset++)
+	    	assertFalse(fHeuristicScanner.looksLikeClassInstanceCreationBackward(offset, CHeuristicScanner.UNBOUND));
+	    for (int offset= 54; offset < 57; offset++)
+	    	assertTrue(fHeuristicScanner.looksLikeClassInstanceCreationBackward(offset, CHeuristicScanner.UNBOUND));
+	    for (int offset= 57; offset < 59; offset++)
+	    	assertFalse(fHeuristicScanner.looksLikeClassInstanceCreationBackward(offset, CHeuristicScanner.UNBOUND));
+    }
+
+	public void testFieldReferenceHeuristic() throws Exception {
+		fDocument.set("t.f=tp->f-T::f;");
+	    for (int offset= 0; offset < 2; offset++)
+	    	assertFalse(fHeuristicScanner.looksLikeFieldReferenceBackward(offset, CHeuristicScanner.UNBOUND));
+	    for (int offset= 2; offset < 4; offset++)
+	    	assertTrue(fHeuristicScanner.looksLikeFieldReferenceBackward(offset, CHeuristicScanner.UNBOUND));
+	    for (int offset= 4; offset < 8; offset++)
+	    	assertFalse(fHeuristicScanner.looksLikeFieldReferenceBackward(offset, CHeuristicScanner.UNBOUND));
+	    for (int offset= 8; offset < 10; offset++)
+	    	assertTrue(fHeuristicScanner.looksLikeFieldReferenceBackward(offset, CHeuristicScanner.UNBOUND));
+	    for (int offset= 10; offset < 13; offset++)
+	    	assertFalse(fHeuristicScanner.looksLikeFieldReferenceBackward(offset, CHeuristicScanner.UNBOUND));
+	    for (int offset= 13; offset < 14; offset++)
+	    	assertTrue(fHeuristicScanner.looksLikeFieldReferenceBackward(offset, CHeuristicScanner.UNBOUND));
+	    for (int offset= 15; offset < 15; offset++)
+	    	assertFalse(fHeuristicScanner.looksLikeFieldReferenceBackward(offset, CHeuristicScanner.UNBOUND));
+	}
+	
+	public void testCompositeTypeDefinitionHeuristic() throws Exception {
+		int offset;
+		fDocument.set("class A {");
+		offset= fDocument.get().indexOf("{");
+    	assertTrue(fHeuristicScanner.looksLikeCompositeTypeDefinitionBackward(offset, CHeuristicScanner.UNBOUND));
+		fDocument.set("class A : B {");
+		offset= fDocument.get().indexOf("{");
+    	assertTrue(fHeuristicScanner.looksLikeCompositeTypeDefinitionBackward(offset, CHeuristicScanner.UNBOUND));
+		fDocument.set("struct A : B {");
+		offset= fDocument.get().indexOf("{");
+    	assertTrue(fHeuristicScanner.looksLikeCompositeTypeDefinitionBackward(offset, CHeuristicScanner.UNBOUND));
+		fDocument.set("class A : virtual public B {");
+		offset= fDocument.get().indexOf("{");
+    	assertTrue(fHeuristicScanner.looksLikeCompositeTypeDefinitionBackward(offset, CHeuristicScanner.UNBOUND));
+		fDocument.set("class A : public B, protected virtual C {");
+		offset= fDocument.get().indexOf("{");
+    	assertTrue(fHeuristicScanner.looksLikeCompositeTypeDefinitionBackward(offset, CHeuristicScanner.UNBOUND));
+		fDocument.set("template <class T> class A : public B<int,float>, protected C<T> {");
+		offset= fDocument.get().indexOf("{");
+    	assertTrue(fHeuristicScanner.looksLikeCompositeTypeDefinitionBackward(offset, CHeuristicScanner.UNBOUND));
+	}
+	
+	public void testShiftOperator() throws Exception {
+		fDocument.set(
+				"		for (int j = 0; j == 0; j ++) {\n" + 
+				"			j = 3 >> 1;\n" 
+		);
+		
+		String indent= fScanner.computeIndentation(fDocument.getLength()).toString();
+		Assert.assertEquals("\t\t\t", indent);
+	}
+
+	public void testConditional1() throws Exception {
+		if (true) // XXX enable when https://bugs.eclipse.org/bugs/show_bug.cgi?id=65463 is fixed
+			return;
+    	fDocument.set(
+    			"		boolean isPrime() {\n" +
+    			"			return fPrime == true ? true\n" +
+    			"			                      : false;"
+    	);
+    	
+    	String indent= fScanner.computeIndentation(fDocument.getLength() - 8).toString();
+    	Assert.assertEquals("			                      ", indent);
+    }
+
+	public void testConditional2() throws Exception {
+		if (true) // XXX enable when https://bugs.eclipse.org/bugs/show_bug.cgi?id=65463 is fixed
+			return;
+    	fDocument.set(
+    			"		boolean isPrime() {\n" +
+    			"			return fPrime == true" +
+    			"					? true\n" +
+    			"					: false;"
+    	);
+    	
+    	String indent= fScanner.computeIndentation(fDocument.getLength() - 8).toString();
+    	Assert.assertEquals("					", indent);
+    	
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CIndenterTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CIndenterTest.java
new file mode 100644
index 0000000..17e3b6e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CIndenterTest.java
@@ -0,0 +1,853 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *     Sergey Prigogin (Google)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.LineRange;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+
+import org.eclipse.cdt.internal.formatter.DefaultCodeFormatterOptions;
+
+import org.eclipse.cdt.internal.ui.editor.CDocumentSetupParticipant;
+import org.eclipse.cdt.internal.ui.editor.IndentUtil;
+
+/**
+ * Tests for the CIndenter.
+ *
+ * @since 4.0
+ */
+public class CIndenterTest extends BaseUITestCase {
+	private HashMap<String, String> fOptions;
+	private Map<String, String> fDefaultOptions;
+
+	public static TestSuite suite() {
+		return suite(CIndenterTest.class, "_");
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		fDefaultOptions= DefaultCodeFormatterOptions.getDefaultSettings().getMap();
+		fOptions= new HashMap<String, String>();
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		CCorePlugin.setOptions(new HashMap<String, String>(fDefaultOptions));
+		super.tearDown();
+	}
+
+	protected void assertIndenterResult() throws Exception {
+		CCorePlugin.setOptions(fOptions);
+		StringBuffer[] contents= getContentsForTest(2);
+		String before= contents[0].toString();
+		IDocument document= new Document(before);
+		String expected= contents[1].toString();
+		new CDocumentSetupParticipant().setup(document);
+		int numLines = document.getNumberOfLines();
+		if (document.getLineLength(numLines - 1) == 0) {
+			numLines--;  // Exclude an empty line at the end.
+		}
+		IndentUtil.indentLines(document, new LineRange(0, numLines), null, null);
+		assertEquals(expected, document.get());
+	}
+
+	//int array[] =
+	//{
+	//	  sizeof(x)
+	//	  , 1
+	//};
+
+	//int array[] =
+	//{
+	//		sizeof(x)
+	//		, 1
+	//};
+	public void testArrayInitializer() throws Exception {
+		assertIndenterResult();
+	}
+
+	//foo(arg,
+	//"string");
+
+	//foo(arg,
+	//		"string");
+	public void testStringLiteralAsLastArgument_1_Bug192412() throws Exception {
+		assertIndenterResult();
+	}
+
+	//a::foo(arg,
+	//"string");
+
+	//a::foo(arg,
+	//		"string");
+	public void testStringLiteralAsLastArgument_2_Bug192412() throws Exception {
+		assertIndenterResult();
+	}
+
+	//a::foo(arg,
+	//		"string");
+
+	//a::foo(arg,
+	//		"string");
+	public void testStringLiteralAsLastArgument_3_Bug192412() throws Exception {
+		assertIndenterResult();
+	}
+
+	//if (1)
+	//foo->bar();
+	//dontIndent();
+	
+	//if (1)
+	//	foo->bar();
+	//dontIndent();
+	public void testIndentationAfterArrowOperator_Bug192412() throws Exception {
+		assertIndenterResult();
+	}
+
+	//if (1)
+	//foo>>bar;
+	//  dontIndent();
+	
+	//if (1)
+	//	foo>>bar;
+	//dontIndent();
+	public void testIndentationAfterShiftRight_Bug192412() throws Exception {
+		assertIndenterResult();
+	}
+
+	//if (1)
+	//foo >= bar();
+	//  dontIndent();
+	
+	//if (1)
+	//	foo >= bar();
+	//dontIndent();
+	public void testIndentationAfterGreaterOrEquals_Bug192412() throws Exception {
+		assertIndenterResult();
+	}
+
+	//std::ostream& operator<<(std::ostream& stream,
+	//const BinFileParser::Exception& exp)
+	//{
+	//}
+	
+	//std::ostream& operator<<(std::ostream& stream,
+	//		const BinFileParser::Exception& exp)
+	//{
+	//}
+	public void testOperatorMethodBody_1_Bug192412() throws Exception {
+		assertIndenterResult();
+	}
+
+	//std::ostream& operator<<(std::ostream& stream,
+	//const BinFileParser::Exception& exp)
+	//{
+	//}
+	
+	//std::ostream& operator<<(std::ostream& stream,
+	//                         const BinFileParser::Exception& exp)
+	//{
+	//}
+	public void testOperatorMethodBody_2_Bug192412() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION, 
+				DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_COMPACT,
+						DefaultCodeFormatterConstants.INDENT_ON_COLUMN));
+		assertIndenterResult();
+	}
+
+	//void func(std::vector<int>* v,
+	//const std::string& s)
+	//{
+	//}
+	
+	//void func(std::vector<int>* v,
+	//    const std::string& s)
+	//{
+	//}
+	public void testFunctionParameters_1() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "2");
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENTATION_SIZE, "2");
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION, 
+				DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_COMPACT,
+						DefaultCodeFormatterConstants.INDENT_DEFAULT));
+		assertIndenterResult();
+	}
+
+	//void func(std::vector<int>* v,
+	//const std::string& s)
+	//{
+	//}
+	
+	//void func(std::vector<int>* v,
+	//          const std::string& s)
+	//{
+	//}
+	public void testFunctionParameters_2() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "2");
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENTATION_SIZE, "2");
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION, 
+				DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_COMPACT,
+						DefaultCodeFormatterConstants.INDENT_ON_COLUMN));
+		assertIndenterResult();
+	}
+
+	//void func(
+	//std::vector<int>* v,
+	//const std::string& s)
+	//{
+	//}
+
+	//void func(
+	//    std::vector<int>* v,
+	//    const std::string& s)
+	//{
+	//}
+	public void testFunctionParameters_3() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "2");
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENTATION_SIZE, "2");
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION, 
+				DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_COMPACT,
+						DefaultCodeFormatterConstants.INDENT_ON_COLUMN));
+		assertIndenterResult();
+	}
+
+	//void func(
+	//std::vector<int>* v,
+	//const std::string& s)
+	//{
+	//}
+
+	//void func(
+	//          std::vector<int>* v,
+	//          const std::string& s)
+	//{
+	//}
+	public void testFunctionParameters_4() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "2");
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENTATION_SIZE, "2");
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION, 
+				DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_ONE_PER_LINE,
+						DefaultCodeFormatterConstants.INDENT_ON_COLUMN));
+		assertIndenterResult();
+	}
+
+	//struct x {
+	// int f1 : 1;
+	// int f2 : 1;
+	// int f3 : 1;
+	//}
+	
+	//struct x {
+	//	int f1 : 1;
+	//	int f2 : 1;
+	//	int f3 : 1;
+	//}
+	public void testBitFields_Bug193298() throws Exception {
+		assertIndenterResult();
+	}
+
+	//class A {
+	//A(int a,
+	//int b)
+	//{
+	//}
+	//};
+
+	//class A {
+	//	A(int a,
+	//			int b)
+	//	{
+	//	}
+	//};
+	public void testConstructorBody_Bug194586() throws Exception {
+		assertIndenterResult();
+	}
+
+	//class A {
+	//A(int a,
+	//int b)
+	//throw()
+	//{
+	//}
+	//};
+	
+	//class A {
+	//	A(int a,
+	//			int b)
+	//	throw()
+	//	{
+	//	}
+	//};
+	public void testConstructorBodyWithThrow_Bug194586() throws Exception {
+		assertIndenterResult();
+	}
+
+	//class A {
+	//A(int a,
+	//int b)
+	//: f(0),
+	//g(0) {
+	//}
+	//};
+	
+	//class A {
+	//	A(int a,
+	//			int b)
+	//	: f(0),
+	//	  g(0) {
+	//	}
+	//};
+	public void testConstructorBodyWithInitializer_1_Bug194586() throws Exception {
+		assertIndenterResult();
+	}
+
+	//class A {
+	//public:
+	//A(int a, int b) :
+	//f(0),
+	//g(0) {
+	//}
+	//};
+	
+	//class A {
+	//public:
+	//	A(int a, int b) :
+	//		f(0),
+	//		g(0) {
+	//	}
+	//};
+	public void testConstructorBodyWithInitializer_2() throws Exception {
+		assertIndenterResult();
+	}
+
+	//void f() {
+	//switch(c) {
+	//case 'a':
+	//{
+	//}
+	//case 1:
+	//{
+	//}
+	//}
+	//}
+
+	//void f() {
+	//	switch(c) {
+	//	case 'a':
+	//	{
+	//	}
+	//	case 1:
+	//	{
+	//	}
+	//	}
+	//}
+	public void testCaseBlockAfterCharLiteral_Bug194710() throws Exception {
+		assertIndenterResult();
+	}
+
+	//int a[]=
+	//{
+	//1,
+	//2
+	//};
+
+	//int a[]=
+	//{
+	//		1,
+	//		2
+	//};
+	public void testInitializerLists_Bug194585() throws Exception {
+		assertIndenterResult();
+	}
+
+	//struct_t a[]=
+	//{
+	//{
+	//1,
+	//2,
+	//{ 1,2,3 }
+	//},
+	//{
+	//1,
+	//2,
+	//{ 1,2,3 }
+	//}
+	//};
+	
+	//struct_t a[]=
+	//{
+	//		{
+	//				1,
+	//				2,
+	//				{ 1,2,3 }
+	//		},
+	//		{
+	//				1,
+	//				2,
+	//				{ 1,2,3 }
+	//		}
+	//};
+	public void testNestedInitializerLists_Bug194585() throws Exception {
+		assertIndenterResult();
+	}
+
+	//class MyClass {
+	//typedef int MyType;
+	//public:
+	//int getA() {
+	//return a;
+	//}
+	//MyClass();
+	//protected:
+	//private:
+	//int a;
+	//};
+
+	//class MyClass {
+	//		typedef int MyType;
+	//	public:
+	//		int getA() {
+	//			return a;
+	//		}
+	//		MyClass();
+	//	protected:
+	//	private:
+	//		int a;
+	//};
+	public void testClassDeclaration_Bug278713() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_ACCESS_SPECIFIER_COMPARE_TO_TYPE_HEADER, 
+				DefaultCodeFormatterConstants.TRUE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ACCESS_SPECIFIER, 
+				DefaultCodeFormatterConstants.TRUE);
+		assertIndenterResult();
+	}
+
+	//namespace ns {
+	//class A;
+	//}
+
+	//namespace ns {
+	//	class A;
+	//}
+	public void testNamespace_1() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_NAMESPACE_HEADER, 
+				DefaultCodeFormatterConstants.TRUE);
+		assertIndenterResult();
+	}
+
+	//namespace ns {
+	//class A;
+	//}
+
+	//namespace ns {
+	//class A;
+	//}
+	public void testNamespace_2() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_NAMESPACE_HEADER, 
+				DefaultCodeFormatterConstants.FALSE);
+		assertIndenterResult();
+	}
+
+	//// a comment
+	//class MyClass
+	//{
+	//};
+	//  union DisUnion 
+	//		{ 
+	//};
+	
+	//// a comment
+	//class MyClass
+	//	{
+	//	};
+	//union DisUnion 
+	//	{ 
+	//	};
+	public void testIndentedClass_1_Bug210417() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION, 
+				DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED);
+		assertIndenterResult();
+	}
+
+	//// a comment
+	//class MyClass : public Base
+	//{
+	//};
+	
+	//// a comment
+	//class MyClass : public Base
+	//	{
+	//	};
+	public void testIndentedClass_2_Bug210417() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION, 
+				DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED);
+		assertIndenterResult();
+	}	
+	
+	//// a comment
+	//class MyClass : public Base, public OtherBase
+	//{
+	//};
+	
+	//// a comment
+	//class MyClass : public Base, public OtherBase
+	//	{
+	//	};
+	public void testIndentedClass_3_Bug210417() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION, 
+				DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED);
+		assertIndenterResult();
+	}	
+	
+	//// a comment
+	//class MyClass : public Base, public OtherBase
+	//{
+	//};
+	
+	//// a comment
+	//class MyClass : public Base, public OtherBase
+	//	{
+	//	};
+	public void testIndentedClass_4_Bug210417() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION, 
+				DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED);
+		assertIndenterResult();
+	}
+
+	//x =
+	//0;
+	
+	//x =
+	//		0;
+	public void testWrappedAssignment_1_Bug277624() throws Exception {
+		assertIndenterResult();
+	}
+
+	//{
+	//a = 0;
+	//x = 2 +
+	//2 +
+	//2;
+
+	//{
+	//	a = 0;
+	//	x = 2 +
+	//			2 +
+	//			2;
+	public void testWrappedAssignment_2_Bug277624() throws Exception {
+		assertIndenterResult();
+	}
+
+	//if (1 > 0) {
+	//double d = a * b /
+	//c;
+	
+	//if (1 > 0) {
+	//	double d = a * b /
+	//			c;
+	public void testWrappedAssignment_3_Bug277624() throws Exception {
+		assertIndenterResult();
+	}
+
+	//int x = 1 < 2 ?
+	//f(0) :
+	//1;
+	//g();
+
+	//int x = 1 < 2 ?
+	//		f(0) :
+	//		1;
+	//g();
+	public void testConditionalExpression_Bug283970() throws Exception {
+		assertIndenterResult();
+	}
+
+	//for (int i = 0;
+	//i < 2; i++)
+	
+	//for (int i = 0;
+	//		i < 2; i++)
+	public void testWrappedFor_1_Bug277625() throws Exception {
+		assertIndenterResult();
+	}
+
+	//for (int i = 0; i < 2;
+	//i++)
+	
+	//for (int i = 0; i < 2;
+	//		i++)
+	public void testWrappedFor_2_Bug277625() throws Exception {
+		assertIndenterResult();
+	}
+
+	//for (int i = 0;
+	//i < 2;
+	//i++)
+	//{
+	
+	//for (int i = 0;
+	//		i < 2;
+	//		i++)
+	//{
+	public void testWrappedFor_3_Bug277625() throws Exception {
+		assertIndenterResult();
+	}
+
+	//;
+	//for (hash_map<Node*, double>::const_iterator it = container_.begin();
+	//it != container_.end(); ++it) {
+
+	//;
+	//for (hash_map<Node*, double>::const_iterator it = container_.begin();
+	//		it != container_.end(); ++it) {
+	public void testWrappedFor_4_Bug277625() throws Exception {
+		assertIndenterResult();
+	}
+
+	//cout << "long text"
+	//<< " more text";
+
+	//cout << "long text"
+	//		<< " more text";
+	public void testWrappedOutputStream() throws Exception {
+		assertIndenterResult();
+	}
+
+	///* comment */
+	//#define MACRO(a, b) \
+	//value
+
+	///* comment */
+	//#define MACRO(a, b) \
+	//		value
+	public void testWrappedDefine() throws Exception {
+		assertIndenterResult();
+	}
+
+	//std::string
+	//	func();
+
+	//std::string
+	//func();
+	public void testFunctionDeclaration_1() throws Exception {
+		assertIndenterResult();
+	}
+
+	//;
+	//std::string
+	//	func();
+
+	//;
+	//std::string
+	//func();
+	public void testFunctionDeclaration_2() throws Exception {
+		assertIndenterResult();
+	}
+
+	//map<int, char*>::iterator
+	//	func();
+
+	//map<int, char*>::iterator
+	//func();
+	public void testFunctionDeclaration_3() throws Exception {
+		assertIndenterResult();
+	}
+
+	//template <class T, class U = A<T> >
+	//	class B {
+
+	//template <class T, class U = A<T> >
+	//class B {
+	public void testTemplateClass() throws Exception {
+		assertIndenterResult();
+	}
+
+	//class A
+	//{
+	//public:
+	//A();
+	//};
+	
+	//class A
+	//    {
+	//public:
+	//    A();
+	//    };
+	public void testWhiteSmithsAccessSpecifier_1_Bug204575() throws Exception {
+		fOptions.putAll(DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap());
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_ACCESS_SPECIFIER_COMPARE_TO_TYPE_HEADER, DefaultCodeFormatterConstants.FALSE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ACCESS_SPECIFIER, DefaultCodeFormatterConstants.TRUE);
+		assertIndenterResult();
+	}
+
+	//class A
+	//{
+	//public:
+	//A();
+	//};
+	
+	//class A
+	//    {
+	//    public:
+	//    A();
+	//    };
+	public void testWhiteSmithsAccessSpecifier_2_Bug204575() throws Exception {
+		fOptions.putAll(DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap());
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_ACCESS_SPECIFIER_COMPARE_TO_TYPE_HEADER, DefaultCodeFormatterConstants.TRUE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ACCESS_SPECIFIER, DefaultCodeFormatterConstants.FALSE);
+		assertIndenterResult();
+	}
+
+	//class A
+	//{
+	//public:
+	//A();
+	//};
+	
+	//class A
+	//    {
+	//    public:
+	//	A();
+	//    };
+	public void testWhiteSmithsAccessSpecifier_3_Bug204575() throws Exception {
+		fOptions.putAll(DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap());
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_ACCESS_SPECIFIER_COMPARE_TO_TYPE_HEADER, DefaultCodeFormatterConstants.TRUE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ACCESS_SPECIFIER, DefaultCodeFormatterConstants.TRUE);
+		assertIndenterResult();
+	}
+
+	//void f()
+	//{
+	//switch(x)
+	//{
+	//case 1:
+	//doOne();
+	//default:
+	//doOther();
+	//}
+	//}
+	
+	//void f()
+	//    {
+	//    switch(x)
+	//	{
+	//    case 1:
+	//	doOne();
+	//    default:
+	//	doOther();
+	//	}
+	//    }
+	public void testWhiteSmithsSwitch_1() throws Exception {
+		fOptions.putAll(DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap());
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_CASES, DefaultCodeFormatterConstants.TRUE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_SWITCH, DefaultCodeFormatterConstants.FALSE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, DefaultCodeFormatterConstants.MIXED);
+		assertIndenterResult();
+	}
+
+	//void f()
+	//{
+	//switch(x)
+	//{
+	//case 1:
+	//doOne();
+	//default:
+	//doOther();
+	//}
+	//}
+	
+	//void f()
+	//	{
+	//	switch(x)
+	//		{
+	//		case 1:
+	//		doOne();
+	//		default:
+	//		doOther();
+	//		}
+	//	}
+	public void testWhiteSmithsSwitch_2() throws Exception {
+		fOptions.putAll(DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap());
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_CASES, DefaultCodeFormatterConstants.FALSE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_SWITCH, DefaultCodeFormatterConstants.TRUE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.TAB);
+		assertIndenterResult();
+	}
+
+	//extern "C" {
+	//	int a;
+	//}
+
+	//extern "C" {
+	//int a;
+	//}
+	public void testIndentationInsideLinkageSpec_Bug299482() throws Exception {
+		assertIndenterResult();
+	}
+	
+	//void t() const
+	//{
+	//}
+
+	//void t() const
+	//{
+	//}
+	public void testIndentationOfConstMethodBody_Bug298282() throws Exception {
+		assertIndenterResult();
+	}
+	
+	//class A {
+	//int f,g;
+	//A():f(0)
+	//{
+	//}
+	//A():f(0),g(0)
+	//{
+	//}
+	//A():f(0),
+	//g(0)
+	//{
+	//}
+	//};
+	
+	//class A {
+	//	int f,g;
+	//	A():f(0)
+	//	{
+	//	}
+	//	A():f(0),g(0)
+	//	{
+	//	}
+	//	A():f(0),
+	//			g(0)
+	//	{
+	//	}
+	//};
+	public void testIndentationOfConstructorBodyWithFieldInitializer_Bug298282() throws Exception {
+		assertIndenterResult();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CPartitionScanner.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CPartitionScanner.java
new file mode 100644
index 0000000..04b8eff
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CPartitionScanner.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     QNX Software System
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.rules.EndOfLineRule;
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.IWordDetector;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.rules.WordRule;
+
+import org.eclipse.cdt.ui.text.ICPartitions;
+
+
+/**
+ * This scanner is not actually use in the code it was relace by
+ * FastCPartitionScanner which was faster.  We keep this around
+ * as a reference.
+ */
+public class CPartitionScanner extends RuleBasedPartitionScanner implements ICPartitions {
+
+	/**
+	 * Detector for empty comments.
+	 */
+	static class EmptyCommentDetector implements IWordDetector {
+
+		/*
+		 * @see IWordDetector#isWordStart
+		 */
+		public boolean isWordStart(char c) {
+			return (c == '/');
+		}
+
+		/*
+		 * @see IWordDetector#isWordPart
+		 */
+		public boolean isWordPart(char c) {
+			return (c == '*' || c == '/');
+		}
+	}
+
+	/**
+	 * Word rule for empty comments.
+	 */
+	static class EmptyCommentRule extends WordRule implements IPredicateRule {
+		
+		private IToken fSuccessToken;
+		/**
+		 * Constructor for EmptyCommentRule.
+		 * @param successToken
+		 */
+		public EmptyCommentRule(IToken successToken) {
+			super(new EmptyCommentDetector());
+			fSuccessToken= successToken;
+			addWord("/**/", fSuccessToken); //$NON-NLS-1$
+		}
+		
+		/*
+		 * @see IPredicateRule#evaluate(ICharacterScanner, boolean)
+		 */
+		public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+			return evaluate(scanner);
+		}
+
+		/*
+		 * @see IPredicateRule#getSuccessToken()
+		 */
+		public IToken getSuccessToken() {
+			return fSuccessToken;
+		}
+	}
+	
+	/**
+	 * Creates the partitioner and sets up the appropriate rules.
+	 */
+	public CPartitionScanner() {
+		super();
+		
+		IToken comment= new Token(C_MULTI_LINE_COMMENT);
+		IToken single_comment= new Token(C_SINGLE_LINE_COMMENT);
+		IToken string= new Token(C_STRING);
+		IToken character = new Token(C_CHARACTER);
+		List rules= new ArrayList();
+
+		// Minimize the number of rules, since we have duplicate rules 
+		// in the CCodeScanner...
+
+
+		// Add rule for single line comments.
+		rules.add(new EndOfLineRule("//", single_comment, '\\', true)); //$NON-NLS-1$
+
+
+		// Add rule for string constants.
+		rules.add(new SingleLineRule("\"", "\"", string, '\\', false, true)); //$NON-NLS-1$ //$NON-NLS-2$
+		// Add rule for character constants
+		rules.add(new SingleLineRule("'", "'", character, '\\')); //$NON-NLS-1$ //$NON-NLS-2$
+
+		// Add special case word rule.
+		EmptyCommentRule wordRule= new EmptyCommentRule(comment);
+		rules.add(wordRule);
+
+
+		// Add rules for multi-line comments.
+		rules.add(new MultiLineRule("/*", "*/", comment)); //$NON-NLS-1$ //$NON-NLS-2$
+
+		IPredicateRule[] result= new IPredicateRule[rules.size()];
+		rules.toArray(result);
+		setPredicateRules(result);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CPartitionerTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CPartitionerTest.java
new file mode 100644
index 0000000..e1dba57
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CPartitionerTest.java
@@ -0,0 +1,1167 @@
+/*******************************************************************************
+ *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *     Andrew Ferguson (Symbian)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentPartitioner;
+import org.eclipse.jface.text.IDocumentPartitioningListener;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.TypedRegion;
+
+import org.eclipse.cdt.ui.text.ICPartitions;
+
+import org.eclipse.cdt.internal.ui.text.CTextTools;
+
+
+
+/**
+ * Tests to verify the C partitioning.
+ * Derived from JavaPartitionerTest.
+ */
+public class CPartitionerTest extends TestCase {
+
+	private CTextTools fTextTools;
+	private Document fDocument;
+	protected boolean fDocumentPartitioningChanged;
+
+
+	public CPartitionerTest(String name) {
+		super(name);
+	}
+
+	@Override
+	protected void setUp() {
+
+		fTextTools= new CTextTools();
+
+		fDocument= new Document();
+		IDocumentPartitioner partitioner= fTextTools.createDocumentPartitioner(null);
+		partitioner.connect(fDocument);
+		fDocument.setDocumentPartitioner(partitioner);
+		fDocument.set("xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx");
+
+		fDocumentPartitioningChanged= false;
+		fDocument.addDocumentPartitioningListener(new IDocumentPartitioningListener() {
+			public void documentPartitioningChanged(IDocument document) {
+				fDocumentPartitioningChanged= true;
+			}
+		});
+	}
+
+	public static Test suite() {
+		return new TestSuite(CPartitionerTest.class);
+	}
+
+	@Override
+	protected void tearDown () {
+		fTextTools.dispose();
+		fTextTools= null;
+
+		IDocumentPartitioner partitioner= fDocument.getDocumentPartitioner();
+		partitioner.disconnect();
+		fDocument= null;
+	}
+
+	protected String print(ITypedRegion r) {
+		return "[" + r.getOffset() + "," + r.getLength() + "," + r.getType() + "]";
+	}
+
+	protected void checkPartitioning(ITypedRegion[] expectation, ITypedRegion[] result) {
+
+		assertEquals("invalid number of partitions", expectation.length, result.length);
+
+		for (int i= 0; i < expectation.length; i++) {
+			ITypedRegion e= expectation[i];
+			ITypedRegion r= result[i];
+			assertTrue(print(r) + " != " + print(e), r.equals(e));
+		}
+
+	}
+
+	public void testInitialPartitioning() {
+		try {
+
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx"
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(38, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(43, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testIntraPartitionChange() {
+		try {
+
+			fDocument.replace(34, 3, "y");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\ny\n/***/\nxxx");
+
+			assertTrue(!fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 3, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(36, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(41, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testIntraPartitionChange2() {
+		try {
+
+			fDocument.replace(41, 0, "yyy");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/**yyy*/\nxxx");
+
+			// assertTrue(!fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(38, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(46, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+	public void testInsertNewPartition() {
+		try {
+
+			fDocument.replace(35, 1, "/***/");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nx/***/x\n/***/\nxxx");
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 2, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(35, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(40, 2, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(42, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(47, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+	public void testInsertStringPartition() {
+		try {
+
+			fDocument.replace(35, 1, "\"yyy\"");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nx\"yyy\"x\n/***/\nxxx");
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 2, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(35, 5, ICPartitions.C_STRING),
+				new TypedRegion(40, 2, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(42, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(47, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+	public void testInsertCharacterPartition() {
+		try {
+
+			fDocument.replace(35, 1, "'y'");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nx\"yyy\"x\n/***/\nxxx");
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 2, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(35, 3, ICPartitions.C_CHARACTER),
+				new TypedRegion(38, 2, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(40, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(45, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+	public void testInsertPreprocessorPartition() {
+		try {
+
+			fDocument.replace(4, 0, " # include <x.h>\n");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nx\"yyy\"x\n/***/\nxxx");
+			//	"xxx\n # include <x.h>\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nx\"yyy\"x\n/***/\nxxx");
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4, 17, ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(21, 7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(28, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(33, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(41, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(46, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(50, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(55, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(60, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testRemovePartition1() {
+		try {
+
+			fDocument.replace(13, 16, null);
+			//	"xxx\n/*xxx*/\nx/**/\nxxx\n/***/\nxxx");
+
+			assertTrue(fDocumentPartitioningChanged);
+
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 2, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(13, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(17, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(22, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(27, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testRemovePartition2() {
+
+		testJoinPartition3();
+		fDocumentPartitioningChanged= false;
+
+		try {
+
+			fDocument.replace(5, 2, null);
+			//	"xxx\nxxx\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  12, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(12,  8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(20, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(25, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(29, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(34, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(39, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+
+	public void testJoinPartitions1() {
+		try {
+
+			fDocument.replace(31, 1, null);
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/*/\nxxx\n/***/\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 13, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(42, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testJoinPartitions2() {
+		try {
+
+			fDocument.replace(32, 1, null);
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**\nxxx\n/***/\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 13, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(42, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testJoinPartition3() {
+		try {
+
+			fDocument.replace(9, 2, null);
+			//	"xxx\n/*xxx\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  18, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(22, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(27, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(31, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(36, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(41, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+
+	public void testSplitPartition1() {
+
+		testJoinPartitions1();
+		fDocumentPartitioningChanged= false;
+
+
+		try {
+
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/*/\nxxx\n/***/\nxxx"
+			fDocument.replace(31, 0, "*");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+
+		testInitialPartitioning();
+	}
+
+	public void testSplitPartition2() {
+
+		testJoinPartitions2();
+		fDocumentPartitioningChanged= false;
+
+		try {
+
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**\nxxx\n/***/\nxxx"
+			fDocument.replace(32, 0, "/");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+
+		testInitialPartitioning();
+	}
+
+	public void testSplitPartition3() {
+
+		fDocumentPartitioningChanged= false;
+
+		try {
+
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx"
+			fDocument.replace(12, 9, "");
+			//	"xxx\n/*xxx*/\nx*/\nxxx\n/**/\nxxx\n/***/\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 9, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(20, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(34, 4, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testCorruptPartitioning1() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "/***/\n/***/");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(5, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(6, 5, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(6, 0, "*/\n/***/\n/*");
+			// "/***/\n*/\n/***/\n/*/***/"
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(5, 4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(9, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(14, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(15, 7, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testCorruptPartitioning2() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "/***/\n/***/\n/***/");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(5, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(6, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(12, 5, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(6, 0, "*/\n/***/\n/*");
+			// "/***/\n*/\n/***/\n/*/***/\n/***/"
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(5, 4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(9, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(14, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(15, 7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(22, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(23, 5, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testCorruptPartitioning3() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "/***/\n/**/");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(5, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(6, 4, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(0, 9, "/***/\n/***/\n/***/\n/**");
+			// "/***/\n/***/\n/***/\n/***/"
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(5, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(6, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(12, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(17, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(18, 5, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testOpenPartition1() {
+		try {
+
+			fDocument.replace(42, 1, null);
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***\nxxx"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(38, 8, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testOpenPartition2() {
+		try {
+
+			fDocument.replace(47, 0, "/*");
+			//	"xxx\n/*xxx*/\nxxx\n/**xxx*/\nxxx\n/**/\nxxx\n/***/\nxxx/*"
+
+			assertTrue(fDocumentPartitioningChanged);
+
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(4,  7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(16, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(24, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(29, 4, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(33, 5, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(38, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(43, 4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(47, 2, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+			checkPartitioning(expectation, result);
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+
+	public void testPartitionFinder() {
+		try {
+
+			ITypedRegion[] partitioning= fDocument.computePartitioning(0, fDocument.getLength());
+
+			for (int i= 0; i < partitioning.length; i++) {
+				ITypedRegion expected= partitioning[i];
+				for (int j= 0; j < expected.getLength(); j++) {
+					ITypedRegion result= fDocument.getPartition(expected.getOffset() + j);
+					assertTrue(expected.equals(result));
+				}
+			}
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testExtendPartition() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "/*");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  2, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(2, 0, " ");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  3, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testTogglePartition() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "\t/*\n\tx\n\t/*/\n\ty\n//\t*/");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation1= {
+				new TypedRegion(0,  1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(1,  10, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(11, 4, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(15, 5, ICPartitions.C_SINGLE_LINE_COMMENT)
+			};
+			checkPartitioning(expectation1, result);
+
+			fDocumentPartitioningChanged= false;
+			fDocument.replace(0, 0, "//"); // "//\t/*\n\tx\n\t/*/\n\ty\n//\t*/"
+			assertTrue(fDocumentPartitioningChanged);
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation2= {
+				new TypedRegion(0,  6, ICPartitions.C_SINGLE_LINE_COMMENT),
+				new TypedRegion(6,  4,  IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(10,  12, ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+			checkPartitioning(expectation2, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testEditing1() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  0,  IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "/");
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			fDocument.replace(fDocument.getLength(), 0, "/");
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+			checkPartitioning(expectation, result);
+
+
+			fDocument.replace(fDocument.getLength(), 0, "\r\n");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  4,  ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(4, 2, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testEditing2() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  0,  IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "/");
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "\r\n");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testEditing3() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  0,  IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "/");
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			fDocument.replace(fDocument.getLength(), 0, "\r\n *");
+			fDocument.replace(fDocument.getLength(), 0, "/");
+
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_MULTI_LINE_COMMENT)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "*");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  8,  ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(8, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testEditingString() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  0,  IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "\"");
+			fDocument.replace(fDocument.getLength(), 0, "y");
+			fDocument.replace(fDocument.getLength(), 0, "y");
+			fDocument.replace(fDocument.getLength(), 0, "\"");
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_STRING)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "y");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  4,  ICPartitions.C_STRING),
+				new TypedRegion(4, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert escaped double quote
+			fDocument.replace(2, 0, "\\\"");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  6,  ICPartitions.C_STRING),
+				new TypedRegion(6, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert closing and opening double quote
+			fDocument.replace(2, 2, "\"\"");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  3,  ICPartitions.C_STRING),
+				new TypedRegion(3,  3,  ICPartitions.C_STRING),
+				new TypedRegion(6, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert line continuation and newline
+			fDocument.replace(2, 2, "\\\r\n");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  7,  ICPartitions.C_STRING),
+				new TypedRegion(7, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// delete line continuation
+			fDocument.replace(2, 1, "");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0, 4,  ICPartitions.C_STRING),
+				new TypedRegion(4, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(5, 2,  ICPartitions.C_STRING)
+			};
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testEditingCharacter() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  0,  IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "'");
+			fDocument.replace(fDocument.getLength(), 0, "y");
+			fDocument.replace(fDocument.getLength(), 0, "y");
+			fDocument.replace(fDocument.getLength(), 0, "'");
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_CHARACTER)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "y");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  4,  ICPartitions.C_CHARACTER),
+				new TypedRegion(4, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert escaped single quote
+			fDocument.replace(2, 0, "\\'");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  6,  ICPartitions.C_CHARACTER),
+				new TypedRegion(6, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert closing and opening quote
+			fDocument.replace(2, 2, "''");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  3,  ICPartitions.C_CHARACTER),
+				new TypedRegion(3,  3,  ICPartitions.C_CHARACTER),
+				new TypedRegion(6, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert line continuation and newline
+			fDocument.replace(2, 2, "\\\r\n");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  7,  ICPartitions.C_CHARACTER),
+				new TypedRegion(7, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// delete line continuation
+			fDocument.replace(2, 1, "");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0, 4,  ICPartitions.C_CHARACTER),
+				new TypedRegion(4, 1, IDocument.DEFAULT_CONTENT_TYPE),
+				new TypedRegion(5, 2,  ICPartitions.C_CHARACTER)
+			};
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testEditingPreprocessor() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  0,  IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "#");
+			fDocument.replace(fDocument.getLength(), 0, " ");
+			fDocument.replace(fDocument.getLength(), 0, "\t");
+			fDocument.replace(fDocument.getLength(), 0, "include <float.h> ");
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_PREPROCESSOR)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "//   ");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  21,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(21, 5, ICPartitions.C_SINGLE_LINE_COMMENT),
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(21, 5, "/* */");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  21,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(21, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(fDocument.getLength(), 0, "\nz");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  21,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(21, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(26, 1,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(27, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert escaped backslash
+			fDocument.replace(2, 0, "\\\\");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  23,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(23, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(28, 1,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(29, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// replace one backslash with a newline
+			fDocument.replace(3, 1, "\n");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  23,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(23, 5, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(28, 1,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(29, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert backslash and newline inside multiline comment
+			fDocument.replace(26, 0, "\\\r\n");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  23,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(23, 8, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(31, 1,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(32, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// delete NL leaving only CR
+			fDocument.replace(28, 1, "");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  23,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(23, 7, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(30, 1,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(31, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// delete backslash
+			fDocument.replace(26, 1, "");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  23,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(23, 6, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(29, 1,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(30, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+			// insert white space before #
+			fDocument.replace(0, 0, "  \t");
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  26,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(26, 6, ICPartitions.C_MULTI_LINE_COMMENT),
+				new TypedRegion(32, 1,  ICPartitions.C_PREPROCESSOR),
+				new TypedRegion(33, 1, IDocument.DEFAULT_CONTENT_TYPE)
+			};
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testLineSplicing_Bug124113() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "// comment... \\\\\ncontinued");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_SINGLE_LINE_COMMENT)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(0, fDocument.getLength(), "#define D \\\\\ncontinued");
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_PREPROCESSOR)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(0, fDocument.getLength(), "\"str\\\\\ncontinued\"");
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_STRING)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(0, fDocument.getLength(), "'\\\\\nc'");
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_CHARACTER)
+			};
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+
+	public void testCommentInPreprocessorString() {
+		try {
+
+			fDocument.replace(0, fDocument.getLength(), "#define S \"http://www.foo.bar\"");
+
+			ITypedRegion[] result= fDocument.computePartitioning(0, fDocument.getLength());
+			TypedRegion[] expectation= {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_PREPROCESSOR)
+			};
+			checkPartitioning(expectation, result);
+
+			fDocument.replace(0, fDocument.getLength(), "#define S \"http:/* */\"");
+
+			result= fDocument.computePartitioning(0, fDocument.getLength());
+			expectation= new TypedRegion[] {
+				new TypedRegion(0,  fDocument.getLength(),  ICPartitions.C_PREPROCESSOR)
+			};
+			checkPartitioning(expectation, result);
+
+		} catch (BadLocationException x) {
+			assertTrue(false);
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CStructureCreatorTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CStructureCreatorTest.java
new file mode 100644
index 0000000..8496227
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CStructureCreatorTest.java
@@ -0,0 +1,261 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.compare.ITypedElement;
+import org.eclipse.compare.ResourceNode;
+import org.eclipse.compare.structuremergeviewer.DocumentRangeNode;
+import org.eclipse.compare.structuremergeviewer.IStructureComparator;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IParent;
+import org.eclipse.cdt.core.model.ISourceRange;
+import org.eclipse.cdt.core.model.ISourceReference;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+
+import org.eclipse.cdt.internal.ui.compare.CStructureCreator;
+
+/**
+ * Tests for the CStructureCreator.
+ *
+ * @since 5.0
+ */
+public class CStructureCreatorTest extends BaseUITestCase {
+
+	public static TestSuite suite() {
+		return suite(CStructureCreatorTest.class, "_");
+	}
+
+	private ICProject fCProject;
+
+	protected void setUp() throws Exception {
+		super.setUp();
+		fCProject= EditorTestHelper.createCProject("CStructureCreatorTest", "resources/compare", false);
+	}
+
+	protected void tearDown() throws Exception {
+		if (fCProject != null) {
+			CProjectHelper.delete(fCProject);
+		}
+		super.tearDown();
+	}
+
+	public void testStructureCreatorNodeTypes() throws Exception {
+		IFile file= ResourceTestHelper.findFile("/CStructureCreatorTest/src/CompareTest.cpp");
+		assertNotNull(file);
+		CStructureCreator creator= new CStructureCreator();
+		IStructureComparator node= creator.getStructure(new ResourceNode(file));
+		assertNotNull(node);
+		Object[] children= node.getChildren();
+		// one node below root == translation unit
+		assertEquals(1, children.length);
+		DocumentRangeNode tuNode= (DocumentRangeNode)children[0];
+
+		// tu children
+		children= tuNode.getChildren();
+		assertEquals(10, children.length);
+		DocumentRangeNode child= (DocumentRangeNode)children[0];
+		assertEquals(ICElement.C_INCLUDE, child.getTypeCode());
+		child= (DocumentRangeNode)children[1];
+		assertEquals(ICElement.C_MACRO, child.getTypeCode());
+		DocumentRangeNode namespace= (DocumentRangeNode)children[2];
+		assertEquals(ICElement.C_NAMESPACE, namespace.getTypeCode());
+		child= (DocumentRangeNode)children[3];
+		assertEquals(ICElement.C_VARIABLE, child.getTypeCode());
+		child= (DocumentRangeNode)children[4];
+		assertEquals(ICElement.C_FUNCTION, child.getTypeCode());
+		DocumentRangeNode struct= (DocumentRangeNode)children[5];
+		assertEquals(ICElement.C_STRUCT, struct.getTypeCode());
+		child= (DocumentRangeNode)children[6];
+		assertEquals(ICElement.C_VARIABLE, child.getTypeCode());
+		child= (DocumentRangeNode)children[7];
+		assertEquals(ICElement.C_VARIABLE, child.getTypeCode());
+		child= (DocumentRangeNode)children[8];
+		assertEquals(ICElement.C_USING, child.getTypeCode());
+		child= (DocumentRangeNode)children[9];
+		assertEquals(ICElement.C_FUNCTION, child.getTypeCode());
+
+		// namespace children
+		children= namespace.getChildren();
+		assertEquals(22, children.length);
+		DocumentRangeNode clazz= (DocumentRangeNode)children[0];
+		assertEquals(ICElement.C_CLASS, clazz.getTypeCode());
+		DocumentRangeNode enum1= (DocumentRangeNode)children[1];
+		assertEquals(ICElement.C_ENUMERATION, enum1.getTypeCode());
+		child= (DocumentRangeNode)children[2];
+		assertEquals(ICElement.C_ENUMERATION, child.getTypeCode());
+		child= (DocumentRangeNode)children[3];
+		assertEquals(ICElement.C_VARIABLE, child.getTypeCode());
+		child= (DocumentRangeNode)children[4];
+		assertEquals(ICElement.C_VARIABLE, child.getTypeCode());
+		child= (DocumentRangeNode)children[5];
+		assertEquals(ICElement.C_VARIABLE, child.getTypeCode());
+		child= (DocumentRangeNode)children[6];
+		assertEquals(ICElement.C_VARIABLE_DECLARATION, child.getTypeCode());
+		child= (DocumentRangeNode)children[7];
+		assertEquals(ICElement.C_VARIABLE, child.getTypeCode());
+		child= (DocumentRangeNode)children[8];
+		assertEquals(ICElement.C_FUNCTION_DECLARATION, child.getTypeCode());
+		child= (DocumentRangeNode)children[9];
+		assertEquals(ICElement.C_FUNCTION_DECLARATION, child.getTypeCode());
+		child= (DocumentRangeNode)children[10];
+		assertEquals(ICElement.C_FUNCTION, child.getTypeCode());
+		child= (DocumentRangeNode)children[11];
+		assertEquals(ICElement.C_STRUCT, child.getTypeCode());
+		child= (DocumentRangeNode)children[12];
+		assertEquals(ICElement.C_TYPEDEF, child.getTypeCode());
+		child= (DocumentRangeNode)children[13];
+		assertEquals(ICElement.C_STRUCT, child.getTypeCode());
+		child= (DocumentRangeNode)children[14];
+		assertEquals(ICElement.C_TYPEDEF, child.getTypeCode());
+		DocumentRangeNode union= (DocumentRangeNode)children[15];
+		assertEquals(ICElement.C_UNION, union.getTypeCode());
+		child= (DocumentRangeNode)children[16];
+		assertEquals(ICElement.C_TEMPLATE_FUNCTION_DECLARATION, child.getTypeCode());
+		child= (DocumentRangeNode)children[17];
+		assertEquals(ICElement.C_TEMPLATE_FUNCTION, child.getTypeCode());
+		DocumentRangeNode clazz2= (DocumentRangeNode)children[18];
+		assertEquals(ICElement.C_CLASS, clazz2.getTypeCode());
+		child= (DocumentRangeNode)children[19];
+		assertEquals(ICElement.C_TEMPLATE_CLASS, child.getTypeCode());
+		child= (DocumentRangeNode)children[20];
+		assertEquals(ICElement.C_TEMPLATE_STRUCT, child.getTypeCode());
+		child= (DocumentRangeNode)children[21];
+		assertEquals(ICElement.C_TEMPLATE_VARIABLE, child.getTypeCode());
+
+		// class children
+		children= clazz.getChildren();
+		assertEquals(3, children.length);
+		child= (DocumentRangeNode)children[0];
+		assertEquals(ICElement.C_FIELD, child.getTypeCode());
+		child= (DocumentRangeNode)children[1];
+		assertEquals(ICElement.C_METHOD, child.getTypeCode());
+		namespace= (DocumentRangeNode)children[2];
+		assertEquals(ICElement.C_NAMESPACE, namespace.getTypeCode());
+
+		// enum children
+		children= enum1.getChildren();
+		assertEquals(3, children.length);
+		child= (DocumentRangeNode)children[0];
+		assertEquals(ICElement.C_ENUMERATOR, child.getTypeCode());
+		child= (DocumentRangeNode)children[1];
+		assertEquals(ICElement.C_ENUMERATOR, child.getTypeCode());
+		child= (DocumentRangeNode)children[2];
+		assertEquals(ICElement.C_ENUMERATOR, child.getTypeCode());
+
+		// union children
+		children= union.getChildren();
+		assertEquals(1, children.length);
+		child= (DocumentRangeNode)children[0];
+		assertEquals(ICElement.C_FIELD, child.getTypeCode());
+
+		// enclosing class children
+		children= clazz2.getChildren();
+		assertEquals(1, children.length);
+		child= (DocumentRangeNode)children[0];
+		assertEquals(ICElement.C_TEMPLATE_METHOD_DECLARATION, child.getTypeCode());
+
+		// nested namespace children
+		children= namespace.getChildren();
+		assertEquals(2, children.length);
+		child= (DocumentRangeNode)children[0];
+		assertEquals(ICElement.C_CLASS, child.getTypeCode());
+		clazz= (DocumentRangeNode)children[1];
+		assertEquals(ICElement.C_CLASS, child.getTypeCode());
+		// nested class children
+		children= clazz.getChildren();
+		assertEquals(3, children.length);
+		child= (DocumentRangeNode)children[0];
+		assertEquals(ICElement.C_FIELD, child.getTypeCode());
+		child= (DocumentRangeNode)children[1];
+		assertEquals(ICElement.C_METHOD, child.getTypeCode());
+		child= (DocumentRangeNode)children[2];
+		assertEquals(ICElement.C_METHOD_DECLARATION, child.getTypeCode());
+	}
+
+	public void testStructureCreatorNodeSizes() throws Exception {
+		IFile file= ResourceTestHelper.findFile("/CStructureCreatorTest/src/CompareTest.cpp");
+		assertNotNull(file);
+		CStructureCreator creator= new CStructureCreator();
+		IStructureComparator node= creator.getStructure(new ResourceNode(file));
+		assertNotNull(node);
+		Object[] children= node.getChildren();
+		// one node below root == translation unit
+		assertEquals(1, children.length);
+		DocumentRangeNode tuNode= (DocumentRangeNode)children[0];
+		IDocument document= tuNode.getDocument();
+		Position range= tuNode.getRange();
+		assertEqualPositions(new Position(0, document.getLength()), range);
+		
+		verifyStructure(tuNode, CoreModel.getDefault().create(file));
+	}
+	
+	private void assertEqualPositions(Position expected, Position actual) {
+		assertEquals(expected.getOffset(), actual.getOffset());
+		assertEquals(expected.getLength(), actual.getLength());
+	}
+
+	private void verifyStructure(DocumentRangeNode cNode, ICElement cElement) throws CModelException, BadLocationException {
+		// verify same type
+		assertEquals(cElement.getElementType(), cNode.getTypeCode());
+		
+		if (cNode.getTypeCode() != ICElement.C_UNIT && cNode instanceof ITypedElement) {
+			Position nodeRange= cNode.getRange();
+			IDocument doc= cNode.getDocument();
+			ISourceReference sourceRef= (ISourceReference)cElement;
+			ISourceRange sourceRange= sourceRef.getSourceRange();
+			// verify start and endline of elements match
+			assertEquals(sourceRange.getStartLine(), doc.getLineOfOffset(nodeRange.getOffset()) + 1);
+			assertEquals(sourceRange.getEndLine(), doc.getLineOfOffset(nodeRange.getOffset() + nodeRange.getLength() - 1) + 1);
+			
+			assertEqualPositions(new Position(sourceRange.getStartPos(), sourceRange.getLength()), nodeRange);
+			
+			if (cElement.getElementName().length() > 0) {
+				assertEquals(cElement.getElementName(), ((ITypedElement)cNode).getName());
+			}
+		}
+		Object[] nodeChildren= cNode.getChildren();
+		// merge in extern "C" children to match cmodel hierarchy
+		for (int i = 0; i < nodeChildren.length; i++) {
+			DocumentRangeNode childNode= (DocumentRangeNode)nodeChildren[i];
+//			if (childNode.getTypeCode() == ICElement.C_STORAGE_EXTERN) {
+//				Object[] linkageSpecChildren= childNode.getChildren();
+//				Object[] newArray= new Object[nodeChildren.length - 1 + linkageSpecChildren.length];
+//				System.arraycopy(nodeChildren, 0, newArray, 0, i);
+//				System.arraycopy(linkageSpecChildren, 0, newArray, i, linkageSpecChildren.length);
+//				System.arraycopy(nodeChildren, i+1, newArray, i + linkageSpecChildren.length, nodeChildren.length - i - 1);
+//				nodeChildren= newArray;
+//			}
+		}
+		ICElement[] cElementChildren;
+		if (cElement instanceof IParent) {
+			cElementChildren= ((IParent)cElement).getChildren();
+		} else {
+			cElementChildren= new ICElement[0];
+		}
+		// verify same number of children
+		assertEquals(cElementChildren.length, nodeChildren.length);
+		for (int i = 0; i < cElementChildren.length; i++) {
+			verifyStructure((DocumentRangeNode)nodeChildren[i], cElementChildren[i]);
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CWordFinderTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CWordFinderTest.java
new file mode 100644
index 0000000..4591f25
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CWordFinderTest.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *     Sergey Prigogin (Google)
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+
+import org.eclipse.cdt.internal.ui.text.CWordFinder;
+
+/**
+ * Tests for CWordFinder.
+ */
+public class CWordFinderTest extends BaseUITestCase {
+
+	public static TestSuite suite() {
+		return suite(CWordFinderTest.class, "_");
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+	}
+
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	public void testBasic() {
+		IDocument doc= new Document(" func(int a, int b);");
+		IRegion region = CWordFinder.findWord(doc, 1);
+		assertEquals(1, region.getOffset());
+		assertEquals(4, region.getLength());
+		region = CWordFinder.findWord(doc, 4);
+		assertEquals(1, region.getOffset());
+		assertEquals(4, region.getLength());
+		region = CWordFinder.findWord(doc, 5);
+		assertEquals(1, region.getOffset());
+		assertEquals(4, region.getLength());
+		region = CWordFinder.findWord(doc, 6);
+		assertEquals(6, region.getOffset());
+		assertEquals(3, region.getLength());
+		region = CWordFinder.findWord(doc, 12);
+		assertEquals(12, region.getOffset());
+		assertEquals(0, region.getLength());
+		doc= new Document("func();");
+		region = CWordFinder.findWord(doc, 0);
+		assertEquals(0, region.getOffset());
+		assertEquals(4, region.getLength());
+		region = CWordFinder.findWord(doc, 5);
+		assertEquals(5, region.getOffset());
+		assertEquals(0, region.getLength());
+	}
+
+	public void testFindWord() throws BadLocationException {
+		IDocument doc= new Document();
+		StringBuffer buf= new StringBuffer();
+		String word= "word_0815";
+		for (int i= 0; i < 10; i++) {
+			buf.append(' ').append(word);
+		}
+		doc.set(buf.toString());
+		for (int i= 0; i < doc.getLength(); i++) {
+			IRegion wordRegion= CWordFinder.findWord(doc, i);
+			assertNotNull(wordRegion);
+			if (wordRegion.getLength() != 0) {
+				assertEquals(word.length(), wordRegion.getLength());
+				assertEquals(word, doc.get(wordRegion.getOffset(), wordRegion.getLength()));
+			}
+		}
+	}
+
+	public void testFindWordOnDocumentStart_Bug193461() {
+		IDocument doc= new Document();
+		doc.set("word");
+		for (int i= 0; i < doc.getLength(); i++) {
+			IRegion wordRegion= CWordFinder.findWord(doc, i);
+			assertNotNull(wordRegion);
+			assertEquals(doc.getLength(), wordRegion.getLength());
+			assertEquals(0, wordRegion.getOffset());
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CWordIteratorTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CWordIteratorTest.java
new file mode 100644
index 0000000..fd727c3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CWordIteratorTest.java
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sergey Prigogin, Google
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.internal.ui.text.CWordIterator;
+
+
+public class CWordIteratorTest extends BreakIteratorTest {
+
+	public static Test suite() {
+		return new TestSuite(CWordIteratorTest.class);
+	}
+
+	/*
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		fBreakIterator= new CWordIterator();
+	}
+	
+	public void testNext1() {
+		assertNextPositions("word word", new int[] { 5, 9 });
+	}
+	
+	public void testNext2() {
+		assertNextPositions("wordWord word", new int[] { 4, 9, 13 });
+	}
+	
+	public void testNextSpace() {
+		assertNextPositions(" word ", new int[] { 1, 6 });
+	}
+	
+	public void testNextParen() {
+		assertNextPositions("word(params)", new int[] { 4, 5, 11, 12 });
+	}
+	
+	public void testNextLn() {
+		String s= new String("word \n" +
+				"  word2");
+		assertNextPositions(s, new int[] { 5, 6, 8, 13 });
+	}
+	
+	public void testMultiNextLn() {
+		String s= new String("word \n" +
+				"\n" +
+				"\n" +
+				"  word2");
+		assertNextPositions(s, new int[] { 5, 6, 7, 8, 10, 15 });
+	}
+	
+	public void testMultiNextLn2() {
+		String s= new String("word \r\n" +
+				"\r\n" +
+				"\r\n" +
+				"  word2");
+		assertNextPositions(s, new int[] { 5, 7, 9, 11, 13, 18 });
+	}
+
+	public void testNextCamelCaseWord() {
+		String s= new String("   _isURLConnection_pool   ");
+		assertNextPositions(s, new int[] { 3, 4, 6, 9, 20, 27 });
+	}
+	
+	public void testPrevious1() {
+		String s= new String("word word");
+		assertPreviousPositions(s, new int[] { 0, 5 });
+	}
+	
+	public void testPrevious2() {
+		String s= new String("wordWord word");
+		assertPreviousPositions(s, new int[] { 0, 4, 9 });
+	}
+	
+	public void testPreviousSpace() {
+		String s= new String(" word ");
+		assertPreviousPositions(s, new int[] { 1 });
+	}
+	
+	public void testPreviousParen() {
+		String s= new String("word(params)");
+		assertPreviousPositions(s, new int[] { 0, 4, 5, 11 });
+	}
+	
+	public void testPreviousLn() {
+		String s= new String("word \n" +
+				"  word2");
+		assertPreviousPositions(s, new int[] { 0, 5, 6, 8 });
+	}
+	
+	public void testMultiPreviousLn() {
+		String s= new String("word \n" +
+				"\n" +
+				"\n" +
+				"  word2");
+		assertPreviousPositions(s, new int[] { 0, 5, 6, 7, 8, 10 });
+	}
+	
+	public void testMultiPreviousLn2() {
+		String s= new String("word \r\n" +
+				"\r\n" +
+				"\r\n" +
+				"  word2");
+		assertPreviousPositions(s, new int[] { 0, 5, 7, 9, 11, 13 });
+	}
+
+	public void testPreviousCamelCaseWord() {
+		String s= new String("   _isURLConnection_pool   ");
+		assertPreviousPositions(s, new int[] { 0, 3, 4, 6, 9, 20 });
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CodeFormatterTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CodeFormatterTest.java
new file mode 100644
index 0000000..e0242f1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/CodeFormatterTest.java
@@ -0,0 +1,1277 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *     Andrew Ferguson (Symbian)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.text.edits.TextEdit;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.formatter.CodeFormatter;
+import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+
+import org.eclipse.cdt.internal.corext.util.CodeFormatterUtil;
+import org.eclipse.cdt.internal.formatter.DefaultCodeFormatterOptions;
+import org.eclipse.cdt.internal.formatter.align.Alignment;
+
+/**
+ * Tests for the CodeFormatter.
+ *
+ * @since 4.0
+ */
+public class CodeFormatterTest extends BaseUITestCase {
+
+	private Map<String, String> fOptions;
+	private Map<String, String> fDefaultOptions;
+
+	public static TestSuite suite() {
+		return suite(CodeFormatterTest.class, "_");
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		fDefaultOptions= DefaultCodeFormatterOptions.getDefaultSettings().getMap();
+		fOptions= new HashMap<String, String>(fDefaultOptions);
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	protected void assertFormatterResult() throws Exception {
+		StringBuffer[] contents= getContentsForTest(2);
+		String before= contents[0].toString();
+		String expected= contents[1].toString();
+		assertFormatterResult(before, expected);
+	}
+
+	private void assertFormatterResult(String original, String expected) throws BadLocationException {
+		IDocument document= new Document(original);
+		TextEdit edit= CodeFormatterUtil.format(CodeFormatter.K_TRANSLATION_UNIT, original, 0, TextUtilities.getDefaultLineDelimiter(document), fOptions);
+		assertNotNull(edit);
+		edit.apply(document);
+		assertEquals(expected, document.get());
+	}
+	
+	//void foo(int arg);
+	//void foo(int arg){}
+	
+	//void foo (int arg);
+	//void foo (int arg) {
+	//}
+	public void testInsertSpaceBeforeOpeningParen_Bug190184() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_METHOD_DECLARATION, CCorePlugin.INSERT);
+		assertFormatterResult();
+	}
+
+	//void FailSwitchFormatting(void)
+	//{
+	//        switch (confusefomatter)
+	//        {
+	//
+	//        case START_CONFUSION:
+	//                SomeFunctionCallWithTypecast(( castConfusion_t)myvar1,
+	//                (castNoAdditionalConfusion_t) myvar2);
+	//                break;
+	//
+	//                case REVEAL_CONFUSION:
+	//                if (myBlockIndentIsOk)
+	//                {
+	//                        myBlockstuff();
+	//                }
+	//                break;
+	//
+	//                case CONTINUE_CONFUSION:
+	//                {
+	//                        //the indentation problem continues...
+	//                }
+	//                default://....still not right
+	//        }
+	//}
+
+	//void FailSwitchFormatting(void) {
+	//	switch (confusefomatter) {
+	//
+	//	case START_CONFUSION:
+	//		SomeFunctionCallWithTypecast((castConfusion_t) myvar1,
+	//				(castNoAdditionalConfusion_t) myvar2);
+	//		break;
+	//
+	//	case REVEAL_CONFUSION:
+	//		if (myBlockIndentIsOk) {
+	//			myBlockstuff();
+	//		}
+	//		break;
+	//
+	//	case CONTINUE_CONFUSION: {
+	//		//the indentation problem continues...
+	//	}
+	//	default://....still not right
+	//	}
+	//}
+	public void testIndentConfusionByCastExpression_Bug191021() throws Exception {
+		assertFormatterResult();
+	}
+	
+	//int
+	//var;
+	//int*
+	//pvar;
+	
+	//int var;
+	//int* pvar;
+	public void testSpaceBetweenTypeAndIdentifier_Bug194603() throws Exception {
+		assertFormatterResult();
+	}
+
+	//int a = sizeof(     int)    ;
+	
+	//int a = sizeof(int);
+	public void testSizeofExpression_Bug195246() throws Exception {
+		assertFormatterResult();
+	}
+
+	//int x;
+	//int a = sizeof     x    ;
+	
+	//int x;
+	//int a = sizeof x;
+	public void testSizeofExpression_Bug201330() throws Exception {
+		assertFormatterResult();
+	}
+
+	//void foo(){
+	//for(;;){
+	//int a=0;
+	//switch(a){
+	//case 0:
+	//++a;
+	//break;
+	//case 1:
+	//--a;
+	//break;
+	//}
+	//}
+	//}
+	//int main(void){
+	//foo();
+	//return 1;
+	//}
+
+	//void foo() {
+	//	for (;;) {
+	//		int a = 0;
+	//		switch (a) {
+	//		case 0:
+	//			++a;
+	//			break;
+	//		case 1:
+	//			--a;
+	//			break;
+	//		}
+	//	}
+	//}
+	//int main(void) {
+	//	foo();
+	//	return 1;
+	//}
+	public void testForWithEmptyExpression_Bug195942() throws Exception {
+		assertFormatterResult();
+	}
+
+	//#define MY private:
+	//
+	//class ClassA
+	//{
+	//MY ClassA() {}
+	//};
+
+	//#define MY private:
+	//
+	//class ClassA {
+	//MY
+	//	ClassA() {
+	//	}
+	//};
+	public void testAccessSpecifierAsMacro_Bug197494() throws Exception {
+		assertFormatterResult();
+	}
+
+	//int verylooooooooooooooooooooooooooooooooooongname = 0000000000000000000000000000000;
+	
+	//int verylooooooooooooooooooooooooooooooooooongname =
+	//		0000000000000000000000000000000;
+	public void testLineWrappingOfInitializerExpression_Bug200961() throws Exception {
+		assertFormatterResult();
+	}
+	
+	//void functionWithLooooooooooooooooooooooooooooooooooooooooooooooooongName() throw(float);
+	
+	//void functionWithLooooooooooooooooooooooooooooooooooooooooooooooooongName()
+	//		throw (float);
+	public void testLineWrappingOfThrowSpecification_Bug200959() throws Exception {
+		assertFormatterResult();
+	}
+
+	//class A {
+	//public:
+	//A();
+	//};
+	
+	//class A
+	//    {
+	//public:
+	//    A();
+	//    };
+	public void testWhiteSmithsAccessSpecifierIndentation1_Bug204575() throws Exception {
+		fOptions= DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap();
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_ACCESS_SPECIFIER_COMPARE_TO_TYPE_HEADER, DefaultCodeFormatterConstants.FALSE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ACCESS_SPECIFIER, DefaultCodeFormatterConstants.TRUE);
+		assertFormatterResult();
+	}
+
+	//class A {
+	//public:
+	//A();
+	//};
+	
+	//class A
+	//    {
+	//    public:
+	//    A();
+	//    };
+	public void testWhiteSmithsAccessSpecifierIndentation2_Bug204575() throws Exception {
+		fOptions= DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap();
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_ACCESS_SPECIFIER_COMPARE_TO_TYPE_HEADER, DefaultCodeFormatterConstants.TRUE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ACCESS_SPECIFIER, DefaultCodeFormatterConstants.FALSE);
+		assertFormatterResult();
+	}
+
+	//class A {
+	//public:
+	//A();
+	//};
+	
+	//class A
+	//    {
+	//    public:
+	//	A();
+	//    };
+	public void testWhiteSmithsAccessSpecifierIndentation3_Bug204575() throws Exception {
+		fOptions= DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap();
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_ACCESS_SPECIFIER_COMPARE_TO_TYPE_HEADER, DefaultCodeFormatterConstants.TRUE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ACCESS_SPECIFIER, DefaultCodeFormatterConstants.TRUE);
+		assertFormatterResult();
+	}
+
+	//template<typename T> class B {};
+	//template<typename T1,typename T2=B<T1> > class A {};
+
+	//template<typename T> class B {
+	//};
+	//template<typename T1, typename T2 = B<T1> > class A {
+	//};
+	public void testNestedTemplateParameters_Bug206801() throws Exception {
+		assertFormatterResult();
+	}
+
+	//int main
+	//(
+	//    int           argc,
+	//    char const int*  argv[]
+	//)
+	//try
+	//{
+	//    for ( int i = 1 ; i < argc ; ++i )
+	//    {
+	//    }
+	//    return 0;
+	//}
+	//catch ( float e )
+	//{
+	//    return 1;
+	//}
+	//catch ( ... )
+	//{
+	//	return 2;
+	//}
+
+	//int main(int argc, char const int* argv[])
+	//try {
+	//	for (int i = 1; i < argc; ++i) {
+	//	}
+	//	return 0;
+	//}
+	//catch (float e) {
+	//	return 1;
+	//}
+	//catch (...) {
+	//	return 2;
+	//}
+	public void testFunctionTryCatchBlock() throws Exception {
+		assertFormatterResult();
+	}
+
+	//int main(int argc, char const int * argv[]) { try { for (int i = 1; i < argc; ++i) { } return 0; } catch (float e) { return 1; } catch (...) { return 2; } }
+	
+	//int main(int argc, char const int * argv[]) {
+	//	try {
+	//		for (int i = 1; i < argc; ++i) {
+	//		}
+	//		return 0;
+	//	} catch (float e) {
+	//		return 1;
+	//	} catch (...) {
+	//		return 2;
+	//	}
+	//}
+	public void testTryCatchBlock() throws Exception {
+		assertFormatterResult();
+	}
+
+	//void f() {
+	//#define I 0
+	//    int i = I;
+	//}
+
+	//void f() {
+	//#define I 0
+	//	int i = I;
+	//}
+	public void testMacroAsInitializer_Bug214354() throws Exception {
+		assertFormatterResult();
+	}
+	
+	//#define break_start(); { int foo;
+	//#define break_end(); foo = 0; }
+	//
+	//void break_indenter(int a, int b) {
+	//    break_start(); // This semicolon moves to its own line.
+	//    if(a > b) {
+	//        indentation_remains();
+	//    }
+	//
+	//    if(b>a)
+	//        indentation_vanishes();
+	//
+	//    break_end();
+	//
+	//    if(b == a)
+	//      indentation_remains();
+	//}
+	
+	//#define break_start(); { int foo;
+	//#define break_end(); foo = 0; }
+	//
+	//void break_indenter(int a, int b) {
+	//	break_start(); // This semicolon moves to its own line.
+	//		if (a > b) {
+	//			indentation_remains();
+	//		}
+	//
+	//		if (b > a)
+	//			indentation_vanishes();
+	//
+	//		break_end();
+	//
+	//	if (b == a)
+	//		indentation_remains();
+	//}
+	public void testBracesInMacros_Bug217435() throws Exception {
+		assertFormatterResult();
+	}
+	
+	//int a=1+2;
+	//int b= - a;
+	//int c =b ++/-- b;
+	
+	//int a = 1 + 2;
+	//int b = -a;
+	//int c = b++ / --b;
+	public void testWhitespaceSurroundingOperators() throws Exception {
+		assertFormatterResult();
+	}
+	
+	//void f() {
+	//int *px= :: new int(  0 );
+	//int* py [] =  new   int [5 ] (0, 1,2,3, 4);
+	//int  *pz[ ] =new ( px)int(0);
+	//delete  []  py;
+	//:: delete px;}
+
+	//void f() {
+	//	int *px = ::new int(0);
+	//	int* py[] = new int[5](0, 1, 2, 3, 4);
+	//	int *pz[] = new (px) int(0);
+	//	delete[] py;
+	//	::delete px;
+	//}
+	public void testNewAndDeleteExpressions() throws Exception {
+		assertFormatterResult();
+	}
+
+	//namespace   X=
+	//   Y ::
+	// 	    Z ;
+
+	//namespace X = Y::Z;
+	public void testNamespaceAlias() throws Exception {
+		assertFormatterResult();
+	}
+
+	//using
+	//   typename:: T
+	//;
+	//using X::
+	// T ;
+
+	//using typename ::T;
+	//using X::T;
+	public void testUsingDeclaration() throws Exception {
+		assertFormatterResult();
+	}
+
+	//using
+	//  namespace
+	//    X ;
+
+	//using namespace X;
+	public void testUsingDirective() throws Exception {
+		assertFormatterResult();
+	}
+
+	//static void *f(){}
+	//static void * g();
+	//static void* h();
+
+	//static void *f() {
+	//}
+	//static void * g();
+	//static void* h();
+	public void testSpaceBetweenDeclSpecAndDeclarator() throws Exception {
+		assertFormatterResult();
+	}
+
+	//typedef signed int TInt;
+	//extern void Bar();  // should not have space between parens
+	//
+	//void Foo()    // should not have space between parens
+	//{
+	//  TInt a(3);  // should become TInt a( 3 );
+	//  Bar();   // should not have space between parens
+	//}
+
+	//typedef signed int TInt;
+	//extern void Bar(); // should not have space between parens
+	//
+	//void Foo() // should not have space between parens
+	//	{
+	//	TInt a( 3 ); // should become TInt a( 3 );
+	//	Bar(); // should not have space between parens
+	//	}
+	public void testSpaceBetweenParen_Bug217918() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION, DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_STATEMENTS_COMPARE_TO_BODY, DefaultCodeFormatterConstants.FALSE);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_METHOD_DECLARATION, CCorePlugin.INSERT);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_METHOD_DECLARATION, CCorePlugin.INSERT);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_METHOD_DECLARATION, CCorePlugin.DO_NOT_INSERT);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_METHOD_INVOCATION, CCorePlugin.INSERT);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_METHOD_INVOCATION, CCorePlugin.INSERT);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_METHOD_INVOCATION, CCorePlugin.DO_NOT_INSERT);
+		assertFormatterResult();
+	}
+
+	//class Example: public FooClass, public virtual BarClass {};
+	
+	//class Example:
+	//		public FooClass,
+	//		public virtual BarClass {
+	//};
+	public void testAlignmentOfClassDefinitionBaseClause1_Bug192656() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BASE_CLAUSE_IN_TYPE_DECLARATION,
+				Integer.toString(Alignment.M_ONE_PER_LINE_SPLIT | Alignment.M_FORCE));
+		assertFormatterResult();
+	}
+
+	//class Example: public FooClass, public virtual BarClass {};
+	
+	//class Example:	public FooClass,
+	//				public virtual BarClass {
+	//};
+	public void testAlignmentOfClassDefinitionBaseClause2_Bug192656() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BASE_CLAUSE_IN_TYPE_DECLARATION,
+				Integer.toString(Alignment.M_NEXT_PER_LINE_SPLIT | Alignment.M_FORCE | Alignment.M_INDENT_ON_COLUMN));
+		assertFormatterResult();
+	}
+
+	//class Example: { void foo() throw(int); };
+	//void Example::foo()throw(int){}
+
+	//class Example: {
+	//	void foo()
+	//		throw (int);
+	//};
+	//void Example::foo()
+	//	throw (int) {
+	//}
+	public void testAlignmentOfExceptionSpecificationInMethodDeclaration_Bug191980() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_THROWS_CLAUSE_IN_METHOD_DECLARATION,
+				Integer.toString(Alignment.M_ONE_PER_LINE_SPLIT | Alignment.M_FORCE | Alignment.M_INDENT_BY_ONE));
+		assertFormatterResult();
+	}
+
+	//int foo(){try{}catch(...){}}
+	//float* bar();
+	//template<typename _CharT, typename _Traits>class basic_ios : public ios_base{public:
+	//  // Types:
+	//};
+	
+	//int
+	//foo()
+	//{
+	//  try
+	//    {
+	//    }
+	//  catch (...)
+	//    {
+	//    }
+	//}
+	//float*
+	//bar();
+	//template<typename _CharT, typename _Traits>
+	//  class basic_ios : public ios_base
+	//  {
+	//  public:
+	//    // Types:
+	//  };
+	public void testGNUCodingStyleConformance_Bug192764() throws Exception {
+		fOptions= DefaultCodeFormatterOptions.getGNUSettings().getMap();
+		assertFormatterResult();
+	}
+
+	//NOT_DEFINED void foo(){
+	//	}
+	//
+	//enum T1
+	//    {
+	//    E1 = 1
+	//    };
+
+	//NOT_DEFINED void foo() {
+	//}
+	//
+	//enum T1 {
+	//	E1 = 1
+	//};
+	public void testPreserveWhitespace_Bug225326() throws Exception {
+		assertFormatterResult();
+	}
+
+	//NOT_DEFINED void foo()
+	//	{
+	//	}
+	//
+	//enum T1
+	//    {
+	//    E1 = 1
+	//    };
+
+	//NOT_DEFINED void foo()
+	//    {
+	//    }
+	//
+	//enum T1
+	//    {
+	//    E1 = 1
+	//    };
+	public void testPreserveWhitespace2_Bug225326() throws Exception {
+		fOptions= DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap();
+		assertFormatterResult();
+	}
+	
+	//enum Tthe3rdtestIds
+	//{
+	//ECommand1 = 0x6001,
+	//ECommand2,
+	//EHelp,
+	//EAbout
+	//};
+	//
+	//CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+
+	//enum Tthe3rdtestIds
+	//    {
+	//    ECommand1 = 0x6001,
+	//    ECommand2,
+	//    EHelp,
+	//    EAbout
+	//    };
+	//
+	//CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+	public void testFormatterRegressions_Bug225858() throws Exception {
+		fOptions= DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap();
+		assertFormatterResult();
+	}
+
+	//typedef int int_;
+	//int_ const f(int_ const i);
+
+	//typedef int int_;
+	//int_ const f(int_ const i);
+	public void testPreserveWhitespaceInParameterDecl_Bug228997() throws Exception {
+		assertFormatterResult();
+	}
+
+	//void f() { throw 42; }
+	
+	//void f() {
+	//	throw 42;
+	//}
+	public void testSpaceAfterThrowKeyword_Bug229774() throws Exception {
+		assertFormatterResult();
+	}
+
+	//struct { int l; } s;
+	//void f() {
+	//  int x = (s.l -5);
+	//  // Comment
+	//  for(;;);
+	//}
+	
+	//struct {
+	//	int l;
+	//} s;
+	//void f() {
+	//	int x = (s.l - 5);
+	//	// Comment
+	//	for (;;)
+	//		;
+	//}
+	public void testIndentAfterDotL_Bug232739() throws Exception {
+		assertFormatterResult();
+	}
+
+	//struct { int e; } s;
+	//void f() {
+	//  int x = (s.e -5);
+	//  // Comment
+	//  for(;;);
+	//}
+	
+	//struct {
+	//	int e;
+	//} s;
+	//void f() {
+	//	int x = (s.e - 5);
+	//	// Comment
+	//	for (;;)
+	//		;
+	//}
+	public void testIndentAfterDotE_Bug232739() throws Exception {
+		assertFormatterResult();
+	}
+
+	//struct { int f; } s;
+	//void f() {
+	//  int x = (s.f -5);
+	//  // Comment
+	//  for(;;);
+	//}
+	
+	//struct {
+	//	int f;
+	//} s;
+	//void f() {
+	//	int x = (s.f - 5);
+	//	// Comment
+	//	for (;;)
+	//		;
+	//}
+	public void testIndentAfterDotF_Bug232739() throws Exception {
+		assertFormatterResult();
+	}
+
+	//int a = 0, b = 1, c = 2, d = 3;
+	
+	//int a = 0,b = 1,c = 2,d = 3;
+	public void testSpaceAfterCommaInDeclaratorList_Bug234915() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_DECLARATOR_LIST, CCorePlugin.DO_NOT_INSERT);
+		assertFormatterResult();
+	}
+
+	//int a = 0,b = 1,c = 2,d = 3;
+	
+	//int a = 0, b = 1, c = 2, d = 3;
+	public void testSpaceAfterCommaInDeclaratorList2_Bug234915() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_DECLARATOR_LIST, CCorePlugin.INSERT);
+		assertFormatterResult();
+	}
+
+	//void f() {
+	// 	class Object;
+	//	int aVeryLongParameterThatShouldBeInOneLine1;
+	//	int aVeryLongParameterThatShouldBeInOneLine2;
+	//
+	//	myNewFunctionCall1(Object(aVeryLongParameterThatShouldBeInOneLine1, aVeryLongParameterThatShouldBeInOneLine2));
+	//
+	//	myNewFunctionCall2(new Object(aVeryLongParameterThatShouldBeInOneLine1, aVeryLongParameterThatShouldBeInOneLine2));
+	//}
+
+	//void f() {
+	//	class Object;
+	//	int aVeryLongParameterThatShouldBeInOneLine1;
+	//	int aVeryLongParameterThatShouldBeInOneLine2;
+	//
+	//	myNewFunctionCall1(Object(aVeryLongParameterThatShouldBeInOneLine1,
+	//			aVeryLongParameterThatShouldBeInOneLine2));
+	//
+	//	myNewFunctionCall2(new Object(aVeryLongParameterThatShouldBeInOneLine1,
+	//			aVeryLongParameterThatShouldBeInOneLine2));
+	//}
+	public void testLineWrappingOfConstructorCall_Bug237097() throws Exception {
+		assertFormatterResult();
+	}
+
+	//bool test(bool x)
+	//{
+	//   return x or x and not (not x);
+	//}
+
+	//bool test(bool x) {
+	//	return x or x and not (not x);
+	//}
+	public void testSpaceBeforeAndAfterAlternativeLogicalOperator_Bug239461() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_BINARY_OPERATOR, CCorePlugin.DO_NOT_INSERT);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_BINARY_OPERATOR, CCorePlugin.DO_NOT_INSERT);
+		assertFormatterResult();
+	}
+
+	//void A::a(C e) { if (D::iterator it = m.find (e)) m.erase(it);}
+	//T* A::b(T* t) { S::iterator it = m.find(t); if (!it) return NULL; else return *it; }
+	//M* A::c(M* tm) { N::iterator it = myN.find(tm); if (!it) return NULL; else return *it; }
+
+	//void A::a(C e) {
+	//	if (D::iterator it = m.find (e))
+	//		m.erase(it);
+	//}
+	//T* A::b(T* t) {
+	//	S::iterator it = m.find(t);
+	//	if (!it)
+	//		return NULL;
+	//	else
+	//		return *it;
+	//}
+	//M* A::c(M* tm) {
+	//	N::iterator it = myN.find(tm);
+	//	if (!it)
+	//		return NULL;
+	//	else
+	//		return *it;
+	//}
+	public void testHandleParsingProblemsInIfCondition_Bug240564() throws Exception {
+		assertFormatterResult();
+	}
+
+	//TestType1<TESTNS::TestType2<3> > test_variable;
+
+	//TestType1<TESTNS::TestType2<3> > test_variable;
+	public void testNestedTemplatedArgument_Bug241058() throws Exception {
+		assertFormatterResult();
+	}
+	
+	//#define TP_SMALLINT int32_t
+	//void foo(const TP_SMALLINT &intVal) { }
+	//void bar(const TP_SMALLINT intVal) { }
+
+	//#define TP_SMALLINT int32_t
+	//void foo(const TP_SMALLINT &intVal) {
+	//}
+	//void bar(const TP_SMALLINT intVal) {
+	//}
+	public void testPreserveSpaceInParameterDecl_Bug241967() throws Exception {
+		assertFormatterResult();
+	}
+	
+	//#define MY_MACRO int a; \
+	//    int b; \
+	//    int c();
+	//
+	//class asdf {
+	//		MY_MACRO
+	//
+	//public:
+	//		asdf();
+	//~asdf();
+	//};
+	
+	//#define MY_MACRO int a; \
+	//    int b; \
+	//    int c();
+	//
+	//class asdf {
+	//	MY_MACRO
+	//
+	//public:
+	//	asdf();
+	//	~asdf();
+	//};
+	public void testMacroWithMultipleDeclarations_Bug242053() throws Exception {
+		assertFormatterResult();
+	}
+
+	//void foo() {
+	//for(int i=0;i<50;++i){}
+	//}
+	
+	//void foo() {
+	//	for (int i = 0 ; i < 50 ; ++i) {
+	//	}
+	//}
+	public void testSpaceBeforeSemicolonInFor_Bug242232() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_SEMICOLON_IN_FOR, CCorePlugin.INSERT);
+		assertFormatterResult();
+	}
+
+	//char *b, * const a;
+	
+	//char *b, * const a;
+	public void testPreserveSpaceBetweenPointerModifierAndIdentifier_Bug243056() throws Exception {
+		assertFormatterResult();
+	}
+
+	//#define FUNCTION_NAME myFunc
+	//#define VARIABLE_NAME myVar
+	//
+	//void FUNCTION_NAME( void );
+	//void FUNCTION_NAME( void )
+	//{
+	//int VARIABLE_NAME;
+	//}
+
+	//#define FUNCTION_NAME myFunc
+	//#define VARIABLE_NAME myVar
+	//
+	//void FUNCTION_NAME(void);
+	//void FUNCTION_NAME(void) {
+	//	int VARIABLE_NAME;
+	//}
+	public void testPreserveNecessarySpace_Bug250969() throws Exception {
+		assertFormatterResult();
+	}
+
+	//#define FOREVER1 for(;;)
+	//#define FOREVER2 while(1)
+	//
+	//int main(int argc, char **argv) {
+	//	FOREVER1 {
+	//		doSomething();
+	//	}
+	//	FOREVER2 {
+	//		doSomething();
+	//	}
+	//}
+
+	//#define FOREVER1 for(;;)
+	//#define FOREVER2 while(1)
+	//
+	//int main(int argc, char **argv) {
+	//	FOREVER1 {
+	//		doSomething();
+	//	}
+	//	FOREVER2 {
+	//		doSomething();
+	//	}
+	//}
+	public void testFormatterProblemsWithForeverMacro() throws Exception {
+		assertFormatterResult();
+	}
+
+	//#define BLOCK { }
+	//#define DOIT1() { }
+	//#define DOIT2() do { } while(false)
+	//#define ALWAYS if(true)
+	//#define NEVER if(false)
+	//#define FOREVER for(;;)
+	//
+	//void foo() {
+	//	int i=0;
+	//  if (true) DOIT1();
+	//  if (true) DOIT2();
+	//	for (;;) BLOCK
+	//	ALWAYS BLOCK
+	//	NEVER FOREVER BLOCK
+	//	switch(i) {
+	//	case 0: BLOCK
+	//	}
+	//}
+
+	//#define BLOCK { }
+	//#define DOIT1() { }
+	//#define DOIT2() do { } while(false)
+	//#define ALWAYS if(true)
+	//#define NEVER if(false)
+	//#define FOREVER for(;;)
+	//
+	//void foo() {
+	//	int i = 0;
+	//	if (true)
+	//		DOIT1();
+	//	if (true)
+	//		DOIT2();
+	//	for (;;)
+	//		BLOCK
+	//	ALWAYS
+	//		BLOCK
+	//	NEVER
+	//		FOREVER
+	//			BLOCK
+	//	switch (i) {
+	//	case 0:
+	//		BLOCK
+	//	}
+	//}
+	public void testCompoundStatementAsMacro_Bug244928() throws Exception {
+		assertFormatterResult();
+	}
+
+	//#define BLOCK { }
+	//#define DOIT1() { }
+	//#define DOIT2() do { } while(false)
+	//#define ALWAYS if(true)
+	//#define NEVER if(false)
+	//#define FOREVER for(;;)
+	//
+	//void foo() {
+	//	int i=0;
+	//  if (true) DOIT1();
+	//  if (true) DOIT2();
+	//	for (;;) BLOCK
+	//	ALWAYS BLOCK
+	//	NEVER FOREVER BLOCK
+	//	switch(i) {
+	//	case 0: BLOCK
+	//	}
+	//}
+
+	//#define BLOCK { }
+	//#define DOIT1() { }
+	//#define DOIT2() do { } while(false)
+	//#define ALWAYS if(true)
+	//#define NEVER if(false)
+	//#define FOREVER for(;;)
+	//
+	//void
+	//foo()
+	//{
+	//  int i = 0;
+	//  if (true)
+	//    DOIT1();
+	//  if (true)
+	//    DOIT2();
+	//  for (;;)
+	//    BLOCK
+	//  ALWAYS
+	//    BLOCK
+	//  NEVER
+	//    FOREVER
+	//      BLOCK
+	//  switch (i)
+	//    {
+	//  case 0:
+	//    BLOCK
+	//    }
+	//}
+	public void testCompoundStatementAsMacroGNU_Bug244928() throws Exception {
+		fOptions= DefaultCodeFormatterOptions.getGNUSettings().getMap();
+		assertFormatterResult();
+	}
+
+	//#define A (0)
+	//#define B (1)
+	//#define ARGS (A, B)
+	//#define CALL foo ARGS
+	//void zoo(void) {
+	//        foo(A,B);
+	//foo ARGS;
+	//CALL;
+	//#if X
+	//                        if (1)
+	//                        {
+	//                                t = 1;
+	//                        }
+	//#endif
+	//                }
+
+	//#define A (0)
+	//#define B (1)
+	//#define ARGS (A, B)
+	//#define CALL foo ARGS
+	//void zoo(void) {
+	//	foo(A, B);
+	//	foo ARGS;
+	//	CALL;
+	//#if X
+	//	if (1)
+	//	{
+	//		t = 1;
+	//	}
+	//#endif
+	//}
+
+	public void testMacroAsFunctionArguments_Bug253039() throws Exception {
+		assertFormatterResult();
+	}
+
+	//#define assign1(uc1, uc2, uc3, uc4, val) \
+	//      uc1##uc2##uc3##uc4 = val;
+	//
+	//#define assign2(ucn, val) ucn = val;
+	//
+	//void foo1(void)
+	//{
+	//int \U00010401\U00010401\U00010401\U00010402;
+	//assign1(\U00010401, \U00010401, \U00010401, \U00010402, 4);
+	//}
+	//
+	//void foo2(void)
+	//{
+	//int \U00010401\U00010401\U00010401\U00010402;
+	//assign2(\U00010401\U00010401\U00010401\U00010402, 4);
+	//}
+
+	//#define assign1(uc1, uc2, uc3, uc4, val) \
+	//      uc1##uc2##uc3##uc4 = val;
+	//
+	//#define assign2(ucn, val) ucn = val;
+	//
+	//void foo1(void) {
+	//	int \U00010401\U00010401\U00010401\U00010402;
+	//	assign1(\U00010401, \U00010401, \U00010401, \U00010402, 4);
+	//}
+	//
+	//void foo2(void) {
+	//	int \U00010401\U00010401\U00010401\U00010402;
+	//	assign2(\U00010401\U00010401\U00010401\U00010402, 4);
+	//}
+	public void testUniversalCharacters_Bug255949() throws Exception {
+		assertFormatterResult();
+	}
+
+	//void foo() throw(E1,E2);
+
+	//void foo() throw ( E1, E2 );
+	public void testWhitespaceOptionsForExceptionSpecification_Bug243567() throws Exception {
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_EXCEPTION_SPECIFICATION, CCorePlugin.INSERT);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_EXCEPTION_SPECIFICATION, CCorePlugin.INSERT);
+		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_EXCEPTION_SPECIFICATION, CCorePlugin.INSERT);
+		assertFormatterResult();
+	}
+
+	//void Foo::bar() {
+	//*this.*FncPointer () ;  this->*FncPointer( ); }
+
+	//void Foo::bar() {
+	//	*this.*FncPointer();
+	//	this->*FncPointer();
+	//}
+	public void testDotStarAndArrowStarOperators_Bug257700() throws Exception {
+		assertFormatterResult();
+	}
+	
+	//void zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz1(unsigned char __attribute__((unused)) x, unsigned char __attribute__((unused)) y){;}
+
+	//void zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz1(
+	//		unsigned char __attribute__((unused)) x,
+	//		unsigned char __attribute__((unused)) y) {
+	//	;
+	//}
+	public void test__attribute__InParameterDecl_Bug206271() throws Exception {
+		assertFormatterResult();
+	}
+	
+	//#define assert(e) if(!(e)) printf("Failed assertion")
+	//void test(){assert(1 > 0);}
+
+	//#define assert(e) if(!(e)) printf("Failed assertion")
+	//void test() {
+	//	assert(1 > 0);
+	//}
+
+	public void testMacroFormatting1_Bug241819() throws Exception {
+		assertFormatterResult();
+	}
+
+	//#define PRINT if(printswitch) printf
+	//void test(){int i=0;PRINT("Watch the format");if(i>0){i=1;}}
+
+	//#define PRINT if(printswitch) printf
+	//void test() {
+	//	int i = 0;
+	//	PRINT("Watch the format");
+	//	if (i > 0) {
+	//		i = 1;
+	//	}
+	//}
+	public void testMacroFormatting2_Bug241819() throws Exception {
+		assertFormatterResult();
+	}
+
+	//bool member __attribute__ ((__unused__)) = false;
+
+	//bool member __attribute__ ((__unused__)) = false;
+	public void testPreserveSpaceBetweenNameAnd__attribute__Bug261967() throws Exception {
+		assertFormatterResult();
+	}
+	
+	//extern "C" void f(int i, char c, float x);
+
+	//extern "C" void f(int i, char c, float x);
+	public void testPreserveSpaceInExternCDeclaration() throws Exception {
+		assertFormatterResult();
+	}
+
+	//#define X
+	//
+	//typedef X struct {
+	//};
+
+	//#define X
+	//
+	//typedef X struct {
+	//};
+	public void testPreserveNecessarySpace_Bug268962() throws Exception {
+		assertFormatterResult();
+	}
+
+	//inline   typename A foo();
+	//void   bar(const typename A x)  ;
+	//static   typename A x  ;
+
+	//inline typename A foo();
+	//void bar(const typename A x);
+	//static typename A x;
+	public void testFormatterProblemsWithTypename_Bug269590() throws Exception {
+		assertFormatterResult();
+	}
+	
+	//void
+	//foo();
+	//int*
+	//bar();
+	
+	//void
+	//foo();
+	//int*
+	//bar();
+	public void testPreserveNewlineBetweenTypeAndFunctionDeclarator() throws Exception {
+		assertFormatterResult();
+	}
+
+	public void testFormatGeneratedClass_Bug272006() throws Exception {
+		String original = 
+			"class \u5927\u5927\u5927\u5927\n" + 
+			"{\n" + 
+			"public:\n" + 
+			"	\u5927\u5927\u5927\u5927();\n" + 
+			"	virtual ~\u5927\u5927\u5927\u5927();\n" + 
+			"};\n";
+		String expected = 
+			"class \u5927\u5927\u5927\u5927 {\n" + 
+			"public:\n" + 
+			"	\u5927\u5927\u5927\u5927();\n" + 
+			"	virtual ~\u5927\u5927\u5927\u5927();\n" + 
+			"};\n";
+		assertFormatterResult(original, expected);
+	}
+
+	//void f() {
+	//  Canvas1->MoveTo((50 + (24* 20 ) +xoff) *Scale,(200+yoff)*ScaleY);
+	//  Canvas1->LineTo((67+(24*20) +xoff)*Scale,(200+yoff)*ScaleY);
+	//  Canvas1->MoveTo((50+(24*20) +xoff)*Scale,((200+yoff)*ScaleY)-1);
+	//  Canvas1->LineTo((67+(24*20) +xoff)*Scale,((200+yoff)*ScaleY)-1);
+	//  Canvas1->MoveTo((50+(24*20) +xoff)*Scale,((200+yoff)*ScaleY)+1);
+	//  Canvas1->LineTo((67+(24*20) +xoff)*Scale,((200+yoff)*ScaleY)+1);
+	//}
+
+	//void f() {
+	//	Canvas1->MoveTo((50 + (24 * 20) + xoff) * Scale, (200 + yoff) * ScaleY);
+	//	Canvas1->LineTo((67 + (24 * 20) + xoff) * Scale, (200 + yoff) * ScaleY);
+	//	Canvas1->MoveTo((50 + (24 * 20) + xoff) * Scale, ((200 + yoff) * ScaleY)
+	//			- 1);
+	//	Canvas1->LineTo((67 + (24 * 20) + xoff) * Scale, ((200 + yoff) * ScaleY)
+	//			- 1);
+	//	Canvas1->MoveTo((50 + (24 * 20) + xoff) * Scale, ((200 + yoff) * ScaleY)
+	//			+ 1);
+	//	Canvas1->LineTo((67 + (24 * 20) + xoff) * Scale, ((200 + yoff) * ScaleY)
+	//			+ 1);
+	//}
+	public void testScannerErrorWithIntegerFollowedByStar_Bug278118() throws Exception {
+		assertFormatterResult();
+	}
+
+
+	//#define new new(__FILE__, __LINE__)
+	//void func() {char* a = new    char[10];}
+	
+	//#define new new(__FILE__, __LINE__)
+	//void func() {
+	//	char* a = new char[10];
+	//}
+	public void testPlacementNewAsMacro_Bug298593() throws Exception {
+		assertFormatterResult();
+	}
+
+	//#define MACRO(a) class b : public a
+	//MACRO(aClass){ int a;};
+	
+	//#define MACRO(a) class b : public a
+	//MACRO(aClass) {
+	//	int a;
+	//};
+	public void testCompositeTypeSpecAsMacro_Bug298592() throws Exception {
+		assertFormatterResult();
+	}
+	
+	//void f() {
+	//w_char* p   =  L"wide string literal";
+	//int x = 0;
+	//if (x == 0) x = 5;}
+	
+	//void f() {
+	//	w_char* p = L"wide string literal";
+	//	int x = 0;
+	//	if (x == 0)
+	//		x = 5;
+	//}
+	public void testWideStringLiteral_Bug292626() throws Exception {
+		assertFormatterResult();
+	}
+
+	//#define INT (int)
+	//int i = INT 1;
+	
+	//#define INT (int)
+	//int i = INT 1;
+	public void testCastAsMacro_Bug285901() throws Exception {
+		assertFormatterResult();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/DefaultCCommentAutoEditStrategyTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/DefaultCCommentAutoEditStrategyTest.java
new file mode 100644
index 0000000..8bb3885
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/DefaultCCommentAutoEditStrategyTest.java
@@ -0,0 +1,622 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *     Sergey Prigogin, Google
+ *     Andrew Ferguson (Symbian)
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.HashMap;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.text.ICPartitions;
+import org.eclipse.cdt.ui.text.doctools.DefaultMultilineCommentAutoEditStrategy;
+
+import org.eclipse.cdt.internal.ui.text.CAutoIndentStrategy;
+import org.eclipse.cdt.internal.ui.text.CTextTools;
+
+
+/**
+ * Testing the auto indent strategies.
+ */
+public class DefaultCCommentAutoEditStrategyTest extends AbstractAutoEditTest {
+	private HashMap<String,String> fOptions;
+
+	/**
+	 * @param name
+	 */
+	public DefaultCCommentAutoEditStrategyTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return suite(DefaultCCommentAutoEditStrategyTest.class);
+	}
+
+	/*
+	 * @see org.eclipse.cdt.core.testplugin.util.BaseTestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+		fOptions= CCorePlugin.getOptions();
+	}
+
+	/*
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		CCorePlugin.setOptions(fOptions);
+		super.tearDown();
+	}
+
+	private AutoEditTester createAutoEditTester() {
+		CTextTools textTools = CUIPlugin.getDefault().getTextTools();
+		IDocument doc = new Document();
+		textTools.setupCDocument(doc);
+		AutoEditTester tester = new AutoEditTester(doc, ICPartitions.C_PARTITIONING);
+
+
+		tester.setAutoEditStrategy(IDocument.DEFAULT_CONTENT_TYPE, new CAutoIndentStrategy(ICPartitions.C_PARTITIONING, null));
+		tester.setAutoEditStrategy(ICPartitions.C_MULTI_LINE_COMMENT, new DefaultMultilineCommentAutoEditStrategy());
+		tester.setAutoEditStrategy(ICPartitions.C_PREPROCESSOR, new CAutoIndentStrategy(ICPartitions.C_PARTITIONING, null));
+		return tester;
+	}
+
+	public void testIsMultilineNew() throws BadLocationException {
+		DefaultMultilineCommentAutoEditStrategy ds= new DefaultMultilineCommentAutoEditStrategy();
+		CTextTools textTools = CUIPlugin.getDefault().getTextTools();
+		IDocument doc = new Document();
+		textTools.setupCDocument(doc);
+
+		doc.set(" /*  ");
+		assertTrue(ds.shouldCloseMultiline(doc, 3));
+		doc.set(" /*  \n");
+		assertTrue(ds.shouldCloseMultiline(doc, 3));
+		assertTrue(ds.shouldCloseMultiline(doc, 5));
+		doc.set(" /*  \n  ");
+		assertTrue(ds.shouldCloseMultiline(doc, 3));
+		assertTrue(ds.shouldCloseMultiline(doc, 6));
+		doc.set(" /*  */");
+		assertFalse(ds.shouldCloseMultiline(doc, 5));
+		doc.set(" /*  */ ");
+		assertFalse(ds.shouldCloseMultiline(doc, 5));
+		doc.set(" /* \n\n */ ");
+		assertFalse(ds.shouldCloseMultiline(doc, 5));
+		doc.set(" /* \n\n */ \n /*");
+		assertTrue(ds.shouldCloseMultiline(doc, 14));
+		doc.set(" /* \n\n */ \n /* ");
+		assertTrue(ds.shouldCloseMultiline(doc, 14));
+		doc.set(" /* \n\n */ \n /* \n");
+		assertTrue(ds.shouldCloseMultiline(doc, 14));
+		doc.set(" /* /* \n\n */ \n /* \n");
+		assertTrue(ds.shouldCloseMultiline(doc, 3));
+		doc.set(" /* \n/* \n\n */ \n /* \n");
+		assertTrue(ds.shouldCloseMultiline(doc, 3));
+		doc.set(" /* \n\n/* \n\n */ \n /* \n");
+		assertTrue(ds.shouldCloseMultiline(doc, 3));
+		doc.set(" /* \n\n/* \n\n */ \n /* \n");
+		assertTrue(ds.shouldCloseMultiline(doc, 3));
+		doc.set(" /* \n\n                 */ /* \n\n */ \n /* \n");
+		assertFalse(ds.shouldCloseMultiline(doc, 3));
+		doc.set(" /*\n /*\n * \n * \n */\n");
+		assertFalse(ds.shouldCloseMultiline(doc, 8));
+	}
+
+	// /*X
+
+	// /*
+	//  * X
+	//  */
+	public void testInsertNewLine1() {
+		assertNewLineBehaviour();
+	}
+
+	//   /*X
+
+	//   /*
+	//    * X
+	//    */
+	public void testInsertNewLine2() {
+		assertNewLineBehaviour();
+	}	
+
+	// class A {};  /*X
+
+	// class A {};  /*
+	// X
+	public void testInsertNewLine3() {
+		assertNewLineBehaviour();
+	}
+
+	// class A {
+	// /*X
+	// };  
+
+	// class A {
+	// /*
+	//  * X
+	//  */
+	// };  
+	public void testInsertNewLine4() {
+		assertNewLineBehaviour();
+	}
+
+	// class A {
+	// /* X
+	// };  
+
+	// class A {
+	// /* 
+	//  * X
+	//  */
+	// };  
+	public void testInsertNewLine5() {
+		assertNewLineBehaviour();
+	}
+
+	
+	
+	// class A {
+	// /*X
+	//  * 
+	//  */
+	// };
+
+	// class A {
+	// /*
+	//  * X
+	//  * 
+	//  */
+	// };
+	public void testInsertNewLine6() {
+		assertNewLineBehaviour();
+	}
+
+	// class A {
+	// /*  
+	//  *X
+	//  */
+	// };
+
+	// class A {
+	// /*  
+	//  *
+	//  *X
+	//  */
+	// };
+	public void testInsertNewLine7() {
+		assertNewLineBehaviour();
+	}
+
+	// class A {
+	// /*  
+	//  *X 
+	//  */
+	// };
+
+	// class A {
+	// /*  
+	//  *
+	//  *X 
+	//  */
+	// };
+	public void testInsertNewLine8() {
+		assertNewLineBehaviour();
+	}
+
+	// class A {
+	// /*  
+	//  * abcd def ghiX
+	//  */
+	// };
+
+	// class A {
+	// /*  
+	//  * abcd def ghi
+	//  * X
+	//  */
+	// };
+	public void testInsertNewLine9() {
+		assertNewLineBehaviour();
+	}
+
+	// class A {
+	// /*  
+	//  * abcd deXf ghi
+	//  */
+	// };
+
+	// class A {
+	// /*  
+	//  * abcd de
+	//  * Xf ghi
+	//  */
+	// };
+	public void testInsertNewLine10() {
+		assertNewLineBehaviour();
+	}
+
+	// class A {
+	// /* 
+	//  * 
+	//  */X
+	// };
+
+	// class A {
+	// /* 
+	//  * 
+	//  */
+	// X
+	// };
+	public void _testInsertNewLine11() { // this is correct - we're not in a dccaes partition
+		assertNewLineBehaviour();
+	}
+
+	// /*X*/	
+
+	// /*
+	//  * X 
+	//  */
+	public void _testInsertNewLine12() {
+		assertNewLineBehaviour();
+	}
+
+	// class A {
+	// /*Xfoo
+	// };  
+
+	// class A {
+	// /*
+	//  * X
+	//  */foo
+	// };  
+	public void testInsertNewLine13() {
+		assertNewLineBehaviour();
+	}
+
+	// class A {
+	// /*fooX
+	// };  
+
+	// class A {
+	// /*foo
+	//  * X
+	//  */
+	// };  
+	public void testInsertNewLine14() {
+		assertNewLineBehaviour();
+	}
+
+
+	// /*
+	//  *
+	//  *X
+
+	// /*
+	//  *
+	//  *
+	//  *X
+	public void testInsertNewLine15() {
+		assertNewLineBehaviour();
+	}
+
+	// /*
+	//  *
+	//  *Xxx
+
+	// /*
+	//  *
+	//  *
+	//  *Xxx
+	public void testInsertNewLine16() {
+		assertNewLineBehaviour();
+	}
+
+	// /*
+	//   X
+
+	// /*
+	//   
+	//   X
+	public void testInsertNewLine17() {
+		assertNewLineBehaviour();
+	}
+
+	// /*
+	//   X
+	//  */
+
+	// /*
+	//   
+	//   X
+	//  */
+	public void testInsertNewLine18() {
+		assertNewLineBehaviour();
+	}
+
+	//        /*
+	//         *
+	//         */   /*X
+
+	//        /*
+	//         *
+	//         */   /*
+	//               * X
+	//               */
+	public void _testInsertNewLine19() {
+		assertNewLineBehaviour();
+	}
+	
+	//        /*
+	//        /*X
+	//         *
+	//         */
+
+	//        /*
+	//        /*
+	//         * X
+	//         *
+	//         */
+	public void testInsertNewLine20() {
+		assertNewLineBehaviour();
+	}
+
+
+	//
+	//  X
+	//
+	//  void foo() {}
+	public void testFollowingDeclaration1() {
+		assertDeclarationFollowingX("void foo() {}");
+	}
+	
+	//  X
+	//
+	//  void foo() {}
+	//  void bar() {}
+	public void testFollowingDeclaration1b() {
+		assertDeclarationFollowingX("void foo() {}");
+	}
+
+
+	//
+	//  X
+	//  class C {
+	//  void foo() {}
+	//  };
+	public void testFollowingDeclaration2() {
+		assertDeclarationFollowingX("class C {\n  void foo() {}\n  };");
+	}
+
+	//  class C {
+	//  X
+	//  void foo() {}
+	//  };
+	public void testFollowingDeclaration3() {
+		assertDeclarationFollowingX("void foo() {}");
+	}
+	
+	//  class C {
+	//  void foo() {X}
+	//  void bar(int x);
+	//  };
+	public void testFollowingDeclaration4() {
+		assertDeclarationFollowingX(null);
+	}
+
+	//  class C {
+	//  void foo() {} X
+	//  void bar(int x);
+	//  };
+	public void testFollowingDeclaration4a() {
+		assertDeclarationFollowingX("void bar(int x);");
+	}
+	
+	//  class C {
+	//  void foo()X{}
+	//  void bar(int x);
+	//  };
+	public void _testFollowingDeclaration4b() { // XXX - this is likely invalid anyhow
+		assertDeclarationFollowingX("void foo(){}"); // (X is just the cursor position)
+	}
+	
+	//  class C {
+	//  void foo()
+	//  X
+	//  {
+	//     int x;
+	//  }
+	//  void bar(int x);
+	//  };
+	public void _testFollowingDeclaration4c() { // XXX - this is likely invalid anyhow
+		assertDeclarationFollowingX("void foo()\n  {\n     int x;\n  }\n"); // (X is just the cursor position)
+	}
+	
+	//  namespace n1 { X
+	//		namespace n2 {
+	//  		void foo() {}
+	//  		void bar(int x) {}
+	//          class C {
+	//              int y;
+	//              void baz(int x) {}
+	//          };
+	//		}
+	//  }
+	public void _testFollowingDeclaration5() {
+		assertDeclarationFollowingX("namespace n2 {\n  		void foo() {}\n  		void bar(int x) {}\n          class C {\n              int y;\n              void baz(int x) {}\n          };\n		}");
+	}
+	
+	//  namespace n1 {
+	//		namespace n2 {X
+	//  		void foo() {}
+	//  		void bar(int x) {}
+	//          class C {
+	//              int y;
+	//              void baz(int x) {}
+	//          };
+	//		}
+	//  }
+	public void testFollowingDeclaration6() {
+		assertDeclarationFollowingX("void foo() {}");
+	}
+	
+	//  namespace n1 {
+	//		namespace n2 {
+	//  		void foo() {}X
+	//  		void bar(int x) {}
+	//          class C {
+	//              int y;
+	//              void baz(int x) {}
+	//          };
+	//		}
+	//  }
+	public void testFollowingDeclaration7() {
+		assertDeclarationFollowingX("void bar(int x) {}");
+	}
+	
+	//  namespace n1 {
+	//		namespace n2 {
+	//  		void foo() {}
+	//  		void bar(int x) {}
+	//          class C {X
+	//              int y;
+	//              void baz(int x) {}
+	//          };
+	//		}
+	//  }
+	public void testFollowingDeclaration8() {
+		assertDeclarationFollowingX("int y;");
+	}
+	
+	//  namespace n1 {
+	//		namespace n2 {
+	//  		void foo() {}
+	//  		void bar(int x) {}
+	//          class C {
+	//              int y;X
+	//              void baz(int x) {}
+	//          };
+	//		}
+	//  }
+	public void testFollowingDeclaration9() {
+		assertDeclarationFollowingX("void baz(int x) {}");
+	}
+	
+	//	#define STATIC static
+	//
+	//	class D {
+	//	public:
+	//		X
+	//		STATIC void D::foo(int x) {
+	//			
+	//		}
+	//	};
+	public void testFollowingDeclaration13() throws CoreException {
+		assertDeclarationFollowingX("STATIC void D::foo(int x) {\n			\n		}");
+	}
+
+	//  #define MM void foo()
+	//  X
+	//  MM {}
+	public void testFollowingDeclaration10() {
+		assertDeclarationFollowingX("MM {}");
+	}
+	
+	//  #define NAME foo
+	//  #define MM(V) void V(int y)
+	//  X
+	//  MM(NAME) {}
+	public void testFollowingDeclaration11() {
+		assertDeclarationFollowingX("MM(NAME) {}");
+	}
+	
+	//  #define MAKEFUNC(V) void V()
+	//  #define B(V) V
+	//  #define C(V) foo ## x
+	//  X
+	//  MAKEFUNC(B(C(y))) {}
+	public void testFollowingDeclaration12() {
+		assertDeclarationFollowingX("MAKEFUNC(B(C(y))) {}");
+	}
+	
+	/**
+	 * @param rs - the raw signature of the declaration that should be returned
+	 * or <code>null</code> if no declaration should be returned.
+	 */
+	protected void assertDeclarationFollowingX(String rs) {
+		try {
+			ICProject cproject= CProjectHelper.createCCProject("test"+System.currentTimeMillis(), "bin");
+			try {
+				String init= getTestContents1()[0].toString(); 
+				int caretInit= init.indexOf('X');
+				init= init.replaceFirst("X", "");
+				IFile file= TestSourceReader.createFile(cproject.getProject(), "this.cpp", init);
+				IASTTranslationUnit ast= TestSourceReader.createIndexBasedAST(null, cproject, file);
+				assertNotNull(ast);
+				IASTDeclaration decl= DefaultMultilineCommentAutoEditStrategy.findFollowingDeclaration(ast, caretInit);
+				if(rs!=null) {
+					assertNotNull(decl);
+					assertEquals(rs, decl.getRawSignature());
+				} else {
+					assertNull(decl);
+				}
+			} finally {
+				if(cproject!=null) {
+					cproject.getProject().delete(true, NPM);
+				}
+			}
+		} catch(CoreException ce) {
+			fail(ce.getMessage());
+		}
+	}
+
+	protected void assertNewLineBehaviour() {
+		DefaultMultilineCommentAutoEditStrategy ds= new DefaultMultilineCommentAutoEditStrategy();
+		CTextTools textTools = CUIPlugin.getDefault().getTextTools();
+		IDocument doc = new Document();
+		textTools.setupCDocument(doc);
+
+		StringBuffer[] raw= getTestContents();
+		String init= raw[0].toString(), expected= raw[1].toString();
+
+		int caretInit= init.indexOf('X');
+		init= init.replaceFirst("X", "");
+
+		int caretExpected= expected.indexOf('X');
+		expected= expected.replaceFirst("X", "");
+
+		doc.set(init);
+		int caretActual= -1;
+		try {
+			TestDocumentCommand dc= new TestDocumentCommand(caretInit, 0, "\n");
+			ds.customizeDocumentCommand(doc, dc);
+			caretActual= dc.exec(doc);
+		} catch(BadLocationException ble) {
+			fail(ble.getMessage());
+		}
+		String actual= doc.get();
+		assertEquals(expected, actual);
+		assertEquals(caretExpected, caretActual);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/DisplayHelper.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/DisplayHelper.java
new file mode 100644
index 0000000..b22080f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/DisplayHelper.java
@@ -0,0 +1,621 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import junit.framework.Assert;
+
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Runs the event loop of the given display until {@link #condition()} becomes
+ * <code>true</code> or no events have occurred for the supplied timeout.
+ * Between running the event loop, {@link Display#sleep()} is called.
+ * <p>
+ * There is a caveat: the given timeouts must be long enough that the calling
+ * thread can enter <code>Display.sleep()</code> before the timeout elapses,
+ * otherwise, the waiter may time out before <code>sleep</code> is called and
+ * the sleeping thread may never be waken up.
+ * </p>
+ * 
+ * <p>Copied from org.eclipse.jdt.testplugin.util.</p>
+ * 
+ * @since 4.0
+ */
+public abstract class DisplayHelper {
+	/**
+	 * Creates a new instance.
+	 */
+	protected DisplayHelper() {
+	}
+	
+	/**
+	 * Until {@link #condition()} becomes <code>true</code> or the timeout
+	 * elapses, call {@link Display#sleep()} and run the event loop.
+	 * <p>
+	 * If <code>timeout &lt; 0</code>, the event loop is never driven and
+	 * only the condition is checked. If <code>timeout == 0</code>, the event
+	 * loop is driven at most once, but <code>Display.sleep()</code> is never
+	 * invoked.
+	 * </p>
+	 * 
+	 * @param display the display to run the event loop of
+	 * @param timeout the timeout in milliseconds
+	 * @return <code>true</code> if the condition became <code>true</code>,
+	 *         <code>false</code> if the timeout elapsed
+	 */
+	public final boolean waitForCondition(Display display, long timeout) {
+		// if the condition already holds, succeed
+		if (condition())
+			return true;
+		
+		if (timeout < 0)
+			return false;
+		
+		// if driving the event loop once makes the condition hold, succeed
+		// without spawning a thread.
+		driveEventQueue(display);
+		if (condition())
+			return true;
+		
+		// if the timeout is negative or zero, fail
+		if (timeout == 0)
+			return false;
+
+		// repeatedly sleep until condition becomes true or timeout elapses
+		DisplayWaiter waiter= new DisplayWaiter(display);
+		DisplayWaiter.Timeout timeoutState= waiter.start(timeout);
+		boolean condition;
+		try {
+			do {
+				if (display.sleep())
+					driveEventQueue(display);
+				condition= condition();
+			} while (!condition && !timeoutState.hasTimedOut());
+		} finally {
+			waiter.stop();
+		}
+		return condition;
+	}
+	
+	/**
+	 * Call {@link Display#sleep()} and run the event loop until the given
+	 * timeout has elapsed.
+	 * <p>
+	 * If <code>timeout &lt; 0</code>, nothing happens. If
+	 * <code>timeout == 0</code>, the event loop is driven exactly once, but
+	 * <code>Display.sleep()</code> is never invoked.
+	 * </p>
+	 * 
+	 * @param display the display to run the event loop of
+	 * @param millis the timeout in milliseconds
+	 */
+	public static void sleep(Display display, long millis) {
+		new DisplayHelper() {
+			public boolean condition() {
+				return false;
+			}
+		}.waitForCondition(display, millis);
+	}
+	
+	/**
+	 * Call {@link Display#sleep()} and run the event loop once if
+	 * <code>sleep</code> returns before the timeout elapses. Returns
+	 * <code>true</code> if any events were processed, <code>false</code> if
+	 * not.
+	 * <p>
+	 * If <code>timeout &lt; 0</code>, nothing happens and false is returned.
+	 * If <code>timeout == 0</code>, the event loop is driven exactly once,
+	 * but <code>Display.sleep()</code> is never invoked.
+	 * </p>
+	 * 
+	 * @param display the display to run the event loop of
+	 * @param timeout the timeout in milliseconds
+	 * @return <code>true</code> if any event was taken off the event queue,
+	 *         <code>false</code> if not
+	 */
+	public static boolean runEventLoop(Display display, long timeout) {
+		if (timeout < 0)
+			return false;
+		
+		if (timeout == 0)
+			return driveEventQueue(display);
+		
+		// repeatedly sleep until condition becomes true or timeout elapses
+		DisplayWaiter waiter= new DisplayWaiter(display);
+		DisplayWaiter.Timeout timeoutState= waiter.start(timeout);
+		boolean events= false;
+		if (display.sleep() && !timeoutState.hasTimedOut()) {
+			driveEventQueue(display);
+			events= true;
+		}
+		waiter.stop();
+		return events;
+	}
+	
+	/**
+	 * The condition which has to be met in order for
+	 * {@link #waitForCondition(Display, int)} to return before the timeout
+	 * elapses.
+	 * 
+	 * @return <code>true</code> if the condition is met, <code>false</code>
+	 *         if the event loop should be driven some more
+	 */
+	protected abstract boolean condition();
+
+	/**
+	 * Runs the event loop on the given display.
+	 * 
+	 * @param display the display
+	 * @return if <code>display.readAndDispatch</code> returned
+	 *         <code>true</code> at least once
+	 */
+	private static boolean driveEventQueue(Display display) {
+		boolean events= false;
+		while (display.readAndDispatch()) {
+			events= true;
+		}
+		return events;
+	}
+
+	/**
+	 * Until {@link #condition()} becomes <code>true</code> or the timeout
+	 * elapses, call {@link Display#sleep()} and run the event loop.
+	 * <p>
+	 * If <code>timeout &lt; 0</code>, the event loop is never driven and
+	 * only the condition is checked. If <code>timeout == 0</code>, the event
+	 * loop is driven at most once, but <code>Display.sleep()</code> is never
+	 * invoked.
+	 * </p>
+	 * <p>
+	 * The condition gets rechecked every <code>interval</code> milliseconds, even
+	 * if no events were read from the queue.
+	 * </p>
+	 * 
+	 * @param display the display to run the event loop of
+	 * @param timeout the timeout in milliseconds
+	 * @param interval the interval to re-check the condition in milliseconds
+	 * @return <code>true</code> if the condition became <code>true</code>,
+	 *         <code>false</code> if the timeout elapsed
+	 */
+	public final boolean waitForCondition(Display display, long timeout, long interval) {
+		// if the condition already holds, succeed
+		if (condition())
+			return true;
+		
+		if (timeout < 0)
+			return false;
+		
+		// if driving the event loop once makes the condition hold, succeed
+		// without spawning a thread.
+		driveEventQueue(display);
+		if (condition())
+			return true;
+		
+		// if the timeout is negative or zero, fail
+		if (timeout == 0)
+			return false;
+	
+		// repeatedly sleep until condition becomes true or timeout elapses
+		DisplayWaiter waiter= new DisplayWaiter(display, true);
+		long currentTimeMillis= System.currentTimeMillis();
+		long finalTimeout= timeout + currentTimeMillis;
+		if (finalTimeout < currentTimeMillis)
+			finalTimeout= Long.MAX_VALUE;
+		boolean condition;
+		try {
+			do {
+				waiter.restart(interval);
+				if (display.sleep())
+					driveEventQueue(display);
+				condition= condition();
+			} while (!condition && finalTimeout > System.currentTimeMillis());
+		} finally {
+			waiter.stop();
+		}
+		return condition;
+	}
+
+}
+
+/**
+ * Implements the thread that will wait for the timeout and wake up the display
+ * so it does not wait forever. The thread may be restarted after it was stopped
+ * or timed out.
+ * 
+ * @since 3.1
+ */
+final class DisplayWaiter {
+	/**
+	 * Timeout state of a display waiter thread.
+	 */
+	public final class Timeout {
+		private boolean fTimeoutState= false;
+		/**
+		 * Returns <code>true</code> if the timeout has been reached,
+		 * <code>false</code> if not.
+		 * 
+		 * @return <code>true</code> if the timeout has been reached,
+		 *         <code>false</code> if not
+		 */
+		public boolean hasTimedOut() {
+			synchronized (fMutex) {
+				return fTimeoutState;
+			}
+		}
+		void setTimedOut(boolean timedOut) {
+			fTimeoutState= timedOut;
+		}
+		Timeout(boolean initialState) {
+			fTimeoutState= initialState;
+		}
+	}
+	
+	// configuration
+	private final Display fDisplay;
+	private final Object fMutex= new Object();
+	private final boolean fKeepRunningOnTimeout;
+	
+	/* State -- possible transitions:
+	 * 
+	 * STOPPED   -> RUNNING
+	 * RUNNING   -> STOPPED
+	 * RUNNING   -> IDLE
+	 * IDLE      -> RUNNING
+	 * IDLE      -> STOPPED
+	 */
+	private static final int RUNNING= 1 << 1;
+	private static final int STOPPED= 1 << 2;
+	private static final int IDLE= 1 << 3;
+	
+	/** The current state. */
+	private int fState;
+	/** The time in milliseconds (see Date) that the timeout will occur. */
+	private long fNextTimeout;
+	/** The thread. */
+	private Thread fCurrentThread;
+	/** The timeout state of the current thread. */
+	private Timeout fCurrentTimeoutState;
+
+	/**
+	 * Creates a new instance on the given display and timeout.
+	 * 
+	 * @param display the display to run the event loop of
+	 */
+	public DisplayWaiter(Display display) {
+		this(display, false);
+	}
+	
+	/**
+	 * Creates a new instance on the given display and timeout.
+	 * 
+	 * @param display the display to run the event loop of
+	 * @param keepRunning <code>true</code> if the thread should be kept
+	 *        running after timing out
+	 */
+	public DisplayWaiter(Display display, boolean keepRunning) {
+		Assert.assertNotNull(display);
+		fDisplay= display;
+		fState= STOPPED;
+		fKeepRunningOnTimeout= keepRunning;
+	}
+	
+	/**
+	 * Starts the timeout thread if it is not currently running. Nothing happens
+	 * if a thread is already running.
+	 * 
+	 * @param delay the delay from now in milliseconds
+	 * @return the timeout state which can be queried for its timed out status
+	 */
+	public Timeout start(long delay) {
+		Assert.assertTrue(delay > 0);
+		synchronized (fMutex) {
+			switch (fState) {
+				case STOPPED:
+					startThread();
+					setNextTimeout(delay);
+					break;
+				case IDLE:
+					unhold();
+					setNextTimeout(delay);
+					break;
+			}
+			
+			return fCurrentTimeoutState;
+		}
+	}
+
+	/**
+	 * Sets the next timeout to <em>current time</em> plus <code>delay</code>.
+	 * 
+	 * @param delay the delay until the next timeout occurs in milliseconds from
+	 *        now
+	 */
+	private void setNextTimeout(long delay) {
+		long currentTimeMillis= System.currentTimeMillis();
+		long next= currentTimeMillis + delay;
+		if (next > currentTimeMillis)
+			fNextTimeout= next;
+		else
+			fNextTimeout= Long.MAX_VALUE;
+	}
+	
+	/**
+	 * Starts the thread if it is not currently running; resets the timeout if
+	 * it is.
+	 * 
+	 * @param delay the delay from now in milliseconds
+	 * @return the timeout state which can be queried for its timed out status
+	 */
+	public Timeout restart(long delay) {
+		Assert.assertTrue(delay > 0);
+		synchronized (fMutex) {
+			switch (fState) {
+				case STOPPED:
+					startThread();
+					break;
+				case IDLE:
+					unhold();
+					break;
+			}
+			setNextTimeout(delay);
+
+			return fCurrentTimeoutState;
+		}
+	}
+
+	/**
+	 * Stops the thread if it is running. If not, nothing happens. Another
+	 * thread may be started by calling {@link #start(long)} or
+	 * {@link #restart(long)}.
+	 */
+	public void stop() {
+		synchronized (fMutex) {
+			if (tryTransition(RUNNING | IDLE, STOPPED))
+				fMutex.notifyAll();
+		}
+	}
+	
+	/**
+	 * Puts the reaper thread on hold but does not stop it. It may be restarted
+	 * by calling {@link #start(long)} or {@link #restart(long)}.
+	 */
+	public void hold() {
+		synchronized (fMutex) {
+			// nothing to do if there is no thread
+			if (tryTransition(RUNNING, IDLE))
+				fMutex.notifyAll();
+		}
+	}
+
+	/**
+	 * Transition to <code>RUNNING</code> and clear the timed out flag. Assume
+	 * current state is <code>IDLE</code>.
+	 */
+	private void unhold() {
+		checkedTransition(IDLE, RUNNING);
+		fCurrentTimeoutState= new Timeout(false);
+		fMutex.notifyAll();
+	}
+		
+	/**
+	 * Start the thread. Assume the current state is <code>STOPPED</code>.
+	 */
+	private void startThread() {
+		checkedTransition(STOPPED, RUNNING);
+		fCurrentTimeoutState= new Timeout(false);
+		fCurrentThread= new Thread() {
+			/**
+			 * Exception thrown when a thread notices that it has been stopped
+			 * and a new thread has been started.
+			 */
+			final class ThreadChangedException extends Exception {
+				private static final long serialVersionUID= 1L;
+			}
+
+			/*
+			 * @see java.lang.Runnable#run()
+			 */
+			public void run() {
+				try {
+					run2();
+				} catch (InterruptedException e) {
+					// ignore and end the thread - we never interrupt ourselves,
+					// so it must be an external entity that interrupted us
+					Logger.global.log(Level.FINE, "", e);
+				} catch (ThreadChangedException e) {
+					// the thread was stopped and restarted before we got out
+					// of a wait - we're no longer used
+					// we might have been notified instead of the current thread,
+					// so wake it up
+					Logger.global.log(Level.FINE, "", e);
+					synchronized (fMutex) {
+						fMutex.notifyAll();
+					}
+				}
+			}
+			
+			/**
+			 * Runs the thread.
+			 * 
+			 * @throws InterruptedException if the thread was interrupted
+			 * @throws ThreadChangedException if the thread changed
+			 */
+			private void run2() throws InterruptedException, ThreadChangedException {
+				synchronized (fMutex) {
+					checkThread();
+					tryHold(); // wait / potential state change
+					assertStates(STOPPED | RUNNING);
+					
+					while (isState(RUNNING)) {
+						waitForTimeout(); // wait / potential state change
+						
+						if (isState(RUNNING))
+							timedOut(); // state change
+						assertStates(STOPPED | IDLE);
+						
+						tryHold(); // wait / potential state change
+						assertStates(STOPPED | RUNNING);
+					}
+					assertStates(STOPPED);
+				}
+			}
+
+			/**
+			 * Check whether the current thread is this thread, throw an
+			 * exception otherwise.
+			 * 
+			 * @throws ThreadChangedException if the current thread changed
+			 */
+			private void checkThread() throws ThreadChangedException {
+				if (fCurrentThread != this)
+					throw new ThreadChangedException();
+			}
+
+			/**
+			 * Waits until the next timeout occurs.
+			 * 
+			 * @throws InterruptedException if the thread was interrupted
+			 * @throws ThreadChangedException if the thread changed
+			 */
+			private void waitForTimeout() throws InterruptedException, ThreadChangedException {
+				long delta;
+				while (isState(RUNNING) && (delta = fNextTimeout - System.currentTimeMillis()) > 0) {
+					delta= Math.max(delta, 50); // wait at least 50ms in order to avoid timing out before the display is going to sleep
+					Logger.global.finest("sleeping for " + delta + "ms");
+					fMutex.wait(delta);
+					checkThread();
+				}
+			}
+
+			/**
+			 * Sets the timed out flag and wakes up the display. Transitions to
+			 * <code>IDLE</code> (if in keep-running mode) or
+			 * <code>STOPPED</code>.
+			 */
+			private void timedOut() {
+				Logger.global.finer("timed out");
+				fCurrentTimeoutState.setTimedOut(true);
+				fDisplay.wake(); // wake up call!
+				if (fKeepRunningOnTimeout)
+					checkedTransition(RUNNING, IDLE);
+				else
+					checkedTransition(RUNNING, STOPPED);
+			}
+			
+			/**
+			 * Waits while the state is <code>IDLE</code>, then returns. The
+			 * state must not be <code>RUNNING</code> when calling this
+			 * method. The state is either <code>STOPPED</code> or
+			 * <code>RUNNING</code> when the method returns.
+			 * 
+			 * @throws InterruptedException if the thread was interrupted
+			 * @throws ThreadChangedException if the thread has changed while on
+			 *         hold
+			 */
+			private void tryHold() throws InterruptedException, ThreadChangedException {
+				while (isState(IDLE)) {
+					fMutex.wait(0);
+					checkThread();
+				}
+				assertStates(STOPPED | RUNNING);
+			}
+		};
+		
+		fCurrentThread.start();
+	}
+	
+	/**
+	 * Transitions to <code>nextState</code> if the current state is one of
+	 * <code>possibleStates</code>. Returns <code>true</code> if the
+	 * transition happened, <code>false</code> otherwise.
+	 * 
+	 * @param possibleStates the states which trigger a transition
+	 * @param nextState the state to transition to
+	 * @return <code>true</code> if the transition happened,
+	 *         <code>false</code> otherwise
+	 */
+	private boolean tryTransition(int possibleStates, int nextState) {
+		if (isState(possibleStates)) {
+			Logger.global.finer(name(fState) + " > " + name(nextState) + " (" + name(possibleStates) + ")");
+			fState= nextState;
+			return true;
+		}
+		Logger.global.finest("noTransition" + name(fState) + " !> " + name(nextState) + " (" + name(possibleStates) + ")");
+		return false;
+	}
+	
+	/**
+	 * Checks the <code>possibleStates</code> and throws an assertion if it is
+	 * not met, then transitions to <code>nextState</code>.
+	 * 
+	 * @param possibleStates the allowed states
+	 * @param nextState the state to transition to
+	 */
+	private void checkedTransition(int possibleStates, int nextState) {
+		assertStates(possibleStates);
+		Logger.global.finer(name(fState) + " > " + name(nextState));
+		fState= nextState;
+	}
+	
+	/**
+	 * Implements state consistency checking.
+	 * 
+	 * @param states the allowed states
+	 * @throws junit.framework.AssertionFailedError if the current state is not
+	 *         in <code>states</code>
+	 */
+	private void assertStates(int states) {
+		Assert.assertTrue("illegal state", isState(states));
+	}
+
+	/**
+	 * Answers <code>true</code> if the current state is in the given
+	 * <code>states</code>.
+	 * 
+	 * @param states the possible states
+	 * @return <code>true</code> if the current state is in the given states,
+	 *         <code>false</code> otherwise
+	 */
+	private boolean isState(int states) {
+		return (states & fState) == fState;
+	}
+	
+	/**
+	 * Pretty print the given states.
+	 * 
+	 * @param states the states
+	 * @return a string representation of the states
+	 */
+	private String name(int states) {
+		StringBuffer buf= new StringBuffer();
+		boolean comma= false;
+		if ((states & RUNNING) == RUNNING) {
+			buf.append("RUNNING");
+			comma= true;
+		}
+		if ((states & STOPPED) == STOPPED) {
+			if (comma)
+				buf.append(",");
+			buf.append("STOPPED");
+			comma= true;
+		}
+		if ((states & IDLE) == IDLE) {
+			if (comma)
+				buf.append(",");
+			buf.append("IDLE");
+		}
+		return buf.toString();
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/EditorTestHelper.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/EditorTestHelper.java
new file mode 100644
index 0000000..f218fe2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/EditorTestHelper.java
@@ -0,0 +1,567 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems) - Adapted for CDT
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.logging.Logger;
+
+import junit.framework.Assert;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobManager;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IWidgetTokenKeeper;
+import org.eclipse.jface.text.IWidgetTokenOwner;
+import org.eclipse.jface.text.reconciler.AbstractReconciler;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
+import org.eclipse.jface.text.reconciler.MonoReconciler;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.WorkbenchException;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider;
+import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider;
+import org.eclipse.ui.wizards.datatransfer.ImportOperation;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.index.IIndexManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.PreferenceConstants;
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+
+import org.eclipse.cdt.internal.ui.text.CReconcilingStrategy;
+import org.eclipse.cdt.internal.ui.text.CompositeReconcilingStrategy;
+
+
+/**
+ * Copied from org.eclipse.jdt.text.tests.performance.
+ * 
+ * @since 4.0
+ */
+public class EditorTestHelper {
+	
+	private static class ImportOverwriteQuery implements IOverwriteQuery {
+		public String queryOverwrite(String file) {
+			return ALL;
+		}	
+	}		
+	
+	public static final String TEXT_EDITOR_ID= "org.eclipse.ui.DefaultTextEditor";
+	
+	public static final String C_EDITOR_ID= "org.eclipse.cdt.ui.editor.CEditor";
+	
+	public static final String RESOURCE_PERSPECTIVE_ID= "org.eclipse.ui.resourcePerspective";
+	
+	public static final String C_PERSPECTIVE_ID= "org.eclipse.cdt.ui.CPerspective";
+	
+	public static final String OUTLINE_VIEW_ID= "org.eclipse.ui.views.ContentOutline";
+	
+	public static final String C_VIEW_ID= "org.eclipse.cdt.ui.CView";
+	
+	public static final String NAVIGATOR_VIEW_ID= "org.eclipse.ui.views.ResourceNavigator";
+	
+	public static final String INTRO_VIEW_ID= "org.eclipse.ui.internal.introview";
+
+	private static final long MAX_WAIT_TIME = 60000; // don't wait longer than 60 seconds
+	
+	public static IEditorPart openInEditor(IFile file, boolean runEventLoop) throws PartInitException {
+		IEditorPart part= IDE.openEditor(getActivePage(), file);
+		if (runEventLoop)
+			runEventQueue(part);
+		return part;
+	}
+	
+	public static IEditorPart openInEditor(IFile file, String editorId, boolean runEventLoop) throws PartInitException {
+		IEditorPart part= IDE.openEditor(getActivePage(), file, editorId);
+		if (runEventLoop)
+			runEventQueue(part);
+		return part;
+	}
+	
+	public static AbstractTextEditor[] openInEditor(IFile[] files, String editorId) throws PartInitException {
+		AbstractTextEditor editors[]= new AbstractTextEditor[files.length];
+		for (int i= 0; i < files.length; i++) {
+			editors[i]= (AbstractTextEditor) openInEditor(files[i], editorId, true);
+			joinReconciler(getSourceViewer(editors[i]), 100, 10000, 100);
+		}
+		return editors;
+	}
+	
+	public static IDocument getDocument(ITextEditor editor) {
+		IDocumentProvider provider= editor.getDocumentProvider();
+		IEditorInput input= editor.getEditorInput();
+		return provider.getDocument(input);
+	}
+	
+	public static void revertEditor(ITextEditor editor, boolean runEventQueue) {
+		editor.doRevertToSaved();
+		if (runEventQueue)
+			runEventQueue(editor);
+	}
+	
+	public static void closeEditor(IEditorPart editor) {
+		IWorkbenchPartSite site;
+		IWorkbenchPage page;
+		if (editor != null && (site= editor.getSite()) != null && (page= site.getPage()) != null)
+			page.closeEditor(editor, false);
+	}
+	
+	public static void closeAllEditors() {
+		IWorkbenchWindow[] windows= PlatformUI.getWorkbench().getWorkbenchWindows();
+		for (int i= 0; i < windows.length; i++) {
+			IWorkbenchPage[] pages= windows[i].getPages();
+			for (int j= 0; j < pages.length; j++) {
+				pages[j].closeAllEditors(false);
+			}
+		}
+	}
+	
+	/**
+	 * Runs the event queue on the current display until it is empty.
+	 */
+	public static void runEventQueue() {
+		IWorkbenchWindow window= getActiveWorkbenchWindow();
+		if (window != null)
+			runEventQueue(window.getShell());
+	}
+	
+	public static void runEventQueue(IWorkbenchPart part) {
+		runEventQueue(part.getSite().getShell());
+	}
+	
+	public static void runEventQueue(Shell shell) {
+		runEventQueue(shell.getDisplay());
+	}
+	
+	public static void runEventQueue(Display display) {
+		while (display.readAndDispatch()) {
+			// do nothing
+		}
+	}
+	
+	/**
+	 * Runs the event queue on the current display and lets it sleep until the
+	 * timeout elapses.
+	 * 
+	 * @param millis the timeout in milliseconds
+	 */
+	public static void runEventQueue(long millis) {
+		runEventQueue(getActiveDisplay(), millis);
+	}
+	
+	public static void runEventQueue(IWorkbenchPart part, long millis) {
+		runEventQueue(part.getSite().getShell(), millis);
+	}
+	
+	public static void runEventQueue(Shell shell, long millis) {
+		runEventQueue(shell.getDisplay(), millis);
+	}
+	
+	public static void runEventQueue(Display display, long minTime) {
+		if (display != null) {
+			DisplayHelper.sleep(display, minTime);
+		} else {
+			sleep((int) minTime);
+		}
+	}
+	
+	public static IWorkbenchWindow getActiveWorkbenchWindow() {
+		return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+	}
+	
+	public static void forceFocus() {
+		IWorkbenchWindow window= getActiveWorkbenchWindow();
+		if (window == null) {
+			IWorkbenchWindow[] wbWindows= PlatformUI.getWorkbench().getWorkbenchWindows();
+			if (wbWindows.length == 0)
+				return;
+			window= wbWindows[0];
+		}
+		Shell shell= window.getShell();
+		if (shell != null && !shell.isDisposed()) {
+			shell.forceActive();
+			shell.forceFocus();
+		}
+	}
+	
+	public static IWorkbenchPage getActivePage() {
+		IWorkbenchWindow window= getActiveWorkbenchWindow();
+		return window != null ? window.getActivePage() : null;
+	}
+	
+	public static Display getActiveDisplay() {
+		IWorkbenchWindow window= getActiveWorkbenchWindow();
+		return window != null ? window.getShell().getDisplay() : null;
+	}
+	
+	public static void joinBackgroundActivities(AbstractTextEditor editor) throws CoreException {
+		joinBackgroundActivities(getSourceViewer(editor));
+	}
+	
+	public static void joinBackgroundActivities(SourceViewer sourceViewer) throws CoreException {
+		joinBackgroundActivities();
+		joinReconciler(sourceViewer, 500, 0, 500);
+	}
+	
+	public static void joinBackgroundActivities() throws CoreException {
+		// Join Building
+		Logger.global.entering("EditorTestHelper", "joinBackgroundActivities");
+		Logger.global.finer("join builder");
+		boolean interrupted= true;
+		while (interrupted) {
+			try {
+				Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
+				interrupted= false;
+			} catch (InterruptedException e) {
+				interrupted= true;
+			}
+		}
+		// Join indexing
+		Logger.global.finer("join indexer");
+		IIndexManager indexManager= CCorePlugin.getIndexManager();
+		indexManager.joinIndexer(1000, new NullProgressMonitor());
+		// Join jobs
+		joinJobs(0, 1000, 500);
+		Logger.global.exiting("EditorTestHelper", "joinBackgroundActivities");
+	}
+	
+	public static boolean joinJobs(long minTime, long maxTime, long intervalTime) {
+		Logger.global.entering("EditorTestHelper", "joinJobs");
+		runEventQueue(minTime);
+		
+		DisplayHelper helper= new DisplayHelper() {
+			public boolean condition() {
+				return allJobsQuiet();
+			}
+		};
+		boolean quiet= helper.waitForCondition(getActiveDisplay(), maxTime > 0 ? maxTime : MAX_WAIT_TIME, intervalTime);
+		Logger.global.exiting("EditorTestHelper", "joinJobs", new Boolean(quiet));
+		return quiet;
+	}
+	
+	public static void sleep(int intervalTime) {
+		try {
+			Thread.sleep(intervalTime);
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	public static boolean allJobsQuiet() {
+		IJobManager jobManager= Job.getJobManager();
+		Job[] jobs= jobManager.find(null);
+		for (int i= 0; i < jobs.length; i++) {
+			Job job= jobs[i];
+			int state= job.getState();
+			if (state == Job.RUNNING || state == Job.WAITING) {
+				Logger.global.finest(job.toString());
+				return false;
+			}
+		}
+		return true;
+	}
+	
+	public static boolean isViewShown(String viewId) {
+		return getActivePage().findViewReference(viewId) != null;
+	}
+	
+	public static boolean showView(String viewId, boolean show) throws PartInitException {
+		IWorkbenchPage activePage= getActivePage();
+		IViewReference view= activePage.findViewReference(viewId);
+		boolean shown= view != null;
+		if (shown != show)
+			if (show)
+				activePage.showView(viewId);
+			else
+				activePage.hideView(view);
+		return shown;
+	}
+	
+	public static void bringToTop() {
+		getActiveWorkbenchWindow().getShell().forceActive();
+	}
+	
+	public static void forceReconcile(SourceViewer sourceViewer) {
+		Accessor reconcilerAccessor= new Accessor(getReconciler(sourceViewer), AbstractReconciler.class);
+		reconcilerAccessor.invoke("forceReconciling", new Object[0]);
+	}
+	
+	public static boolean joinReconciler(SourceViewer sourceViewer, long minTime, long maxTime, long intervalTime) {
+		Logger.global.entering("EditorTestHelper", "joinReconciler");
+		runEventQueue(minTime);
+		
+		AbstractReconciler reconciler= getReconciler(sourceViewer);
+		if (reconciler == null)
+			return true;
+		final Accessor backgroundThreadAccessor= getBackgroundThreadAccessor(reconciler);
+		Accessor reconcilerAccessor= null;
+		if (reconciler instanceof MonoReconciler) {
+			IReconcilingStrategy strategy= reconciler.getReconcilingStrategy(IDocument.DEFAULT_CONTENT_TYPE);
+			if (strategy instanceof CReconcilingStrategy) {
+				reconcilerAccessor= new Accessor(strategy, CReconcilingStrategy.class);
+			} else if (strategy instanceof CompositeReconcilingStrategy) {
+				IReconcilingStrategy[] strategies= ((CompositeReconcilingStrategy)strategy).getReconcilingStrategies();
+				for (int i = 0; i < strategies.length; i++) {
+					if (strategies[i] instanceof CReconcilingStrategy) {
+						reconcilerAccessor= new Accessor(strategies[i], CReconcilingStrategy.class);
+						break;
+					}
+				}
+			}
+		}
+		final Accessor cReconcilerAccessor= reconcilerAccessor;
+		DisplayHelper helper= new DisplayHelper() {
+			public boolean condition() {
+				return !isRunning(cReconcilerAccessor, backgroundThreadAccessor);
+			}
+		};
+		boolean finished= helper.waitForCondition(getActiveDisplay(), maxTime > 0 ? maxTime : MAX_WAIT_TIME, intervalTime);
+		Logger.global.exiting("EditorTestHelper", "joinReconciler", new Boolean(finished));
+		return finished;
+	}
+	
+	public static AbstractReconciler getReconciler(SourceViewer sourceViewer) {
+		return (AbstractReconciler) new Accessor(sourceViewer, SourceViewer.class).get("fReconciler");
+	}
+	
+	public static SourceViewer getSourceViewer(AbstractTextEditor editor) {
+		SourceViewer sourceViewer= (SourceViewer) new Accessor(editor, AbstractTextEditor.class).invoke("getSourceViewer", new Object[0]);
+		return sourceViewer;
+	}
+	
+	private static Accessor getBackgroundThreadAccessor(AbstractReconciler reconciler) {
+		Object backgroundThread= new Accessor(reconciler, AbstractReconciler.class).get("fThread");
+		return new Accessor(backgroundThread, backgroundThread.getClass());
+	}
+	
+	private static boolean isRunning(Accessor cReconcilerAccessor, Accessor backgroundThreadAccessor) {
+		return (cReconcilerAccessor != null ? !isInitialProcessDone(cReconcilerAccessor) : false) || isDirty(backgroundThreadAccessor) || isActive(backgroundThreadAccessor);
+	}
+	
+	private static boolean isInitialProcessDone(Accessor cReconcilerAccessor) {
+		return ((Boolean) cReconcilerAccessor.get("fInitialProcessDone")).booleanValue();
+	}
+	
+	private static boolean isDirty(Accessor backgroundThreadAccessor) {
+		return ((Boolean) backgroundThreadAccessor.invoke("isDirty", new Object[0])).booleanValue();
+	}
+	
+	private static boolean isActive(Accessor backgroundThreadAccessor) {
+		return ((Boolean) backgroundThreadAccessor.invoke("isActive", new Object[0])).booleanValue();
+	}
+	
+	public static String showPerspective(String perspective) throws WorkbenchException {
+		String shownPerspective= getActivePage().getPerspective().getId();
+		if (!perspective.equals(shownPerspective)) {
+			IWorkbench workbench= PlatformUI.getWorkbench();
+			IWorkbenchWindow activeWindow= workbench.getActiveWorkbenchWindow();
+			workbench.showPerspective(perspective, activeWindow);
+		}
+		return shownPerspective;
+	}
+	
+	public static void closeAllPopUps(SourceViewer sourceViewer) {
+		IWidgetTokenKeeper tokenKeeper= new IWidgetTokenKeeper() {
+			public boolean requestWidgetToken(IWidgetTokenOwner owner) {
+				return true;
+			}
+		};
+		sourceViewer.requestWidgetToken(tokenKeeper, Integer.MAX_VALUE);
+		sourceViewer.releaseWidgetToken(tokenKeeper);
+	}
+	
+	public static void resetFolding() {
+		CUIPlugin.getDefault().getPreferenceStore().setToDefault(PreferenceConstants.EDITOR_FOLDING_ENABLED);
+	}
+	
+	public static boolean enableFolding(boolean value) {
+		IPreferenceStore preferenceStore= CUIPlugin.getDefault().getPreferenceStore();
+		boolean oldValue= preferenceStore.getBoolean(PreferenceConstants.EDITOR_FOLDING_ENABLED);
+		if (value != oldValue)
+			preferenceStore.setValue(PreferenceConstants.EDITOR_FOLDING_ENABLED, value);
+		return oldValue;
+	}
+	
+	public static ICProject createCProject(String project, String externalSourceFolder) throws CoreException {
+		return createCProject(project, externalSourceFolder, false, false);
+	}
+	
+	public static ICProject createCProject(String project, String externalSourceFolder, boolean linkSourceFolder) throws CoreException {
+		return createCProject(project, externalSourceFolder, linkSourceFolder, false);
+	}
+
+	public static ICProject createCProject(String project, String externalSourceFolder, boolean linkSourceFolder, boolean useIndexer) throws CoreException {
+		ICProject cProject= CProjectHelper.createCCProject(project, "bin", useIndexer ? IIndexManager.ID_FAST_INDEXER : IIndexManager.ID_NO_INDEXER);
+		IFolder folder;
+		if (linkSourceFolder)
+			folder= ResourceHelper.createLinkedFolder((IProject) cProject.getUnderlyingResource(), new Path("src"), CTestPlugin.getDefault(), new Path(externalSourceFolder));
+		else {
+			folder= ((IProject) cProject.getUnderlyingResource()).getFolder("src");
+			importFilesFromDirectory(FileTool.getFileInPlugin(CTestPlugin.getDefault(), new Path(externalSourceFolder)), folder.getFullPath(), null);
+		}
+		Assert.assertNotNull(folder);
+		Assert.assertTrue(folder.exists());
+		CProjectHelper.addCContainer(cProject, "src");
+		if (useIndexer) {
+			IIndexManager indexManager= CCorePlugin.getIndexManager();
+			indexManager.joinIndexer(5000, new NullProgressMonitor());
+		}
+		return cProject;
+	}
+
+	public static IProject createNonCProject(final String projectName, String externalSourceFolder, boolean linkSourceFolder) throws CoreException {
+		final IWorkspace ws = ResourcesPlugin.getWorkspace();
+		final IProject newProject[] = new IProject[1];
+		ws.run(new IWorkspaceRunnable() {
+			public void run(IProgressMonitor monitor) throws CoreException {
+				IWorkspaceRoot root = ws.getRoot();
+				IProject project = root.getProject(projectName);
+				if (!project.exists()) {
+					project.create(null);
+				} else {
+					project.refreshLocal(IResource.DEPTH_INFINITE, null);
+				}
+				if (!project.isOpen()) {
+					project.open(null);
+				}
+				newProject[0] = project;
+			}
+		}, null);
+
+		final IProject project= newProject[0];
+		Assert.assertNotNull(project);
+		final IFolder folder;
+		if (linkSourceFolder)
+			folder= ResourceHelper.createLinkedFolder(project, new Path("src"), CTestPlugin.getDefault(), new Path(externalSourceFolder));
+		else {
+			folder= project.getFolder("src");
+			importFilesFromDirectory(FileTool.getFileInPlugin(CTestPlugin.getDefault(), new Path(externalSourceFolder)), folder.getFullPath(), null);
+		}
+		Assert.assertNotNull(folder);
+		Assert.assertTrue(folder.exists());
+
+		return project;
+	}
+	
+    public static IFile createFile(IContainer container, String fileName, String contents, IProgressMonitor monitor) throws CoreException {
+        //Obtain file handle
+        IFile file = container.getFile(new Path(fileName));
+        InputStream stream = new ByteArrayInputStream(contents.getBytes()); 
+        //Create file input stream
+        if(file.exists())
+            file.setContents(stream, false, false, monitor);
+        else
+            file.create(stream, false, monitor);
+        return file;
+    }
+    
+	public static IFile[] findFiles(IResource resource) throws CoreException {
+		List files= new ArrayList();
+		findFiles(resource, files);
+		return (IFile[]) files.toArray(new IFile[files.size()]);
+	}
+	
+	private static void findFiles(IResource resource, List files) throws CoreException {
+		if (resource instanceof IFile) {
+			files.add(resource);
+			return;
+		}
+		if (resource instanceof IContainer) {
+			IResource[] resources= ((IContainer) resource).members();
+			for (int i= 0; i < resources.length; i++)
+				findFiles(resources[i], files);
+		}
+	}
+	
+	public static boolean setDialogEnabled(String id, boolean enabled) {
+//		boolean wasEnabled= OptionalMessageDialog.isDialogEnabled(id);
+//		if (wasEnabled != enabled)
+//			OptionalMessageDialog.setDialogEnabled(id, enabled);
+//		return wasEnabled;
+		return false;
+	}
+	
+	public static void importFilesFromDirectory(File rootDir, IPath destPath, IProgressMonitor monitor) throws CoreException {		
+		try {
+			IImportStructureProvider structureProvider= FileSystemStructureProvider.INSTANCE;
+			List files= new ArrayList(100);
+			addFiles(rootDir, files);
+			ImportOperation op= new ImportOperation(destPath, rootDir, structureProvider, new ImportOverwriteQuery(), files);
+			op.setCreateContainerStructure(false);
+			op.run(monitor);
+		} catch (Exception x) {
+			throw newCoreException(x);
+		}
+	}	
+	
+	private static CoreException newCoreException(Throwable x) {
+		return new CoreException(new Status(IStatus.ERROR, CTestPlugin.PLUGIN_ID, -1, "", x));
+	}
+
+	private static void addFiles(File dir, List collection) throws IOException {
+		File[] files= dir.listFiles();
+		List subDirs= new ArrayList(2);
+		for (int i= 0; i < files.length; i++) {
+			if (files[i].isFile()) {
+				collection.add(files[i]);
+			} else if (files[i].isDirectory()) {
+				subDirs.add(files[i]);
+			}
+		}
+		Iterator iter= subDirs.iterator();
+		while (iter.hasNext()) {
+			File subDir= (File)iter.next();
+			addFiles(subDir, collection);
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FileTool.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FileTool.java
new file mode 100644
index 0000000..3c491e7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FileTool.java
@@ -0,0 +1,252 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.text;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.Writer;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+
+import org.eclipse.core.filebuffers.FileBuffers;
+
+/**
+ * Copied from org.eclipse.core.filebuffers.tests.
+ *
+ * @since 4.0
+ */
+public class FileTool {
+	
+	private final static int MAX_RETRY= 5;
+	
+	/**
+	 * A buffer.
+	 */
+	private static byte[] buffer = new byte[8192];
+	
+	/**
+	 * Unzips the given zip file to the given destination directory
+	 * extracting only those entries the pass through the given
+	 * filter.
+	 * 
+	 * @param zipFile the zip file to unzip
+	 * @param dstDir the destination directory
+	 * @throws IOException in case of problem
+	 */
+	public static void unzip(ZipFile zipFile, File dstDir) throws IOException {
+		unzip(zipFile, dstDir, dstDir, 0);
+	}
+	
+	private static void unzip(ZipFile zipFile, File rootDstDir, File dstDir, int depth) throws IOException {
+	
+		Enumeration entries = zipFile.entries();
+	
+		try {
+			while(entries.hasMoreElements()){
+				ZipEntry entry = (ZipEntry)entries.nextElement();
+				if(entry.isDirectory()){
+					continue;
+				}
+				String entryName = entry.getName();
+				File file = new File(dstDir, changeSeparator(entryName, '/', File.separatorChar));
+				file.getParentFile().mkdirs();
+				InputStream src = null;
+				OutputStream dst = null;
+				try {
+					src = zipFile.getInputStream(entry);
+					dst = new FileOutputStream(file);
+					transferData(src, dst);
+				} finally {
+					if(dst != null){
+						try {
+							dst.close();
+						} catch(IOException e){
+						}
+					}
+					if(src != null){
+						try {
+							src.close();
+						} catch(IOException e){
+						}
+					}
+				}
+			}
+		} finally {
+			try {
+				zipFile.close();
+			} catch(IOException e){
+			}
+		}
+	}
+	
+	/**
+	 * Returns the given file path with its separator
+	 * character changed from the given old separator to the
+	 * given new separator.
+	 * 
+	 * @param path a file path
+	 * @param oldSeparator a path separator character
+	 * @param newSeparator a path separator character
+	 * @return the file path with its separator character
+	 * changed from the given old separator to the given new
+	 * separator
+	 */
+	public static String changeSeparator(String path, char oldSeparator, char newSeparator){
+		return path.replace(oldSeparator, newSeparator);
+	}
+	
+	/**
+	 * Copies all bytes in the given source file to
+	 * the given destination file.
+	 * 
+	 * @param source the given source file
+	 * @param destination the given destination file
+	 * @throws IOException in case of error
+	 */
+	public static void transferData(File source, File destination) throws IOException {
+		destination.getParentFile().mkdirs();
+		InputStream is = null;
+		OutputStream os = null;
+		try {
+			is = new FileInputStream(source);
+			os = new FileOutputStream(destination);
+			transferData(is, os);
+		} finally {
+			if(os != null)
+				os.close();
+			if(is != null)
+				is.close();
+		}
+	}
+	
+	/**
+	 * Copies all bytes in the given source stream to
+	 * the given destination stream. Neither streams
+	 * are closed.
+	 * 
+	 * @param source the given source stream
+	 * @param destination the given destination stream
+	 * @throws IOException in case of error
+	 */
+	public static void transferData(InputStream source, OutputStream destination) throws IOException {
+		int bytesRead = 0;
+		while(bytesRead != -1){
+			bytesRead = source.read(buffer, 0, buffer.length);
+			if(bytesRead != -1){
+				destination.write(buffer, 0, bytesRead);
+			}
+		}
+	}
+
+	/**
+	 * Copies the given source file to the given destination file.
+	 * 
+	 * @param src the given source file
+	 * @param dst the given destination file
+	 * @throws IOException in case of error
+	 */
+	public static void copy(File src, File dst) throws IOException {
+		if(src.isDirectory()){
+			String[] srcChildren = src.list();
+			for(int i = 0; i < srcChildren.length; ++i){
+				File srcChild= new File(src, srcChildren[i]);
+				File dstChild= new File(dst, srcChildren[i]);
+				copy(srcChild, dstChild);
+			}
+		} else
+			transferData(src, dst);
+	}
+
+	public static File getFileInPlugin(Plugin plugin, IPath path) {
+		try {
+			URL installURL= plugin.getBundle().getEntry(path.toString());
+			URL localURL= Platform.asLocalURL(installURL);
+			return new File(localURL.getFile());
+		} catch (IOException e) {
+			return null;
+		}
+	}
+	
+	public static File createTempFileInPlugin(Plugin plugin, IPath path) {
+		IPath stateLocation= plugin.getStateLocation();
+		stateLocation= stateLocation.append(path);
+		return stateLocation.toFile();
+	}
+	
+	public static StringBuffer read(String fileName) throws IOException {
+		return read(new FileReader(fileName));
+	}
+
+	public static StringBuffer read(Reader reader) throws IOException {
+		StringBuffer s= new StringBuffer();
+		try {
+			char[] charBuffer= new char[8196];
+			int chars= reader.read(charBuffer);
+			while (chars != -1) {
+				s.append(charBuffer, 0, chars);
+				chars= reader.read(charBuffer);
+			}
+		} finally {
+			try {
+				reader.close();
+			} catch (IOException e) {
+			}
+		}
+		return s;
+	}
+
+	public static void write(String fileName, StringBuffer content) throws IOException {
+		Writer writer= new FileWriter(fileName);
+		try {
+			writer.write(content.toString());
+		} finally {
+			try {
+				writer.close();
+			} catch (IOException e) {
+			}
+		}
+	}
+	
+	public static void delete(IPath path) throws CoreException {
+		File file= FileBuffers.getSystemFileAtLocation(path);
+		delete(file);
+	}
+	
+	public static void delete(File file) throws CoreException {
+		if (file.exists()) {
+			for (int i= 0; i < MAX_RETRY; i++) {
+				if (file.delete())
+					i= MAX_RETRY;
+				else {
+					try {
+						Thread.sleep(1000); // sleep a second
+					} catch (InterruptedException e) {
+					} 
+				}
+			}
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTest.java
new file mode 100644
index 0000000..876e3a5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTest.java
@@ -0,0 +1,309 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *     Elazar Leibovich (The Open University) - extra folding test
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.jface.text.source.projection.IProjectionPosition;
+import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
+
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.PreferenceConstants;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+/**
+ * Code folding tests.
+ */
+public class FoldingTest extends TestCase {
+
+	private static class ProjectionPosition extends Position implements IProjectionPosition, IRegion {
+		private int fCaptionOffset;
+		ProjectionPosition(int offset, int length, int captionOffset) {
+			super(offset, length);
+			fCaptionOffset= captionOffset;
+		}
+		public int computeCaptionOffset(IDocument document) throws BadLocationException {
+			return fCaptionOffset;
+		}
+		public IRegion[] computeProjectionRegions(IDocument document) throws BadLocationException {
+			return new IRegion[] { this };
+		}
+	}
+
+	private static final String LINKED_FOLDER= "resources/folding";
+	private static final String PROJECT= "FoldingTest";
+
+	private ICProject fCProject;
+	private final String fTestFilename= "/FoldingTest/src/FoldingTest.cpp";
+	
+	private static CEditor fEditor;
+	
+	private static SourceViewer fSourceViewer;
+
+	public static Test suite() {
+		return new TestSuite(FoldingTest.class);
+	}
+	
+	public FoldingTest(String name) {
+		super(name);
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		fCProject= EditorTestHelper.createCProject(PROJECT, LINKED_FOLDER);
+
+		IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
+		store.setValue(PreferenceConstants.EDITOR_FOLDING_ENABLED, true);
+		store.setValue(PreferenceConstants.EDITOR_FOLDING_STATEMENTS, true);
+		store.setValue(PreferenceConstants.EDITOR_FOLDING_PREPROCESSOR_BRANCHES_ENABLED, true);
+		store.setValue(PreferenceConstants.EDITOR_FOLDING_INACTIVE_CODE, false);
+		store.setValue(PreferenceConstants.EDITOR_FOLDING_HEADERS, false);
+
+		fEditor= (CEditor) EditorTestHelper.openInEditor(ResourceTestHelper.findFile(fTestFilename), true);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 300));
+	}
+
+	@Override
+	protected void tearDown () throws Exception {
+		EditorTestHelper.closeEditor(fEditor);
+		
+		if (fCProject != null)
+			CProjectHelper.delete(fCProject);
+		
+		IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
+		store.setToDefault(PreferenceConstants.EDITOR_FOLDING_ENABLED);
+		store.setToDefault(PreferenceConstants.EDITOR_FOLDING_STATEMENTS);
+		store.setToDefault(PreferenceConstants.EDITOR_FOLDING_PREPROCESSOR_BRANCHES_ENABLED);
+		store.setToDefault(PreferenceConstants.EDITOR_FOLDING_INACTIVE_CODE);
+		store.setToDefault(PreferenceConstants.EDITOR_FOLDING_HEADERS);
+
+		super.tearDown();
+	}
+	
+	protected void assertEqualPositions(Position[] expected, Position[] actual) throws BadLocationException {
+		assertEquals(expected.length, actual.length);
+		IDocument document= fSourceViewer.getDocument();
+		for (int i= 0, n= expected.length; i < n; i++) {
+			final Position exp = expected[i];
+			int expectedStartLine= document.getLineOfOffset(exp.getOffset());
+			int expectedEndLine= document.getLineOfOffset(exp.getOffset()+exp.getLength());
+			final Position act = actual[i];
+			int actualStartLine= document.getLineOfOffset(act.getOffset());
+			int actualEndLine= document.getLineOfOffset(act.getOffset()+exp.getLength());
+			assertEquals(exp.isDeleted(), act.isDeleted());
+			assertEquals(expectedStartLine, actualStartLine);
+			assertEquals(expectedEndLine, actualEndLine);
+			if (exp instanceof IProjectionPosition) {
+				int expectedCaptionOffset= ((IProjectionPosition)exp).computeCaptionOffset(document);
+				int expectedCaptionLine= document.getLineOfOffset(exp.getOffset() + expectedCaptionOffset);
+				int actualCaptionLine= actualStartLine;
+				if (act instanceof IProjectionPosition) {
+					int actualCaptionOffset= ((IProjectionPosition)act).computeCaptionOffset(document);
+					actualCaptionLine= document.getLineOfOffset(exp.getOffset() + actualCaptionOffset);
+				}
+				assertEquals(expectedCaptionLine, actualCaptionLine);
+			}
+		}
+	}
+
+	protected Position createPosition(int startLine, int endLine) throws BadLocationException {
+		IDocument document= fSourceViewer.getDocument();
+		int startOffset= document.getLineOffset(startLine);
+		int endOffset= document.getLineOffset(endLine) + document.getLineLength(endLine);
+		return new Position(startOffset, endOffset - startOffset);
+	}
+
+	protected Position createPosition(int startLine, int endLine, int captionLine) throws BadLocationException {
+		IDocument document= fSourceViewer.getDocument();
+		int startOffset= document.getLineOffset(startLine);
+		int endOffset= document.getLineOffset(endLine) + document.getLineLength(endLine);
+		int captionOffset= document.getLineOffset(captionLine);
+		return new ProjectionPosition(startOffset, endOffset - startOffset, captionOffset - startOffset);
+	}
+
+	String toString(Position[] positions) throws BadLocationException {
+		StringBuffer buf= new StringBuffer();
+		IDocument document= fSourceViewer.getDocument();
+		buf.append("Position[] expected= new Position[] {\n");
+		for (int i= 0, n= positions.length; i < n; i++) {
+			Position position= positions[i];
+			int startLine= document.getLineOfOffset(position.getOffset());
+			int endLine= document.getLineOfOffset(position.getOffset()+position.getLength()-1);
+			int captionLine= startLine;
+			if (position instanceof IProjectionPosition) {
+				final int captionOffset = ((IProjectionPosition)position).computeCaptionOffset(document);
+				captionLine= document.getLineOfOffset(position.getOffset() + captionOffset);
+			}
+			buf.append("\tcreatePosition(");
+			buf.append(startLine);
+			buf.append(", ");
+			buf.append(endLine);
+			if (captionLine != startLine) {
+				buf.append(", ");
+				buf.append(captionLine);
+			}
+			buf.append("),\n");
+		}
+		buf.append("};\n");
+		return buf.toString();
+	}
+
+	protected Position[] getFoldingPositions() {
+		List<Position> positions= new ArrayList<Position>();
+		ProjectionAnnotationModel model= (ProjectionAnnotationModel)fEditor.getAdapter(ProjectionAnnotationModel.class);
+		assertNotNull(model);
+		for (Iterator<Annotation> iter= model.getAnnotationIterator(); iter.hasNext(); ) {
+			Annotation ann= iter.next();
+			Position pos= model.getPosition(ann);
+			positions.add(pos);
+		}
+		Collections.sort(positions, new Comparator<Position>() {
+			public int compare(Position p0, Position p1) {
+				return p0.offset - p1.offset;
+			}});
+		return positions.toArray(new Position[positions.size()]);
+	}
+
+	public void testInitialFolding() throws BadLocationException {
+		Position[] actual= getFoldingPositions();
+		Position[] expected= new Position[] {
+				createPosition(0, 2, 1),
+				createPosition(4, 7),
+				createPosition(9, 12),
+				createPosition(10, 12),
+				createPosition(13, 14),
+				createPosition(15, 27),
+				createPosition(16, 26),
+				createPosition(17, 20),
+				createPosition(18, 20),
+				createPosition(21, 25),
+				createPosition(22, 24),
+				createPosition(29, 31, 30),
+				createPosition(34, 35),
+				createPosition(35, 40),
+				createPosition(36, 38),
+				createPosition(42, 46),
+				createPosition(48, 55),
+				createPosition(51, 53),
+				createPosition(57, 59),
+				createPosition(61, 63),
+				createPosition(65, 67),
+				createPosition(70, 104, 71),
+				createPosition(75, 76),
+				createPosition(77, 79),
+				createPosition(80, 82),
+				createPosition(83, 85),
+				createPosition(86, 94),
+				createPosition(87, 89),
+				createPosition(90, 91),
+				createPosition(92, 93),
+				createPosition(95, 97),
+				createPosition(99, 102),
+				createPosition(106, 110),
+				createPosition(113, 117, 115),
+				createPosition(119, 127),
+				createPosition(120, 122),
+				createPosition(123, 126),
+				createPosition(129, 130),
+		};
+		assertEquals(toString(expected), toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	public void testToggleFolding_Bug186729() throws BadLocationException {
+		fEditor.getAction("FoldingToggle").run();
+		IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
+		store.setValue(PreferenceConstants.EDITOR_FOLDING_PREPROCESSOR_BRANCHES_ENABLED, false);
+		fEditor.getAction("FoldingToggle").run();
+		
+		Position[] actual= getFoldingPositions();
+		Position[] expected= new Position[] {
+				createPosition(0, 2, 1),
+				createPosition(4, 7),
+				createPosition(29, 31, 30),
+				createPosition(35, 40),
+				createPosition(42, 46),
+				createPosition(48, 55),
+				createPosition(51, 53),
+				createPosition(57, 59),
+				createPosition(61, 63),
+				createPosition(65, 67),
+				createPosition(70, 104, 71),
+				createPosition(75, 76),
+				createPosition(77, 79),
+				createPosition(80, 82),
+				createPosition(83, 85),
+				createPosition(86, 94),
+				createPosition(87, 89),
+				createPosition(90, 91),
+				createPosition(92, 93),
+				createPosition(95, 97),
+				createPosition(99, 102),
+				createPosition(106, 110),
+				createPosition(113, 117, 115),
+				createPosition(119, 127),
+				createPosition(120, 122),
+				createPosition(123, 126),
+		};
+		assertEquals(toString(expected), toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+
+	public void testToggleFoldingNoASTRequired() throws BadLocationException {
+		fEditor.getAction("FoldingToggle").run();
+		IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
+		store.setValue(PreferenceConstants.EDITOR_FOLDING_STATEMENTS, false);
+		store.setValue(PreferenceConstants.EDITOR_FOLDING_PREPROCESSOR_BRANCHES_ENABLED, false);
+		fEditor.getAction("FoldingToggle").run();
+		
+		Position[] actual= getFoldingPositions();
+		Position[] expected= new Position[] {
+				createPosition(0, 2, 1),
+				createPosition(4, 7),
+				createPosition(29, 31, 30),
+				createPosition(35, 40),
+				createPosition(42, 46),
+				createPosition(48, 55),
+				createPosition(51, 53),
+				createPosition(57, 59),
+				createPosition(61, 63),
+				createPosition(65, 67),
+				createPosition(70, 104, 71),
+				createPosition(106, 110),
+				createPosition(113, 117, 115),
+				createPosition(119, 127),
+			};
+		assertEquals(toString(expected), toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FormatActionTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FormatActionTest.java
new file mode 100644
index 0000000..6c4b45e
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FormatActionTest.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.ListResourceBundle;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.SourceViewer;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+/**
+ * Test the Formatter.
+ */
+public class FormatActionTest extends TestCase {
+	private static final String PROJECT= "FormatTests";
+
+	private static final class EmptyBundle extends ListResourceBundle {
+		protected Object[][] getContents() {
+			return new Object[0][];
+		}
+	}
+
+	protected static class FormatTestSetup extends TestSetup {
+
+		private ICProject fCProject;
+		
+		public FormatTestSetup(Test test) {
+			super(test);
+		}
+		
+		protected void setUp() throws Exception {
+			super.setUp();
+			
+			fCProject= EditorTestHelper.createCProject(PROJECT, "resources/formatter");
+			fCProject.setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.TAB);
+		}
+
+		protected void tearDown () throws Exception {
+			if (fCProject != null)
+				CProjectHelper.delete(fCProject);
+			
+			super.tearDown();
+		}
+	}
+	
+	private static final Class THIS= FormatActionTest.class;
+	public static Test suite() {
+		return new FormatTestSetup(new TestSuite(THIS));
+	}
+
+	private CEditor fEditor;
+	private SourceViewer fSourceViewer;
+	private IDocument fDocument;
+
+	/*
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		String filename= createFileName("Before");
+		fEditor= (CEditor) EditorTestHelper.openInEditor(ResourceTestHelper.findFile(filename), true);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		fDocument= fSourceViewer.getDocument();
+	}
+	
+	/*
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		EditorTestHelper.closeEditor(fEditor);
+	}
+	
+	private void assertFormatResult() throws Exception {
+		String afterFile= createFileName("After");
+		String expected= ResourceTestHelper.read(afterFile).toString();
+
+		IAction formatAction= fEditor.getAction("Format");
+		assertNotNull("No format action", formatAction);
+		formatAction.run();
+		
+		assertEquals(expected, fDocument.get());
+	}
+
+	private String createFileName(String qualifier) {
+		String name= getName();
+		name= name.substring(4, 5).toLowerCase() + name.substring(5);
+		return "/" + PROJECT + "/src/" + name + "/" + qualifier + ".cpp";
+	}
+	
+	private void selectAll() {
+		fSourceViewer.setSelectedRange(0, fDocument.getLength());
+	}
+	
+	public void testTemplates() throws Exception {
+		selectAll();
+		assertFormatResult();
+	}
+	
+	public void testPreview() throws Exception {
+		selectAll();
+		assertFormatResult();
+	}
+	
+	public void testSample() throws Exception {
+		selectAll();
+		assertFormatResult();
+	}
+
+	public void testComplex() throws Exception {
+		selectAll();
+		assertFormatResult();
+	}
+
+	public void testBugs() throws Exception {
+		selectAll();
+		assertFormatResult();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/HyperlinkTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/HyperlinkTest.java
new file mode 100644
index 0000000..44726d8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/HyperlinkTest.java
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICContainer;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.internal.ui.editor.CElementHyperlinkDetector;
+
+/**
+ * This test just checks that hyperlinks are created in the right
+ * places. It does not test that the hyperlinks actually take you 
+ * to the right place.
+ * 
+ * @author Mike Kucera
+ */
+public class HyperlinkTest extends TestCase {
+
+	private static final String CPP_FILE_NAME = "hyperlink_test_cpp.cpp";
+	private static final String CPP_CODE = 
+		"#include <stdio.h> \n" +
+		"#define SOMEMACRO macro_token1 macro_token2 \n" +
+		"// COMMENT there should not be links inside of comments \n" +
+		"class Point { \n" +
+		"  public: \n" +
+		"    Point(); \n" +
+		"    ~Point(); \n" +
+		"    void set(int x, int y); \n" +
+		"    int getX(); \n" +
+		"    int getY(); \n" +
+		"    Point operator+(Point); \n" +
+		"  private: \n" +
+		"    int x, y; \n" +
+		"}; \n" +
+		"int test(Point p) {  \n" +
+		"    char* str = \"STRING LITERAL\"; \n" +
+		"    p + p;" +
+		"} \n";
+	
+	private static final String C_FILE_NAME_1 = "hyperlink_test_c_1.c";
+	private static final String C_CODE_1 = 
+		"int main() { \n" +
+		"    int class = 99; \n" +
+		"}";
+	
+	private static final String C_FILE_NAME_2 = "hyperlink_test_c_2.c";
+	private static final String C_CODE_2 = 
+		"#ifdef NOTDEF\n" +
+		"    int nothere = 99; \n" +
+		"#else\n" +
+		"    int itworks = 100; \n" +
+		"#endif\n";
+
+	private ICProject project;
+	private CEditor editor;
+
+	
+	public static TestSuite suite() {
+		return new TestSuite(HyperlinkTest.class);
+	}
+	
+	private void setUpEditor(String fileName, String code) throws Exception {
+		super.setUp();
+		project= CProjectHelper.createCCProject(super.getName(), "unused", IPDOMManager.ID_NO_INDEXER);
+		ICContainer cContainer= CProjectHelper.addCContainer(project, "src");
+		IFile file= EditorTestHelper.createFile((IContainer)cContainer.getResource(), fileName, code, new NullProgressMonitor());
+		
+		assertNotNull(file);
+		assertTrue(file.exists());
+		editor = (CEditor)EditorTestHelper.openInEditor(file, true);
+		EditorTestHelper.joinReconciler(EditorTestHelper.getSourceViewer(editor), 10, 1000, 10);
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		EditorTestHelper.closeEditor(editor);
+		CProjectHelper.delete(project);
+	}
+	
+	private IHyperlink[] getHyperlinks(int mouseOffset) {
+		CElementHyperlinkDetector detector = new CElementHyperlinkDetector();
+		detector.setContext(editor);
+		IRegion region = new Region(mouseOffset, 0);
+		return detector.detectHyperlinks(EditorTestHelper.getSourceViewer(editor), region, false);
+	}
+	
+	private void assertHyperlink(int mouseOffset, int linkStartOffset, int linkLength) {
+		IHyperlink[] links = getHyperlinks(mouseOffset);
+		assertNotNull(links);
+		assertEquals(1, links.length);
+		IRegion hyperlinkRegion = links[0].getHyperlinkRegion();
+		assertEquals(linkStartOffset, hyperlinkRegion.getOffset());
+		assertEquals(linkLength, hyperlinkRegion.getLength());
+	}
+	
+	private void assertNotHyperlink(int mouseOffset) {
+		IHyperlink[] links = getHyperlinks(mouseOffset);
+		assertNull(links);
+	}
+	
+	
+	public void testHyperlinksCpp() throws Exception {
+		// entire include highlighted
+		setUpEditor(CPP_FILE_NAME, CPP_CODE);
+		
+		assertHyperlink(CPP_CODE.indexOf("#include") + 2, 0, "#include <stdio.h>".length()); 
+		assertHyperlink(CPP_CODE.indexOf("<stdio.h>") + 2, 0, "#include <stdio.h>".length());
+		assertHyperlink(CPP_CODE.indexOf("<stdio.h>") + "<stdio.h".length(), 0, "#include <stdio.h>".length());
+		
+		// hovering over the whitspace inside an include still results in a hyperlink
+		assertHyperlink(CPP_CODE.indexOf("<stdio.h>") - 1, 0, "#include <stdio.h>".length());
+		
+		// no hyperlinks in macro bodies
+		assertNotHyperlink(CPP_CODE.indexOf("#define") + 1);
+		assertHyperlink(CPP_CODE.indexOf("SOMEMACRO"), CPP_CODE.indexOf("SOMEMACRO"), "SOMEMACRO".length());
+		// see bug 259015
+//		assertNotHyperlink(CPP_CODE.indexOf("macro_token1") + 1);
+//		assertNotHyperlink(CPP_CODE.indexOf("macro_token2") + 1);
+		
+		// no hyperlinks for comments
+		assertNotHyperlink(CPP_CODE.indexOf("//") + 1);
+		assertNotHyperlink(CPP_CODE.indexOf("COMMENT") + 1);
+		
+		// no hyperlinks for keywords
+		assertNotHyperlink(CPP_CODE.indexOf("class") + 1); 
+		assertNotHyperlink(CPP_CODE.indexOf("public") + 1); 
+		assertNotHyperlink(CPP_CODE.indexOf("private") + 1); 
+		assertNotHyperlink(CPP_CODE.indexOf("int x") + 1); 
+		assertNotHyperlink(CPP_CODE.indexOf("char") + 1); 
+		assertNotHyperlink(CPP_CODE.indexOf("void") + 1);
+		
+		// no hyperlinks for punctuation
+		assertNotHyperlink(CPP_CODE.indexOf("{"));
+		assertNotHyperlink(CPP_CODE.indexOf("}"));
+		assertNotHyperlink(CPP_CODE.indexOf("(" + 1));
+		assertNotHyperlink(CPP_CODE.indexOf(")"));
+		assertNotHyperlink(CPP_CODE.indexOf(":"));
+		assertNotHyperlink(CPP_CODE.indexOf(";"));
+		
+		// no hyperlinks inside strings
+		assertNotHyperlink(CPP_CODE.indexOf("STRING") + 1);
+		assertNotHyperlink(CPP_CODE.indexOf("STRING") + 6);
+		assertNotHyperlink(CPP_CODE.indexOf("LITERAL") + 1);
+		
+		assertHyperlink(CPP_CODE.indexOf("Point {") + 1, CPP_CODE.indexOf("Point {"), "Point".length());
+		assertHyperlink(CPP_CODE.indexOf("Point()") + 1, CPP_CODE.indexOf("Point()"), "Point".length());
+		assertHyperlink(CPP_CODE.indexOf("~Point()") + 1, CPP_CODE.indexOf("~Point()"), "~Point".length());
+		assertHyperlink(CPP_CODE.indexOf("set(") + 1, CPP_CODE.indexOf("set("), "set".length());
+		assertHyperlink(CPP_CODE.indexOf("getX()") + 1, CPP_CODE.indexOf("getX()"), "getX".length());
+		assertHyperlink(CPP_CODE.indexOf("getY()") + 1, CPP_CODE.indexOf("getY()"), "getY".length());
+		
+		// hyperlinks for overloaded operators
+		assertHyperlink(CPP_CODE.indexOf("+ p"), CPP_CODE.indexOf("+ p"), 1);
+	}
+
+	public void testHyperlinksCKeywords() throws Exception {
+		setUpEditor(C_FILE_NAME_1, C_CODE_1);
+		
+		// 'class' is not a keyword in C, it should be hyperlinked
+		assertHyperlink(C_CODE_1.indexOf("class") + 1, C_CODE_1.indexOf("class"), "class".length());
+		
+		// no hyperlinks for numeric literals
+		assertNotHyperlink(C_CODE_1.indexOf("99") + 1);
+	}
+
+	public void testHyperlinksInactiveCode() throws Exception {
+		setUpEditor(C_FILE_NAME_2, C_CODE_2);
+		
+		assertNotHyperlink(C_CODE_2.indexOf("#ifdef") + 2);
+		assertNotHyperlink(C_CODE_2.indexOf("#else") + 2);
+		assertNotHyperlink(C_CODE_2.indexOf("#endif") + 2);
+		
+		// see bug 259015
+//		assertNotHyperlink(C_CODE_2.indexOf("nothere") + 1);
+		assertHyperlink(C_CODE_2.indexOf("itworks") + 1, C_CODE_2.indexOf("itworks"), "itworks".length());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/InactiveCodeHighlightingTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/InactiveCodeHighlightingTest.java
new file mode 100644
index 0000000..f5d646d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/InactiveCodeHighlightingTest.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.ui.texteditor.AbstractDecoratedTextEditor;
+
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.internal.ui.editor.CSourceViewerDecorationSupport;
+import org.eclipse.cdt.internal.ui.editor.InactiveCodeHighlighting;
+
+/**
+ * Tests for inactive code highlighting.
+ *
+ * @since 4.0
+ */
+public class InactiveCodeHighlightingTest extends TestCase {
+
+	private static final String LINKED_FOLDER= "resources/inactiveCode";
+	private static final String PROJECT= "InactiveCodeTest";
+
+	private ICProject fCProject;
+	private final String fTestFilename= "/InactiveCodeTest/src/InactiveCodeTest.c";
+	
+	private static CEditor fEditor;
+	
+	private static SourceViewer fSourceViewer;
+
+	public static Test suite() {
+		return new TestSuite(InactiveCodeHighlightingTest.class);
+	}
+
+	public InactiveCodeHighlightingTest(String name) {
+		super(name);
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		fCProject= EditorTestHelper.createCProject(PROJECT, LINKED_FOLDER);
+		
+		fEditor= (CEditor) EditorTestHelper.openInEditor(ResourceTestHelper.findFile(fTestFilename), true);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+	}
+
+	@Override
+	protected void tearDown () throws Exception {
+		EditorTestHelper.closeEditor(fEditor);
+		
+		if (fCProject != null)
+			CProjectHelper.delete(fCProject);
+		
+		super.tearDown();
+	}
+	
+	protected void assertEqualPositions(Position[] expected, Position[] actual) throws BadLocationException {
+		assertEquals(expected.length, actual.length);
+		IDocument document= fSourceViewer.getDocument();
+		for (int i= 0, n= expected.length; i < n; i++) {
+			int expectedStartLine= document.getLineOfOffset(expected[i].getOffset());
+			int expectedEndLine= document.getLineOfOffset(expected[i].getOffset()+expected[i].getLength());
+			int actualStartLine= document.getLineOfOffset(actual[i].getOffset());
+			int actualEndLine= document.getLineOfOffset(actual[i].getOffset()+expected[i].getLength());
+			assertEquals(expected[i].isDeleted(), actual[i].isDeleted());
+			assertEquals(expectedStartLine, actualStartLine);
+			assertEquals(expectedEndLine, actualEndLine);
+		}
+	}
+
+	protected Position createPosition(int startLine, int endLine) throws BadLocationException {
+		IDocument document= fSourceViewer.getDocument();
+		int startOffset= document.getLineOffset(startLine);
+		int endOffset= document.getLineOffset(endLine) + document.getLineLength(endLine);
+		return new Position(startOffset, endOffset - startOffset);
+	}
+
+	String toString(Position[] positions) throws BadLocationException {
+		StringBuilder buf= new StringBuilder();
+		IDocument document= fSourceViewer.getDocument();
+		buf.append("Position[] expected= new Position[] {\n");
+		for (int i= 0, n= positions.length; i < n; i++) {
+			Position position= positions[i];
+			int startLine= document.getLineOfOffset(position.getOffset());
+			int endLine= document.getLineOfOffset(position.getOffset()+position.getLength()-1);
+			buf.append("\tcreatePosition(" + startLine + ", " + endLine + "),\n");
+		}
+		buf.append("};\n");
+		return buf.toString();
+	}
+
+	protected Position[] getInactiveCodePositions() {
+		CSourceViewerDecorationSupport support= (CSourceViewerDecorationSupport) new Accessor(fEditor, AbstractDecoratedTextEditor.class).get("fSourceViewerDecorationSupport");
+		InactiveCodeHighlighting highlighting= (InactiveCodeHighlighting) new Accessor(support, support.getClass()).get("fInactiveCodeHighlighting");
+		List<Position> positions= (List<Position>) new Accessor(highlighting, highlighting.getClass()).get("fInactiveCodePositions");
+		return positions.toArray(new Position[positions.size()]);
+	}
+
+	public void testInactiveCodePositions() throws BadLocationException {
+		Position[] actual= getInactiveCodePositions();
+		Position[] expected= new Position[] {
+				createPosition(2, 4),
+				createPosition(11, 13),
+				createPosition(15, 22),
+				createPosition(28, 33),
+				createPosition(39, 41),
+				createPosition(47, 57),
+				createPosition(63, 65),
+				createPosition(67, 69),
+				createPosition(73, 75),
+			};
+		assertEquals(toString(expected), toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/IndentActionTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/IndentActionTest.java
new file mode 100644
index 0000000..15025ea
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/IndentActionTest.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.ListResourceBundle;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.SourceViewer;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+
+import org.eclipse.cdt.internal.ui.actions.IndentAction;
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+/**
+ * Test the IndentAction.
+ */
+public class IndentActionTest extends TestCase {
+	private static final String PROJECT= "IndentTests";
+
+	private static final class EmptyBundle extends ListResourceBundle {
+		protected Object[][] getContents() {
+			return new Object[0][];
+		}
+	}
+
+	protected static class IndentTestSetup extends TestSetup {
+
+		private ICProject fCProject;
+		
+		public IndentTestSetup(Test test) {
+			super(test);
+		}
+		
+		protected void setUp() throws Exception {
+			super.setUp();
+			
+			fCProject= EditorTestHelper.createCProject(PROJECT, "resources/indentation");
+			fCProject.setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.TAB);
+		}
+
+		protected void tearDown () throws Exception {
+			if (fCProject != null)
+				CProjectHelper.delete(fCProject);
+			
+			super.tearDown();
+		}
+	}
+	
+	public static Test suite() {
+		return new IndentTestSetup(new TestSuite(IndentActionTest.class));
+	}
+
+	private CEditor fEditor;
+	private SourceViewer fSourceViewer;
+	private IDocument fDocument;
+
+	/*
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		String filename= createFileName("Before");
+		fEditor= (CEditor) EditorTestHelper.openInEditor(ResourceTestHelper.findFile(filename), true);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		fDocument= fSourceViewer.getDocument();
+	}
+	
+	/*
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		EditorTestHelper.closeEditor(fEditor);
+	}
+	
+	private void assertIndentResult() throws Exception {
+		String afterFile= createFileName("After");
+		String expected= ResourceTestHelper.read(afterFile).toString();
+		
+		new IndentAction(new EmptyBundle(), "prefix", fEditor, false).run();
+		
+		assertEquals(expected, fDocument.get());
+	}
+
+	private String createFileName(String qualifier) {
+		String name= getName();
+		name= name.substring(4, 5).toLowerCase() + name.substring(5);
+		return "/" + PROJECT + "/src/" + name + "/" + qualifier + ".cpp";
+	}
+	
+	private void selectAll() {
+		fSourceViewer.setSelectedRange(0, fDocument.getLength());
+	}
+	
+	public void testUnchanged() throws Exception {
+		selectAll();
+		assertIndentResult();
+	}
+	
+	public void testSample() throws Exception {
+		selectAll();
+		assertIndentResult();
+	}
+
+	public void testComplex() throws Exception {
+		selectAll();
+		assertIndentResult();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/MarkOccurrenceTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/MarkOccurrenceTest.java
new file mode 100644
index 0000000..9df501d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/MarkOccurrenceTest.java
@@ -0,0 +1,560 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.Iterator;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.FindReplaceDocumentAdapter;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.internal.editors.text.EditorsPlugin;
+import org.eclipse.ui.texteditor.AnnotationPreference;
+
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.PreferenceConstants;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.internal.ui.viewsupport.ISelectionListenerWithAST;
+import org.eclipse.cdt.internal.ui.viewsupport.SelectionListenerWithASTManager;
+
+
+/**
+ * Tests the C/C++ Editor's occurrence marking feature.
+ * 
+ * @since 5.0
+ */
+public class MarkOccurrenceTest extends BaseUITestCase {
+	
+	private static final String PROJECT = "MarkOccurrenceTest";
+
+	private static final String OCCURRENCE_ANNOTATION= "org.eclipse.cdt.ui.occurrences";
+	private static final RGB fgHighlightRGB= getHighlightRGB();
+	
+	private CEditor fEditor;
+	private IDocument fDocument;
+	private FindReplaceDocumentAdapter fFindReplaceDocumentAdapter;
+	private int fOccurrences;
+	private IAnnotationModel fAnnotationModel;
+	private ISelectionListenerWithAST fSelWASTListener;
+	private IRegion fMatch;
+	private StyledText fTextWidget;
+
+	private MarkOccurrenceTestSetup fProjectSetup;
+
+	protected static class MarkOccurrenceTestSetup extends TestSetup {
+		private ICProject fCProject;
+		
+		public MarkOccurrenceTestSetup(Test test) {
+			super(test);
+		}
+		protected void setUp() throws Exception {
+			super.setUp();
+			fCProject= EditorTestHelper.createCProject(PROJECT, "resources/ceditor", false, true);
+		}
+		protected void tearDown() throws Exception {
+			if (fCProject != null)
+				CProjectHelper.delete(fCProject);
+			
+			super.tearDown();
+		}
+	}
+	
+	public static Test setUpTest(Test someTest) {
+		return new MarkOccurrenceTestSetup(someTest);
+	}
+	
+	public static Test suite() {
+		return setUpTest(new TestSuite(MarkOccurrenceTest.class));
+	}
+	
+	protected void setUp() throws Exception {
+		if (!ResourcesPlugin.getWorkspace().getRoot().exists(new Path(PROJECT))) {
+			fProjectSetup= new MarkOccurrenceTestSetup(this);
+			fProjectSetup.setUp();
+		}
+		assertNotNull(fgHighlightRGB);
+		CUIPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.EDITOR_MARK_OCCURRENCES, true);
+		fEditor= openCEditor(new Path("/" + PROJECT + "/src/occurrences.cpp"));
+		assertNotNull(fEditor);
+		fTextWidget= fEditor.getViewer().getTextWidget();
+		assertNotNull(fTextWidget);
+		EditorTestHelper.joinReconciler((SourceViewer)fEditor.getViewer(), 10, 200, 20);
+		fDocument= fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput());
+		assertNotNull(fDocument);
+		fFindReplaceDocumentAdapter= new FindReplaceDocumentAdapter(fDocument);
+		fAnnotationModel= fEditor.getDocumentProvider().getAnnotationModel(fEditor.getEditorInput());
+	
+		fMatch= null;
+		fSelWASTListener= new ISelectionListenerWithAST() {
+			public void selectionChanged(IEditorPart part, ITextSelection selection, IASTTranslationUnit astRoot) {
+				if (fMatch != null && selection != null && selection.getOffset() == fMatch.getOffset() && selection.getLength() == fMatch.getLength()) {
+					countOccurrences();
+				}
+			}
+	
+			private synchronized void countOccurrences() {
+				fOccurrences= 0;
+				Iterator<Annotation> iter= fAnnotationModel.getAnnotationIterator();
+				while (iter.hasNext()) {
+					Annotation annotation= iter.next();
+					if (OCCURRENCE_ANNOTATION.equals(annotation.getType()))
+						fOccurrences++;
+				}
+			}
+		};
+		SelectionListenerWithASTManager.getDefault().addListener(fEditor, fSelWASTListener);
+	}
+	
+	/*
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		SelectionListenerWithASTManager.getDefault().removeListener(fEditor, fSelWASTListener);
+		EditorTestHelper.closeAllEditors();
+		if (fProjectSetup != null) {
+			fProjectSetup.tearDown();
+		}
+	}
+	
+	private CEditor openCEditor(IPath path) {
+		IFile file= ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+		assertTrue(file != null && file.exists());
+		try {
+			return (CEditor) EditorTestHelper.openInEditor(file, true);
+		} catch (PartInitException e) {
+			fail();
+			return null;
+		}
+	}
+	
+	public void testMarkTypeOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "ClassContainer", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(3);
+		assertOccurrencesInWidget();
+	}
+
+	public void testMarkTypeOccurrences2() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "Base1", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(5);
+		assertOccurrencesInWidget();
+	}
+
+	public void testMarkTypeOccurrences3() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "Base2", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(3);
+		assertOccurrencesInWidget();
+	}
+
+	public void testMarkTypedefOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "size_t", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(4);
+		assertOccurrencesInWidget();
+	}
+
+	public void testMarkClassTemplateOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "TemplateClass", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(3);
+		assertOccurrencesInWidget();
+	}
+
+	public void testMarkTemplateParameterOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "T1", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(3);
+		assertOccurrencesInWidget();
+	}
+
+	public void testMarkTemplateIdOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "ConstantTemplate", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(4);
+		assertOccurrencesInWidget();
+	}
+
+	public void testMarkOccurrencesAfterEditorReuse() {
+		IPreferenceStore store= PlatformUI.getWorkbench().getPreferenceStore();
+		store.setValue("REUSE_OPEN_EDITORS_BOOLEAN", true);
+		
+		int reuseOpenEditors= store.getInt("REUSE_OPEN_EDITORS");
+		store.setValue("REUSE_OPEN_EDITORS", 1);
+		
+		SelectionListenerWithASTManager.getDefault().removeListener(fEditor, fSelWASTListener);
+		fEditor= openCEditor(new Path("/" + PROJECT + "/src/main.cpp"));
+		EditorTestHelper.joinReconciler((SourceViewer)fEditor.getViewer(), 10, 200, 20);
+		SelectionListenerWithASTManager.getDefault().addListener(fEditor, fSelWASTListener);
+		fDocument= fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput());
+		assertNotNull(fDocument);
+		fFindReplaceDocumentAdapter= new FindReplaceDocumentAdapter(fDocument);
+		fAnnotationModel= fEditor.getDocumentProvider().getAnnotationModel(fEditor.getEditorInput());
+		
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "main", true, true, false, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+		fMatch= new Region(fMatch.getOffset(), 4);
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(1);
+		assertOccurrencesInWidget();
+		
+		store.setValue("REUSE_OPEN_EDITORS_BOOLEAN", false);
+		store.setValue("REUSE_OPEN_EDITORS", reuseOpenEditors);
+	}
+	
+	public void testMarkMethodOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "pubMethod", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(2);
+		assertOccurrencesInWidget();
+	}
+	
+	public void testMarkMethodOccurrences2() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "getNumber", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(2);
+		assertOccurrencesInWidget();
+	}
+	
+	public void testMarkFieldOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "pubField", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(2);
+		assertOccurrencesInWidget();
+	}
+	
+	public void testMarkFieldOccurrences2() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "tArg1", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(2);
+		assertOccurrencesInWidget();
+	}
+	
+	public void testMarkConstructorOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "Base1(", true, true, false, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fMatch= new Region(fMatch.getOffset(), fMatch.getLength() - 1);
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(2);
+		assertOccurrencesInWidget();
+	}
+
+	public void testMarkDestructorOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "~Base1", true, true, false, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fMatch= new Region(fMatch.getOffset() + 1, fMatch.getLength() - 1);
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(2);
+		assertOccurrencesInWidget();
+	}
+	
+	public void testMarkLocalOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "localVar", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(2);
+		assertOccurrencesInWidget();
+	}
+	
+	public void testMarkMacroOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "INT", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(5);
+		assertOccurrencesInWidget();
+	}
+
+	public void testMarkEmptyMacroOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "EMPTY_MACRO", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(3);
+		assertOccurrencesInWidget();
+	}
+
+	public void testMarkEnumeratorOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "ONE", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(2);
+		assertOccurrencesInWidget();
+	}
+
+	public void testMarkNamespaceOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "ns", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(3);
+		assertOccurrencesInWidget();
+	}
+
+	public void testMarkNamespaceVariableOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "namespaceVar", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(4);
+		assertOccurrencesInWidget();
+	}
+
+	public void testMarkLabelOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "label", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(2);
+		assertOccurrencesInWidget();
+	}
+
+	public void testMarkOperatorOccurrences() {
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "operator+", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(2);
+		assertOccurrencesInWidget();
+	}
+	
+	
+	public void testNoOccurrencesIfDisabled() {
+		CUIPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.EDITOR_MARK_OCCURRENCES, false);
+		fOccurrences= Integer.MAX_VALUE;
+		try {
+			fMatch= fFindReplaceDocumentAdapter.find(0, "Base1", true, true, true, false);
+		} catch (BadLocationException e) {
+			fail();
+		}
+		assertNotNull(fMatch);
+
+		fEditor.selectAndReveal(fMatch.getOffset(), fMatch.getLength());
+		
+		assertOccurrences(0);
+		assertOccurrencesInWidget();
+	}
+	
+	private void assertOccurrencesInWidget() {
+		EditorTestHelper.runEventQueue(500);
+
+		Iterator<Annotation> iter= fAnnotationModel.getAnnotationIterator();
+		while (iter.hasNext()) {
+			Annotation annotation= iter.next();
+			if (OCCURRENCE_ANNOTATION.equals(annotation.getType()))
+				assertOccurrenceInWidget(fAnnotationModel.getPosition(annotation));
+		}
+	}
+
+	private void assertOccurrenceInWidget(Position position) {
+		StyleRange[] styleRanges= fTextWidget.getStyleRanges(position.offset, position.length);
+		for (int i= 0; i < styleRanges.length; i++) {
+			if (styleRanges[i].background != null) {
+				RGB rgb= styleRanges[i].background.getRGB();
+				if (fgHighlightRGB.equals(rgb))
+					return;
+			}
+		}
+		fail();
+	}
+	
+	/**
+	 * Returns the occurrence annotation color.
+	 * 
+	 * @return the occurrence annotation color
+	 */
+	private static RGB getHighlightRGB() {
+		AnnotationPreference annotationPref= EditorsPlugin.getDefault().getAnnotationPreferenceLookup().getAnnotationPreference(OCCURRENCE_ANNOTATION);
+		IPreferenceStore store= EditorsUI.getPreferenceStore();
+		if (store != null)
+			return PreferenceConverter.getColor(store, annotationPref.getColorPreferenceKey());
+		
+		return null;
+	}
+
+	private void assertOccurrences(final int expected) {
+		DisplayHelper helper= new DisplayHelper() {
+			protected boolean condition() {
+				return fOccurrences == expected;
+			}
+		};
+		if (!helper.waitForCondition(EditorTestHelper.getActiveDisplay(), 10000)) {
+			assertEquals(expected, fOccurrences);
+		}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/NumberRuleTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/NumberRuleTest.java
new file mode 100644
index 0000000..0fb106a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/NumberRuleTest.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.internal.ui.text.NumberRule;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.Token;
+
+/**
+ * Testing the NumberRule matching integers and floats.
+ */
+public class NumberRuleTest extends TestCase {
+
+	private static final Object NUMBER = "number";
+	private RuleBasedScanner fScanner;
+	private Document fDocument;
+
+	/**
+	 * @param name
+	 */
+	public NumberRuleTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return new TestSuite(NumberRuleTest.class);
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+		fScanner = new RuleBasedScanner() {};
+		fScanner.setRules(new IRule[] {
+				new NumberRule(new Token(NUMBER))
+		});
+		fDocument = new Document();
+	}
+
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	public void testIntegers() {
+		// decimal numbers
+		assertNumber("0");
+		assertNumber("-1");
+		assertNumber("+1");
+		assertNumber("123456789");
+		assertNumber("-123456789");
+		assertNumber("+123456789");
+
+		// hex numbers
+		assertNumber("0xaffe");
+		assertNumber("-0xaffe");
+		assertNumber("+0xaffe");
+		assertNumber("0Xaffe");
+		assertNumber("+0XaFFe");
+		assertNumber("0xabcdefABCDEF");
+		assertNumber("0x0123456789");
+	}
+	
+	public void testFloats() {
+		assertNumber("0.");
+		assertNumber(".0");
+		assertNumber("-.0");
+		assertNumber("+.0");
+		assertNumber("-0.");
+		assertNumber("+0.");
+		assertNumber("0.123456789");
+		assertNumber("-0.123456789");
+		assertNumber("+12345.6789");
+		assertNumber("1e5");
+		assertNumber("1E5");
+		assertNumber("1.e5");
+		assertNumber("-1e5");
+		assertNumber("-.1e5");
+		assertNumber("1e-5");
+		assertNumber("1e+55");
+	}
+
+	public void testNonNumbers() {
+		// test pathological cases
+		assertNoNumber("-");
+		assertNoNumber("+");
+		assertNoNumber(".");
+		assertNoNumber("-.");
+		assertNoNumber("+.");
+		assertNoNumber("x");
+		assertNoNumber(".x");
+		assertNoNumber("-x");
+		assertNoNumber("e");
+		assertNoNumber(".e");
+		assertNoNumber("-e");
+		assertNoNumber("+e");
+		
+		// false positives:
+//		assertNoNumber("0x");
+//		assertNoNumber("1e");
+//		assertNoNumber("1e+");
+	}
+
+	public void testBug163691() {
+		assertNoNumber("+x1");
+		assertNoNumber("-z0");
+		assertNoNumber("- 0");
+		assertNoNumber("+ 9");
+	}
+
+	/**
+	 * Validate that given string is recognized as a number.
+	 * @param string
+	 */
+	private void assertNumber(String string) {
+		fDocument.set(string);
+		fScanner.setRange(fDocument, 0, fDocument.getLength());
+		IToken token = fScanner.nextToken();
+		assertSame(NUMBER, token.getData());
+		assertEquals(string.length(), fScanner.getTokenLength());
+	}
+	
+	/**
+	 * Validate that given string is not recognized as a number.
+	 * @param string
+	 */
+	private void assertNoNumber(String string) {
+		fDocument.set(string);
+		fScanner.setRange(fDocument, 0, fDocument.getLength());
+		IToken token = fScanner.nextToken();
+		assertNotSame(NUMBER, token.getData());
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/PairMatcherTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/PairMatcherTest.java
new file mode 100644
index 0000000..b7bc243
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/PairMatcherTest.java
@@ -0,0 +1,237 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems) - Adapted for CDT
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.rules.FastPartitioner;
+
+import org.eclipse.cdt.ui.text.ICPartitions;
+
+import org.eclipse.cdt.internal.ui.text.CPairMatcher;
+import org.eclipse.cdt.internal.ui.text.FastCPartitionScanner;
+
+public class PairMatcherTest extends TestCase {
+	
+	private static boolean BEFORE_MATCHES_DISABLED= true;
+	
+	protected IDocument fDocument;
+	protected CPairMatcher fPairMatcher;
+	
+	
+	public PairMatcherTest(String name) {
+		super(name);
+	}
+	
+	protected void setUp() {
+		Document document= new Document("xx(yy(xx)yy)xx");
+		String[] types= new String[] {
+				ICPartitions.C_MULTI_LINE_COMMENT,
+				ICPartitions.C_SINGLE_LINE_COMMENT,
+				ICPartitions.C_STRING,
+				ICPartitions.C_CHARACTER,
+				IDocument.DEFAULT_CONTENT_TYPE
+		};
+		FastPartitioner partitioner= new FastPartitioner(new FastCPartitionScanner(), types);
+		partitioner.connect(document);
+		document.setDocumentPartitioner(ICPartitions.C_PARTITIONING, partitioner);
+
+		fDocument= document;
+		fPairMatcher= new CPairMatcher(new char[] { '(', ')', '<', '>' });
+	}
+	
+	public static Test suite() {
+		return new TestSuite(PairMatcherTest.class); 
+	}
+	
+	protected void tearDown () {
+		fDocument= null;
+		fPairMatcher= null;
+	}
+	
+	public void testBeforeOpeningMatch() {
+		IRegion match= fPairMatcher.match(fDocument, 2);
+		if (BEFORE_MATCHES_DISABLED) {
+			assertNull(match);
+		} else {
+			assertNotNull(match);
+			assertTrue(match.getOffset() == 2 && match.getLength() == 10);
+		}
+		
+		match= fPairMatcher.match(fDocument, 5);
+		if (BEFORE_MATCHES_DISABLED) {
+			assertNull(match);
+		} else {
+			assertNotNull(match);
+			assertTrue(match.getOffset() == 5 && match.getLength() == 4);		
+		}
+	}
+	
+	public void testAfterOpeningMatch() {
+		IRegion match= fPairMatcher.match(fDocument, 3);
+		assertNotNull(match);
+		assertTrue(match.getOffset() == 2 && match.getLength() == 10);
+		
+		match= fPairMatcher.match(fDocument, 6);
+		assertNotNull(match);
+		assertTrue(match.getOffset() == 5 && match.getLength() == 4);		
+	}
+	
+	public void testBeforeClosingMatch() {
+		IRegion match= fPairMatcher.match(fDocument, 11);
+		if (BEFORE_MATCHES_DISABLED) {
+			assertNull(match);
+		} else {
+			assertNotNull(match);
+			assertTrue(match.getOffset() == 2 && match.getLength() == 10);
+		}
+		
+		match= fPairMatcher.match(fDocument, 8);
+		if (BEFORE_MATCHES_DISABLED) {
+			assertNull(match);
+		} else {
+			assertNotNull(match);
+			assertTrue(match.getOffset() == 5 && match.getLength() == 4);		
+		}
+	}
+	
+	public void testAfterClosingMatch() {
+		IRegion match= fPairMatcher.match(fDocument, 12);
+		assertNotNull(match);
+		assertTrue(match.getOffset() == 2 && match.getLength() == 10);
+		
+		match= fPairMatcher.match(fDocument, 9);
+		assertNotNull(match);
+		assertTrue(match.getOffset() == 5 && match.getLength() == 4);		
+	}	
+	
+	public void testBeforeClosingMatchWithNL() {
+		fDocument.set("x(y\ny)x");
+		IRegion match= fPairMatcher.match(fDocument, 5);
+		if (BEFORE_MATCHES_DISABLED) {
+			assertNull(match);
+		} else {
+			assertNotNull(match);
+			assertTrue(match.getOffset() == 1 && match.getLength() == 5);
+		}
+	}	
+	
+	public void testAfterClosingMatchWithNL() {
+		fDocument.set("x(y\ny)x");
+		IRegion match= fPairMatcher.match(fDocument, 6);
+		assertNotNull(match);
+		assertTrue(match.getOffset() == 1 && match.getLength() == 5);
+	}
+	
+	public void testBeforeClosingMatchWithNLAndSingleLineComment() {
+		fDocument.set("x\nx(y\nx //(x\ny)x");
+		IRegion match= fPairMatcher.match(fDocument, 14);
+		if (BEFORE_MATCHES_DISABLED) {
+			assertNull(match);
+		} else {
+			assertNotNull(match);
+			assertTrue(match.getOffset() == 3 && match.getLength() == 12);
+		}
+	}
+	
+	public void testAfterClosingMatchWithNLAndSingleLineComment() {
+		fDocument.set("x\nx(y\nx //(x\ny)x");
+		IRegion match= fPairMatcher.match(fDocument, 15);
+		assertNotNull(match);
+		assertTrue(match.getOffset() == 3 && match.getLength() == 12);
+	}
+
+	public void testAngleBracketsAsOperators() {
+		fDocument.set("void f(){ \n\tif (x<y);\n\twhile(x>y)\n\t\tx << 2; y >> 1;\n}");
+		int idx= fDocument.get().indexOf('<', 0);
+		while (idx >= 0) {
+			IRegion match= fPairMatcher.match(fDocument, idx + 1);
+			assertNull(match);
+			idx= fDocument.get().indexOf('<', idx + 1);
+		}
+		idx= fDocument.get().indexOf('>', 0);
+		while (idx >= 0) {
+			IRegion match= fPairMatcher.match(fDocument, idx + 1);
+			assertNull(match);
+			idx= fDocument.get().indexOf('>', idx + 1);
+		}
+	}
+
+	public void testAngleBracketsAsPairs() {
+		fDocument.set("template < class X > class A {};}");
+		int idx= fDocument.get().indexOf('<', 0);
+		IRegion match= fPairMatcher.match(fDocument, idx + 1);
+		assertNotNull(match);
+		int otherIdx= fDocument.get().indexOf('>');
+		assertEquals(otherIdx, match.getOffset() + match.getLength() - 1);
+		
+		match= fPairMatcher.match(fDocument, otherIdx + 1);
+		assertNotNull(match);
+		assertEquals(idx, match.getOffset());
+	}
+
+	public void testAngleBracketsAsPairs2() {
+		fDocument.set("ConstTemplate c<5>;");
+		int idx= fDocument.get().indexOf('<', 0);
+		IRegion match= fPairMatcher.match(fDocument, idx + 1);
+		assertNotNull(match);
+		int otherIdx= fDocument.get().indexOf('>');
+		assertEquals(otherIdx, match.getOffset() + match.getLength() - 1);
+		
+		match= fPairMatcher.match(fDocument, otherIdx + 1);
+		assertNotNull(match);
+		assertEquals(idx, match.getOffset());
+	}
+
+	public void testAngleBracketsAsPairsNested() {
+		fDocument.set("OtherTemplate nested<map<int,int>,Y>;");
+		int idx= fDocument.get().indexOf('<', 0);
+		IRegion match= fPairMatcher.match(fDocument, idx + 1);
+		assertNotNull(match);
+		int otherIdx= fDocument.get().lastIndexOf('>');
+		assertEquals(otherIdx, match.getOffset() + match.getLength() - 1);
+
+		match= fPairMatcher.match(fDocument, otherIdx + 1);
+		assertNotNull(match);
+		assertEquals(idx, match.getOffset());
+
+		idx= fDocument.get().indexOf('<', idx+1);
+		match= fPairMatcher.match(fDocument, idx + 1);
+		assertNotNull(match);
+		otherIdx= fDocument.get().indexOf('>', idx + 1);
+		assertEquals(otherIdx, match.getOffset() + match.getLength() - 1);
+	}
+	
+	public void testAngleBracketsAsPairsMultiline() {
+		fDocument.set("OtherTemplate nested<\n\tmap<int,int>,Y\n>;");
+		int idx= fDocument.get().indexOf('<', 0);
+		IRegion match= fPairMatcher.match(fDocument, idx + 1);
+		assertNotNull(match);
+		int otherIdx= fDocument.get().lastIndexOf('>');
+		assertEquals(otherIdx, match.getOffset() + match.getLength() - 1);
+
+		match= fPairMatcher.match(fDocument, otherIdx + 1);
+		assertNotNull(match);
+		assertEquals(idx, match.getOffset());
+
+		idx= fDocument.get().indexOf('<', idx+1);
+		match= fPairMatcher.match(fDocument, idx + 1);
+		assertNotNull(match);
+		otherIdx= fDocument.get().indexOf('>', idx + 1);
+		assertEquals(otherIdx, match.getOffset() + match.getLength() - 1);
+	}	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/PartitionTokenScannerTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/PartitionTokenScannerTest.java
new file mode 100644
index 0000000..69fdae9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/PartitionTokenScannerTest.java
@@ -0,0 +1,263 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     QNX Software Systems - initial API and implementation
+ *     Andrew Ferguson (Symbian)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.internal.ui.text.FastCPartitionScanner;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.rules.IPartitionTokenScanner;
+import org.eclipse.jface.text.rules.IToken;
+
+/**
+ * Compares two <code>IParitionTokenScanner</code>s for conformance and performance.
+ */
+public class PartitionTokenScannerTest extends TestCase {
+
+	private IPartitionTokenScanner fReference;
+	private IPartitionTokenScanner fTestee;
+
+	public PartitionTokenScannerTest(String name) {
+		super(name);	
+	}
+
+	protected void setUp() {
+		fReference= new CPartitionScanner();
+		fTestee= new FastCPartitionScanner(true, null);
+	}
+
+	// read sample C file
+	private IDocument getDocument(String name, String lineDelimiter) {
+		try {
+			InputStream stream= getClass().getResourceAsStream(name);
+			BufferedReader reader= new BufferedReader(new InputStreamReader(stream));
+			
+			StringBuffer buffer= new StringBuffer();
+			String line= reader.readLine();
+			while (line != null) {
+				buffer.append(line);
+				buffer.append(lineDelimiter);
+				line= reader.readLine();
+			}
+
+			return new Document(buffer.toString());
+
+		} catch (IOException e) {			
+		}
+		
+		return null;
+	}
+	
+	private static IDocument getRandomDocument(int size) {
+		final char[] characters= {'/', '*', '\'', '"', '\r', '\n', '\\'};
+		final StringBuffer buffer= new StringBuffer();
+		
+		for (int i= 0; i < size; i++) {
+			final int randomIndex= (int) (Math.random() * characters.length);
+			buffer.append(characters[randomIndex]);
+		}
+		
+		return new Document(buffer.toString());
+	}
+
+	public static Test suite() {
+		return new TestSuite(PartitionTokenScannerTest.class);
+	}
+
+	public void testTestCaseLF() {
+		testConformance(getDocument("TestCase.txt", "\n"));
+	}
+
+	public void testTestCaseCRLF() {
+		testConformance(getDocument("TestCase.txt", "\r\n"));
+	}
+
+	public void testTestCaseCR() {
+		testConformance(getDocument("TestCase.txt", "\r"));
+	}
+
+	public void testTestCase2LF() {
+		testConformance(getDocument("TestCase2.txt", "\n"));
+	}
+
+	public void testTestCase2CRLF() {
+		testConformance(getDocument("TestCase2.txt", "\r\n"));
+	}
+
+	public void testTestCase2CR() {
+		testConformance(getDocument("TestCase2.txt", "\r"));
+	}
+
+//	XXX not fully passing because of "\<LF> and '\<LF>
+//	public void testRandom() {
+//		testConformance(getRandomDocument(2048));
+//	}
+
+	/**
+	 * Tests performance of the testee against the reference IPartitionTokenScanner.
+	 */
+	public void testPerformance() {
+		final int COUNT= 5000;
+		final IDocument document= getDocument("TestCase.txt", "\n");
+
+		final long referenceTime= getTime(fReference, document, COUNT);
+		final long testeeTime= getTime(fTestee, document, COUNT);
+
+		if (false) {
+			System.out.println("reference time = " + referenceTime / 1000.0f);
+			System.out.println("testee time = " + testeeTime / 1000.0f);
+			System.out.println("factor = " + (float) referenceTime / testeeTime);
+		}
+		
+		// dangerous: assert no regression in performance
+		// assertTrue(testeeTime <= referenceTime);
+	}
+	
+	private long getTime(IPartitionTokenScanner scanner, IDocument document, int count) {
+		final long start= System.currentTimeMillis();
+
+		for (int i= 0; i < count; i++)
+			testPerformance(scanner, document);
+
+		final long end= System.currentTimeMillis();
+		
+		return end - start;
+	}
+	
+	private void testConformance(final IDocument document) {
+		
+		final StringBuffer message= new StringBuffer();
+		
+		fReference.setRange(document, 0, document.getLength());
+		fTestee.setRange(document, 0, document.getLength());
+		
+		while (true) {
+			
+			message.setLength(0);
+			
+			final IToken referenceToken= fReference.nextToken();
+			final IToken testeeToken= fTestee.nextToken();
+			assertTokenEquals(referenceToken, testeeToken);
+			
+			final int referenceOffset= fReference.getTokenOffset();
+			final int testeeOffset= fTestee.getTokenOffset();
+			message.append(", offset = " + referenceOffset);
+			message.append(", " + extractString(document, referenceOffset));
+			assertEquals(message.toString(), referenceOffset, testeeOffset);
+
+			int referenceLength= fReference.getTokenLength();
+			final int testeeLength= fTestee.getTokenLength();
+			if(referenceLength != testeeLength) {
+				// Special case where the dum scanner creates a token for every character...
+				IToken t;
+				while(referenceLength < testeeLength) {
+					t = fReference.nextToken();
+					referenceLength += fReference.getTokenLength();
+					if(referenceToken != t) 
+						assertEquals(message.toString(), referenceToken, t);
+				}
+			}
+			message.append(", length = " + referenceLength);
+			assertEquals(message.toString(), referenceLength, testeeLength);
+
+			if (referenceToken.isEOF())
+				break;
+		}
+	}
+
+	private static void testPerformance(final IPartitionTokenScanner scanner, final IDocument document) {
+		
+		scanner.setRange(document, 0, document.getLength());
+
+		IToken token;
+		do {
+			token= scanner.nextToken();			
+			scanner.getTokenOffset();
+			scanner.getTokenLength();
+
+		} while (!token.isEOF());
+	}
+	
+	private void assertTokenEquals(IToken expected, IToken actual) {
+		assertEquals(expected.isEOF(), actual.isEOF());
+		assertEquals(expected.isOther(), actual.isOther());
+		assertEquals(expected.isUndefined(), actual.isUndefined());
+		assertEquals(expected.isWhitespace(), actual.isWhitespace());
+	}
+		
+	private static String extractString(IDocument document, int offset) {
+		final StringBuffer buffer= new StringBuffer();
+
+		try {
+			IRegion region= document.getLineInformationOfOffset(offset);
+			String line= document.get(region.getOffset(), region.getLength());
+			
+			int offsetIndex= offset - region.getOffset();
+
+			// XXX kludge
+			if (offsetIndex > line.length())
+				offsetIndex= line.length();
+			
+			buffer.append("line = " + document.getLineOfOffset(offset) + ": [");
+			buffer.append(line.substring(0, offsetIndex));
+			buffer.append("<POS>");
+			buffer.append(line.substring(offsetIndex));
+			buffer.append(']');
+			
+		} catch (BadLocationException e) {
+		}	
+		
+		return buffer.toString();	
+	}
+
+	/**
+	 * Escapes CR, LF and TAB in a string.
+	 */
+	private static String escape(String string) {
+		final StringBuffer buffer= new StringBuffer();
+		
+		final int length= string.length();
+		for (int i= 0; i < length; i++) {
+			final char character= string.charAt(i);
+			switch (character) {
+			case '\t':
+				buffer.append("\\t");
+				break;
+
+			case '\r':
+				buffer.append("\\r");
+				break;
+				
+			case '\n':
+				buffer.append("\\n");
+				break;			
+			
+			default:	
+				buffer.append(character);
+				break;
+			}
+		}
+		
+		return buffer.toString();	
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/RemoveBlockCommentTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/RemoveBlockCommentTest.java
new file mode 100644
index 0000000..059597b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/RemoveBlockCommentTest.java
@@ -0,0 +1,340 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *     Andrew Gvozdev
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.IDocument;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+import org.eclipse.cdt.ui.tests.text.AddBlockCommentTest.LinePosition;
+
+import org.eclipse.cdt.internal.core.model.ext.SourceRange;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+/**
+ * Tests for the RemoveBlockCommentAction.
+ *
+ * @since 5.0
+ */
+public class RemoveBlockCommentTest extends BaseUITestCase {
+	private ICProject fCProject;
+	public static TestSuite suite() {
+		return suite(RemoveBlockCommentTest.class, "_");
+	}
+
+	private CEditor fEditor;
+	private IDocument fDocument;
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		
+		final String PROJECT= "BlockComment";
+		// Using any existing file just to open CEditor, the content is not used
+		final String filename= "/BlockComment/src/sample/Before.cpp";
+		fCProject= EditorTestHelper.createCProject(PROJECT, "resources/formatter");
+		fCProject.setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.TAB);
+		fEditor= (CEditor) EditorTestHelper.openInEditor(ResourceTestHelper.findFile(filename), true);
+
+		fDocument= EditorTestHelper.getSourceViewer(fEditor).getDocument();
+		// Delete contents
+		fDocument.set("");
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		EditorTestHelper.closeEditor(fEditor);
+
+		if (fCProject != null)
+			CProjectHelper.delete(fCProject);
+		
+		super.tearDown();
+	}
+
+	/**
+	 * Run an action to comment block defined by line positions
+	 * and assert that the result matches the expected result.
+	 * "Before" and "After" are taken from test comments.
+	 * 
+	 * @param startLinePosition
+	 * @param endLinePosition
+	 * @throws Exception
+	 */
+	protected void assertFormatterResult(
+			LinePosition startLinePosition,
+			LinePosition endLinePosition) throws Exception {
+
+		StringBuffer[] contents= getContentsForTest(2);
+		String before = contents[0].toString();
+		String after  = contents[1].toString();
+		
+		fDocument.set(before);
+
+		SourceRange range = new SourceRange( startLinePosition.getOffset(),
+				endLinePosition.getOffset()-startLinePosition.getOffset() );
+		fEditor.setSelection(range, true);
+		
+		IAction commentAction= fEditor.getAction("RemoveBlockComment");
+		assertNotNull("No RemoveBlockComment action", commentAction);
+		commentAction.setEnabled(true);
+		commentAction.run();
+		
+		String expected= after;
+		assertEquals(expected, fDocument.get());
+	}
+	
+	/**
+	 * Run an action to comment block defined by line positions
+	 * and assert that the result matches the expected result.
+	 * "Before" and "After" are taken from test comments.
+	 * 
+	 * @param startLinePosition
+	 * @param endLinePosition
+	 * @param before editor contents before the operation
+	 * @param after expected editor contents after the operation
+	 * @throws Exception
+	 */
+	protected void assertFormatterResult(
+			LinePosition startLinePosition,
+			LinePosition endLinePosition,
+			String before,
+			String after) throws Exception {
+		
+		fDocument.set(before);
+		
+		SourceRange range = new SourceRange( startLinePosition.getOffset(),
+				endLinePosition.getOffset()-startLinePosition.getOffset() );
+		fEditor.setSelection(range, true);
+		
+		IAction commentAction= fEditor.getAction("RemoveBlockComment");
+		assertNotNull("No RemoveBlockComment action", commentAction);
+		commentAction.setEnabled(true);
+		commentAction.run();
+		
+		String expected= after;
+		assertEquals(expected, fDocument.get());
+	}
+
+	
+	//int i, /*j,*/ k;
+	
+	//int i, j, k;
+	public void testUncommentPlain() throws Exception {
+		LinePosition startSelection = new LinePosition(1,10,fDocument);
+		LinePosition endSelection   = new LinePosition(1,11,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//int /*j,*/ k;
+	
+	//int j, k;
+	public void testRightBorderIn() throws Exception {
+		LinePosition startSelection = new LinePosition(1,10,fDocument);
+		LinePosition endSelection   = new LinePosition(1,11,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//int /*j,*/ k;
+	
+	//int /*j,*/ k;
+	public void testRightBorderOut() throws Exception {
+		LinePosition startSelection = new LinePosition(1,11,fDocument);
+		LinePosition endSelection   = new LinePosition(1,12,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	//123456789-123
+	
+	//int /*j,*/ k;
+	
+	//int j, k;
+	public void testLeftBorderIn() throws Exception {
+		LinePosition startSelection = new LinePosition(1,5,fDocument);
+		LinePosition endSelection   = new LinePosition(1,6,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//int /*j,*/ k;
+	
+	//int /*j,*/ k;
+	public void testLeftBorderOut() throws Exception {
+		LinePosition startSelection = new LinePosition(1,4,fDocument);
+		LinePosition endSelection   = new LinePosition(1,5,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//int /*i,
+	//    j,*/
+	//    k;
+	
+	//int i,
+	//    j,
+	//    k;
+	public void testUncommentPartialLines1() throws Exception {
+		LinePosition startSelection = new LinePosition(1,7,fDocument);
+		LinePosition endSelection   = new LinePosition(2,2,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//int i,
+	///*    j,
+	//    k*/;
+	
+	//int i,
+	//    j,
+	//    k;
+	public void testUncommentPartialLines2() throws Exception {
+		LinePosition startSelection = new LinePosition(2,1,fDocument);
+		LinePosition endSelection   = new LinePosition(3,8,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+
+	//int i;
+	///*int j;*/
+	//int k;
+	
+	//int i;
+	//int j;
+	//int k;
+	public void testUncommentExactlyOneLineNoLoopingPlease() throws Exception {
+		LinePosition startSelection = new LinePosition(2,1,fDocument);
+		LinePosition endSelection   = new LinePosition(3,1,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//int i;
+	///*
+	//int j;
+	//int k;
+	//*/
+	//int l;
+	
+	//int i;
+	//int j;
+	//int k;
+	//int l;
+	public void testUncommentTwoOrMoreLines() throws Exception {
+		LinePosition startSelection = new LinePosition(2,1,fDocument);
+		LinePosition endSelection   = new LinePosition(4,1,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	///*const*/ int i;
+	
+	//const int i;
+	public void testUncommentFirstCharacterInFile() throws Exception {
+		LinePosition startSelection = new LinePosition(1,1,fDocument);
+		LinePosition endSelection   = new LinePosition(1,6,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	///*#include <x>*/
+	//#include <y>
+	
+	//#include <x>
+	//#include <y>
+	public void testUncommentPreprocessorFirstLine() throws Exception {
+		LinePosition startSelection = new LinePosition(1,1,fDocument);
+		LinePosition endSelection   = new LinePosition(1,6,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//int i; /*// comment*/
+	//int j;
+	
+	//int i; // comment
+	//int j;
+	public void testUncommentCppComment() throws Exception {
+		LinePosition startSelection = new LinePosition(1,10,fDocument);
+		LinePosition endSelection   = new LinePosition(1,12,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+
+	//#include <x>
+	///*#include <y>*/
+	//#include <z>
+	
+	//#include <x>
+	//#include <y>
+	//#include <z>
+	public void testUncommentSpecialPartition() throws Exception {
+		LinePosition startSelection = new LinePosition(2,1,fDocument);
+		LinePosition endSelection   = new LinePosition(3,1,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//#include <x>
+	///*
+	//   #include \
+	//      <y>
+	//*/
+	//#include <z>
+	
+	//#include <x>
+	//   #include \
+	//      <y>
+	//#include <z>
+	public void testUncommentSpecialPartitionExtra() throws Exception {
+		LinePosition startSelection = new LinePosition(3,8,fDocument);
+		LinePosition endSelection   = new LinePosition(3,10,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	///*int i;*/
+	///*int j;*/
+	//int k;
+	
+	//int i;
+	//int j;
+	//int k;
+	public void testUncommentConnectedComments() throws Exception {
+		LinePosition startSelection = new LinePosition(1,5,fDocument);
+		LinePosition endSelection   = new LinePosition(2,5,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	//
+	///*
+	//
+	//*/
+	
+	//
+	//
+	public void testUncommentEndOfFile() throws Exception {
+		LinePosition startSelection = new LinePosition(3,1,fDocument);
+		LinePosition endSelection   = new LinePosition(5,2,fDocument);
+		assertFormatterResult(startSelection,endSelection);
+	}
+	
+	public void testMixedEOLs() throws Exception {
+		String before =
+			  "/*\r\n"
+			+ "int i;\r\n"
+			+ "int j;\n"
+			+ "*/\n"
+			+ "int k;";
+		String after =
+			  "int i;\r\n"
+			+ "int j;\n"
+			+ "int k;";
+		LinePosition startSelection = new LinePosition(2,1,fDocument);
+		LinePosition endSelection   = new LinePosition(3,1,fDocument);
+		assertFormatterResult(startSelection,endSelection,before,after);
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/ResourceHelper.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/ResourceHelper.java
new file mode 100644
index 0000000..017539b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/ResourceHelper.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.io.File;
+import java.io.InputStream;
+
+import org.eclipse.core.filebuffers.manipulation.ContainerCreator;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+
+/**
+ * Copied from org.eclipse.core.filebuffers.tests.
+ * 
+ * @since 4.0
+ */
+public class ResourceHelper {
+	
+	private final static IProgressMonitor NULL_MONITOR= new NullProgressMonitor();
+	private static final int MAX_RETRY= 5;
+	
+	public static IProject createProject(String projectName) throws CoreException {
+		
+		IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
+		IProject project= root.getProject(projectName);
+		if (!project.exists())
+			project.create(NULL_MONITOR);
+		else
+			project.refreshLocal(IResource.DEPTH_INFINITE, null);
+		
+		if (!project.isOpen())
+			project.open(NULL_MONITOR);
+		
+		return project;
+	}
+	
+	public static void deleteProject(String projectName) throws CoreException {
+		IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
+		IProject project= root.getProject(projectName);
+		if (project.exists())
+			delete(project);
+	}
+	
+	public static void delete(final IProject project) throws CoreException {
+		delete(project, true);
+	}
+	
+	public static void delete(final IProject project, boolean deleteContent) throws CoreException {
+		for (int i= 0; i < MAX_RETRY; i++) {
+			try {
+				project.delete(deleteContent, true, NULL_MONITOR);
+				i= MAX_RETRY;
+			} catch (CoreException x) {
+				if (i == MAX_RETRY - 1) {
+					CTestPlugin.getDefault().getLog().log(x.getStatus());
+//					throw x;
+				}
+				try {
+					Thread.sleep(1000); // sleep a second
+				} catch (InterruptedException e) {
+				} 
+			}
+		}
+	}
+	
+	public static IFolder createFolder(String portableFolderPath) throws CoreException {
+		ContainerCreator creator= new ContainerCreator(ResourcesPlugin.getWorkspace(), new Path(portableFolderPath));
+		IContainer container= creator.createContainer(NULL_MONITOR);
+		if (container instanceof IFolder)
+			return (IFolder) container;
+		return null;
+	}
+
+	public static IFile createFile(IFolder folder, String name, String contents) throws CoreException {
+		return createFile(folder.getFile(name), name, contents);
+	}
+	
+	public static IFile createFile(IProject project, String name, String contents) throws CoreException {
+		return createFile(project.getFile(name), name, contents);
+	}
+	
+	private static IFile createFile(IFile file, String name, String contents) throws CoreException {
+		if (contents == null)
+			contents= "";
+		InputStream inputStream= new java.io.StringBufferInputStream(contents);
+		file.create(inputStream, true, NULL_MONITOR);
+		return file;
+	}
+	
+	public static IFile createLinkedFile(IContainer container, IPath linkPath, File linkedFileTarget) throws CoreException {
+		IFile iFile= container.getFile(linkPath);
+		iFile.createLink(new Path(linkedFileTarget.getAbsolutePath()), IResource.ALLOW_MISSING_LOCAL, NULL_MONITOR);
+		return iFile;
+	}
+	
+	public static IFile createLinkedFile(IContainer container, IPath linkPath, Plugin plugin, IPath linkedFileTargetPath) throws CoreException {
+		File file= FileTool.getFileInPlugin(plugin, linkedFileTargetPath);
+		IFile iFile= container.getFile(linkPath);
+		iFile.createLink(new Path(file.getAbsolutePath()), IResource.ALLOW_MISSING_LOCAL, NULL_MONITOR);
+		return iFile;
+	}
+	
+	public static IFolder createLinkedFolder(IContainer container, IPath linkPath, File linkedFolderTarget) throws CoreException {
+		IFolder folder= container.getFolder(linkPath);
+		folder.createLink(new Path(linkedFolderTarget.getAbsolutePath()), IResource.ALLOW_MISSING_LOCAL, NULL_MONITOR);
+		return folder;
+	}
+	
+	public static IFolder createLinkedFolder(IContainer container, IPath linkPath, Plugin plugin, IPath linkedFolderTargetPath) throws CoreException {
+		File file= FileTool.getFileInPlugin(plugin, linkedFolderTargetPath);
+		IFolder iFolder= container.getFolder(linkPath);
+		iFolder.createLink(new Path(file.getAbsolutePath()), IResource.ALLOW_MISSING_LOCAL, NULL_MONITOR);
+		return iFolder;
+	}
+	
+	public static IProject createLinkedProject(String projectName, Plugin plugin, IPath linkPath) throws CoreException {
+		IWorkspace workspace= ResourcesPlugin.getWorkspace();
+		IProject project= workspace.getRoot().getProject(projectName);
+		
+		IProjectDescription desc= workspace.newProjectDescription(projectName);
+		File file= FileTool.getFileInPlugin(plugin, linkPath);
+		IPath projectLocation= new Path(file.getAbsolutePath());
+		if (Platform.getLocation().equals(projectLocation))
+			projectLocation= null;
+		desc.setLocation(projectLocation);
+		
+		project.create(desc, NULL_MONITOR);
+		if (!project.isOpen())
+			project.open(NULL_MONITOR);
+		
+		return project;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/ResourceTestHelper.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/ResourceTestHelper.java
new file mode 100644
index 0000000..76f9b6a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/ResourceTestHelper.java
@@ -0,0 +1,252 @@
+/*******************************************************************************
+ *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.text;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.zip.ZipException;
+import java.util.zip.ZipFile;
+
+import junit.framework.Assert;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Preferences;
+
+/**
+ * Copied from org.eclipse.jdt.text.tests.performance.
+ *
+ * @since 4.0
+ */
+public class ResourceTestHelper {
+
+	public static final int FAIL_IF_EXISTS= 0;
+	
+	public static final int OVERWRITE_IF_EXISTS= 1;
+	
+	public static final int SKIP_IF_EXISTS= 2;
+
+	private static final int DELETE_MAX_RETRY= 5;
+
+	private static final long DELETE_RETRY_DELAY= 1000;
+
+	public static void replicate(String src, String destPrefix, String destSuffix, int n, int ifExists) throws CoreException {
+		for (int i= 0; i < n; i++)
+			copy(src, destPrefix + i + destSuffix, ifExists);
+	}
+
+	public static void copy(String src, String dest) throws CoreException {
+		copy(src, dest, FAIL_IF_EXISTS);
+	}
+
+	public static void copy(String src, String dest, int ifExists) throws CoreException {
+		if (handleExisting(dest, ifExists))
+			getFile(src).copy(new Path(dest), true, null);
+	}
+
+	private static boolean handleExisting(String dest, int ifExists) throws CoreException {
+		IFile destFile= getFile(dest);
+		switch (ifExists) {
+			case FAIL_IF_EXISTS:
+				if (destFile.exists())
+					throw new IllegalArgumentException("Destination file exists: " + dest);
+				return true;
+			case OVERWRITE_IF_EXISTS:
+				if (destFile.exists())
+					delete(destFile);
+				return true;
+			case SKIP_IF_EXISTS:
+				if (destFile.exists())
+					return false;
+				return true;
+			default:
+				throw new IllegalArgumentException();
+		}
+	}
+
+	private static IFile getFile(String path) {
+		return getRoot().getFile(new Path(path));
+	}
+
+	public static void delete(String file) throws CoreException {
+		delete(getFile(file));
+	}
+
+	private static void delete(IFile file) throws CoreException {
+		CoreException x= null;
+		for (int i= 0; i < DELETE_MAX_RETRY; i++) {
+			try {
+				file.delete(true, null);
+				return;
+			} catch (CoreException x0) {
+				x= x0;
+				try {
+					Thread.sleep(DELETE_RETRY_DELAY);
+				} catch (InterruptedException x1) {
+					// should not happen
+				}
+			}
+		}
+		throw x;
+	}
+
+	public static void delete(String prefix, String suffix, int n) throws CoreException {
+		for (int i= 0; i < n; i++)
+			delete(prefix + i + suffix);
+	}
+
+	public static IFile findFile(String pathStr) {
+		IFile file= getFile(pathStr);
+		Assert.assertTrue(file != null && file.exists());
+		return file;
+	}
+
+	public static IFile[] findFiles(String prefix, String suffix, int i, int n) {
+		List<IFile> files= new ArrayList<IFile>(n);
+		for (int j= i; j < i + n; j++) {
+			String path= prefix + j + suffix;
+			files.add(findFile(path));
+		}
+		return files.toArray(new IFile[files.size()]);
+	}
+
+	public static StringBuffer read(String src) throws IOException, CoreException {
+		return FileTool.read(new InputStreamReader(getFile(src).getContents()));
+	}
+
+	public static void write(String dest, final String content) throws IOException, CoreException {
+		InputStream stream= new InputStream() {
+			private Reader fReader= new StringReader(content);
+			public int read() throws IOException {
+				return fReader.read();
+			}
+		};
+		getFile(dest).create(stream, true, null);
+	}
+	
+
+	public static void replicate(String src, String destPrefix, String destSuffix, int n, String srcName, String destNamePrefix, int ifExists) throws IOException, CoreException {
+		StringBuffer s= read(src);
+		List<Integer> positions= identifierPositions(s, srcName);
+		for (int j= 0; j < n; j++) {
+			String dest= destPrefix + j + destSuffix;
+			if (handleExisting(dest, ifExists)) {
+				StringBuffer c= new StringBuffer(s.toString());
+				replacePositions(c, srcName.length(), destNamePrefix + j, positions);
+				write(dest, c.toString());
+			}
+		}
+	}
+
+	public static void copy(String src, String dest, String srcName, String destName, int ifExists) throws IOException, CoreException {
+		if (handleExisting(dest, ifExists)) {
+			StringBuffer buf= read(src);
+			List<Integer> positions= identifierPositions(buf, srcName);
+			replacePositions(buf, srcName.length(), destName, positions);
+			write(dest, buf.toString());
+		}
+	}
+
+	private static void replacePositions(StringBuffer c, int origLength, String string, List<Integer> positions) {
+		int offset= 0;
+		for (Iterator<Integer> iter= positions.iterator(); iter.hasNext();) {
+			int position= iter.next().intValue();
+			c.replace(offset + position, offset + position + origLength, string);
+			offset += string.length() - origLength;
+		}
+	}
+
+	private static List<Integer> identifierPositions(StringBuffer buffer, String identifier) {
+		List<Integer> positions= new ArrayList<Integer>();
+		int i= -1;
+		while (true) {
+			i= buffer.indexOf(identifier, i + 1);
+			if (i == -1)
+				break;
+			if (i > 0 && Character.isJavaIdentifierPart(buffer.charAt(i - 1)))
+				continue;
+			if (i < buffer.length() - 1 && Character.isJavaIdentifierPart(buffer.charAt(i + identifier.length())))
+				continue;
+			positions.add(new Integer(i));
+		}
+		return positions;
+	}
+
+	private static IWorkspaceRoot getRoot() {
+		return ResourcesPlugin.getWorkspace().getRoot();
+	}
+
+	public static void incrementalBuild() throws CoreException {
+		ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+	}
+
+	public static void fullBuild() throws CoreException {
+		ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+	}
+
+	public static boolean disableAutoBuilding() {
+		return setAutoBuilding(false);
+	}
+
+	public static boolean enableAutoBuilding() {
+		return setAutoBuilding(true);
+	}
+	
+	public static boolean setAutoBuilding(boolean value) {
+		Preferences preferences= ResourcesPlugin.getPlugin().getPluginPreferences();
+		boolean oldValue= preferences.getBoolean(ResourcesPlugin.PREF_AUTO_BUILDING);
+		if (value != oldValue)
+			preferences.setValue(ResourcesPlugin.PREF_AUTO_BUILDING, value);
+		return oldValue;
+	}
+
+	public static IProject createExistingProject(String projectName) throws CoreException {
+		IWorkspace workspace= ResourcesPlugin.getWorkspace();
+		IProject project= workspace.getRoot().getProject(projectName);
+		IProjectDescription description= workspace.newProjectDescription(projectName);
+		description.setLocation(null);
+	
+		project.create(description, null);
+		project.open(null);
+		return project;
+	}
+
+	public static IProject createProjectFromZip(Plugin installationPlugin, String projectZip, String projectName) throws IOException, ZipException, CoreException {
+		String workspacePath= ResourcesPlugin.getWorkspace().getRoot().getLocation().toString() + "/";
+		FileTool.unzip(new ZipFile(FileTool.getFileInPlugin(installationPlugin, new Path(projectZip))), new File(workspacePath));
+		return createExistingProject(projectName);
+	}
+
+	public static IProject getProject(String projectName) {
+		IWorkspace workspace= ResourcesPlugin.getWorkspace();
+		return workspace.getRoot().getProject(projectName);
+	}
+
+	public static boolean projectExists(String projectName) {
+		return getProject(projectName).exists();
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/SemanticHighlightingTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/SemanticHighlightingTest.java
new file mode 100644
index 0000000..baf8ac1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/SemanticHighlightingTest.java
@@ -0,0 +1,423 @@
+/*******************************************************************************
+ *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems) - Adapted for CDT
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.Position;
+
+import org.eclipse.cdt.internal.ui.editor.SemanticHighlightings;
+
+/**
+ * Semantic highlighting tests.
+ * 
+ * <p>Derived from JDT.<p>
+ *
+ * @since 4.0
+ */
+public class SemanticHighlightingTest extends AbstractSemanticHighlightingTest {
+	
+	private static final boolean PRINT_POSITIONS= false;
+
+	private static final Class<?> THIS= SemanticHighlightingTest.class;
+	
+	public static Test suite() {
+		return new SemanticHighlightingTestSetup(new TestSuite(THIS), TESTFILE);
+	}
+
+	public void testStaticFieldHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.STATIC_FIELD);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(25, 15, 14),
+				createPosition(27, 21, 19),
+				createPosition(44, 21, 20),
+				createPosition(45, 15, 15),
+				createPosition(59, 21, 20),
+				createPosition(60, 15, 15),
+				createPosition(122, 20, 15),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	public void testFieldHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.FIELD);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(25, 15, 14),
+				createPosition(26, 14, 13),
+				createPosition(27, 21, 19),
+				createPosition(28, 8, 8),
+				createPosition(44, 21, 20),
+				createPosition(45, 15, 15),
+				createPosition(46, 15, 14),
+				createPosition(47, 8, 9),
+				createPosition(59, 21, 20),
+				createPosition(60, 15, 15),
+				createPosition(61, 15, 14),
+				createPosition(62, 8, 9),
+				createPosition(77, 7, 5),
+				createPosition(78, 7, 5),
+				createPosition(80, 8, 5),
+				createPosition(81, 8, 5),
+				createPosition(89, 8, 11),
+				createPosition(93, 8, 10),
+				createPosition(109, 11, 9),
+				createPosition(114, 11, 8),
+				createPosition(119, 8, 11),
+				createPosition(121, 7, 10),
+				createPosition(122, 20, 15),
+				createPosition(126, 11, 10),
+				createPosition(126, 28, 11),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	public void testMethodDeclarationHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.METHOD_DECLARATION);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(30, 15, 15),
+				createPosition(35, 8, 9),
+				createPosition(49, 15, 16),
+				createPosition(50, 8, 10),
+				createPosition(64, 15, 16),
+				createPosition(65, 8, 10),
+				createPosition(79, 4, 13),
+				createPosition(94, 13, 9),
+				createPosition(95, 13, 10),
+				createPosition(108, 4, 26),
+				createPosition(112, 4, 25),
+				createPosition(117, 4, 32),
+		};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	public void testMethodHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.METHOD);
+		Position[] expected= new Position[] {
+				createPosition(30, 15, 15),
+				createPosition(35, 8, 9),
+				createPosition(49, 15, 16),
+				createPosition(50, 8, 10),
+				createPosition(64, 15, 16),
+				createPosition(65, 8, 10),
+				createPosition(79, 4, 13),
+				createPosition(94, 13, 9),
+				createPosition(95, 13, 10),
+				createPosition(108, 4, 26),
+				createPosition(112, 4, 25),
+				createPosition(117, 4, 32),
+				createPosition(118, 23, 9),
+				createPosition(122, 4, 15),
+				createPosition(130, 13, 9),
+		};
+		Position[] actual= getSemanticHighlightingPositions();
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+
+	public void testStaticMethodInvocationHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.STATIC_METHOD_INVOCATION);
+		Position[] expected= new Position[] {
+				createPosition(122, 4, 15),
+		};
+		Position[] actual= getSemanticHighlightingPositions();
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	public void testLocalVariableDeclarationHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.LOCAL_VARIABLE_DECLARATION);
+		Position[] expected= new Position[] {
+				createPosition(113, 8, 8),
+				createPosition(118, 15, 2),
+				createPosition(120, 13, 2),
+				createPosition(129, 13, 8),
+			};
+		Position[] actual= getSemanticHighlightingPositions();
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	public void testLocalVariableReferencesHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.LOCAL_VARIABLE);
+		Position[] expected= new Position[] {
+				createPosition(114, 22, 8),
+				createPosition(119, 4, 2),
+				createPosition(121, 4, 2),
+				createPosition(123, 4, 2),
+				createPosition(123, 9, 2),
+				createPosition(126, 8, 2),
+				createPosition(126, 24, 2),
+				createPosition(130, 4, 8),
+			};
+		Position[] actual= getSemanticHighlightingPositions();
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	public void testParameterVariableHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.PARAMETER_VARIABLE);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(12, 20, 1),
+				createPosition(30, 35, 3),
+				createPosition(31, 23, 3),
+				createPosition(32, 19, 3),
+				createPosition(79, 21, 4),
+				createPosition(79, 30, 4),
+				createPosition(80, 16, 4),
+				createPosition(81, 16, 4),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+
+	public void testTemplateParameterHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.TEMPLATE_PARAMETER);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(76, 15, 2),
+				createPosition(76, 25, 2),
+				createPosition(77, 4, 2),
+				createPosition(78, 4, 2),
+				createPosition(79, 18, 2),
+				createPosition(79, 27, 2),
+				createPosition(85, 15, 2),
+				createPosition(85, 66, 2),
+				createPosition(136, 14, 1),
+				createPosition(139, 9, 1),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	public void testEnumHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.ENUM);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(4, 5, 11),
+				createPosition(37, 9, 14),
+				createPosition(52, 9, 15),
+				createPosition(67, 9, 15),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	public void testClassHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.CLASS);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(17, 6, 5),
+				createPosition(18, 6, 5),
+				createPosition(20, 6, 14),
+				createPosition(20, 23, 5),
+				createPosition(20, 30, 5),
+				createPosition(22, 17, 11),
+				createPosition(38, 10, 8),
+				createPosition(39, 10, 9),
+				createPosition(40, 10, 8),
+				createPosition(41, 12, 8),
+				createPosition(53, 10, 9),
+				createPosition(54, 10, 10),
+				createPosition(55, 10, 9),
+				createPosition(56, 12, 9),
+				createPosition(68, 10, 9),
+				createPosition(69, 10, 10),
+				createPosition(70, 10, 9),
+				createPosition(71, 12, 9),
+				createPosition(76, 35, 13),
+				createPosition(85, 25, 24),
+				createPosition(85, 52, 13),
+				createPosition(85, 70, 5),
+				createPosition(88, 7, 9),
+				createPosition(92, 6, 8),
+				createPosition(94, 4, 8),
+				createPosition(94, 23, 8),
+				createPosition(95, 4, 8),
+				createPosition(98, 8, 8),
+				createPosition(108, 4, 14),
+				createPosition(112, 4, 14),
+				createPosition(117, 4, 14),
+				createPosition(118, 4, 9),
+				createPosition(120, 4, 8),
+				createPosition(129, 4, 8),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	public void testFunctionDeclarationHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.FUNCTION_DECLARATION);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(12, 5, 10),
+				createPosition(13, 12, 16),
+				createPosition(21, 16, 10),
+				createPosition(102, 8, 13),
+				createPosition(137, 4, 1),
+				createPosition(144, 10, 1),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	public void testFunctionHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.FUNCTION);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(12, 5, 10),
+				createPosition(13, 12, 16),
+				createPosition(21, 16, 10),
+				createPosition(32, 8, 10),
+				createPosition(102, 8, 13),
+				createPosition(103, 1, 16),
+				createPosition(131, 4, 11),
+				createPosition(137, 4, 1),
+				createPosition(144, 10, 1),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	
+	public void testGlobalVariableHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.GLOBAL_VARIABLE);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(8, 10, 14),
+				createPosition(9, 4, 14),
+				createPosition(10, 11, 20),
+				createPosition(33, 15, 20),
+				createPosition(101, 8, 12),
+				createPosition(104, 8, 12),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	public void testMacroDefinitionHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.MACRO_DEFINITION);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(0, 8, 3),
+				createPosition(1, 8, 14),
+				createPosition(2, 8, 11),
+				createPosition(143, 8, 5),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+
+	public void testMacroReferencesHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.MACRO_REFERENCE);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(14, 4, 11),
+				createPosition(31, 8, 14),
+				createPosition(108, 0, 3),
+				createPosition(112, 0, 3),
+				createPosition(117, 0, 3),
+				createPosition(125, 4, 14),
+				createPosition(144, 0, 5),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+
+	public void testTypedefHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.TYPEDEF);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(41, 21, 10),
+				createPosition(56, 22, 11),
+				createPosition(71, 22, 11),
+				createPosition(98, 17, 6),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+
+	public void testNamespaceHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.NAMESPACE);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(100, 10, 2),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+
+	public void testLabelHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.LABEL);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(124, 0, 5),
+				createPosition(126, 46, 5),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+
+	public void testEnumeratorHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.ENUMERATOR);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(5, 4, 10),
+				createPosition(37, 25, 13),
+				createPosition(52, 26, 14),
+				createPosition(67, 26, 14),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	public void testProblemHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.PROBLEM);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(127, 4, 13),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+
+	public void testExternalSDKHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.EXTERNAL_SDK);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(130, 13, 9),
+				createPosition(131, 4, 11),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+	public void testOverloadedOperatorHighlighting() throws Exception {
+		setUpSemanticHighlighting(SemanticHighlightings.OVERLOADED_OPERATOR);
+		Position[] actual= getSemanticHighlightingPositions();
+		Position[] expected= new Position[] {
+				createPosition(123, 7, 1),
+				createPosition(123, 11, 1),
+				createPosition(123, 13, 1),
+			};
+		if (PRINT_POSITIONS) System.out.println(toString(actual));
+		assertEqualPositions(expected, actual);
+	}
+	
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/ShiftActionTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/ShiftActionTest.java
new file mode 100644
index 0000000..5f142a8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/ShiftActionTest.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.ListResourceBundle;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.ui.texteditor.ShiftAction;
+
+import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+/**
+ * Test the Shift left/right actions.
+ * 
+ * @since 5.0
+ */
+public class ShiftActionTest extends BaseUITestCase {
+	private static final String PROJECT= "ShiftTests";
+	private static final String FILE = "shiftTest.c";
+
+	private static final class EmptyBundle extends ListResourceBundle {
+		@Override
+		protected Object[][] getContents() {
+			return new Object[0][];
+		}
+	}
+
+	protected static class ShiftTestSetup extends TestSetup {
+
+		private ICProject fCProject;
+
+		public ShiftTestSetup(Test test) {
+			super(test);
+		}
+		
+		@Override
+		protected void setUp() throws Exception {
+			super.setUp();
+			
+			fCProject= CProjectHelper.createCProject(PROJECT, null);
+			fCProject.setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, DefaultCodeFormatterConstants.MIXED);
+			fCProject.setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, String.valueOf(8));
+			fCProject.setOption(DefaultCodeFormatterConstants.FORMATTER_INDENTATION_SIZE, String.valueOf(4));
+			IFile file= EditorTestHelper.createFile(fCProject.getProject(), FILE, "", new NullProgressMonitor());
+		}
+
+		@Override
+		protected void tearDown () throws Exception {
+			EditorTestHelper.closeAllEditors();
+			if (fCProject != null) {
+				CProjectHelper.delete(fCProject);
+			}
+			super.tearDown();
+		}
+	}
+	
+	private static final Class<?> THIS= ShiftActionTest.class;
+	public static Test suite() {
+		return new ShiftTestSetup(new TestSuite(THIS));
+	}
+
+	private CEditor fEditor;
+	private SourceViewer fSourceViewer;
+	private IDocument fDocument;
+	private ShiftTestSetup fProjectSetup;
+
+	/*
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	@Override
+	protected void setUp() throws Exception {
+		if (!ResourcesPlugin.getWorkspace().getRoot().exists(new Path(PROJECT))) {
+			fProjectSetup= new ShiftTestSetup(this);
+			fProjectSetup.setUp();
+		}
+		fEditor= (CEditor) EditorTestHelper.openInEditor(ResourceTestHelper.findFile(PROJECT + '/' + FILE), true);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		fDocument= fSourceViewer.getDocument();
+		super.setUp();
+	}
+	
+	/*
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	@Override
+	protected void tearDown() throws Exception {
+		if (fProjectSetup != null) {
+			fProjectSetup.tearDown();
+		}
+		super.tearDown();
+	}
+	
+	private void shiftLeft() throws Exception {
+		new ShiftAction(new EmptyBundle(), "prefix", fEditor, SourceViewer.SHIFT_LEFT).run();
+	}
+
+	private void shiftRight() throws Exception {
+		new ShiftAction(new EmptyBundle(), "prefix", fEditor, SourceViewer.SHIFT_RIGHT).run();
+	}
+
+	private void selectAll() {
+		fSourceViewer.setSelectedRange(0, fDocument.getLength());
+	}
+
+	//void f() {
+	//    for(;;) {
+	//}
+	
+	//    void f() {
+	//	for(;;) {
+	//    }
+	public void testShiftRight() throws Exception {
+		StringBuffer[] contents= getContentsForTest(2);
+		String before= contents[0].toString();
+		String after= contents[1].toString();
+		fDocument.set(before);
+		selectAll();
+		shiftRight();
+		assertEquals(after, fDocument.get());
+	}
+
+	//    void f() {
+	//	for(;;) {
+	//    }
+
+	//void f() {
+	//    for(;;) {
+	//}
+	public void testShiftLeft() throws Exception {
+		StringBuffer[] contents= getContentsForTest(2);
+		String before= contents[0].toString();
+		String after= contents[1].toString();
+		fDocument.set(before);
+		selectAll();
+		shiftLeft();
+		assertEquals(after, fDocument.get());
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/TemplateFormatterTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/TemplateFormatterTest.java
new file mode 100644
index 0000000..9a5fcc8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/TemplateFormatterTest.java
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text;
+
+import java.util.HashMap;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.templates.DocumentTemplateContext;
+import org.eclipse.jface.text.templates.GlobalTemplateVariables;
+import org.eclipse.jface.text.templates.Template;
+import org.eclipse.jface.text.templates.TemplateBuffer;
+import org.eclipse.jface.text.templates.TemplateContext;
+import org.eclipse.jface.text.templates.TemplateContextType;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+
+import org.eclipse.cdt.internal.corext.template.c.CFormatter;
+
+/**
+ * Tests for the template formatter (CFormatter).
+ *
+ * @since 5.0
+ */
+public class TemplateFormatterTest extends BaseUITestCase {
+
+	private static class TestTemplateContextType extends TemplateContextType {
+		TestTemplateContextType() {
+			super("test");
+			addResolver(new GlobalTemplateVariables.Cursor());
+			addResolver(new GlobalTemplateVariables.WordSelection());
+			addResolver(new GlobalTemplateVariables.LineSelection());
+			addResolver(new GlobalTemplateVariables.Dollar());
+			addResolver(new GlobalTemplateVariables.Date());
+			addResolver(new GlobalTemplateVariables.Year());
+			addResolver(new GlobalTemplateVariables.Time());
+			addResolver(new GlobalTemplateVariables.User());
+		}
+	}
+
+	public static TestSuite suite() {
+		return suite(TemplateFormatterTest.class, "_");
+	}
+
+	private TemplateContextType fTemplateContextType;
+	private String fSelection;
+	private HashMap fDefaultOptions;
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		fTemplateContextType= new TestTemplateContextType();
+		fSelection= "while (true) {\n\tdoSomething();\n}";
+		fDefaultOptions= CCorePlugin.getDefaultOptions();
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		CCorePlugin.setOptions(fDefaultOptions);
+		super.tearDown();
+	}
+	
+	private void setOption(String key, String value) {
+		HashMap options= new HashMap(1);
+		options.put(key, value);
+		CCorePlugin.setOptions(options);
+	}
+
+	protected void assertFormatterResult() throws Exception {
+		assertFormatterResult(false);
+	}
+	protected void assertFormatterResult(boolean useFormatter) throws Exception {
+		StringBuffer[] contents= getContentsForTest(2);
+		String before= contents[0].toString().replaceAll("\\r\\n", "\n");
+		String expected= contents[1].toString();
+		final Document document = new Document(before);
+		TemplateContext context= new DocumentTemplateContext(fTemplateContextType, document, 0, document.getLength());
+		context.setVariable(GlobalTemplateVariables.SELECTION, fSelection);
+		Template template= new Template("test", "descr", fTemplateContextType.getId(), before, false);
+		TemplateBuffer buffer= context.evaluate(template);
+		CFormatter formatter= new CFormatter("\n", 0, useFormatter, null);
+		formatter.format(buffer, context);
+		assertEquals(expected, buffer.getString());
+	}
+	
+	//for(int var=0; var<max; var++) {
+	//	${cursor}
+	//}
+	
+	//for(int var=0; var<max; var++) {
+	//	
+	//}
+	public void testForLoopTemplateDefault() throws Exception {
+		assertFormatterResult();
+	}
+
+	//for(int var=0; var<max; var++) {
+	//	${cursor}
+	//}
+	
+	//for(int var=0; var<max; var++) {
+	//    
+	//}
+	public void testForLoopTemplateMixedIndent() throws Exception {
+		setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, DefaultCodeFormatterConstants.MIXED);
+		setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, Integer.toString(8));
+		assertFormatterResult();
+	}
+
+	//for(int var=0; var<max; var++) {
+	//	${line_selection}
+	//}
+	
+	//for(int var=0; var<max; var++) {
+	//	while (true) {
+	//		doSomething();
+	//	}
+	//}
+	public void testSourroundWithForLoopTemplateDefault() throws Exception {
+		assertFormatterResult();
+	}
+
+	//for(int var=0; var<max; var++) {
+	//	${line_selection}
+	//}
+	
+	//for(int var=0; var<max; var++) {
+	//    while (true) {
+	//	doSomething();
+	//    }
+	//}
+	public void testSourroundWithForLoopTemplateMixedIndent() throws Exception {
+		setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, DefaultCodeFormatterConstants.MIXED);
+		setOption(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, Integer.toString(8));
+		fSelection= "while (true) {\n    doSomething();\n}";
+		assertFormatterResult();
+	}
+	
+	///*!
+	// * \brief ShortFunctionDescription${cursor}.
+	// *
+	// * \return ReturnedValueDescription.
+	// */
+
+	///*!
+	// * \brief ShortFunctionDescription.
+	// *
+	// * \return ReturnedValueDescription.
+	// */
+	public void _testIndentationProblemWithBackslashInComment_Bug274973() throws Exception {
+		assertFormatterResult(true);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/TestCase.txt b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/TestCase.txt
new file mode 100644
index 0000000..16bc625
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/TestCase.txt
@@ -0,0 +1,43 @@
+#include <Simple.h>
+
+const SimpleStruct simpleStruct =
+{
+	1
+  , "mySimple"
+  , 0.1232
+};
+
+#define SIZEOF( A, B ) sizeof( A.B )
+
+const OtherStruct array[] =
+{
+	{
+#if FOO
+		"foo"
+#else
+		"bar"
+#endif
+	  ,	SIZEOF( simpleStruct, num )
+	  , &t_int
+	  , 0
+	}
+  , {
+		"name"
+	  , SIZEOF( simpleStruct, floatnum )
+	  , &t_float
+	  , 1
+	}
+};
+
+
+void SimpleStruct_construct( struct SimpleStruct * const this )
+{
+	this->num = 1;
+	this->name = "boo";
+	this->floatNum = 1.5;
+}
+
+int ConnectParams_doSomething( const struct SimpleStruct * const this )
+{
+	return 1;
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/TestCase2.txt b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/TestCase2.txt
new file mode 100644
index 0000000..0900204
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/TestCase2.txt
@@ -0,0 +1,68 @@
+/*
+ * (c) Copyright QNX Software Systems Ltd. 2002.
+ * All Rights Reserved.
+ */
+/********
+ * This is a sample C file that will be used in testing the TranslationUnit
+ * class.  It has a specific structure that will be looked for within the 
+ * test case.
+ * This file is only ment to contain various C elements, and may not compile
+ * into a running application (but should be valid C)
+ */
+ 
+#include <stdio.h>
+#include <unistd.h>
+
+/* A function prototype */
+int func2p(void); 
+
+/* A global variable */
+int globalvar;
+
+/* A enumeration */
+enum myenum {ENUM_A=1, ENUM_B=2, ENUM_C=3, ENUM_D=4};
+
+/* A structure. This also includes a typedef around the strcture def
+ * which at the time of writing was not picked up.
+ */
+typedef struct mystruct {
+	int a;
+	char b;
+	long c;
+} mystruct_t; 
+
+/* A union */
+union myunion {
+	int x;
+	char y;
+	long z;
+};
+
+/* A typedef */
+typedef struct mystruct mytype;
+
+
+/* A couple functions */
+ 
+void * func1(void)
+{
+	return(NULL);
+}
+
+
+int func2(void)
+{
+	return(0);
+}
+ 
+int main(int argc, char ** argv)
+{
+	int var1;
+	printf("Hello world\n");
+}
+
+
+void func3()
+{
+	printf("This is not really here\n");
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/TextTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/TextTestSuite.java
new file mode 100644
index 0000000..03a27cb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/TextTestSuite.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *    Andrew Ferguson (Symbian)
+ *    Sergey Prigogin (Google)
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.text;
+
+import junit.framework.TestSuite;
+
+import org.eclipse.cdt.ui.tests.text.doctools.DocCommentTestSuite;
+
+public class TextTestSuite extends TestSuite {
+
+    public static TestSuite suite() {
+        return new TextTestSuite();
+    }
+    
+    public TextTestSuite() {
+        super(TextTestSuite.class.getName());
+
+        // documentation tool extension tests
+        addTest(DocCommentTestSuite.suite());
+        
+        // partitioning tests
+		addTest(PartitionTokenScannerTest.suite());
+		addTest(CPartitionerTest.suite());
+		addTest(AsmPartitionerTest.suite());
+
+        // smart edit tests
+		addTest(CAutoIndentTest.suite());
+		addTest(CHeuristicScannerTest.suite());
+		addTest(BracketInserterTest.suite());
+		addTest(IndentActionTest.suite());
+		addTest(FormatActionTest.suite());
+		addTest(ShiftActionTest.suite());
+		addTest(CodeFormatterTest.suite());
+		addTest(CIndenterTest.suite());
+		addTest(TemplateFormatterTest.suite());
+		
+		// Break iterator tests.
+		addTest(CBreakIteratorTest.suite());
+		addTest(CWordIteratorTest.suite());
+
+		// highlighting tests
+		addTest(SemanticHighlightingTest.suite());
+		addTest(InactiveCodeHighlightingTest.suite());
+		addTest(CHeaderRuleTest.suite());
+		addTest(NumberRuleTest.suite());
+		addTest(PairMatcherTest.suite());
+		addTest(MarkOccurrenceTest.suite());
+
+		// folding tests
+		addTest(FoldingTest.suite());
+		
+		// basic editing tests
+		addTest(BasicCEditorTest.suite());
+		
+		// editor hyperlink tests
+		addTest(HyperlinkTest.suite());
+
+		// word detection
+		addTest(CWordFinderTest.suite());
+		
+		// compare tests
+		addTest(CStructureCreatorTest.suite());
+		
+		// block comment tests
+		addTest(AddBlockCommentTest.suite());
+		addTest(RemoveBlockCommentTest.suite());
+	
+		// add include
+		addTest(AddIncludeTest.suite());
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ContentAssistTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ContentAssistTestSuite.java
new file mode 100644
index 0000000..f97faa4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ContentAssistTestSuite.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.text.contentassist;
+
+import junit.framework.TestSuite;
+
+public class ContentAssistTestSuite extends TestSuite {
+
+    public static TestSuite suite() {
+        return new ContentAssistTestSuite();
+    }
+    
+    public ContentAssistTestSuite() {
+        super(ContentAssistTestSuite.class.getName());
+        
+		addTest( ContentAssistTests.suite() );
+        
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ContentAssistTests.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ContentAssistTests.java
new file mode 100644
index 0000000..c337a1b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ContentAssistTests.java
@@ -0,0 +1,283 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.StringWriter;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.model.IWorkingCopy;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+import org.eclipse.cdt.ui.text.ICHelpInvocationContext;
+
+import org.eclipse.cdt.internal.ui.CHelpProviderManager;
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.internal.ui.text.CHelpBookDescriptor;
+import org.eclipse.cdt.internal.ui.text.contentassist.CContentAssistProcessor;
+
+/**
+ * @author aniefer
+ */
+public class ContentAssistTests extends BaseUITestCase {
+    private NullProgressMonitor		monitor= new NullProgressMonitor();
+    static IProject 				project;
+    static boolean 					disabledHelpContributions = false;
+    
+    @Override
+	public void setUp() {
+		//(CCorePlugin.getDefault().getCoreModel().getIndexManager()).reset();
+    	
+    	if (project == null) {
+    		ICProject cPrj;
+    		try {
+    			cPrj = CProjectHelper.createCCProject("ContentAssistTestProject", "bin", IPDOMManager.ID_FAST_INDEXER); //$NON-NLS-1$ //$NON-NLS-2$
+
+    			project = cPrj.getProject();
+    		} catch ( CoreException e ) {
+    			/*boo*/
+    		}
+    		if (project == null)
+    			fail("Unable to create project"); //$NON-NLS-1$
+    		assertTrue(CCorePlugin.getIndexManager().joinIndexer(10000, monitor));
+    	}
+	}
+    public ContentAssistTests()
+    {
+        super();
+    }
+    /**
+     * @param name
+     */
+    public ContentAssistTests(String name)
+    {
+        super(name);
+    }
+    
+    private void disableContributions (){
+        //disable the help books so we don't get proposals we weren't expecting
+        CHelpBookDescriptor helpBooks[];
+		helpBooks = CHelpProviderManager.getDefault().getCHelpBookDescriptors(new ICHelpInvocationContext(){
+			public IProject getProject(){return project;}
+			public ITranslationUnit getTranslationUnit(){return null;}
+			}
+		);
+		for (CHelpBookDescriptor helpBook : helpBooks) {
+		    if( helpBook != null )
+		        helpBook.enable( false );
+		}
+    }
+    
+    public static Test suite() {
+        TestSuite suite= suite(ContentAssistTests.class, "_");
+        suite.addTest( new ContentAssistTests("cleanupProject") );    //$NON-NLS-1$
+	    return suite;
+    }
+    
+    public void cleanupProject() throws Exception {
+        closeAllEditors();
+        try{
+	        project.delete( true, false, monitor );
+	        project = null;
+	    } catch( Throwable e ){
+	        /*boo*/
+	    }
+    }
+    
+    @Override
+	protected void tearDown() throws Exception {
+        if( project == null || !project.exists() )
+            return;
+        
+        closeAllEditors();
+
+        // wait for indexer before deleting project to avoid errors in the log
+        CCorePlugin.getIndexManager().joinIndexer(10000, monitor);
+		
+        IResource [] members = project.members();
+        for (IResource member : members) {
+            if( member.getName().equals( ".project" ) || member.getName().equals( ".cproject" ) ) //$NON-NLS-1$ //$NON-NLS-2$
+                continue;
+            if (member.getName().equals(".settings"))
+            	continue;
+            try{
+                member.delete( false, monitor );
+            } catch( Throwable e ){
+                /*boo*/
+            }
+        }
+
+	}
+    
+    protected IFile importFile(String fileName, String contents ) throws Exception{
+		//Obtain file handle
+		IFile file = project.getProject().getFile(fileName);
+		
+		InputStream stream = new ByteArrayInputStream( contents.getBytes() );
+		//Create file input stream
+		if( file.exists() )
+		    file.setContents( stream, false, false, monitor );
+		else
+			file.create( stream, false, monitor );
+		
+		return file;
+	}
+    
+    protected ICompletionProposal[] getResults( IFile file, int offset ) throws Exception {
+        if( !disabledHelpContributions )
+            disableContributions();
+        
+	    ITranslationUnit tu = (ITranslationUnit)CoreModel.getDefault().create( file );
+		String buffer = tu.getBuffer().getContents();
+		IWorkingCopy wc = null;
+		try{
+			wc = tu.getWorkingCopy();
+		}catch (CModelException e){
+			fail("Failed to get working copy"); //$NON-NLS-1$
+		}
+	
+		// call the ContentAssistProcessor
+		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		FileEditorInput editorInput = new FileEditorInput(file);
+		IEditorPart editorPart = page.openEditor(editorInput, "org.eclipse.cdt.ui.editor.CEditor");
+		CEditor editor = (CEditor) editorPart ;
+		IAction completionAction = editor.getAction("ContentAssistProposal");
+
+		String contentType = editor.getViewer().getDocument().getContentType(offset);
+		ContentAssistant assistant = new ContentAssistant();
+		CContentAssistProcessor processor = new CContentAssistProcessor(editor, assistant, contentType);
+		return processor.computeCompletionProposals(editor.getViewer(), offset);
+    }
+    
+    public void testBug69334a() throws Exception {
+        importFile( "test.h", "class Test{ public : Test( int ); }; \n" );  //$NON-NLS-1$//$NON-NLS-2$
+        StringWriter writer = new StringWriter();
+        writer.write( "#include \"test.h\"                \n"); //$NON-NLS-1$
+        writer.write( "Test::Test( int i ) { return; }    \n"); //$NON-NLS-1$
+        writer.write( "int main() {                       \n"); //$NON-NLS-1$
+        writer.write( "   int veryLongName = 1;           \n"); //$NON-NLS-1$
+        writer.write( "   Test * ptest = new Test( very   \n"); //$NON-NLS-1$
+        
+        String code = writer.toString();
+        IFile cu = importFile( "test.cpp", code ); //$NON-NLS-1$
+        
+        ICompletionProposal [] results = getResults( cu, code.indexOf( "very " ) + 4 ); //$NON-NLS-1$
+        
+        assertEquals( 1, results.length );
+        assertEquals( "veryLongName : int", results[0].getDisplayString() ); //$NON-NLS-1$
+    }
+
+    public void testBug69334b() throws Exception {
+        importFile( "test.h", "class Test{ public : Test( int ); }; \n" );  //$NON-NLS-1$//$NON-NLS-2$
+        StringWriter writer = new StringWriter();
+        writer.write( "#include \"test.h\"                \n"); //$NON-NLS-1$
+        writer.write( "Test::Test( int i ) { return; }    \n"); //$NON-NLS-1$
+        writer.write( "int main() {                       \n"); //$NON-NLS-1$
+        writer.write( "   int veryLongName = 1;           \n"); //$NON-NLS-1$
+        writer.write( "   Test test( very   \n"); //$NON-NLS-1$
+        
+        String code = writer.toString();
+        IFile cu = importFile( "test.cpp", code ); //$NON-NLS-1$
+        
+        ICompletionProposal [] results = getResults( cu, code.indexOf( "very " ) + 4 ); //$NON-NLS-1$
+        
+        assertEquals( 1, results.length );
+        assertEquals( "veryLongName : int", results[0].getDisplayString() ); //$NON-NLS-1$
+    }
+
+    public void testBug72824() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write( "class Strategy {                             \n"); //$NON-NLS-1$
+        writer.write( "public :                                     \n"); //$NON-NLS-1$
+        writer.write( "   enum _Ability { IDIOT, NORMAL, CHEAT } ;  \n"); //$NON-NLS-1$
+        writer.write( "   Strategy( _Ability a ) { }                \n"); //$NON-NLS-1$
+        writer.write( "   _Ability getAbility();                    \n"); //$NON-NLS-1$
+        writer.write( "};                                           \n"); //$NON-NLS-1$
+        writer.write( "int main(){                                  \n"); //$NON-NLS-1$
+        
+        String code = writer.toString();
+        String c2 = code + "   Strategy *p[3] = { new Strategy( Str \n"; //$NON-NLS-1$
+        
+        IFile cu = importFile( "strategy.cpp", c2 ); //$NON-NLS-1$
+        
+        ICompletionProposal [] results = getResults( cu, c2.indexOf( "Str " ) + 3 ); //$NON-NLS-1$
+        assertEquals( 1, results.length );
+        assertEquals( "Strategy", results[0].getDisplayString() ); //$NON-NLS-1$
+        
+        c2 = code + "   Strategy *p[3] = { new Strategy( Strategy:: \n"; //$NON-NLS-1$
+
+        cu = importFile( "strategy.cpp", c2 ); //$NON-NLS-1$
+        
+        results = getResults( cu, c2.indexOf( "::" ) + 2 ); //$NON-NLS-1$
+        assertEquals( 4, results.length );
+        assertEquals( "CHEAT", results[0].getDisplayString()  ); //$NON-NLS-1$
+        assertEquals( "IDIOT", results[1].getDisplayString()  ); //$NON-NLS-1$
+        assertEquals( "NORMAL", results[2].getDisplayString()  ); //$NON-NLS-1$
+        // "_Ability" is here due to fix for bug 199598 
+        // Difficult to differentiate between declaration and expression context
+        assertEquals( "_Ability", results[3].getDisplayString()  ); //$NON-NLS-1$
+
+        // in a method definition context, constructors and methods should be proposed
+        
+        c2 = code + "return 0;}\nStrategy::\n"; //$NON-NLS-1$
+
+        cu = importFile( "strategy.cpp", c2 ); //$NON-NLS-1$
+        
+        results = getResults( cu, c2.indexOf( "::" ) + 2 ); //$NON-NLS-1$
+        assertEquals( 3, results.length );
+        assertEquals( "getAbility(void) : enum _Ability", results[1].getDisplayString()  ); //$NON-NLS-1$
+        assertEquals( "Strategy(enum _Ability a)", results[0].getDisplayString()  ); //$NON-NLS-1$
+        assertEquals( "_Ability", results[2].getDisplayString()  ); //$NON-NLS-1$
+}
+    
+    public void testBug72559() throws Exception {
+        StringWriter writer = new StringWriter();
+        writer.write("void foo(){               \n"); //$NON-NLS-1$
+        writer.write("   int var;               \n"); //$NON-NLS-1$
+        writer.write("   {                      \n"); //$NON-NLS-1$
+        writer.write("      float var;          \n"); //$NON-NLS-1$
+        writer.write("      v                   \n"); //$NON-NLS-1$
+        writer.write("   }                      \n"); //$NON-NLS-1$
+        writer.write("}                         \n"); //$NON-NLS-1$
+
+        String code = writer.toString();
+        IFile cu = importFile( "t.cpp", code ); //$NON-NLS-1$
+        ICompletionProposal [] results = getResults( cu, code.indexOf( "v " ) + 1 ); //$NON-NLS-1$
+        
+        assertEquals( results.length, 3 );
+        assertEquals( results[0].getDisplayString(), "var : float" ); //$NON-NLS-1$
+        assertEquals( results[1].getDisplayString(), "virtual" ); //$NON-NLS-1$
+        assertEquals( results[2].getDisplayString(), "volatile" ); //$NON-NLS-1$
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ProposalFilterPreferencesTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ProposalFilterPreferencesTest.java
new file mode 100644
index 0000000..1016f48
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/ProposalFilterPreferencesTest.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Norbert Ploett and others.
+ * 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
+ *
+ * Contributors:
+ * Norbert Ploett (Seimens) - Initial Contribution
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+import org.eclipse.cdt.ui.CUIPlugin;
+
+import org.eclipse.cdt.internal.ui.preferences.ProposalFilterPreferencesUtil;
+import org.eclipse.cdt.internal.ui.text.contentassist.ContentAssistPreference;
+
+/** 
+ * This test covers the convenience methods 
+ * in org.eclipse.cdt.internal.ui.preferences.ProposalFilterPreferencesUtil
+ */
+public class ProposalFilterPreferencesTest extends TestCase {
+
+	public void testPreferences()  {
+		// Check that the test filter is among the filternames
+		String[] filterNames = ProposalFilterPreferencesUtil.getProposalFilterNames();
+		int index = -1 ;
+		for (int i = 0; i < filterNames.length; i++) {
+			String name = filterNames[i];
+			if (name.equals("Testing Completion Filter"))  {
+				index = i ;
+				break ;
+			}
+		}
+		assertTrue("Did not find expected filter!", index>=0);
+		
+		// Set the preference to the tested filter 
+		IPreferenceStore store = CUIPlugin.getDefault().getPreferenceStore();
+		String filterComboStateString = store.getString(ContentAssistPreference.PROPOSALS_FILTER);
+		ProposalFilterPreferencesUtil.ComboState state = ProposalFilterPreferencesUtil.getComboState(filterComboStateString);
+		StringBuffer newStateText = new StringBuffer();
+		newStateText.append(index+1); // First entry is always the <Default Filter>, index+1 must be selected
+		for (int i = 0; i < state.items.length; i++) {
+			String item = state.items[i];
+			newStateText.append(";");
+			newStateText.append(item);
+		}
+		store.setValue(ContentAssistPreference.PROPOSALS_FILTER, newStateText.toString());
+		
+		// Now we can test preferred filter retrieval:
+		IConfigurationElement preferredElement = ProposalFilterPreferencesUtil.getPreferredFilterElement();
+		String extensionId = preferredElement.getAttribute("id");
+		assertNotNull("Configuration element was not found!", extensionId);
+		assertEquals("Unexpected element id", "org.eclipse.cdt.ui.tests.TestProposalFilter", extensionId);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/TestProposalFilter.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/TestProposalFilter.java
new file mode 100644
index 0000000..85abbc9
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/TestProposalFilter.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Norbert Ploett and others.
+ * 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
+ *
+ * Contributors:
+ * Norbert Ploett (Seimens) - Initial Contribution
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist;
+
+import org.eclipse.cdt.ui.text.ICCompletionProposal;
+import org.eclipse.cdt.ui.text.contentassist.IProposalFilter;
+
+/**
+ * Dummy filter implementation for testing purposes
+ */
+public class TestProposalFilter implements IProposalFilter {
+
+	/**
+	 * This dummy filter method will return the original proposals unmodified.
+	 */
+	public ICCompletionProposal[] filterProposals(
+			ICCompletionProposal[] proposals) {
+		return proposals ;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/AbstractContentAssistTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/AbstractContentAssistTest.java
new file mode 100644
index 0000000..5edd645
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/AbstractContentAssistTest.java
@@ -0,0 +1,256 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Rational Software - Initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *     Bryan Wilkinson (QNX)
+ *     Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.templates.TemplateProposal;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+import org.eclipse.cdt.ui.tests.text.EditorTestHelper;
+import org.eclipse.cdt.ui.text.ICCompletionProposal;
+import org.eclipse.cdt.ui.text.ICPartitions;
+
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase;
+
+import org.eclipse.cdt.internal.ui.text.contentassist.CCompletionProposal;
+import org.eclipse.cdt.internal.ui.text.contentassist.CContentAssistProcessor;
+import org.eclipse.cdt.internal.ui.text.contentassist.RelevanceConstants;
+
+public abstract class AbstractContentAssistTest extends BaseUITestCase {
+
+	public static final int COMPARE_ID_STRINGS = 0;
+	public static final int COMPARE_DISP_STRINGS = 1;
+	public static final int COMPARE_REP_STRINGS = 2;
+	
+	protected ICProject fCProject;
+	private IFile fCFile;
+	protected ITextEditor fEditor;
+	private boolean fIsCpp;
+
+	public AbstractContentAssistTest(String name, boolean isCpp) {
+		super(name);
+		fIsCpp= isCpp;
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		if (fIsCpp) {
+			fCProject= CProjectHelper.createCCProject(getName(), "unused", IPDOMManager.ID_FAST_INDEXER);
+		}
+		else {
+			fCProject= CProjectHelper.createCProject(getName(), "unused", IPDOMManager.ID_FAST_INDEXER);
+		}
+		fCFile= setUpProjectContent(fCProject.getProject());
+		assertNotNull(fCFile);
+		CCorePlugin.getIndexManager().joinIndexer(8000, new NullProgressMonitor());
+		fEditor= (ITextEditor)EditorTestHelper.openInEditor(fCFile, true);
+		assertNotNull(fEditor);
+		CPPASTNameBase.sAllowNameComputation= true;
+
+//		EditorTestHelper.joinBackgroundActivities((AbstractTextEditor)fEditor);
+	}
+
+	/**
+	 * Setup the project's content.
+	 * @param project
+	 * @return  the file to be opened in the editor
+	 * @throws Exception 
+	 */
+	protected abstract IFile setUpProjectContent(IProject project) throws Exception;
+
+	@Override
+	protected void tearDown() throws Exception {
+		EditorTestHelper.closeEditor(fEditor);
+		fEditor= null;
+		CProjectHelper.delete(fCProject);
+		fCProject= null;
+		fCFile= null;
+		super.tearDown();
+	}
+
+	protected void assertContentAssistResults(int offset, String[] expected, boolean isCompletion, int compareType) throws Exception {
+
+		if (CTestPlugin.getDefault().isDebugging())  {
+			System.out.println("\n\n\n\n\nTesting "+this.getClass().getName());
+		}
+
+		//Call the CContentAssistProcessor
+		ISourceViewer sourceViewer= EditorTestHelper.getSourceViewer((AbstractTextEditor)fEditor);
+		String contentType= TextUtilities.getContentType(sourceViewer.getDocument(), ICPartitions.C_PARTITIONING, offset, true);
+		boolean isCode= IDocument.DEFAULT_CONTENT_TYPE.equals(contentType);
+		ContentAssistant assistant = new ContentAssistant();
+		CContentAssistProcessor processor = new CContentAssistProcessor(fEditor, assistant, contentType);
+		long startTime= System.currentTimeMillis();
+		Object[] results = isCompletion
+			? (Object[]) processor.computeCompletionProposals(sourceViewer, offset)
+			: (Object[]) processor.computeContextInformation(sourceViewer, offset);
+		long endTime= System.currentTimeMillis();
+		assertTrue(results != null);
+
+		results= filterResults(results, isCode);
+		String[] resultStrings= toStringArray(results, compareType);
+		Arrays.sort(expected);
+		Arrays.sort(resultStrings);
+
+		if (CTestPlugin.getDefault().isDebugging())  {
+			System.out.println("Time (ms): " + (endTime-startTime));
+			for (int i = 0; i < resultStrings.length; i++) {
+				String proposal = resultStrings[i];
+				System.out.println("Result: " + proposal);
+			}
+		}
+
+		boolean allFound = true ;  // for the time being, let's be optimistic
+
+		for (int i = 0; i< expected.length; i++){
+			boolean found = false;
+			for(int j = 0; j< resultStrings.length; j++){
+				String proposal = resultStrings[j];
+				if(expected[i].equals(proposal)){
+					found = true;
+					if (CTestPlugin.getDefault().isDebugging())  {
+						System.out.println("Lookup success for " + expected[i]);
+					}
+					break;
+				}
+			}
+			if (!found)  {
+				allFound = false ;
+				if (CTestPlugin.getDefault().isDebugging())  {
+					System.out.println( "Lookup failed for " + expected[i]); //$NON-NLS-1$
+				}
+			}
+		}
+
+		if (!allFound) {
+			assertEquals("Missing results!", toString(expected), toString(resultStrings));
+		} else if (doCheckExtraResults())  {
+			assertEquals("Extra results!", toString(expected), toString(resultStrings));
+		}
+
+	}
+
+	/**
+	 * Filter out template and keyword proposals.
+	 * @param results
+	 * @param isCodeCompletion  completion is in code, not preprocessor, etc.
+	 * @return filtered proposals
+	 */
+	private Object[] filterResults(Object[] results, boolean isCodeCompletion) {
+		List<Object> filtered= new ArrayList<Object>();
+		for (int i = 0; i < results.length; i++) {
+			Object result = results[i];
+			if (result instanceof TemplateProposal) {
+				continue;
+			}
+			if (result instanceof ICCompletionProposal) {
+				if (isCodeCompletion) {
+					// check for keywords proposal
+					int relevance = ((ICCompletionProposal)result).getRelevance();
+					if (relevance >= RelevanceConstants.CASE_MATCH_RELEVANCE) {
+						relevance -= RelevanceConstants.CASE_MATCH_RELEVANCE;
+					}
+					if (relevance <= RelevanceConstants.KEYWORD_TYPE_RELEVANCE) {
+						continue;
+					}
+				}
+				filtered.add(result);
+			} else if (result instanceof IContextInformation) {
+				filtered.add(result);
+			}
+		}
+		return filtered.toArray();
+	}
+	
+	private String[] toStringArray(Object[] results, int compareType) {
+		String[] strings= new String[results.length];
+		for(int i=0; i< results.length; i++){
+			Object result = results[i];
+			if (result instanceof CCompletionProposal) {
+				if (compareType == COMPARE_ID_STRINGS) {
+					strings[i]= ((CCompletionProposal)result).getIdString();
+				} else if (compareType == COMPARE_DISP_STRINGS) {
+					strings[i]= ((CCompletionProposal)result).getDisplayString();
+				} else {
+					strings[i]= ((CCompletionProposal)result).getReplacementString();
+				}
+			} else if (result instanceof ICCompletionProposal) {
+				if (compareType == COMPARE_ID_STRINGS) {
+					strings[i]= ((ICCompletionProposal)result).getIdString();
+				} else if (compareType == COMPARE_DISP_STRINGS) {
+					strings[i]= ((ICCompletionProposal)result).getDisplayString();
+				} else {
+					strings[i]= ((ICCompletionProposal)result).getDisplayString();
+				}
+			} else if (result instanceof ICompletionProposal) {
+				strings[i]= ((ICompletionProposal)result).getDisplayString();
+			} else if (result instanceof IContextInformation) {
+				strings[i]= ((IContextInformation)result).getContextDisplayString();
+			} else {
+				strings[i]= result.toString();
+			}
+		}
+		return strings;
+	}
+	
+	private String toString(String[] strings) {
+		StringBuffer buf= new StringBuffer();
+		for(int i=0; i< strings.length; i++){
+			buf.append(strings[i]).append('\n');
+		}
+		return buf.toString();
+	}
+
+	/**
+	 * Override to relax checking of extra results
+	 */
+	protected boolean doCheckExtraResults() {
+		return true ;
+	}
+
+	/**
+	 * @return  the content of the editor buffer
+	 */
+	protected String getBuffer() {
+		return getDocument().get();
+	}
+	
+	/**
+	 * @return  the editor document
+	 */
+	protected IDocument getDocument() {
+		return EditorTestHelper.getDocument(fEditor);
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionProposalsBaseTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionProposalsBaseTest.java
new file mode 100644
index 0000000..39de068
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionProposalsBaseTest.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Rational Software - Initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *     Bryan Wilkinson (QNX)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+/**
+ * @author hamer
+ *
+ *	This abstract class is the base class for all completion proposals test cases
+ *	 
+ */
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+
+public abstract class CompletionProposalsBaseTest extends AbstractContentAssistTest {
+
+	private boolean fFailingTest;
+
+	public CompletionProposalsBaseTest(String name) {
+		super(name, true);
+	}
+
+	public CompletionProposalsBaseTest(String name, boolean isCpp) {
+		super(name, isCpp);
+	}
+	
+	/*
+	 * @see junit.framework.TestCase#getName()
+	 */
+	public String getName() {
+		if (fFailingTest) {
+			return "[Failing] " + super.getName();
+		}
+		return super.getName();
+	}
+
+	/*
+	 * @see org.eclipse.cdt.core.testplugin.util.BaseTestCase#setExpectFailure(int)
+	 */
+	public void setExpectFailure(int bugnumber) {
+		super.setExpectFailure(bugnumber);
+		fFailingTest= true;
+	}
+
+	/*
+	 * Derived classes have to provide the file locations
+	 */
+	protected abstract String getFileName();
+	protected abstract String getFileFullPath();
+	protected abstract String getHeaderFileName();
+	protected abstract String getHeaderFileFullPath();
+	/*
+	 * Derived classes have to provide these test parameters
+	 */
+	protected abstract int getCompletionPosition();
+	protected abstract String getExpectedPrefix();
+	protected abstract String[] getExpectedResultsValues();
+
+	protected IFile setUpProjectContent(IProject project) throws FileNotFoundException {
+		IFile headerFile = project.getFile(getHeaderFileName());
+		String fileName = getFileName();
+		IFile bodyFile = project.getFile(fileName);
+		if ( (!bodyFile.exists()) &&( !headerFile.exists() )) {
+			IProgressMonitor monitor= new NullProgressMonitor();
+			try{
+				FileInputStream headerFileIn = new FileInputStream(
+						CTestPlugin.getDefault().getFileInPlugin(new Path(getHeaderFileFullPath()))); 
+				headerFile.create(headerFileIn,false, monitor);  
+				FileInputStream bodyFileIn = new FileInputStream(
+						CTestPlugin.getDefault().getFileInPlugin(new Path(getFileFullPath()))); 
+				bodyFile.create(bodyFileIn,false, monitor);        
+			} catch (CoreException e) {
+				e.printStackTrace();
+			}
+		}
+		return bodyFile;
+	}
+
+	protected void assertCompletionResults(int offset, String[] expected, int compareType) throws Exception {
+		assertContentAssistResults(offset, expected, true, compareType);
+	}
+	
+	public void testCompletionProposals() throws Exception {
+		String[] expected = getExpectedResultsValues();
+		assertCompletionResults(getCompletionPosition(), expected,
+				AbstractContentAssistTest.COMPARE_DISP_STRINGS);
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_AnonymousTypes.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_AnonymousTypes.java
new file mode 100644
index 0000000..e6080ba
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_AnonymousTypes.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Symbian Software Ltd.
+ * 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
+ *
+ * Contributors:
+ *        Andrew Ferguson (Symbian) - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Test that anonymous types are not returned as possibilities.
+ */
+public class CompletionTest_AnonymousTypes  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart40.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart40.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "";
+	private final String[] expectedResults = {"notAnonymousEnum", "notAnonymousClass", "xOtherClass"};
+	
+	public CompletionTest_AnonymousTypes(String name) {
+		super(name);
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=174809
+		// setExpectFailure(174809);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_AnonymousTypes.class.getName());
+		suite.addTest(new CompletionTest_AnonymousTypes("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	@Override
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" x ");
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	@Override
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	@Override
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	@Override
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	@Override
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	@Override
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	@Override
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ArgumentType_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ArgumentType_Prefix.java
new file mode 100644
index 0000000..1fa07b2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ArgumentType_Prefix.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Argument_Type completion kind , with a prefix
+ * Bug#50642 : Wrong completion kind when declaring an argument type
+ *
+ */
+public class CompletionTest_ArgumentType_Prefix  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart16.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "a";
+	private final String[] expectedResults = {
+			"aClass",
+			"anotherClass",
+			"aNamespace",
+			"anEnumeration",
+			"AStruct",
+			"AMacro(x)"
+	};
+	
+	public CompletionTest_ArgumentType_Prefix(String name) {
+		super(name);
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724
+		// setExpectFailure(109724);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_ArgumentType_Prefix.class.getName());
+		suite.addTest(new CompletionTest_ArgumentType_Prefix("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" a ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ArgumentType_Prefix2.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ArgumentType_Prefix2.java
new file mode 100644
index 0000000..155603c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ArgumentType_Prefix2.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Argument_Type completion kind , with a prefix
+ * Bug#50642 : Wrong completion kind when declaring an argument type
+ *
+ */
+public class CompletionTest_ArgumentType_Prefix2  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart18.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "a";
+	private final String[] expectedResults = {
+			"aClass",
+			"anotherClass",
+			"aNamespace",
+			"anEnumeration",
+			"AStruct",
+			"AMacro(x)"
+	};
+	
+	public CompletionTest_ArgumentType_Prefix2(String name) {
+		super(name);
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724
+		// setExpectFailure(109724);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_ArgumentType_Prefix2.class.getName());
+		suite.addTest(new CompletionTest_ArgumentType_Prefix2("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" a ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ClassReference_NoPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ClassReference_NoPrefix.java
new file mode 100644
index 0000000..989d4db
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ClassReference_NoPrefix.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ * Bryan Wilkinson (QNX)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Class_Reference, with No prefix
+ * Bug#50621 :Wrong completion kind in a class declaration
+ *
+ */
+public class CompletionTest_ClassReference_NoPrefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart21.h";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = ""; 
+	private final String[] expectedResults = {
+		"aClass",
+		"anotherClass",
+		"xOtherClass"
+	};
+	
+	public CompletionTest_ClassReference_NoPrefix(String name) {
+		super(name);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_ClassReference_NoPrefix.class.getName());
+		suite.addTest(new CompletionTest_ClassReference_NoPrefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("      ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ClassReference_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ClassReference_Prefix.java
new file mode 100644
index 0000000..b3c78b0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ClassReference_Prefix.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Bryan Wilkinson (QNX)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Class_Reference, with prefix
+ * Bug#50621 :Wrong completion kind in a class declaration
+ *
+ */
+public class CompletionTest_ClassReference_Prefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart20.h"; //$NON-NLS-1$
+	private final String fileFullPath ="resources/contentassist/" + fileName; //$NON-NLS-1$
+	private final String headerFileName = "CompletionTestStart.h"; //$NON-NLS-1$
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName; //$NON-NLS-1$
+	private final String expectedPrefix = "a";  //$NON-NLS-1$
+	private final String[] expectedResults = {
+			"aClass", //$NON-NLS-1$
+			"anotherClass" //$NON-NLS-1$
+	};
+	
+	public CompletionTest_ClassReference_Prefix(String name) {
+		super(name);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_ClassReference_Prefix.class.getName());
+		suite.addTest(new CompletionTest_ClassReference_Prefix("testCompletionProposals")); //$NON-NLS-1$
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" a ") + 2; //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ConstructorReference.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ConstructorReference.java
new file mode 100644
index 0000000..1e8d50a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ConstructorReference.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Constructor_Reference
+ * Bug#
+ *
+ */
+public class CompletionTest_ConstructorReference  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart35.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "";  
+	private final String[] expectedResults = {
+			// missing proposals:
+			"xOtherClass(char*)",
+			"xOtherClass(int)"
+	};
+	
+	public CompletionTest_ConstructorReference(String name) {
+		super(name);
+		// unknown failure
+		setExpectFailure(77777);
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_ConstructorReference.class.getName());
+		suite.addTest(new CompletionTest_ConstructorReference("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("(      ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest#getFunctionOrConstructorName()
+	 */
+	protected String getFunctionOrConstructorName() {
+		return "xOtherClass"; 
+	}
+	
+}
+
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ExceptionReference_NoPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ExceptionReference_NoPrefix.java
new file mode 100644
index 0000000..1474fd1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ExceptionReference_NoPrefix.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ * Bryan Wilkinson (QNX)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Exception_Reference, with No prefix
+ * Bug#50640 : Wrong completion kind when expecting an exception
+ *
+ */
+public class CompletionTest_ExceptionReference_NoPrefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart23.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = ""; 
+	private final String[] expectedResults = {
+			"AStruct",
+			"XStruct",
+			"aClass",
+			"aNamespace",
+			"anEnumeration",
+			"anotherClass",
+			"xEnumeration",
+			"xNamespace",
+			"xOtherClass"
+	};
+	
+	public CompletionTest_ExceptionReference_NoPrefix(String name) {
+		super(name);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_ExceptionReference_NoPrefix.class.getName());
+		suite.addTest(new CompletionTest_ExceptionReference_NoPrefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("      ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ExceptionReference_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ExceptionReference_Prefix.java
new file mode 100644
index 0000000..65ae8bf
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ExceptionReference_Prefix.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Exception_Reference, with prefix
+ * Bug#50640 : Wrong completion kind when expecting an exception
+ *
+ */
+public class CompletionTest_ExceptionReference_Prefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart22.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "a"; 
+	private final String[] expectedResults = {
+			"aClass",
+			"anotherClass",
+			"aNamespace",
+			"anEnumeration",
+			"AStruct",
+			"AMacro(x)"
+	};
+	
+	public CompletionTest_ExceptionReference_Prefix(String name) {
+		super(name);
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724
+		// setExpectFailure(109724);
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_ExceptionReference_Prefix.class.getName());
+		suite.addTest(new CompletionTest_ExceptionReference_Prefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" a ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_FieldType_NoPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_FieldType_NoPrefix.java
new file mode 100644
index 0000000..94ab441
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_FieldType_NoPrefix.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ * Bryan Wilkinson (QNX)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Field_Type, with NO prefix
+ *
+ */
+public class CompletionTest_FieldType_NoPrefix  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart12.h";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "";
+	private final String[] expectedResults = {
+			"AStruct",
+			"XStruct",
+			"aClass",
+			"aNamespace",
+			"aThirdClass",
+			"anEnumeration",
+			"anotherClass",
+			"xEnumeration",
+			"xNamespace",
+			"xOtherClass"
+	};
+	
+	public CompletionTest_FieldType_NoPrefix(String name) {
+		super(name);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_FieldType_NoPrefix.class.getName());
+		suite.addTest(new CompletionTest_FieldType_NoPrefix("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("       ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_FieldType_NoPrefix2.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_FieldType_NoPrefix2.java
new file mode 100644
index 0000000..6c9d0e4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_FieldType_NoPrefix2.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ * Bryan Wilkinson (QNX)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Class scope, declaration start, with NO prefix
+ * Bug#50344 :Wrong completion in Class scope if before the first declaration
+ *
+ */
+public class CompletionTest_FieldType_NoPrefix2  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart13.h";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "";
+	private final String[] expectedResults = {
+			"AStruct",
+			"XStruct",
+			"aClass",
+			"aNamespace",
+			"aThirdClass",
+			"anEnumeration",
+			"anotherClass",
+			"xEnumeration",
+			"xNamespace",
+			"xOtherClass"
+	};
+	
+	public CompletionTest_FieldType_NoPrefix2(String name) {
+		super(name);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_FieldType_NoPrefix2.class.getName());
+		suite.addTest(new CompletionTest_FieldType_NoPrefix2("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("      ") + 3;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_FieldType_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_FieldType_Prefix.java
new file mode 100644
index 0000000..b244071
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_FieldType_Prefix.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Field_Type completion kind , with a prefix
+ *
+ */
+public class CompletionTest_FieldType_Prefix  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart4.h";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "a";
+	private final String[] expectedResults = {
+			"aClass",
+			"anotherClass",
+			"aThirdClass",
+			"aNamespace",
+			"anEnumeration",
+			"AStruct",
+			"AMacro(x)"
+	};
+	
+	public CompletionTest_FieldType_Prefix(String name) {
+		super(name);
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724
+		// setExpectFailure(109724);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_FieldType_Prefix.class.getName());
+		suite.addTest(new CompletionTest_FieldType_Prefix("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" a ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_FunctionReference_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_FunctionReference_Prefix.java
new file mode 100644
index 0000000..1b0aec1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_FunctionReference_Prefix.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Single_Name_Reference in parameter passing
+ * Bug#
+ *
+ */
+public class CompletionTest_FunctionReference_Prefix  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart36.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "x";
+	private final String[] expectedResults = {
+			"xLocal : int",
+			"xAClassField : float",
+			"xVariable : int",
+			"xAClassMethod(int x) : void",
+			"xFunction(void) : bool",
+			"xOtherFunction(void) : void",
+			"xNamespace",
+			"xOtherClass",
+			"xFirstEnum",
+			"xSecondEnum",
+			"xThirdEnum",
+			"xEnumeration",
+			"XMacro(x, y)",
+			"XStruct"
+	};
+	
+	public CompletionTest_FunctionReference_Prefix(String name) {
+		super(name);
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724
+		//setExpectFailure(109724);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_FunctionReference_Prefix.class.getName());
+		suite.addTest(new CompletionTest_FunctionReference_Prefix("testCompletionProposals"));
+		return suite;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" x ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+	
+	
+	
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest#getFunctionOrConstructorName()
+	 */
+	protected String getFunctionOrConstructorName() {
+		return "xAClassMethod";
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MacroRef_NoPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MacroRef_NoPrefix.java
new file mode 100644
index 0000000..6174158
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MacroRef_NoPrefix.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *  IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Macro_Reference, with no prefix
+ * Bug#50487 :Wrong completion kind and prefix after "#ifdef"
+ *
+ */
+public class CompletionTest_MacroRef_NoPrefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart26.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = ""; 
+	private final String[] expectedResults = {
+			"AMacro(x)",
+			"DEBUG",
+			"XMacro(x, y)",
+			"__CDT_PARSER__",
+			"__DATE__",
+			"__FILE__",
+			"__LINE__",
+			"__STDC__",
+			"__TIME__",
+			"__builtin_constant_p(exp)",
+			"__builtin_va_arg(ap, type)",
+			"__builtin_offsetof(T, m)",
+			"__builtin_types_compatible_p(x, y)",
+			"__complex__",
+			"__cplusplus",
+			"__extension__",
+			"__imag__",
+			"__null",
+			"__offsetof__(x)",
+			"__real__",
+			"__stdcall",
+			"__thread",
+	};
+	
+	public CompletionTest_MacroRef_NoPrefix(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_MacroRef_NoPrefix.class.getName());
+		suite.addTest(new CompletionTest_MacroRef_NoPrefix("testCompletionProposals"));
+		return suite;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	@Override
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("#ifdef ") + 7;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	@Override
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	@Override
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	@Override
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	@Override
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	@Override
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	@Override
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MacroRef_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MacroRef_Prefix.java
new file mode 100644
index 0000000..3e20528
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MacroRef_Prefix.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Macro_Reference, with no prefix
+ * Bug#50487 :Wrong completion kind and prefix after "#ifdef"
+ *
+ */
+public class CompletionTest_MacroRef_Prefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart27.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "D"; 
+	private final String[] expectedResults = {
+			"DEBUG"
+	};
+	
+	public CompletionTest_MacroRef_Prefix(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_MacroRef_Prefix.class.getName());
+		suite.addTest(new CompletionTest_MacroRef_Prefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("ifdef D ") + 7;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_NoPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_NoPrefix.java
new file mode 100644
index 0000000..c52f878
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_NoPrefix.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Member_Reference, with NO prefix
+ * After an ->
+ *
+ */
+
+public class CompletionTest_MemberReference_Arrow_NoPrefix  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart10.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "";
+	private final String[] expectedResults = {
+			"aField : int",
+			"xAClassField : float",
+			"aMethod(void) : int",
+			"xAClassMethod(int x) : void",
+			"aClass" // aClass is valid
+	};
+	
+	public CompletionTest_MemberReference_Arrow_NoPrefix(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_MemberReference_Arrow_NoPrefix.class.getName());
+		suite.addTest(new CompletionTest_MemberReference_Arrow_NoPrefix("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" c-> ") + 4;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_NoPrefix2.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_NoPrefix2.java
new file mode 100644
index 0000000..3e036eb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_NoPrefix2.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Symbian - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Test operator is followed during member reference
+ */
+public class CompletionTest_MemberReference_Arrow_NoPrefix2  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart41.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart41.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "";
+	private final String[] expectedResults = {
+			"A", "foo(void) : void",
+			"operator ->(void) : B *"
+	};
+	
+	public CompletionTest_MemberReference_Arrow_NoPrefix2(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_MemberReference_Arrow_NoPrefix2.class.getName());
+		suite.addTest(new CompletionTest_MemberReference_Arrow_NoPrefix2("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" ap-> ") + 5;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_NoPrefix3.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_NoPrefix3.java
new file mode 100644
index 0000000..c26afe5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_NoPrefix3.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Symbian - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Testing operator is not followed on pointer to class with overloaded operator ->
+ */
+public class CompletionTest_MemberReference_Arrow_NoPrefix3  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart42.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart41.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "";
+	private final String[] expectedResults = {
+			"B", "bar(void) : void"
+	};
+	
+	public CompletionTest_MemberReference_Arrow_NoPrefix3(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_MemberReference_Arrow_NoPrefix3.class.getName());
+		suite.addTest(new CompletionTest_MemberReference_Arrow_NoPrefix3("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("a->")+3;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_Prefix.java
new file mode 100644
index 0000000..bb079c0
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_Prefix.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Member_Reference, with a prefix
+ * After an ->
+ *
+ */
+public class CompletionTest_MemberReference_Arrow_Prefix  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart6.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "a";
+	private final String[] expectedResults = {
+			"aField : int",
+			"aMethod(void) : int",
+			"aClass" // aClass is valid
+	};
+	
+	public CompletionTest_MemberReference_Arrow_Prefix(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_MemberReference_Arrow_Prefix.class.getName());
+		suite.addTest(new CompletionTest_MemberReference_Arrow_Prefix("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" c->a ") + 5;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_Prefix2.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_Prefix2.java
new file mode 100644
index 0000000..46c234a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Arrow_Prefix2.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Member_Reference, with a prefix
+ * Complex Context: Function return value: foo()->a(CTRL+SPACE)
+ *
+ */
+public class CompletionTest_MemberReference_Arrow_Prefix2  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart7.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "a";
+	private final String[] expectedResults = {
+			"aClass", // aClass is valid
+			"aField : int",
+			"aMethod(void) : int"
+	};
+	
+	public CompletionTest_MemberReference_Arrow_Prefix2(String name) {
+		super(name) ;
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_MemberReference_Arrow_Prefix2.class.getName());
+		suite.addTest(new CompletionTest_MemberReference_Arrow_Prefix2("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("->a ") + 3;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Dot_NoPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Dot_NoPrefix.java
new file mode 100644
index 0000000..7eb7179
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Dot_NoPrefix.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Member_Reference, with NO prefix
+ * After a .
+ *
+ */
+public class CompletionTest_MemberReference_Dot_NoPrefix  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart9.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "" ;
+	private final String[] expectedResults = {
+			"aField : int",
+			"xAClassField : float",
+			"aMethod(void) : int",
+			"xAClassMethod(int x) : void",
+			"aClass" // aClass is valid
+	};
+	
+	public CompletionTest_MemberReference_Dot_NoPrefix(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_MemberReference_Dot_NoPrefix.class.getName());
+		suite.addTest(new CompletionTest_MemberReference_Dot_NoPrefix("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" c. ") + 3;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Dot_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Dot_Prefix.java
new file mode 100644
index 0000000..e097188
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_MemberReference_Dot_Prefix.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Member_Reference completion kind, with a prefix
+ * After a .
+ *
+ */
+public class CompletionTest_MemberReference_Dot_Prefix  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart2.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "a";
+	private final String[] expectedResults = {
+			"aField : int",
+			"aMethod(void) : int",
+			"aClass" // aClass is valid
+	};
+	
+	public CompletionTest_MemberReference_Dot_Prefix(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_MemberReference_Dot_Prefix.class.getName());
+		suite.addTest(new CompletionTest_MemberReference_Dot_Prefix("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" c.a ") + 4;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_NamespaceRef_NoPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_NamespaceRef_NoPrefix.java
new file mode 100644
index 0000000..8dbc601
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_NamespaceRef_NoPrefix.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ * Bryan Wilkinson (QNX)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Namespace_Reference, with no prefix
+ * Bug#50471 : Wrong completion kind after the "using" keyword
+ *
+ */
+public class CompletionTest_NamespaceRef_NoPrefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart32.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = ""; 
+	private final String[] expectedResults = {
+			"aNamespace",
+			"xNamespace"
+	};
+	
+	public CompletionTest_NamespaceRef_NoPrefix(String name) {
+		super(name);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_NamespaceRef_NoPrefix.class.getName());
+		suite.addTest(new CompletionTest_NamespaceRef_NoPrefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("namespace ") + 10;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_NamespaceRef_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_NamespaceRef_Prefix.java
new file mode 100644
index 0000000..162cbdc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_NamespaceRef_Prefix.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ * Bryan Wilkinson (QNX)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Namespace_Reference, with prefix
+ * Bug#50471 : Wrong completion kind after the "using" keyword
+ *
+ */
+public class CompletionTest_NamespaceRef_Prefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart33.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "a"; 
+	private final String[] expectedResults = {
+			"aNamespace"
+	};
+	
+	public CompletionTest_NamespaceRef_Prefix(String name) {
+		super(name);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_NamespaceRef_Prefix.class.getName());
+		suite.addTest(new CompletionTest_NamespaceRef_Prefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("namespace a ") + 11;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_NewTypeReference_NoPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_NewTypeReference_NoPrefix.java
new file mode 100644
index 0000000..996afe5
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_NewTypeReference_NoPrefix.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Class_Reference, with prefix
+ * Bug#50711 : Wrong completion kind in a new expression
+ *
+ */
+public class CompletionTest_NewTypeReference_NoPrefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart29.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = ""; 
+	private final String[] expectedResults = {
+			"aClass",
+			"anotherClass",
+			"AStruct",
+			"xOtherClass",
+			"XStruct",
+			"aNamespace",
+			"xNamespace",
+			// enums may not be desired, but valid
+			"anEnumeration",
+			"xEnumeration"
+	};
+	
+	public CompletionTest_NewTypeReference_NoPrefix(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_NewTypeReference_NoPrefix.class.getName());
+		suite.addTest(new CompletionTest_NewTypeReference_NoPrefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("      ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_NewTypeReference_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_NewTypeReference_Prefix.java
new file mode 100644
index 0000000..3a151dd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_NewTypeReference_Prefix.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Class_Reference, with prefix
+ * Bug#50711 : Wrong completion kind in a new expression
+ *
+ */
+public class CompletionTest_NewTypeReference_Prefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart28.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "a"; 
+	private final String[] expectedResults = {
+			"aClass",
+			"anotherClass",
+			"aNamespace",
+			"AStruct",
+			"anEnumeration",
+			"AMacro(x)"
+	};
+	
+	public CompletionTest_NewTypeReference_Prefix(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_NewTypeReference_Prefix.class.getName());
+		suite.addTest(new CompletionTest_NewTypeReference_Prefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" a ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ScopedReference_NoPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ScopedReference_NoPrefix.java
new file mode 100644
index 0000000..bbd8736
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ScopedReference_NoPrefix.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Scoped_Reference, with no prefix
+ * Bug#50152: Wrong context sent after a "::"
+ *
+ */
+public class CompletionTest_ScopedReference_NoPrefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart30.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "";
+	private final String[] expectedResults = {
+			 "aNamespaceFunction(void) : void" 
+	};
+	
+	public CompletionTest_ScopedReference_NoPrefix(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_ScopedReference_NoPrefix.class.getName());
+		suite.addTest(new CompletionTest_ScopedReference_NoPrefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(":: ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ScopedReference_NonCodeScope.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ScopedReference_NonCodeScope.java
new file mode 100644
index 0000000..8d893bd
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ScopedReference_NonCodeScope.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Scoped_Reference, with no prefix
+ * Bug#50152: Wrong context sent after a "::"
+ *
+ */
+public class CompletionTest_ScopedReference_NonCodeScope  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart39.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "";
+	private final String[] expectedResults = {
+			 "Foo(void)",
+			 "bar(void) : void",
+			 "fum(void) : void",
+			 "x : int"
+	};
+	
+	public CompletionTest_ScopedReference_NonCodeScope(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_ScopedReference_NonCodeScope.class.getName());
+		suite.addTest(new CompletionTest_ScopedReference_NonCodeScope("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(":: ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ScopedReference_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ScopedReference_Prefix.java
new file mode 100644
index 0000000..8655545
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_ScopedReference_Prefix.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Scoped_Reference, with a prefix
+ * Bug#50152: Wrong context sent after a "::"
+ *
+ */
+public class CompletionTest_ScopedReference_Prefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart31.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "a";
+	private final String[] expectedResults = {
+			"aNamespaceFunction(void) : void"
+	};
+	
+	public CompletionTest_ScopedReference_Prefix(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_ScopedReference_Prefix.class.getName());
+		suite.addTest(new CompletionTest_ScopedReference_Prefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("::a ") + 3;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_Method_NoPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_Method_NoPrefix.java
new file mode 100644
index 0000000..88b6230
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_Method_NoPrefix.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing statement start, with no prefix
+ * Lookup.THIS
+ *
+ */
+public class CompletionTest_SingleName_Method_NoPrefix  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart5.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "";
+	
+	private final String[] expectedResults = {
+			"AStruct",
+			"XStruct",
+			"aClass",
+			"aFirstEnum",
+			"aFunction(void) bool",
+			"aNamespace",
+			"aSecondEnum",
+			"aThirdEnum",
+			"aVariable : int",
+			"anEnumeration",
+			"anotherClass",
+			"anotherField : int",
+			"anotherFunction(void) void",
+			"anotherMethod(void) void",
+			"xEnumeration",
+			"xFirstEnum",
+			"xFunction(void) bool",
+			"xNamespace",
+			"xOtherClass",
+			"xOtherFunction(void) void",
+			"xSecondEnum",
+			"xThirdEnum",
+			"xVariable : int",
+			"~anotherClass(void) " 
+			// extra result
+			// "operator =(const anotherClass &) anotherClass &",
+	};
+	
+	public CompletionTest_SingleName_Method_NoPrefix(String name) {
+		super(name);
+		// operators should not be proposed
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=172304
+		setExpectFailure(172304);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_SingleName_Method_NoPrefix.class.getName());
+		suite.addTest(new CompletionTest_SingleName_Method_NoPrefix("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("    ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_Method_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_Method_Prefix.java
new file mode 100644
index 0000000..3686721
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_Method_Prefix.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     Rational Software - initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing statement start completion kind, with a prefix
+ *
+ */
+public class CompletionTest_SingleName_Method_Prefix	  extends CompletionProposalsBaseTest{
+		
+	private final String fileName = "CompletionTestStart1.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "a";
+	private final String[] expectedResults = {
+			"anotherField : int",
+			"aVariable : int",
+			"anotherMethod(void) : void",
+			"aFunction(void) : bool",
+			"anotherFunction(void) : void",
+			"aClass",
+			"anotherClass",
+			"anotherClass(const anotherClass &)",
+			"anotherClass(void)",
+			"aNamespace",
+			"anEnumeration",
+			"aFirstEnum",
+			"aSecondEnum",
+			"aThirdEnum",
+			"AStruct",
+			"AMacro(x)"
+	};
+	
+	public CompletionTest_SingleName_Method_Prefix(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_SingleName_Method_Prefix.class.getName());
+		suite.addTest(new CompletionTest_SingleName_Method_Prefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" a ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_NoPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_NoPrefix.java
new file mode 100644
index 0000000..a595089
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_NoPrefix.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *    IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Single name reference, with prefix 
+ *
+ */
+public class CompletionTest_SingleName_NoPrefix  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart15.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "";
+	private final String[] expectedResults = {
+			"x : int",
+			"aVariable : int",
+			"xVariable : int",
+			"aFunction(void) : bool",
+			"anotherFunction(void) : void",
+			"foo(int x) : void",
+			"xFunction(void) : bool",
+			"xOtherFunction(void) : void",
+			"aClass",
+			"anotherClass",
+			"xOtherClass",
+			"AStruct",
+			"XStruct",
+			"aNamespace",
+			"xNamespace",
+			"anEnumeration",
+			"xEnumeration",
+			"aFirstEnum",
+			"aSecondEnum",
+			"aThirdEnum",
+			"xFirstEnum",
+			"xSecondEnum",
+			"xThirdEnum",
+			"y : int"
+			// note: macros are omitted intentionally
+	};
+	
+	public CompletionTest_SingleName_NoPrefix(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_SingleName_NoPrefix.class.getName());
+		suite.addTest(new CompletionTest_SingleName_NoPrefix("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	@Override
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("      ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	@Override
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	@Override
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	@Override
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	@Override
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	@Override
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	@Override
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_Prefix.java
new file mode 100644
index 0000000..a484dcc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_Prefix.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Single name reference, Macro lookups 
+ *
+ */
+public class CompletionTest_SingleName_Prefix  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart8.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "AM";
+	private final String[] expectedResults = {
+			// missing results
+			"AMacro(x)"
+	};
+	
+	public CompletionTest_SingleName_Prefix(String name) {
+		super(name);
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=171708
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_SingleName_Prefix.class.getName());
+		suite.addTest(new CompletionTest_SingleName_Prefix("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" AM ") + 3;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_Prefix2.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_Prefix2.java
new file mode 100644
index 0000000..0e525cb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_SingleName_Prefix2.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Single name reference, with prefix 
+ *
+ */
+public class CompletionTest_SingleName_Prefix2  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart14.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "a";
+	private final String[] expectedResults = {
+			"aVariable : int",
+			"aFunction(void) : bool",
+			"anotherFunction(void) : void",
+			"aClass",
+			"anotherClass",
+			"aNamespace",
+			"anEnumeration",
+			"aFirstEnum",
+			"aSecondEnum",
+			"aThirdEnum",
+			"AMacro(x)",
+			"AStruct"
+	};
+	
+	public CompletionTest_SingleName_Prefix2(String name) {
+		super(name);
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724
+		//setExpectFailure(109724);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_SingleName_Prefix2.class.getName());
+		suite.addTest(new CompletionTest_SingleName_Prefix2("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" a ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_TypeDef_NoPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_TypeDef_NoPrefix.java
new file mode 100644
index 0000000..84f31aa
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_TypeDef_NoPrefix.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Typedef as a possible returned type.
+ * Bug#52948 
+ *
+ */
+public class CompletionTest_TypeDef_NoPrefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart37.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "m";  
+	private final String[] expectedResults = {
+			"myType"
+	};
+	
+	
+	public CompletionTest_TypeDef_NoPrefix(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_TypeDef_NoPrefix.class.getName());
+		suite.addTest(new CompletionTest_TypeDef_NoPrefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" m ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_TypeDef_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_TypeDef_Prefix.java
new file mode 100644
index 0000000..c61a979
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_TypeDef_Prefix.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Typedef as a possible returned type.
+ * Bug#52948 
+ *
+ */
+public class CompletionTest_TypeDef_Prefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart37.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "m";  
+	private final String[] expectedResults = {
+			"myType"
+	};
+	
+	
+	public CompletionTest_TypeDef_Prefix(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_TypeDef_Prefix.class.getName());
+		suite.addTest(new CompletionTest_TypeDef_Prefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" m ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_TypeRef_NoPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_TypeRef_NoPrefix.java
new file mode 100644
index 0000000..e7dfea8
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_TypeRef_NoPrefix.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ * Bryan Wilkinson (QNX)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Type_Reference, with no prefix
+ * Bug#50471 : Wrong completion kind after the "using" keyword
+ *
+ */
+public class CompletionTest_TypeRef_NoPrefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart24.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "" ; 
+	private final String[] expectedResults = {
+			"aNamespace",
+			"xNamespace"
+	};
+	
+	public CompletionTest_TypeRef_NoPrefix(String name) {
+		super(name);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_TypeRef_NoPrefix.class.getName());
+		suite.addTest(new CompletionTest_TypeRef_NoPrefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("using ") + 6;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_TypeRef_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_TypeRef_Prefix.java
new file mode 100644
index 0000000..3c7309d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_TypeRef_Prefix.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ * Bryan Wilkinson (QNX)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Type_Reference, with prefix
+ * Bug#50471 : Wrong completion kind after the "using" keyword
+ *
+ */
+public class CompletionTest_TypeRef_Prefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart25.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "a"; 
+	private final String[] expectedResults = {
+			"aNamespace"
+	};
+	
+	public CompletionTest_TypeRef_Prefix(String name) {
+		super(name);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_TypeRef_Prefix.class.getName());
+		suite.addTest(new CompletionTest_TypeRef_Prefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("using a ") + 7;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_VariableType_NestedPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_VariableType_NestedPrefix.java
new file mode 100644
index 0000000..cfe6645
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_VariableType_NestedPrefix.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Scoped_Reference, with no prefix
+ * Bug#50152: Wrong context sent after a "::"
+ *
+ */
+public class CompletionTest_VariableType_NestedPrefix  extends CompletionProposalsBaseTest{
+	
+	private final String fileName = "CompletionTestStart38.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "";
+	private final String[] expectedResults = {
+			"Foo(void)",
+			"bar(void) : void",
+			"fum(void) : void",
+			"DEF",
+			"x : int"
+	};
+
+	public CompletionTest_VariableType_NestedPrefix(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_VariableType_NestedPrefix.class.getName());
+		suite.addTest(new CompletionTest_VariableType_NestedPrefix("testCompletionProposals"));
+		return suite;
+	}		
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(":: ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_VariableType_NoPrefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_VariableType_NoPrefix.java
new file mode 100644
index 0000000..319027c
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_VariableType_NoPrefix.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ * Bryan Wilkinson (QNX)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Variable_type, with NO prefix
+ *
+ */
+public class CompletionTest_VariableType_NoPrefix  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart11.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "";
+	private final String[] expectedResults = {
+			"aClass",
+			"anotherClass",
+			"aNamespace",
+			"anEnumeration",
+			"AStruct",
+			"xOtherClass",
+			"xNamespace",
+			"xEnumeration",
+			"XStruct",
+	};
+	
+	public CompletionTest_VariableType_NoPrefix(String name) {
+		super(name);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=169860
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_VariableType_NoPrefix.class.getName());
+		suite.addTest(new CompletionTest_VariableType_NoPrefix("testCompletionProposals"));
+		return suite;
+	}		
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf("     ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_VariableType_Prefix.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_VariableType_Prefix.java
new file mode 100644
index 0000000..863fc9d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTest_VariableType_Prefix.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author hamer
+ * 
+ * Testing Variable_type completion kind, with a prefix
+ *
+ */
+public class CompletionTest_VariableType_Prefix  extends CompletionProposalsBaseTest{
+	private final String fileName = "CompletionTestStart3.cpp";
+	private final String fileFullPath ="resources/contentassist/" + fileName;
+	private final String headerFileName = "CompletionTestStart.h";
+	private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
+	private final String expectedPrefix = "a";
+	private final String[] expectedResults = {
+			"aClass",
+			"anotherClass",
+			"aNamespace",
+			"anEnumeration",
+			"AStruct",
+			"AMacro(x)"
+	};
+	
+	public CompletionTest_VariableType_Prefix(String name) {
+		super(name);
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109724
+		// setExpectFailure(109724);
+	}
+	
+	public static Test suite() {
+		TestSuite suite= new TestSuite(CompletionTest_VariableType_Prefix.class.getName());
+		suite.addTest(new CompletionTest_VariableType_Prefix("testCompletionProposals"));
+		return suite;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getCompletionPosition()
+	 */
+	protected int getCompletionPosition() {
+		return getBuffer().indexOf(" a ") + 2;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedPrefix()
+	 */
+	protected String getExpectedPrefix() {
+		return expectedPrefix;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getExpectedResultsValues()
+	 */
+	protected String[] getExpectedResultsValues() {
+		return expectedResults;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileName()
+	 */
+	protected String getFileName() {
+		return fileName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getFileFullPath()
+	 */
+	protected String getFileFullPath() {
+		return fileFullPath;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileFullPath()
+	 */
+	protected String getHeaderFileFullPath() {
+		return headerFileFullPath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.codeassist.tests.CompletionProposalsTest#getHeaderFileName()
+	 */
+	protected String getHeaderFileName() {
+		return headerFileName;
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests.java
new file mode 100644
index 0000000..b9080de
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests.java
@@ -0,0 +1,1293 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *     Bryan Wilkinson (QNX)
+ *     Markus Schorn (Wind River Systems)
+ *     IBM Corporation
+ *     Sergey Prigogin (Google)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.text.IDocument;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.testplugin.TestScannerProvider;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+
+/**
+ * A collection of code completion tests.
+ *
+ * @since 4.0
+ */
+public class CompletionTests extends AbstractContentAssistTest {
+	private static final String HEADER_FILE_NAME = "CompletionTest.h";
+	private static final String SOURCE_FILE_NAME = "CompletionTest.cpp";
+	private static final String CURSOR_LOCATION_TAG = "/*cursor*/";
+	private static final String DISTURB_FILE_NAME= "DisturbWith.cpp";
+	
+	protected int fCursorOffset;
+	private boolean fCheckExtraResults= true;
+	private IProject fProject;
+	
+	
+	//{DisturbWith.cpp}
+	// int gTemp;
+	// void gFunc();
+	// typedef struct {
+	//    int mem;
+	// } gStruct;
+	// class gClass {};
+	// namespace gns {
+	//    int gnsTemp;
+	//    void gnsFunc();
+	//    typedef struct {
+	//      int mem;
+	//    } gnsStruct;
+	//    class gnsClass {};
+	// };
+
+	//{CompletionTest.h}
+	//class C1;
+	//class C2;
+	//class C3;
+	//
+	//extern C1* gC1;
+	//C2* gC2 = 0;
+	//
+	//extern C1* gfC1();
+	//C2* gfC2();
+	//
+	//enum E1 {e11, e12};
+	//
+	//class C1 {
+	//public:
+	//		enum E2 {e21, e22};
+	//
+	//		C1* fMySelf;
+	//		void iam1();
+	//
+	//		C1* m123();
+	//		C1* m12();
+	//		C1* m13();
+	//
+	//protected:
+	//		void m1protected();
+	//private:
+	//		void m1private();
+	//};
+	//typedef C1 T1;
+	//
+	//
+	//class C2 : public T1 {
+	//public:
+	//		C2* fMySelf;
+	//		void iam2();
+	//
+	//		C2* m123();
+	//		C2* m12();
+	//		C2* m23();
+	//      C1* operator()(int x);
+	//
+	//protected:
+	//		void m2protected();
+	//private:
+	//		void m2private();
+	//      friend void _friend_function(C3* x);
+	//      friend class _friend_class;
+	//};
+	//typedef C2 T2;
+	//
+	//
+	//class C3 : public C2 {
+	//public:
+	//		C3* fMySelf;
+	//		void iam3();
+	//
+	//		C3* m123();
+	//		C3* m13();
+	//
+	//  	template<typename T> T tConvert();
+	//protected:
+	//		void m3protected();
+	//private:
+	//		void m3private();
+	//};
+	//typedef C3 T3;
+	//
+	//namespace ns {
+	//   const int NSCONST= 1;
+	//   class CNS {
+	//	      void mcns();
+	//   };
+	//};
+	//template <class T> class TClass {
+	//	T fTField;
+	//public:
+	//	TClass(T tArg) : fTField(tArg) {
+	//	}
+	//	T add(T tOther) {
+	//		return fTField + tOther;
+	//	}
+	//};
+	//// bug 109480
+	//class Printer
+	//{
+	//public:
+	//	static void InitPrinter(unsigned char port);
+	//private:
+	//	//Storage for port printer is on
+	//	static unsigned char port;
+	//protected:
+	//};
+	//struct Struct1;
+	//struct Struct2;
+	//union Union1;
+	//union Union2;
+	//	struct s206450 {
+	//		struct {int a1; int a2;};
+	//		union {int u1; char u2;};
+	//		struct {int a3;} a4;
+	//		int b;
+	//	};
+	// typedef enum {__nix} _e204758;
+	// void _f204758(_e204758 x);
+
+
+	public CompletionTests(String name) {
+		super(name, true);
+	}
+
+	public static Test suite() {
+		return BaseTestCase.suite(CompletionTests.class, "_");
+	}
+	
+	/*
+	 * @see org.eclipse.cdt.ui.tests.text.contentassist2.AbstractCompletionTest#setUpProjectContent(org.eclipse.core.resources.IProject)
+	 */
+	@Override
+	protected IFile setUpProjectContent(IProject project) throws Exception {
+		fProject= project;
+		String headerContent= readTaggedComment(HEADER_FILE_NAME);
+		StringBuffer sourceContent= getContentsForTest(1)[0];
+		sourceContent.insert(0, "#include \""+HEADER_FILE_NAME+"\"\n");
+		fCursorOffset= sourceContent.indexOf(CURSOR_LOCATION_TAG);
+		assertTrue("No cursor location specified", fCursorOffset >= 0);
+		sourceContent.delete(fCursorOffset, fCursorOffset+CURSOR_LOCATION_TAG.length());
+		assertNotNull(createFile(project, HEADER_FILE_NAME, headerContent));
+		return createFile(project, SOURCE_FILE_NAME, sourceContent.toString());
+	}
+
+	/*
+	 * @see org.eclipse.cdt.ui.tests.text.contentassist2.AbstractContentAssistTest#doCheckExtraResults()
+	 */
+	@Override
+	protected boolean doCheckExtraResults() {
+		return fCheckExtraResults;
+	}
+	
+	private void setCheckExtraResults(boolean check) {
+		fCheckExtraResults= check;
+	}
+	
+	private void assertMinimumCompletionResults(int offset, String[] expected, int compareType) throws Exception {
+		setCheckExtraResults(false);
+		try {
+			assertCompletionResults(offset, expected, compareType);
+		} finally {
+			setCheckExtraResults(true);
+		}
+	}
+
+	protected void assertCompletionResults(int offset, String[] expected, int compareType) throws Exception {
+		assertContentAssistResults(offset, expected, true, compareType);
+	}
+	
+	protected void assertCompletionResults(String[] expected) throws Exception {
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	//void gfunc() {C1 v; v.m/*cursor*/
+	public void testLocalVariable() throws Exception {
+		final String[] expected= {
+				"m123(void)", "m12(void)", "m13(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void gfunc() {C1 v; v.fMySelf->m/*cursor*/
+	public void testLocalVariable_MemberVariable() throws Exception {
+		final String[] expected= {
+				"m123(void)", "m12(void)", "m13(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void gfunc() {C1 v; v.m12()->m/*cursor*/
+	public void testLocalVariable_MemberFunction() throws Exception {
+		final String[] expected= {
+				"m123(void)", "m12(void)", "m13(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void gfunc() {gfC1()->m/*cursor*/
+	public void testGlobalFunction() throws Exception {
+		final String[] expected= {
+				"m123(void)", "m12(void)", "m13(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void C1::self() {m/*cursor*/
+	public void testOwnMember() throws Exception {
+		final String[] expected= {
+				"m123(void)", "m12(void)", "m13(void)", "m1private(void)", "m1protected(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void C1::self() {this->m/*cursor*/
+	public void testOwnMemberViaThis() throws Exception {
+		final String[] expected= {
+				"m123(void)", "m12(void)", "m13(void)", "m1private(void)", "m1protected(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void gfunc() {try{int bla;}catch(C1 v) {v.fMySelf->m/*cursor*/
+	public void testCatchBlock1() throws Exception {
+		final String[] expected= {
+				"m123(void)", "m12(void)", "m13(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void gfunc() {try{int bla;}catch(C2 c){} catch(C1 v) {v.fMySelf->m/*cursor*/
+	public void testCatchBlock2() throws Exception {
+		final String[] expected= {
+				"m123(void)", "m12(void)", "m13(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {gC/*cursor*/
+	public void testGlobalVariables_GlobalScope() throws Exception {
+		final String[] expected= {
+				"gC1", "gC2"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void C1::f() {gC/*cursor*/
+	public void testGlobalVariables_MethodScope() throws Exception {
+		final String[] expected= {
+				"gC1", "gC2"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C2* cLocal1; while(true) {C1* cLocal2; cL/*cursor*/
+	public void testLocalVariables_GlobalScope() throws Exception {
+		final String[] expected= {
+				"cLocal1", "cLocal2"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void C2::f() {C2* cLocal1; while(true) {C1* cLocal2; cL/*cursor*/
+	public void testLocalVariables_MethodScope() throws Exception {
+		final String[] expected= {
+				"cLocal1", "cLocal2"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C2* cLocal1; cLocal1->f/*cursor*/
+	public void testDataMembers_GlobalScope() throws Exception {
+		final String[] expected= {
+				"fMySelf"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void C2::f() {while(true) {f/*cursor*/
+	public void testDataMembers_MethodScope() throws Exception {
+		final String[] expected= {
+				"fMySelf"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {gf/*cursor*/
+	public void testGlobalFunctions_GlobalScope() throws Exception {
+		final String[] expected= {
+				"gfC1(void)", "gfC2(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void C3::f() {gf/*cursor*/
+	public void testGlobalFunctions_MethodScope() throws Exception {
+		final String[] expected= {
+				"gfC1(void)", "gfC2(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C1* l1; l1->m/*cursor*/
+	public void testMethods_GlobalScope() throws Exception {
+		final String[] expected= {
+				"m123(void)", "m12(void)", "m13(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void C3::f() {m/*cursor*/
+	public void testMethods_MethodScope() throws Exception {
+		final String[] expected= {
+				"m123(void)", "m12(void)", "m13(void)", "m23(void)", "m1protected(void)",
+				"m2protected(void)", "m3private(void)", "m3protected(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C/*cursor*/
+	public void testTypes_GlobalScope() throws Exception {
+		final String[] expected= {
+				"C1", "C2", "C3"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//class _friend_class { C3* x; void m() {x->m/*cursor*/
+	public void testTypes_FriendClass() throws Exception {
+		final String[] expected= {
+				"m123(void)", "m12(void)", "m13(void)", "m23(void)", "m1protected(void)",
+				"m2protected(void)", "m2private(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//namespace ns { class _friend_class { C3* x; void m() {x->m/*cursor*/  // Not a friend due to namespace
+	public void testTypes_FakeFriendClass() throws Exception {
+		final String[] expected= {
+				"m123(void)", "m12(void)", "m13(void)", "m23(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void _friend_function(C3* x) { x->m/*cursor*/
+	public void testTypes_FriendFunction() throws Exception {
+		final String[] expected= {
+				"m123(void)", "m12(void)", "m13(void)", "m23(void)", "m1protected(void)",
+				"m2protected(void)", "m2private(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void _friend_function(C2* x) { x->m/*cursor*/  // Not a friend due to parameter type mismatch
+	public void testTypes_FakeFriendFunction() throws Exception {
+		final String[] expected= {
+				"m123(void)", "m12(void)", "m13(void)", "m23(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	
+	//void C2::f() {T/*cursor*/
+	public void testTypes_MethodScope() throws Exception {
+		final String[] expected= {
+				"T1", "T2", "T3", "TClass"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//namespace ns {void nsfunc(){C/*cursor*/
+	public void testTypes_NamespaceScope() throws Exception {
+		final String[] expected= {
+				"C1", "C2", "C3", "CNS"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	
+	//namespace ns {void gfunc(){::C/*cursor*/
+	public void testTypes_GlobalQualification() throws Exception {
+		final String[] expected= {
+				"C1", "C2", "C3"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	
+	//void f() {e/*cursor*/
+	public void testEnums_GlobalScope() throws Exception {
+		final String[] expected= {
+				"e11", "e12", "E1"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void C3::f() {e/*cursor*/
+	public void testEnums_MethodScope() throws Exception {
+		final String[] expected= {
+				"e11", "e12", "e21", "e22", "E1", "E2"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C3* l1; l1->C/*cursor*/
+	public void testQualificationForAccess1() throws Exception {
+		// TLETODO ordering is significant here (currently ignored)
+		final String[] expected= {
+				"C3", "C2", "C1"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C2* l1; l1->C/*cursor*/
+	public void testQualificationForAccess2() throws Exception {
+		// TLETODO ordering is significant here (currently ignored)
+		final String[] expected= {
+				"C2", "C1"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C3* l1; l1->C3::fMySelf->iam/*cursor*/
+	public void testQualifiedAccess1() throws Exception {
+		// TLETODO ordering is significant here (currently ignored)
+		final String[] expected= {
+				"iam3(void)", "iam2(void)", "iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C3* l1; l1->C2::fMySelf->iam/*cursor*/
+	public void testQualifiedAccess2() throws Exception {
+		// TLETODO ordering is significant here (currently ignored)
+		final String[] expected= {
+				"iam2(void)", "iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C3* l1; l1->C1::fMySelf->iam/*cursor*/
+	public void testQualifiedAccess3() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C3* l1; l1->T3::fMySelf->iam/*cursor*/
+	public void testQualifiedAccess_TypedefAsQualifier1() throws Exception {
+		// TLETODO ordering is significant here (currently ignored)
+		final String[] expected= {
+				"iam3(void)", "iam2(void)", "iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C3* l1; l1->T2::fMySelf->iam/*cursor*/
+	public void testQualifiedAccess_TypedefAsQualifier2() throws Exception {
+		// TLETODO ordering is significant here (currently ignored)
+		final String[] expected= {
+				"iam2(void)", "iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C3* l1; l1->T1::fMySelf->iam/*cursor*/
+	public void testQualifiedAccess_TypedefAsQualifier3() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C1().iam/*cursor*/
+	public void testTemporaryObject() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C1 c; (&c)->iam/*cursor*/
+	public void testAddressOf() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C1* c; (*c).iam/*cursor*/
+	public void testDereferencingOperator1() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C1** c; (**c).iam/*cursor*/
+	public void testDereferencingOperator2() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	//void f() {C1** c; (*c)->iam/*cursor*/
+	public void testDereferencingOperator3() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C1* c; c[0].iam/*cursor*/
+	public void testArrayAccessOperator1() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	//void f() {C1** c; c[0][1].iam/*cursor*/
+	public void testArrayAccessOperator2() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	//void f() {C1** c; c[0]->iam/*cursor*/
+	public void testArrayAccessOperator3() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	//void f() {C1* c; (&c[0])->iam/*cursor*/
+	public void testArrayAccessOperator4() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {void* c; ((C1*)c)->iam/*cursor*/
+	public void testCasts1() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	//void g(int a) {}; void f() {void* c; g(((C1*)c)->iam/*cursor*/
+	public void testCasts2() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {C1* c; c++->iam/*cursor*/
+	public void testPointerArithmetic1() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	//void f() {C1* c; (*++c).iam/*cursor*/
+	public void testPointerArithmetic2() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	//void f() {C1* c; c--->iam/*cursor*/
+	public void testPointerArithmetic3() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	//void f() {C1 c; (&c+1)->iam/*cursor*/
+	public void testPointerArithmetic4() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	//void f() {C1 c; (&c-1)->iam/*cursor*/
+	public void testPointerArithmetic5() throws Exception {
+		final String[] expected= {
+				"iam1(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//void f() {int localVar=0; if (*cond && somefunc(&local/*cursor*/
+	public void testNestedCalls() throws Exception {
+		final String[] expected= {
+				"localVar"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//int a[] = {1,2}; void f(int _0306_b) {_0306_b/*cursor*/
+	public void testCuttingInput1() throws Exception {
+		final String[] expected= {
+				"_0306_b"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	//int a[] = {1,2}; void f(int b) {int _0306_b[] = {2,3}; _0306_b/*cursor*/
+	public void testCuttingInput2() throws Exception {
+		final String[] expected= {
+				"_0306_b"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//enum EnumType function() {int _031209_v; _031209/*cursor*/
+	public void testDisturbingMacros() throws Exception {
+		final String[] expected= {
+				"_031209_v"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+
+	//namespace ns {void x() {NSCO/*cursor*/
+	public void testAccessToNamespaceFromClassMember1() throws Exception {
+		final String[] expected= {
+				"NSCONST"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	//void ns::CNS::mcns(){NSCO/*cursor*/
+	public void testAccessToNamespaceFromClassMember2() throws Exception {
+		final String[] expected= {
+				"NSCONST"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	
+	//#i/*cursor*/
+	public void testCompletePreprocessorDirective() throws Exception {
+		final String[] expected= {
+				"#if", "#ifdef", "#ifndef", "#include"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	
+	//#  d/*cursor*/
+	public void testCompletePreprocessorDirective2() throws Exception {
+		final String[] expected= {
+				"define "
+		};
+		assertCompletionResults(fCursorOffset, expected,
+				AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	//#  if d/*cursor*/
+	public void testCompletePreprocessorDirective3() throws Exception {
+		final String[] expected= {
+				"defined"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	
+	//void gfunc(){TClass<int> t(0); t.a/*cursor*/
+	public void testTemplateClassMethod() throws Exception {
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=172436
+		final String[] expected= {
+				"add(int)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	
+	//void gfunc(){C3 c3; c3.t/*cursor*/
+	public void testTemplateMethod() throws Exception {
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=172436
+		final String[] expected= {
+				"tConvert(void)"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	
+	//using namespace ns;void gfunc(){NSC/*cursor*/
+	public void testUsingDirective() throws Exception {
+		final String[] expected= {
+				"NSCONST"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	
+	//void gfunc(){n/*cursor*/
+	public void testAutoColons() throws Exception {
+		final String[] expected= {
+				"ns::"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	//using namespace /*cursor*/
+	public void testAutoColons2() throws Exception {
+		final String[] expected= {
+				"ns"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+
+	//// to_be_replaced_
+	//void gfunc(){aNew/*cursor*/
+	public void testGlobalVariableBeforeSave_Bug180883() throws Exception {
+		String replace=   "// to_be_replaced_";
+		String globalVar= "int aNewGlobalVar;";
+		IDocument doc= getDocument();
+		int idx= doc.get().indexOf(replace);
+		doc.replace(idx, replace.length(), globalVar);
+
+		// succeeds when buffer is saved
+//		fEditor.doSave(new NullProgressMonitor());
+//		EditorTestHelper.joinBackgroundActivities((AbstractTextEditor)fEditor);
+
+		final String[] expected= {
+				"aNewGlobalVar"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	
+	//void Printer::InitPrinter(unsigned char port) {
+	//	Printer::/*cursor*/
+	public void testPrivateStaticMember_Bug109480() throws Exception {
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=109480
+		final String[] expected= {
+				"InitPrinter()", "port"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+
+	// class vector3 {
+	// public:
+	//   void blah(const vector3& v) { x += v./*cursor*/; }
+	//   float x;
+	// };
+	public void _testForwardMembersInInlineMethods_Bug185652() throws Exception {
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=185652
+		final String[] expected= {
+				"x"
+		};
+		assertMinimumCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+
+	// void Pri/*cursor*/
+	public void testMethodDefinitionClassName_Bug190296() throws Exception {
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=190296
+		final String[] expected= {
+				"Printer::"
+		};
+		assertMinimumCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	// typedef struct {
+    //    int sx;
+    // } my_struct;
+    //
+    // void func(my_struct s);
+    //
+    // void test() {
+    //    fun/*cursor*/
+	public void testFunctionWithTypedefToAnonymousType_bug192787() throws Exception {
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=192787
+		final String[] expected= {
+				"func(my_struct s) : void"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_DISP_STRINGS);
+	}
+	
+	// namespace gns {
+	//   void test() {
+	//      g/*cursor*/
+	public void testBindingsWithoutDeclaration() throws Exception {
+		// gC1all, gStruct, gnsClass, gnsStruct: fix for 214146, type from a source file is not proposed.
+		final String[] expected= {
+			"gC1", "gC2", "gfC1()", "gfC2()",
+			"gns::", "gnsFunc()", "gnsTemp",
+			"gFunc()", "gTemp"
+		};
+		final String[] expected2= {
+				"gC1", "gC2", "gfC1()", "gfC2()", "gns::"
+		};
+		String disturbContent= readTaggedComment(DISTURB_FILE_NAME);
+		IFile dfile= createFile(fProject, DISTURB_FILE_NAME, disturbContent);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(8000, NPM));
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+		
+		dfile.delete(true, NPM);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(8000, NPM));
+		assertCompletionResults(fCursorOffset, expected2, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	// struct Struct/*cursor*/
+	public void testElaboratedTypeSpecifierStruct_bug208710() throws Exception {
+		final String[] expected= { "Struct1", "Struct2" };
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	// struct Union/*cursor*/
+	public void testElaboratedTypeSpecifierNotStruct_bug208710() throws Exception {
+		final String[] expected= new String[0];
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	// struct C/*cursor*/
+	public void testElaboratedTypeSpecifierNotStruct2_bug208710() throws Exception {
+		final String[] expected= new String[0];
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	// union Union/*cursor*/
+	public void testElaboratedTypeSpecifierUnion_bug208710() throws Exception {
+		final String[] expected= { "Union1", "Union2" };
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	// union Struct/*cursor*/
+	public void testElaboratedTypeSpecifierNotUnion_bug208710() throws Exception {
+		final String[] expected= new String[0];
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	// union C/*cursor*/
+	public void testElaboratedTypeSpecifierNotUnion2_bug208710() throws Exception {
+		final String[] expected= new String[0];
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	// class C/*cursor*/
+	public void testElaboratedTypeSpecifierClass_bug208710() throws Exception {
+		final String[] expected= { "C1", "C2", "C3" };
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	// class Struct/*cursor*/
+	public void testElaboratedTypeSpecifierNotClass_bug208710() throws Exception {
+		final String[] expected= new String[0];
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+    // void test() {
+    //    C1::/*cursor*/
+	public void testEnumInClass_bug199598() throws Exception {
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=199598
+		final String[] expected= {
+				"E2", "e21", "e22"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	
+	// class Union/*cursor*/
+	public void testElaboratedTypeSpecifierNotClass2_bug208710() throws Exception {
+		final String[] expected= new String[0];
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	// void func() {float a; a= 1./*cursor*/}
+	public void testCompletionInFloatingPointLiteral_Bug193464() throws Exception {
+		final String[] expected= new String[0];
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	
+	// #ifdef __cplusplus__
+	// extern "C" {
+	// #endif
+	// void c_linkage();
+	// #ifdef __cplusplus__
+	// }
+	// #endif
+	
+	// #include "header191315.h"
+	
+	// #include "header191315.h"
+	// void xxx() { c_lin/*cursor*/
+	public void testExternC_bug191315() throws Exception {
+		StringBuffer[] content= getContentsForTest(3);
+		createFile(fProject, "header191315.h", content[0].toString());
+		createFile(fProject, "source191315.c", content[0].toString());
+		createFile(fProject, "source191315.cpp", content[0].toString());
+		IFile dfile= createFile(fProject, "header191315.h", content[0].toString());
+		TestSourceReader.waitUntilFileIsIndexed(CCorePlugin.getIndexManager().getIndex(fCProject), dfile, 8000);
+		final String[] expected= {
+			"c_linkage()"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	//#include "/*cursor*/
+	public void testInclusionProposals_bug113568() throws Exception {
+		File tempRoot= new File(System.getProperty("java.io.tmpdir"));
+		File tempDir= new File(tempRoot, "cdttest_113568");
+		tempDir.mkdir();
+		try {
+			createIncludeFiles(tempDir, new String[] {
+				"h1/inc1.h",
+				"h1/sub1/inc11.h",
+				"h2/inc2.h"
+			});
+			String[] expected= {
+				"\"inc1.h\"",
+				"\"sub1/\"",
+				"\"inc2.h\""
+			};
+			assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+
+			getDocument().replace(fCursorOffset++, 0, "i");
+			expected= new String[] {
+				"\"inc1.h\"",
+				"\"inc2.h\""
+			};
+			assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+
+			getDocument().replace(fCursorOffset, 0, "\"");
+			expected= new String[] {
+				"\"inc1.h",
+				"\"inc2.h"
+			};
+			assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+
+			createFile(fProject, "inc113568.h", "");
+			expected= new String[] {
+				"\"inc1.h",
+				"\"inc113568.h",
+				"\"inc2.h"
+			};
+			assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+
+			getDocument().replace(fCursorOffset-1, 1, "sub1/");
+			expected= new String[] {
+				"\"sub1/inc11.h"
+			};
+			assertCompletionResults(fCursorOffset+=4, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+
+			// bug 278967
+			getDocument().replace(fCursorOffset-5, 5, "../");
+			expected= new String[] {
+				"\"../h1/",
+				"\"../h2/",
+			};
+			assertCompletionResults(fCursorOffset-=2, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+		} finally {
+			deleteDir(tempDir);
+		}
+	}
+
+	public static void deleteDir(File dir) {
+		File[] files = dir.listFiles();
+		for (File file : files) {
+			if (file.isDirectory()) {
+				deleteDir(file);
+			} else {
+				file.delete();
+			}
+		}
+		dir.delete();
+	}
+
+	private static void createIncludeFiles(File dir, String[] files) throws IOException {
+		Set<String> includeDirs= new HashSet<String>();
+		for (String file2 : files) {
+			File file = new File(dir, file2);
+			final File parentFile= file.getParentFile();
+			if (parentFile.getName().startsWith("sub")) {
+				if (!parentFile.exists()) {
+					parentFile.mkdirs();
+				}
+			} else if (includeDirs.add(parentFile.getAbsolutePath())) {
+				parentFile.mkdirs();
+			}
+			file.createNewFile();
+		}
+		TestScannerProvider.sIncludes= includeDirs.toArray(new String[includeDirs.size()]);
+	}
+
+	// void test() {
+	// int local;
+	// switch(loc/*cursor*/
+	public void testSwitchStatement() throws Exception {
+		final String[] expected= {
+				"local"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+
+
+	// void test() {
+	// int local;
+	// while(loc/*cursor*/
+	public void testWhileStatement() throws Exception {
+		final String[] expected= {
+				"local"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	// void test() {
+	// int local;
+	// for(loc/*cursor*/
+	public void testForStatement1() throws Exception {
+		final String[] expected= {
+				"local"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+
+	// void test() {
+	// int local;
+	// for(int i=0;i<loc/*cursor*/
+	public void testForStatement2() throws Exception {
+		final String[] expected= {
+				"local"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+
+	// void test() {
+	// int local;
+	// for(int i=0;i<local;loc/*cursor*/
+	public void testForStatement3() throws Exception {
+		final String[] expected= {
+				"local"
+		};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+
+	//	#define INIT_PTR(PtrName)   (PtrName) = 0;
+	//	class CCApp {
+	//	public:
+	//	        int pIShell;
+	//	};
+	//
+	//	int main(void) {
+	//	   CCApp *pThis = 0;
+	//
+	//	   INIT_PTR(pTh/*cursor*/);
+	//	}
+	public void testCompletionInMacroArguments1_Bug200208() throws Exception {
+		final String[] expected= {"pThis"};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+
+	//	#define INIT_PTR(PtrName)   (PtrName) = 0;
+	//	#define COPY_PTR(pTarget, pSource)   (pTarget) = (pSource)
+	//
+	//	class CCApp {
+	//	public:
+	//	        int pIShell;
+	//	};
+	//
+	//	int main(void) {
+	//	   CCApp *pThis = 0;
+	//
+	//	   INIT_PTR(pThis);
+	//     COPY_PTR(pThis->pIShell, pThis->pI/*cursor*/)
+	//	}
+	public void testCompletionInMacroArguments2_Bug200208() throws Exception {
+		final String[] expected= {"pIShell"};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	//	void test() {
+	//		int alocal, blocal;
+	//		if (alocal < b/*cursor*/
+	public void testCompletionAfterLessThan_Bug229062() throws Exception {
+		final String[] expected= {"blocal"};
+		assertCompletionResults(fCursorOffset, expected, AbstractContentAssistTest.COMPARE_REP_STRINGS);
+	}
+	
+	//	enum {enum0, enum1, enum2};
+	//	typedef struct {
+	//	   int byte1;
+	//	   int byte2;
+	//	} MYSTRUCT_TYPE;
+	//	static const MYSTRUCT_TYPE myArrayOfStructs[] = {{enum/*cursor*/
+	public void testCompletionInInitializerList_Bug230389() throws Exception {
+		final String[] expected= {"enum0", "enum1", "enum2"};
+		assertCompletionResults(expected);
+	}
+	
+	// void test() {
+	//    C2 c2;
+	//    c2(1)->iam/*cursor*/
+	public void testUserdefinedCallOperator_Bug231277() throws Exception {
+		final String[] expected= {"iam1()"};
+		assertCompletionResults(expected);
+	}
+	
+	//  void test() {struct s206450 x; x./*cursor*/
+	public void testNestedAnonymousStructs_Bug206450() throws Exception {
+		final String[] expected= {"a1", "a2", "u1", "u2", "a4", "b", "s206450"};
+		assertCompletionResults(expected);
+	}
+	
+	//  void test() {_f204758/*cursor*/
+	public void testTypedefToAnonymous_Bug204758() throws Exception {
+		final String[] expected= {"_f204758(_e204758 x) : void"};
+		assertCompletionResults(fCursorOffset, expected, COMPARE_DISP_STRINGS);
+	}
+	
+	//	#define CATCH(X) } catch (X) {
+	//	void foo() {
+	//		try {
+	//			CATCH(float var)
+	//			v/*cursor*/
+	//		} catch (int var2) {
+	//		}
+	//	}
+	public void testContentAssistWithBraceInMacro_Bug257915() throws Exception {
+		final String[] expected= {"var : float"};
+		assertCompletionResults(fCursorOffset, expected, COMPARE_DISP_STRINGS);
+	}
+	
+	//	struct X {
+	//	   typedef int TInt;
+	//	};
+	//	void main() {
+	//		X::T/*cursor*/  // content assist does not propose TInt
+	//	}
+	public void testNestedTypesInQualifiedNames_Bug255898() throws Exception {
+		final String[] expected= {"TInt"};
+		assertCompletionResults(fCursorOffset, expected, COMPARE_DISP_STRINGS);
+	}
+
+	//template <class type>
+	//class Queue {
+	//	TClass<type>* myQueue;
+	//public: 
+	//	Queue() {
+	//		myQueue = new TClass<type>;
+	//	}
+	//	bool isEmtpy() {
+	//		return myQueue->a/*cursor*/
+	//	}
+	//};
+	public void testContentAssistInDeferredClassInstance_Bug194592() throws Exception {
+		final String[] expected= {"add()"};
+		assertCompletionResults(fCursorOffset, expected, COMPARE_REP_STRINGS);
+	}
+	
+	//namespace ns {
+	//  template<class T>
+	//  class Base {
+	//  public:
+	//    Base(int par) {}
+	//  };
+	//}
+	//
+	//class Helper {
+	//public:
+	//  Helper() {}
+	//};
+	//
+	//class InitializerListTest : public ::ns::Base<Helper>, Helper {
+	//private:
+	//  int mOne;
+	//public:
+	//  InitializerListTest() : /*cursor*/
+	//};
+	public void testCunstructorInitializerList_EmptyInput_Bug266586() throws Exception {
+		final String[] expected= {"mOne",
+				"Base(int)", "Base(const ns::Base<Helper> &)",
+				"Helper(void)", "Helper(const Helper &)",
+				// Namespaces must be offered as well. In order for this code
+				// to compile with gcc (e.g. 4.1.2), you need to write
+				// ::ns::Base<Helper>() instead of just Base<Helper>().
+				"ns"};
+		assertCompletionResults(fCursorOffset, expected, COMPARE_ID_STRINGS);
+	}
+
+	//namespace ns {
+	//  template<class T>
+	//  class Base {
+	//  public:
+	//    Base(int par) {}
+	//  };
+	//}
+	//
+	//class Helper {
+	//public:
+	//  Helper() {}
+	//};
+	//
+	//class InitializerListTest : public ::ns::Base<Helper>, Helper {
+	//private:
+	//  int mOne;
+	//public:
+	//  InitializerListTest() : ::ns/*cursor*/
+	//};
+	public void testCunstructorInitializerList_NameContextInput_Bug266586() throws Exception {
+		final String[] expected= { "ns" };
+		assertCompletionResults(fCursorOffset, expected, COMPARE_ID_STRINGS);
+	}
+
+	//namespace ns {
+	//  template<class T>
+	//  class Base {
+	//  public:
+	//    Base(int par) {}
+	//  };
+	//}
+	//
+	//class Helper {
+	//public:
+	//  Helper() {}
+	//};
+	//
+	//class InitializerListTest : public ::ns::Base<Helper>, Helper {
+	//private:
+	//  int mOne;
+	//public:
+	//  InitializerListTest() : m/*cursor*/
+	//};
+	public void testCunstructorInitializerList_MemberInput_Bug266586() throws Exception {
+		final String[] expected= { "mOne" };
+		assertCompletionResults(fCursorOffset, expected, COMPARE_ID_STRINGS);
+	}
+	
+	//namespace ns {
+	//  template<class T>
+	//  class Base {
+	//  public:
+	//    Base(int par) {}
+	//  };
+	//}
+	//
+	//class Helper {
+	//public:
+	//  Helper() {}
+	//};
+	//
+	//class InitializerListTest : public ::ns::Base<Helper>, Helper {
+	//private:
+	//  int mOne;
+	//public:
+	//  InitializerListTest() : h/*cursor*/
+	//};
+	public void testCunstructorInitializerList_BaseClassInput_Bug266586() throws Exception {
+		final String[] expected= { "Helper(void)", "Helper(const Helper &)" };
+		assertCompletionResults(fCursorOffset, expected, COMPARE_ID_STRINGS);
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests_PlainC.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests_PlainC.java
new file mode 100644
index 0000000..39b5046
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/CompletionTests_PlainC.java
@@ -0,0 +1,970 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *     Markus Schorn (Wind River Systems)
+ *     IBM Corporation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.text.IDocument;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+
+/**
+ * Completion tests for plain C.
+ * 
+ * @since 4.0
+ */
+public class CompletionTests_PlainC extends AbstractContentAssistTest {
+
+	private static final String HEADER_FILE_NAME = "CompletionTest.h";
+	private static final String SOURCE_FILE_NAME = "CompletionTest.c";
+	private static final String CURSOR_LOCATION_TAG = "/*cursor*/";
+	private static final String INCLUDE_LOCATION_TAG = "/*include*/";
+	private static final String DISTURB_FILE_NAME= "DisturbWith.c";
+	
+	protected int fCursorOffset;
+	private IProject fProject;
+
+	//{CompletionTest.h}
+	//int gGlobalInt;
+	//struct Struct1;
+	//struct Struct2;
+	//union Union1;
+	//union Union2;
+	//
+	//#define DEBUG 1
+	//#define AMacro(x) x+1
+	//#define XMacro(x,y) x+y
+	//
+	//int aVariable;
+	//int xVariable;
+	//
+	//void aFunction();
+	//void xFunction();
+	//
+	//enum anEnumeration {
+	//	aFirstEnum,
+	//	aSecondEnum, 
+	//	aThirdEnum
+	//};
+	//typedef enum anEnumeration anEnumerationType;
+	//
+	//enum xEnumeration {
+	//	xFirstEnum,
+	//	xSecondEnum, 
+	//	xThirdEnum
+	//};
+	//typedef enum xEnumeration xEnumerationType;
+	//
+	//struct AStruct{
+	//	int aStructField;
+	//	int xaStructField;
+	//};
+	//typedef struct AStruct AStructType;
+	//
+	//struct XStruct{
+	//	int xStructField;
+	//	int axStructField;
+	//};
+	//typedef struct XStruct XStructType;
+	//
+	//void anotherFunction(){
+	//   int aLocalDeclaration = 1;
+	//}
+	//
+	//void xOtherFunction(){
+	//   int xLocalDeclaration = 1;
+	//}
+	//#ifdef ANONYMOUS
+	//enum {
+	//	anonFirstEnum,
+	//	anonSecondEnum, 
+	//	anonThirdEnum
+	//};
+	//
+	//enum {
+	//	xanonFirstEnum,
+	//	xanonSecondEnum, 
+	//	xanonThirdEnum
+	//};
+	//
+	//int notAnonymous;
+	//enum notAnonymousEnum {};
+	//struct notAnonymousStruct {};
+	//
+	//struct {
+	//	int anonStructField;
+	//};
+	//
+	//struct {
+	//	int xanonStructField;
+	//};
+	//
+	//union {
+	//	int anonUnionMember1, anonUnionMember2;
+	//};
+	//#endif /* ANONYMOUS */
+	//
+	//#ifdef STRUCT_C1
+	//enum E1 {e11, e12};	
+	//
+	//struct C1_s {
+	//  enum E2 {e21, e22};	
+	//	
+	//  struct C1_s* fMySelf;
+	//
+	//  int m123;
+	//  int m12;
+	//  int m13;
+	//};
+	//typedef struct C1_s C1;
+	//extern C1* gfC1();
+	//C1* gfC2();
+	//C1 gC1, gC2;
+	//#endif /* STRUCT_C1 */
+	//	struct s206450 {
+	//		struct {int a1; int a2;};
+	//		union {int u1; char u2;};
+	//		struct {int a3;} a4;
+	//		int b;
+	//	};
+	// #ifdef bug204758
+	// typedef enum {__nix} _e204758;
+	// void _f204758(_e204758 x);
+	// #endif
+	
+	//{DisturbWith.c}
+	// int gTemp;
+	// void gFunc();
+	// typedef struct {
+	//    int mem;
+	// } gStruct;
+
+	public static Test suite() {
+		return BaseTestCase.suite(CompletionTests_PlainC.class, "_");
+	}
+	
+	/**
+	 * @param name
+	 */
+	public CompletionTests_PlainC(String name) {
+		super(name, false);
+	}
+
+	/*
+	 * @see org.eclipse.cdt.ui.tests.text.contentassist2.AbstractContentAssistTest#setUpProjectContent(org.eclipse.core.resources.IProject)
+	 */
+	@Override
+	protected IFile setUpProjectContent(IProject project) throws Exception {
+		fProject= project;
+		String headerContent= readTaggedComment(HEADER_FILE_NAME);
+		StringBuffer sourceContent= getContentsForTest(1)[0];
+		int includeOffset= Math.max(0, sourceContent.indexOf(INCLUDE_LOCATION_TAG));
+		sourceContent.insert(includeOffset, "#include \""+HEADER_FILE_NAME+"\"\n");
+		fCursorOffset= sourceContent.indexOf(CURSOR_LOCATION_TAG);
+		assertTrue("No cursor location specified", fCursorOffset >= 0);
+		sourceContent.delete(fCursorOffset, fCursorOffset+CURSOR_LOCATION_TAG.length());
+		assertNotNull(createFile(project, HEADER_FILE_NAME, headerContent));
+		IFile sourceFile= createFile(project, SOURCE_FILE_NAME, sourceContent.toString());
+		// re-indexing is necessary to parse the header in context of the source. 
+		CCorePlugin.getIndexManager().reindex(fCProject);
+		CCorePlugin.getIndexManager().joinIndexer(4000, new NullProgressMonitor());
+		return sourceFile;
+	}
+
+	protected void assertCompletionResults(String[] expected) throws Exception {
+		assertContentAssistResults(fCursorOffset, expected, true, AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	
+	//void test() {
+    //  int myvar;
+    //  (my/*cursor*/
+	public void testLocalVariableAfterOpeningParen_Bug180885() throws Exception {
+		final String[] expected= {
+				"myvar"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//void test() {
+    //  int myvar;
+    //  int x = my/*cursor*/
+	public void testLocalVariableInAssignment() throws Exception {
+		final String[] expected= {
+				"myvar"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//void test() {
+    //  int myvar;
+    //  my/*cursor*/
+	public void testLocalVariableOnLHS() throws Exception {
+		final String[] expected= {
+				"myvar"
+		};
+		assertCompletionResults(expected);
+	}
+
+	// void test() {
+	//    g/*cursor*/
+	public void testBindingsWithoutDeclaration() throws Exception {
+		// gStruct: fix for 214146, type from a source file is not proposed.
+		final String[] expected= {
+			"gGlobalInt", "gTemp", "gFunc(void)", 
+		};
+		final String[] expected2= {
+				"gGlobalInt"
+			};
+		String disturbContent= readTaggedComment(DISTURB_FILE_NAME);
+		IFile dfile= createFile(fProject, DISTURB_FILE_NAME, disturbContent);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(8000, NPM));
+		assertCompletionResults(expected);
+		
+		dfile.delete(true, NPM);
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(8000, NPM));
+		assertCompletionResults(expected2);		
+	}
+	
+	//// to_be_replaced_
+	//void gfunc(){aNew/*cursor*/
+	public void testGlobalVariableBeforeSave_Bug180883() throws Exception {
+		String replace=   "// to_be_replaced_";
+		String globalVar= "int aNewGlobalVar;";
+		IDocument doc= getDocument();
+		int idx= doc.get().indexOf(replace);
+		doc.replace(idx, replace.length(), globalVar);
+
+		final String[] expected= {
+				"aNewGlobalVar"
+		};
+		assertCompletionResults(expected);
+	}
+
+	// static int staticVar197990;
+	// void gFunc() {
+	//   stat/*cursor*/
+	public void testStaticVariables_Bug197990() throws Exception {
+		final String[] expected= {
+				"staticVar197990"
+		};
+		assertCompletionResults(expected);
+	}
+	
+	// struct Struct/*cursor*/
+	public void testElaboratedTypeSpecifierStruct_bug208710() throws Exception {
+		final String[] expected= { "Struct1", "Struct2" };
+		assertCompletionResults(expected);
+	}
+	
+	// struct Union/*cursor*/
+	public void testElaboratedTypeSpecifierNotStruct_bug208710() throws Exception {
+		final String[] expected= new String[0];
+		assertCompletionResults(expected);
+	}
+	
+	// union Union/*cursor*/
+	public void testElaboratedTypeSpecifierUnion_bug208710() throws Exception {
+		final String[] expected= { "Union1", "Union2" };
+		assertCompletionResults(expected);
+	}
+	
+	// union Struct/*cursor*/
+	public void testElaboratedTypeSpecifierNotUnion_bug208710() throws Exception {
+		final String[] expected= new String[0];
+		assertCompletionResults(expected);
+	}
+	
+	// void func() {float a; a= 1./*cursor*/}
+	public void testCompletionInFloatingPointLiteral_Bug193464() throws Exception {
+		final String[] expected= new String[0];
+		assertCompletionResults(expected);
+	}
+	
+	// #ifdef __cplusplus__
+	// extern "C" {
+	// #endif
+	// void c_linkage();
+	// #ifdef __cplusplus__
+	// }
+	// #endif
+	
+	// #include "header191315.h"
+	
+	// #include "header191315.h"
+	// void xxx() { c_lin/*cursor*/
+	public void testExternC_bug191315() throws Exception {
+		StringBuffer[] content= getContentsForTest(3);
+		createFile(fProject, "header191315.h", content[0].toString());
+		createFile(fProject, "source191315.c", content[0].toString());
+		createFile(fProject, "source191315.cpp", content[0].toString());
+		IFile dfile= createFile(fProject, "header191315.h", content[0].toString());
+		TestSourceReader.waitUntilFileIsIndexed(CCorePlugin.getIndexManager().getIndex(fCProject), dfile, 8000);
+		final String[] expected= {
+			"c_linkage(void)"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define ANONYMOUS
+	///*include*/
+	///*cursor*/
+	public void testAnonymousTypes() throws Exception {
+		final String[] expected = { "AStructType", "XStructType", "anEnumerationType", "xEnumerationType" };
+		assertCompletionResults(expected);
+	}
+	
+	//void foo ( a/*cursor*/
+	public void testArgumentTypes_Prefix() throws Exception {
+		final String[] expected = { "AMacro(x)", "AStructType", "anEnumerationType" };
+		assertCompletionResults(expected);
+	}
+
+	//struct aThirdStruct {
+	//   int x;
+	//   /*cursor*/
+	//};
+	public void testFieldType_NoPrefix() throws Exception {
+		final String[] expected = { "AStructType", "XStructType", "anEnumerationType", "xEnumerationType" };
+		assertCompletionResults(expected);
+	}
+
+	//struct aThirdStruct {
+	//   int x;
+	//   a/*cursor*/
+	//};
+	public void testFieldType_Prefix() throws Exception {
+		final String[] expected = { "AMacro(x)", "AStructType", "anEnumerationType" };
+		assertCompletionResults(expected);
+	}
+	
+	//#ifdef /*cursor*/
+	public void testMacroRef_NoPrefix() throws Exception {
+		final String[] expected = {
+				"AMacro(x)",
+				"DEBUG",
+				"XMacro(x, y)",
+				"_Pragma(arg)",
+				"__CDT_PARSER__",
+				"__DATE__",
+				"__FILE__",
+				"__LINE__",
+				"__STDC_HOSTED__",
+				"__STDC_VERSION__",
+				"__STDC__",
+				"__TIME__",
+				"__builtin_constant_p(exp)",
+				"__builtin_va_arg(ap, type)",
+				"__builtin_offsetof(T, m)",
+				"__builtin_types_compatible_p(x, y)",
+				"__complex__",
+				"__extension__",
+				"__imag__",
+				"__null",
+				"__offsetof__(x)",
+				"__real__",
+				"__stdcall",
+				"__thread",
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#ifdef D/*cursor*/
+	public void testMacroRef_Prefix() throws Exception {
+		final String[] expected = { "DEBUG" };
+		assertCompletionResults(expected);
+	}
+	
+	//void fooFunction()
+	//{
+	//    AStructType* c;
+	//    c->/*cursor*/
+	//}
+	public void testMemberReference_Arrow_NoPrefix() throws Exception {
+		final String[] expected = { 
+				"aStructField", "xaStructField",
+		};
+		assertCompletionResults(expected);
+	}
+
+	//void main() {
+	//    struct AStruct a, *ap;
+	//    ap->/*cursor*/
+	//}
+	public void testMemberReference_Arrow_NoPrefix2() throws Exception {
+		final String[] expected = { 
+				"aStructField", "xaStructField",
+		};
+		assertCompletionResults(expected);
+	}
+
+	//void fooFunction()
+	//{
+	//    AStructType* c;
+	//    c->a/*cursor*/
+	//}
+	public void testMemberReference_Arrow_Prefix() throws Exception {
+		final String[] expected = { 
+				"aStructField",
+		};
+		assertCompletionResults(expected);
+	}
+
+	//AStructType* foo();
+	//
+	//void fooFunction()
+	//{
+	//    foo()->a/*cursor*/
+	//}
+	public void testMemberReference_Arrow_Prefix2() throws Exception {
+		final String[] expected = { 
+				"aStructField",
+		};
+		assertCompletionResults(expected);
+	}
+
+	//void fooFunction()
+	//{
+	//    AStructType c;
+	//    c./*cursor*/
+	//}
+	public void testMemberReference_Dot_NoPrefix() throws Exception {
+		final String[] expected = { 
+				"aStructField", "xaStructField",
+		};
+		assertCompletionResults(expected);
+	}
+
+	//void fooFunction()
+	//{
+	//    AStructType c;
+	//    c.a/*cursor*/
+	//}
+	public void testMemberReference_Dot_Prefix() throws Exception {
+		final String[] expected = { 
+				"aStructField",
+		};
+		assertCompletionResults(expected);
+	}
+
+	//typedef int myType;
+	//
+	//m/*cursor*/
+	public void testTypeDef_Prefix() throws Exception {
+		final String[] expected = { 
+				"myType",
+		};
+		assertCompletionResults(expected);
+	}
+
+	//void fooFunction(int x)
+	//{
+	//    /*cursor*/
+	//}
+	public void testSingleName_Function_NoPrefix() throws Exception {
+		final String[] expected = { 
+				"x",
+				"aVariable",
+				"xVariable",
+				"aFunction(void)",
+				"anotherFunction(void)",
+				"fooFunction(int)",
+				"xFunction(void)",
+				"xOtherFunction(void)",
+				"anEnumerationType",
+				"xEnumerationType",
+				"AStructType",
+				"XStructType",
+				"aFirstEnum",
+				"aSecondEnum",
+				"aThirdEnum",
+				"xFirstEnum",
+				"xSecondEnum",
+				"xThirdEnum",
+				"gGlobalInt"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//void fooFunction(int x)
+	//{
+	//    a/*cursor*/
+	//}
+	public void testSingleName_Function_Prefix() throws Exception {
+		final String[] expected = { 
+				"AMacro(x)",
+				"AStructType",
+				"aVariable",
+				"aFunction(void)",
+				"anotherFunction(void)",
+				"anEnumerationType",
+				"aFirstEnum",
+				"aSecondEnum",
+				"aThirdEnum",
+		};
+		assertCompletionResults(expected);
+	}
+	
+	//void fooFunction(int x)
+	//{
+	//    int y = /*cursor*/
+	//}
+	public void testSingleName_Assignment_NoPrefix() throws Exception {
+		final String[] expected = {
+				"x",
+				"y",
+				"aVariable",
+				"xVariable",
+				"aFunction(void)",
+				"anotherFunction(void)",
+				"fooFunction(int)",
+				"xFunction(void)",
+				"xOtherFunction(void)",
+				"anEnumerationType",
+				"xEnumerationType",
+				"AStructType",
+				"XStructType",
+				"aFirstEnum",
+				"aSecondEnum",
+				"aThirdEnum",
+				"xFirstEnum",
+				"xSecondEnum",
+				"xThirdEnum",
+				"gGlobalInt"
+		};
+		assertCompletionResults(expected);
+	}
+	
+	//void foo(int x)
+	//{
+	//    int y = AM/*cursor*/
+	//}
+	public void testSingleName_Assignment_Prefix() throws Exception {
+		final String[] expected = {
+				"AMacro(x)"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void gfunc() {C1 v; v.m/*cursor*/
+	public void testLocalVariable() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void gfunc() {C1 v; v.fMySelf->m/*cursor*/
+	public void testLocalVariable_MemberVariable() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void gfunc() {gfC1().m/*cursor*/
+	public void testGlobalFunction() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {gC/*cursor*/
+	public void testGlobalVariables_GlobalScope() throws Exception {
+		final String[] expected= {
+				"gC1", "gC2"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void foo() {gC/*cursor*/
+	public void testGlobalVariables_FunctionScope() throws Exception {
+		final String[] expected= {
+				"gC1", "gC2"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//typedef struct {
+	//  enum E2 {e21, e22};	
+	//	
+	//  C2* fMySelf;
+	//
+	//  int m123;
+	//  int m12;
+	//  int m13;
+	//} C2;
+	//void f() {C2* cLocal1; while(true) {C1* cLocal2; cL/*cursor*/
+	public void testLocalVariables_FunctionScope() throws Exception {
+		final String[] expected= {
+				"cLocal1", "cLocal2"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {C1* cLocal1; cLocal1->f/*cursor*/
+	public void testDataMembers_FunctionScope() throws Exception {
+		final String[] expected= {
+				"fMySelf"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {gf/*cursor*/
+	public void testGlobalFunctions_FunctionScope() throws Exception {
+		final String[] expected= {
+				"gfC1(void)", "gfC2(void)"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//typedef struct {} C2;
+	//typedef union {} C3;
+	//void f() {C/*cursor*/
+	public void testTypes_FunctionScope() throws Exception {
+		final String[] expected= {
+				"C1", "C2", "C3"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {e/*cursor*/
+	public void testEnums_FunctionScope() throws Exception {
+		final String[] expected= {
+				"e11", "e12", "e21", "e22"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {C1 c; (&c)->m/*cursor*/
+	public void testAddressOf() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {C1* c; (*c).m/*cursor*/
+	public void testDereferencingOperator1() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {C1** c; (**c).m/*cursor*/
+	public void testDereferencingOperator2() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {C1** c; (*c)->m/*cursor*/
+	public void testDereferencingOperator3() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {C1* c; c[0].m/*cursor*/
+	public void testArrayAccessOperator1() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {C1** c; c[0][1].m/*cursor*/
+	public void testArrayAccessOperator2() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {C1** c; c[0]->m/*cursor*/
+	public void testArrayAccessOperator3() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {C1* c; (&c[0])->m/*cursor*/
+	public void testArrayAccessOperator4() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {void* c; ((C1*)c)->m/*cursor*/
+	public void testCasts1() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void g(int a) {}; void f() {void* c; g(((C1*)c)->m/*cursor*/
+	public void testCasts2() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {C1* c; c++->m/*cursor*/
+	public void testPointerArithmetic1() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {C1* c; (*++c).m/*cursor*/
+	public void testPointerArithmetic2() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {C1* c; c--->m/*cursor*/
+	public void testPointerArithmetic3() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {C1 c; (&c+1)->m/*cursor*/
+	public void testPointerArithmetic4() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {C1 c; (&c-1)->m/*cursor*/
+	public void testPointerArithmetic5() throws Exception {
+		final String[] expected= {
+				"m123", "m12", "m13"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//void f() {int localVar=0; if (*cond && somefunc(&local/*cursor*/
+	public void testNestedCalls() throws Exception {
+		final String[] expected= {
+				"localVar"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//int a[] = {1,2}; void f(int _0306_b) {_0306_b/*cursor*/
+	public void testCuttingInput1() throws Exception {
+		final String[] expected= {
+				"_0306_b"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//int a[] = {1,2}; void f(int b) {int _0306_b[] = {2,3}; _0306_b/*cursor*/
+	public void testCuttingInput2() throws Exception {
+		final String[] expected= {
+				"_0306_b"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//#define STRUCT_C1
+	///*include*/
+	//enum EnumType function() {int _031209_v; _031209/*cursor*/
+	public void testDisturbingMacros() throws Exception {
+		final String[] expected= {
+				"_031209_v"
+		};
+		assertCompletionResults(expected);
+	}
+	
+	// void test() {
+	// int local;
+	// switch(loc/*cursor*/
+	public void testSwitchStatement() throws Exception {
+		final String[] expected= {
+				"local"
+		};
+		assertCompletionResults(expected);
+	}
+	
+	// void test() {
+	// int local;
+	// while(loc/*cursor*/
+	public void testWhileStatement() throws Exception {
+		final String[] expected= {
+				"local"
+		};
+		assertCompletionResults(expected);
+	}
+
+	// void test() {
+	// int local;
+	// for(loc/*cursor*/
+	public void testForStatement1() throws Exception {
+		final String[] expected= {
+				"local"
+		};
+		assertCompletionResults(expected);
+	}
+
+	// void test() {
+	// int local;
+	// for(int i=0;i<loc/*cursor*/
+	public void testForStatement2() throws Exception {
+		final String[] expected= {
+				"local"
+		};
+		assertCompletionResults(expected);
+	}
+
+	// void test() {
+	// int local;
+	// for(int i=0;i<local;loc/*cursor*/
+	public void testForStatement3() throws Exception {
+		final String[] expected= {
+				"local"
+		};
+		assertCompletionResults(expected);
+	}
+
+	//	#define INIT_PTR(PtrName)   (PtrName) = 0;
+	//	struct CCApp {
+	//	   int pIShell;
+	//	};
+	//
+	//	int main(void) {
+	//	   struct CCApp *pThis = 0;
+	//	   INIT_PTR(pTh/*cursor*/);
+	//	}
+	public void testCompletionInMacroArguments1_Bug200208() throws Exception {
+		final String[] expected= {"pThis"};
+		assertCompletionResults(expected);
+	}
+
+	//	#define INIT_PTR(PtrName)   (PtrName) = 0;
+	//	#define COPY_PTR(pTarget, pSource)   (pTarget) = (pSource)
+	//
+	//	struct CCApp {
+	//	   int pIShell;
+	//	};
+	//
+	//	int main(void) {
+	//	   struct CCApp *pThis = 0;
+	//
+	//	   INIT_PTR(pThis);
+	//     COPY_PTR(pThis->pIShell, pThis->pI/*cursor*/)
+	//	}
+	public void testCompletionInMacroArguments2_Bug200208() throws Exception {
+		final String[] expected= {"pIShell"};
+		assertCompletionResults(expected);
+	}
+	
+	//	enum {enum0, enum1, enum2};
+	//	typedef struct {
+	//	   int byte1;
+	//	   int byte2;
+	//	} MYSTRUCT_TYPE;
+	//	static const MYSTRUCT_TYPE myArrayOfStructs[] = {{enum/*cursor*/
+	public void testCompletionInInitializerList_Bug230389() throws Exception {
+		final String[] expected= {"enum0", "enum1", "enum2"};
+		assertCompletionResults(expected);
+	}
+	
+	//  void test() {struct s206450 x; x./*cursor*/
+	public void testNestedAnonymousStructs_Bug206450() throws Exception {
+		final String[] expected= {"a1", "a2", "u1", "u2", "a4", "b"};
+		assertCompletionResults(expected);
+	}
+
+	// #define bug204758
+	///*include*/
+	//  void test() {_f204758/*cursor*/
+	public void testTypedefToAnonymous_Bug204758() throws Exception {
+		final String[] expected= {"_f204758(_e204758)"};
+		assertCompletionResults(expected);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/ContentAssist2TestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/ContentAssist2TestSuite.java
new file mode 100644
index 0000000..86cd645
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/ContentAssist2TestSuite.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Siemens AG and others.
+ * All rights reserved. This content 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
+ *
+ * Contributors:
+ * Norbert Ploett - Initial implementation
+ * Bryan Wilkinson (QNX)
+ * Andrew Ferguson (Symbian)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * This suite bundles all tests for the CContentAssistProcessor
+ */
+public class ContentAssist2TestSuite extends TestSuite {
+
+	public static Test suite()  {
+		return new ContentAssist2TestSuite() ;
+	}
+	
+	public ContentAssist2TestSuite()  {
+		super(ContentAssist2TestSuite.class.getName());
+		
+		addTest(CompletionTest_AnonymousTypes.suite());
+		addTest(CompletionTest_ArgumentType_Prefix.suite());
+		addTest(CompletionTest_ArgumentType_Prefix2.suite());
+		addTest(CompletionTest_ClassReference_NoPrefix.suite());
+		addTest(CompletionTest_ClassReference_Prefix.suite());
+		addTest(CompletionTest_ConstructorReference.suite());
+		addTest(CompletionTest_ExceptionReference_NoPrefix.suite());
+		addTest(CompletionTest_ExceptionReference_Prefix.suite());
+		addTest(CompletionTest_FieldType_NoPrefix.suite());
+		addTest(CompletionTest_FieldType_NoPrefix2.suite());
+		addTest(CompletionTest_FieldType_Prefix.suite());
+		addTest(CompletionTest_FunctionReference_Prefix.suite());
+		addTest(CompletionTest_MacroRef_NoPrefix.suite());
+		addTest(CompletionTest_MacroRef_Prefix.suite());
+		addTest(CompletionTest_MemberReference_Arrow_NoPrefix.suite());
+		addTest(CompletionTest_MemberReference_Arrow_NoPrefix2.suite());
+		addTest(CompletionTest_MemberReference_Arrow_NoPrefix3.suite());
+		addTest(CompletionTest_MemberReference_Arrow_Prefix.suite());
+		addTest(CompletionTest_MemberReference_Arrow_Prefix2.suite());
+		addTest(CompletionTest_MemberReference_Dot_NoPrefix.suite());
+		addTest(CompletionTest_MemberReference_Dot_Prefix.suite());
+		addTest(CompletionTest_NamespaceRef_NoPrefix.suite());
+		addTest(CompletionTest_NamespaceRef_Prefix.suite());
+		addTest(CompletionTest_NewTypeReference_NoPrefix.suite());
+		addTest(CompletionTest_NewTypeReference_Prefix.suite());
+		addTest(CompletionTest_ScopedReference_NonCodeScope.suite());
+		addTest(CompletionTest_ScopedReference_NoPrefix.suite());
+		addTest(CompletionTest_ScopedReference_Prefix.suite());
+		addTest(CompletionTest_SingleName_Method_NoPrefix.suite());
+		addTest(CompletionTest_SingleName_Method_Prefix.suite());
+		addTest(CompletionTest_SingleName_NoPrefix.suite());
+		addTest(CompletionTest_SingleName_Prefix.suite());
+		addTest(CompletionTest_SingleName_Prefix2.suite());
+		addTest(CompletionTest_TypeDef_NoPrefix.suite());
+		addTest(CompletionTest_TypeDef_Prefix.suite());
+		addTest(CompletionTest_TypeRef_NoPrefix.suite());
+		addTest(CompletionTest_TypeRef_Prefix.suite());
+		addTest(CompletionTest_VariableType_NestedPrefix.suite());
+		addTest(CompletionTest_VariableType_NoPrefix.suite());
+		addTest(CompletionTest_VariableType_Prefix.suite());
+		
+		addTest(CompletionTests.suite());
+		addTest(CompletionTests_PlainC.suite());
+		addTest(ParameterHintTests.suite());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/ParameterHintTests.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/ParameterHintTests.java
new file mode 100644
index 0000000..d212d14
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist2/ParameterHintTests.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 QNX Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ *     Bryan Wilkinson (QNX) - Initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.contentassist2;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+
+public class ParameterHintTests extends AbstractContentAssistTest {
+
+	private static final String HEADER_FILE_NAME = "PHTest.h";
+	private static final String SOURCE_FILE_NAME = "PHTest.cpp";
+	
+//{PHTest.h}
+//class aClass {
+//public:
+//	int aField;
+//	void aMethod(char c);
+//  void aMethod(char c, int x);
+//};
+//class bClass {
+//public:
+//	bClass(int x);
+//	bClass(int x, int y);
+//};
+//void aFunc(int i);
+//int anotherFunc(int i, int j);
+//int pi(aClass a);
+//int pie(aClass a);
+//int pies(aClass a);
+//template<class T>class tClass {public:tClass(T t);};
+//template<class T>void tFunc(T x, T y);
+	
+	public ParameterHintTests(String name) {
+		super(name, true);
+	}
+
+	public static Test suite() {
+		return BaseTestCase.suite(ParameterHintTests.class, "_");
+	}
+	
+	@Override
+	protected IFile setUpProjectContent(IProject project) throws Exception {
+		String headerContent= readTaggedComment(HEADER_FILE_NAME);
+		StringBuffer sourceContent= getContentsForTest(1)[0];
+		sourceContent.insert(0, "#include \""+HEADER_FILE_NAME+"\"\n");
+		assertNotNull(createFile(project, HEADER_FILE_NAME, headerContent));
+		return createFile(project, SOURCE_FILE_NAME, sourceContent.toString());
+	}
+	
+	protected void assertParameterHints(String[] expected) throws Exception {
+		assertContentAssistResults(getBuffer().length() - 1, expected, false,
+				AbstractContentAssistTest.COMPARE_ID_STRINGS);
+	}
+	
+	//void foo(){aFunc(
+	public void testFunction() throws Exception {
+		assertParameterHints(new String[] {
+				"aFunc(int i) : void"
+		});
+	}
+	
+	//void foo(){tFunc(
+	public void testTemplateFunction() throws Exception {
+		assertParameterHints(new String[] {
+				"tFunc(T x,T y) : void"
+		});
+	}
+	
+	//void foo(){tFunc<int>(
+	public void testTemplateFunction2() throws Exception {
+		assertParameterHints(new String[] {
+				"tFunc(T x,T y) : void"
+		});
+	}
+	
+	//void foo(){int a=5;aFunc  ( anotherFunc   (  a ,  (in
+	public void testOffsetCalculation() throws Exception {
+		assertParameterHints(new String[] {
+				"anotherFunc(int i,int j) : int"
+		});
+	}
+	
+	//void foo(){int a=pie(
+	public void testAccurateName() throws Exception {
+		assertParameterHints(new String[] {
+				"pie(aClass a) : int"
+		});
+	}
+	
+	//void foo(){int a=pi
+	public void testInvalidInvocation() throws Exception {
+		assertParameterHints(new String[] {});
+	}
+	
+	//void aClass::aMethod(
+	public void testMethodDefinition() throws Exception {
+		assertParameterHints(new String[] {
+				"aMethod(char c) : void",
+				"aMethod(char c,int x) : void"
+		});
+	}
+	
+	//void aClass::aMethod(char c){aMethod(c,aFi
+	public void testMethodScope() throws Exception {
+		assertParameterHints(new String[] {
+				"aMethod(char c) : void",
+				"aMethod(char c,int x) : void"
+		});
+	}
+	
+	//void foo(){aClass a=new aClass( 
+	public void testConstructor() throws Exception {
+		assertParameterHints(new String[] {
+				"aClass(const aClass &)"
+		});
+	}
+
+	//void foo(){bClass b(
+	public void _testConstructor2_Bug223660() throws Exception {
+		// http://bugs.eclipse.org/223660
+		assertParameterHints(new String[] {
+				"bClass(int x)",
+				"bClass(int x,int y)",
+				"bClass(const bClass &)"
+		});
+	}
+	
+	//void foo(){tClass<int> t=new tClass<int>(
+	public void testTemplateConstructor() throws Exception {
+		assertParameterHints(new String[] {
+				"tClass(T t)",
+				"tClass(const tClass<T> &)"
+		});
+	}
+	
+	//void foo(){tClass<int> t(
+	public void _testTemplateConstructor2_Bug223660() throws Exception {
+		// http://bugs.eclipse.org/223660
+		assertParameterHints(new String[] {
+				"tClass(T t)",
+				"tClass(const tClass &)"
+		});
+	}
+	
+	//int pi = 3;void foo(){pi(
+	public void testFunctionsOnly() throws Exception {
+		assertParameterHints(new String[] {
+				"pi(aClass a) : int"
+		});
+	}
+	
+	// class OtherClass {
+	// public:
+	// char getChar(int a, int b);
+	// };
+	//
+	// void foo() {
+	//    OtherClass* oc;
+	//    int i= (int) oc->getChar(
+	public void testMethodWithCast() throws Exception {
+		assertParameterHints(new String[] {
+				"getChar(int a,int b) : char"
+		});
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/CommentOwnerManagerTests.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/CommentOwnerManagerTests.java
new file mode 100644
index 0000000..99cc0ab
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/CommentOwnerManagerTests.java
@@ -0,0 +1,333 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.doctools;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
+import org.eclipse.cdt.ui.text.doctools.IDocCommentOwner;
+import org.eclipse.cdt.ui.text.doctools.IDocCommentOwnershipListener;
+
+import org.eclipse.cdt.internal.ui.text.doctools.DocCommentOwnerManager;
+import org.eclipse.cdt.internal.ui.text.doctools.NullDocCommentOwner;
+
+/**
+ * Test comment ownership mapping
+ */
+public class CommentOwnerManagerTests extends BaseTestCase {
+	IDocCommentOwner OWNER_1;
+	IDocCommentOwner OWNER_2;
+	IDocCommentOwner OWNER_3;
+	DocCommentOwnerManager manager;
+	
+	IProject projectA, projectB, projectC;
+	
+	protected void setUp() throws Exception {
+		manager= DocCommentOwnerManager.getInstance();
+		
+		projectA= CProjectHelper.createCCProject("projectA", null).getProject();
+		projectB= CProjectHelper.createCCProject("projectB", null).getProject();
+		projectC= CProjectHelper.createCCProject("projectC", null).getProject();
+		
+		IDocCommentOwner[] owners= manager.getRegisteredOwners();
+		OWNER_1= manager.getOwner("org.cdt.test.DCOM1");
+		OWNER_2= manager.getOwner("org.cdt.test.DCOM2");
+		OWNER_3= manager.getOwner("org.cdt.test.DCOM3");
+	}
+	
+	protected void tearDown() throws Exception {
+		if(projectA != null) {
+			CProjectHelper.delete(CoreModel.getDefault().create(projectA));
+		}
+		if(projectB != null) {
+			CProjectHelper.delete(CoreModel.getDefault().create(projectB));
+		}
+		if(projectC != null) {
+			CProjectHelper.delete(CoreModel.getDefault().create(projectC));			
+		}
+	}
+	
+	public static Test suite() {
+		return new TestSuite(CommentOwnerManagerTests.class);
+	}
+	
+	public void testProjectLevel() throws Exception {
+		manager.setCommentOwner(projectA, OWNER_3, true);
+		manager.setCommentOwner(projectB, OWNER_2, true);
+		manager.setCommentOwner(projectC, OWNER_1, true);
+		
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectA).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectA.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectA.getFolder("foo/bar")).getID());
+		
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB.getFolder("foo/bar")).getID());
+
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC.getFolder("foo/bar")).getID());
+		
+		manager.setCommentOwner(projectA, OWNER_2, true);
+		manager.setCommentOwner(projectB, OWNER_1, true);
+		manager.setCommentOwner(projectC, OWNER_3, true);
+		
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectA).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectA.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectA.getFolder("foo/bar")).getID());
+		
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectB).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectB.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectB.getFolder("foo/bar")).getID());
+
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectC).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectC.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectC.getFolder("foo/bar")).getID());
+		
+		projectA.close(NPM);
+		projectB.close(NPM);
+		projectC.close(NPM);
+		
+		projectA.open(NPM);
+		projectB.open(NPM);
+		projectC.open(NPM);
+		
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectA).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectA.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectA.getFolder("foo/bar")).getID());
+		
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectB).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectB.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectB.getFolder("foo/bar")).getID());
+
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectC).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectC.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectC.getFolder("foo/bar")).getID());
+	}
+	
+	public void testBoundaryConditions1() throws Exception {
+		DocCommentOwnerManager manager= DocCommentOwnerManager.getInstance();
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(null).getID());
+	}
+	
+	public void testBoundaryConditions2() throws Exception {
+		try {
+			manager.setWorkspaceCommentOwner(null);
+			fail();
+		} catch(Exception e) {
+			// expected
+		}
+	}
+	
+	public void testWorkspaceRootLevel() throws Exception {
+		manager.setCommentOwner(projectA, null, true);
+		manager.setCommentOwner(projectB, null, true);
+		manager.setCommentOwner(projectC, null, true);
+		
+		manager.setWorkspaceCommentOwner(OWNER_1);
+		
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectA).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectA.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectA.getFolder("foo/bar")).getID());
+		
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectB).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectB.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectB.getFolder("foo/bar")).getID());
+
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC.getFolder("foo/bar")).getID());
+		
+		manager.setWorkspaceCommentOwner(OWNER_2);
+		
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectA).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectA.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectA.getFolder("foo/bar")).getID());
+		
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB.getFolder("foo/bar")).getID());
+
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectC).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectC.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectC.getFolder("foo/bar")).getID());
+		
+		manager.setWorkspaceCommentOwner(OWNER_3);
+		
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectA).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectA.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectA.getFolder("foo/bar")).getID());
+		
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectB).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectB.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectB.getFolder("foo/bar")).getID());
+
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectC).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectC.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectC.getFolder("foo/bar")).getID());
+		
+		manager.setCommentOwner(projectA, OWNER_3, true);
+		manager.setCommentOwner(projectB, OWNER_2, true);
+		manager.setCommentOwner(projectC, OWNER_1, true);
+		
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectA).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectA.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectA.getFolder("foo/bar")).getID());
+		
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB.getFolder("foo/bar")).getID());
+
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC.getFolder("foo/bar")).getID());
+		
+		manager.setWorkspaceCommentOwner(NullDocCommentOwner.INSTANCE);
+		
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectA).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectA.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_3.getID(), manager.getCommentOwner(projectA.getFolder("foo/bar")).getID());
+		
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB.getFolder("foo/bar")).getID());
+
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC.getFolder("foo/bar")).getID());
+		
+		manager.setCommentOwner(projectA, null, true);
+
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectA).getID());
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectA.getFile("foo/bar/baz")).getID());
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectA.getFolder("foo/bar")).getID());
+		
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB.getFolder("foo/bar")).getID());
+
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC.getFolder("foo/bar")).getID());
+	
+		manager.setCommentOwner(projectC, null, true);
+		
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectA).getID());
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectA.getFile("foo/bar/baz")).getID());
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectA.getFolder("foo/bar")).getID());
+		
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_2.getID(), manager.getCommentOwner(projectB.getFolder("foo/bar")).getID());
+
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectC).getID());
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectC.getFile("foo/bar/baz")).getID());
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectC.getFolder("foo/bar")).getID());
+	
+		manager.setCommentOwner(projectB, null, true);
+		
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectA).getID());
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectA.getFile("foo/bar/baz")).getID());
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectA.getFolder("foo/bar")).getID());
+		
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectB).getID());
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectB.getFile("foo/bar/baz")).getID());
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectB.getFolder("foo/bar")).getID());
+
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectC).getID());
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectC.getFile("foo/bar/baz")).getID());
+		assertEquals(NullDocCommentOwner.INSTANCE.getID(), manager.getCommentOwner(projectC.getFolder("foo/bar")).getID());
+		
+		manager.setWorkspaceCommentOwner(OWNER_1);
+		
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectA).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectA.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectA.getFolder("foo/bar")).getID());
+		
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectB).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectB.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectB.getFolder("foo/bar")).getID());
+
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC.getFile("foo/bar/baz")).getID());
+		assertEquals(OWNER_1.getID(), manager.getCommentOwner(projectC.getFolder("foo/bar")).getID());
+	}
+	
+	public void testDocListenerEvents_221109() {
+		TestListener tl= new TestListener();
+		
+		manager.setCommentOwner(projectA, null, true);
+		manager.setCommentOwner(projectB, null, true);
+		manager.setCommentOwner(projectC, null, true);
+		manager.setWorkspaceCommentOwner(OWNER_1);
+		manager.addListener(tl);
+		
+		tl.reset();
+		manager.setCommentOwner(projectA, OWNER_1, true);
+		assertEquals(0, tl.prjEvents);
+		assertEquals(0, tl.wkspcEvents);
+		
+		tl.reset();
+		manager.setCommentOwner(projectA, OWNER_2, true);
+		assertEquals(1, tl.prjEvents);
+		assertEquals(0, tl.wkspcEvents);
+		
+		tl.reset();
+		manager.setCommentOwner(projectA, OWNER_3, true);
+		assertEquals(1, tl.prjEvents);
+		assertEquals(0, tl.wkspcEvents);
+		
+		tl.reset();
+		manager.setCommentOwner(projectA, OWNER_1, true);
+		assertEquals(1, tl.prjEvents);
+		assertEquals(0, tl.wkspcEvents);
+		
+		tl.reset();
+		manager.setCommentOwner(ResourcesPlugin.getWorkspace().getRoot(), OWNER_2, true);
+		assertEquals(0, tl.prjEvents);
+		assertEquals(1, tl.wkspcEvents);
+		
+		tl.reset();
+		manager.setWorkspaceCommentOwner(OWNER_3);
+		assertEquals(0, tl.prjEvents);
+		assertEquals(1, tl.wkspcEvents);
+		
+		tl.reset();
+		manager.setWorkspaceCommentOwner(OWNER_3);
+		assertEquals(0, tl.prjEvents);
+		assertEquals(0, tl.wkspcEvents);
+		
+		manager.removeListener(tl);
+	}
+}
+
+class TestListener implements IDocCommentOwnershipListener {
+	public int prjEvents, wkspcEvents;
+	public void ownershipChanged(IResource resource,
+			boolean submappingsRemoved, IDocCommentOwner oldOwner,
+			IDocCommentOwner newOwner) {
+		prjEvents++;
+	}
+	public void workspaceOwnershipChanged(IDocCommentOwner oldOwner,
+			IDocCommentOwner newOwner) {
+		wkspcEvents++;
+	}
+	public void reset() {
+		prjEvents= wkspcEvents= 0;
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/DocCommentHighlightingTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/DocCommentHighlightingTest.java
new file mode 100644
index 0000000..644b26b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/DocCommentHighlightingTest.java
@@ -0,0 +1,214 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.doctools;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Assert;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.TextViewer;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
+
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.PreferenceConstants;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+import org.eclipse.cdt.ui.tests.text.Accessor;
+import org.eclipse.cdt.ui.tests.text.EditorTestHelper;
+import org.eclipse.cdt.ui.tests.text.ResourceTestHelper;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.internal.ui.text.doctools.DocCommentOwnerManager;
+
+/**
+ * 
+ */
+public class DocCommentHighlightingTest extends BaseUITestCase {
+	private static final DocCommentOwnerManager DCMAN= DocCommentOwnerManager.getInstance();
+	private static final String LINKED_FOLDER= "resources/docComments";
+	private static final String PROJECT= "DocCommentTests";
+
+	// ordered by occurrence
+	private static final int[] normal0= {114, 13};
+	private static final int[] comment1= {129, 18};
+	private static final int[] comment2= {149, 17};
+	private static final int[] comment3= {168, 16};
+	private static final int[] comment4= {184, 18};
+	private static final int[] comment5= {204, 19};
+	private static final int[] comment6= {223, 16};
+	private static final int[] comment7= {241, 17};
+	private static final int[] comment8= {258, 16};
+	private static final int[] comment9= {274, 17};
+	private static final int[] comment10= {293, 18};
+	private static final int[] snormal0= {315, 13};
+	private static final int[] scomment1= {328, 17};
+	private static final int[] scomment2= {345, 16};
+	private static final int[] scomment3= {361, 17};
+	private static final int[] scomment4= {378, 16};
+	private static final int[] scomment5= {394, 18};
+	private static final int[] comment11= {414, 18};
+	private static final int[] scomment6= {433, 16};
+	private static final int[] comment12= {449, 19};
+	private static final int[] scomment7= {469, 17};
+	
+	
+	private ICProject fCProject;
+	private final String fTestFilename= "/"+PROJECT+"/src/this.cpp";
+
+	private static SourceViewer fSourceViewer;
+
+	public static Test suite() {
+		return new TestSuite(DocCommentHighlightingTest.class);
+	}
+
+	public DocCommentHighlightingTest(String name) {
+		super(name);
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		fCProject= EditorTestHelper.createCProject(PROJECT, LINKED_FOLDER);
+		CUIPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.REMOVE_TRAILING_WHITESPACE, false);
+		AbstractTextEditor fEditor= (CEditor) EditorTestHelper.openInEditor(ResourceTestHelper.findFile(fTestFilename), true);
+		fSourceViewer= EditorTestHelper.getSourceViewer(fEditor);
+		// source positions depend on Windows line separator
+		adjustLineSeparator(fSourceViewer.getDocument(), "\r\n");
+		fEditor.doSave(new NullProgressMonitor());
+		assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100));
+	}
+
+	@Override
+	protected void tearDown () throws Exception {
+		EditorTestHelper.closeAllEditors();
+
+		if (fCProject != null)
+			CProjectHelper.delete(fCProject);
+
+		CUIPlugin.getDefault().getPreferenceStore().setToDefault(PreferenceConstants.REMOVE_TRAILING_WHITESPACE);
+		super.tearDown();
+	}
+
+	/**
+	 * Make the document use the given line separator.
+	 * 
+	 * @param document
+	 * @param lineSeparator
+	 */
+	private void adjustLineSeparator(IDocument document, String lineSeparator) throws BadLocationException {
+		for (int i= 0; i < document.getNumberOfLines(); i++) {
+			String delimiter= document.getLineDelimiter(i);
+			if (delimiter != null && !delimiter.equals(lineSeparator)) {
+				IRegion lineRegion= document.getLineInformation(i);
+				document.replace(lineRegion.getOffset() + lineRegion.getLength(), delimiter.length(), lineSeparator);
+			}
+		}
+ 	}
+
+	protected List<Position> findRangesColored(RGB rgb) {
+		List<Position> result= new ArrayList<Position>();
+		IEditorPart p= get();
+		ISourceViewer vw= ((CEditor)p).getViewer();
+		Accessor a= new Accessor(vw, TextViewer.class);
+		StyledText st= (StyledText) a.get("fTextWidget");
+		StyleRange[] rgs= st.getStyleRanges();
+		for(int i=0; i<rgs.length; i++) {
+			if(rgs[i].foreground != null && rgs[i].foreground.getRGB().equals(rgb)) {
+				result.add(new Position(rgs[i].start, rgs[i].length));
+			}
+		}
+		return result;
+	}
+
+	protected IEditorPart get(){
+		IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		if(window!=null) {
+			if(window.getActivePage()!=null) {
+				IEditorReference[] es= window.getActivePage().getEditorReferences();
+				for(int i=0; i<es.length; i++) {
+					IEditorPart part= es[i].getEditor(false);
+					if(part != null)
+						return part;
+				}
+			}
+		}
+		return null;
+	}
+
+	private List<Position> mkPositions(int[][] raw) {
+		List<Position> result= new ArrayList<Position>();
+		for(int i=0; i<raw.length; i++) {
+			Assert.assertEquals(2, raw[i].length);
+			result.add(new Position(raw[i][0], raw[i][1]));
+		}
+		return result;
+	}
+	
+	public void testDCOM_A() throws BadLocationException, InterruptedException {
+		DCMAN.setCommentOwner(fCProject.getProject(), DCMAN.getOwner("org.cdt.test.ownerA"), true);
+		runEventQueue(1000);
+		List<Position> expected= mkPositions(new int[][] {comment1, scomment1});
+		assertEquals(expected, findRangesColored(TestGenericTagConfiguration.DEFAULTRGB));
+	}
+
+	public void testDCOM_B() throws BadLocationException, InterruptedException {
+		DCMAN.setCommentOwner(fCProject.getProject(), DCMAN.getOwner("org.cdt.test.ownerB"), true);
+		runEventQueue(1000);
+		List<Position> expected= mkPositions(new int[][] {comment2, scomment2});
+		assertEquals(expected, findRangesColored(TestGenericTagConfiguration.DEFAULTRGB));
+	}
+
+	public void testDCOM_C() throws BadLocationException, InterruptedException  {
+		DCMAN.setCommentOwner(fCProject.getProject(), DCMAN.getOwner("org.cdt.test.ownerC"), true);
+		runEventQueue(1000);
+		List<Position> expected= mkPositions(new int[][] {comment3, scomment3});
+		assertEquals(expected, findRangesColored(TestGenericTagConfiguration.DEFAULTRGB));
+	}
+
+	public void testDCOM_ABC() throws BadLocationException, InterruptedException {
+		DCMAN.setCommentOwner(fCProject.getProject(), DCMAN.getOwner("org.cdt.test.ownerABC"), true);
+		runEventQueue(1000);
+		List<Position> expected= mkPositions(new int[][] {comment1, comment2, comment3, scomment1, scomment2, scomment3});
+		assertEquals(expected, findRangesColored(TestGenericTagConfiguration.DEFAULTRGB));
+	}
+	
+	public void testDCOM_BDFG() throws BadLocationException, InterruptedException {
+		DCMAN.setCommentOwner(fCProject.getProject(), DCMAN.getOwner("org.cdt.test.ownerBDFG"), true);
+		runEventQueue(1000);
+		List<Position> expected= mkPositions(new int[][] {comment2, comment4, comment6, comment7, comment8, scomment2});
+		assertEquals(expected, findRangesColored(TestGenericTagConfiguration.DEFAULTRGB));
+	}
+	
+	public void testDCOM_PUNC() throws BadLocationException, InterruptedException {
+		DCMAN.setCommentOwner(fCProject.getProject(), DCMAN.getOwner("org.cdt.test.ownerPUNC"), true);
+		runEventQueue(1000);
+		List<Position> expected= mkPositions(new int[][] {comment9, comment10, scomment4, scomment5, comment11, comment12, scomment7});
+		assertEquals(expected, findRangesColored(TestGenericTagConfiguration.DEFAULTRGB));
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/DocCommentTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/DocCommentTestSuite.java
new file mode 100644
index 0000000..651f431
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/DocCommentTestSuite.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.doctools;
+
+import org.eclipse.cdt.ui.tests.text.doctools.doxygen.DoxygenCCommentAutoEditStrategyTest;
+
+import junit.framework.TestSuite;
+
+public class DocCommentTestSuite extends TestSuite {
+
+    public static TestSuite suite() {
+        return new DocCommentTestSuite();
+    }
+    
+    public DocCommentTestSuite() {
+        super(DocCommentTestSuite.class.getName());
+
+		addTest(CommentOwnerManagerTests.suite());
+		addTest(DocCommentHighlightingTest.suite());
+		addTest(DoxygenCCommentAutoEditStrategyTest.suite());
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/TestGenericTagConfiguration.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/TestGenericTagConfiguration.java
new file mode 100644
index 0000000..f99c355
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/TestGenericTagConfiguration.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Symbian Software Systems and others.
+ * 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
+ *
+ * Contributors:
+ * Andrew Ferguson (Symbian) - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.doctools;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IAutoEditStrategy;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.swt.graphics.RGB;
+
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.text.doctools.generic.AbstractGenericTagDocCommentViewerConfiguration;
+import org.eclipse.cdt.ui.text.doctools.generic.GenericDocTag;
+
+public class TestGenericTagConfiguration extends AbstractGenericTagDocCommentViewerConfiguration {
+	public static final RGB DEFAULTRGB= new RGB(63, 95, 191);
+	
+	protected char[] fCommentMarkers;
+	
+	public TestGenericTagConfiguration(String commentMarkers, String tags, String tagMarkers, String defaultToken, String tagToken) {
+		super(mkTags(tags.split("(\\s)*,(\\s)*")), tagMarkers.toCharArray(), defaultToken, tagToken);
+		IPreferenceStore cuis= CUIPlugin.getDefault().getPreferenceStore();
+		PreferenceConverter.setDefault(cuis, defaultToken, DEFAULTRGB);
+		PreferenceConverter.setDefault(cuis, tagToken, new RGB(127, 159, 191));
+		fCommentMarkers= commentMarkers.toCharArray();
+	}
+	
+	public IAutoEditStrategy createAutoEditStrategy() {
+		return null;
+	}
+	
+	private static GenericDocTag[] mkTags(String[] tagNames) {
+		GenericDocTag[] tags= new GenericDocTag[tagNames.length];
+		for(int i=0; i<tagNames.length; i++) {
+			tags[i]= new GenericDocTag(tagNames[i], "no description");
+		}
+		return tags;
+	}
+	
+	public boolean isDocumentationComment(IDocument doc, int offset, int length) {
+		try {
+			if(offset+2 < doc.getLength()) {
+				char c= doc.getChar(offset+2);
+				for(int i=0; i<fCommentMarkers.length; i++)
+					if(c == fCommentMarkers[i])
+						return true;
+				return false;
+			}
+		} catch(BadLocationException ble) {
+			CUIPlugin.log(ble);
+		}
+		return false;
+	}
+	
+	public static class A extends TestGenericTagConfiguration {
+		public A() {super("A", "", "@", "test.token.A.default", "test.token.A.tag");}
+	}
+	
+	public static class B extends TestGenericTagConfiguration {
+		public B() {super("B", "", "@", "test.token.B.default", "test.token.B.tag");}
+	}
+	
+	public static class C extends TestGenericTagConfiguration {
+		public C() {super("C", "", "@", "test.token.C.default", "test.token.C.tag");}
+	}
+	
+	public static class ABC extends TestGenericTagConfiguration {
+		public ABC() {super("ABC", "", "@", "test.token.ABC.default", "test.token.ABC.tag");}
+	}
+	
+	public static class BDFG extends TestGenericTagConfiguration {
+		public BDFG() {super("BDFG", "", "@", "test.token.BDFG.default", "test.token.BDFG.tag");}
+	}
+	
+	public static class PUNC extends TestGenericTagConfiguration {
+		public PUNC() {super("!*#", "", "@", "test.token.BDFG.default", "test.token.BDFG.tag");}
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/doxygen/DoxygenCCommentAutoEditStrategyTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/doxygen/DoxygenCCommentAutoEditStrategyTest.java
new file mode 100644
index 0000000..b2f1ee6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/doctools/doxygen/DoxygenCCommentAutoEditStrategyTest.java
@@ -0,0 +1,618 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *     Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *     Sergey Prigogin, Google
+ *     Andrew Ferguson (Symbian)
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.text.doctools.doxygen;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.tests.text.DefaultCCommentAutoEditStrategyTest;
+import org.eclipse.cdt.ui.text.ICPartitions;
+import org.eclipse.cdt.ui.text.doctools.DefaultMultilineCommentAutoEditStrategy;
+import org.eclipse.cdt.ui.text.doctools.doxygen.DoxygenMultilineAutoEditStrategy;
+
+import org.eclipse.cdt.internal.core.model.TranslationUnit;
+
+import org.eclipse.cdt.internal.ui.text.CAutoIndentStrategy;
+import org.eclipse.cdt.internal.ui.text.CTextTools;
+
+
+/**
+ * Testing the auto indent strategies.
+ */
+public class DoxygenCCommentAutoEditStrategyTest extends DefaultCCommentAutoEditStrategyTest {
+	protected ICProject fCProject;
+	
+	/**
+	 * @param name
+	 */
+	public DoxygenCCommentAutoEditStrategyTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return suite(DoxygenCCommentAutoEditStrategyTest.class);
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+		fCProject= CProjectHelper.createCCProject("test"+System.currentTimeMillis(), null);
+	}
+
+	/*
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		CProjectHelper.delete(fCProject);
+		super.tearDown();
+	}
+
+	private AutoEditTester createAutoEditTester() {
+		CTextTools textTools = CUIPlugin.getDefault().getTextTools();
+		IDocument doc = new Document();
+		textTools.setupCDocument(doc);
+		AutoEditTester tester = new AutoEditTester(doc, ICPartitions.C_PARTITIONING);
+
+
+		tester.setAutoEditStrategy(IDocument.DEFAULT_CONTENT_TYPE, new CAutoIndentStrategy(ICPartitions.C_PARTITIONING, null));
+		tester.setAutoEditStrategy(ICPartitions.C_MULTI_LINE_COMMENT, new DefaultMultilineCommentAutoEditStrategy());
+		tester.setAutoEditStrategy(ICPartitions.C_PREPROCESSOR, new CAutoIndentStrategy(ICPartitions.C_PARTITIONING, null));
+		return tester;
+	}
+	
+	// /**X
+	//  void foo() {}
+	
+	// /**
+	//  * X
+	//  */
+	//  void foo() {}
+	public void testAutoDocCommentContent1() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// /**   X
+	//  void foo() {}
+	
+	// /**   
+	//  * X
+	//  */
+	//  void foo() {}
+	public void testAutoDocCommentContent2() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// /**X
+	//  int foo_bar() {}
+	
+	// /**
+	//  * X
+	//  * @return
+	//  */
+	//  int foo_bar() {}
+	public void testAutoDocCommentContent3() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// /**   X
+	//  int foo_bar() {}
+	
+	// /**   
+	//  * X
+	//  * @return
+	//  */
+	//  int foo_bar() {}
+	public void testAutoDocCommentContent4() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// /**X
+	//  *
+	//  */
+	//  int foo_bar() {}
+	
+	// /**
+	//  * X
+	//  *
+	//  */
+	//  int foo_bar() {}
+	public void testAutoDocCommentContent5() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// /**X
+	//  void foo_bar(int x) {}
+	
+	// /**
+	//  * X
+	//  * @param x
+	//  */
+	//  void foo_bar(int x) {}
+	public void testAutoDocCommentContent6() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// class A {}; class B {};
+	// /**X
+	//  C* bar_baz(A a, B b, int c) {}
+	
+	// class A {}; class B {};
+	// /**
+	//  * X
+	//  * @param a
+	//  * @param b
+	//  * @param c
+	//  * @return
+	//  */
+	//  C* bar_baz(A a, B b, int c) {}
+	public void testAutoDocCommentContent7() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// /**
+	//  * namespace
+	//  */
+	// namespace NS {
+    // class A {
+	//    private:
+	//    /*
+	//     * TODO
+	//     */
+	//    /*!
+	//     * class
+	//     */
+	//    class B {
+	//       public:
+	//       /**
+	//        *
+	//        */
+	//        void foo() {}
+	//        /*!X
+	//        A bar(A as[], B bs[]) {}
+	//    };
+	// };
+	// }
+	
+	// /**
+	//  * namespace
+	//  */
+	// namespace NS {
+    // class A {
+	//    private:
+	//    /*
+	//     * TODO
+	//     */
+	//    /*!
+	//     * class
+	//     */
+	//    class B {
+	//       public:
+	//       /**
+	//        *
+	//        */
+	//        void foo() {}
+	//        /*!
+	//         * X
+	//         * @param as
+	//         * @param bs
+	//         * @return
+	//         */
+	//        A bar(A as[], B bs[]) {}
+	//    };
+	// };
+	// }
+	public void testAutoDocCommentContent8() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// void foo_bar(int x)
+	// /**X
+	// {}
+	
+	// void foo_bar(int x)
+	// /**
+	//  * X
+	//  * @param x
+	//  */
+	// {}
+	public void testAutoDocCommentContent9() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// /**
+	//  *
+	//  */
+	// void foo_bar(int x)
+	// /**X
+	// {}
+
+	// /**
+	//  *
+	//  */
+	// void foo_bar(int x)
+	// /**
+	//  * X
+	//  * @param x
+	//  */
+	// {}
+	public void testAutoDocCommentContent9b() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// void foo_bar(int x)
+	// {
+	//   /**X
+	// }
+	
+	// void foo_bar(int x)
+	// {
+	//   /**
+	//    * X
+	//    */
+	// }
+	public void testAutoDocCommentContent9c() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// void foo_bar(int x)
+	// {
+	// /**X
+	// }
+	
+	// void foo_bar(int x)
+	// {
+	// /**
+	//  * X
+	//  * @param x
+	//  */
+	// }
+	public void _testAutoDocCommentContent10() throws CoreException {
+		assertAutoEditBehaviour();
+		// TODO - desired behaviour when there is a comment preceding the declaration
+		// or when there is a comment after the signature but before the brace, both need defining
+	}
+	
+	// /*!X
+	// enum A { B, C };
+	
+	// /*!
+	//  * X
+	//  */
+	// enum A { B, C };
+	public void testAutoDocCommentContent11() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// /**X
+	// enum A { B,
+	//     C };
+
+	// /**
+	//  * X
+	//  */
+	// enum A { B,//!< B
+	//     C };   //!< C
+	public void testAutoDocCommentContent13() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// /**X
+	// enum A { B,
+	//     C };//!< C
+
+	// /**
+	//  * X
+	//  */
+	// enum A { B,//!< B
+	//     C };//!< C
+	public void testAutoDocCommentContent14() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// /**X
+	// enum A { B,//!< B
+	//     C };
+
+	// /**
+	//  * X
+	//  */
+	// enum A { B,//!< B
+	//     C };//!< C
+	public void testAutoDocCommentContent15() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// /**X
+	// enum A { B,
+	// 		C };
+
+	// /**
+	//  * X
+	//  */
+	// enum A { B,//!< B
+	// 		C };  //!< C
+	public void _testAutoDocCommentContent16() throws CoreException {
+		/*
+		 * Indenting in the presence of tabs is not handled at the moment.
+		 */
+		assertAutoEditBehaviour();
+	}
+	
+	//	#define STATIC static
+	//
+	//	class D {
+	//	public:
+	//      /**X
+	//      STATIC void D::foo(int x) {
+	//      
+	//      }
+	//	};
+	
+	//	#define STATIC static
+	//
+	//	class D {
+	//	public:
+	//      /**
+	//       * X
+	//       * @param x
+	//       */
+	//      STATIC void D::foo(int x) {
+	//      
+	//      }
+	//	};
+	public void testAutoDocCommentContent17() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// class D {
+	//	 public:
+	//       /**X
+	//		 virtual void foo(D x) = 0;
+	// };
+	
+	// class D {
+	//	 public:
+	//       /**
+	//        * X
+	//        * @param x
+	//        */
+	//		 virtual void foo(D x) = 0;
+	// };
+	public void testAutoDocCommentContent18() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// class D {
+	//	 public:
+	//       /**X
+	//		 virtual void foo(D x);
+	// };
+	
+	// class D {
+	//	 public:
+	//       /**
+	//        * X
+	//        * @param x
+	//        */
+	//		 virtual void foo(D x);
+	// };
+	public void testAutoDocCommentContent19() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	//	class A {};
+	//  /**X
+	//	A baz;
+	
+	//	class A {};
+	//  /**
+	//   * X
+	//   */
+	//	A baz;
+	public void testAutoDocCommentContent20() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	//  /**X
+	//	void foo(void) {}
+	
+	//  /**
+	//   * X
+	//   */
+	//	void foo(void) {}
+	public void testAutoDocCommentContent21_238852_a() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	//  /**X
+	//	void foo(void* x) {}
+	
+	//  /**
+	//   * X
+	//   * @param x
+	//   */
+	//	void foo(void* x) {}
+	public void testAutoDocCommentContent21_238852_b() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	//  /**X
+	//	void foo(void (*fp)()) {}
+	
+	//  /**
+	//   * X
+	//   * @param fp
+	//   */
+	//	void foo(void (*fp)()) {}
+	public void testAutoDocCommentContent21_238852_c() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	//  /**X
+	//	void foo(void vs[]) {}
+	
+	//  /**
+	//   * X
+	//   * @param vs
+	//   */
+	//	void foo(void vs[]) {}
+	public void testAutoDocCommentContent21_238852_d() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	/** Declarations **/
+	
+	// /**X
+	//  int foo_bar();
+	
+	// /**
+	//  * X
+	//  * @return
+	//  */
+	//  int foo_bar();
+	public void testAutoDocCommentContent3_Dec() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// /**   X
+	//  int foo_bar();
+	
+	// /**   
+	//  * X
+	//  * @return
+	//  */
+	//  int foo_bar();
+	public void testAutoDocCommentContent4_Dec() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// /**X
+	//  *
+	//  */
+	//  int foo_bar();
+	
+	// /**
+	//  * X
+	//  *
+	//  */
+	//  int foo_bar();
+	public void testAutoDocCommentContent5_Dec() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// /**X
+	//  void foo_bar(int x);
+	
+	// /**
+	//  * X
+	//  * @param x
+	//  */
+	//  void foo_bar(int x);
+	public void testAutoDocCommentContent6_Dec() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	// class A {}; class B {};
+	// /**X
+	//  C* bar_baz(A a, B b, int c);
+	
+	// class A {}; class B {};
+	// /**
+	//  * X
+	//  * @param a
+	//  * @param b
+	//  * @param c
+	//  * @return
+	//  */
+	//  C* bar_baz(A a, B b, int c);
+	public void testAutoDocCommentContent7_Dec() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	//	#define STATIC static
+	//
+	//	class D {
+	//	public:
+	//      /**X
+	//      STATIC void D::foo(int x);
+	//	};
+	
+	//	#define STATIC static
+	//
+	//	class D {
+	//	public:
+	//      /**
+	//       * X
+	//       * @param x
+	//       */
+	//      STATIC void D::foo(int x);
+	//	};
+	public void testAutoDocCommentContent17_Dec() throws CoreException {
+		assertAutoEditBehaviour();
+	}
+	
+	protected void assertAutoEditBehaviour() throws CoreException {
+		CTextTools textTools = CUIPlugin.getDefault().getTextTools();
+		final IDocument doc = new Document();
+		textTools.setupCDocument(doc);
+		
+		StringBuffer[] raw= getTestContents();
+		String init= raw[0].toString(), expected= raw[1].toString();
+
+		int caretInit= init.indexOf('X');
+		init= init.replaceFirst("X", "");
+
+		int caretExpected= expected.indexOf('X');
+		expected= expected.replaceFirst("X", "");
+				
+		
+		DoxygenMultilineAutoEditStrategy ds= new DoxygenMultilineAutoEditStrategy() {
+			public IASTTranslationUnit getAST() {
+				final IFile file= fCProject.getProject().getFile("testContent.cpp");
+				try {
+					TestSourceReader.createFile(fCProject.getProject(), "testContent.cpp", doc.get());
+					String id = CoreModel.getRegistedContentTypeId(file.getProject(), file.getName());
+					return new TranslationUnit(fCProject, file, id).getAST();
+				} catch(CoreException ce) {
+					assertTrue("Could not get test content AST", false);
+					return null;
+				}
+			}
+		};
+
+
+		doc.set(init);
+		int caretActual= -1;
+		try {
+			TestDocumentCommand dc= new TestDocumentCommand(caretInit, 0, "\n");
+			ds.customizeDocumentCommand(doc, dc);
+			caretActual= dc.exec(doc);
+		} catch(BadLocationException ble) {
+			fail(ble.getMessage());
+		}
+		String actual= doc.get();
+		assertEquals(expected, actual);
+		assertEquals(caretExpected, caretActual);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/BaseSelectionTestsIndexer.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/BaseSelectionTestsIndexer.java
new file mode 100644
index 0000000..b9a5277
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/BaseSelectionTestsIndexer.java
@@ -0,0 +1,324 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *    IBM - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.selection;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.search.ui.ISearchResult;
+import org.eclipse.search.ui.NewSearchUI;
+import org.eclipse.search.ui.text.AbstractTextSearchResult;
+import org.eclipse.search2.internal.ui.SearchView;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ILanguage;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.FileManager;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+import org.eclipse.cdt.ui.tests.text.EditorTestHelper;
+
+import org.eclipse.cdt.internal.core.model.ASTCache.ASTRunnable;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+import org.eclipse.cdt.internal.ui.editor.ASTProvider;
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.internal.ui.editor.ICEditorActionDefinitionIds;
+import org.eclipse.cdt.internal.ui.search.actions.OpenDeclarationsAction;
+
+/**
+ * Base test class for testing Ctrl_F3/F3 with the indexers.
+ *  
+ * @author dsteffle
+ */
+public class BaseSelectionTestsIndexer extends BaseUITestCase {
+	protected ICProject fCProject;
+	static FileManager fileManager = new FileManager();
+	IProgressMonitor monitor = new NullProgressMonitor();
+	
+	public BaseSelectionTestsIndexer(String name) {
+		super(name);
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		OpenDeclarationsAction.sIsJUnitTest= true;
+		IWorkbenchPage page= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		IViewReference[] refs= page.getViewReferences();
+		for (int i = 0; i < refs.length; i++) {
+			IViewReference viewReference = refs[i];
+			page.setPartState(viewReference, IWorkbenchPage.STATE_RESTORED);
+		}
+	}
+	
+	public void waitForIndex(int maxSec) throws Exception {
+		assertTrue(CCorePlugin.getIndexManager().joinIndexer(maxSec * 1000, new NullProgressMonitor()));
+	}
+	
+	protected String getMessage(IStatus status) {
+		StringBuffer message = new StringBuffer("["); //$NON-NLS-1$
+		message.append(status.getMessage());
+		if (status.isMultiStatus()) {
+			IStatus children[] = status.getChildren();
+			for (int i = 0; i < children.length; i++) {
+				message.append(getMessage(children[i]));
+			}
+		}
+		message.append("]"); //$NON-NLS-1$
+		return message.toString();
+	}
+
+    protected IFile importFile(String fileName, String contents) throws Exception{
+        //Obtain file handle
+        IFile file = fCProject.getProject().getFile(fileName);
+        
+        InputStream stream = new ByteArrayInputStream(contents.getBytes()); 
+        //Create file input stream
+        if (file.exists())
+            file.setContents(stream, false, false, monitor);
+        else
+            file.create(stream, false, monitor);
+        
+        fileManager.addFile(file);
+        
+        waitForIndex(20); // only wait 20 seconds max.
+        
+        return file;
+    }
+    
+    protected IFile importFileWithLink(String fileName, String contents) throws Exception{
+        //Obtain file handle
+        IFile file = fCProject.getProject().getFile(fileName);
+        
+        IPath location = new Path(fCProject.getProject().getLocation().removeLastSegments(1).toOSString() + File.separator + fileName); 
+        
+        File linkFile = new File(location.toOSString());
+        if (linkFile.exists()) {
+        	linkFile.delete();
+        }
+        
+        file.createLink(location, IResource.ALLOW_MISSING_LOCAL, null);
+        
+        InputStream stream = new ByteArrayInputStream(contents.getBytes()); 
+        //Create file input stream
+        if (file.exists()) {
+			long timestamp= file.getLocalTimeStamp();
+        	file.setContents(stream, false, false, monitor);
+        	if (file.getLocalTimeStamp() == timestamp) {
+        		file.setLocalTimeStamp(timestamp+1000);
+        	}
+        } else {
+            file.create(stream, false, monitor);
+        }
+        
+        fileManager.addFile(file);
+        
+        return file;
+    }
+    
+    protected IFile importFileInsideLinkedFolder(String fileName, String contents, String folderName) throws Exception{
+    	IProject project= fCProject.getProject();
+    	IFolder linkedFolder = project.getFolder(folderName);
+    	IPath folderLocation = new Path(project.getLocation().toOSString() + File.separator + folderName + "_this_is_linked"); //$NON-NLS-1$
+    	IFolder actualFolder = project.getFolder(folderName + "_this_is_linked"); //$NON-NLS-1$
+    	if (!actualFolder.exists())
+    		actualFolder.create(true, true, monitor);
+    	
+    	linkedFolder.createLink(folderLocation, IResource.NONE, monitor);
+    	
+    	actualFolder.delete(true, false, monitor);
+    	
+    	IFile file = linkedFolder.getFile(fileName);
+    	
+        InputStream stream = new ByteArrayInputStream(contents.getBytes()); 
+        //Create file input stream
+        if (file.exists())
+            file.setContents(stream, false, false, monitor);
+        else
+            file.create(stream, false, monitor);
+            	
+        fileManager.addFile(file);
+    	
+        return file;
+    }
+
+    protected IFolder importFolder(String folderName) throws Exception {
+    	IFolder folder = fCProject.getProject().getFolder(folderName);
+		
+		//Create file input stream
+		if (!folder.exists())
+			folder.create(false, false, monitor);
+		
+		return folder;
+    }
+    
+    protected String getEditorID() {
+    	return "org.eclipse.cdt.ui.editor.CEditor";
+    }
+    
+	protected IASTNode testF3(IFile file, int offset) throws ParserException, CoreException {
+		return testF3(file, offset, 0);
+	}
+	
+    protected IASTNode testF3(IFile file, int offset, int length) throws ParserException, CoreException {
+		if (offset < 0)
+			throw new ParserException("offset can not be less than 0 and was " + offset); //$NON-NLS-1$
+		
+        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+        IEditorPart part = null;
+        try {
+            part = page.openEditor(new FileEditorInput(file), getEditorID(), true); //$NON-NLS-1$
+        } catch (PartInitException e) {
+            assertFalse(true);
+        }
+        
+        if (part instanceof CEditor) {
+        	CEditor editor= (CEditor) part;
+    		EditorTestHelper.joinReconciler(EditorTestHelper.getSourceViewer(editor), 100, 5000, 10);
+            ((AbstractTextEditor)part).getSelectionProvider().setSelection(new TextSelection(offset,length));
+            
+            final OpenDeclarationsAction action = (OpenDeclarationsAction) editor.getAction("OpenDeclarations"); //$NON-NLS-1$
+            action.runSync();
+        
+        	// update the file/part to point to the newly opened IFile/IEditorPart
+            part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); 
+            assertTrue (part instanceof CEditor);
+            editor= (CEditor) part;
+    		EditorTestHelper.joinReconciler(EditorTestHelper.getSourceViewer(editor), 100, 5000, 10);
+
+    		// the action above should highlight the declaration, so now retrieve it and use that selection to get the IASTName selected on the TU
+            ISelection sel= editor.getSelectionProvider().getSelection();
+            
+            final IASTName[] result= {null};
+            if (sel instanceof ITextSelection) {
+            	final ITextSelection textSel = (ITextSelection)sel;
+            	ITranslationUnit tu = (ITranslationUnit)editor.getInputCElement();
+        		IStatus ok= ASTProvider.getASTProvider().runOnAST(tu, ASTProvider.WAIT_IF_OPEN, monitor, new ASTRunnable() {
+        			public IStatus runOnAST(ILanguage language, IASTTranslationUnit ast) throws CoreException {
+        				result[0]= ast.getNodeSelector(null).findName(textSel.getOffset(), textSel.getLength());
+        				return Status.OK_STATUS;
+        			}
+        		});
+        		assertTrue(ok.isOK());
+				return result[0];
+            }
+        }
+        
+        return null;
+    }
+    
+    protected ISelection testF3Selection(IFile file, int offset) throws ParserException {
+    	return testF3Selection(file, offset, 0);
+    }
+    
+    protected ISelection testF3Selection(IFile file, int offset, int length) throws ParserException {
+		if (offset < 0)
+			throw new ParserException("offset can not be less than 0 and was " + offset); //$NON-NLS-1$
+		
+        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+        IEditorPart part = null;
+        try {
+            part = page.openEditor(new FileEditorInput(file), getEditorID()); //$NON-NLS-1$
+        } catch (PartInitException e) {
+            assertFalse(true);
+        }
+        
+        if (part instanceof AbstractTextEditor) {
+            ((AbstractTextEditor)part).getSelectionProvider().setSelection(new TextSelection(offset,length));
+            
+            final IAction action = ((AbstractTextEditor)part).getAction("OpenDeclarations"); //$NON-NLS-1$
+            action.run();
+        
+        	// update the file/part to point to the newly opened IFile/IEditorPart
+            part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); 
+            IEditorInput input = part.getEditorInput(); 
+            if (input instanceof FileEditorInput) {
+            	file = ((FileEditorInput)input).getFile();
+            } else {
+            	assertFalse(true); // bail!
+            }             
+            
+            // the action above should highlight the declaration, so now retrieve it and use that selection to get the IASTName selected on the TU
+            return ((AbstractTextEditor)part).getSelectionProvider().getSelection();
+        }
+        
+        return null;
+    }
+            
+    protected void testSimple_Ctrl_G_Selection(IFile file, int offset, int length, int numOccurrences) throws ParserException {
+		if (offset < 0)
+			throw new ParserException("offset can not be less than 0 and was " + offset); //$NON-NLS-1$
+		
+        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+        IEditorPart part = null;
+        try {
+            part = page.openEditor(new FileEditorInput(file), getEditorID()); //$NON-NLS-1$
+        } catch (PartInitException e) {
+            assertFalse(true);
+        }
+        
+        if (part instanceof AbstractTextEditor) {
+            ((AbstractTextEditor)part).getSelectionProvider().setSelection(new TextSelection(offset,length));
+            
+            final IAction action = ((AbstractTextEditor)part).getAction(ICEditorActionDefinitionIds.FIND_DECL);
+            
+            action.run();
+            
+        	// update the file/part to point to the newly opened IFile/IEditorPart
+            int occurs= 0;
+            for (int i = 0; i < 20; i++) {
+            	SearchView view = (SearchView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView("org.eclipse.search.ui.views.SearchView");
+            	if (view != null) {
+            		ISearchResult result= view.getCurrentSearchResult();
+            		if (!NewSearchUI.isQueryRunning(result.getQuery())) {
+            			if (result instanceof AbstractTextSearchResult) {
+            				AbstractTextSearchResult ar= (AbstractTextSearchResult) result;
+            				occurs= ar.getMatchCount();
+            				if (occurs > 0) 
+            					break;
+            			}
+            		}
+            	}                
+                runEventQueue(50);
+			}
+            assertEquals(numOccurrences, occurs);
+        }
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsAnyIndexer.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsAnyIndexer.java
new file mode 100644
index 0000000..9f91deb
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsAnyIndexer.java
@@ -0,0 +1,1175 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.text.selection;
+
+import java.io.IOException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+
+/**
+ * Test Ctrl_F3/F3 with the DOM Indexer for a C++ project.
+ */
+public abstract class CPPSelectionTestsAnyIndexer extends BaseSelectionTestsIndexer {
+	private static final int MAX_WAIT_TIME = 8000;
+
+	protected String sourceIndexerID;
+	protected IIndex index;
+	
+	public CPPSelectionTestsAnyIndexer(String name, String indexerID) {
+		super(name);
+		sourceIndexerID= indexerID;
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		
+		//Create temp project
+		fCProject= createProject("CPPSelectionTestsDOMIndexerProject"); //$NON-NLS-1$
+		assertNotNull("Unable to create project", fCProject);
+//		MakeProjectNature.addNature(project, new NullProgressMonitor());
+//		ScannerConfigNature.addScannerConfigNature(project);
+//		PerProjectSICollector.calculateCompilerBuiltins(project);
+
+		CCorePlugin.getIndexManager().setIndexerId(fCProject, sourceIndexerID);
+		index= CCorePlugin.getIndexManager().getIndex(fCProject);
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		closeAllEditors();
+		CProjectHelper.delete(fCProject);
+		super.tearDown();
+	}
+
+	private ICProject createProject(String projectName) throws CoreException {
+		ICProject cPrj = CProjectHelper.createCCProject(projectName, "bin", IPDOMManager.ID_NO_INDEXER); //$NON-NLS-1$
+		return cPrj;
+	}
+	
+	protected StringBuffer[] getContents(int sections) throws IOException {
+		return TestSourceReader.getContentsForTest(
+				CTestPlugin.getDefault().getBundle(), "ui", CPPSelectionTestsAnyIndexer.class, getName(), sections);
+	}
+
+	private void assertNode(String name, int offset, IASTNode node) {
+		assertNotNull(node);
+		assertEquals(node.toString(), name);
+		IASTFileLocation loc= node.getFileLocation();
+		assertEquals(loc.getNodeOffset(), offset);
+		assertEquals(loc.getNodeLength(), name.length());
+	}
+
+	protected void waitUntilFileIsIndexed(IIndex index, IFile file, int maxmillis) throws Exception {
+		TestSourceReader.waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+	}
+	
+	
+	// // header
+    // class Point{ 
+    //  public:    
+    //     Point(): xCoord(0){} 
+    //     Point& operator=(const Point &rhs){return *this;}    
+    //     void* operator new [ ] (unsigned int);
+    //  private:                             
+    //     int xCoord;                          
+    //  };                                   
+	
+	// // source
+	// #include "test93281.h"
+    // static const Point zero;
+    // int main(int argc, char **argv) {        
+    //    Point *p2 = new Point();         
+    //    p2->    operator // /* operator */ // F3 in the middle 
+    //    // of "operator" should work
+    //    // \
+    //    /* */
+    //    =(zero);           // line B
+    //    p2->operator /* oh yeah */ new // F3 in the middle of "operator"
+    //    // should work
+    //    //
+    //    [ /* sweet */ ] //
+    //    (2);
+    //    return (0);                          
+    // }
+    public void testBug93281() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("test93281.h", hcode); 
+        IFile file = importFile("test93281.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        
+        int offset = scode.indexOf("p2->operator") + 6; //$NON-NLS-1$
+        IASTNode node = testF3(file, offset);
+        
+        assertTrue(node instanceof IASTName);
+        assertEquals(((IASTName)node).toString(), "operator new[]"); //$NON-NLS-1$
+        assertEquals(((ASTNode)node).getOffset(), hcode.indexOf("operator new"));
+        assertEquals(((ASTNode)node).getLength(), 16);
+        
+        offset = scode.indexOf("p2->    operator") + 11; //$NON-NLS-1$
+        node = testF3(file, offset);
+        
+        assertTrue(node instanceof IASTName);
+        assertEquals(((IASTName)node).toString(), "operator ="); //$NON-NLS-1$
+        assertEquals(((ASTNode)node).getOffset(), hcode.indexOf("operator="));
+        assertEquals(((ASTNode)node).getLength(), 9);
+    }
+    
+    //	template <class T>
+	//	inline void testTemplate(T& aRef);
+	//
+	//	class Temp {
+	//	};
+
+	//	#include <stdio.h>
+	//	#include <stdlib.h>
+	//	#include "test.h"
+	//	int main(void) {
+	//	        puts("Hello World!!!");
+	//
+	//	        Temp testFile;
+	//	        testTemplate(testFile);
+	//
+	//	        return EXIT_SUCCESS;
+	//	}
+	public void testBug207320() throws Exception {
+		StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("test.h", hcode); 
+        IFile file = importFile("test.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        
+        int hoffset= hcode.indexOf("testTemplate"); 
+        int soffset = scode.indexOf("testTemplate"); 
+        IASTNode def = testF3(file, soffset+2);
+        assertTrue(def instanceof IASTName);
+        assertEquals("testTemplate", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, ((ASTNode) def).getOffset());
+        assertEquals(12, ((ASTNode) def).getLength());
+	}
+
+	// template<typename T>
+	// class C {
+	//   public: void assign(const T* s) {}
+	// };
+
+	// void main() {
+	//   C<char> a;
+	//   a.assign("aaa");
+	// }
+	public void testTemplateClassMethod_207320() throws Exception {
+		StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("test.h", hcode); //$NON-NLS-1$ 
+        IFile file = importFile("test.cpp", scode); //$NON-NLS-1$
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        
+        int hoffset= hcode.indexOf("assign");  //$NON-NLS-1$
+        int soffset = scode.indexOf("assign");  //$NON-NLS-1$
+        IASTNode def = testF3(file, soffset + 2);
+        assertTrue(def instanceof IASTName);
+        assertEquals("assign", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, ((ASTNode) def).getOffset());
+        assertEquals(6, ((ASTNode) def).getLength());
+	}
+
+	// // the header
+    // extern int MyInt;       // MyInt is in another file
+    // extern const int MyConst;   // MyConst is in another file
+    // void MyFunc(int);       // often used in header files
+    // typedef int NewInt;     // a normal typedef statement
+	// struct MyStruct { int Member1; int Member2; };
+	// class MyClass { int MemberVar; };
+    
+    // #include "basicDefinition.h"
+    // int MyInt;
+    // extern const int MyConst = 42;
+    // void MyFunc(int a) { cout << a << endl; }
+	// class MyClass;          
+	// struct MyStruct;        
+    public void testBasicDefinition() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("basicDefinition.h", hcode); 
+        IFile file = importFile("testBasicDefinition.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        
+        int hoffset= hcode.indexOf("MyInt"); 
+        int soffset = scode.indexOf("MyInt"); 
+        IASTNode decl = testF3(file, soffset+2);
+        IASTNode def = testF3(hfile, hoffset+2);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyInt", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, ((ASTNode) decl).getOffset());
+        assertEquals(5, ((ASTNode) decl).getLength());
+        assertEquals("MyInt", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(soffset, def.getFileLocation().getNodeOffset());
+        assertEquals(5, ((ASTNode) def).getLength());
+        
+        hoffset= hcode.indexOf("MyConst"); 
+        soffset = scode.indexOf("MyConst"); 
+        decl = testF3(file, soffset+2);
+        def = testF3(hfile, hoffset+2);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyConst", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, ((ASTNode) decl).getOffset());
+        assertEquals(7, ((ASTNode) decl).getLength());
+        assertEquals("MyConst", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(soffset, def.getFileLocation().getNodeOffset());
+        assertEquals(7, ((ASTNode) def).getLength());
+        
+        hoffset= hcode.indexOf("MyFunc"); 
+        soffset = scode.indexOf("MyFunc"); 
+        decl = testF3(file, soffset+2);
+        def = testF3(hfile, hoffset+2);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyFunc", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, ((ASTNode) decl).getOffset());
+        assertEquals(6, ((ASTNode) decl).getLength());
+        assertEquals("MyFunc", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(soffset, def.getFileLocation().getNodeOffset());
+        assertEquals(6, ((ASTNode) def).getLength());
+        
+        hoffset= hcode.indexOf("MyStruct"); 
+        soffset = scode.indexOf("MyStruct"); 
+        decl = testF3(file, soffset+2);
+        def = testF3(hfile, hoffset+2);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyStruct", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, ((ASTNode) decl).getOffset());
+        assertEquals(8, ((ASTNode) decl).getLength());
+        assertEquals("MyStruct", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, def.getFileLocation().getNodeOffset());
+        assertEquals(8, ((ASTNode) def).getLength());
+        
+        hoffset= hcode.indexOf("MyClass"); 
+        soffset = scode.indexOf("MyClass"); 
+        decl = testF3(file, soffset+2);
+        def = testF3(hfile, hoffset+2);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyClass", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, ((ASTNode) decl).getOffset());
+        assertEquals(7, ((ASTNode) decl).getLength());
+        assertEquals("MyClass", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, def.getFileLocation().getNodeOffset());
+        assertEquals(7, ((ASTNode) def).getLength());
+    }
+    
+	// // the header
+    // namespace N {
+    //    template < class T > class AAA { T _t; };
+    // };
+    
+    // #include "testBasicTemplateInstance.h"
+    // N::AAA<int> a;
+	public void testBasicTemplateInstance_207320() throws Exception{
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBasicTemplateInstance.h", hcode); 
+        IFile file = importFile("testBasicTemplateInstance.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        
+        int hoffset= hcode.indexOf("AAA"); 
+        int soffset = scode.indexOf("AAA<int>"); //$NON-NLS-1$
+        IASTNode decl1 = testF3(file, soffset, 3);
+        assertTrue(decl1 instanceof IASTName);
+        assertEquals("AAA", ((IASTName) decl1).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, decl1.getFileLocation().getNodeOffset());
+        assertEquals(3, ((ASTNode) decl1).getLength());
+		
+        IASTNode decl2 = testF3(file, soffset, 8);
+        assertEquals("AAA", ((IASTName) decl2).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, decl2.getFileLocation().getNodeOffset());
+        assertEquals(3, ((ASTNode) decl2).getLength());
+	}
+	
+	// // the header
+    // class X {
+    // public: 
+    //    X(int); // openReferences fails to find the constructor in g()
+    // };
+	
+	// #include "testBug86829A.h"
+    // X f(X);
+    // void g()
+    // {
+    //    X b = f(X(2)); // openDeclarations on X(int) shall find constructor 
+    // }
+	public void testBug86829A() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug86829A.h", hcode); 
+        IFile file = importFile("testBug86829A.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        
+        int offset = scode.indexOf("X(2)"); 
+        int doffset= hcode.indexOf("X(int)");
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("X", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(doffset, decl.getFileLocation().getNodeOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+	}
+	
+	// // the header
+    // class X {
+    // public:
+    //    operator int();
+    // };
+    // class Y {
+    // public:
+    //    operator X();
+    // };
+	
+	// #include "testBug86829B.h"
+	// void testfunc() {
+    // Y a;
+    // int c = X(a); // OK: a.operator X().operator int()
+	// }
+	public void _testBug86829B() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug86829B.h", hcode); 
+        IFile file = importFile("testBug86829B.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+		
+        int offset = scode.indexOf("X(a)"); 
+        int doffset = hcode.indexOf("X()"); 
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals(decl.toString(), "X");
+        assertEquals(doffset, decl.getFileLocation().getNodeOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+	}
+	
+	// // the header
+	// extern int a; 				// declares 
+	// extern const int c = 1; 		// defines 
+	// struct S {int a; int b;}; 	// defines 
+	// struct X { 					// defines 
+	//    int x; 					// defines nonstatic data member 
+	//    static int y; 			// declares static data member 
+	//    X(): x(0) { } 			// defines a constructor of 
+	// };
+	// enum E {up, down}; 			// defines 
+	// namespace N {int d;} 		// defines 
+	// namespace N1 = N; 			// defines 
+	// int f(int);  				// declares 
+	// extern X anotherX; 			// declares 
+	
+	// #include "testCPPSpecDeclsDefs.h"
+	// int a; 						// defines 
+	// int X::y = 1; 				// defines 
+	// X anX; 						// defines 
+	// extern const int c; 			// declares
+	// int f(int x) {return x+a;}   // defines
+	// struct S; 					// declares
+	// typedef int Int; 			// declares 
+	// using N::d; 					// declares 
+	// S s;
+	// Int lhs= s.a+s.b+up+down+anX+0;			
+	public void testCPPSpecDeclsDefs() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testCPPSpecDeclsDefs.h", hcode); 
+        IFile file = importFile("testCPPSpecDeclsDefs.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        
+        int offset0= hcode.indexOf("a;");
+        int offset1= scode.indexOf("a;"); 
+        IASTNode decl= testF3(hfile, offset0);
+        assertNode("a", offset1, decl);
+        decl= testF3(file, offset1);
+        assertNode("a", offset0, decl);
+
+        offset0= hcode.indexOf("int c") + 4;
+        offset1= scode.indexOf("int c") + 4; 
+        decl= testF3(hfile, offset0);
+        assertNode("c", offset1, decl);
+        decl= testF3(file, offset1);
+        assertNode("c", offset0, decl);
+
+        offset0= hcode.indexOf("f(int");
+        offset1= scode.indexOf("f(int");
+        decl= testF3(hfile, offset0);
+        assertNode("f", offset1, decl);
+        decl= testF3(file, offset1);
+        assertNode("f", offset0, decl);
+
+        offset0= scode.indexOf("x)");
+        decl= testF3(file, offset0);
+        assertNode("x", offset0, decl);
+
+        offset1= scode.indexOf("x+a");
+        decl= testF3(file, offset1);
+        assertNode("x", offset0, decl);
+
+        offset0= scode.indexOf("a;");
+        offset1= scode.indexOf("a;}"); 
+        decl= testF3(file, offset1);
+        assertNode("a", offset0, decl);
+
+        offset0= hcode.indexOf("S");
+        offset1= scode.indexOf("S;"); 
+        int offset2= scode.indexOf("S", offset1); 
+        decl= testF3(hfile, offset0);
+        assertNode("S", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("S", offset0, decl);
+        decl= testF3(file, offset2);
+        assertNode("S", offset0, decl);
+		
+        offset0 = hcode.indexOf("a; int b;};");
+        offset1 = scode.indexOf("a+s.b");
+        decl= testF3(hfile, offset0);
+        assertNode("a", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("a", offset0, decl);
+
+        offset0= hcode.indexOf("b;};");
+        offset1= scode.indexOf("s.b") + 2;
+        decl= testF3(hfile, offset0);
+        assertNode("b", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("b", offset0, decl);
+
+        offset0= hcode.indexOf("X");
+        offset1= scode.indexOf("X");
+        offset2= scode.indexOf("X", offset1+1);
+        decl= testF3(hfile, offset0);
+        assertNode("X", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("X", offset0, decl);
+        decl= testF3(file, offset2);
+        assertNode("X", offset0, decl);
+
+        offset0= hcode.indexOf("x;");
+        offset1= hcode.indexOf("x", offset0+1);
+        decl= testF3(hfile, offset0);
+        assertNode("x", offset0, decl);
+        decl= testF3(hfile, offset1);
+        assertNode("x", offset0, decl);
+
+        offset0= hcode.indexOf("y;");
+        offset1= scode.indexOf("y");
+        decl= testF3(hfile, offset0);
+        assertNode("y", offset1, decl);
+        decl= testF3(file, offset1);
+        assertNode("y", offset0, decl);
+		
+		offset0= hcode.indexOf("X()"); 
+        decl = testF3(hfile, offset0);
+        assertNode("X", offset0, decl);
+				
+        offset0= hcode.indexOf("up");
+        offset1= scode.indexOf("up");
+        decl= testF3(hfile, offset0);
+        assertNode("up", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("up", offset0, decl);
+
+        offset0= hcode.indexOf("down");
+        offset1= scode.indexOf("down");
+        decl= testF3(hfile, offset0);
+        assertNode("down", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("down", offset0, decl);
+
+        offset0= hcode.indexOf("N");
+        offset1= hcode.indexOf("N;", offset0+1);
+        offset2= scode.indexOf("N");
+        decl= testF3(hfile, offset0);
+        assertNode("N", offset0, decl);
+        decl= testF3(hfile, offset1);
+        assertNode("N", offset0, decl);
+        decl= testF3(file, offset2);
+        assertNode("N", offset0, decl);
+		
+        offset0= hcode.indexOf("d;");
+        offset1= scode.indexOf("d;");
+        decl= testF3(hfile, offset0);
+        assertNode("d", offset0, decl);
+// 	    does not work, created separate testcase        
+//        decl= testF3(file, offset1);
+//        assertNode("d", offset0, decl);
+
+        offset0= hcode.indexOf("N1");
+        decl= testF3(hfile, offset0);
+        assertNode("N1", offset0, decl);
+
+        offset0= scode.indexOf("anX");
+        offset1= scode.indexOf("anX", offset0+1);
+        decl= testF3(file, offset0);
+        assertNode("anX", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("anX", offset0, decl);
+
+        offset0= scode.indexOf("Int");
+        offset1= scode.indexOf("Int", offset0+1);
+        decl= testF3(file, offset0);
+        assertNode("Int", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("Int", offset0, decl);
+	}
+
+	// // the header
+	// namespace N {int d;} 		// defines 
+	
+	// #include "testBug168533.h"
+	// using N::d; 					// declares 
+	// int a= d;
+	public void testBug168533() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug168533.h", hcode); 
+        IFile file = importFile("testBug168533.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+		        
+        int offset0= hcode.indexOf("d;");
+        int offset1= scode.indexOf("d;");
+        int offset2= scode.indexOf("d", offset1);
+        IASTNode decl= testF3(hfile, offset0);
+        assertNode("d", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("d", offset0, decl);
+        decl= testF3(file, offset2);
+        assertNode("d", offset0, decl);
+	}
+
+    // class Overflow {
+    // public:
+    //    Overflow(char,double,double);
+    // };
+	
+	// #include "testBug95225.h"
+    // void f(double x) {
+    //    throw Overflow('+',x,3.45e107);
+    // }
+    // int foo() {
+    //    try {
+    //       f(1.2);
+    //    }
+    //    catch(Overflow& oo) {
+    // 				// handle exceptions of type Overflow here
+    //    }
+    // }
+	public void testBug95225() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug95225.h", hcode); 
+        IFile file = importFile("testBug95225.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+
+        offset0= hcode.indexOf("Overflow"); 
+        offset1= scode.indexOf("rflow&"); 
+        decl = testF3(file, offset1);
+        assertNode("Overflow", offset0, decl);
+        decl = testF3(hfile, offset0);
+        assertNode("Overflow", offset0, decl);
+
+        offset0= hcode.indexOf("Overflow("); 
+        offset1= scode.indexOf("rflow('+'"); 
+        decl = testF3(file, offset1);
+        assertNode("Overflow", offset0, decl);
+        decl = testF3(hfile, offset0);
+        assertNode("Overflow", offset0, decl);
+
+        offset0= scode.indexOf("x"); 
+        offset1= scode.indexOf("x", offset0); 
+        decl = testF3(file, offset0);
+        assertNode("x", offset0, decl);
+        decl = testF3(file, offset1);
+        assertNode("x", offset0, decl);
+    }
+	
+    // struct A { }; // implicitlydeclared A::operator=
+    // struct B : A {
+    //    B& operator=(const B &);
+    // };
+	
+	// #include "testBug95202.h"
+    // B& B::operator=(const B& s) {
+    //    this->B::operator=(s); // wellformed
+    //    return *this;
+    // }
+    public void testBug95202() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug95202.h", hcode); 
+        IFile file = importFile("testBug95202.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+
+        offset0= scode.indexOf("s)"); 
+        offset1= scode.indexOf("s);", offset0+1); 
+        decl = testF3(file, offset0);
+        assertNode("s", offset0, decl);
+        decl = testF3(file, offset1);
+        assertNode("s", offset0, decl);        
+    }
+        
+	// extern int abc;
+	
+	// #include "testBug101287.h"
+	// int main(int argc, char **argv) {
+	//    abc;
+	// }
+	public void testBug101287() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug101287.h", hcode); 
+        IFile file = importFile("testBug101287.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+		        
+        offset0 = hcode.indexOf("abc");
+        offset1 = scode.indexOf("abc");
+        decl = testF3(hfile, offset0);
+        assertNode("abc", offset0, decl);
+        decl = testF3(file, offset1);
+        assertNode("abc", offset0, decl);        
+	}
+	
+	// struct RTBindingEnd
+	// {
+	//    int index;
+	// };
+
+    // #include "testBug102258.h"
+    // void f(RTBindingEnd & end) {
+    // }
+	public void testBug102258() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug102258.h", hcode); 
+        IFile file = importFile("testBug102258.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+
+        offset0 = hcode.indexOf("RTBindingEnd");
+        offset1 = scode.indexOf("RTBindingEnd");
+        decl = testF3(hfile, offset0);
+        assertNode("RTBindingEnd", offset0, decl);
+        decl = testF3(file, offset1);
+        assertNode("RTBindingEnd", offset0, decl);        
+	}
+	
+	// namespace foo {
+	//    int g() {
+	//       return 0;
+	//    }
+	// }
+
+	// #include "testBug103323.h"
+	// int f() {
+	//    return foo::g();
+	// }
+	public void testBug103323() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug103323.h", hcode); 
+        IFile file = importFile("testBug103323.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+
+        offset0 = hcode.indexOf("g()");
+        offset1 = scode.indexOf("g()");
+        decl = testF3(hfile, offset0);
+        assertNode("g", offset0, decl);
+        decl = testF3(file, offset1);
+        assertNode("g", offset0, decl);        
+        
+        testSimple_Ctrl_G_Selection(file, offset1, 1, 1);
+	}
+
+    // typedef int TestTypeOne;
+    // typedef int TestTypeTwo;
+
+	// #include "testBug78354.h"
+    // int main()
+    // {
+    //    TestTypeOne myFirstLink = 5;
+    //    TestTypeTwo mySecondLink = 6;
+    //    return 0;
+    // }
+    public void testBug78354() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug78354.h", hcode); 
+        IFile file = importFile("testBug78354.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+        
+        offset0 = hcode.indexOf("TestTypeOne");
+        offset1 = scode.indexOf("TestTypeOne");
+        decl = testF3(hfile, offset0);
+        assertNode("TestTypeOne", offset0, decl);
+        decl = testF3(file, offset1);
+        assertNode("TestTypeOne", offset0, decl);        
+
+        offset0 = hcode.indexOf("TestTypeTwo");
+        offset1 = scode.indexOf("TestTypeTwo");
+        decl = testF3(hfile, offset0);
+        assertNode("TestTypeTwo", offset0, decl);
+        decl = testF3(file, offset1);
+        assertNode("TestTypeTwo", offset0, decl);        
+    }
+
+    // int x;
+    
+    // #include "testBug103697.h"
+    // int foo() {
+    //     return x;
+    // }
+    public void testBug103697() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFileWithLink("testBug103697.h", hcode); 
+        IFile file = importFileWithLink("testBug103697.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+                
+        offset0 = hcode.indexOf("x");
+        offset1 = scode.indexOf("x");
+        decl = testF3(hfile, offset0);
+        assertNode("x", offset0, decl);
+        decl = testF3(file, offset1);
+        assertNode("x", offset0, decl);        
+    }
+    
+	// class __attribute__((visibility("default"))) FooClass
+	// {
+	//    int foo();
+	// };
+
+    // #include "testBug108202.h"
+    // int FooClass::foo() {
+	//    return 0;
+	// }
+    public void testBug108202() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug108202.h", hcode); 
+        IFile file = importFile("testBug108202.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+    	
+        offset0 = hcode.indexOf("foo");
+        offset1 = scode.indexOf("foo");
+        decl = testF3(hfile, offset0);
+        assertNode("foo", offset1, decl);
+        decl = testF3(file, offset1);
+        assertNode("foo", offset0, decl);        
+    }
+    
+    // void c();
+    
+    // #include "c.h"
+    // void c() {}
+
+    // void cpp();
+    
+    // #include "cpp.h"
+    // void cpp() {}
+    public void testCNavigationInCppProject_bug183973() throws Exception {
+        StringBuffer[] buffers= getContents(4);
+        String hccode= buffers[0].toString();
+        String ccode= buffers[1].toString();
+        String hcppcode= buffers[2].toString();
+        String cppcode= buffers[3].toString();
+        IFile hcfile = importFile("c.h", hccode); 
+        IFile cfile = importFile("c.c", ccode); 
+        IFile hcppfile = importFile("cpp.h", hcppcode); 
+        IFile cppfile = importFile("cpp.cpp", cppcode); 
+        CCorePlugin.getIndexManager().reindex(fCProject);
+        waitForIndex(MAX_WAIT_TIME);
+        
+        IASTNode decl;
+        int offset0, offset1;
+        // cpp navigation
+        offset0 = hcppcode.indexOf("cpp(");
+        offset1 = cppcode.indexOf("cpp(");
+        decl = testF3(hcppfile, offset0);
+        assertNode("cpp", offset1, decl);
+        decl = testF3(cppfile, offset1);
+        assertNode("cpp", offset0, decl);        
+
+        // plain-c navigation
+        offset0 = hccode.indexOf("c(");
+        offset1 = ccode.indexOf("c(");
+        decl = testF3(hcfile, offset0);
+        assertNode("c", offset1, decl);
+        decl = testF3(cfile, offset1);
+        assertNode("c", offset0, decl);        
+    }
+    
+    // typedef struct {
+    //    int a;
+    // } usertype;
+    // void func(usertype t);
+
+	// #include "testBug190730.h"
+    // void func(usertype t) {
+    // }
+    public void testFuncWithTypedefForAnonymousStruct_190730() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug190730.h", hcode); 
+        IFile file = importFile("testBug190730.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+        
+        offset0 = hcode.indexOf("func");
+        offset1 = scode.indexOf("func");
+        decl = testF3(hfile, offset0);
+        assertNode("func", offset1, decl);
+        decl = testF3(file, offset1);
+        assertNode("func", offset0, decl);        
+    }
+    
+    // typedef enum {
+    //    int eitem
+    // } userEnum;
+    // void func(userEnum t);
+
+	// #include "testBug190730_2.h"
+    // void func(userEnum t) {
+    // }
+    public void testFuncWithTypedefForAnonymousEnum_190730() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug190730_2.h", hcode); 
+        IFile file = importFile("testBug190730_2.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+        
+        offset0 = hcode.indexOf("func");
+        offset1 = scode.indexOf("func");
+        decl = testF3(hfile, offset0);
+        assertNode("func", offset1, decl);
+        decl = testF3(file, offset1);
+        assertNode("func", offset0, decl);        
+    }
+    
+    //    #define MY_MACRO 0xDEADBEEF
+    //    #define MY_FUNC() 00
+    //    #define MY_PAR( aRef );
+
+	//  #include "macrodef.h"
+	//	int basictest(void){
+	//	   int tester = MY_MACRO;  //OK: F3 works
+	//	   int xx= MY_FUNC();
+    //     MY_PAR(0);
+    //  }
+    public void testMacroNavigation() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("macrodef.h", hcode); 
+        IFile file = importFile("macronavi.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+        
+        offset0 = hcode.indexOf("MY_MACRO");
+        offset1 = scode.indexOf("MY_MACRO");
+        decl = testF3(file, offset1);
+        assertNode("MY_MACRO", offset0, decl);
+        
+        offset0 = hcode.indexOf("MY_FUNC");
+        offset1 = scode.indexOf("MY_FUNC");
+        decl = testF3(file, offset1);
+        assertNode("MY_FUNC", offset0, decl);
+
+        offset0 = hcode.indexOf("MY_PAR");
+        offset1 = scode.indexOf("MY_PAR");
+        decl = testF3(file, offset1);
+        assertNode("MY_PAR", offset0, decl);
+    }
+    
+    //  #define MY_MACRO 0xDEADBEEF
+    //  #define MY_PAR( aRef ) aRef;
+    //  int gvar;
+
+	//  #include "macrodef.h"
+	//	int basictest(void){
+	//	   int tester = MY_PAR(MY_MACRO);
+    //     tester= MY_PAR(gvar);
+    //  }
+    public void testMacroNavigation_Bug208300() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("macrodef.h", hcode); 
+        IFile file = importFile("macronavi.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+        
+        offset0 = hcode.indexOf("MY_PAR");
+        offset1 = scode.indexOf("MY_PAR");
+        decl = testF3(file, offset1);
+        assertNode("MY_PAR", offset0, decl);
+
+        offset0 = hcode.indexOf("MY_MACRO");
+        offset1 = scode.indexOf("MY_MACRO");
+        decl = testF3(file, offset1);
+        assertNode("MY_MACRO", offset0, decl);
+
+        offset0 = hcode.indexOf("gvar");
+        offset1 = scode.indexOf("gvar");
+        decl = testF3(file, offset1);
+        assertNode("gvar", offset0, decl);
+    }
+    
+    //  int wurscht;
+
+	//  #include "aheader.h"
+    public void testIncludeNavigation() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("aheader.h", hcode); 
+        IFile file = importFile("includenavi.cpp", scode); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+
+        offset1 = scode.indexOf("aheader.h");
+        testF3(file, offset1);
+        IEditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); 
+        IEditorInput input = part.getEditorInput();
+        assertEquals("aheader.h", ((FileEditorInput) input).getFile().getName());
+    }
+    
+	// void cfunc();
+	// void cxcpp() {
+	//    cfunc();
+	// }
+	
+	// extern "C" void cxcpp();
+	// void cppfunc() {
+	//    cxcpp();
+	// }
+    public void testNavigationCppCallsC() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String ccode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile cfile = importFile("s.c", ccode); 
+        IFile cppfile = importFile("s.cpp", scode); 
+        waitUntilFileIsIndexed(index, cppfile, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset1, offset2;
+
+        offset1 = scode.indexOf("cxcpp");
+        offset2 = scode.indexOf("cxcpp", offset1+1);
+        testF3(cppfile, offset1);
+        IEditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); 
+        IEditorInput input = part.getEditorInput();
+        assertEquals("s.c", ((FileEditorInput) input).getFile().getName());
+
+        testF3(cppfile, offset2);
+        part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); 
+        input = part.getEditorInput();
+        assertEquals("s.c", ((FileEditorInput) input).getFile().getName());
+
+        offset1 = ccode.indexOf("cxcpp");
+        testF3(cfile, offset1);
+        part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); 
+        input = part.getEditorInput();
+        assertEquals("s.cpp", ((FileEditorInput) input).getFile().getName());
+    }
+
+    // void cxcpp();
+	// void cfunc() {
+	//    cxcpp();
+	// }
+	
+	// void cppfunc() {}
+	// extern "C" {void cxcpp() {
+	//    cppfunc();
+	// }}
+    public void testNavigationCCallsCpp() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String ccode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile cfile = importFile("s.c", ccode); 
+        IFile cppfile = importFile("s.cpp", scode); 
+        waitUntilFileIsIndexed(index, cppfile, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset1, offset2;
+
+        offset1 = ccode.indexOf("cxcpp");
+        offset2 = ccode.indexOf("cxcpp", offset1+1);
+        testF3(cfile, offset1);
+        IEditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); 
+        IEditorInput input = part.getEditorInput();
+        assertEquals("s.cpp", ((FileEditorInput) input).getFile().getName());
+
+        testF3(cfile, offset2);
+        part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); 
+        input = part.getEditorInput();
+        assertEquals("s.cpp", ((FileEditorInput) input).getFile().getName());
+
+        offset1 = scode.indexOf("cxcpp");
+        testF3(cppfile, offset1);
+        part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); 
+        input = part.getEditorInput();
+        assertEquals("s.c", ((FileEditorInput) input).getFile().getName());
+    }
+    
+    //    #define ADD_TEXT(txt1,txt2) txt1" "txt2 
+    //    #define ADD(a,b) (a + b)
+    //    void main(void) {
+    //    #if defined(ADD_TEXT) && defined(ADD)
+    //    #endif
+    //    }
+    public void testNavigationInDefinedExpression_215906() throws Exception {
+        StringBuffer[] buffers= getContents(1);
+        String code= buffers[0].toString();
+        IFile file = importFile("s.cpp", code); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset1, offset2;
+
+        offset1 = code.indexOf("ADD_TEXT");
+        offset2 = code.indexOf("ADD_TEXT", offset1+1);
+        decl= testF3(file, offset2);
+        assertNode("ADD_TEXT", offset1, decl);
+        
+        offset1 = code.indexOf("ADD", offset1+1);
+        offset2 = code.indexOf("ADD", offset2+1);
+        decl= testF3(file, offset2);
+        assertNode("ADD", offset1, decl);
+    }
+    
+	//  struct X {
+	//		int operator +(X);
+    //      int operator [](int);
+	//		~X();
+	//	};
+	//
+	//	int test(X x) {
+	//		x + x;
+	//		x[6];
+	//		X* xx = new X();
+	//		delete xx;
+	//	}    
+    public void testNavigationToImplicitNames() throws Exception {
+    	StringBuffer[] buffers= getContents(1);
+        String code= buffers[0].toString();
+        IFile file = importFile("in.cpp", code); 
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        
+        int offset1 = code.indexOf("operator +");
+        int offset2 = code.indexOf("+ x;");
+        IASTNode decl = testF3(file, offset2);
+        assertNode("operator +", offset1, decl);
+        decl = testF3(file, offset2+1);
+        assertNode("operator +", offset1, decl);
+        
+        offset1 = code.indexOf("operator []");
+        offset2 = code.indexOf("[6];");
+        decl = testF3(file, offset2+1);
+        assertNode("operator []", offset1, decl);
+        offset2 = code.indexOf("];");
+        decl = testF3(file, offset2);
+        assertNode("operator []", offset1, decl);
+        decl = testF3(file, offset2+1);
+        assertNode("operator []", offset1, decl);
+        
+        offset1 = code.indexOf("~X()");
+        offset2 = code.indexOf("delete");
+        decl = testF3(file, offset2);
+        assertNode("~X", offset1, decl);
+    }
+
+	// template<typename T>
+	// class C {
+	// public:
+	//    T operator+(int);
+	// };
+
+	// void main() {
+	//   C<char> a;
+	//   a + 2;
+	// }
+	public void testBug272744() throws Exception {
+		StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("test.h", hcode); //$NON-NLS-1$ 
+        IFile file = importFile("test.cpp", scode); //$NON-NLS-1$
+        waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        
+        int hoffset= hcode.indexOf("operator+");  //$NON-NLS-1$
+        int soffset = scode.indexOf("+");  //$NON-NLS-1$
+        IASTNode def = testF3(file, soffset + 1);
+        assertTrue(def instanceof IASTName);
+        assertEquals("operator +", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, ((ASTNode) def).getOffset());
+        assertEquals(9, ((ASTNode) def).getLength());
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsDOMIndexer.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsDOMIndexer.java
new file mode 100644
index 0000000..3b515d1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsDOMIndexer.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.selection;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+
+/**
+ * Test Ctrl_F3/F3 with the DOM Indexer for a C++ project.
+ *  
+ * @author dsteffle
+ */
+public class CPPSelectionTestsDOMIndexer extends CPPSelectionTestsAnyIndexer {
+	public CPPSelectionTestsDOMIndexer(String name) {
+		super(name, IPDOMManager.ID_FULL_INDEXER);
+	}
+	
+	public static Test suite() {
+		return suite(CPPSelectionTestsDOMIndexer.class);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsFastIndexer.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsFastIndexer.java
new file mode 100644
index 0000000..b8c3ee7
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsFastIndexer.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.ui.tests.text.selection;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+
+public class CPPSelectionTestsFastIndexer extends CPPSelectionTestsAnyIndexer {
+	public CPPSelectionTestsFastIndexer(String name) {
+		super(name, IPDOMManager.ID_FAST_INDEXER);
+	}
+	
+	public static Test suite() {
+		return suite(CPPSelectionTestsFastIndexer.class);
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsNoIndexer.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsNoIndexer.java
new file mode 100644
index 0000000..19fd22d
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsNoIndexer.java
@@ -0,0 +1,1143 @@
+/*******************************************************************************
+ *  Copyright (c) 2004, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *    IBM - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.selection;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.io.Writer;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ILanguage;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.FileManager;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+import org.eclipse.cdt.ui.tests.text.EditorTestHelper;
+
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+import org.eclipse.cdt.internal.core.model.ASTCache.ASTRunnable;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+import org.eclipse.cdt.internal.ui.editor.ASTProvider;
+import org.eclipse.cdt.internal.ui.search.actions.OpenDeclarationsAction;
+
+/**
+ * It is required to test the selection performance independent of the indexer to make sure that the DOM
+ * is functioning properly.
+ * 
+ * Indexer bugs can drastically influence the correctness of these tests so the indexer has to be off when
+ * performing them.
+ * 
+ * @author dsteffle
+ */
+public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
+    
+    private static final String INDEX_FILE_ID = "2946365241"; //$NON-NLS-1$
+	static NullProgressMonitor      monitor;
+    static IWorkspace               workspace;
+    static IProject                 project;
+	static ICProject				cPrj;
+    static FileManager              fileManager;
+    static boolean                  disabledHelpContributions = false;
+    
+    static void initProject() {
+    	if (project != null) {
+    		return;
+    	}
+    	
+        //(CCorePlugin.getDefault().getCoreModel().getIndexManager()).reset();
+        monitor = new NullProgressMonitor();
+        
+        workspace = ResourcesPlugin.getWorkspace();
+        
+        try {
+            cPrj = CProjectHelper.createCCProject("CPPSelectionTestsNoIndexer", "bin", IPDOMManager.ID_NO_INDEXER); //$NON-NLS-1$ //$NON-NLS-2$
+        
+            project = cPrj.getProject();
+			
+			IPath pathLoc = CCorePlugin.getDefault().getStateLocation();
+			File indexFile = new File(pathLoc.append(INDEX_FILE_ID + ".index").toOSString()); //$NON-NLS-1$
+			if (indexFile.exists())
+				indexFile.delete();
+        } catch (CoreException e) {
+            /*boo*/
+        }
+        if (project == null)
+            fail("Unable to create project"); //$NON-NLS-1$
+
+        //Create file manager
+        fileManager = new FileManager();
+    }
+    
+    public CPPSelectionTestsNoIndexer() {
+        super();
+    }
+    
+    /**
+     * @param name
+     */
+    public CPPSelectionTestsNoIndexer(String name) {
+        super(name);
+    }
+    
+    public static Test suite() {
+        TestSuite suite= suite(CPPSelectionTestsNoIndexer.class, "_");
+        suite.addTest(new CPPSelectionTestsNoIndexer("cleanupProject"));    //$NON-NLS-1$
+        return suite;
+    }
+    
+    public void cleanupProject() throws Exception {
+    	closeAllEditors();
+        try {
+            project.delete(true, false, monitor);
+        } catch (CoreException e) {
+        	try {
+        		project.delete(true, false, monitor);
+        	}
+        	catch (CoreException e1) {}
+        } finally {
+        	project= null;
+        }
+    }
+    
+    @Override
+	protected void setUp() throws Exception {
+    	super.setUp();
+    	initProject();
+    	OpenDeclarationsAction.sIsJUnitTest= true;
+    }
+    
+    @Override
+	protected void tearDown() throws Exception {
+        if (project == null || !project.exists())
+            return;
+        
+        closeAllEditors();
+
+        IResource[] members = project.members();
+        for (IResource member : members) {
+            if (member.getName().equals(".project") || member.getName().equals(".cproject")) //$NON-NLS-1$ //$NON-NLS-2$
+                continue;
+            if (member.getName().equals(".settings"))
+            	continue;
+            try {
+                member.delete(false, monitor);
+            } catch (Throwable e) {
+                /*boo*/
+            }
+        }
+    }
+    
+    protected IFile importFile(String fileName, String contents) throws Exception{
+        //Obtain file handle
+        IFile file = project.getProject().getFile(fileName);
+        
+        InputStream stream = new ByteArrayInputStream(contents.getBytes());
+        //Create file input stream
+        if (file.exists())
+            file.setContents(stream, false, false, monitor);
+        else
+            file.create(stream, false, monitor);
+        
+        fileManager.addFile(file);
+        
+        return file;
+    }
+    
+    protected IFile importFileWithLink(String fileName, String contents) throws Exception{
+        //Obtain file handle
+        IFile file = project.getProject().getFile(fileName);
+        
+        IPath location = new Path(project.getLocation().removeLastSegments(1).toOSString() + File.separator + fileName);
+        
+        File linkFile = new File(location.toOSString());
+        if (!linkFile.exists()) {
+        	linkFile.createNewFile();
+        }
+        
+        file.createLink(location, IResource.ALLOW_MISSING_LOCAL, null);
+        
+        InputStream stream = new ByteArrayInputStream(contents.getBytes());
+        //Create file input stream
+        if (file.exists())
+            file.setContents(stream, false, false, monitor);
+        else
+            file.create(stream, false, monitor);
+        
+        fileManager.addFile(file);
+        
+        return file;
+    }
+    
+    protected IFile importFileInsideLinkedFolder(String fileName, String contents, String folderName) throws Exception{
+    	IFolder linkedFolder = project.getFolder(folderName);
+    	IPath folderLocation = new Path(project.getLocation().toOSString() + File.separator + folderName + "_this_is_linked"); //$NON-NLS-1$
+    	IFolder actualFolder = project.getFolder(folderName + "_this_is_linked"); //$NON-NLS-1$
+    	if (!actualFolder.exists())
+    		actualFolder.create(true, true, monitor);
+    	
+    	linkedFolder.createLink(folderLocation, IResource.NONE, monitor);
+    	
+    	actualFolder.delete(true, false, monitor);
+    	
+    	IFile file = linkedFolder.getFile(fileName);
+    	
+        InputStream stream = new ByteArrayInputStream(contents.getBytes());
+        //Create file input stream
+        if (file.exists())
+            file.setContents(stream, false, false, monitor);
+        else
+            file.create(stream, false, monitor);
+            	
+        fileManager.addFile(file);
+    	
+        return file;
+    }
+    
+	protected IASTNode testF3(IFile file, int offset) throws ParserException, CoreException {
+		return testF3(file, offset, 0);
+	}
+	
+    protected IASTNode testF3(IFile file, int offset, int length) throws ParserException, CoreException {
+		if (offset < 0)
+			throw new ParserException("offset can not be less than 0 and was " + offset); //$NON-NLS-1$
+		
+        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+        IEditorPart part = null;
+        try {
+            part = page.openEditor(new FileEditorInput(file), "org.eclipse.cdt.ui.editor.CEditor"); //$NON-NLS-1$
+    		EditorTestHelper.joinReconciler(EditorTestHelper.getSourceViewer((AbstractTextEditor) part), 100, 5000, 10);
+        } catch (PartInitException e) {
+            assertFalse(true);
+        }
+        
+        if (part instanceof ITextEditor) {
+        	ITextEditor editor= (ITextEditor) part;
+            editor.getSelectionProvider().setSelection(new TextSelection(offset,length));
+            
+            final OpenDeclarationsAction action = (OpenDeclarationsAction) ((AbstractTextEditor) part).getAction("OpenDeclarations"); //$NON-NLS-1$
+            action.runSync();
+        
+            // the action above should highlight the declaration, so now retrieve it and use that selection to get the IASTName selected on the TU
+            ISelection sel = ((AbstractTextEditor)part).getSelectionProvider().getSelection();
+            
+            final IASTName[] result= { null };
+            if (sel instanceof ITextSelection) {
+            	final ITextSelection textSel = (ITextSelection)sel;
+            	ITranslationUnit tu= CUIPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(editor.getEditorInput());
+        		IStatus ok= ASTProvider.getASTProvider().runOnAST(tu, ASTProvider.WAIT_IF_OPEN, monitor, new ASTRunnable() {
+        			public IStatus runOnAST(ILanguage language, IASTTranslationUnit ast) throws CoreException {
+        				result[0]= ast.getNodeSelector(null).findName(textSel.getOffset(), textSel.getLength());        	
+        				return Status.OK_STATUS;
+        			}
+        		});
+        		assertTrue(ok.isOK());
+				return result[0];
+            }
+        }
+        
+        return null;
+    }
+
+	private void assertContents(String code, int offset, String expected) {
+		assertEquals(expected, code.substring(offset, offset + expected.length()));
+	}
+
+    public void testBug93281() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("class Point{                         \n"); //$NON-NLS-1$
+        buffer.append("public:                              \n"); //$NON-NLS-1$
+        buffer.append("Point(): xCoord(0){}                 \n"); //$NON-NLS-1$
+        buffer.append("Point& operator=(const Point &rhs){return *this;}    // line A\n"); //$NON-NLS-1$
+        buffer.append("void* operator new [ ] (unsigned int);\n"); //$NON-NLS-1$
+        buffer.append("private:                             \n"); //$NON-NLS-1$
+        buffer.append("int xCoord;                          \n"); //$NON-NLS-1$
+        buffer.append("};                                   \n"); //$NON-NLS-1$
+        buffer.append("static const Point zero;\n"); //$NON-NLS-1$
+        buffer.append("int main(int argc, char **argv) {        \n"); //$NON-NLS-1$
+        buffer.append("Point *p2 = new Point();         \n"); //$NON-NLS-1$
+        buffer.append("p2->    operator // /* operator */ // F3 in the middle \n"); //$NON-NLS-1$
+        buffer.append("//of \"operator\" should work\n"); //$NON-NLS-1$
+        buffer.append("// \\n"); //$NON-NLS-1$
+        buffer.append("/* */\n"); //$NON-NLS-1$
+        buffer.append("=(zero);           // line B\n"); //$NON-NLS-1$
+        buffer.append("p2->operator /* oh yeah */ new // F3 in the middle of \"operator\"\n"); //$NON-NLS-1$
+        buffer.append("// should work\n"); //$NON-NLS-1$
+        buffer.append("//\n"); //$NON-NLS-1$
+        buffer.append("[ /* sweet */ ] //\n"); //$NON-NLS-1$
+        buffer.append("(2);\n"); //$NON-NLS-1$
+        buffer.append("return (0);                          \n"); //$NON-NLS-1$
+        buffer.append("}\n"); //$NON-NLS-1$
+        
+        String code = buffer.toString();
+        IFile file = importFile("test93281.cpp", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("p2->operator") + 6; //$NON-NLS-1$
+        IASTNode node = testF3(file, offset);
+        
+        assertTrue(node instanceof IASTName);
+        assertEquals("operator new[]", ((IASTName)node).toString()); //$NON-NLS-1$
+        assertEquals(183, ((ASTNode)node).getOffset());
+        assertEquals(16, ((ASTNode)node).getLength());
+        
+        offset = code.indexOf("p2->    operator") + 11; //$NON-NLS-1$
+        node = testF3(file, offset);
+        
+        assertTrue(node instanceof IASTName);
+        assertEquals("operator =", ((IASTName)node).toString()); //$NON-NLS-1$
+        assertEquals(121, ((ASTNode)node).getOffset());
+        assertEquals(9, ((ASTNode)node).getLength());
+    }
+        
+    public void testBasicDefinition() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("extern int MyInt;       // def is in another file  \n"); //$NON-NLS-1$
+        buffer.append("extern const int MyConst;   // def is in another file    \n"); //$NON-NLS-1$
+        buffer.append("void MyFunc(int);       // often used in header files\n"); //$NON-NLS-1$
+        buffer.append("struct MyStruct;        // often used in header files\n"); //$NON-NLS-1$
+        buffer.append("typedef int NewInt;     // a normal typedef statement\n"); //$NON-NLS-1$
+        buffer.append("class MyClass;          // often used in header files\n"); //$NON-NLS-1$
+        buffer.append("int MyInt;\n"); //$NON-NLS-1$
+        buffer.append("extern const int MyConst = 42;\n"); //$NON-NLS-1$
+        buffer.append("void MyFunc(int a) { cout << a << endl; }\n"); //$NON-NLS-1$
+        buffer.append("struct MyStruct { int Member1; int Member2; };\n"); //$NON-NLS-1$
+        buffer.append("class MyClass { int MemberVar; };\n"); //$NON-NLS-1$
+        
+        String code = buffer.toString();
+        IFile file = importFile("testBasicDefinition.cpp", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("MyInt") + 2; //$NON-NLS-1$
+        int defOffset = code.indexOf("MyInt", offset) + 2; //$NON-NLS-1$
+        IASTNode def = testF3(file, offset);
+        IASTNode decl = testF3(file, defOffset);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyInt", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(11, ((ASTNode) decl).getOffset());
+        assertEquals(5, ((ASTNode) decl).getLength());
+        assertEquals("MyInt", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(330, ((ASTNode) def).getOffset());
+        assertEquals(5, ((ASTNode) def).getLength());
+        
+        offset= code.indexOf("MyConst") + 2;
+        defOffset= code.indexOf("MyConst", offset) + 2;
+        def = testF3(file, offset);
+        decl = testF3(file, defOffset);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyConst", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(69, ((ASTNode) decl).getOffset());
+        assertEquals(7, ((ASTNode) decl).getLength());
+        assertEquals("MyConst", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(354, ((ASTNode) def).getOffset());
+        assertEquals(7, ((ASTNode) def).getLength());
+        
+        offset= code.indexOf("MyFunc") + 2;
+        defOffset= code.indexOf("MyFunc", offset) + 2;
+        def = testF3(file, offset);
+        decl = testF3(file, defOffset);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyFunc", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(115, ((ASTNode) decl).getOffset());
+        assertEquals(6, ((ASTNode) decl).getLength());
+        assertEquals("MyFunc", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(373, ((ASTNode) def).getOffset());
+        assertEquals(6, ((ASTNode) def).getLength());
+        
+        offset= code.indexOf("MyStruct") + 2;
+        defOffset= code.indexOf("MyStruct", offset) + 2;
+        def = testF3(file, offset);
+        decl = testF3(file, defOffset);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyStruct", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(417, ((ASTNode) decl).getOffset());
+        assertEquals(8, ((ASTNode) decl).getLength());
+        assertEquals("MyStruct", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(417, ((ASTNode) def).getOffset());
+        assertEquals(8, ((ASTNode) def).getLength());
+        
+        offset= code.indexOf("MyClass") + 2;
+        defOffset= code.indexOf("MyClass", offset) + 2;
+        def = testF3(file, offset);
+        decl = testF3(file, defOffset);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyClass", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(463, ((ASTNode) decl).getOffset());
+        assertEquals(7, ((ASTNode) decl).getLength());
+        assertEquals("MyClass", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(463, ((ASTNode) def).getOffset());
+        assertEquals(7, ((ASTNode) def).getLength());
+    }
+    
+	public void testBug95224() throws Exception{
+	    Writer writer = new StringWriter();
+	    writer.write("class A{\n"); //$NON-NLS-1$
+	    writer.write("A();\n"); //$NON-NLS-1$
+	    writer.write("A(const A&); // open definition on A finds class A\n"); //$NON-NLS-1$
+	    writer.write("~A(); // open definition on A finds nothing\n"); //$NON-NLS-1$
+	    writer.write("};\n"); //$NON-NLS-1$
+		
+		String code = writer.toString();
+		IFile file = importFile("testBug95224.cpp", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("A(); // open definition "); //$NON-NLS-1$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("~A", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(65, ((ASTNode) decl).getOffset());
+        assertEquals(2, ((ASTNode) decl).getLength());
+	}
+	
+	public void testBasicTemplateInstance() throws Exception{
+	    Writer writer = new StringWriter();
+	    writer.write("namespace N{                               \n"); //$NON-NLS-1$
+	    writer.write("   template < class T > class AAA { T _t; };\n"); //$NON-NLS-1$
+	    writer.write("};                                         \n"); //$NON-NLS-1$
+	    writer.write("N::AAA<int> a;                             \n"); //$NON-NLS-1$
+	    
+		String code = writer.toString();
+		IFile file = importFile("testBasicTemplateInstance.cpp", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("AAA<int>"); //$NON-NLS-1$
+        IASTNode decl1 = testF3(file, offset, 3);
+        assertTrue(decl1 instanceof IASTName);
+        assertEquals("AAA", ((IASTName) decl1).toString()); //$NON-NLS-1$
+        assertEquals(74, ((ASTNode) decl1).getOffset());
+        assertEquals(3, ((ASTNode) decl1).getLength());
+		
+        IASTNode decl2 = testF3(file, offset, 8);
+        assertTrue(decl2 instanceof IASTName);
+        assertEquals("AAA", ((IASTName) decl2).toString()); //$NON-NLS-1$
+        assertEquals(74, ((ASTNode) decl2).getOffset());
+        assertEquals(3, ((ASTNode) decl2).getLength());
+	}
+	
+	public void testBug86829A() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("class X {\n"); //$NON-NLS-1$
+        buffer.append("public:\n"); //$NON-NLS-1$
+        buffer.append("X(int); // openReferences fails to find the constructor in g()\n"); //$NON-NLS-1$
+        buffer.append("};\n"); //$NON-NLS-1$
+        buffer.append("X f(X);\n"); //$NON-NLS-1$
+        buffer.append("void g()\n"); //$NON-NLS-1$
+        buffer.append("{\n"); //$NON-NLS-1$
+        buffer.append("X b = f(X(2)); // openDeclarations on X(int) finds the class and not \n"); //$NON-NLS-1$
+        buffer.append("}\n"); //$NON-NLS-1$
+
+		String code = buffer.toString();
+        IFile file = importFile("testBug86829A.cpp", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("X(2)"); //$NON-NLS-1$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("X", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(18, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+	}
+	
+	public void testBug86829B() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("class X {\n"); //$NON-NLS-1$
+        buffer.append("public:\n"); //$NON-NLS-1$
+        buffer.append("operator int();\n"); //$NON-NLS-1$
+        buffer.append("};\n"); //$NON-NLS-1$
+        buffer.append("class Y {\n"); //$NON-NLS-1$
+        buffer.append("public:\n"); //$NON-NLS-1$
+        buffer.append("operator X();\n"); //$NON-NLS-1$
+        buffer.append("};\n"); //$NON-NLS-1$
+        buffer.append("void test() {\n");
+        buffer.append("Y a;\n"); //$NON-NLS-1$
+        buffer.append("int c = X(a); // OK: a.operator X().operator int()\n"); //$NON-NLS-1$
+        buffer.append("}\n"); //$NON-NLS-1$
+		
+        String code = buffer.toString();
+        IFile file = importFile("testBug86829B.cpp", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("X(a);"); //$NON-NLS-1$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("X", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(6, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+	}
+	
+	// taken from C++ spec 3.1-3:
+	/*
+	// all but one of the following are definitions:
+	int a; // defines a
+	extern const int c = 1; // defines c
+	int f(int x) { return x+a; } // defines f and defines x
+	struct S { int a; int b; }; // defines S, S::a, and S::b
+	struct X { // defines X
+		int x; // defines nonstatic data member x
+		static int y; // declares static data member y
+		X(): x(0) { } // defines a constructor of X
+	};
+	int X::y = 1; // defines X::y
+	enum { up, down }; // defines up and down
+	namespace N { int d; } // defines N and N::d
+	namespace N1 = N; // defines N1
+	X anX; // defines anX
+	// whereas these are just declarations:
+	extern int a; // declares a
+	extern const int c; // declares c
+	int f(int); // declares f
+	struct S; // declares S
+	typedef int Int; // declares Int
+	extern X anotherX; // declares anotherX
+	using N::d; // declares N::d
+	*/
+	public void testCPPSpecDeclsDefs() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+        buffer.append("int a; // defines a\n"); //$NON-NLS-1$
+        buffer.append("extern const int c = 1; // defines c\n"); //$NON-NLS-1$
+        buffer.append("int f(int x) { return x+a; } // defines f and defines x\n"); //$NON-NLS-1$
+        buffer.append("struct S { int a; int b; }; // defines S, S::a, and S::b\n"); //$NON-NLS-1$
+        buffer.append("struct X { // defines X\n"); //$NON-NLS-1$
+        buffer.append("int x; // defines nonstatic data member x\n"); //$NON-NLS-1$
+        buffer.append("static int y; // declares static data member y\n"); //$NON-NLS-1$
+        buffer.append("X(): x(0) { } // defines a constructor of X\n"); //$NON-NLS-1$
+        buffer.append("};\n"); //$NON-NLS-1$
+        buffer.append("int X::y = 1; // defines X::y\n"); //$NON-NLS-1$
+        buffer.append("enum { up, down }; // defines up and down\n"); //$NON-NLS-1$
+        buffer.append("namespace N { int d; } // defines N and N::d\n"); //$NON-NLS-1$
+        buffer.append("namespace N1 = N; // defines N1\n"); //$NON-NLS-1$
+        buffer.append("X anX; // defines anX\n"); //$NON-NLS-1$
+        buffer.append("extern int a; // declares a\n"); //$NON-NLS-1$
+        buffer.append("extern const int c; // declares c\n"); //$NON-NLS-1$
+        buffer.append("int f(int y); // declar f\n"); //$NON-NLS-1$
+        buffer.append("struct S; // declares S\n"); //$NON-NLS-1$
+        buffer.append("typedef int Int; // declares Int\n"); //$NON-NLS-1$
+        buffer.append("extern X anotherX; // declares anotherX\n"); //$NON-NLS-1$
+        buffer.append("using N::d; // declares N::d\n"); //$NON-NLS-1$
+		
+        String code = buffer.toString();
+        IFile file = importFile("testCPPSpecDeclsDefs.cpp", code); //$NON-NLS-1$
+        int offset = code.indexOf("a; // defines a"); //$NON-NLS-1$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("a", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(512, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("c = 1; // defines c"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("c", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(546, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("f(int x) { return x+a; } // defines f and defines x"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("f", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(567, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("x) { return x+a; } // defines f and defines x"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("x", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(67, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("x+a; } // defines f and defines x"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("x", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(67, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("x+a; } // defines f and defines x"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("x", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(67, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("a; } // defines f and defines x"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("a", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(4, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("S { int a; int b; }; // defines S, S::a, and S::b"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("S", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(120, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("a; int b; }; // defines S, S::a, and S::b"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("a", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(128, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("b; }; // defines S, S::a, and S::b"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("b", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(135, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("X { // defines X"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("X", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(177, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("x; // defines nonstatic data member x"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("x", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(198, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+        
+        IASTNode def;
+		offset = code.indexOf("y; // declares static data member y"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("y", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(337, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("X(): x(0) { } // defines a constructor of X"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("X", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(283, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("x(0) { } // defines a constructor of X"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("x", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(198, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("X::y = 1; // defines X::y"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("X", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(177, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("y = 1; // defines X::y"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("y", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(247, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("up, down }; // defines up and down"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("up", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(367, ((ASTNode) decl).getOffset());
+        assertEquals(2, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("down }; // defines up and down"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("down", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(371, ((ASTNode) decl).getOffset());
+        assertEquals(4, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("N { int d; } // defines N and N::d"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("N", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(412, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("d; } // defines N and N::d"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("d", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(420, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("N1 = N; // defines N1"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("N1", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(457, ((ASTNode) decl).getOffset());
+        assertEquals(2, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("N; // defines N1"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("N", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(412, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("X anX; // defines anX"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("X", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(177, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("anX; // defines anX"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("anX", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(481, ((ASTNode) decl).getOffset());
+        assertEquals(3, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("a; // declares a"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("a", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(4, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("c; // declares c"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("c", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(37, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("f(int y); // declar f"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("f", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(61, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("S; // declares S"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("S", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(120, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("Int; // declares Int"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("Int", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(625, ((ASTNode) decl).getOffset());
+        assertEquals(3, ((ASTNode) decl).getLength());
+        
+		offset = code.indexOf("X anotherX; // declares anotherX"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("X", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(177, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("anotherX; // declares anotherX"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("anotherX", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(655, ((ASTNode) decl).getOffset());
+        assertEquals(8, ((ASTNode) decl).getLength());
+        		
+		offset = code.indexOf("N::d; // declares N::d"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("N", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(412, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("d; // declares N::d"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("d", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(420, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+	}
+	
+	public void testBug95225() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("class Overflow {\n"); //$NON-NLS-1$
+        buffer.append("public:\n"); //$NON-NLS-1$
+        buffer.append("Overflow(char,double,double);\n"); //$NON-NLS-1$
+        buffer.append("};\n"); //$NON-NLS-1$
+        buffer.append("void f(double x)\n"); //$NON-NLS-1$
+        buffer.append("{\n"); //$NON-NLS-1$
+        buffer.append("throw Overflow('+',x,3.45e107);\n"); //$NON-NLS-1$
+        buffer.append("}\n"); //$NON-NLS-1$
+        buffer.append("int foo() {\n"); //$NON-NLS-1$
+        buffer.append("try {\n"); //$NON-NLS-1$
+        buffer.append("f(1.2);\n"); //$NON-NLS-1$
+        buffer.append("}\n"); //$NON-NLS-1$
+        buffer.append("catch(Overflow& oo) {\n"); //$NON-NLS-1$
+        buffer.append("				// handle exceptions of type Overflow here\n"); //$NON-NLS-1$
+        buffer.append("}\n"); //$NON-NLS-1$
+        buffer.append("}\n"); //$NON-NLS-1$
+		
+        String code = buffer.toString();
+        IFile file = importFile("testBug95225.cpp", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("rflow('+',x,3.45e107);"); //$NON-NLS-1$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("Overflow", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(25, ((ASTNode) decl).getOffset());
+        assertEquals(8, ((ASTNode) decl).getLength());
+        
+		offset = code.indexOf("x,3.45e107);"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("x", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(72, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+    }
+	
+	public void testNoDefinitions() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("extern int a1; // declares a\n"); //$NON-NLS-1$
+		buffer.append("extern const int c1; // declares c\n"); //$NON-NLS-1$
+		buffer.append("int f1(int); // declares f\n"); //$NON-NLS-1$
+		buffer.append("struct S1; // declares S\n"); //$NON-NLS-1$
+		buffer.append("typedef int Int; // declares Int\n"); //$NON-NLS-1$
+		
+        String code = buffer.toString();
+        IFile file = importFile("testNoDefinitions.cpp", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("a1; // declares a"); //$NON-NLS-1$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("a1", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(11, ((ASTNode) decl).getOffset());
+        assertEquals(2, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("c1; // declares c"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("c1", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(46, ((ASTNode) decl).getOffset());
+        assertEquals(2, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("f1(int); // declares f"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("f1", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(68, ((ASTNode) decl).getOffset());
+        assertEquals(2, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("S1; // declares S"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("S1", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(98, ((ASTNode) decl).getOffset());
+        assertEquals(2, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("Int; // declares Int"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("Int", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(128, ((ASTNode) decl).getOffset());
+        assertEquals(3, ((ASTNode) decl).getLength());
+	}
+    
+    public void testBug95202() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("struct A { }; // implicitlydeclared A::operator=\n"); //$NON-NLS-1$
+        buffer.append("struct B : A {\n"); //$NON-NLS-1$
+        buffer.append("B& operator=(const B &);\n"); //$NON-NLS-1$
+        buffer.append("};\n"); //$NON-NLS-1$
+        buffer.append("B& B::operator=(const B& s) {\n"); //$NON-NLS-1$
+        buffer.append("this->B::operator=(s); // wellformed\n"); //$NON-NLS-1$
+        buffer.append("return *this;\n"); //$NON-NLS-1$
+        buffer.append("}\n"); //$NON-NLS-1$
+        
+        String code = buffer.toString();
+        IFile file = importFile("testBug95202.cpp", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("s); // wellformed"); //$NON-NLS-1$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("s", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(117, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+    }
+    
+    public void testBug95229() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("struct A {\n"); //$NON-NLS-1$
+        buffer.append("operator short(); // F3 on operator causes an infinite loop\n"); //$NON-NLS-1$
+        buffer.append("} a;\n"); //$NON-NLS-1$
+        buffer.append("int f(int);\n"); //$NON-NLS-1$
+        buffer.append("int f(float);\n"); //$NON-NLS-1$
+        buffer.append("int i = f(a); // Calls f(int), because short -> int is\n"); //$NON-NLS-1$
+                
+        String code = buffer.toString();
+        IFile file = importFile("testBug95229.cpp", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("rator short(); // F3"); //$NON-NLS-1$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("operator short int", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(11, ((ASTNode) decl).getOffset());
+        assertEquals(14, ((ASTNode) decl).getLength());
+    }
+
+    public void testBug78354() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("typedef int TestTypeOne;\n"); //$NON-NLS-1$
+        buffer.append("typedef int TestTypeTwo;\n"); //$NON-NLS-1$
+        buffer.append("int main()\n"); //$NON-NLS-1$
+        buffer.append("{\n"); //$NON-NLS-1$
+        buffer.append("TestTypeOne myFirstLink = 5;\n"); //$NON-NLS-1$
+        buffer.append("TestTypeTwo mySecondLink = 6;\n"); //$NON-NLS-1$
+        buffer.append("return 0;\n"); //$NON-NLS-1$
+        buffer.append("}\n"); //$NON-NLS-1$
+        
+        String code = buffer.toString();
+        IFile file = importFileWithLink("testBug78354.cpp", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("TestTypeOne myFirstLink = 5;"); //$NON-NLS-1$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("TestTypeOne", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(12, ((ASTNode) decl).getOffset());
+        assertEquals(11, ((ASTNode) decl).getLength());
+    }
+    
+    public void testBug103697() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("int x;\n"); //$NON-NLS-1$
+        buffer.append("int foo() {\n"); //$NON-NLS-1$
+        buffer.append(" return x;\n"); //$NON-NLS-1$
+        buffer.append("}\n"); //$NON-NLS-1$
+                
+        String code = buffer.toString();
+        IFile file = importFileWithLink("testBug103697.cpp", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("return x;\n") + "return ".length(); //$NON-NLS-1$ //$NON-NLS-2$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("x", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(4, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+    }
+    
+    public void testBug76043() throws Exception {
+    	StringBuffer buffer = new StringBuffer();
+    	buffer.append("int x;\n"); //$NON-NLS-1$
+    	buffer.append("int foo() {\n"); //$NON-NLS-1$
+    	buffer.append(" return x;\n"); //$NON-NLS-1$
+    	buffer.append("}\n"); //$NON-NLS-1$
+    	String code = buffer.toString();
+    	
+    	IFile file = importFileInsideLinkedFolder("testBug76043.c", code, "folder"); //$NON-NLS-1$ //$NON-NLS-2$
+    	
+    	assertFalse(file.isLinked()); // I'm not sure why the IResource#isLinked() returns false if it's contained within a linked folder
+    	
+        int offset = code.indexOf("return x;\n") + "return ".length(); //$NON-NLS-1$ //$NON-NLS-2$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("x", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(4, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+    }
+    
+    //  typedef int (*functionPointer)(int);
+    //  functionPointer fctVariable;
+
+    //  typedef int (functionPointerArray[2])(int);
+    //  functionPointerArray fctVariablArray;
+    public void testBug195822() throws Exception {
+    	StringBuffer[] contents= getContentsForTest(2);
+    	String code= contents[0].toString();
+    	String appendCode= contents[1].toString();
+
+    	String[] filenames= {"testBug195822.c", "testBug195822.cpp"};
+    	for (int i= 0; i < 2; i++) {
+    		IFile file = importFile(filenames[i], code);
+    		int od1 = code.indexOf("functionPointer");
+    		int or1 = code.indexOf("functionPointer", od1+1);
+
+    		IASTNode decl = testF3(file, or1);
+    		assertTrue(decl instanceof IASTName);
+    		assertEquals("functionPointer", ((IASTName) decl).toString()); //$NON-NLS-1$
+    		assertEquals(od1, ((ASTNode) decl).getOffset());
+
+    		IEditorPart editor= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+    		assertNotNull(editor);
+    		assertTrue(editor instanceof ITextEditor);
+    		IDocument doc= ((ITextEditor) editor).getDocumentProvider().getDocument(editor.getEditorInput());
+    		doc.replace(doc.getLength(), 0, appendCode);
+    		int od2 = appendCode.indexOf("functionPointerArray");
+    		int or2 = appendCode.indexOf("functionPointerArray", od2+1);
+
+    		decl = testF3(file, code.length() + or2);
+    		assertTrue(decl instanceof IASTName);
+    		assertEquals("functionPointerArray", ((IASTName) decl).toString());
+    		assertEquals(code.length() + od2, ((ASTNode) decl).getOffset());
+    	}
+    }
+    
+    // #define EMPTY
+    // EMPTY void foo() {}
+    public void testEmptyMacro_Bug198649() throws Exception {
+    	String code= getContentsForTest(1)[0].toString();
+    	String[] filenames= {"testBug198649.c", "testBug198649.cpp"};
+    	for (int i= 0; i < 2; i++) {
+    		IFile file = importFile(filenames[i], code);
+    		int od1 = code.indexOf("EMPTY");
+    		int or1 = code.indexOf("EMPTY", od1+1);
+
+    		IASTNode decl = testF3(file, or1);
+    		assertTrue(decl instanceof IASTName);
+    		assertEquals("EMPTY", ((IASTName) decl).toString()); //$NON-NLS-1$
+    		assertEquals(od1, ((ASTNode) decl).getOffset());
+    	}
+    }
+    
+    // static int myFunc(int) {}
+    // #define USE_FUNC(x) (myFunc(x) == 0)
+    public void testFallBackForStaticFuncs_Bug252549() throws Exception {
+        String code= getContentsForTest(1)[0].toString();
+    	String[] filenames= {"testBug252549.c", "testBug252549.cpp"};
+    	for (int i= 0; i < 2; i++) {
+    		IFile file = importFile(filenames[i], code); 
+    		int offset= code.indexOf("myFunc(x)");
+    		IASTNode decl= testF3(file, offset);
+    		assertTrue(decl instanceof IASTName);
+    		final IASTName name = (IASTName) decl;
+    		assertTrue(name.isDefinition());
+    		assertEquals("myFunc", name.toString());
+    	}
+    }
+
+	// struct A {
+	//   void method(int p) {}
+	// };
+	//
+	// void test(A* a) {
+	//   a->method();
+    //   a.method(0);
+	// }
+    // void A::method(int a, int b) {}
+    // void B::method(int b) {}
+    public void testUnresolvedMethod_278337() throws Exception {
+        String code= getContentsForTest(1)[0].toString();
+		IFile file = importFile("testBug278337.cpp", code); 
+		IASTNode node= testF3(file, code.indexOf("method();"));
+		assertContents(code, node.getFileLocation().getNodeOffset(), "method(int p)");
+		node= testF3(file, code.indexOf("method(0);"));
+		assertNull(node);
+		node= testF3(file, code.indexOf("method(int a, int b)"));
+		assertContents(code, node.getFileLocation().getNodeOffset(), "method(int p)");
+		node= testF3(file, code.indexOf("method(int b)"));
+		// Should not navigate away since there is no good candidate.
+		assertContents(code, node.getFileLocation().getNodeOffset(), "method(int b)");
+    }
+
+	// class A {
+    //   class B {};
+	// };
+	//
+    // B b;
+    public void testUnresolvedType() throws Exception {
+        String code= getContentsForTest(1)[0].toString();
+		IFile file = importFile("testUndefinedType.cpp", code); 
+		int offset= code.indexOf("B b;");
+		IASTNode node= testF3(file, offset);
+		assertNull(node);
+    }
+
+	// void func(int a);
+	// void func(float a);
+	// void func(int* a);
+	// void test() {
+	//   func();
+	// }
+    public void testUnresolvedOverloadedFunction() throws Exception {
+        String code= getContentsForTest(1)[0].toString();
+		IFile file = importFile("testUnresolvedOverloadFunction.cpp", code); 
+		int offset= code.indexOf("func();");
+		try {
+			IASTNode node= testF3(file, offset);
+		} catch (RuntimeException e) {
+			assertEquals("ambiguous input: 3", e.getMessage());
+			return;
+		}
+		fail("Expected exception not caught");
+    }
+    
+    // namespace nm {
+    //   template<typename T> void func(T a, T b){}
+    // }
+    // template<typename Tmp> void testFunc() {
+    //   Tmp val;
+    //   nm::func(val, val);
+    // }
+    public void testDependentNameInNamespace_281736() throws Exception {
+    	String code= getContentsForTest(1)[0].toString();
+    	IFile file = importFile("testDependentNameInNamespace.cpp", code); 
+    	int offset= code.indexOf("func(val, val);");
+    	IASTNode node= testF3(file, offset);
+    	assertContents(code, node.getFileLocation().getNodeOffset(), "func(T a, T b)");
+    }
+
+    //    template<typename T>  void func(T a){}
+    //    template<typename T>  void func(T a, T b){}
+    //
+    //    template<typename Tmp> void testFunc() {
+    //      Tmp val;
+    //      func(val, val);  // F3 could know that 'func(T a)' cannot be a correct match.
+    //    }
+    public void testDependentNameTwoChoices_281736() throws Exception {
+    	String code= getContentsForTest(1)[0].toString();
+    	IFile file = importFile("testDependentNameTwoChoices_281736.cpp", code); 
+    	int offset= code.indexOf("func(val, val);");
+    	IASTNode node= testF3(file, offset);
+    	assertContents(code, node.getFileLocation().getNodeOffset(), "func(T a, T b)");
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsAnyIndexer.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsAnyIndexer.java
new file mode 100644
index 0000000..85ae30b
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsAnyIndexer.java
@@ -0,0 +1,562 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.text.selection;
+
+import java.io.IOException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.cdt.ui.testplugin.CTestPlugin;
+
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+
+public abstract class CSelectionTestsAnyIndexer extends BaseSelectionTestsIndexer {
+
+	private static final int MAX_WAIT_TIME = 8000;
+
+	private String sourceIndexerID;
+	private IIndex index;
+
+	public CSelectionTestsAnyIndexer(String name, String indexerID) {
+		super(name);
+		sourceIndexerID= indexerID;
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		
+		//Create temp project
+		fCProject = createProject("CSelectionTestsDOMIndexerProject"); //$NON-NLS-1$
+		assertNotNull("Unable to create project", fCProject);
+
+		CCorePlugin.getIndexManager().setIndexerId(fCProject, sourceIndexerID);
+		index= CCorePlugin.getIndexManager().getIndex(fCProject);
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		closeAllEditors();
+		CProjectHelper.delete(fCProject);
+		super.tearDown();
+	}
+
+	private ICProject createProject(String projectName) throws CoreException {
+		ICProject cPrj = CProjectHelper.createCProject(projectName, "bin", IPDOMManager.ID_NO_INDEXER); //$NON-NLS-1$
+		return cPrj;
+	}
+	
+	protected StringBuffer[] getContents(int sections) throws IOException {
+		return TestSourceReader.getContentsForTest(
+				CTestPlugin.getDefault().getBundle(), "ui", CSelectionTestsAnyIndexer.class, getName(), sections);
+	}
+
+	private void assertNode(String name, int offset, IASTNode node) {
+		assertNotNull(node);
+		assertEquals(node.toString(), name);
+		IASTFileLocation loc= node.getFileLocation();
+		assertEquals(offset, loc.getNodeOffset());
+		assertEquals(name.length(), loc.getNodeLength());
+	}
+
+    // // the header
+    // extern int MyInt;       // MyInt is in another file
+    // extern const int MyConst;   // MyConst is in another file
+    // void MyFunc(int);       // often used in header files
+    // typedef int NewInt;     // a normal typedef statement
+	// struct MyStruct { int Member1; int Member2; };
+    
+    // #include "basicDefinition.h"
+    // int MyInt;
+    // extern const int MyConst = 42;
+    // void MyFunc(int a) { cout << a << endl; }
+	// struct MyStruct;        
+    public void testBasicDefinition() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("basicDefinition.h", hcode); 
+        IFile file = importFile("testBasicDefinition.c", scode); 
+        TestSourceReader.waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        
+        int hoffset= hcode.indexOf("MyInt"); 
+        int soffset = scode.indexOf("MyInt"); 
+        IASTNode decl = testF3(file, soffset+2);
+        IASTNode def = testF3(hfile, hoffset+2);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyInt", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, ((ASTNode) decl).getOffset());
+        assertEquals(5, ((ASTNode) decl).getLength());
+        assertEquals("MyInt", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(soffset, def.getFileLocation().getNodeOffset());
+        assertEquals(5, ((ASTNode) def).getLength());
+        
+        hoffset= hcode.indexOf("MyConst"); 
+        soffset = scode.indexOf("MyConst"); 
+        decl = testF3(file, soffset+2);
+        def = testF3(hfile, hoffset+2);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyConst", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, ((ASTNode) decl).getOffset());
+        assertEquals(7, ((ASTNode) decl).getLength());
+        assertEquals("MyConst", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(soffset, def.getFileLocation().getNodeOffset());
+        assertEquals(7, ((ASTNode) def).getLength());
+        
+        hoffset= hcode.indexOf("MyFunc"); 
+        soffset = scode.indexOf("MyFunc"); 
+        decl = testF3(file, soffset+2);
+        def = testF3(hfile, hoffset+2);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyFunc", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, ((ASTNode) decl).getOffset());
+        assertEquals(6, ((ASTNode) decl).getLength());
+        assertEquals("MyFunc", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(soffset, def.getFileLocation().getNodeOffset());
+        assertEquals(6, ((ASTNode) def).getLength());
+        
+        hoffset= hcode.indexOf("MyStruct"); 
+        soffset = scode.indexOf("MyStruct"); 
+        decl = testF3(file, soffset+2);
+        def = testF3(hfile, hoffset+2);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyStruct", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, ((ASTNode) decl).getOffset());
+        assertEquals(8, ((ASTNode) decl).getLength());
+        assertEquals("MyStruct", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(hoffset, def.getFileLocation().getNodeOffset());
+        assertEquals(8, ((ASTNode) def).getLength());
+    }
+	
+    
+	// // the header
+	// extern int a; 				// declares 
+	// extern const int c = 1; 		// defines 
+	// struct S {int a; int b;}; 	// defines 
+	// struct X { 					// defines 
+	//    int x; 					// defines nonstatic data member 
+	// };
+	// enum E {up, down}; 			// defines 
+	// int f(int);  				// declares 
+	// extern struct X anotherX; 	// declares 
+	
+	// #include "testCPPSpecDeclsDefs.h"
+	// int a; 						// defines 
+	// struct X anX; 				// defines 
+	// extern const int c; 			// declares
+	// int f(int x) {return x+a;}   // defines
+	// struct S; 					// declares
+	// typedef int Int; 			// declares 
+	// struct S s;
+	// Int lhs= s.a+s.b+up+down+anX+0;			
+	public void testCPPSpecDeclsDefs() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testCPPSpecDeclsDefs.h", hcode); 
+        IFile file = importFile("testCPPSpecDeclsDefs.c", scode); 
+        TestSourceReader.waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+		        
+        int offset0= hcode.indexOf("a;");
+        int offset1= scode.indexOf("a;"); 
+        IASTNode decl= testF3(hfile, offset0);
+        assertNode("a", offset1, decl);
+        decl= testF3(file, offset1);
+        assertNode("a", offset0, decl);
+
+        offset0= hcode.indexOf("int c") + 4;
+        offset1= scode.indexOf("int c") + 4; 
+        decl= testF3(hfile, offset0);
+        assertNode("c", offset1, decl);
+        decl= testF3(file, offset1);
+        assertNode("c", offset0, decl);
+
+        offset0= hcode.indexOf("f(int");
+        offset1= scode.indexOf("f(int");
+        decl= testF3(hfile, offset0);
+        assertNode("f", offset1, decl);
+        decl= testF3(file, offset1);
+        assertNode("f", offset0, decl);
+
+        offset0= scode.indexOf("x)");
+        decl= testF3(file, offset0);
+        assertNode("x", offset0, decl);
+
+        offset1= scode.indexOf("x+a");
+        decl= testF3(file, offset1);
+        assertNode("x", offset0, decl);
+
+        offset0= scode.indexOf("a;");
+        offset1= scode.indexOf("a;}"); 
+        decl= testF3(file, offset1);
+        assertNode("a", offset0, decl);
+
+        offset0= hcode.indexOf("S");
+        offset1= scode.indexOf("S;"); 
+        int offset2= scode.indexOf("S", offset1); 
+        decl= testF3(hfile, offset0);
+        assertNode("S", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("S", offset0, decl);
+        decl= testF3(file, offset2);
+        assertNode("S", offset0, decl);
+		
+        offset0 = hcode.indexOf("a; int b;};");
+        offset1 = scode.indexOf("a+s.b");
+        decl= testF3(hfile, offset0);
+        assertNode("a", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("a", offset0, decl);
+
+        offset0= hcode.indexOf("b;};");
+        offset1= scode.indexOf("s.b") + 2;
+        decl= testF3(hfile, offset0);
+        assertNode("b", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("b", offset0, decl);
+
+        offset0= hcode.indexOf("X");
+        offset1= scode.indexOf("X");
+        decl= testF3(hfile, offset0);
+        assertNode("X", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("X", offset0, decl);
+
+        offset0= hcode.indexOf("x;");
+        decl= testF3(hfile, offset0);
+        assertNode("x", offset0, decl);
+				
+        offset0= hcode.indexOf("up");
+        offset1= scode.indexOf("up");
+        decl= testF3(hfile, offset0);
+        assertNode("up", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("up", offset0, decl);
+
+        offset0= hcode.indexOf("down");
+        offset1= scode.indexOf("down");
+        decl= testF3(hfile, offset0);
+        assertNode("down", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("down", offset0, decl);
+
+        offset0= scode.indexOf("anX");
+        offset1= scode.indexOf("anX", offset0+1);
+        decl= testF3(file, offset0);
+        assertNode("anX", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("anX", offset0, decl);
+
+        offset0= scode.indexOf("Int");
+        offset1= scode.indexOf("Int", offset0+1);
+        decl= testF3(file, offset0);
+        assertNode("Int", offset0, decl);
+        decl= testF3(file, offset1);
+        assertNode("Int", offset0, decl);
+	}
+
+	// extern int abc;
+	
+	// #include "testBug101287.h"
+	// int main(int argc, char **argv) {
+	//    abc;
+	// }
+	public void testBug101287() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug101287.h", hcode); 
+        IFile file = importFile("testBug101287.c", scode); 
+        TestSourceReader.waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+		        
+        offset0 = hcode.indexOf("abc");
+        offset1 = scode.indexOf("abc");
+        decl = testF3(hfile, offset0);
+        assertNode("abc", offset0, decl);
+        decl = testF3(file, offset1);
+        assertNode("abc", offset0, decl);        
+	}
+	
+    // int x;
+    
+    // #include "testBug103697.h"
+    // int foo() {
+    //     return x;
+    // }
+    public void testBug103697() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFileWithLink("testBug103697.h", hcode); 
+        IFile file = importFileWithLink("testBug103697.c", scode); 
+        TestSourceReader.waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+                
+        offset0 = hcode.indexOf("x");
+        offset1 = scode.indexOf("x");
+        decl = testF3(hfile, offset0);
+        assertNode("x", offset0, decl);
+        decl = testF3(file, offset1);
+        assertNode("x", offset0, decl);        
+    }
+    
+    // typedef int TestTypeOne;
+    // typedef int TestTypeTwo;
+
+	// #include "testBug78354.h"
+    // main()
+    // {
+    //    TestTypeOne myFirstLink = 5;
+    //    TestTypeTwo mySecondLink = 6;
+    //    return 0;
+    // }
+    public void testBug78354() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug78354.h", hcode); 
+        IFile file = importFile("testBug78354.c", scode); 
+        TestSourceReader.waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+        
+        offset0 = hcode.indexOf("TestTypeOne");
+        offset1 = scode.indexOf("TestTypeOne");
+        decl = testF3(hfile, offset0);
+        assertNode("TestTypeOne", offset0, decl);
+        decl = testF3(file, offset1);
+        assertNode("TestTypeOne", offset0, decl);        
+
+        offset0 = hcode.indexOf("TestTypeTwo");
+        offset1 = scode.indexOf("TestTypeTwo");
+        decl = testF3(hfile, offset0);
+        assertNode("TestTypeTwo", offset0, decl);
+        decl = testF3(file, offset1);
+        assertNode("TestTypeTwo", offset0, decl);        
+    }
+
+    // typedef struct {
+    //    int a;
+    // } usertype;
+    // void func(usertype t);
+
+	// #include "testBug190730.h"
+    // void func(usertype t) {
+    // }
+    public void testFuncWithTypedefForAnonymousStruct_190730() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug190730.h", hcode); 
+        IFile file = importFile("testBug190730.c", scode); 
+        TestSourceReader.waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+        
+        offset0 = hcode.indexOf("func");
+        offset1 = scode.indexOf("func");
+        decl = testF3(hfile, offset0);
+        assertNode("func", offset1, decl);
+        decl = testF3(file, offset1);
+        assertNode("func", offset0, decl);        
+    }
+    
+    // typedef enum {
+    //    int eitem
+    // } userEnum;
+    // void func(userEnum t);
+
+	// #include "testBug190730_2.h"
+    // void func(userEnum t) {
+    // }
+    public void testFuncWithTypedefForAnonymousEnum_190730() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("testBug190730_2.h", hcode); 
+        IFile file = importFile("testBug190730_2.c", scode); 
+        TestSourceReader.waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+        
+        offset0 = hcode.indexOf("func");
+        offset1 = scode.indexOf("func");
+        decl = testF3(hfile, offset0);
+        assertNode("func", offset1, decl);
+        decl = testF3(file, offset1);
+        assertNode("func", offset0, decl);        
+    }
+    
+    //    #define MY_MACRO 0xDEADBEEF
+    //    #define MY_FUNC() 00
+    //    #define MY_PAR( aRef );
+
+	//  #include "macrodef.h"
+	//	int basictest(void){
+	//	   int tester = MY_MACRO;  //OK: F3 works
+	//	   int xx= MY_FUNC();
+    //     MY_PAR(0);
+    //  }
+    public void testMacroNavigation() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("macrodef.h", hcode); 
+        IFile file = importFile("macronavi.c", scode); 
+        TestSourceReader.waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+        
+        offset0 = hcode.indexOf("MY_MACRO");
+        offset1 = scode.indexOf("MY_MACRO");
+        decl = testF3(file, offset1);
+        assertNode("MY_MACRO", offset0, decl);
+        
+        offset0 = hcode.indexOf("MY_FUNC");
+        offset1 = scode.indexOf("MY_FUNC");
+        decl = testF3(file, offset1);
+        assertNode("MY_FUNC", offset0, decl);
+
+        offset0 = hcode.indexOf("MY_PAR");
+        offset1 = scode.indexOf("MY_PAR");
+        decl = testF3(file, offset1);
+        assertNode("MY_PAR", offset0, decl);
+    }
+    
+    //  #define MY_MACRO 0xDEADBEEF
+    //  #define MY_PAR( aRef ) aRef
+
+	//  #include "macrodef.h"
+	//	int basictest(void){
+	//	   int tester = MY_PAR(MY_MACRO);
+    //  }
+    public void testMacroNavigation_Bug208300() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("macrodef.h", hcode); 
+        IFile file = importFile("macronavi.c", scode); 
+        TestSourceReader.waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+        
+        offset0 = hcode.indexOf("MY_PAR");
+        offset1 = scode.indexOf("MY_PAR");
+        decl = testF3(file, offset1);
+        assertNode("MY_PAR", offset0, decl);
+
+        offset0 = hcode.indexOf("MY_MACRO");
+        offset1 = scode.indexOf("MY_MACRO");
+        decl = testF3(file, offset1);
+        assertNode("MY_MACRO", offset0, decl);
+    }
+
+    //  int wurscht;
+
+	//  #include "aheader.h"
+    public void testIncludeNavigation() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("aheader.h", hcode); 
+        IFile file = importFile("includenavi.c", scode); 
+        TestSourceReader.waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+
+        offset1 = scode.indexOf("aheader.h");
+        testF3(file, offset1);
+        IEditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); 
+        IEditorInput input = part.getEditorInput();
+        assertEquals("aheader.h", ((FileEditorInput) input).getFile().getName());
+    }
+    
+    // #define DR_NUM_DIMENSIONS(DR) VEC_length (tree, DR_ACCESS_FNS (DR))
+    
+    // #define DR_ACCESS_FNS(DR)
+    public void testNavigationInMacroDefinition_Bug102643() throws Exception {
+        StringBuffer[] buffers= getContents(2);
+        String hcode= buffers[0].toString();
+        String scode= buffers[1].toString();
+        IFile hfile = importFile("aheader.h", hcode); 
+        IFile file = importFile("source.c", scode); 
+        TestSourceReader.waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        IASTNode decl;
+        int offset0, offset1;
+
+        offset1 = hcode.indexOf("DR_ACC");
+        testF3(hfile, offset1);
+        IEditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); 
+        IEditorInput input = part.getEditorInput();
+        assertEquals("source.c", ((FileEditorInput) input).getFile().getName());
+    }    
+    
+    // int myFunc();
+    
+    // int myFunc(var) 
+    // int var; 
+	// { 
+	//     return var; 
+	// } 
+	//
+	// int main(void) 
+	// { 
+	//     return myFunc(0); 
+	// }
+    public void testKRstyleFunctions_Bug221635() throws Exception {
+        final StringBuffer[] contents = getContentsForTest(2);
+        String hcode= contents[0].toString();
+		String code= contents[1].toString();
+        IFile hfile = importFile("aheader.h", hcode); 
+        IFile file = importFile("source.c", code); 
+        int offset= code.indexOf("myFunc(0)");
+        TestSourceReader.waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+
+        IASTNode decl= testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        final IASTName name = (IASTName) decl;
+		assertTrue(name.isDefinition());
+        assertEquals("myFunc", name.toString());
+    }
+    
+    // int x= __LINE__;
+    public void testBuiltinMacro_Bug293864() throws Exception {
+        final StringBuffer[] contents = getContentsForTest(1);
+        String code= contents[0].toString();
+        IFile file = importFile("source.c", code); 
+        int offset= code.indexOf("__LINE__");
+
+        TestSourceReader.waitUntilFileIsIndexed(index, file, MAX_WAIT_TIME);
+        // just make sure that no NPE is thrown.
+        testF3(file, offset);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsDOMIndexer.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsDOMIndexer.java
new file mode 100644
index 0000000..bbedef4
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsDOMIndexer.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.selection;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+
+/**
+ * Test Ctrl_F3/F3 with the DOM Indexer for a C project.
+ * 
+ * @author dsteffle
+ */
+public class CSelectionTestsDOMIndexer extends CSelectionTestsAnyIndexer {
+	public CSelectionTestsDOMIndexer(String name) {
+		super(name, IPDOMManager.ID_FULL_INDEXER);
+	}
+	
+	public static Test suite() {
+		return suite(CSelectionTestsDOMIndexer.class);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsFastIndexer.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsFastIndexer.java
new file mode 100644
index 0000000..0a8734a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsFastIndexer.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.ui.tests.text.selection;
+
+import junit.framework.Test;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+
+public class CSelectionTestsFastIndexer extends CSelectionTestsAnyIndexer {
+	public CSelectionTestsFastIndexer(String name) {
+		super(name, IPDOMManager.ID_FAST_INDEXER);
+	}
+	
+	public static Test suite() {
+		return suite(CSelectionTestsFastIndexer.class);
+	}
+}
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsNoIndexer.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsNoIndexer.java
new file mode 100644
index 0000000..2763376
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CSelectionTestsNoIndexer.java
@@ -0,0 +1,712 @@
+/*******************************************************************************
+ *  Copyright (c) 2004, 2009 IBM Corporation and others.
+ *  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
+ * 
+ *  Contributors:
+ *    IBM - Initial API and implementation
+ *    Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.text.selection;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.InputStream;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
+
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ILanguage;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.FileManager;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+import org.eclipse.cdt.ui.tests.text.EditorTestHelper;
+
+import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+import org.eclipse.cdt.internal.core.model.ASTCache.ASTRunnable;
+import org.eclipse.cdt.internal.core.parser.ParserException;
+
+import org.eclipse.cdt.internal.ui.editor.ASTProvider;
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.internal.ui.search.actions.OpenDeclarationsAction;
+
+/**
+ * It is required to test the selection performance independent of the indexer to make sure that the DOM is functioning properly.
+ * 
+ * Indexer bugs can drastically influence the correctness of these tests so the indexer has to be off when performing them.
+ * 
+ * @author dsteffle
+ */
+public class CSelectionTestsNoIndexer extends BaseUITestCase {
+    
+	private static final String INDEX_FILE_ID = "2324852323"; //$NON-NLS-1$
+    static NullProgressMonitor      monitor;
+    static IWorkspace               workspace;
+    static IProject                 project;
+	static ICProject				cPrj;
+    static FileManager              fileManager;
+    static boolean                  disabledHelpContributions = false;
+    
+    void initProject() {
+    	if (project != null) {
+    		return;
+    	}
+        //(CCorePlugin.getDefault().getCoreModel().getIndexManager()).reset();
+        monitor = new NullProgressMonitor();
+        
+        workspace = ResourcesPlugin.getWorkspace();
+        
+        try {
+            cPrj = CProjectHelper.createCProject("CSelectionTestsNoIndexerProject", "bin", IPDOMManager.ID_NO_INDEXER); //$NON-NLS-1$ //$NON-NLS-2$
+            project = cPrj.getProject();
+        } catch (CoreException e) {
+            /*boo*/
+        }
+        if (project == null)
+            fail("Unable to create project"); //$NON-NLS-1$
+
+        //Create file manager
+        fileManager = new FileManager();
+    }
+    public CSelectionTestsNoIndexer()
+    {
+        super();
+    }
+    /**
+     * @param name
+     */
+    public CSelectionTestsNoIndexer(String name)
+    {
+        super(name);
+    }
+    
+    public static Test suite() {
+        TestSuite suite = new TestSuite(CSelectionTestsNoIndexer.class);
+        suite.addTest(new CSelectionTestsNoIndexer("cleanupProject"));    //$NON-NLS-1$
+        return suite;
+    }
+    
+    @Override
+	protected void setUp() throws Exception {
+    	super.setUp();
+    	OpenDeclarationsAction.sIsJUnitTest= true;
+    	initProject();
+    }
+    
+    public void cleanupProject() throws Exception {
+    	try {
+    		closeAllEditors();
+    		CProjectHelper.delete(cPrj);
+    		project= null;
+    	}
+    	finally {
+    		project= null;
+    	}
+    }
+    
+    @Override
+	protected void tearDown() throws Exception {
+        if (project == null || !project.exists())
+            return;
+
+    	closeAllEditors();
+
+        IResource [] members = project.members();
+        for (IResource member : members) {
+            if (member.getName().equals(".project") || member.getName().equals(".cproject")) //$NON-NLS-1$ //$NON-NLS-2$
+                continue;
+            if (member.getName().equals(".settings"))
+            	continue;
+            try {
+                member.delete(true, monitor);
+            } catch (Throwable e) {
+                /*boo*/
+            }
+        }
+    }
+    
+    protected IFile importFile(String fileName, String contents) throws Exception{
+        //Obtain file handle
+        IFile file = project.getProject().getFile(fileName);
+        
+        InputStream stream = new ByteArrayInputStream(contents.getBytes());
+        //Create file input stream
+        if (file.exists())
+            file.setContents(stream, false, false, monitor);
+        else
+            file.create(stream, false, monitor);
+        
+        fileManager.addFile(file);
+        
+        return file;
+    }
+    
+    protected IFile importFileWithLink(String fileName, String contents) throws Exception{
+        //Obtain file handle
+        IFile file = project.getProject().getFile(fileName);
+        
+        IPath location = new Path(project.getLocation().removeLastSegments(1).toOSString() + File.separator + fileName);
+        
+        File linkFile = new File(location.toOSString());
+        if (!linkFile.exists()) {
+        	linkFile.createNewFile();
+        }
+        
+        file.createLink(location, IResource.ALLOW_MISSING_LOCAL, null);
+        
+        InputStream stream = new ByteArrayInputStream(contents.getBytes());
+        //Create file input stream
+        if (file.exists())
+            file.setContents(stream, false, false, monitor);
+        else
+            file.create(stream, false, monitor);
+        
+        fileManager.addFile(file);
+        
+        return file;
+    }
+    
+    protected IFile importFileInsideLinkedFolder(String fileName, String contents, String folderName) throws Exception{
+    	IFolder linkedFolder = project.getFolder(folderName);
+    	IPath folderLocation = new Path(project.getLocation().toOSString() + File.separator + folderName + "_this_is_linked"); //$NON-NLS-1$
+    	IFolder actualFolder = project.getFolder(folderName + "_this_is_linked"); //$NON-NLS-1$
+    	if (!actualFolder.exists())
+    		actualFolder.create(true, true, monitor);
+    	
+    	linkedFolder.createLink(folderLocation, IResource.NONE, monitor);
+    	
+    	actualFolder.delete(true, false, monitor);
+    	
+    	IFile file = linkedFolder.getFile(fileName);
+    	
+        InputStream stream = new ByteArrayInputStream(contents.getBytes());
+        //Create file input stream
+        if (file.exists())
+            file.setContents(stream, false, false, monitor);
+        else
+            file.create(stream, false, monitor);
+            	
+        fileManager.addFile(file);
+    	
+        return file;
+    }
+    
+    protected IFile importFileWithLink(String fileName, String contents, IFolder folder) throws Exception{
+        if (!folder.exists())
+        	folder.create(true, true, null);
+    	
+    	//Obtain file handle
+        IFile file = project.getProject().getFile(fileName);
+        
+        IPath location = new Path(folder.getLocation().toOSString() + File.separator + fileName);
+        
+        File linkFile = new File(location.toOSString());
+        if (!linkFile.exists()) {
+        	linkFile.createNewFile();
+        }
+        
+        file.createLink(location, IResource.ALLOW_MISSING_LOCAL, null);
+        
+        InputStream stream = new ByteArrayInputStream(contents.getBytes());
+        //Create file input stream
+        if (file.exists())
+            file.setContents(stream, false, false, monitor);
+        else
+            file.create(stream, false, monitor);
+        
+        fileManager.addFile(file);
+        
+        return file;
+    }
+    
+    protected IFolder importFolder(String folderName) throws Exception {
+    	IFolder folder = project.getProject().getFolder(folderName);
+		
+		//Create file input stream
+		if (!folder.exists())
+			folder.create(false, false, monitor);
+		
+		return folder;
+    }
+    
+	protected IASTNode testF3(IFile file, int offset) throws ParserException, CoreException {
+		return testF3(file, offset, 0);
+	}
+	
+    protected IASTNode testF3(IFile file, int offset, int length) throws ParserException, CoreException {
+		if (offset < 0)
+			throw new ParserException("offset can not be less than 0 and was " + offset); //$NON-NLS-1$
+		
+        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+        IEditorPart part = null;
+        try {
+            part = page.openEditor(new FileEditorInput(file), "org.eclipse.cdt.ui.editor.CEditor"); //$NON-NLS-1$
+        } catch (PartInitException e) {
+            assertFalse(true);
+        }
+        
+        if (part instanceof CEditor) {
+        	CEditor editor= (CEditor) part;
+    		EditorTestHelper.joinReconciler(EditorTestHelper.getSourceViewer(editor), 100, 5000, 10);
+            editor.getSelectionProvider().setSelection(new TextSelection(offset,length));
+            
+            final OpenDeclarationsAction action = (OpenDeclarationsAction) editor.getAction("OpenDeclarations"); //$NON-NLS-1$
+            action.runSync();
+        
+            // the action above should highlight the declaration, so now retrieve it and use that selection to get the IASTName selected on the TU
+            ISelection sel = ((AbstractTextEditor)part).getSelectionProvider().getSelection();
+            
+            final IASTName[] result= {null};
+            if (sel instanceof ITextSelection) {
+            	final ITextSelection textSel = (ITextSelection)sel;
+            	ITranslationUnit tu = (ITranslationUnit) editor.getInputCElement();
+        		IStatus ok= ASTProvider.getASTProvider().runOnAST(tu, ASTProvider.WAIT_IF_OPEN, monitor, new ASTRunnable() {
+        			public IStatus runOnAST(ILanguage language, IASTTranslationUnit ast) throws CoreException {
+        				result[0]= ast.getNodeSelector(null).findName(textSel.getOffset(), textSel.getLength());
+        				return Status.OK_STATUS;
+        			}
+        		});
+        		assertTrue(ok.isOK());
+				return result[0];
+            }
+        }
+        
+        return null;
+    }
+        	
+    public void testBasicDefinition() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("extern int MyInt;       // def is in another file  \n"); //$NON-NLS-1$
+        buffer.append("extern const int MyConst;   // def is in another file    \n"); //$NON-NLS-1$
+        buffer.append("void MyFunc(int);       // often used in header files\n"); //$NON-NLS-1$
+        buffer.append("struct MyStruct;        // often used in header files\n"); //$NON-NLS-1$
+        buffer.append("typedef int NewInt;     // a normal typedef statement\n"); //$NON-NLS-1$
+        buffer.append("                                                     \n"); //$NON-NLS-1$
+        buffer.append("int MyInt;\n"); //$NON-NLS-1$
+        buffer.append("extern const int MyConst = 42;\n"); //$NON-NLS-1$
+        buffer.append("void MyFunc(int a) { cout << a << endl; }\n"); //$NON-NLS-1$
+        buffer.append("struct MyStruct { int Member1; int Member2; };\n"); //$NON-NLS-1$
+        
+        String code = buffer.toString();
+        IFile file = importFile("testBasicDefinition.c", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("MyInt") + 2; //$NON-NLS-1$
+        int defOffset = code.indexOf("MyInt", offset) + 2; //$NON-NLS-1$
+        IASTNode def = testF3(file, offset);
+        IASTNode decl = testF3(file, defOffset);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyInt", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(11, ((ASTNode) decl).getOffset());
+        assertEquals(5, ((ASTNode) decl).getLength());
+        assertEquals("MyInt", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(330, ((ASTNode) def).getOffset());
+        assertEquals(5, ((ASTNode) def).getLength());
+        
+        offset= code.indexOf("MyConst") + 2;
+        defOffset= code.indexOf("MyConst", offset) + 2;
+        def = testF3(file, offset);
+        decl = testF3(file, defOffset);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyConst", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(69, ((ASTNode) decl).getOffset());
+        assertEquals(7, ((ASTNode) decl).getLength());
+        assertEquals("MyConst", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(354, ((ASTNode) def).getOffset());
+        assertEquals(7, ((ASTNode) def).getLength());
+        
+        offset= code.indexOf("MyFunc") + 2;
+        defOffset= code.indexOf("MyFunc", offset) + 2;
+        def = testF3(file, offset);
+        decl = testF3(file, defOffset);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyFunc", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(115, ((ASTNode) decl).getOffset());
+        assertEquals(6, ((ASTNode) decl).getLength());
+        assertEquals("MyFunc", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(373, ((ASTNode) def).getOffset());
+        assertEquals(6, ((ASTNode) def).getLength());
+        
+        offset= code.indexOf("MyStruct") + 2;
+        defOffset= code.indexOf("MyStruct", offset) + 2;
+        def = testF3(file, offset);
+        decl = testF3(file, defOffset);
+        assertTrue(def instanceof IASTName);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("MyStruct", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(417, ((ASTNode) decl).getOffset());
+        assertEquals(8, ((ASTNode) decl).getLength());
+        assertEquals("MyStruct", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(417, ((ASTNode) def).getOffset());
+        assertEquals(8, ((ASTNode) def).getLength());
+    }
+    
+	// taken from C++ spec 3.1-3:
+	/*
+	// all but one of the following are definitions:
+	int a; // defines a
+	extern const int c = 1; // defines c
+	int f(int x) { return x+a; } // defines f and defines x
+	struct S { int a; int b; }; // defines S, S::a, and S::b
+	struct X { // defines X
+		int x; // defines nonstatic data member x
+	};
+	enum { up, down }; // defines up and down
+	struct X anX; // defines anX
+	// whereas these are just declarations:
+	extern int a; // declares a
+	extern const int c; // declares c
+	int f(int); // declares f
+	struct S; // declares S
+	typedef int Int; // declares Int
+	extern struct X anotherX; // declares anotherX
+	*/
+	public void testCPPSpecDeclsDefs() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+        buffer.append("int a; // defines a\n"); //$NON-NLS-1$
+        buffer.append("extern const int c = 1; // defines c\n"); //$NON-NLS-1$
+        buffer.append("int f(int x) { return x+a; } // defines f and defines x\n"); //$NON-NLS-1$
+        buffer.append("struct S { int a; int b; }; // defines S, S::a, and S::b\n"); //$NON-NLS-1$
+        buffer.append("struct X { // defines X\n"); //$NON-NLS-1$
+        buffer.append("int x; // defines nonstatic data member x\n"); //$NON-NLS-1$
+        buffer.append("                                             \n"); //$NON-NLS-1$
+        buffer.append("                                           \n"); //$NON-NLS-1$
+        buffer.append("};\n"); //$NON-NLS-1$
+        buffer.append("                               "); //$NON-NLS-1$
+        buffer.append("enum { up, down }; // defines up and down\n"); //$NON-NLS-1$
+        buffer.append("                                          \n"); //$NON-NLS-1$
+        buffer.append("                          \n"); //$NON-NLS-1$
+        buffer.append("struct X anX; // defines anX\n"); //$NON-NLS-1$
+        buffer.append("extern int a; // declares a\n"); //$NON-NLS-1$
+        buffer.append("extern const int c; // declares c\n"); //$NON-NLS-1$
+        buffer.append("int f(int y); // declar f\n"); //$NON-NLS-1$
+        buffer.append("struct S; // declares S\n"); //$NON-NLS-1$
+        buffer.append("typedef int Int; // declares Int\n"); //$NON-NLS-1$
+        buffer.append("extern struct X anotherX; // declares anotherX\n"); //$NON-NLS-1$
+		
+        String code = buffer.toString();
+        IFile file = importFile("testCPPSpecDeclsDefs.c", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("a; // defines a"); //$NON-NLS-1$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("a", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(512, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("c = 1; // defines c"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("c", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(546, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("f(int x) { return x+a; } // defines f and defines x"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("f", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(567, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("x) { return x+a; } // defines f and defines x"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("x", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(67, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("x+a; } // defines f and defines x"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("x", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(67, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("x+a; } // defines f and defines x"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("x", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(67, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("a; } // defines f and defines x"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("a", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(4, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("S { int a; int b; }; // defines S, S::a, and S::b"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("S", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(120, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("a; int b; }; // defines S, S::a, and S::b"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("a", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(128, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("b; }; // defines S, S::a, and S::b"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("b", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(135, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("X { // defines X"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("X", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(177, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("x; // defines nonstatic data member x"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("x", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(198, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+        
+		offset = code.indexOf("up, down }; // defines up and down"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("up", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(367, ((ASTNode) decl).getOffset());
+        assertEquals(2, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("down }; // defines up and down"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("down", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(371, ((ASTNode) decl).getOffset());
+        assertEquals(4, ((ASTNode) decl).getLength());
+				
+        IASTNode def;
+		offset = code.indexOf("X anX; // defines anX"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("X", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(177, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("anX; // defines anX"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("anX", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(481, ((ASTNode) decl).getOffset());
+        assertEquals(3, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("a; // declares a"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("a", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(4, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("c; // declares c"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("c", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(37, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("f(int y); // declar f"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("f", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(61, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("S; // declares S"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("S", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(120, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("Int; // declares Int"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("Int", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(625, ((ASTNode) decl).getOffset());
+        assertEquals(3, ((ASTNode) decl).getLength());
+        
+		offset = code.indexOf("X anotherX; // declares anotherX"); //$NON-NLS-1$
+        def = testF3(file, offset);
+        assertTrue(def instanceof IASTName);
+        assertEquals("X", ((IASTName) def).toString()); //$NON-NLS-1$
+        assertEquals(177, ((ASTNode) def).getOffset());
+        assertEquals(1, ((ASTNode) def).getLength());
+		
+		offset = code.indexOf("anotherX; // declares anotherX"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("anotherX", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(662, ((ASTNode) decl).getOffset());
+        assertEquals(8, ((ASTNode) decl).getLength());
+  	}
+	
+	public void testNoDefinitions() throws Exception {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("extern int a1; // declares a\n"); //$NON-NLS-1$
+		buffer.append("extern const int c1; // declares c\n"); //$NON-NLS-1$
+		buffer.append("int f1(int); // declares f\n"); //$NON-NLS-1$
+		buffer.append("struct S1; // declares S\n"); //$NON-NLS-1$
+		buffer.append("typedef int Int; // declares Int\n"); //$NON-NLS-1$
+		
+        String code = buffer.toString();
+        IFile file = importFile("testNoDefinitions.c", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("a1; // declares a"); //$NON-NLS-1$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("a1", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(11, ((ASTNode) decl).getOffset());
+        assertEquals(2, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("c1; // declares c"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("c1", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(46, ((ASTNode) decl).getOffset());
+        assertEquals(2, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("f1(int); // declares f"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("f1", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(68, ((ASTNode) decl).getOffset());
+        assertEquals(2, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("S1; // declares S"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("S1", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(98, ((ASTNode) decl).getOffset());
+        assertEquals(2, ((ASTNode) decl).getLength());
+		
+		offset = code.indexOf("Int; // declares Int"); //$NON-NLS-1$
+        decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("Int", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(128, ((ASTNode) decl).getOffset());
+        assertEquals(3, ((ASTNode) decl).getLength());
+	}
+	
+    public void testBug103697() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("int x;\n"); //$NON-NLS-1$
+        buffer.append("int foo() {\n"); //$NON-NLS-1$
+        buffer.append(" return x;\n"); //$NON-NLS-1$
+        buffer.append("}\n"); //$NON-NLS-1$
+                
+        String code = buffer.toString();
+        IFile file = importFileWithLink("testBug103697.cpp", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("return x;\n") + "return ".length(); //$NON-NLS-1$ //$NON-NLS-2$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("x", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(4, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+    }
+    
+    public void testBug76043() throws Exception {
+    	StringBuffer buffer = new StringBuffer();
+    	buffer.append("int x;\n"); //$NON-NLS-1$
+    	buffer.append("int foo() {\n"); //$NON-NLS-1$
+    	buffer.append(" return x;\n"); //$NON-NLS-1$
+    	buffer.append("}\n"); //$NON-NLS-1$
+    	String code = buffer.toString();
+    	
+    	IFile file = importFileInsideLinkedFolder("testBug76043.c", code, "folder"); //$NON-NLS-1$ //$NON-NLS-2$
+    	
+    	assertFalse(file.isLinked()); // I'm not sure why the IResource#isLinked() returns false if it's contained within a linked folder
+    	
+        int offset = code.indexOf("return x;\n") + "return ".length(); //$NON-NLS-1$ //$NON-NLS-2$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("x", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(4, ((ASTNode) decl).getOffset());
+        assertEquals(1, ((ASTNode) decl).getLength());
+    }
+    
+    public void testBug78354() throws Exception {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("typedef int TestTypeOne;\n"); //$NON-NLS-1$
+        buffer.append("typedef int TestTypeTwo;\n"); //$NON-NLS-1$
+        buffer.append("int main()\n"); //$NON-NLS-1$
+        buffer.append("{\n"); //$NON-NLS-1$
+        buffer.append("TestTypeOne myFirstLink = 5;\n"); //$NON-NLS-1$
+        buffer.append("TestTypeTwo mySecondLink = 6;\n"); //$NON-NLS-1$
+        buffer.append("return 0;\n"); //$NON-NLS-1$
+        buffer.append("}\n"); //$NON-NLS-1$
+        
+        String code = buffer.toString();
+        IFile file = importFileWithLink("testBug78354.cpp", code); //$NON-NLS-1$
+        
+        int offset = code.indexOf("TestTypeOne myFirstLink = 5;"); //$NON-NLS-1$
+        IASTNode decl = testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        assertEquals("TestTypeOne", ((IASTName) decl).toString()); //$NON-NLS-1$
+        assertEquals(12, ((ASTNode) decl).getOffset());
+        assertEquals(11, ((ASTNode) decl).getLength());
+    }
+
+    // int myFunc(var) 
+    // int var; 
+	// { 
+	//     return var; 
+	// } 
+	//
+	// int main(void) 
+	// { 
+	//     return myFunc(0); 
+	// }
+    public void testKRstyleFunctions_Bug221635() throws Exception {
+        String code= getContentsForTest(1)[0].toString();
+        IFile file = importFile("source.c", code); 
+        int offset= code.indexOf("myFunc(0)");
+        IASTNode decl= testF3(file, offset);
+        assertTrue(decl instanceof IASTName);
+        final IASTName name = (IASTName) decl;
+		assertTrue(name.isDefinition());
+        assertEquals("myFunc", name.toString());
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/ResolveBindingTests.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/ResolveBindingTests.java
new file mode 100644
index 0000000..1b2c220
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/ResolveBindingTests.java
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *    IBM Corporation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.ui.tests.text.selection;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IProblemBinding;
+import org.eclipse.cdt.core.dom.ast.IVariable;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ILanguage;
+import org.eclipse.cdt.core.model.LanguageManager;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+
+public class ResolveBindingTests extends BaseUITestCase  {
+
+	private static final int WAIT_FOR_INDEXER = 8000;
+	private ICProject fCProject;
+	private IIndex fIndex;
+
+	public ResolveBindingTests(String name) {
+		super(name);
+	}
+	
+	public static Test suite() {
+		return suite(ResolveBindingTests.class);
+	}
+
+	protected void setUp() throws Exception {
+		super.setUp();
+		fCProject= CProjectHelper.createCCProject("ResolveBindingTests", "bin", IPDOMManager.ID_FAST_INDEXER);
+		fIndex= CCorePlugin.getIndexManager().getIndex(fCProject);
+	}
+		
+	protected void tearDown() throws Exception {
+		if (fCProject != null) {
+			fCProject.getProject().delete(IProject.FORCE | IProject.ALWAYS_DELETE_PROJECT_CONTENT, new NullProgressMonitor());
+		}
+		super.tearDown();
+	}
+
+	private IASTName getSelectedName(IASTTranslationUnit astTU, int offset, int len) {
+		// get the language from the language manager
+		ILanguage language = null;
+		try {
+			IProject project = fCProject.getProject();
+			ICConfigurationDescription configuration = CoreModel.getDefault().getProjectDescription(project, false).getActiveConfiguration();
+			language = LanguageManager.getInstance().getLanguageForFile(astTU.getFilePath(), project, configuration);
+		} catch (CoreException e) {
+			fail("Unexpected exception while getting language for file.");
+		}
+		
+		assertNotNull("No language for file " + astTU.getFilePath().toString(), language);
+		
+		IASTName name= astTU.getNodeSelector(null).findName(offset, len);
+		assertNotNull(name);
+		return name;
+	}
+
+	private void checkBinding(IASTName name, Class<?> clazz) {
+		IBinding binding;
+		binding= name.resolveBinding();
+		assertNotNull("Cannot resolve binding", binding);
+		if (binding instanceof IProblemBinding) {
+			IProblemBinding problem= (IProblemBinding) binding;
+			fail("Cannot resolve binding: " + problem.getMessage());
+		}
+		assertTrue(clazz.isInstance(binding));
+	}
+	
+    // {namespace-var-test}
+	//	namespace ns {
+	//		int var;
+	//		void func();
+	//	};
+	//
+	//	void ns::func() {
+	//		++var; // r1
+	//      ++ns::var; // r2
+	//	}
+	public void testNamespaceVarBinding() throws Exception {
+		String content = readTaggedComment("namespace-var-test");
+		IFile file= createFile(fCProject.getProject(), "nsvar.cpp", content);
+		waitForIndexer(fIndex, file, WAIT_FOR_INDEXER);
+		
+		IIndex index= CCorePlugin.getIndexManager().getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IASTTranslationUnit astTU= createIndexBasedAST(index, fCProject, file);
+			IASTName name= getSelectedName(astTU, content.indexOf("var"), 3);
+			IBinding binding= name.resolveBinding();
+			assertTrue(binding instanceof IVariable);
+
+			name= getSelectedName(astTU, content.indexOf("var; // r1"), 3);
+			checkBinding(name, IVariable.class);
+
+			name= getSelectedName(astTU, content.indexOf("var; // r2"), 3);
+			checkBinding(name, IVariable.class);
+		}
+		finally {
+			index.releaseReadLock();
+		}			
+	}
+
+	public void testNamespaceVarBinding_156519() throws Exception {
+		String content = readTaggedComment("namespace-var-test");
+		IFile file= createFile(fCProject.getProject(), "nsvar.cpp", content);
+		waitForIndexer(fIndex, file, WAIT_FOR_INDEXER);
+		
+		IIndex index= CCorePlugin.getIndexManager().getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IASTTranslationUnit astTU= createIndexBasedAST(index, fCProject, file);
+
+			IASTName name= getSelectedName(astTU, content.indexOf("var; // r1"), 3);
+			IBinding binding= name.resolveBinding();
+			checkBinding(name, IVariable.class);
+
+			name= getSelectedName(astTU, content.indexOf("var; // r2"), 3);
+			checkBinding(name, IVariable.class);
+		}
+		finally {
+			index.releaseReadLock();
+		}
+	}
+	
+	// {testMethods.h}
+	// class MyClass {
+	// public:
+	//    void method();
+	// };
+	
+	// {testMethods.cpp}
+	// #include "testMethods.h"
+	// void MyClass::method() {
+	//    method(); // r1
+	// }
+	//
+	// void func() {
+    //	   MyClass m, *n;
+    //	   m.method(); // r2
+    //	   n->method(); // r3
+    // }
+	public void testMethodBinding_158735() throws Exception {
+		String content = readTaggedComment("testMethods.h");
+		IFile hfile= createFile(fCProject.getProject(), "testMethods.h", content);
+		content = readTaggedComment("testMethods.cpp");
+		IFile cppfile= createFile(fCProject.getProject(), "testMethods.cpp", content);
+		waitForIndexer(fIndex, hfile, WAIT_FOR_INDEXER);
+		
+		IIndex index= CCorePlugin.getIndexManager().getIndex(fCProject);
+		index.acquireReadLock();
+		try {
+			IASTTranslationUnit astTU= createIndexBasedAST(index, fCProject, cppfile);
+
+			IASTName name= getSelectedName(astTU, content.indexOf("method"), 6);
+			IBinding binding= name.resolveBinding();
+			checkBinding(name, ICPPMethod.class);
+
+			name= getSelectedName(astTU, content.indexOf("method(); // r1"), 6);
+			checkBinding(name, ICPPMethod.class);
+
+			name= getSelectedName(astTU, content.indexOf("method(); // r2"), 6);
+			checkBinding(name, ICPPMethod.class);
+
+			name= getSelectedName(astTU, content.indexOf("method(); // r3"), 6);
+			checkBinding(name, ICPPMethod.class);
+		}
+		finally {
+			index.releaseReadLock();
+		}
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/SelectionTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/SelectionTestSuite.java
new file mode 100644
index 0000000..6ffda09
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/SelectionTestSuite.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.text.selection;
+
+import junit.framework.TestSuite;
+
+public class SelectionTestSuite extends TestSuite {
+
+    public static TestSuite suite() {
+        return new SelectionTestSuite();
+    }
+    
+    public SelectionTestSuite() {
+        super(SelectionTestSuite.class.getName());
+        
+        // selection tests
+        addTest( ResolveBindingTests.suite() );
+        addTest( CPPSelectionTestsNoIndexer.suite() );
+		addTest( CSelectionTestsNoIndexer.suite() );
+		addTest( CPPSelectionTestsFastIndexer.suite() );
+		addTest( CSelectionTestsFastIndexer.suite() );
+		addTest( CPPSelectionTestsDOMIndexer.suite() );
+		addTest( CSelectionTestsDOMIndexer.suite() );
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/CTypeHierarchyTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/CTypeHierarchyTest.java
new file mode 100644
index 0000000..40befb1
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/CTypeHierarchyTest.java
@@ -0,0 +1,521 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.typehierarchy;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+
+public class CTypeHierarchyTest extends TypeHierarchyBaseTest {
+	
+	public CTypeHierarchyTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return suite(CTypeHierarchyTest.class);
+	}
+
+	// enum E1 {e1, e2};
+	// typedef enum E2 {e3, e4} TE2;
+	// enum E3 {e5, e6};
+	// typedef enum E3 TE3;
+	public void testEnumC() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "enum.c", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item;
+		
+		editor.selectAndReveal(content.indexOf("E1"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "E1");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"e1", "e2"});
+
+		editor.selectAndReveal(content.indexOf("E2"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "E2");
+		item= checkTreeNode(item, 0, "TE2");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"e3", "e4"});
+
+		editor.selectAndReveal(content.indexOf("E3"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "E3");
+		item= checkTreeNode(item, 0, "TE3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"e5", "e6"});
+	}
+
+	// enum E1 {e1, e2};
+	// typedef enum E2 {e3, e4} TE2;
+	// enum E3 {e5, e6};
+	// typedef enum E3 TE3;
+	public void testEnumCFromMember() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "enummem.c", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item;
+		
+		editor.selectAndReveal(content.indexOf("e1"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "E1");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"e1", "e2"});
+
+		editor.selectAndReveal(content.indexOf("e3"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "E2");
+		item= checkTreeNode(item, 0, "TE2");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"e3", "e4"});
+
+		editor.selectAndReveal(content.indexOf("e6"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "E3");
+		item= checkTreeNode(item, 0, "TE3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"e5", "e6"});
+	}
+
+	// enum E1 {e1, e2};
+	// typedef enum E2 {e3, e4} TE2;
+	// enum E3 {e5, e6};
+	// typedef E3 TE3;
+	public void testEnumCPP() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "enum.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item;
+		
+		editor.selectAndReveal(content.indexOf("E1"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "E1");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"e1", "e2"});
+
+		editor.selectAndReveal(content.indexOf("E2"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "E2");
+		item= checkTreeNode(item, 0, "TE2");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"e3", "e4"});
+
+		editor.selectAndReveal(content.indexOf("E3"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "E3");
+		item= checkTreeNode(item, 0, "TE3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"e5", "e6"});
+	}
+
+	// enum E1 {e1, e2};
+	// typedef enum E2 {e3, e4} TE2;
+	// enum E3 {e5, e6};
+	// typedef E3 TE3;
+	public void testEnumCPPFromMember() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "enummem.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item;
+		
+		editor.selectAndReveal(content.indexOf("e1"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "E1");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"e1", "e2"});
+
+		editor.selectAndReveal(content.indexOf("e4"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "E2");
+		item= checkTreeNode(item, 0, "TE2");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"e3", "e4"});
+
+		editor.selectAndReveal(content.indexOf("e6"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "E3");
+		item= checkTreeNode(item, 0, "TE3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"e5", "e6"});
+	}
+
+	// struct S1 {
+	//    int a1;
+	//    int b1;
+	// };
+	// typedef struct S2 {
+	//    int a2;
+	//    int b2;
+	// } S2;
+	// typedef struct S3 {
+	//    int a3;
+	//    int b3;
+	// } T3;
+	public void testStructC() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "struct.c", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor= openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("S1"), 1);
+		openTypeHierarchy(editor);
+		Tree tree = getHierarchyViewer().getTree();
+		TreeItem item= checkTreeNode(tree, 0, "S1");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a1", "b1"});
+		
+		editor.selectAndReveal(content.indexOf("S2"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item = checkTreeNode(tree, 0, "S2");
+		item= checkTreeNode(item, 0, "S2");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a2", "b2"});
+
+		editor.selectAndReveal(content.indexOf("S2;"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "S2");
+		item= checkTreeNode(item, 0, "S2");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[0]);
+
+		editor.selectAndReveal(content.indexOf("S3"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "S3");
+		item= checkTreeNode(item, 0, "T3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a3", "b3"});
+
+		editor.selectAndReveal(content.indexOf("T3"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "S3");
+		item= checkTreeNode(item, 0, "T3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[0]);
+	}
+
+	// struct S1 {
+	//    int a1;
+	//    int b1;
+	// };
+	// typedef struct S3 {
+	//    int a3;
+	//    int b3;
+	// } T3;
+	public void testStructCFromMember() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "structmem.c", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor= openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("a1"), 1);
+		openTypeHierarchy(editor);
+		Tree tree = getHierarchyViewer().getTree();
+		TreeItem item= checkTreeNode(tree, 0, "S1");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a1", "b1"});
+		
+		editor.selectAndReveal(content.indexOf("b3"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "S3");
+		item= checkTreeNode(item, 0, "T3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a3", "b3"});
+	}
+
+	// struct S1 {
+	//    int a1;
+	//    int b1;
+	// };
+	// typedef struct S2 {
+	//    int a2;
+	//    int b2;
+	// } S2;
+	// typedef struct S3 {
+	//    int a3;
+	//    int b3;
+	// } T3;
+	public void testStructCPP() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "struct.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor= openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("S1"), 1);
+		openTypeHierarchy(editor);
+		Tree tree = getHierarchyViewer().getTree();
+		TreeItem item= checkTreeNode(tree, 0, "S1");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a1", "b1"});
+
+		editor.selectAndReveal(content.indexOf("S2"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "S2");
+		item= checkTreeNode(item, 0, "S2");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a2", "b2"});
+
+		editor.selectAndReveal(content.indexOf("S2;"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item = checkTreeNode(tree, 0, "S2");
+		item= checkTreeNode(item, 0, "S2");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[0]);
+
+		editor.selectAndReveal(content.indexOf("S3"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "S3");
+		item= checkTreeNode(item, 0, "T3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a3", "b3"});
+		
+		editor.selectAndReveal(content.indexOf("T3"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "S3");
+		item= checkTreeNode(item, 0, "T3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[0]);
+	}
+	
+
+	// struct S1 {
+	//    int a1;
+	//    int b1;
+	// };
+	// typedef struct S3 {
+	//    int a3;
+	//    int b3;
+	// } T3;
+	public void testStructCPPFromMember() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "structmem.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor= openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("a1"), 1);
+		openTypeHierarchy(editor);
+		Tree tree = getHierarchyViewer().getTree();
+		TreeItem item= checkTreeNode(tree, 0, "S1");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a1", "b1"});
+
+		editor.selectAndReveal(content.indexOf("a3"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "S3");
+		item= checkTreeNode(item, 0, "T3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a3", "b3"});
+	}
+
+	// union U1 {
+	//    int a1;
+	//    char b1;
+	// };
+	// typedef union U2 {
+	//    int a2;
+	//    int b2;
+	// } U2;
+	// typedef union U3 {
+	//    int a3;
+	//    int b3;
+	// } T3;
+	public void testUnionC() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "union.c", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor= openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("U1"), 1);
+		openTypeHierarchy(editor);
+		Tree tree = getHierarchyViewer().getTree();
+		TreeItem item= checkTreeNode(tree, 0, "U1");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a1", "b1"});
+
+		editor.selectAndReveal(content.indexOf("U2"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item = checkTreeNode(tree, 0, "U2");
+		item= checkTreeNode(item, 0, "U2");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a2", "b2"});
+
+		editor.selectAndReveal(content.indexOf("U2;"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "U2");
+		item= checkTreeNode(item, 0, "U2");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[0]);
+		
+		editor.selectAndReveal(content.indexOf("U3"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "U3");
+		item= checkTreeNode(item, 0, "T3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a3", "b3"});
+
+		editor.selectAndReveal(content.indexOf("T3"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "U3");
+		item= checkTreeNode(item, 0, "T3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[0]);
+	}
+
+	// union U1 {
+	//    int a1;
+	//    char b1;
+	// };
+	public void testUnionCFromMember() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "unionmem.c", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor= openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("a1"), 1);
+		openTypeHierarchy(editor);
+		Tree tree = getHierarchyViewer().getTree();
+		TreeItem item= checkTreeNode(tree, 0, "U1");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a1", "b1"});
+	}
+
+	// union U1 {
+	//    int a1;
+	//    int b1;
+	// };
+	// typedef union U2 {
+	//    int a2;
+	//    int b2;
+	// } U2;
+	// typedef union U3 {
+	//    int a3;
+	//    int b3;
+	// } T3;
+	public void testUnionCPP() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "union.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor= openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("U1"), 1);
+		openTypeHierarchy(editor);
+		Tree tree = getHierarchyViewer().getTree();
+		TreeItem item= checkTreeNode(tree, 0, "U1");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a1", "b1"});
+
+		editor.selectAndReveal(content.indexOf("U2"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "U2");
+		item= checkTreeNode(item, 0, "U2");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a2", "b2"});
+
+
+		editor.selectAndReveal(content.indexOf("U2;"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item = checkTreeNode(tree, 0, "U2");
+		item= checkTreeNode(item, 0, "U2");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[0]);
+
+		editor.selectAndReveal(content.indexOf("U3"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "U3");
+		item= checkTreeNode(item, 0, "T3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a3", "b3"});
+		
+		editor.selectAndReveal(content.indexOf("T3"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "U3");
+		item= checkTreeNode(item, 0, "T3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[0]);
+	}
+
+	// union U1 {
+	//    int a1;
+	//    int b1;
+	// };
+	// typedef union U2 {
+	//    int a2;
+	//    int b2;
+	// } U2;
+	// typedef union U3 {
+	//    int a3;
+	//    int b3;
+	// } T3;
+	public void testUnionCPPFromMember() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "unionmem.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor= openEditor(file);
+
+		editor.selectAndReveal(content.indexOf("a1"), 1);
+		openTypeHierarchy(editor);
+		Tree tree = getHierarchyViewer().getTree();
+		TreeItem item= checkTreeNode(tree, 0, "U1");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a1", "b1"});
+
+		editor.selectAndReveal(content.indexOf("b3"), 1);
+		openTypeHierarchy(editor);
+		tree = getHierarchyViewer().getTree();
+		item= checkTreeNode(tree, 0, "U3");
+		item= checkTreeNode(item, 0, "T3");
+		assertEquals(0, item.getItemCount());
+		checkMethodTable(new String[] {"a3", "b3"});
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/CppTypeHierarchyTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/CppTypeHierarchyTest.java
new file mode 100644
index 0000000..c631711
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/CppTypeHierarchyTest.java
@@ -0,0 +1,867 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.typehierarchy;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+
+public class CppTypeHierarchyTest extends TypeHierarchyBaseTest {
+	
+	public CppTypeHierarchyTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return suite(CppTypeHierarchyTest.class);
+	}
+
+	// class Simple1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// class Simple2 : public Simple1 {
+	// public:
+	//    int field2;
+	//    int method2();
+	// };
+	// class Simple3 : public Simple2 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class Simple4 : public Simple1 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testSimpleInheritance() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "class.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("Simple1"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item2= checkTreeNode(item1, 0, "Simple2");
+		item4= checkTreeNode(item1, 1, "Simple4");
+		assertEquals(2, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+		checkMethodTable(new String[] {"field1", "method1()"});
+
+		
+		editor.selectAndReveal(content.indexOf("Simple2"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Simple2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		checkMethodTable(new String[] {"field2", "method2()"});
+
+		
+		editor.selectAndReveal(content.indexOf("Simple3"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Simple2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		checkMethodTable(new String[] {"field3", "method3()"});
+
+		
+		editor.selectAndReveal(content.indexOf("Simple4"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item4= checkTreeNode(item1, 0, "Simple4");
+		assertEquals(1, item1.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+		checkMethodTable(new String[] {"field4", "method4()"});
+	}
+
+	// class Simple1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// class Simple2 : public Simple1 {
+	// public:
+	//    int field2;
+	//    int method2();
+	// };
+	// class Simple3 : public Simple2 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class Simple4 : public Simple1 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testSimpleInheritanceFromMember() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "classmem.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("field1"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item2= checkTreeNode(item1, 0, "Simple2");
+		item4= checkTreeNode(item1, 1, "Simple4");
+		assertEquals(2, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+		checkMethodTable(new String[] {"field1", "method1()"});
+
+		
+		editor.selectAndReveal(content.indexOf("method2"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Simple2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		checkMethodTable(new String[] {"field2", "method2()"});
+
+		
+		editor.selectAndReveal(content.indexOf("field3"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Simple2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		checkMethodTable(new String[] {"field3", "method3()"});
+
+		
+		editor.selectAndReveal(content.indexOf("method4"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item4= checkTreeNode(item1, 0, "Simple4");
+		assertEquals(1, item1.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+		checkMethodTable(new String[] {"field4", "method4()"});
+	}
+
+	// class Multi1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// class Multi2 {
+	// public:
+	//    int field2;
+	//    int method2();
+	// };
+	// class Multi3 : public Multi1, Multi2 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class Multi4 : public Multi3 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testMultipleInheritance() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "multi.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("Multi1"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+
+		item1= checkTreeNode(tree, 0, "Multi1");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item3= checkTreeNode(item1, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+		checkMethodTable(new String[] {"field1", "method1()"});
+
+		
+		editor.selectAndReveal(content.indexOf("Multi2"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+
+		item2= checkTreeNode(tree, 0, "Multi2");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+
+		item3= checkTreeNode(item2, 0, "Multi3");
+		assertEquals(1, item2.getItemCount());
+		
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+		checkMethodTable(new String[] {"field2", "method2()"});
+
+		
+		editor.selectAndReveal(content.indexOf("Multi3"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "Multi1");
+		item2= checkTreeNode(tree, 1, "Multi2");		
+		assertEquals(2, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item3= checkTreeNode(item1, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item3= checkTreeNode(item2, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		checkMethodTable(new String[] {"field3", "method3()"});
+
+		
+		editor.selectAndReveal(content.indexOf("Multi4"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "Multi1");
+		item2= checkTreeNode(tree, 1, "Multi2");		
+		assertEquals(2, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item3= checkTreeNode(item1, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item3= checkTreeNode(item2, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		checkMethodTable(new String[] {"field4", "method4()"});
+	}
+
+	// class Multi1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// class Multi2 {
+	// public:
+	//    int field2;
+	//    int method2();
+	// };
+	// class Multi3 : public Multi1, Multi2 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class Multi4 : public Multi3 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testMultipleInheritanceFromMember() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "multimem.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("field1"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+
+		item1= checkTreeNode(tree, 0, "Multi1");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item3= checkTreeNode(item1, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+		checkMethodTable(new String[] {"field1", "method1()"});
+
+		
+		editor.selectAndReveal(content.indexOf("method2"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+
+		item2= checkTreeNode(tree, 0, "Multi2");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+
+		item3= checkTreeNode(item2, 0, "Multi3");
+		assertEquals(1, item2.getItemCount());
+		
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+		checkMethodTable(new String[] {"field2", "method2()"});
+
+		
+		editor.selectAndReveal(content.indexOf("field3"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "Multi1");
+		item2= checkTreeNode(tree, 1, "Multi2");		
+		assertEquals(2, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item3= checkTreeNode(item1, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item3= checkTreeNode(item2, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		checkMethodTable(new String[] {"field3", "method3()"});
+
+		
+		editor.selectAndReveal(content.indexOf("method4"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "Multi1");
+		item2= checkTreeNode(tree, 1, "Multi2");		
+		assertEquals(2, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item3= checkTreeNode(item1, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item3= checkTreeNode(item2, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		checkMethodTable(new String[] {"field4", "method4()"});
+	}
+
+	// class Diamond1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// class Diamond2 : public Diamond1 {
+	// public:
+	//    int field2;
+	//    int method2();
+	// };
+	// class Diamond3 : public Diamond1 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class Diamond4 : public Diamond2, Diamond3 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testDiamondInheritance() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "diamond.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("Diamond1"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item2= checkTreeNode(item1, 0, "Diamond2");
+		item3= checkTreeNode(item1, 1, "Diamond3");
+		assertEquals(2, item1.getItemCount());
+		
+		item4= checkTreeNode(item2, 0, "Diamond4");
+		assertEquals(1, item2.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item4= checkTreeNode(item3, 0, "Diamond4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		checkMethodTable(new String[] {"field1", "method1()"});
+
+		
+		editor.selectAndReveal(content.indexOf("Diamond2"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item2= checkTreeNode(item1, 0, "Diamond2");
+		assertEquals(1, item1.getItemCount());
+		
+		item4= checkTreeNode(item2, 0, "Diamond4");
+		assertEquals(1, item2.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		checkMethodTable(new String[] {"field2", "method2()"});
+
+		
+		editor.selectAndReveal(content.indexOf("Diamond3"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item3= checkTreeNode(item1, 0, "Diamond3");
+		assertEquals(1, item1.getItemCount());
+		
+		item4= checkTreeNode(item3, 0, "Diamond4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		checkMethodTable(new String[] {"field3", "method3()"});
+
+		
+		editor.selectAndReveal(content.indexOf("Diamond4"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item2= checkTreeNode(item1, 0, "Diamond2");
+		item3= checkTreeNode(item1, 1, "Diamond3");
+		assertEquals(2, item1.getItemCount());
+		
+		item4= checkTreeNode(item2, 0, "Diamond4");
+		assertEquals(1, item2.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item4= checkTreeNode(item3, 0, "Diamond4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		checkMethodTable(new String[] {"field4", "method4()"});
+	}	
+	
+	// class Diamond1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// class Diamond2 : public Diamond1 {
+	// public:
+	//    int field2;
+	//    int method2();
+	// };
+	// class Diamond3 : public Diamond1 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class Diamond4 : public Diamond2, Diamond3 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testDiamondInheritanceFromMember() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "diamondmem.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("field1"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item2= checkTreeNode(item1, 0, "Diamond2");
+		item3= checkTreeNode(item1, 1, "Diamond3");
+		assertEquals(2, item1.getItemCount());
+		
+		item4= checkTreeNode(item2, 0, "Diamond4");
+		assertEquals(1, item2.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item4= checkTreeNode(item3, 0, "Diamond4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		checkMethodTable(new String[] {"field1", "method1()"});
+
+		
+		editor.selectAndReveal(content.indexOf("method2"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item2= checkTreeNode(item1, 0, "Diamond2");
+		assertEquals(1, item1.getItemCount());
+		
+		item4= checkTreeNode(item2, 0, "Diamond4");
+		assertEquals(1, item2.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		checkMethodTable(new String[] {"field2", "method2()"});
+
+		
+		editor.selectAndReveal(content.indexOf("field3"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item3= checkTreeNode(item1, 0, "Diamond3");
+		assertEquals(1, item1.getItemCount());
+		
+		item4= checkTreeNode(item3, 0, "Diamond4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		checkMethodTable(new String[] {"field3", "method3()"});
+
+		
+		editor.selectAndReveal(content.indexOf("method4"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item2= checkTreeNode(item1, 0, "Diamond2");
+		item3= checkTreeNode(item1, 1, "Diamond3");
+		assertEquals(2, item1.getItemCount());
+		
+		item4= checkTreeNode(item2, 0, "Diamond4");
+		assertEquals(1, item2.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item4= checkTreeNode(item3, 0, "Diamond4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		checkMethodTable(new String[] {"field4", "method4()"});
+	}	
+
+	// class ViaTypedef1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// typedef ViaTypedef1 ViaTypedef2;
+	//
+	// class ViaTypedef3 : public ViaTypedef2 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class ViaTypedef4 : public ViaTypedef1 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testViaTypedefInheritance() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "viaTypedef.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("ViaTypedef1"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item2= checkTreeNode(item1, 0, "ViaTypedef2");
+		item4= checkTreeNode(item1, 1, "ViaTypedef4");
+		assertEquals(2, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "ViaTypedef3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+		checkMethodTable(new String[] {"field1", "method1()"});
+
+		
+		editor.selectAndReveal(content.indexOf("ViaTypedef2"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "ViaTypedef2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "ViaTypedef3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		checkMethodTable(new String[] {});
+
+		
+		editor.selectAndReveal(content.indexOf("ViaTypedef3"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "ViaTypedef2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "ViaTypedef3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		checkMethodTable(new String[] {"field3", "method3()"});
+
+		
+		editor.selectAndReveal(content.indexOf("ViaTypedef4"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		
+		item4= checkTreeNode(item1, 0, "ViaTypedef4");
+		assertEquals(1, item1.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+		checkMethodTable(new String[] {"field4", "method4()"});
+	}
+
+	// class ViaTypedef1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// typedef ViaTypedef1 ViaTypedef2;
+	//
+	// class ViaTypedef3 : public ViaTypedef2 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class ViaTypedef4 : public ViaTypedef1 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testViaTypedefInheritanceFromMember() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "viaTypedefmem.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("field1"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		getHierarchyViewer().expandAll();
+		
+		item2= checkTreeNode(item1, 0, "ViaTypedef2");
+		item4= checkTreeNode(item1, 1, "ViaTypedef4");
+		assertEquals(2, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "ViaTypedef3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+		checkMethodTable(new String[] {"field1", "method1()"});
+
+		
+		editor.selectAndReveal(content.indexOf("ViaTypedef2"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "ViaTypedef2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "ViaTypedef3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		checkMethodTable(new String[] {});
+
+		
+		editor.selectAndReveal(content.indexOf("field3"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "ViaTypedef2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "ViaTypedef3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		checkMethodTable(new String[] {"field3", "method3()"});
+
+		
+		editor.selectAndReveal(content.indexOf("method4"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		
+		item4= checkTreeNode(item1, 0, "ViaTypedef4");
+		assertEquals(1, item1.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+		checkMethodTable(new String[] {"field4", "method4()"});
+	}
+
+	// template <typename T> class SimpleTemplate {
+	// public:
+	//    T field1;
+	//    T method1();
+	// };
+	public void testTemplatesNoInheritance() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "simpleTemplate.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("SimpleTemplate"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		
+		item1= checkTreeNode(tree, 0, "SimpleTemplate");
+		assertEquals(1, tree.getItemCount());
+		assertEquals(0, item1.getItemCount());
+		checkMethodTable(new String[] {"field1", "method1()"});
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/QuickTypeHierarchyTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/QuickTypeHierarchyTest.java
new file mode 100644
index 0000000..f4a0c3f
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/QuickTypeHierarchyTest.java
@@ -0,0 +1,858 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.typehierarchy;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+
+public class QuickTypeHierarchyTest extends TypeHierarchyBaseTest {
+	
+	public QuickTypeHierarchyTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return suite(QuickTypeHierarchyTest.class);
+	}
+
+	// class Simple1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// class Simple2 : public Simple1 {
+	// public:
+	//    int field2;
+	//    int method2();
+	// };
+	// class Simple3 : public Simple2 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class Simple4 : public Simple1 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testSimpleInheritance() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "class.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("Simple1"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		if (tree == null) {
+			checkPlatform();
+			return;	
+		}
+		
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+
+		item2= checkTreeNode(item1, 0, "Simple2");
+		item4= checkTreeNode(item1, 1, "Simple4");
+		assertEquals(2, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		
+		editor.selectAndReveal(content.indexOf("Simple2"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Simple2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("Simple3"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Simple2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("Simple4"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item4= checkTreeNode(item1, 0, "Simple4");
+		assertEquals(1, item1.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+
+	}
+
+	// class Simple1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// class Simple2 : public Simple1 {
+	// public:
+	//    int field2;
+	//    int method2();
+	// };
+	// class Simple3 : public Simple2 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class Simple4 : public Simple1 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testSimpleInheritanceFromMember() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "classmem.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("field1"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		if (tree == null) {
+			checkPlatform();
+			return;	
+		}
+		
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Simple2");
+		item4= checkTreeNode(item1, 1, "Simple4");
+		assertEquals(2, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("method2"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Simple2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("field3"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Simple2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("method4"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item4= checkTreeNode(item1, 0, "Simple4");
+		assertEquals(1, item1.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+
+	}
+
+	// class Multi1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// class Multi2 {
+	// public:
+	//    int field2;
+	//    int method2();
+	// };
+	// class Multi3 : public Multi1, Multi2 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class Multi4 : public Multi3 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testMultipleInheritance() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "multi.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("Multi1"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		if (tree == null) {
+			checkPlatform();
+			return;	
+		}
+
+		item1= checkTreeNode(tree, 0, "Multi1");
+		assertEquals(1, tree.getItemCount());
+		
+		item3= checkTreeNode(item1, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("Multi2"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+
+		item2= checkTreeNode(tree, 0, "Multi2");
+		assertEquals(1, tree.getItemCount());
+
+		item3= checkTreeNode(item2, 0, "Multi3");
+		assertEquals(1, item2.getItemCount());
+		
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("Multi3"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "Multi1");
+		item2= checkTreeNode(tree, 1, "Multi2");		
+		assertEquals(2, tree.getItemCount());
+		
+		item3= checkTreeNode(item1, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item3= checkTreeNode(item2, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+
+
+		
+		editor.selectAndReveal(content.indexOf("Multi4"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "Multi1");
+		item2= checkTreeNode(tree, 1, "Multi2");		
+		assertEquals(2, tree.getItemCount());
+		
+		item3= checkTreeNode(item1, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item3= checkTreeNode(item2, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+
+	}
+
+	// class Multi1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// class Multi2 {
+	// public:
+	//    int field2;
+	//    int method2();
+	// };
+	// class Multi3 : public Multi1, Multi2 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class Multi4 : public Multi3 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testMultipleInheritanceFromMember() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "multimem.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("field1"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		if (tree == null) {
+			checkPlatform();
+			return;	
+		}
+
+		item1= checkTreeNode(tree, 0, "Multi1");
+		assertEquals(1, tree.getItemCount());
+
+		item3= checkTreeNode(item1, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("method2"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+
+		item2= checkTreeNode(tree, 0, "Multi2");
+		assertEquals(1, tree.getItemCount());
+
+		item3= checkTreeNode(item2, 0, "Multi3");
+		assertEquals(1, item2.getItemCount());
+		
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("field3"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "Multi1");
+		item2= checkTreeNode(tree, 1, "Multi2");		
+		assertEquals(2, tree.getItemCount());
+		
+		item3= checkTreeNode(item1, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item3= checkTreeNode(item2, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+
+
+		
+		editor.selectAndReveal(content.indexOf("method4"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "Multi1");
+		item2= checkTreeNode(tree, 1, "Multi2");		
+		assertEquals(2, tree.getItemCount());
+		
+		item3= checkTreeNode(item1, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item3= checkTreeNode(item2, 0, "Multi3");
+		assertEquals(1, item1.getItemCount());
+		item4= checkTreeNode(item3, 0, "Multi4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+
+	}
+
+	// class Diamond1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// class Diamond2 : public Diamond1 {
+	// public:
+	//    int field2;
+	//    int method2();
+	// };
+	// class Diamond3 : public Diamond1 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class Diamond4 : public Diamond2, Diamond3 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testDiamondInheritance() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "diamond.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("Diamond1"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		if (tree == null) {
+			checkPlatform();
+			return;	
+		}
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Diamond2");
+		item3= checkTreeNode(item1, 1, "Diamond3");
+		assertEquals(2, item1.getItemCount());
+		
+		item4= checkTreeNode(item2, 0, "Diamond4");
+		assertEquals(1, item2.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item4= checkTreeNode(item3, 0, "Diamond4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+
+
+		
+		editor.selectAndReveal(content.indexOf("Diamond2"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Diamond2");
+		assertEquals(1, item1.getItemCount());
+		
+		item4= checkTreeNode(item2, 0, "Diamond4");
+		assertEquals(1, item2.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+
+
+		
+		editor.selectAndReveal(content.indexOf("Diamond3"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		
+		item3= checkTreeNode(item1, 0, "Diamond3");
+		assertEquals(1, item1.getItemCount());
+		
+		item4= checkTreeNode(item3, 0, "Diamond4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+
+
+		
+		editor.selectAndReveal(content.indexOf("Diamond4"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Diamond2");
+		item3= checkTreeNode(item1, 1, "Diamond3");
+		assertEquals(2, item1.getItemCount());
+		
+		item4= checkTreeNode(item2, 0, "Diamond4");
+		assertEquals(1, item2.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item4= checkTreeNode(item3, 0, "Diamond4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+
+	}	
+	
+	// class Diamond1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// class Diamond2 : public Diamond1 {
+	// public:
+	//    int field2;
+	//    int method2();
+	// };
+	// class Diamond3 : public Diamond1 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class Diamond4 : public Diamond2, Diamond3 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testDiamondInheritanceFromMember() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "diamondmem.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("field1"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		if (tree == null) {
+			checkPlatform();
+			return;	
+		}
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Diamond2");
+		item3= checkTreeNode(item1, 1, "Diamond3");
+		assertEquals(2, item1.getItemCount());
+		
+		item4= checkTreeNode(item2, 0, "Diamond4");
+		assertEquals(1, item2.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item4= checkTreeNode(item3, 0, "Diamond4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+
+
+		
+		editor.selectAndReveal(content.indexOf("method2"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Diamond2");
+		assertEquals(1, item1.getItemCount());
+		
+		item4= checkTreeNode(item2, 0, "Diamond4");
+		assertEquals(1, item2.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+
+
+		
+		editor.selectAndReveal(content.indexOf("field3"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		
+		item3= checkTreeNode(item1, 0, "Diamond3");
+		assertEquals(1, item1.getItemCount());
+		
+		item4= checkTreeNode(item3, 0, "Diamond4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		editor.selectAndReveal(content.indexOf("method4"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+
+		item1= checkTreeNode(tree, 0, "Diamond1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Diamond2");
+		item3= checkTreeNode(item1, 1, "Diamond3");
+		assertEquals(2, item1.getItemCount());
+		
+		item4= checkTreeNode(item2, 0, "Diamond4");
+		assertEquals(1, item2.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+		item4= checkTreeNode(item3, 0, "Diamond4");
+		assertEquals(1, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+
+	}	
+
+	// class ViaTypedef1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// typedef ViaTypedef1 ViaTypedef2;
+	//
+	// class ViaTypedef3 : public ViaTypedef2 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class ViaTypedef4 : public ViaTypedef1 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testViaTypedefInheritance() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "viaTypedef.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("ViaTypedef1"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		if (tree == null) {
+			checkPlatform();
+			return;	
+		}
+		
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "ViaTypedef2");
+		item4= checkTreeNode(item1, 1, "ViaTypedef4");
+		assertEquals(2, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "ViaTypedef3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("ViaTypedef2"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "ViaTypedef2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "ViaTypedef3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("ViaTypedef3"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "ViaTypedef2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "ViaTypedef3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("ViaTypedef4"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		
+		item4= checkTreeNode(item1, 0, "ViaTypedef4");
+		assertEquals(1, item1.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+
+	}
+
+	// class ViaTypedef1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// typedef ViaTypedef1 ViaTypedef2;
+	//
+	// class ViaTypedef3 : public ViaTypedef2 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class ViaTypedef4 : public ViaTypedef1 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testViaTypedefInheritanceFromMember() throws Exception {
+		String content= getContentsForTest(1)[0].toString();
+		IFile file= createFile(getProject(), "viaTypedefmem.cpp", content);
+		waitForIndexer(fIndex, file, INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(file);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(content.indexOf("field1"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		if (tree == null) {
+			checkPlatform();
+			return;	
+		}
+		
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "ViaTypedef2");
+		item4= checkTreeNode(item1, 1, "ViaTypedef4");
+		assertEquals(2, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "ViaTypedef3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("ViaTypedef2"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "ViaTypedef2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "ViaTypedef3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("field3"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "ViaTypedef2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "ViaTypedef3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+
+
+		
+		editor.selectAndReveal(content.indexOf("method4"), 1);
+		openQuickTypeHierarchy(editor);
+		tree= getQuickTypeHierarchyViewer(editor);
+		item1= checkTreeNode(tree, 0, "ViaTypedef1");
+		assertEquals(1, tree.getItemCount());
+		
+		item4= checkTreeNode(item1, 0, "ViaTypedef4");
+		assertEquals(1, item1.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+
+	}
+
+	private void checkPlatform() {
+		assertFalse(Platform.getOS().equals(Platform.OS_WIN32));
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/TypeHierarchyAcrossProjectsTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/TypeHierarchyAcrossProjectsTest.java
new file mode 100644
index 0000000..1e4caa2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/TypeHierarchyAcrossProjectsTest.java
@@ -0,0 +1,163 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.typehierarchy;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.TestScannerProvider;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+
+
+public class TypeHierarchyAcrossProjectsTest extends TypeHierarchyBaseTest {
+	
+	private ICProject fCProject2;
+
+	public TypeHierarchyAcrossProjectsTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return suite(TypeHierarchyAcrossProjectsTest.class);
+	}
+	
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+
+		fCProject2= CProjectHelper.createCCProject("__thTest_2__", "bin", IPDOMManager.ID_FAST_INDEXER);
+		IProjectDescription desc= fCProject2.getProject().getDescription();
+		desc.setReferencedProjects(new IProject[]{fCProject.getProject()});
+		fCProject2.getProject().setDescription(desc, new NullProgressMonitor());
+		
+		CCorePlugin.getIndexManager().reindex(fCProject2);
+		fIndex= CCorePlugin.getIndexManager().getIndex(new ICProject[] {fCProject, fCProject2});
+		TestScannerProvider.sIncludes= new String[]{fCProject.getProject().getLocation().toOSString(), fCProject2.getProject().getLocation().toOSString()};
+	}
+
+	@Override
+	protected void tearDown() throws Exception {
+		if (fCProject2 != null) {
+			CProjectHelper.delete(fCProject2);
+		}
+		super.tearDown();
+	}
+
+	// class Simple1 {
+	// public:
+	//    int field1;
+	//    int method1();
+	// };
+	// class Simple2 : public Simple1 {
+	// public:
+	//    int field2;
+	//    int method2();
+	// };
+	
+	// #include "simpleHeader.h"
+	// class Simple3 : public Simple2 {
+	// public:
+	//    int field3;
+	//    int method3();
+	// };
+	// class Simple4 : public Simple1 {
+	// public:
+	//    int field4;
+	//    int method4();
+	// };
+	public void testSimpleInheritanceAcross() throws Exception {
+		StringBuffer[] content= getContentsForTest(2);
+		String header= content[0].toString();
+		String source = content[1].toString();
+		IFile headerFile= createFile(fCProject.getProject(), "simpleHeader.h", header);
+		IFile sourceFile= createFile(fCProject2.getProject(), "simple.cpp", source);
+		waitForIndexer(fIndex, sourceFile, TypeHierarchyBaseTest.INDEXER_WAIT_TIME);
+		
+		CEditor editor= openEditor(sourceFile);
+		Tree tree;
+		TreeItem item1, item2, item3, item4;
+		
+		editor.selectAndReveal(source.indexOf("Simple1"), 1);
+		openTypeHierarchy(editor);
+		getHierarchyViewer().expandAll();
+		tree= getHierarchyViewer().getTree();
+		
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Simple2");
+		item4= checkTreeNode(item1, 1, "Simple4");
+		assertEquals(2, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		assertEquals(0, item4.getItemCount());
+		checkMethodTable(new String[] {"field1", "method1()"});
+
+		
+		editor.selectAndReveal(source.indexOf("Simple2"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Simple2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		checkMethodTable(new String[] {"field2", "method2()"});
+
+		
+		editor.selectAndReveal(source.indexOf("Simple3"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item2= checkTreeNode(item1, 0, "Simple2");
+		assertEquals(1, item1.getItemCount());
+		
+		item3= checkTreeNode(item2, 0, "Simple3");
+		assertEquals(1, item2.getItemCount());
+		
+		assertEquals(0, item3.getItemCount());
+		checkMethodTable(new String[] {"field3", "method3()"});
+
+		
+		editor.selectAndReveal(source.indexOf("Simple4"), 1);
+		openTypeHierarchy(editor);
+		tree= getHierarchyViewer().getTree();
+		item1= checkTreeNode(tree, 0, "Simple1");
+		assertEquals(1, tree.getItemCount());
+		
+		item4= checkTreeNode(item1, 0, "Simple4");
+		assertEquals(1, item1.getItemCount());
+		
+		assertEquals(0, item4.getItemCount());
+		checkMethodTable(new String[] {"field4", "method4()"});
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/TypeHierarchyBaseTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/TypeHierarchyBaseTest.java
new file mode 100644
index 0000000..281f343
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/TypeHierarchyBaseTest.java
@@ -0,0 +1,196 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+package org.eclipse.cdt.ui.tests.typehierarchy;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWTException;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+import org.eclipse.cdt.ui.tests.text.EditorTestHelper;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.cdt.internal.ui.typehierarchy.THViewPart;
+import org.eclipse.cdt.internal.ui.typehierarchy.TypeHierarchyUI;
+
+public class TypeHierarchyBaseTest extends BaseUITestCase {
+	protected static final int INDEXER_WAIT_TIME = 8000;
+
+	protected ICProject fCProject;
+	protected IIndex fIndex;
+
+	public TypeHierarchyBaseTest(String name) {
+		super(name);
+	}
+
+	@Override
+	protected void setUp() throws Exception {
+		super.setUp();
+		fCProject= CProjectHelper.createCCProject("__thTest__", "bin", IPDOMManager.ID_FAST_INDEXER);
+		CCorePlugin.getIndexManager().joinIndexer(INDEXER_WAIT_TIME, NPM);
+		fIndex= CCorePlugin.getIndexManager().getIndex(fCProject);
+	}
+	
+	@Override
+	protected void tearDown() throws Exception {
+		closeAllEditors();
+		if (fCProject != null) {
+			CProjectHelper.delete(fCProject);
+		}
+		super.tearDown();
+	}
+	
+	protected IProject getProject() {
+		return fCProject.getProject();
+	}
+	
+	protected CEditor openEditor(IFile file) throws PartInitException {
+		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		CEditor editor= (CEditor) IDE.openEditor(page, file);
+		EditorTestHelper.joinReconciler(EditorTestHelper.getSourceViewer(editor), 100, 500, 10);
+		return editor;
+	}	
+
+	protected void openTypeHierarchy(CEditor editor) {
+		ISelectionProvider selectionProvider = editor.getSelectionProvider();
+		TypeHierarchyUI.open(editor, (ITextSelection) selectionProvider.getSelection());
+		runEventQueue(200);
+	}
+
+	protected void openTypeHierarchy(CEditor editor, int mode) {
+		TypeHierarchyUI.open(editor, (ITextSelection) editor.getSelectionProvider().getSelection());
+		runEventQueue(0);
+		THViewPart th= null;
+		IWorkbenchPage page = editor.getSite().getPage();
+		for (int i = 0; i < 400; i++) {
+			th= (THViewPart)page.findView(CUIPlugin.ID_TYPE_HIERARCHY);
+			if (th != null) 
+				break;
+			runEventQueue(10);
+		}
+		assertNotNull(th);
+		th.onSetHierarchyKind(mode);
+	}
+
+	protected void openQuickTypeHierarchy(CEditor editor) {
+		editor.getAction("OpenHierarchy").run();
+		runEventQueue(200);
+	}
+
+	protected TreeViewer getHierarchyViewer() {
+		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		runEventQueue(0);
+		THViewPart th= null;
+		for (int i=0; i<50; i++) {
+			th= (THViewPart)page.findView(CUIPlugin.ID_TYPE_HIERARCHY);
+			if (th != null) 
+				break;
+			runEventQueue(10);
+		}
+		assertNotNull(th);
+		return th.getHiearchyViewer();
+	}
+
+	protected Tree getQuickTypeHierarchyViewer(CEditor editor) {
+		runEventQueue(0);
+		THViewPart th= null;
+		for (int i=0; i<50; i++) {
+			Control focus= editor.getSite().getShell().getDisplay().getFocusControl();
+			if (focus instanceof Text) {
+				Composite parent= focus.getParent();
+				Control[] children= parent.getChildren();
+				for (int j = 0; j < children.length; j++) {
+					Control child = children[j];
+					if (child instanceof Tree) {
+						return (Tree) child;
+					}
+				}
+			}
+			runEventQueue(10);
+		}
+		return null;
+	}
+
+	protected TableViewer getMethodViewer() {
+		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+		runEventQueue(0);
+		THViewPart th= null;
+		for (int i=0; i<50; i++) {
+			th= (THViewPart)page.findView(CUIPlugin.ID_TYPE_HIERARCHY);
+			if (th != null) 
+				break;
+			runEventQueue(10);
+		}
+		assertNotNull(th);
+		return th.getMemberViewer();
+	}
+		
+	protected TreeItem checkTreeNode(TreeItem root, int i1, String label) {
+		TreeItem item= null;
+		try {
+			for (int i=0; i<200; i++) {
+				item= root.getItem(i1);
+				try {
+					if ("".equals(item.getText())) {
+						TreeItem parent= item.getParentItem();
+						if (!parent.getExpanded()) {
+							expandTreeItem(parent);
+						}
+					}
+					else if (!"...".equals(item.getText())) {
+						break;
+					}
+				} catch (SWTException e) {
+					// in case widget was disposed, item may be replaced
+				}
+				runEventQueue(10);
+			}
+		}
+		catch (IllegalArgumentException e) {
+			assertNull("Tree node " + label + " does not exist!", label);
+			return null;
+		}
+		assertNotNull("Unexpected tree node " + item.getText(), label);
+		assertEquals(label, item.getText());
+		return item;
+	}
+	
+	protected void checkMethodTable(String[] items) {
+		Table table= getMethodViewer().getTable();
+		TableItem[] titems= table.getItems();
+		for (int i = 0; i < Math.min(titems.length, items.length); i++) {
+			assertEquals("wrong item in method table in column " + i, items[i], titems[i].getText());
+		}
+		assertTrue("Missing items in method table", items.length <= titems.length);
+		assertTrue("Superfluous items in method table", items.length >= titems.length);
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/TypeHierarchyTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/TypeHierarchyTestSuite.java
new file mode 100644
index 0000000..1ac6b68
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/TypeHierarchyTestSuite.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.ui.tests.typehierarchy;
+
+import junit.framework.TestSuite;
+
+public class TypeHierarchyTestSuite extends TestSuite {
+
+    public static TestSuite suite() {
+        return new TypeHierarchyTestSuite();
+    }
+    
+    public TypeHierarchyTestSuite() {
+        super(TypeHierarchyTestSuite.class.getName());
+        addTest(CTypeHierarchyTest.suite());
+        addTest(CppTypeHierarchyTest.suite());
+        addTest(QuickTypeHierarchyTest.suite());
+        addTest(TypeHierarchyAcrossProjectsTest.suite());
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/viewsupport/AsyncViewerTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/viewsupport/AsyncViewerTest.java
new file mode 100644
index 0000000..0893fd2
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/viewsupport/AsyncViewerTest.java
@@ -0,0 +1,309 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/ 
+
+package org.eclipse.cdt.ui.tests.viewsupport;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.PlatformUI;
+
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+
+import org.eclipse.cdt.internal.ui.viewsupport.AsyncTreeContentProvider;
+import org.eclipse.cdt.internal.ui.viewsupport.AsyncTreeWorkInProgressNode;
+import org.eclipse.cdt.internal.ui.viewsupport.ExtendedTreeViewer;
+
+public class AsyncViewerTest extends BaseUITestCase {
+    private class Node {
+        private String fLabel;
+        private Node[] fChildren;
+        private int fAsync;
+
+        Node(String label, Node[] children, int async) {
+            fLabel= label;
+            fChildren= children;
+            fAsync= async;
+        }
+
+        public Node(String label) {
+            this(label, new Node[0], 0);
+        }
+        
+        public String toString() {
+            return fLabel;
+        }
+        
+        public int hashCode() {
+            return fLabel.hashCode();
+        }
+        
+        public boolean equals(Object rhs) {
+            if (rhs instanceof Node) {
+                return fLabel.equals(((Node) rhs).fLabel);
+            }
+            return false;
+        }
+    }
+    
+    private class ContentProvider extends AsyncTreeContentProvider {
+        public ContentProvider(Display disp) {
+            super(disp);
+        }
+
+        protected Object[] asyncronouslyComputeChildren(Object parentElement, IProgressMonitor monitor) {
+            Node n= (Node) parentElement;
+            try {
+                Thread.sleep(n.fAsync);
+            } catch (InterruptedException e) {
+                throw new RuntimeException(e);
+            }
+            return n.fChildren;
+        }
+
+        protected Object[] syncronouslyComputeChildren(Object parentElement) {
+            Node n= (Node) parentElement;
+            if (n.fAsync != 0) {
+                return null;
+            }
+            return n.fChildren;
+        }
+    };
+    
+    private class MyLabelProvider extends LabelProvider {
+        public String getText(Object element) {
+            if (element instanceof AsyncTreeWorkInProgressNode) {
+                return "...";
+            }
+            return ((Node) element).fLabel;
+        }
+    }
+
+    private class TestDialog extends Dialog {
+        private TreeViewer fViewer;
+        private ContentProvider fContentProvider;
+        private boolean fUseExtendedViewer;
+
+        protected TestDialog(Shell parentShell, boolean useExtendedViewer) {
+            super(parentShell);
+            fUseExtendedViewer= useExtendedViewer;
+        }
+
+        protected Control createDialogArea(Composite parent) {
+            fContentProvider= new ContentProvider(getShell().getDisplay());
+            
+            Composite comp= (Composite) super.createDialogArea(parent);
+            fViewer= fUseExtendedViewer ? new ExtendedTreeViewer(comp) : new TreeViewer(comp);
+            fViewer.setContentProvider(fContentProvider);
+            fViewer.setLabelProvider(new MyLabelProvider());
+            return comp;
+        }
+    }
+
+	private TestDialog fDialog;
+    
+    protected void tearDown() throws Exception {
+    	if (fDialog != null) {
+    		fDialog.close();
+    	}
+		super.tearDown();
+	}
+
+	public void testSyncPopulation() {
+        createTestDialog(false);
+        doTestSyncPopulation(fDialog);
+    }
+
+    public void testSyncPopulationEx() {
+        createTestDialog(true);
+        doTestSyncPopulation(fDialog);
+    }
+
+    private void doTestSyncPopulation(TestDialog dlg) {
+        Node a,b,c;
+        Node root= new Node("", new Node[] {
+                a= new Node("a"), 
+                b= new Node("b", new Node[] {
+                        c= new Node("c")
+                }, 0)
+        }, 0);
+        dlg.fViewer.setInput(root);
+        assertEquals(2, countVisibleItems(dlg.fViewer));
+
+        dlg.fViewer.setExpandedState(a, true);
+        assertEquals(2, countVisibleItems(dlg.fViewer));
+
+        dlg.fViewer.setExpandedState(b, true);
+        assertEquals(3, countVisibleItems(dlg.fViewer));
+    }
+
+    private void createTestDialog(boolean useExtendedViewer) {
+        fDialog= new TestDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), useExtendedViewer);
+        fDialog.setBlockOnOpen(false);
+        fDialog.open();
+    }
+
+    private int countVisibleItems(TreeViewer viewer) {
+        return countVisibleItems(viewer.getTree().getItems());
+    }
+
+    private int countVisibleItems(TreeItem[] items) {
+        int count= items.length;
+        for (int i = 0; i < items.length; i++) {
+            TreeItem item = items[i];
+            if (item.getExpanded()) {
+                count+= countVisibleItems(item.getItems());
+            }
+        }
+        return count;
+    }     
+
+    public void testAsyncPopulation() throws InterruptedException {
+        createTestDialog(false);
+        doTestAsyncPopulation(fDialog);        
+    }
+
+    public void testAsyncPopulationEx() throws InterruptedException {
+    	createTestDialog(true);
+        doTestAsyncPopulation(fDialog);        
+    }
+
+    private void doTestAsyncPopulation(TestDialog dlg) throws InterruptedException {
+        Node a,b,c;
+        Node root= new Node("", new Node[] {
+                a= new Node("a", new Node[0], 200), 
+                b= new Node("b", new Node[] {
+                        new Node("c"), new Node("d")
+                }, 200)
+        }, 0);
+        
+        
+        
+        // + a
+        // + b
+        dlg.fViewer.setInput(root); 
+        waitForItems(dlg.fViewer, 2);
+
+        // - a
+        //   - ...
+        // + b
+        dlg.fViewer.setExpandedState(a, true);
+        waitForItems(dlg.fViewer, 3);
+        assertEquals("...", dlg.fViewer.getTree().getItem(0).getItem(0).getText());
+        
+        // - a
+        // + b
+        runEventQueue(600);
+        assertEquals(2, countVisibleItems(dlg.fViewer));
+        
+
+        // + a
+        // + b
+        dlg.fViewer.setInput(null); 
+        dlg.fViewer.setInput(root); 
+        waitForItems(dlg.fViewer, 2);
+        
+        // expand async with two children
+        // + a
+        // - b
+        //   - ...
+        dlg.fViewer.setExpandedState(b, true); 
+        waitForItems(dlg.fViewer, 3);
+        assertEquals("...", dlg.fViewer.getTree().getItem(1).getItem(0).getText());
+
+        // - a
+        // - b
+        //   - c
+        //   - d
+        runEventQueue(600);
+        assertEquals(4, countVisibleItems(dlg.fViewer));
+
+        // + a
+        // + b
+        dlg.fViewer.setInput(null); 
+        dlg.fViewer.setInput(root); 
+        waitForItems(dlg.fViewer, 2);
+
+        // wait until children are computed (for the sake of the +-sign)
+        runEventQueue(800); 
+        assertEquals(2, countVisibleItems(dlg.fViewer));
+        dlg.fViewer.setExpandedState(a, true); 
+        waitForItems(dlg.fViewer, 2);
+        dlg.fViewer.setExpandedState(b, true); 
+        waitForItems(dlg.fViewer, 4);
+    }
+
+	private void waitForItems(TreeViewer viewer, int count) {
+		for (int i=0; i<100 && countVisibleItems(viewer) < count; i++) {
+        	runEventQueue(10);
+        }
+        assertEquals(count, countVisibleItems(viewer));
+	}
+
+    public void testRecompute() throws InterruptedException {        
+        createTestDialog(true);
+        Node a,b,c;
+        Node root= 
+            new Node("", new Node[] {
+                a= new Node("a"), 
+                b= new Node("b", new Node[] {
+                        c= new Node("c", new Node[] {
+                                new Node("c1"), new Node("c2")}, 150), 
+                        new Node("d")
+                }, 150)
+            }, 0);
+        
+        fDialog.fViewer.setInput(root); runEventQueue(50);
+        assertEquals(2, countVisibleItems(fDialog.fViewer));
+
+        fDialog.fContentProvider.recompute();
+        assertEquals(2, countVisibleItems(fDialog.fViewer));
+        
+        fDialog.fViewer.setExpandedState(b, true); 
+        runEventQueue(200);
+        assertEquals(4, countVisibleItems(fDialog.fViewer));
+        runEventQueue(200);
+
+        root.fChildren= new Node[] {
+                a= new Node("a1"), 
+                b= new Node("b", new Node[] {
+                        c= new Node("c", new Node[] {
+                                new Node("c3"), new Node("c4")}, 150), 
+                        new Node("d")
+                }, 150)
+        };
+        fDialog.fContentProvider.recompute();
+        assertEquals(3, countVisibleItems(fDialog.fViewer));
+        runEventQueue(200);
+        assertEquals(4, countVisibleItems(fDialog.fViewer));
+        
+        fDialog.fViewer.setExpandedState(c, true); 
+        assertEquals(5, countVisibleItems(fDialog.fViewer));
+        runEventQueue(200);
+        assertEquals(6, countVisibleItems(fDialog.fViewer));
+
+        fDialog.fViewer.setSelection(new StructuredSelection(c));
+        fDialog.fContentProvider.recompute();
+        runEventQueue(200);
+        assertEquals(5, countVisibleItems(fDialog.fViewer));
+        runEventQueue(200);
+        assertEquals(6, countVisibleItems(fDialog.fViewer));
+        assertEquals(1, fDialog.fViewer.getTree().getSelectionCount());
+        assertEquals("c", fDialog.fViewer.getTree().getSelection()[0].getText());
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/viewsupport/ViewSupportTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/viewsupport/ViewSupportTestSuite.java
new file mode 100644
index 0000000..50e01cc
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/viewsupport/ViewSupportTestSuite.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
+ * 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
+ *
+ * Contributors:
+ *    Markus Schorn - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.ui.tests.viewsupport;
+
+import junit.framework.TestSuite;
+
+public class ViewSupportTestSuite extends TestSuite {
+
+    public static TestSuite suite() {
+        return new ViewSupportTestSuite();
+    }
+    
+    public ViewSupportTestSuite() {
+        super(ViewSupportTestSuite.class.getName());
+        addTestSuite(AsyncViewerTest.class);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/wizards/settingswizards/ProjectSettingsWizardPageMock.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/wizards/settingswizards/ProjectSettingsWizardPageMock.java
new file mode 100644
index 0000000..ee8d70a
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/wizards/settingswizards/ProjectSettingsWizardPageMock.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.wizards.settingswizards;
+
+import java.util.List;
+
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+
+import org.eclipse.cdt.internal.ui.wizards.settingswizards.IProjectSettingsWizardPage;
+import org.eclipse.cdt.internal.ui.wizards.settingswizards.ISettingsProcessor;
+
+public class ProjectSettingsWizardPageMock implements IProjectSettingsWizardPage {
+
+	private String path;
+	private List<ISettingsProcessor> selectedSettingsProcessors;
+	private ICConfigurationDescription selectedConfiguration;
+	private List<ISettingsProcessor> settingsProcessors;
+	
+	public void setDestinationFilePath(String path) {
+		this.path = path;
+	}
+	
+	public String getDestinationFilePath() {
+		return path;
+	}
+	
+	public void setSelectedConfiguration(ICConfigurationDescription config) {
+		this.selectedConfiguration = config;
+	}
+
+	public ICConfigurationDescription getSelectedConfiguration() {
+		return selectedConfiguration;
+	}
+
+	public void setSelectedSettingsProcessors(List<ISettingsProcessor> processors) {
+		this.selectedSettingsProcessors = processors;
+	}
+	
+	public List<ISettingsProcessor> getSelectedSettingsProcessors() {
+		return selectedSettingsProcessors;
+	}
+
+	public void setSettingsProcessors(List<ISettingsProcessor> processors) {
+		this.settingsProcessors = processors;
+	}
+	
+	public List<ISettingsProcessor> getSettingsProcessors() {
+		return settingsProcessors;
+	}
+		
+	public void setDisplayedSettingsProcessors( List<ISettingsProcessor> processors) {
+		// do nothing
+	}
+
+	public void setMessage(String message, int flag) {
+		// do nothing
+	}
+
+	public void showErrorDialog(String dialogTitle, String message) {
+		// do nothing
+	}
+
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/wizards/settingswizards/SettingsImportExportTest.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/wizards/settingswizards/SettingsImportExportTest.java
new file mode 100644
index 0000000..f7487c6
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/wizards/settingswizards/SettingsImportExportTest.java
@@ -0,0 +1,285 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.wizards.settingswizards;
+
+import java.io.FileWriter;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.dialogs.IMessageProvider;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.settings.model.CIncludePathEntry;
+import org.eclipse.cdt.core.settings.model.CMacroEntry;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICFolderDescription;
+import org.eclipse.cdt.core.settings.model.ICLanguageSetting;
+import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICSettingEntry;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.ui.tests.BaseUITestCase;
+
+import org.eclipse.cdt.internal.ui.wizards.settingswizards.ISettingsProcessor;
+import org.eclipse.cdt.internal.ui.wizards.settingswizards.IncludePathsSettingsProcessor;
+import org.eclipse.cdt.internal.ui.wizards.settingswizards.MacroSettingsProcessor;
+import org.eclipse.cdt.internal.ui.wizards.settingswizards.ProjectSettingsExportStrategy;
+import org.eclipse.cdt.internal.ui.wizards.settingswizards.ProjectSettingsImportStrategy;
+
+public class SettingsImportExportTest extends BaseUITestCase {
+
+	private static ICLanguageSettingEntry[] EXPORTED_MACROS = new ICLanguageSettingEntry[] {
+		new CMacroEntry("MAC1", "value1", 0),
+		new CMacroEntry("anothermacro", "", 0),
+		new CMacroEntry("smac", "blah", 0)
+	};
+		
+	private static ICLanguageSettingEntry[] EXPORTED_INCLUDES = new ICLanguageSettingEntry[] {
+		new CIncludePathEntry("/path/to/somewhere", 0),
+		new CIncludePathEntry("/blah/blah/blah", 0),
+		new CIncludePathEntry("pantera/is/awesome", 0)
+	};
+		
+		
+
+	public SettingsImportExportTest() {}
+	
+	public SettingsImportExportTest(String name) {
+		super(name);
+	}
+	
+
+
+	// This could be replaced with an extension point
+	private static final List<ISettingsProcessor> processors = Arrays.<ISettingsProcessor>asList(
+		new IncludePathsSettingsProcessor(),
+		new MacroSettingsProcessor()
+	);
+	
+	
+	private static void createFile(String contents, String filePath) throws Exception {
+		IPath path = new Path(filePath);
+		FileWriter writer = new FileWriter(path.toFile());
+		writer.write(contents);
+		writer.close();
+	}
+	
+	private static void deleteFile(String filePath) {
+		new Path(filePath).toFile().delete();
+	}
+	
+	private static String getFilePath(String fileName) {
+		IPath workspaceLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation();
+		return workspaceLocation.toOSString() + Path.SEPARATOR + fileName;
+	}
+	
+	
+	private void setUpProjectSettings(ICProject cProject) throws Exception {
+		IProject project = cProject.getProject();
+		ICProjectDescription desc = CoreModel.getDefault().getProjectDescription(project, true);
+		ICConfigurationDescription config = desc.getActiveConfiguration();
+		ICFolderDescription folder = config.getRootFolderDescription();
+		ICLanguageSetting[] languageSettings = folder.getLanguageSettings();
+		ICLanguageSetting languageSetting = languageSettings[0];
+		languageSetting.setSettingEntries(ICSettingEntry.MACRO, Arrays.asList(EXPORTED_MACROS));
+		languageSetting.setSettingEntries(ICSettingEntry.INCLUDE_PATH, EXPORTED_INCLUDES);
+		CoreModel.getDefault().setProjectDescription(project, desc);
+	}
+	
+	
+	public void testNormalExportImport() throws Exception {
+		ICProject exportProject = CProjectHelper.createCCProject("TempProject1", "unused");
+		ICProject importProject = CProjectHelper.createCCProject("TempProject2", "unused");
+		setUpProjectSettings(exportProject);
+		
+		ProjectSettingsWizardPageMock page = new ProjectSettingsWizardPageMock() {
+			@Override public void setMessage(String message, int flag) {
+				if(flag == IMessageProvider.ERROR)
+					fail("there should be no error message displayed");
+			}
+			@Override public void showErrorDialog(String dialogTitle, String message) {
+				fail("the error dialog should not be displayed"); 
+			}
+		};
+		
+		page.setDestinationFilePath(getFilePath("settings.xml"));
+		page.setSettingsProcessors(processors);
+		page.setSelectedSettingsProcessors(processors);
+		ICProjectDescription desc = CoreModel.getDefault().getProjectDescription(exportProject.getProject(), false);
+		ICConfigurationDescription config = desc.getActiveConfiguration();
+		page.setSelectedConfiguration(config);
+		
+		ProjectSettingsExportStrategy exporter = new ProjectSettingsExportStrategy();
+		exporter.finish(page);
+
+		
+		// now import into another project
+		
+		desc = CoreModel.getDefault().getProjectDescription(importProject.getProject(), true);
+		config = desc.getActiveConfiguration();
+		page.setSelectedConfiguration(config);
+		
+		ProjectSettingsImportStrategy importer = new ProjectSettingsImportStrategy();
+		importer.finish(page);
+
+		desc = CoreModel.getDefault().getProjectDescription(importProject.getProject(), true);
+		config = desc.getActiveConfiguration();
+		ICFolderDescription folder = config.getRootFolderDescription();
+		ICLanguageSetting languageSetting = folder.getLanguageSettings()[0];
+		
+		ICLanguageSettingEntry[] importedMacros = languageSetting.getSettingEntries(ICSettingEntry.MACRO);
+		
+		assertEquals(EXPORTED_MACROS.length, importedMacros.length);
+		for(int i = 0; i < importedMacros.length; i++) {
+			assertEquals(EXPORTED_MACROS[i].getName(), importedMacros[i].getName());
+			assertEquals(EXPORTED_MACROS[i].getValue(), importedMacros[i].getValue());
+		}
+
+		ICLanguageSettingEntry[] importedIncludes = languageSetting.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+		
+		assertEquals(EXPORTED_INCLUDES.length, importedIncludes.length);
+		for(int i = 0; i < importedIncludes.length; i++) {
+			assertTrue(importedIncludes[i].getName().endsWith(EXPORTED_INCLUDES[i].getName()));
+		}
+		
+		CProjectHelper.delete(importProject);
+		CProjectHelper.delete(exportProject);
+	}
+	
+	
+	public static void vaidateCorrectErrorHandling(String xmlContent) throws Exception {
+		String filePath = getFilePath("test.txt");
+		createFile(xmlContent, filePath);
+		
+		ICProject project = CProjectHelper.createCCProject("VaidateProject", "unused");
+		
+		ICProjectDescription desc = CoreModel.getDefault().getProjectDescription(project.getProject(), false);
+		ICConfigurationDescription config = desc.getActiveConfiguration();
+		
+		final boolean[] errorDialogShown = new boolean[] {false};
+		ProjectSettingsWizardPageMock page = new ProjectSettingsWizardPageMock() {
+			@Override public void setMessage(String message, int flag) {
+				fail();
+			}
+			@Override public void showErrorDialog(String dialogTitle, String message) {
+				errorDialogShown[0] = true;
+			}
+		};
+		page.setDestinationFilePath(filePath);
+		page.setSettingsProcessors(processors);
+		page.setSelectedSettingsProcessors(processors);
+		page.setSelectedConfiguration(config);
+		
+		
+		ProjectSettingsImportStrategy importer = new ProjectSettingsImportStrategy();
+		importer.finish(page);
+		
+		assertTrue(xmlContent, errorDialogShown[0]);
+		
+		assertNoSettingsImported(project.getProject());
+		
+		// TODO test that no macros or includes were imported
+		CProjectHelper.delete(project);
+		deleteFile(filePath);
+	}
+	
+	private static void assertNoSettingsImported(IProject project) {
+		ICProjectDescription desc = CoreModel.getDefault().getProjectDescription(project, true);
+		ICConfigurationDescription config = desc.getActiveConfiguration();
+		ICFolderDescription folder = config.getRootFolderDescription();
+		ICLanguageSetting[] languageSettings = folder.getLanguageSettings();
+		for(ICLanguageSetting languageSetting : languageSettings) {
+			ICLanguageSettingEntry[] entries = languageSetting.getSettingEntries(ICSettingEntry.MACRO);
+			for(ICLanguageSettingEntry entry : entries) {
+				assertTrue(entry.isBuiltIn());
+			}
+			entries = languageSetting.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
+			for(ICLanguageSettingEntry entry : entries) {
+				assertTrue(entry.isBuiltIn());
+			}
+		}
+	}
+	
+	// {badXML1}
+	// blah blah blah
+	//
+	// {badXML2}
+	// <cdtprojectproperties></cdtprojectproperties>
+	//
+	// {badXML3}
+	// <cdtprojectproperties>
+	// <section name="invalidsectionname">
+	// </section>
+	// </cdtprojectproperties>
+	//
+	// {badXML4}
+	// <cdtprojectproperties>
+	// <section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.Macros">
+	// <invalidtag>
+	// </invalidtag>
+	// </section>
+	// </cdtprojectproperties>
+	// 
+	// {badXML5}
+	// <cdtprojectproperties>
+	// <section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.Macros">
+	// <macro>
+	// <name>aaaa</name><value></value>
+	// </macro>
+	// </section>
+	// </cdtprojectproperties>
+	// 
+	// {badXML6}
+	// <cdtprojectproperties>
+	// <section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.Macros">
+	// <language name="GNU C++">
+	// <macro>
+	// <name>aaaa</name>
+	// </macro>
+	// </language>
+	// </section>
+	// </cdtprojectproperties>
+	//
+	// {badXML7}
+	// <cdtprojectproperties>
+	// <section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.Macros">
+	// <language name="GNU C++">
+	// <macro>
+	// <name>aaaa</name><value></value><value></value>
+	// </macro>
+	// </language>
+	// </section>
+	// </cdtprojectproperties>
+	//
+	// {badXML8}
+	// <cdtprojectproperties>
+	// <section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.IncludePaths">
+	// <language name="GNU C++">
+	// <includepath>C:\WINDOWS</includepath><invalid></invalid>
+	// </language>
+	// </section>
+	// </cdtprojectproperties>
+	public void testNotValid() throws Exception {
+		vaidateCorrectErrorHandling(readTaggedComment("badXML1"));
+		vaidateCorrectErrorHandling(readTaggedComment("badXML2"));
+		vaidateCorrectErrorHandling(readTaggedComment("badXML3"));
+		vaidateCorrectErrorHandling(readTaggedComment("badXML4"));
+		vaidateCorrectErrorHandling(readTaggedComment("badXML5")); // missing <language> tag
+		vaidateCorrectErrorHandling(readTaggedComment("badXML6")); // missing <value> tag
+		vaidateCorrectErrorHandling(readTaggedComment("badXML7")); // extra <value> tag
+		vaidateCorrectErrorHandling(readTaggedComment("badXML8"));
+	}
+}
diff --git a/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/wizards/settingswizards/SettingsWizardTestSuite.java b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/wizards/settingswizards/SettingsWizardTestSuite.java
new file mode 100644
index 0000000..29d30a3
--- /dev/null
+++ b/results/plugins/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/wizards/settingswizards/SettingsWizardTestSuite.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.ui.tests.wizards.settingswizards;
+
+import junit.framework.TestSuite;
+
+public class SettingsWizardTestSuite extends TestSuite {
+
+    public static TestSuite suite() {
+        return new SettingsWizardTestSuite();
+    }
+    
+    public SettingsWizardTestSuite() {
+        super(SettingsWizardTestSuite.class.getName());
+        addTestSuite(SettingsImportExportTest.class);
+    }
+}
diff --git a/results/plugins/org.eclipse.cdt.core.aix/.classpath b/results/plugins/org.eclipse.test/.classpath
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.aix/.classpath
copy to results/plugins/org.eclipse.test/.classpath
diff --git a/results/plugins/org.eclipse.cdt.core.aix/.cvsignore b/results/plugins/org.eclipse.test/.cvsignore
similarity index 100%
copy from results/plugins/org.eclipse.cdt.core.aix/.cvsignore
copy to results/plugins/org.eclipse.test/.cvsignore
diff --git a/results/plugins/org.eclipse.test/.project b/results/plugins/org.eclipse.test/.project
new file mode 100644
index 0000000..797ea5e
--- /dev/null
+++ b/results/plugins/org.eclipse.test/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.test</name>
+	<comment></comment>
+	<projects>
+		<project>org.apache.ant</project>
+		<project>org.eclipse.ant.core</project>
+		<project>org.eclipse.core.boot</project>
+		<project>org.eclipse.core.resources</project>
+		<project>org.eclipse.core.runtime</project>
+		<project>org.eclipse.help</project>
+		<project>org.eclipse.jface</project>
+		<project>org.eclipse.jface.text</project>
+		<project>org.eclipse.swt</project>
+		<project>org.eclipse.ui.workbench</project>
+		<project>org.eclipse.update.core</project>
+		<project>org.junit</project>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/results/plugins/org.eclipse.test/.settings/org.eclipse.jdt.core.prefs b/results/plugins/org.eclipse.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..2ebfaaa
--- /dev/null
+++ b/results/plugins/org.eclipse.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Thu Jan 14 19:34:09 CET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/JUNIT.XSL b/results/plugins/org.eclipse.test/JUNIT.XSL
similarity index 100%
copy from JUNIT.XSL
copy to results/plugins/org.eclipse.test/JUNIT.XSL
diff --git a/results/plugins/org.eclipse.test/META-INF/MANIFEST.MF b/results/plugins/org.eclipse.test/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..a2aabad
--- /dev/null
+++ b/results/plugins/org.eclipse.test/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.test; singleton:=true
+Bundle-Version: 3.3.0
+Bundle-ClassPath: automated.jar
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.apache.ant,
+ org.junit,
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.ui.ide.application,
+ org.eclipse.equinox.app
+Eclipse-LazyStart: true
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/results/plugins/org.eclipse.test/about.html b/results/plugins/org.eclipse.test/about.html
new file mode 100644
index 0000000..4602330
--- /dev/null
+++ b/results/plugins/org.eclipse.test/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>June 2, 2006</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.test/build.properties b/results/plugins/org.eclipse.test/build.properties
new file mode 100644
index 0000000..b089b2e
--- /dev/null
+++ b/results/plugins/org.eclipse.test/build.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# Copyright (c) 2000, 2007 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+source.automated.jar =src/
+bin.includes = plugin.properties,\
+               *.jar,\
+               *.XSL,\
+               library.xml,\
+               plugin.xml,\
+               doc/,\
+               runtests*,\
+               test.xml,\
+               *.html,\
+               META-INF/
diff --git a/results/plugins/org.eclipse.test/easymock.psf b/results/plugins/org.eclipse.test/easymock.psf
new file mode 100644
index 0000000..e3005d5
--- /dev/null
+++ b/results/plugins/org.eclipse.test/easymock.psf
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<psf version="2.0">
+<provider id="org.eclipse.team.cvs.core.cvsnature">
+<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.easymock,org.easymock,v2_4"/>
+</provider>
+</psf>
\ No newline at end of file
diff --git a/results/plugins/org.eclipse.test/library.xml b/results/plugins/org.eclipse.test/library.xml
new file mode 100644
index 0000000..2715f27
--- /dev/null
+++ b/results/plugins/org.eclipse.test/library.xml
@@ -0,0 +1,169 @@
+<?xml version="1.0"?>
+<project name="Library" default="usage" basedir=".">
+
+	<target name="usage">
+		<echo message="Please refer to the testframework.html in org.eclipse.test for instructions on usage." />
+	</target>
+
+	<target name="init">
+		<!-- 
+			Parameters:
+				(Mandatory)
+				data-dir		- the directory for Eclipse to write its data
+				plugin-name		- the name of the plugin to test
+				classname		- the name of the test class
+				
+				(Optional - overrides defaults set in script)
+				vmargs			- a string containing arguments to pass to the VM.
+				extraVMargs		- allows separate setting of VM args from separate caller.
+				timeout			- overrides default test timeout value (in milliseconds).
+				test-output		- overrides default output file produced from test run.
+				plugin-path		- path to root of plug-in
+				useEclipseExe	- property setting forces test to launch via eclipse executable.
+				junit-report-output - output directory for junit reports produced for specified classname.
+		-->
+		
+	  	<tstamp>
+	        <format property="TIMENOW" pattern="HHmmssSSSS"/>
+	    </tstamp>
+		<!--property setting useEclipseExe launches tests using the eclipse executable-->
+		<condition property="launchTarget" value="eclipse-test">
+			<isset property="useEclipseExe" />
+		</condition>
+		<!--default launch target for launching tests-->
+		<property name="launchTarget" value="java-test" />
+		<property name="formatter" value="org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter"/>
+	    
+		<!--default heap sizes when running performance tests-->
+	    <condition property="vmargs" value=" -Xms256M -Xmx512M">
+			<equals arg1="${test.target}" arg2="performance" />
+	    </condition>
+		<property name="extraVMargs" value=""/>
+		<property name="plugin-path" value="" />
+		<property name="timeout" value="7200000" />
+		<property name="test-output" value="${eclipse-home}/${classname}.xml" />
+		<property name="junit-report-output" value="${eclipse-home}/results" />
+		<mkdir dir="${junit-report-output}"/>
+	</target>
+	
+	<target name="core-test" description="Eclipse application used to launch HEADLESS plugin tests." depends="init">
+		<antcall target="${launchTarget}">
+			<param name="application" value="org.eclipse.test.coretestapplication"/>
+		</antcall>
+	</target>
+	
+	<target name="ui-test" description="Eclipse application used to launch UI plugin tests." depends="init">
+		<antcall target="${launchTarget}">
+			<param name="application" value="org.eclipse.test.uitestapplication"/>
+		</antcall>
+	</target>
+
+	<target name="java-test">
+		<!--default vm args-->
+		<property name="vmargs" value=" -Xms40m -Xmx348m"/>
+	  	
+	  	<!--set default jvm to use for testing-->
+	   	<property name="jvm" value="${java.home}/bin/java" />  	
+	
+		<echo message="Running ${classname}. Result file: ${junit-report-output}/${classname}.xml."/>
+		
+		<java fork="true" dir="." timeout="${timeout}" jvm="${jvm}" logError="true"
+			classname="org.eclipse.core.launcher.Main" output="${junit-report-output}/${classname}.txt">
+	        <classpath>
+	    		<fileset dir="${eclipse-home}/plugins">
+	            	<include name="org.eclipse.equinox.launcher_*.jar"/>
+	          	</fileset>
+	        </classpath>
+		    <arg line="-application ${application}"/>
+		    <arg line="-data ${data-dir}"/>
+		    <arg line="formatter=${formatter},${test-output}"/>
+		    <arg line="-testPluginName ${plugin-name}"/>
+		    <arg line="-className ${classname}"/>
+		    <arg line="-os ${os}"/>
+		    <arg line="-ws ${ws}"/>
+		    <arg line="-arch ${arch}"/>
+		    <arg line="-consolelog"/>
+		    <jvmarg line="${vmargs} ${extraVMargs}"/>
+		    <sysproperty key="PLUGIN_PATH" value="${plugin-path}"/> 
+		</java>
+		<antcall target="collect-results" />
+	</target>
+	
+	<target name="eclipse-test" description="Runs the specified classname as a plug-in test.">		
+		<property name="vmargs" value="-Xms256m -Xmx512m"/>
+		
+		<!--use -consolelog if launching a headless test-->
+		<condition property="consolelog" value="-consolelog">
+			<equals arg1="${application}" arg2="org.eclipse.test.coretestapplication"/>
+		</condition>
+		<property name="consolelog" value="" />
+
+		<!--
+			vm selection priority:
+			1.  user-specified java executable via outer Ant property setting of "jvm".
+			2.  java executable on path.
+		-->
+		<condition property="test-vm" value="-vm ${jvm}">
+			<isset property="jvm" />
+		</condition>
+		<property name="test-vm" value="" />
+		
+		<!--ensure executable has execute permission-->
+		<chmod file="${eclipse-home}/eclipse" perm="ugo+rx"/>
+		
+		
+		<echo message="Running ${classname}. Result file: ${junit-report-output}/${classname}.xml."/>
+
+		<exec executable="${eclipse-home}/eclipse" dir="${eclipse-home}" timeout="${timeout}" logError="true" failonerror="false" output="${junit-report-output}/${classname}.txt">
+			<arg line="-data ${data-dir}"/>
+			<arg line="${test-vm}"/>
+			<arg line="-application ${application}"/>
+			<arg line="formatter=${formatter},${test-output}"/>
+			<arg line="-testPluginName ${plugin-name}"/>
+			<arg line="-className ${classname}"/>
+			<arg line="-nosplash"/>
+			<arg line="--launcher.suppressErrors"/>
+			<arg line="${consolelog}"/>
+			<arg line="-vmargs ${vmargs} ${extraVMargs} -DPLUGIN_PATH=${plugin-path}"/>
+		</exec>
+		<antcall target="collect-results" />
+	</target>
+	
+	<target name="collect-results">
+		<dirname property="output-dir" file="${test-output}"/>
+		<basename property="output-file-name" file="${test-output}"/>
+		<junitreport todir="${junit-report-output}" tofile="${classname}.xml">
+			<fileset dir="${output-dir}">
+				<include name="${output-file-name}"/>
+			</fileset>
+		</junitreport>
+
+		<xslt style="${eclipse-home}/dropins/eclipse/plugins/org.eclipse.test/JUNIT.XSL"
+			basedir="${junit-report-output}"
+			includes="${classname}.result.xml"
+			destdir="${junit-report-output}" />
+
+		<!--save .log content and *.log content from configuration directory-->
+		<concat destfile="${junit-report-output}/${classname}.log">
+			<fileset dir="${eclipse-home}" includes="${data-dir}/.metadata/*.log"/>
+			<fileset dir="${eclipse-home}" includes="configuration/*.log"/>
+		</concat>
+	</target>
+
+	<target name="collect">
+		<!--
+			This target can be used to aggragate test runs from multiple test suites into a single report.
+		
+			Parameters to this target:
+			includes		- the names of the files to include
+			output-file		- the name of the output file to produce
+		-->
+		<junitreport todir="." tofile="${output-file}">
+			<fileset dir=".">
+				<include name="${includes}"/>
+			</fileset>
+		</junitreport>
+	</target>
+
+</project>
+
diff --git a/results/plugins/org.eclipse.test/plugin.properties b/results/plugins/org.eclipse.test/plugin.properties
new file mode 100644
index 0000000..16a13b9
--- /dev/null
+++ b/results/plugins/org.eclipse.test/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2000, 2005 IBM Corporation and others.
+# 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
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+pluginName = Eclipse Automated Testing
+providerName = Eclipse.org
diff --git a/results/plugins/org.eclipse.test/plugin.xml b/results/plugins/org.eclipse.test/plugin.xml
new file mode 100644
index 0000000..4a14819
--- /dev/null
+++ b/results/plugins/org.eclipse.test/plugin.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+     <extension
+         id="coretestapplication"
+         point="org.eclipse.core.runtime.applications">
+      <application>
+         <run
+               class="org.eclipse.test.CoreTestApplication">
+         </run>
+      </application>
+   </extension>
+   <extension
+         id="uitestapplication"
+         point="org.eclipse.core.runtime.applications">
+      <application>
+         <run
+               class="org.eclipse.test.UITestApplication">
+            <parameter
+                  name="productInfo"
+                  value="product.ini">
+            </parameter>
+         </run>
+      </application>
+   </extension>
+
+</plugin>
diff --git a/results/plugins/org.eclipse.test/src/org/eclipse/test/CoreTestApplication.java b/results/plugins/org.eclipse.test/src/org/eclipse/test/CoreTestApplication.java
new file mode 100644
index 0000000..2689ca1
--- /dev/null
+++ b/results/plugins/org.eclipse.test/src/org/eclipse/test/CoreTestApplication.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.test;
+
+import java.io.IOException;
+import org.eclipse.core.runtime.IPlatformRunnable;
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * A an application that launches tests once it is started.
+ */
+public class CoreTestApplication implements IPlatformRunnable {
+	/** true if workspace tests should log their deltas */
+	private static boolean deltas= false;
+	
+	/**
+	 * Runs a set of tests as defined by the given command line args.
+	 * This is the platform application entry point.
+	 * @see IPlatformRunnable
+	 */
+	public Object run(Object arguments) throws Exception {
+		String[] args= Platform.getCommandLineArgs();//getCommand//processCommandLine((String[]) arguments);
+		return new Integer(runTests(args));
+	}
+
+	protected int runTests(String[] args) throws IOException {
+		return EclipseTestRunner.run(args);
+	}
+
+	public static boolean deltasEnabled() {
+		return deltas;
+	}
+		
+	protected String[] processCommandLine(String[] args) {
+		int[] configArgs = new int[100];
+		configArgs[0] = -1; // need to initialize the first element to something that could not be an index.
+		int configArgIndex = 0;
+		for (int i = 0; i < args.length; i++) {
+			boolean found = false;
+			// check for args without parameters (i.e., a flag arg)
+			// see if we should be logging deltas
+			if (args[i].equalsIgnoreCase("-deltas")) {
+				found = true;
+				deltas = true;
+			}
+			if (found) {
+				configArgs[configArgIndex++] = i;
+				continue;
+			}
+	
+			// check for args with parameters
+			if (i == args.length - 1 || args[i + 1].startsWith("-")) {
+				continue;
+			}
+			++i;
+
+			// done checking for args.  Remember where an arg was found 
+			if (found) {
+				configArgs[configArgIndex++] = i - 1;
+				configArgs[configArgIndex++] = i;
+			}
+		}
+	
+		//remove all the arguments consumed by this argument parsing
+		if (configArgIndex == 0)
+			return args;
+		String[] passThruArgs = new String[args.length - configArgIndex];
+		configArgIndex = 0;
+		int j = 0;
+		for (int i = 0; i < args.length; i++) {
+			if (i == configArgs[configArgIndex])
+				configArgIndex++;
+			else
+				passThruArgs[j++] = args[i];
+		}
+		return passThruArgs;
+	}
+}
diff --git a/results/plugins/org.eclipse.test/src/org/eclipse/test/EclipseTestRunner.java b/results/plugins/org.eclipse.test/src/org/eclipse/test/EclipseTestRunner.java
new file mode 100644
index 0000000..140de05
--- /dev/null
+++ b/results/plugins/org.eclipse.test/src/org/eclipse/test/EclipseTestRunner.java
@@ -0,0 +1,538 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.test;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Properties;
+import java.util.Vector;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+import junit.framework.TestListener;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter;
+import org.apache.tools.ant.taskdefs.optional.junit.JUnitTest;
+
+import org.eclipse.core.runtime.Platform;
+
+import org.eclipse.osgi.util.ManifestElement;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+
+/**
+ * A TestRunner for JUnit that supports Ant JUnitResultFormatters
+ * and running tests inside Eclipse.
+ * Example call: EclipseTestRunner -classname junit.samples.SimpleTest formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter
+ */
+public class EclipseTestRunner implements TestListener {
+	class TestFailedException extends Exception {
+
+		private static final long serialVersionUID = 6009335074727417445L;
+
+		TestFailedException(String message) {
+			super(message);
+		}
+    
+		TestFailedException(Throwable e) {
+		    super(e);
+		}
+	} 
+	/**
+     * No problems with this test.
+     */
+    public static final int SUCCESS= 0;
+    /**
+     * Some tests failed.
+     */
+    public static final int FAILURES= 1;
+    /**
+     * An error occured.
+     */
+    public static final int ERRORS= 2;
+    
+    private static final String SUITE_METHODNAME= "suite";	
+	/**
+	 * The current test result
+	 */
+	private TestResult fTestResult;
+	/**
+	 * The name of the plugin containing the test
+	 */
+	private String fTestPluginName;
+	/**
+     * The corresponding testsuite.
+     */
+    private Test fSuite;
+    /**
+     * Formatters from the command line.
+     */
+	private static Vector fgFromCmdLine= new Vector();
+	/**
+     * Holds the registered formatters.
+     */
+    private Vector formatters= new Vector();
+    /**
+     * Do we stop on errors.
+     */
+    private boolean fHaltOnError= false;
+    /**
+     * Do we stop on test failures.
+     */
+    private boolean fHaltOnFailure= false;
+    /**
+     * The TestSuite we are currently running.
+     */
+    private JUnitTest fJunitTest;
+    /** 
+     * output written during the test 
+     */
+    private PrintStream fSystemError;
+    /** 
+     * Error output during the test 
+     */
+    private PrintStream fSystemOut;   
+    /**
+     * Exception caught in constructor.
+     */
+    private Exception fException;
+    /**
+     * Returncode
+     */
+    private int fRetCode= SUCCESS;	
+    
+	/** 
+	 * The main entry point (the parameters are not yet consistent with
+	 * the Ant JUnitTestRunner, but eventually they should be).
+	 * Parameters<pre>
+	 * -className: the name of the testSuite
+	 * -testPluginName: the name of the containing plugin
+     * haltOnError: halt test on errors?
+     * haltOnFailure: halt test on failures?
+     * -testlistener listenerClass: deprecated
+     * 		print a warning that this option is deprecated
+     * formatter: a JUnitResultFormatter given as classname,filename. 
+     *  	If filename is ommitted, System.out is assumed.
+     * </pre>
+     */
+	public static void main(String[] args) throws IOException {
+		System.exit(run(args));
+	}
+	public static int run(String[] args) throws IOException {
+		String className= null;
+		String testPluginName= null;
+		
+        boolean haltError = false;
+        boolean haltFail = false;
+        
+        Properties props = new Properties();
+		
+		int startArgs= 0;
+		if (args.length > 0) {
+			// support the JUnit task commandline syntax where
+			// the first argument is the name of the test class
+			if (!args[0].startsWith("-")) {
+				className= args[0];
+				startArgs++;
+			}
+		} 
+		for (int i= startArgs; i < args.length; i++) {
+			if (args[i].toLowerCase().equals("-classname")) {
+				if (i < args.length-1)
+					className= args[i+1]; 
+				i++;	
+			} else if (args[i].toLowerCase().equals("-testpluginname")) {
+				if (i < args.length-1)
+					testPluginName= args[i+1]; 
+				i++;	
+			} else if (args[i].startsWith("haltOnError=")) {
+                haltError= Project.toBoolean(args[i].substring(12));
+            } else if (args[i].startsWith("haltOnFailure=")) {
+                haltFail = Project.toBoolean(args[i].substring(14));
+            } else if (args[i].startsWith("formatter=")) {
+                try {
+                    createAndStoreFormatter(args[i].substring(10));
+                } catch (BuildException be) {
+                    System.err.println(be.getMessage());
+                    return ERRORS;
+                }
+            } else if (args[i].startsWith("propsfile=")) {
+                FileInputStream in = new FileInputStream(args[i].substring(10));
+                props.load(in);
+                in.close();
+            } else if (args[i].equals("-testlistener")) {
+            	System.err.println("The -testlistener option is no longer supported\nuse the formatter= option instead");
+            	return ERRORS;
+			}
+        }
+			
+		if (className == null)
+			throw new IllegalArgumentException("Test class name not specified");
+		
+        JUnitTest t= new JUnitTest(className);
+
+        // Add/overlay system properties on the properties from the Ant project
+        Hashtable p= System.getProperties();
+        for (Enumeration _enum = p.keys(); _enum.hasMoreElements(); ) {
+            Object key = _enum.nextElement();
+            props.put(key, p.get(key));
+        }
+        t.setProperties(props);
+	
+	    EclipseTestRunner runner= new EclipseTestRunner(t, testPluginName, haltError, haltFail);
+        transferFormatters(runner);
+        runner.run();
+        return runner.getRetCode();
+	}
+
+    /**
+     *   
+     */
+    public EclipseTestRunner(JUnitTest test, String testPluginName, boolean haltOnError, boolean haltOnFailure) {
+        fJunitTest= test;
+        fTestPluginName= testPluginName;
+        fHaltOnError= haltOnError;
+        fHaltOnFailure= haltOnFailure;
+        
+        try {
+            fSuite= getTest(test.getName());
+        } catch(Exception e) {
+            fRetCode = ERRORS;
+            fException = e;
+        }
+    }
+	
+	/**
+	 * Returns the Test corresponding to the given suite. 
+	 */
+	protected Test getTest(String suiteClassName) throws TestFailedException {
+		if (suiteClassName.length() <= 0) {
+			clearStatus();
+			return null;
+		}
+		Class testClass= null;
+		try {
+			testClass= loadSuiteClass(suiteClassName);
+		} catch (ClassNotFoundException e) {
+		    if (e.getCause() != null) {
+		        runFailed(e.getCause());
+		    }
+			String clazz= e.getMessage();
+			if (clazz == null) 
+				clazz= suiteClassName;
+			runFailed("Class not found \""+clazz+"\"");
+			return null;
+		} catch(Exception e) {
+		    runFailed(e);
+			return null;
+		}
+		Method suiteMethod= null;
+		try {
+			suiteMethod= testClass.getMethod(SUITE_METHODNAME, new Class[0]);
+	 	} catch(Exception e) {
+	 		// try to extract a test suite automatically
+			clearStatus();			
+			
+            Class jUnit4TestAdapterClass= null;
+            try {
+                jUnit4TestAdapterClass= loadSuiteClass("junit.framework.JUnit4TestAdapter");
+            } catch (ClassNotFoundException e1) {
+                // JUnit4 is not available
+            } catch (UnsupportedClassVersionError e1) {
+            	// running with a VM < 1.5
+            }
+            if (jUnit4TestAdapterClass != null) {
+				try {
+					Constructor jUnit4TestAdapterCtor= jUnit4TestAdapterClass.getConstructor(new Class[] { Class.class });
+					return (Test) jUnit4TestAdapterCtor.newInstance(new Object[] { testClass });
+				} catch (Exception e1) {
+					runFailed(new InvocationTargetException(e1, "Failed to create a JUnit4TestAdapter for \"" + suiteClassName + "\":"));
+					return null;
+				}
+            } else { // the JUnit 3 way
+            	return new TestSuite(testClass);
+            }
+		}
+	 	if (!Modifier.isStatic(suiteMethod.getModifiers())) {
+	 		runFailed("suite() method must be static");
+	 		return null;
+	 	}
+		Test test= null;
+		try {
+			test= (Test)suiteMethod.invoke(null, new Class[0]); // static method
+			if (test == null)
+				return test;
+		} 
+		catch (InvocationTargetException e) {
+			runFailed("Failed to invoke suite():" + e.getTargetException().toString());
+			return null;
+		}
+		catch (IllegalAccessException e) {
+			runFailed("Failed to invoke suite():" + e.toString());
+			return null;
+		}
+		clearStatus();
+		return test;
+	}
+
+	protected void runFailed(String message) throws TestFailedException {
+		System.err.println(message);
+		throw new TestFailedException(message);
+	}
+
+    protected void runFailed(Throwable e) throws TestFailedException {
+      e.printStackTrace();
+      throw new TestFailedException(e);
+    }
+
+	protected void clearStatus() {
+	}
+
+	/**
+	 * Loads the class either with the system class loader or a
+	 * plugin class loader if a plugin name was specified
+	 */
+	protected Class loadSuiteClass(String suiteClassName) throws ClassNotFoundException {
+		if (fTestPluginName == null)
+			return Class.forName(suiteClassName);
+        Bundle bundle = Platform.getBundle(fTestPluginName);
+        if (bundle == null) {
+            throw new ClassNotFoundException(suiteClassName, new Exception("Could not find plugin \""
+                    + fTestPluginName + "\""));
+        }
+        
+        //is the plugin a fragment?
+		Dictionary headers = bundle.getHeaders();
+		String hostHeader = (String) headers.get(Constants.FRAGMENT_HOST);
+		if (hostHeader != null) {
+			// we are a fragment for sure
+			// we need to find which is our host
+			ManifestElement[] hostElement = null;
+			try {
+				hostElement = ManifestElement.parseHeader(Constants.FRAGMENT_HOST, hostHeader);
+			} catch (BundleException e) {
+				throw new RuntimeException("Could not find host for fragment:" + fTestPluginName,e);
+			}
+			Bundle host = Platform.getBundle(hostElement[0].getValue());
+			//we really want to get the host not the fragment
+			bundle = host;
+		} 
+
+        return bundle.loadClass(suiteClassName);
+	}
+	
+	public void run() {
+//		IPerformanceMonitor pm = PerfMsrCorePlugin.getPerformanceMonitor(true);
+		
+        fTestResult= new TestResult();
+        fTestResult.addListener(this);
+        for (int i= 0; i < formatters.size(); i++) {
+            fTestResult.addListener((TestListener)formatters.elementAt(i));
+        }
+
+        long start= System.currentTimeMillis();
+        fireStartTestSuite();
+        
+        if (fException != null) { // had an exception in the constructor
+            for (int i= 0; i < formatters.size(); i++) {
+                ((TestListener)formatters.elementAt(i)).addError(null, fException);
+            }
+            fJunitTest.setCounts(1, 0, 1);
+            fJunitTest.setRunTime(0);
+        } else {
+            ByteArrayOutputStream errStrm = new ByteArrayOutputStream();
+            fSystemError= new PrintStream(errStrm);
+            
+            ByteArrayOutputStream outStrm = new ByteArrayOutputStream();
+            fSystemOut= new PrintStream(outStrm);
+
+            try {
+//            	pm.snapshot(1); // before
+                fSuite.run(fTestResult);
+            } finally {
+ //           	pm.snapshot(2); // after  	
+                fSystemError.close();
+                fSystemError= null;
+                fSystemOut.close();
+                fSystemOut= null;
+                sendOutAndErr(new String(outStrm.toByteArray()), new String(errStrm.toByteArray()));
+                fJunitTest.setCounts(fTestResult.runCount(), fTestResult.failureCount(), fTestResult.errorCount());
+                fJunitTest.setRunTime(System.currentTimeMillis() - start);
+            }
+        }
+        fireEndTestSuite();
+
+        if (fRetCode != SUCCESS || fTestResult.errorCount() != 0) {
+            fRetCode = ERRORS;
+        } else if (fTestResult.failureCount() != 0) {
+            fRetCode = FAILURES;
+        }
+        
+//        pm.upload(getClass().getName());
+    }
+	
+    /**
+     * Returns what System.exit() would return in the standalone version.
+     *
+     * @return 2 if errors occurred, 1 if tests failed else 0.
+     */
+    public int getRetCode() {
+        return fRetCode;
+    }
+
+    /*
+     * @see TestListener.addFailure
+     */
+    public void startTest(Test t) {}
+
+    /*
+     * @see TestListener.addFailure
+     */
+    public void endTest(Test test) {}
+
+    /*
+     * @see TestListener.addFailure
+     */
+    public void addFailure(Test test, AssertionFailedError t) {
+        if (fHaltOnFailure) {
+            fTestResult.stop();
+        }
+    }
+
+    /*
+     * @see TestListener.addError
+     */
+    public void addError(Test test, Throwable t) {
+        if (fHaltOnError) {
+            fTestResult.stop();
+        }
+    }
+    
+	private void fireStartTestSuite() {
+		for (int i= 0; i < formatters.size(); i++) {
+            ((JUnitResultFormatter)formatters.elementAt(i)).startTestSuite(fJunitTest);
+        }
+    }
+
+    private void fireEndTestSuite() {
+        for (int i= 0; i < formatters.size(); i++) {
+            ((JUnitResultFormatter)formatters.elementAt(i)).endTestSuite(fJunitTest);
+        }
+    }
+
+    public void addFormatter(JUnitResultFormatter f) {
+        formatters.addElement(f);
+    }
+
+    /**
+     * Line format is: formatter=<classname>(,<pathname>)?
+     */
+    private static void createAndStoreFormatter(String line) throws BuildException {
+        String formatterClassName= null;
+        File formatterFile= null;
+        
+        int pos = line.indexOf(',');
+        if (pos == -1) {
+            formatterClassName= line;
+        } else {
+            formatterClassName= line.substring(0, pos);
+            formatterFile= new File(line.substring(pos + 1)); // the method is package visible
+        }
+        fgFromCmdLine.addElement(createFormatter(formatterClassName, formatterFile));
+    }
+
+    private static void transferFormatters(EclipseTestRunner runner) {
+        for (int i= 0; i < fgFromCmdLine.size(); i++) {
+            runner.addFormatter((JUnitResultFormatter)fgFromCmdLine.elementAt(i));
+        }
+    }
+
+	/*
+	 * DUPLICATED from FormatterElement, since it is package visible only
+	 */
+    private static JUnitResultFormatter createFormatter(String classname, File outfile) throws BuildException {
+    	OutputStream out= System.out;
+
+        if (classname == null) {
+            throw new BuildException("you must specify type or classname");
+        }
+        Class f = null;
+        try {
+            f= EclipseTestRunner.class.getClassLoader().loadClass(classname);
+        } catch (ClassNotFoundException e) {
+            throw new BuildException(e);
+        }
+
+        Object o = null;
+        try {
+            o = f.newInstance();
+        } catch (InstantiationException e) {
+            throw new BuildException(e);
+        } catch (IllegalAccessException e) {
+            throw new BuildException(e);
+        }
+
+        if (!(o instanceof JUnitResultFormatter)) {
+            throw new BuildException(classname+" is not a JUnitResultFormatter");
+        }
+
+        JUnitResultFormatter r = (JUnitResultFormatter) o;
+
+        if (outfile != null) {
+            try {
+                out = new FileOutputStream(outfile);
+            } catch (java.io.IOException e) {
+                throw new BuildException(e);
+            }
+        }
+        r.setOutput(out);
+        return r;
+    }
+
+    private void sendOutAndErr(String out, String err) {
+        for (int i=0; i<formatters.size(); i++) {
+            JUnitResultFormatter formatter = 
+                ((JUnitResultFormatter)formatters.elementAt(i));
+            
+            formatter.setSystemOutput(out);
+            formatter.setSystemError(err);
+        }
+    }
+    
+    protected void handleOutput(String line) {
+        if (fSystemOut != null) {
+            fSystemOut.println(line);
+        }
+    }
+    
+    protected void handleErrorOutput(String line) {
+        if (fSystemError != null) {
+            fSystemError.println(line);
+        }
+    }
+}	
diff --git a/results/plugins/org.eclipse.test/src/org/eclipse/test/RegressionTest.java b/results/plugins/org.eclipse.test/src/org/eclipse/test/RegressionTest.java
new file mode 100644
index 0000000..487db1c
--- /dev/null
+++ b/results/plugins/org.eclipse.test/src/org/eclipse/test/RegressionTest.java
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.test;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.StringTokenizer;
+import java.io.ByteArrayOutputStream;
+
+/**
+ * Check the output of several tests for regressions.
+ */
+public class RegressionTest {
+
+	PrintStream output;
+	String oldFilename, newFilename, outFilename;
+	public static final String NOTHING_CHANGED_MSG
+		= "All tests unchanged.";	
+	/**
+	 * Constructor for RegressionTest
+	 */
+	public RegressionTest(	String oldFilename,
+							String newFilename,
+							String outFilename) {
+		this.oldFilename = oldFilename;
+		this.newFilename = newFilename;
+		this.outFilename = outFilename;
+	}
+
+	public static void main(String[] argv) {
+		if (argv.length < 3) {
+			System.err.println("Error: too few arguments");
+			System.err.println("Usage: (progname) oldfile newfile outfile");
+		} else {
+			// ASSERT: The program has at least the correct number of arguments
+			RegressionTest rt = new RegressionTest(argv[0], argv[1], argv[2]);
+			rt.testRegressions();
+		}
+	}
+
+	/**
+	 * Test for regressions in the test suite.
+	 */
+	public void testRegressions() {
+		// Read the old and new files
+		String oldPass = "";
+		String newPass = "";
+		try {
+			oldPass = readFile(oldFilename);
+			newPass = readFile(newFilename);
+		} catch (Exception e) {
+			System.err.println("Error opening input file");
+			System.err.println(e.getMessage());
+			System.exit(-1);
+		}
+
+		try {
+			output = new PrintStream(
+						new BufferedOutputStream(
+							new FileOutputStream(
+								new File(outFilename))));
+		} catch (Exception e) {
+			System.err.println("Error opening output file");
+			System.err.println(e.getMessage());
+			System.exit(-1);
+		}
+		// Establish their relationship
+		StringTokenizer oldst = new StringTokenizer(oldPass);
+		StringTokenizer newst = new StringTokenizer(newPass);
+
+		String[] oldTest = nextTest(oldst);
+		String[] newTest = nextTest(newst);
+
+		boolean nothingChanged = true;
+		while (oldTest != null && newTest != null) {
+
+			// Compare the two test names
+			int compareName = oldTest[0].compareTo(newTest[0]);
+			if (compareName == 0) {
+				int compareStatus = oldTest[1].compareTo(newTest[1]);
+				if (compareStatus != 0) {
+					nothingChanged = false;
+					output.println(testChanged(newTest));
+				}
+				oldTest = nextTest(oldst);
+				newTest = nextTest(newst);
+			} else if (compareName < 0) {
+				// oldTestName comes first
+				output.println(testNotRun(oldTest));
+				oldTest = nextTest(oldst);
+				nothingChanged = false;
+			} else {
+				// newTestName comes first
+				output.println(testAdded(newTest));
+				newTest = nextTest(newst);
+				nothingChanged = false;
+			}
+		}
+		// Make sure all tests are parsed
+		while (oldTest != null) {
+			// oldTestName comes first
+			output.println(testNotRun(oldTest));
+			oldTest = nextTest(oldst);
+			nothingChanged = false;
+		}
+		while (newTest != null) {
+			// newTestName comes first
+			output.println(testAdded(newTest));
+			newTest = nextTest(newst);
+			nothingChanged = false;
+		}
+		// Make sure that there is always some output.
+		if (nothingChanged) {
+			output.println(NOTHING_CHANGED_MSG);
+		}
+		output.close();
+	}
+
+	/**
+	 * Get the message for when a test is not run.
+	 */
+	static String testNotRun(String[] test) {
+		return "Not run: " + test[0];
+	}
+	
+	/**
+	 * Get the message for when a test's status changes.
+	 */
+	static String testChanged(String[] test) {
+		return "Changed: " + test[0] + ", " + test[1];
+	}
+	
+	/**
+	 * Get the message for when a test is added.
+	 */
+	static String testAdded(String[] test) {
+		return "New test: " + test[0] + ", Status: " + test[1];
+	}
+
+	/**
+	 * Read the file given by s, and return its contents.
+	 */
+	static String readFile(String s) throws IOException {
+		byte[] buf = new byte[8192];
+		FileInputStream r = new FileInputStream(s);
+		ByteArrayOutputStream aStream = new ByteArrayOutputStream();
+		int n;
+		while ((n = r.read(buf)) != -1) {
+			aStream.write(buf, 0, n);
+		}
+		r.close();
+		return aStream.toString();
+	}
+	
+	
+	/**
+	 * Returns the next 2 tokens in st, if they exist.
+	 * Returns null if they do not.
+	 */
+	static String[] nextTest(StringTokenizer st) {
+		String[] test = new String[2];
+		if (st.hasMoreTokens()) {
+			test[0] = st.nextToken();
+		} else {
+			return null;
+		}
+		if (st.hasMoreTokens()) {
+			test[1] = st.nextToken();
+		} else {
+			return null;
+		}
+		return test;
+	}
+}
+
diff --git a/results/plugins/org.eclipse.test/src/org/eclipse/test/UITestApplication.java b/results/plugins/org.eclipse.test/src/org/eclipse/test/UITestApplication.java
new file mode 100644
index 0000000..4ed8287
--- /dev/null
+++ b/results/plugins/org.eclipse.test/src/org/eclipse/test/UITestApplication.java
@@ -0,0 +1,220 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.test;
+
+import java.io.IOException;
+
+import junit.framework.Assert;
+
+import org.eclipse.core.runtime.IPlatformRunnable;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
+
+import org.eclipse.ui.IWindowListener;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.testing.ITestHarness;
+import org.eclipse.ui.testing.TestableObject;
+
+/**
+ * A Workbench that runs a test suite specified in the
+ * command line arguments.
+ */ 
+public class UITestApplication  implements IPlatformRunnable, ITestHarness, IApplication {
+
+	private static final String DEFAULT_APP_3_0 = "org.eclipse.ui.ide.workbench"; //$NON-NLS-1$
+	private static final String DEFAULT_APP_PRE_3_0 = "org.eclipse.ui.workbench"; //$NON-NLS-1$
+	
+	private boolean fInDeprecatedMode = false;
+	private TestableObject fTestableObject;
+	private int fTestRunnerResult = -1;
+	private IApplicationContext appContext;
+	
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.boot.IPlatformRunnable
+	 */
+	public Object run(final Object args) throws Exception {
+		// Get the application to test
+		Object application = getApplication((String[])args);
+		Assert.assertNotNull(application);
+		
+		Object result;
+		if (fInDeprecatedMode && (application instanceof IPlatformRunnable)) {
+			result = runDeprecatedApplication((IPlatformRunnable)application, args);
+		}
+		else {
+			result = runApplication(application, args);
+		}
+		if (!IPlatformRunnable.EXIT_OK.equals(result)) {
+			System.err.println("UITestRunner: Unexpected result from running application " + application + ": " + result);
+		}
+		return new Integer(fTestRunnerResult);
+	}
+	
+	
+	/*
+	 * return the application to run, or null if not even the default application
+	 * is found.
+	 */
+	private Object getApplication(String[] args) throws CoreException {
+		// Assume we are in 3.0 mode.
+		// Find the name of the application as specified by the PDE JUnit launcher.
+		// If no application is specified, the 3.0 default workbench application
+		// is returned.
+		IExtension extension =
+		Platform.getExtensionRegistry().getExtension(
+				Platform.PI_RUNTIME,
+				Platform.PT_APPLICATIONS,
+				getApplicationToRun(args));
+		
+		// If no 3.0 extension can be found, search the registry
+		// for the pre-3.0 default workbench application, i.e. org.eclipse ui.workbench
+		// Set the deprecated flag to true
+		if (extension == null) {
+			extension = Platform.getExtensionRegistry().getExtension(
+					Platform.PI_RUNTIME,
+					Platform.PT_APPLICATIONS,
+					DEFAULT_APP_PRE_3_0);
+			fInDeprecatedMode = true;
+		}
+		
+		Assert.assertNotNull(extension);
+		
+		// If the extension does not have the correct grammar, return null.
+		// Otherwise, return the application object.
+		IConfigurationElement[] elements = extension.getConfigurationElements();
+		if (elements.length > 0) {
+			IConfigurationElement[] runs = elements[0].getChildren("run"); //$NON-NLS-1$
+			if (runs.length > 0) {
+				Object runnable = runs[0].createExecutableExtension("class"); //$NON-NLS-1$
+				if (runnable instanceof IPlatformRunnable)
+					return (IPlatformRunnable) runnable;
+				if (runnable instanceof IApplication)
+					return (IApplication) runnable;
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 * The -testApplication argument specifies the application to be run.
+	 * If the PDE JUnit launcher did not set this argument, then return
+	 * the name of the default application.
+	 * In 3.0, the default is the "org.eclipse.ui.ide.worbench" application.
+	 * 
+	 */
+	private String getApplicationToRun(String[] args) {
+		for (int i = 0; i < args.length; i++) {
+			if (args[i].equals("-testApplication") && i < args.length -1) //$NON-NLS-1$
+				return args[i+1];
+		}
+		return DEFAULT_APP_3_0;
+	}
+	
+	/**
+	 * In 3.0 mode
+	 * 
+	 */
+	private Object runApplication(Object application, Object args) throws Exception {
+		fTestableObject = PlatformUI.getTestableObject();
+		fTestableObject.setTestHarness(this);
+		if (application instanceof IPlatformRunnable) {
+			return ((IPlatformRunnable) application).run(args);
+		} 
+		return ((IApplication) application).start(appContext);
+		
+	}
+	
+	/*
+	 * If we are in pre-3.0 mode, then the application to run is
+	 * "org.eclipse.ui.workbench" Therefore, we safely cast the runnable object
+	 * to IWorkbenchWindow. We add a listener to it, so that we know when the
+	 * window opens so that we can start running the tests. When the tests are
+	 * done, we explicitly call close() on the workbench.
+	 */
+	private Object runDeprecatedApplication(
+		IPlatformRunnable object,
+		final Object args)
+		throws Exception {
+
+		Assert.assertTrue(object instanceof IWorkbench);
+
+		final IWorkbench workbench = (IWorkbench) object;
+		// the 'started' flag is used so that we only run tests when the window
+		// is opened
+		// for the first time only.
+		final boolean[] started = { false };
+		workbench.addWindowListener(new IWindowListener() {
+			public void windowOpened(IWorkbenchWindow w) {
+				if (started[0])
+					return;
+				w.getShell().getDisplay().asyncExec(new Runnable() {
+					public void run() {
+						started[0] = true;
+						try {
+							fTestRunnerResult = EclipseTestRunner.run((String[]) args);
+						} catch (IOException e) {
+							e.printStackTrace();
+						}
+						workbench.close();
+					}
+				});
+			}
+			public void windowActivated(IWorkbenchWindow window) {
+			}
+			public void windowDeactivated(IWorkbenchWindow window) {
+			}
+			public void windowClosed(IWorkbenchWindow window) {
+			}
+		});
+		return ((IPlatformRunnable) workbench).run(args);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.testing.ITestHarness#runTests()
+	 */
+	public void runTests() {
+		fTestableObject.testingStarting();
+		fTestableObject.runTest(new Runnable() {
+			public void run() {
+				try {
+					fTestRunnerResult = EclipseTestRunner.run(Platform.getCommandLineArgs());
+				} catch (IOException e) {
+					e.printStackTrace();
+				}
+			}
+		});
+		fTestableObject.testingFinished();
+	}
+
+
+	public Object start(IApplicationContext context) throws Exception {
+		this.appContext = context;
+		String[] args = (String[]) appContext.getArguments().get("application.args");
+		if (args == null)
+			args = new String[0];
+		return run(args);
+	}
+
+
+	public void stop() {
+		// TODO Auto-generated method stub
+		
+	}
+	
+}
+
diff --git a/results/plugins/org.eclipse.test/testframework.html b/results/plugins/org.eclipse.test/testframework.html
new file mode 100644
index 0000000..82f1ada
--- /dev/null
+++ b/results/plugins/org.eclipse.test/testframework.html
@@ -0,0 +1,277 @@
+<html>
+<head>
+<title>Eclipse Testing Instructions</title>
+</head>
+
+<body>
+<h1>The Eclipse Test Framework</h1><p>Last Modified: June 13, 2007</p><p><font size="+1"><br>
+  Introduction</font></p><p>The testing framework is comprised of the org.eclipse.test plugin and the org.eclipse.ant.optional.junit 
+  fragment. </p><p>These two projects are available from the dev.eclipse.org repository and are 
+  included in the 	eclipse-test-framework-&lt;buildId&gt;.zip from the eclipse.org 
+  downloads page.</p><p><font size="+1">Building and Installation</font></p><p>Since the org.eclipse.test plugin is stored in the repository in source-code 
+  form, it needs to be compiled before it can be used. The org.eclipse.ant.optional.junit 
+  fragment does not contain any source and can be used as is from the repository.</p><ol>
+  <li>Turn of automatic builds. Window->Preferences->Workbench and uncheck "Perform 
+    build automatically on resource modification"</li><li>Load org.eclipse.test into your workspace.</li><li>Right-click on the org.eclipse.test project in either the Navigator or Packages 
+    view. Select 'Rebuild Project' from the context menu. This will compile the 
+    entire org.eclipse.test plugin.</li><li>Finally, copy the org.eclipse.test plugin into your target Eclipse.</li>
+    <li>The org.eclipse.ant.optional.junit fragment only needs to be present in 
+    the environment of the Eclipse that is overseeing the test process. If you 
+    are running the test script from within the Workbench, this means that the 
+    fragments need to be present withinn your development Eclipse. If you are 
+    running the tests from the command line, then the fragments will need to be 
+    present in your target Eclipse.</li></ol>
+ <p><font size="+1">Setup</font></p>
+ <p>Follow the steps given above to build and install all of the neccessary plugins 
+  and fragments. Please note that the current version of the test framework is 
+  not compatible with the PDE notion of self-hosting. If you want to run the tests, 
+  you will need to setup a full target Eclipse so that the testing framework can 
+  detect everything that is needed.</p>
+<p>If you are writing tests for one or more Eclipse plugins, then you should
+create a separate plugin for tests. The test plugin will contain all of the
+tests that will be run on your development plugins, as well as defining how
+those tests get run.</p>
+
+<p>If you are not writing tests for an Eclipse plugin, then you should look into 
+  using JUnit on its own to test your work. JUnit is designed for testing Java 
+  code, and by default has no knowledge of Eclipse. There are separate mechanisms 
+  for using JUnit on Java code in Eclipse. See the documentation provided here:</p>
+<p> <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/plugins/org.eclipse.jdt.junit/index.html">
+JUnit Support in Eclipse</a><br>
+  	<a href="http://dev.eclipse.org:8080/help/content/help:/org.eclipse.jdt.doc.user/tasks/tasks-207.htm?resultof=%6a%75%6e%69%74%20&toc=%2Forg.eclipse.jdt.doc.user%2Ftoc.xml">
+  	Using JUnit</a></p>
+  	
+  	<p>Once a test plugin has been created, you must then create an Ant script that 
+  will run all of the tests. Create a file called 'test.xml' in the root of your plug-in or bundle.
+  This is an Ant file that defines how each test is going to be run. The 'test.xml' 
+  file is like a DOS batch file that scripts the entire testing process. Typically, 
+  the 'test.xml' file will contain targets for setting up the test run, executing 
+  the tests, cleaning up afterwards, and running the entire process.</p>
+  
+  <p><font size="+1">Converting existing Test Suites</font></p>
+  
+  <p>If you are converting an existing set of tests to use the new framework, the
+actual tests that have been written should not need much change.</p>
+  <p>If you have tests in multiple plugins, move these to a single test plug-in for your component.</p>
+  
+  <p>Make sure that the tests are defined in a plug-in. This is probably the most 
+  common cause of confusion in the entire test process. Your tests need to be 
+  in a plug-in so that Eclipse can find them when it tries to load them.</p>
+  
+  <p><font size="+1">Creating new Test Suites</font></p>
+  
+  <p>Creating new JUnit tests for an Eclipse plugin should be no more difficult 
+  than writing standard JUnit tests. Since the framework allows tests to be run 
+  inside of a working Eclipse, any tests that you write have available to them 
+  any of the methods supplied by the Eclipse platform, provided that you add the 
+  appropriate dependencies to your tests' manifest.</p>
+  
+  <p><font size="+1">Performance Issues</font></p>
+  <p>You should keep in mind the number of times that Eclipse needs to be
+started. Launching Eclipse has a substantial cost in terms of runtime. To
+minimize the number of times the platform is started, you should consider
+writing a TestSuite called AllTests for each of your test plugins. AllTests
+should invoke each of the tests that you want to run for a particular plugin.
+The 'test.xml' file can then run the AllTests class, which will run all of your
+tests, but the platform will only ever be started once for each of your test
+plugins.</p><p>Note: Sometimes tests involve shutting down, restarting, and testing the state 
+  of metadata that was written to disk. These session tests will require Eclipse 
+  to be launched several times in sequence, which will increase the runtime of 
+  your tests. This cannot be avoided.</p><p>&nbsp;</p>
+  
+  <p><font size="+1">Running the Test Suite from the UI</font></p><p>Right click on the test.xml file and select 'Run Ant...' from the pull-down 
+  menu. The Running Ant dialog box pops up. From the list of targets, select the 
+  one that runs all of your tests. If you are using the example file provided 
+  below, this target is called 'Run', and will be selected by default. Hit the 
+  'Finish' button to start the test process.</p>
+  
+  <p><font size="+1">Running the Test Suite from the command line</font></p>
+  <p>When the test suites are invoked automatically, they are run from command
+line. From the ${eclipse-home} directory, the command to use is:</p>
+<code>java -jar plugins\org.eclipse.equinox.launcher_&lt;version&gt;.jar -application org.eclipse.ant.core.antRunner -buildfile ${test-plugin-path}\test.xml
+-Declipse-home=${eclipse-home} -Dos=&lt;operating system&gt; -Dws=&lt;windowing system&gt; -Darch=&lt;architecture&gt;</code>
+
+<p>Individual tests can also be invoked directly. From the ${eclipse-home}
+directory, use the command:</p><code>java -jar plugins\org.eclipse.equinox.launcher_&lt;version&gt;.jar
+ -application ${launcher} -os &lt;operating system&gt; -ws &lt;windowing system&gt; -arch &lt;architecture&gt; -dev bin -testpluginname ${plugin-name} 
+-classname ${test-classname} formattter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,&lt;path to output file with .xml extension&gt;</code> 
+<p>where ${launcher} is one of: <i>org.eclipse.test.uitestapplication</i> or <i>org.eclipse.test.coretestapplication</i> 
+  depending on whether or not you want to run your tests within an active Workbench.</p><p><font size="+1">Output</font></p><p>By default, output from each test run is logged as XML. For each test that 
+  is run, the output is logged into the file called ${classname}.xml. The individual 
+  XML files are located in the ${eclipse-home} directory. When the test run is 
+  finished, you can call the <b>&quot;collect&quot;</b> target in the library 
+  file, which will collect the XML into a single file. See below for an example 
+  of how to use this target correctly.</p>
+  
+<h3>Other issues</h3><h4>Headless Testing vs. UI testing</h4><p>Many plugin tests will not need the Workbench active in order to run. Indeed, 
+  only the minimum number of plugins needed to run the plugin being tested need 
+  to be present when testing in a target Eclipse. There are two different Ant 
+  targets provided for running Eclipse plugin tests. One target starts the entire 
+  Workbench. The other starts Eclipse with the minimum number of plugins needed. 
+  It is up to you to decide which target is most appropriate. For examples, look 
+  at the <b>&quot;ui-test&quot;</b> and <b>&quot;core-test&quot;</b> targets below.</p>
+  
+<h4>Disposing the Display</h4><p>Some low-level tests for the Eclipse platform take actions that are not
+normally possible inside of Eclipse. An example of this behaviour would be
+disposing the display. While this action can be performed while running the UI,
+it will also kill the UI for the copy of Eclipse that is running, and cause
+errors when the Workbench tries to shutdown. If you need to test disposing the
+display, or other similar actions, your tests should be running without a UI. </p>
+
+<h4>Tests that are not plugins</h4><p>It is very easy to forget to define your tests inside of a plugin. If your 
+  tests will not load properly, make sure that a plug-in manifest exists in your 
+  test project, and also that the plugin is being loaded by the platform. Make 
+  sure that all of the dependencies are satisfied for your test plugin.</p>
+  
+<p><font size="+1">Interface</font></p><p>The org.eclipse.test plugin defines many useful Ant tasks/targets to aid developers 
+  in writing their test.xml scripts. Currently, there is only Ant targets defined, 
+  which can be called using Ant's built-in &lt;ant&gt; task. To use these targets, 
+  add the following line to the top of your script, and reference the ${library-file} 
+  property when calling &lt;ant&gt;:</p><code>&lt;property name=&quot;library-file&quot;
+value=&quot;${eclipse-home}/fragments/org.eclipse.test/library.xml&quot;/&gt; </code>
+
+<p>The targets that are defined are: </p><ul>
+  <li><b>ui-test</b> - This target runs a JUnit test suite inside of an Eclipse 
+    Workbench. This target is mainly for testing plugins that use the Eclipse 
+    UI and JFace. The output of the test pass is automatically logged in an XML 
+    file called ${classname}.xml. It takes four arguments: </li><ul>
+  <li><i>data-dir</i> - The
+      data directory of the Eclipse that gets run</li><li><i>plugin-name</i> -
+      The name of the plugin that the test suite is defined in</li><li><i>classname</i> -
+      The name of the class that the test suite is defined in</li><li><i>vmargs</i> - An
+      optional argument string to pass to the VM running the tests</li></ul><p>For example, the following code will run the test
+org.eclipse.foo.bar.MyTest in the plugin org.eclipse.foo in a new Eclipse
+workbench. It passes the string &quot;-Dbaz=true&quot; to the VM. The Eclipse
+stores its metadata in the directory &quot;data-folder&quot;. 
+
+<code><pre>
+&lt;ant target=&quot;ui-test&quot; antfile=&quot;${library-file}&quot; dir=&quot;${eclipse-home}&quot;&gt;
+  &lt;property name=&quot;data-dir&quot; value=&quot;data-folder&quot;/&gt;
+  &lt;property name=&quot;plugin-name&quot; value=&quot;org.eclipse.foo&quot;/&gt;
+  &lt;property name=&quot;classname&quot; value=&quot;org.eclipse.foo.bar.MyTest&quot;/&gt;
+  &lt;property name=&quot;vmargs&quot; value=&quot;-Dbaz=true&quot;/&gt;
+&lt;/ant&gt;
+</pre></code>
+
+  <li><b>core-test</b> - This target runs a JUnit test suite inside of an IPlatformRunnable. 
+    This target is for testing plugins that use the Eclipse platform, but do not 
+    require a UI to be running. The output of the test pass is automatically logged 
+    in an XML file called ${classname}.xml. It takes four arguments: </li><ul>
+  <li><i>data-dir</i> - The
+      data directory of the Eclipse that gets run</li><li><i>plugin-name</i> -
+      The name of the plugin that the test suite is defined in</li><li><i>classname</i> -
+      The name of the class that the test suite is defined in</li><li><i>vmargs</i> - An
+      optional argument string to pass to the VM running the tests</li></ul><p>For example, the following code will run the test
+org.eclipse.foo.bar.MyTest in the plugin org.eclipse.foo in a headless Eclipse.
+It passes the string &quot;-Dbaz=true&quot; to the VM. The Eclipse stores its
+metadata in the directory &quot;data-folder&quot;.
+
+<code><pre>
+&lt;ant target=&quot;core-test&quot; antfile=&quot;${library-file}&quot; dir=&quot;${eclipse-home}&quot;&gt;
+  &lt;property name=&quot;data-dir&quot; value=&quot;data-folder&quot;/&gt;
+  &lt;property name=&quot;plugin-name&quot; value=&quot;org.eclipse.foo&quot;/&gt;
+  &lt;property name=&quot;classname&quot; value=&quot;org.eclipse.foo.bar.MyTest&quot;/&gt;
+  &lt;property name=&quot;vmargs&quot; value=&quot;-Dbaz=true&quot;/&gt;
+&lt;/ant&gt;
+</pre></code>
+
+ <li><b>collect</b> - This
+     target collects the XML files that are produced over the course of the
+     test script. It takes two arguments: </li><ul>
+  <li><i>includes</i> - A
+      pattern matching all XML files to be included in the test report. This
+      argument is typically &quot;org*.xml&quot;</li><li><i>output-file</i> -
+      The filename where the output of the test gets stored. For the automated
+      build process, this file should be ${pluginname}.xml, and be located in
+      the ECLIPSE_HOME directory.</li></ul><p>For example, the following code collects all of the files
+matching the pattern &quot;org*.xml&quot; in the directory ${eclipse-home},
+into the file named &quot;logfile.xml&quot;.
+
+<code><pre>
+&lt;ant target=&quot;collect&quot; antfile=&quot;${library-file}&quot; dir=&quot;${eclipse-home}&quot;&gt;
+  &lt;property name=&quot;includes&quot; value=&quot;org*.xml&quot;/&gt;
+  &lt;property name=&quot;output-file&quot; value=&quot;logfile.xml&quot;/&gt;
+&lt;/ant&gt;
+</pre></code>
+
+ 
+</ul><h2>Examples:</h2><p>Included is the 'test.xml' file from the org.eclipse.jdt.ui.tests.refactoring plugin. This
+file controls all of the automated testing that is done for the  org.eclipse.jdt.ui.tests.refactoring
+plugin. It can be run from inside of Eclipse or from the command line. It is
+intended to serve as a template file for testing any other plugin.</p><p>Notice that the structure of the file roughly mirrors that of a JUnit test.
+Targets are defined for setting up the tests, defining what needs to be done,
+cleaning up after the tests, and running everything in the right order.</p>
+<code><pre>
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+
+&lt;project name="testsuite" default="run" basedir="."&gt;
+	&lt;!-- The property ${eclipse-home} should be passed into this script --&gt;
+	&lt;!-- Set a meaningful default value for when it is not. --&gt;
+	&lt;property name="eclipse-home" value="${basedir}\..\.."/&gt;
+
+	&lt;!-- sets the properties eclipse-home, and library-file --&gt;
+	&lt;property name="plugin-name" value="org.eclipse.jdt.ui.tests.refactoring"/&gt;
+	&lt;property name="library-file"
+            value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/&gt;
+
+	&lt;!-- This target holds all initialization code that needs to be done for --&gt;
+	&lt;!-- all tests that are to be run. Initialization for individual tests --&gt;
+	&lt;!-- should be done within the body of the suite target. --&gt;
+	&lt;target name="init"&gt;
+		&lt;tstamp/&gt;
+		&lt;delete&gt;
+			&lt;fileset dir="${eclipse-home}" includes="org*.xml"/&gt;
+		&lt;/delete&gt;
+	&lt;/target&gt;
+
+	&lt;!-- This target defines the tests that need to be run. --&gt;
+	&lt;target name="suite"&gt;
+		&lt;property name="refactoring-folder" 
+              value="${eclipse-home}/refactoring_folder"/&gt;
+		&lt;delete dir="${refactoring-folder}" quiet="true"/&gt;
+		&lt;ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}"&gt;
+			&lt;property name="data-dir" value="${refactoring-folder}"/&gt;
+			&lt;property name="plugin-name" value="${plugin-name}"/&gt;
+			&lt;property name="classname" 
+                value="org.eclipse.jdt.ui.tests.refactoring.all.AllAllRefactoringTests"/&gt;
+		&lt;/ant&gt;
+	&lt;/target&gt;
+	
+	&lt;!-- This target holds code to cleanup the testing environment after --&gt;
+	&lt;!-- after all of the tests have been run. You can use this target to --&gt;
+	&lt;!-- delete temporary files that have been created. --&gt;
+	&lt;target name="cleanup"&gt;
+	&lt;/target&gt;
+
+	&lt;!-- This target runs the test suite. Any actions that need to happen --&gt;
+	&lt;!-- after all the tests have been run should go here. --&gt;
+	&lt;target name="run" depends="init,suite,cleanup"&gt;
+		&lt;ant target="collect" antfile="${library-file}" dir="${eclipse-home}"&gt;
+			&lt;property name="includes" value="org*.xml"/&gt;
+			&lt;property name="output-file" value="${plugin-name}.xml"/&gt;
+		&lt;/ant&gt;
+	&lt;/target&gt;
+	&lt;/project&gt;
+</pre></code>
+
+<h2>Known Issues:</h2><h4>Problem 1: Issues with Ant 1.3</h4><p>Ant 1.3 has some issues when used with the &lt;style&gt; tag and absolute
+paths. Also, any tests that use the <code>System.exit()</code> call will not
+log their output properly when using Ant 1.3.</p><h4>Problem 2: ECLIPSE_HOME</h4><p>The test suites need to know where the root of the eclipse install is on the
+file system (the ECLIPSE_HOME variable). However, this variable is only defined
+in JDT. The ${eclipse-home} property can be set to a reasonable default inside
+of the test.xml script. Then tests can be run from the standard Ant window,
+without having to specify -Declipse-home=%ECLIPSE_HOME%. If a value for
+${eclipse-home} does get passed in, the default (specified in test.xml) gets
+overridden. The parameter is passed in by the build mechanism. For most cases,
+the value &quot;${basedir}/../..&quot; is a reasonable default.</p><h4>Problem 3: Ugly reference to library.xml</h4><p>org.eclipse.test should provide Ant tasks, not template scripts.</p><h4>Problem 4: No console output</h4><p>When you run a TestSuite using the standard JUnit, it normally outputs a
+series of dots to the console so that you can track the TestSuite's progress.
+It is not possible to add this feature to the automated testing process at this
+point in time.</p><h4>Problem 5: Ant java task on Linux</h4><p>Ant expects there to be a java executable on the system path. Furthermore, the executable
+must be a real file, not a symbolic link. If the test framework is throwing an exception
+<code>java.io.IOException: java: not found</code>, ensure that the java executable is on
+your system path.</p><h4>Problem 6: PDE</h4><p>The testing framework currently has no knowledge of PDE. In order to run the automated
+you must be running a self hosting environment with a full development and target Eclipse.</p>
+
+</body>
+
+</html>


hooks/post-receive
-- 
eclipse-cdt - Plug-in for eclipse to handle C/C++ - Debian package.



More information about the pkg-java-commits mailing list